mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-13 20:36:34 +00:00
feat: remove -p tslint.json for test
This commit is contained in:
parent
d0df242e77
commit
6d013e18f9
@ -11,7 +11,3 @@ quote_type = single
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[makefile]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
"lint-staged": {
|
||||
"*.ts": [
|
||||
"prettier --write",
|
||||
"tslint --fix -p tsconfig.json",
|
||||
"tslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"prebuild": "npm run schema",
|
||||
"test": "ava",
|
||||
"test": "ava --verbose --serial",
|
||||
"test:snapshot": "ava --update-snapshots",
|
||||
"schema": "node ./scripts/transform.js"
|
||||
},
|
||||
|
||||
@ -118,7 +118,7 @@ class Generator implements IGenerator {
|
||||
|
||||
const defaultManifestFilePath = join(
|
||||
dirname(matParsedModel.filePath),
|
||||
'./manifest.js',
|
||||
'./manifest.json',
|
||||
);
|
||||
|
||||
// 填充 props
|
||||
@ -155,14 +155,34 @@ class Generator implements IGenerator {
|
||||
const defaultValueItem = matParsedModel.propsDefaults.find(
|
||||
inner => inner.name === item.name,
|
||||
);
|
||||
props.push({
|
||||
const propItem: Partial<PropsSection['props'][0]> = {
|
||||
name: item.name,
|
||||
propType: item.type as PropType,
|
||||
description: '',
|
||||
defaultValue: defaultValueItem
|
||||
? defaultValueItem.defaultValue
|
||||
: undefined,
|
||||
});
|
||||
};
|
||||
if (
|
||||
[
|
||||
'array',
|
||||
'bool',
|
||||
'func',
|
||||
'number',
|
||||
'object',
|
||||
'string',
|
||||
'node',
|
||||
'element',
|
||||
'any',
|
||||
].includes(item.type)
|
||||
) {
|
||||
propItem.propType = item.type as PropType;
|
||||
} else {
|
||||
propItem.propType = {
|
||||
type: item.type,
|
||||
// @ts-ignore
|
||||
value: item.value,
|
||||
} as PropType;
|
||||
}
|
||||
if (defaultValueItem) {
|
||||
propItem.defaultValue = defaultValueItem.defaultValue;
|
||||
}
|
||||
props.push(propItem as PropsSection['props'][0]);
|
||||
});
|
||||
|
||||
return props;
|
||||
|
||||
179
packages/material-parser/src/validate/schema.d.ts
vendored
179
packages/material-parser/src/validate/schema.d.ts
vendored
@ -1,179 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/**
|
||||
* This file was automatically generated by json-schema-to-typescript.
|
||||
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
||||
* and run json-schema-to-typescript to regenerate this file.
|
||||
*/
|
||||
|
||||
/**
|
||||
* json schema for low code component protocol
|
||||
*/
|
||||
export type ComponentMaterial = BasicSection & PropsSection & ConfigureSection;
|
||||
export type PropType = BasicType | RequiredType | ComplexType;
|
||||
export type BasicType =
|
||||
| 'array'
|
||||
| 'bool'
|
||||
| 'func'
|
||||
| 'number'
|
||||
| 'object'
|
||||
| 'string'
|
||||
| 'node'
|
||||
| 'element'
|
||||
| 'any';
|
||||
export type ComplexType =
|
||||
| OneOf
|
||||
| OneOfType
|
||||
| ArrayOf
|
||||
| ObjectOf
|
||||
| Shape
|
||||
| Exact;
|
||||
export type ConfigureProp = {
|
||||
title?: string;
|
||||
extraProps?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
[k: string]: any;
|
||||
} & (ConfigureFieldProp | ConfigureGroupProp);
|
||||
|
||||
export interface BasicSection {
|
||||
componentName: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
docUrl: string;
|
||||
screenshot: string;
|
||||
icon?: string;
|
||||
tags?: string[];
|
||||
devMode?: 'proCode' | 'lowCode';
|
||||
npm: Npm;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface Npm {
|
||||
package: string;
|
||||
exportName: string;
|
||||
subName: string;
|
||||
main: string;
|
||||
destructuring: boolean;
|
||||
version: string;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface PropsSection {
|
||||
props?: {
|
||||
name: string;
|
||||
propType: PropType;
|
||||
description?: string;
|
||||
defaultValue?: any;
|
||||
[k: string]: any;
|
||||
}[];
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface RequiredType {
|
||||
type: BasicType;
|
||||
isRequired?: boolean;
|
||||
}
|
||||
export interface OneOf {
|
||||
type: 'oneOf';
|
||||
value: string[];
|
||||
isRequired?: boolean;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface OneOfType {
|
||||
type: 'oneOfType';
|
||||
value: PropType[];
|
||||
isRequired?: boolean;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface ArrayOf {
|
||||
type: 'arrayOf';
|
||||
value: PropType;
|
||||
isRequired?: boolean;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface ObjectOf {
|
||||
type: 'objectOf';
|
||||
value: PropType;
|
||||
isRequired?: boolean;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface Shape {
|
||||
type: 'shape';
|
||||
value: {
|
||||
name?: string;
|
||||
propType?: PropType;
|
||||
}[];
|
||||
isRequired?: boolean;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface Exact {
|
||||
type: 'exact';
|
||||
value: {
|
||||
name?: string;
|
||||
propType?: PropType;
|
||||
}[];
|
||||
isRequired?: boolean;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface ConfigureSection {
|
||||
configure?: {
|
||||
props?: ConfigureProp[];
|
||||
styles?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
events?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
component?: ConfigureComponent;
|
||||
[k: string]: any;
|
||||
};
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface ConfigureFieldProp {
|
||||
type: 'field';
|
||||
name?: string;
|
||||
setter?: ConfigureFieldSetter;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface ConfigureFieldSetter {
|
||||
componentName:
|
||||
| 'List'
|
||||
| 'Object'
|
||||
| 'Function'
|
||||
| 'Node'
|
||||
| 'Mixin'
|
||||
| 'Expression'
|
||||
| 'Switch'
|
||||
| 'Number'
|
||||
| 'Input'
|
||||
| 'TextArea'
|
||||
| 'Date'
|
||||
| 'DateYear'
|
||||
| 'DateMonth'
|
||||
| 'DateRange'
|
||||
| 'ColorPicker'
|
||||
| 'CodeEditor'
|
||||
| 'Select'
|
||||
| 'RadioGroup';
|
||||
props?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface ConfigureGroupProp {
|
||||
type: 'group';
|
||||
items: ConfigureProp[];
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface ConfigureComponent {
|
||||
isContainer?: boolean;
|
||||
isModal?: boolean;
|
||||
descriptor?: string;
|
||||
nestingRule?: {
|
||||
childWhitelist?: string[];
|
||||
parentWhitelist?: string[];
|
||||
descendantBlacklist?: string[];
|
||||
ancestorWhitelist?: string[];
|
||||
[k: string]: any;
|
||||
};
|
||||
isNullNode?: boolean;
|
||||
isLayout?: boolean;
|
||||
[k: string]: any;
|
||||
}
|
||||
@ -10,7 +10,7 @@ Generated by [AVA](https://ava.li).
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeBlank',
|
||||
@ -25,44 +25,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleFlexLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'id',
|
||||
propType: 'string',
|
||||
},
|
||||
@ -72,7 +62,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeIcon',
|
||||
@ -87,44 +77,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'className',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'iconClassName',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -134,7 +114,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeImage',
|
||||
@ -149,14 +129,11 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -166,7 +143,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeLink',
|
||||
@ -181,38 +158,30 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -222,7 +191,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakePlaceholder',
|
||||
@ -237,26 +206,22 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -266,7 +231,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeText',
|
||||
@ -281,44 +246,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'type',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -328,7 +283,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'Root',
|
||||
@ -348,15 +303,15 @@ Generated by [AVA](https://ava.li).
|
||||
backgroundColor: '#f0f2f5',␊
|
||||
minHeight: '100%'␊
|
||||
}`,
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
screenshot: '',
|
||||
@ -371,7 +326,7 @@ Generated by [AVA](https://ava.li).
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'Demo',
|
||||
@ -386,122 +341,112 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalArray',
|
||||
propType: 'array',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalBool',
|
||||
propType: 'bool',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalFunc',
|
||||
propType: 'func',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalNumber',
|
||||
propType: 'number',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObject',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalString',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalSymbol',
|
||||
propType: 'symbol',
|
||||
propType: {
|
||||
type: 'symbol',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalNode',
|
||||
propType: 'node',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalElement',
|
||||
propType: 'element',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalElementType',
|
||||
propType: 'elementType',
|
||||
propType: {
|
||||
type: 'elementType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalMessage',
|
||||
propType: 'instanceOf',
|
||||
propType: {
|
||||
type: 'instanceOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalEnum',
|
||||
propType: 'oneOf',
|
||||
propType: {
|
||||
type: 'oneOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalUnion',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalArrayOf',
|
||||
propType: 'arrayOf',
|
||||
propType: {
|
||||
type: 'arrayOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectOf',
|
||||
propType: 'objectOf',
|
||||
propType: {
|
||||
type: 'objectOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithShape',
|
||||
propType: 'shape',
|
||||
propType: {
|
||||
type: 'shape',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithShape2',
|
||||
propType: 'shape',
|
||||
propType: {
|
||||
type: 'shape',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithStrictShape',
|
||||
propType: 'exact',
|
||||
propType: {
|
||||
type: 'exact',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'requiredFunc',
|
||||
propType: 'func',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'requiredAny',
|
||||
propType: 'any',
|
||||
},
|
||||
|
||||
Binary file not shown.
@ -10,7 +10,7 @@ Generated by [AVA](https://ava.li).
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeBlank',
|
||||
@ -25,44 +25,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleFlexLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'id',
|
||||
propType: 'string',
|
||||
},
|
||||
@ -72,7 +62,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeIcon',
|
||||
@ -87,44 +77,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'className',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'iconClassName',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -134,7 +114,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeImage',
|
||||
@ -149,14 +129,11 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -166,7 +143,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeLink',
|
||||
@ -181,38 +158,30 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -222,7 +191,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakePlaceholder',
|
||||
@ -237,26 +206,22 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -266,7 +231,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeText',
|
||||
@ -281,44 +246,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'type',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -328,7 +283,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'Root',
|
||||
@ -348,15 +303,15 @@ Generated by [AVA](https://ava.li).
|
||||
backgroundColor: '#f0f2f5',␊
|
||||
minHeight: '100%'␊
|
||||
}`,
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
screenshot: '',
|
||||
@ -371,7 +326,7 @@ Generated by [AVA](https://ava.li).
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'Demo',
|
||||
@ -386,122 +341,112 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalArray',
|
||||
propType: 'array',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalBool',
|
||||
propType: 'bool',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalFunc',
|
||||
propType: 'func',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalNumber',
|
||||
propType: 'number',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObject',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalString',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalSymbol',
|
||||
propType: 'symbol',
|
||||
propType: {
|
||||
type: 'symbol',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalNode',
|
||||
propType: 'node',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalElement',
|
||||
propType: 'element',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalElementType',
|
||||
propType: 'elementType',
|
||||
propType: {
|
||||
type: 'elementType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalMessage',
|
||||
propType: 'instanceOf',
|
||||
propType: {
|
||||
type: 'instanceOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalEnum',
|
||||
propType: 'oneOf',
|
||||
propType: {
|
||||
type: 'oneOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalUnion',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalArrayOf',
|
||||
propType: 'arrayOf',
|
||||
propType: {
|
||||
type: 'arrayOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectOf',
|
||||
propType: 'objectOf',
|
||||
propType: {
|
||||
type: 'objectOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithShape',
|
||||
propType: 'shape',
|
||||
propType: {
|
||||
type: 'shape',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithShape2',
|
||||
propType: 'shape',
|
||||
propType: {
|
||||
type: 'shape',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithStrictShape',
|
||||
propType: 'exact',
|
||||
propType: {
|
||||
type: 'exact',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'requiredFunc',
|
||||
propType: 'func',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'requiredAny',
|
||||
propType: 'any',
|
||||
},
|
||||
|
||||
Binary file not shown.
@ -1,408 +0,0 @@
|
||||
# Snapshot report for `test/accesser/OnlineAccesser.ts`
|
||||
|
||||
The actual snapshot is saved in `OnlineAccesser.ts.snap`.
|
||||
|
||||
Generated by [AVA](https://ava.li).
|
||||
|
||||
## access multiple exported component by online
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeBlank/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeBlank","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"styleFlexLayout","label":"styleFlexLayout","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"},{"name":"id","label":"id","renderer":""}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeBlank',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleLayout',
|
||||
name: 'styleLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBackground',
|
||||
name: 'styleBackground',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleFlexLayout',
|
||||
name: 'styleFlexLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'id',
|
||||
name: 'id',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeIcon/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeIcon","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"className","label":"className","renderer":""},{"name":"iconClassName","label":"iconClassName","renderer":""},{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeIcon',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'className',
|
||||
name: 'className',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'iconClassName',
|
||||
name: 'iconClassName',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleText',
|
||||
name: 'styleText',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBackground',
|
||||
name: 'styleBackground',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeImage/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeImage","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeImage',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeLink/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeLink","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeLink',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleText',
|
||||
name: 'styleText',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleLayout',
|
||||
name: 'styleLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBackground',
|
||||
name: 'styleBackground',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakePlaceholder/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakePlaceholder","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakePlaceholder',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleLayout',
|
||||
name: 'styleLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/AIMakeText/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeText","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"type","label":"type","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeText',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'type',
|
||||
name: 'type',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleText',
|
||||
name: 'styleText',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleLayout',
|
||||
name: 'styleLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBackground',
|
||||
name: 'styleBackground',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/8u9fhc4duv8uWDztUQ7Uxh/node_modules/@ali/aimake-basic/es/basic/Root/manifest.js',
|
||||
manifestJS: 'export default {"name":"Root","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"style","label":"style","renderer":"","defaultValue":"{\\n padding: 0,\\n backgroundColor: \'#f0f2f5\',\\n minHeight: \'100%\'\\n}"},{"name":"children","label":"children","renderer":""}]}}',
|
||||
manifestObj: {
|
||||
name: 'Root',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: `{␊
|
||||
padding: 0,␊
|
||||
backgroundColor: '#f0f2f5',␊
|
||||
minHeight: '100%'␊
|
||||
}`,
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
## access single exported component by online
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/rT9SFxrRVdFSqBfMvpxH2T/node_modules/@ali/demo-biz-test090702/es/manifest.js',
|
||||
manifestJS: 'export default {"name":"Demo","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[]}}',
|
||||
manifestObj: {
|
||||
name: 'Demo',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
Binary file not shown.
@ -10,7 +10,7 @@ Generated by [AVA](https://ava.li).
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeBlank',
|
||||
@ -25,44 +25,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleFlexLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'id',
|
||||
propType: 'string',
|
||||
},
|
||||
@ -72,7 +62,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeIcon',
|
||||
@ -87,44 +77,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'className',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'iconClassName',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -134,7 +114,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeImage',
|
||||
@ -149,14 +129,11 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -166,7 +143,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeLink',
|
||||
@ -181,38 +158,30 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -222,7 +191,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakePlaceholder',
|
||||
@ -237,26 +206,22 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -266,7 +231,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeText',
|
||||
@ -281,44 +246,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'type',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -328,7 +283,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'Root',
|
||||
@ -348,15 +303,15 @@ Generated by [AVA](https://ava.li).
|
||||
backgroundColor: '#f0f2f5',␊
|
||||
minHeight: '100%'␊
|
||||
}`,
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
screenshot: '',
|
||||
@ -371,7 +326,7 @@ Generated by [AVA](https://ava.li).
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeBlank',
|
||||
@ -386,44 +341,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleFlexLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'id',
|
||||
propType: 'string',
|
||||
},
|
||||
@ -433,7 +378,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeIcon',
|
||||
@ -448,44 +393,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'className',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'iconClassName',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -495,7 +430,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeImage',
|
||||
@ -510,14 +445,11 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -527,7 +459,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeLink',
|
||||
@ -542,38 +474,30 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -583,7 +507,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakePlaceholder',
|
||||
@ -598,26 +522,22 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -627,7 +547,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'AIMakeText',
|
||||
@ -642,44 +562,34 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'type',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBoxModel',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleText',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleLayout',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'styleBackground',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
@ -689,7 +599,7 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'Root',
|
||||
@ -709,15 +619,15 @@ Generated by [AVA](https://ava.li).
|
||||
backgroundColor: '#f0f2f5',␊
|
||||
minHeight: '100%'␊
|
||||
}`,
|
||||
description: '',
|
||||
name: 'style',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'children',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
screenshot: '',
|
||||
@ -732,7 +642,7 @@ Generated by [AVA](https://ava.li).
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'Demo',
|
||||
@ -747,122 +657,112 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalArray',
|
||||
propType: 'array',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalBool',
|
||||
propType: 'bool',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalFunc',
|
||||
propType: 'func',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalNumber',
|
||||
propType: 'number',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObject',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalString',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalSymbol',
|
||||
propType: 'symbol',
|
||||
propType: {
|
||||
type: 'symbol',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalNode',
|
||||
propType: 'node',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalElement',
|
||||
propType: 'element',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalElementType',
|
||||
propType: 'elementType',
|
||||
propType: {
|
||||
type: 'elementType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalMessage',
|
||||
propType: 'instanceOf',
|
||||
propType: {
|
||||
type: 'instanceOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalEnum',
|
||||
propType: 'oneOf',
|
||||
propType: {
|
||||
type: 'oneOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalUnion',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalArrayOf',
|
||||
propType: 'arrayOf',
|
||||
propType: {
|
||||
type: 'arrayOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectOf',
|
||||
propType: 'objectOf',
|
||||
propType: {
|
||||
type: 'objectOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithShape',
|
||||
propType: 'shape',
|
||||
propType: {
|
||||
type: 'shape',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithShape2',
|
||||
propType: 'shape',
|
||||
propType: {
|
||||
type: 'shape',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithStrictShape',
|
||||
propType: 'exact',
|
||||
propType: {
|
||||
type: 'exact',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'requiredFunc',
|
||||
propType: 'func',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'requiredAny',
|
||||
propType: 'any',
|
||||
},
|
||||
@ -879,7 +779,7 @@ Generated by [AVA](https://ava.li).
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/src/manifest.js',
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/src/manifest.json',
|
||||
manifestJS: undefined,
|
||||
manifestObj: {
|
||||
componentName: 'Demo',
|
||||
@ -894,122 +794,112 @@ Generated by [AVA](https://ava.li).
|
||||
},
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalArray',
|
||||
propType: 'array',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalBool',
|
||||
propType: 'bool',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalFunc',
|
||||
propType: 'func',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalNumber',
|
||||
propType: 'number',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObject',
|
||||
propType: 'object',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalString',
|
||||
propType: 'string',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalSymbol',
|
||||
propType: 'symbol',
|
||||
propType: {
|
||||
type: 'symbol',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalNode',
|
||||
propType: 'node',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalElement',
|
||||
propType: 'element',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalElementType',
|
||||
propType: 'elementType',
|
||||
propType: {
|
||||
type: 'elementType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalMessage',
|
||||
propType: 'instanceOf',
|
||||
propType: {
|
||||
type: 'instanceOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalEnum',
|
||||
propType: 'oneOf',
|
||||
propType: {
|
||||
type: 'oneOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalUnion',
|
||||
propType: 'oneOfType',
|
||||
propType: {
|
||||
type: 'oneOfType',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalArrayOf',
|
||||
propType: 'arrayOf',
|
||||
propType: {
|
||||
type: 'arrayOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectOf',
|
||||
propType: 'objectOf',
|
||||
propType: {
|
||||
type: 'objectOf',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithShape',
|
||||
propType: 'shape',
|
||||
propType: {
|
||||
type: 'shape',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithShape2',
|
||||
propType: 'shape',
|
||||
propType: {
|
||||
type: 'shape',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'optionalObjectWithStrictShape',
|
||||
propType: 'exact',
|
||||
propType: {
|
||||
type: 'exact',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'requiredFunc',
|
||||
propType: 'func',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
description: '',
|
||||
name: 'requiredAny',
|
||||
propType: 'any',
|
||||
},
|
||||
|
||||
Binary file not shown.
@ -1,633 +0,0 @@
|
||||
# Snapshot report for `test/scanner/LocalScanner.ts`
|
||||
|
||||
The actual snapshot is saved in `LocalScanner.ts.snap`.
|
||||
|
||||
Generated by [AVA](https://ava.li).
|
||||
|
||||
## scan from multiple exported component
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
mainEntry: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/index.js',
|
||||
modules: [
|
||||
{
|
||||
fileContent: `import AIMakeBlank from './basic/AIMakeBlank';␊
|
||||
import AIMakeIcon from './basic/AIMakeIcon';␊
|
||||
import AIMakeImage from './basic/AIMakeImage';␊
|
||||
import AIMakeLink from './basic/AIMakeLink';␊
|
||||
import AIMakePlaceholder from './basic/AIMakePlaceholder';␊
|
||||
import AIMakeText from './basic/AIMakeText';␊
|
||||
import Root from './basic/Root';␊
|
||||
export { AIMakeBlank, AIMakeIcon, AIMakeImage, AIMakeLink, AIMakePlaceholder, AIMakeText, Root };␊
|
||||
`,
|
||||
filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _extends from "@babel/runtime/helpers/extends";␊
|
||||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
import HOCLayoutProps from '../utils/HOCLayoutProps';␊
|
||||
import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊
|
||||
import HOCFlexLayoutProps from '../utils/HOCFlexLayoutProps';␊
|
||||
␊
|
||||
var AIMakeBlank =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeBlank, _Component);␊
|
||||
␊
|
||||
function AIMakeBlank() {␊
|
||||
_classCallCheck(this, AIMakeBlank);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeBlank).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeBlank, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var merged = {};␊
|
||||
var _this$props = this.props,␊
|
||||
children = _this$props.children,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleLayout = _this$props.styleLayout,␊
|
||||
styleBackground = _this$props.styleBackground,␊
|
||||
styleFlexLayout = _this$props.styleFlexLayout,␊
|
||||
style = _this$props.style,␊
|
||||
id = _this$props.id;␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleLayout,␊
|
||||
...styleBackground,␊
|
||||
...styleFlexLayout,␊
|
||||
...style␊
|
||||
};␊
|
||||
␊
|
||||
if (id) {␊
|
||||
merged.id = id;␊
|
||||
}␊
|
||||
␊
|
||||
return React.createElement("div", _extends({␊
|
||||
style: styles␊
|
||||
}, merged), children);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeBlank;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeBlank, "propTypes", {␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleLayout: PropTypes.object.isRequired,␊
|
||||
styleBackground: PropTypes.object.isRequired,␊
|
||||
styleFlexLayout: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object,␊
|
||||
id: PropTypes.string␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeBlank, "defaultProps", {␊
|
||||
children: [],␊
|
||||
style: {},␊
|
||||
id: ''␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(HOCLayoutProps(HOCBackgroundProps(HOCFlexLayoutProps(AIMakeBlank))));`,
|
||||
filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _extends from "@babel/runtime/helpers/extends";␊
|
||||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊
|
||||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import classNames from 'classnames';␊
|
||||
import createFromIconfont from './IconFont';␊
|
||||
␊
|
||||
var AIMakeIcon =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeIcon, _Component);␊
|
||||
␊
|
||||
function AIMakeIcon() {␊
|
||||
_classCallCheck(this, AIMakeIcon);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeIcon).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeIcon, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
className = _this$props.className,␊
|
||||
iconClassName = _this$props.iconClassName,␊
|
||||
children = _this$props.children,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleText = _this$props.styleText,␊
|
||||
styleBackground = _this$props.styleBackground,␊
|
||||
style = _this$props.style,␊
|
||||
otherProps = _objectWithoutProperties(_this$props, ["className", "iconClassName", "children", "styleBoxModel", "styleText", "styleBackground", "style"]);␊
|
||||
␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleText,␊
|
||||
...styleBackground,␊
|
||||
...style␊
|
||||
};␊
|
||||
return React.createElement("i", _extends({}, otherProps, {␊
|
||||
className: classNames(className, iconClassName),␊
|
||||
style: styles␊
|
||||
}), children);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeIcon;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeIcon, "propTypes", {␊
|
||||
className: PropTypes.string,␊
|
||||
iconClassName: PropTypes.string,␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleText: PropTypes.object.isRequired,␊
|
||||
styleBackground: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeIcon, "defaultProps", {␊
|
||||
className: '',␊
|
||||
iconClassName: 'iconfont',␊
|
||||
children: '',␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
AIMakeIcon.createFromIconfont = createFromIconfont;␊
|
||||
export default AIMakeIcon;`,
|
||||
filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _extends from "@babel/runtime/helpers/extends";␊
|
||||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊
|
||||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
␊
|
||||
var AIMakeImage =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeImage, _Component);␊
|
||||
␊
|
||||
function AIMakeImage() {␊
|
||||
_classCallCheck(this, AIMakeImage);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeImage).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeImage, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
style = _this$props.style,␊
|
||||
otherProps = _objectWithoutProperties(_this$props, ["styleBoxModel", "style"]);␊
|
||||
␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...style␊
|
||||
};␊
|
||||
return React.createElement("img", _extends({}, otherProps, {␊
|
||||
style: styles,␊
|
||||
alt: "AIMakeImage"␊
|
||||
}));␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeImage;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeImage, "propTypes", {␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeImage, "defaultProps", {␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(AIMakeImage);`,
|
||||
filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _extends from "@babel/runtime/helpers/extends";␊
|
||||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊
|
||||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
import HOCTextProps from '../utils/HOCTextProps';␊
|
||||
import HOCLayoutProps from '../utils/HOCLayoutProps';␊
|
||||
import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊
|
||||
␊
|
||||
var AIMakeLink =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeLink, _Component);␊
|
||||
␊
|
||||
function AIMakeLink() {␊
|
||||
_classCallCheck(this, AIMakeLink);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeLink).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeLink, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
children = _this$props.children,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleText = _this$props.styleText,␊
|
||||
styleLayout = _this$props.styleLayout,␊
|
||||
styleBackground = _this$props.styleBackground,␊
|
||||
style = _this$props.style,␊
|
||||
otherProps = _objectWithoutProperties(_this$props, ["children", "styleBoxModel", "styleText", "styleLayout", "styleBackground", "style"]);␊
|
||||
␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleText,␊
|
||||
...styleLayout,␊
|
||||
...styleBackground,␊
|
||||
...style␊
|
||||
};␊
|
||||
␊
|
||||
if (typeof children !== 'string') {␊
|
||||
styles.display = 'inline-block';␊
|
||||
}␊
|
||||
␊
|
||||
return React.createElement("a", _extends({}, otherProps, {␊
|
||||
style: styles␊
|
||||
}), [children]);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeLink;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeLink, "propTypes", {␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleText: PropTypes.object.isRequired,␊
|
||||
styleLayout: PropTypes.object.isRequired,␊
|
||||
styleBackground: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeLink, "defaultProps", {␊
|
||||
children: '',␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(HOCTextProps(HOCLayoutProps(HOCBackgroundProps(AIMakeLink))));`,
|
||||
filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
import HOCLayoutProps from '../utils/HOCLayoutProps';␊
|
||||
␊
|
||||
var AIMakePlaceholder =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakePlaceholder, _Component);␊
|
||||
␊
|
||||
function AIMakePlaceholder() {␊
|
||||
_classCallCheck(this, AIMakePlaceholder);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakePlaceholder).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakePlaceholder, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
children = _this$props.children,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleLayout = _this$props.styleLayout,␊
|
||||
style = _this$props.style;␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleLayout,␊
|
||||
...style␊
|
||||
};␊
|
||||
var placeholderStyle = {␊
|
||||
display: 'inline-block',␊
|
||||
border: '1px dashed #aaa',␊
|
||||
lineHeight: styles.height,␊
|
||||
backgroundColor: '#F5E075',␊
|
||||
overflow: 'hidden',␊
|
||||
textAlign: 'center',␊
|
||||
...styles␊
|
||||
};␊
|
||||
return React.createElement("div", {␊
|
||||
style: placeholderStyle␊
|
||||
}, children);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakePlaceholder;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakePlaceholder, "propTypes", {␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleLayout: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakePlaceholder, "defaultProps", {␊
|
||||
children: '',␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(HOCLayoutProps(AIMakePlaceholder));`,
|
||||
filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
import HOCTextProps from '../utils/HOCTextProps';␊
|
||||
import HOCLayoutProps from '../utils/HOCLayoutProps';␊
|
||||
import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊
|
||||
␊
|
||||
var AIMakeText =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeText, _Component);␊
|
||||
␊
|
||||
function AIMakeText() {␊
|
||||
var _this;␊
|
||||
␊
|
||||
_classCallCheck(this, AIMakeText);␊
|
||||
␊
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {␊
|
||||
args[_key] = arguments[_key];␊
|
||||
}␊
|
||||
␊
|
||||
_this = _possibleConstructorReturn(this, _getPrototypeOf(AIMakeText).call(this, ...args));␊
|
||||
␊
|
||||
_defineProperty(_assertThisInitialized(_this), "generateComponentType", function (componentType) {␊
|
||||
var componentNameMap = {␊
|
||||
h1: 'h1',␊
|
||||
h2: 'h2',␊
|
||||
h3: 'h3',␊
|
||||
h4: 'h4',␊
|
||||
h5: 'h5',␊
|
||||
paragraph: 'p',␊
|
||||
label: 'label'␊
|
||||
};␊
|
||||
return componentNameMap[componentType] || 'div';␊
|
||||
});␊
|
||||
␊
|
||||
return _this;␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeText, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
children = _this$props.children,␊
|
||||
type = _this$props.type,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleText = _this$props.styleText,␊
|
||||
styleLayout = _this$props.styleLayout,␊
|
||||
styleBackground = _this$props.styleBackground,␊
|
||||
style = _this$props.style;␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleText,␊
|
||||
...styleLayout,␊
|
||||
...styleBackground,␊
|
||||
...style␊
|
||||
};␊
|
||||
var Comp = this.generateComponentType(type);␊
|
||||
var labelStyle = Comp === 'label' ? {␊
|
||||
display: 'inline-block'␊
|
||||
} : {};␊
|
||||
return React.createElement(Comp, {␊
|
||||
className: "AIMakeText",␊
|
||||
style: Object.assign(labelStyle, styles)␊
|
||||
}, [children]);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeText;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeText, "propTypes", {␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node, PropTypes.string]),␊
|
||||
type: PropTypes.string,␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleText: PropTypes.object.isRequired,␊
|
||||
styleLayout: PropTypes.object.isRequired,␊
|
||||
styleBackground: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeText, "defaultProps", {␊
|
||||
children: '',␊
|
||||
type: '',␊
|
||||
// paragraph || label␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(HOCTextProps(HOCLayoutProps(HOCBackgroundProps(AIMakeText))));`,
|
||||
filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/AIMakeText/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
␊
|
||||
var Root =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_React$Component) {␊
|
||||
_inherits(Root, _React$Component);␊
|
||||
␊
|
||||
function Root() {␊
|
||||
_classCallCheck(this, Root);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Root).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(Root, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
style = _this$props.style,␊
|
||||
children = _this$props.children;␊
|
||||
var newStyle = Object.assign({}, Root.defaultProps.style, style);␊
|
||||
return React.createElement("div", {␊
|
||||
style: newStyle␊
|
||||
}, children);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return Root;␊
|
||||
}(React.Component);␊
|
||||
␊
|
||||
_defineProperty(Root, "propTypes", {␊
|
||||
style: PropTypes.object,␊
|
||||
children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)])␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(Root, "defaultProps", {␊
|
||||
style: {␊
|
||||
padding: 0,␊
|
||||
backgroundColor: '#f0f2f5',␊
|
||||
minHeight: '100%'␊
|
||||
},␊
|
||||
children: null␊
|
||||
});␊
|
||||
␊
|
||||
export default Root;`,
|
||||
filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/multiple-exported-component/es/basic/Root/index.js',
|
||||
},
|
||||
],
|
||||
pkgName: 'multiple-exported-component',
|
||||
pkgVersion: '1.0.0',
|
||||
sourceType: 'module',
|
||||
}
|
||||
|
||||
## scan from single exported component
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
mainEntry: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/single-exported-component/es/index.js',
|
||||
modules: [
|
||||
{
|
||||
fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
␊
|
||||
/* eslint-disable react/no-unused-prop-types */␊
|
||||
␊
|
||||
/* eslint-disable react/require-default-props */␊
|
||||
import React from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import "./main.css";␊
|
||||
␊
|
||||
var Demo =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_React$Component) {␊
|
||||
_inherits(Demo, _React$Component);␊
|
||||
␊
|
||||
function Demo() {␊
|
||||
_classCallCheck(this, Demo);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Demo).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(Demo, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
return React.createElement("div", null, " Test ");␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return Demo;␊
|
||||
}(React.Component);␊
|
||||
␊
|
||||
Demo.propTypes = {␊
|
||||
optionalArray: PropTypes.array,␊
|
||||
optionalBool: PropTypes.bool,␊
|
||||
optionalFunc: PropTypes.func,␊
|
||||
optionalNumber: PropTypes.number,␊
|
||||
optionalObject: PropTypes.object,␊
|
||||
optionalString: PropTypes.string,␊
|
||||
optionalSymbol: PropTypes.symbol,␊
|
||||
// Anything that can be rendered: numbers, strings, elements or an array␊
|
||||
// (or fragment) containing these types.␊
|
||||
optionalNode: PropTypes.node,␊
|
||||
// A React element (ie. <MyComponent />).␊
|
||||
optionalElement: PropTypes.element,␊
|
||||
// A React element type (ie. MyComponent).␊
|
||||
optionalElementType: PropTypes.elementType,␊
|
||||
// You can also declare that a prop is an instance of a class. This uses␊
|
||||
// JS's instanceof operator.␊
|
||||
optionalMessage: PropTypes.instanceOf(Demo),␊
|
||||
// You can ensure that your prop is limited to specific values by treating␊
|
||||
// it as an enum.␊
|
||||
optionalEnum: PropTypes.oneOf(['News', 'Photos']),␊
|
||||
// An object that could be one of many types␊
|
||||
optionalUnion: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.instanceOf(Demo)]),␊
|
||||
// An array of a certain type␊
|
||||
optionalArrayOf: PropTypes.arrayOf(PropTypes.number),␊
|
||||
// An object with property values of a certain type␊
|
||||
optionalObjectOf: PropTypes.objectOf(PropTypes.number),␊
|
||||
// You can chain any of the above with `isRequired` to make sure a warning␊
|
||||
// is shown if the prop isn't provided.␊
|
||||
// An object taking on a particular shape␊
|
||||
optionalObjectWithShape: PropTypes.shape({␊
|
||||
optionalProperty: PropTypes.string,␊
|
||||
requiredProperty: PropTypes.number.isRequired␊
|
||||
}),␊
|
||||
optionalObjectWithShape2: PropTypes.shape({␊
|
||||
optionalProperty: PropTypes.string,␊
|
||||
requiredProperty: PropTypes.number.isRequired␊
|
||||
}).isRequired,␊
|
||||
// An object with warnings on extra properties␊
|
||||
optionalObjectWithStrictShape: PropTypes.exact({␊
|
||||
optionalProperty: PropTypes.string,␊
|
||||
requiredProperty: PropTypes.number.isRequired␊
|
||||
}),␊
|
||||
requiredFunc: PropTypes.func.isRequired,␊
|
||||
// A value of any data type␊
|
||||
requiredAny: PropTypes.any.isRequired␊
|
||||
};␊
|
||||
Demo.defaultProps = {};␊
|
||||
export default Demo;`,
|
||||
filePath: '/Users/hongboy/WebstormProjects/aimake-otter-engine-1016/packages/otter-engine-materialin/test/fixtures/single-exported-component/es/index.js',
|
||||
},
|
||||
],
|
||||
pkgName: 'single-exported-component',
|
||||
pkgVersion: '1.0.0',
|
||||
sourceType: 'module',
|
||||
}
|
||||
Binary file not shown.
@ -1,580 +0,0 @@
|
||||
# Snapshot report for `test/scanner/OnlineScanner.ts`
|
||||
|
||||
The actual snapshot is saved in `OnlineScanner.ts.snap`.
|
||||
|
||||
Generated by [AVA](https://ava.li).
|
||||
|
||||
## scan multiple exported component from online
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
mainEntry: '@ali/aimake-basic@0.1.0/es/index.js',
|
||||
modules: [
|
||||
{
|
||||
fileContent: `import AIMakeBlank from './basic/AIMakeBlank';␊
|
||||
import AIMakeIcon from './basic/AIMakeIcon';␊
|
||||
import AIMakeImage from './basic/AIMakeImage';␊
|
||||
import AIMakeLink from './basic/AIMakeLink';␊
|
||||
import AIMakePlaceholder from './basic/AIMakePlaceholder';␊
|
||||
import AIMakeText from './basic/AIMakeText';␊
|
||||
import Root from './basic/Root';␊
|
||||
export { AIMakeBlank, AIMakeIcon, AIMakeImage, AIMakeLink, AIMakePlaceholder, AIMakeText, Root };`,
|
||||
filePath: '@ali/aimake-basic@0.1.0/es/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _extends from "@babel/runtime/helpers/extends";␊
|
||||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
import HOCLayoutProps from '../utils/HOCLayoutProps';␊
|
||||
import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊
|
||||
import HOCFlexLayoutProps from '../utils/HOCFlexLayoutProps';␊
|
||||
␊
|
||||
var AIMakeBlank =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeBlank, _Component);␊
|
||||
␊
|
||||
function AIMakeBlank() {␊
|
||||
_classCallCheck(this, AIMakeBlank);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeBlank).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeBlank, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var merged = {};␊
|
||||
var _this$props = this.props,␊
|
||||
children = _this$props.children,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleLayout = _this$props.styleLayout,␊
|
||||
styleBackground = _this$props.styleBackground,␊
|
||||
styleFlexLayout = _this$props.styleFlexLayout,␊
|
||||
style = _this$props.style,␊
|
||||
id = _this$props.id;␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleLayout,␊
|
||||
...styleBackground,␊
|
||||
...styleFlexLayout,␊
|
||||
...style␊
|
||||
};␊
|
||||
␊
|
||||
if (id) {␊
|
||||
merged.id = id;␊
|
||||
}␊
|
||||
␊
|
||||
return React.createElement("div", _extends({␊
|
||||
style: styles␊
|
||||
}, merged), children);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeBlank;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeBlank, "propTypes", {␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleLayout: PropTypes.object.isRequired,␊
|
||||
styleBackground: PropTypes.object.isRequired,␊
|
||||
styleFlexLayout: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object,␊
|
||||
id: PropTypes.string␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeBlank, "defaultProps", {␊
|
||||
children: [],␊
|
||||
style: {},␊
|
||||
id: ''␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(HOCLayoutProps(HOCBackgroundProps(HOCFlexLayoutProps(AIMakeBlank))));`,
|
||||
filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeBlank/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _extends from "@babel/runtime/helpers/extends";␊
|
||||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊
|
||||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import classNames from 'classnames';␊
|
||||
import createFromIconfont from './IconFont';␊
|
||||
␊
|
||||
var AIMakeIcon =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeIcon, _Component);␊
|
||||
␊
|
||||
function AIMakeIcon() {␊
|
||||
_classCallCheck(this, AIMakeIcon);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeIcon).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeIcon, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
className = _this$props.className,␊
|
||||
iconClassName = _this$props.iconClassName,␊
|
||||
children = _this$props.children,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleText = _this$props.styleText,␊
|
||||
styleBackground = _this$props.styleBackground,␊
|
||||
style = _this$props.style,␊
|
||||
otherProps = _objectWithoutProperties(_this$props, ["className", "iconClassName", "children", "styleBoxModel", "styleText", "styleBackground", "style"]);␊
|
||||
␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleText,␊
|
||||
...styleBackground,␊
|
||||
...style␊
|
||||
};␊
|
||||
return React.createElement("i", _extends({}, otherProps, {␊
|
||||
className: classNames(className, iconClassName),␊
|
||||
style: styles␊
|
||||
}), children);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeIcon;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeIcon, "propTypes", {␊
|
||||
className: PropTypes.string,␊
|
||||
iconClassName: PropTypes.string,␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleText: PropTypes.object.isRequired,␊
|
||||
styleBackground: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeIcon, "defaultProps", {␊
|
||||
className: '',␊
|
||||
iconClassName: 'iconfont',␊
|
||||
children: '',␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
AIMakeIcon.createFromIconfont = createFromIconfont;␊
|
||||
export default AIMakeIcon;`,
|
||||
filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeIcon/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _extends from "@babel/runtime/helpers/extends";␊
|
||||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊
|
||||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
␊
|
||||
var AIMakeImage =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeImage, _Component);␊
|
||||
␊
|
||||
function AIMakeImage() {␊
|
||||
_classCallCheck(this, AIMakeImage);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeImage).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeImage, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
style = _this$props.style,␊
|
||||
otherProps = _objectWithoutProperties(_this$props, ["styleBoxModel", "style"]);␊
|
||||
␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...style␊
|
||||
};␊
|
||||
return React.createElement("img", _extends({}, otherProps, {␊
|
||||
style: styles,␊
|
||||
alt: "AIMakeImage"␊
|
||||
}));␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeImage;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeImage, "propTypes", {␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeImage, "defaultProps", {␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(AIMakeImage);`,
|
||||
filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeImage/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _extends from "@babel/runtime/helpers/extends";␊
|
||||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";␊
|
||||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
import HOCTextProps from '../utils/HOCTextProps';␊
|
||||
import HOCLayoutProps from '../utils/HOCLayoutProps';␊
|
||||
import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊
|
||||
␊
|
||||
var AIMakeLink =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeLink, _Component);␊
|
||||
␊
|
||||
function AIMakeLink() {␊
|
||||
_classCallCheck(this, AIMakeLink);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakeLink).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeLink, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
children = _this$props.children,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleText = _this$props.styleText,␊
|
||||
styleLayout = _this$props.styleLayout,␊
|
||||
styleBackground = _this$props.styleBackground,␊
|
||||
style = _this$props.style,␊
|
||||
otherProps = _objectWithoutProperties(_this$props, ["children", "styleBoxModel", "styleText", "styleLayout", "styleBackground", "style"]);␊
|
||||
␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleText,␊
|
||||
...styleLayout,␊
|
||||
...styleBackground,␊
|
||||
...style␊
|
||||
};␊
|
||||
␊
|
||||
if (typeof children !== 'string') {␊
|
||||
styles.display = 'inline-block';␊
|
||||
}␊
|
||||
␊
|
||||
return React.createElement("a", _extends({}, otherProps, {␊
|
||||
style: styles␊
|
||||
}), [children]);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeLink;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeLink, "propTypes", {␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleText: PropTypes.object.isRequired,␊
|
||||
styleLayout: PropTypes.object.isRequired,␊
|
||||
styleBackground: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeLink, "defaultProps", {␊
|
||||
children: '',␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(HOCTextProps(HOCLayoutProps(HOCBackgroundProps(AIMakeLink))));`,
|
||||
filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeLink/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
import HOCLayoutProps from '../utils/HOCLayoutProps';␊
|
||||
␊
|
||||
var AIMakePlaceholder =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakePlaceholder, _Component);␊
|
||||
␊
|
||||
function AIMakePlaceholder() {␊
|
||||
_classCallCheck(this, AIMakePlaceholder);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(AIMakePlaceholder).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakePlaceholder, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
children = _this$props.children,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleLayout = _this$props.styleLayout,␊
|
||||
style = _this$props.style;␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleLayout,␊
|
||||
...style␊
|
||||
};␊
|
||||
var placeholderStyle = {␊
|
||||
display: 'inline-block',␊
|
||||
border: '1px dashed #aaa',␊
|
||||
lineHeight: styles.height,␊
|
||||
backgroundColor: '#F5E075',␊
|
||||
overflow: 'hidden',␊
|
||||
textAlign: 'center',␊
|
||||
...styles␊
|
||||
};␊
|
||||
return React.createElement("div", {␊
|
||||
style: placeholderStyle␊
|
||||
}, children);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakePlaceholder;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakePlaceholder, "propTypes", {␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleLayout: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakePlaceholder, "defaultProps", {␊
|
||||
children: '',␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(HOCLayoutProps(AIMakePlaceholder));`,
|
||||
filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakePlaceholder/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React, { Component } from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
import HOCBoxModelProps from '../utils/HOCBoxModelProps';␊
|
||||
import HOCTextProps from '../utils/HOCTextProps';␊
|
||||
import HOCLayoutProps from '../utils/HOCLayoutProps';␊
|
||||
import HOCBackgroundProps from '../utils/HOCBackgroundProps';␊
|
||||
␊
|
||||
var AIMakeText =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_Component) {␊
|
||||
_inherits(AIMakeText, _Component);␊
|
||||
␊
|
||||
function AIMakeText() {␊
|
||||
var _this;␊
|
||||
␊
|
||||
_classCallCheck(this, AIMakeText);␊
|
||||
␊
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {␊
|
||||
args[_key] = arguments[_key];␊
|
||||
}␊
|
||||
␊
|
||||
_this = _possibleConstructorReturn(this, _getPrototypeOf(AIMakeText).call(this, ...args));␊
|
||||
␊
|
||||
_defineProperty(_assertThisInitialized(_this), "generateComponentType", function (componentType) {␊
|
||||
var componentNameMap = {␊
|
||||
h1: 'h1',␊
|
||||
h2: 'h2',␊
|
||||
h3: 'h3',␊
|
||||
h4: 'h4',␊
|
||||
h5: 'h5',␊
|
||||
paragraph: 'p',␊
|
||||
label: 'label'␊
|
||||
};␊
|
||||
return componentNameMap[componentType] || 'div';␊
|
||||
});␊
|
||||
␊
|
||||
return _this;␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(AIMakeText, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
children = _this$props.children,␊
|
||||
type = _this$props.type,␊
|
||||
styleBoxModel = _this$props.styleBoxModel,␊
|
||||
styleText = _this$props.styleText,␊
|
||||
styleLayout = _this$props.styleLayout,␊
|
||||
styleBackground = _this$props.styleBackground,␊
|
||||
style = _this$props.style;␊
|
||||
var styles = { ...styleBoxModel,␊
|
||||
...styleText,␊
|
||||
...styleLayout,␊
|
||||
...styleBackground,␊
|
||||
...style␊
|
||||
};␊
|
||||
var Comp = this.generateComponentType(type);␊
|
||||
var labelStyle = Comp === 'label' ? {␊
|
||||
display: 'inline-block'␊
|
||||
} : {};␊
|
||||
return React.createElement(Comp, {␊
|
||||
className: "AIMakeText",␊
|
||||
style: Object.assign(labelStyle, styles)␊
|
||||
}, [children]);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return AIMakeText;␊
|
||||
}(Component);␊
|
||||
␊
|
||||
_defineProperty(AIMakeText, "propTypes", {␊
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node, PropTypes.string]),␊
|
||||
type: PropTypes.string,␊
|
||||
styleBoxModel: PropTypes.object.isRequired,␊
|
||||
styleText: PropTypes.object.isRequired,␊
|
||||
styleLayout: PropTypes.object.isRequired,␊
|
||||
styleBackground: PropTypes.object.isRequired,␊
|
||||
style: PropTypes.object␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(AIMakeText, "defaultProps", {␊
|
||||
children: '',␊
|
||||
type: '',␊
|
||||
// paragraph || label␊
|
||||
style: {}␊
|
||||
});␊
|
||||
␊
|
||||
export default HOCBoxModelProps(HOCTextProps(HOCLayoutProps(HOCBackgroundProps(AIMakeText))));`,
|
||||
filePath: '@ali/aimake-basic@0.1.0/es/basic/AIMakeText/index.js',
|
||||
},
|
||||
{
|
||||
fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import _defineProperty from "@babel/runtime/helpers/defineProperty";␊
|
||||
import React from 'react';␊
|
||||
import PropTypes from 'prop-types';␊
|
||||
␊
|
||||
var Root =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_React$Component) {␊
|
||||
_inherits(Root, _React$Component);␊
|
||||
␊
|
||||
function Root() {␊
|
||||
_classCallCheck(this, Root);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Root).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(Root, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
var _this$props = this.props,␊
|
||||
style = _this$props.style,␊
|
||||
children = _this$props.children;␊
|
||||
var newStyle = Object.assign({}, Root.defaultProps.style, style);␊
|
||||
return React.createElement("div", {␊
|
||||
style: newStyle␊
|
||||
}, children);␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return Root;␊
|
||||
}(React.Component);␊
|
||||
␊
|
||||
_defineProperty(Root, "propTypes", {␊
|
||||
style: PropTypes.object,␊
|
||||
children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)])␊
|
||||
});␊
|
||||
␊
|
||||
_defineProperty(Root, "defaultProps", {␊
|
||||
style: {␊
|
||||
padding: 0,␊
|
||||
backgroundColor: '#f0f2f5',␊
|
||||
minHeight: '100%'␊
|
||||
},␊
|
||||
children: null␊
|
||||
});␊
|
||||
␊
|
||||
export default Root;`,
|
||||
filePath: '@ali/aimake-basic@0.1.0/es/basic/Root/index.js',
|
||||
},
|
||||
],
|
||||
pkgName: '@ali/aimake-basic',
|
||||
pkgVersion: '0.1.0',
|
||||
sourceType: 'module',
|
||||
}
|
||||
|
||||
## scan single exported component from online
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
mainEntry: '@ali/demo-biz-test090702@0.0.2/es/index.js',
|
||||
modules: [
|
||||
{
|
||||
fileContent: `import _classCallCheck from "@babel/runtime/helpers/classCallCheck";␊
|
||||
import _createClass from "@babel/runtime/helpers/createClass";␊
|
||||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";␊
|
||||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";␊
|
||||
import _inherits from "@babel/runtime/helpers/inherits";␊
|
||||
import React from 'react'; // import PropTypes from 'prop-types';␊
|
||||
␊
|
||||
import "./main.css";␊
|
||||
␊
|
||||
var Demo =␊
|
||||
/*#__PURE__*/␊
|
||||
function (_React$Component) {␊
|
||||
_inherits(Demo, _React$Component);␊
|
||||
␊
|
||||
function Demo() {␊
|
||||
_classCallCheck(this, Demo);␊
|
||||
␊
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Demo).apply(this, arguments));␊
|
||||
}␊
|
||||
␊
|
||||
_createClass(Demo, [{␊
|
||||
key: "render",␊
|
||||
value: function render() {␊
|
||||
return React.createElement("div", null, " Test ");␊
|
||||
}␊
|
||||
}]);␊
|
||||
␊
|
||||
return Demo;␊
|
||||
}(React.Component);␊
|
||||
␊
|
||||
export default Demo;`,
|
||||
filePath: '@ali/demo-biz-test090702@0.0.2/es/index.js',
|
||||
},
|
||||
],
|
||||
pkgName: '@ali/demo-biz-test090702',
|
||||
pkgVersion: '0.0.2',
|
||||
sourceType: 'module',
|
||||
}
|
||||
Binary file not shown.
@ -4,6 +4,25 @@ The actual snapshot is saved in `index.ts.snap`.
|
||||
|
||||
Generated by [AVA](https://ava.li).
|
||||
|
||||
## should be right in dir basic-error
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
dataPath: '',
|
||||
keyword: 'required',
|
||||
message: 'should have required property \'props\'',
|
||||
params: {
|
||||
missingProperty: 'props',
|
||||
},
|
||||
schemaPath: '#/required',
|
||||
},
|
||||
],
|
||||
success: false,
|
||||
}
|
||||
|
||||
## should be right in dir basic-success
|
||||
|
||||
> Snapshot 1
|
||||
@ -35,22 +54,3 @@ Generated by [AVA](https://ava.li).
|
||||
{
|
||||
success: true,
|
||||
}
|
||||
|
||||
## should be right in dir basic-error
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
dataPath: '',
|
||||
keyword: 'required',
|
||||
message: 'should have required property \'props\'',
|
||||
params: {
|
||||
missingProperty: 'props',
|
||||
},
|
||||
schemaPath: '#/required',
|
||||
},
|
||||
],
|
||||
success: false,
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -1 +1 @@
|
||||
{"componentName":"AIMakeBlank","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeBlank","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"styleFlexLayout","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"},{"name":"id","propType":"string","description":""}]}
|
||||
{"componentName":"AIMakeBlank","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeBlank","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"styleFlexLayout","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"},{"name":"id","propType":"string","description":""}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeBlank","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeBlank","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"styleFlexLayout","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"},{"name":"id","propType":"string"}]}
|
||||
@ -1 +1 @@
|
||||
{"componentName":"AIMakeIcon","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeIcon","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"className","propType":"string","description":""},{"name":"iconClassName","propType":"string","description":""},{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
{"componentName":"AIMakeIcon","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeIcon","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"className","propType":"string","description":""},{"name":"iconClassName","propType":"string","description":""},{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeIcon","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeIcon","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"className","propType":"string"},{"name":"iconClassName","propType":"string"},{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -1 +1 @@
|
||||
{"componentName":"AIMakeImage","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeImage","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"styleBoxModel","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
{"componentName":"AIMakeImage","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeImage","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"styleBoxModel","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeImage","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeImage","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"styleBoxModel","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -1 +1 @@
|
||||
{"componentName":"AIMakeLink","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeLink","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
{"componentName":"AIMakeLink","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeLink","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeLink","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeLink","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -1 +1 @@
|
||||
{"componentName":"AIMakePlaceholder","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakePlaceholder","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
{"componentName":"AIMakePlaceholder","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakePlaceholder","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakePlaceholder","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakePlaceholder","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -1 +1 @@
|
||||
{"componentName":"AIMakeText","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeText","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"type","propType":"string","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
{"componentName":"AIMakeText","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"AIMakeText","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":"oneOfType","description":""},{"name":"type","propType":"string","description":""},{"name":"styleBoxModel","propType":"object","description":""},{"name":"styleText","propType":"object","description":""},{"name":"styleLayout","propType":"object","description":""},{"name":"styleBackground","propType":"object","description":""},{"name":"style","propType":"object","description":"","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeText","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeText","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"type","propType":"string"},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -1 +1 @@
|
||||
{"componentName":"Root","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"Root","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"style","propType":"object","description":"","defaultValue":"{\n padding: 0,\n backgroundColor: '#f0f2f5',\n minHeight: '100%'\n}"},{"name":"children","propType":"oneOfType","description":""}]}
|
||||
{"componentName":"Root","title":"","docUrl":"","screenshot":"","npm":{"package":"@ali/lowcode-engine-material-parser","version":"0.1.0","exportName":"Root","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"style","propType":"object","description":"","defaultValue":"{\n padding: 0,\n backgroundColor: '#f0f2f5',\n minHeight: '100%'\n}"},{"name":"children","propType":"oneOfType","description":""}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"Root","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"Root","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"style","propType":"object","defaultValue":"{\n padding: 0,\n backgroundColor: '#f0f2f5',\n minHeight: '100%'\n}"},{"name":"children","propType":{"type":"oneOfType"}}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeBlank","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeBlank","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"styleFlexLayout","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"},{"name":"id","propType":"string"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeIcon","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeIcon","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"className","propType":"string"},{"name":"iconClassName","propType":"string"},{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeImage","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeImage","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"styleBoxModel","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeLink","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeLink","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakePlaceholder","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakePlaceholder","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"styleBoxModel","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"AIMakeText","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"AIMakeText","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"children","propType":{"type":"oneOfType"}},{"name":"type","propType":"string"},{"name":"styleBoxModel","propType":"object"},{"name":"styleText","propType":"object"},{"name":"styleLayout","propType":"object"},{"name":"styleBackground","propType":"object"},{"name":"style","propType":"object","defaultValue":"{}"}]}
|
||||
@ -0,0 +1 @@
|
||||
{"componentName":"Root","title":"","docUrl":"","screenshot":"","npm":{"package":"multiple-exported-component","version":"1.0.0","exportName":"Root","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"style","propType":"object","defaultValue":"{\n padding: 0,\n backgroundColor: '#f0f2f5',\n minHeight: '100%'\n}"},{"name":"children","propType":{"type":"oneOfType"}}]}
|
||||
1
packages/material-parser/test/fixtures/single-exported-component/es/manifest.json
vendored
Normal file
1
packages/material-parser/test/fixtures/single-exported-component/es/manifest.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"componentName":"Demo","title":"","docUrl":"","screenshot":"","npm":{"package":"single-exported-component","version":"1.0.0","exportName":"Demo","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"optionalArray","propType":"array"},{"name":"optionalBool","propType":"bool"},{"name":"optionalFunc","propType":"func"},{"name":"optionalNumber","propType":"number"},{"name":"optionalObject","propType":"object"},{"name":"optionalString","propType":"string"},{"name":"optionalSymbol","propType":{"type":"symbol"}},{"name":"optionalNode","propType":"node"},{"name":"optionalElement","propType":"element"},{"name":"optionalElementType","propType":{"type":"elementType"}},{"name":"optionalMessage","propType":{"type":"instanceOf"}},{"name":"optionalEnum","propType":{"type":"oneOf"}},{"name":"optionalUnion","propType":{"type":"oneOfType"}},{"name":"optionalArrayOf","propType":{"type":"arrayOf"}},{"name":"optionalObjectOf","propType":{"type":"objectOf"}},{"name":"optionalObjectWithShape","propType":{"type":"shape"}},{"name":"optionalObjectWithShape2","propType":{"type":"shape"}},{"name":"optionalObjectWithStrictShape","propType":{"type":"exact"}},{"name":"requiredFunc","propType":"func"},{"name":"requiredAny","propType":"any"}]}
|
||||
1
packages/material-parser/test/fixtures/single-exported-component/src/manifest.json
vendored
Normal file
1
packages/material-parser/test/fixtures/single-exported-component/src/manifest.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"componentName":"Demo","title":"","docUrl":"","screenshot":"","npm":{"package":"single-exported-component","version":"1.0.0","exportName":"Demo","main":"/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/index.js","destructuring":false,"subName":""},"props":[{"name":"optionalArray","propType":"array"},{"name":"optionalBool","propType":"bool"},{"name":"optionalFunc","propType":"func"},{"name":"optionalNumber","propType":"number"},{"name":"optionalObject","propType":"object"},{"name":"optionalString","propType":"string"},{"name":"optionalSymbol","propType":{"type":"symbol"}},{"name":"optionalNode","propType":"node"},{"name":"optionalElement","propType":"element"},{"name":"optionalElementType","propType":{"type":"elementType"}},{"name":"optionalMessage","propType":{"type":"instanceOf"}},{"name":"optionalEnum","propType":{"type":"oneOf"}},{"name":"optionalUnion","propType":{"type":"oneOfType"}},{"name":"optionalArrayOf","propType":{"type":"arrayOf"}},{"name":"optionalObjectOf","propType":{"type":"objectOf"}},{"name":"optionalObjectWithShape","propType":{"type":"shape"}},{"name":"optionalObjectWithShape2","propType":{"type":"shape"}},{"name":"optionalObjectWithStrictShape","propType":{"type":"exact"}},{"name":"requiredFunc","propType":"func"},{"name":"requiredAny","propType":"any"}]}
|
||||
@ -1,7 +1,4 @@
|
||||
import test from 'ava';
|
||||
test.serial('generator', (t) => {
|
||||
t.pass();
|
||||
})
|
||||
import { ensureFile, writeFile } from 'fs-extra';
|
||||
import { join } from 'path';
|
||||
import { IComponentMaterial } from '../../src/otter-core';
|
||||
@ -53,7 +50,16 @@ test.serial('generate single exported components', async t => {
|
||||
accesser: 'local',
|
||||
isExportedAsMultiple: false,
|
||||
};
|
||||
|
||||
// const scanner = new Scanner(options);
|
||||
// const scanModel = await scanner.scan();
|
||||
// const parser = new ReactParser(options);
|
||||
// const parsedModels: IMaterialParsedModel[] = await parser.parse(scanModel);
|
||||
// const generator = new Generator(options);
|
||||
// t.log('parsedModels', JSON.stringify(parsedModels,null,2));
|
||||
// const actual: IComponentMaterial = await generator.generate(
|
||||
// scanModel,
|
||||
// parsedModels
|
||||
// );
|
||||
const actual = await generate(options);
|
||||
|
||||
t.snapshot(actual);
|
||||
|
||||
@ -1,563 +0,0 @@
|
||||
# Snapshot report for `test/Materialize.ts`
|
||||
|
||||
The actual snapshot is saved in `Materialize.ts.snap`.
|
||||
|
||||
Generated by [AVA](https://ava.li).
|
||||
|
||||
## materialize multiple exported component by local
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeBlank","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"styleFlexLayout","label":"styleFlexLayout","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"},{"name":"id","label":"id","renderer":""}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeBlank',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleLayout',
|
||||
name: 'styleLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBackground',
|
||||
name: 'styleBackground',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleFlexLayout',
|
||||
name: 'styleFlexLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'id',
|
||||
name: 'id',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeIcon","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"className","label":"className","renderer":""},{"name":"iconClassName","label":"iconClassName","renderer":""},{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeIcon',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'className',
|
||||
name: 'className',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'iconClassName',
|
||||
name: 'iconClassName',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleText',
|
||||
name: 'styleText',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBackground',
|
||||
name: 'styleBackground',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeImage","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeImage',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeLink","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeLink',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleText',
|
||||
name: 'styleText',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleLayout',
|
||||
name: 'styleLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBackground',
|
||||
name: 'styleBackground',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakePlaceholder","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakePlaceholder',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleLayout',
|
||||
name: 'styleLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js',
|
||||
manifestJS: 'export default {"name":"AIMakeText","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"children","label":"children","renderer":""},{"name":"type","label":"type","renderer":""},{"name":"styleBoxModel","label":"styleBoxModel","renderer":""},{"name":"styleText","label":"styleText","renderer":""},{"name":"styleLayout","label":"styleLayout","renderer":""},{"name":"styleBackground","label":"styleBackground","renderer":""},{"name":"style","label":"style","renderer":"","defaultValue":"{}"}]}}',
|
||||
manifestObj: {
|
||||
name: 'AIMakeText',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'type',
|
||||
name: 'type',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBoxModel',
|
||||
name: 'styleBoxModel',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleText',
|
||||
name: 'styleText',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleLayout',
|
||||
name: 'styleLayout',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'styleBackground',
|
||||
name: 'styleBackground',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: '{}',
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js',
|
||||
manifestJS: 'export default {"name":"Root","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"style","label":"style","renderer":"","defaultValue":"{\\n padding: 0,\\n backgroundColor: \'#f0f2f5\',\\n minHeight: \'100%\'\\n}"},{"name":"children","label":"children","renderer":""}]}}',
|
||||
manifestObj: {
|
||||
name: 'Root',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: `{␊
|
||||
padding: 0,␊
|
||||
backgroundColor: '#f0f2f5',␊
|
||||
minHeight: '100%'␊
|
||||
}`,
|
||||
label: 'style',
|
||||
name: 'style',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'children',
|
||||
name: 'children',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
## materialize multiple exported component by online
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
[]
|
||||
|
||||
## materialize single exported component by local
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/manifest.js',
|
||||
manifestJS: 'export default {"name":"Demo","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[{"name":"optionalArray","label":"optionalArray","renderer":""},{"name":"optionalBool","label":"optionalBool","renderer":""},{"name":"optionalFunc","label":"optionalFunc","renderer":""},{"name":"optionalNumber","label":"optionalNumber","renderer":""},{"name":"optionalObject","label":"optionalObject","renderer":""},{"name":"optionalString","label":"optionalString","renderer":""},{"name":"optionalSymbol","label":"optionalSymbol","renderer":""},{"name":"optionalNode","label":"optionalNode","renderer":""},{"name":"optionalElement","label":"optionalElement","renderer":""},{"name":"optionalElementType","label":"optionalElementType","renderer":""},{"name":"optionalMessage","label":"optionalMessage","renderer":""},{"name":"optionalEnum","label":"optionalEnum","renderer":""},{"name":"optionalUnion","label":"optionalUnion","renderer":""},{"name":"optionalArrayOf","label":"optionalArrayOf","renderer":""},{"name":"optionalObjectOf","label":"optionalObjectOf","renderer":""},{"name":"optionalObjectWithShape","label":"optionalObjectWithShape","renderer":""},{"name":"optionalObjectWithShape2","label":"optionalObjectWithShape2","renderer":""},{"name":"optionalObjectWithStrictShape","label":"optionalObjectWithStrictShape","renderer":""},{"name":"requiredFunc","label":"requiredFunc","renderer":""},{"name":"requiredAny","label":"requiredAny","renderer":""}]}}',
|
||||
manifestObj: {
|
||||
name: 'Demo',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalArray',
|
||||
name: 'optionalArray',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalBool',
|
||||
name: 'optionalBool',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalFunc',
|
||||
name: 'optionalFunc',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalNumber',
|
||||
name: 'optionalNumber',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalObject',
|
||||
name: 'optionalObject',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalString',
|
||||
name: 'optionalString',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalSymbol',
|
||||
name: 'optionalSymbol',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalNode',
|
||||
name: 'optionalNode',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalElement',
|
||||
name: 'optionalElement',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalElementType',
|
||||
name: 'optionalElementType',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalMessage',
|
||||
name: 'optionalMessage',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalEnum',
|
||||
name: 'optionalEnum',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalUnion',
|
||||
name: 'optionalUnion',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalArrayOf',
|
||||
name: 'optionalArrayOf',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalObjectOf',
|
||||
name: 'optionalObjectOf',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalObjectWithShape',
|
||||
name: 'optionalObjectWithShape',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalObjectWithShape2',
|
||||
name: 'optionalObjectWithShape2',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'optionalObjectWithStrictShape',
|
||||
name: 'optionalObjectWithStrictShape',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'requiredFunc',
|
||||
name: 'requiredFunc',
|
||||
renderer: '',
|
||||
},
|
||||
{
|
||||
defaultValue: undefined,
|
||||
label: 'requiredAny',
|
||||
name: 'requiredAny',
|
||||
renderer: '',
|
||||
},
|
||||
],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
## materialize single exported component by online
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
[
|
||||
{
|
||||
manifestFilePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/node_modules/.temp/f9BkivefjM2f2w6CkepGr/node_modules/@ali/demo-biz-test090702/es/manifest.js',
|
||||
manifestJS: 'export default {"name":"Demo","settings":{"type":"element_inline","insertionModes":"tbrl","handles":["cut","copy","duplicate","delete","paste"],"shouldActive":true,"shouldDrag":true,"props":[]}}',
|
||||
manifestObj: {
|
||||
name: 'Demo',
|
||||
settings: {
|
||||
handles: [
|
||||
'cut',
|
||||
'copy',
|
||||
'duplicate',
|
||||
'delete',
|
||||
'paste',
|
||||
],
|
||||
insertionModes: 'tbrl',
|
||||
props: [],
|
||||
shouldActive: true,
|
||||
shouldDrag: true,
|
||||
type: 'element_inline',
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
Binary file not shown.
@ -9,8 +9,5 @@
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"exclude": [
|
||||
"**/test",
|
||||
"**/lib"
|
||||
]
|
||||
}
|
||||
"exclude": ["**/test", "**/lib"]
|
||||
}
|
||||
|
||||
@ -7,5 +7,8 @@
|
||||
"object-literal-sort-keys": false,
|
||||
"no-var-requires": false,
|
||||
"no-console": false
|
||||
},
|
||||
"linterOptions": {
|
||||
"exclude": ["test/**/*"]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user