From 3df360de85d425b2926ea50ff26a8df27ec36a78 Mon Sep 17 00:00:00 2001 From: gengyang Date: Fri, 7 Feb 2020 11:43:54 +0800 Subject: [PATCH 01/13] feat: complete component protocol json schema & validate method --- .editorconfig | 17 + .eslintignore | 15 + .eslintrc.js | 34 ++ .prettierignore | 4 + .prettierrc | 9 +- package.json | 15 +- packages/material-parser/README.md | 5 +- packages/material-parser/package.json | 35 ++ packages/material-parser/schemas/schema.json | 537 ++++++++++++++++++ packages/material-parser/schemas/schema.yml | 348 ++++++++++++ packages/material-parser/scripts/transform.js | 20 + packages/material-parser/src/index.ts | 2 + packages/material-parser/src/schema.json | 537 ++++++++++++++++++ packages/material-parser/src/validate.ts | 13 + .../fixtures/basic-error.skip/result.json | 3 + .../fixtures/basic-error.skip/src.json | 18 + .../fixtures/basic-success/result.json | 3 + .../validate/fixtures/basic-success/src.json | 18 + .../validate/fixtures/configure/result.json | 3 + .../test/validate/fixtures/configure/src.json | 68 +++ .../fixtures/props-basic-type/result.json | 3 + .../fixtures/props-basic-type/src.json | 71 +++ .../fixtures/props-complex-type/result.json | 3 + .../fixtures/props-complex-type/src.json | 95 ++++ .../material-parser/test/validate/index.ts | 52 ++ packages/material-parser/tsconfig.json | 9 + templates/src/index.d.ts | 0 templates/src/index.js | 3 + templates/src/index.js.map | 1 + tslint.json | 14 - 30 files changed, 1928 insertions(+), 27 deletions(-) create mode 100644 .editorconfig create mode 100644 .eslintignore create mode 100644 .eslintrc.js create mode 100644 .prettierignore create mode 100644 packages/material-parser/package.json create mode 100644 packages/material-parser/schemas/schema.json create mode 100644 packages/material-parser/schemas/schema.yml create mode 100644 packages/material-parser/scripts/transform.js create mode 100644 packages/material-parser/src/index.ts create mode 100644 packages/material-parser/src/schema.json create mode 100644 packages/material-parser/src/validate.ts create mode 100644 packages/material-parser/test/validate/fixtures/basic-error.skip/result.json create mode 100644 packages/material-parser/test/validate/fixtures/basic-error.skip/src.json create mode 100644 packages/material-parser/test/validate/fixtures/basic-success/result.json create mode 100644 packages/material-parser/test/validate/fixtures/basic-success/src.json create mode 100644 packages/material-parser/test/validate/fixtures/configure/result.json create mode 100644 packages/material-parser/test/validate/fixtures/configure/src.json create mode 100644 packages/material-parser/test/validate/fixtures/props-basic-type/result.json create mode 100644 packages/material-parser/test/validate/fixtures/props-basic-type/src.json create mode 100644 packages/material-parser/test/validate/fixtures/props-complex-type/result.json create mode 100644 packages/material-parser/test/validate/fixtures/props-complex-type/src.json create mode 100644 packages/material-parser/test/validate/index.ts create mode 100644 packages/material-parser/tsconfig.json create mode 100644 templates/src/index.d.ts create mode 100644 templates/src/index.js create mode 100644 templates/src/index.js.map delete mode 100644 tslint.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..0fb5f20ff --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +quote_type = single + +[*.md] +trim_trailing_whitespace = false + +[makefile] +indent_style = tab +indent_size = 4 diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..70aca2e78 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,15 @@ +node_modules +dist +build +coverage +expected +website +gh-pages +vendors +packages/build-scripts/test +packages/build-scripts/bin +packages/build-scripts/lib +packages/build-plugin-store/lib +packages/build-plugin-ice-router/lib +packages/build-plugin-ice-stark-child/lib +packages/build-plugin-env-config/lib \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..0d763bae3 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,34 @@ +const { eslint, tslint, deepmerge } = require('@ice/spec'); + +const commonRules = { + 'global-require': 0, + 'import/no-dynamic-require': 0, + 'no-restricted-syntax': ['error', "BinaryExpression[operator='of']"], +}; + +const jsRules = deepmerge(eslint, { + rules: { + ...commonRules, + }, +}); + +const tsRules = deepmerge(tslint, { + rules: { + ...commonRules, + '@typescript-eslint/explicit-function-return-type': ['warn', { + allowTypedFunctionExpressions: true, + }], + }, +}); + +delete tsRules.root; + +module.exports = { + ...jsRules, + overrides: [ + { + ...tsRules, + files: ['**/*.ts', '**/*.tsx'], + }, + ], +}; diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..28af681fc --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +**/test/**/*.ts +**/test/**/*.js +**/template/**/*.template +**/template/**/*.tpl diff --git a/.prettierrc b/.prettierrc index cfb30e46b..0a11aaffb 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,6 @@ { - "semi": true, - "singleQuote": true, - "trailingComma": "es5" -} \ No newline at end of file + "trailingComma": "all", + "tabWidth": 2, + "semi": true, + "singleQuote": true +} diff --git a/package.json b/package.json index 556aca8c7..8be046891 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,11 @@ "name": "ali-lowcode-engine", "private": true, "scripts": { - "boot": "lerna bootstrap --registry http://registry.npm.alibaba-inc.com", + "boot": "lerna bootstrap --registry http://registry.npm.alibaba-inc.com --hoist", "clean": "rimraf ./packages/*/lib ./packages/*/node_modules", "pub": "npm run test && lerna publish --registry http://registry.npm.alibaba-inc.com", - "lint": "tslint -p tsconfig.json", - "lint:fix": "tslint --fix -p tsconfig.json", + "lint": "eslint --cache --quiet --ext .ts ./", + "lint:fix": "eslint --fix --cache --quiet --ext .ts ./", "build": "lerna run build", "test": "lerna run test" }, @@ -21,10 +21,9 @@ "prettier": "^1.15.3", "rimraf": "^2.6.3", "ts-node": "^7.0.1", - "tslint": "^5.12.0", - "tslint-config-prettier": "^1.17.0", - "tslint-plugin-prettier": "^2.0.1", - "typescript": "^3.2.2" + "typescript": "^3.2.2", + "@ice/spec": "^0.1.4", + "eslint": "^6.0.1" }, "engines": { "node": "^8 || ^10" @@ -32,7 +31,7 @@ "lint-staged": { "*.ts": [ "prettier --write", - "tslint --fix -p tsconfig.json", + "eslint --fix --cache --quiet --ext .ts ./", "git add" ] }, diff --git a/packages/material-parser/README.md b/packages/material-parser/README.md index e84288635..0dc4193c4 100644 --- a/packages/material-parser/README.md +++ b/packages/material-parser/README.md @@ -1 +1,4 @@ -入料模块 +# @ali/lowcode-engine-material-parser +> 入料模块 + + diff --git a/packages/material-parser/package.json b/packages/material-parser/package.json new file mode 100644 index 000000000..532ed1ecd --- /dev/null +++ b/packages/material-parser/package.json @@ -0,0 +1,35 @@ +{ + "name": "@ali/lowcode-engine-material-parser", + "version": "0.1.0", + "description": "material parser for Ali lowCode engine", + "main": "lib/index.js", + "files": [ + "lib", + "schemas" + ], + "devDependencies": { + "@types/js-yaml": "^3.12.2", + "ajv": "^6.10.2", + "better-ajv-errors": "^0.6.4", + "globby": "^10.0.1", + "jest": "^24.8.0", + "jest-watch-typeahead": "^0.3.1", + "js-yaml": "^3.13.1" + }, + "scripts": { + "build": "tsc", + "prebuild": "npm run schema", + "test": "ava", + "schema": "node ./scripts/transform.js" + }, + "ava": { + "compileEnhancements": false, + "extensions": [ + "ts" + ], + "require": [ + "ts-node/register" + ] + }, + "license": "MIT" +} diff --git a/packages/material-parser/schemas/schema.json b/packages/material-parser/schemas/schema.json new file mode 100644 index 000000000..7a5469a10 --- /dev/null +++ b/packages/material-parser/schemas/schema.json @@ -0,0 +1,537 @@ +{ + "$id": "@ali/low-code-component-protocol-schema", + "description": "json schema for low code component protocol", + "allOf": [ + { + "$ref": "#/definitions/BasicSection" + }, + { + "$ref": "#/definitions/PropsSection" + }, + { + "$ref": "#/definitions/ConfigureSection" + } + ], + "definitions": { + "BasicSection": { + "type": "object", + "properties": { + "componentName": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "docUrl": { + "type": "string" + }, + "screenshot": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "devMode": { + "enum": [ + "proCode", + "lowCode" + ] + }, + "npm": { + "$ref": "#/definitions/Npm" + } + }, + "required": [ + "componentName", + "title", + "npm", + "docUrl", + "screenshot" + ] + }, + "PropsSection": { + "type": "object", + "properties": { + "props": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string" + }, + "propType": { + "$ref": "#/definitions/PropType" + }, + "description": { + "type": "string" + }, + "defaultValue": {} + }, + "required": [ + "name", + "propType" + ] + } + } + } + }, + "ConfigureSection": { + "type": "object", + "properties": { + "configure": { + "type": "object", + "properties": { + "props": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigureProp" + } + }, + "styles": { + "type": "object", + "properties": {} + }, + "events": { + "type": "object", + "properties": {} + }, + "component": { + "$ref": "#/definitions/ConfigureComponent" + } + } + } + } + }, + "Npm": { + "type": "object", + "properties": { + "package": { + "type": "string" + }, + "exportName": { + "type": "string" + }, + "subName": { + "type": "string" + }, + "main": { + "type": "string" + }, + "destructuring": { + "type": "boolean" + }, + "version": { + "type": "string" + } + }, + "required": [ + "package", + "exportName", + "subName", + "main", + "destructuring", + "version" + ] + }, + "PropType": { + "oneOf": [ + { + "$ref": "#/definitions/BasicType" + }, + { + "$ref": "#/definitions/RequiredType" + }, + { + "$ref": "#/definitions/ComplexType" + } + ] + }, + "BasicType": { + "type": "string", + "enum": [ + "array", + "bool", + "func", + "number", + "object", + "string", + "node", + "element", + "any" + ] + }, + "RequiredType": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/BasicType" + }, + "isRequired": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "ComplexType": { + "oneOf": [ + { + "$ref": "#/definitions/OneOf" + }, + { + "$ref": "#/definitions/OneOfType" + }, + { + "$ref": "#/definitions/ArrayOf" + }, + { + "$ref": "#/definitions/ObjectOf" + }, + { + "$ref": "#/definitions/Shape" + }, + { + "$ref": "#/definitions/Exact" + } + ] + }, + "OneOf": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oneOf" + ] + }, + "value": { + "type": "array", + "items": { + "type": "string" + } + }, + "isRequired": { + "type": "boolean" + } + } + }, + "OneOfType": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oneOfType" + ] + }, + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PropType" + } + }, + "isRequired": { + "type": "boolean" + } + } + }, + "ArrayOf": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "arrayOf" + ] + }, + "value": { + "$ref": "#/definitions/PropType" + }, + "isRequired": { + "type": "boolean" + } + } + }, + "ObjectOf": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "objectOf" + ] + }, + "value": { + "$ref": "#/definitions/PropType" + }, + "isRequired": { + "type": "boolean" + } + } + }, + "Shape": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shape" + ] + }, + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "propType": { + "$ref": "#/definitions/PropType" + } + }, + "additionalProperties": false + } + }, + "isRequired": { + "type": "boolean" + } + } + }, + "ShapeItem": { + "type": "object", + "required": [ + "name", + "propType" + ], + "properties": { + "name": { + "type": "string" + }, + "propType": { + "$ref": "#/definitions/PropType" + }, + "isRequired": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Exact": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "exact" + ] + }, + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "propType": { + "$ref": "#/definitions/PropType" + } + }, + "additionalProperties": false + } + }, + "isRequired": { + "type": "boolean" + } + } + }, + "ConfigureProp": { + "type": "object", + "allOf": [ + { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "extraProps": { + "type": "object", + "properties": {} + } + } + }, + { + "oneOf": [ + { + "$ref": "#/definitions/ConfigureFieldProp" + }, + { + "$ref": "#/definitions/ConfigureGroupProp" + } + ] + } + ] + }, + "ConfigureFieldProp": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "field" + ] + }, + "name": { + "type": "string" + }, + "setter": { + "$ref": "#/definitions/ConfigureFieldSetter" + } + } + }, + "ConfigureFieldSetter": { + "type": "object", + "required": [ + "componentName" + ], + "properties": { + "componentName": { + "type": "string", + "enum": [ + "List", + "Object", + "Function", + "Node", + "Mixin", + "Expression", + "Switch", + "Number", + "Input", + "TextArea", + "Date", + "DateYear", + "DateMonth", + "DateRange", + "ColorPicker", + "CodeEditor", + "Select", + "RadioGroup" + ] + }, + "props": { + "type": "object", + "properties": {} + } + } + }, + "ConfigureGroupProp": { + "type": "object", + "required": [ + "type", + "items" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "group" + ] + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigureProp" + } + } + } + }, + "ConfigureComponent": { + "type": "object", + "properties": { + "isContainer": { + "type": "boolean" + }, + "isModal": { + "type": "boolean" + }, + "descriptor": { + "type": "string" + }, + "nestingRule": { + "type": "object", + "properties": { + "childWhitelist": { + "type": "array", + "items": { + "type": "string" + } + }, + "parentWhitelist": { + "type": "array", + "items": { + "type": "string" + } + }, + "descendantBlacklist": { + "type": "array", + "items": { + "type": "string" + } + }, + "ancestorWhitelist": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "isNullNode": { + "type": "boolean" + }, + "isLayout": { + "type": "boolean" + } + } + } + } +} \ No newline at end of file diff --git a/packages/material-parser/schemas/schema.yml b/packages/material-parser/schemas/schema.yml new file mode 100644 index 000000000..7ddc5ad9d --- /dev/null +++ b/packages/material-parser/schemas/schema.yml @@ -0,0 +1,348 @@ +$id: '@ali/low-code-component-protocol-schema' +description: json schema for low code component protocol +allOf: + - $ref: "#/definitions/BasicSection" + - $ref: "#/definitions/PropsSection" + - $ref: "#/definitions/ConfigureSection" +definitions: + BasicSection: + type: object + properties: + componentName: + type: string + title: + type: string + description: + type: string + docUrl: + type: string + screenshot: + type: string + icon: + type: string + tags: + type: array + items: + type: string + devMode: + enum: + - proCode + - lowCode + npm: + $ref: "#/definitions/Npm" + required: + - componentName + - title + - npm + - docUrl + - screenshot + PropsSection: + type: object + properties: + props: + type: array + items: + properties: + name: + type: string + propType: + $ref: "#/definitions/PropType" + description: + type: string + defaultValue: {} + required: + - name + - propType + ConfigureSection: + type: object + properties: + configure: + type: object + properties: + props: + type: array + items: + $ref: "#/definitions/ConfigureProp" + styles: + type: object + properties: {} + events: + type: object + properties: {} + component: + $ref: "#/definitions/ConfigureComponent" + Npm: + type: object + properties: + package: + type: string + exportName: + type: string + subName: + type: string + main: + type: string + destructuring: + type: boolean + version: + type: string + required: + - package + - exportName + - subName + - main + - destructuring + - version + PropType: + oneOf: + - $ref: "#/definitions/BasicType" + - $ref: "#/definitions/RequiredType" + - $ref: "#/definitions/ComplexType" + BasicType: + type: string + enum: + - array + - bool + - func + - number + - object + - string + - node + - element + - any + RequiredType: + type: object + properties: + type: + $ref: "#/definitions/BasicType" + isRequired: + type: boolean + additionalProperties: false + required: + - type + ComplexType: + oneOf: + - $ref: "#/definitions/OneOf" + - $ref: "#/definitions/OneOfType" + - $ref: "#/definitions/ArrayOf" + - $ref: "#/definitions/ObjectOf" + - $ref: "#/definitions/Shape" + - $ref: "#/definitions/Exact" + OneOf: + type: object + required: + - type + - value + properties: + type: + type: string + enum: + - oneOf + value: + type: array + items: + type: string + isRequired: + type: boolean + OneOfType: + type: object + required: + - type + - value + properties: + type: + type: string + enum: + - oneOfType + value: + type: array + items: + $ref: "#/definitions/PropType" + isRequired: + type: boolean + ArrayOf: + type: object + required: + - type + - value + properties: + type: + type: string + enum: + - arrayOf + value: + $ref: "#/definitions/PropType" + isRequired: + type: boolean + ObjectOf: + type: object + required: + - type + - value + properties: + type: + type: string + enum: + - objectOf + value: + $ref: "#/definitions/PropType" + isRequired: + type: boolean + Shape: + type: object + required: + - type + - value + properties: + type: + type: string + enum: + - shape + value: + type: array + items: + type: object + properties: + name: + type: string + propType: + $ref: "#/definitions/PropType" + additionalProperties: false + isRequired: + type: boolean + ShapeItem: + type: object + required: + - name + - propType + properties: + name: + type: string + propType: + $ref: "#/definitions/PropType" + isRequired: + type: boolean + additionalProperties: false + Exact: + type: object + required: + - type + - value + properties: + type: + type: string + enum: + - exact + value: + type: array + items: + type: object + properties: + name: + type: string + propType: + $ref: "#/definitions/PropType" + additionalProperties: false + isRequired: + type: boolean + ConfigureProp: + type: object + allOf: + - type: object + properties: + title: + type: string + extraProps: + type: object + properties: {} + - oneOf: + - $ref: "#/definitions/ConfigureFieldProp" + - $ref: "#/definitions/ConfigureGroupProp" + ConfigureFieldProp: + type: object + required: + - type + properties: + type: + type: string + enum: + - field + name: + type: string + setter: + $ref: "#/definitions/ConfigureFieldSetter" + ConfigureFieldSetter: + type: object + required: + - componentName + properties: + componentName: + type: string + enum: + - List + - Object + - Function + - Node + - Mixin + - Expression + - Switch + - Number + - Input + - TextArea + - Date + - DateYear + - DateMonth + - DateRange + - ColorPicker + - CodeEditor + - Select + - RadioGroup + props: + type: object + properties: {} # 暂未校验每个控件的props,待控件入料后获取真实属性 + ConfigureGroupProp: + type: object + required: + - type + - items + properties: + type: + type: string + enum: + - group + items: + type: array + items: + $ref: "#/definitions/ConfigureProp" + ConfigureComponent: + type: object + properties: + isContainer: + type: boolean + isModal: + type: boolean + descriptor: + type: string + nestingRule: + type: object + properties: + childWhitelist: + type: array + items: + type: string + parentWhitelist: + type: array + items: + type: string + descendantBlacklist: + type: array + items: + type: string + ancestorWhitelist: + type: array + items: + type: string + isNullNode: + type: boolean + isLayout: + type: boolean diff --git a/packages/material-parser/scripts/transform.js b/packages/material-parser/scripts/transform.js new file mode 100644 index 000000000..b64b88a14 --- /dev/null +++ b/packages/material-parser/scripts/transform.js @@ -0,0 +1,20 @@ +const yaml = require('js-yaml'); +const fs = require('fs'); +const path = require('path'); +const Ajv = require('ajv'); + +const ajv = new Ajv(); + +const YamlPath = path.resolve(__dirname, '../schemas/schema.yml'); +const JsonPath = path.resolve(__dirname, '../src/schema.json'); +// Get document, or throw exception on error + +try { + const schema = yaml.load(fs.readFileSync(YamlPath, 'utf8')); + ajv.compile(schema); + fs.writeFileSync(JsonPath, JSON.stringify(schema, null, 2), 'utf-8'); + console.log('yaml file is successfully transformed into json'); +} catch (e) { + console.log(e); + process.exit(1); +} diff --git a/packages/material-parser/src/index.ts b/packages/material-parser/src/index.ts new file mode 100644 index 000000000..d8dfb55e8 --- /dev/null +++ b/packages/material-parser/src/index.ts @@ -0,0 +1,2 @@ +export { default as validate } from './validate'; +export { default as schema } from './schema.json'; diff --git a/packages/material-parser/src/schema.json b/packages/material-parser/src/schema.json new file mode 100644 index 000000000..7a5469a10 --- /dev/null +++ b/packages/material-parser/src/schema.json @@ -0,0 +1,537 @@ +{ + "$id": "@ali/low-code-component-protocol-schema", + "description": "json schema for low code component protocol", + "allOf": [ + { + "$ref": "#/definitions/BasicSection" + }, + { + "$ref": "#/definitions/PropsSection" + }, + { + "$ref": "#/definitions/ConfigureSection" + } + ], + "definitions": { + "BasicSection": { + "type": "object", + "properties": { + "componentName": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "docUrl": { + "type": "string" + }, + "screenshot": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "devMode": { + "enum": [ + "proCode", + "lowCode" + ] + }, + "npm": { + "$ref": "#/definitions/Npm" + } + }, + "required": [ + "componentName", + "title", + "npm", + "docUrl", + "screenshot" + ] + }, + "PropsSection": { + "type": "object", + "properties": { + "props": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string" + }, + "propType": { + "$ref": "#/definitions/PropType" + }, + "description": { + "type": "string" + }, + "defaultValue": {} + }, + "required": [ + "name", + "propType" + ] + } + } + } + }, + "ConfigureSection": { + "type": "object", + "properties": { + "configure": { + "type": "object", + "properties": { + "props": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigureProp" + } + }, + "styles": { + "type": "object", + "properties": {} + }, + "events": { + "type": "object", + "properties": {} + }, + "component": { + "$ref": "#/definitions/ConfigureComponent" + } + } + } + } + }, + "Npm": { + "type": "object", + "properties": { + "package": { + "type": "string" + }, + "exportName": { + "type": "string" + }, + "subName": { + "type": "string" + }, + "main": { + "type": "string" + }, + "destructuring": { + "type": "boolean" + }, + "version": { + "type": "string" + } + }, + "required": [ + "package", + "exportName", + "subName", + "main", + "destructuring", + "version" + ] + }, + "PropType": { + "oneOf": [ + { + "$ref": "#/definitions/BasicType" + }, + { + "$ref": "#/definitions/RequiredType" + }, + { + "$ref": "#/definitions/ComplexType" + } + ] + }, + "BasicType": { + "type": "string", + "enum": [ + "array", + "bool", + "func", + "number", + "object", + "string", + "node", + "element", + "any" + ] + }, + "RequiredType": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/BasicType" + }, + "isRequired": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "ComplexType": { + "oneOf": [ + { + "$ref": "#/definitions/OneOf" + }, + { + "$ref": "#/definitions/OneOfType" + }, + { + "$ref": "#/definitions/ArrayOf" + }, + { + "$ref": "#/definitions/ObjectOf" + }, + { + "$ref": "#/definitions/Shape" + }, + { + "$ref": "#/definitions/Exact" + } + ] + }, + "OneOf": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oneOf" + ] + }, + "value": { + "type": "array", + "items": { + "type": "string" + } + }, + "isRequired": { + "type": "boolean" + } + } + }, + "OneOfType": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oneOfType" + ] + }, + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PropType" + } + }, + "isRequired": { + "type": "boolean" + } + } + }, + "ArrayOf": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "arrayOf" + ] + }, + "value": { + "$ref": "#/definitions/PropType" + }, + "isRequired": { + "type": "boolean" + } + } + }, + "ObjectOf": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "objectOf" + ] + }, + "value": { + "$ref": "#/definitions/PropType" + }, + "isRequired": { + "type": "boolean" + } + } + }, + "Shape": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shape" + ] + }, + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "propType": { + "$ref": "#/definitions/PropType" + } + }, + "additionalProperties": false + } + }, + "isRequired": { + "type": "boolean" + } + } + }, + "ShapeItem": { + "type": "object", + "required": [ + "name", + "propType" + ], + "properties": { + "name": { + "type": "string" + }, + "propType": { + "$ref": "#/definitions/PropType" + }, + "isRequired": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Exact": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "exact" + ] + }, + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "propType": { + "$ref": "#/definitions/PropType" + } + }, + "additionalProperties": false + } + }, + "isRequired": { + "type": "boolean" + } + } + }, + "ConfigureProp": { + "type": "object", + "allOf": [ + { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "extraProps": { + "type": "object", + "properties": {} + } + } + }, + { + "oneOf": [ + { + "$ref": "#/definitions/ConfigureFieldProp" + }, + { + "$ref": "#/definitions/ConfigureGroupProp" + } + ] + } + ] + }, + "ConfigureFieldProp": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "field" + ] + }, + "name": { + "type": "string" + }, + "setter": { + "$ref": "#/definitions/ConfigureFieldSetter" + } + } + }, + "ConfigureFieldSetter": { + "type": "object", + "required": [ + "componentName" + ], + "properties": { + "componentName": { + "type": "string", + "enum": [ + "List", + "Object", + "Function", + "Node", + "Mixin", + "Expression", + "Switch", + "Number", + "Input", + "TextArea", + "Date", + "DateYear", + "DateMonth", + "DateRange", + "ColorPicker", + "CodeEditor", + "Select", + "RadioGroup" + ] + }, + "props": { + "type": "object", + "properties": {} + } + } + }, + "ConfigureGroupProp": { + "type": "object", + "required": [ + "type", + "items" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "group" + ] + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigureProp" + } + } + } + }, + "ConfigureComponent": { + "type": "object", + "properties": { + "isContainer": { + "type": "boolean" + }, + "isModal": { + "type": "boolean" + }, + "descriptor": { + "type": "string" + }, + "nestingRule": { + "type": "object", + "properties": { + "childWhitelist": { + "type": "array", + "items": { + "type": "string" + } + }, + "parentWhitelist": { + "type": "array", + "items": { + "type": "string" + } + }, + "descendantBlacklist": { + "type": "array", + "items": { + "type": "string" + } + }, + "ancestorWhitelist": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "isNullNode": { + "type": "boolean" + }, + "isLayout": { + "type": "boolean" + } + } + } + } +} \ No newline at end of file diff --git a/packages/material-parser/src/validate.ts b/packages/material-parser/src/validate.ts new file mode 100644 index 000000000..7309781da --- /dev/null +++ b/packages/material-parser/src/validate.ts @@ -0,0 +1,13 @@ +import Ajv from 'ajv'; +import schema from './schema.json'; + +const ajv = new Ajv({ jsonPointers: true }); +const validate = ajv.compile(schema); + +export default function validateSchema(json: object) { + if (validate(json) === false) { + throw new Error(JSON.stringify(validate.errors, null, 2)); + } + + return true; +} diff --git a/packages/material-parser/test/validate/fixtures/basic-error.skip/result.json b/packages/material-parser/test/validate/fixtures/basic-error.skip/result.json new file mode 100644 index 000000000..86a346c7d --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/basic-error.skip/result.json @@ -0,0 +1,3 @@ +{ + "success": true +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/fixtures/basic-error.skip/src.json b/packages/material-parser/test/validate/fixtures/basic-error.skip/src.json new file mode 100644 index 000000000..d1c6f5d8d --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/basic-error.skip/src.json @@ -0,0 +1,18 @@ +{ + "componentName": "Select", + "title": "下拉选择器", + "description": "适用于下拉选择,下拉多选等场景", + "tags": ["xx", "yy"], + "docUrl": "https://fusion-demo.alibaba-inc.com/demos/next/select", + "screenshot": "https://img.alicdn.com/tfs/TB1osvGNXzqK1RjSZFoXXbfcXXa-1149-854.png", + "icon": "url/fsdfasdfa.svg", + "devMode": "proCode", + "npm": { + "package": "@ali/deep", + "exportName": "Button", + "subName": "Icon.Option", + "main": "", + "destructuring": true, + "version": "0.1.13" + } +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/fixtures/basic-success/result.json b/packages/material-parser/test/validate/fixtures/basic-success/result.json new file mode 100644 index 000000000..86a346c7d --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/basic-success/result.json @@ -0,0 +1,3 @@ +{ + "success": true +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/fixtures/basic-success/src.json b/packages/material-parser/test/validate/fixtures/basic-success/src.json new file mode 100644 index 000000000..d1c6f5d8d --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/basic-success/src.json @@ -0,0 +1,18 @@ +{ + "componentName": "Select", + "title": "下拉选择器", + "description": "适用于下拉选择,下拉多选等场景", + "tags": ["xx", "yy"], + "docUrl": "https://fusion-demo.alibaba-inc.com/demos/next/select", + "screenshot": "https://img.alicdn.com/tfs/TB1osvGNXzqK1RjSZFoXXbfcXXa-1149-854.png", + "icon": "url/fsdfasdfa.svg", + "devMode": "proCode", + "npm": { + "package": "@ali/deep", + "exportName": "Button", + "subName": "Icon.Option", + "main": "", + "destructuring": true, + "version": "0.1.13" + } +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/fixtures/configure/result.json b/packages/material-parser/test/validate/fixtures/configure/result.json new file mode 100644 index 000000000..28e7be11d --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/configure/result.json @@ -0,0 +1,3 @@ +{ + "success": true +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/fixtures/configure/src.json b/packages/material-parser/test/validate/fixtures/configure/src.json new file mode 100644 index 000000000..0bdce1623 --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/configure/src.json @@ -0,0 +1,68 @@ +{ + "componentName": "Select", + "title": "下拉选择器", + "description": "适用于下拉选择,下拉多选等场景", + "tags": ["xx", "yy"], + "docUrl": "https://fusion-demo.alibaba-inc.com/demos/next/select", + "screenshot": "https://img.alicdn.com/tfs/TB1osvGNXzqK1RjSZFoXXbfcXXa-1149-854.png", + "icon": "url/fsdfasdfa.svg", + "devMode": "proCode", + "npm": { + "package": "@ali/deep", + "exportName": "Button", + "subName": "Icon.Option", + "main": "", + "destructuring": true, + "version": "0.1.13" + }, + "props": [], + "configure": { + "props": [ + { + "type": "field", + "title": "field", + "name": "field", + "setter": { + "componentName": "Mixin", + "props": { + "onlyChangeType": false, + "defaultType": "Input", + "typeMap": { + "Input": {}, + "Select": {} + } + } + } + }, + { + "type": "group", + "title": "group", + "items": [ + { + "type": "field", + "componentName": "Function", + "props": { + "defaultValue": "function(){ console.log('aloha') }" + } + }, + { + "type": "field", + "componentName": "Number", + "props": { + "value": 123 + } + } + ] + } + ], + "component": { + "isContainer": true, + "isModal": false, + "descriptor": "title", + "nestingRule": { + "childWhitelist": ["SelectOption"], + "parentWhitelist": ["Select", "Table"] + } + } + } +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/fixtures/props-basic-type/result.json b/packages/material-parser/test/validate/fixtures/props-basic-type/result.json new file mode 100644 index 000000000..28e7be11d --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/props-basic-type/result.json @@ -0,0 +1,3 @@ +{ + "success": true +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/fixtures/props-basic-type/src.json b/packages/material-parser/test/validate/fixtures/props-basic-type/src.json new file mode 100644 index 000000000..e8fecb328 --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/props-basic-type/src.json @@ -0,0 +1,71 @@ +{ + "componentName": "Select", + "title": "下拉选择器", + "description": "适用于下拉选择,下拉多选等场景", + "tags": ["xx", "yy"], + "docUrl": "https://fusion-demo.alibaba-inc.com/demos/next/select", + "screenshot": "https://img.alicdn.com/tfs/TB1osvGNXzqK1RjSZFoXXbfcXXa-1149-854.png", + "icon": "url/fsdfasdfa.svg", + "devMode": "proCode", + "npm": { + "package": "@ali/deep", + "exportName": "Button", + "subName": "Icon.Option", + "main": "", + "destructuring": true, + "version": "0.1.13" + }, + "props": [ + { + "name": "placeholder", + "propType": "string", + "description": "占位提示", + "defaultValue": "请输入..." + }, + { + "name": "disabled", + "propType": "bool", + "description": "disabled", + "defaultValue": false + }, + { + "name": "size", + "propType": "number", + "description": "尺寸", + "defaultValue": 10 + }, + { + "name": "dataSource", + "propType": "array", + "description": "下拉选项配置", + "defaultValue": [] + }, + { + "name": "object", + "propType": "object", + "description": "object", + "defaultValue": { + "a": 123, + "b": 234 + } + }, + { + "name": "node", + "propType": "node", + "description": "node" + }, + { + "name": "element", + "propType": "element", + "description": "element" + }, + { + "name": "onClick", + "propType": { + "type": "func", + "isRequired": true + }, + "description": "下拉选项配置" + } + ] +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/fixtures/props-complex-type/result.json b/packages/material-parser/test/validate/fixtures/props-complex-type/result.json new file mode 100644 index 000000000..86a346c7d --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/props-complex-type/result.json @@ -0,0 +1,3 @@ +{ + "success": true +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/fixtures/props-complex-type/src.json b/packages/material-parser/test/validate/fixtures/props-complex-type/src.json new file mode 100644 index 000000000..fdb40a5af --- /dev/null +++ b/packages/material-parser/test/validate/fixtures/props-complex-type/src.json @@ -0,0 +1,95 @@ +{ + "componentName": "Select", + "title": "下拉选择器", + "description": "适用于下拉选择,下拉多选等场景", + "tags": ["xx", "yy"], + "docUrl": "https://fusion-demo.alibaba-inc.com/demos/next/select", + "screenshot": "https://img.alicdn.com/tfs/TB1osvGNXzqK1RjSZFoXXbfcXXa-1149-854.png", + "icon": "url/fsdfasdfa.svg", + "devMode": "proCode", + "npm": { + "package": "@ali/deep", + "exportName": "Button", + "subName": "Icon.Option", + "main": "", + "destructuring": true, + "version": "0.1.13" + }, + "props": [ + { + "name": "oneOf", + "propType": { + "type": "oneOf", + "value": ["a", "b", "c"] + } + }, + { + "name": "oneOfType", + "propType": { + "type": "oneOfType", + "value": ["string", "number", { + "type": "array", + "isRequired": true + }] + } + }, + { + "name": "arrayOf", + "propType": "number" + }, + { + "name": "objectOf", + "propType": "number" + }, + { + "name": "size", + "propType": "number", + "description": "尺寸", + "defaultValue": 10 + }, + { + "name": "dataSource", + "propType": "array", + "description": "下拉选项配置", + "defaultValue": [] + }, + { + "name": "shape", + "propType": { + "type": "shape", + "value": [ + { + "name": "color", + "propType": "string" + }, + { + "name": "fontSize", + "propType": { + "type": "number", + "isRequired": true + } + } + ] + } + }, + { + "name": "exact", + "propType": { + "type": "exact", + "value": [ + { + "name": "name", + "propType": "string" + }, + { + "name": "quantity", + "propType": { + "type": "number", + "isRequired": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/packages/material-parser/test/validate/index.ts b/packages/material-parser/test/validate/index.ts new file mode 100644 index 000000000..f37741cce --- /dev/null +++ b/packages/material-parser/test/validate/index.ts @@ -0,0 +1,52 @@ +import test from 'ava'; +import Ajv from 'ajv'; +import betterAjvErrors from 'better-ajv-errors'; + +import fs = require('fs'); +import yaml = require('js-yaml'); +import path = require('path'); +const schema = yaml.load(fs.readFileSync(path.resolve(__dirname, '../../schemas/schema.yml'), 'utf8')); +const ajv = new Ajv({jsonPointers: true}); +const validate = ajv.compile(schema); + +const shouldUpdate = process.env.UPDATE || false; + +let fixtures = fs.readdirSync(path.join(__dirname, 'fixtures')); +fixtures = fixtures.filter(item => !item.includes('.skip')); +if (fixtures.find(item => item.includes('.only'))) { + fixtures = fixtures.filter(item => item.includes('.only')); +} + +for (const dir of fixtures) { + const fullPath = path.join(__dirname, 'fixtures', dir); + test(`should be right in dir ${dir}`, async (t) => { + const json = yaml.safeLoad(fs.readFileSync(path.resolve(fullPath, 'src.json'), 'utf-8')); + const result = JSON.parse(fs.readFileSync(path.resolve(fullPath, 'result.json'), 'utf-8')); + let validateResult: any = validate(json); + if (validateResult === true) { + validateResult = { + success: true, + }; + } else { + validateResult = { + success: false, + errors: validate.errors, + }; + } + + if (shouldUpdate) { + fs.writeFileSync( + path.resolve(fullPath, 'result.json'), + JSON.stringify(validateResult, null, 2), + 'utf-8', + ); + } else { + t.deepEqual(validateResult, result); + } + + if (validate.errors && validateResult.success === false && result.success === true) { + const output = betterAjvErrors(schema, json, validate.errors, {indent: 2}); + console.log(output); + } + }); +} \ No newline at end of file diff --git a/packages/material-parser/tsconfig.json b/packages/material-parser/tsconfig.json new file mode 100644 index 000000000..469dcb033 --- /dev/null +++ b/packages/material-parser/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "lib" + }, + "include": ["src/**/*"], + "exclude": ["schemas"] +} diff --git a/templates/src/index.d.ts b/templates/src/index.d.ts new file mode 100644 index 000000000..e69de29bb diff --git a/templates/src/index.js b/templates/src/index.js new file mode 100644 index 000000000..fb029417c --- /dev/null +++ b/templates/src/index.js @@ -0,0 +1,3 @@ +"use strict"; +// +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/templates/src/index.js.map b/templates/src/index.js.map new file mode 100644 index 000000000..67b67fe20 --- /dev/null +++ b/templates/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,EAAE"} \ No newline at end of file diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 7ad2bb75a..000000000 --- a/tslint.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": [ - "tslint:recommended", - "tslint-config-prettier" - ], - "rulesDirectory": ["tslint-plugin-prettier"], - "rules": { - "prettier": true, - "object-literal-sort-keys": false, - "no-var-requires": false, - "no-console": false - } -} \ No newline at end of file From 44ac85f8a6a35bcd50f2e2b74a022e3cebe3cdef Mon Sep 17 00:00:00 2001 From: gengyang Date: Sun, 16 Feb 2020 15:55:23 +0800 Subject: [PATCH 02/13] feat: immigrate aimake materialin --- .eslintignore | 15 - .eslintrc.js | 34 - package.json | 9 +- packages/material-parser/package.json | 20 +- packages/material-parser/src/Materialize.ts | 48 + .../src/accesser/BaseAccesser.ts | 26 + .../src/accesser/LocalAccesser.ts | 77 + .../src/accesser/OnlineAccesser.ts | 121 + .../src/extensions/MatBuildBundle.ts | 18 + .../src/extensions/MatConfigContainer.ts | 31 + .../src/extensions/MatConfigManifest.ts | 37 + .../src/extensions/MatGenerateBuildJS.ts | 27 + .../src/extensions/MatLoadMaterials.ts | 16 + .../material-parser/src/extensions/index.ts | 12 + .../src/generator/Generator.ts | 194 + packages/material-parser/src/index.ts | 8 +- .../src/otter-core/OtterError.ts | 70 + .../material-parser/src/otter-core/index.ts | 21 + .../src/otter-core/schema/types.ts | 238 + .../material-parser/src/otter-core/types.ts | 40 + .../material-parser/src/parser/BaseParser.ts | 76 + .../material-parser/src/parser/ReactParser.ts | 962 ++ .../material-parser/src/scanner/Scanner.ts | 169 + .../material-parser/src/types/ChannelType.ts | 11 + .../material-parser/src/types/EcologyType.ts | 15 + .../src/types/ExtensionName.ts | 17 + .../material-parser/src/types/IAccesser.ts | 16 + .../material-parser/src/types/ICompiler.ts | 15 + .../src/types/IExtensionBuildBundle.ts | 10 + .../src/types/IExtensionConfigContainer.ts | 13 + .../src/types/IExtensionConfigManifest.ts | 15 + .../src/types/IExtensionGenerateBuildJS.ts | 13 + .../src/types/IExtensionLoadMaterials.ts | 12 + .../material-parser/src/types/IGenerator.ts | 20 + .../src/types/IMaterialInOptions.ts | 23 + .../src/types/IMaterialParsedModel.ts | 45 + .../src/types/IMaterialScanModel.ts | 20 + .../src/types/IMaterializeOptions.ts | 59 + packages/material-parser/src/types/IParser.ts | 42 + .../material-parser/src/types/IScanner.ts | 32 + .../material-parser/src/types/SourceType.ts | 11 + packages/material-parser/src/types/index.ts | 37 + .../src/{validate.ts => validate/index.ts} | 0 .../src/{ => validate}/schema.json | 0 packages/material-parser/test/Materialize.ts | 63 + .../test/accesser/LocalAccesser.ts | 29 + .../test/accesser/OnlineAccesser.ts | 42 + .../accesser/snapshots/LocalAccesser.ts.md | 529 ++ .../accesser/snapshots/LocalAccesser.ts.snap | Bin 0 -> 3727 bytes .../accesser/snapshots/OnlineAccesser.ts.md | 408 + .../accesser/snapshots/OnlineAccesser.ts.snap | Bin 0 -> 2896 bytes .../__snapshots__/test/MaterialIn.ts.md | 7853 +++++++++++++++++ .../__snapshots__/test/MaterialIn.ts.snap | Bin 0 -> 52389 bytes .../__snapshots__/test/Materialize.ts.md | 563 ++ .../__snapshots__/test/Materialize.ts.snap | Bin 0 -> 3944 bytes .../test/accesser/LocalAccesser.ts.md | 529 ++ .../test/accesser/LocalAccesser.ts.snap | Bin 0 -> 3727 bytes .../test/accesser/OnlineAccesser.ts.md | 408 + .../test/accesser/OnlineAccesser.ts.snap | Bin 0 -> 2897 bytes .../test/generator/Generator.ts.md | 981 ++ .../test/generator/Generator.ts.snap | Bin 0 -> 4489 bytes .../test/parser/ReactParser.ts.md | 1039 +++ .../test/parser/ReactParser.ts.snap | Bin 0 -> 6584 bytes .../test/scanner/LocalScanner.ts.md | 633 ++ .../test/scanner/LocalScanner.ts.snap | Bin 0 -> 3709 bytes .../test/scanner/OnlineScanner.ts.md | 580 ++ .../test/scanner/OnlineScanner.ts.snap | Bin 0 -> 2988 bytes .../__snapshots__/test/scanner/Scanner.ts.md | 633 ++ .../test/scanner/Scanner.ts.snap | Bin 0 -> 3708 bytes .../fixtures/antd-component/dist/bundle.js | 57 + .../test/fixtures/antd-component/package.json | 16 + .../src/antd/affix/container.js | 5 + .../antd-component/src/antd/affix/manifest.js | 1 + .../src/antd/anchor/container.js | 5 + .../src/antd/anchor/manifest.js | 1 + .../src/antd/breadcrumb/container.js | 5 + .../src/antd/breadcrumb/manifest.js | 1 + .../src/antd/button/container.js | 5 + .../src/antd/button/manifest.js | 1 + .../src/antd/calendar/container.js | 5 + .../src/antd/calendar/manifest.js | 1 + .../src/antd/cascader/container.js | 5 + .../src/antd/cascader/manifest.js | 1 + .../src/antd/checkbox/container.js | 5 + .../src/antd/checkbox/manifest.js | 1 + .../antd-component/src/antd/col/container.js | 5 + .../antd-component/src/antd/col/manifest.js | 1 + .../src/antd/collapse/container.js | 5 + .../src/antd/collapse/manifest.js | 1 + .../src/antd/config-provider/container.js | 5 + .../src/antd/config-provider/manifest.js | 1 + .../src/antd/date-picker/container.js | 5 + .../src/antd/date-picker/manifest.js | 1 + .../src/antd/descriptions/container.js | 5 + .../src/antd/descriptions/manifest.js | 1 + .../src/antd/divider/container.js | 5 + .../src/antd/divider/manifest.js | 1 + .../src/antd/drawer/container.js | 5 + .../src/antd/drawer/manifest.js | 1 + .../src/antd/dropdown/container.js | 5 + .../src/antd/dropdown/manifest.js | 1 + .../src/antd/empty/container.js | 5 + .../antd-component/src/antd/empty/manifest.js | 1 + .../antd-component/src/antd/form/container.js | 5 + .../src/antd/form/item/container.js | 4 + .../src/antd/form/item/manifest.js | 12 + .../antd-component/src/antd/form/manifest.js | 1 + .../antd-component/src/antd/icon/container.js | 5 + .../antd-component/src/antd/icon/manifest.js | 1 + .../src/antd/input/container.js | 5 + .../antd-component/src/antd/input/manifest.js | 1 + .../src/antd/layout/container.js | 5 + .../src/antd/layout/manifest.js | 1 + .../src/antd/mention/container.js | 5 + .../src/antd/mention/manifest.js | 1 + .../src/antd/mentions/container.js | 5 + .../src/antd/mentions/manifest.js | 1 + .../src/antd/message/container.js | 5 + .../src/antd/message/manifest.js | 1 + .../src/antd/modal/container.js | 5 + .../antd-component/src/antd/modal/manifest.js | 1 + .../src/antd/notification/container.js | 5 + .../src/antd/notification/manifest.js | 1 + .../src/antd/page-header/container.js | 5 + .../src/antd/page-header/manifest.js | 1 + .../src/antd/pagination/container.js | 5 + .../src/antd/pagination/manifest.js | 1 + .../src/antd/popconfirm/container.js | 5 + .../src/antd/popconfirm/manifest.js | 1 + .../src/antd/progress/container.js | 5 + .../src/antd/progress/manifest.js | 1 + .../src/antd/radio/container.js | 5 + .../antd-component/src/antd/radio/manifest.js | 1 + .../src/antd/result/container.js | 5 + .../src/antd/result/manifest.js | 1 + .../antd-component/src/antd/row/container.js | 5 + .../antd-component/src/antd/row/manifest.js | 1 + .../src/antd/skeleton/container.js | 5 + .../src/antd/skeleton/manifest.js | 1 + .../antd-component/src/antd/spin/container.js | 5 + .../antd-component/src/antd/spin/manifest.js | 1 + .../src/antd/statistic/container.js | 5 + .../src/antd/statistic/manifest.js | 1 + .../src/antd/table/container.js | 5 + .../antd-component/src/antd/table/manifest.js | 1 + .../antd-component/src/antd/tag/container.js | 5 + .../antd-component/src/antd/tag/manifest.js | 1 + .../src/antd/time-picker/container.js | 5 + .../src/antd/time-picker/manifest.js | 1 + .../src/antd/timeline/container.js | 5 + .../src/antd/timeline/manifest.js | 1 + .../src/antd/tooltip/container.js | 5 + .../src/antd/tooltip/manifest.js | 1 + .../src/antd/transfer/container.js | 5 + .../src/antd/transfer/manifest.js | 1 + .../antd-component/src/antd/tree/container.js | 5 + .../antd-component/src/antd/tree/manifest.js | 1 + .../src/antd/typography/container.js | 5 + .../src/antd/typography/manifest.js | 1 + .../src/antd/upload/container.js | 5 + .../src/antd/upload/manifest.js | 1 + .../src/antd/version/container.js | 5 + .../src/antd/version/manifest.js | 1 + .../test/fixtures/antd-component/src/build.js | 45 + .../fusion-next-component/dist/bundle.js | 36 + .../fusion-next-component/package.json | 14 + .../src/@alife/next/affix/container.js | 5 + .../src/@alife/next/affix/manifest.js | 1 + .../src/@alife/next/animate/container.js | 5 + .../src/@alife/next/animate/manifest.js | 1 + .../src/@alife/next/badge/container.js | 5 + .../src/@alife/next/badge/manifest.js | 1 + .../src/@alife/next/balloon/container.js | 5 + .../src/@alife/next/balloon/manifest.js | 1 + .../src/@alife/next/breadcrumb/container.js | 5 + .../src/@alife/next/breadcrumb/manifest.js | 1 + .../src/@alife/next/button/container.js | 5 + .../src/@alife/next/button/manifest.js | 1 + .../src/@alife/next/calendar/container.js | 5 + .../src/@alife/next/calendar/manifest.js | 1 + .../src/@alife/next/card/container.js | 5 + .../src/@alife/next/card/manifest.js | 1 + .../@alife/next/cascader-select/container.js | 5 + .../@alife/next/cascader-select/manifest.js | 1 + .../src/@alife/next/cascader/container.js | 5 + .../src/@alife/next/cascader/manifest.js | 1 + .../src/@alife/next/checkbox/container.js | 5 + .../src/@alife/next/checkbox/manifest.js | 1 + .../src/@alife/next/collapse/container.js | 5 + .../src/@alife/next/collapse/manifest.js | 1 + .../@alife/next/config-provider/container.js | 5 + .../@alife/next/config-provider/manifest.js | 1 + .../src/@alife/next/date-picker/container.js | 5 + .../src/@alife/next/date-picker/manifest.js | 1 + .../src/@alife/next/dialog/container.js | 5 + .../src/@alife/next/dialog/manifest.js | 1 + .../src/@alife/next/drawer/container.js | 5 + .../src/@alife/next/drawer/manifest.js | 1 + .../src/@alife/next/dropdown/container.js | 5 + .../src/@alife/next/dropdown/manifest.js | 1 + .../src/@alife/next/field/container.js | 5 + .../src/@alife/next/field/manifest.js | 1 + .../src/@alife/next/form/container.js | 5 + .../src/@alife/next/form/manifest.js | 1 + .../src/@alife/next/grid/container.js | 5 + .../src/@alife/next/grid/manifest.js | 1 + .../src/@alife/next/icon/container.js | 5 + .../src/@alife/next/icon/manifest.js | 1 + .../src/@alife/next/input/container.js | 5 + .../src/@alife/next/input/manifest.js | 1 + .../src/@alife/next/loading/container.js | 5 + .../src/@alife/next/loading/manifest.js | 1 + .../src/@alife/next/menu-button/container.js | 5 + .../src/@alife/next/menu-button/manifest.js | 1 + .../src/@alife/next/menu/container.js | 5 + .../src/@alife/next/menu/manifest.js | 1 + .../src/@alife/next/message/container.js | 5 + .../src/@alife/next/message/manifest.js | 1 + .../src/@alife/next/nav/container.js | 5 + .../src/@alife/next/nav/manifest.js | 1 + .../@alife/next/number-picker/container.js | 5 + .../src/@alife/next/number-picker/manifest.js | 1 + .../src/@alife/next/overlay/container.js | 5 + .../src/@alife/next/overlay/manifest.js | 1 + .../src/@alife/next/pagination/container.js | 5 + .../src/@alife/next/pagination/manifest.js | 1 + .../src/@alife/next/paragraph/container.js | 5 + .../src/@alife/next/paragraph/manifest.js | 1 + .../src/@alife/next/progress/container.js | 5 + .../src/@alife/next/progress/manifest.js | 1 + .../src/@alife/next/radio/container.js | 5 + .../src/@alife/next/radio/manifest.js | 1 + .../src/@alife/next/range/container.js | 5 + .../src/@alife/next/range/manifest.js | 1 + .../src/@alife/next/rating/container.js | 5 + .../src/@alife/next/rating/manifest.js | 1 + .../src/@alife/next/search/container.js | 5 + .../src/@alife/next/search/manifest.js | 1 + .../src/@alife/next/select/container.js | 5 + .../src/@alife/next/select/manifest.js | 1 + .../src/@alife/next/slider/container.js | 5 + .../src/@alife/next/slider/manifest.js | 1 + .../src/@alife/next/split-button/container.js | 5 + .../src/@alife/next/split-button/manifest.js | 1 + .../src/@alife/next/step/container.js | 5 + .../src/@alife/next/step/manifest.js | 1 + .../src/@alife/next/switch/container.js | 5 + .../src/@alife/next/switch/manifest.js | 1 + .../src/@alife/next/tab/container.js | 5 + .../src/@alife/next/tab/manifest.js | 1 + .../src/@alife/next/table/container.js | 5 + .../src/@alife/next/table/manifest.js | 1 + .../src/@alife/next/tag/container.js | 5 + .../src/@alife/next/tag/manifest.js | 1 + .../src/@alife/next/time-picker/container.js | 5 + .../src/@alife/next/time-picker/manifest.js | 1 + .../src/@alife/next/timeline/container.js | 5 + .../src/@alife/next/timeline/manifest.js | 1 + .../src/@alife/next/transfer/container.js | 5 + .../src/@alife/next/transfer/manifest.js | 1 + .../src/@alife/next/tree-select/container.js | 5 + .../src/@alife/next/tree-select/manifest.js | 1 + .../src/@alife/next/tree/container.js | 5 + .../src/@alife/next/tree/manifest.js | 1 + .../src/@alife/next/upload/container.js | 5 + .../src/@alife/next/upload/manifest.js | 1 + .../src/@alife/next/virtual-list/container.js | 5 + .../src/@alife/next/virtual-list/manifest.js | 1 + .../fusion-next-component/src/build.js | 51 + .../dist/bundle.js | 20 + .../es/basic/AIMakeBlank/amContainer.js | 11 + .../es/basic/AIMakeBlank/amManifest.js | 144 + .../es/basic/AIMakeBlank/container.js | 5 + .../es/basic/AIMakeBlank/index.js | 74 + .../es/basic/AIMakeBlank/manifest.js | 1 + .../es/basic/AIMakeIcon/IconFont.js | 67 + .../es/basic/AIMakeIcon/amContainer.js | 13 + .../es/basic/AIMakeIcon/amManifest.js | 82 + .../es/basic/AIMakeIcon/container.js | 5 + .../es/basic/AIMakeIcon/index.js | 71 + .../es/basic/AIMakeIcon/manifest.js | 1 + .../es/basic/AIMakeImage/amContainer.js | 11 + .../es/basic/AIMakeImage/amManifest.js | 86 + .../es/basic/AIMakeImage/container.js | 5 + .../es/basic/AIMakeImage/index.js | 54 + .../es/basic/AIMakeImage/manifest.js | 1 + .../es/basic/AIMakeLink/amContainer.js | 11 + .../es/basic/AIMakeLink/amManifest.js | 102 + .../es/basic/AIMakeLink/container.js | 5 + .../es/basic/AIMakeLink/index.js | 73 + .../es/basic/AIMakeLink/manifest.js | 1 + .../es/basic/AIMakePlaceholder/amContainer.js | 11 + .../es/basic/AIMakePlaceholder/amManifest.js | 102 + .../es/basic/AIMakePlaceholder/container.js | 5 + .../es/basic/AIMakePlaceholder/index.js | 65 + .../es/basic/AIMakePlaceholder/manifest.js | 1 + .../es/basic/AIMakeText/amContainer.js | 11 + .../es/basic/AIMakeText/amManifest.js | 115 + .../es/basic/AIMakeText/container.js | 5 + .../es/basic/AIMakeText/index.js | 95 + .../es/basic/AIMakeText/manifest.js | 1 + .../es/basic/Root/amContainer.js | 11 + .../es/basic/Root/amManifest.js | 25 + .../es/basic/Root/container.js | 5 + .../es/basic/Root/index.js | 51 + .../es/basic/Root/manifest.js | 1 + .../es/basic/style/index.css | 15 + .../es/basic/style/index.js | 1 + .../es/basic/style/index.less | 8 + .../es/basic/utils/HOCBackgroundProps.js | 74 + .../es/basic/utils/HOCBoxModelProps.js | 103 + .../es/basic/utils/HOCFlexLayoutProps.js | 90 + .../es/basic/utils/HOCLayoutProps.js | 82 + .../es/basic/utils/HOCTextProps.js | 82 + .../multiple-exported-component/es/index.js | 8 + .../multiple-exported-component/package.json | 22 + .../src/basic/AIMakeBlank/amContainer.js | 6 + .../src/basic/AIMakeBlank/amManifest.js | 158 + .../src/basic/AIMakeBlank/container.js | 5 + .../src/basic/AIMakeBlank/index.js | 61 + .../src/basic/AIMakeBlank/manifest.js | 1 + .../src/basic/AIMakeIcon/IconFont.js | 51 + .../src/basic/AIMakeIcon/amContainer.js | 7 + .../src/basic/AIMakeIcon/amManifest.js | 89 + .../src/basic/AIMakeIcon/container.js | 5 + .../src/basic/AIMakeIcon/index.js | 59 + .../src/basic/AIMakeIcon/manifest.js | 1 + .../src/basic/AIMakeImage/amContainer.js | 6 + .../src/basic/AIMakeImage/amManifest.js | 99 + .../src/basic/AIMakeImage/container.js | 5 + .../src/basic/AIMakeImage/index.js | 26 + .../src/basic/AIMakeImage/manifest.js | 1 + .../src/basic/AIMakeLink/amContainer.js | 6 + .../src/basic/AIMakeLink/amManifest.js | 115 + .../src/basic/AIMakeLink/container.js | 5 + .../src/basic/AIMakeLink/index.js | 57 + .../src/basic/AIMakeLink/manifest.js | 1 + .../basic/AIMakePlaceholder/amContainer.js | 6 + .../src/basic/AIMakePlaceholder/amManifest.js | 115 + .../src/basic/AIMakePlaceholder/container.js | 5 + .../src/basic/AIMakePlaceholder/index.js | 45 + .../src/basic/AIMakePlaceholder/manifest.js | 1 + .../src/basic/AIMakeText/amContainer.js | 6 + .../src/basic/AIMakeText/amManifest.js | 119 + .../src/basic/AIMakeText/container.js | 5 + .../src/basic/AIMakeText/index.js | 72 + .../src/basic/AIMakeText/manifest.js | 1 + .../src/basic/Root/amContainer.js | 6 + .../src/basic/Root/amManifest.js | 29 + .../src/basic/Root/container.js | 5 + .../src/basic/Root/index.js | 29 + .../src/basic/Root/manifest.js | 1 + .../src/basic/style/index.js | 1 + .../src/basic/style/index.less | 8 + .../src/basic/utils/HOCBackgroundProps.js | 44 + .../src/basic/utils/HOCBoxModelProps.js | 75 + .../src/basic/utils/HOCFlexLayoutProps.js | 61 + .../src/basic/utils/HOCLayoutProps.js | 52 + .../src/basic/utils/HOCTextProps.js | 52 + .../multiple-exported-component/src/index.js | 17 + .../single-exported-component/es/container.js | 5 + .../single-exported-component/es/index.js | 83 + .../single-exported-component/es/main.css | 6 + .../single-exported-component/es/main.scss | 11 + .../single-exported-component/es/manifest.js | 1 + .../single-exported-component/package.json | 30 + .../src/container.js | 5 + .../single-exported-component/src/index.js | 82 + .../single-exported-component/src/main.scss | 11 + .../single-exported-component/src/manifest.js | 1 + .../test/generator/Generator.ts | 180 + .../material-parser/test/helpers/index.ts | 10 + .../test/parser/ReactParser.ts | 40 + .../test/parser/snapshots/ReactParser.ts.md | 1039 +++ .../test/parser/snapshots/ReactParser.ts.snap | Bin 0 -> 6584 bytes .../material-parser/test/scanner/Scanner.ts | 31 + .../test/scanner/snapshots/Scanner.ts.md | 633 ++ .../test/scanner/snapshots/Scanner.ts.snap | Bin 0 -> 3708 bytes .../test/snapshots/Materialize.ts.md | 563 ++ .../test/snapshots/Materialize.ts.snap | Bin 0 -> 3942 bytes .../material-parser/test/validate/index.ts | 2 +- tslint.json | 11 + 382 files changed, 23835 insertions(+), 56 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js create mode 100644 packages/material-parser/src/Materialize.ts create mode 100644 packages/material-parser/src/accesser/BaseAccesser.ts create mode 100644 packages/material-parser/src/accesser/LocalAccesser.ts create mode 100644 packages/material-parser/src/accesser/OnlineAccesser.ts create mode 100644 packages/material-parser/src/extensions/MatBuildBundle.ts create mode 100644 packages/material-parser/src/extensions/MatConfigContainer.ts create mode 100644 packages/material-parser/src/extensions/MatConfigManifest.ts create mode 100644 packages/material-parser/src/extensions/MatGenerateBuildJS.ts create mode 100644 packages/material-parser/src/extensions/MatLoadMaterials.ts create mode 100644 packages/material-parser/src/extensions/index.ts create mode 100644 packages/material-parser/src/generator/Generator.ts create mode 100644 packages/material-parser/src/otter-core/OtterError.ts create mode 100644 packages/material-parser/src/otter-core/index.ts create mode 100644 packages/material-parser/src/otter-core/schema/types.ts create mode 100644 packages/material-parser/src/otter-core/types.ts create mode 100644 packages/material-parser/src/parser/BaseParser.ts create mode 100644 packages/material-parser/src/parser/ReactParser.ts create mode 100644 packages/material-parser/src/scanner/Scanner.ts create mode 100644 packages/material-parser/src/types/ChannelType.ts create mode 100644 packages/material-parser/src/types/EcologyType.ts create mode 100644 packages/material-parser/src/types/ExtensionName.ts create mode 100644 packages/material-parser/src/types/IAccesser.ts create mode 100644 packages/material-parser/src/types/ICompiler.ts create mode 100644 packages/material-parser/src/types/IExtensionBuildBundle.ts create mode 100644 packages/material-parser/src/types/IExtensionConfigContainer.ts create mode 100644 packages/material-parser/src/types/IExtensionConfigManifest.ts create mode 100644 packages/material-parser/src/types/IExtensionGenerateBuildJS.ts create mode 100644 packages/material-parser/src/types/IExtensionLoadMaterials.ts create mode 100644 packages/material-parser/src/types/IGenerator.ts create mode 100644 packages/material-parser/src/types/IMaterialInOptions.ts create mode 100644 packages/material-parser/src/types/IMaterialParsedModel.ts create mode 100644 packages/material-parser/src/types/IMaterialScanModel.ts create mode 100644 packages/material-parser/src/types/IMaterializeOptions.ts create mode 100644 packages/material-parser/src/types/IParser.ts create mode 100644 packages/material-parser/src/types/IScanner.ts create mode 100644 packages/material-parser/src/types/SourceType.ts create mode 100644 packages/material-parser/src/types/index.ts rename packages/material-parser/src/{validate.ts => validate/index.ts} (100%) rename packages/material-parser/src/{ => validate}/schema.json (100%) create mode 100644 packages/material-parser/test/Materialize.ts create mode 100644 packages/material-parser/test/accesser/LocalAccesser.ts create mode 100644 packages/material-parser/test/accesser/OnlineAccesser.ts create mode 100644 packages/material-parser/test/accesser/snapshots/LocalAccesser.ts.md create mode 100644 packages/material-parser/test/accesser/snapshots/LocalAccesser.ts.snap create mode 100644 packages/material-parser/test/accesser/snapshots/OnlineAccesser.ts.md create mode 100644 packages/material-parser/test/accesser/snapshots/OnlineAccesser.ts.snap create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/MaterialIn.ts.md create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/MaterialIn.ts.snap create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.md create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.snap create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/accesser/LocalAccesser.ts.md create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/accesser/LocalAccesser.ts.snap create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.md create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.snap create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/generator/Generator.ts.md create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/generator/Generator.ts.snap create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/parser/ReactParser.ts.md create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/parser/ReactParser.ts.snap create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.md create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.snap create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.md create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.snap create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/Scanner.ts.md create mode 100644 packages/material-parser/test/fixtures/__snapshots__/test/scanner/Scanner.ts.snap create mode 100644 packages/material-parser/test/fixtures/antd-component/dist/bundle.js create mode 100644 packages/material-parser/test/fixtures/antd-component/package.json create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/affix/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/affix/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/anchor/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/anchor/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/breadcrumb/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/breadcrumb/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/button/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/button/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/calendar/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/calendar/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/cascader/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/cascader/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/checkbox/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/checkbox/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/col/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/col/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/collapse/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/collapse/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/config-provider/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/config-provider/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/date-picker/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/date-picker/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/descriptions/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/descriptions/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/divider/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/divider/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/drawer/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/drawer/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/dropdown/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/dropdown/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/empty/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/empty/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/form/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/form/item/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/form/item/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/form/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/icon/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/icon/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/input/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/input/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/layout/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/layout/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/mention/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/mention/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/mentions/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/mentions/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/message/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/message/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/modal/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/modal/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/notification/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/notification/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/page-header/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/page-header/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/pagination/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/pagination/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/popconfirm/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/popconfirm/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/progress/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/progress/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/radio/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/radio/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/result/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/result/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/row/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/row/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/skeleton/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/skeleton/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/spin/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/spin/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/statistic/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/statistic/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/table/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/table/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/tag/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/tag/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/time-picker/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/time-picker/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/timeline/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/timeline/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/tooltip/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/tooltip/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/transfer/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/transfer/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/tree/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/tree/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/typography/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/typography/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/upload/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/upload/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/version/container.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/antd/version/manifest.js create mode 100644 packages/material-parser/test/fixtures/antd-component/src/build.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/dist/bundle.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/package.json create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/affix/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/affix/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/animate/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/animate/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/badge/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/badge/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/balloon/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/balloon/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/breadcrumb/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/breadcrumb/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/button/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/button/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/calendar/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/calendar/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/card/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/card/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/cascader-select/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/cascader-select/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/cascader/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/cascader/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/checkbox/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/checkbox/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/collapse/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/collapse/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/config-provider/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/config-provider/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/date-picker/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/date-picker/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/dialog/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/dialog/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/drawer/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/drawer/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/dropdown/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/dropdown/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/field/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/field/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/form/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/form/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/grid/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/grid/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/icon/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/icon/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/input/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/input/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/loading/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/loading/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/menu-button/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/menu-button/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/menu/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/menu/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/message/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/message/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/nav/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/nav/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/number-picker/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/number-picker/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/overlay/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/overlay/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/pagination/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/pagination/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/paragraph/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/paragraph/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/progress/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/progress/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/radio/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/radio/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/range/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/range/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/rating/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/rating/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/search/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/search/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/select/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/select/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/slider/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/slider/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/split-button/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/split-button/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/step/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/step/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/switch/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/switch/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/tab/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/tab/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/table/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/table/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/tag/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/tag/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/time-picker/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/time-picker/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/timeline/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/timeline/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/transfer/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/transfer/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/tree-select/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/tree-select/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/tree/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/tree/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/upload/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/upload/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/virtual-list/container.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/@alife/next/virtual-list/manifest.js create mode 100644 packages/material-parser/test/fixtures/fusion-next-component/src/build.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/dist/bundle.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/IconFont.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/style/index.css create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/style/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/style/index.less create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/utils/HOCBackgroundProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/utils/HOCBoxModelProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/utils/HOCFlexLayoutProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/utils/HOCLayoutProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/basic/utils/HOCTextProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/es/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/package.json create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeBlank/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/IconFont.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeIcon/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeImage/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeLink/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakePlaceholder/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/AIMakeText/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/amContainer.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/amManifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/container.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/Root/manifest.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/style/index.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/style/index.less create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/utils/HOCBackgroundProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/utils/HOCBoxModelProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/utils/HOCFlexLayoutProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/utils/HOCLayoutProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/basic/utils/HOCTextProps.js create mode 100644 packages/material-parser/test/fixtures/multiple-exported-component/src/index.js create mode 100644 packages/material-parser/test/fixtures/single-exported-component/es/container.js create mode 100644 packages/material-parser/test/fixtures/single-exported-component/es/index.js create mode 100644 packages/material-parser/test/fixtures/single-exported-component/es/main.css create mode 100644 packages/material-parser/test/fixtures/single-exported-component/es/main.scss create mode 100644 packages/material-parser/test/fixtures/single-exported-component/es/manifest.js create mode 100644 packages/material-parser/test/fixtures/single-exported-component/package.json create mode 100644 packages/material-parser/test/fixtures/single-exported-component/src/container.js create mode 100644 packages/material-parser/test/fixtures/single-exported-component/src/index.js create mode 100644 packages/material-parser/test/fixtures/single-exported-component/src/main.scss create mode 100644 packages/material-parser/test/fixtures/single-exported-component/src/manifest.js create mode 100644 packages/material-parser/test/generator/Generator.ts create mode 100644 packages/material-parser/test/helpers/index.ts create mode 100644 packages/material-parser/test/parser/ReactParser.ts create mode 100644 packages/material-parser/test/parser/snapshots/ReactParser.ts.md create mode 100644 packages/material-parser/test/parser/snapshots/ReactParser.ts.snap create mode 100644 packages/material-parser/test/scanner/Scanner.ts create mode 100644 packages/material-parser/test/scanner/snapshots/Scanner.ts.md create mode 100644 packages/material-parser/test/scanner/snapshots/Scanner.ts.snap create mode 100644 packages/material-parser/test/snapshots/Materialize.ts.md create mode 100644 packages/material-parser/test/snapshots/Materialize.ts.snap create mode 100644 tslint.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 70aca2e78..000000000 --- a/.eslintignore +++ /dev/null @@ -1,15 +0,0 @@ -node_modules -dist -build -coverage -expected -website -gh-pages -vendors -packages/build-scripts/test -packages/build-scripts/bin -packages/build-scripts/lib -packages/build-plugin-store/lib -packages/build-plugin-ice-router/lib -packages/build-plugin-ice-stark-child/lib -packages/build-plugin-env-config/lib \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 0d763bae3..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -const { eslint, tslint, deepmerge } = require('@ice/spec'); - -const commonRules = { - 'global-require': 0, - 'import/no-dynamic-require': 0, - 'no-restricted-syntax': ['error', "BinaryExpression[operator='of']"], -}; - -const jsRules = deepmerge(eslint, { - rules: { - ...commonRules, - }, -}); - -const tsRules = deepmerge(tslint, { - rules: { - ...commonRules, - '@typescript-eslint/explicit-function-return-type': ['warn', { - allowTypedFunctionExpressions: true, - }], - }, -}); - -delete tsRules.root; - -module.exports = { - ...jsRules, - overrides: [ - { - ...tsRules, - files: ['**/*.ts', '**/*.tsx'], - }, - ], -}; diff --git a/package.json b/package.json index 8be046891..4ab1756d3 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,11 @@ "boot": "lerna bootstrap --registry http://registry.npm.alibaba-inc.com --hoist", "clean": "rimraf ./packages/*/lib ./packages/*/node_modules", "pub": "npm run test && lerna publish --registry http://registry.npm.alibaba-inc.com", - "lint": "eslint --cache --quiet --ext .ts ./", - "lint:fix": "eslint --fix --cache --quiet --ext .ts ./", + "lint": "tslint -p tsconfig.json", + "lint:fix": "tslint --fix -p tsconfig.json", "build": "lerna run build", - "test": "lerna run test" + "test": "lerna run test", + "snapshot": "lerna run snapshot" }, "devDependencies": { "@types/node": "^10.12.18", @@ -31,7 +32,7 @@ "lint-staged": { "*.ts": [ "prettier --write", - "eslint --fix --cache --quiet --ext .ts ./", + "tslint --fix -p tsconfig.json", "git add" ] }, diff --git a/packages/material-parser/package.json b/packages/material-parser/package.json index 532ed1ecd..518334222 100644 --- a/packages/material-parser/package.json +++ b/packages/material-parser/package.json @@ -8,7 +8,11 @@ "schemas" ], "devDependencies": { + "@types/debug": "^4.1.5", + "@types/fs-extra": "^8.0.1", "@types/js-yaml": "^3.12.2", + "@types/lodash": "^4.14.149", + "@types/semver": "^7.1.0", "ajv": "^6.10.2", "better-ajv-errors": "^0.6.4", "globby": "^10.0.1", @@ -20,10 +24,12 @@ "build": "tsc", "prebuild": "npm run schema", "test": "ava", + "snapshot": "ava --update-snapshots", "schema": "node ./scripts/transform.js" }, "ava": { "compileEnhancements": false, + "snapshotDir": "test/fixtures/__snapshots__", "extensions": [ "ts" ], @@ -31,5 +37,17 @@ "ts-node/register" ] }, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@babel/generator": "^7.8.4", + "@babel/parser": "^7.8.4", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3", + "cross-spawn-promise": "^0.10.2", + "debug": "^4.1.1", + "fs-extra": "^8.1.0", + "lodash": "^4.17.15", + "semver": "^7.1.3", + "short-uuid": "^3.1.1" + } } diff --git a/packages/material-parser/src/Materialize.ts b/packages/material-parser/src/Materialize.ts new file mode 100644 index 000000000..b1d92094f --- /dev/null +++ b/packages/material-parser/src/Materialize.ts @@ -0,0 +1,48 @@ +import LocalAccesser from './accesser/LocalAccesser'; +import OnlineAccesser from './accesser/OnlineAccesser'; +import { IMaterialinSchema } from './otter-core'; +import { IAccesser, IMaterializeOptions } from './types'; + +/** + * 物料化(将普通组件包装为可接入和可流通的物料组件的过程,称为物料化)运行于 node 端 + * @class Materialize + */ +class Materialize { + /** + * 物料化配置项 + * @private + * @type {IMaterializeOptions} + * @memberof Materialize + */ + private options: IMaterializeOptions; + + /** + * 接入器 + * @private + * @type {IAccesser} + * @memberof Materialize + */ + private accesser?: IAccesser; + + constructor(options: IMaterializeOptions) { + this.options = options; + } + + /** + * 开始物料化 + * + * @returns {Promise} + * @memberof Materialize + */ + public async start(): Promise { + // 分发请求到对应接入器 + if (this.options.accesser === 'local') { + this.accesser = new LocalAccesser(this.options); + } else { + this.accesser = new OnlineAccesser(this.options); + } + return this.accesser.access(); + } +} + +export default Materialize; diff --git a/packages/material-parser/src/accesser/BaseAccesser.ts b/packages/material-parser/src/accesser/BaseAccesser.ts new file mode 100644 index 000000000..f31ed3abb --- /dev/null +++ b/packages/material-parser/src/accesser/BaseAccesser.ts @@ -0,0 +1,26 @@ +import { IMaterialinSchema } from '../otter-core'; +import { IAccesser, IMaterializeOptions } from '../types'; + +/** + * 接入器模板基类 + * @abstract + * @class BaseAccesser + * @implements {IAccesser} + */ +abstract class BaseAccesser implements IAccesser { + /** + * 物料化配置项 + * @protected + * @type {IMaterializeOptions} + * @memberof BaseAccesser + */ + protected options: IMaterializeOptions; + + constructor(options: IMaterializeOptions) { + this.options = options; + } + + public abstract access(): Promise; +} + +export default BaseAccesser; diff --git a/packages/material-parser/src/accesser/LocalAccesser.ts b/packages/material-parser/src/accesser/LocalAccesser.ts new file mode 100644 index 000000000..45edaf40f --- /dev/null +++ b/packages/material-parser/src/accesser/LocalAccesser.ts @@ -0,0 +1,77 @@ +import Generator from '../generator/Generator'; +import { debug, IMaterialinSchema } from '../otter-core'; +import BaseParser from '../parser/BaseParser'; +import ReactParser from '../parser/ReactParser'; +import Scanner from '../scanner/Scanner'; +import { IMaterialParsedModel, IMaterialScanModel, IParser } from '../types'; +import BaseAccesser from './BaseAccesser'; + +const log = debug.extend('mat'); + +/** + * 本地接入器 + * @class LocalAccesser + * @extends {BaseAccesser} + */ +class LocalAccesser extends BaseAccesser { + /** + * 扫描器实例 + * @private + * @type {Scanner} + * @memberof LocalAccesser + */ + private scanner!: Scanner; + + /** + * 解析器实例 + * @private + * @type {IParser} + * @memberof LocalAccesser + */ + private parser!: IParser; + + /** + * 生成器实例 + * @private + * @type {Generator} + * @memberof LocalAccesser + */ + private generator!: Generator; + + public async access(): Promise { + await this.init(); + // 开始扫描 + const matScanModel: IMaterialScanModel = await this.scanner.scan(); + log('matScanModel', matScanModel); + // 开始解析 + const matParsedModels: IMaterialParsedModel[] = await this.parser.parse( + matScanModel, + ); + log('matParsedModels', matParsedModels); + // 开始生产 + const material: IMaterialinSchema = await this.generator.generate( + matScanModel, + matParsedModels, + ); + log('material', material); + return material; + } + + /** + * 初始化 + * @private + * @returns {Promise} + * @memberof LocalAccesser + */ + private async init(): Promise { + const options = this.options; + this.scanner = new Scanner(options); + const ecology = await BaseParser.recognizeEcology(options); + if (ecology === 'react') { + this.parser = new ReactParser(options); + this.generator = new Generator(options); + } + } +} + +export default LocalAccesser; diff --git a/packages/material-parser/src/accesser/OnlineAccesser.ts b/packages/material-parser/src/accesser/OnlineAccesser.ts new file mode 100644 index 000000000..c06bc06bf --- /dev/null +++ b/packages/material-parser/src/accesser/OnlineAccesser.ts @@ -0,0 +1,121 @@ +import spawn from 'cross-spawn-promise'; +import { ensureDir, ensureFile, writeFile } from 'fs-extra'; +import { join } from 'path'; +import semver from 'semver'; +import uuid from 'short-uuid'; +import { debug, IMaterialinSchema, OtterError } from '../otter-core'; +import { IMaterializeOptions } from '../types'; +import BaseAccesser from './BaseAccesser'; +import LocalAccesser from './LocalAccesser'; + +const log = debug.extend('mat'); + +/** + * 在线接入 + * @class OnlineAccesser + * @extends {BaseAccesser} + */ +class OnlineAccesser extends BaseAccesser { + /** + * 临时目录 + * + * @private + * @type {string} + * @memberof OnlineAccesser + */ + private tempDir: string = ''; + + public async access(): Promise { + // 创建临时目录 + this.tempDir = await this.createTempDir(); + // 创建组件包 + const { name, version } = this.getPkgNameAndVersion(this.options.entry); + await this.createFakePackage({ + pkgName: name, + pkgVersion: version, + }); + // 将问题转化为本地物料化场景 + const options: IMaterializeOptions = { + cwd: this.tempDir, + entry: join(this.tempDir, 'node_modules', name), + accesser: 'local', + isExportedAsMultiple: this.options.isExportedAsMultiple, + }; + const localAccesser = new LocalAccesser(options); + return localAccesser.access(); + } + + /** + * 创建组件包 + * + * @private + * @param {{ + * pkgName: string; + * pkgVersion: string; + * }} params + * @returns {Promise} + * @memberof OnlineAccesser + */ + private async createFakePackage(params: { + pkgName: string; + pkgVersion: string; + }): Promise { + // 创建临时组件包 + const tempDir = this.tempDir; + const pkgJsonFilePath = join(tempDir, 'package.json'); + await ensureFile(pkgJsonFilePath); + await writeFile( + pkgJsonFilePath, + JSON.stringify({ + name: params.pkgName, + version: params.pkgVersion, + dependencies: { + [params.pkgName]: params.pkgVersion, + }, + }), + ); + // 安装依赖 + const npmClient = this.options.npmClient || 'tnpm'; + await spawn(npmClient, ['i'], { stdio: 'inherit', cwd: tempDir } as any); + } + + /** + * 创建临时目录 + * + * @private + * @returns {Promise} 返回临时文件夹路径 + * @memberof LocalGenerator + */ + private async createTempDir(): Promise { + const tempDirName = uuid.generate(); + const tempDir = join(__dirname, '../../node_modules/.temp/', tempDirName); + await ensureDir(tempDir); + log('create temp dir successfully', tempDir); + return tempDir; + } + + /** + * 分离物料组件名称和版本号 + * + * @private + * @param {string} pkgNameWithVersion + * @returns {{ [key: string]: any }} + * @memberof OnlineAccesser + */ + private getPkgNameAndVersion( + pkgNameWithVersion: string, + ): { [key: string]: any } { + const matches = pkgNameWithVersion.match(/(@\d+\.\d+\.\d+)$/); + if (!matches) { + throw new OtterError(`Illegal semver version: ${pkgNameWithVersion}`); + } + const semverObj = semver.coerce(matches[0]); + const name = pkgNameWithVersion.replace(matches[0], ''); + return { + version: semverObj && semverObj.version, + name, + }; + } +} + +export default OnlineAccesser; diff --git a/packages/material-parser/src/extensions/MatBuildBundle.ts b/packages/material-parser/src/extensions/MatBuildBundle.ts new file mode 100644 index 000000000..e9847d4e2 --- /dev/null +++ b/packages/material-parser/src/extensions/MatBuildBundle.ts @@ -0,0 +1,18 @@ +/** + * 获取打包后的 bundle 文件(物料化场景下可以使用此扩展点) + * - 扩展点名称:mat:build:bundle + * - 对应 Studio 所处状态:进入 就绪态 前 + * + * @export + * @param {{ + * bundleJS: string, // bundle 文件内容 + * bundleObj: {[key: string]: any} // bundle 对象 + * }} params + * @returns {Promise} + */ +export default function matBuildBundle(params: { + bundleJS: string; // bundle 文件内容 + bundleObj: { [key: string]: any }; // bundle 对象 +}): Promise { + return Promise.resolve(); +} diff --git a/packages/material-parser/src/extensions/MatConfigContainer.ts b/packages/material-parser/src/extensions/MatConfigContainer.ts new file mode 100644 index 000000000..4b98c48a7 --- /dev/null +++ b/packages/material-parser/src/extensions/MatConfigContainer.ts @@ -0,0 +1,31 @@ +import { writeFile } from 'fs-extra'; + +/** + * 处理 containerJS(物料化场景下可以使用此扩展点) + * - 扩展点名称:mat:config:container + * - 对应 Studio 所处状态:进入 就绪态 前 + * + * @export + * @param {{ + * filePath: string, + * fileContent: string, + * }} params + * @returns {Promise<{ + * filePath: string, + * fileContent: string, + * }>} + */ +export default async function matConfigContainer(params: { + filePath: string; + fileContent: string; +}): Promise<{ + filePath: string; + fileContent: string; +}> { + await writeFile(params.filePath, params.fileContent); + + return { + filePath: params.filePath, + fileContent: params.fileContent, + }; +} diff --git a/packages/material-parser/src/extensions/MatConfigManifest.ts b/packages/material-parser/src/extensions/MatConfigManifest.ts new file mode 100644 index 000000000..2b975d74d --- /dev/null +++ b/packages/material-parser/src/extensions/MatConfigManifest.ts @@ -0,0 +1,37 @@ +import { writeFile } from 'fs-extra'; +import { IMaterialinManifest } from '../otter-core'; + +/** + * 配置 manifest(物料化场景下可以使用此扩展点) + * - 扩展点名称:mat:config:manifest + * - 对应 Studio 所处状态:进入 就绪态 前 + * + * @export + * @param {{ + * manifestObj: IMaterialinManifest, + * manifestFilePath: string, + * }} params + * @returns {Promise<{ + * manifestJS: string, + * manifestFilePath: string, + * manifestObj: IMaterialinManifest, + * }>} + */ +export default async function matConfigManifest(params: { + manifestObj: IMaterialinManifest; + manifestFilePath: string; +}): Promise<{ + manifestJS: string; + manifestFilePath: string; + manifestObj: IMaterialinManifest; +}> { + const manifestJS = `export default ${JSON.stringify(params.manifestObj)}`; + + await writeFile(params.manifestFilePath, manifestJS); + + return Promise.resolve({ + manifestJS, + manifestObj: params.manifestObj, + manifestFilePath: params.manifestFilePath, + }); +} diff --git a/packages/material-parser/src/extensions/MatGenerateBuildJS.ts b/packages/material-parser/src/extensions/MatGenerateBuildJS.ts new file mode 100644 index 000000000..dc643f0d1 --- /dev/null +++ b/packages/material-parser/src/extensions/MatGenerateBuildJS.ts @@ -0,0 +1,27 @@ +/** + * 生成 build 文件,可用于多组件导出场景(物料化场景下可以使用此扩展点) + * - 扩展点名称:mat:generate:buildjs + * - 对应 Studio 所处状态:进入 就绪态 前 + * + * @export + * @param {{ + * buildFileContent: string; // build 文件内容 + * buildFilePath: string; // build 文件默认路径 + * }} params + * @returns {Promise<{ + * buildFileContent: string; + * buildFilePath: string; + * }>} + */ +export default function matGenerateBuildJS(params: { + buildFileContent: string; // build 文件内容 + buildFilePath: string; // build 文件默认路径 +}): Promise<{ + buildFileContent: string; + buildFilePath: string; +}> { + return Promise.resolve({ + buildFilePath: params.buildFilePath, + buildFileContent: params.buildFileContent, + }); +} diff --git a/packages/material-parser/src/extensions/MatLoadMaterials.ts b/packages/material-parser/src/extensions/MatLoadMaterials.ts new file mode 100644 index 000000000..bd45066f5 --- /dev/null +++ b/packages/material-parser/src/extensions/MatLoadMaterials.ts @@ -0,0 +1,16 @@ +import { IMaterialinSchema } from '../otter-core'; + +/** + * 加载物料(物料接入场景下可以使用此扩展点) + * - 扩展点名称:mat:config:load + * - 对应 Studio 所处状态:进入 就绪态 前 + * + * @export + * @param {string[]} pkgNameList + * @returns {Promise} + */ +export default function matLoadMaterials( + pkgNameList: string[], +): Promise { + return Promise.resolve([]); +} diff --git a/packages/material-parser/src/extensions/index.ts b/packages/material-parser/src/extensions/index.ts new file mode 100644 index 000000000..3ef404b24 --- /dev/null +++ b/packages/material-parser/src/extensions/index.ts @@ -0,0 +1,12 @@ +import { ExtensionName } from '../types'; +import MatBuildBundle from './MatBuildBundle'; +import MatConfigContainer from './MatConfigContainer'; +import MatConfigManifest from './MatConfigManifest'; +import MatGenerateBuildJS from './MatGenerateBuildJS'; + +export default { + [ExtensionName.CONFIGMANIFEST]: MatConfigManifest, + [ExtensionName.BUILDBUNDLE]: MatBuildBundle, + [ExtensionName.CONFIGCONTAINER]: MatConfigContainer, + [ExtensionName.GENERATEBUILDJS]: MatGenerateBuildJS, +}; diff --git a/packages/material-parser/src/generator/Generator.ts b/packages/material-parser/src/generator/Generator.ts new file mode 100644 index 000000000..e5b3fd2e9 --- /dev/null +++ b/packages/material-parser/src/generator/Generator.ts @@ -0,0 +1,194 @@ +import { dirname, join } from 'path'; +import defaultExtension from '../extensions'; +import { debug, IMaterialinManifest, IMaterialinProp } from '../otter-core'; +import { + ICompiler, + IGenerator, + IMaterializeOptions, + IMaterialParsedModel, + IMaterialScanModel, +} from '../types'; + +const log = debug.extend('mat'); + +/** + * 用于物料工作台 + */ +class Generator implements IGenerator { + /** + * 物料化配置项 + * @protected + * @type {IMaterializeOptions} + * @memberof BaseGenerator + */ + /** + * 物料化配置项 + * @protected + * @type {IMaterializeOptions} + * @memberof BaseGenerator + */ + protected options!: IMaterializeOptions; + + /** + * 编译器实例 + * @protected + * @type {ICompiler} + * @memberof BaseGenerator + */ + protected compiler!: ICompiler; + + constructor(options: IMaterializeOptions) { + this.options = options; + } + + public async generate( + matScanModel: IMaterialScanModel, + matParsedModels: IMaterialParsedModel[], + ): Promise { + // const model: IMaterialinSchema = {} as any; + // 标记协议版本号 + // model.version = '1.0.0'; + // 组装 pkgInfo + // model.pkgInfo = pkgInfo; + const containerList = []; + for (const matParsedModel of matParsedModels) { + // TODO 可以开放扩展点让上层使用者指定导出哪些组件或者不导出哪些组件 + // 默认排除掉 defaultExportName 为空的组件 + if ( + !matParsedModel.defaultExportName || + !matParsedModel.defaultExportName.length + ) { + log('skip', matParsedModel.filePath); + continue; + } + // 组装 manifest + const manifest: any = await this.genManifest(matParsedModel); + + containerList.push(manifest); + } + + // const components: IMaterialinComponent[] = bundle.bundleObj.components; + // Object.keys(bundle.bundleObj.Modules).forEach(key => { + // const { origin, manifest } = bundle.bundleObj.Modules[key]; + // const component: IMaterialinComponent = { + // componentName: key, + // origin, + // manifest, + // }; + // components.push(component); + // }); + // model.components = components; + // log('materialsModel', JSON.stringify(bundle.bundleObj)); + + return containerList; + } + + /** + * 生成 manifest + * + * @param {IMaterialParsedModel} matParsedModel + * @returns {Promise<{ + * manifestFilePath: string, // manifest 文件路径 + * manifestJS: string, // manifest 文件内容 + * manifestObj: IMaterialinManifest, // manifest 文件对象 + * }>} + * @memberof LocalGenerator + */ + public async genManifest( + matParsedModel: IMaterialParsedModel, + ): Promise<{ + manifestFilePath: string; // manifest 文件路径 + manifestJS: string; // manifest 文件内容 + manifestObj: IMaterialinManifest; // manifest 文件对象 + }> { + const manifestObj: IMaterialinManifest = { + name: matParsedModel.defaultExportName, + settings: { + type: 'element_inline', + insertionModes: 'tbrl', + handles: ['cut', 'copy', 'duplicate', 'delete', 'paste'], + shouldActive: true, + shouldDrag: true, + props: [], + }, + }; + + const defaultManifestFilePath = join( + dirname(matParsedModel.filePath), + './manifest.js', + ); + + // 填充 props + manifestObj.settings.props = this.populateProps(matParsedModel); + // 执行扩展点 + const manifest: any = await this.executeExtensionPoint( + 'mat:config:manifest', + { + manifestObj, + manifestFilePath: defaultManifestFilePath, + }, + ); + return { + manifestJS: manifest.manifestJS, + manifestObj: manifest.manifestObj, + manifestFilePath: manifest.manifestFilePath, + }; + } + + /** + * 填充 props + * + * @public + * @param {IMaterialParsedModel} matParsedModel + * @returns {IMaterialinProp[]} + * @memberof BaseGenerator + */ + public populateProps( + matParsedModel: IMaterialParsedModel, + ): IMaterialinProp[] { + // 填充 props + const props: IMaterialinProp[] = []; + matParsedModel.propsTypes.forEach(item => { + const defaultValueItem = matParsedModel.propsDefaults.find( + inner => inner.name === item.name, + ); + props.push({ + name: item.name, + label: item.name, + renderer: '', + defaultValue: defaultValueItem + ? defaultValueItem.defaultValue + : undefined, + }); + }); + + return props; + } + + /** + * 执行扩展点 + * @param {string} extName 扩展点名称 + * @param {...any[]} args 参数 + * @returns {Promise} + * @memberof BaseGenerator + */ + public async executeExtensionPoint( + extName: string, + ...args: any[] + ): Promise { + const options = this.options; + const optionsExtensions: any = options.extensions; + const defaultExtensions: any = defaultExtension; + + const ext: any = + optionsExtensions && optionsExtensions[extName] + ? optionsExtensions[extName] + : defaultExtensions[extName]; + if (!ext) { + throw new Error(`Unsupported extension point: ${extName}`); + } + return ext(...args); + } +} + +export default Generator; diff --git a/packages/material-parser/src/index.ts b/packages/material-parser/src/index.ts index d8dfb55e8..d38da4098 100644 --- a/packages/material-parser/src/index.ts +++ b/packages/material-parser/src/index.ts @@ -1,2 +1,8 @@ +import Materialize from './Materialize'; + export { default as validate } from './validate'; -export { default as schema } from './schema.json'; +export { default as schema } from './validate/schema.json'; + +export * from './types'; + +export default Materialize; diff --git a/packages/material-parser/src/otter-core/OtterError.ts b/packages/material-parser/src/otter-core/OtterError.ts new file mode 100644 index 000000000..2435dbf2d --- /dev/null +++ b/packages/material-parser/src/otter-core/OtterError.ts @@ -0,0 +1,70 @@ +import { _ } from './index'; +import { IOtterErrorOptions } from './types'; + +/** + * Fix the prototype chain of the error + * + * Use Object.setPrototypeOf + * Support ES6 environments + * + * Fallback setting __proto__ + * Support IE11+, see https://docs.microsoft.com/en-us/scripting/javascript/reference/javascript-version-information + */ +function fixPrototype(target: Error, prototype: {}) { + const setPrototypeOf: typeof Object.setPrototypeOf = (Object as any) + .setPrototypeOf; + setPrototypeOf + ? setPrototypeOf(target, prototype) + : ((target as any).__proto__ = prototype); +} + +/** + * Capture and fix the error stack when available + * + * Use Error.captureStackTrace + * Support v8 environments + */ +function fixStackTrace(target: Error, fn: any = target.constructor) { + const captureStackTrace: any = (Error as any).captureStackTrace; + if (captureStackTrace) { + captureStackTrace(target, fn); + } +} + +class OtterError extends Error { + public name: string = ''; + + public urlRoot: string = 'https://docs.aimake.io/otter/'; + + private options: IOtterErrorOptions = { + url: '/', + version: '0.0.0', + }; + + constructor(message?: string, options?: IOtterErrorOptions) { + super(message); + + // set error name as constructor name, make it not enumerable to keep native Error behavior + // see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new.target#new.target_in_constructors + Object.defineProperty(this, 'name', { + value: new.target.name, + enumerable: false, + }); + + // fix the extended error prototype chain + // because typescript __extends implementation can't + // see https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work + fixPrototype(this, new.target.prototype); + // try to remove constructor from stack trace + fixStackTrace(this); + + _.extend(this.options, options || {}); + } + + public toString() { + const url = this.urlRoot + this.options.version + this.options.url; + return `${this.name}: ${this.message} See: ${url}`; + } +} + +export default OtterError; diff --git a/packages/material-parser/src/otter-core/index.ts b/packages/material-parser/src/otter-core/index.ts new file mode 100644 index 000000000..7eedebf65 --- /dev/null +++ b/packages/material-parser/src/otter-core/index.ts @@ -0,0 +1,21 @@ +import _debug from 'debug'; +import _lodash from 'lodash'; + +import _OtterError from './OtterError'; + +export * from './types'; +export * from './schema/types'; + +/** + * Dev helper + */ +export const debug = _debug('otter'); +export const enableDebug = () => _debug.enable('otter:*'); +export const disableDebug = () => _debug.disable(); + +export const OtterError = _OtterError; + +/** + * Dev utils + */ +export const _ = _lodash; diff --git a/packages/material-parser/src/otter-core/schema/types.ts b/packages/material-parser/src/otter-core/schema/types.ts new file mode 100644 index 000000000..5e11373e9 --- /dev/null +++ b/packages/material-parser/src/otter-core/schema/types.ts @@ -0,0 +1,238 @@ +// 搭建基础协议、搭建入料协议的数据规范 + +/** + * 搭建基础协议 + * + * @export + * @interface IBasicSchema + */ +export interface IBasicSchema { + version: string; // 当前协议版本号 + componentsMap: IComponentsMapItem[]; // 组件映射关系(用于描述 componentName 到公域组件映射关系的规范) + componentsTree: IComponentsTreeItem[]; // 描述模版/页面/区块/低代码业务组件的组件树(用于描述搭建出来的组件树结构的规范) +} + +/** + * 搭建基础协议 - 单个组件描述 + * + * @export + * @interface IComponentsMapItem + */ +export interface IComponentsMapItem { + componentName: string; // 组件名称 + package: string; // 组件包的名称 + version: string; // 组件包的版本 + originalPackage: string; // 组件的原始包名称 + originalVersion: string; // 组件的原始包版本 + destructuring: boolean; // 组件是否是解构方式方式导出 + exportName: string; // 导出命名 + subName?: string; // 下标子组件名称 +} + +/** + * 搭建基础协议 - 单个组件树节点描述 + * + * @export + * @interface IComponentsTreeItem + */ +export interface IComponentsTreeItem { + id: string; // 节点的唯一标识 + componentName: string; // 组件名称 + pkg: string; // 组件所属的包 + props?: { + className?: string; // 组件样式类名 + style?: { [cssAttribute: string]: string | number }; // 组件内联样式 + [propName: string]: any; // 业务属性 + }; // 组件属性对象 + children?: IComponentsTreeItem[] | string; // 子节点 + dataSource?: IDataSource; // 数据源 + state?: { + // 初始数据状态 + [key: string]: any; + }; + methods?: { + // 自定事件绑定 + [methodName: string]: IJSExpression; + }; + lifeCycles?: { + // 组件生命周期 + didMount?: IJSExpression; + willMount?: IJSExpression; + }; +} + +/** + * 搭建基础协议 - 函数表达式 + * + * @export + * @interface IComponentLifeCycle + */ +export interface IJSExpression { + type: 'JSExpression'; + value: string; +} + +/** + * 搭建基础协议 - 数据源 + * + * @export + * @interface IDataSource + */ +export interface IDataSource { + list: IDataSourceRequest[]; // 数据源配置列表 +} + +/** + * 搭建基础协议 - 数据源单个配置 + * + * @export + * @interface IDataSourceRequest + */ +export interface IDataSourceRequest { + id: string; // 数据请求 ID + isInit: boolean; // 表示在组件初始化渲染时是否自动发送当前数据请求 + type: 'fetch' | 'jsonp' | 'custom'; // 数据请求类型 + options?: IRequestOptions; // 请求参数配置 + dataHandler?: any; // 数据结果处理函数,形如:(data, err) => Object +} + +/** + * 搭建基础协议 - 请求参数配置 + * + * @export + * @interface IRequestOptions + */ +export interface IRequestOptions { + uri: string; // 请求地址 + params?: { + // 请求参数 + [key: string]: any; + }; + method: 'GET' | 'POST'; + isCors: boolean; // 是否支持跨域,对应credentials = 'include' + timeout: number; // 超时时长 + headers?: { + // 自定义请求头 + [key: string]: any; + }; +} + +/** + * 组件描述协议 + * + * @export + * @interface IMaterialinSchema + */ +export interface IMaterialinSchema { + version: string; // 当前协议版本号 + components: IMaterialinComponent[]; // 组件集合 + pkgInfo: IMaterialinPkgInfo; // 组件包信息描述 +} + +/** + * 组件描述协议 - 组件包信息描述(供出码引擎消费) + * + * @export + * @interface IMaterialinPkgInfo + */ +export interface IMaterialinPkgInfo { + // 包名 + package: string; + // 版本号 + version: string; + // 源版本号 + originalVersion: string; + // 源组件包 + originalPackage: string; + // 组件是否是 export 方式导出 + defaultExportedName: string; +} + +/** + * 组件描述协议 - 单个组件描述 + * + * @export + * @interface IMaterialinComponent + */ +export interface IMaterialinComponent { + componentName: string; // 组件名 + manifest: IMaterialinManifest; // 组件配置信息描述 + origin: any; // 组件源 +} + +/** + * 组件描述协议 - 组件配置信息描述 + * + * @export + * @interface IMaterialinManifest + */ +export interface IMaterialinManifest { + name: string; // 组件名 + settings: IMaterialinSettings; // 定义组件的配置属性 + description?: string; // 组件的描述 + coverImage?: string; // 组件的封面图 URL + category?: string; // 组件的分类 + presets?: IMaterialinPreset[]; // 定义组件左侧预览信息 +} + +/** + * 组件描述协议 - 组件配置属性(直接影响组件在编排工作区中的行为表现) + * + * @export + * @interface IMaterialinSettings + */ +export interface IMaterialinSettings { + type: 'element_inline' | 'element_block' | 'container'; // 定义组件在编排画布上的渲染类型 + // 定义组件对于拖拽行为的响应,支持:t、b、r、l、v 组合;形如:tbrl + // t:允许元素在组件顶部插入 + // b:允许元素在组件底部插入 + // r:允许元素在组件右侧插入 + // l:允许元素在组件左侧插入 + // v:允许将元素拖放到组件内部 + insertionModes: string; // 定义组件在编排画布上的响应模式 + handles: Array<'cut' | 'copy' | 'paste' | 'delete' | 'duplicate'>; // 定义组件需要响应的右键菜单操作 + shouldActive: boolean; // 用于控制物料组件在画布区块中是否响应用户鼠标的 Click 操作 + shouldDrag: boolean; // 用于控制物料组件在画布区块中是否可以被用户拖拽 + props: IMaterialinProp[]; // 物料组件属性配置 + lifeCycle?: IMaterialinLifeCycle; // 组件生命周期 +} + +/** + * 组件描述协议 - 定义组件左侧预览信息 + * + * @export + * @interface IMaterialinPreset + */ +export interface IMaterialinPreset { + alias: string; // 组件的别名 + thumbnail: string; // 组件的预览缩略图 URL + colSpan?: number; // 代表组件所占栅格数 + customProps?: object; // 自定义属性值 +} + +/** + * 组件描述协议 - 组件属性的描述 + * + * @export + * @interface IMaterialinProp + */ +export interface IMaterialinProp { + name: string; // 属性名 + label: string; // 属性展示名称 + renderer: string; // 属性编辑器类型 + defaultValue?: any; // 属性默认值 + params?: any; // 属性编辑器的参数 + placeholder?: string; // 属性编辑器的 placeholder 信息 + hint?: string; // 属性编辑器的提示信息(类似于 tooltip 效果),用于帮助用户理解属性的使用方法 +} + +/** + * 组件描述协议 - 组件生命周期描述 + * + * @export + * @interface IMaterialinLifeCycle + */ +export interface IMaterialinLifeCycle { + didMount?: any; // 组件渲染完成后的钩子 + didUpdate?: any; // 组件数据状态更新时的钩子 +} diff --git a/packages/material-parser/src/otter-core/types.ts b/packages/material-parser/src/otter-core/types.ts new file mode 100644 index 000000000..de5a8621b --- /dev/null +++ b/packages/material-parser/src/otter-core/types.ts @@ -0,0 +1,40 @@ +import { IBasicSchema } from './schema/types'; + +/** + * + * @export + * @interface IOtterErrorOptions + */ +export interface IOtterErrorOptions { + url?: string; + version?: string; +} + +/** + * 组件集合 + * + * @export + * @interface IComponents + */ +export interface IComponents { + [componentPackage: string]: { + // 组件包名称 + [componentName: string]: any; // 组件 + }; +} + +/** + * 渲染引擎的输入 + * 编排引擎、渲染引擎使用 + * + * @export + * @interface IRenderInputData + */ +export interface IRenderInputData { + schema: IBasicSchema; + components: IComponents; + options?: { + domId?: string; + propsHooks?: { [propName: string]: any }; + }; +} diff --git a/packages/material-parser/src/parser/BaseParser.ts b/packages/material-parser/src/parser/BaseParser.ts new file mode 100644 index 000000000..baf292875 --- /dev/null +++ b/packages/material-parser/src/parser/BaseParser.ts @@ -0,0 +1,76 @@ +import { OtterError } from '../otter-core'; +import { + EcologyType, + IMaterializeOptions, + IMaterialParsedModel, + IMaterialScanModel, + IParser, + SourceType, +} from '../types'; + +/** + * 解析器基类 + * @abstract + * @class BaseParser + * @implements {IParser} + */ +abstract class BaseParser implements IParser { + /** + * 识别语法生态,判断是 react、vue、rax + * @static + * @param {IMaterializeOptions} options + * @returns {Promise} + * @memberof BaseParser + */ + public static recognizeEcology( + options: IMaterializeOptions, + ): Promise { + // TODO 识别物料组件生态 + return Promise.resolve(EcologyType.REACT); + } + + private options: IMaterializeOptions; + + constructor(options: IMaterializeOptions) { + this.options = options; + } + + public async parse( + model: IMaterialScanModel, + ): Promise { + const results: IMaterialParsedModel[] = []; + switch (model.sourceType) { + case SourceType.MODULE: { + for (const item of model.modules) { + const parsedModel: IMaterialParsedModel = await this.parseES6({ + model, + filePath: item.filePath, + fileContent: item.fileContent, + }); + results.push(parsedModel); + } + break; + } + case SourceType.MAIN: { + this.parseES5(model); + break; + } + default: { + throw new OtterError(`Unsupported SourceType [${model.sourceType}]`); + } + } + return results; + } + + public abstract parseES5( + model: IMaterialScanModel, + ): Promise; + + public abstract parseES6(params: { + model: IMaterialScanModel; + filePath: string; + fileContent: string; + }): Promise; +} + +export default BaseParser; diff --git a/packages/material-parser/src/parser/ReactParser.ts b/packages/material-parser/src/parser/ReactParser.ts new file mode 100644 index 000000000..8548b0bc8 --- /dev/null +++ b/packages/material-parser/src/parser/ReactParser.ts @@ -0,0 +1,962 @@ +import { CodeGenerator } from '@babel/generator'; +import { parse } from '@babel/parser'; +import traverse from '@babel/traverse'; +import * as t from '@babel/types'; +import { debug } from '../otter-core'; +import { IMaterialParsedModel, IMaterialScanModel, SourceType } from '../types'; +import BaseParser from './BaseParser'; + +const log = debug.extend('mat'); + +/** + * 解析 react 生态下的组件 + * + * @class ReactParser + * @extends {BaseParser} + */ +class ReactParser extends BaseParser { + /** + * 解析 ExportStatement + * @static + * @returns {Promise} + * @memberof ReactParser + */ + public static async parseExportedStatement( + fileContent: string, + sourceType: string, + ): Promise< + Array<{ + localName: string; + exportedName: string; + source: string; + }> + > { + const ast = await parse(fileContent, { + sourceType: sourceType === SourceType.MODULE ? 'module' : 'script', + plugins: ['jsx'], + }); + + const specifiers: any = []; + + // 组装 localName 和 exportedName + traverse(ast, { + enter(path) { + if (t.isExportNamedDeclaration(path.node)) { + path.node.specifiers.forEach(spec => { + if (t.isExportSpecifier(spec)) { + const source = (path.node as t.ExportNamedDeclaration).source; + specifiers.push({ + localName: spec.local.name, + exportedName: spec.exported.name, + source: t.isLiteral(source) ? (source as any).value : '', + }); + } + }); + } + }, + }); + // 组装 source + traverse(ast, { + enter(path) { + if (t.isImportDeclaration(path.node)) { + const source = path.node.source; + path.node.specifiers.forEach(spec => { + if (t.isImportDefaultSpecifier(spec)) { + const target = specifiers.find( + (inner: any) => inner.localName === spec.local.name, + ); + if (target) { + target.source = source.value; + } + } + }); + } + }, + }); + debug('specifiers', specifiers); + return specifiers; + } + + public async parseES5( + model: IMaterialScanModel, + ): Promise { + const parsedModel: IMaterialParsedModel = { + filePath: '', + defaultExportName: '', + componentNames: [], + importModules: [], + exportModules: [], + subModules: [], + propsTypes: [], + propsDefaults: [], + }; + + const mainEntryItem: any = model.modules.find( + item => item.filePath === model.mainEntry, + ); + // log('mainEntryItem', mainEntryItem); + const ast = await parse(mainEntryItem.file, { + sourceType: 'script', + plugins: ['jsx'], + }); + + // 获取 defaultExportName + traverse(ast, { + enter(path) { + if (t.isExpressionStatement(path.node)) { + if ( + t.isAssignmentExpression(path.node.expression) && + t.isMemberExpression(path.node.expression.left) && + t.isIdentifier(path.node.expression.left.object) && + t.isIdentifier(path.node.expression.right) && + path.node.expression.left.object.name === 'exports' && + (path.node.expression.left.property.name === 'default' || + path.node.expression.left.property.value === 'default') + ) { + // 支持 export default Demo 写法 + const tempVarName = path.node.expression.right.name; + let defaultExportName = ''; + traverse(ast, { + enter(innerPath) { + if ( + t.isVariableDeclaration(innerPath.node) && + Array.isArray(innerPath.node.declarations) && + innerPath.node.declarations.length && + t.isVariableDeclarator(innerPath.node.declarations[0]) && + t.isIdentifier(innerPath.node.declarations[0].id) && + innerPath.node.declarations[0].id.name === tempVarName && + t.isIdentifier(innerPath.node.declarations[0].init) + ) { + defaultExportName = innerPath.node.declarations[0].init.name; + } + }, + }); + parsedModel.defaultExportName = defaultExportName; + log('isIdentifier defaultExportName', defaultExportName); + } + } + }, + }); + + traverse(ast, { + enter(path) { + // 获取 componentNames + if (t.isVariableDeclaration(path.node)) { + if ( + t.isVariableDeclarator(path.node.declarations) && + t.isIdentifier(path.node.declarations.init) && + t.isIdentifier(path.node.declarations.id) + ) { + const exportedName = path.node.declarations.init.name; + const localName = path.node.declarations.id.name; + log('isIdentifier componentNames', exportedName); + parsedModel.componentNames.push({ + exportedName, + localName, + }); + } + } + // 获取 exportModules + if (t.isExpressionStatement(path.node)) { + // 对应 export function DemoFunc() {} 或 export { DemoFunc } 写法 + if ( + t.isAssignmentExpression(path.node.expression) && + t.isMemberExpression(path.node.expression.left) && + t.isIdentifier(path.node.expression.left.object) && + t.isIdentifier(path.node.expression.left.property) && + t.isIdentifier(path.node.expression.right) && + path.node.expression.left.object.name === 'exports' + ) { + const exportedName = path.node.expression.left.property.name; + const localName = path.node.expression.right.name; + parsedModel.exportModules.push({ + exportedName: + exportedName === 'default' + ? parsedModel.defaultExportName + : exportedName, + localName: + exportedName === 'default' + ? parsedModel.defaultExportName + : localName, + }); + } + // 支持 export { default as DemoFunc } from './DemoFunc' 写法 + if ( + t.isCallExpression(path.node.expression) && + t.isMemberExpression(path.node.expression.callee) && + t.isIdentifier(path.node.expression.callee.object) && + t.isIdentifier(path.node.expression.callee.property) && + path.node.expression.callee.object.name === 'Object' && + path.node.expression.callee.property.name === 'defineProperty' && + Array.isArray(path.node.expression.arguments) && + t.isIdentifier(path.node.expression.arguments[0]) && + (path.node.expression.arguments[0] as t.Identifier).name === + 'exports' && + t.isLiteral(path.node.expression.arguments[1]) + ) { + // 对应 export function DemoFunc() {} 或 export { DemoFunc } 写法 + const args = path.node.expression.arguments as any; + const funcName = args[1].value; + if (funcName !== '__esModule') { + parsedModel.exportModules.push({ + exportedName: funcName, + localName: funcName, + }); + } + } + } + // 获取 importModules + if ( + t.isVariableDeclaration(path.node) && + Array.isArray(path.node.declarations) && + path.node.declarations.length + ) { + path.node.declarations.forEach(dec => { + // 支持 import Demo from './demo' 写法 + if ( + t.isVariableDeclarator(dec) && + t.isIdentifier(dec.id) && + t.isCallExpression(dec.init) && + t.isIdentifier(dec.init.callee) && + ['_interopRequireWildcard', '_interopRequireDefault'].includes( + dec.init.callee.name, + ) && + // dec.init.callee.name === '_interopRequireWildcard' && + Array.isArray(dec.init.arguments) && + t.isCallExpression(dec.init.arguments[0]) && + t.isIdentifier( + (dec.init.arguments[0] as t.CallExpression).callee, + ) && + ((dec.init.arguments[0] as t.CallExpression) + .callee as t.Identifier).name === 'require' + ) { + const localName = dec.id.name; + const args = (dec.init.arguments[0] as t.CallExpression) + .arguments as any; + const source = args[0].value; + parsedModel.importModules.push({ + importDefaultName: localName, + localName, + source, + }); + } + + // 支持 import { Demo as Demo2 } from './demo' 写法 + if ( + t.isVariableDeclarator(dec) && + t.isIdentifier(dec.id) && + t.isCallExpression(dec.init) && + t.isIdentifier(dec.init.callee) && + dec.init.callee.name === 'require' && + Array.isArray(dec.init.arguments) && + t.isLiteral(dec.init.arguments[0]) + ) { + const args = dec.init.arguments as any; + const source = args[0].value; + const importName = dec.id.name; + const localName = dec.id.name; + // 遍历查找出 importName 和 localName + // ES5 本身并不支持按需加载,故 import 都是全量导入 + // 但如果使用了诸如:babel-plugin-import 等插件,会自动更改编译之后的 ES5 代码 + parsedModel.importModules.push({ + importName, + localName, + source, + }); + } + }); + } + + // 获取 subModules + if ( + t.isExpressionStatement(path.node) && + t.isAssignmentExpression(path.node.expression) && + t.isMemberExpression(path.node.expression.left) + ) { + if ( + t.isIdentifier(path.node.expression.left.object) && + path.node.expression.left.object.name === + parsedModel.defaultExportName + ) { + // 支持 SFC.SubDemo1 = SubDemo1; 写法 + if (t.isIdentifier(path.node.expression.right)) { + parsedModel.subModules.push({ + objectName: [path.node.expression.left.object.name], + propertyName: path.node.expression.left.property.name, + isValueAnonymousFunc: false, + value: path.node.expression.right.name, + }); + } + + // 支持 SFC.SubDemo2 = function() {}; 写法 + if (t.isFunctionExpression(path.node.expression.right)) { + const rightID = path.node.expression.right.id as any; + parsedModel.subModules.push({ + objectName: [path.node.expression.left.object.name], + propertyName: path.node.expression.left.property.name, + isValueAnonymousFunc: !rightID, + value: rightID ? rightID.name : undefined, + }); + } + } + + if (t.isMemberExpression(path.node.expression.left.object)) { + if (t.isIdentifier(path.node.expression.right)) { + // 支持 DemoFunc4.Test.Obj2 = Obj3; 写法 + const tempLeftObject = path.node.expression.left.object as any; + parsedModel.subModules.push({ + objectName: [ + tempLeftObject.object.name, + tempLeftObject.property.name, + ], + propertyName: path.node.expression.left.property.name, + isValueAnonymousFunc: false, + value: path.node.expression.right.name, + }); + } + if (t.isFunctionExpression(path.node.expression.right)) { + // 支持 DemoFunc4.Test.Obj2 = function() {}; 写法 + const rightID = path.node.expression.right.id as any; + const tempLeftObject = path.node.expression.left.object as any; + parsedModel.subModules.push({ + objectName: [ + tempLeftObject.object.name, + tempLeftObject.property.name, + ], + propertyName: path.node.expression.left.property.name, + isValueAnonymousFunc: !rightID, + value: rightID ? rightID.name : undefined, + }); + } + } + } + + // 获取 propsTypes 和 defaultProps + if ( + t.isExpressionStatement(path.node) && + t.isAssignmentExpression(path.node.expression) && + t.isMemberExpression(path.node.expression.left) && + t.isObjectExpression(path.node.expression.right) && + t.isIdentifier(path.node.expression.left.object) && + t.isIdentifier(path.node.expression.left.property) && + path.node.expression.left.object.name === + parsedModel.defaultExportName && + ['propTypes', 'defaultProps'].includes( + path.node.expression.left.property.name, + ) + ) { + // 处理 propTypes + if (path.node.expression.left.property.name === 'propTypes') { + path.node.expression.right.properties.forEach(prop => { + if (t.isProperty(prop)) { + if (t.isMemberExpression(prop.value)) { + if (t.isIdentifier(prop.value.object)) { + // 支持 optionalArray: PropTypes.array 写法 + parsedModel.propsTypes.push({ + name: prop.key.name, + type: prop.value.property.name, + required: false, + }); + } + if (t.isMemberExpression(prop.value.object)) { + // 支持 optionalArray: PropTypes.array.isRequired 写法 + parsedModel.propsTypes.push({ + name: prop.key.name, + type: prop.value.object.property.name, + required: + prop.value.object.property.name === 'isRequired', + }); + } + if ( + t.isCallExpression(prop.value.object) && + t.isMemberExpression(prop.value.object.callee) + ) { + // 支持 optionalArray: PropTypes.shape().isRequired 写法 + parsedModel.propsTypes.push({ + name: prop.key.name, + type: prop.value.object.callee.property.name, + required: prop.value.property.name === 'isRequired', + }); + } + } + if ( + t.isCallExpression(prop.value) && + t.isMemberExpression(prop.value.callee) + ) { + // 支持 optionalArray: PropTypes.shape() 写法 + parsedModel.propsTypes.push({ + name: prop.key.name, + type: prop.value.callee.property.name, + required: false, + }); + } + } + }); + } + // 处理 defaultProps + if (path.node.expression.left.property.name === 'defaultProps') { + path.node.expression.right.properties.forEach(prop => { + if (t.isProperty(prop)) { + if (t.isObjectExpression(prop.value)) { + const defaultValue = new CodeGenerator( + t.objectExpression(prop.value.properties), + ).generate().code; + parsedModel.propsDefaults.push({ + name: prop.key.name, + defaultValue, + }); + } + } + }); + } + } + }, + }); + + log('traverse done.'); + log('parsedModel.defaultExportName', parsedModel.defaultExportName); + log('parsedModel.componentNames', parsedModel.componentNames); + log('parsedModel.importModules', parsedModel.importModules); + log('parsedModel.exportModules', parsedModel.exportModules); + log('parsedModel.subModules', parsedModel.subModules); + log('parsedModel.propsTypes', parsedModel.propsTypes); + log('parsedModel.propsDefaults', parsedModel.propsDefaults); + log('parsedModel', parsedModel); + return parsedModel; + } + + public async parseES6(params: { + model: IMaterialScanModel; + filePath: string; + fileContent: string; + }): Promise { + const ast = await parse(params.fileContent, { + sourceType: + params.model.sourceType === SourceType.MODULE ? 'module' : 'script', + plugins: ['jsx'], + }); + + const defaultExportName = await this.parseDefaultExportNameES6(ast); + const componentNames = await this.parseComponentNamesES6(ast); + const importModules = await this.parseImportModulesES6(ast); + const exportModules = await ReactParser.parseExportedStatement( + params.fileContent, + params.model.sourceType, + ); + const subModules = await this.parseSubModulesES6(ast); + const propsTypes = await this.parsePropsTypesES6(ast, defaultExportName); + const propsDefaults = await this.parseDefaultPropsES6( + ast, + defaultExportName, + ); + + return { + filePath: params.filePath, + defaultExportName, + componentNames, + importModules, + exportModules, + subModules, + propsTypes, + propsDefaults, + } as IMaterialParsedModel; + } + + /** + * 解析 AST 获取 defaultExportName + * 支持的写法: + * - export default Demo + * - export default function Demo() {} + * - export default class Demo {} + * + * @private + * @param {*} ast + * @memberof ReactParser + */ + private async parseDefaultExportNameES6(ast: any): Promise { + let defaultExportName = ''; + traverse(ast, { + enter(path) { + // 获取 defaultExportName + if (t.isExportDefaultDeclaration(path.node)) { + if (t.isIdentifier(path.node.declaration)) { + // 支持 export default Demo 写法 + defaultExportName = path.node.declaration.name; + log('isIdentifier defaultExportName', defaultExportName); + } + if (t.isFunctionDeclaration(path.node.declaration)) { + if (t.isIdentifier(path.node.declaration.id)) { + // 支持 export default function Demo() {} 写法 + defaultExportName = path.node.declaration.id.name; + log('isFunctionDeclaration defaultExportName', defaultExportName); + } + } + if (t.isClassDeclaration(path.node.declaration)) { + if (t.isIdentifier(path.node.declaration.id)) { + // 支持 export default class Demo {} 写法 + defaultExportName = path.node.declaration.id.name; + log('isClassDeclaration defaultExportName', defaultExportName); + } + } + if (t.isCallExpression(path.node.declaration)) { + const traverseCallExp: any = (args: any[]) => { + const arg = args[0]; + if (t.isIdentifier(arg)) { + return arg.name; + } + return traverseCallExp(arg.arguments); + }; + defaultExportName = traverseCallExp( + path.node.declaration.arguments, + ); + } + } + }, + }); + return defaultExportName; + } + + /** + * 解析 AST 获取 importModules + * 支持的写法: + * - import Demo from './demo' + * - import { Demo as Demo2 } from './demo' + * - import * as Demo from './demo' + * + * @private + * @param {*} ast + * @returns {Promise>} + * @memberof ReactParser + */ + private async parseImportModulesES6( + ast: any, + ): Promise< + Array<{ + importDefaultName?: string; + importName?: string; + localName: string; + source: string; + }> + > { + const results: any[] = []; + traverse(ast, { + enter(path) { + // 写法支持:import Demo from './demo'; + if (t.isImportDeclaration(path.node)) { + if ( + Array.isArray(path.node.specifiers) && + path.node.specifiers.length + ) { + const source = path.node.source.value; + path.node.specifiers.forEach(spec => { + if (t.isImportDefaultSpecifier(spec)) { + // 支持 import Demo from './demo' 写法 + results.push({ + importDefaultName: spec.local.name, + localName: spec.local.name, + source, + }); + } + if (t.isImportSpecifier(spec)) { + // 支持 import { Demo as Demo2 } from './demo' 写法 + results.push({ + importName: spec.imported.name, + localName: spec.local.name, + source, + }); + } + if (t.isImportNamespaceSpecifier(spec)) { + // 支持 import * as Demo from './demo' 写法 + results.push({ + importName: spec.local.name, + localName: spec.local.name, + source, + }); + } + }); + } + } + }, + }); + return results; + } + + /** + * 解析 AST 获取 componentNames + * + * @private + * @param {*} ast + * @returns {Promise>} + * @memberof ReactParser + */ + private async parseComponentNamesES6( + ast: any, + ): Promise< + Array<{ + exportedName: string; + localName: string; + }> + > { + const results: any[] = []; + traverse(ast, { + enter(path) { + if (t.isFunctionDeclaration(path.node)) { + if (t.isIdentifier(path.node.id)) { + const funcName = path.node.id.name; + debug('isIdentifier componentNames', funcName); + results.push({ + exportedName: funcName, + localName: funcName, + }); + } + } + }, + }); + return results; + } + + /** + * 解析 AST 获取 subModules + * 支持的写法: + * - DemoFunc4.Test = Test; + * - DemoFunc4.Test = function() {}; + * - DemoFunc4.Test.Obj2 = Obj3; + * - DemoFunc4.Test.Obj2 = function() {}; + * + * @private + * @param {*} ast + * @returns {Promise>} + * @memberof ReactParser + */ + private async parseSubModulesES6( + ast: any, + ): Promise< + Array<{ + objectName: string[]; + propertyName: string; + value?: string; + isValueAnonymousFunc: boolean; + }> + > { + const results: any[] = []; + traverse(ast, { + enter(path) { + if (t.isExpressionStatement(path.node)) { + if (t.isAssignmentExpression(path.node.expression)) { + if (t.isMemberExpression(path.node.expression.left)) { + if (t.isIdentifier(path.node.expression.left.object)) { + if (t.isIdentifier(path.node.expression.right)) { + // 支持 DemoFunc4.Test = Test; 写法 + results.push({ + objectName: [path.node.expression.left.object.name], + propertyName: path.node.expression.left.property.name, + isValueAnonymousFunc: false, + value: path.node.expression.right.name, + }); + } + if (t.isFunctionExpression(path.node.expression.right)) { + // 支持 DemoFunc4.Test = function() {}; 写法 + const rightID = !path.node.expression.right.id as any; + results.push({ + objectName: [path.node.expression.left.object.name], + propertyName: path.node.expression.left.property.name, + isValueAnonymousFunc: !!rightID, + value: rightID ? rightID.name : undefined, + }); + } + } + if (t.isMemberExpression(path.node.expression.left.object)) { + if (t.isIdentifier(path.node.expression.right)) { + // 支持 DemoFunc4.Test.Obj2 = Obj3; 写法 + const tempLeftObject = path.node.expression.left + .object as any; + results.push({ + objectName: [ + tempLeftObject.object.name, + tempLeftObject.property.name, + ], + propertyName: path.node.expression.left.property.name, + isValueAnonymousFunc: false, + value: path.node.expression.right.name, + }); + } + if (t.isFunctionExpression(path.node.expression.right)) { + // 支持 DemoFunc4.Test.Obj2 = function() {}; 写法 + const rightID = !path.node.expression.right.id as any; + const tempLeftObject = path.node.expression.left + .object as any; + results.push({ + objectName: [ + tempLeftObject.object.name, + tempLeftObject.property.name, + ], + propertyName: path.node.expression.left.property.name, + isValueAnonymousFunc: !!rightID, + value: rightID ? rightID.name : undefined, + }); + } + } + } + } + } + }, + }); + return results; + } + + /** + * 解析 AST 获取 propsTypes + * 支持的写法: + * - static propTypes = { sth: PropTypes.any.isRequired } + * - Demo.propTypes = {} + * + * @private + * @param {*} ast + * @param {string} defaultExportName + * @returns {Promise>} + * @memberof ReactParser + */ + private async parsePropsTypesES6( + ast: any, + defaultExportName: string, + ): Promise< + Array<{ + name: string; + type: string; + typeRaw?: any; + required: boolean; + }> + > { + const results: any[] = []; + traverse(ast, { + enter(path) { + // 支持 static propTypes = { sth: PropTypes.any.isRequired }; 写法 + if ( + t.isExpressionStatement(path.node) && + t.isCallExpression(path.node.expression) + ) { + const args = path.node.expression.arguments; + if ( + t.isIdentifier(args[0]) && + // args[0].name === defaultExportName && + t.isLiteral(args[1]) && + (args[1] as any).value === 'propTypes' && + t.isObjectExpression(args[2]) + ) { + const properties = (args[2] as t.ObjectExpression).properties; + properties.forEach((prop: any) => { + if (t.isProperty(prop)) { + if (t.isMemberExpression(prop.value)) { + if (t.isIdentifier(prop.value.object)) { + // 支持 optionalArray: PropTypes.array 写法 + results.push({ + name: prop.key.name, + type: prop.value.property.name, + required: false, + }); + } + if (t.isMemberExpression(prop.value.object)) { + // 支持 optionalArray: PropTypes.array.isRequired 写法 + results.push({ + name: prop.key.name, + type: prop.value.object.property.name, + required: + prop.value.object.property.name === 'isRequired', + }); + } + if ( + t.isCallExpression(prop.value.object) && + t.isMemberExpression(prop.value.object.callee) + ) { + // 支持 optionalArray: PropTypes.shape().isRequired 写法 + results.push({ + name: prop.key.name, + type: prop.value.object.callee.property.name, + required: prop.value.property.name === 'isRequired', + }); + } + } + if ( + t.isCallExpression(prop.value) && + t.isMemberExpression(prop.value.callee) + ) { + // 支持 optionalArray: PropTypes.shape() 写法 + results.push({ + name: prop.key.name, + type: prop.value.callee.property.name, + required: false, + }); + } + } + }); + } + } + + // 支持 Demo.propTypes = {}; 写法 + if ( + t.isExpressionStatement(path.node) && + t.isAssignmentExpression(path.node.expression) && + t.isMemberExpression(path.node.expression.left) && + t.isObjectExpression(path.node.expression.right) && + t.isIdentifier(path.node.expression.left.object) && + t.isIdentifier(path.node.expression.left.property) && + path.node.expression.left.object.name === defaultExportName && + ['propTypes'].includes(path.node.expression.left.property.name) + ) { + // 处理 propTypes + path.node.expression.right.properties.forEach(prop => { + if (t.isProperty(prop)) { + if (t.isMemberExpression(prop.value)) { + if (t.isIdentifier(prop.value.object)) { + // 支持 optionalArray: PropTypes.array 写法 + results.push({ + name: prop.key.name, + type: prop.value.property.name, + required: false, + }); + } + if (t.isMemberExpression(prop.value.object)) { + // 支持 optionalArray: PropTypes.array.isRequired 写法 + results.push({ + name: prop.key.name, + type: prop.value.object.property.name, + required: prop.value.object.property.name === 'isRequired', + }); + } + if ( + t.isCallExpression(prop.value.object) && + t.isMemberExpression(prop.value.object.callee) + ) { + // 支持 optionalArray: PropTypes.shape().isRequired 写法 + results.push({ + name: prop.key.name, + type: prop.value.object.callee.property.name, + required: prop.value.property.name === 'isRequired', + }); + } + } + if ( + t.isCallExpression(prop.value) && + t.isMemberExpression(prop.value.callee) + ) { + // 支持 optionalArray: PropTypes.shape() 写法 + results.push({ + name: prop.key.name, + type: prop.value.callee.property.name, + required: false, + }); + } + } + }); + } + }, + }); + return results; + } + + /** + * 解析 AST 获取 defaultProps + * 支持的写法: + * - static defaultProps = {}; + * - Demo.defaultProps = {}; + * + * @private + * @param {*} ast + * @param {string} defaultExportName + * @returns {Promise>} + * @memberof ReactParser + */ + private async parseDefaultPropsES6( + ast: any, + defaultExportName: string, + ): Promise< + Array<{ + name: string; + defaultValue: any; + }> + > { + const results: any[] = []; + traverse(ast, { + enter(path) { + if ( + t.isExpressionStatement(path.node) && + t.isCallExpression(path.node.expression) + ) { + const args = path.node.expression.arguments; + if ( + t.isIdentifier(args[0]) && + // args[0].name === defaultExportName && + t.isLiteral(args[1]) && + (args[1] as any).value === 'defaultProps' && + t.isObjectExpression(args[2]) + ) { + const properties = (args[2] as t.ObjectExpression).properties; + properties.forEach((prop: any) => { + if (t.isProperty(prop)) { + if (t.isObjectExpression(prop.value)) { + const defaultValue = new CodeGenerator( + t.objectExpression(prop.value.properties), + ).generate().code; + results.push({ + name: prop.key.name, + defaultValue, + }); + } + } + }); + } + } + + if ( + t.isExpressionStatement(path.node) && + t.isAssignmentExpression(path.node.expression) && + t.isMemberExpression(path.node.expression.left) && + t.isObjectExpression(path.node.expression.right) && + t.isIdentifier(path.node.expression.left.object) && + t.isIdentifier(path.node.expression.left.property) && + path.node.expression.left.object.name === defaultExportName && + ['defaultProps'].includes(path.node.expression.left.property.name) + ) { + // 处理 defaultProps + path.node.expression.right.properties.forEach(prop => { + if (t.isProperty(prop)) { + if (t.isObjectExpression(prop.value)) { + const defaultValue = new CodeGenerator( + t.objectExpression(prop.value.properties), + ).generate().code; + results.push({ + name: prop.key.name, + defaultValue, + }); + } + } + }); + } + }, + }); + return results; + } +} + +export default ReactParser; diff --git a/packages/material-parser/src/scanner/Scanner.ts b/packages/material-parser/src/scanner/Scanner.ts new file mode 100644 index 000000000..98ef329e3 --- /dev/null +++ b/packages/material-parser/src/scanner/Scanner.ts @@ -0,0 +1,169 @@ +import { pathExists, readFile, statSync } from 'fs-extra'; +import { dirname, join } from 'path'; +import { debug } from '../otter-core'; +import BaseParser from '../parser/BaseParser'; +import ReactParser from '../parser/ReactParser'; +import { + IMaterializeOptions, + IMaterialScanModel, + IScanner, + SourceType, +} from '../types'; + +const log = debug.extend('mat'); + +/** + * 文件扫描器 + * + * @class Scanner + * @implements {IScanner} + */ +class Scanner implements IScanner { + public options: IMaterializeOptions; + + constructor(options: IMaterializeOptions) { + this.options = options; + } + + public async scan(): Promise { + const model: IMaterialScanModel = { + pkgName: '', + pkgVersion: '', + mainEntry: '', + sourceType: SourceType.MODULE, + modules: [], + }; + const options = this.options; + log('options', options); + // 入口文件路径 + let entryFilePath = null; + const cwd = options.cwd ? options.cwd : ''; + const entry = options.entry; + const isDepsMode = cwd !== entry; + const pkgJsonPath = join(cwd, 'package.json'); + // 判断是否存在 package.json + if (!(await pathExists(pkgJsonPath))) { + throw new Error(`Cannot find package.json. ${pkgJsonPath}`); + } + // 读取 package.json + let pkgJson = await this.resolvePkgJson(pkgJsonPath); + model.pkgName = pkgJson.name; + model.pkgVersion = pkgJson.version; + if (isDepsMode) { + pkgJson = await this.resolvePkgJson(join(entry, 'package.json')); + } + if (pkgJson.module) { + // 支持 es module + model.sourceType = SourceType.MODULE; + entryFilePath = pkgJson.module; + } else if (pkgJson.main) { + // 支持 commonjs + model.sourceType = SourceType.MAIN; + entryFilePath = pkgJson.main; + } else { + entryFilePath = './index.js'; + } + entryFilePath = join(isDepsMode ? entry : cwd, entryFilePath); + log('entryFilePath', entryFilePath); + const entryFile = await this.loadFile(entryFilePath); + log('entryFile', entryFile); + model.mainEntry = entryFilePath; + // 记录入口文件 + model.modules.push({ + filePath: entryFilePath, + fileContent: entryFile, + }); + log('model', model); + if (options.isExportedAsMultiple) { + // 解析 entryFile,提取出 export 语句 + const modules = await this.parseEntryFile({ + entryFile, + entryFilePath, + sourceType: model.sourceType, + }); + model.modules.push(...modules); + } + log('model', model); + return model; + } + + /** + * 判断是否为文件夹 + * @param {string} filePath 文件路径 + * @returns {Promise} + * @memberof LocalScanner + */ + public async isDirectory(filePath: string): Promise { + log('materialIn', 'isDirectory - filePath', filePath); + const stats = statSync(filePath); + return stats.isDirectory(); + } + + public async loadFile(filePath: string): Promise { + const content: string | Buffer = await readFile(filePath); + if (typeof content === 'string') { + return content; + } + return content.toString(); + } + + public async resolvePkgJson( + pkgJsonPath: string, + ): Promise<{ [k: string]: any }> { + const content = await this.loadFile(pkgJsonPath); + const json = JSON.parse(content); + return json; + } + + /** + * 解析入口文件,获取要导出的模块内容 + * @private + * @param {{ + * entryFile: string; + * entryFilePath: string; + * sourceType: string; + * }} params + * @returns {Promise} + * @memberof LocalScanner + */ + private async parseEntryFile(params: { + entryFile: string; + entryFilePath: string; + sourceType: string; + }): Promise { + const modules: any = []; + const entryFileDirName = dirname(params.entryFilePath); + const ecology = await BaseParser.recognizeEcology(this.options); + if (ecology === 'react') { + const exportedList = await ReactParser.parseExportedStatement( + params.entryFile, + params.sourceType, + ); + if (Array.isArray(exportedList)) { + for (const item of exportedList) { + if (item.source && item.source.length) { + try { + let filePath = join(entryFileDirName, item.source); + if (await this.isDirectory(filePath)) { + filePath = join(filePath, 'index.js'); + } else { + filePath = join(filePath, '.js'); + } + debug('filePath', filePath); + modules.push({ + filePath, + fileContent: await this.loadFile(filePath), + }); + } catch (e) { + debug('error', 'parseEntryFile', e.message); + } + } + } + } + } + debug('modules', modules); + return modules; + } +} + +export default Scanner; diff --git a/packages/material-parser/src/types/ChannelType.ts b/packages/material-parser/src/types/ChannelType.ts new file mode 100644 index 000000000..90c12050c --- /dev/null +++ b/packages/material-parser/src/types/ChannelType.ts @@ -0,0 +1,11 @@ +/** + * 物料接入渠道 + */ +enum ChannelType { + /** 本地 */ + LOCAL = 'local', + /** 在线 */ + ONLINE = 'online', +} + +export default ChannelType; diff --git a/packages/material-parser/src/types/EcologyType.ts b/packages/material-parser/src/types/EcologyType.ts new file mode 100644 index 000000000..c13a55f31 --- /dev/null +++ b/packages/material-parser/src/types/EcologyType.ts @@ -0,0 +1,15 @@ +/** + * 语法生态 + */ +enum EcologyType { + /** react 生态 */ + REACT = 'react', + /** vue 生态 */ + VUE = 'vue', + /** rax 生态 */ + RAX = 'rax', + /** angular 生态 */ + ANGULAR = 'angular', +} + +export default EcologyType; diff --git a/packages/material-parser/src/types/ExtensionName.ts b/packages/material-parser/src/types/ExtensionName.ts new file mode 100644 index 000000000..f5d9c3e88 --- /dev/null +++ b/packages/material-parser/src/types/ExtensionName.ts @@ -0,0 +1,17 @@ +/** + * 扩展点名称 + */ +enum ExtensionName { + /** 加载物料 */ + LOADMATERIALS = 'mat:load:materials', + /** 配置 manifest */ + CONFIGMANIFEST = 'mat:config:manifest', + /** 获取打包后的 bundle */ + BUILDBUNDLE = 'mat:build:bundle', + /** 配置 containerJS */ + CONFIGCONTAINER = 'mat:config:container', + /** 生成 buildJS */ + GENERATEBUILDJS = 'mat:generate:buildjs', +} + +export default ExtensionName; diff --git a/packages/material-parser/src/types/IAccesser.ts b/packages/material-parser/src/types/IAccesser.ts new file mode 100644 index 000000000..dd3a673a2 --- /dev/null +++ b/packages/material-parser/src/types/IAccesser.ts @@ -0,0 +1,16 @@ +import { IMaterialinSchema } from '../otter-core'; + +/** + * 接入器接口(用于定义物料化组件的接入渠道) + * @interface IAccesser + */ +interface IAccesser { + /** + * 接入 + * @returns {Promise} + * @memberof IAccesser + */ + access(): Promise; +} + +export default IAccesser; diff --git a/packages/material-parser/src/types/ICompiler.ts b/packages/material-parser/src/types/ICompiler.ts new file mode 100644 index 000000000..30835573e --- /dev/null +++ b/packages/material-parser/src/types/ICompiler.ts @@ -0,0 +1,15 @@ +/** + * 编译器 - 用于编译并打包生成 bundle.js + * @interface ICompiler + */ +interface ICompiler { + /** + * 编译 + * @param {{ [key: string]: any }} config webpack 配置文件 + * @returns {Promise} + * @memberof ICompiler + */ + compile(config: { [key: string]: any }): Promise; +} + +export default ICompiler; diff --git a/packages/material-parser/src/types/IExtensionBuildBundle.ts b/packages/material-parser/src/types/IExtensionBuildBundle.ts new file mode 100644 index 000000000..b063f5cf7 --- /dev/null +++ b/packages/material-parser/src/types/IExtensionBuildBundle.ts @@ -0,0 +1,10 @@ +/** + * 扩展点:获取打包后的 bundle 文件 + * (物料化场景) + */ +type IExtensionBuildBundle = (params: { + bundleJS: string; // bundle 文件内容 + bundleObj: { [key: string]: any }; // bundle 对象 +}) => Promise; + +export default IExtensionBuildBundle; diff --git a/packages/material-parser/src/types/IExtensionConfigContainer.ts b/packages/material-parser/src/types/IExtensionConfigContainer.ts new file mode 100644 index 000000000..50b273efd --- /dev/null +++ b/packages/material-parser/src/types/IExtensionConfigContainer.ts @@ -0,0 +1,13 @@ +/** + * 扩展点:配置 container + * (物料化场景) + */ +type IExtensionConfigContainer = (params: { + filePath: string; // container 文件默认路径 + fileContent: string; // container 文件内容 +}) => Promise<{ + filePath: string; + fileContent: string; +}>; + +export default IExtensionConfigContainer; diff --git a/packages/material-parser/src/types/IExtensionConfigManifest.ts b/packages/material-parser/src/types/IExtensionConfigManifest.ts new file mode 100644 index 000000000..01ba0df08 --- /dev/null +++ b/packages/material-parser/src/types/IExtensionConfigManifest.ts @@ -0,0 +1,15 @@ +import { IMaterialinManifest } from '../otter-core'; +/** + * 扩展点:配置 manifest + * (物料化场景) + */ +type IExtensionConfigManifest = (params: { + manifestObj: IMaterialinManifest; // manifest 配置对象 + manifestFilePath: string; // manifest 文件默认路径 +}) => Promise<{ + manifestJS: string; // manifest 文件内容 + manifestFilePath: string; // manifest 文件路径 + manifestObj: IMaterialinManifest; // manifest 文件对象 +}>; + +export default IExtensionConfigManifest; diff --git a/packages/material-parser/src/types/IExtensionGenerateBuildJS.ts b/packages/material-parser/src/types/IExtensionGenerateBuildJS.ts new file mode 100644 index 000000000..3fc7f5704 --- /dev/null +++ b/packages/material-parser/src/types/IExtensionGenerateBuildJS.ts @@ -0,0 +1,13 @@ +/** + * 扩展点:生成 build 文件 + * (物料化场景) + */ +type IExtensionGenerateBuildJS = (params: { + buildFilePath: string; // 文件默认路径 + buildFileContent: string; // 文件内容 +}) => Promise<{ + buildFilePath: string; + buildFileContent: string; +}>; + +export default IExtensionGenerateBuildJS; diff --git a/packages/material-parser/src/types/IExtensionLoadMaterials.ts b/packages/material-parser/src/types/IExtensionLoadMaterials.ts new file mode 100644 index 000000000..ab6653d01 --- /dev/null +++ b/packages/material-parser/src/types/IExtensionLoadMaterials.ts @@ -0,0 +1,12 @@ +import { IMaterialinSchema } from '../otter-core'; + +/** + * 扩展点:加载物料(物料接入场景) + * + * @interface IExtensionLoadMaterials + */ +type IExtensionLoadMaterials = ( + pkgNameList: string[], +) => Promise; + +export default IExtensionLoadMaterials; diff --git a/packages/material-parser/src/types/IGenerator.ts b/packages/material-parser/src/types/IGenerator.ts new file mode 100644 index 000000000..641c0b1b6 --- /dev/null +++ b/packages/material-parser/src/types/IGenerator.ts @@ -0,0 +1,20 @@ +import { IMaterialinSchema } from '../otter-core'; +import IMaterialParsedModel from './IMaterialParsedModel'; +import IMaterialScanModel from './IMaterialScanModel'; + +/** + * 生成器 + */ +export default interface IGenerator { + /** + * 根据前面两阶段的产物生成最终编排引擎需要的物料 + * @param {IMaterialScanModel} matScanModel 对应扫描阶段产物 + * @param {IMaterialParsedModel[]} matParsedModels 对应解析阶段产物 + * @returns {Promise} + * @memberof IGenerator + */ + generate( + matScanModel: IMaterialScanModel, + matParsedModels: IMaterialParsedModel[], + ): Promise; +} diff --git a/packages/material-parser/src/types/IMaterialInOptions.ts b/packages/material-parser/src/types/IMaterialInOptions.ts new file mode 100644 index 000000000..cf6151b0e --- /dev/null +++ b/packages/material-parser/src/types/IMaterialInOptions.ts @@ -0,0 +1,23 @@ +import ExtensionName from './ExtensionName'; +import IExtensionLoadMaterials from './IExtensionLoadMaterials'; + +interface IMaterialInOptions { + /** + * 配置从哪些 CDN 加载组件 + * (当 channel=online 时生效) + * 形如: + * https://unpkg.alibaba-inc.com/ + * https://unpkg.com/ + * https://cdn.jsdelivr.net/npm/ + */ + cdn?: string[]; + + /** + * 扩展点 + */ + extensions?: { + [ExtensionName.LOADMATERIALS]?: IExtensionLoadMaterials; + }; +} + +export default IMaterialInOptions; diff --git a/packages/material-parser/src/types/IMaterialParsedModel.ts b/packages/material-parser/src/types/IMaterialParsedModel.ts new file mode 100644 index 000000000..be0738d2d --- /dev/null +++ b/packages/material-parser/src/types/IMaterialParsedModel.ts @@ -0,0 +1,45 @@ +/** + * 对应解析器分析出的一些关键信息 + */ +interface IMaterialParsedModel { + filePath: string; + defaultExportName: string; + componentNames: Array<{ + exportedName: string; + localName: string; + source?: string; + }>; + importModules: Array<{ + importDefaultName?: string; + importName?: string; + localName?: string; + source: string; + }>; + exportModules: Array<{ + exportedName: string; + localName: string; + source?: string; + }>; + /** + * 子模块,形如:Demo.SubModule = value; 或者 Demo.SubModule.Sub = subValue; + */ + subModules: Array<{ + objectName: string[]; + propertyName: string; + value?: string; + // value 是否对应匿名函数 + isValueAnonymousFunc: boolean; + }>; + propsTypes: Array<{ + name: string; + type: string; + typeRaw?: any; + required: boolean; + }>; + propsDefaults: Array<{ + name: string; + defaultValue: any; + }>; +} + +export default IMaterialParsedModel; diff --git a/packages/material-parser/src/types/IMaterialScanModel.ts b/packages/material-parser/src/types/IMaterialScanModel.ts new file mode 100644 index 000000000..5e9b1551c --- /dev/null +++ b/packages/material-parser/src/types/IMaterialScanModel.ts @@ -0,0 +1,20 @@ +/** + * 对应扫描阶段的产物 + */ +interface IMaterialScanModel { + /** 入口文件地址 */ + mainEntry: string; + /** 标记物料组件包所使用的模块规范 */ + sourceType: 'module' | 'main'; + /** 每个文件对应的文件内容 */ + modules: Array<{ + filePath: string; + fileContent: string; + }>; + /** 当前包名 */ + pkgName: string; + /** 当前包版本 */ + pkgVersion: string; +} + +export default IMaterialScanModel; diff --git a/packages/material-parser/src/types/IMaterializeOptions.ts b/packages/material-parser/src/types/IMaterializeOptions.ts new file mode 100644 index 000000000..37790eeaf --- /dev/null +++ b/packages/material-parser/src/types/IMaterializeOptions.ts @@ -0,0 +1,59 @@ +import ExtensionName from './ExtensionName'; +import IExtensionBuildBundle from './IExtensionBuildBundle'; +import IExtensionConfigContainer from './IExtensionConfigContainer'; +import IExtensionConfigManifest from './IExtensionConfigManifest'; +import IExtensionGenerateBuildJS from './IExtensionGenerateBuildJS'; + +/** + * 物料化配置项 + * @interface IMaterializeOptions + */ +interface IMaterializeOptions { + /** + * 入口文件路径或包名 + * 形如: + * 本地路径:/usr/project/src/container/DemoMaterial + * 包名:@ali/demo-material@0.0.1 + */ + entry: string; + + /** + * 接入渠道 + * (local:表示本地物料工作台方式接入,online:表示在线 npm 包接入) + * @type {('local' | 'online')} + * @memberof IMaterializeOptions + */ + accesser: 'local' | 'online'; + + /** + * 是否为多组件透出场景 + * (true:表示多组件透出场景,false:表示单组件透出场景) + * @type {boolean} + * @memberof IMaterializeOptions + */ + isExportedAsMultiple: boolean; + + /** + * 当 accesser=local 时,需要通过此配置项指定当前工作目录,形如:/usr/.../demo-project + * @type {string} + * @memberof IMaterializeOptions + */ + cwd?: string; + + /** + * 扩展点 + */ + extensions?: { + [ExtensionName.CONFIGMANIFEST]?: IExtensionConfigManifest; + [ExtensionName.CONFIGCONTAINER]?: IExtensionConfigContainer; + [ExtensionName.BUILDBUNDLE]?: IExtensionBuildBundle; + [ExtensionName.GENERATEBUILDJS]?: IExtensionGenerateBuildJS; + }; + + /** + * 当 accesser=online 时,配置要使用的 npm client,如:tnpm、cnpm、yarn、npm + */ + npmClient?: string; +} + +export default IMaterializeOptions; diff --git a/packages/material-parser/src/types/IParser.ts b/packages/material-parser/src/types/IParser.ts new file mode 100644 index 000000000..2c72ed208 --- /dev/null +++ b/packages/material-parser/src/types/IParser.ts @@ -0,0 +1,42 @@ +import IMaterialParsedModel from './IMaterialParsedModel'; +import IMaterialScanModel from './IMaterialScanModel'; + +/** + * 解析器 + * @interface IParser + */ +interface IParser { + /** + * 根据 IScanner 阶段的产出结果,解析对文件内容进行 AST 解析 + * @param {IMaterialScanModel} model IScanner 阶段的产出结果 + * @returns {Promise} + * @memberof IParser + */ + parse(model: IMaterialScanModel): Promise; + + /** + * 解析 ES5 语法 + * @param {IMaterialScanModel} model + * @returns {Promise} + * @memberof IParser + */ + parseES5(model: IMaterialScanModel): Promise; + + /** + * 解析 ESM 语法 + * @param {{ + * model: IMaterialScanModel, + * filePath: string, // 要解析的文件路径 + * fileContent: string // 要解析的文件内容 + * }} params + * @returns {Promise} + * @memberof IParser + */ + parseES6(params: { + model: IMaterialScanModel; + filePath: string; + fileContent: string; + }): Promise; +} + +export default IParser; diff --git a/packages/material-parser/src/types/IScanner.ts b/packages/material-parser/src/types/IScanner.ts new file mode 100644 index 000000000..2c10eda17 --- /dev/null +++ b/packages/material-parser/src/types/IScanner.ts @@ -0,0 +1,32 @@ +import IMaterialScanModel from './IMaterialScanModel'; + +/** + * 扫描器接口 + * @interface IScanner + */ +interface IScanner { + /** + * 扫描 + * @returns {Promise} 扫描产物 + * @memberof IScanner + */ + scan(): Promise; + + /** + * 加载文件 + * @param {string} filePath 文件地址 + * @returns {Promise} 返回文件内容 + * @memberof IScanner + */ + loadFile(filePath: string): Promise; + + /** + * 解析 package.json 文件 + * @param {string} pkgJsonPath 文件路径 + * @returns {Promise<{ [k: string]: any }>} package 文件信息 + * @memberof IScanner + */ + resolvePkgJson(pkgJsonPath: string): Promise<{ [k: string]: any }>; +} + +export default IScanner; diff --git a/packages/material-parser/src/types/SourceType.ts b/packages/material-parser/src/types/SourceType.ts new file mode 100644 index 000000000..f9a69cb81 --- /dev/null +++ b/packages/material-parser/src/types/SourceType.ts @@ -0,0 +1,11 @@ +/** + * 物料组件支持的模块规范 + */ +enum SourceType { + /** ES6 规范 */ + MODULE = 'module', + /** CommonJS 规范 */ + MAIN = 'main', +} + +export default SourceType; diff --git a/packages/material-parser/src/types/index.ts b/packages/material-parser/src/types/index.ts new file mode 100644 index 000000000..ae69c3834 --- /dev/null +++ b/packages/material-parser/src/types/index.ts @@ -0,0 +1,37 @@ +import ChannelType from './ChannelType'; +import EcologyType from './EcologyType'; +import ExtensionName from './ExtensionName'; +import IAccesser from './IAccesser'; +import ICompiler from './ICompiler'; +import IExtensionBuildBundle from './IExtensionBuildBundle'; +import IExtensionConfigContainer from './IExtensionConfigContainer'; +import IExtensionConfigManifest from './IExtensionConfigManifest'; +import IExtensionLoadMaterials from './IExtensionLoadMaterials'; +import IGenerator from './IGenerator'; +import IMaterialInOptions from './IMaterialInOptions'; +import IMaterializeOptions from './IMaterializeOptions'; +import IMaterialParsedModel from './IMaterialParsedModel'; +import IMaterialScanModel from './IMaterialScanModel'; +import IParser from './IParser'; +import IScanner from './IScanner'; +import SourceType from './SourceType'; + +export { + IGenerator, + IParser, + IScanner, + ExtensionName, + IExtensionConfigManifest, + IExtensionConfigContainer, + IExtensionLoadMaterials, + IExtensionBuildBundle, + IMaterialInOptions, + IMaterializeOptions, + IMaterialScanModel, + IMaterialParsedModel, + SourceType, + ChannelType, + EcologyType, + IAccesser, + ICompiler, +}; diff --git a/packages/material-parser/src/validate.ts b/packages/material-parser/src/validate/index.ts similarity index 100% rename from packages/material-parser/src/validate.ts rename to packages/material-parser/src/validate/index.ts diff --git a/packages/material-parser/src/schema.json b/packages/material-parser/src/validate/schema.json similarity index 100% rename from packages/material-parser/src/schema.json rename to packages/material-parser/src/validate/schema.json diff --git a/packages/material-parser/test/Materialize.ts b/packages/material-parser/test/Materialize.ts new file mode 100644 index 000000000..f078a46f3 --- /dev/null +++ b/packages/material-parser/test/Materialize.ts @@ -0,0 +1,63 @@ +import test from 'ava'; +import Materialize from '../src/Materialize'; +import { IMaterializeOptions } from '../src/types'; +import { getFromFixtures } from './helpers'; + +const multiExportedComptPath = getFromFixtures('multiple-exported-component'); +const singleExportedComptPath = getFromFixtures('single-exported-component'); +const singleExportedComponent = '@ali/demo-biz-test090702@0.0.2'; +const multipleExportedComponent = '@ali/aimake-basic@0.1.0'; + +test('materialize single exported component by local', async t => { + const options: IMaterializeOptions = { + cwd: singleExportedComptPath, + entry: singleExportedComptPath, + accesser: 'local', + isExportedAsMultiple: false, + }; + + const instance = new Materialize(options); + const actual = await instance.start(); + + t.snapshot(actual); +}); + +test('materialize multiple exported component by local', async t => { + const options: IMaterializeOptions = { + cwd: multiExportedComptPath, + entry: multiExportedComptPath, + accesser: 'local', + isExportedAsMultiple: true, + }; + + const instance = new Materialize(options); + const actual = await instance.start(); + + t.snapshot(actual); +}); + +// test('materialize single exported component by online', async t => { +// const options: IMaterializeOptions = { +// entry: singleExportedComponent, +// accesser: 'online', +// isExportedAsMultiple: false, +// }; + +// const instance = new Materialize(options); +// const actual = await instance.start(); + +// t.snapshot(actual); +// }); + +// test('materialize multiple exported component by online', async t => { +// const options: IMaterializeOptions = { +// entry: multipleExportedComponent, +// accesser: 'online', +// isExportedAsMultiple: false, +// }; + +// const instance = new Materialize(options); +// const actual = await instance.start(); + +// t.snapshot(actual); +// }); diff --git a/packages/material-parser/test/accesser/LocalAccesser.ts b/packages/material-parser/test/accesser/LocalAccesser.ts new file mode 100644 index 000000000..70b925313 --- /dev/null +++ b/packages/material-parser/test/accesser/LocalAccesser.ts @@ -0,0 +1,29 @@ +import test from 'ava'; +import LocalAccesser from '../../src/accesser/LocalAccesser'; +import { IMaterializeOptions } from '../../src/types'; +import { getFromFixtures } from '../helpers'; + +const multiExportedComptPath = getFromFixtures('multiple-exported-component'); +const singleExportedComptPath = getFromFixtures('single-exported-component'); + +test.serial('access single exported component by local', async t => { + const options: IMaterializeOptions = { + entry: singleExportedComptPath, + accesser: 'local', + isExportedAsMultiple: false, + }; + const accesser = new LocalAccesser(options); + const actual = await accesser.access(); + t.snapshot(actual); +}); + +test.serial('access multiple exported component by local', async t => { + const options: IMaterializeOptions = { + entry: multiExportedComptPath, + accesser: 'local', + isExportedAsMultiple: true, + }; + const accesser = new LocalAccesser(options); + const actual = await accesser.access(); + t.snapshot(actual); +}); diff --git a/packages/material-parser/test/accesser/OnlineAccesser.ts b/packages/material-parser/test/accesser/OnlineAccesser.ts new file mode 100644 index 000000000..83aa50963 --- /dev/null +++ b/packages/material-parser/test/accesser/OnlineAccesser.ts @@ -0,0 +1,42 @@ +import test from 'ava'; +import OnlineAccesser from '../../src/accesser/OnlineAccesser'; +import { IMaterializeOptions } from '../../src/types'; + +const singleExportedComponent = '@ali/demo-biz-test090702@0.0.2'; +const multipleExportedComponent = '@ali/aimake-basic@0.1.0'; + +test.serial('online accesser', t => { + t.pass(); +}) +// test.serial('access single exported component by online', async t => { +// const options: IMaterializeOptions = { +// entry: singleExportedComponent, +// accesser: 'online', +// isExportedAsMultiple: false, +// }; +// const accesser = new OnlineAccesser(options); +// const actual = await accesser.access(); +// t.snapshot(actual); +// }); + +// test.serial('access multiple exported component by online', async t => { +// const options: IMaterializeOptions = { +// entry: multipleExportedComponent, +// accesser: 'online', +// isExportedAsMultiple: true, +// }; +// const accesser = new OnlineAccesser(options); +// const actual = await accesser.access(); +// t.snapshot(actual); +// }); + +// test.serial('access @alifd/next@1.17.12 by online', async t => { +// const options: IMaterializeOptions = { +// entry: '@alifd/next@1.17.12', +// accesser: 'online', +// isExportedAsMultiple: true, +// }; +// const accesser = new OnlineAccesser(options); +// const actual = await accesser.access(); +// t.snapshot(actual); +// }); diff --git a/packages/material-parser/test/accesser/snapshots/LocalAccesser.ts.md b/packages/material-parser/test/accesser/snapshots/LocalAccesser.ts.md new file mode 100644 index 000000000..b6d56ecd5 --- /dev/null +++ b/packages/material-parser/test/accesser/snapshots/LocalAccesser.ts.md @@ -0,0 +1,529 @@ +# Snapshot report for `test/accesser/LocalAccesser.ts` + +The actual snapshot is saved in `LocalAccesser.ts.snap`. + +Generated by [AVA](https://ava.li). + +## access 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', + }, + }, + }, + ] + +## access 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', + }, + }, + }, + ] diff --git a/packages/material-parser/test/accesser/snapshots/LocalAccesser.ts.snap b/packages/material-parser/test/accesser/snapshots/LocalAccesser.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..0d3c837c208a03585e1ac98bdab8e967ff82b8cd GIT binary patch literal 3727 zcmV;A4sh{7RzV2V|V2aUH;!o2}i_#59AWEVXRC;2@JzXq;|@C^$Xt1*i&?7NN=OLcYW1w!6fP<(6i@fQ)8Odk6m5 z{p~JiGioTNQJR!!xB2jQCC=#Z_+9q8X2E$C&L(*Md@!%kYikYWw0k}6V##v6o^~+; zn@jr5QJ%}z#Jd#oz4#4yFYm=6%f?d1Uhna^6x^NJ8s=Gkce8@IGh4&F(BIaCgREUX zpiw}ey($zSAJ8aZso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3&#ZUCe*#ge5J;i(0N-syIZjkzUov^U1mBsfb^iVC5-5c&bB>9 zI@=PDr<>huQ^YYtENdWju%0!A74Cw9cAMRfD%KQKl#2gtlG|N_$K~X==DuTdZyO+ASAoN zYqXSEZ)Q9R$tf_BUILZNNUI^43a+H37DjqCB-esHw6u(oz6{A>@HH)+%t+I72pI|{ z(+jEUySKbJIb>Q^y6%f}6jvE*m1FLjXp)NA+OuMkL*ALCa$f9JIO0o^R1BBfqhd0d zheWBg+MbnW?i!_~V%GMom^kq+Bo(kMO!weFl<0 zfOkRSC_?f<9cUV*wfZvgHb{N~9s_TJFFkBLjT9#Py3?gIzFVerWq^*u$V?;tRaB_tJ$07al2 zOa+Z&)%FMBjEf++2sptt;2yA_GG)?dd@Dg|(yhoX*(q}vY!56?#j3x!D!3D+PrbhZVYJ$K4yp(We?CePkEL_@H z99+1xw^&}d^w(l};nJ`YdEwIB5_#d$h7x(<(&Ht8g-bC|mk&#Vbs0KQuFIT>a$VL> zl%9wfz;5M*UX_RFmW7!VL4)84aShP>4ER~F<1d?$)cJ%o0LS^1rG~NG1j#nA54-_R)0XoXOLiUV0Hy&4 zxTB7;)H0U+kQ@Z>07E??6Y43;G~1mo^2z;;7A6 zM-u6^k1XuluIfHAHKkrVNJ72>t9}THtkY|U8})%%b%&d}R@Vr-)}L!f7*X5P2$5-6 zzfm>HcJP~t)+vr8dHJ?lI1yEP-7CUYhO6Ey)Ra0!H+XmLb}N$? z=cu-_NUF2<&N|@kTm9V52Hf=;yjPqZ_lm*i!@*wpeeRY0*!~AwS0BVAeN0!2M@jI# tZ0UpJ&*1pe7ZEkAH-|0PHmk1IHY+UFHpf(z{;xN^{{auUNs3uv003L%4B-F( literal 0 HcmV?d00001 diff --git a/packages/material-parser/test/accesser/snapshots/OnlineAccesser.ts.md b/packages/material-parser/test/accesser/snapshots/OnlineAccesser.ts.md new file mode 100644 index 000000000..fc1e99f97 --- /dev/null +++ b/packages/material-parser/test/accesser/snapshots/OnlineAccesser.ts.md @@ -0,0 +1,408 @@ +# 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/kDKCQ3wGKzpHh6KU5ExdE1/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/kDKCQ3wGKzpHh6KU5ExdE1/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/kDKCQ3wGKzpHh6KU5ExdE1/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/kDKCQ3wGKzpHh6KU5ExdE1/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/kDKCQ3wGKzpHh6KU5ExdE1/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/kDKCQ3wGKzpHh6KU5ExdE1/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/kDKCQ3wGKzpHh6KU5ExdE1/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/todtaTTK9KxDGepu5Kbb9G/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', + }, + }, + }, + ] diff --git a/packages/material-parser/test/accesser/snapshots/OnlineAccesser.ts.snap b/packages/material-parser/test/accesser/snapshots/OnlineAccesser.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..e8ea50d9451e4f315e76225efbfde5cab1ea5b7e GIT binary patch literal 2896 zcmV-W3$OG+RzVY2;e>+GVGf93P7a00000000B+ znhQ`=*B!>s-DMX9bU~v=5ry@E0?RHSAmEFK53?TW%mLLm)&(A24sjjd053x z>P$7Au}!O;sZETNw9U&9o2q$O)3no?+J|ZEj5UoKW7QaEs_pcBSMEbWof{>?F*?%g_+w#4Z zQ}Z=>`|9gCx%OY>gs4fRtm2|LRXSd?z!**&&uNOBPQIDrd?lSuN4RLhafFNExVb)4 zL<3$of~Dv!OVwf4F0ZZ^%x+Gl6yxIJ2se^&YQpKDQQaq%H1S+qBX6_T2rlHiN=gJh}JjSEglgUGu%R>!|1kK-2BRw75NoSrDcM{lT%S$ zonIEHT!=o57NOB@sJ3o4xDl->-;`&{GRj?efO~&5%qPv%_2$_YxHK18x>}|qZuz2k3+PYF%nW4t;q!k@51Xk^jK&2h?XL= z+qwz8xt$)tS6AxfYkf5ir`;j7ysovCaHBYGIo@eso-w{W@lH!qLcJLmw}SojbWk(X zK}C&Ogftw=AJU-6-L?C57v&oxsjtYdapevet0rV2SOqqNeQK)j2&QkX-1PhE&ZZ+f zhL8$sRN#m!;Ys5zw{hFA4UIfhR12~Gqbygdbo6ZL9Q3XQ5z>56LJFJ}(okr}V@W51 zOi%`@!RCm-<*W%<&QSr^wDeNf5H41VK*>#wdDT(JaY|g$H1pLe(T-4No$r#`cS-A= zgueQS&XJ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P{Kt+;;AmbC$b(+^*xcbBUO1K>+MwKiL9%s$`e`oH06n`sx;+^tZ%1z zpU4^lxwNPGa``e%$t5{m$z^4_lFRmVC6~9-m0Yf*4}n~~u_hUOxvVgFa~ag2v~noV zC_x=DCk2C~s!?61be9Brw^iB=Dfoo4^p5%ugA8 zp}t{MLcP=(YNAOQ>q?U{)=!$0$^5!$$V}#oCSNX-GQGKA>tBvy6=(v_gAXKt0$4-k~ky7|S_GE`X>xgcw29 z9Lh4Dv3MY90ndXE!7bWyKVuo6k57uA6x4zp`IKb>V|f9Rm%$&we?dwCWtqZQ${<+= z+~7HIgtjCxmcK%B4yXzVnF*E^QkEHvr4bSr*b9z<%d{nhvBbG!5)b%3_!T%$ zTQV7odI3KDf^@J7Y+FECve@(?IS5XH8z5mJWyxmKholJ9fi`fMw#;TMA3<^&d<`ZQ z!CpjJ3K$CyNiEn3UIHJ{mO{pI1(F+JTrqk84aJmYE@NqfWH)#foCRD7WtqoVk|9X} z<-i5@(U$p)r5%!E;GZDAl#qF)lw|>9SqF(3>;#9w?`g|I#&Q*sn_%4{Lbiefizv%t z#&R5zli)IlUrb2uV#-p+{16#If1CEd6C_tgj-(_S`TmXaqqFZWPO#sryAwtE?)!99 zkkG_5GT_#4u)u;U2PnE2znjECZ-jKO8=%N^)cxmR(ep;A#!O`m`bM&s2Plpa%9G{6!s%8uPHQzj37#<_O8@}%bAPe` literal 0 HcmV?d00001 diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/MaterialIn.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/MaterialIn.ts.md new file mode 100644 index 000000000..d661784b2 --- /dev/null +++ b/packages/material-parser/test/fixtures/__snapshots__/test/MaterialIn.ts.md @@ -0,0 +1,7853 @@ +# Snapshot report for `test/MaterialIn.ts` + +The actual snapshot is saved in `MaterialIn.ts.snap`. + +Generated by [AVA](https://ava.li). + +## load @ali/aimake-antd@0.0.27 package + +> Snapshot 1 + + [ + { + components: [ + { + componentName: 'Affix', + manifest: { + category: '', + coverImage: '', + description: 'Affix', + name: 'Affix', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + target: Function target {}, + }, + }, + }, + { + componentName: 'Avatar', + manifest: { + category: '线条图像', + coverImage: 'https://img.alicdn.com/tfs/TB1V08rc8Cw3KVjSZFlXXcJkFXa-212-136.png', + description: '头像', + name: 'Avatar', + presets: [ + { + alias: '头像', + colSpan: 12, + customProps: {}, + thumbnail: 'https://img.alicdn.com/tfs/TB1V08rc8Cw3KVjSZFlXXcJkFXa-212-136.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: 'circle', + label: '头像形状', + name: 'shape', + params: [ + { + label: '圆形', + value: 'circle', + }, + { + label: '方形', + value: 'square', + }, + ], + renderer: 'Select', + }, + { + defaultValue: 'default', + label: '头像大小', + name: 'size', + params: [ + { + label: '默认', + value: 'default', + }, + { + label: 'Small', + value: 'small', + }, + { + label: 'Large', + value: 'large', + }, + ], + renderer: 'Select', + }, + { + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + label: '高度', + name: 'height', + renderer: 'Height', + }, + { + defaultValue: '#ccc', + label: '背景色', + name: 'backgroundColor', + renderer: 'Color', + }, + { + defaultValue: 'user', + label: '图标类型', + name: 'icon', + placeholder: '参考 Icon 组件', + renderer: 'Input', + }, + { + label: '图片地址', + name: 'src', + placeholder: '输入图片地址', + renderer: 'Input', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + shape: 'circle', + size: 'default', + }, + }, + }, + { + componentName: 'BackTop', + manifest: { + category: '', + coverImage: '', + description: 'BackTop', + name: 'BackTop', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + visibilityHeight: 400, + }, + }, + }, + { + componentName: 'Badge', + manifest: { + category: '开关微标', + coverImage: 'https://img.alicdn.com/tfs/TB147oKU7voK1RjSZFwXXciCFXa-114-60.png', + description: '徽章', + name: 'Badge', + presets: [ + { + alias: '微标', + colSpan: 12, + customProps: { + count: 0, + dot: false, + overflowCount: undefined, + showZero: false, + status: 'default', + text: '', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1TDjFU4naK1RjSZFBXXcW7VXa-192-66.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'rl', + props: [ + { + hint: '大于 overflowCount 时显示为 `overflowCount+`,为 0 时隐藏', + label: '展示的数字', + name: 'count', + params: { + defaultValue: 0, + min: 0, + }, + renderer: 'InputNumber', + }, + { + label: '展示的封顶数字值', + name: 'overflowCount', + params: { + defaultValue: 99, + min: 0, + }, + renderer: 'InputNumber', + }, + { + defaultValue: 'default', + label: '状态点', + name: 'status', + params: [ + { + label: '默认', + value: 'default', + }, + { + label: 'success', + value: 'success', + }, + { + label: 'processing', + value: 'processing', + }, + { + label: 'error', + value: 'error', + }, + { + label: 'warning', + value: 'warning', + }, + ], + renderer: 'Select', + }, + { + hint: '在设置了 status 的前提下有效', + label: '状态点文本', + name: 'text', + renderer: 'Input', + }, + { + defaultValue: false, + label: '为 0 时隐藏 Badge', + name: 'showZero', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '是否只显示为一个小红点', + name: 'dot', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + count: null, + dot: false, + overflowCount: 99, + showZero: false, + }, + propTypes: { + count: Function e { + isRequired: [Circular], + }, + dot: Function e { + isRequired: [Circular], + }, + overflowCount: Function e { + isRequired: [Circular], + }, + showZero: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Breadcrumb', + manifest: { + category: '', + coverImage: '', + description: '面包屑', + name: 'Breadcrumb', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tb', + props: [ + { + label: '路由栈信息', + name: 'routes', + renderer: [ + { + label: '路由路径', + name: 'path', + renderer: 'Input', + }, + { + label: '面包屑名称', + name: 'breadcrumbName', + renderer: 'Input', + }, + ], + }, + { + label: '分隔符', + name: 'separator', + params: { + defaultValue: '/', + }, + renderer: 'Input', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + separator: '/', + }, + propTypes: { + linkRender: Function e { + isRequired: [Circular], + }, + nameRender: Function e { + isRequired: [Circular], + }, + params: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + routes: Function e { + isRequired: [Circular], + }, + separator: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Button', + manifest: { + category: '按钮', + coverImage: 'https://img.alicdn.com/tfs/TB1fFlpViLaK1RjSZFxXXamPFXa-128-64.png', + description: '按钮', + name: 'Button', + presets: [ + { + alias: '主要按钮', + colSpan: 12, + customProps: { + size: 'default', + target: '', + textContent: '按钮', + type: 'primary', + }, + thumbnail: { + '#13C1C2': 'https://img.alicdn.com/tfs/TB1BkyIU9zqK1RjSZPcXXbTepXa-192-96.png', + '#1890FF': 'https://img.alicdn.com/tfs/TB1qwzhUYvpK1RjSZFqXXcXUVXa-192-96.png', + '#4178FF': 'https://img.alicdn.com/tfs/TB1..ngU4TpK1RjSZFMXXbG_VXa-192-96.png', + '#F5212D': 'https://img.alicdn.com/tfs/TB1ziLiU7voK1RjSZFNXXcxMVXa-192-96.png', + '#FF6A00': 'https://img.alicdn.com/tfs/TB1Zk7Db2c3T1VjSZLeXXbZsVXa-192-96.png', + default: 'https://img.alicdn.com/tfs/TB1ziLiU7voK1RjSZFNXXcxMVXa-192-96.png', + }, + }, + { + alias: '次要按钮', + colSpan: 12, + customProps: { + size: 'default', + target: '', + textContent: '按钮', + type: 'default', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1mUfiUVzqK1RjSZFoXXbfcXXa-192-96.png', + }, + { + alias: '危险按钮', + colSpan: 12, + customProps: { + size: 'default', + target: '', + textContent: '按钮', + type: 'danger', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1tWHJVrrpK1RjSZTEXXcWAVXa-192-96.png', + }, + { + alias: '虚线按钮', + colSpan: 12, + customProps: { + size: 'default', + target: '', + textContent: '按钮', + type: 'dashed', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB10tvKU4naK1RjSZFtXXbC2VXa-192-96.png', + }, + { + alias: '上传按钮', + colSpan: 12, + customProps: { + icon: 'upload', + size: 'default', + target: '', + textContent: '按钮', + type: 'primary', + }, + thumbnail: { + '#13C1C2': 'https://img.alicdn.com/tfs/TB1igzkU6TpK1RjSZKPXXa3UpXa-192-96.png', + '#1890FF': 'https://img.alicdn.com/tfs/TB1ukLEU5LaK1RjSZFxXXamPFXa-192-96.png', + '#4178FF': 'https://img.alicdn.com/tfs/TB1iezrU3HqK1RjSZFkXXX.WFXa-192-96.png', + '#F5212D': 'https://img.alicdn.com/tfs/TB1sALfUYvpK1RjSZPiXXbmwXXa-192-96.png', + '#FF6A00': 'https://img.alicdn.com/tfs/TB1G6DEU5LaK1RjSZFxXXamPFXa-192-96.png', + default: 'https://img.alicdn.com/tfs/TB1sALfUYvpK1RjSZPiXXbmwXXa-192-96.png', + }, + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: '按钮', + label: '按钮文本', + name: 'textContent', + renderer: 'Input', + }, + { + label: '按钮类型', + name: 'type', + params: [ + { + label: '默认', + value: 'default', + }, + { + label: '基本', + value: 'primary', + }, + { + label: '警告', + value: 'danger', + }, + { + label: '虚线', + value: 'dashed', + }, + ], + renderer: 'Select', + }, + { + label: '按钮大小', + name: 'size', + params: [ + { + label: '默认', + value: 'default', + }, + { + label: '较大', + value: 'large', + }, + { + label: '较小', + value: 'small', + }, + ], + renderer: 'Select', + }, + { + hint: '指定此属性 button 的行为和 a 链接一致', + label: '跳转地址', + name: 'href', + placeholder: 'eg: https://www.xxx.com', + renderer: 'Input', + }, + { + hint: '相当于 a 链接的 target 属性,href 存在时生效', + label: '打开方式', + name: 'target', + params: [ + { + label: '不设置', + value: '', + }, + { + label: '打开新标签跳转', + value: '_blank', + }, + { + label: '当前页面跳转', + value: '_self', + }, + ], + renderer: 'Select', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + Group: Function ip {}, + __ANT_BUTTON: true, + defaultProps: { + block: false, + ghost: false, + htmlType: 'button', + loading: false, + }, + propTypes: { + block: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + htmlType: Function e { + isRequired: [Circular], + }, + icon: Function e { + isRequired: [Circular], + }, + loading: Function e { + isRequired: [Circular], + }, + onClick: Function e { + isRequired: [Circular], + }, + shape: Function e { + isRequired: [Circular], + }, + size: Function e { + isRequired: [Circular], + }, + type: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Calendar', + manifest: { + category: '', + coverImage: '', + description: '日历选择框', + name: 'Calendar', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'rl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + fullscreen: true, + locale: {}, + onChange: Function Ps {}, + onPanelChange: Function Ps {}, + onSelect: Function Ps {}, + }, + propTypes: { + className: Function e { + isRequired: [Circular], + }, + dateCellRender: Function e { + isRequired: [Circular], + }, + dateFullCellRender: Function e { + isRequired: [Circular], + }, + fullscreen: Function e { + isRequired: [Circular], + }, + locale: Function e { + isRequired: [Circular], + }, + monthCellRender: Function e { + isRequired: [Circular], + }, + monthFullCellRender: Function e { + isRequired: [Circular], + }, + onChange: Function e { + isRequired: [Circular], + }, + onPanelChange: Function e { + isRequired: [Circular], + }, + onSelect: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + value: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Card.Grid', + manifest: { + category: '卡片', + coverImage: '', + description: 'CardGrid', + name: 'Card.Grid', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbv', + props: [ + { + hint: '多个类名时以空格间隔', + label: '网格容器类名', + name: 'className', + renderer: 'Input', + }, + { + label: '网格容器样式', + name: 'style', + renderer: 'Style', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'container', + }, + }, + origin: Function Ys {}, + }, + { + componentName: 'Card.Meta', + manifest: { + category: '卡片', + coverImage: '', + description: 'CardMeta', + name: 'Card.Meta', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbv', + props: [ + { + hint: '多个类名时以空格间隔', + label: '容器类名', + name: 'className', + renderer: 'Input', + }, + { + label: '容器样式', + name: 'style', + renderer: 'Style', + }, + { + label: '标题内容', + name: 'title', + renderer: 'Input', + }, + { + label: '描述内容', + name: 'description', + renderer: 'TextArea', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function Fs {}, + }, + { + componentName: 'Card', + manifest: { + category: '卡片', + coverImage: 'https://img.alicdn.com/tfs/TB1wn9tqntYBeNjy1XdXXXXyVXa-366-124.png', + description: '卡片', + name: 'Card', + presets: [ + { + alias: '带标题卡片', + colSpan: 24, + customProps: { + bordered: true, + hoverable: false, + title: '标题', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1wn9tqntYBeNjy1XdXXXXyVXa-366-124.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbvrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: undefined, + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: undefined, + label: '高度', + name: 'height', + renderer: 'Height', + }, + { + label: '背景颜色', + name: 'backgroundColor', + renderer: 'Color', + }, + { + defaultValue: '标题', + label: '卡片标题', + name: 'title', + renderer: 'Input', + }, + { + defaultValue: true, + label: '边框', + name: 'bordered', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '浮起效果', + name: 'hoverable', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'container', + }, + }, + origin: Function t { + Grid: Function Ys {}, + Meta: Function Fs {}, + }, + }, + { + componentName: 'Collapse', + manifest: { + category: '折叠面板', + coverImage: 'https://img.alicdn.com/tfs/TB1sceGFuuSBuNjy1XcXXcYjFXa-480-233.png', + description: '折叠面板', + name: 'Collapse', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbv', + lifeCycle: { + didMount: Function didMount {}, + didUnMount: Function didUnMount {}, + didUpdate: Function didUpdate {}, + willMount: Function willMount {}, + willUnMount: Function willUnMount {}, + willUpdate: Function willUpdate {}, + }, + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: undefined, + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: [ + { + textContent: '内容标题', + value: '1', + }, + { + textContent: '内容标题', + value: '2', + }, + { + textContent: '内容标题', + value: '3', + }, + ], + label: '项目', + name: 'panels', + params: { + active: false, + }, + renderer: 'DynamicField', + }, + { + defaultValue: [ + '1', + ], + label: '默认展开面板', + name: 'defaultActiveKey', + renderer: false, + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_block', + }, + }, + origin: Function t { + Panel: Function t {}, + defaultProps: { + bordered: true, + openAnimation: { + appear: Function appear {}, + enter: Function enter {}, + leave: Function leave {}, + }, + }, + }, + }, + { + componentName: 'Carousel', + manifest: { + category: '', + coverImage: '', + description: '轮播', + name: 'Carousel', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'rltb', + lifeCycle: { + didMount: Function didMount {}, + didUpdate: Function didUpdate {}, + }, + props: [ + { + defaultValue: [ + { + actived: true, + value: '1', + }, + { + actived: false, + value: '2', + }, + { + actived: false, + value: '3', + }, + ], + label: '项目:', + name: 'options', + renderer: 'DynamicField', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_block', + }, + }, + origin: Function t { + defaultProps: { + arrows: false, + dots: true, + draggable: false, + }, + }, + }, + { + componentName: 'Cascader', + manifest: { + category: '', + coverImage: '', + description: '级联菜单', + name: 'Cascader', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbv', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + allowClear: true, + disabled: false, + options: [], + placeholder: 'Please select', + popupPlacement: 'bottomLeft', + transitionName: 'slide-up', + }, + }, + }, + { + componentName: 'Checkbox.Group', + manifest: { + category: '单复选项', + coverImage: 'https://img.alicdn.com/tfs/TB1mR7zU8LoK1RjSZFuXXXn0XXa-304-32.png', + description: '复选框组', + name: 'Checkbox.Group', + presets: [ + { + alias: '复选项', + colSpan: 24, + customProps: {}, + thumbnail: { + '#13C1C2': 'https://img.alicdn.com/tfs/TB1GxzoU9zqK1RjSZFpXXakSXXa-492-60.png', + '#1890FF': 'https://img.alicdn.com/tfs/TB10yvoU9zqK1RjSZFpXXakSXXa-492-60.png', + '#4178FF': 'https://img.alicdn.com/tfs/TB12rPkUYvpK1RjSZPiXXbmwXXa-492-60.png', + '#F5212D': 'https://img.alicdn.com/tfs/TB1Rw6iU4TpK1RjSZFKXXa2wXXa-492-60.png', + '#FF6A00': 'https://img.alicdn.com/tfs/TB1imPsUVzqK1RjSZFvXXcB7VXa-492-60.png', + default: 'https://img.alicdn.com/tfs/TB1Rw6iU4TpK1RjSZFKXXa2wXXa-492-60.png', + }, + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '自适', + label: '行高', + name: 'lineHeight', + renderer: 'LineHeight', + }, + { + defaultValue: [ + { + label: '已选中项', + value: '1', + }, + { + label: '未选中项', + value: '2', + }, + ], + label: '项目:', + linkageProps: 'defaultValue', + name: 'options', + renderer: 'DynamicField', + }, + { + defaultValue: false, + label: '禁用:', + name: 'disabled', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: '1', + hint: '多个值以英文逗号间隔', + label: '默认选中:', + name: 'defaultValue', + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + childContextTypes: { + checkboxGroup: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + options: [], + }, + propTypes: { + defaultValue: Function e { + isRequired: [Circular], + }, + onChange: Function e { + isRequired: [Circular], + }, + options: Function e { + isRequired: [Circular], + }, + value: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Checkbox', + manifest: { + category: '单复选项', + coverImage: 'https://img.alicdn.com/tfs/TB1mR7zU8LoK1RjSZFuXXXn0XXa-304-32.png', + description: '复选框', + name: 'Checkbox', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + Group: Function t { + childContextTypes: { + checkboxGroup: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + options: [], + }, + propTypes: { + defaultValue: Function e { + isRequired: [Circular], + }, + onChange: Function e { + isRequired: [Circular], + }, + options: Function e { + isRequired: [Circular], + }, + value: Function e { + isRequired: [Circular], + }, + }, + }, + contextTypes: { + checkboxGroup: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + indeterminate: false, + }, + }, + }, + { + componentName: 'Col', + manifest: { + category: '布局', + coverImage: '', + description: '栅格列', + name: 'Col', + presets: [], + settings: { + handles: [ + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [ + { + defaultValue: 1, + label: '栅格列设置', + name: 'column', + renderer: 'Column', + }, + { + defaultValue: 'left', + label: '水平对齐', + name: 'textAlign', + renderer: 'TextAlign', + }, + { + label: '内边距', + name: 'padding', + renderer: 'Quadrant', + }, + { + label: '边框', + name: 'border', + renderer: 'BarBorder', + }, + { + label: '间隔格数', + name: 'offset', + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: false, + type: 'container', + }, + }, + origin: Function t { + propTypes: { + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + lg: Function e { + isRequired: [Circular], + }, + md: Function e { + isRequired: [Circular], + }, + offset: Function e { + isRequired: [Circular], + }, + order: Function e { + isRequired: [Circular], + }, + pull: Function e { + isRequired: [Circular], + }, + push: Function e { + isRequired: [Circular], + }, + sm: Function e { + isRequired: [Circular], + }, + span: Function e { + isRequired: [Circular], + }, + xl: Function e { + isRequired: [Circular], + }, + xs: Function e { + isRequired: [Circular], + }, + xxl: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Row', + manifest: { + category: '布局', + coverImage: 'https://img.alicdn.com/tfs/TB1nh_zUVzqK1RjSZFvXXcB7VXa-144-108.png', + description: '栅格行', + name: 'Row', + presets: [ + { + alias: '分栏', + colSpan: 12, + customProps: {}, + thumbnail: 'https://img.alicdn.com/tfs/TB1mu78cvc3T1VjSZLeXXbZsVXa-192-108.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: '', + lifeCycle: { + didMount: Function didMount {}, + didUpdate: Function didUpdate {}, + }, + props: [ + { + defaultValue: 2, + label: '分栏', + name: 'column', + renderer: 'Column', + }, + { + defaultValue: undefined, + label: '对齐', + name: 'align-justify', + renderer: 'Arrange', + }, + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '12px', + label: '', + name: 'marginBottom', + renderer: false, + }, + { + label: '边框', + name: 'border', + renderer: 'BarBorder', + }, + { + defaultValue: 0, + label: '栅格间隔', + name: 'gutter', + params: { + min: 0, + }, + renderer: false, + }, + { + hint: '仅在浏览器支持 Flex 布局时有效', + label: '垂直对齐', + name: 'align', + params: [ + { + label: '默认', + value: '', + }, + { + label: '靠上', + value: 'top', + }, + { + label: '居中', + value: 'middle', + }, + { + label: '靠下', + value: 'bottom', + }, + ], + renderer: false, + }, + { + hint: '仅在浏览器支持 Flex 布局时有效', + label: '水平排列', + name: 'justify', + params: [ + { + label: '默认', + value: '', + }, + { + label: '靠前', + value: 'start ', + }, + { + label: '靠后', + value: 'end', + }, + { + label: '居中', + value: 'center', + }, + { + label: '环绕留白', + value: 'space-around', + }, + { + label: '间隔留白', + value: 'space-between', + }, + ], + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'container', + }, + }, + origin: Function t { + defaultProps: { + gutter: 0, + }, + propTypes: { + align: Function e { + isRequired: [Circular], + }, + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + gutter: Function e { + isRequired: [Circular], + }, + justify: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + type: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'DatePicker.RangePicker', + manifest: { + category: '日期选择', + coverImage: 'https://img.alicdn.com/tfs/TB1cW.yUY2pK1RjSZFsXXaNlXXa-328-64.png', + description: '日期范围选择', + name: 'DatePicker.RangePicker', + presets: [ + { + alias: '日期范围选择', + colSpan: 24, + customProps: { + placeholder: [ + '开始日期', + '结束日期', + ], + width: '224px', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1vmi8nTZmx1VjSZFGXXax2XXa-492-96.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '224px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: 'default', + label: '尺寸', + name: 'size', + params: [ + { + label: '正常', + value: 'default', + }, + { + label: '较小', + value: 'small', + }, + { + label: '较大', + value: 'large', + }, + ], + renderer: 'Select', + }, + { + defaultValue: Function defaultValue {}, + name: 'getCalendarContainer', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function o { + defaultProps: { + locale: {}, + onChange: Function onChange {}, + onOk: Function onOk {}, + onOpenChange: Function onOpenChange {}, + popupStyle: {}, + transitionName: 'slide-up', + }, + }, + }, + { + componentName: 'DatePicker.MonthPicker', + manifest: { + category: '日期选择', + coverImage: 'https://img.alicdn.com/tfs/TB1JKp.TxYaK1RjSZFnXXa80pXa-492-96.png', + description: 'MonthPicker', + name: 'DatePicker.MonthPicker', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function o { + defaultProps: { + locale: {}, + onChange: Function onChange {}, + onOk: Function onOk {}, + onOpenChange: Function onOpenChange {}, + popupStyle: {}, + transitionName: 'slide-up', + }, + }, + }, + { + componentName: 'DatePicker.WeekPicker', + manifest: { + category: '日期选择', + coverImage: '', + description: '周选择框', + name: 'DatePicker.WeekPicker', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function o { + defaultProps: { + locale: {}, + onChange: Function onChange {}, + onOk: Function onOk {}, + onOpenChange: Function onOpenChange {}, + popupStyle: {}, + transitionName: 'slide-up', + }, + }, + }, + { + componentName: 'DatePicker', + manifest: { + category: '日期选择', + coverImage: 'https://img.alicdn.com/tfs/TB1nvwCU7zoK1RjSZFlXXai4VXa-328-64.png', + description: '日期选择框', + name: 'DatePicker', + presets: [ + { + alias: '日期选择', + colSpan: 24, + customProps: { + placeholder: '选择日期', + width: '224px', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1nvwCU7zoK1RjSZFlXXai4VXa-328-64.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '224px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: 'default', + label: '尺寸', + name: 'size', + params: [ + { + label: '正常', + value: 'default', + }, + { + label: '较小', + value: 'small', + }, + { + label: '较大', + value: 'large', + }, + ], + renderer: 'Select', + }, + { + defaultValue: Function defaultValue {}, + name: 'getCalendarContainer', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function o { + MonthPicker: Function o { + defaultProps: { + locale: {}, + onChange: Function onChange {}, + onOk: Function onOk {}, + onOpenChange: Function onOpenChange {}, + popupStyle: {}, + transitionName: 'slide-up', + }, + }, + RangePicker: Function o { + defaultProps: { + locale: {}, + onChange: Function onChange {}, + onOk: Function onOk {}, + onOpenChange: Function onOpenChange {}, + popupStyle: {}, + transitionName: 'slide-up', + }, + }, + WeekPicker: Function o { + defaultProps: { + locale: {}, + onChange: Function onChange {}, + onOk: Function onOk {}, + onOpenChange: Function onOpenChange {}, + popupStyle: {}, + transitionName: 'slide-up', + }, + }, + defaultProps: { + locale: {}, + onChange: Function onChange {}, + onOk: Function onOk {}, + onOpenChange: Function onOpenChange {}, + popupStyle: {}, + transitionName: 'slide-up', + }, + }, + }, + { + componentName: 'Divider', + manifest: { + category: '线条图像', + coverImage: 'https://img.alicdn.com/tfs/TB1WzszU4TpK1RjSZR0XXbEwXXa-144-3.png', + description: '线条', + name: 'Divider', + presets: [ + { + alias: '线条', + colSpan: 12, + customProps: { + dashed: false, + margin: 0, + marginBottom: '0px', + marginTop: '0px', + textContent: '', + type: 'horizontal', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1L1_xU3HqK1RjSZFkXXX.WFXa-192-108.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + defaultValue: 0, + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '100%', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: '1px', + label: '高度', + name: 'height', + renderer: 'Height', + }, + { + defaultValue: 'horizontal', + label: '类型', + name: 'type', + params: [ + { + label: '水平', + value: 'horizontal', + }, + { + label: '垂直', + value: 'vertical', + }, + ], + renderer: 'Select', + }, + { + defaultValue: false, + label: '是否虚线', + name: 'dashed', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: '0px', + label: '上边距', + name: 'marginTop', + renderer: false, + }, + { + defaultValue: '0px', + label: '下边距', + name: 'marginBottom', + renderer: false, + }, + { + defaultValue: '', + label: '内容', + name: 'textContent', + renderer: 'Input', + }, + { + defaultValue: '#dee2ed', + label: '线条颜色', + name: 'backgroundColor', + renderer: 'Color', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_block', + }, + }, + origin: Function qv {}, + }, + { + componentName: 'Comment', + manifest: { + category: '', + coverImage: '', + description: 'Comment', + name: 'Comment', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t {}, + }, + { + componentName: 'ConfigProvider', + manifest: { + category: '', + coverImage: '', + description: 'ConfigProvider', + name: 'ConfigProvider', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t {}, + }, + { + componentName: 'Dropdown', + manifest: { + category: '下拉框', + coverImage: 'https://img.alicdn.com/tfs/TB1eiMSX1uSBuNjy1XcXXcYjFXa-192-144.png', + description: '下拉菜单', + name: 'Dropdown', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tb', + lifeCycle: { + didMount: Function didMount {}, + didUpdate: Function didUpdate {}, + }, + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: [ + { + textContent: '1st menu item', + value: '1', + }, + { + textContent: '2nd menu item', + value: '2', + }, + { + textContent: '3rd item', + value: '3', + }, + ], + label: '设置菜单项:', + linkageProps: 'defaultValue', + name: 'overlay', + params: { + active: false, + }, + renderer: 'DynamicField', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + Button: Function t { + defaultProps: { + placement: 'bottomRight', + type: 'default', + }, + }, + defaultProps: { + mouseEnterDelay: 0.15, + mouseLeaveDelay: 0.1, + placement: 'bottomLeft', + }, + }, + }, + { + componentName: 'Drawer', + manifest: { + category: '', + coverImage: '', + description: 'Drawer', + name: 'Drawer', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + displayName: 'withConfigConsumer(t)', + }, + }, + { + componentName: 'AutoComplete', + manifest: { + category: '', + coverImage: '', + description: 'AutoComplete', + name: 'AutoComplete', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'rl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + OptGroup: Function t { + isSelectOptGroup: true, + }, + Option: Function t { + isSelectOption: true, + propTypes: { + value: Function e { + isRequired: [Circular], + }, + }, + }, + defaultProps: { + choiceTransitionName: 'zoom', + filterOption: false, + optionLabelProp: 'children', + showSearch: false, + transitionName: 'slide-up', + }, + }, + }, + { + componentName: 'Input.TextArea', + manifest: { + category: '输入框', + coverImage: 'https://img.alicdn.com/tfs/TB1fbA5U4jaK1RjSZKzXXXVwXXa-328-128.png', + description: '多行输入框', + name: 'Input.TextArea', + presets: [ + { + alias: '多行输入框', + colSpan: 24, + customProps: { + placeholder: '请输入', + width: '224px', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1L3YqUVzqK1RjSZFoXXbfcXXa-492-192.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '448px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: 4, + label: '高度', + name: 'rows', + params: { + max: 10, + min: 1, + }, + renderer: 'InputNumber', + }, + { + defaultValue: false, + label: '自适应高度', + name: 'autosize', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '是否禁用', + name: 'disabled', + params: [ + { + label: '禁用', + value: true, + }, + { + label: '不禁用', + value: false, + }, + ], + renderer: 'Radio', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t {}, + }, + { + componentName: 'Input.Group', + manifest: { + category: '输入框', + coverImage: 'https://img.alicdn.com/tfs/TB1_OFPTxTpK1RjSZFKXXa2wXXa-492-192.png', + description: '输入框组', + name: 'Input.Group', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'rl', + props: [ + { + defaultValue: 'default', + label: '分组下控件大小', + name: 'size', + params: [ + { + label: '较大', + value: 'large', + }, + { + label: '默认', + value: 'default', + }, + { + label: '较小', + value: 'small', + }, + ], + renderer: 'Select', + }, + { + defaultValue: false, + label: '是否用紧凑模式', + name: 'compact', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'container', + }, + }, + origin: Function rp {}, + }, + { + componentName: 'Input.Search', + manifest: { + category: '搜索框', + coverImage: 'https://img.alicdn.com/tfs/TB1exX1cfc3T1VjSZLeXXbZsVXa-328-64.png', + description: '搜索框', + name: 'Input.Search', + presets: [ + { + alias: '主要搜索框', + colSpan: 24, + customProps: { + enterButton: true, + placeholder: '请输入', + width: '224px', + }, + thumbnail: { + '#13C1C2': 'https://img.alicdn.com/tfs/TB1yvjSU4naK1RjSZFtXXbC2VXa-492-96.png', + '#1890FF': 'https://img.alicdn.com/tfs/TB1nkzsU7voK1RjSZFNXXcxMVXa-492-96.png', + '#4178FF': 'https://img.alicdn.com/tfs/TB1IbPhU6DpK1RjSZFrXXa78VXa-492-96.png', + '#F5212D': 'https://img.alicdn.com/tfs/TB1bmfpUYvpK1RjSZFqXXcXUVXa-492-96.png', + '#FF6A00': 'https://img.alicdn.com/tfs/TB1AVrBUZfpK1RjSZFOXXa6nFXa-492-96.png', + default: 'https://img.alicdn.com/tfs/TB1bmfpUYvpK1RjSZFqXXcXUVXa-492-96.png', + }, + }, + { + alias: '次要搜索框', + colSpan: 24, + customProps: { + placeholder: '请输入', + width: '224px', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1epntU3HqK1RjSZFEXXcGMXXa-492-96.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '224px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: '请输入', + label: '默认提示', + name: 'placeholder', + params: { + placeholder: '请输入', + }, + renderer: 'Input', + }, + { + defaultValue: false, + label: '是否有确认按钮', + name: 'enterButton', + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + enterButton: false, + }, + }, + }, + { + componentName: 'Input', + manifest: { + category: '输入框', + coverImage: 'https://img.alicdn.com/tfs/TB1row4U4jaK1RjSZKzXXXVwXXa-328-64.png', + description: '输入框', + name: 'Input', + presets: [ + { + alias: '单行输入框', + colSpan: 24, + customProps: { + placeholder: '请输入', + width: '224px', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1ZZ.Lb2c3T1VjSZLeXXbZsVXa-492-96.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '224px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: '请输入', + label: '默认提示', + name: 'placeholder', + params: { + placeholder: '请输入', + }, + renderer: 'Input', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + Group: Function rp {}, + Password: Function t { + defaultProps: { + action: 'click', + inputPrefixCls: 'ant-input', + prefixCls: 'ant-input-password', + visibilityToggle: true, + }, + }, + Search: Function t { + defaultProps: { + enterButton: false, + }, + }, + TextArea: Function t {}, + defaultProps: { + disabled: false, + type: 'text', + }, + propTypes: { + addonAfter: Function e { + isRequired: [Circular], + }, + addonBefore: Function e { + isRequired: [Circular], + }, + allowClear: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + defaultValue: Function e { + isRequired: [Circular], + }, + disabled: Function e { + isRequired: [Circular], + }, + id: Function e { + isRequired: [Circular], + }, + maxLength: Function e { + isRequired: [Circular], + }, + onBlur: Function e { + isRequired: [Circular], + }, + onFocus: Function e { + isRequired: [Circular], + }, + onKeyDown: Function e { + isRequired: [Circular], + }, + onKeyUp: Function e { + isRequired: [Circular], + }, + onPressEnter: Function e { + isRequired: [Circular], + }, + prefix: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + size: Function e { + isRequired: [Circular], + }, + suffix: Function e { + isRequired: [Circular], + }, + type: Function e { + isRequired: [Circular], + }, + value: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'InputNumber', + manifest: { + category: '输入框', + coverImage: '', + description: '数字选择框', + name: 'InputNumber', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'rl', + props: [ + { + label: '初始值', + name: 'defaultValue', + renderer: 'InputNumber', + }, + { + label: '当前值', + name: 'value', + renderer: 'InputNumber', + }, + { + defaultValue: false, + label: '自动获取焦点', + name: 'autoFocus', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '是否禁用状态', + name: 'disabled', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: 'default', + label: '控件大小', + name: 'size', + params: [ + { + label: '较大', + value: 'large', + }, + { + label: '默认', + value: 'default', + }, + { + label: '较小', + value: 'small', + }, + ], + renderer: 'Select', + }, + { + label: '最大值', + name: 'max', + renderer: 'InputNumber', + }, + { + label: '最小值', + name: 'min', + renderer: 'InputNumber', + }, + { + label: '数值精度', + name: 'precision', + renderer: 'InputNumber', + }, + { + label: '每次改变步数(可以为小数)', + name: 'step', + renderer: 'Input', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + step: 1, + }, + }, + }, + { + componentName: 'List.Item', + manifest: { + category: '列表', + coverImage: '', + description: '列表项', + name: 'List.Item', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbv', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + Meta: Function {}, + contextTypes: { + grid: Function e { + isRequired: [Circular], + }, + itemLayout: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'List', + manifest: { + category: '列表', + coverImage: '', + description: '列表', + name: 'List', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbv', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + Item: Function t { + Meta: Function {}, + contextTypes: { + grid: Function e { + isRequired: [Circular], + }, + itemLayout: Function e { + isRequired: [Circular], + }, + }, + }, + childContextTypes: { + grid: Function e { + isRequired: [Circular], + }, + itemLayout: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + bordered: false, + dataSource: [], + loading: false, + pagination: false, + split: true, + }, + }, + }, + { + componentName: 'LocaleProvider', + manifest: { + category: '', + coverImage: '', + description: 'LocaleProvider', + name: 'LocaleProvider', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + childContextTypes: { + antLocale: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + locale: {}, + }, + propTypes: { + locale: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Menu.Item', + manifest: { + category: '', + coverImage: '', + description: '菜单项', + name: 'Menu.Item', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [ + { + defaultValue: false, + label: '是否禁用', + name: 'disabled', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + hint: 'item 的唯一标志', + label: 'Key', + name: 'key', + renderer: 'Input', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element', + }, + }, + origin: Function t { + isMenuItem: true, + }, + }, + { + componentName: 'Menu.ItemGroup', + manifest: { + category: '菜单', + coverImage: '', + description: '菜单项组', + name: 'Menu.ItemGroup', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [ + { + label: '分组标题', + name: 'title', + renderer: 'Input', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element', + }, + }, + origin: Function t { + defaultProps: { + disabled: true, + }, + isMenuItemGroup: true, + propTypes: { + className: Function e { + isRequired: [Circular], + }, + index: Function e { + isRequired: [Circular], + }, + renderMenuItem: Function e { + isRequired: [Circular], + }, + rootPrefixCls: Function e { + isRequired: [Circular], + }, + subMenuKey: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Menu.SubMenu', + manifest: { + category: '菜单', + coverImage: '', + description: 'SubMenu', + name: 'Menu.SubMenu', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [ + { + defaultValue: false, + label: '是否禁用', + name: 'disabled', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + hint: '唯一标志', + label: 'Key', + name: 'key', + renderer: 'Input', + }, + { + label: '子菜单项值', + name: 'title', + renderer: 'Input', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element', + }, + }, + origin: Function t { + contextTypes: { + antdMenuTheme: Function e { + isRequired: [Circular], + }, + }, + isSubMenu: 1, + }, + }, + { + componentName: 'Menu', + manifest: { + category: '菜单', + coverImage: '', + description: '菜单', + name: 'Menu', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [ + { + defaultValue: 'light', + label: '主题颜色', + name: 'theme', + params: [ + { + label: 'Light', + value: 'light', + }, + { + label: 'Dark', + value: 'dark', + }, + ], + renderer: 'Select', + }, + { + defaultValue: 'vertical', + label: '菜单类型', + name: 'mode', + params: [ + { + label: 'Vertical', + value: 'vertical', + }, + { + label: 'VerticalRight', + value: 'vertical-right', + }, + { + label: 'Horizontal', + value: 'horizontal', + }, + { + label: 'Inline', + value: 'inline', + }, + ], + renderer: 'Select', + }, + { + label: '菜单缩进宽度', + name: 'inlineIndent', + params: { + defaultValue: 24, + min: 0, + }, + renderer: 'InputNumber', + }, + { + label: '菜单收起状态', + name: 'inlineCollapsed', + params: [ + { + label: '收起', + value: true, + }, + { + label: '展开', + value: false, + }, + ], + renderer: 'Radio', + }, + { + label: '鼠标进入子菜单后开启延时(秒)', + name: 'subMenuOpenDelay', + params: { + defaultValue: 0, + min: 0, + step: 0.1, + }, + renderer: 'InputNumber', + }, + { + label: '鼠标进入子菜单后关闭延时(秒)', + name: 'subMenuCloseDelay', + params: { + defaultValue: 0.1, + min: 0, + step: 0.1, + }, + renderer: 'InputNumber', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + Divider: Function t { + defaultProps: { + className: '', + disabled: true, + style: {}, + }, + propTypes: { + className: Function e { + isRequired: [Circular], + }, + rootPrefixCls: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + }, + }, + Item: Function t { + isMenuItem: true, + }, + ItemGroup: Function t { + defaultProps: { + disabled: true, + }, + isMenuItemGroup: true, + propTypes: { + className: Function e { + isRequired: [Circular], + }, + index: Function e { + isRequired: [Circular], + }, + renderMenuItem: Function e { + isRequired: [Circular], + }, + rootPrefixCls: Function e { + isRequired: [Circular], + }, + subMenuKey: Function e { + isRequired: [Circular], + }, + }, + }, + SubMenu: Function t { + contextTypes: { + antdMenuTheme: Function e { + isRequired: [Circular], + }, + }, + isSubMenu: 1, + }, + }, + }, + { + componentName: 'Modal', + manifest: { + category: '弹窗', + coverImage: 'https://img.alicdn.com/tfs/TB1yKYRvrorBKNjSZFjXXc_SpXa-523-355.png', + description: '弹窗', + name: 'Modal', + presets: [], + settings: { + handles: [ + 'delete', + ], + insertionModes: 'v', + props: [ + { + defaultValue: '弹窗标题', + label: '弹窗标题', + name: 'title', + renderer: 'Input', + }, + { + defaultValue: 'default', + label: '弹窗类型', + name: 'type', + params: [ + { + label: '无图标', + value: 'default', + }, + { + label: '警示型', + value: 'warning', + }, + { + label: '询问型', + value: 'confirm', + }, + { + label: '通知型-成功', + value: 'success', + }, + { + label: '通知型-失败', + value: 'error', + }, + ], + renderer: false, + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'container', + }, + }, + origin: Function t { + defaultProps: { + cancelButtonDisabled: false, + confirmLoading: false, + maskTransitionName: 'fade', + okButtonDisabled: false, + okType: 'primary', + transitionName: 'zoom', + visible: false, + width: 520, + }, + propTypes: { + align: Function e { + isRequired: [Circular], + }, + cancelText: Function e { + isRequired: [Circular], + }, + centered: Function e { + isRequired: [Circular], + }, + closable: Function e { + isRequired: [Circular], + }, + confirmLoading: Function e { + isRequired: [Circular], + }, + footer: Function e { + isRequired: [Circular], + }, + okText: Function e { + isRequired: [Circular], + }, + onCancel: Function e { + isRequired: [Circular], + }, + onOk: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + title: Function e { + isRequired: [Circular], + }, + visible: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Pagination', + manifest: { + category: '分页器', + coverImage: 'https://img.alicdn.com/tfs/TB1VA7BUY2pK1RjSZFsXXaNlXXa-362-38.png', + description: '分页器', + name: 'Pagination', + presets: [ + { + alias: '普通分页器', + colSpan: 24, + customProps: { + current: 5, + pageSize: 10, + total: 500, + }, + thumbnail: { + '#13C1C2': 'https://img.alicdn.com/tfs/TB1uXu2nTZmx1VjSZFGXXax2XXa-492-51.png', + '#1890FF': 'https://img.alicdn.com/tfs/TB1yibuUYrpK1RjSZTEXXcWAVXa-492-51.png', + '#4178FF': 'https://img.alicdn.com/tfs/TB1e4rAU7voK1RjSZFwXXciCFXa-492-51.png', + '#F5212D': 'https://img.alicdn.com/tfs/TB1yTrRU4jaK1RjSZKzXXXVwXXa-492-51.png', + '#FF6A00': 'https://img.alicdn.com/tfs/TB1sEnRU4jaK1RjSZKzXXXVwXXa-492-51.png', + default: 'https://img.alicdn.com/tfs/TB1yTrRU4jaK1RjSZKzXXXVwXXa-492-51.png', + }, + }, + { + alias: '简单分页器', + colSpan: 24, + customProps: { + current: 1, + pageSize: 10, + simple: true, + total: 50, + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1D6nvUVzqK1RjSZFCXXbbxVXa-492-42.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tb', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '', + label: '迷你', + name: 'size', + params: [ + { + label: '是', + value: 'small', + }, + { + label: '否', + value: '', + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '简单分页器', + name: 'simple', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: true, + label: '显示页长', + name: 'showSizeChanger', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: true, + label: '显示跳转', + name: 'showQuickJumper', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: 'right', + label: '对齐', + name: 'textAlign', + params: [ + { + label: '左侧', + value: 'left', + }, + { + label: '右侧', + value: 'right', + }, + { + label: '居中', + value: 'center', + }, + ], + renderer: 'Select', + }, + { + defaultValue: 1, + label: '当前页数', + name: 'current', + }, + { + defaultValue: 10, + label: '每页条数', + name: 'pageSize', + }, + { + defaultValue: 50, + label: '数据总数', + name: 'total', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t {}, + }, + { + componentName: 'Popconfirm', + manifest: { + category: '气泡确认框', + coverImage: 'https://img.alicdn.com/tfs/TB1PloavpkoBKNjSZFEXXbrEVXa-506-268.png', + description: '气泡确认框', + name: 'Popconfirm', + presets: [], + settings: { + handles: [ + 'delete', + ], + insertionModes: 'v', + props: [ + { + defaultValue: undefined, + label: '图标类型', + name: 'icon', + params: [ + { + label: '不显示', + value: undefined, + }, + { + label: '询问', + value: 'confirm', + }, + { + label: '成功', + value: 'success', + }, + { + label: '错误', + value: 'error', + }, + { + label: '警告', + value: 'warning', + }, + ], + renderer: 'Select', + }, + { + defaultValue: 'topLeft', + label: '位置', + name: 'placement', + params: [ + { + label: '上左', + value: 'topLeft', + }, + { + label: '上中', + value: 'top', + }, + { + label: '上右', + value: 'topRight', + }, + { + label: '左上', + value: 'leftTop', + }, + { + label: '左中', + value: 'left', + }, + { + label: '左下', + value: 'leftBottom', + }, + { + label: '右上', + value: 'rightTop', + }, + { + label: '右中', + value: 'right', + }, + { + label: '右下', + value: 'rightBottom', + }, + { + label: '下左', + value: 'bottomLeft', + }, + { + label: '下中', + value: 'bottom', + }, + { + label: '下右', + value: 'bottomRight', + }, + ], + renderer: 'Select', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'container', + }, + }, + origin: Function t { + defaultProps: { + icon: , + okType: 'primary', + placement: 'top', + transitionName: 'zoom-big', + trigger: 'click', + }, + }, + }, + { + componentName: 'Popover', + manifest: { + category: '气泡卡片', + coverImage: 'https://img.alicdn.com/tfs/TB1kChLvEOWBKNjSZKzXXXfWFXa-506-222.png', + description: '气泡卡片', + name: 'Popover', + presets: [], + settings: { + handles: [ + 'delete', + ], + insertionModes: 'v', + props: [ + { + defaultValue: undefined, + label: '标题', + name: 'title', + renderer: 'Input', + }, + { + defaultValue: 'topLeft', + label: '位置', + name: 'placement', + params: [ + { + label: '上左', + value: 'topLeft', + }, + { + label: '上中', + value: 'top', + }, + { + label: '上右', + value: 'topRight', + }, + { + label: '左上', + value: 'leftTop', + }, + { + label: '左中', + value: 'left', + }, + { + label: '左下', + value: 'leftBottom', + }, + { + label: '右上', + value: 'rightTop', + }, + { + label: '右中', + value: 'right', + }, + { + label: '右下', + value: 'rightBottom', + }, + { + label: '下左', + value: 'bottomLeft', + }, + { + label: '下中', + value: 'bottom', + }, + { + label: '下右', + value: 'bottomRight', + }, + ], + renderer: 'Select', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'container', + }, + }, + origin: Function t { + defaultProps: { + mouseEnterDelay: 0.1, + mouseLeaveDelay: 0.1, + overlayStyle: {}, + placement: 'top', + transitionName: 'zoom-big', + trigger: 'hover', + }, + }, + }, + { + componentName: 'Progress', + manifest: { + category: '进度条', + coverImage: 'https://img.alicdn.com/tfs/TB15yDup3mTBuNjy1XbXXaMrVXa-366-22.png', + description: '进度条', + name: 'Progress', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '100%', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: 50, + label: '当前值(0~100)', + name: 'percent', + params: { + max: 100, + min: 0, + }, + renderer: 'InputNumber', + }, + { + defaultValue: 'line', + label: '类型:', + name: 'type', + params: [ + { + label: '线形', + value: 'line', + }, + { + label: '圆形', + value: 'circle', + }, + { + label: '仪表盘', + value: 'dashboard', + }, + ], + renderer: 'Select', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_block', + }, + }, + origin: Function t { + defaultProps: { + gapDegree: 0, + percent: 0, + showInfo: true, + size: 'default', + strokeLinecap: 'round', + trailColor: '#f3f3f3', + type: 'line', + }, + propTypes: { + default: Function e { + isRequired: [Circular], + }, + format: Function e { + isRequired: [Circular], + }, + gapDegree: Function e { + isRequired: [Circular], + }, + percent: Function e { + isRequired: [Circular], + }, + showInfo: Function e { + isRequired: [Circular], + }, + status: Function e { + isRequired: [Circular], + }, + strokeColor: Function e { + isRequired: [Circular], + }, + strokeLinecap: Function e { + isRequired: [Circular], + }, + strokeWidth: Function e { + isRequired: [Circular], + }, + trailColor: Function e { + isRequired: [Circular], + }, + type: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Radio.Group', + manifest: { + category: '单复选项', + coverImage: 'https://img.alicdn.com/tfs/TB1pWoIUZbpK1RjSZFyXXX_qFXa-362-44.png', + description: '单选框组', + name: 'Radio.Group', + presets: [ + { + alias: '单选', + colSpan: 24, + customProps: { + buttonStyle: false, + defaultValue: '1', + disabled: false, + name: '', + options: [ + { + actived: true, + label: '杭州', + value: '1', + }, + { + actived: false, + label: '上海', + value: '2', + }, + { + actived: false, + label: '北京', + value: '3', + }, + ], + size: 'default', + }, + thumbnail: { + '#13C1C2': 'https://img.alicdn.com/tfs/TB1HTfuU3HqK1RjSZFEXXcGMXXa-492-60.png', + '#1890FF': 'https://img.alicdn.com/tfs/TB1EXZqh13tHKVjSZSgXXX4QFXa-492-60.png', + '#4178FF': 'https://img.alicdn.com/tfs/TB1AMPiU9rqK1RjSZK9XXXyypXa-492-60.png', + '#F5212D': 'https://img.alicdn.com/tfs/TB1Np6CU4jaK1RjSZFAXXbdLFXa-492-60.png', + '#FF6A00': 'https://img.alicdn.com/tfs/TB1UsMOb2c3T1VjSZLeXXbZsVXa-492-60.png', + default: 'https://img.alicdn.com/tfs/TB1Np6CU4jaK1RjSZFAXXbdLFXa-492-60.png', + }, + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + lifeCycle: { + didMount: Function didMount {}, + didUpdate: Function didUpdate {}, + }, + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: [ + { + actived: true, + textContent: '项目一', + value: '1', + }, + { + actived: false, + textContent: '项目二', + value: '2', + }, + ], + label: '项目:', + linkageProps: 'defaultValue', + name: 'items', + renderer: 'DynamicField', + }, + { + defaultValue: '1', + label: '默认选中:', + name: 'defaultValue', + renderer: false, + }, + { + defaultValue: false, + label: '禁用:', + name: 'disabled', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '风格:', + name: 'buttonStyle', + params: [ + { + label: '默认', + value: false, + }, + { + label: '描边', + value: 'outline', + }, + { + label: '填色', + value: 'solid', + }, + ], + renderer: 'Select', + }, + { + defaultValue: '', + label: 'name:', + name: 'name', + renderer: false, + }, + { + defaultValue: '自适', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + childContextTypes: { + radioGroup: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + buttonStyle: 'outline', + disabled: false, + }, + }, + }, + { + componentName: 'Radio.Button', + manifest: { + category: '单复选项', + coverImage: 'https://img.alicdn.com/tfs/TB1KQMmp7yWBuNjy0FpXXassXXa-336-46.png', + description: '单选框按钮', + name: 'Radio.Button', + presets: [], + settings: { + handles: [], + insertionModes: '', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + contextTypes: { + radioGroup: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Radio', + manifest: { + category: '单复选项', + coverImage: 'https://img.alicdn.com/tfs/TB1kj.Fp1uSBuNjy1XcXXcYjFXa-144-32.png', + description: '单选按钮', + name: 'Radio', + presets: [], + settings: { + handles: [], + insertionModes: '', + props: [ + { + defaultValue: '单选', + label: '文本内容', + name: 'textContent', + renderer: 'Input', + }, + { + defaultValue: false, + label: '是否选中', + name: 'defaultChecked', + params: [ + { + label: '选中', + value: true, + }, + { + label: '不选中', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '是否禁用', + name: 'disabled', + params: [ + { + label: '禁用', + value: true, + }, + { + label: '不禁用', + value: false, + }, + ], + renderer: 'Radio', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + Button: Function t { + contextTypes: { + radioGroup: Function e { + isRequired: [Circular], + }, + }, + }, + Group: Function t { + childContextTypes: { + radioGroup: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + buttonStyle: 'outline', + disabled: false, + }, + }, + contextTypes: { + radioGroup: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + type: 'radio', + }, + }, + }, + { + componentName: 'Rate', + manifest: { + category: '评分', + coverImage: 'https://img.alicdn.com/tfs/TB1XzeCTwDqK1RjSZSyXXaxEVXa-274-58.png', + description: '评分', + name: 'Rate', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_block', + }, + }, + origin: Function t { + defaultProps: { + character: , + }, + propTypes: { + character: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Select.Option', + manifest: { + category: '下拉框', + coverImage: '', + description: '选择框项', + name: 'Select.Option', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + isSelectOption: true, + propTypes: { + value: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Select.OptGroup', + manifest: { + category: '下拉框', + coverImage: '', + description: '选择框项组', + name: 'Select.OptGroup', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + isSelectOptGroup: true, + }, + }, + { + componentName: 'Select', + manifest: { + category: '下拉框', + coverImage: 'https://img.alicdn.com/tfs/TB1luEFU3HqK1RjSZFgXXa7JXXa-328-64.png', + description: '选择框', + name: 'Select', + presets: [ + { + alias: '单选下拉框', + colSpan: 24, + customProps: { + defaultValue: '1', + disabled: false, + options: [ + { + actived: true, + textContent: '项目一', + value: '1', + }, + { + actived: false, + textContent: '项目二', + value: '2', + }, + ], + placeholder: '请选择', + width: '224px', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1C1TrU8LoK1RjSZFuXXXn0XXa-492-96.png', + }, + { + alias: '多选下拉框', + colSpan: 24, + customProps: { + defaultValue: '1', + disabled: false, + mode: 'multiple', + options: [ + { + actived: true, + textContent: '项目一', + value: '1', + }, + { + actived: false, + textContent: '项目二', + value: '2', + }, + ], + placeholder: '请选择', + width: '224px', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1KfLAUVzqK1RjSZFvXXcB7VXa-492-96.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + lifeCycle: { + didMount: Function didMount {}, + didUnMount: Function didUnMount {}, + didUpdate: Function didUpdate {}, + willMount: Function willMount {}, + willUnMount: Function willUnMount {}, + willUpdate: Function willUpdate {}, + }, + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '224px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: '1', + label: '默认选中:', + name: 'defaultValue', + renderer: false, + }, + { + defaultValue: undefined, + label: '模式', + name: 'mode', + params: [ + { + label: '默认模式', + value: undefined, + }, + { + label: '多选模式', + value: 'multiple', + }, + { + label: '标签模式', + value: 'tags', + }, + { + label: '组合框模式', + value: 'combobox', + }, + ], + renderer: 'Select', + }, + { + defaultValue: '请选择', + label: '占位文字', + name: 'placeholder', + renderer: 'Input', + }, + { + defaultValue: [ + { + actived: true, + textContent: '项目一', + value: '1', + }, + { + actived: false, + textContent: '项目二', + value: '2', + }, + ], + label: '下拉选项', + linkageProps: 'defaultValue', + name: 'options', + renderer: 'DynamicField', + }, + { + defaultValue: Function defaultValue {}, + name: 'getPopupContainer', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + OptGroup: Function t { + isSelectOptGroup: true, + }, + Option: Function t { + isSelectOption: true, + propTypes: { + value: Function e { + isRequired: [Circular], + }, + }, + }, + SECRET_COMBOBOX_MODE_DO_NOT_USE: 'SECRET_COMBOBOX_MODE_DO_NOT_USE', + defaultProps: { + choiceTransitionName: 'zoom', + showSearch: false, + transitionName: 'slide-up', + }, + propTypes: { + choiceTransitionName: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + id: Function e { + isRequired: [Circular], + }, + notFoundContent: Function e { + isRequired: [Circular], + }, + optionLabelProp: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + showSearch: Function e { + isRequired: [Circular], + }, + size: Function e { + isRequired: [Circular], + }, + transitionName: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Skeleton', + manifest: { + category: '骨架屏', + coverImage: 'https://img.alicdn.com/tfs/TB1U1HeTxnaK1RjSZFtXXbC2VXa-1714-446.png', + description: '骨架屏', + name: 'Skeleton', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + avatar: false, + paragraph: true, + title: true, + }, + }, + }, + { + componentName: 'Slider', + manifest: { + category: '滑动条', + coverImage: 'https://img.alicdn.com/tfs/TB1PmYup3mTBuNjy1XbXXaMrVXa-364-28.png', + description: '滑动条', + name: 'Slider', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: 30, + label: '默认值', + name: 'defaultValue', + }, + { + defaultValue: '200px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: false, + label: '垂直方向', + name: 'vertical', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '拖拽到刻度', + name: 'dots', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + tipFormatter: Function tipFormatter {}, + }, + }, + }, + { + componentName: 'Spin', + manifest: { + category: 'Spin', + coverImage: 'https://img.alicdn.com/tfs/TB11reQTAvoK1RjSZFDXXXY3pXa-304-242.png', + description: 'Spin', + name: 'Spin', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + size: 'default', + spinning: true, + wrapperClassName: '', + }, + propTypes: { + className: Function e { + isRequired: [Circular], + }, + indicator: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + size: Function e { + isRequired: [Circular], + }, + spinning: Function e { + isRequired: [Circular], + }, + wrapperClassName: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Steps.Step', + manifest: { + category: '步骤', + coverImage: 'https://img.alicdn.com/tfs/TB1.VqTTzTpK1RjSZKPXXa3UpXa-86-86.png', + description: '步骤项', + name: 'Steps.Step', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [ + { + label: '标题', + name: 'title', + renderer: 'Input', + }, + { + defaultValue: 'wait', + hint: '当不配置该属性时,会使用 Steps 的 current 来自动指定状态。', + label: '指定状态', + name: 'status', + params: [ + { + label: 'wait', + value: 'wait', + }, + { + label: 'process', + value: 'process', + }, + { + label: 'finish', + value: 'finish', + }, + { + label: 'error', + value: 'error', + }, + ], + renderer: 'Select', + }, + { + label: '步骤图标类型', + name: 'icon', + renderer: 'Input', + }, + { + label: '步骤详情描述', + name: 'description', + renderer: 'TextArea', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + propTypes: { + adjustMarginRight: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + description: Function e { + isRequired: [Circular], + }, + icon: Function e { + isRequired: [Circular], + }, + iconPrefix: Function e { + isRequired: [Circular], + }, + icons: Function e { + isRequired: [Circular], + }, + itemWidth: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + progressDot: Function e { + isRequired: [Circular], + }, + status: Function e { + isRequired: [Circular], + }, + stepNumber: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + tailContent: Function e { + isRequired: [Circular], + }, + title: Function e { + isRequired: [Circular], + }, + wrapperStyle: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Steps', + manifest: { + category: '步骤', + coverImage: 'https://img.alicdn.com/tfs/TB16n3JX3mTBuNjy1XbXXaMrVXa-192-144.png', + description: '步骤', + name: 'Steps', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [ + { + defaultValue: 0, + label: '当前步骤数', + name: 'current', + params: { + defaultValue: 0, + min: 0, + }, + renderer: 'InputNumber', + }, + { + defaultValue: 'horizontal', + label: '步骤条方向', + name: 'direction', + params: [ + { + label: '水平', + value: 'horizontal', + }, + { + label: '垂直', + value: 'vertical', + }, + ], + renderer: 'Select', + }, + { + defaultValue: 'default', + label: '尺寸大小', + name: 'size', + params: [ + { + label: '普通', + value: 'default', + }, + { + label: '迷你', + value: 'small', + }, + ], + renderer: 'Select', + }, + { + defaultValue: 'process', + label: '当前步骤的状态', + name: 'status', + params: [ + { + label: 'wait', + value: 'wait', + }, + { + label: 'process', + value: 'process', + }, + { + label: 'finish', + value: 'finish', + }, + { + label: 'error', + value: 'error', + }, + ], + renderer: 'Select', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + Step: Function t { + propTypes: { + adjustMarginRight: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + description: Function e { + isRequired: [Circular], + }, + icon: Function e { + isRequired: [Circular], + }, + iconPrefix: Function e { + isRequired: [Circular], + }, + icons: Function e { + isRequired: [Circular], + }, + itemWidth: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + progressDot: Function e { + isRequired: [Circular], + }, + status: Function e { + isRequired: [Circular], + }, + stepNumber: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + tailContent: Function e { + isRequired: [Circular], + }, + title: Function e { + isRequired: [Circular], + }, + wrapperStyle: Function e { + isRequired: [Circular], + }, + }, + }, + defaultProps: { + current: 0, + }, + propTypes: { + current: Function e { + isRequired: [Circular], + }, + iconPrefix: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Switch', + manifest: { + category: '开关微标', + coverImage: 'https://img.alicdn.com/tfs/TB19lE7U4jaK1RjSZKzXXXVwXXa-133-66.png', + description: '开关', + name: 'Switch', + presets: [ + { + alias: '开关', + colSpan: 12, + customProps: { + defaultChecked: true, + }, + thumbnail: { + '#13C1C2': 'https://img.alicdn.com/tfs/TB1Gp2xUVzqK1RjSZFoXXbfcXXa-192-66.png', + '#1890FF': 'https://img.alicdn.com/tfs/TB1ZbryU9zqK1RjSZFpXXakSXXa-192-66.png', + '#4178FF': 'https://img.alicdn.com/tfs/TB1TGnGU4jaK1RjSZFAXXbdLFXa-192-66.png', + '#F5212D': 'https://img.alicdn.com/tfs/TB10tWVU9zqK1RjSZPcXXbTepXa-192-66.png', + '#FF6A00': 'https://img.alicdn.com/tfs/TB1b0TFUZfpK1RjSZFOXXa6nFXa-192-66.png', + default: 'https://img.alicdn.com/tfs/TB10tWVU9zqK1RjSZPcXXbTepXa-192-66.png', + }, + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: true, + label: '是否选中', + name: 'defaultChecked', + renderer: false, + }, + { + defaultValue: false, + label: '是否禁用', + name: 'disabled', + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + propTypes: { + className: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + size: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Table', + manifest: { + category: '表格', + coverImage: 'https://img.alicdn.com/tfs/TB1JjkHUVzqK1RjSZFoXXbfcXXa-362-124.png', + description: '表格', + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tb', + name: 'Table', + presets: [ + { + alias: '普通表格', + colSpan: 24, + customProps: { + bordered: false, + columns: [ + { + dataIndex: 'name', + key: 'name', + title: '我是标题1', + }, + { + dataIndex: 'age', + key: 'age', + title: '我是标题2', + }, + { + dataIndex: 'address', + key: 'address', + title: '我是标题3', + }, + ], + dataSource: [ + { + address: '我是内容', + age: '我是内容', + key: '1', + name: '我是内容', + }, + { + address: '我是内容', + age: '我是内容', + key: '2', + name: '没错,我是内容', + }, + { + address: '我是内容', + age: '我是内容', + key: '3', + name: '我是内容', + }, + { + address: '我是很长很长很长的内容...', + age: '我是很长很长很长很长很长很长的内容...', + key: '4', + name: '而且还是很长的内容', + }, + { + address: '我是内容', + age: '我是内容', + key: '5', + name: '我是内容', + }, + ], + pagination: false, + }, + thumbnail: { + '#13C1C2': 'https://img.alicdn.com/tfs/TB1XN2rUYPpK1RjSZFFXXa5PpXa-492-168.png', + '#1890FF': 'https://img.alicdn.com/tfs/TB1e9HsUY2pK1RjSZFsXXaNlXXa-492-168.png', + '#4178FF': 'https://img.alicdn.com/tfs/TB1OsfnU6DpK1RjSZFrXXa78VXa-492-168.png', + '#F5212D': 'https://img.alicdn.com/tfs/TB1HDjmU3TqK1RjSZPhXXXfOFXa-492-168.png', + '#FF6A00': 'https://img.alicdn.com/tfs/TB1yZYuU9zqK1RjSZFjXXblCFXa-492-168.png', + default: 'https://img.alicdn.com/tfs/TB1HDjmU3TqK1RjSZPhXXXfOFXa-492-168.png', + }, + }, + ], + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + label: '边框', + name: 'border', + renderer: 'BarBorder', + }, + { + defaultValue: false, + label: '分页器', + name: 'pagination', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: [ + { + address: '西湖区湖底公园1号', + age: '32', + key: '1', + name: '胡彦斌', + }, + { + address: '西湖区湖底公园1号', + age: '42', + key: '2', + name: '胡彦祖', + }, + ], + label: '数据配置', + name: 'dataSource', + renderer: 'DataTable', + }, + { + defaultValue: [ + { + dataIndex: 'name', + key: 'name', + title: '姓名', + }, + { + dataIndex: 'age', + key: 'age', + title: '年龄', + }, + { + dataIndex: 'address', + key: 'address', + title: '住址', + }, + ], + label: '行配置', + name: 'columns', + renderer: false, + }, + ], + settings: undefined, + shouldActive: true, + shouldDrag: true, + type: 'element_block', + }, + origin: Function t { + Column: Function t {}, + ColumnGroup: Function t { + __ANT_TABLE_COLUMN_GROUP: true, + }, + defaultProps: { + bordered: false, + className: '', + dataSource: [], + indentSize: 20, + loading: false, + locale: {}, + rowKey: 'key', + showHeader: true, + size: 'default', + sortDirections: [ + 'ascend', + 'descend', + ], + useFixedHeader: false, + }, + propTypes: { + bordered: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + columns: Function e { + isRequired: [Circular], + }, + dataSource: Function e { + isRequired: [Circular], + }, + dropdownPrefixCls: Function e { + isRequired: [Circular], + }, + loading: Function e { + isRequired: [Circular], + }, + locale: Function e { + isRequired: [Circular], + }, + onChange: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + rowSelection: Function e { + isRequired: [Circular], + }, + size: Function e { + isRequired: [Circular], + }, + sortDirections: Function e { + isRequired: [Circular], + }, + useFixedHeader: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Transfer', + manifest: { + category: '', + coverImage: '', + description: '穿梭框', + name: 'Transfer', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + List: Function t { + defaultProps: { + dataSource: [], + lazy: {}, + render: Function bT {}, + showSearch: false, + titleText: '', + }, + }, + Operation: Function t {}, + Search: Function t { + defaultProps: { + placeholder: '', + }, + }, + defaultProps: { + dataSource: [], + locale: {}, + render: Function render {}, + showSearch: false, + }, + propTypes: { + body: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + dataSource: Function e { + isRequired: [Circular], + }, + disabled: Function e { + isRequired: [Circular], + }, + filterOption: Function e { + isRequired: [Circular], + }, + footer: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + lazy: Function e { + isRequired: [Circular], + }, + listStyle: Function e { + isRequired: [Circular], + }, + locale: Function e { + isRequired: [Circular], + }, + notFoundContent: Function e { + isRequired: [Circular], + }, + onChange: Function e { + isRequired: [Circular], + }, + operationStyle: Function e { + isRequired: [Circular], + }, + operations: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + render: Function e { + isRequired: [Circular], + }, + rowKey: Function e { + isRequired: [Circular], + }, + searchPlaceholder: Function e { + isRequired: [Circular], + }, + showSearch: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + targetKeys: Function e { + isRequired: [Circular], + }, + titles: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Tree.TreeNode', + manifest: { + category: '树控件', + coverImage: '', + description: '树节点控件', + name: 'Tree.TreeNode', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: '', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + childContextTypes: { + rcTree: Function e { + isRequired: [Circular], + }, + rcTreeNode: Function e { + isRequired: [Circular], + }, + }, + contextTypes: { + rcTree: Function e { + isRequired: [Circular], + }, + rcTreeNode: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + title: '---', + }, + isTreeNode: 1, + propTypes: { + checked: Function e { + isRequired: [Circular], + }, + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + disableCheckbox: Function e { + isRequired: [Circular], + }, + disabled: Function e { + isRequired: [Circular], + }, + dragOver: Function e { + isRequired: [Circular], + }, + dragOverGapBottom: Function e { + isRequired: [Circular], + }, + dragOverGapTop: Function e { + isRequired: [Circular], + }, + eventKey: Function e { + isRequired: [Circular], + }, + expanded: Function e { + isRequired: [Circular], + }, + halfChecked: Function e { + isRequired: [Circular], + }, + icon: Function e { + isRequired: [Circular], + }, + isLeaf: Function e { + isRequired: [Circular], + }, + loaded: Function e { + isRequired: [Circular], + }, + loading: Function e { + isRequired: [Circular], + }, + onSelect: Function e { + isRequired: [Circular], + }, + pos: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + root: Function e { + isRequired: [Circular], + }, + selectable: Function e { + isRequired: [Circular], + }, + selected: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + switcherIcon: Function e { + isRequired: [Circular], + }, + title: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Tree', + manifest: { + category: '树控件', + coverImage: 'https://img.alicdn.com/tfs/TB1yEZFU9zqK1RjSZFjXXblCFXa-136-188.png', + description: '树控件', + name: 'Tree', + presets: [ + { + alias: '树形控件', + colSpan: 12, + customProps: { + dataSource: [ + { + children: [ + { + children: [ + { + key: '0-0-0-0', + title: 'leaf', + }, + { + key: '0-0-0-1', + title: 'leaf', + }, + { + key: '0-0-0-2', + title: 'leaf', + }, + ], + key: '0-0-0', + title: 'parent 1-0', + }, + { + children: [ + { + key: '0-0-1-0', + title: 'leaf', + }, + { + key: '0-0-1-1', + title: 'leaf', + }, + ], + key: '0-0-1', + title: 'parent 1-1', + }, + { + children: [ + { + key: '0-0-2-0', + title: 'leaf', + }, + ], + key: '0-0-2', + title: 'parent 1-2', + }, + ], + key: '0-0', + title: 'parent 1', + }, + ], + expandedKeys: [ + '0-0-0', + ], + showLine: true, + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1_JcqtQyWBuNjy0FpXXassXXa-172-298.png', + }, + { + alias: '树形可选择', + colSpan: 12, + customProps: { + checkable: true, + checkedKeys: [ + '0-0-0', + '0-0-1', + ], + dataSource: [ + { + children: [ + { + children: [ + { + key: '0-0-0-0', + title: '0-0-0-0', + }, + { + key: '0-0-0-1', + title: '0-0-0-1', + }, + ], + key: '0-0-0', + title: '0-0-0', + }, + { + children: [ + { + key: '0-0-1-0', + title: '0-0-1-0', + }, + { + key: '0-0-1-1', + title: '0-0-1-1', + }, + ], + key: '0-0-1', + title: '0-0-1', + }, + { + key: '0-0-2', + title: '0-0-2', + }, + ], + key: '0-0', + title: '0-0', + }, + { + children: [ + { + key: '0-1-0', + title: '0-1-0', + }, + ], + key: '0-1', + title: '0-1', + }, + { + key: '0-2', + title: '0-2', + }, + ], + expandedKeys: [ + '0-0', + ], + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1Kn2ttMmTBuNjy1XbXXaMrVXa-172-298.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + lifeCycle: { + didMount: Function didMount {}, + didUnMount: Function didUnMount {}, + didUpdate: Function didUpdate {}, + willMount: Function willMount {}, + willUnMount: Function willUnMount {}, + willUpdate: Function willUpdate {}, + }, + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: false, + label: '是否可选择', + name: 'checkable', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: false, + }, + { + defaultValue: false, + label: '是否显示连接线', + name: 'showLine', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: false, + }, + { + defaultValue: [ + { + children: [ + { + children: [ + { + key: '0-0-0-0', + title: '0-1-0-0', + }, + { + key: '0-0-0-1', + title: '0-1-0-1', + }, + ], + key: '0-0-0', + title: '0-1-0', + }, + { + children: [ + { + key: '0-0-1-0', + title: '0-1-1-0', + }, + { + key: '0-0-1-1', + title: '0-1-1-1', + }, + ], + key: '0-0-1', + title: '0-1-1', + }, + { + key: '0-0-2', + title: '0-1-2', + }, + ], + key: '0-0', + title: '0-1', + }, + { + key: '0-1', + title: '0-2', + }, + ], + label: '数据配置', + name: 'dataSource', + renderer: 'DataTree', + }, + { + defaultValue: [], + label: '默认选中树节点 key', + name: 'checkedKeys', + renderer: false, + }, + { + defaultValue: [ + '0-0', + ], + label: '默认展开项 key', + name: 'expandedKeys', + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + DirectoryTree: Function t { + defaultProps: { + expandAction: 'click', + showIcon: true, + }, + }, + TreeNode: Function t { + childContextTypes: { + rcTree: Function e { + isRequired: [Circular], + }, + rcTreeNode: Function e { + isRequired: [Circular], + }, + }, + contextTypes: { + rcTree: Function e { + isRequired: [Circular], + }, + rcTreeNode: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + title: '---', + }, + isTreeNode: 1, + propTypes: { + checked: Function e { + isRequired: [Circular], + }, + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + disableCheckbox: Function e { + isRequired: [Circular], + }, + disabled: Function e { + isRequired: [Circular], + }, + dragOver: Function e { + isRequired: [Circular], + }, + dragOverGapBottom: Function e { + isRequired: [Circular], + }, + dragOverGapTop: Function e { + isRequired: [Circular], + }, + eventKey: Function e { + isRequired: [Circular], + }, + expanded: Function e { + isRequired: [Circular], + }, + halfChecked: Function e { + isRequired: [Circular], + }, + icon: Function e { + isRequired: [Circular], + }, + isLeaf: Function e { + isRequired: [Circular], + }, + loaded: Function e { + isRequired: [Circular], + }, + loading: Function e { + isRequired: [Circular], + }, + onSelect: Function e { + isRequired: [Circular], + }, + pos: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + root: Function e { + isRequired: [Circular], + }, + selectable: Function e { + isRequired: [Circular], + }, + selected: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + switcherIcon: Function e { + isRequired: [Circular], + }, + title: Function e { + isRequired: [Circular], + }, + }, + }, + defaultProps: { + blockNode: false, + checkable: false, + openAnimation: { + appear: null, + enter: Function enter {}, + leave: Function leave {}, + }, + showIcon: false, + }, + }, + }, + { + componentName: 'Form.Item', + manifest: { + category: '表格', + coverImage: 'https://img.alicdn.com/tfs/TB1OnJNaG61gK0jSZFlXXXDKFXa-324-66.png', + description: '表单行', + name: 'Form.Item', + presets: [ + { + alias: '表单行', + colSpan: 24, + customProps: {}, + thumbnail: 'https://img.alicdn.com/tfs/TB1OnJNaG61gK0jSZFlXXXDKFXa-324-66.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbv', + lifeCycle: { + didMount: Function didMount {}, + }, + props: [ + { + defaultValue: '标签', + label: '标签', + name: 'label', + }, + { + defaultValue: '', + label: '提示信息', + name: 'help', + renderer: 'Input', + }, + { + defaultValue: false, + label: '显示冒号', + name: 'colon', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + hint: '如不设置,则会根据校验规则自动生成', + label: '是否必填', + name: 'required', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: { + span: 4, + }, + label: 'label 标签布局', + name: 'labelCol', + }, + { + defaultValue: { + span: 20, + }, + label: '输入区域布局', + name: 'wrapperCol', + }, + { + label: '属性配置', + name: 'formLayout', + renderer: 'FormLayout', + }, + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '16px', + label: '', + name: 'marginBottom', + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'container', + }, + }, + origin: Function t { + defaultProps: { + hasFeedback: false, + }, + propTypes: { + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + colon: Function e { + isRequired: [Circular], + }, + hasFeedback: Function e { + isRequired: [Circular], + }, + help: Function e { + isRequired: [Circular], + }, + id: Function e { + isRequired: [Circular], + }, + label: Function e { + isRequired: [Circular], + }, + labelAlign: Function e { + isRequired: [Circular], + }, + labelCol: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + validateStatus: Function e { + isRequired: [Circular], + }, + wrapperCol: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Form', + manifest: { + category: '表单', + coverImage: 'https://img.alicdn.com/tfs/TB1OnJNaG61gK0jSZFlXXXDKFXa-324-66.png', + description: '表单', + name: 'Form', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbv', + lifeCycle: { + didMount: Function didMount {}, + didUpdate: Function didUpdate {}, + }, + props: [ + { + defaultValue: 'horizontal', + label: '表单布局', + name: 'layout', + params: [ + { + label: '水平排列', + value: 'horizontal', + }, + { + label: '垂直排列', + value: 'vertical', + }, + { + label: '行内排列', + value: 'inline', + }, + ], + renderer: 'Select', + }, + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '16px', + label: '', + name: 'marginBottom', + renderer: false, + }, + { + label: '内边距', + name: 'padding', + renderer: 'Quadrant', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'container', + }, + }, + origin: Function t { + Item: Function t { + defaultProps: { + hasFeedback: false, + }, + propTypes: { + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + colon: Function e { + isRequired: [Circular], + }, + hasFeedback: Function e { + isRequired: [Circular], + }, + help: Function e { + isRequired: [Circular], + }, + id: Function e { + isRequired: [Circular], + }, + label: Function e { + isRequired: [Circular], + }, + labelAlign: Function e { + isRequired: [Circular], + }, + labelCol: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + validateStatus: Function e { + isRequired: [Circular], + }, + wrapperCol: Function e { + isRequired: [Circular], + }, + }, + }, + create: Function {}, + createFormField: Function NE {}, + defaultProps: { + colon: true, + hideRequiredMark: false, + layout: 'horizontal', + onSubmit: Function onSubmit {}, + }, + propTypes: { + children: Function e { + isRequired: [Circular], + }, + colon: Function e { + isRequired: [Circular], + }, + hideRequiredMark: Function e { + isRequired: [Circular], + }, + layout: Function e { + isRequired: [Circular], + }, + onSubmit: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Tabs.TabPane', + manifest: { + category: '选项卡', + coverImage: 'https://img.alicdn.com/tfs/TB1SEZOp21TBuNjy0FjXXajyXXa-362-38.png', + description: '选项卡面板', + name: 'Tabs.TabPane', + presets: [], + settings: { + handles: [ + 'paste', + ], + insertionModes: 'v', + props: [], + shouldActive: true, + shouldDrag: false, + type: 'container', + }, + }, + origin: Function t { + defaultProps: { + placeholder: null, + }, + propTypes: { + active: Function e { + isRequired: [Circular], + }, + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + destroyInactiveTabPane: Function e { + isRequired: [Circular], + }, + forceRender: Function e { + isRequired: [Circular], + }, + id: Function e { + isRequired: [Circular], + }, + placeholder: Function e { + isRequired: [Circular], + }, + rootPrefixCls: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Tabs', + manifest: { + category: '选项卡', + coverImage: 'https://img.alicdn.com/tfs/TB1SEZOp21TBuNjy0FjXXajyXXa-362-38.png', + description: '选项卡', + name: 'Tabs', + presets: [ + { + alias: '普通选项卡', + colSpan: 24, + customProps: { + defaultActiveKey: '2', + options: [ + { + actived: false, + textContent: '选中文字', + value: '1', + }, + { + actived: true, + textContent: '可选文字', + value: '2', + }, + { + actived: false, + disabled: true, + textContent: '不可选文字', + value: '3', + }, + ], + type: 'line', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1Jh2.pVOWBuNjy0FiXXXFxVXa-362-52.png', + }, + { + alias: '卡片选项卡', + colSpan: 24, + customProps: { + defaultActiveKey: '2', + options: [ + { + actived: false, + textContent: '选中文字', + value: '1', + }, + { + actived: true, + textContent: '可选文字', + value: '2', + }, + { + actived: false, + disabled: true, + textContent: '不可选文字', + value: '3', + }, + ], + type: 'card', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1SEZOp21TBuNjy0FjXXajyXXa-362-38.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + lifeCycle: { + didMount: Function didMount {}, + didUpdate: Function didUpdate {}, + }, + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: [ + { + actived: true, + textContent: '选中文字', + value: '1', + }, + { + actived: false, + textContent: '可选文字', + value: '2', + }, + { + actived: false, + disabled: true, + textContent: '不可选文字', + value: '3', + }, + ], + label: '项目:', + linkageProps: 'defaultActiveKey', + name: 'options', + renderer: 'DynamicField', + }, + { + defaultValue: '1', + label: '默认选中:', + name: 'defaultActiveKey', + renderer: false, + }, + { + label: '卡片类型', + name: 'type', + params: [ + { + label: '基本', + value: 'line', + }, + { + label: '卡片', + value: 'card', + }, + ], + renderer: 'Select', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_block', + }, + }, + origin: Function t { + TabPane: Function t { + defaultProps: { + placeholder: null, + }, + propTypes: { + active: Function e { + isRequired: [Circular], + }, + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + destroyInactiveTabPane: Function e { + isRequired: [Circular], + }, + forceRender: Function e { + isRequired: [Circular], + }, + id: Function e { + isRequired: [Circular], + }, + placeholder: Function e { + isRequired: [Circular], + }, + rootPrefixCls: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + }, + }, + defaultProps: { + hideAdd: false, + tabPosition: 'top', + }, + }, + }, + { + componentName: 'Tag.CheckableTag', + manifest: { + category: '标签', + coverImage: '', + description: '可选择标签', + name: 'Tag.CheckableTag', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'lr', + props: [ + { + defaultValue: false, + label: '选中状态', + name: 'checked', + params: [ + { + label: '选中', + value: true, + }, + { + label: '不选中', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: '标签', + label: '内容', + name: 'textContent', + renderer: 'Input', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t {}, + }, + { + componentName: 'Tag', + manifest: { + category: '标签', + coverImage: 'https://img.alicdn.com/tfs/TB1n9gKU7voK1RjSZFNXXcxMVXa-120-66.png', + description: '标签', + name: 'Tag', + presets: [ + { + alias: '普通标签', + colSpan: 12, + customProps: { + textContent: '标签', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1wPnvU5rpK1RjSZFhXXXSdXXa-192-66.png', + }, + { + alias: '可关闭标签', + colSpan: 12, + customProps: { + closable: true, + textContent: '标签', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1RZvVU4naK1RjSZFBXXcW7VXa-192-66.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'lr', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: undefined, + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + label: '标签色', + name: 'color', + renderer: 'Color', + }, + { + label: '背景色', + name: 'backgroundColor', + renderer: 'Color', + }, + { + label: '边框', + name: 'border', + renderer: 'BarBorder', + }, + { + defaultValue: '标签', + label: '内容', + name: 'textContent', + renderer: 'Input', + }, + { + defaultValue: false, + label: '可关闭', + name: 'closable', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + CheckableTag: Function t {}, + defaultProps: { + closable: false, + }, + }, + }, + { + componentName: 'TimePicker', + manifest: { + category: '日期选择', + coverImage: 'https://img.alicdn.com/tfs/TB1up6zDTtYBeNjy1XdXXXXyVXa-362-64.png', + description: '时间选择框', + name: 'TimePicker', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '224px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: '选择时间', + name: 'placeholder', + }, + { + defaultValue: Function defaultValue {}, + name: 'getPopupContainer', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + align: { + offset: [ + 0, + -2, + ], + }, + disabled: false, + disabledHours: undefined, + disabledMinutes: undefined, + disabledSeconds: undefined, + focusOnOpen: true, + hideDisabledOptions: false, + placement: 'bottomLeft', + transitionName: 'slide-up', + }, + }, + }, + { + componentName: 'Timeline.Item', + manifest: { + category: '', + coverImage: '', + description: '时间轴项', + name: 'Timeline.Item', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function Nz { + defaultProps: { + color: 'blue', + pending: false, + }, + }, + }, + { + componentName: 'Timeline', + manifest: { + category: '时间轴', + coverImage: 'https://img.alicdn.com/tfs/TB1K5MTcUWF3KVjSZPhXXXclXXa-658-320.png', + description: '时间轴', + name: 'Timeline', + presets: [ + { + alias: '时间轴', + colSpan: 24, + customProps: { + options: [ + { + textContent: 'Create a services site 2015-09-01', + }, + { + textContent: 'Solve initial network problems 2015-09-01', + }, + { + textContent: 'Technical testing 2015-09-01', + }, + { + textContent: 'Network problems being solved 2015-09-01', + }, + ], + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1K5MTcUWF3KVjSZPhXXXclXXa-658-320.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tb', + lifeCycle: { + didMount: Function didMount {}, + didUnMount: Function didUnMount {}, + didUpdate: Function didUpdate {}, + willMount: Function willMount {}, + willUnMount: Function willUnMount {}, + willUpdate: Function willUpdate {}, + }, + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '100%', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: 'left', + label: '位置', + name: 'mode', + params: [ + { + label: 'left', + value: 'left', + }, + { + label: 'alternate', + value: 'alternate', + }, + { + label: 'right', + value: 'right', + }, + ], + renderer: 'Select', + }, + { + defaultValue: [ + { + textContent: 'Create a services site 2015-09-01', + }, + { + textContent: 'Solve initial network problems 2015-09-01', + }, + { + textContent: 'Technical testing 2015-09-01', + }, + { + textContent: 'Network problems being solved 2015-09-01', + }, + ], + label: '设置选择项:', + name: 'options', + renderer: 'DynamicField', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_block', + }, + }, + origin: Function t { + Item: Function Nz { + defaultProps: { + color: 'blue', + pending: false, + }, + }, + defaultProps: { + mode: '', + reverse: false, + }, + }, + }, + { + componentName: 'Tooltip', + manifest: { + category: '', + coverImage: '', + description: 'Tooltip', + name: 'Tooltip', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + arrowPointAtCenter: false, + autoAdjustOverflow: true, + mouseEnterDelay: 0.1, + mouseLeaveDelay: 0.1, + placement: 'top', + transitionName: 'zoom-big-fast', + }, + }, + }, + { + componentName: 'Mention', + manifest: { + category: '', + coverImage: '', + description: 'Mention', + name: 'Mention', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [ + { + label: '值', + name: 'value', + renderer: 'Input', + }, + { + defaultValue: false, + label: '自动获取焦点', + name: 'autoFocus', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '多行模式', + name: 'multiLines', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '是否禁用状态', + name: 'disabled', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '是否只读', + name: 'readOnly', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + label: '未找到时的内容', + name: 'notFoundContent', + params: { + defaultValue: '无匹配结果,轻敲空格完成输入', + }, + renderer: 'Input', + }, + { + label: '输入框默认文字', + name: 'placeholder', + renderer: 'Input', + }, + { + defaultValue: 'bottom', + label: '建议框位置', + name: 'placement', + params: [ + { + label: '靠上', + value: 'top', + }, + { + label: '靠下', + value: 'bottom', + }, + ], + renderer: 'Select', + }, + { + label: '触发弹出下拉框的字符', + name: 'prefix', + params: { + defaultValue: '@', + }, + renderer: 'Input', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + Nav: Function t {}, + defaultProps: { + loading: false, + multiLines: false, + notFoundContent: 'No matches found', + placement: 'bottom', + }, + getMentions: Function uP {}, + toContentState: Function xP {}, + toString: Function wP {}, + }, + }, + { + componentName: 'Upload', + manifest: { + category: '文件上传', + coverImage: 'https://img.alicdn.com/tfs/TB15n3JX3mTBuNjy1XbXXaMrVXa-192-144.png', + description: '文件上传', + name: 'Upload', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'v', + props: [ + { + defaultValue: '//jsonplaceholder.typicode.com/posts/', + label: '上传的地址', + name: 'action', + renderer: 'Input', + }, + { + defaultValue: 'file', + label: '发到后台的文件参数名', + name: 'name', + renderer: false, + }, + { + defaultValue: 'text', + label: '上传列表的内建样式', + name: 'listType', + params: [ + { + label: 'Text', + value: 'text', + }, + { + label: 'Picture', + value: 'picture', + }, + { + label: 'PictureCard', + value: 'picture-card', + }, + ], + renderer: 'Select', + }, + { + defaultValue: false, + hint: 'ie10+ 支持。开启后按住 ctrl 可选择多个文件。', + label: '是否支持多选文件', + name: 'multiple', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + accept: '', + action: '', + beforeUpload: Function beforeUpload {}, + className: '', + data: {}, + disabled: false, + listType: 'text', + multiple: false, + showUploadList: true, + supportServerRender: true, + type: 'select', + }, + }, + }, + { + componentName: 'TreeSelect', + manifest: { + category: '树控件', + coverImage: '', + description: '树形选择框', + name: 'TreeSelect', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tb', + props: [], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + SHOW_ALL: 'SHOW_ALL', + SHOW_CHILD: 'SHOW_CHILD', + SHOW_PARENT: 'SHOW_PARENT', + TreeNode: Function XD { + isTreeNode: 1, + propTypes: { + checked: Function e { + isRequired: [Circular], + }, + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + disableCheckbox: Function e { + isRequired: [Circular], + }, + disabled: Function e { + isRequired: [Circular], + }, + dragOver: Function e { + isRequired: [Circular], + }, + dragOverGapBottom: Function e { + isRequired: [Circular], + }, + dragOverGapTop: Function e { + isRequired: [Circular], + }, + eventKey: Function e { + isRequired: [Circular], + }, + expanded: Function e { + isRequired: [Circular], + }, + halfChecked: Function e { + isRequired: [Circular], + }, + icon: Function e { + isRequired: [Circular], + }, + isLeaf: Function e { + isRequired: [Circular], + }, + loaded: Function e { + isRequired: [Circular], + }, + loading: Function e { + isRequired: [Circular], + }, + onSelect: Function e { + isRequired: [Circular], + }, + pos: Function e { + isRequired: [Circular], + }, + prefixCls: Function e { + isRequired: [Circular], + }, + root: Function e { + isRequired: [Circular], + }, + selectable: Function e { + isRequired: [Circular], + }, + selected: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + switcherIcon: Function e { + isRequired: [Circular], + }, + title: Function e { + isRequired: [Circular], + }, + value: Function UD {}, + }, + }, + defaultProps: { + choiceTransitionName: 'zoom', + showSearch: false, + transitionName: 'slide-up', + }, + }, + }, + { + componentName: 'Alert', + manifest: { + category: '提示', + coverImage: 'https://img.alicdn.com/tfs/TB1cXAGU8LoK1RjSZFuXXXn0XXa-362-38.png', + description: '提示', + name: 'Alert', + presets: [ + { + alias: '普通提示', + colSpan: 24, + customProps: { + banner: false, + closable: false, + closeText: '', + description: '', + message: '提示信息', + showIcon: true, + type: 'info', + }, + thumbnail: { + '#13C1C2': 'https://img.alicdn.com/tfs/TB1xZu_U9rqK1RjSZK9XXXyypXa-492-51.png', + '#1890FF': 'https://img.alicdn.com/tfs/TB1pkDjU3HqK1RjSZFEXXcGMXXa-492-51.png', + '#4178FF': 'https://img.alicdn.com/tfs/TB19wPnUVzqK1RjSZFvXXcB7VXa-492-51.png', + '#F5212D': 'https://img.alicdn.com/tfs/TB11zzpU3HqK1RjSZFkXXX.WFXa-492-51.png', + '#FF6A00': 'https://img.alicdn.com/tfs/TB12A7eh13tHKVjSZSgXXX4QFXa-492-51.png', + default: 'https://img.alicdn.com/tfs/TB11zzpU3HqK1RjSZFkXXX.WFXa-492-51.png', + }, + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'rl', + props: [ + { + defaultValue: 'info', + label: '警告提示样式', + name: 'type', + params: [ + { + label: 'Info', + value: 'info', + }, + { + label: 'Success', + value: 'success', + }, + { + label: 'Warning', + value: 'warning', + }, + { + label: 'Error', + value: 'error', + }, + ], + renderer: 'Select', + }, + { + label: '警告提示内容', + name: 'message', + renderer: 'Input', + }, + { + hint: '警告提示的辅助性文字介绍', + label: '警告提示描述', + name: 'description', + renderer: 'TextArea', + }, + { + defaultValue: false, + label: '是否显示辅助图标', + name: 'showIcon', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + defaultValue: false, + label: '是否显示关闭按钮', + name: 'closable', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + { + hint: '只在显示关闭按钮下有效', + label: '自定义关闭按钮', + name: 'closeText', + renderer: 'Input', + }, + { + defaultValue: false, + label: '是否用作顶部公告', + name: 'banner', + params: [ + { + label: '是', + value: true, + }, + { + label: '否', + value: false, + }, + ], + renderer: 'Radio', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_block', + }, + }, + origin: Function t {}, + }, + { + componentName: 'Anchor', + manifest: { + category: '锚点', + coverImage: '', + description: '锚点', + name: 'Anchor', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + defaultValue: true, + label: 'affix', + name: 'affix', + renderer: '', + }, + { + label: 'showInkInFixed', + name: 'showInkInFixed', + renderer: '', + }, + ], + shouldActive: false, + shouldDrag: false, + type: 'element_inline', + }, + }, + origin: Function t { + childContextTypes: { + antAnchor: Function e { + isRequired: [Circular], + }, + }, + defaultProps: { + affix: true, + getContainer: Function getContainer {}, + showInkInFixed: false, + }, + }, + }, + ], + pkgInfo: { + defaultExportedName: '', + originalPackage: 'antd', + originalVersion: '3.16.3', + package: '@ali/aimake-antd', + version: '0.0.27', + }, + version: '1.0.0', + }, + ] + +## load @ali/aimake-basic@0.0.29 package + +> Snapshot 1 + + [ + { + components: [ + { + componentName: 'AIMakeBlank', + manifest: { + category: '布局', + coverImage: 'https://img.alicdn.com/tfs/TB1un9tqntYBeNjy1XdXXXXyVXa-366-124.png', + description: '空白卡片', + name: 'AIMakeBlank', + presets: [ + { + alias: '空白卡片', + colSpan: 12, + customProps: { + backgroundColor: '#FFF', + id: '', + padding: '12px', + textAlign: 'left', + width: '100%', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1ucPNVsbpK1RjSZFyXXX_qFXa-198-120.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrlv', + lifeCycle: { + didMount: Function didMount {}, + didUpdate: Function didUpdate {}, + }, + props: [ + { + defaultValue: '', + label: 'id', + name: 'id', + renderer: 'Input', + }, + { + defaultValue: 'left', + label: '水平对齐', + name: 'textAlign', + renderer: 'TextAlign', + }, + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '12px', + label: '内边距', + name: 'padding', + renderer: 'Quadrant', + }, + { + defaultValue: '100%', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: undefined, + label: '高度', + name: 'height', + renderer: 'Height', + }, + { + defaultValue: '#FFF', + label: '背景颜色', + name: 'backgroundColor', + renderer: 'Color', + }, + { + label: '边框', + name: 'border', + renderer: 'BarBorder', + }, + { + label: '布局设置', + name: 'display', + renderer: 'FlexLayout', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'container', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakeIcon', + manifest: { + category: 'AIMakeIcon', + coverImage: '', + description: '图标', + name: 'AIMakeIcon', + presets: [], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'rl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '#333', + label: '图标颜色', + name: 'color', + renderer: 'Color', + }, + { + defaultValue: '16px', + label: '图标大小', + name: 'fontSize', + renderer: 'FontSize', + }, + { + defaultValue: 'inline-block', + label: '显示', + name: 'display', + }, + { + defaultValue: 'iconfont', + label: '图标类型', + name: 'className', + params: { + placeholder: '请输入Iconfont名', + }, + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + createFromIconfont: Function se {}, + defaultProps: { + children: '', + className: '', + iconClassName: 'iconfont', + style: {}, + }, + propTypes: { + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + iconClassName: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + styleBackground: Function e { + isRequired: [Circular], + }, + styleBoxModel: Function e { + isRequired: [Circular], + }, + styleText: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakeImage', + manifest: { + category: '线条图像', + coverImage: 'https://img.alicdn.com/tfs/TB17gMFp1uSBuNjy1XcXXcYjFXa-172-120.png', + description: '图片', + name: 'AIMakeImage', + presets: [ + { + alias: '图片', + colSpan: 12, + customProps: { + height: '126px', + src: 'https://img.alicdn.com/tfs/TB1RtEMGbSYBuNjSspfXXcZCpXa-448-252.png', + width: '224px', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB17gMFp1uSBuNjy1XcXXcYjFXa-172-120.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'rl', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '224px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: '126px', + label: '高度', + name: 'height', + renderer: 'Height', + }, + { + defaultValue: 'https://img.alicdn.com/tfs/TB1RtEMGbSYBuNjSspfXXcZCpXa-448-252.png', + hint: '请填入图片的URL', + label: '图片URL', + name: 'src', + placeholder: 'eg: https://img.alicdn.com/tfs/TB1RtEMGbSYBuNjSspfXXcZCpXa-448-252.png', + renderer: 'Uploader', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakeLink', + manifest: { + category: '文本', + coverImage: 'https://img.alicdn.com/tfs/TB1otbyVwTqK1RjSZPhXXXfOFXa-192-48.png', + description: '链接', + name: 'AIMakeLink', + presets: [ + { + alias: '链接', + colSpan: 12, + customProps: { + color: '#3788FF', + fontSize: '12px', + fontWeight: 'normal', + href: '#', + textContent: '链接', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1otbyVwTqK1RjSZPhXXXfOFXa-192-48.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'lrv', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '#3788FF', + label: '文字颜色', + name: 'color', + renderer: 'Color', + }, + { + defaultValue: '12px', + label: '字号', + name: 'fontSize', + renderer: 'FontSize', + }, + { + defaultValue: 'normal', + label: '字重', + name: 'fontWeight', + renderer: 'FontWeight', + }, + { + defaultValue: undefined, + label: '行高', + name: 'lineHeight', + renderer: 'LineHeight', + }, + { + defaultValue: '#', + label: '链接URL', + name: 'href', + placeholder: '请输入链接URL', + renderer: 'Input', + }, + { + defaultValue: '链接', + label: '内容', + name: 'textContent', + renderer: 'TextArea', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakePlaceholder', + manifest: { + category: '占位图', + coverImage: 'https://img.alicdn.com/tfs/TB1RxDup3mTBuNjy1XbXXaMrVXa-362-120.png', + description: '占位图', + name: 'AIMakePlaceholder', + presets: [ + { + alias: '占位图', + colSpan: 24, + customProps: { + backgroundColor: '#FFF6E0', + border: '1px dashed rgb(170, 170, 170)', + height: '126px', + textAlign: 'center', + textContent: '暂不支持此组件', + width: '224px', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1RxDup3mTBuNjy1XbXXaMrVXa-362-120.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'lr', + props: [ + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + defaultValue: '224px', + label: '宽度', + name: 'width', + renderer: 'Width', + }, + { + defaultValue: '126px', + label: '高度', + name: 'height', + renderer: 'Height', + }, + { + defaultValue: '#FFF6E0', + label: '背景色', + name: 'backgroundColor', + renderer: false, + }, + { + defaultValue: 'center', + label: '对齐', + name: 'textAlign', + renderer: false, + }, + { + defaultValue: '1px dashed rgb(170, 170, 170)', + label: '边框', + name: 'border', + renderer: false, + }, + { + defaultValue: '暂不支持此组件', + label: '内容', + name: 'textContent', + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakeText', + manifest: { + category: '文本', + coverImage: 'https://img.alicdn.com/tfs/TB15R_xVzDpK1RjSZFrXXa78VXa-192-48.png', + description: '富文本', + name: 'AIMakeText', + presets: [ + { + alias: '富文本', + colSpan: 12, + customProps: { + fontSize: '12px', + fontWeight: 'normal', + textContent: '文本内容', + type: 'label', + }, + thumbnail: 'https://img.alicdn.com/tfs/TB15R_xVzDpK1RjSZFrXXa78VXa-192-48.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + defaultValue: 'label', + label: '类型', + name: 'type', + params: [ + { + label: '一级标题', + value: 'h1', + }, + { + label: '二级标题', + value: 'h2', + }, + { + label: '三级标题', + value: 'h3', + }, + { + label: '段落', + value: 'p', + }, + { + label: '标签', + value: 'label', + }, + ], + renderer: 'Select', + }, + { + label: '外边距', + name: 'margin', + renderer: 'Quadrant', + }, + { + label: '文字颜色', + name: 'color', + renderer: 'Color', + }, + { + defaultValue: '12px', + label: '字号', + name: 'fontSize', + renderer: 'FontSize', + }, + { + defaultValue: 'normal', + label: '字重', + name: 'fontWeight', + renderer: 'FontWeight', + }, + { + defaultValue: undefined, + label: '行高', + name: 'lineHeight', + renderer: 'LineHeight', + }, + { + defaultValue: '文本内容', + label: '内容', + name: 'textContent', + renderer: 'TextArea', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Root', + manifest: { + category: '', + coverImage: '', + description: '底板', + name: 'Root', + presets: [], + settings: { + handles: [ + 'paste', + ], + insertionModes: 'v', + props: [ + { + label: '内边距', + name: 'padding', + renderer: 'Quadrant', + }, + { + defaultValue: '#F5F6FA', + label: '背景颜色', + name: 'backgroundColor', + renderer: 'Color', + }, + ], + shouldActive: true, + shouldDrag: false, + type: 'container', + }, + }, + origin: Function t { + defaultProps: { + children: null, + style: { + backgroundColor: '#f0f2f5', + minHeight: '100%', + padding: 0, + }, + }, + propTypes: { + children: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + }, + }, + }, + ], + pkgInfo: { + defaultExportedName: '', + originalPackage: '@ali/aimake-basic', + originalVersion: '0.0.29', + package: '@ali/aimake-basic', + version: '0.0.29', + }, + version: '1.0.0', + }, + ] + +## load multiple packages + +> Snapshot 1 + + [ + { + components: [ + { + componentName: 'Demo', + manifest: { + category: '', + coverImage: 'https://img.alicdn.com/tfs/TB1WQMqdND1gK0jSZFsXXbldVXa-499-369.png', + description: 'Demo', + name: 'Demo', + presets: [ + { + alias: 'Demo', + colSpan: 24, + thumbnail: 'https://img.alicdn.com/tfs/TB1WQMqdND1gK0jSZFsXXbldVXa-499-369.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t {}, + }, + ], + pkgInfo: { + defaultExportedName: 'Demo', + originalPackage: '@ali/demo-biz-test090702', + originalVersion: '0.0.1', + package: '@ali/demo-biz-test090702', + version: '0.0.1', + }, + version: '1.0.0', + }, + { + components: [ + { + componentName: 'DepositTable', + manifest: { + category: '', + coverImage: 'https://img.alicdn.com/tfs/TB1WR4aeVP7gK0jSZFjXXc5aXXa-1094-412.png', + description: '保证金表格', + name: 'DepositTable', + presets: [ + { + alias: '保证金表格', + colSpan: 24, + customProps: { + columns: [ + { + dataIndex: 'createTime', + key: 'createTime', + title: '时间', + }, + { + dataIndex: 'reason', + key: 'reason', + title: '原因', + }, + { + dataIndex: 'source', + key: 'source', + title: '来源账户', + }, + { + dataIndex: 'target', + key: 'target', + title: '去向账户', + }, + { + dataIndex: 'amount', + key: 'amount', + title: '金额(元)', + }, + { + dataIndex: 'unfreezeTimeInTheory', + key: 'unfreezeTimeInTheory', + title: '冻结到期时间', + }, + { + dataIndex: 'violateCode', + key: 'violateCode', + title: '违规编号', + }, + ], + }, + thumbnail: 'https://img.alicdn.com/tfs/TB1WR4aeVP7gK0jSZFjXXc5aXXa-1094-412.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [ + { + defaultValue: [], + name: 'columns', + renderer: false, + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function e { + defaultProps: { + pagination: {}, + }, + propTypes: { + columns: Function n { + isRequired: [Circular], + }, + fetchData: Function n { + isRequired: [Circular], + }, + pagination: Function n { + isRequired: [Circular], + }, + }, + }, + }, + ], + pkgInfo: { + defaultExportedName: 'DepositTable', + originalPackage: '@ali/shop-deposit-table', + originalVersion: '0.0.6', + package: '@ali/shop-deposit-table', + version: '0.0.6', + }, + version: '1.0.0', + }, + ] + +## load one package + +> Snapshot 1 + + [ + { + components: [ + { + componentName: 'Demo', + manifest: { + category: '', + coverImage: 'https://img.alicdn.com/tfs/TB1WQMqdND1gK0jSZFsXXbldVXa-499-369.png', + description: 'Demo', + name: 'Demo', + presets: [ + { + alias: 'Demo', + colSpan: 24, + thumbnail: 'https://img.alicdn.com/tfs/TB1WQMqdND1gK0jSZFsXXbldVXa-499-369.png', + }, + ], + settings: { + handles: [ + 'cut', + 'copy', + 'paste', + 'delete', + 'duplicate', + ], + insertionModes: 'tbrl', + props: [], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t {}, + }, + ], + pkgInfo: { + defaultExportedName: 'Demo', + originalPackage: '@ali/demo-biz-test090702', + originalVersion: '0.0.1', + package: '@ali/demo-biz-test090702', + version: '0.0.1', + }, + version: '1.0.0', + }, + ] diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/MaterialIn.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/MaterialIn.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..9aaa4d648aa65a162b6b393ee7e91d131b5e968a GIT binary patch literal 52389 zcmYg%V|*pe6K;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lt+3w7{v01=xtOd2=YpLLz#L zVzaS_XN{NVN4AD5-i!3I>kC2y8YlACA0@#o6rsHx<6AE3PhW9jaQe1KAbsy&`t*4h zdmt{+NdaR{n_le2#h3?-O49-et-)$8F0y!Q%+P=naruJNP}ocF)O%kQXvnI#5irgf zp%Q3I5-Da{S}J4Xk}*<;Zi2c&IZ$D8aAk=Lt}H?4;z>n{nT3nzLI}F)pu3@%4ok(igU)eIfpD z=le6nup$O6y1u?RhUkpM?9H|5y$!V{>MC+N&RJMolxNYK{7*z9(r?Cl#<7WFNd7{j zHi&yQd47wE@<-WVwN3W@TAwVN-XX5{^8T#$4||L#^Yy=L{E09Y+YnLT5;3}PG}uWp zJr(yC%Dy_azU(I$iXBdCQBH_D&Yc;V-uKdZ)8A&^p6Y8ey=}~>0FT6*97Bci#U{JB zqZDe%7@QMQNeyht`lhKsW<#5x*C>8{Fz&Aa-q2mCq1rEh^LAqkJ}MY4KGc^QmDJk_ z9&!b3I_6yvp!*{N=miaiMnOi%3Qd9Lvf$6Ba-Iq)y> z&^udl?PV(8^NWGvp~iFgxOf=jIou&0#(KQ`9u7Z*5?W$x(UN%i3YIAk0(lsk1#O}D zl?;C!$lsxFp{p+^cq@kY1kxWG4=tnkRSZ7@+RDpmx=Mg<;3SsKYAtG%_?n z!gMX#;99p)X_yXcvE3k**3d+7n2FWvw^Scm;@-cty6m9Rke%X(-|4EoppZinBxKj3 z!>%Pu!wXqoWG%Kxh8&Uz4mkzAPwl4l7b?qKb7ozroU1VK%Zn}fc0ripDLnlx!wLnf zxWQn9QBlGNN9;0J$>EyA%Uor9s-NBvRsl?yV6vJ~u6ts9ED 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/xsxTSTosqFrpoTUsaDCkQs/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', + }, + }, + }, + ] diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/Materialize.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..21b8cb8bcc87a05bf39285fdee5b1969b331c26c GIT binary patch literal 3944 zcmV-u50~&kRzVZ9NOtP_Ui7b4M(b<_)T6;W*sNyzReS& zCDCHZoQ~7v<7Wxz$3>-Zk>yUOv4!KjsidSN!o?DfBU~KEP4t=~R^sO>kb?-Xi*7SV z)zq%w>)f11N+u^K6E1;pTEZnkqe&A|kttlV)o3%<^Dg%^vxT2)bT_tb(A-H3i(I_Z zWoY1S4J}4ngQ3oD;tlmqyUoqpOa_a6b%B^;w3rLhpm)X`}fvMSHce;5KinBWGHs0noh*nQrg)3ZC$g$o{ zvle)RO^Wgql4auSjZGGJ)>^&IXyx@~`YPUP*XQe9yxWbvx%6dg_3jpju!XnqR_trJ z*=9k^(3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mSNfB58)`LB?rG%|MB*(#dFyv}f|7yxo%2pqeM(_)8 z5S*YbS1^_fkX!^AQwXU9jZ-K~8DqHvk}co>cpF@xEmtv?v~tt|OahJIzH-Vkk+B?v zn;NEE7dWPaav z71xm|DMPh_#OEup;)jsHx=^ifqdqVzu5eSBr`#)hu>JS7u5O4){Fts3kDTBq+0y&QpT6;@ zJ0hxF8|yb+J63VFcC5@~?bxuY(*O0M*Z#*>NT9#1(ry2PLNy1oru+T}g#)2jU}1x3 zxz%oJvS4GOo3}a)&93H!3l`d4tEM>}_JxaF#;VGd^IZPQDcFa>#9QqJwdOSi!YYlT z2}R?JN;>>MExbf}`Tw-wUB6JHQCPpQ1{*hkhv??e=|2wsM@^uq;NN4*51_x6kSX9g zum)_`2KmRqU(t4bBHtx#I85Xl7(qw|C 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', + }, + }, + }, + ] + +## access 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', + }, + }, + }, + ] diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/accesser/LocalAccesser.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/accesser/LocalAccesser.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..0d3c837c208a03585e1ac98bdab8e967ff82b8cd GIT binary patch literal 3727 zcmV;A4sh{7RzV2V|V2aUH;!o2}i_#59AWEVXRC;2@JzXq;|@C^$Xt1*i&?7NN=OLcYW1w!6fP<(6i@fQ)8Odk6m5 z{p~JiGioTNQJR!!x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diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.md new file mode 100644 index 000000000..53eece2d9 --- /dev/null +++ b/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.md @@ -0,0 +1,408 @@ +# 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', + }, + }, + }, + ] diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/accesser/OnlineAccesser.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..5edda1335c3f1ffb024819fa8cb1071b0fd03f81 GIT binary patch literal 2897 zcmV-X3$FA*RzVs-DQ^*&;^YeMHJQt3M{(<%F7ps7>QP*q9$tevU`Dr%kH`l%VS7%@-T{> z)R}5JW1ChxQ=1qkX`7cJHdXVmrfH`&wGY$S8EYCf#;P&SRNLuy@3NQOb6^=@39RDG z&pn*`edqlDXU}7I?=2vNs7Tfen_^oxJi76_Z{(}mVoqM?i1crF6d_Nlvj4O=_wnyF zpPHx1-B(-7$+iC~BScN2WfiC6R2g{90;4!>0;ef*x%fto^Oy8`J>g;q#}O`;st@*NWBF(v_QwtCnqX zHaw8EDp} z6{>iz=t*ui*!gxK-2Tkv>n_G-7GpxNMQbV^qQQK%Q}o{cuUh}@vD*^!FJ z=CChAj8Gapl`awWHN4#_N)_u27Ow{t7KgJDFIKNpv{^6`QW>qu1t;&u>jv~#!29=;GDtI|-f|j!`=$e*Z>KekuNf9WysWGqG>o`t{OPXf>S|!?H%B=HWQu{Ay zeUs2%AJs8((wq#~kaQ(@#U4dgfsLRRc)?cC+TBJKEpJqNeT|{?p7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#4(m@klX^}XAx2W9-c*6hBKB%NFE0Vz;D1++A@l< z=w}l$8sq^B_|9y~avx(k49PFS8E^-r{1>DaP?kxIWicen zfCoGWj?k85#`0H4&H+^+A=AOKLdr6YvD8E227AFVaGAEGGM3mmgd~6*unugSLs_OX zmi>?%1gF3akT{pJ%wQ~qkQ4zc*bR=-mNdrlcSz2In0bU4!SZ>OC7rQ2An}6lgI|I3 zv}Gn^QP0PxUyuRTfNk?BOBS0xBnQDMa04VRpe)&J`j8ZX8qf+3)0P~@@)0Db!Pj6y z5$r{jrGT;UkW_=6;3e=8Z7F0dS0K3o#uTFmP*+S@<}j94NOpr)!CAm9q%3n8O9~{Z zpbWUdKH4&mv9v*Q4Ez%$ln^qvgtE+MEE^!PfSuql_&se|z*w$AauaM=M95ZfU=d|0 zWh}=bISDRco9$F8%SA6?%i1W Snapshot 1 + + Object @Module { + components: [ + { + componentName: 'AIMakeBlank', + manifest: { + name: 'AIMakeBlank', + settings: { + handles: [ + 'cut', + 'copy', + 'duplicate', + 'delete', + 'paste', + ], + insertionModes: 'tbrl', + props: [ + { + label: 'children', + name: 'children', + renderer: '', + }, + { + label: 'styleBoxModel', + name: 'styleBoxModel', + renderer: '', + }, + { + label: 'styleLayout', + name: 'styleLayout', + renderer: '', + }, + { + label: 'styleBackground', + name: 'styleBackground', + renderer: '', + }, + { + label: 'styleFlexLayout', + name: 'styleFlexLayout', + renderer: '', + }, + { + defaultValue: '{}', + label: 'style', + name: 'style', + renderer: '', + }, + { + label: 'id', + name: 'id', + renderer: '', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakeIcon', + manifest: { + name: 'AIMakeIcon', + settings: { + handles: [ + 'cut', + 'copy', + 'duplicate', + 'delete', + 'paste', + ], + insertionModes: 'tbrl', + props: [ + { + label: 'className', + name: 'className', + renderer: '', + }, + { + label: 'iconClassName', + name: 'iconClassName', + renderer: '', + }, + { + label: 'children', + name: 'children', + renderer: '', + }, + { + label: 'styleBoxModel', + name: 'styleBoxModel', + renderer: '', + }, + { + label: 'styleText', + name: 'styleText', + renderer: '', + }, + { + label: 'styleBackground', + name: 'styleBackground', + renderer: '', + }, + { + defaultValue: '{}', + label: 'style', + name: 'style', + renderer: '', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + createFromIconfont: Function {}, + defaultProps: { + children: '', + className: '', + iconClassName: 'iconfont', + style: {}, + }, + propTypes: { + children: Function e { + isRequired: [Circular], + }, + className: Function e { + isRequired: [Circular], + }, + iconClassName: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + styleBackground: Function e { + isRequired: [Circular], + }, + styleBoxModel: Function e { + isRequired: [Circular], + }, + styleText: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakeImage', + manifest: { + name: 'AIMakeImage', + settings: { + handles: [ + 'cut', + 'copy', + 'duplicate', + 'delete', + 'paste', + ], + insertionModes: 'tbrl', + props: [ + { + label: 'styleBoxModel', + name: 'styleBoxModel', + renderer: '', + }, + { + defaultValue: '{}', + label: 'style', + name: 'style', + renderer: '', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakeLink', + manifest: { + name: 'AIMakeLink', + settings: { + handles: [ + 'cut', + 'copy', + 'duplicate', + 'delete', + 'paste', + ], + insertionModes: 'tbrl', + props: [ + { + label: 'children', + name: 'children', + renderer: '', + }, + { + label: 'styleBoxModel', + name: 'styleBoxModel', + renderer: '', + }, + { + label: 'styleText', + name: 'styleText', + renderer: '', + }, + { + label: 'styleLayout', + name: 'styleLayout', + renderer: '', + }, + { + label: 'styleBackground', + name: 'styleBackground', + renderer: '', + }, + { + defaultValue: '{}', + label: 'style', + name: 'style', + renderer: '', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakePlaceholder', + manifest: { + name: 'AIMakePlaceholder', + settings: { + handles: [ + 'cut', + 'copy', + 'duplicate', + 'delete', + 'paste', + ], + insertionModes: 'tbrl', + props: [ + { + label: 'children', + name: 'children', + renderer: '', + }, + { + label: 'styleBoxModel', + name: 'styleBoxModel', + renderer: '', + }, + { + label: 'styleLayout', + name: 'styleLayout', + renderer: '', + }, + { + defaultValue: '{}', + label: 'style', + name: 'style', + renderer: '', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'AIMakeText', + manifest: { + name: 'AIMakeText', + settings: { + handles: [ + 'cut', + 'copy', + 'duplicate', + 'delete', + 'paste', + ], + insertionModes: 'tbrl', + props: [ + { + label: 'children', + name: 'children', + renderer: '', + }, + { + label: 'type', + name: 'type', + renderer: '', + }, + { + label: 'styleBoxModel', + name: 'styleBoxModel', + renderer: '', + }, + { + label: 'styleText', + name: 'styleText', + renderer: '', + }, + { + label: 'styleLayout', + name: 'styleLayout', + renderer: '', + }, + { + label: 'styleBackground', + name: 'styleBackground', + renderer: '', + }, + { + defaultValue: '{}', + label: 'style', + name: 'style', + renderer: '', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function r { + defaultProps: { + border: false, + borderRadius: false, + display: false, + height: false, + margin: false, + padding: false, + width: false, + }, + propTypes: { + border: Function e { + isRequired: [Circular], + }, + borderRadius: Function e { + isRequired: [Circular], + }, + display: Function e { + isRequired: [Circular], + }, + height: Function e { + isRequired: [Circular], + }, + margin: Function e { + isRequired: [Circular], + }, + padding: Function e { + isRequired: [Circular], + }, + width: Function e { + isRequired: [Circular], + }, + }, + }, + }, + { + componentName: 'Root', + manifest: { + name: 'Root', + settings: { + handles: [ + 'cut', + 'copy', + 'duplicate', + 'delete', + 'paste', + ], + insertionModes: 'tbrl', + props: [ + { + defaultValue: `{␊ + padding: 0,␊ + backgroundColor: '#f0f2f5',␊ + minHeight: '100%'␊ + }`, + label: 'style', + name: 'style', + renderer: '', + }, + { + label: 'children', + name: 'children', + renderer: '', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: { + children: null, + style: { + backgroundColor: '#f0f2f5', + minHeight: '100%', + padding: 0, + }, + }, + propTypes: { + children: Function e { + isRequired: [Circular], + }, + style: Function e { + isRequired: [Circular], + }, + }, + }, + }, + ], + pkgInfo: { + defaultExportedName: '', + originalPackage: 'multiple-exported-component', + originalVersion: '1.0.0', + package: 'multiple-exported-component', + version: '1.0.0', + }, + version: '1.0.0', + } + +## generate single exported components + +> Snapshot 1 + + Object @Module { + components: [ + { + componentName: 'Demo', + manifest: { + name: 'Demo', + settings: { + handles: [ + 'cut', + 'copy', + 'duplicate', + 'delete', + 'paste', + ], + insertionModes: 'tbrl', + props: [ + { + label: 'optionalArray', + name: 'optionalArray', + renderer: '', + }, + { + label: 'optionalBool', + name: 'optionalBool', + renderer: '', + }, + { + label: 'optionalFunc', + name: 'optionalFunc', + renderer: '', + }, + { + label: 'optionalNumber', + name: 'optionalNumber', + renderer: '', + }, + { + label: 'optionalObject', + name: 'optionalObject', + renderer: '', + }, + { + label: 'optionalString', + name: 'optionalString', + renderer: '', + }, + { + label: 'optionalSymbol', + name: 'optionalSymbol', + renderer: '', + }, + { + label: 'optionalNode', + name: 'optionalNode', + renderer: '', + }, + { + label: 'optionalElement', + name: 'optionalElement', + renderer: '', + }, + { + label: 'optionalElementType', + name: 'optionalElementType', + renderer: '', + }, + { + label: 'optionalMessage', + name: 'optionalMessage', + renderer: '', + }, + { + label: 'optionalEnum', + name: 'optionalEnum', + renderer: '', + }, + { + label: 'optionalUnion', + name: 'optionalUnion', + renderer: '', + }, + { + label: 'optionalArrayOf', + name: 'optionalArrayOf', + renderer: '', + }, + { + label: 'optionalObjectOf', + name: 'optionalObjectOf', + renderer: '', + }, + { + label: 'optionalObjectWithShape', + name: 'optionalObjectWithShape', + renderer: '', + }, + { + label: 'optionalObjectWithShape2', + name: 'optionalObjectWithShape2', + renderer: '', + }, + { + label: 'optionalObjectWithStrictShape', + name: 'optionalObjectWithStrictShape', + renderer: '', + }, + { + label: 'requiredFunc', + name: 'requiredFunc', + renderer: '', + }, + { + label: 'requiredAny', + name: 'requiredAny', + renderer: '', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: {}, + propTypes: { + optionalArray: Function e { + isRequired: [Circular], + }, + optionalArrayOf: Function e { + isRequired: [Circular], + }, + optionalBool: Function e { + isRequired: [Circular], + }, + optionalElement: Function e { + isRequired: [Circular], + }, + optionalElementType: Function e { + isRequired: [Circular], + }, + optionalEnum: Function e { + isRequired: [Circular], + }, + optionalFunc: Function e { + isRequired: [Circular], + }, + optionalMessage: Function e { + isRequired: [Circular], + }, + optionalNode: Function e { + isRequired: [Circular], + }, + optionalNumber: Function e { + isRequired: [Circular], + }, + optionalObject: Function e { + isRequired: [Circular], + }, + optionalObjectOf: Function e { + isRequired: [Circular], + }, + optionalObjectWithShape: Function e { + isRequired: [Circular], + }, + optionalObjectWithShape2: Function e { + isRequired: [Circular], + }, + optionalObjectWithStrictShape: Function e { + isRequired: [Circular], + }, + optionalString: Function e { + isRequired: [Circular], + }, + optionalSymbol: Function e { + isRequired: [Circular], + }, + optionalUnion: Function e { + isRequired: [Circular], + }, + requiredAny: Function e { + isRequired: [Circular], + }, + requiredFunc: Function e { + isRequired: [Circular], + }, + }, + }, + }, + ], + pkgInfo: { + defaultExportedName: 'Demo', + originalPackage: 'single-exported-component', + originalVersion: '1.0.0', + package: 'single-exported-component', + version: '1.0.0', + }, + version: '1.0.0', + } + +## generate single exported components with extensions + +> Snapshot 1 + + Object @Module { + components: [ + { + componentName: 'Demo', + manifest: { + name: 'Demo', + settings: { + handles: [ + 'cut', + 'copy', + 'duplicate', + 'delete', + 'paste', + ], + insertionModes: 'tbrl', + props: [ + { + label: 'optionalArray', + name: 'optionalArray', + renderer: '', + }, + { + label: 'optionalBool', + name: 'optionalBool', + renderer: '', + }, + { + label: 'optionalFunc', + name: 'optionalFunc', + renderer: '', + }, + { + label: 'optionalNumber', + name: 'optionalNumber', + renderer: '', + }, + { + label: 'optionalObject', + name: 'optionalObject', + renderer: '', + }, + { + label: 'optionalString', + name: 'optionalString', + renderer: '', + }, + { + label: 'optionalSymbol', + name: 'optionalSymbol', + renderer: '', + }, + { + label: 'optionalNode', + name: 'optionalNode', + renderer: '', + }, + { + label: 'optionalElement', + name: 'optionalElement', + renderer: '', + }, + { + label: 'optionalElementType', + name: 'optionalElementType', + renderer: '', + }, + { + label: 'optionalMessage', + name: 'optionalMessage', + renderer: '', + }, + { + label: 'optionalEnum', + name: 'optionalEnum', + renderer: '', + }, + { + label: 'optionalUnion', + name: 'optionalUnion', + renderer: '', + }, + { + label: 'optionalArrayOf', + name: 'optionalArrayOf', + renderer: '', + }, + { + label: 'optionalObjectOf', + name: 'optionalObjectOf', + renderer: '', + }, + { + label: 'optionalObjectWithShape', + name: 'optionalObjectWithShape', + renderer: '', + }, + { + label: 'optionalObjectWithShape2', + name: 'optionalObjectWithShape2', + renderer: '', + }, + { + label: 'optionalObjectWithStrictShape', + name: 'optionalObjectWithStrictShape', + renderer: '', + }, + { + label: 'requiredFunc', + name: 'requiredFunc', + renderer: '', + }, + { + label: 'requiredAny', + name: 'requiredAny', + renderer: '', + }, + ], + shouldActive: true, + shouldDrag: true, + type: 'element_inline', + }, + }, + origin: Function t { + defaultProps: {}, + propTypes: { + optionalArray: Function e { + isRequired: [Circular], + }, + optionalArrayOf: Function e { + isRequired: [Circular], + }, + optionalBool: Function e { + isRequired: [Circular], + }, + optionalElement: Function e { + isRequired: [Circular], + }, + optionalElementType: Function e { + isRequired: [Circular], + }, + optionalEnum: Function e { + isRequired: [Circular], + }, + optionalFunc: Function e { + isRequired: [Circular], + }, + optionalMessage: Function e { + isRequired: [Circular], + }, + optionalNode: Function e { + isRequired: [Circular], + }, + optionalNumber: Function e { + isRequired: [Circular], + }, + optionalObject: Function e { + isRequired: [Circular], + }, + optionalObjectOf: Function e { + isRequired: [Circular], + }, + optionalObjectWithShape: Function e { + isRequired: [Circular], + }, + optionalObjectWithShape2: Function e { + isRequired: [Circular], + }, + optionalObjectWithStrictShape: Function e { + isRequired: [Circular], + }, + optionalString: Function e { + isRequired: [Circular], + }, + optionalSymbol: Function e { + isRequired: [Circular], + }, + optionalUnion: Function e { + isRequired: [Circular], + }, + requiredAny: Function e { + isRequired: [Circular], + }, + requiredFunc: Function e { + isRequired: [Circular], + }, + }, + }, + }, + ], + pkgInfo: { + defaultExportedName: 'Demo', + originalPackage: 'single-exported-component', + originalVersion: '1.0.0', + package: 'single-exported-component', + version: '1.0.0', + }, + version: '1.0.0', + } diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/generator/Generator.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/generator/Generator.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..c420ee802d085848c7223e01a2393e6a83dbda5e GIT binary patch literal 4489 zcmV;45q9oDRzVr00000000B+ zoDFys)w##d>_@WMde#lPy{0=Lb$luog`~EyJ2?&M&$OPa{Z=U z>qTm{^--y)RaPpPAjs?0aS=VOK6_*T)|o z=KRlj-*e`jvoq(NaS>z8%6@iY&Z|p9r+)W`&yO4`ysL7kz@&f52Qs$r@!GvPO%ukC zcP`ynv;D30f_!vIHDf<|W5=<^oI{SM{&@U1A04TfCCEpw2ub~=%IyV*V4HydP6126 zO3+V8$rVx-G+!sW!-9a~{D7y+C+6hjFd>r(RwiT#!aWf7m&*2B!RZckbO!vQKOBfu#lFysyRqkp&8R9073OYT^XqxGq%8}=E&psQQ3L`&J( z*^(&5g5f*BM9>W$0S5%)`v|ot`|f0dz=U)`uvz4xV=Q*!RzHu};_C8+8?NsR1jC}| za#x2Kt+UM%JLoX713_=A*YENzbh+DIt*W*#2!(2=PZm`xuCeRu?fy&8`={Zw1sWVjwg-w>8P;hj({N5HZ6qajtYid%IS&$sE zeu3j(f}vL8j4jrgLcv-K$yBgRmLf)ku-w8iyUXtmW4yu;&0nHJu#h3x{JNg6vT8gJ ziQzEjIuz{y^-pW+Ga_NLFc|1mE`irIwP~F=yr{cV3`qk_t+z2Y2e`nU;9>AGIBX*W zw#N?G5nDTy)C&1|cE$#RTCfDH0-M3};2m%Z6sDja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hSn_#FJtO9p}t>6V>yp(uueG`KBz$ZjFI!1U#eteFuPJ;B&jEw|Sz@pKy z-PaI5QrjU|3D$s{!Cl~fu$43%8^2$_Kv&zrZ^4J)G{_$l+x>Lnm%SWNc z7sv0 zNxEN3W9eZC9s|!1;W8q$?SkMXZ~_#Tk!`tajW2<7`Z<&GMpSKC^o^*NGWCt9O=apE zQ7@ILZ$zCaQ{RXhRj$4fwYXe;BTD&xXnncC_e1BwXm2l%j&?`6I@%-U>Szlp)X~na zP)FNUp^kP-g)-W6Iu^y({T0!%q*N+nIj2r3U$jlCj5^g;sZQ|bN_B!?u2d)Ze=F4q zF0N80_?!+vapmf&=m2i6QU|cDN*%zVDrErYK`<9oM_rv=t-9J(t-89UTAk~C)#_YZ zYSdt^sX1?g*;5l8%jOzoEIO|zWjCvPk~0IoK=f5tA+@Nbx@Bz3MRbFQ{I<-89w|L90vtsd;QF@7Luu;4Sb)<`Oh4G0m*i75TuRk^)tsYkW_&t za4VJbpE*7X$y4B6kUGA%&m8TgkW_$0U^TdxHsL>Y+yTi8-~jlF%Cq!-?a*l0MT`}L zOTo&Edi|2_E=V?m7r{{~=f9-On7~*bm|C2>YjydIKaYJEVH#;Ni?bj?(hlwdzoPQ_ocv8l z-UDBO;nRuya!x)Sk_ONTen{mDIQg$3*$obZ%!`S9At$eZWE^M$>#6(-PQC?_$H9JJ zok8S{++-F(G6pOJA+U)yxsq$L4U*?TQ9YiIL0dg((!@D+Dgre8Fg=;HdOjmwCdeA8yGjorJjKGi5xc|Cv@1?F$MfXVyq{UalbDv`hG`p8jvzWF#-XvwHD;Tkjf@VSfIG z`B{s(rPkco+Z literal 0 HcmV?d00001 diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/parser/ReactParser.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/parser/ReactParser.ts.md new file mode 100644 index 000000000..e22b6777d --- /dev/null +++ b/packages/material-parser/test/fixtures/__snapshots__/test/parser/ReactParser.ts.md @@ -0,0 +1,1039 @@ +# Snapshot report for `test/parser/ReactParser.ts` + +The actual snapshot is saved in `ReactParser.ts.snap`. + +Generated by [AVA](https://ava.li). + +## parse es6 multiple exported component by local + +> Snapshot 1 + + [ + { + componentNames: [], + defaultExportName: '', + exportModules: [ + { + exportedName: 'AIMakeBlank', + localName: 'AIMakeBlank', + source: './basic/AIMakeBlank', + }, + { + exportedName: 'AIMakeIcon', + localName: 'AIMakeIcon', + source: './basic/AIMakeIcon', + }, + { + exportedName: 'AIMakeImage', + localName: 'AIMakeImage', + source: './basic/AIMakeImage', + }, + { + exportedName: 'AIMakeLink', + localName: 'AIMakeLink', + source: './basic/AIMakeLink', + }, + { + exportedName: 'AIMakePlaceholder', + localName: 'AIMakePlaceholder', + source: './basic/AIMakePlaceholder', + }, + { + exportedName: 'AIMakeText', + localName: 'AIMakeText', + source: './basic/AIMakeText', + }, + { + exportedName: 'Root', + localName: 'Root', + source: './basic/Root', + }, + ], + filePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/index.js', + importModules: [ + { + importDefaultName: 'AIMakeBlank', + localName: 'AIMakeBlank', + source: './basic/AIMakeBlank', + }, + { + importDefaultName: 'AIMakeIcon', + localName: 'AIMakeIcon', + source: './basic/AIMakeIcon', + }, + { + importDefaultName: 'AIMakeImage', + localName: 'AIMakeImage', + source: './basic/AIMakeImage', + }, + { + importDefaultName: 'AIMakeLink', + localName: 'AIMakeLink', + source: './basic/AIMakeLink', + }, + { + importDefaultName: 'AIMakePlaceholder', + localName: 'AIMakePlaceholder', + source: './basic/AIMakePlaceholder', + }, + { + importDefaultName: 'AIMakeText', + localName: 'AIMakeText', + source: './basic/AIMakeText', + }, + { + importDefaultName: 'Root', + localName: 'Root', + source: './basic/Root', + }, + ], + propsDefaults: [], + propsTypes: [], + subModules: [], + }, + { + componentNames: [ + { + exportedName: 'AIMakeBlank', + localName: 'AIMakeBlank', + }, + ], + defaultExportName: 'AIMakeBlank', + exportModules: [], + filePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeBlank/index.js', + importModules: [ + { + importDefaultName: '_extends', + localName: '_extends', + source: '@babel/runtime/helpers/extends', + }, + { + importDefaultName: '_classCallCheck', + localName: '_classCallCheck', + source: '@babel/runtime/helpers/classCallCheck', + }, + { + importDefaultName: '_createClass', + localName: '_createClass', + source: '@babel/runtime/helpers/createClass', + }, + { + importDefaultName: '_possibleConstructorReturn', + localName: '_possibleConstructorReturn', + source: '@babel/runtime/helpers/possibleConstructorReturn', + }, + { + importDefaultName: '_getPrototypeOf', + localName: '_getPrototypeOf', + source: '@babel/runtime/helpers/getPrototypeOf', + }, + { + importDefaultName: '_inherits', + localName: '_inherits', + source: '@babel/runtime/helpers/inherits', + }, + { + importDefaultName: '_defineProperty', + localName: '_defineProperty', + source: '@babel/runtime/helpers/defineProperty', + }, + { + importDefaultName: 'React', + localName: 'React', + source: 'react', + }, + { + importName: 'Component', + localName: 'Component', + source: 'react', + }, + { + importDefaultName: 'PropTypes', + localName: 'PropTypes', + source: 'prop-types', + }, + { + importDefaultName: 'HOCBoxModelProps', + localName: 'HOCBoxModelProps', + source: '../utils/HOCBoxModelProps', + }, + { + importDefaultName: 'HOCLayoutProps', + localName: 'HOCLayoutProps', + source: '../utils/HOCLayoutProps', + }, + { + importDefaultName: 'HOCBackgroundProps', + localName: 'HOCBackgroundProps', + source: '../utils/HOCBackgroundProps', + }, + { + importDefaultName: 'HOCFlexLayoutProps', + localName: 'HOCFlexLayoutProps', + source: '../utils/HOCFlexLayoutProps', + }, + ], + propsDefaults: [ + { + defaultValue: '{}', + name: 'style', + }, + ], + propsTypes: [ + { + name: 'children', + required: false, + type: 'oneOfType', + }, + { + name: 'styleBoxModel', + required: false, + type: 'object', + }, + { + name: 'styleLayout', + required: false, + type: 'object', + }, + { + name: 'styleBackground', + required: false, + type: 'object', + }, + { + name: 'styleFlexLayout', + required: false, + type: 'object', + }, + { + name: 'style', + required: false, + type: 'object', + }, + { + name: 'id', + required: false, + type: 'string', + }, + ], + subModules: [ + { + isValueAnonymousFunc: false, + objectName: [ + 'merged', + ], + propertyName: 'id', + value: 'id', + }, + ], + }, + { + componentNames: [ + { + exportedName: 'AIMakeIcon', + localName: 'AIMakeIcon', + }, + ], + defaultExportName: 'AIMakeIcon', + exportModules: [], + filePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeIcon/index.js', + importModules: [ + { + importDefaultName: '_extends', + localName: '_extends', + source: '@babel/runtime/helpers/extends', + }, + { + importDefaultName: '_objectWithoutProperties', + localName: '_objectWithoutProperties', + source: '@babel/runtime/helpers/objectWithoutProperties', + }, + { + importDefaultName: '_classCallCheck', + localName: '_classCallCheck', + source: '@babel/runtime/helpers/classCallCheck', + }, + { + importDefaultName: '_createClass', + localName: '_createClass', + source: '@babel/runtime/helpers/createClass', + }, + { + importDefaultName: '_possibleConstructorReturn', + localName: '_possibleConstructorReturn', + source: '@babel/runtime/helpers/possibleConstructorReturn', + }, + { + importDefaultName: '_getPrototypeOf', + localName: '_getPrototypeOf', + source: '@babel/runtime/helpers/getPrototypeOf', + }, + { + importDefaultName: '_inherits', + localName: '_inherits', + source: '@babel/runtime/helpers/inherits', + }, + { + importDefaultName: '_defineProperty', + localName: '_defineProperty', + source: '@babel/runtime/helpers/defineProperty', + }, + { + importDefaultName: 'React', + localName: 'React', + source: 'react', + }, + { + importName: 'Component', + localName: 'Component', + source: 'react', + }, + { + importDefaultName: 'PropTypes', + localName: 'PropTypes', + source: 'prop-types', + }, + { + importDefaultName: 'classNames', + localName: 'classNames', + source: 'classnames', + }, + { + importDefaultName: 'createFromIconfont', + localName: 'createFromIconfont', + source: './IconFont', + }, + ], + propsDefaults: [ + { + defaultValue: '{}', + name: 'style', + }, + ], + propsTypes: [ + { + name: 'className', + required: false, + type: 'string', + }, + { + name: 'iconClassName', + required: false, + type: 'string', + }, + { + name: 'children', + required: false, + type: 'oneOfType', + }, + { + name: 'styleBoxModel', + required: false, + type: 'object', + }, + { + name: 'styleText', + required: false, + type: 'object', + }, + { + name: 'styleBackground', + required: false, + type: 'object', + }, + { + name: 'style', + required: false, + type: 'object', + }, + ], + subModules: [ + { + isValueAnonymousFunc: false, + objectName: [ + 'AIMakeIcon', + ], + propertyName: 'createFromIconfont', + value: 'createFromIconfont', + }, + ], + }, + { + componentNames: [ + { + exportedName: 'AIMakeImage', + localName: 'AIMakeImage', + }, + ], + defaultExportName: 'AIMakeImage', + exportModules: [], + filePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeImage/index.js', + importModules: [ + { + importDefaultName: '_extends', + localName: '_extends', + source: '@babel/runtime/helpers/extends', + }, + { + importDefaultName: '_objectWithoutProperties', + localName: '_objectWithoutProperties', + source: '@babel/runtime/helpers/objectWithoutProperties', + }, + { + importDefaultName: '_classCallCheck', + localName: '_classCallCheck', + source: '@babel/runtime/helpers/classCallCheck', + }, + { + importDefaultName: '_createClass', + localName: '_createClass', + source: '@babel/runtime/helpers/createClass', + }, + { + importDefaultName: '_possibleConstructorReturn', + localName: '_possibleConstructorReturn', + source: '@babel/runtime/helpers/possibleConstructorReturn', + }, + { + importDefaultName: '_getPrototypeOf', + localName: '_getPrototypeOf', + source: '@babel/runtime/helpers/getPrototypeOf', + }, + { + importDefaultName: '_inherits', + localName: '_inherits', + source: '@babel/runtime/helpers/inherits', + }, + { + importDefaultName: '_defineProperty', + localName: '_defineProperty', + source: '@babel/runtime/helpers/defineProperty', + }, + { + importDefaultName: 'React', + localName: 'React', + source: 'react', + }, + { + importName: 'Component', + localName: 'Component', + source: 'react', + }, + { + importDefaultName: 'PropTypes', + localName: 'PropTypes', + source: 'prop-types', + }, + { + importDefaultName: 'HOCBoxModelProps', + localName: 'HOCBoxModelProps', + source: '../utils/HOCBoxModelProps', + }, + ], + propsDefaults: [ + { + defaultValue: '{}', + name: 'style', + }, + ], + propsTypes: [ + { + name: 'styleBoxModel', + required: false, + type: 'object', + }, + { + name: 'style', + required: false, + type: 'object', + }, + ], + subModules: [], + }, + { + componentNames: [ + { + exportedName: 'AIMakeLink', + localName: 'AIMakeLink', + }, + ], + defaultExportName: 'AIMakeLink', + exportModules: [], + filePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeLink/index.js', + importModules: [ + { + importDefaultName: '_extends', + localName: '_extends', + source: '@babel/runtime/helpers/extends', + }, + { + importDefaultName: '_objectWithoutProperties', + localName: '_objectWithoutProperties', + source: '@babel/runtime/helpers/objectWithoutProperties', + }, + { + importDefaultName: '_classCallCheck', + localName: '_classCallCheck', + source: '@babel/runtime/helpers/classCallCheck', + }, + { + importDefaultName: '_createClass', + localName: '_createClass', + source: '@babel/runtime/helpers/createClass', + }, + { + importDefaultName: '_possibleConstructorReturn', + localName: '_possibleConstructorReturn', + source: '@babel/runtime/helpers/possibleConstructorReturn', + }, + { + importDefaultName: '_getPrototypeOf', + localName: '_getPrototypeOf', + source: '@babel/runtime/helpers/getPrototypeOf', + }, + { + importDefaultName: '_inherits', + localName: '_inherits', + source: '@babel/runtime/helpers/inherits', + }, + { + importDefaultName: '_defineProperty', + localName: '_defineProperty', + source: '@babel/runtime/helpers/defineProperty', + }, + { + importDefaultName: 'React', + localName: 'React', + source: 'react', + }, + { + importName: 'Component', + localName: 'Component', + source: 'react', + }, + { + importDefaultName: 'PropTypes', + localName: 'PropTypes', + source: 'prop-types', + }, + { + importDefaultName: 'HOCBoxModelProps', + localName: 'HOCBoxModelProps', + source: '../utils/HOCBoxModelProps', + }, + { + importDefaultName: 'HOCTextProps', + localName: 'HOCTextProps', + source: '../utils/HOCTextProps', + }, + { + importDefaultName: 'HOCLayoutProps', + localName: 'HOCLayoutProps', + source: '../utils/HOCLayoutProps', + }, + { + importDefaultName: 'HOCBackgroundProps', + localName: 'HOCBackgroundProps', + source: '../utils/HOCBackgroundProps', + }, + ], + propsDefaults: [ + { + defaultValue: '{}', + name: 'style', + }, + ], + propsTypes: [ + { + name: 'children', + required: false, + type: 'oneOfType', + }, + { + name: 'styleBoxModel', + required: false, + type: 'object', + }, + { + name: 'styleText', + required: false, + type: 'object', + }, + { + name: 'styleLayout', + required: false, + type: 'object', + }, + { + name: 'styleBackground', + required: false, + type: 'object', + }, + { + name: 'style', + required: false, + type: 'object', + }, + ], + subModules: [], + }, + { + componentNames: [ + { + exportedName: 'AIMakePlaceholder', + localName: 'AIMakePlaceholder', + }, + ], + defaultExportName: 'AIMakePlaceholder', + exportModules: [], + filePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakePlaceholder/index.js', + importModules: [ + { + importDefaultName: '_classCallCheck', + localName: '_classCallCheck', + source: '@babel/runtime/helpers/classCallCheck', + }, + { + importDefaultName: '_createClass', + localName: '_createClass', + source: '@babel/runtime/helpers/createClass', + }, + { + importDefaultName: '_possibleConstructorReturn', + localName: '_possibleConstructorReturn', + source: '@babel/runtime/helpers/possibleConstructorReturn', + }, + { + importDefaultName: '_getPrototypeOf', + localName: '_getPrototypeOf', + source: '@babel/runtime/helpers/getPrototypeOf', + }, + { + importDefaultName: '_inherits', + localName: '_inherits', + source: '@babel/runtime/helpers/inherits', + }, + { + importDefaultName: '_defineProperty', + localName: '_defineProperty', + source: '@babel/runtime/helpers/defineProperty', + }, + { + importDefaultName: 'React', + localName: 'React', + source: 'react', + }, + { + importName: 'Component', + localName: 'Component', + source: 'react', + }, + { + importDefaultName: 'PropTypes', + localName: 'PropTypes', + source: 'prop-types', + }, + { + importDefaultName: 'HOCBoxModelProps', + localName: 'HOCBoxModelProps', + source: '../utils/HOCBoxModelProps', + }, + { + importDefaultName: 'HOCLayoutProps', + localName: 'HOCLayoutProps', + source: '../utils/HOCLayoutProps', + }, + ], + propsDefaults: [ + { + defaultValue: '{}', + name: 'style', + }, + ], + propsTypes: [ + { + name: 'children', + required: false, + type: 'oneOfType', + }, + { + name: 'styleBoxModel', + required: false, + type: 'object', + }, + { + name: 'styleLayout', + required: false, + type: 'object', + }, + { + name: 'style', + required: false, + type: 'object', + }, + ], + subModules: [], + }, + { + componentNames: [ + { + exportedName: 'AIMakeText', + localName: 'AIMakeText', + }, + ], + defaultExportName: 'AIMakeText', + exportModules: [], + filePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/AIMakeText/index.js', + importModules: [ + { + importDefaultName: '_classCallCheck', + localName: '_classCallCheck', + source: '@babel/runtime/helpers/classCallCheck', + }, + { + importDefaultName: '_createClass', + localName: '_createClass', + source: '@babel/runtime/helpers/createClass', + }, + { + importDefaultName: '_possibleConstructorReturn', + localName: '_possibleConstructorReturn', + source: '@babel/runtime/helpers/possibleConstructorReturn', + }, + { + importDefaultName: '_getPrototypeOf', + localName: '_getPrototypeOf', + source: '@babel/runtime/helpers/getPrototypeOf', + }, + { + importDefaultName: '_assertThisInitialized', + localName: '_assertThisInitialized', + source: '@babel/runtime/helpers/assertThisInitialized', + }, + { + importDefaultName: '_inherits', + localName: '_inherits', + source: '@babel/runtime/helpers/inherits', + }, + { + importDefaultName: '_defineProperty', + localName: '_defineProperty', + source: '@babel/runtime/helpers/defineProperty', + }, + { + importDefaultName: 'React', + localName: 'React', + source: 'react', + }, + { + importName: 'Component', + localName: 'Component', + source: 'react', + }, + { + importDefaultName: 'PropTypes', + localName: 'PropTypes', + source: 'prop-types', + }, + { + importDefaultName: 'HOCBoxModelProps', + localName: 'HOCBoxModelProps', + source: '../utils/HOCBoxModelProps', + }, + { + importDefaultName: 'HOCTextProps', + localName: 'HOCTextProps', + source: '../utils/HOCTextProps', + }, + { + importDefaultName: 'HOCLayoutProps', + localName: 'HOCLayoutProps', + source: '../utils/HOCLayoutProps', + }, + { + importDefaultName: 'HOCBackgroundProps', + localName: 'HOCBackgroundProps', + source: '../utils/HOCBackgroundProps', + }, + ], + propsDefaults: [ + { + defaultValue: '{}', + name: 'style', + }, + ], + propsTypes: [ + { + name: 'children', + required: false, + type: 'oneOfType', + }, + { + name: 'type', + required: false, + type: 'string', + }, + { + name: 'styleBoxModel', + required: false, + type: 'object', + }, + { + name: 'styleText', + required: false, + type: 'object', + }, + { + name: 'styleLayout', + required: false, + type: 'object', + }, + { + name: 'styleBackground', + required: false, + type: 'object', + }, + { + name: 'style', + required: false, + type: 'object', + }, + ], + subModules: [], + }, + { + componentNames: [ + { + exportedName: 'Root', + localName: 'Root', + }, + ], + defaultExportName: 'Root', + exportModules: [], + filePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/index.js', + importModules: [ + { + importDefaultName: '_classCallCheck', + localName: '_classCallCheck', + source: '@babel/runtime/helpers/classCallCheck', + }, + { + importDefaultName: '_createClass', + localName: '_createClass', + source: '@babel/runtime/helpers/createClass', + }, + { + importDefaultName: '_possibleConstructorReturn', + localName: '_possibleConstructorReturn', + source: '@babel/runtime/helpers/possibleConstructorReturn', + }, + { + importDefaultName: '_getPrototypeOf', + localName: '_getPrototypeOf', + source: '@babel/runtime/helpers/getPrototypeOf', + }, + { + importDefaultName: '_inherits', + localName: '_inherits', + source: '@babel/runtime/helpers/inherits', + }, + { + importDefaultName: '_defineProperty', + localName: '_defineProperty', + source: '@babel/runtime/helpers/defineProperty', + }, + { + importDefaultName: 'React', + localName: 'React', + source: 'react', + }, + { + importDefaultName: 'PropTypes', + localName: 'PropTypes', + source: 'prop-types', + }, + ], + propsDefaults: [ + { + defaultValue: `{␊ + padding: 0,␊ + backgroundColor: '#f0f2f5',␊ + minHeight: '100%'␊ + }`, + name: 'style', + }, + ], + propsTypes: [ + { + name: 'style', + required: false, + type: 'object', + }, + { + name: 'children', + required: false, + type: 'oneOfType', + }, + ], + subModules: [], + }, + ] + +## parse es6 single exported component by local + +> Snapshot 1 + + [ + { + componentNames: [ + { + exportedName: 'Demo', + localName: 'Demo', + }, + ], + defaultExportName: 'Demo', + exportModules: [], + filePath: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/index.js', + importModules: [ + { + importDefaultName: '_classCallCheck', + localName: '_classCallCheck', + source: '@babel/runtime/helpers/classCallCheck', + }, + { + importDefaultName: '_createClass', + localName: '_createClass', + source: '@babel/runtime/helpers/createClass', + }, + { + importDefaultName: '_possibleConstructorReturn', + localName: '_possibleConstructorReturn', + source: '@babel/runtime/helpers/possibleConstructorReturn', + }, + { + importDefaultName: '_getPrototypeOf', + localName: '_getPrototypeOf', + source: '@babel/runtime/helpers/getPrototypeOf', + }, + { + importDefaultName: '_inherits', + localName: '_inherits', + source: '@babel/runtime/helpers/inherits', + }, + { + importDefaultName: 'React', + localName: 'React', + source: 'react', + }, + { + importDefaultName: 'PropTypes', + localName: 'PropTypes', + source: 'prop-types', + }, + ], + propsDefaults: [], + propsTypes: [ + { + name: 'optionalArray', + required: false, + type: 'array', + }, + { + name: 'optionalBool', + required: false, + type: 'bool', + }, + { + name: 'optionalFunc', + required: false, + type: 'func', + }, + { + name: 'optionalNumber', + required: false, + type: 'number', + }, + { + name: 'optionalObject', + required: false, + type: 'object', + }, + { + name: 'optionalString', + required: false, + type: 'string', + }, + { + name: 'optionalSymbol', + required: false, + type: 'symbol', + }, + { + name: 'optionalNode', + required: false, + type: 'node', + }, + { + name: 'optionalElement', + required: false, + type: 'element', + }, + { + name: 'optionalElementType', + required: false, + type: 'elementType', + }, + { + name: 'optionalMessage', + required: false, + type: 'instanceOf', + }, + { + name: 'optionalEnum', + required: false, + type: 'oneOf', + }, + { + name: 'optionalUnion', + required: false, + type: 'oneOfType', + }, + { + name: 'optionalArrayOf', + required: false, + type: 'arrayOf', + }, + { + name: 'optionalObjectOf', + required: false, + type: 'objectOf', + }, + { + name: 'optionalObjectWithShape', + required: false, + type: 'shape', + }, + { + name: 'optionalObjectWithShape2', + required: true, + type: 'shape', + }, + { + name: 'optionalObjectWithStrictShape', + required: false, + type: 'exact', + }, + { + name: 'requiredFunc', + required: false, + type: 'func', + }, + { + name: 'requiredAny', + required: false, + type: 'any', + }, + ], + subModules: [], + }, + ] diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/parser/ReactParser.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/parser/ReactParser.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..4eb00f231ea539d2bc78020184e99668a6335299 GIT binary patch literal 6584 zcmV;p8As+pRzVL(`-rDYWdnAP5ShfTJQ* zMQ}wOMO;vE0X~%(mQNG~M@Pny`2g1$XU5_C=icVfyrU)law$%{RajLJ`5G};#Z<;5Mg#Q=Hnd)uN~UhMCO#Xxy+j%_hW&hB+A zz5`BzD1XMX!BOyckQl&NZa{N(fn&?3Njj^_k1s|?N6R6Kp_BkC*ar53C2Gc+z? znuJIaLi`g73uG(>lmH9JMi-6&2CzJcgy<)Pco@odupgWQoq`$r82kjgs3RFm14AN7j3zP06gcHz5qJh10866K6!0cE9z|ljL1IM6+g+qe^-q}b zwhc=iql(m-YU@l!$!IOs)=Czpib4=S``VZasZv{SunupiGnr+hc@2{TB}ShQ6d}pZ z7*j>PL5LGvsW(XDwASk8Klm+Yno^5owrHv(V^yQpSf$aKDkM#%*<`dz#tMzWG&4*7 zi`Jme!VBAS7F4}a($r~nHQFl4qN&wdC9_^@$g0zt5lmy1ELKgWzQI~=wyj0p`Z@!O z$%#o7S-hzltkxSVq=xKi7P%o4TQ)>r>(CIazN_WxIohG|*LHyORSJ@imI8tTtE=TH>c$XvfdA#$Hx+cNhNDWA6`$)wo4I5|B z>ZEFup+Yh%%}Th?0ek3*8n71aavZlg2`|wSBIgZq#M3*D=NutY<@=J0)QbUs5jnu74Z6B$C2_};=MvId!bd1(rA!B4~ zisR@!l;m=BK2LHvI>GInk4|noC!-VWa5nGna5f*T3LcAcrJxK<1NC45SPAZJ=Xfa~ zfEL~i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BQ3LttMB zIZ6b?&|mvL1LX&h9m-f)DAC1d>NY{y22Oy8Frtgk)GdZm0ycodR2QGA+a;W_?w}m3 z3n#kxOx+Kmd?;I1${G=t>6#f4AqkaJvx@LL@*3!V~O5Q(3e74 z30?*tQ(b%}uwNWw!5|Mzj3asnL7xR>0oVriQoW;~e+}g<=n&7?fOw*dPaH0TB7wWX zGgKF!ID8n&#~>&Hn^^+U#U~Em0A)N_3Ld7q_{8CNpu7iEiHxNr5?y@a@GvMvU=i3% zb@7SAd!XzC--4JVqKi))&V|w+Oa=3)PM$dI@wF0V*5mG4iDLP#mH4ie_^y@w>aLai z7hHF6dG;M)swb@m1CPPxcu^$YM!*b|y>x^Xzw qS=-!rslnMy#&Jio$GkLeu3`3&Lyc{jsrYM+jsFig%g>HossI3NkewF* literal 0 HcmV?d00001 diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.md new file mode 100644 index 000000000..c34fd12b6 --- /dev/null +++ b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.md @@ -0,0 +1,633 @@ +# 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. ).␊ + 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', + } diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/LocalScanner.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..3e40b83192128a4861f7766bcd9e75d733ebb76d GIT binary patch literal 3709 zcmV-@4ubJPRzV-J>00000000B+ zT+NRhM-}hcjo0=X$F_n(ARLNuqM1o%dv={Ku^R{Mjh8rzKV&;Z(Q37+nW>rSY)|*l z-DB_Ij3R-AkPwRC5-D6j960a~gd_*V1tfCe2tp_d;)dV=0xn3rS5@6z{V~%$vmaTL zwbXJ?)vsQ?diAQ_uU_}|vZiS>+TZ^EpLgFs^WYDE|J(1qtJU@Y7Bu|#&WoD%yWf2H z!Jj|)&bJ;q`^E3x`o%xqEb!9DU)8i(?I=eTjuqyfga4n0>tAr4g2pex<-qkoVeU*} z?ppnI*6<32;P&+C(^}!ARyd*+P61}-vxQmsai(y*OAYIif=psv28E44OWEU8@3&XVG#htA|`iL6IK-i zRn_rVmC;p`%2ySos-n-~%6x1dkKsICr(Wj(?~FO!@6F@Vyqhp!W;I=5;^J59w9d?$ z)3-dM%W55F_HcX>R19Wivtd%#U8SbE+F^~Y@vWm+Rfxl2z^hoDAt3}R&3m@%8g)K4 z*K_&}u>1`M_Oiwc8`(?|-DV!lp=W!rv0rPAmlwqo2&)i073!a z4aPT*VnZP}7;S(n-zBTQqmZFoM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`HjIwW>YHY2gyYuDic9Ytthj_a2N5al%T)h_>tsRG z*5I;sRjQc}K*e7bGQK<|J~H)TK~CZ@C2#kb;hcbBLN{FZ8Xx3r-f21_In*WCKSW z3l`+gv>*Z^wAdj{k(i=h!)2{E_JK!$ZJd?X1D1*BoWT)JP%b1M22=#Zs zU9#gpMjeQE4wx2be*(9@W<6CGz-s!5YBKT5Vv6 z)FTaQkvfx;!kQT2Q7;!s8VZIR$wpjaI|R_&HbPX{#*e7cHYY2j0UIW)3?Z7ijGvob zU9|!nfS2R>38|G_m$EZbHkeMHy)p2sS?LIdgHC-DR5UfUr33F0{K1K`|EoH!(qgI0vy9E_|&FTcx-30bCSBQG?X2}hJ zfJ25yVU?ZpZ{aW5m}1Ow`@Tv82(5uurqMMZU=z2h}8Y@*Xa zJ2Xv~S_9!LN*^y<@LwjImd>ACR%1-1s>OX-P7g3^@LsM+d~3MYN^B0%#2fE4Iovyj z*Wsq;hiYl(alMHxAljWR%SQI+PkN(+6498@1*||q>-KFXlz1&nm%WCQk0g_DAED$9 zb*ymGUE+4^I~Kl(i!!9+SS1f{ZyQb4)DyExw{X$J-cB(&<{6E?iFxb}O&J`%>U23 b%g?mMPN$q0WSveA*x~Gdj#3cDWmy0KZ;B*} literal 0 HcmV?d00001 diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.md new file mode 100644 index 000000000..0d4d5d63d --- /dev/null +++ b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.md @@ -0,0 +1,580 @@ +# 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', + } diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/OnlineScanner.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..832d139536b3de4186e43497f6f19790d5b670ba GIT binary patch literal 2988 zcmV;d3sdw#RzV%`LP9)%kU)3hi91h+nQ@M zZ`RdCwO%7`&9HQ`tG@0^^7FEM2}}-z7P_|HH;Eh5zR=rge?{w(;QB&BcTAuF0>6fgY1YE*DVlu;vvV~2N6gOC z?8lg0KFq`#huP1meAT>!l@CrOKt{``CldMXJ$2T({CJ`;n^C7>;Un2^4% z#GvyD==%Wq0Mg$t$Dj)d=&dV~^kqozUyDIcC!mGvl5`%@&6_dknFRDl0Qm`|o%I;B zknru9n3J4s875h?Est29UpDiuY;=3J<0-f9Jpd=XZEDtz(sJysQc`QwBWqkuX{8{* z?=@{J6^#`Ma93-SbTrn);rERpmS9C3{Ls{zq+^>paZ+Wt`nc$0vg@VFU_}IeWZQ8V z76E|lQouexgjH^Us(k;eT<@w$x|#wEii#t zy30CUyt%Dy6SL;@EzjtZT8EfD*q3TPs2GmZR@2m6cTF?RwGL_SjFuL$yb_0K9$CZc z3=I*G6YtrsYi!fLxt`N+dbab3czwqjt!$_mr@BqNhmP&p9&EK6ta%& zjJ^dZPEaQ;!y=#*0N&ncaScRC@ z?2H>>UfEc?ZSOv?bz&ksfU0V(?-{0Bi`NU1_q9E{?+ugVYQ^@n=1$wO`<6bmMG+xL zubX6dbh|MGNEe=Hj<7?n7HXF-Zf!mM+M~N$TbFBvR^MuR5TupzRye8^Wxt?Ab6pm; z2Mz}66(v-_p~_5y5?@nguVc7X9?5hlio=|Ixc~d2F)!v#tEgJ9XYTnx&1v_$V5D1t zCKP3W&G3s;?9?V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fq3gur>O6=|w@jmr;jIZCN1Rf!^KQKN*{@tBs8M{d0+sn6m~q~olPC%6 zgwpIs2(8k;zYFz*_L3$FQZ|vkcFG z`FRuerjfc*MW)>7X+0ogM<^4MF!no^4EBYfkb{H_#OGC`Xc!6x{HtXCqDCmbiG>YbJ1Ys|6|)#k zL@F{F6{MX~o6un&2C*00t^_@eZ}91>l${Sj_lj*|5eGM)U=q-;Vb_mlvB}qnWH7A4 zcN-pPJ%QPD7LiCSay+54ge6OS$u%sw#+O{jlIwiQ4J_e_N>6jNwxjhrP|@Rg5H5Ep zqyI}o$VlAgO`(4c<*m1r5^xj$_-7Dj@XYy!b8Y6+CyQjG2gP7m^voTjPR#a?;=nR8 z1(#kh&8f?go@iEh5$fT=%>?H3;J|`{xeW)DkrsP%kjuLeKqmg9Ao)7ap|wrJtOC({`lv(rC>wF z^0ivD$K!@f{pOg?RB41g%rjL~IR353FXpDVB2Uwq>I63mlt|NGagU(TRQaW$L>k3` zE5=bGkw#F)$t6M#dRR$yjCVfC%s;L-$Fd%+W>6|V0K)&kMHacA@??<+T7^R%j68(&g?X7AAQ(PiMYra za|K-=R8(uYB-ADyFdB;QfTJED6r*@%C`M35C`QOZLowAcUMObfA0QNGhcnznVf$7d i!$zPKhes?lWk|$|?Y*4BOaK4}lhD`z literal 0 HcmV?d00001 diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/Scanner.ts.md b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/Scanner.ts.md new file mode 100644 index 000000000..dea63989c --- /dev/null +++ b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/Scanner.ts.md @@ -0,0 +1,633 @@ +# Snapshot report for `test/scanner/Scanner.ts` + +The actual snapshot is saved in `Scanner.ts.snap`. + +Generated by [AVA](https://ava.li). + +## scan multiple exported component + +> Snapshot 1 + + { + mainEntry: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/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/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/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/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/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/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/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/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/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/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/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/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/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/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/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/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/multiple-exported-component/es/basic/Root/index.js', + }, + ], + pkgName: 'multiple-exported-component', + pkgVersion: '1.0.0', + sourceType: 'module', + } + +## scan single exported component + +> Snapshot 1 + + { + mainEntry: '/Users/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/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. ).␊ + 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/gengyang/code/frontend/low-code/ali-lowcode-engine/packages/material-parser/test/fixtures/single-exported-component/es/index.js', + }, + ], + pkgName: 'single-exported-component', + pkgVersion: '1.0.0', + sourceType: 'module', + } diff --git a/packages/material-parser/test/fixtures/__snapshots__/test/scanner/Scanner.ts.snap b/packages/material-parser/test/fixtures/__snapshots__/test/scanner/Scanner.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..fc7332acc0f699598294c6ca379df48328d0012b GIT binary patch literal 3708 zcmV-?4ukPQRzV?U`GKV2uPJlU}lopp0(qEv>PYb8(VP{|6n^L(Q4V$%+$p^|)0e$XT z<2Bawbv?X2b?TI+->>OMH2oxCW?p*_|P^ zJN2g1V)eG`*gmscb<4TEz)PrQF2E1GUjV3SvwEL4H)w}>^&a(^Yf@{WPhAjJ_nGI{ z+vb)(aItn^`DWjOW?Oy7^;ru9_WF*^Y`+fGrrly&#%rFYe_Geyf-wck9_=};fyKPU z7>@QgI#+3r1-~B}BR|n}9-4j=25UNYP;}(9v1lwNah@}9o9x!GANDdQl)=e3{%26~ zZ*YAG*T3NU2(GyqO?v>YFTz!xkrQ*|yzA1TJ`>!XJb6;n=Rt<1pV0L)GkkX8ZVm2q zo!`EJw=?|qS9m+iZ$H4>`}pngS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mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},K={};function W(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(K[e]=o),t&&(K[t[0]]=function(){return A(o.apply(this,arguments),t[1],t[2])}),n&&(K[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function B(e,t){return e.isValid()?(t=U(t,e.localeData()),R[t]=R[t]||function(e){var t,n,r,o=e.match(F);for(t=0,n=o.length;t=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var q=/\d/,G=/\d\d/,J=/\d{3}/,$=/\d{4}/,X=/[+-]?\d{6}/,Q=/\d\d?/,Z=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,oe=/\d+/,ae=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,ce=/Z|[+-]\d\d(?::?\d\d)?/gi,se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,le={};function ue(e,t,n){le[e]=T(t)?t:function(e,r){return e&&n?n:t}}function fe(e,t){return f(le,e)?le[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var de={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),s(t)&&(r=function(e,n){n[t]=k(e)}),n=0;n68?1900:2e3)};var Le,xe=Te("FullYear",!0);function Te(e,t){return function(n){return null!=n?(De(this,e,n),o.updateOffset(this,t),this):ze(this,e)}}function ze(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function De(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Ee(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?Ee(e)?29:28:31-r%7%2}Le=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(c=new Date(e+400,t,n,r,o,a,i),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,n,r,o,a,i),c}function We(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Be(e,t,n){var r=7+t-n;return-(7+We(e,0,r).getUTCDay()-t)%7+r-1}function Ue(e,t,n,r,o){var a,i,c=1+7*(t-1)+(7+n-r)%7+Be(e,r,o);return c<=0?i=Ce(a=e-1)+c:c>Ce(e)?(a=e+1,i=c-Ce(e)):(a=e,i=c),{year:a,dayOfYear:i}}function qe(e,t,n){var r,o,a=Be(e.year(),t,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?r=i+Ge(o=e.year()-1,t,n):i>Ge(e.year(),t,n)?(r=i-Ge(e.year(),t,n),o=e.year()+1):(o=e.year(),r=i),{week:r,year:o}}function Ge(e,t,n){var r=Be(e,t,n),o=Be(e+1,t,n);return(Ce(e)-r+o)/7}function Je(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),Y("week",5),Y("isoWeek",5),ue("w",Q),ue("ww",Q,G),ue("W",Q),ue("WW",Q,G),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=k(e)})),W("d",0,"do","day"),W("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),W("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),W("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),ue("d",Q),ue("e",Q),ue("E",Q),ue("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ue("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ue("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:h(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=k(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ze(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Le.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Le.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=Le.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=Le.call(this._weekdaysParse,i))?o:-1!==(o=Le.call(this._shortWeekdaysParse,i))?o:-1!==(o=Le.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Le.call(this._shortWeekdaysParse,i))?o:-1!==(o=Le.call(this._weekdaysParse,i))?o:-1!==(o=Le.call(this._minWeekdaysParse,i))?o:null:-1!==(o=Le.call(this._minWeekdaysParse,i))?o:-1!==(o=Le.call(this._weekdaysParse,i))?o:-1!==(o=Le.call(this._shortWeekdaysParse,i))?o:null}var et=se,tt=se,nt=se;function rt(){function e(e,t){return t.length-e.length}var t,n,r,o,a,i=[],c=[],s=[],l=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),a=this.weekdays(n,""),i.push(r),c.push(o),s.push(a),l.push(r),l.push(o),l.push(a);for(i.sort(e),c.sort(e),s.sort(e),l.sort(e),t=0;t<7;t++)c[t]=pe(c[t]),s[t]=pe(s[t]),l[t]=pe(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function ot(){return this.hours()%12||12}function at(e,t){W(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,ot),W("k",["kk",2],0,(function(){return this.hours()||24})),W("hmm",0,0,(function(){return""+ot.apply(this)+A(this.minutes(),2)})),W("hmmss",0,0,(function(){return""+ot.apply(this)+A(this.minutes(),2)+A(this.seconds(),2)})),W("Hmm",0,0,(function(){return""+this.hours()+A(this.minutes(),2)})),W("Hmmss",0,0,(function(){return""+this.hours()+A(this.minutes(),2)+A(this.seconds(),2)})),at("a",!0),at("A",!1),j("hour","h"),Y("hour",13),ue("a",it),ue("A",it),ue("H",Q),ue("h",Q),ue("k",Q),ue("HH",Q,G),ue("hh",Q,G),ue("kk",Q,G),ue("hmm",Z),ue("hmmss",ee),ue("Hmm",Z),ue("Hmmss",ee),he(["H","HH"],_e),he(["k","kk"],(function(e,t,n){var r=k(e);t[_e]=24===r?0:r})),he(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),he(["h","hh"],(function(e,t,n){t[_e]=k(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[_e]=k(e.substr(0,r)),t[Me]=k(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,r)),t[Me]=k(e.substr(r,2)),t[we]=k(e.substr(o)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[_e]=k(e.substr(0,r)),t[Me]=k(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,r)),t[Me]=k(e.substr(r,2)),t[we]=k(e.substr(o))}));var ct,st=Te("Hours",!0),lt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Ve,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:Qe,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},ut={},ft={};function pt(e){return e?e.toLowerCase().replace("_","-"):e}function dt(t){var r=null;if(!ut[t]&&void 0!==e&&e&&e.exports)try{r=ct._abbr,n(459)("./"+t),ht(r)}catch(e){}return ut[t]}function ht(e,t){var n;return e&&((n=c(t)?vt(e):mt(e,t))?ct=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ct._abbr}function mt(e,t){if(null!==t){var n,r=lt;if(t.abbr=e,null!=ut[e])x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ut[e]._config;else if(null!=t.parentLocale)if(null!=ut[t.parentLocale])r=ut[t.parentLocale]._config;else{if(null==(n=dt(t.parentLocale)))return ft[t.parentLocale]||(ft[t.parentLocale]=[]),ft[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ut[e]=new D(z(r,t)),ft[e]&&ft[e].forEach((function(e){mt(e.name,e.config)})),ht(e),ut[e]}return delete ut[e],null}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ct;if(!a(e)){if(t=dt(e))return t;e=[e]}return function(e){for(var t,n,r,o,a=0;a0;){if(r=dt(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&S(o,n,!0)>=t-1)break;t--}a++}return ct}(e)}function yt(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[be]<1||n[be]>Pe(n[ye],n[ge])?be:n[_e]<0||n[_e]>24||24===n[_e]&&(0!==n[Me]||0!==n[we]||0!==n[ke])?_e:n[Me]<0||n[Me]>59?Me:n[we]<0||n[we]>59?we:n[ke]<0||n[ke]>999?ke:-1,h(e)._overflowDayOfYear&&(tbe)&&(t=be),h(e)._overflowWeeks&&-1===t&&(t=Se),h(e)._overflowWeekday&&-1===t&&(t=Oe),h(e).overflow=t),e}function gt(e,t,n){return null!=e?e:null!=t?t:n}function bt(e){var t,n,r,a,i,c=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[be]&&null==e._a[ge]&&function(e){var t,n,r,o,a,i,c,s;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)a=1,i=4,n=gt(t.GG,e._a[ye],qe(jt(),1,4).year),r=gt(t.W,1),((o=gt(t.E,1))<1||o>7)&&(s=!0);else{a=e._locale._week.dow,i=e._locale._week.doy;var l=qe(jt(),a,i);n=gt(t.gg,e._a[ye],l.year),r=gt(t.w,l.week),null!=t.d?((o=t.d)<0||o>6)&&(s=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(s=!0)):o=a}r<1||r>Ge(n,a,i)?h(e)._overflowWeeks=!0:null!=s?h(e)._overflowWeekday=!0:(c=Ue(n,r,o,a,i),e._a[ye]=c.year,e._dayOfYear=c.dayOfYear)}(e),null!=e._dayOfYear&&(i=gt(e._a[ye],r[ye]),(e._dayOfYear>Ce(i)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=We(i,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=r[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_e]&&0===e._a[Me]&&0===e._a[we]&&0===e._a[ke]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?We:Ke).apply(null,c),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(h(e).weekdayMismatch=!0)}}var _t=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],St=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ot=/^\/?Date\((\-?\d+)/i;function Ct(e){var t,n,r,o,a,i,c=e._i,s=_t.exec(c)||Mt.exec(c);if(s){for(h(e).iso=!0,t=0,n=kt.length;t0&&h(e).unusedInput.push(i),c=c.slice(c.indexOf(n)+n.length),l+=n.length),K[a]?(n?h(e).empty=!1:h(e).unusedTokens.push(a),ve(a,n,e)):e._strict&&!n&&h(e).unusedTokens.push(a);h(e).charsLeftOver=s-l,c.length>0&&h(e).unusedInput.push(c),e._a[_e]<=12&&!0===h(e).bigHour&&e._a[_e]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[_e]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[_e],e._meridiem),bt(e),yt(e)}else Tt(e);else Ct(e)}function Dt(e){var t=e._i,n=e._f;return e._locale=e._locale||vt(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),M(t)?new _(yt(t)):(l(t)?e._d=t:a(n)?function(e){var t,n,r,o,a;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis?this:e:v()}));function Nt(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return jt();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-fn:new Date(e,t,n).valueOf()}function hn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fn:Date.UTC(e,t,n)}function mn(e,t){W(0,[e,e.length],0,t)}function vn(e,t,n,r,o){var a;return null==e?qe(this,r,o).year:(t>(a=Ge(e,r,o))&&(t=a),yn.call(this,e,t,n,r,o))}function yn(e,t,n,r,o){var a=Ue(e,t,n,r,o),i=We(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}W(0,["gg",2],0,(function(){return this.weekYear()%100})),W(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),mn("gggg","weekYear"),mn("ggggg","weekYear"),mn("GGGG","isoWeekYear"),mn("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),ue("G",ae),ue("g",ae),ue("GG",Q,G),ue("gg",Q,G),ue("GGGG",ne,$),ue("gggg",ne,$),ue("GGGGG",re,X),ue("ggggg",re,X),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=k(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),W("Q",0,"Qo","quarter"),j("quarter","Q"),Y("quarter",7),ue("Q",q),he("Q",(function(e,t){t[ge]=3*(k(e)-1)})),W("D",["DD",2],"Do","date"),j("date","D"),Y("date",9),ue("D",Q),ue("DD",Q,G),ue("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],be),he("Do",(function(e,t){t[be]=k(e.match(Q)[0])}));var gn=Te("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),Y("dayOfYear",4),ue("DDD",te),ue("DDDD",J),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=k(e)})),W("m",["mm",2],0,"minute"),j("minute","m"),Y("minute",14),ue("m",Q),ue("mm",Q,G),he(["m","mm"],Me);var bn=Te("Minutes",!1);W("s",["ss",2],0,"second"),j("second","s"),Y("second",15),ue("s",Q),ue("ss",Q,G),he(["s","ss"],we);var _n,Mn=Te("Seconds",!1);for(W("S",0,0,(function(){return~~(this.millisecond()/100)})),W(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),W(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),W(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),W(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),W(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),W(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),j("millisecond","ms"),Y("millisecond",16),ue("S",te,q),ue("SS",te,G),ue("SSS",te,J),_n="SSSS";_n.length<=9;_n+="S")ue(_n,oe);function wn(e,t){t[ke]=k(1e3*("0."+e))}for(_n="S";_n.length<=9;_n+="S")he(_n,wn);var kn=Te("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var Sn=_.prototype;function On(e){return e}Sn.add=tn,Sn.calendar=function(e,t){var n=e||jt(),r=Bt(n,this).startOf("day"),a=o.calendarFormat(this,r)||"sameElse",i=t&&(T(t[a])?t[a].call(this,n):t[a]);return this.format(i||this.localeData().calendar(a,this,jt(n)))},Sn.clone=function(){return new _(this)},Sn.diff=function(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(!(r=Bt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=H(t)){case"year":a=rn(this,r)/12;break;case"month":a=rn(this,r);break;case"quarter":a=rn(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:w(a)},Sn.endOf=function(e){var t;if(void 0===(e=H(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?hn:dn;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=un-pn(t+(this._isUTC?0:this.utcOffset()*ln),un)-1;break;case"minute":t=this._d.valueOf(),t+=ln-pn(t,ln)-1;break;case"second":t=this._d.valueOf(),t+=sn-pn(t,sn)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},Sn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=B(this,e);return this.localeData().postformat(t)},Sn.from=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||jt(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.fromNow=function(e){return this.from(jt(),e)},Sn.to=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||jt(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.toNow=function(e){return this.to(jt(),e)},Sn.get=function(e){return T(this[e=H(e)])?this[e]():this},Sn.invalidAt=function(){return h(this).overflow},Sn.isAfter=function(e,t){var n=M(e)?e:jt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?B(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(n,"Z")):B(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Sn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+o)},Sn.toJSON=function(){return this.isValid()?this.toISOString():null},Sn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Sn.unix=function(){return Math.floor(this.valueOf()/1e3)},Sn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Sn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Sn.year=xe,Sn.isLeapYear=function(){return Ee(this.year())},Sn.weekYear=function(e){return vn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Sn.isoWeekYear=function(e){return vn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Sn.quarter=Sn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Sn.month=Ae,Sn.daysInMonth=function(){return Pe(this.year(),this.month())},Sn.week=Sn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Sn.isoWeek=Sn.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Sn.weeksInYear=function(){var e=this.localeData()._week;return Ge(this.year(),e.dow,e.doy)},Sn.isoWeeksInYear=function(){return Ge(this.year(),1,4)},Sn.date=gn,Sn.day=Sn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Sn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Sn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Sn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Sn.hour=Sn.hours=st,Sn.minute=Sn.minutes=bn,Sn.second=Sn.seconds=Mn,Sn.millisecond=Sn.milliseconds=kn,Sn.utcOffset=function(e,t,n){var r,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Wt(ce,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Ut(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==e&&(!t||this._changeInProgress?en(this,$t(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Ut(this)},Sn.utc=function(e){return this.utcOffset(0,e)},Sn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ut(this),"m")),this},Sn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Wt(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Sn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?jt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Sn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Sn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Sn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Sn.isUtc=qt,Sn.isUTC=qt,Sn.zoneAbbr=function(){return this._isUTC?"UTC":""},Sn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Sn.dates=C("dates accessor is deprecated. Use date instead.",gn),Sn.months=C("months accessor is deprecated. Use month instead",Ae),Sn.years=C("years accessor is deprecated. Use year instead",xe),Sn.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),Sn.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=Dt(e))._a){var t=e._isUTC?d(e._a):jt(e._a);this._isDSTShifted=this.isValid()&&S(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var Cn=D.prototype;function En(e,t,n,r){var o=vt(),a=d().set(r,t);return o[n](a,e)}function Ln(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return En(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=En(e,r,n,"month");return o}function xn(e,t,n,r){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var o,a=vt(),i=e?a._week.dow:0;if(null!=n)return En(t,(n+i)%7,r,"day");var c=[];for(o=0;o<7;o++)c[o]=En(t,(o+i)%7,r,"day");return c}Cn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r},Cn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},Cn.invalidDate=function(){return this._invalidDate},Cn.ordinal=function(e){return this._ordinal.replace("%d",e)},Cn.preparse=On,Cn.postformat=On,Cn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return T(o)?o(e,t,n,r):o.replace(/%d/i,e)},Cn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)},Cn.set=function(e){var t,n;for(n in e)T(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Cn.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||je).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},Cn.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[je.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Cn.monthsParse=function(e,t,n){var r,o,a;if(this._monthsParseExact)return Ne.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Cn.monthsRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Re.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Ie),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Cn.monthsShortRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Re.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Cn.week=function(e){return qe(e,this._week.dow,this._week.doy).week},Cn.firstDayOfYear=function(){return this._week.doy},Cn.firstDayOfWeek=function(){return this._week.dow},Cn.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Je(n,this._week.dow):e?n[e.day()]:n},Cn.weekdaysMin=function(e){return!0===e?Je(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Cn.weekdaysShort=function(e){return!0===e?Je(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Cn.weekdaysParse=function(e,t,n){var r,o,a;if(this._weekdaysParseExact)return Ze.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Cn.weekdaysRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Cn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Cn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Cn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Cn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ht("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=C("moment.lang is deprecated. Use moment.locale instead.",ht),o.langData=C("moment.langData is deprecated. Use moment.localeData instead.",vt);var Tn=Math.abs;function zn(e,t,n,r){var o=$t(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Dn(e){return e<0?Math.floor(e):Math.ceil(e)}function Pn(e){return 4800*e/146097}function jn(e){return 146097*e/4800}function Hn(e){return function(){return this.as(e)}}var Vn=Hn("ms"),Nn=Hn("s"),Yn=Hn("m"),An=Hn("h"),Fn=Hn("d"),In=Hn("w"),Rn=Hn("M"),Kn=Hn("Q"),Wn=Hn("y");function Bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Un=Bn("milliseconds"),qn=Bn("seconds"),Gn=Bn("minutes"),Jn=Bn("hours"),$n=Bn("days"),Xn=Bn("months"),Qn=Bn("years"),Zn=Math.round,er={ss:44,s:45,m:45,h:22,d:26,M:11};function tr(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var nr=Math.abs;function rr(e){return(e>0)-(e<0)||+e}function or(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=nr(this._milliseconds)/1e3,r=nr(this._days),o=nr(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var a=w(o/12),i=o%=12,c=r,s=t,l=e,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",f=this.asSeconds();if(!f)return"P0D";var p=f<0?"-":"",d=rr(this._months)!==rr(f)?"-":"",h=rr(this._days)!==rr(f)?"-":"",m=rr(this._milliseconds)!==rr(f)?"-":"";return p+"P"+(a?d+a+"Y":"")+(i?d+i+"M":"")+(c?h+c+"D":"")+(s||l||u?"T":"")+(s?m+s+"H":"")+(l?m+l+"M":"")+(u?m+u+"S":"")}var ar=At.prototype;return ar.isValid=function(){return this._isValid},ar.abs=function(){var e=this._data;return this._milliseconds=Tn(this._milliseconds),this._days=Tn(this._days),this._months=Tn(this._months),e.milliseconds=Tn(e.milliseconds),e.seconds=Tn(e.seconds),e.minutes=Tn(e.minutes),e.hours=Tn(e.hours),e.months=Tn(e.months),e.years=Tn(e.years),this},ar.add=function(e,t){return zn(this,e,t,1)},ar.subtract=function(e,t){return zn(this,e,t,-1)},ar.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=H(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Pn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(jn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},ar.asMilliseconds=Vn,ar.asSeconds=Nn,ar.asMinutes=Yn,ar.asHours=An,ar.asDays=Fn,ar.asWeeks=In,ar.asMonths=Rn,ar.asQuarters=Kn,ar.asYears=Wn,ar.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},ar._bubble=function(){var e,t,n,r,o,a=this._milliseconds,i=this._days,c=this._months,s=this._data;return a>=0&&i>=0&&c>=0||a<=0&&i<=0&&c<=0||(a+=864e5*Dn(jn(c)+i),i=0,c=0),s.milliseconds=a%1e3,e=w(a/1e3),s.seconds=e%60,t=w(e/60),s.minutes=t%60,n=w(t/60),s.hours=n%24,i+=w(n/24),o=w(Pn(i)),c+=o,i-=Dn(jn(o)),r=w(c/12),c%=12,s.days=i,s.months=c,s.years=r,this},ar.clone=function(){return $t(this)},ar.get=function(e){return e=H(e),this.isValid()?this[e+"s"]():NaN},ar.milliseconds=Un,ar.seconds=qn,ar.minutes=Gn,ar.hours=Jn,ar.days=$n,ar.weeks=function(){return w(this.days()/7)},ar.months=Xn,ar.years=Qn,ar.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),o=Zn(r.as("s")),a=Zn(r.as("m")),i=Zn(r.as("h")),c=Zn(r.as("d")),s=Zn(r.as("M")),l=Zn(r.as("y")),u=o<=er.ss&&["s",o]||o0,u[4]=n,tr.apply(null,u)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},ar.toISOString=or,ar.toString=or,ar.toJSON=or,ar.locale=on,ar.localeData=cn,ar.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",or),ar.lang=an,W("X",0,0,"unix"),W("x",0,0,"valueOf"),ue("x",ae),ue("X",/[+-]?\d+(\.\d{1,3})?/),he("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),he("x",(function(e,t,n){n._d=new Date(k(e))})),o.version="2.24.0",t=jt,o.fn=Sn,o.min=function(){return Nt("isBefore",[].slice.call(arguments,0))},o.max=function(){return Nt("isAfter",[].slice.call(arguments,0))},o.now=function(){return Date.now?Date.now():+new Date},o.utc=d,o.unix=function(e){return jt(1e3*e)},o.months=function(e,t){return Ln(e,t,"months")},o.isDate=l,o.locale=ht,o.invalid=v,o.duration=$t,o.isMoment=M,o.weekdays=function(e,t,n){return xn(e,t,n,"weekdays")},o.parseZone=function(){return jt.apply(null,arguments).parseZone()},o.localeData=vt,o.isDuration=Ft,o.monthsShort=function(e,t){return Ln(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return xn(e,t,n,"weekdaysMin")},o.defineLocale=mt,o.updateLocale=function(e,t){if(null!=t){var n,r,o=lt;null!=(r=dt(e))&&(o=r._config),t=z(o,t),(n=new D(t)).parentLocale=ut[e],ut[e]=n,ht(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?ut[e]=ut[e].parentLocale:null!=ut[e]&&delete ut[e]);return ut[e]},o.locales=function(){return E(ut)},o.weekdaysShort=function(e,t,n){return xn(e,t,n,"weekdaysShort")},o.normalizeUnits=H,o.relativeTimeRounding=function(e){return void 0===e?Zn:"function"==typeof e&&(Zn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==er[e]&&(void 0===t?er[e]:(er[e]=t,"s"===e&&(er.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=Sn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}).call(this,n(105)(e))},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(400),a=(r=o)&&r.__esModule?r:{default:r};t.default=a.default||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:w;if(e){var n=this.definitions.get(e);return n&&"function"==typeof n.icon&&(n=u()({},n,{icon:n.icon(t.primaryColor,t.secondaryColor)})),n}}},{key:"setTwoToneColors",value:function(e){var t=e.primaryColor,n=e.secondaryColor;w.primaryColor=t,w.secondaryColor=n||Object(M.c)(t)}},{key:"getTwoToneColors",value:function(){return u()({},w)}}]),t}(r.Component);k.displayName="IconReact",k.definitions=new M.a;var S=k;function O(){return(O=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,n=e.extraCommonProps,o=void 0===n?{}:n;if("undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&"string"==typeof t&&t.length&&!E.has(t)){var a=document.createElement("script");a.setAttribute("src",t),a.setAttribute("data-namespace",t),E.add(t),document.body.appendChild(a)}var i=function(e){var t=e.type,n=e.children,a=C(e,["type","children"]),i=null;return e.type&&(i=r.createElement("use",{xlinkHref:"#".concat(t)})),n&&(i=n),r.createElement(R,O({},a,o),i)};return i.displayName="Iconfont",i},I.getTwoToneColor=function(){return S.getTwoToneColors().primaryColor},I.setTwoToneColor=j;var R=t.a=I},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(115),a=(r=o)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,a.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(445)),o=i(n(449)),a=i(n(115));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(408)},function(e,t,n){"use strict";var r=n(98);t.a=function(e,t,n){Object(r.a)(e,"[antd: ".concat(t,"] ").concat(n))}},function(e,t,n){"use strict";var r=n(0),o=n(1),a=n(3),i=n(24),c=n(61),s=n(11);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(){return(u=Object.assign||function(e){for(var t=1;t>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?O(e)+t:t}function E(){return!0}function L(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function x(e,t){return z(e,t,0)}function T(e,t){return z(e,t,t)}function z(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var D=0,P=1,j=2,H="function"==typeof Symbol&&Symbol.iterator,V="@@iterator",N=H||V;function Y(e){this.next=e}function A(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function F(){return{value:void 0,done:!0}}function I(e){return!!W(e)}function R(e){return e&&"function"==typeof e.next}function K(e){var t=W(e);return t&&t.call(e)}function W(e){var t=e&&(H&&e[H]||e[V]);if("function"==typeof t)return t}function B(e){return e&&"number"==typeof e.length}function U(e){return null==e?ae():i(e)?e.toSeq():function(e){var t=se(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function q(e){return null==e?ae().toKeyedSeq():i(e)?c(e)?e.toSeq():e.fromEntrySeq():ie(e)}function G(e){return null==e?ae():i(e)?c(e)?e.entrySeq():e.toIndexedSeq():ce(e)}function J(e){return(null==e?ae():i(e)?c(e)?e.entrySeq():e:ce(e)).toSetSeq()}Y.prototype.toString=function(){return"[Iterator]"},Y.KEYS=D,Y.VALUES=P,Y.ENTRIES=j,Y.prototype.inspect=Y.prototype.toSource=function(){return this.toString()},Y.prototype[N]=function(){return this},t(U,n),U.of=function(){return U(arguments)},U.prototype.toSeq=function(){return this},U.prototype.toString=function(){return this.__toString("Seq {","}")},U.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},U.prototype.__iterate=function(e,t){return le(this,e,t,!0)},U.prototype.__iterator=function(e,t){return ue(this,e,t,!0)},t(q,U),q.prototype.toKeyedSeq=function(){return this},t(G,U),G.of=function(){return G(arguments)},G.prototype.toIndexedSeq=function(){return this},G.prototype.toString=function(){return this.__toString("Seq [","]")},G.prototype.__iterate=function(e,t){return le(this,e,t,!1)},G.prototype.__iterator=function(e,t){return ue(this,e,t,!1)},t(J,U),J.of=function(){return J(arguments)},J.prototype.toSetSeq=function(){return this},U.isSeq=oe,U.Keyed=q,U.Set=J,U.Indexed=G;var $,X,Q,Z="@@__IMMUTABLE_SEQ__@@";function ee(e){this._array=e,this.size=e.length}function te(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function ne(e){this._iterable=e,this.size=e.length||e.size}function re(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[Z])}function ae(){return $||($=new ee([]))}function ie(e){var t=Array.isArray(e)?new ee(e).fromEntrySeq():R(e)?new re(e).fromEntrySeq():I(e)?new ne(e).fromEntrySeq():"object"==typeof e?new te(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ce(e){var t=se(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function se(e){return B(e)?new ee(e):R(e)?new re(e):I(e)?new ne(e):void 0}function le(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var c=o[n?a-i:i];if(!1===t(c[1],r?c[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function ue(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new Y((function(){var e=o[n?a-i:i];return i++>a?{value:void 0,done:!0}:A(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function fe(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,G(n).map((function(r,o){return e(t,r,o,n)}))):de(n)?t.call(o,r,q(n).map((function(r,o){return e(t,r,o,n)}))):n}(t,e,"",{"":e}):pe(e)}function pe(e){return Array.isArray(e)?G(e).map(pe).toList():de(e)?q(e).map(pe).toMap():e}function de(e){return e&&(e.constructor===Object||void 0===e.constructor)}function he(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function me(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||c(e)!==c(t)||s(e)!==s(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!l(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&he(o[1],e)&&(n||he(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var f=!0,p=t.__iterate((function(t,r){if(n?!e.has(t):o?!he(t,e.get(r,g)):!he(e.get(r,g),t))return f=!1,!1}));return f&&e.size===p}function ve(e,t){if(!(this instanceof ve))return new ve(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(X)return X;X=this}}function ye(e,t){if(!e)throw new Error(t)}function ge(e,t,n){if(!(this instanceof ge))return new ge(e,t,n);if(ye(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?{value:void 0,done:!0}:A(e,o,n[t?r-o++:o++])}))},t(te,q),te.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},te.prototype.has=function(e){return this._object.hasOwnProperty(e)},te.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},te.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new Y((function(){var i=r[t?o-a:a];return a++>o?{value:void 0,done:!0}:A(e,i,n[i])}))},te.prototype[h]=!0,t(ne,G),ne.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=K(this._iterable),r=0;if(R(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},ne.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=K(this._iterable);if(!R(n))return new Y(F);var r=0;return new Y((function(){var t=n.next();return t.done?t:A(e,r++,t.value)}))},t(re,G),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return A(e,o,r[o++])}))},t(ve,G),ve.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ve.prototype.get=function(e,t){return this.has(e)?this._value:t},ve.prototype.includes=function(e){return he(this._value,e)},ve.prototype.slice=function(e,t){var n=this.size;return L(e,t,n)?this:new ve(this._value,T(t,n)-x(e,n))},ve.prototype.reverse=function(){return this},ve.prototype.indexOf=function(e){return he(this._value,e)?0:-1},ve.prototype.lastIndexOf=function(e){return he(this._value,e)?this.size:-1},ve.prototype.__iterate=function(e,t){for(var n=0;n1?" by "+this._step:"")+" ]"},ge.prototype.get=function(e,t){return this.has(e)?this._start+C(this,e)*this._step:t},ge.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t=0&&nn?{value:void 0,done:!0}:A(e,a++,i)}))},ge.prototype.equals=function(e){return e instanceof ge?this._start===e._start&&this._end===e._end&&this._step===e._step:me(this,e)},t(be,n),t(_e,be),t(Me,be),t(we,be),be.Keyed=_e,be.Indexed=Me,be.Set=we;var ke="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Se(e){return e>>>1&1073741824|3221225471&e}function Oe(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Se(n)}if("string"===t)return e.length>Pe?function(e){var t=Ve[e];return void 0===t&&(t=Ce(e),He===je&&(He=0,Ve={}),He++,Ve[e]=t),t}(e):Ce(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(Te&&void 0!==(t=Ee.get(e)))return t;if(void 0!==(t=e[De]))return t;if(!xe){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[De]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++ze,1073741824&ze&&(ze=0),Te)Ee.set(e,t);else{if(void 0!==Le&&!1===Le(e))throw new Error("Non-extensible objects are not allowed as keys.");if(xe)Object.defineProperty(e,De,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[De]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[De]=t}}return t}(e);if("function"==typeof e.toString)return Ce(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Ce(e){for(var t=0,n=0;n>>n)&y,c=(0===n?r:r>>>n)&y;return new We(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function st(e,t,n,r){var o=r?e:S(e);return o[t]=n,o}Re[Ie]=!0,Re.delete=Re.remove,Re.removeIn=Re.deleteIn,Ke.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a=lt)return function(e,t,n,r){e||(e=new k);for(var o=new qe(e,Oe(n),[n,r]),a=0;a>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[ct(a&o-1)].get(e+m,t,n,r)},We.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var c=(0===t?n:n>>>t)&y,s=1<=ut)return function(e,t,n,r,o){for(var a=0,i=new Array(v),c=0;0!==n;c++,n>>>=1)i[c]=1&n?t[a++]:void 0;return i[r]=o,new Be(e,a+1,i)}(e,p,l,c,h);if(u&&!h&&2===p.length&&tt(p[1^f]))return p[1^f];if(u&&h&&1===p.length&&tt(h))return h;var b=e&&e===this.ownerID,_=u?h?l:l^s:l|s,M=u?h?st(p,f,h,b):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),a=0,i=0;i>>e)&y,a=this.nodes[o];return a?a.get(e+m,t,n,r):r},Be.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var c=(0===t?n:n>>>t)&y,s=o===g,l=this.nodes,u=l[c];if(s&&!u)return this;var f=et(u,e,t+m,n,r,o,a,i);if(f===u)return this;var p=this.count;if(u){if(!f&&--p0&&r=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?Ct(e,t).set(0,n):Ct(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=M(_);return t>=Lt(e._capacity)?r=kt(r,e.__ownerID,0,t,n,a):o=kt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Mt(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},pt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},pt.prototype.insert=function(e,t){return this.splice(e,0,t)},pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=m,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):wt()},pt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){Ct(n,0,t+e.length);for(var r=0;r>>t&y;if(r>=this.array.length)return new vt([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-m,n))===i&&a)return this}if(a&&!o)return this;var c=St(this,e);if(!a)for(var s=0;s>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-m,n))===a&&o===this.array.length-1)return this}var i=St(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var yt,gt,bt={};function _t(e,t){var n=e._origin,r=e._capacity,o=Lt(r),a=e._tail;return i(e._root,e._level,0);function i(e,c,s){return 0===c?function(e,i){var c=i===o?a&&a.array:e&&e.array,s=i>n?0:n-i,l=r-i;return l>v&&(l=v),function(){if(s===l)return bt;var e=t?--l:s++;return c&&c[e]}}(e,s):function(e,o,a){var c,s=e&&e.array,l=a>n?0:n-a>>o,u=1+(r-a>>o);return u>v&&(u=v),function(){for(;;){if(c){var e=c();if(e!==bt)return e;c=null}if(l===u)return bt;var n=t?--u:l++;c=i(s&&s[n],o-m,a+(n<>>n&y,s=e&&c0){var l=e&&e.array[c],u=kt(l,t,n-m,r,o,a);return u===l?e:((i=St(e,t)).array[c]=u,i)}return s&&e.array[c]===o?e:(w(a),i=St(e,t),void 0===o&&c===i.array.length-1?i.array.pop():i.array[c]=o,i)}function St(e,t){return t&&e&&t===e.ownerID?e:new vt(e?e.array.slice():[],t)}function Ot(e,t){if(t>=Lt(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&y],r-=m;return n}}function Ct(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new k,o=e._origin,a=e._capacity,i=o+t,c=void 0===n?a:n<0?a+n:o+n;if(i===o&&c===a)return e;if(i>=c)return e.clear();for(var s=e._level,l=e._root,u=0;i+u<0;)l=new vt(l&&l.array.length?[void 0,l]:[],r),u+=1<<(s+=m);u&&(i+=u,o+=u,c+=u,a+=u);for(var f=Lt(a),p=Lt(c);p>=1<f?new vt([],r):d;if(d&&p>f&&im;g-=m){var b=f>>>g&y;v=v.array[b]=St(v.array[b],r)}v.array[f>>>m&y]=d}if(c=p)i-=p,c-=p,s=m,l=null,h=h&&h.removeBefore(r,0,i);else if(i>o||p>>s&y;if(_!==p>>>s&y)break;_&&(u+=(1<o&&(l=l.removeBefore(r,s,i-u)),l&&pa&&(a=l.size),i(s)||(l=l.map((function(e){return fe(e)}))),r.push(l)}return a>e.size&&(e=e.setSize(a)),it(e,t,r)}function Lt(e){return e>>m<=v&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&c!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=c===i.size-1?i.pop():i.set(c,void 0))}else if(s){if(n===i.get(c)[1])return e;r=a,o=i.set(c,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):zt(r,o)}function jt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Ht(e){this._iter=e,this.size=e.size}function Vt(e){this._iter=e,this.size=e.size}function Nt(e){this._iter=e,this.size=e.size}function Yt(e){var t=en(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=tn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===j){var r=e.__iterator(t,n);return new Y((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===P?D:P,n)},t}function At(e,t,n){var r=en(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,g);return a===g?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(j,o);return new Y((function(){var o=a.next();if(o.done)return o;var i=o.value,c=i[0];return A(r,c,t.call(n,i[1],c,e),o)}))},r}function Ft(e,t){var n=en(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Yt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=tn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function It(e,t,n,r){var o=en(e);return r&&(o.has=function(r){var o=e.get(r,g);return o!==g&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,g);return a!==g&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,c=0;return e.__iterate((function(e,a,s){if(t.call(n,e,a,s))return c++,o(e,r?a:c-1,i)}),a),c},o.__iteratorUncached=function(o,a){var i=e.__iterator(j,a),c=0;return new Y((function(){for(;;){var a=i.next();if(a.done)return a;var s=a.value,l=s[0],u=s[1];if(t.call(n,u,l,e))return A(o,r?l:c++,u,a)}}))},o}function Rt(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),L(t,n,o))return e;var a=x(t,o),i=T(n,o);if(a!=a||i!=i)return Rt(e.toSeq().cacheResult(),t,n,r);var c,s=i-a;s==s&&(c=s<0?0:s);var l=en(e);return l.size=0===c?c:e.size&&c||void 0,!r&&oe(e)&&c>=0&&(l.get=function(t,n){return(t=C(this,t))>=0&&tc)return{value:void 0,done:!0};var e=o.next();return r||t===P?e:A(t,s-1,t===D?void 0:e.value[1],e)}))},l}function Kt(e,t,n,r){var o=en(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var c=!0,s=0;return e.__iterate((function(e,a,l){if(!c||!(c=t.call(n,e,a,l)))return s++,o(e,r?a:s-1,i)})),s},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var c=e.__iterator(j,a),s=!0,l=0;return new Y((function(){var e,a,u;do{if((e=c.next()).done)return r||o===P?e:A(o,l++,o===D?void 0:e.value[1],e);var f=e.value;a=f[0],u=f[1],s&&(s=t.call(n,u,a,i))}while(s);return o===j?e:A(o,a,u,e)}))},o}function Wt(e,t){var n=c(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?ie(e):ce(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&c(a)||s(e)&&s(a))return a}var l=new ee(o);return n?l=l.toKeyedSeq():s(e)||(l=l.toSetSeq()),(l=l.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),l}function Bt(e,t,n){var r=en(e);return r.__iterateUncached=function(r,o){var a=0,c=!1;return function e(s,l){var u=this;s.__iterate((function(o,s){return(!t||l0}function Jt(e,t,r){var o=en(e);return o.size=new ee(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(P,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),K(o?e.reverse():e)})),i=0,c=!1;return new Y((function(){var n;return c||(n=a.map((function(e){return e.next()})),c=n.some((function(e){return e.done}))),c?{value:void 0,done:!0}:A(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function $t(e,t){return oe(e)?t:e.constructor(t)}function Xt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Qt(e){return Ne(e.size),O(e)}function Zt(e){return c(e)?r:s(e)?o:a}function en(e){return Object.create((c(e)?q:s(e)?G:J).prototype)}function tn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):U.prototype.cacheResult.call(this)}function nn(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):xn(e,t)},Sn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Ne(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):xn(t,n)},Sn.prototype.pop=function(){return this.slice(1)},Sn.prototype.unshift=function(){return this.push.apply(this,arguments)},Sn.prototype.unshiftAll=function(e){return this.pushAll(e)},Sn.prototype.shift=function(){return this.pop.apply(this,arguments)},Sn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Tn()},Sn.prototype.slice=function(e,t){if(L(e,t,this.size))return this;var n=x(e,this.size);if(T(t,this.size)!==this.size)return Me.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):xn(r,o)},Sn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?xn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Sn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Sn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new Y((function(){if(r){var t=r.value;return r=r.next,A(e,n++,t)}return{value:void 0,done:!0}}))},Sn.isStack=On;var Cn,En="@@__IMMUTABLE_STACK__@@",Ln=Sn.prototype;function xn(e,t,n,r){var o=Object.create(Ln);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Tn(){return Cn||(Cn=xn(0))}function zn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Ln[En]=!0,Ln.withMutations=Re.withMutations,Ln.asMutable=Re.asMutable,Ln.asImmutable=Re.asImmutable,Ln.wasAltered=Re.wasAltered,n.Iterator=Y,zn(n,{toArray:function(){Ne(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Ht(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new jt(this,!0)},toMap:function(){return Ye(this.toKeyedSeq())},toObject:function(){Ne(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return xt(this.toKeyedSeq())},toOrderedSet:function(){return gn(c(this)?this.valueSeq():this)},toSet:function(){return un(c(this)?this.valueSeq():this)},toSetSeq:function(){return new Vt(this)},toSeq:function(){return s(this)?this.toIndexedSeq():c(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Sn(c(this)?this.valueSeq():this)},toList:function(){return pt(c(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return $t(this,Wt(this,t))},includes:function(e){return this.some((function(t){return he(t,e)}))},entries:function(){return this.__iterator(j)},every:function(e,t){Ne(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return $t(this,It(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate((function(r,o,a){if(e.call(t,r,o,a))return n=[o,r],!1})),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Ne(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ne(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(D)},map:function(e,t){return $t(this,At(this,e,t))},reduce:function(e,t,n){var r,o;return Ne(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return $t(this,Ft(this,!0))},slice:function(e,t){return $t(this,Rt(this,e,t,!0))},some:function(e,t){return!this.every(Vn(e),t)},sort:function(e){return $t(this,Ut(this,e))},values:function(){return this.__iterator(P)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return O(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Ye().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return me(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ee(e._cache);var t=e.toSeq().map(Hn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Vn(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(E)},flatMap:function(e,t){return $t(this,function(e,t,n){var r=Zt(e);return e.toSeq().map((function(o,a){return r(t.call(n,o,a,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return $t(this,Bt(this,e,!0))},fromEntrySeq:function(){return new Nt(this)},get:function(e,t){return this.find((function(t,n){return he(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=rn(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,g):g)===g)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=c(e),o=(u(e)?xt():Ye()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=Zt(e);return o.map((function(t){return $t(e,a(t))}))}(this,e,t)},has:function(e){return this.get(e,g)!==g},hasIn:function(e){return this.getIn(e,g)!==g},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map(jn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return qt(this,e)},maxBy:function(e,t){return qt(this,t,e)},min:function(e){return qt(this,e?Nn(e):Fn)},minBy:function(e,t){return qt(this,t?Nn(t):Fn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return $t(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return $t(this,Kt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Vn(e),t)},sortBy:function(e,t){return $t(this,Ut(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return $t(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return $t(this,function(e,t,n){var r=en(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,c){return t.call(n,e,o,c)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(j,o),c=!0;return new Y((function(){if(!c)return{value:void 0,done:!0};var e=i.next();if(e.done)return e;var o=e.value,s=o[0],l=o[1];return t.call(n,l,s,a)?r===j?e:A(r,s,l,e):(c=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Vn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=u(e),n=c(e),r=t?1:0;return function(e,t){return t=ke(t,3432918353),t=ke(t<<15|t>>>-15,461845907),t=ke(t<<13|t>>>-13,5),t=ke((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Se((t=ke(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+In(Oe(e),Oe(t))|0}:function(e,t){r=r+In(Oe(e),Oe(t))|0}:t?function(e){r=31*r+Oe(e)|0}:function(e){r=r+Oe(e)|0}),r)}(this))}});var Dn=n.prototype;Dn[f]=!0,Dn[N]=Dn.values,Dn.__toJS=Dn.toArray,Dn.__toStringMapper=Yn,Dn.inspect=Dn.toSource=function(){return this.toString()},Dn.chain=Dn.flatMap,Dn.contains=Dn.includes,function(){try{Object.defineProperty(Dn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),zn(r,{flip:function(){return $t(this,Yt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return he(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return he(t,e)}))},mapEntries:function(e,t){var n=this,r=0;return $t(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return $t(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Pn=r.prototype;function jn(e,t){return t}function Hn(e,t){return[t,e]}function Vn(e){return function(){return!e.apply(this,arguments)}}function Nn(e){return function(){return-e.apply(this,arguments)}}function Yn(e){return"string"==typeof e?JSON.stringify(e):e}function An(){return S(arguments)}function Fn(e,t){return et?-1:0}function In(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Pn[p]=!0,Pn[N]=Dn.entries,Pn.__toJS=Dn.toObject,Pn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Yn(e)},zn(o,{toKeyedSeq:function(){return new jt(this,!1)},filter:function(e,t){return $t(this,It(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return $t(this,Ft(this,!1))},slice:function(e,t){return $t(this,Rt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=x(e,e<0?this.count():this.size);var r=this.slice(0,e);return $t(this,1===n?r:r.concat(S(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return $t(this,Bt(this,e,!1))},get:function(e,t){return(e=C(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=C(this,e))>=0&&(void 0!==this.size?this.size===1/0||e0)return o.getInlineStyleAt(r-1);if(o.getLength())return o.getInlineStyleAt(0);return v(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);if(r0)return o.getInlineStyleAt(r-1);return v(e,n)}(t,n)},e.prototype.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.prototype.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.prototype.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.prototype.getDirectionMap=function(){return this.getImmutable().get("directionMap")},e.acceptSelection=function(e,t){return h(e,t,!1)},e.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),h(e,t,!0)},e.moveSelectionToEnd=function(t){var n=t.getCurrentContent().getLastBlock(),r=n.getKey(),o=n.getLength();return e.acceptSelection(t,new s({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1}))},e.moveFocusToEnd=function(t){var n=e.moveSelectionToEnd(t);return e.forceSelection(n,n.getSelection())},e.push=function(t,n,r){if(t.getCurrentContent()===n)return t;var o="insert-characters"!==r,a=i.getDirectionMap(n,t.getDirectionMap());if(!t.getAllowUndo())return e.set(t,{currentContent:n,directionMap:a,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null});var c=t.getSelection(),s=t.getCurrentContent(),l=t.getUndoStack(),u=n;c!==s.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(t,r)?(l=l.push(s),u=u.set("selectionBefore",c)):"insert-characters"!==r&&"backspace-character"!==r&&"delete-character"!==r||(u=u.set("selectionBefore",s.getSelectionBefore()));var p=t.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(r)&&(p=null);var d={currentContent:u,directionMap:a,undoStack:l,redoStack:f(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:p};return e.set(t,d)},e.undo=function(t){if(!t.getAllowUndo())return t;var n=t.getUndoStack(),r=n.peek();if(!r)return t;var o=t.getCurrentContent(),a=i.getDirectionMap(r,t.getDirectionMap());return e.set(t,{currentContent:r,directionMap:a,undoStack:n.shift(),redoStack:t.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})},e.redo=function(t){if(!t.getAllowUndo())return t;var n=t.getRedoStack(),r=n.peek();if(!r)return t;var o=t.getCurrentContent(),a=i.getDirectionMap(r,t.getDirectionMap());return e.set(t,{currentContent:r,directionMap:a,undoStack:t.getUndoStack().push(o),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},e.prototype.getImmutable=function(){return this._immutable},e}();function h(e,t,n){return d.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(e,t){return e.getBlockMap().map((function(n){return o.generate(e,n,t)})).toOrderedMap()}function v(e,t){var n=e.getBlockMap().reverse().skipUntil((function(e,n){return n===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return n?n.getInlineStyleAt(n.getLength()-1):l()}e.exports=d},function(e,t,n){(function(t){for(var r=n(419),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",c=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],l=0;!c&&l>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?O(e)+t:t}function E(){return!0}function L(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function x(e,t){return z(e,t,0)}function T(e,t){return z(e,t,t)}function z(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var D=0,P=1,j=2,H="function"==typeof Symbol&&Symbol.iterator,V="@@iterator",N=H||V;function Y(e){this.next=e}function A(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function F(){return{value:void 0,done:!0}}function I(e){return!!W(e)}function R(e){return e&&"function"==typeof e.next}function K(e){var t=W(e);return t&&t.call(e)}function W(e){var t=e&&(H&&e[H]||e[V]);if("function"==typeof t)return t}function B(e){return e&&"number"==typeof e.length}function U(e){return null==e?ae():i(e)?e.toSeq():function(e){var t=se(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function q(e){return null==e?ae().toKeyedSeq():i(e)?c(e)?e.toSeq():e.fromEntrySeq():ie(e)}function G(e){return null==e?ae():i(e)?c(e)?e.entrySeq():e.toIndexedSeq():ce(e)}function J(e){return(null==e?ae():i(e)?c(e)?e.entrySeq():e:ce(e)).toSetSeq()}Y.prototype.toString=function(){return"[Iterator]"},Y.KEYS=D,Y.VALUES=P,Y.ENTRIES=j,Y.prototype.inspect=Y.prototype.toSource=function(){return this.toString()},Y.prototype[N]=function(){return this},t(U,n),U.of=function(){return U(arguments)},U.prototype.toSeq=function(){return this},U.prototype.toString=function(){return this.__toString("Seq {","}")},U.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},U.prototype.__iterate=function(e,t){return le(this,e,t,!0)},U.prototype.__iterator=function(e,t){return ue(this,e,t,!0)},t(q,U),q.prototype.toKeyedSeq=function(){return this},t(G,U),G.of=function(){return G(arguments)},G.prototype.toIndexedSeq=function(){return this},G.prototype.toString=function(){return this.__toString("Seq [","]")},G.prototype.__iterate=function(e,t){return le(this,e,t,!1)},G.prototype.__iterator=function(e,t){return ue(this,e,t,!1)},t(J,U),J.of=function(){return J(arguments)},J.prototype.toSetSeq=function(){return this},U.isSeq=oe,U.Keyed=q,U.Set=J,U.Indexed=G;var $,X,Q,Z="@@__IMMUTABLE_SEQ__@@";function ee(e){this._array=e,this.size=e.length}function te(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function ne(e){this._iterable=e,this.size=e.length||e.size}function re(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[Z])}function ae(){return $||($=new ee([]))}function ie(e){var t=Array.isArray(e)?new ee(e).fromEntrySeq():R(e)?new re(e).fromEntrySeq():I(e)?new ne(e).fromEntrySeq():"object"==typeof e?new te(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ce(e){var t=se(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function se(e){return B(e)?new ee(e):R(e)?new re(e):I(e)?new ne(e):void 0}function le(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var c=o[n?a-i:i];if(!1===t(c[1],r?c[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function ue(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new Y((function(){var e=o[n?a-i:i];return i++>a?{value:void 0,done:!0}:A(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function fe(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,G(n).map((function(r,o){return e(t,r,o,n)}))):de(n)?t.call(o,r,q(n).map((function(r,o){return e(t,r,o,n)}))):n}(t,e,"",{"":e}):pe(e)}function pe(e){return Array.isArray(e)?G(e).map(pe).toList():de(e)?q(e).map(pe).toMap():e}function de(e){return e&&(e.constructor===Object||void 0===e.constructor)}function he(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function me(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||c(e)!==c(t)||s(e)!==s(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!l(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&he(o[1],e)&&(n||he(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var f=!0,p=t.__iterate((function(t,r){if(n?!e.has(t):o?!he(t,e.get(r,g)):!he(e.get(r,g),t))return f=!1,!1}));return f&&e.size===p}function ve(e,t){if(!(this instanceof ve))return new ve(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(X)return X;X=this}}function ye(e,t){if(!e)throw new Error(t)}function ge(e,t,n){if(!(this instanceof ge))return new ge(e,t,n);if(ye(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?{value:void 0,done:!0}:A(e,o,n[t?r-o++:o++])}))},t(te,q),te.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},te.prototype.has=function(e){return this._object.hasOwnProperty(e)},te.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},te.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new Y((function(){var i=r[t?o-a:a];return a++>o?{value:void 0,done:!0}:A(e,i,n[i])}))},te.prototype[h]=!0,t(ne,G),ne.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=K(this._iterable),r=0;if(R(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},ne.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=K(this._iterable);if(!R(n))return new Y(F);var r=0;return new Y((function(){var t=n.next();return t.done?t:A(e,r++,t.value)}))},t(re,G),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return A(e,o,r[o++])}))},t(ve,G),ve.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ve.prototype.get=function(e,t){return this.has(e)?this._value:t},ve.prototype.includes=function(e){return he(this._value,e)},ve.prototype.slice=function(e,t){var n=this.size;return L(e,t,n)?this:new ve(this._value,T(t,n)-x(e,n))},ve.prototype.reverse=function(){return this},ve.prototype.indexOf=function(e){return he(this._value,e)?0:-1},ve.prototype.lastIndexOf=function(e){return he(this._value,e)?this.size:-1},ve.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?{value:void 0,done:!0}:A(e,a++,i)}))},ge.prototype.equals=function(e){return e instanceof ge?this._start===e._start&&this._end===e._end&&this._step===e._step:me(this,e)},t(be,n),t(_e,be),t(Me,be),t(we,be),be.Keyed=_e,be.Indexed=Me,be.Set=we;var ke="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Se(e){return e>>>1&1073741824|3221225471&e}function Oe(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Se(n)}if("string"===t)return e.length>Pe?function(e){var t=Ve[e];return void 0===t&&(t=Ce(e),He===je&&(He=0,Ve={}),He++,Ve[e]=t),t}(e):Ce(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(Te&&void 0!==(t=Ee.get(e)))return t;if(void 0!==(t=e[De]))return t;if(!xe){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[De]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++ze,1073741824&ze&&(ze=0),Te)Ee.set(e,t);else{if(void 0!==Le&&!1===Le(e))throw new Error("Non-extensible objects are not allowed as keys.");if(xe)Object.defineProperty(e,De,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[De]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[De]=t}}return t}(e);if("function"==typeof e.toString)return Ce(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Ce(e){for(var t=0,n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},Ye.prototype.toString=function(){return this.__toString("Map {","}")},Ye.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ye.prototype.set=function(e,t){return Ze(this,e,t)},Ye.prototype.setIn=function(e,t){return this.updateIn(e,g,(function(){return t}))},Ye.prototype.remove=function(e){return Ze(this,e,g)},Ye.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return g}))},Ye.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ye.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,o){var a=t===g,i=n.next();if(i.done){var c=a?r:t,s=o(c);return s===c?t:s}ye(a||t&&t.set,"invalid keyPath");var l=i.value,u=a?g:t.get(l,g),f=e(u,n,r,o);return f===u?t:f===g?t.remove(l):(a?Qe():t).set(l,f)}(this,rn(e),t,n);return r===g?void 0:r},Ye.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Qe()},Ye.prototype.merge=function(){return rt(this,void 0,arguments)},Ye.prototype.mergeWith=function(t){var n=e.call(arguments,1);return rt(this,t,n)},Ye.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Qe(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Ye.prototype.mergeDeep=function(){return rt(this,ot,arguments)},Ye.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return rt(this,at(t),n)},Ye.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Qe(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Ye.prototype.sort=function(e){return xt(Ut(this,e))},Ye.prototype.sortBy=function(e,t){return xt(Ut(this,t,e))},Ye.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ye.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new k)},Ye.prototype.asImmutable=function(){return this.__ensureOwner()},Ye.prototype.wasAltered=function(){return this.__altered},Ye.prototype.__iterator=function(e,t){return new Ge(this,e,t)},Ye.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Ye.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Xe(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ye.isMap=Ae;var Fe,Ie="@@__IMMUTABLE_MAP__@@",Re=Ye.prototype;function Ke(e,t){this.ownerID=e,this.entries=t}function We(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Be(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Ue(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Ge(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&$e(e._root)}function Je(e,t){return A(e,t[0],t[1])}function $e(e,t){return{node:e,index:0,__prev:t}}function Xe(e,t,n,r){var o=Object.create(Re);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Qe(){return Fe||(Fe=Xe(0))}function Ze(e,t,n){var r,o;if(e._root){var a=M(b),i=M(_);if(r=et(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===g?-1:1:0)}else{if(n===g)return e;o=1,r=new Ke(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Xe(o,r):Qe()}function et(e,t,n,r,o,a,i,c){return e?e.update(t,n,r,o,a,i,c):a===g?e:(w(c),w(i),new qe(t,r,[o,a]))}function tt(e){return e.constructor===qe||e.constructor===Ue}function nt(e,t,n,r,o){if(e.keyHash===r)return new Ue(t,r,[e.entry,o]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,c=(0===n?r:r>>>n)&y;return new We(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function st(e,t,n,r){var o=r?e:S(e);return o[t]=n,o}Re[Ie]=!0,Re.delete=Re.remove,Re.removeIn=Re.deleteIn,Ke.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a=lt)return function(e,t,n,r){e||(e=new k);for(var o=new qe(e,Oe(n),[n,r]),a=0;a>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[ct(a&o-1)].get(e+m,t,n,r)},We.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var c=(0===t?n:n>>>t)&y,s=1<=ut)return function(e,t,n,r,o){for(var a=0,i=new Array(v),c=0;0!==n;c++,n>>>=1)i[c]=1&n?t[a++]:void 0;return i[r]=o,new Be(e,a+1,i)}(e,p,l,c,h);if(u&&!h&&2===p.length&&tt(p[1^f]))return p[1^f];if(u&&h&&1===p.length&&tt(h))return h;var b=e&&e===this.ownerID,_=u?h?l:l^s:l|s,M=u?h?st(p,f,h,b):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),a=0,i=0;i>>e)&y,a=this.nodes[o];return a?a.get(e+m,t,n,r):r},Be.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var c=(0===t?n:n>>>t)&y,s=o===g,l=this.nodes,u=l[c];if(s&&!u)return this;var f=et(u,e,t+m,n,r,o,a,i);if(f===u)return this;var p=this.count;if(u){if(!f&&--p0&&r=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?Ct(e,t).set(0,n):Ct(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=M(_);return t>=Lt(e._capacity)?r=kt(r,e.__ownerID,0,t,n,a):o=kt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Mt(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},pt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},pt.prototype.insert=function(e,t){return this.splice(e,0,t)},pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=m,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):wt()},pt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){Ct(n,0,t+e.length);for(var r=0;r>>t&y;if(r>=this.array.length)return new vt([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-m,n))===i&&a)return this}if(a&&!o)return this;var c=St(this,e);if(!a)for(var s=0;s>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-m,n))===a&&o===this.array.length-1)return this}var i=St(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var yt,gt,bt={};function _t(e,t){var n=e._origin,r=e._capacity,o=Lt(r),a=e._tail;return i(e._root,e._level,0);function i(e,c,s){return 0===c?function(e,i){var c=i===o?a&&a.array:e&&e.array,s=i>n?0:n-i,l=r-i;return l>v&&(l=v),function(){if(s===l)return bt;var e=t?--l:s++;return c&&c[e]}}(e,s):function(e,o,a){var c,s=e&&e.array,l=a>n?0:n-a>>o,u=1+(r-a>>o);return u>v&&(u=v),function(){for(;;){if(c){var e=c();if(e!==bt)return e;c=null}if(l===u)return bt;var n=t?--u:l++;c=i(s&&s[n],o-m,a+(n<>>n&y,s=e&&c0){var l=e&&e.array[c],u=kt(l,t,n-m,r,o,a);return u===l?e:((i=St(e,t)).array[c]=u,i)}return s&&e.array[c]===o?e:(w(a),i=St(e,t),void 0===o&&c===i.array.length-1?i.array.pop():i.array[c]=o,i)}function St(e,t){return t&&e&&t===e.ownerID?e:new vt(e?e.array.slice():[],t)}function Ot(e,t){if(t>=Lt(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&y],r-=m;return n}}function Ct(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new k,o=e._origin,a=e._capacity,i=o+t,c=void 0===n?a:n<0?a+n:o+n;if(i===o&&c===a)return e;if(i>=c)return e.clear();for(var s=e._level,l=e._root,u=0;i+u<0;)l=new vt(l&&l.array.length?[void 0,l]:[],r),u+=1<<(s+=m);u&&(i+=u,o+=u,c+=u,a+=u);for(var f=Lt(a),p=Lt(c);p>=1<f?new vt([],r):d;if(d&&p>f&&im;g-=m){var b=f>>>g&y;v=v.array[b]=St(v.array[b],r)}v.array[f>>>m&y]=d}if(c=p)i-=p,c-=p,s=m,l=null,h=h&&h.removeBefore(r,0,i);else if(i>o||p>>s&y;if(_!==p>>>s&y)break;_&&(u+=(1<o&&(l=l.removeBefore(r,s,i-u)),l&&pa&&(a=l.size),i(s)||(l=l.map((function(e){return fe(e)}))),r.push(l)}return a>e.size&&(e=e.setSize(a)),it(e,t,r)}function Lt(e){return e>>m<=v&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&c!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=c===i.size-1?i.pop():i.set(c,void 0))}else if(s){if(n===i.get(c)[1])return e;r=a,o=i.set(c,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):zt(r,o)}function jt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Ht(e){this._iter=e,this.size=e.size}function Vt(e){this._iter=e,this.size=e.size}function Nt(e){this._iter=e,this.size=e.size}function Yt(e){var t=en(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=tn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===j){var r=e.__iterator(t,n);return new Y((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===P?D:P,n)},t}function At(e,t,n){var r=en(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,g);return a===g?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(j,o);return new Y((function(){var o=a.next();if(o.done)return o;var i=o.value,c=i[0];return A(r,c,t.call(n,i[1],c,e),o)}))},r}function Ft(e,t){var n=en(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Yt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=tn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function It(e,t,n,r){var o=en(e);return r&&(o.has=function(r){var o=e.get(r,g);return o!==g&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,g);return a!==g&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,c=0;return e.__iterate((function(e,a,s){if(t.call(n,e,a,s))return c++,o(e,r?a:c-1,i)}),a),c},o.__iteratorUncached=function(o,a){var i=e.__iterator(j,a),c=0;return new Y((function(){for(;;){var a=i.next();if(a.done)return a;var s=a.value,l=s[0],u=s[1];if(t.call(n,u,l,e))return A(o,r?l:c++,u,a)}}))},o}function Rt(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),L(t,n,o))return e;var a=x(t,o),i=T(n,o);if(a!=a||i!=i)return Rt(e.toSeq().cacheResult(),t,n,r);var c,s=i-a;s==s&&(c=s<0?0:s);var l=en(e);return l.size=0===c?c:e.size&&c||void 0,!r&&oe(e)&&c>=0&&(l.get=function(t,n){return(t=C(this,t))>=0&&tc)return{value:void 0,done:!0};var e=o.next();return r||t===P?e:A(t,s-1,t===D?void 0:e.value[1],e)}))},l}function Kt(e,t,n,r){var o=en(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var c=!0,s=0;return e.__iterate((function(e,a,l){if(!c||!(c=t.call(n,e,a,l)))return s++,o(e,r?a:s-1,i)})),s},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var c=e.__iterator(j,a),s=!0,l=0;return new Y((function(){var e,a,u;do{if((e=c.next()).done)return r||o===P?e:A(o,l++,o===D?void 0:e.value[1],e);var f=e.value;a=f[0],u=f[1],s&&(s=t.call(n,u,a,i))}while(s);return o===j?e:A(o,a,u,e)}))},o}function Wt(e,t){var n=c(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?ie(e):ce(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&c(a)||s(e)&&s(a))return a}var l=new ee(o);return n?l=l.toKeyedSeq():s(e)||(l=l.toSetSeq()),(l=l.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),l}function Bt(e,t,n){var r=en(e);return r.__iterateUncached=function(r,o){var a=0,c=!1;return function e(s,l){var u=this;s.__iterate((function(o,s){return(!t||l0}function Jt(e,t,r){var o=en(e);return o.size=new ee(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(P,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),K(o?e.reverse():e)})),i=0,c=!1;return new Y((function(){var n;return c||(n=a.map((function(e){return e.next()})),c=n.some((function(e){return e.done}))),c?{value:void 0,done:!0}:A(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function $t(e,t){return oe(e)?t:e.constructor(t)}function Xt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Qt(e){return Ne(e.size),O(e)}function Zt(e){return c(e)?r:s(e)?o:a}function en(e){return Object.create((c(e)?q:s(e)?G:J).prototype)}function tn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):U.prototype.cacheResult.call(this)}function nn(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):xn(e,t)},Sn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Ne(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):xn(t,n)},Sn.prototype.pop=function(){return this.slice(1)},Sn.prototype.unshift=function(){return this.push.apply(this,arguments)},Sn.prototype.unshiftAll=function(e){return this.pushAll(e)},Sn.prototype.shift=function(){return this.pop.apply(this,arguments)},Sn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Tn()},Sn.prototype.slice=function(e,t){if(L(e,t,this.size))return this;var n=x(e,this.size);if(T(t,this.size)!==this.size)return Me.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):xn(r,o)},Sn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?xn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Sn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Sn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new Y((function(){if(r){var t=r.value;return r=r.next,A(e,n++,t)}return{value:void 0,done:!0}}))},Sn.isStack=On;var Cn,En="@@__IMMUTABLE_STACK__@@",Ln=Sn.prototype;function xn(e,t,n,r){var o=Object.create(Ln);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Tn(){return Cn||(Cn=xn(0))}function zn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Ln[En]=!0,Ln.withMutations=Re.withMutations,Ln.asMutable=Re.asMutable,Ln.asImmutable=Re.asImmutable,Ln.wasAltered=Re.wasAltered,n.Iterator=Y,zn(n,{toArray:function(){Ne(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Ht(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new jt(this,!0)},toMap:function(){return Ye(this.toKeyedSeq())},toObject:function(){Ne(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return xt(this.toKeyedSeq())},toOrderedSet:function(){return gn(c(this)?this.valueSeq():this)},toSet:function(){return un(c(this)?this.valueSeq():this)},toSetSeq:function(){return new Vt(this)},toSeq:function(){return s(this)?this.toIndexedSeq():c(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Sn(c(this)?this.valueSeq():this)},toList:function(){return pt(c(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return $t(this,Wt(this,t))},includes:function(e){return this.some((function(t){return he(t,e)}))},entries:function(){return this.__iterator(j)},every:function(e,t){Ne(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return $t(this,It(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ne(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ne(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(D)},map:function(e,t){return $t(this,At(this,e,t))},reduce:function(e,t,n){var r,o;return Ne(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return $t(this,Ft(this,!0))},slice:function(e,t){return $t(this,Rt(this,e,t,!0))},some:function(e,t){return!this.every(Vn(e),t)},sort:function(e){return $t(this,Ut(this,e))},values:function(){return this.__iterator(P)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return O(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Ye().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return me(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ee(e._cache);var t=e.toSeq().map(Hn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Vn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,o,a){if(e.call(t,n,o,a))return r=[o,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(E)},flatMap:function(e,t){return $t(this,function(e,t,n){var r=Zt(e);return e.toSeq().map((function(o,a){return r(t.call(n,o,a,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return $t(this,Bt(this,e,!0))},fromEntrySeq:function(){return new Nt(this)},get:function(e,t){return this.find((function(t,n){return he(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=rn(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,g):g)===g)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=c(e),o=(u(e)?xt():Ye()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=Zt(e);return o.map((function(t){return $t(e,a(t))}))}(this,e,t)},has:function(e){return this.get(e,g)!==g},hasIn:function(e){return this.getIn(e,g)!==g},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return he(t,e)}))},keySeq:function(){return this.toSeq().map(jn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return qt(this,e)},maxBy:function(e,t){return qt(this,t,e)},min:function(e){return qt(this,e?Nn(e):Fn)},minBy:function(e,t){return qt(this,t?Nn(t):Fn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return $t(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return $t(this,Kt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Vn(e),t)},sortBy:function(e,t){return $t(this,Ut(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return $t(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return $t(this,function(e,t,n){var r=en(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,c){return t.call(n,e,o,c)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(j,o),c=!0;return new Y((function(){if(!c)return{value:void 0,done:!0};var e=i.next();if(e.done)return e;var o=e.value,s=o[0],l=o[1];return t.call(n,l,s,a)?r===j?e:A(r,s,l,e):(c=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Vn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=u(e),n=c(e),r=t?1:0;return function(e,t){return t=ke(t,3432918353),t=ke(t<<15|t>>>-15,461845907),t=ke(t<<13|t>>>-13,5),t=ke((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Se((t=ke(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+In(Oe(e),Oe(t))|0}:function(e,t){r=r+In(Oe(e),Oe(t))|0}:t?function(e){r=31*r+Oe(e)|0}:function(e){r=r+Oe(e)|0}),r)}(this))}});var Dn=n.prototype;Dn[f]=!0,Dn[N]=Dn.values,Dn.__toJS=Dn.toArray,Dn.__toStringMapper=Yn,Dn.inspect=Dn.toSource=function(){return this.toString()},Dn.chain=Dn.flatMap,Dn.contains=Dn.includes,zn(r,{flip:function(){return $t(this,Yt(this))},mapEntries:function(e,t){var n=this,r=0;return $t(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return $t(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Pn=r.prototype;function jn(e,t){return t}function Hn(e,t){return[t,e]}function Vn(e){return function(){return!e.apply(this,arguments)}}function Nn(e){return function(){return-e.apply(this,arguments)}}function Yn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function An(){return S(arguments)}function Fn(e,t){return et?-1:0}function In(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Pn[p]=!0,Pn[N]=Dn.entries,Pn.__toJS=Dn.toObject,Pn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Yn(e)},zn(o,{toKeyedSeq:function(){return new jt(this,!1)},filter:function(e,t){return $t(this,It(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return $t(this,Ft(this,!1))},slice:function(e,t){return $t(this,Rt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=x(e,e<0?this.count():this.size);var r=this.slice(0,e);return $t(this,1===n?r:r.concat(S(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return $t(this,Bt(this,e,!1))},get:function(e,t){return(e=C(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=C(this,e))>=0&&(void 0!==this.size?this.size===1/0||e=i)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(e){return"[Circular]"}break;default:return e}})),s=t[r];r children");r=e}})),r}var w=n(10),k=n.n(w),S=n(74),O={isAppearSupported:function(e){return e.transitionName&&e.transitionAppear||e.animation.appear},isEnterSupported:function(e){return e.transitionName&&e.transitionEnter||e.animation.enter},isLeaveSupported:function(e){return e.transitionName&&e.transitionLeave||e.animation.leave},allowAppearCallback:function(e){return e.transitionAppear||e.animation.appear},allowEnterCallback:function(e){return e.transitionEnter||e.animation.enter},allowLeaveCallback:function(e){return e.transitionLeave||e.animation.leave}},C={enter:"transitionEnter",appear:"transitionAppear",leave:"transitionLeave"},E=function(e){function t(){return s()(this,t),p()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h()(t,e),u()(t,[{key:"componentWillUnmount",value:function(){this.stop()}},{key:"componentWillEnter",value:function(e){O.isEnterSupported(this.props)?this.transition("enter",e):e()}},{key:"componentWillAppear",value:function(e){O.isAppearSupported(this.props)?this.transition("appear",e):e()}},{key:"componentWillLeave",value:function(e){O.isLeaveSupported(this.props)?this.transition("leave",e):e()}},{key:"transition",value:function(e,t){var n=this,r=k.a.findDOMNode(this),o=this.props,a=o.transitionName,i="object"==typeof a;this.stop();var c=function(){n.stopper=null,t()};if((S.b||!o.animation[e])&&a&&o[C[e]]){var s=i?a[e]:a+"-"+e,l=s+"-active";i&&a[e+"Active"]&&(l=a[e+"Active"]),this.stopper=Object(S.a)(r,{name:s,active:l},c)}else this.stopper=o.animation[e](r,c)}},{key:"stop",value:function(){var e=this.stopper;e&&(this.stopper=null,e.stop())}},{key:"render",value:function(){return this.props.children}}]),t}(v.a.Component);E.propTypes={children:g.a.any,animation:g.a.any,transitionName:g.a.any};var L=E,x="rc_animate_"+Date.now();function T(e){var t=e.children;return v.a.isValidElement(t)&&!t.key?v.a.cloneElement(t,{key:x}):t}function z(){}var D=function(e){function t(e){s()(this,t);var n=p()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return P.call(n),n.currentlyAnimatingKeys={},n.keysToEnter=[],n.keysToLeave=[],n.state={children:b(T(e))},n.childrenRefs={},n}return h()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.showProp,n=this.state.children;t&&(n=n.filter((function(e){return!!e.props[t]}))),n.forEach((function(t){t&&e.performAppear(t.key)}))}},{key:"componentWillReceiveProps",value:function(e){var t=this;this.nextProps=e;var n=b(T(e)),r=this.props;r.exclusive&&Object.keys(this.currentlyAnimatingKeys).forEach((function(e){t.stop(e)}));var o,a,c,s,l=r.showProp,u=this.currentlyAnimatingKeys,f=r.exclusive?b(T(r)):this.state.children,p=[];l?(f.forEach((function(e){var t=e&&_(n,e.key),r=void 0;(r=t&&t.props[l]||!e.props[l]?t:v.a.cloneElement(t||e,i()({},l,!0)))&&p.push(r)})),n.forEach((function(e){e&&_(f,e.key)||p.push(e)}))):(o=n,a=[],c={},s=[],f.forEach((function(e){e&&_(o,e.key)?s.length&&(c[e.key]=s,s=[]):s.push(e)})),o.forEach((function(e){e&&Object.prototype.hasOwnProperty.call(c,e.key)&&(a=a.concat(c[e.key])),a.push(e)})),p=a=a.concat(s)),this.setState({children:p}),n.forEach((function(e){var n=e&&e.key;if(!e||!u[n]){var r=e&&_(f,n);if(l){var o=e.props[l];if(r)!M(f,n,l)&&o&&t.keysToEnter.push(n);else o&&t.keysToEnter.push(n)}else r||t.keysToEnter.push(n)}})),f.forEach((function(e){var r=e&&e.key;if(!e||!u[r]){var o=e&&_(n,r);if(l){var a=e.props[l];if(o)!M(n,r,l)&&a&&t.keysToLeave.push(r);else a&&t.keysToLeave.push(r)}else o||t.keysToLeave.push(r)}}))}},{key:"componentDidUpdate",value:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)}},{key:"isValidChildByKey",value:function(e,t){var n=this.props.showProp;return n?M(e,t,n):_(e,t)}},{key:"stop",value:function(e){delete this.currentlyAnimatingKeys[e];var t=this.childrenRefs[e];t&&t.stop()}},{key:"render",value:function(){var e=this,t=this.props;this.nextProps=t;var n=this.state.children,r=null;n&&(r=n.map((function(n){if(null==n)return n;if(!n.key)throw new Error("must set key for children");return v.a.createElement(L,{key:n.key,ref:function(t){e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)})));var a=t.component;if(a){var i=t;return"string"==typeof a&&(i=o()({className:t.className,style:t.style},t.componentProps)),v.a.createElement(a,i,r)}return r[0]||null}}]),t}(v.a.Component);D.isAnimate=!0,D.propTypes={className:g.a.string,style:g.a.object,component:g.a.any,componentProps:g.a.object,animation:g.a.object,transitionName:g.a.oneOfType([g.a.string,g.a.object]),transitionEnter:g.a.bool,transitionAppear:g.a.bool,exclusive:g.a.bool,transitionLeave:g.a.bool,onEnd:g.a.func,onEnter:g.a.func,onLeave:g.a.func,onAppear:g.a.func,showProp:g.a.string,children:g.a.node},D.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:z,onEnter:z,onLeave:z,onAppear:z};var P=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var r=e.props;if(delete e.currentlyAnimatingKeys[t],!r.exclusive||r===e.nextProps){var o=b(T(r));e.isValidChildByKey(o,t)?"appear"===n?O.allowAppearCallback(r)&&(r.onAppear(t),r.onEnd(t,!0)):O.allowEnterCallback(r)&&(r.onEnter(t),r.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var r,o,a,i,c=b(T(n));if(e.isValidChildByKey(c,t))e.performEnter(t);else{var s=function(){O.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};r=e.state.children,o=c,a=n.showProp,(i=r.length===o.length)&&r.forEach((function(e,t){var n=o[t];e&&n&&(e&&!n||!e&&n?i=!1:e.key!==n.key?i=!1:a&&e.props[a]!==n.props[a]&&(i=!1))})),i?s():e.setState({children:c},s)}}}};t.a=D},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(0)),o=a(n(415));function a(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||o.default,e.exports=t.default},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(4),o=n.n(r),a=n(8),i=n.n(a),c=n(7),s=n.n(c),l=n(9),u=n.n(l),f=n(0),p=n.n(f),d=n(1),h=n.n(d),m=n(10),v=n.n(m),y=n(5),g=n(73),b=n(33),_=n(119),M=n(120),w=n(2),k=n.n(w);function S(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function O(e,t){this[e]=t}var C,E=n(16),L=n.n(E);function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var D={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function P(){if(void 0!==C)return C;C="";var e=document.createElement("p").style;for(var t in D)t+"Transform"in e&&(C=t);return C}function j(){return P()?"".concat(P(),"TransitionProperty"):"transitionProperty"}function H(){return P()?"".concat(P(),"Transform"):"transform"}function V(e,t){var n=j();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function N(e,t){var n=H();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var Y,A=/matrix\((.*)\)/,F=/matrix3d\((.*)\)/;function I(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function R(e,t,n){var r=n;if("object"!==x(t))return void 0!==r?("number"==typeof r&&(r="".concat(r,"px")),void(e.style[t]=r)):Y(e,t);for(var o in t)t.hasOwnProperty(o)&&R(e,o,t[o])}function K(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function W(e){return K(e)}function B(e){return K(e,!0)}function U(e){var t=function(e){var t,n,r,o=e.ownerDocument,a=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||a.clientLeft||0,top:r-=i.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=W(r),t.top+=B(r),t}function q(e){return null!=e&&e==e.window}function G(e){return q(e)?e.document:9===e.nodeType?e:e.ownerDocument}var J=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),$=/^(top|right|bottom|left)$/,X="currentStyle",Q="runtimeStyle",Z="left",ee="px";function te(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function ne(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function re(e,t,n){"static"===R(e,"position")&&(e.style.position="relative");var r=-999,o=-999,a=te("left",n),i=te("top",n),c=ne(a),s=ne(i);"left"!==a&&(r=999),"top"!==i&&(o=999);var l,u="",f=U(e);("left"in t||"top"in t)&&(u=(l=e).style.transitionProperty||l.style[j()]||"",V(e,"none")),"left"in t&&(e.style[c]="",e.style[a]="".concat(r,"px")),"top"in t&&(e.style[s]="",e.style[i]="".concat(o,"px")),I(e);var p=U(e),d={};for(var h in t)if(t.hasOwnProperty(h)){var m=te(h,n),v="left"===h?r:o,y=f[h]-p[h];d[m]=m===h?v+y:v-y}R(e,d),I(e),("left"in t||"top"in t)&&V(e,u);var g={};for(var b in t)if(t.hasOwnProperty(b)){var _=te(b,n),M=t[b]-f[b];g[_]=b===_?d[_]+M:d[_]-M}R(e,g)}function oe(e,t){var n=U(e),r=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(H());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(e),o={x:r.x,y:r.y};"left"in t&&(o.x=r.x+t.left-n.left),"top"in t&&(o.y=r.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(H());if(r&&"none"!==r){var o,a=r.match(A);if(a)(o=(a=a[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,o[5]=t.y,N(e,"matrix(".concat(o.join(","),")"));else(o=r.match(F)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,o[13]=t.y,N(e,"matrix3d(".concat(o.join(","),")"))}else N(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,o)}function ae(e,t){for(var n=0;n=0&&t.left>=0&&t.bottom>t.top&&t.right>t.left?t:null}function we(e){var t,n,r;if(ye.isWindow(e)||9===e.nodeType){var o=ye.getWindow(e);t={left:ye.getWindowScrollLeft(o),top:ye.getWindowScrollTop(o)},n=ye.viewportWidth(o),r=ye.viewportHeight(o)}else t=ye.offset(e),n=ye.outerWidth(e),r=ye.outerHeight(e);return t.width=n,t.height=r,t}function ke(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,a=e.height,i=e.left,c=e.top;return"c"===n?c+=a/2:"b"===n&&(c+=a),"c"===r?i+=o/2:"r"===r&&(i+=o),{left:i,top:c}}function Se(e,t,n,r,o){var a=ke(t,n[1]),i=ke(e,n[0]),c=[i.left-a.left,i.top-a.top];return{left:Math.round(e.left-c[0]+r[0]-o[0]),top:Math.round(e.top-c[1]+r[1]-o[1])}}function Oe(e,t,n){return e.leftn.right}function Ce(e,t,n){return e.topn.bottom}function Ee(e,t,n){var r=[];return ye.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function Le(e,t){return e[t]=-e[t],e}function xe(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Te(e,t){e[0]=xe(e[0],t.width),e[1]=xe(e[1],t.height)}function ze(e,t,n,r){var o=n.points,a=n.offset||[0,0],i=n.targetOffset||[0,0],c=n.overflow,s=n.source||e;a=[].concat(a),i=[].concat(i),c=c||{};var l={},u=0,f=Me(s),p=we(s);Te(a,p),Te(i,t);var d=Se(p,t,o,a,i),h=ye.merge(p,d);if(f&&(c.adjustX||c.adjustY)&&r){if(c.adjustX&&Oe(d,p,f)){var m=Ee(o,/[lr]/gi,{l:"r",r:"l"}),v=Le(a,0),y=Le(i,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.left&&o.left+a.width>n.right&&(a.width-=o.left+a.width-n.right),r.adjustX&&o.left+a.width>n.right&&(o.left=Math.max(n.right-a.width,n.left)),r.adjustY&&o.top=n.top&&o.top+a.height>n.bottom&&(a.height-=o.top+a.height-n.bottom),r.adjustY&&o.top+a.height>n.bottom&&(o.top=Math.max(n.bottom-a.height,n.top)),ye.mix(o,a)}(d,p,f,l))}return h.width!==p.width&&ye.css(s,"width",ye.width(s)+h.width-p.width),h.height!==p.height&&ye.css(s,"height",ye.height(s)+h.height-p.height),ye.offset(s,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:a,targetOffset:i,overflow:l}}function De(e,t,n){var r=n.target||t;return ze(e,we(r),n,!function(e){var t=Me(e),n=we(e);return!t||n.left+n.width<=t.left||n.top+n.height<=t.top||n.left>=t.right||n.top>=t.bottom}(r))}function Pe(e,t,n){var r,o,a=ye.getDocument(e),i=a.defaultView||a.parentWindow,c=ye.getWindowScrollLeft(i),s=ye.getWindowScrollTop(i),l=ye.viewportWidth(i),u=ye.viewportHeight(i);r="pageX"in t?t.pageX:c+t.clientX,o="pageY"in t?t.pageY:s+t.clientY;var f=r>=0&&r<=c+l&&o>=0&&o<=s+u;return ze(e,{left:r,top:o,width:0,height:0},function(e){for(var t=1;t1?(!n&&t&&(r.className+=" "+t),p.a.createElement("div",r)):p.a.Children.only(r.children)},t}(f.Component);Ke.propTypes={children:h.a.any,className:h.a.string,visible:h.a.bool,hiddenClassName:h.a.string};var We=Ke,Be=function(e){function t(){return i()(this,t),s()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className;return e.visible||(t+=" "+e.hiddenClassName),p.a.createElement("div",{className:t,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onMouseDown:e.onMouseDown,onTouchStart:e.onTouchStart,style:e.style},p.a.createElement(We,{className:e.prefixCls+"-content",visible:e.visible},e.children))},t}(f.Component);Be.propTypes={hiddenClassName:h.a.string,className:h.a.string,prefixCls:h.a.string,onMouseEnter:h.a.func,onMouseLeave:h.a.func,onMouseDown:h.a.func,onTouchStart:h.a.func,children:h.a.any};var Ue=Be,qe=function(e){function t(n){i()(this,t);var r=s()(this,e.call(this,n));return Ge.call(r),r.state={stretchChecked:!1,targetWidth:void 0,targetHeight:void 0},r.savePopupRef=O.bind(r,"popupInstance"),r.saveAlignRef=O.bind(r,"alignInstance"),r}return u()(t,e),t.prototype.componentDidMount=function(){this.rootNode=this.getPopupDomNode(),this.setStretchSize()},t.prototype.componentDidUpdate=function(){this.setStretchSize()},t.prototype.getPopupDomNode=function(){return v.a.findDOMNode(this.popupInstance)},t.prototype.getMaskTransitionName=function(){var e=this.props,t=e.maskTransitionName,n=e.maskAnimation;return!t&&n&&(t=e.prefixCls+"-"+n),t},t.prototype.getTransitionName=function(){var e=this.props,t=e.transitionName;return!t&&e.animation&&(t=e.prefixCls+"-"+e.animation),t},t.prototype.getClassName=function(e){return this.props.prefixCls+" "+this.props.className+" "+e},t.prototype.getPopupElement=function(){var e=this,t=this.savePopupRef,n=this.state,r=n.stretchChecked,a=n.targetHeight,i=n.targetWidth,c=this.props,s=c.align,l=c.visible,u=c.prefixCls,f=c.style,d=c.getClassNameFromAlign,h=c.destroyPopupOnHide,m=c.stretch,v=c.children,y=c.onMouseEnter,g=c.onMouseLeave,b=c.onMouseDown,_=c.onTouchStart,M=this.getClassName(this.currentAlignClassName||d(s)),w=u+"-hidden";l||(this.currentAlignClassName=null);var k={};m&&(-1!==m.indexOf("height")?k.height=a:-1!==m.indexOf("minHeight")&&(k.minHeight=a),-1!==m.indexOf("width")?k.width=i:-1!==m.indexOf("minWidth")&&(k.minWidth=i),r||(k.visibility="hidden",setTimeout((function(){e.alignInstance&&e.alignInstance.forceAlign()}),0)));var S={className:M,prefixCls:u,ref:t,onMouseEnter:y,onMouseLeave:g,onMouseDown:b,onTouchStart:_,style:o()({},k,f,this.getZIndexStyle())};return h?p.a.createElement(Fe.a,{component:"",exclusive:!0,transitionAppear:!0,transitionName:this.getTransitionName()},l?p.a.createElement(Ae,{target:this.getAlignTarget(),key:"popup",ref:this.saveAlignRef,monitorWindowResize:!0,align:s,onAlign:this.onAlign},p.a.createElement(Ue,o()({visible:!0},S),v)):null):p.a.createElement(Fe.a,{component:"",exclusive:!0,transitionAppear:!0,transitionName:this.getTransitionName(),showProp:"xVisible"},p.a.createElement(Ae,{target:this.getAlignTarget(),key:"popup",ref:this.saveAlignRef,monitorWindowResize:!0,xVisible:l,childrenProps:{visible:"xVisible"},disabled:!l,align:s,onAlign:this.onAlign},p.a.createElement(Ue,o()({hiddenClassName:w},S),v)))},t.prototype.getZIndexStyle=function(){var e={},t=this.props;return void 0!==t.zIndex&&(e.zIndex=t.zIndex),e},t.prototype.getMaskElement=function(){var e=this.props,t=void 0;if(e.mask){var n=this.getMaskTransitionName();t=p.a.createElement(We,{style:this.getZIndexStyle(),key:"mask",className:e.prefixCls+"-mask",hiddenClassName:e.prefixCls+"-mask-hidden",visible:e.visible}),n&&(t=p.a.createElement(Fe.a,{key:"mask",showProp:"visible",transitionAppear:!0,component:"",transitionName:n},t))}return t},t.prototype.render=function(){return p.a.createElement("div",null,this.getMaskElement(),this.getPopupElement())},t}(f.Component);qe.propTypes={visible:h.a.bool,style:h.a.object,getClassNameFromAlign:h.a.func,onAlign:h.a.func,getRootDomNode:h.a.func,align:h.a.any,destroyPopupOnHide:h.a.bool,className:h.a.string,prefixCls:h.a.string,onMouseEnter:h.a.func,onMouseLeave:h.a.func,onMouseDown:h.a.func,onTouchStart:h.a.func,stretch:h.a.string,children:h.a.node,point:h.a.shape({pageX:h.a.number,pageY:h.a.number})};var Ge=function(){var e=this;this.onAlign=function(t,n){var r=e.props,o=r.getClassNameFromAlign(n);e.currentAlignClassName!==o&&(e.currentAlignClassName=o,t.className=e.getClassName(o)),r.onAlign(t,n)},this.setStretchSize=function(){var t=e.props,n=t.stretch,r=t.getRootDomNode,o=t.visible,a=e.state,i=a.stretchChecked,c=a.targetHeight,s=a.targetWidth;if(n&&o){var l=r();if(l){var u=l.offsetHeight,f=l.offsetWidth;c===u&&s===f&&i||e.setState({stretchChecked:!0,targetHeight:u,targetWidth:f})}}else i&&e.setState({stretchChecked:!1})},this.getTargetElement=function(){return e.props.getRootDomNode()},this.getAlignTarget=function(){var t=e.props.point;return t||e.getTargetElement}},Je=qe;function $e(){}var Xe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"],Qe=!!m.createPortal,Ze={rcTrigger:h.a.shape({onPopupMouseDown:h.a.func})},et=function(e){function t(n){i()(this,t);var r=s()(this,e.call(this,n));tt.call(r);var o=void 0;return o="popupVisible"in n?!!n.popupVisible:!!n.defaultPopupVisible,r.state={prevPopupVisible:o,popupVisible:o},Xe.forEach((function(e){r["fire"+e]=function(t){r.fireEvents(e,t)}})),r}return u()(t,e),t.prototype.getChildContext=function(){return{rcTrigger:{onPopupMouseDown:this.onPopupMouseDown}}},t.prototype.componentDidMount=function(){this.componentDidUpdate({},{popupVisible:this.state.popupVisible})},t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=this.state;if(Qe||this.renderComponent(null,(function(){t.popupVisible!==r.popupVisible&&n.afterPopupVisibleChange(r.popupVisible)})),r.popupVisible){var o=void 0;return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(o=n.getDocument(),this.clickOutsideHandler=Object(b.a)(o,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(o=o||n.getDocument(),this.touchOutsideHandler=Object(b.a)(o,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(o=o||n.getDocument(),this.contextMenuOutsideHandler1=Object(b.a)(o,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(b.a)(window,"blur",this.onContextMenuClose)))}this.clearOutsideHandler()},t.prototype.componentWillUnmount=function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout)},t.getDerivedStateFromProps=function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r},t.prototype.getPopupDomNode=function(){return this._component&&this._component.getPopupDomNode?this._component.getPopupDomNode():null},t.prototype.getPopupAlign=function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){var r=e[t]||{};return o()({},r,n)}(r,t,n):n},t.prototype.setPopupVisible=function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&this.setPoint(t)},t.prototype.delaySetPopupVisible=function(e,t,n){var r=this,o=1e3*t;if(this.clearDelayTimer(),o){var a=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout((function(){r.setPopupVisible(e,a),r.clearDelayTimer()}),o)}else this.setPopupVisible(e,n)},t.prototype.clearDelayTimer=function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},t.prototype.clearOutsideHandler=function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},t.prototype.createTwoChains=function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire"+e]:t[e]||n[e]},t.prototype.isClickToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")},t.prototype.isContextMenuToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")},t.prototype.isClickToHide=function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")},t.prototype.isMouseEnterToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")},t.prototype.isMouseLeaveToHide=function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")},t.prototype.isFocusToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")},t.prototype.isBlurToHide=function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")},t.prototype.forcePopupAlign=function(){this.state.popupVisible&&this._component&&this._component.alignInstance&&this._component.alignInstance.forceAlign()},t.prototype.fireEvents=function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)},t.prototype.close=function(){this.setPopupVisible(!1)},t.prototype.render=function(){var e=this,t=this.state.popupVisible,n=this.props,r=n.children,o=n.forceRender,a=n.alignPoint,i=n.className,c=p.a.Children.only(r),s={key:"trigger"};this.isContextMenuToShow()?s.onContextMenu=this.onContextMenu:s.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(s.onClick=this.onClick,s.onMouseDown=this.onMouseDown,s.onTouchStart=this.onTouchStart):(s.onClick=this.createTwoChains("onClick"),s.onMouseDown=this.createTwoChains("onMouseDown"),s.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(s.onMouseEnter=this.onMouseEnter,a&&(s.onMouseMove=this.onMouseMove)):s.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?s.onMouseLeave=this.onMouseLeave:s.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(s.onFocus=this.onFocus,s.onBlur=this.onBlur):(s.onFocus=this.createTwoChains("onFocus"),s.onBlur=this.createTwoChains("onBlur"));var l=k()(c&&c.props&&c.props.className,i);l&&(s.className=l);var u=p.a.cloneElement(c,s);if(!Qe)return p.a.createElement(_.a,{parent:this,visible:t,autoMount:!1,forceRender:o,getComponent:this.getComponent,getContainer:this.getContainer},(function(t){var n=t.renderComponent;return e.renderComponent=n,u}));var f=void 0;return(t||this._component||o)&&(f=p.a.createElement(M.a,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),[u,f]},t}(p.a.Component);et.propTypes={children:h.a.any,action:h.a.oneOfType([h.a.string,h.a.arrayOf(h.a.string)]),showAction:h.a.any,hideAction:h.a.any,getPopupClassNameFromAlign:h.a.any,onPopupVisibleChange:h.a.func,afterPopupVisibleChange:h.a.func,popup:h.a.oneOfType([h.a.node,h.a.func]).isRequired,popupStyle:h.a.object,prefixCls:h.a.string,popupClassName:h.a.string,className:h.a.string,popupPlacement:h.a.string,builtinPlacements:h.a.object,popupTransitionName:h.a.oneOfType([h.a.string,h.a.object]),popupAnimation:h.a.any,mouseEnterDelay:h.a.number,mouseLeaveDelay:h.a.number,zIndex:h.a.number,focusDelay:h.a.number,blurDelay:h.a.number,getPopupContainer:h.a.func,getDocument:h.a.func,forceRender:h.a.bool,destroyPopupOnHide:h.a.bool,mask:h.a.bool,maskClosable:h.a.bool,onPopupAlign:h.a.func,popupAlign:h.a.object,popupVisible:h.a.bool,defaultPopupVisible:h.a.bool,maskTransitionName:h.a.oneOfType([h.a.string,h.a.object]),maskAnimation:h.a.string,stretch:h.a.string,alignPoint:h.a.bool},et.contextTypes=Ze,et.childContextTypes=Ze,et.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:function(){return""},getDocument:function(){return window.document},onPopupVisibleChange:$e,afterPopupVisibleChange:$e,onPopupAlign:$e,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[]};var tt=function(){var e=this;this.onMouseEnter=function(t){var n=e.props.mouseEnterDelay;e.fireEvents("onMouseEnter",t),e.delaySetPopupVisible(!0,n,n?null:t)},this.onMouseMove=function(t){e.fireEvents("onMouseMove",t),e.setPoint(t)},this.onMouseLeave=function(t){e.fireEvents("onMouseLeave",t),e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},this.onPopupMouseEnter=function(){e.clearDelayTimer()},this.onPopupMouseLeave=function(t){t.relatedTarget&&!t.relatedTarget.setTimeout&&e._component&&e._component.getPopupDomNode&&Object(g.a)(e._component.getPopupDomNode(),t.relatedTarget)||e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},this.onFocus=function(t){e.fireEvents("onFocus",t),e.clearDelayTimer(),e.isFocusToShow()&&(e.focusTime=Date.now(),e.delaySetPopupVisible(!0,e.props.focusDelay))},this.onMouseDown=function(t){e.fireEvents("onMouseDown",t),e.preClickTime=Date.now()},this.onTouchStart=function(t){e.fireEvents("onTouchStart",t),e.preTouchTime=Date.now()},this.onBlur=function(t){e.fireEvents("onBlur",t),e.clearDelayTimer(),e.isBlurToHide()&&e.delaySetPopupVisible(!1,e.props.blurDelay)},this.onContextMenu=function(t){t.preventDefault(),e.fireEvents("onContextMenu",t),e.setPopupVisible(!0,t)},this.onContextMenuClose=function(){e.isContextMenuToShow()&&e.close()},this.onClick=function(t){if(e.fireEvents("onClick",t),e.focusTime){var n=void 0;if(e.preClickTime&&e.preTouchTime?n=Math.min(e.preClickTime,e.preTouchTime):e.preClickTime?n=e.preClickTime:e.preTouchTime&&(n=e.preTouchTime),Math.abs(n-e.focusTime)<20)return;e.focusTime=0}e.preClickTime=0,e.preTouchTime=0,e.isClickToShow()&&(e.isClickToHide()||e.isBlurToHide())&&t&&t.preventDefault&&t.preventDefault();var r=!e.state.popupVisible;(e.isClickToHide()&&!r||r&&e.isClickToShow())&&e.setPopupVisible(!e.state.popupVisible,t)},this.onPopupMouseDown=function(){var t=e.context.rcTrigger,n=void 0===t?{}:t;e.hasPopupMouseDown=!0,clearTimeout(e.mouseDownTimeout),e.mouseDownTimeout=setTimeout((function(){e.hasPopupMouseDown=!1}),0),n.onPopupMouseDown&&n.onPopupMouseDown.apply(n,arguments)},this.onDocumentClick=function(t){if(!e.props.mask||e.props.maskClosable){var n=t.target,r=Object(m.findDOMNode)(e);Object(g.a)(r,n)||e.hasPopupMouseDown||e.close()}},this.getRootDomNode=function(){return Object(m.findDOMNode)(e)},this.getPopupClassNameFromAlign=function(t){var n=[],r=e.props,o=r.popupPlacement,a=r.builtinPlacements,i=r.prefixCls,c=r.alignPoint,s=r.getPopupClassNameFromAlign;return o&&a&&n.push(function(e,t,n,r){var o=n.points;for(var a in e)if(e.hasOwnProperty(a)&&S(e[a].points,o,r))return t+"-placement-"+a;return""}(a,i,t,c)),s&&n.push(s(t)),n.join(" ")},this.getComponent=function(){var t=e.props,n=t.prefixCls,r=t.destroyPopupOnHide,a=t.popupClassName,i=t.action,c=t.onPopupAlign,s=t.popupAnimation,l=t.popupTransitionName,u=t.popupStyle,f=t.mask,d=t.maskAnimation,h=t.maskTransitionName,m=t.zIndex,v=t.popup,y=t.stretch,g=t.alignPoint,b=e.state,_=b.popupVisible,M=b.point,w=e.getPopupAlign(),k={};return e.isMouseEnterToShow()&&(k.onMouseEnter=e.onPopupMouseEnter),e.isMouseLeaveToHide()&&(k.onMouseLeave=e.onPopupMouseLeave),k.onMouseDown=e.onPopupMouseDown,k.onTouchStart=e.onPopupMouseDown,p.a.createElement(Je,o()({prefixCls:n,destroyPopupOnHide:r,visible:_,point:g&&M,className:a,action:i,align:w,onAlign:c,animation:s,getClassNameFromAlign:e.getPopupClassNameFromAlign},k,{stretch:y,getRootDomNode:e.getRootDomNode,style:u,mask:f,zIndex:m,transitionName:l,maskAnimation:d,maskTransitionName:h,ref:e.savePopup}),"function"==typeof v?v():v)},this.getContainer=function(){var t=e.props,n=document.createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",(t.getPopupContainer?t.getPopupContainer(Object(m.findDOMNode)(e)):t.getDocument().body).appendChild(n),n},this.setPoint=function(t){e.props.alignPoint&&t&&e.setState({point:{pageX:t.pageX,pageY:t.pageY}})},this.handlePortalUpdate=function(){e.state.prevPopupVisible!==e.state.popupVisible&&e.props.afterPopupVisibleChange(e.state.popupVisible)},this.savePopup=function(t){e._component=t}};Object(y.polyfill)(et);t.a=et},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(375),o=n.n(r),a=n(10),i=n.n(a);function c(e,t,n,r){var a=i.a.unstable_batchedUpdates?function(e){i.a.unstable_batchedUpdates(n,e)}:n;return o()(e,t,a,r)}},function(e,t,n){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,c,s=i(e),l=1;l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";var r=n(116),o=n(84),a=n(85),i=n(118);t.a={locale:"en",Pagination:r.a,DatePicker:o.a,TimePicker:a.a,Calendar:i.a,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",selectAll:"Select current page",selectInvert:"Invert current page",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"}}},function(e,t,n){"use strict";var r=n(18),o=r.Map,a=r.OrderedSet,i=r.Record,c=a(),s={style:c,entity:null},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getStyle=function(){return this.get("style")},t.prototype.getEntity=function(){return this.get("entity")},t.prototype.hasStyle=function(e){return this.getStyle().includes(e)},t.applyStyle=function(e,n){var r=e.set("style",e.getStyle().add(n));return t.create(r)},t.removeStyle=function(e,n){var r=e.set("style",e.getStyle().remove(n));return t.create(r)},t.applyEntity=function(e,n){var r=e.getEntity()===n?e:e.set("entity",n);return t.create(r)},t.create=function(e){if(!e)return u;var n=o({style:c,entity:null}).merge(e),r=f.get(n);if(r)return r;var a=new t(n);return f=f.set(n,a),a},t}(i(s)),u=new l,f=o([[o(s),u]]);l.EMPTY=u,e.exports=l},function(e,t,n){var r=n(525);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},function(e,t,n){"use strict";var r=n(39),o=n(18),a=n(95),i=o.List,c=o.Map,s=o.OrderedSet,l=o.Record,u=o.Repeat,f=s(),p={parent:null,characterList:i(),data:c(),depth:0,key:"",text:"",type:"unstyled",children:i(),prevSibling:null,nextSibling:null},d=function(e,t){return e.getStyle()===t.getStyle()},h=function(e,t){return e.getEntity()===t.getEntity()},m=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=i(u(r.EMPTY,n.length))),e},v=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,m(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():f},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.getChildKeys=function(){return this.get("children")},t.prototype.getParentKey=function(){return this.get("parent")},t.prototype.getPrevSiblingKey=function(){return this.get("prevSibling")},t.prototype.getNextSiblingKey=function(){return this.get("nextSibling")},t.prototype.findStyleRanges=function(e,t){a(this.getCharacterList(),d,e,t)},t.prototype.findEntityRanges=function(e,t){a(this.getCharacterList(),h,e,t)},t}(l(p));e.exports=v},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(493),a=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=.98?n:(n+=e,(e-=.01)<.001&&(e=.001),n)}}function c(e,t){var n=void 0!==e.uid?"uid":"name";return t.filter((function(t){return t[n]===e[n]}))[0]}function s(e,t){var n=void 0!==e.uid?"uid":"name",r=t.filter((function(t){return t[n]!==e[n]}));return r.length===t.length?null:r}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return c})),n.d(t,"g",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return p}));var l=function(e){return!!e&&0===e.indexOf("image/")},u=function(e){if(l(e.type))return!0;var t=e.thumbUrl||e.url,n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/"),n=t[t.length-1],r=n.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]}(t);return!(!/^data:image\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg)$/i.test(n))||!/^data:/.test(t)&&!n},f=200;function p(e){return new Promise((function(t){if(l(e.type)){var n=document.createElement("canvas");n.width=f,n.height=f,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(f,"px; height: ").concat(f,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),o=new Image;o.onload=function(){var e=o.width,a=o.height,i=f,c=f,s=0,l=0;e=0||o.indexOf("Bottom")>=0?i.top="".concat(a.height-t.offset[1],"px"):(o.indexOf("Top")>=0||o.indexOf("bottom")>=0)&&(i.top="".concat(-t.offset[1],"px")),o.indexOf("left")>=0||o.indexOf("Right")>=0?i.left="".concat(a.width-t.offset[0],"px"):(o.indexOf("right")>=0||o.indexOf("Left")>=0)&&(i.left="".concat(-t.offset[0],"px")),e.style.transformOrigin="".concat(i.left," ").concat(i.top)}},n.renderTooltip=function(e){var t=e.getPopupContainer,o=e.getPrefixCls,a=N(n),i=a.props,c=a.state,s=i.prefixCls,l=i.title,u=i.overlay,f=i.openClassName,p=i.getPopupContainer,d=i.getTooltipContainer,h=i.children,m=o("tooltip",s),v=c.visible;"visible"in i||!n.isNoTitle()||(v=!1);var y,g,b,_=function(e){var t=e.type;if((t.__ANT_BUTTON||t.__ANT_SWITCH||t.__ANT_CHECKBOX||"button"===e.type)&&e.props.disabled){var n=F(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),o=n.picked,a=n.omitted,i=A(A({display:"inline-block"},o),{cursor:"not-allowed",width:e.props.block?"100%":null}),c=A(A({},a),{pointerEvents:"none"}),s=r.cloneElement(e,{style:c,className:null});return r.createElement("span",{style:i,className:e.props.className},s)}return e}(r.isValidElement(h)?h:r.createElement("span",null,h)),M=_.props,w=E()(M.className,(y={},g=f||"".concat(m,"-open"),b=!0,g in y?Object.defineProperty(y,g,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[g]=b,y));return r.createElement(O,A({},n.props,{prefixCls:m,getTooltipContainer:p||d||t,ref:n.saveTooltip,builtinPlacements:n.getPlacements(),overlay:u||l||"",visible:v,onVisibleChange:n.onVisibleChange,onPopupAlign:n.onPopupAlign}),v?r.cloneElement(_,{className:w}):_)},n.state={visible:!!e.visible||!!e.defaultVisible},n}var n,o,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(t,e),n=t,a=[{key:"getDerivedStateFromProps",value:function(e){return"visible"in e?{visible:e.visible}:null}}],(o=[{key:"getPopupDomNode",value:function(){return this.tooltip.getPopupDomNode()}},{key:"getPlacements",value:function(){var e=this.props,t=e.builtinPlacements,n=e.arrowPointAtCenter,r=e.autoAdjustOverflow;return t||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.arrowWidth,n=void 0===t?5:t,r=e.horizontalArrowShift,o=void 0===r?16:r,a=e.verticalArrowShift,i=void 0===a?12:a,c=e.autoAdjustOverflow,s=void 0===c||c,l={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(o+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(i+n)]},topRight:{points:["br","tc"],offset:[o+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(i+n)]},bottomRight:{points:["tr","bc"],offset:[o+n,4]},rightBottom:{points:["bl","cr"],offset:[4,i+n]},bottomLeft:{points:["tl","bc"],offset:[-(o+n),4]},leftBottom:{points:["br","cl"],offset:[-4,i+n]}};return Object.keys(l).forEach((function(t){l[t]=e.arrowPointAtCenter?L(L({},l[t]),{overflow:D(s),targetOffset:z}):L(L({},M[t]),{overflow:D(s)}),l[t].ignoreShake=!0})),l}({arrowPointAtCenter:n,verticalArrowShift:8,autoAdjustOverflow:r})}},{key:"isNoTitle",value:function(){var e=this.props,t=e.title,n=e.overlay;return!t&&!n}},{key:"render",value:function(){return r.createElement(P.a,null,this.renderTooltip)}}])&&H(n.prototype,o),a&&H(n,a),t}(r.Component);I.defaultProps={placement:"top",transitionName:"zoom-big-fast",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0},Object(a.polyfill)(I);t.a=I},function(e,t,n){"use strict";var r={transitionstart:{transition:"transitionstart",WebkitTransition:"webkitTransitionStart",MozTransition:"mozTransitionStart",OTransition:"oTransitionStart",msTransition:"MSTransitionStart"},animationstart:{animation:"animationstart",WebkitAnimation:"webkitAnimationStart",MozAnimation:"mozAnimationStart",OAnimation:"oAnimationStart",msAnimation:"MSAnimationStart"}},o={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},a=[],i=[];function c(e,t,n){e.addEventListener(t,n,!1)}function s(e,t,n){e.removeEventListener(t,n,!1)}"undefined"!=typeof window&&"undefined"!=typeof document&&function(){var e=document.createElement("div").style;function t(t,n){for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];for(var a in o)if(a in e){n.push(o[a]);break}}}"AnimationEvent"in window||(delete r.animationstart.animation,delete o.animationend.animation),"TransitionEvent"in window||(delete r.transitionstart.transition,delete o.transitionend.transition),t(r,a),t(o,i)}();var l={startEvents:a,addStartEventListener:function(e,t){0!==a.length?a.forEach((function(n){c(e,n,t)})):window.setTimeout(t,0)},removeStartEventListener:function(e,t){0!==a.length&&a.forEach((function(n){s(e,n,t)}))},endEvents:i,addEndEventListener:function(e,t){0!==i.length?i.forEach((function(n){c(e,n,t)})):window.setTimeout(t,0)},removeEndEventListener:function(e,t){0!==i.length&&i.forEach((function(n){s(e,n,t)}))}};t.a=l},function(e,t){var n=e.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(131)("wks"),o=n(102),a=n(54).Symbol,i="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=i&&a[e]||(i?a:o)("Symbol."+e))}).store=r},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=n(605),o=n(607),a=n(608),i=n(609);function c(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var a=n.slice(e.length);return!!t&&(a=r?r(a):a,o.contains(a,t))}function s(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}var l={isBrowser:function(e){return c(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return c(r.browserArchitecture,null,e)},isDevice:function(e){return c(r.deviceName,null,e)},isEngine:function(e){return c(r.engineName,r.engineVersion,e)},isPlatform:function(e){return c(r.platformName,r.platformFullVersion,e,s)},isPlatformArchitecture:function(e){return c(r.platformArchitecture,null,e)}};e.exports=a(l,i)},function(e,t,n){"use strict";var r={},o=Math.pow(2,24);e.exports=function(){for(var e=void 0;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*o).toString(32);return r[e]=!0,e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(78),o=n(174),a=n(126),i=Object.defineProperty;t.f=n(56)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),o)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(87)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(583);e.exports=r},function(e,t,n){"use strict";e.exports=n(455)},function(e,t,n){try{var r=n(186)}catch(e){r=n(186)}var o=/\s+/,a=Object.prototype.toString;function i(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}e.exports=function(e){return new i(e)},i.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~r(t,e)||t.push(e),this.el.className=t.join(" "),this},i.prototype.remove=function(e){if("[object RegExp]"==a.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=r(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},i.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t}),{})}var h=function(){function e(){i()(this,e),this.collection={}}return s()(e,[{key:"clear",value:function(){this.collection={}}},{key:"delete",value:function(e){return delete this.collection[e]}},{key:"get",value:function(e){return this.collection[e]}},{key:"has",value:function(e){return Boolean(this.collection[e])}},{key:"set",value:function(e,t){return this.collection[e]=t,this}},{key:"size",get:function(){return Object.keys(this.collection).length}}]),e}();function m(e,t,n){return n?u.createElement(e.tag,o()({key:t},d(e.attrs),n),(e.children||[]).map((function(n,r){return m(n,t+"-"+e.tag+"-"+r)}))):u.createElement(e.tag,o()({key:t},d(e.attrs)),(e.children||[]).map((function(n,r){return m(n,t+"-"+e.tag+"-"+r)})))}function v(e){return Object(l.generate)(e)[0]}function y(e,t){switch(t){case"fill":return e+"-fill";case"outline":return e+"-o";case"twotone":return e+"-twotone";default:throw new TypeError("Unknown theme type: "+t+", name: "+e)}}}).call(this,n(89))},function(e,t,n){var r=n(54),o=n(49),a=n(125),i=n(77),c=n(66),s=function(e,t,n){var l,u,f,p=e&s.F,d=e&s.G,h=e&s.S,m=e&s.P,v=e&s.B,y=e&s.W,g=d?o:o[t]||(o[t]={}),b=g.prototype,_=d?r:h?r[t]:(r[t]||{}).prototype;for(l in d&&(n=t),n)(u=!p&&_&&void 0!==_[l])&&c(g,l)||(f=u?_[l]:n[l],g[l]=d&&"function"!=typeof _[l]?n[l]:v&&u?a(f,r):y&&_[l]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):m&&"function"==typeof f?a(Function.call,f):f,m&&((g.virtual||(g.virtual={}))[l]=f,e&s.R&&b&&!b[l]&&i(b,l,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(91),o=n(466),a=n(467),i="[object Null]",c="[object Undefined]",s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?c:i:s&&s in Object(e)?o(e):a(e)}},function(e,t,n){var r=n(474),o=n(477);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";var r=n(39),o=n(18),a=n(95),i=o.List,c=o.Map,s=o.OrderedSet,l=o.Record,u=o.Repeat,f=s(),p=l({key:"",type:"unstyled",text:"",characterList:i(),depth:0,data:c()}),d=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=i(u(r.EMPTY,n.length))),e},h=function(e){function t(n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,d(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():f},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.findStyleRanges=function(e,t){a(this.getCharacterList(),m,e,t)},t.prototype.findEntityRanges=function(e,t){a(this.getCharacterList(),v,e,t)},t}(p);function m(e,t){return e.getStyle()===t.getStyle()}function v(e,t){return e.getEntity()===t.getEntity()}e.exports=h},function(e,t,n){"use strict";var r=n(19),o=55296,a=56319,i=56320,c=57343,s=/[\uD800-\uDFFF]/;function l(e){return o<=e&&e<=c}function u(e){return s.test(e)}function f(e,t){return 1+l(e.charCodeAt(t))}function p(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!u(e))return e.substr(t,n);var r=e.length;if(r<=0||t>r||n<=0)return"";var o=0;if(t>0){for(;t>0&&o=r)return""}else if(t<0){for(o=r;t<0&&00&&a1)d.default(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===n.length)return d.default(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var o=n[0];if(u.isValidElement(o)){var a=o.ref;n[0]=u.cloneElement(o,{ref:function(t){if(e.childNode=t,a){var n=r(a);"function"===n?a(t):"object"===n&&(a.current=t)}}})}return 1===n.length?n[0]:n.map((function(e,t){return!u.isValidElement(e)||"key"in e&&null!==e.key?e:u.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}])&&o(n.prototype,s),l&&o(n,l),t}(u.Component);m.displayName="ResizeObserver",t.default=m},function(e,t,n){"use strict";function r(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return s}));var r=n(115),o=n.n(r),a=n(48),i=n(60),c=n.n(i),s=0!==a.a.endEvents.length,l=["Webkit","Moz","O","ms"],u=["-webkit-","-moz-","-o-","ms-",""];function f(e,t){for(var n=window.getComputedStyle(e,null),r="",o=0;o0);return o}}()},function(e,t,n){"use strict";var r=n(30),o=n.n(r),a=n(0),i=n(63),c=function(e){return a.createElement(l,null,(function(t){var n=(0,t.getPrefixCls)("empty");switch(e){case"Table":case"List":return a.createElement(i.a,{image:i.a.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return a.createElement(i.a,{image:i.a.PRESENTED_IMAGE_SIMPLE,className:"".concat(n,"-small")});default:return a.createElement(i.a,null)}}))};n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return l}));var s=o()({getPrefixCls:function(e,t){return t||"ant-".concat(e)},renderEmpty:c}),l=s.Consumer},function(e,t,n){var r=n(55),o=n(88);e.exports=n(56)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(79);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(177),o=n(128);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},t.prototype.getAnchorKey=function(){return this.get("anchorKey")},t.prototype.getAnchorOffset=function(){return this.get("anchorOffset")},t.prototype.getFocusKey=function(){return this.get("focusKey")},t.prototype.getFocusOffset=function(){return this.get("focusOffset")},t.prototype.getIsBackward=function(){return this.get("isBackward")},t.prototype.getHasFocus=function(){return this.get("hasFocus")},t.prototype.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),o=this.getFocusKey();if(r===o&&r===e){var a=this.getStartOffset();return t<=this.getEndOffset()&&a<=n}if(e!==r&&e!==o)return!1;var i=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=i&&n>=i},t.prototype.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},t.prototype.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},t.prototype.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},t.prototype.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},t.prototype.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}((0,n(18).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=r},function(e,t,n){"use strict";function r(e){return e.replace(/\//g,"-")}e.exports=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(r).join(" "):Array.prototype.map.call(arguments,r).join(" ")}},function(e,t,n){"use strict";var r={encode:function(e,t,n){return e+"-"+t+"-"+n},decode:function(e){var t=e.split("-"),n=t[0],r=t[1],o=t[2];return{blockKey:n,decoratorKey:parseInt(r,10),leafKey:parseInt(o,10)}}};e.exports=r},function(e,t,n){"use strict";var r=n(117),o=n(85);function a(){return(a=Object.assign||function(e){for(var t=1;t> 插件: [",t.name,"] 无效。插件或许已经过期。"),!1})).filter((function(e){return e})).toArray():[]},n.prototype.componentWillMount=function(){var e=this.initPlugins().concat([w]),t={},n={},r=Object(l.Map)(s.DefaultDraftBlockRenderMap),o=Object(l.List)([]),a=new s.CompositeDecorator(e.filter((function(e){return void 0!==e.decorators})).map((function(e){return e.decorators})).reduce((function(e,t){return e.concat(t)}),[])),i=Object(l.List)(e.filter((function(e){return!!e.component&&"toolbar"!==e.name})));e.forEach((function(e){var a=e.styleMap,i=e.blockStyleMap,c=e.blockRenderMap,s=e.toHtml;if(a)for(var l in a)a.hasOwnProperty(l)&&(t[l]=a[l]);if(i)for(var u in i)i.hasOwnProperty(u)&&(n[u]=i[u],r=r.set(u,{element:null}));if(s&&(o=o.push(s)),c)for(var f in c)c.hasOwnProperty(f)&&(r=r.set(f,c[f]))})),k.set("customStyleMap",t),k.set("customBlockStyleMap",n),k.set("blockRenderMap",r),k.set("customStyleFn",this.customStyleFn.bind(this)),k.set("toHTMLList",o),this.setState({toolbarPlugins:i,compositeDecorator:a}),this.setEditorState(s.EditorState.set(this.state.editorState,{decorator:a}),!1,!1)},n.prototype.componentWillReceiveProps=function(e){if(this.forceUpdateImmediate&&this.cancelForceUpdateImmediate(),this.controlledMode){var t=e.value.getDecorator()?e.value:s.EditorState.set(e.value,{decorator:this.state.compositeDecorator});this.setState({editorState:t})}},n.prototype.componentWillUnmount=function(){this.cancelForceUpdateImmediate()},n.prototype.generatorDefaultValue=function(e){var t=this.getDefaultValue();return t||e},n.prototype.getStyleMap=function(){return k.get("customStyleMap")},n.prototype.setStyleMap=function(e){k.set("customStyleMap",e),this.render()},n.prototype.initPlugins=function(){var e=this,t=["focus","getEditorState","setEditorState","getStyleMap","setStyleMap"];return this.getPlugins().map((function(n){return t.forEach((function(t){n.callbacks.hasOwnProperty(t)&&(n.callbacks[t]=e[t].bind(e))})),n}))},n.prototype.focusEditor=function(e){this.refs.editor.focus(e),this.props.readOnly&&this._focusDummy.focus(),this.props.onFocus&&this.props.onFocus(e)},n.prototype._focus=function(e){if(e&&e.nativeEvent&&e.nativeEvent.target&&(!document.activeElement||"true"!==document.activeElement.getAttribute("contenteditable")))return this.focus(e)},n.prototype.focus=function(e){var t=this,n=e&&e.nativeEvent;if(n&&n.target===this._editorWrapper){var r=this.state.editorState,o=r.getSelection();if(!o.getHasFocus()&&o.isCollapsed())return this.setState({editorState:s.EditorState.moveSelectionToEnd(r)},(function(){t.focusEditor(e)}))}this.focusEditor(e)},n.prototype.getPlugins=function(){return this.state.plugins.slice()},n.prototype.getEventHandler=function(){var e=this,t={};return["onUpArrow","onDownArrow","handleReturn","onFocus","onBlur","onTab","handlePastedText"].forEach((function(n){t[n]=e.generatorEventHandler(n)})),t},n.prototype.getEditorState=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e&&this.refs.editor.focus(),this.state.editorState},n.prototype.setEditorState=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=e;this.getPlugins().forEach((function(e){if(e.onChange){var t=e.onChange(a);t&&(a=t)}})),this.props.onChange&&o&&(this.props.onChange(a),this.controlledMode&&(this.forceUpdateImmediate=r((function(){return t.setState({editorState:new s.EditorState(t.state.editorState.getImmutable())})})))),this.controlledMode||this.setState({editorState:a},n?function(){return r((function(){return t.refs.editor.focus()}))}:b)},n.prototype.handleKeyBinding=function(e){if(this.props.onKeyDown){e.ctrlKey=g(e);var t=this.props.onKeyDown(e);return t||Object(s.getDefaultKeyBinding)(e)}return Object(s.getDefaultKeyBinding)(e)},n.prototype.handleKeyCommand=function(e){return this.props.multiLines?this.eventHandle("handleKeyBinding",e):"split-block"===e?"handled":"not-handled"},n.prototype.getBlockStyle=function(e){var t=k.get("customBlockStyleMap"),n=e.getType();return t.hasOwnProperty(n)?t[n]:""},n.prototype.blockRendererFn=function(e){var t=null;return this.getPlugins().forEach((function(n){if(n.blockRendererFn){var r=n.blockRendererFn(e);r&&(t=r)}})),t},n.prototype.eventHandle=function(e){for(var t,n=this.getPlugins(),r=arguments.length,o=Array(r>1?r-1:0),a=1;a1)for(var n=1;n-1&&e%1==0&&e=t||n<0||y&&e-m>=f}function M(){var e=o();if(_(e))return w(e);d=setTimeout(M,function(e){var n=t-(e-h);return y?s(n,f-(e-m)):n}(e))}function w(e){return d=void 0,g&&l?b(e):(l=u=void 0,p)}function k(){var e=o(),n=_(e);if(l=arguments,u=this,h=e,n){if(void 0===d)return function(e){return m=e,d=setTimeout(M,t),v?b(e):p}(h);if(y)return clearTimeout(d),d=setTimeout(M,t),b(h)}return void 0===d&&(d=setTimeout(M,t)),p}return t=a(t)||0,r(n)&&(v=!!n.leading,f=(y="maxWait"in n)?c(a(n.maxWait)||0,t):f,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==d&&clearTimeout(d),m=0,l=h=u=d=void 0},k.flush=function(){return void 0===d?p:w(o())},k}},function(e,t,n){var r=n(570);var o={shouldComponentUpdate:function(e,t){return function(e,t,n){return!r(e.props,t)||!r(e.state,n)}(this,e,t)}};e.exports=o},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(0),i=n.n(a),c=n(2),s=n.n(c),l=n(14),u=n(6),f=n(76),p=n(21);function d(e){return!e||e<0?0:e>100?100:e}function h(){return(h=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function T(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function A(e,t){for(var n=0;n4&&void 0!==arguments[4]?arguments[4]:0,a=50-r/2,i=0,c=-a,s=0,l=-2*a;switch(arguments.length>5?arguments[5]:void 0){case"left":i=-a,c=0,s=2*a,l=0;break;case"right":i=a,c=0,s=-2*a,l=0;break;case"bottom":c=a,l=2*a}var u="M 50,50 m ".concat(i,",").concat(c,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(s,",").concat(-l,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(-s,",").concat(l),f=2*Math.PI*a;return{pathString:u,pathStyle:{stroke:n,strokeDasharray:"".concat(t/100*(f-o),"px ").concat(f,"px"),strokeDashoffset:"-".concat(o/2+e/100*(f-o),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"}}}var G=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?I(e):t}(this,F(t).call(this)),K(I(e),"paths",{}),K(I(e),"gradientId",0),e.gradientId=W,W+=1,e}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(t,e),n=t,(r=[{key:"getStokeList",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.percent,o=t.strokeColor,a=t.strokeWidth,c=t.strokeLinecap,s=t.gapDegree,l=t.gapPosition,u=U(r),f=U(o),p=0;return u.map((function(t,r){var o=f[r]||f[f.length-1],u="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(n,"-gradient-").concat(e.gradientId,")"):"",d=q(p,t,o,a,s,l),h=d.pathString,m=d.pathStyle;return p+=t,i.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:h,stroke:u,strokeLinecap:c,strokeWidth:0===t?0:a,fillOpacity:"0",style:m,ref:function(t){e.paths[r]=t}})}))}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.strokeWidth,r=e.trailWidth,o=e.gapDegree,a=e.gapPosition,c=e.trailColor,s=e.strokeLinecap,l=e.style,u=e.className,f=e.strokeColor,p=Y(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor"]),d=q(0,100,c,n,o,a),h=d.pathString,m=d.pathStyle;delete p.percent;var v=U(f).find((function(e){return"[object Object]"===Object.prototype.toString.call(e)}));return i.a.createElement("svg",N({className:"".concat(t,"-circle ").concat(u),viewBox:"0 0 100 100",style:l},p),v&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(t,"-gradient-").concat(this.gradientId),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(v).sort((function(e,t){return B(e)-B(t)})).map((function(e,t){return i.a.createElement("stop",{key:t,offset:e,stopColor:v[e]})})))),i.a.createElement("path",{className:"".concat(t,"-circle-trail"),d:h,stroke:c,strokeLinecap:s,strokeWidth:r||n,fillOpacity:"0",style:m}),this.getStokeList().reverse())}}])&&A(n.prototype,r),o&&A(n,o),t}(a.Component);G.propTypes=V({},E,{gapPosition:o.a.oneOf(["top","bottom","left","right"])}),G.defaultProps=V({},O,{gapPosition:"top"});var J=S(G);var $={normal:"#108ee9",exception:"#ff5500",success:"#87d068"};function X(e){var t=e.percent,n=e.successPercent,r=d(t);if(!n)return r;var o=d(n);return[n,d(r-o)]}var Q=function(e){var t,n,r,o,i,c,l,u=e.prefixCls,f=e.width,p=e.strokeWidth,d=e.trailColor,h=e.strokeLinecap,m=e.gapPosition,v=e.gapDegree,y=e.type,g=e.children,b=f||120,_={width:b,height:b,fontSize:.15*b+6},M=p||6,w=m||"dashboard"===y&&"bottom"||"top",k=v||("dashboard"===y?75:void 0),S=(n=(t=e).progressStatus,r=t.successPercent,o=t.strokeColor||$[n],r?[$.success,o]:o),O="[object Object]"===Object.prototype.toString.call(S),C=s()("".concat(u,"-inner"),(i={},c="".concat(u,"-circle-gradient"),l=O,c in i?Object.defineProperty(i,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[c]=l,i));return a.createElement("div",{className:C,style:_},a.createElement(J,{percent:X(e),strokeWidth:M,trailWidth:M,strokeColor:S,strokeLinecap:h,trailColor:d,prefixCls:u,gapDegree:k,gapPosition:w}),g)};function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function te(){return(te=Object.assign||function(e){for(var t=1;t=100?"success":e||"normal"}},{key:"renderProcessInfo",value:function(e,t){var n,r=this.props,o=r.showInfo,i=r.format,c=r.type,s=r.percent,l=r.successPercent;if(!o)return null;var f="circle"===c||"dashboard"===c?"":"-circle";return i||"exception"!==t&&"success"!==t?n=(i||function(e){return"".concat(e,"%")})(d(s),d(l)):"exception"===t?n=a.createElement(u.a,{type:"close".concat(f),theme:"line"===c?"filled":"outlined"}):"success"===t&&(n=a.createElement(u.a,{type:"check".concat(f),theme:"line"===c?"filled":"outlined"})),a.createElement("span",{className:"".concat(e,"-text"),title:"string"==typeof n?n:void 0},n)}},{key:"render",value:function(){return a.createElement(f.a,null,this.renderProgress)}}])&&ne(n.prototype,r),o&&ne(n,o),t}(a.Component);le.defaultProps={type:"line",percent:0,showInfo:!0,trailColor:"#f3f3f3",size:"default",gapDegree:0,strokeLinecap:"round"},le.propTypes={status:r.oneOf(se),type:r.oneOf(ce),showInfo:r.bool,percent:r.number,width:r.number,strokeWidth:r.number,strokeLinecap:r.oneOf(["round","square"]),strokeColor:r.oneOfType([r.string,r.object]),trailColor:r.string,format:r.func,gapDegree:r.number};t.a=le},function(e,t,n){var r=n(403);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(79);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(131)("keys"),o=n(102);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(49),o=n(54),a=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(101)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(78),o=n(428),a=n(132),i=n(130)("IE_PROTO"),c=function(){},s=function(){var e,t=n(175)("iframe"),r=a.length;for(t.style.display="none",n(429).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("