├── .gitignore ├── .npmignore ├── .travis.yml ├── LICENSE.md ├── README.md ├── images ├── constructor.png ├── design.jpg ├── design1.jpg ├── effect.png ├── form0.jpg ├── form1.jpg ├── oneof1.jpg ├── oneof2.jpg ├── oneof3.jpg └── timeline.png ├── lerna.json ├── package.json ├── packages ├── fx-schema-form-core │ ├── .babelrc │ ├── .eslintrc.json │ ├── .jshintrc │ ├── .npmignore │ ├── .npmrc │ ├── LICENSE.md │ ├── dist │ │ ├── index.dev.js │ │ ├── index.dev.js.map │ │ ├── index.js │ │ ├── index.prd.js │ │ ├── index.prd.js.map │ │ └── typings │ │ │ ├── factory.d.ts │ │ │ ├── index.d.ts │ │ │ ├── keys │ │ │ ├── anyof.d.ts │ │ │ ├── defined.d.ts │ │ │ ├── index.d.ts │ │ │ ├── oneof.d.ts │ │ │ └── ref.d.ts │ │ │ ├── libs │ │ │ ├── factory.d.ts │ │ │ ├── merge.d.ts │ │ │ └── resolve.d.ts │ │ │ ├── models │ │ │ ├── jsonschema.d.ts │ │ │ └── uischema.d.ts │ │ │ ├── types │ │ │ ├── array.d.ts │ │ │ ├── index.d.ts │ │ │ ├── none.d.ts │ │ │ └── object.d.ts │ │ │ └── utils.d.ts │ ├── dts │ │ └── global.d.ts │ ├── index.html │ ├── libs │ │ ├── factory.d.ts │ │ ├── factory.js │ │ ├── factory.js.map │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.map │ │ ├── keys │ │ │ ├── anyof.d.ts │ │ │ ├── anyof.js │ │ │ ├── anyof.js.map │ │ │ ├── defined.d.ts │ │ │ ├── defined.js │ │ │ ├── defined.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── oneof.d.ts │ │ │ ├── oneof.js │ │ │ ├── oneof.js.map │ │ │ ├── ref.d.ts │ │ │ ├── ref.js │ │ │ └── ref.js.map │ │ ├── libs │ │ │ ├── factory.d.ts │ │ │ ├── factory.js │ │ │ ├── factory.js.map │ │ │ ├── merge.d.ts │ │ │ ├── merge.js │ │ │ ├── merge.js.map │ │ │ ├── resolve.d.ts │ │ │ ├── resolve.js │ │ │ └── resolve.js.map │ │ ├── models │ │ │ ├── jsonschema.d.ts │ │ │ ├── jsonschema.js │ │ │ ├── jsonschema.js.map │ │ │ ├── uischema.d.ts │ │ │ ├── uischema.js │ │ │ └── uischema.js.map │ │ ├── types │ │ │ ├── array.d.ts │ │ │ ├── array.js │ │ │ ├── array.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── none.d.ts │ │ │ ├── none.js │ │ │ ├── none.js.map │ │ │ ├── object.d.ts │ │ │ ├── object.js │ │ │ └── object.js.map │ │ ├── utils.d.ts │ │ ├── utils.js │ │ └── utils.js.map │ ├── package.json │ ├── readme.md │ ├── src │ │ ├── factory.ts │ │ ├── index.ts │ │ ├── keys │ │ │ ├── anyof.ts │ │ │ ├── defined.ts │ │ │ ├── index.ts │ │ │ ├── oneof.ts │ │ │ └── ref.ts │ │ ├── libs │ │ │ ├── factory.ts │ │ │ ├── merge.ts │ │ │ └── resolve.ts │ │ ├── models │ │ │ ├── jsonschema.ts │ │ │ └── uischema.ts │ │ ├── types │ │ │ ├── array.ts │ │ │ ├── index.ts │ │ │ ├── none.ts │ │ │ └── object.ts │ │ └── utils.ts │ ├── tests │ │ ├── keys │ │ │ ├── anyof.spec.js │ │ │ ├── defined.spec.js │ │ │ ├── oneof.spec.js │ │ │ └── ref.spec.js │ │ ├── libs │ │ │ ├── factory.spec.js │ │ │ ├── merge.spec.js │ │ │ ├── resolve-def.spec.js │ │ │ └── resolve.spec.js │ │ └── types │ │ │ ├── array.spec.js │ │ │ ├── none.spec.js │ │ │ └── object.spec.js │ ├── tsconfig.json │ ├── tslint.json │ ├── webpack.config.js │ └── webpack │ │ └── devserver.js ├── fx-schema-form-extension │ ├── .babelrc │ ├── .eslintignore │ ├── .eslintrc │ ├── .jshintrc │ ├── .npmignore │ ├── .npmrc │ ├── LICENSE.md │ ├── index.html │ ├── libs │ │ ├── demo │ │ │ ├── ajv │ │ │ │ ├── id.d.ts │ │ │ │ ├── id.js │ │ │ │ └── id.js.map │ │ │ ├── dnd │ │ │ │ ├── checkbox.d.ts │ │ │ │ ├── checkbox.js │ │ │ │ ├── checkbox.js.map │ │ │ │ ├── div.d.ts │ │ │ │ ├── div.js │ │ │ │ └── div.js.map │ │ │ ├── forms │ │ │ │ ├── design.d.ts │ │ │ │ ├── design.js │ │ │ │ ├── design.js.map │ │ │ │ ├── edit.d.ts │ │ │ │ ├── edit.js │ │ │ │ ├── edit.js.map │ │ │ │ ├── editform.d.ts │ │ │ │ ├── editform.js │ │ │ │ ├── editform.js.map │ │ │ │ ├── normal.d.ts │ │ │ │ ├── normal.js │ │ │ │ ├── normal.js.map │ │ │ │ ├── oneof.d.ts │ │ │ │ ├── oneof.js │ │ │ │ ├── oneof.js.map │ │ │ │ ├── tree.d.ts │ │ │ │ ├── tree.js │ │ │ │ └── tree.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── init.d.ts │ │ │ ├── init.js │ │ │ ├── init.js.map │ │ │ ├── options │ │ │ │ ├── design.d.ts │ │ │ │ ├── design.js │ │ │ │ ├── design.js.map │ │ │ │ ├── normal.d.ts │ │ │ │ ├── normal.js │ │ │ │ ├── normal.js.map │ │ │ │ ├── oneof.d.ts │ │ │ │ ├── oneof.js │ │ │ │ ├── oneof.js.map │ │ │ │ ├── tree.d.ts │ │ │ │ ├── tree.js │ │ │ │ └── tree.js.map │ │ │ ├── router.d.ts │ │ │ ├── router.js │ │ │ ├── router.js.map │ │ │ ├── schemas │ │ │ │ ├── dnd │ │ │ │ │ ├── col.d.ts │ │ │ │ │ ├── col.js │ │ │ │ │ ├── col.js.map │ │ │ │ │ ├── common.d.ts │ │ │ │ │ ├── common.js │ │ │ │ │ ├── common.js.map │ │ │ │ │ ├── design.d.ts │ │ │ │ │ ├── design.js │ │ │ │ │ ├── design.js.map │ │ │ │ │ ├── div.d.ts │ │ │ │ │ ├── div.js │ │ │ │ │ ├── div.js.map │ │ │ │ │ ├── dnd.checkbox.d.ts │ │ │ │ │ ├── dnd.checkbox.js │ │ │ │ │ ├── dnd.checkbox.js.map │ │ │ │ │ ├── dnd.div.d.ts │ │ │ │ │ ├── dnd.div.js │ │ │ │ │ ├── dnd.div.js.map │ │ │ │ │ ├── echart.areastyle.d.ts │ │ │ │ │ ├── echart.areastyle.js │ │ │ │ │ ├── echart.areastyle.js.map │ │ │ │ │ ├── echart.axis.d.ts │ │ │ │ │ ├── echart.axis.js │ │ │ │ │ ├── echart.axis.js.map │ │ │ │ │ ├── echart.d.ts │ │ │ │ │ ├── echart.itemstyle.d.ts │ │ │ │ │ ├── echart.itemstyle.js │ │ │ │ │ ├── echart.itemstyle.js.map │ │ │ │ │ ├── echart.js │ │ │ │ │ ├── echart.js.map │ │ │ │ │ ├── echart.legend.d.ts │ │ │ │ │ ├── echart.legend.js │ │ │ │ │ ├── echart.legend.js.map │ │ │ │ │ ├── echart.linestyle.d.ts │ │ │ │ │ ├── echart.linestyle.js │ │ │ │ │ ├── echart.linestyle.js.map │ │ │ │ │ ├── echart.series.d.ts │ │ │ │ │ ├── echart.series.js │ │ │ │ │ ├── echart.series.js.map │ │ │ │ │ ├── echart.textstyle.d.ts │ │ │ │ │ ├── echart.textstyle.js │ │ │ │ │ ├── echart.textstyle.js.map │ │ │ │ │ ├── echart.timeline.d.ts │ │ │ │ │ ├── echart.timeline.js │ │ │ │ │ ├── echart.timeline.js.map │ │ │ │ │ ├── echart.title.d.ts │ │ │ │ │ ├── echart.title.js │ │ │ │ │ ├── echart.title.js.map │ │ │ │ │ ├── echart.toolbox.d.ts │ │ │ │ │ ├── echart.toolbox.js │ │ │ │ │ ├── echart.toolbox.js.map │ │ │ │ │ ├── echart.tooltip.d.ts │ │ │ │ │ ├── echart.tooltip.js │ │ │ │ │ ├── echart.tooltip.js.map │ │ │ │ │ ├── echart1.d.ts │ │ │ │ │ ├── echart1.js │ │ │ │ │ ├── echart1.js.map │ │ │ │ │ ├── echart2.d.ts │ │ │ │ │ ├── echart2.js │ │ │ │ │ ├── echart2.js.map │ │ │ │ │ ├── oneof.d.ts │ │ │ │ │ ├── oneof.js │ │ │ │ │ ├── oneof.js.map │ │ │ │ │ ├── row.d.ts │ │ │ │ │ ├── row.js │ │ │ │ │ ├── row.js.map │ │ │ │ │ ├── style.d.ts │ │ │ │ │ ├── style.js │ │ │ │ │ ├── style.js.map │ │ │ │ │ ├── tree.d.ts │ │ │ │ │ ├── tree.js │ │ │ │ │ └── tree.js.map │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ └── index.js.map │ │ │ ├── templates │ │ │ │ ├── card.d.ts │ │ │ │ ├── card.js │ │ │ │ ├── card.js.map │ │ │ │ ├── div.d.ts │ │ │ │ ├── div.js │ │ │ │ ├── div.js.map │ │ │ │ ├── formitem.d.ts │ │ │ │ ├── formitem.js │ │ │ │ ├── formitem.js.map │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── none.d.ts │ │ │ │ ├── none.js │ │ │ │ └── none.js.map │ │ │ └── widgets │ │ │ │ ├── checkbox.d.ts │ │ │ │ ├── checkbox.js │ │ │ │ ├── checkbox.js.map │ │ │ │ ├── index.d.ts │ │ │ │ ├── index.js │ │ │ │ ├── index.js.map │ │ │ │ ├── input.d.ts │ │ │ │ ├── input.js │ │ │ │ ├── input.js.map │ │ │ │ ├── number.d.ts │ │ │ │ ├── number.js │ │ │ │ ├── number.js.map │ │ │ │ ├── select.d.ts │ │ │ │ ├── select.js │ │ │ │ └── select.js.map │ │ ├── fields │ │ │ ├── design.d.ts │ │ │ ├── design.js │ │ │ ├── design.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── tree.d.ts │ │ │ ├── tree.js │ │ │ └── tree.js.map │ │ ├── hocs │ │ │ ├── changed.d.ts │ │ │ ├── changed.js │ │ │ ├── changed.js.map │ │ │ ├── condition.d.ts │ │ │ ├── condition.js │ │ │ ├── condition.js.map │ │ │ ├── copytometa.d.ts │ │ │ ├── copytometa.js │ │ │ ├── copytometa.js.map │ │ │ ├── datatometa.d.ts │ │ │ ├── datatometa.js │ │ │ ├── datatometa.js.map │ │ │ ├── form.d.ts │ │ │ ├── form.js │ │ │ ├── form.js.map │ │ │ ├── format.d.ts │ │ │ ├── format.js │ │ │ ├── format.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── oneof.d.ts │ │ │ ├── oneof.js │ │ │ ├── oneof.js.map │ │ │ ├── resetkey.d.ts │ │ │ ├── resetkey.js │ │ │ ├── resetkey.js.map │ │ │ ├── show.d.ts │ │ │ ├── show.js │ │ │ ├── show.js.map │ │ │ ├── temp.d.ts │ │ │ ├── temp.js │ │ │ ├── temp.js.map │ │ │ ├── widget.d.ts │ │ │ ├── widget.js │ │ │ ├── widget.js.map │ │ │ ├── wrapper.d.ts │ │ │ ├── wrapper.js │ │ │ └── wrapper.js.map │ │ ├── index.d.ts │ │ ├── index.js │ │ └── index.js.map │ ├── package.json │ ├── readme.md │ ├── src │ │ ├── demo │ │ │ ├── ajv │ │ │ │ └── id.tsx │ │ │ ├── dnd │ │ │ │ ├── checkbox.tsx │ │ │ │ └── div.tsx │ │ │ ├── forms │ │ │ │ ├── design.tsx │ │ │ │ ├── edit.tsx │ │ │ │ ├── editform.tsx │ │ │ │ ├── normal.tsx │ │ │ │ ├── oneof.tsx │ │ │ │ └── tree.tsx │ │ │ ├── index.tsx │ │ │ ├── init.tsx │ │ │ ├── options │ │ │ │ ├── design.tsx │ │ │ │ ├── normal.tsx │ │ │ │ ├── oneof.tsx │ │ │ │ └── tree.tsx │ │ │ ├── router.tsx │ │ │ ├── schemas │ │ │ │ ├── dnd │ │ │ │ │ ├── col.tsx │ │ │ │ │ ├── common.tsx │ │ │ │ │ ├── design.tsx │ │ │ │ │ ├── div.tsx │ │ │ │ │ ├── dnd.checkbox.tsx │ │ │ │ │ ├── dnd.div.tsx │ │ │ │ │ ├── echart.areastyle.tsx │ │ │ │ │ ├── echart.axis.tsx │ │ │ │ │ ├── echart.itemstyle.tsx │ │ │ │ │ ├── echart.legend.tsx │ │ │ │ │ ├── echart.linestyle.tsx │ │ │ │ │ ├── echart.series.tsx │ │ │ │ │ ├── echart.textstyle.tsx │ │ │ │ │ ├── echart.timeline.tsx │ │ │ │ │ ├── echart.title.tsx │ │ │ │ │ ├── echart.toolbox.tsx │ │ │ │ │ ├── echart.tooltip.tsx │ │ │ │ │ ├── echart.tsx │ │ │ │ │ ├── echart1.tsx │ │ │ │ │ ├── echart2.tsx │ │ │ │ │ ├── oneof.tsx │ │ │ │ │ ├── row.tsx │ │ │ │ │ ├── style.tsx │ │ │ │ │ └── tree.tsx │ │ │ │ └── index.tsx │ │ │ ├── templates │ │ │ │ ├── card.tsx │ │ │ │ ├── div.tsx │ │ │ │ ├── formitem.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── none.tsx │ │ │ └── widgets │ │ │ │ ├── checkbox.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── input.tsx │ │ │ │ ├── number.tsx │ │ │ │ └── select.tsx │ │ ├── fields │ │ │ ├── design.tsx │ │ │ ├── index.tsx │ │ │ └── tree.tsx │ │ ├── hocs │ │ │ ├── changed.tsx │ │ │ ├── condition.tsx │ │ │ ├── copytometa.tsx │ │ │ ├── datatometa.tsx │ │ │ ├── form.tsx │ │ │ ├── format.tsx │ │ │ ├── index.tsx │ │ │ ├── oneof.tsx │ │ │ ├── resetkey.tsx │ │ │ ├── show.tsx │ │ │ ├── temp.tsx │ │ │ ├── widget.tsx │ │ │ └── wrapper.tsx │ │ └── index.tsx │ ├── tsconfig.json │ ├── tslint.json │ ├── typings │ │ ├── json-schema-editor-visual.d.ts │ │ ├── react-dnd-html5-backend.d.ts │ │ └── react-immutable-render-mixin.d.ts │ ├── webpack.config.js │ └── webpack │ │ └── devserver.js ├── fx-schema-form-material │ ├── .babelrc │ ├── .eslintignore │ ├── .eslintrc │ ├── .jshintrc │ ├── .npmignore │ ├── .npmrc │ ├── LICENSE.md │ ├── dts │ │ ├── global.d.ts │ │ ├── grommet.d.ts │ │ ├── react-immutable-render-mixin.d.ts │ │ └── react-number-format.d.ts │ ├── index.html │ ├── package.json │ ├── readme.md │ ├── src │ │ ├── common │ │ │ ├── components │ │ │ │ ├── form.tsx │ │ │ │ └── none.tsx │ │ │ └── hoc │ │ │ │ └── asyncschema.tsx │ │ ├── index.tsx │ │ ├── modelproxy │ │ │ ├── common.json │ │ │ └── index.tsx │ │ ├── modules │ │ │ ├── dashboard │ │ │ │ └── index.tsx │ │ │ ├── datasource │ │ │ │ └── index.tsx │ │ │ └── home │ │ │ │ ├── actions.tsx │ │ │ │ ├── constant.tsx │ │ │ │ ├── container.tsx │ │ │ │ ├── content │ │ │ │ ├── component.tsx │ │ │ │ ├── container.tsx │ │ │ │ └── index.tsx │ │ │ │ ├── header │ │ │ │ ├── component.tsx │ │ │ │ ├── container.tsx │ │ │ │ └── index.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── main │ │ │ │ ├── component.tsx │ │ │ │ ├── container.tsx │ │ │ │ └── index.tsx │ │ │ │ ├── reducer.tsx │ │ │ │ └── side │ │ │ │ ├── component.tsx │ │ │ │ ├── constant.tsx │ │ │ │ ├── container.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── menu.tsx │ │ ├── sf │ │ │ ├── hocs │ │ │ │ ├── index.tsx │ │ │ │ └── proxy.tsx │ │ │ ├── init.tsx │ │ │ ├── options │ │ │ │ ├── arrayitem.tsx │ │ │ │ └── default.tsx │ │ │ ├── schemas │ │ │ │ ├── data.json │ │ │ │ ├── data1.json │ │ │ │ ├── size.json │ │ │ │ ├── style.json │ │ │ │ └── w.json │ │ │ ├── templates │ │ │ │ ├── card.tsx │ │ │ │ ├── formgroup.tsx │ │ │ │ ├── formitem.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── none.tsx │ │ │ └── widgets │ │ │ │ ├── autocomplete.tsx │ │ │ │ ├── checkbox.tsx │ │ │ │ ├── date.tsx │ │ │ │ ├── datetime.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── number.tsx │ │ │ │ ├── password.tsx │ │ │ │ ├── select.tsx │ │ │ │ ├── text.tsx │ │ │ │ └── time.tsx │ │ └── style.scss │ ├── tsconfig.json │ ├── tslint.json │ ├── webpack.config.js │ └── webpack │ │ └── devserver.js └── fx-schema-form-react │ ├── .babelrc │ ├── .eslintignore │ ├── .eslintrc │ ├── .jshintrc │ ├── .npmignore │ ├── .npmrc │ ├── LICENSE.md │ ├── dist │ ├── index.js │ ├── index.js.map │ └── typings │ │ ├── components │ │ ├── default.props.d.ts │ │ ├── form │ │ │ ├── component.d.ts │ │ │ ├── container.d.ts │ │ │ └── index.d.ts │ │ ├── formitem │ │ │ ├── component.d.ts │ │ │ ├── container.d.ts │ │ │ └── index.d.ts │ │ └── index.d.ts │ │ ├── factory.d.ts │ │ ├── fields │ │ ├── array.d.ts │ │ ├── arrayfield.d.ts │ │ ├── index.d.ts │ │ ├── normal.d.ts │ │ └── object.d.ts │ │ ├── hocs │ │ ├── array.d.ts │ │ ├── data.d.ts │ │ ├── field.d.ts │ │ ├── index.d.ts │ │ ├── make.d.ts │ │ ├── merge.d.ts │ │ ├── resetkey.d.ts │ │ ├── temp.d.ts │ │ ├── theme.d.ts │ │ ├── utils.d.ts │ │ └── validate.d.ts │ │ ├── index.d.ts │ │ ├── libs │ │ ├── dec.d.ts │ │ ├── merge.d.ts │ │ ├── tree.d.ts │ │ └── utils.d.ts │ │ ├── models │ │ └── index.d.ts │ │ ├── reducer.d.ts │ │ ├── reducers │ │ ├── reducer.d.ts │ │ └── schema.form.d.ts │ │ └── utils.d.ts │ ├── dts │ ├── global.d.ts │ ├── immutable-custom-merge.d.ts │ └── resolve-pathname.d.ts │ ├── images │ ├── 200-1.png │ └── point.png │ ├── index.html │ ├── libs │ ├── components │ │ ├── default.props.d.ts │ │ ├── default.props.js │ │ ├── default.props.js.map │ │ ├── form │ │ │ ├── component.d.ts │ │ │ ├── component.js │ │ │ ├── component.js.map │ │ │ ├── container.d.ts │ │ │ ├── container.js │ │ │ ├── container.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ └── index.js.map │ │ ├── formitem │ │ │ ├── component.d.ts │ │ │ ├── component.js │ │ │ ├── component.js.map │ │ │ ├── container.d.ts │ │ │ ├── container.js │ │ │ ├── container.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ └── index.js.map │ │ ├── index.d.ts │ │ ├── index.js │ │ └── index.js.map │ ├── factory.d.ts │ ├── factory.js │ ├── factory.js.map │ ├── fields │ │ ├── array.d.ts │ │ ├── array.js │ │ ├── array.js.map │ │ ├── arrayfield.d.ts │ │ ├── arrayfield.js │ │ ├── arrayfield.js.map │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.map │ │ ├── normal.d.ts │ │ ├── normal.js │ │ ├── normal.js.map │ │ ├── object.d.ts │ │ ├── object.js │ │ └── object.js.map │ ├── hocs │ │ ├── array.d.ts │ │ ├── array.js │ │ ├── array.js.map │ │ ├── data.d.ts │ │ ├── data.js │ │ ├── data.js.map │ │ ├── field.d.ts │ │ ├── field.js │ │ ├── field.js.map │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.map │ │ ├── make.d.ts │ │ ├── make.js │ │ ├── make.js.map │ │ ├── merge.d.ts │ │ ├── merge.js │ │ ├── merge.js.map │ │ ├── resetkey.d.ts │ │ ├── resetkey.js │ │ ├── resetkey.js.map │ │ ├── temp.d.ts │ │ ├── temp.js │ │ ├── temp.js.map │ │ ├── theme.d.ts │ │ ├── theme.js │ │ ├── theme.js.map │ │ ├── utils.d.ts │ │ ├── utils.js │ │ ├── utils.js.map │ │ ├── validate.d.ts │ │ ├── validate.js │ │ └── validate.js.map │ ├── index.d.ts │ ├── index.js │ ├── index.js.map │ ├── libs │ │ ├── dec.d.ts │ │ ├── dec.js │ │ ├── dec.js.map │ │ ├── merge.d.ts │ │ ├── merge.js │ │ ├── merge.js.map │ │ ├── tree.d.ts │ │ ├── tree.js │ │ ├── tree.js.map │ │ ├── utils.d.ts │ │ ├── utils.js │ │ └── utils.js.map │ ├── models │ │ ├── index.d.ts │ │ ├── index.js │ │ └── index.js.map │ ├── reducer.d.ts │ ├── reducer.js │ ├── reducer.js.map │ └── reducers │ │ ├── reducer.d.ts │ │ ├── reducer.js │ │ ├── reducer.js.map │ │ ├── schema.form.d.ts │ │ ├── schema.form.js │ │ └── schema.form.js.map │ ├── package.json │ ├── readme.md │ ├── src │ ├── components │ │ ├── default.props.tsx │ │ ├── form │ │ │ ├── component.tsx │ │ │ ├── container.tsx │ │ │ └── index.tsx │ │ ├── formitem │ │ │ ├── component.tsx │ │ │ ├── container.tsx │ │ │ └── index.tsx │ │ └── index.tsx │ ├── factory.tsx │ ├── fields │ │ ├── array.tsx │ │ ├── arrayfield.tsx │ │ ├── index.tsx │ │ ├── normal.tsx │ │ └── object.tsx │ ├── hocs │ │ ├── array.tsx │ │ ├── data.tsx │ │ ├── field.tsx │ │ ├── index.tsx │ │ ├── make.tsx │ │ ├── merge.tsx │ │ ├── resetkey.tsx │ │ ├── temp.tsx │ │ ├── theme.tsx │ │ ├── utils.tsx │ │ └── validate.tsx │ ├── index.tsx │ ├── libs │ │ ├── dec.tsx │ │ ├── merge.tsx │ │ ├── tree.tsx │ │ └── utils.tsx │ ├── models │ │ └── index.tsx │ ├── reducer.tsx │ └── reducers │ │ ├── reducer.tsx │ │ └── schema.form.tsx │ ├── tests │ ├── data.jsx │ ├── hocs │ │ ├── field.spec.jsx │ │ ├── make.spec.jsx │ │ ├── merge.spec.jsx │ │ ├── temp.spec.jsx │ │ ├── theme.spec.jsx │ │ ├── utils.spec.jsx │ │ └── validate.spec.jsx │ ├── libs │ │ └── tree.spec.jsx │ ├── reducers │ │ └── schema.form.spec.jsx │ └── setup.jsx │ ├── tsconfig.json │ ├── tslint.json │ ├── webpack.config.js │ └── webpack │ └── devserver.js └── tslint.json /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .history 3 | node_modules 4 | /packages/**/package-lock.json 5 | package-lock.json 6 | lerna-debug.log -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .history 3 | lerna-debug.log 4 | /packages/**/package-lock.json 5 | /packages/**/images 6 | /packages/**/package.json 7 | /packages/**/stats.json 8 | /packages/**/tsconfig.json 9 | /packages/**/tslint.json 10 | /packages/**/webpack.config.js 11 | /packages/**/src 12 | /packages/**/dts 13 | /packages/**/readme.md 14 | /packages/**/images -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "7" 4 | - "8" 5 | - "9" 6 | 7 | before_install: 8 | - npm install 9 | - lerna bootstrap 10 | 11 | after_script: 12 | - echo "ok" 13 | 14 | notifications: 15 | email: 16 | recipients: 17 | - nick121212@126.com 18 | - wen.qin@weimob.com 19 | on_success: change 20 | on_failure: always. -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2016 Andrew Clark 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /images/constructor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/constructor.png -------------------------------------------------------------------------------- /images/design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/design.jpg -------------------------------------------------------------------------------- /images/design1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/design1.jpg -------------------------------------------------------------------------------- /images/effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/effect.png -------------------------------------------------------------------------------- /images/form0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/form0.jpg -------------------------------------------------------------------------------- /images/form1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/form1.jpg -------------------------------------------------------------------------------- /images/oneof1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/oneof1.jpg -------------------------------------------------------------------------------- /images/oneof2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/oneof2.jpg -------------------------------------------------------------------------------- /images/oneof3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/oneof3.jpg -------------------------------------------------------------------------------- /images/timeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/images/timeline.png -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "lerna": "2.0.0-rc.5", 3 | "packages": [ 4 | "packages/fx-schema-form-core", 5 | "packages/fx-schema-form-extension", 6 | "packages/fx-schema-form-react" 7 | ], 8 | "version": "3.1.13" 9 | } 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fx-schema-form", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "lerna run test", 8 | "publish": "lerna publish" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/nick121212/fx-schema-form.git" 13 | }, 14 | "keywords": [ 15 | "typescript", 16 | "json-schema", 17 | "jsonSchema", 18 | "react-schema-form", 19 | "react", 20 | "schema-form", 21 | "form-generator", 22 | "form", 23 | "javascript" 24 | ], 25 | "author": "NICK", 26 | "license": "MIT", 27 | "devDependencies": { 28 | "lerna": "^2.0.0-rc.5", 29 | "webpack": "^4.14.0" 30 | }, 31 | "dependencies": {} 32 | } 33 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | 3 | 4 | "env": { 5 | "production": { 6 | "presets": [ 7 | ["env", { 8 | "targets": {}, 9 | "modules": false, 10 | "loose": true 11 | }] 12 | ], 13 | "plugins": [ 14 | ["transform-runtime", { 15 | "helpers": true, 16 | "modules": false, 17 | "polyfill": false, 18 | "regenerator": false, 19 | "moduleName": "babel-runtime" 20 | }] 21 | ], 22 | "minified": false 23 | }, 24 | "development": { 25 | "presets": [ 26 | "env" 27 | ] 28 | } 29 | }, 30 | "comments": true 31 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-core/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "standard" 3 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-core/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esversion": 6 3 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-core/.npmignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .history 3 | package-lock.json 4 | tsconfig.json 5 | tslint.json 6 | tsconfig.json 7 | webpack.config.js 8 | node_modules 9 | webpack 10 | tests 11 | src 12 | .babelrc 13 | .jshintrc 14 | readme.md 15 | LICENSE.md 16 | index.html -------------------------------------------------------------------------------- /packages/fx-schema-form-core/.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/packages/fx-schema-form-core/.npmrc -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/index.js: -------------------------------------------------------------------------------- 1 | 2 | if (process.env.NODE_ENV === "production") { 3 | module.exports = require("./index.prd"); 4 | } else { 5 | module.exports = require("./index.dev"); 6 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/factory.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | import { BaseFactory } from "./libs/factory"; 4 | import { FxJsonSchema } from "./models/jsonschema"; 5 | export declare const schemaFieldFactory: BaseFactory; 6 | export declare const schemaKeyWordFactory: BaseFactory<($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6>; 7 | export declare const schemaTypeFactory: BaseFactory<(schema: JSONSchema6, $id: string, ajv: Ajv) => JSONSchema6>; 8 | export declare const schemaKeysFactory: BaseFactory; 9 | export declare const convertKeys: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 10 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/index.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "./libs/factory"; 2 | import { schemaFieldFactory, schemaKeyWordFactory, schemaTypeFactory, schemaKeysFactory } from "./factory"; 3 | import { FxJsonSchema } from "./models/jsonschema"; 4 | import { UiSchema } from "./models/uischema"; 5 | export { default as ResolveLib, getSchemaId, getDataKeys } from "./libs/resolve"; 6 | export { default as MergeLib } from "./libs/merge"; 7 | export { FxJsonSchema, UiSchema, BaseFactory, schemaKeysFactory, schemaFieldFactory, schemaKeyWordFactory, schemaTypeFactory }; 8 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/keys/anyof.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/keys/defined.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/keys/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as ref } from "./ref"; 2 | export { default as oneof } from "./oneof"; 3 | export { default as anyof } from "./anyof"; 4 | export { default as definitions } from "./defined"; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/keys/oneof.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/keys/ref.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/libs/factory.d.ts: -------------------------------------------------------------------------------- 1 | export declare class BaseFactory { 2 | protected i: { 3 | [id: string]: T; 4 | }; 5 | private pi; 6 | add(name: string, intance: T, override?: boolean): boolean; 7 | has(key: string): boolean; 8 | get(key: string): T; 9 | lock(key: string): void; 10 | unLock(key: string): void; 11 | forEach(func: (key: string, val: T) => any): void; 12 | clear(): void; 13 | } 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/libs/merge.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { UiSchema } from "../models/uischema"; 3 | export default class MergeLib { 4 | mergeUiSchemaList: UiSchema[]; 5 | constructor(ajv: Ajv, schemaPath: string, parent: UiSchema, uiSchemas?: Array); 6 | } 7 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/libs/resolve.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | export declare const getDataKeys: (schemaKey: string, keepFirst?: boolean) => string[]; 4 | export declare const getSchemaId: (schemaKey: string) => string; 5 | export default class ResolveLib { 6 | private ajv; 7 | readonly $id: string; 8 | mergeSchema: JSONSchema6; 9 | constructor(ajv: Ajv, schema: JSONSchema6, $id?: string); 10 | private initSchema(ajv, schema); 11 | private compileSchema(schema, $id); 12 | } 13 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/models/jsonschema.d.ts: -------------------------------------------------------------------------------- 1 | import { JSONSchema6 } from "json-schema"; 2 | export interface FxJsonSchema extends JSONSchema6 { 3 | schemaPath?: string; 4 | } 5 | export declare const a = 1; 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/models/uischema.d.ts: -------------------------------------------------------------------------------- 1 | import { FxJsonSchema } from "./jsonschema"; 2 | export declare const uiSchemaSchema: { 3 | type: string; 4 | items: { 5 | anyOf: ({ 6 | type: string; 7 | minLength: number; 8 | } | { 9 | type: string; 10 | required: string[]; 11 | properties: { 12 | key: { 13 | type: string; 14 | }; 15 | }; 16 | })[]; 17 | }; 18 | }; 19 | export interface UiSchema extends FxJsonSchema { 20 | key: string; 21 | keys?: Array; 22 | children?: Array; 23 | refKeys?: string[]; 24 | } 25 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/types/array.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: (schema: JSONSchema6, schemaKey: string, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as array } from "./array"; 2 | export { default as object } from "./object"; 3 | export { default as none } from "./none"; 4 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/types/none.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: (schema: JSONSchema6, schemaKey: string, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/types/object.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: (schema: JSONSchema6, schemaKey: string, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dist/typings/utils.d.ts: -------------------------------------------------------------------------------- 1 | export declare const warn: (message: string) => never; 2 | export declare const hasOwnProperty: { 3 | (v: string): boolean; 4 | (v: PropertyKey): boolean; 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/dts/global.d.ts: -------------------------------------------------------------------------------- 1 | 2 | declare var __DEV__: boolean; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/factory.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | import { BaseFactory } from "./libs/factory"; 4 | import { FxJsonSchema } from "./models/jsonschema"; 5 | export declare const schemaFieldFactory: BaseFactory; 6 | export declare const schemaKeyWordFactory: BaseFactory<($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6>; 7 | export declare const schemaTypeFactory: BaseFactory<(schema: JSONSchema6, $id: string, ajv: Ajv) => JSONSchema6>; 8 | export declare const schemaKeysFactory: BaseFactory; 9 | export declare const convertKeys: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 10 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/factory.js: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "./libs/factory"; 2 | export const schemaFieldFactory = new BaseFactory(); 3 | export const schemaKeyWordFactory = new BaseFactory(); 4 | export const schemaTypeFactory = new BaseFactory(); 5 | export const schemaKeysFactory = new BaseFactory(); 6 | export const convertKeys = ($id, schema, ajv) => { 7 | schemaKeyWordFactory.forEach((key, val) => { 8 | schema = val($id, schema, ajv); 9 | }); 10 | return schema; 11 | }; 12 | //# sourceMappingURL=factory.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/factory.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,WAAW,EAAgB,CAAC;AAClE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,WAAW,EAA+D,CAAC;AACnH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,WAAW,EAA+D,CAAC;AAChH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,WAAW,EAAU,CAAC;AAQ3D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,MAAmB,EAAE,GAAQ,EAAe,EAAE;IACnF,oBAAoB,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,GAAgE,EAAE,EAAE;QAC3G,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/index.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "./libs/factory"; 2 | import { schemaFieldFactory, schemaKeyWordFactory, schemaTypeFactory, schemaKeysFactory } from "./factory"; 3 | import { FxJsonSchema } from "./models/jsonschema"; 4 | import { UiSchema } from "./models/uischema"; 5 | export { default as ResolveLib, getSchemaId, getDataKeys } from "./libs/resolve"; 6 | export { default as MergeLib } from "./libs/merge"; 7 | export { FxJsonSchema, UiSchema, BaseFactory, schemaKeysFactory, schemaFieldFactory, schemaKeyWordFactory, schemaTypeFactory }; 8 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/anyof.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/anyof.js: -------------------------------------------------------------------------------- 1 | import { default as ResolveLib, getSchemaId } from "../libs/resolve"; 2 | export default ($id, schema, ajv) => { 3 | if (!schema) { 4 | return schema; 5 | } 6 | let anyOf = schema.anyOf; 7 | if (anyOf && anyOf.constructor === Array) { 8 | schema.anyOf = anyOf.map((schemaOfOne, index) => { 9 | let { mergeSchema } = new ResolveLib(ajv, schemaOfOne, (schema.$id || getSchemaId(schema.$ref || "")) ? undefined : getSchemaId($id)); 10 | return mergeSchema; 11 | }); 12 | } 13 | return schema; 14 | }; 15 | //# sourceMappingURL=anyof.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/anyof.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"anyof.js","sourceRoot":"","sources":["../../src/keys/anyof.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAWrE,eAAe,CAAC,GAAW,EAAE,MAAmB,EAAE,GAAQ,EAAe,EAAE;IACvE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACV,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAED,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAEzB,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,WAAwB,EAAE,KAAa,EAAE,EAAE;YAEjE,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAEtI,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/defined.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/defined.js: -------------------------------------------------------------------------------- 1 | import { default as ResolveLib } from "../libs/resolve"; 2 | export default ($id, schema, ajv) => { 3 | if (!schema) { 4 | return schema; 5 | } 6 | const definitions = schema.definitions; 7 | if (definitions) { 8 | for (const key in definitions) { 9 | if (definitions.hasOwnProperty(key)) { 10 | const element = definitions[key]; 11 | if (element !== false && element !== true) { 12 | new ResolveLib(ajv, element, `${schema.$id}#/definitions/${key}`); 13 | } 14 | } 15 | } 16 | } 17 | return schema; 18 | }; 19 | //# sourceMappingURL=defined.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/defined.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"defined.js","sourceRoot":"","sources":["../../src/keys/defined.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAWxD,eAAe,CAAC,GAAW,EAAE,MAAmB,EAAE,GAAQ,EAAe,EAAE;IAEvE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACV,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAEvC,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QACd,GAAG,CAAC,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC;YAC5B,EAAE,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAClC,MAAM,OAAO,GAA0B,WAAW,CAAC,GAAG,CAAC,CAAC;gBAExD,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC;oBAExC,IAAI,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,GAAG,iBAAiB,GAAG,EAAE,CAAC,CAAC;gBAKtE,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAED,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as ref } from "./ref"; 2 | export { default as oneof } from "./oneof"; 3 | export { default as anyof } from "./anyof"; 4 | export { default as definitions } from "./defined"; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/index.js: -------------------------------------------------------------------------------- 1 | export { default as ref } from "./ref"; 2 | export { default as oneof } from "./oneof"; 3 | export { default as anyof } from "./anyof"; 4 | export { default as definitions } from "./defined"; 5 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/oneof.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/oneof.js: -------------------------------------------------------------------------------- 1 | import { default as ResolveLib } from "../libs/resolve"; 2 | export default ($id, schema, ajv) => { 3 | if (!schema) { 4 | return schema; 5 | } 6 | let oneOf = schema.oneOf; 7 | if (oneOf && oneOf.constructor === Array) { 8 | schema.oneOf = oneOf.map((schemaOfOne) => { 9 | let { mergeSchema } = new ResolveLib(ajv, schemaOfOne); 10 | return mergeSchema; 11 | }); 12 | } 13 | return schema; 14 | }; 15 | //# sourceMappingURL=oneof.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/oneof.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"oneof.js","sourceRoot":"","sources":["../../src/keys/oneof.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAWxD,eAAe,CAAC,GAAW,EAAE,MAAmB,EAAE,GAAQ,EAAe,EAAE;IAEvE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACV,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAED,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAEzB,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,WAAwB,EAAE,EAAE;YAClD,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,UAAU,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;YAEvD,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/ref.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/keys/ref.js: -------------------------------------------------------------------------------- 1 | import { getDataKeys, getSchemaId } from "../libs/resolve"; 2 | import { warn } from "../utils"; 3 | export default ($id, schema, ajv) => { 4 | if (schema && schema.$ref) { 5 | const schemaId = getSchemaId(schema.$ref); 6 | if (schema.$id) { 7 | schema.$ref = schema.$id + schema.$ref; 8 | } 9 | else if (!schemaId) { 10 | schema.$ref = getSchemaId($id) + schema.$ref; 11 | } 12 | const validate = ajv.getSchema(schema.$ref); 13 | if (validate && validate.schema) { 14 | let schemaAjv = Object.assign({}, validate.schema); 15 | schemaAjv.$ref = schema.$ref; 16 | delete schemaAjv.$id; 17 | Object.assign(schemaAjv, { 18 | refKeys: getDataKeys(schema.$ref) 19 | }); 20 | return schemaAjv; 21 | } 22 | if (__DEV__) { 23 | warn(`${schema.$ref} not exist.`); 24 | } 25 | } 26 | return schema; 27 | }; 28 | //# sourceMappingURL=ref.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/libs/factory.d.ts: -------------------------------------------------------------------------------- 1 | export declare class BaseFactory { 2 | protected i: { 3 | [id: string]: T; 4 | }; 5 | private pi; 6 | add(name: string, intance: T, override?: boolean): boolean; 7 | has(key: string): boolean; 8 | get(key: string): T; 9 | lock(key: string): void; 10 | unLock(key: string): void; 11 | forEach(func: (key: string, val: T) => any): void; 12 | clear(): void; 13 | } 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/libs/merge.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { UiSchema } from "../models/uischema"; 3 | export default class MergeLib { 4 | mergeUiSchemaList: UiSchema[]; 5 | constructor(ajv: Ajv, schemaPath: string, parent: UiSchema, uiSchemas?: Array); 6 | } 7 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/libs/resolve.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | export declare const getDataKeys: (schemaKey: string, keepFirst?: boolean) => string[]; 4 | export declare const getSchemaId: (schemaKey: string) => string; 5 | export default class ResolveLib { 6 | private ajv; 7 | readonly $id: string; 8 | mergeSchema: JSONSchema6; 9 | constructor(ajv: Ajv, schema: JSONSchema6, $id?: string); 10 | private initSchema(ajv, schema); 11 | private compileSchema(schema, $id); 12 | } 13 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/models/jsonschema.d.ts: -------------------------------------------------------------------------------- 1 | import { JSONSchema6 } from "json-schema"; 2 | export interface FxJsonSchema extends JSONSchema6 { 3 | schemaPath?: string; 4 | } 5 | export declare const a = 1; 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/models/jsonschema.js: -------------------------------------------------------------------------------- 1 | export const a = 1; 2 | //# sourceMappingURL=jsonschema.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/models/jsonschema.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"jsonschema.js","sourceRoot":"","sources":["../../src/models/jsonschema.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAO,CAAC,GAAG,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/models/uischema.d.ts: -------------------------------------------------------------------------------- 1 | import { FxJsonSchema } from "./jsonschema"; 2 | export declare const uiSchemaSchema: { 3 | type: string; 4 | items: { 5 | anyOf: ({ 6 | type: string; 7 | minLength: number; 8 | } | { 9 | type: string; 10 | required: string[]; 11 | properties: { 12 | key: { 13 | type: string; 14 | }; 15 | }; 16 | })[]; 17 | }; 18 | }; 19 | export interface UiSchema extends FxJsonSchema { 20 | key: string; 21 | keys?: Array; 22 | children?: Array; 23 | refKeys?: string[]; 24 | } 25 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/models/uischema.js: -------------------------------------------------------------------------------- 1 | import { a } from "./jsonschema"; 2 | let string = "string"; 3 | export const uiSchemaSchema = { 4 | type: "array", 5 | items: { 6 | anyOf: [{ 7 | type: string, 8 | minLength: a 9 | }, { 10 | type: "object", 11 | required: ["key"], 12 | properties: { 13 | key: { type: string } 14 | } 15 | }] 16 | } 17 | }; 18 | //# sourceMappingURL=uischema.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/models/uischema.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"uischema.js","sourceRoot":"","sources":["../../src/models/uischema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,CAAC,EAAE,MAAM,cAAc,CAAC;AAEhD,IAAI,MAAM,GAAG,QAAQ,CAAC;AAKtB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,KAAK,EAAE,CAAC;gBACJ,IAAI,EAAE,MAAM;gBACZ,SAAS,EAAE,CAAC;aACf,EAAE;gBACC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,CAAC,KAAK,CAAC;gBACjB,UAAU,EAAE;oBACR,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;iBACxB;aACJ,CAAC;KACL;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/array.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: (schema: JSONSchema6, schemaKey: string, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/array.js: -------------------------------------------------------------------------------- 1 | import { default as ResolveLib, getDataKeys } from "../libs/resolve"; 2 | const itemsName = "items"; 3 | export default (schema, schemaKey, ajv) => { 4 | let { items } = schema; 5 | if (items) { 6 | const propertySchemaResolve = new ResolveLib(ajv, items, [schemaKey, itemsName].join("/")), keys = getDataKeys([schemaKey, itemsName].join("/")); 7 | Object.assign(propertySchemaResolve.mergeSchema, { 8 | keys 9 | }); 10 | } 11 | return schema; 12 | }; 13 | //# sourceMappingURL=array.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/array.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"array.js","sourceRoot":"","sources":["../../src/types/array.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,SAAS,GAAG,OAAO,CAAC;AAU1B,eAAe,CAAC,MAAmB,EAAE,SAAiB,EAAE,GAAQ,EAAE,EAAE;IAChE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAEvB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACR,MAAM,qBAAqB,GAAG,IAAI,UAAU,CAAC,GAAG,EAAE,KAAoB,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EACrG,IAAI,GAAa,WAAW,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAEnE,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,WAAW,EAAE;YAC7C,IAAI;SACP,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as array } from "./array"; 2 | export { default as object } from "./object"; 3 | export { default as none } from "./none"; 4 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/index.js: -------------------------------------------------------------------------------- 1 | export { default as array } from "./array"; 2 | export { default as object } from "./object"; 3 | export { default as none } from "./none"; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/none.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: (schema: JSONSchema6, schemaKey: string, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/none.js: -------------------------------------------------------------------------------- 1 | import { schemaFieldFactory, schemaKeysFactory, convertKeys } from "../factory"; 2 | import { getDataKeys, getSchemaId } from "../libs/resolve"; 3 | export default (schema, schemaKey, ajv) => { 4 | let keys = getDataKeys(schemaKey, false), $id = getSchemaId(schemaKey), currentSchema = convertKeys(schemaKey, schema, ajv); 5 | if (schemaFieldFactory.has(schemaKey)) { 6 | return currentSchema || schema; 7 | } 8 | if (!$id) { 9 | $id = schema.$id || ""; 10 | } 11 | if (schema.$id && schema.$ref) { 12 | schemaKeysFactory.add(schema.$id, schema.$ref); 13 | } 14 | schemaFieldFactory.add(schemaKey, Object.assign({}, currentSchema || schema, { 15 | keys, 16 | schemaPath: schemaKey 17 | })); 18 | schemaKeysFactory.add([$id].concat(keys).join("/"), schemaKey); 19 | return currentSchema || schema; 20 | }; 21 | //# sourceMappingURL=none.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/none.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"none.js","sourceRoot":"","sources":["../../src/types/none.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAS3D,eAAe,CAAC,MAAmB,EAAE,SAAiB,EAAE,GAAQ,EAAE,EAAE;IAChE,IAAI,IAAI,GAAa,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,EAC9C,GAAG,GAAG,WAAW,CAAC,SAAS,CAAC,EAC5B,aAAa,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IAGxD,EAAE,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACpC,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC;IACnC,CAAC;IAED,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACP,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5B,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IAGD,kBAAkB,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,IAAI,MAAM,EAAE;QACzE,IAAI;QACJ,UAAU,EAAE,SAAS;KACxB,CAAC,CAAC,CAAC;IAEJ,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC;IAE/D,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC;AACnC,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/types/object.d.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | declare const _default: (schema: JSONSchema6, schemaKey: string, ajv: Ajv) => JSONSchema6; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/utils.d.ts: -------------------------------------------------------------------------------- 1 | export declare const warn: (message: string) => never; 2 | export declare const hasOwnProperty: { 3 | (v: string): boolean; 4 | (v: PropertyKey): boolean; 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/utils.js: -------------------------------------------------------------------------------- 1 | export const warn = (message) => { 2 | console.error(message); 3 | throw new Error(message); 4 | }; 5 | export const hasOwnProperty = Object.prototype.hasOwnProperty; 6 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-core/libs/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,EAAE;IACpC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-core/src/factory.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | 4 | import { BaseFactory } from "./libs/factory"; 5 | import { FxJsonSchema } from "./models/jsonschema"; 6 | 7 | export const schemaFieldFactory = new BaseFactory(); 8 | export const schemaKeyWordFactory = new BaseFactory<($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6>(); 9 | export const schemaTypeFactory = new BaseFactory<(schema: JSONSchema6, $id: string, ajv: Ajv) => JSONSchema6>(); 10 | export const schemaKeysFactory = new BaseFactory(); 11 | 12 | /** 13 | * 遍历所有的keyword,解析schema 14 | * @param {JSONSchema6} schema schema 15 | * @param {Ajv} ajv ajv的实例 16 | * @returns {JSONSchema6} 解析过后的schema 17 | */ 18 | export const convertKeys = ($id: string, schema: JSONSchema6, ajv: Ajv): JSONSchema6 => { 19 | schemaKeyWordFactory.forEach((key: string, val: ($id: string, schema: JSONSchema6, ajv: Ajv) => JSONSchema6) => { 20 | schema = val($id, schema, ajv); 21 | }); 22 | 23 | return schema; 24 | }; 25 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/src/keys/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ref } from "./ref"; 2 | export { default as oneof } from "./oneof"; 3 | export { default as anyof } from "./anyof"; 4 | export { default as definitions } from "./defined"; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/src/keys/oneof.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Ajv } from "ajv"; 3 | import { JSONSchema6 } from "json-schema"; 4 | 5 | import { default as ResolveLib } from "../libs/resolve"; 6 | // import MergeLib from "../libs/merge"; 7 | 8 | /** 9 | * 解析schema中的关键字 oneOf 10 | * 如果发现有oneOf关键字,遍历替换成schema 11 | * @param {string} $id 当前的schema的ID 12 | * @param {JSONSchema6} schema 当前的schema 13 | * @param {Ajv} ajv ajv实例 14 | * @return {JSONSchema6} 处理过后的schema 15 | */ 16 | export default ($id: string, schema: JSONSchema6, ajv: Ajv): JSONSchema6 => { 17 | 18 | if (!schema) { 19 | return schema; 20 | } 21 | 22 | let oneOf = schema.oneOf; 23 | 24 | if (oneOf && oneOf.constructor === Array) { 25 | schema.oneOf = oneOf.map((schemaOfOne: JSONSchema6) => { 26 | let { mergeSchema } = new ResolveLib(ajv, schemaOfOne); 27 | 28 | return mergeSchema; 29 | }); 30 | } 31 | 32 | return schema; 33 | }; 34 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/src/models/jsonschema.ts: -------------------------------------------------------------------------------- 1 | import { JSONSchema6 } from "json-schema"; 2 | 3 | export interface FxJsonSchema extends JSONSchema6 { 4 | schemaPath?: string; 5 | } 6 | 7 | export const a = 1; 8 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/src/models/uischema.ts: -------------------------------------------------------------------------------- 1 | import { FxJsonSchema , a } from "./jsonschema"; 2 | 3 | let string = "string"; 4 | 5 | /** 6 | * uiSchema的模型schema 7 | */ 8 | export const uiSchemaSchema = { 9 | type: "array", 10 | items: { 11 | anyOf: [{ 12 | type: string, 13 | minLength: a 14 | }, { 15 | type: "object", 16 | required: ["key"], 17 | properties: { 18 | key: { type: string } 19 | } 20 | }] 21 | } 22 | }; 23 | 24 | export interface UiSchema extends FxJsonSchema { 25 | key: string; 26 | keys?: Array; 27 | children?: Array; 28 | refKeys?: string[]; 29 | } 30 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/src/types/array.ts: -------------------------------------------------------------------------------- 1 | import { Ajv } from "ajv"; 2 | import { JSONSchema6 } from "json-schema"; 3 | 4 | import { default as ResolveLib, getDataKeys } from "../libs/resolve"; 5 | 6 | const itemsName = "items"; 7 | 8 | /** 9 | * 解析schema中的type=array的结构 10 | * 如果存在items,则继续解析schema.item 11 | * @param {JSONSchema6} schema 当前的schema 12 | * @param {String} schemaKey 当前的schemaKey 13 | * @param {Ajv} ajv 当前的ajv实例 14 | * @return {JSONSchema6} 返回处理过后的schema 15 | */ 16 | export default (schema: JSONSchema6, schemaKey: string, ajv: Ajv) => { 17 | let { items } = schema; 18 | 19 | if (items) { 20 | const propertySchemaResolve = new ResolveLib(ajv, items as JSONSchema6, [schemaKey, itemsName].join("/")), 21 | keys: string[] = getDataKeys([schemaKey, itemsName].join("/")); 22 | 23 | Object.assign(propertySchemaResolve.mergeSchema, { 24 | keys 25 | }); 26 | } 27 | 28 | return schema; 29 | }; 30 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/src/types/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export { default as array } from "./array"; 3 | export { default as object } from "./object"; 4 | export { default as none } from "./none"; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/src/utils.ts: -------------------------------------------------------------------------------- 1 | export const warn = (message: string) => { 2 | console.error(message); 3 | throw new Error(message); 4 | }; 5 | 6 | export const hasOwnProperty = Object.prototype.hasOwnProperty; 7 | -------------------------------------------------------------------------------- /packages/fx-schema-form-core/tests/keys/ref.spec.js: -------------------------------------------------------------------------------- 1 | import { 2 | assert, 3 | expect 4 | } from "chai"; 5 | import Ajv from "ajv"; 6 | 7 | import { 8 | schemaKeyWordFactory 9 | } from "../../dist/index.dev"; 10 | 11 | describe("key word of ref", () => { 12 | let ajv; 13 | 14 | before(() => { 15 | ajv = new Ajv(); 16 | // schemaKeyWordFactory.clear(); 17 | ajv.addSchema({ 18 | $id: "test", 19 | type: "string", 20 | title: "测试的schema" 21 | }); 22 | }); 23 | 24 | it("抛出一个找不到test2的异常。", () => { 25 | assert.throw(() => { 26 | schemaKeyWordFactory.get("ref")("",{ 27 | $ref: "test5#" 28 | }, ajv); 29 | }); 30 | }); 31 | 32 | it("返回一个schema的对象,$id=test", () => { 33 | let schema = schemaKeyWordFactory.get("ref")("", { 34 | $ref: "test#" 35 | }, ajv); 36 | 37 | expect(schema).to.be.a("object"); 38 | expect(schema.$ref).to.equal("test#"); 39 | }); 40 | }); -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/** 2 | **/*.css 3 | **/*.html -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "esnext": true, 4 | "curly": true, 5 | "latedef": true, 6 | "quotmark": true, 7 | "undef": true, 8 | "unused": true, 9 | "trailing": true, 10 | "jsx": "react", 11 | "react": true 12 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/.npmignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .history 3 | images 4 | tsconfig.json 5 | tslint.json 6 | webpack.config.js 7 | src 8 | node_modules 9 | global.d.ts 10 | package-lock.json 11 | readme.md 12 | test.html 13 | tests 14 | .babelrc 15 | out/** 16 | !out/index.js 17 | fuse.js 18 | libs/demo -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/packages/fx-schema-form-extension/.npmrc -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Schema Form 6 | 7 | 8 | 9 | 10 | 11 | JS比较大,请耐心等待!!! 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/ajv/id.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/ajv/id.js: -------------------------------------------------------------------------------- 1 | import ajv from "ajv"; 2 | import { curAjv } from "../init"; 3 | curAjv.addKeyword("idExists", { 4 | async: true, 5 | type: "string", 6 | validate: checkIdExists 7 | }); 8 | function checkIdExists(schema, data) { 9 | return new Promise((resolve, reject) => { 10 | setTimeout(() => { 11 | if (data === "nick" || data === "nora") { 12 | return resolve(true); 13 | } 14 | reject(new ajv.ValidationError([{ message: "idExists不是nick" }])); 15 | }, 2000); 16 | }); 17 | } 18 | //# sourceMappingURL=id.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/ajv/id.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"id.js","sourceRoot":"","sources":["../../../src/demo/ajv/id.tsx"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE;IAC1B,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,aAAoB;CACjC,CAAC,CAAC;AAEH,uBAAuB,MAAW,EAAE,IAAS;IACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACnC,UAAU,CAAC,GAAG,EAAE;YACZ,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM,EAAE;gBACpC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;aACxB;YACD,MAAM,CAAC,IAAK,GAAG,CAAC,eAAuB,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAQ,CAAC,CAAC,CAAC;QACrF,CAAC,EAAE,IAAI,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;AACP,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/dnd/checkbox.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | label: string; 3 | temps: { 4 | key: string; 5 | type: string; 6 | uiSchemas: string[]; 7 | schemaId: string; 8 | }[]; 9 | widget: { 10 | key: string; 11 | type: string; 12 | uiSchemas: string[]; 13 | schemaId: string; 14 | }; 15 | options: { 16 | temp: { 17 | div: { 18 | options: { 19 | className: string; 20 | }; 21 | }; 22 | }; 23 | widget: { 24 | checkbox: { 25 | options: { 26 | checked: boolean; 27 | }; 28 | }; 29 | }; 30 | }; 31 | }; 32 | export default _default; 33 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/dnd/checkbox.js: -------------------------------------------------------------------------------- 1 | export default { 2 | label: "CHECKBOX", 3 | temps: [{ 4 | key: "div", 5 | type: "temp", 6 | uiSchemas: ["className"], 7 | schemaId: "dnd-div", 8 | }], 9 | widget: { 10 | key: "checkbox", 11 | type: "widget", 12 | uiSchemas: ["*"], 13 | schemaId: "dnd-checkbox", 14 | }, 15 | options: { 16 | temp: { 17 | div: { 18 | options: { 19 | className: "ba pa3 ma1 b--dashed" 20 | } 21 | } 22 | }, 23 | widget: { 24 | checkbox: { 25 | options: { 26 | checked: false 27 | } 28 | } 29 | } 30 | } 31 | }; 32 | //# sourceMappingURL=checkbox.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/dnd/checkbox.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/demo/dnd/checkbox.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,KAAK,EAAE,UAAU;IAEjB,KAAK,EAAE,CAAC;YACJ,GAAG,EAAE,KAAK;YACV,IAAI,EAAE,MAAM;YACZ,SAAS,EAAE,CAAC,WAAW,CAAC;YACxB,QAAQ,EAAE,SAAS;SACtB,CAAC;IACF,MAAM,EAAE;QACJ,GAAG,EAAE,UAAU;QACf,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,CAAC,GAAG,CAAC;QAChB,QAAQ,EAAE,cAAc;KAC3B;IAED,OAAO,EAAE;QACL,IAAI,EAAE;YACF,GAAG,EAAE;gBACD,OAAO,EAAE;oBACL,SAAS,EAAE,sBAAsB;iBACpC;aACJ;SACJ;QACD,MAAM,EAAE;YACJ,QAAQ,EAAE;gBACN,OAAO,EAAE;oBACL,OAAO,EAAE,KAAK;iBACjB;aACJ;SACJ;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/dnd/div.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | label: string; 3 | temps: { 4 | key: string; 5 | type: string; 6 | uiSchemas: string[]; 7 | schemaId: string; 8 | }[]; 9 | options: { 10 | temp: { 11 | div: { 12 | options: { 13 | className: string; 14 | }; 15 | }; 16 | }; 17 | }; 18 | }; 19 | export default _default; 20 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/dnd/div.js: -------------------------------------------------------------------------------- 1 | export default { 2 | label: "DIV", 3 | temps: [{ 4 | key: "div", 5 | type: "temp", 6 | uiSchemas: ["className"], 7 | schemaId: "dnd-div", 8 | }], 9 | options: { 10 | temp: { 11 | div: { 12 | options: { 13 | className: "ba pa3 ma1 b--dashed" 14 | } 15 | } 16 | } 17 | } 18 | }; 19 | //# sourceMappingURL=div.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/dnd/div.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"div.js","sourceRoot":"","sources":["../../../src/demo/dnd/div.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,KAAK,EAAE,KAAK;IAEZ,KAAK,EAAE,CAAC;YACJ,GAAG,EAAE,KAAK;YACV,IAAI,EAAE,MAAM;YACZ,SAAS,EAAE,CAAC,WAAW,CAAC;YACxB,QAAQ,EAAE,SAAS;SACtB,CAAC;IAEF,OAAO,EAAE;QACL,IAAI,EAAE;YACF,GAAG,EAAE;gBACD,OAAO,EAAE;oBACL,SAAS,EAAE,sBAAsB;iBACpC;aACJ;SACJ;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/forms/design.d.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | declare let children: any; 3 | export declare class DesignForm extends React.PureComponent { 4 | render(): JSX.Element | null; 5 | } 6 | export { children }; 7 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/forms/edit.d.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | export default class Component extends React.PureComponent { 3 | constructor(props: any); 4 | render(): JSX.Element | null; 5 | } 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/forms/editform.d.ts: -------------------------------------------------------------------------------- 1 | import { SchemaFormProps } from "fx-schema-form-react/libs/libs/dec"; 2 | import React from "react"; 3 | export declare class DashboardTestComponent extends React.PureComponent { 4 | render(): JSX.Element | null; 5 | } 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/forms/normal.d.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | export declare class NormalForm extends React.PureComponent { 3 | render(): JSX.Element | null; 4 | } 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/forms/oneof.d.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | export declare class OneOfForm extends React.PureComponent { 3 | render(): JSX.Element | null; 4 | } 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/forms/tree.d.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | export declare class TreeForm extends React.PureComponent { 3 | render(): JSX.Element | null; 4 | } 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/index.d.ts: -------------------------------------------------------------------------------- 1 | import "antd/dist/antd.css"; 2 | import "react-perf-tool/lib/styles.css"; 3 | import "../"; 4 | import "json-schema-editor-visual/dist/main.css"; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/init.d.ts: -------------------------------------------------------------------------------- 1 | import ajv from "ajv"; 2 | export { globalOptions } from "./options/normal"; 3 | export { globalOptionsOfDesign, globalOptionsOfDesign1 } from "./options/design"; 4 | export { globalOptions as treeGlobalOptions } from "./options/tree"; 5 | export { globalOptions as designGlobalOptions } from "./options/oneof"; 6 | export declare const curAjv: ajv.Ajv; 7 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/options/design.d.ts: -------------------------------------------------------------------------------- 1 | export declare const globalOptionsOfDesign: any; 2 | export declare const globalOptionsOfDesign1: any; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/options/normal.d.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | export declare class ArrayComponent extends React.PureComponent { 4 | private addItem; 5 | private hideItems; 6 | constructor(props: DefaultProps & any); 7 | render(): JSX.Element; 8 | } 9 | export declare class ArrayItemComponent extends React.PureComponent { 10 | private removeItem; 11 | private moveTo; 12 | constructor(props: DefaultProps & any); 13 | render(): JSX.Element; 14 | } 15 | export declare const globalOptions: any; 16 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/options/oneof.d.ts: -------------------------------------------------------------------------------- 1 | export declare const globalOptions: any; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/options/tree.d.ts: -------------------------------------------------------------------------------- 1 | export declare const globalOptions: any; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/router.d.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | export declare class RouterComponent extends React.Component { 3 | render(): JSX.Element; 4 | } 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/common.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | $id: string; 4 | properties: { 5 | className: { 6 | type: string; 7 | title: string; 8 | description: string; 9 | }; 10 | style: { 11 | type: string; 12 | properties: { 13 | width: { 14 | type: string; 15 | title: string; 16 | }; 17 | height: { 18 | type: string; 19 | title: string; 20 | }; 21 | }; 22 | }; 23 | deg: { 24 | type: string; 25 | description: string; 26 | }; 27 | }; 28 | }; 29 | export default _default; 30 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/common.js: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-common", 4 | properties: { 5 | className: { 6 | type: "string", 7 | title: "类名称", 8 | description: "高度类:h-{10-100};宽度类:w-{10-100};边框类:ba b--dasbed b--solid;" 9 | }, 10 | style: { 11 | type: "object", 12 | properties: { 13 | width: { type: "string", title: "宽度" }, 14 | height: { type: "string", title: "高度" } 15 | } 16 | }, 17 | deg: { 18 | type: "string", 19 | description: "这里使用数据源中的数据,首先先得有数据源。输入$开启选择列表;格式为:{{$.test.dataCol}};也可以支持$sum,$count,$average,$max,$min等,格式为{{$min($.test_008.ORDER_COUNT_SUM)}}" 20 | } 21 | } 22 | }; 23 | //# sourceMappingURL=common.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/common.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/common.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,YAAY;IACjB,UAAU,EAAE;QACR,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,0DAA0D;SAC1E;QACD,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;gBACtC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;aAC1C;SACJ;QACD,GAAG,EAAE;YACD,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oIAAoI;SACpJ;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/design.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | $id: string; 4 | properties: { 5 | children: { 6 | type: string; 7 | items: { 8 | type: string; 9 | properties: { 10 | data: { 11 | type: string; 12 | }; 13 | children: { 14 | $ref: string; 15 | }; 16 | }; 17 | }; 18 | }; 19 | }; 20 | }; 21 | export default _default; 22 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/design.js: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "design", 4 | properties: { 5 | children: { 6 | type: "array", 7 | items: { 8 | type: "object", 9 | properties: { 10 | data: { 11 | type: "object", 12 | }, 13 | children: { 14 | $ref: "design#/properties/children" 15 | } 16 | } 17 | } 18 | } 19 | } 20 | }; 21 | //# sourceMappingURL=design.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/design.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"design.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/design.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,QAAQ;IACb,UAAU,EAAE;QACR,QAAQ,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,IAAI,EAAE;wBACF,IAAI,EAAE,QAAQ;qBACjB;oBACD,QAAQ,EAAE;wBACN,IAAI,EAAE,6BAA6B;qBACtC;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/div.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | $id: string; 4 | properties: { 5 | className: { 6 | type: string; 7 | }; 8 | position: { 9 | type: string; 10 | properties: { 11 | x: { 12 | type: string; 13 | }; 14 | y: { 15 | type: string; 16 | }; 17 | }; 18 | }; 19 | size: { 20 | type: string; 21 | properties: { 22 | width: { 23 | type: string; 24 | }; 25 | height: { 26 | type: string; 27 | }; 28 | }; 29 | }; 30 | }; 31 | }; 32 | export default _default; 33 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/div.js: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-div", 4 | properties: { 5 | className: { 6 | type: "string" 7 | }, 8 | position: { 9 | type: "object", 10 | properties: { 11 | x: { type: "number" }, 12 | y: { type: "number" } 13 | } 14 | }, 15 | size: { 16 | type: "object", 17 | properties: { 18 | width: { type: "number" }, 19 | height: { type: "number" } 20 | } 21 | } 22 | } 23 | }; 24 | //# sourceMappingURL=div.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/div.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"div.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/div.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,SAAS;IACd,UAAU,EAAE;QACR,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;SACjB;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACrB,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aACxB;SACJ;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC7B;SACJ;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/dnd.checkbox.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | $id: string; 3 | type: string; 4 | properties: { 5 | checked: { 6 | type: string; 7 | }; 8 | title: { 9 | type: string; 10 | }; 11 | }; 12 | }; 13 | export default _default; 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/dnd.checkbox.js: -------------------------------------------------------------------------------- 1 | export default { 2 | $id: "dnd-checkbox", 3 | type: "object", 4 | properties: { 5 | checked: { 6 | type: "boolean" 7 | }, 8 | title: { 9 | type: "string" 10 | } 11 | } 12 | }; 13 | //# sourceMappingURL=dnd.checkbox.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/dnd.checkbox.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dnd.checkbox.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/dnd.checkbox.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,GAAG,EAAE,cAAc;IACnB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;SAClB;QACD,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;SACjB;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/dnd.div.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | $id: string; 3 | type: string; 4 | properties: { 5 | className: { 6 | type: string; 7 | }; 8 | style: { 9 | type: string; 10 | properties: { 11 | position: { 12 | type: string; 13 | enum: string[]; 14 | }; 15 | }; 16 | }; 17 | }; 18 | }; 19 | export default _default; 20 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/dnd.div.js: -------------------------------------------------------------------------------- 1 | export default { 2 | $id: "dnd-div", 3 | type: "object", 4 | properties: { 5 | className: { 6 | type: "string" 7 | }, 8 | style: { 9 | type: "object", 10 | properties: { 11 | position: { 12 | type: "string", 13 | enum: ["static", "fixed", "relative", "absolute"] 14 | } 15 | } 16 | } 17 | } 18 | }; 19 | //# sourceMappingURL=dnd.div.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/dnd.div.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dnd.div.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/dnd.div.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;SACjB;QACD,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,QAAQ,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;iBACpD;aACJ;SACJ;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.areastyle.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | $id: string; 4 | default: {}; 5 | properties: { 6 | color: { 7 | type: string; 8 | default: string; 9 | title: string; 10 | }; 11 | type: { 12 | type: string; 13 | default: string; 14 | title: string; 15 | }; 16 | }; 17 | }; 18 | export default _default; 19 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.areastyle.js: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-echart-areastyle", 4 | default: {}, 5 | properties: { 6 | color: { type: "string", default: "#ccc", title: "颜色" }, 7 | type: { 8 | type: "string", 9 | default: "default", 10 | title: "填充样式,目前仅支持'default'(实填充)" 11 | } 12 | } 13 | }; 14 | //# sourceMappingURL=echart.areastyle.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.areastyle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"echart.areastyle.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/echart.areastyle.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,sBAAsB;IAC3B,OAAO,EAAE,EAAE;IACX,UAAU,EAAE;QACR,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;QACvD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE,0BAA0B;SACpC;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | $id: string; 4 | title: string; 5 | default: {}; 6 | properties: { 7 | timeline: { 8 | $ref: string; 9 | }; 10 | title: { 11 | $ref: string; 12 | }; 13 | toolbox: { 14 | $ref: string; 15 | }; 16 | tooltip: { 17 | $ref: string; 18 | }; 19 | legend: { 20 | $ref: string; 21 | }; 22 | series: { 23 | type: string; 24 | default: never[]; 25 | $ref: string; 26 | }; 27 | xAxis: { 28 | type: string; 29 | default: never[]; 30 | $ref: string; 31 | }; 32 | yAxis: { 33 | type: string; 34 | default: never[]; 35 | $ref: string; 36 | }; 37 | }; 38 | }; 39 | export default _default; 40 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.itemstyle.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | $id: string; 4 | default: {}; 5 | properties: { 6 | color: { 7 | type: string; 8 | default: string; 9 | title: string; 10 | }; 11 | lineStyle: { 12 | $ref: string; 13 | }; 14 | areaStyle: { 15 | $ref: string; 16 | }; 17 | borderColor: { 18 | type: string; 19 | title: string; 20 | }; 21 | }; 22 | }; 23 | export default _default; 24 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.itemstyle.js: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-echart-itemstyle", 4 | default: {}, 5 | properties: { 6 | color: { 7 | type: "string", 8 | default: "#ccc", 9 | title: "颜色" 10 | }, 11 | lineStyle: { 12 | $ref: "dnd-echart-linestyle#" 13 | }, 14 | areaStyle: { 15 | $ref: "dnd-echart-areastyle#" 16 | }, 17 | borderColor: { 18 | type: "string", 19 | title: "边框颜色" 20 | } 21 | } 22 | }; 23 | //# sourceMappingURL=echart.itemstyle.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.itemstyle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"echart.itemstyle.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/echart.itemstyle.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,sBAAsB;IAC3B,OAAO,EAAE,EAAE;IACX,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,IAAI;SACd;QACD,SAAS,EAAE;YACP,IAAI,EAAE,uBAAuB;SAChC;QACD,SAAS,EAAE;YACP,IAAI,EAAE,uBAAuB;SAChC;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAM;SAChB;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.js: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-echart", 4 | title: "echarts参数设置", 5 | default: {}, 6 | properties: { 7 | timeline: { 8 | $ref: "dnd-echart-timeline#", 9 | }, 10 | title: { 11 | $ref: "dnd-echart-title#", 12 | }, 13 | toolbox: { 14 | $ref: "dnd-echart-toolbox#", 15 | }, 16 | tooltip: { 17 | $ref: "dnd-echart-tooltip#", 18 | }, 19 | legend: { 20 | $ref: "dnd-echart-legend#", 21 | }, 22 | series: { 23 | type: "array", 24 | default: [], 25 | $ref: "dnd-echart-series#" 26 | }, 27 | xAxis: { 28 | type: "array", 29 | default: [], 30 | $ref: "dnd-echart-axis#" 31 | }, 32 | yAxis: { 33 | type: "array", 34 | default: [], 35 | $ref: "dnd-echart-axis#" 36 | } 37 | } 38 | }; 39 | //# sourceMappingURL=echart.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"echart.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/echart.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,YAAY;IACjB,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,EAAE;IACX,UAAU,EAAE;QACR,QAAQ,EAAE;YACN,IAAI,EAAE,sBAAsB;SAC/B;QACD,KAAK,EAAE;YACH,IAAI,EAAE,mBAAmB;SAC5B;QACD,OAAO,EAAE;YACL,IAAI,EAAE,qBAAqB;SAC9B;QACD,OAAO,EAAE;YACL,IAAI,EAAE,qBAAqB;SAC9B;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,oBAAoB;SAC7B;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,oBAAoB;SAC7B;QACD,KAAK,EAAE;YACH,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,kBAAkB;SAC3B;QACD,KAAK,EAAE;YACH,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,kBAAkB;SAC3B;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart.linestyle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"echart.linestyle.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/echart.linestyle.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,sBAAsB;IAC3B,OAAO,EAAC,EAAE;IACV,UAAU,EAAE;QACR,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;QACvD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC;YACtD,KAAK,EAAE,mEAAmE;SAC7E;QACD,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,IAAI;SACd;QACD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;QAC7D,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,0BAA0B;SACpC;QACD,aAAa,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,+BAA+B;SACzC;QACD,aAAa,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,+BAA+B;SACzC;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart1.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | $id: string; 3 | type: string; 4 | properties: { 5 | className: { 6 | type: string; 7 | }; 8 | notMerge: { 9 | type: string; 10 | }; 11 | lazyUpdate: { 12 | type: string; 13 | }; 14 | theme: { 15 | type: string; 16 | }; 17 | option: { 18 | type: string; 19 | $ref: string; 20 | }; 21 | }; 22 | }; 23 | export default _default; 24 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart1.js: -------------------------------------------------------------------------------- 1 | export default { 2 | $id: "dnd-echart1", 3 | type: "object", 4 | properties: { 5 | className: { type: "string" }, 6 | notMerge: { 7 | type: "boolean" 8 | }, 9 | lazyUpdate: { 10 | type: "boolean" 11 | }, 12 | theme: { type: "string" }, 13 | option: { 14 | type: "object", 15 | $ref: "dnd-echart#" 16 | } 17 | } 18 | }; 19 | //# sourceMappingURL=echart1.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart1.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"echart1.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/echart1.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,GAAG,EAAE,aAAa;IAClB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,QAAQ,EAAE;YACN,IAAI,EAAE,SAAS;SAClB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;SAClB;QACD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,aAAa;SACtB;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/echart2.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"echart2.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/echart2.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,GAAG,EAAE,aAAa;IAClB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,QAAQ,EAAE;YACN,IAAI,EAAE,SAAS;SAClB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;SAClB;QACD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,UAAU,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,aAAa;iBACtB;gBACD,OAAO,EAAE;oBACL,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACH,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,aAAa;qBACtB;iBACJ;gBACD,UAAU,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,YAAY;oBACnB,WAAW,EAAE,oBAAoB;iBACpC;aACJ;SAEJ;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/oneof.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"oneof.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/oneof.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,WAAW;IAChB,KAAK,EAAE,eAAe;IACtB,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YAClB,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,4BAA4B;SAC5C;QACD,KAAK,EAAE;YACH,KAAK,EAAE,CAAC;oBACJ,GAAG,EAAE,kBAAkB;oBACvB,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,UAAU;iBACpB,EAAE;oBACC,GAAG,EAAE,mBAAmB;oBACxB,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,WAAW;iBACrB,EAAE;oBACC,GAAG,EAAE,mBAAmB;oBACxB,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,YAAY;iBACtB,EAAE;oBACC,GAAG,EAAE,kBAAkB;oBACvB,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,cAAc;oBACrB,OAAO,EAAE,EACR;oBACD,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;oBACpB,UAAU,EAAE;wBACR,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE;wBACtC,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;qBACxC;iBACJ,CAAC;SACL;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/row.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | $id: string; 4 | properties: { 5 | className: { 6 | $ref: string; 7 | }; 8 | style: { 9 | type: string; 10 | $ref: string; 11 | }; 12 | }; 13 | }; 14 | export default _default; 15 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/row.js: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-row", 4 | properties: { 5 | className: { 6 | $ref: "dnd-common#/properties/className" 7 | }, 8 | style: { 9 | type: "object", 10 | $ref: "dnd-common#/properties/style" 11 | } 12 | } 13 | }; 14 | //# sourceMappingURL=row.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/row.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"row.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/row.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,SAAS;IACd,UAAU,EAAE;QACR,SAAS,EAAE;YACP,IAAI,EAAE,kCAAkC;SAC3C;QACD,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,8BAA8B;SACvC;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/style.js: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-style", 4 | required: ["textAlign", "width"], 5 | properties: { 6 | width: { type: "number", title: "宽度", default: 100 }, 7 | height: { type: "number", equal: "width", title: "高度", description: "高必须和宽一致" }, 8 | fontSize: { type: "number" }, 9 | url: { type: "string", format: "url" }, 10 | email: { type: "string", format: "email" }, 11 | isEighteen: { type: "boolean", title: "已满18岁" }, 12 | ids: { 13 | type: "array", 14 | description: "拖动元素试试", 15 | items: { 16 | title: "测试ID", 17 | type: "string", 18 | format: "uuid" 19 | } 20 | }, 21 | textAlign: { 22 | type: "string", 23 | enum: ["left", "right", "center"], 24 | description: "Note: 只能是left,right,center中的一个。" 25 | } 26 | } 27 | }; 28 | //# sourceMappingURL=style.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/style.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/style.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,WAAW;IAChB,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;IAChC,UAAU,EAAE;QACR,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE;QACpD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE;QAC/E,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC5B,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE;QACtC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE;QAC1C,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE;QAC/C,GAAG,EAAE;YACD,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,QAAQ;YACrB,KAAK,EAAE;gBACH,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,MAAM;aACjB;SACJ;QACD,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;YACjC,WAAW,EAAE,iCAAiC;SACjD;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/tree.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | type: string; 3 | $id: string; 4 | title: string; 5 | properties: { 6 | root: { 7 | type: string; 8 | properties: { 9 | value: { 10 | type: string; 11 | }; 12 | leftNode: { 13 | $ref: string; 14 | }; 15 | rightNode: { 16 | $ref: string; 17 | }; 18 | }; 19 | }; 20 | }; 21 | }; 22 | export default _default; 23 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/tree.js: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-tree", 4 | title: "二叉树结构", 5 | properties: { 6 | root: { 7 | type: "object", 8 | properties: { 9 | value: { 10 | type: "string" 11 | }, 12 | leftNode: { 13 | $ref: "dnd-tree#/properties/root" 14 | }, 15 | rightNode: { 16 | $ref: "dnd-tree#/properties/root" 17 | } 18 | } 19 | } 20 | } 21 | }; 22 | //# sourceMappingURL=tree.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/schemas/dnd/tree.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../../src/demo/schemas/dnd/tree.tsx"],"names":[],"mappings":"AAAA,eAAe;IACX,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,OAAO;IACd,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE;oBACN,IAAI,EAAE,2BAA2B;iBACpC;gBACD,SAAS,EAAE;oBACP,IAAI,EAAE,2BAA2B;iBACpC;aACJ;SACJ;KACJ;CACJ,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/card.d.ts: -------------------------------------------------------------------------------- 1 | import { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { ArrayHocOutProps } from "fx-schema-form-react/libs/hocs/array"; 5 | export interface AntdCardTempProps extends DefaultProps, UtilsHocOutProps, ArrayHocOutProps { 6 | tempKey: string; 7 | } 8 | export declare class AntdCardTemp extends PureComponent { 9 | render(): JSX.Element; 10 | } 11 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/card.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | import Card from "antd/lib/card"; 3 | export class AntdCardTemp extends PureComponent { 4 | render() { 5 | const { children, tempKey, getOptions, getTitle, initArrayComponent, formItemMeta, uiSchema, arrayLevel } = this.props; 6 | const tempOptions = getOptions(this.props, "temp", tempKey); 7 | let { isValid = true, errorText = "", collapsing = false, isLoading = false } = formItemMeta ? formItemMeta.toJS() : {}; 8 | return (React.createElement(Card, Object.assign({ title: getTitle(this.props).toString(), loading: isLoading }, tempOptions.options, { extra: initArrayComponent ? initArrayComponent(this.props) : null }), 9 | collapsing ? React.createElement("span", null, "\u6298\u53E0\u4E2D") : children, 10 | isValid ? null : errorText)); 11 | } 12 | } 13 | //# sourceMappingURL=card.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/card.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/demo/templates/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,IAAI,MAAM,eAAe,CAAC;AAUjC,MAAM,mBAAoB,SAAQ,aAAqC;IAC5D,MAAM;QACT,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,kBAAkB,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACvH,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5D,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,UAAU,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAExH,OAAO,CACH,oBAAC,IAAI,kBAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EACxC,OAAO,EAAE,SAAS,IACd,WAAW,CAAC,OAAO,IACvB,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;YAChE,UAAU,CAAC,CAAC,CAAC,uDAAgB,CAAC,CAAC,CAAC,QAAQ;YACxC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CACxB,CACV,CAAC;IACN,CAAC;CACJ"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/div.d.ts: -------------------------------------------------------------------------------- 1 | import { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { ArrayHocOutProps } from "fx-schema-form-react/libs/hocs/array"; 5 | export interface Props extends DefaultProps, UtilsHocOutProps, ArrayHocOutProps { 6 | tempKey: string; 7 | } 8 | export declare class DivTemp extends PureComponent { 9 | render(): JSX.Element; 10 | } 11 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/div.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | export class DivTemp extends PureComponent { 3 | render() { 4 | const { children, tempKey, getOptions, getTitle, initArrayComponent, formItemMeta } = this.props; 5 | const tempOptions = getOptions(this.props, "temp", tempKey, formItemMeta ? formItemMeta.getIn(["options", "temp", tempKey]) : {}); 6 | return (React.createElement("div", Object.assign({}, tempOptions.options), children)); 7 | } 8 | } 9 | //# sourceMappingURL=div.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/div.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"div.js","sourceRoot":"","sources":["../../../src/demo/templates/div.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAW7C,MAAM,cAAe,SAAQ,aAAyB;IAC3C,MAAM;QACT,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,kBAAkB,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACjG,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EACtD,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAE1E,OAAO,CACH,6CAAS,WAAW,CAAC,OAAO,GACvB,QAAQ,CACP,CACT,CAAC;IACN,CAAC;CACJ"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/formitem.d.ts: -------------------------------------------------------------------------------- 1 | import { PureComponent } from "react"; 2 | import { ArrayHocOutProps } from "fx-schema-form-react/libs/hocs/array"; 3 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 4 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 5 | export interface AntdFormItemTempProps extends DefaultProps, UtilsHocOutProps, ArrayHocOutProps { 6 | tempKey: string; 7 | } 8 | export declare class AntdFormItemTemp extends PureComponent { 9 | render(): JSX.Element; 10 | } 11 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/index.d.ts: -------------------------------------------------------------------------------- 1 | export { NoneTemp } from "./none"; 2 | export { AntdCardTemp } from "./card"; 3 | export { AntdFormItemTemp } from "./formitem"; 4 | export { DivTemp } from "./div"; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/index.js: -------------------------------------------------------------------------------- 1 | export { NoneTemp } from "./none"; 2 | export { AntdCardTemp } from "./card"; 3 | export { AntdFormItemTemp } from "./formitem"; 4 | export { DivTemp } from "./div"; 5 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/demo/templates/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/none.d.ts: -------------------------------------------------------------------------------- 1 | import { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | export interface DivTempProps extends DefaultProps, UtilsHocOutProps { 5 | tempKey: string; 6 | } 7 | export declare class NoneTemp extends PureComponent { 8 | render(): any; 9 | } 10 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/none.js: -------------------------------------------------------------------------------- 1 | var __rest = (this && this.__rest) || function (s, e) { 2 | var t = {}; 3 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) 4 | t[p] = s[p]; 5 | if (s != null && typeof Object.getOwnPropertySymbols === "function") 6 | for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) 7 | t[p[i]] = s[p[i]]; 8 | return t; 9 | }; 10 | import React, { PureComponent } from "react"; 11 | export class NoneTemp extends PureComponent { 12 | render() { 13 | const { children, tempKey, getOptions } = this.props; 14 | const _a = getOptions(this.props, "temp", tempKey), { className } = _a, tempOptions = __rest(_a, ["className"]); 15 | return React.createElement("div", null, children); 16 | } 17 | } 18 | //# sourceMappingURL=none.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/templates/none.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"none.js","sourceRoot":"","sources":["../../../src/demo/templates/none.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQ7C,MAAM,eAAgB,SAAQ,aAAgC;IACnD,MAAM;QACT,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACrD,MAAM,4CAA8E,EAA9E,EAAE,SAAS,OAAmE,EAAjE,uCAAiE,CAAC;QAErF,OAAO,iCACF,QAAQ,CACP,CAAC;IACX,CAAC;CACJ"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/widgets/checkbox.d.ts: -------------------------------------------------------------------------------- 1 | import { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 5 | export interface AntdCheckBoxProps extends DefaultProps, UtilsHocOutProps, ValidateHocOutProps { 6 | } 7 | export declare class AntdCheckboxWidget extends PureComponent { 8 | private setDefaultProps; 9 | render(): JSX.Element; 10 | } 11 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/widgets/index.d.ts: -------------------------------------------------------------------------------- 1 | export { AntdCheckboxWidget } from "./checkbox"; 2 | export { AntdInputWidget } from "./input"; 3 | export { AntdInputNumberWidget } from "./number"; 4 | export { AntdSelectWidget } from "./select"; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/widgets/index.js: -------------------------------------------------------------------------------- 1 | export { AntdCheckboxWidget } from "./checkbox"; 2 | export { AntdInputWidget } from "./input"; 3 | export { AntdInputNumberWidget } from "./number"; 4 | export { AntdSelectWidget } from "./select"; 5 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/widgets/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/demo/widgets/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/widgets/input.d.ts: -------------------------------------------------------------------------------- 1 | import { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 5 | export interface AntdInputWidgetProps extends DefaultProps, UtilsHocOutProps, ValidateHocOutProps { 6 | } 7 | export declare class AntdInputWidget extends PureComponent { 8 | private _count; 9 | private setDefaultProps; 10 | render(): JSX.Element; 11 | } 12 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/widgets/number.d.ts: -------------------------------------------------------------------------------- 1 | import { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 5 | export interface AntdInputWidgetProps extends DefaultProps, UtilsHocOutProps, ValidateHocOutProps { 6 | } 7 | export declare class AntdInputNumberWidget extends PureComponent { 8 | private _count; 9 | private setDefaultProps; 10 | render(): JSX.Element; 11 | } 12 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/demo/widgets/select.d.ts: -------------------------------------------------------------------------------- 1 | import { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 5 | export interface AntdInputWidgetProps extends DefaultProps, UtilsHocOutProps, ValidateHocOutProps { 6 | } 7 | export declare class AntdSelectWidget extends PureComponent { 8 | private setDefaultProps; 9 | render(): JSX.Element; 10 | } 11 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/fields/design.d.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 5 | export interface DesignFieldProps extends DefaultProps, UtilsHocOutProps, ValidateHocOutProps { 6 | } 7 | export declare const name = "design"; 8 | export declare class DesignField extends React.PureComponent { 9 | private SchemaFormWithHoc; 10 | private SchemaFormItemWithHoc; 11 | constructor(props: DesignFieldProps, context: any); 12 | private initComponent; 13 | private renderItem; 14 | render(): any; 15 | } 16 | declare const _default: { 17 | [name]: typeof DesignField; 18 | }; 19 | export default _default; 20 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/fields/index.d.ts: -------------------------------------------------------------------------------- 1 | export declare const fields: any[]; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/fields/index.js: -------------------------------------------------------------------------------- 1 | import designField from "./design"; 2 | import treeField from "./tree"; 3 | export const fields = [designField, treeField]; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/fields/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fields/index.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,UAAU,CAAC;AACnC,OAAO,SAAS,MAAM,QAAQ,CAAC;AAE/B,MAAM,CAAC,MAAM,MAAM,GAAU,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/fields/tree.d.ts: -------------------------------------------------------------------------------- 1 | import { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | export interface ObjectFieldProps extends DefaultProps, UtilsHocOutProps { 5 | } 6 | export declare const name = "tree"; 7 | export declare class TreeField extends PureComponent { 8 | render(): JSX.Element | null; 9 | } 10 | declare const _default: { 11 | [name]: typeof TreeField; 12 | }; 13 | export default _default; 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/changed.d.ts: -------------------------------------------------------------------------------- 1 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 2 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 3 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 4 | import { BaseFactory } from "fx-schema-form-core"; 5 | import { ConditionHocOutProps, ConditionHocSettings } from "./condition"; 6 | export interface Props extends DefaultProps, UtilsHocOutProps, ValidateHocOutProps, ConditionHocOutProps { 7 | } 8 | export declare const name = "changed"; 9 | export interface ChangedSettings { 10 | paths?: string[]; 11 | onChanged?: (props: DefaultProps, data: any) => void; 12 | condition?: ConditionHocSettings; 13 | } 14 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: ChangedSettings) => any; 15 | declare const _default: { 16 | name: string; 17 | hoc: (hocFactory: BaseFactory) => (settings?: ChangedSettings) => any; 18 | }; 19 | export default _default; 20 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/datatometa.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { RC } from "fx-schema-form-react/libs/models"; 5 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 6 | import { TreeMap } from "fx-schema-form-react/libs/libs/tree"; 7 | export interface Props extends DefaultProps, UtilsHocOutProps, ValidateHocOutProps { 8 | formItemNode?: TreeMap; 9 | } 10 | export declare const name = "dataToMeta"; 11 | export declare const hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 12 | declare const _default: { 13 | name: string; 14 | hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 15 | }; 16 | export default _default; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/form.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { ConditionHocOutProps } from "./condition"; 3 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 4 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 5 | import { RC } from "fx-schema-form-react/libs/models/index"; 6 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 7 | import { TreeMap } from "fx-schema-form-react/libs/libs/tree"; 8 | export interface Props extends DefaultProps, UtilsHocOutProps, ConditionHocOutProps, ValidateHocOutProps { 9 | formItemNode: TreeMap; 10 | } 11 | export declare const name = "extraForm"; 12 | export declare const hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 13 | declare const _default: { 14 | name: string; 15 | hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 16 | }; 17 | export default _default; 18 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/format.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { RC } from "fx-schema-form-react/libs/models/index"; 5 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 6 | export interface Props extends DefaultProps, UtilsHocOutProps, ValidateHocOutProps { 7 | } 8 | export declare const name = "format"; 9 | export declare const hoc: (_hocFactory: BaseFactory) => () => (Component: any) => RC; 10 | declare const _default: { 11 | name: string; 12 | hoc: (_hocFactory: BaseFactory) => () => (Component: any) => RC; 13 | }; 14 | export default _default; 15 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/format.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/hocs/format.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC;AAKnD,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC;AAS7B,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,WAA6B,EAAE,EAAE;IACjD,OAAO,GAAG,EAAE;QACR,OAAO,CAAC,SAAc,EAAkB,EAAE;YACtC,kBAAmB,SAAQ,KAAK,CAAC,aAAyB;gBAI/C,MAAM;oBACT,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,EACvC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,QAAsB,EAC3C,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;oBACnE,IAAI,WAAW,GAAG,QAAQ,CAAC;oBAI3B,IAAI,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE;wBACzC,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;qBAC5E;oBAED,OAAO,oBAAC,SAAS,oBAAK,IAAI,CAAC,KAAK,IAAE,QAAQ,EAAE,WAAW,IAAI,CAAC;gBAChE,CAAC;aACJ;YAED,OAAO,YAAmB,CAAC;QAC/B,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,eAAe;IACX,IAAI;IACJ,GAAG;CACN,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/index.d.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { BaseFactory } from "fx-schema-form-core"; 3 | export declare const hocs: Array<{ 4 | name: string; 5 | hoc: (hocFactory: BaseFactory) => any; 6 | }>; 7 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/index.js: -------------------------------------------------------------------------------- 1 | import conditionHoc from "./condition"; 2 | import resetKeyHoc from "./resetkey"; 3 | import oneOfHoc from "./oneof"; 4 | import showHoc from "./show"; 5 | import tempHoc from "./temp"; 6 | import formHoc from "./form"; 7 | import widgetHoc from "./widget"; 8 | import dataToMetaHoc from "./datatometa"; 9 | import formatHoc from "./format"; 10 | import wrapperHoc from "./wrapper"; 11 | import changedHoc from "./changed"; 12 | import copyToMetaHoc from "./copytometa"; 13 | export const hocs = [conditionHoc, resetKeyHoc, oneOfHoc, showHoc, tempHoc, formHoc, widgetHoc, dataToMetaHoc, wrapperHoc, formatHoc, changedHoc, copyToMetaHoc]; 14 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hocs/index.tsx"],"names":[],"mappings":"AAGA,OAAO,YAAY,MAAM,aAAa,CAAC;AACvC,OAAO,WAAW,MAAM,YAAY,CAAC;AACrC,OAAO,QAAQ,MAAM,SAAS,CAAC;AAC/B,OAAO,OAAO,MAAM,QAAQ,CAAC;AAC7B,OAAO,OAAO,MAAM,QAAQ,CAAC;AAC7B,OAAO,OAAO,MAAM,QAAQ,CAAC;AAC7B,OAAO,SAAS,MAAM,UAAU,CAAC;AACjC,OAAO,aAAa,MAAM,cAAc,CAAC;AACzC,OAAO,SAAS,MAAM,UAAU,CAAC;AACjC,OAAO,UAAU,MAAM,WAAW,CAAC;AACnC,OAAO,UAAU,MAAM,WAAW,CAAC;AACnC,OAAO,aAAa,MAAM,cAAc,CAAC;AAEzC,MAAM,CAAC,MAAM,IAAI,GACb,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/resetkey.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { RC } from "fx-schema-form-react/libs/models"; 5 | export interface Props extends DefaultProps, UtilsHocOutProps { 6 | } 7 | export interface ResetKeysHocOutSettings { 8 | excludeKeys: string[]; 9 | includeKeys: string[]; 10 | } 11 | export declare const name = "resetKey"; 12 | export declare const hoc: (_hocFactory: BaseFactory) => (settings?: ResetKeysHocOutSettings) => (Component: any) => RC; 13 | declare const _default: { 14 | name: string; 15 | hoc: (_hocFactory: BaseFactory) => (settings?: ResetKeysHocOutSettings) => (Component: any) => RC; 16 | }; 17 | export default _default; 18 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/resetkey.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Immutable from "immutable"; 3 | import schemaFormReact from "fx-schema-form-react"; 4 | const { schemaFormTypes } = schemaFormReact; 5 | export const name = "resetKey"; 6 | export const hoc = (_hocFactory) => { 7 | return (settings = { excludeKeys: [], includeKeys: [] }) => { 8 | return (Component) => { 9 | class ComponentHoc extends React.PureComponent { 10 | render() { 11 | const { getOptions, getRequiredKeys } = this.props, normalOptions = getOptions(this.props, schemaFormTypes.hoc, name, Immutable.fromJS(settings || {})), extraProps = getRequiredKeys(this.props, normalOptions.includeKeys, normalOptions.excludeKeys); 12 | return React.createElement(Component, Object.assign({}, extraProps)); 13 | } 14 | } 15 | return ComponentHoc; 16 | }; 17 | }; 18 | }; 19 | export default { 20 | name, 21 | hoc 22 | }; 23 | //# sourceMappingURL=resetkey.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/resetkey.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"resetkey.js","sourceRoot":"","sources":["../../src/hocs/resetkey.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,WAAW,CAAC;AAMlC,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAEnD,MAAM,EAAE,eAAe,EAAE,GAAG,eAAe,CAAC;AAQ5C,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC;AAW/B,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,WAA6B,EAAE,EAAE;IACjD,OAAO,CAAC,WAAoC,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE;QAChF,OAAO,CAAC,SAAc,EAAkB,EAAE;YACtC,kBAAmB,SAAQ,KAAK,CAAC,aAAyB;gBAC/C,MAAM;oBACT,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,KAAK,EAC9C,aAAa,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,EACnG,UAAU,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;oBAEnG,OAAO,oBAAC,SAAS,oBAAK,UAAU,EAAI,CAAC;gBACzC,CAAC;aACJ;YAED,OAAO,YAAmB,CAAC;QAC/B,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,eAAe;IACX,IAAI;IACJ,GAAG;CACN,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/show.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { ConditionHocOutProps, ConditionHocSettings } from "./condition"; 5 | export interface Props extends DefaultProps, ConditionHocOutProps, UtilsHocOutProps { 6 | } 7 | export interface ShowHideHocOutSettings { 8 | paths?: string[]; 9 | renderNothing?: boolean; 10 | condition?: ConditionHocSettings; 11 | } 12 | export declare const name = "show"; 13 | export declare const hoc: (hocFactory: BaseFactory) => (_settings?: ShowHideHocOutSettings) => any; 14 | declare const _default: { 15 | name: string; 16 | hoc: (hocFactory: BaseFactory) => (_settings?: ShowHideHocOutSettings) => any; 17 | }; 18 | export default _default; 19 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/show.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"show.js","sourceRoot":"","sources":["../../src/hocs/show.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAmB1B,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC;AAW3B,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,UAA4B,EAAE,EAAE;IAChD,OAAO,CAAC,YAAoC,EAAE,EAAE,EAAE;QAC9C,MAAM,QAAQ,GAAG,CAAC,SAAc,EAAkB,EAAE;YAChD,kBAAmB,SAAQ,KAAK,CAAC,aAAyB;gBAO/C,MAAM;oBACT,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;oBAC3C,IAAI,IAAI,GAAG,IAAI,CAAC;oBAEhB,IAAI,SAAS,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE;wBACxC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,GAAQ,EAAE,EAAE;4BAC/B,OAAO,CAAC,CAAC,GAAG,CAAC;wBACjB,CAAC,CAAC,CAAC;qBACN;oBAgCD,IAAI,IAAI,EAAE;wBACN,OAAO,oBAAC,SAAS,oBAAK,IAAI,CAAC,KAAK,EAAI,CAAC;qBACxC;oBAED,OAAO,IAAI,CAAC;gBAChB,CAAC;aACJ;YAED,OAAO,YAAmB,CAAC;QAC/B,CAAC,CAAC;QAEF,OAAO,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC7B,GAAG,EAAE,QAAQ;YACb,OAAO,EAAE,IAAI;SAChB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,eAAe;IACX,IAAI;IACJ,GAAG;CACN,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/temp.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { RC } from "fx-schema-form-react/libs/models"; 3 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 4 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 5 | import { ThemeHocOutProps } from "fx-schema-form-react/libs/hocs/theme"; 6 | import { TreeMap } from "fx-schema-form-react/libs/libs/tree"; 7 | export interface Props extends DefaultProps, ThemeHocOutProps, UtilsHocOutProps { 8 | formItemNode?: TreeMap; 9 | } 10 | export declare const name = "extraTemp"; 11 | export declare const hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 12 | declare const _default: { 13 | name: string; 14 | hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 15 | }; 16 | export default _default; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/widget.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { RC } from "fx-schema-form-react/libs/models"; 3 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 4 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 5 | import { ThemeHocOutProps } from "fx-schema-form-react/libs/hocs/theme"; 6 | import { TreeMap } from "fx-schema-form-react/libs/libs/tree"; 7 | export interface Props extends DefaultProps, ThemeHocOutProps, UtilsHocOutProps { 8 | formItemNode?: TreeMap; 9 | } 10 | export declare const name = "extraWidget"; 11 | export declare const hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 12 | declare const _default: { 13 | name: string; 14 | hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 15 | }; 16 | export default _default; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/hocs/wrapper.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import { RC } from "fx-schema-form-react/libs/models"; 5 | import { ValidateHocOutProps } from "fx-schema-form-react/libs/hocs/validate"; 6 | import { ConditionHocOutProps, ConditionHocSettings } from "./condition"; 7 | export interface Props extends DefaultProps, UtilsHocOutProps, ValidateHocOutProps, ConditionHocOutProps { 8 | } 9 | export declare const name = "wrapper"; 10 | export interface WrapperHocSettings { 11 | condition?: ConditionHocSettings; 12 | hoc?: any; 13 | hocName?: string; 14 | } 15 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: WrapperHocSettings) => (Component: any) => RC; 16 | declare const _default: { 17 | name: string; 18 | hoc: (hocFactory: BaseFactory) => (settings?: WrapperHocSettings) => (Component: any) => RC; 19 | }; 20 | export default _default; 21 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/index.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/index.js: -------------------------------------------------------------------------------- 1 | import schemaFormReact from "fx-schema-form-react"; 2 | import { fields } from "./fields"; 3 | import { hocs } from "./hocs"; 4 | const { hocFactory, defaultTheme } = schemaFormReact; 5 | hocs.forEach((hoc) => { 6 | hocFactory.add(hoc.name, hoc.hoc(hocFactory)); 7 | }); 8 | fields.forEach((field) => { 9 | for (const key in field) { 10 | if (field.hasOwnProperty(key)) { 11 | defaultTheme.fieldFactory.add(key, field[key]); 12 | } 13 | } 14 | }); 15 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/libs/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,eAAe,CAAC;AAErD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAiE,EAAE,EAAE;IAC/E,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,CAAC,CAAC,KAAU,EAAE,EAAE;IAC1B,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACrB,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC3B,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;SAClD;KACJ;AACL,CAAC,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/ajv/id.tsx: -------------------------------------------------------------------------------- 1 | import ajv from "ajv"; 2 | 3 | import { curAjv } from "../init"; 4 | 5 | curAjv.addKeyword("idExists", { 6 | async: true, 7 | type: "string", 8 | validate: checkIdExists as any 9 | }); 10 | 11 | function checkIdExists(schema: any, data: any) { 12 | return new Promise((resolve, reject) => { 13 | setTimeout(() => { 14 | if (data === "nick" || data === "nora") { 15 | return resolve(true); 16 | } 17 | reject(new (ajv.ValidationError as any)([{ message: "idExists不是nick" }] as any)); 18 | }, 2000); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/dnd/checkbox.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | label: "CHECKBOX", 3 | 4 | temps: [{ 5 | key: "div", 6 | type: "temp", 7 | uiSchemas: ["className"], 8 | schemaId: "dnd-div", 9 | }], 10 | widget: { 11 | key: "checkbox", 12 | type: "widget", 13 | uiSchemas: ["*"], 14 | schemaId: "dnd-checkbox", 15 | }, 16 | 17 | options: { 18 | temp: { 19 | div: { 20 | options: { 21 | className: "ba pa3 ma1 b--dashed" 22 | } 23 | } 24 | }, 25 | widget: { 26 | checkbox: { 27 | options: { 28 | checked: false 29 | } 30 | } 31 | } 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/dnd/div.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | label: "DIV", 3 | 4 | temps: [{ 5 | key: "div", 6 | type: "temp", 7 | uiSchemas: ["className"], 8 | schemaId: "dnd-div", 9 | }], 10 | 11 | options: { 12 | temp: { 13 | div: { 14 | options: { 15 | className: "ba pa3 ma1 b--dashed" 16 | } 17 | } 18 | } 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/common.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-common", 4 | properties: { 5 | className: { 6 | type: "string", 7 | title: "类名称", 8 | description: "高度类:h-{10-100};宽度类:w-{10-100};边框类:ba b--dasbed b--solid;" 9 | }, 10 | style: { 11 | type: "object", 12 | properties: { 13 | width: { type: "string", title: "宽度" }, 14 | height: { type: "string", title: "高度" } 15 | } 16 | }, 17 | deg: { 18 | type: "string", 19 | description: "这里使用数据源中的数据,首先先得有数据源。输入$开启选择列表;格式为:{{$.test.dataCol}};也可以支持$sum,$count,$average,$max,$min等,格式为{{$min($.test_008.ORDER_COUNT_SUM)}}" 20 | } 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/design.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "design", 4 | properties: { 5 | children: { 6 | type: "array", 7 | items: { 8 | type: "object", 9 | properties: { 10 | data: { 11 | type: "object", 12 | }, 13 | children: { 14 | $ref: "design#/properties/children" 15 | } 16 | } 17 | } 18 | } 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/div.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-div", 4 | default: {}, 5 | properties: { 6 | className: { 7 | type: "string" 8 | }, 9 | position: { 10 | type: "object", 11 | default: {}, 12 | properties: { 13 | x: { 14 | type: "number", default: 0, 15 | y: { type: "number" } 16 | } 17 | }, 18 | size: { 19 | type: "object", 20 | properties: { 21 | width: { type: "number" }, 22 | height: { type: "number" } 23 | } 24 | } 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/dnd.checkbox.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | $id: "dnd-checkbox", 3 | type: "object", 4 | properties: { 5 | checked: { 6 | type: "boolean" 7 | }, 8 | title: { 9 | type: "string" 10 | } 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/dnd.div.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | $id: "dnd-div", 3 | type: "object", 4 | properties: { 5 | className: { 6 | type: "string" 7 | }, 8 | style: { 9 | type: "object", 10 | properties: { 11 | position: { 12 | type: "string", 13 | enum: ["static", "fixed", "relative", "absolute"] 14 | } 15 | } 16 | } 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/echart.areastyle.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-echart-areastyle", 4 | default: {}, 5 | properties: { 6 | color: { type: "string", default: "#ccc", title: "颜色" }, 7 | type: { 8 | type: "string", 9 | default: "default", 10 | title: "填充样式,目前仅支持'default'(实填充)" 11 | } 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/echart.itemstyle.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-echart-itemstyle", 4 | default: {}, 5 | properties: { 6 | color: { 7 | type: "string", 8 | default: "#ccc", 9 | title: "颜色" 10 | }, 11 | lineStyle: { 12 | $ref: "dnd-echart-linestyle#" 13 | }, 14 | areaStyle: { 15 | $ref: "dnd-echart-areastyle#" 16 | }, 17 | borderColor: { 18 | type: "string", 19 | title: "边框颜色" 20 | } 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/echart.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-echart", 4 | title: "echarts参数设置", 5 | default: {}, 6 | properties: { 7 | timeline: { 8 | $ref: "dnd-echart-timeline#", 9 | }, 10 | title: { 11 | $ref: "dnd-echart-title#", 12 | }, 13 | toolbox: { 14 | $ref: "dnd-echart-toolbox#", 15 | }, 16 | tooltip: { 17 | $ref: "dnd-echart-tooltip#", 18 | }, 19 | legend: { 20 | $ref: "dnd-echart-legend#", 21 | }, 22 | series: { 23 | type: "array", 24 | default: [], 25 | $ref: "dnd-echart-series#" 26 | }, 27 | xAxis: { 28 | type: "array", 29 | default: [], 30 | $ref: "dnd-echart-axis#" 31 | }, 32 | yAxis: { 33 | type: "array", 34 | default: [], 35 | $ref: "dnd-echart-axis#" 36 | } 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/echart1.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | $id: "dnd-echart1", 3 | type: "object", 4 | properties: { 5 | className: { type: "string" }, 6 | notMerge: { 7 | type: "boolean" 8 | }, 9 | lazyUpdate: { 10 | type: "boolean" 11 | }, 12 | theme: { type: "string" }, 13 | option: { 14 | type: "object", 15 | $ref: "dnd-echart#" 16 | } 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/echart2.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | $id: "dnd-echart2", 3 | type: "object", 4 | properties: { 5 | className: { type: "string" }, 6 | notMerge: { 7 | type: "boolean" 8 | }, 9 | lazyUpdate: { 10 | type: "boolean" 11 | }, 12 | theme: { type: "string" }, 13 | option: { 14 | type: "object", 15 | properties: { 16 | baseOption: { 17 | type: "object", 18 | $ref: "dnd-echart#" 19 | }, 20 | options: { 21 | type: "array", 22 | items: { 23 | type: "object", 24 | $ref: "dnd-echart#" 25 | } 26 | }, 27 | optionsDeg: { 28 | type: "string", 29 | title: "timeline数据", 30 | description: "这里支持动态数据,输入$来选择数据源" 31 | } 32 | } 33 | 34 | } 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/row.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-row", 4 | properties: { 5 | className: { 6 | $ref: "dnd-common#/properties/className" 7 | }, 8 | style: { 9 | type: "object", 10 | $ref: "dnd-common#/properties/style" 11 | } 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/style.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-style", 4 | required: ["textAlign", "width"], 5 | properties: { 6 | width: { type: "number", title: "宽度", default: 100 }, 7 | height: { type: "number", equal: "width", title: "高度", description: "高必须和宽一致" }, 8 | fontSize: { type: "number" }, 9 | url: { type: "string", format: "url" }, 10 | email: { type: "string", format: "email" }, 11 | isEighteen: { type: "boolean", title: "已满18岁" }, 12 | ids: { 13 | type: "array", 14 | description: "拖动元素试试", 15 | items: { 16 | title: "测试ID", 17 | type: "string", 18 | format: "uuid" 19 | } 20 | }, 21 | textAlign: { 22 | type: "string", 23 | enum: ["left", "right", "center"], 24 | description: "Note: 只能是left,right,center中的一个。" 25 | } 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/schemas/dnd/tree.tsx: -------------------------------------------------------------------------------- 1 | export default { 2 | type: "object", 3 | $id: "dnd-tree", 4 | title: "二叉树结构", 5 | properties: { 6 | root: { 7 | type: "object", 8 | properties: { 9 | value: { 10 | type: "string" 11 | }, 12 | leftNode: { 13 | $ref: "dnd-tree#/properties/root" 14 | }, 15 | rightNode: { 16 | $ref: "dnd-tree#/properties/root" 17 | } 18 | } 19 | } 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/templates/div.tsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | import { connect } from "react-redux"; 3 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 4 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 5 | import { ArrayHocOutProps } from "fx-schema-form-react/libs/hocs/array"; 6 | 7 | 8 | export interface Props extends DefaultProps, UtilsHocOutProps, ArrayHocOutProps { 9 | tempKey: string; 10 | } 11 | 12 | export class DivTemp extends PureComponent { 13 | public render(): JSX.Element { 14 | const { children, tempKey, getOptions, getTitle, initArrayComponent, formItemMeta } = this.props; 15 | const tempOptions = getOptions(this.props, "temp", tempKey, 16 | formItemMeta ? formItemMeta.getIn(["options", "temp", tempKey]) : {}); 17 | 18 | return ( 19 |
20 | {children} 21 |
22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/templates/index.tsx: -------------------------------------------------------------------------------- 1 | export { NoneTemp } from "./none"; 2 | export { AntdCardTemp } from "./card"; 3 | export { AntdFormItemTemp } from "./formitem"; 4 | export { DivTemp } from "./div"; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/templates/none.tsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | 5 | export interface DivTempProps extends DefaultProps, UtilsHocOutProps { 6 | tempKey: string; 7 | } 8 | 9 | export class NoneTemp extends PureComponent { 10 | public render(): any { 11 | const { children, tempKey, getOptions } = this.props; 12 | const { className, ...tempOptions } = getOptions(this.props as any, "temp", tempKey); 13 | 14 | return
15 | {children} 16 |
; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/demo/widgets/index.tsx: -------------------------------------------------------------------------------- 1 | export { AntdCheckboxWidget } from "./checkbox"; 2 | export { AntdInputWidget } from "./input"; 3 | export { AntdInputNumberWidget } from "./number"; 4 | export { AntdSelectWidget } from "./select"; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/fields/index.tsx: -------------------------------------------------------------------------------- 1 | import designField from "./design"; 2 | import treeField from "./tree"; 3 | 4 | export const fields: any[] = [designField, treeField]; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/hocs/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { BaseFactory } from "fx-schema-form-core"; 3 | 4 | import conditionHoc from "./condition"; 5 | import resetKeyHoc from "./resetkey"; 6 | import oneOfHoc from "./oneof"; 7 | import showHoc from "./show"; 8 | import tempHoc from "./temp"; 9 | import formHoc from "./form"; 10 | import widgetHoc from "./widget"; 11 | import dataToMetaHoc from "./datatometa"; 12 | import formatHoc from "./format"; 13 | import wrapperHoc from "./wrapper"; 14 | import changedHoc from "./changed"; 15 | import copyToMetaHoc from "./copytometa"; 16 | 17 | export const hocs: Array<{ name: string, hoc: (hocFactory: BaseFactory) => any }> = 18 | [conditionHoc, resetKeyHoc, oneOfHoc, showHoc, tempHoc, formHoc, widgetHoc, dataToMetaHoc, wrapperHoc, formatHoc, changedHoc, copyToMetaHoc]; 19 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/src/index.tsx: -------------------------------------------------------------------------------- 1 | import schemaFormReact from "fx-schema-form-react"; 2 | import { BaseFactory } from "fx-schema-form-core"; 3 | 4 | import { fields } from "./fields"; 5 | import { hocs } from "./hocs"; 6 | 7 | const { hocFactory, defaultTheme } = schemaFormReact; 8 | 9 | hocs.forEach((hoc: { name: string, hoc: (hocFactory: BaseFactory) => any }) => { 10 | hocFactory.add(hoc.name, hoc.hoc(hocFactory)); 11 | }); 12 | 13 | fields.forEach((field: any) => { 14 | for (const key in field) { 15 | if (field.hasOwnProperty(key)) { 16 | defaultTheme.fieldFactory.add(key, field[key]); 17 | } 18 | } 19 | }); 20 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/typings/json-schema-editor-visual.d.ts: -------------------------------------------------------------------------------- 1 | declare module "json-schema-editor-visual"; 2 | declare module "json-schema-editor-visual/dist/main"; -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/typings/react-dnd-html5-backend.d.ts: -------------------------------------------------------------------------------- 1 | declare module "react-dnd-html5-backend"; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-extension/typings/react-immutable-render-mixin.d.ts: -------------------------------------------------------------------------------- 1 | declare module "react-immutable-render-mixin"; -------------------------------------------------------------------------------- /packages/fx-schema-form-material/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "production": { 4 | "presets": [ 5 | ["env", { 6 | "targets": {}, 7 | "modules": false, 8 | "loose": true 9 | }] 10 | ], 11 | "plugins": [ 12 | 13 | ], 14 | "minified": false 15 | }, 16 | "development": { 17 | "presets": [ 18 | "env", "react" 19 | ], 20 | "plugins": [ 21 | ["transform-runtime", { 22 | "helpers": true, 23 | "modules": false, 24 | "polyfill": false, 25 | "regenerator": true, 26 | "moduleName": "babel-runtime" 27 | }] 28 | ] 29 | } 30 | }, 31 | "comments": true 32 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-material/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/** 2 | **/*.css 3 | **/*.html -------------------------------------------------------------------------------- /packages/fx-schema-form-material/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "esnext": true, 4 | "curly": true, 5 | "latedef": true, 6 | "quotmark": true, 7 | "undef": true, 8 | "unused": true, 9 | "trailing": true, 10 | "jsx": "react", 11 | "react": true 12 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-material/.npmignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .history 3 | images 4 | tsconfig.json 5 | tslint.json 6 | webpack.config.js 7 | src 8 | node_modules 9 | global.d.ts 10 | package-lock.json 11 | readme.md 12 | test.html 13 | tests 14 | .babelrc 15 | out/** 16 | !out/index.js 17 | fuse.js -------------------------------------------------------------------------------- /packages/fx-schema-form-material/.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/packages/fx-schema-form-material/.npmrc -------------------------------------------------------------------------------- /packages/fx-schema-form-material/dts/global.d.ts: -------------------------------------------------------------------------------- 1 | 2 | declare var __DEV__: boolean; 3 | declare var __PROD__: boolean; 4 | declare var __TEST__: boolean; 5 | declare var __STAG__: boolean; 6 | 7 | declare var __STATE__: string; 8 | declare var __ENGINE__: string; 9 | 10 | declare module '*.scss' { 11 | const content: any; 12 | export default content; 13 | } 14 | declare module '*.less' { 15 | const content: any; 16 | export default content; 17 | } 18 | declare module '*.json' { 19 | const content: any; 20 | export default content; 21 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-material/dts/react-immutable-render-mixin.d.ts: -------------------------------------------------------------------------------- 1 | declare module "react-immutable-render-mixin" { 2 | export const immutableRenderDecorator : any; 3 | } 4 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/dts/react-number-format.d.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | declare module "react-number-format" { 4 | const content: any; 5 | export default content; 6 | } 7 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Schema Form 6 | 7 | 8 | 9 | 10 | 11 | 12 | JS比较大,请耐心等待!!! 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/readme.md: -------------------------------------------------------------------------------- 1 | # react-schema-form 2 | 3 | 爬虫前端核心组件。 4 | 5 | ## react-schema-form-extension 6 | 7 | ### https://github.com/palantir/react-mosaic 8 | 9 | 这是一个扩展项目,包括许多实用的hoc。 10 | 11 | 测试: 12 | 13 | ```jsx 14 | npm start 15 | ``` 16 | 17 | 启动[localhost:8004](http://localhost:8004) 18 | 19 | ## [License](license) 20 | 21 | [MIT](LICENSE.md) -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/common/components/none.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export class NoneComponent extends React.PureComponent { 4 | public render() { 5 | return ( 6 | <> 7 | {this.props.children} 8 | 9 | ); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modelproxy/common.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "json", 3 | "interfaces": [{ 4 | "key": "schema", 5 | "method": "get", 6 | "path": "/schemas/:id", 7 | "title": "调用本地的schema文件" 8 | }], 9 | "key": "sf", 10 | "state": "dev", 11 | "states": { 12 | "dev": "" 13 | }, 14 | "title": "schema的获取接口" 15 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/actions.tsx: -------------------------------------------------------------------------------- 1 | import { combineReducers } from "redux-immutable"; 2 | import { createAction, createReducer, EmptyActionCreator, SimpleActionCreator, Action } from "redux-act"; 3 | import { AnyAction, Reducer } from "redux"; 4 | 5 | import { HomeReducer, SetThemeData } from "./reducer"; 6 | import { $initialState, reducerKey } from "./constant"; 7 | 8 | export const homeReducer = new HomeReducer($initialState); 9 | export const homeActions = homeReducer.actions; 10 | 11 | export default combineReducers({ 12 | [reducerKey]: homeReducer.reducer 13 | }) as Reducer; 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/container.tsx: -------------------------------------------------------------------------------- 1 | import { compose, withHandlers, ComponentEnhancer } from "recompose"; 2 | import Immutable from "immutable"; 3 | import { connect } from "react-redux"; 4 | import { withTheme } from "material-ui/styles"; 5 | 6 | import { stylesHoc, reducerKeys, reducerKey } from "./constant"; 7 | import { homeActions } from "./actions"; 8 | 9 | export const mapStateToProps = (state: Immutable.Map, ownProps: any) => { 10 | return { 11 | type: state.getIn(reducerKeys.concat([reducerKey, "type"])) 12 | }; 13 | }; 14 | 15 | export const hoc = compose( 16 | connect(mapStateToProps), 17 | withTheme(), 18 | stylesHoc, 19 | withHandlers({ 20 | toggleOpen: (props: any) => { 21 | return () => { 22 | homeActions.toggleSideBar(); 23 | }; 24 | }, 25 | setTheme: (props: any) => { 26 | return (type: "dark" | "light") => { 27 | homeActions.setTheme({ type }); 28 | }; 29 | } 30 | }) 31 | ); 32 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/content/container.tsx: -------------------------------------------------------------------------------- 1 | export { hoc } from "../container"; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/content/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as ContentComponent } from "./component"; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/header/container.tsx: -------------------------------------------------------------------------------- 1 | import { connect } from "react-redux"; 2 | import { compose, ComponentEnhancer } from "recompose"; 3 | import Immutable from "immutable"; 4 | 5 | import { reducerKeys, reducerKey } from "../constant"; 6 | import { hoc as mainHoc } from "../container"; 7 | import { Props } from "../constant"; 8 | 9 | export const mapStateToProps = (state: Immutable.Map, ownProps: any) => { 10 | return { 11 | opened: state.getIn(reducerKeys.concat([reducerKey, "opened"])) 12 | }; 13 | }; 14 | 15 | export const hoc = compose( 16 | mainHoc, 17 | connect(mapStateToProps) 18 | ); 19 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/header/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as HeaderComponent } from "./component"; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/index.tsx: -------------------------------------------------------------------------------- 1 | import { homeActions, default as reducer } from "./actions"; 2 | export { MainComponent as HomeComponent } from "./main"; 3 | 4 | export const initActions = (store: any) => { 5 | homeActions.toggleSideBar.assignTo(store); 6 | homeActions.setTheme.assignTo(store); 7 | }; 8 | 9 | export { 10 | reducer 11 | }; 12 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/main/container.tsx: -------------------------------------------------------------------------------- 1 | import { connect } from "react-redux"; 2 | import { compose, ComponentEnhancer } from "recompose"; 3 | import Immutable from "immutable"; 4 | 5 | import { reducerKeys, reducerKey, Props } from "../constant"; 6 | import { hoc as mainHoc } from "../container"; 7 | 8 | export const mapStateToProps = (state: Immutable.Map, ownProps: any) => { 9 | return { 10 | type: state.getIn(reducerKeys.concat([reducerKey, "type"])) 11 | }; 12 | }; 13 | 14 | export const hoc = compose( 15 | mainHoc, 16 | connect(mapStateToProps) 17 | ); 18 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/main/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | export { ComponentClass } from "react"; 3 | export { default as MainComponent } from "./component"; 4 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/side/constant.tsx: -------------------------------------------------------------------------------- 1 | import { Props as BaseProps } from "../constant"; 2 | 3 | export interface Props extends BaseProps { 4 | } 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/side/container.tsx: -------------------------------------------------------------------------------- 1 | import { connect } from "react-redux"; 2 | import { compose, ComponentEnhancer } from "recompose"; 3 | import Immutable from "immutable"; 4 | 5 | import { reducerKeys, reducerKey, Props } from "../constant"; 6 | import { hoc as mainHoc } from "../container"; 7 | 8 | export const mapStateToProps = (state: Immutable.Map, ownProps: any) => { 9 | return { 10 | opened: state.getIn(reducerKeys.concat([reducerKey, "opened"])), 11 | type: state.getIn(reducerKeys.concat([reducerKey, "type"])) 12 | }; 13 | }; 14 | 15 | export const hoc = compose( 16 | mainHoc, 17 | connect(mapStateToProps) 18 | ); 19 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/modules/home/side/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as SideComponent } from "./component"; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/sf/hocs/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { BaseFactory } from "fx-schema-form-core"; 3 | 4 | import proxyHoc from "./proxy"; 5 | 6 | const hocs: Array<{ name: string, hoc: (hocFactory: BaseFactory) => any }> = 7 | [proxyHoc]; 8 | 9 | export default hocs; 10 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/sf/schemas/data.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name": "河南", 3 | "code": 1 4 | }, { 5 | "name": "上海", 6 | "code": 2 7 | }, { 8 | "name": "福建", 9 | "code": 3 10 | }] -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/sf/schemas/data1.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name": "居左", 3 | "code": "left" 4 | }, { 5 | "name": "居右", 6 | "code": "right" 7 | }, { 8 | "name": "居中", 9 | "code": "center" 10 | }] -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/sf/schemas/size.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "$id": "size", 4 | "properties": { 5 | "width": { 6 | "$ref": "w#/properties/width" 7 | }, 8 | "height": { 9 | "type": "string", 10 | "title": "高度", 11 | "description": "高度可以是多行" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/sf/schemas/w.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "$id": "w", 4 | "properties": { 5 | "width": { 6 | "type": "string", 7 | "title": "宽度", 8 | "description": "高度可以是多行" 9 | }, 10 | "height": { 11 | "type": "string", 12 | "title": "高度", 13 | "description": "高度可以是多行" 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/sf/templates/index.tsx: -------------------------------------------------------------------------------- 1 | import { default as NoneTemp, Temp as n, tempKey as k1 } from "./none"; 2 | import { default as CardTemp, Temp as c, tempKey as k2 } from "./card"; 3 | import { default as FormItemTemp, Temp as fi, tempKey as k3 } from "./formitem"; 4 | import { default as FormGroupemp, Temp as fg, tempKey as k4 } from "./formgroup"; 5 | 6 | export default [NoneTemp, CardTemp, FormItemTemp, FormGroupemp]; 7 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/sf/templates/none.tsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | import { DefaultProps } from "fx-schema-form-react/libs/components"; 3 | import { UtilsHocOutProps } from "fx-schema-form-react/libs/hocs/utils"; 4 | import schemaFormReact from "fx-schema-form-react"; 5 | 6 | const { schemaFormTypes } = schemaFormReact; 7 | 8 | export interface Props extends DefaultProps, UtilsHocOutProps { 9 | } 10 | 11 | export const tempKey = "none"; 12 | 13 | export class Temp extends PureComponent { 14 | public render(): any { 15 | const { children, getOptions } = this.props; 16 | const { className } = getOptions(this.props, schemaFormTypes.template, tempKey); 17 | 18 | return
19 | {children} 20 |
; 21 | } 22 | } 23 | 24 | export default { 25 | [tempKey]: Temp 26 | }; 27 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/sf/widgets/index.tsx: -------------------------------------------------------------------------------- 1 | import { default as TextWidget, Widget as tw, widgetKey as wn } from "./text"; 2 | import { default as NumberWidget, Widget as nw, widgetKey as tn } from "./number"; 3 | import { default as CheckboxWidget, Widget as cw, widgetKey as cn } from "./checkbox"; 4 | import { default as SelectWidget, Widget as sw, widgetKey as sn } from "./select"; 5 | import { default as PasswordWidget, Widget as pw, widgetKey as pn } from "./password"; 6 | import { default as DateWidget, Widget as dw, widgetKey as dn } from "./date"; 7 | import { default as DateTimeWidget, Widget as dtw, widgetKey as dtn } from "./datetime"; 8 | import { default as TimeWidget, Widget as ttw, widgetKey as ttn } from "./time"; 9 | import { default as AutoWidget, Widget as acw, widgetKey as acn } from "./autocomplete"; 10 | 11 | export default [TextWidget, NumberWidget, CheckboxWidget, SelectWidget, PasswordWidget, DateWidget, DateTimeWidget, TimeWidget, AutoWidget]; 12 | -------------------------------------------------------------------------------- /packages/fx-schema-form-material/src/style.scss: -------------------------------------------------------------------------------- 1 | 2 | @import "~grommet-css"; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/** 2 | **/*.css 3 | **/*.html -------------------------------------------------------------------------------- /packages/fx-schema-form-react/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "esnext": true, 4 | "curly": true, 5 | "latedef": true, 6 | "quotmark": true, 7 | "undef": true, 8 | "unused": true, 9 | "trailing": true, 10 | "jsx": "react", 11 | "react": true 12 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-react/.npmignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .history 3 | images 4 | tsconfig.json 5 | tslint.json 6 | webpack.config.js 7 | node_modules 8 | global.d.ts 9 | package-lock.json 10 | readme.md 11 | test.html 12 | .babelrc 13 | tests 14 | out/** 15 | src 16 | !out/index.js 17 | fuse.js 18 | dts -------------------------------------------------------------------------------- /packages/fx-schema-form-react/.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/packages/fx-schema-form-react/.npmrc -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/components/default.props.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Ajv } from "ajv"; 3 | import Immutable from "immutable"; 4 | import { ValidationMap } from "prop-types"; 5 | import { FxUiSchema } from "../models"; 6 | export interface DefaultProps { 7 | schemaId: string; 8 | uiSchema?: FxUiSchema; 9 | parentKeys: string[]; 10 | globalOptions: Immutable.Map; 11 | ajv: Ajv; 12 | arrayIndex?: number; 13 | arrayLevel?: number[]; 14 | formItemData?: any; 15 | formItemMeta?: any; 16 | ArrayItemComponent?: new () => React.PureComponent; 17 | reducerKey?: string; 18 | } 19 | export declare const DefaultPropsTypeCheck: ValidationMap; 22 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/components/form/component.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { ValidationMap } from "prop-types"; 4 | import { DefaultProps } from "../index"; 5 | import { MergeHocOutProps } from "../../hocs/merge"; 6 | import { FxUiSchema } from "../../models/index"; 7 | export interface Props extends DefaultProps, MergeHocOutProps { 8 | RootComponent?: any; 9 | uiSchemas?: Array; 10 | } 11 | export declare class SchemaForm extends PureComponent { 12 | static propTypes: ValidationMap; 13 | render(): JSX.Element; 14 | } 15 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/components/form/container.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { ComponentEnhancer } from "recompose"; 3 | import { DefaultProps } from "../index"; 4 | export declare const hoc: ComponentEnhancer; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/components/form/index.d.ts: -------------------------------------------------------------------------------- 1 | import { SchemaForm } from "./component"; 2 | export { SchemaForm }; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/components/formitem/component.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { ValidationMap } from "prop-types"; 4 | import { DefaultProps } from "../default.props"; 5 | export interface Props extends DefaultProps { 6 | } 7 | export declare class SchemaFormItem extends PureComponent { 8 | static propTypes: ValidationMap; 9 | render(): JSX.Element | null; 10 | } 11 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/components/formitem/container.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { ComponentEnhancer } from "recompose"; 3 | import { DefaultProps } from "../index"; 4 | export declare const hoc: ComponentEnhancer; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/components/formitem/index.d.ts: -------------------------------------------------------------------------------- 1 | import { SchemaFormItem } from "./component"; 2 | export { SchemaFormItem }; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/components/index.d.ts: -------------------------------------------------------------------------------- 1 | export { SchemaForm } from "./form"; 2 | export { DefaultProps } from "./default.props"; 3 | export { SchemaFormItem } from "./formitem"; 4 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/factory.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import React from "react"; 3 | import { BaseFactory } from "fx-schema-form-core"; 4 | import { ErrorObject } from "ajv"; 5 | import { FxReducer } from "./reducers/reducer"; 6 | import { DefaultProps } from "./components"; 7 | import { SchemaFormNs } from "./models"; 8 | import { UtilsHocOutProps } from "./hocs/utils"; 9 | export declare const reducerFactory: BaseFactory; 10 | export declare const hocFactory: BaseFactory<(settings?: any) => new () => React.PureComponent>; 11 | export declare const themeFactory: BaseFactory React.PureComponent, new () => React.PureComponent, new () => React.PureComponent>>; 12 | export declare const errorFactory: BaseFactory<(element: ErrorObject[], props: DefaultProps & UtilsHocOutProps, dataKeys: React.ReactText[]) => string>; 13 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/fields/array.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { DefaultProps } from "../components"; 4 | import { UtilsHocOutProps } from "../hocs/utils"; 5 | export interface ArrayFieldProps extends DefaultProps, UtilsHocOutProps { 6 | } 7 | export declare const name = "array"; 8 | export declare class ArrayField extends PureComponent { 9 | private SchemaFormWithHoc; 10 | private SchemaFormItemWithHoc; 11 | constructor(props: ArrayFieldProps); 12 | private initComponent(); 13 | private renderItem(idx); 14 | render(): JSX.Element | null; 15 | } 16 | declare const _default: { 17 | [name]: typeof ArrayField; 18 | }; 19 | export default _default; 20 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/fields/arrayfield.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import React from "react"; 3 | export declare class ArrayFieldComponent extends React.PureComponent { 4 | render(): JSX.Element; 5 | } 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/fields/index.d.ts: -------------------------------------------------------------------------------- 1 | import { NormalField } from "./normal"; 2 | import { ObjectField } from "./object"; 3 | import { ArrayField } from "./array"; 4 | declare const _default: ({ 5 | [name]: typeof NormalField; 6 | default: typeof NormalField; 7 | } | { 8 | [name]: typeof ObjectField; 9 | } | { 10 | [name]: typeof ArrayField; 11 | })[]; 12 | export default _default; 13 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/fields/normal.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { DefaultProps } from "../components"; 4 | import { UtilsHocOutProps } from "../hocs/utils"; 5 | import { FieldHocOutProps } from "../hocs/field"; 6 | export interface NormalFieldProps extends DefaultProps, UtilsHocOutProps, FieldHocOutProps { 7 | } 8 | export declare const name = "normal"; 9 | export declare class NormalField extends PureComponent { 10 | render(): JSX.Element | null; 11 | } 12 | declare const _default: { 13 | [name]: typeof NormalField; 14 | default: typeof NormalField; 15 | }; 16 | export default _default; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/fields/object.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { DefaultProps } from "../components"; 4 | import { UtilsHocOutProps } from "../hocs/utils"; 5 | export interface ObjectFieldProps extends DefaultProps, UtilsHocOutProps { 6 | } 7 | export declare const name = "object"; 8 | export declare class ObjectField extends PureComponent { 9 | render(): JSX.Element | null; 10 | } 11 | declare const _default: { 12 | [name]: typeof ObjectField; 13 | }; 14 | export default _default; 15 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/hocs/data.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { RC } from "../models"; 4 | export interface DataHocOutProps extends DefaultProps { 5 | } 6 | export interface DataHocSettings { 7 | root?: boolean; 8 | data?: boolean; 9 | dataLength?: boolean; 10 | meta?: boolean; 11 | metaKeys?: string[]; 12 | treeNode?: boolean; 13 | } 14 | export declare const name = "data"; 15 | export declare const hoc: (hocFactory: BaseFactory>) => (settings?: DataHocSettings) => (Component: any) => RC; 16 | declare const _default: { 17 | name: string; 18 | hoc: (hocFactory: BaseFactory>) => (settings?: DataHocSettings) => (Component: any) => RC; 19 | }; 20 | export default _default; 21 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/hocs/field.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { ThemeHocOutProps } from "./theme"; 3 | import { UtilsHocOutProps } from "./utils"; 4 | import { DefaultProps } from "../components"; 5 | import { RC } from "../models"; 6 | export interface FieldHocOutProps { 7 | FieldComponent: RC; 8 | WidgetComponent: RC; 9 | } 10 | export declare const name = "field"; 11 | export declare const hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 12 | declare const _default: { 13 | name: string; 14 | hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 15 | }; 16 | export default _default; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/hocs/index.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | export declare const hocs: Array<{ 3 | name: string; 4 | hoc: (hocFactory: BaseFactory) => any; 5 | }>; 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/hocs/make.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { UtilsHocOutProps } from "./utils"; 3 | import { DefaultProps } from "../components"; 4 | import { RC } from "../models"; 5 | export interface MakeHocOutProps extends UtilsHocOutProps { 6 | } 7 | export declare const name = "make"; 8 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: any) => RC; 9 | declare const _default: { 10 | name: string; 11 | hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: any) => RC; 12 | }; 13 | export default _default; 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/hocs/merge.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory, UiSchema } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { FxUiSchema, RC } from "../models"; 4 | export interface MergeHocOutProps { 5 | mergeSchemaList?: FxUiSchema[]; 6 | } 7 | export interface MergeHocProps extends DefaultProps { 8 | uiSchemas: Array; 9 | } 10 | export declare const name = "merge"; 11 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: RC) => RC; 12 | declare const _default: { 13 | name: string; 14 | hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: RC) => RC; 15 | }; 16 | export default _default; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/hocs/resetkey.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { UtilsHocOutProps } from "./utils"; 4 | import { RC } from "../models"; 5 | export interface Props extends DefaultProps, UtilsHocOutProps { 6 | } 7 | export interface ResetKeysHocOutSettings { 8 | excludeKeys: string[]; 9 | includeKeys: string[]; 10 | } 11 | export declare const name = "resetKey"; 12 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: ResetKeysHocOutSettings) => (Component: any) => RC; 13 | declare const _default: { 14 | name: string; 15 | hoc: (hocFactory: BaseFactory) => (settings?: ResetKeysHocOutSettings) => (Component: any) => RC; 16 | }; 17 | export default _default; 18 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/hocs/temp.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { RC } from "../models"; 4 | import { ThemeHocOutProps } from "./theme"; 5 | export declare const name = "temp"; 6 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: any) => RC; 7 | declare const _default: { 8 | name: string; 9 | hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: any) => RC; 10 | }; 11 | export default _default; 12 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/hocs/theme.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { RC, NsFactory } from "../models"; 4 | export interface ThemeHocOutProps { 5 | currentTheme: NsFactory; 6 | } 7 | export declare const name = "theme"; 8 | export declare const hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 9 | declare const _default: { 10 | name: string; 11 | hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 12 | }; 13 | export default _default; 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/libs/dec.d.ts: -------------------------------------------------------------------------------- 1 | import { ErrorObject } from "ajv"; 2 | import { DefaultProps } from "../components"; 3 | import { RC } from "../models"; 4 | import { TreeMap, Tsn } from "./tree"; 5 | export interface SchemaFormHocSettings { 6 | rootReducerKey: string[]; 7 | parentKeys: string[]; 8 | errorText?: (err: ErrorObject, props: DefaultProps, keys: Tsn[]) => string; 9 | } 10 | export interface SchemaFormProps extends SchemaFormHocOutProps { 11 | root?: TreeMap; 12 | data?: any; 13 | errors?: any; 14 | isValid?: boolean; 15 | isValidating?: boolean; 16 | formKey?: string; 17 | initData?: any; 18 | shouldResetForm?: boolean; 19 | keepData?: boolean; 20 | } 21 | export interface SchemaFormHocOutProps { 22 | validateAll?: ($async?: boolean) => Promise; 23 | resetForm?: (keepData?: boolean) => Promise; 24 | } 25 | export declare const name = "schemaFormDec"; 26 | declare const _default: (settings?: SchemaFormHocSettings) => (Component: any) => RC; 27 | export default _default; 28 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/libs/merge.d.ts: -------------------------------------------------------------------------------- 1 | declare function mergeDeep(param1: any, param2: any, schema?: any): any; 2 | export default mergeDeep; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/libs/tree.d.ts: -------------------------------------------------------------------------------- 1 | export declare type Tsn = string | number; 2 | export declare class TreeMap { 3 | private key; 4 | value: any; 5 | readonly parent: TreeMap | undefined; 6 | children: TreeMap[]; 7 | constructor(key: string, value: any, parent?: TreeMap | undefined); 8 | addChild(keys: Array, value?: any): TreeMap | null; 9 | getKey(): string; 10 | getCurrentKeys(): Array; 11 | getIndexInParent(): number; 12 | contains(key: Tsn): TreeMap | null; 13 | containPath(keys: Array): TreeMap | null; 14 | removeFromParent(): void; 15 | insertToFromParent(toIndex: number): void; 16 | forEach(clearFunc: (node: TreeMap) => any, currentNode?: boolean): void; 17 | } 18 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/reducer.d.ts: -------------------------------------------------------------------------------- 1 | import { SchemaFormReducer } from "./reducers/schema.form"; 2 | export declare const schemaFormReducer: SchemaFormReducer<{}>; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/reducers/reducer.d.ts: -------------------------------------------------------------------------------- 1 | import { Reducer } from "redux-act"; 2 | import { Store } from "redux"; 3 | export interface FxReducer { 4 | actions: any; 5 | reducer: Reducer; 6 | init(store: Store): void; 7 | } 8 | export declare const d = "data"; 9 | export declare const m = "meta"; 10 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dist/typings/utils.d.ts: -------------------------------------------------------------------------------- 1 | export declare const isProd: () => boolean; 2 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dts/global.d.ts: -------------------------------------------------------------------------------- 1 | 2 | declare var __DEV__: boolean; 3 | declare var __PROD__: boolean; 4 | declare var __TEST__: boolean; 5 | declare var __STAG__: boolean; 6 | declare var NODE_ENV: string; 7 | 8 | declare var __STATE__: string; 9 | declare var __ENGINE__: string; 10 | 11 | 12 | declare module "*.scss" { 13 | const content: any; 14 | export default content; 15 | } 16 | declare module "*.less" { 17 | const content: any; 18 | export default content; 19 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dts/immutable-custom-merge.d.ts: -------------------------------------------------------------------------------- 1 | 2 | declare module "immutable-custom-merge" { 3 | const value: (parm1: any, param2: any, schema?: any) => any; 4 | export default value; 5 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-react/dts/resolve-pathname.d.ts: -------------------------------------------------------------------------------- 1 | declare module "resolve-pathname" { 2 | const value: any; 3 | export default value; 4 | } 5 | 6 | declare module "react-addons-perf" { 7 | const value: any; 8 | export default value; 9 | } -------------------------------------------------------------------------------- /packages/fx-schema-form-react/images/200-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/packages/fx-schema-form-react/images/200-1.png -------------------------------------------------------------------------------- /packages/fx-schema-form-react/images/point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nick121212/fx-schema-form/73c20eb899ccd042e99b473fb628663e786c9678/packages/fx-schema-form-react/images/point.png -------------------------------------------------------------------------------- /packages/fx-schema-form-react/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Schema Form 6 | 7 | 8 | 9 | 10 | 11 | 测试一下 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/default.props.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Ajv } from "ajv"; 3 | import Immutable from "immutable"; 4 | import { ValidationMap } from "prop-types"; 5 | import { FxUiSchema } from "../models"; 6 | export interface DefaultProps { 7 | schemaId: string; 8 | uiSchema?: FxUiSchema; 9 | parentKeys: string[]; 10 | globalOptions: Immutable.Map; 11 | ajv: Ajv; 12 | arrayIndex?: number; 13 | arrayLevel?: number[]; 14 | formItemData?: any; 15 | formItemMeta?: any; 16 | ArrayItemComponent?: new () => React.PureComponent; 17 | reducerKey?: string; 18 | } 19 | export declare const DefaultPropsTypeCheck: ValidationMap; 22 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/default.props.js: -------------------------------------------------------------------------------- 1 | import propTypes from "prop-types"; 2 | export const DefaultPropsTypeCheck = { 3 | schemaId: propTypes.string.isRequired, 4 | uiSchema: propTypes.object, 5 | parentKeys: propTypes.array.isRequired, 6 | globalOptions: propTypes.object.isRequired, 7 | ajv: propTypes.object.isRequired, 8 | arrayIndex: propTypes.number, 9 | arrayLevel: propTypes.array, 10 | formItemData: propTypes.any, 11 | formItemMeta: propTypes.any, 12 | ArrayItemComponent: propTypes.any 13 | }; 14 | //# sourceMappingURL=default.props.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/default.props.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"default.props.js","sourceRoot":"","sources":["../../src/components/default.props.tsx"],"names":[],"mappings":"AAGA,OAAO,SAA4B,MAAM,YAAY,CAAC;AAqDtD,MAAM,CAAC,MAAM,qBAAqB,GAA2D;IACzF,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACrC,QAAQ,EAAE,SAAS,CAAC,MAAM;IAC1B,UAAU,EAAE,SAAS,CAAC,KAAK,CAAC,UAAU;IACtC,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IAC1C,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IAChC,UAAU,EAAE,SAAS,CAAC,MAAM;IAC5B,UAAU,EAAE,SAAS,CAAC,KAAK;IAC3B,YAAY,EAAE,SAAS,CAAC,GAAG;IAC3B,YAAY,EAAE,SAAS,CAAC,GAAG;IAC3B,kBAAkB,EAAE,SAAS,CAAC,GAAG;CACpC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/form/component.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { ValidationMap } from "prop-types"; 4 | import { DefaultProps } from "../index"; 5 | import { MergeHocOutProps } from "../../hocs/merge"; 6 | import { FxUiSchema } from "../../models/index"; 7 | export interface Props extends DefaultProps, MergeHocOutProps { 8 | RootComponent?: any; 9 | uiSchemas?: Array; 10 | } 11 | export declare class SchemaForm extends PureComponent { 12 | static propTypes: ValidationMap; 13 | render(): JSX.Element; 14 | } 15 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/form/component.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/form/component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI7C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD,IAAa,UAAU,GAAvB,gBAAwB,SAAQ,aAAyB;IAG9C,MAAM;QACT,MAAM,eAA8F,EAA9F,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,OAA8B,EAA5B,mGAA4B,CAAC;QACrG,MAAM,YAAY,GAAG,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,QAAoB,EAAE,GAAW,EAAE,EAAE;YAC7F,IAAI,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAE7D,MAAM,CAAC,oBAAC,cAAc,kBAClB,GAAG,EAAE,GAAG,IACJ,UAAU,IACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,cAAc,IAC5B,CAAC;QACP,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAER,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;YAChB,MAAM,CAAC,oBAAC,aAAa;gBAChB,YAAY;gBACZ,QAAQ,CACG,CAAC;QACrB,CAAC;QAED,MAAM,CAAC,CACH;YACK,YAAY;YACZ,QAAQ,CACP,CACT,CAAC;IACN,CAAC;CACJ,CAAA;AA/BY,UAAU;IADrB,GAAW;GACA,UAAU,CA+BtB;SA/BY,UAAU"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/form/container.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { ComponentEnhancer } from "recompose"; 3 | import { DefaultProps } from "../index"; 4 | export declare const hoc: ComponentEnhancer; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/form/container.js: -------------------------------------------------------------------------------- 1 | import { compose, shouldUpdate } from "recompose"; 2 | import { hocFactory } from "../../factory"; 3 | export const hoc = compose(shouldUpdate(() => false), hocFactory.get("utils")(), hocFactory.get("merge")()); 4 | //# sourceMappingURL=container.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/form/container.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/components/form/container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAqB,YAAY,EAAE,MAAM,WAAW,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,MAAM,GAAG,GAAyC,OAAO,CAC5D,YAAY,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,EACzB,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EACzB,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAC5B,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/form/index.d.ts: -------------------------------------------------------------------------------- 1 | import { SchemaForm } from "./component"; 2 | export { SchemaForm }; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/form/index.js: -------------------------------------------------------------------------------- 1 | import { SchemaForm } from "./component"; 2 | import { DefaultPropsTypeCheck } from "../default.props"; 3 | SchemaForm.propTypes = Object.assign({}, DefaultPropsTypeCheck); 4 | export { SchemaForm }; 5 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/form/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,UAAU,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,qBAAqB,CAAQ,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/formitem/component.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { ValidationMap } from "prop-types"; 4 | import { DefaultProps } from "../default.props"; 5 | export interface Props extends DefaultProps { 6 | } 7 | export declare class SchemaFormItem extends PureComponent { 8 | static propTypes: ValidationMap; 9 | render(): JSX.Element | null; 10 | } 11 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/formitem/container.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { ComponentEnhancer } from "recompose"; 3 | import { DefaultProps } from "../index"; 4 | export declare const hoc: ComponentEnhancer; 5 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/formitem/container.js: -------------------------------------------------------------------------------- 1 | import { compose } from "recompose"; 2 | import { hocFactory } from "../../factory"; 3 | export const hoc = compose(hocFactory.get("utils")(), hocFactory.get("make")()); 4 | //# sourceMappingURL=container.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/formitem/container.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/components/formitem/container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAqB,MAAM,WAAW,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,MAAM,GAAG,GAAyC,OAAO,CAC5D,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EACzB,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAC3B,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/formitem/index.d.ts: -------------------------------------------------------------------------------- 1 | import { SchemaFormItem } from "./component"; 2 | export { SchemaFormItem }; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/formitem/index.js: -------------------------------------------------------------------------------- 1 | import { SchemaFormItem } from "./component"; 2 | import { DefaultPropsTypeCheck } from "../default.props"; 3 | SchemaFormItem.propTypes = Object.assign({}, DefaultPropsTypeCheck); 4 | export { SchemaFormItem }; 5 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/formitem/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/formitem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,cAAc,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,qBAAqB,CAAQ,CAAC;AAE3E,OAAO,EAAE,cAAc,EAAE,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/index.d.ts: -------------------------------------------------------------------------------- 1 | export { SchemaForm } from "./form"; 2 | export { DefaultProps } from "./default.props"; 3 | export { SchemaFormItem } from "./formitem"; 4 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/index.js: -------------------------------------------------------------------------------- 1 | export { SchemaForm } from "./form"; 2 | export { SchemaFormItem } from "./formitem"; 3 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/components/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/factory.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import React from "react"; 3 | import { BaseFactory } from "fx-schema-form-core"; 4 | import { ErrorObject } from "ajv"; 5 | import { FxReducer } from "./reducers/reducer"; 6 | import { DefaultProps } from "./components"; 7 | import { SchemaFormNs } from "./models"; 8 | import { UtilsHocOutProps } from "./hocs/utils"; 9 | export declare const reducerFactory: BaseFactory; 10 | export declare const hocFactory: BaseFactory<(settings?: any) => new () => React.PureComponent>; 11 | export declare const themeFactory: BaseFactory React.PureComponent, new () => React.PureComponent, new () => React.PureComponent>>; 12 | export declare const errorFactory: BaseFactory<(element: ErrorObject[], props: DefaultProps & UtilsHocOutProps, dataKeys: (string | number)[]) => string>; 13 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/factory.js: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { hocs } from "./hocs"; 3 | import { schemaFormReducer } from "./reducer"; 4 | export const reducerFactory = new BaseFactory(); 5 | export const hocFactory = new BaseFactory(); 6 | export const themeFactory = new BaseFactory(); 7 | export const errorFactory = new BaseFactory(); 8 | hocs.forEach((hoc) => { 9 | hocFactory.add(hoc.name, hoc.hoc(hocFactory)); 10 | }); 11 | reducerFactory.add("schemaForm", schemaFormReducer); 12 | errorFactory.add("single", (errs, props, dataKeys) => { 13 | const { ajv, getTitle } = props; 14 | return ajv.errorsText(errs, { 15 | dataVar: getTitle(props).toString() 16 | }); 17 | }); 18 | errorFactory.add("validate", errorFactory.get("single")); 19 | //# sourceMappingURL=factory.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/factory.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAMlD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAI9C,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,WAAW,EAAa,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,WAAW,EAAwE,CAAC;AAClH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,WAAW,EAAa,CAAC;AACzD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,WAAW,EAA+F,CAAC;AAE3I,IAAI,CAAC,OAAO,CAAC,CAAC,GAAiE,EAAE,EAAE;IAC/E,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,GAAG,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;AAEpD,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAmB,EAAE,KAAsC,EAAE,QAAe,EAAE,EAAE;IACxG,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEhC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;QACxB,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;KACtC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AACH,YAAY,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/array.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { DefaultProps } from "../components"; 4 | import { UtilsHocOutProps } from "../hocs/utils"; 5 | export interface ArrayFieldProps extends DefaultProps, UtilsHocOutProps { 6 | } 7 | export declare const name = "array"; 8 | export declare class ArrayField extends PureComponent { 9 | private SchemaFormWithHoc; 10 | private SchemaFormItemWithHoc; 11 | constructor(props: ArrayFieldProps); 12 | private initComponent(); 13 | private renderItem(idx); 14 | render(): JSX.Element | null; 15 | } 16 | declare const _default: { 17 | [name]: typeof ArrayField; 18 | }; 19 | export default _default; 20 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/arrayfield.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import React from "react"; 3 | export declare class ArrayFieldComponent extends React.PureComponent { 4 | render(): JSX.Element; 5 | } 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/arrayfield.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | export class ArrayFieldComponent extends React.PureComponent { 3 | render() { 4 | return (React.createElement(React.Fragment, null, this.props.children)); 5 | } 6 | } 7 | //# sourceMappingURL=arrayfield.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/arrayfield.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"arrayfield.js","sourceRoot":"","sources":["../../src/fields/arrayfield.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,0BAA2B,SAAQ,KAAK,CAAC,aAAa;IACjD,MAAM;QACT,MAAM,CAAC,CACH,0CACK,IAAI,CAAC,KAAK,CAAC,QAAQ,CACrB,CACN,CAAC;IACN,CAAC;CACJ"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/index.d.ts: -------------------------------------------------------------------------------- 1 | import { NormalField } from "./normal"; 2 | import { ObjectField } from "./object"; 3 | import { ArrayField } from "./array"; 4 | declare const _default: ({ 5 | [name]: typeof NormalField; 6 | default: typeof NormalField; 7 | } | { 8 | [name]: typeof ObjectField; 9 | } | { 10 | [name]: typeof ArrayField; 11 | })[]; 12 | export default _default; 13 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/index.js: -------------------------------------------------------------------------------- 1 | import { default as normalField } from "./normal"; 2 | import { default as objectField } from "./object"; 3 | import { default as arrayField } from "./array"; 4 | export default [normalField, objectField, arrayField]; 5 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fields/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAA2B,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAA2B,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,UAAU,EAA0B,MAAM,SAAS,CAAC;AAExE,eAAe,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/normal.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { DefaultProps } from "../components"; 4 | import { UtilsHocOutProps } from "../hocs/utils"; 5 | import { FieldHocOutProps } from "../hocs/field"; 6 | export interface NormalFieldProps extends DefaultProps, UtilsHocOutProps, FieldHocOutProps { 7 | } 8 | export declare const name = "normal"; 9 | export declare class NormalField extends PureComponent { 10 | render(): JSX.Element | null; 11 | } 12 | declare const _default: { 13 | [name]: typeof NormalField; 14 | default: typeof NormalField; 15 | }; 16 | export default _default; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/normal.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"normal.js","sourceRoot":"","sources":["../../src/fields/normal.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAc,eAAe,EAAE,MAAM,WAAW,CAAC;AAQxD,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC;AAM7B,MAAM,kBAAmB,SAAQ,aAA+B;IACrD,MAAM;QACT,MAAM,eAA2F,EAA3F,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,OAA8B,EAA5B,8FAAa,EAC9E,YAAY,GAAG,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,EAC7E,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,QAAsB,CAAC;QACjD,IAAI,sBAAsB,GAAG,eAAe,CAAC;QAE7C,EAAE,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAED,EAAE,CAAC,CAAC,YAAY,CAAC,UAAU,IAAI,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5D,sBAAsB,GAAI,OAAO,CAC7B,GAAG,YAAY,CAAC,UAAU,CACrB,CAAC,eAAe,CAAC,CAAC;QAC/B,CAAC;QAED,MAAM,CAAC,CACH,oBAAC,sBAAsB,kBAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAM,UAAU,EAAI,CAClE,CAAC;IACN,CAAC;CACJ;AAED,eAAe;IACX,CAAC,IAAI,CAAC,EAAE,WAAW;IACnB,OAAO,EAAE,WAAW;CACvB,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/fields/object.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { PureComponent } from "react"; 3 | import { DefaultProps } from "../components"; 4 | import { UtilsHocOutProps } from "../hocs/utils"; 5 | export interface ObjectFieldProps extends DefaultProps, UtilsHocOutProps { 6 | } 7 | export declare const name = "object"; 8 | export declare class ObjectField extends PureComponent { 9 | render(): JSX.Element | null; 10 | } 11 | declare const _default: { 12 | [name]: typeof ObjectField; 13 | }; 14 | export default _default; 15 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/data.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { RC } from "../models"; 4 | export interface DataHocOutProps extends DefaultProps { 5 | } 6 | export interface DataHocSettings { 7 | root?: boolean; 8 | data?: boolean; 9 | dataLength?: boolean; 10 | meta?: boolean; 11 | metaKeys?: string[]; 12 | treeNode?: boolean; 13 | } 14 | export declare const name = "data"; 15 | export declare const hoc: (hocFactory: BaseFactory>) => (settings?: DataHocSettings) => (Component: any) => RC; 16 | declare const _default: { 17 | name: string; 18 | hoc: (hocFactory: BaseFactory>) => (settings?: DataHocSettings) => (Component: any) => RC; 19 | }; 20 | export default _default; 21 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/field.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { ThemeHocOutProps } from "./theme"; 3 | import { UtilsHocOutProps } from "./utils"; 4 | import { DefaultProps } from "../components"; 5 | import { RC } from "../models"; 6 | export interface FieldHocOutProps { 7 | FieldComponent: RC; 8 | WidgetComponent: RC; 9 | } 10 | export declare const name = "field"; 11 | export declare const hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 12 | declare const _default: { 13 | name: string; 14 | hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 15 | }; 16 | export default _default; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/index.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | export declare const hocs: Array<{ 3 | name: string; 4 | hoc: (hocFactory: BaseFactory) => any; 5 | }>; 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/index.js: -------------------------------------------------------------------------------- 1 | import { default as merge } from "./merge"; 2 | import { default as utils } from "./utils"; 3 | import { default as theme } from "./theme"; 4 | import { default as field } from "./field"; 5 | import { default as array } from "./array"; 6 | import { default as validate } from "./validate"; 7 | import { default as make } from "./make"; 8 | import { default as temp } from "./temp"; 9 | import { default as data } from "./data"; 10 | import { default as resetkey } from "./resetkey"; 11 | export const hocs = [merge, utils, theme, field, array, validate, make, temp, data, resetkey]; 12 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hocs/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,CAAC,MAAM,IAAI,GACb,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/make.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { UtilsHocOutProps } from "./utils"; 3 | import { DefaultProps } from "../components"; 4 | import { RC } from "../models"; 5 | export interface MakeHocOutProps extends UtilsHocOutProps { 6 | } 7 | export declare const name = "make"; 8 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: any) => RC; 9 | declare const _default: { 10 | name: string; 11 | hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: any) => RC; 12 | }; 13 | export default _default; 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/merge.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory, UiSchema } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { FxUiSchema, RC } from "../models"; 4 | export interface MergeHocOutProps { 5 | mergeSchemaList?: FxUiSchema[]; 6 | } 7 | export interface MergeHocProps extends DefaultProps { 8 | uiSchemas: Array; 9 | } 10 | export declare const name = "merge"; 11 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: RC) => RC; 12 | declare const _default: { 13 | name: string; 14 | hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: RC) => RC; 15 | }; 16 | export default _default; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/resetkey.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { UtilsHocOutProps } from "./utils"; 4 | import { RC } from "../models"; 5 | export interface Props extends DefaultProps, UtilsHocOutProps { 6 | } 7 | export interface ResetKeysHocOutSettings { 8 | excludeKeys: string[]; 9 | includeKeys: string[]; 10 | } 11 | export declare const name = "resetKey"; 12 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: ResetKeysHocOutSettings) => (Component: any) => RC; 13 | declare const _default: { 14 | name: string; 15 | hoc: (hocFactory: BaseFactory) => (settings?: ResetKeysHocOutSettings) => (Component: any) => RC; 16 | }; 17 | export default _default; 18 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/resetkey.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { fromJS } from "immutable"; 3 | import { schemaFormTypes } from "../models"; 4 | export const name = "resetKey"; 5 | export const hoc = (hocFactory) => { 6 | return (settings = { excludeKeys: [], includeKeys: [] }) => { 7 | return (Component) => { 8 | class ComponentHoc extends React.PureComponent { 9 | render() { 10 | const { getOptions, getRequiredKeys } = this.props, normalOptions = getOptions(this.props, schemaFormTypes.hoc, name, fromJS(settings || {})), extraProps = getRequiredKeys(this.props, normalOptions.includeKeys, normalOptions.excludeKeys); 11 | return React.createElement(Component, Object.assign({}, extraProps)); 12 | } 13 | } 14 | return ComponentHoc; 15 | }; 16 | }; 17 | }; 18 | export default { 19 | name, 20 | hoc 21 | }; 22 | //# sourceMappingURL=resetkey.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/resetkey.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"resetkey.js","sourceRoot":"","sources":["../../src/hocs/resetkey.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAInC,OAAO,EAAE,eAAe,EAAM,MAAM,WAAW,CAAC;AAWhD,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC;AAW/B,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,UAA4B,EAAE,EAAE;IAChD,MAAM,CAAC,CAAC,WAAoC,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE;QAChF,MAAM,CAAC,CAAC,SAAc,EAAkB,EAAE;YACtC,kBAAmB,SAAQ,KAAK,CAAC,aAAyB;gBAC/C,MAAM;oBACT,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,KAAK,EAC9C,aAAa,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,EACzF,UAAU,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;oBAEnG,MAAM,CAAC,oBAAC,SAAS,oBAAK,UAAU,EAAI,CAAC;gBACzC,CAAC;aACJ;YAED,MAAM,CAAC,YAAmB,CAAC;QAC/B,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,eAAe;IACX,IAAI;IACJ,GAAG;CACN,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/temp.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { RC } from "../models"; 4 | import { ThemeHocOutProps } from "./theme"; 5 | export declare const name = "temp"; 6 | export declare const hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: any) => RC; 7 | declare const _default: { 8 | name: string; 9 | hoc: (hocFactory: BaseFactory) => (settings?: any) => (Component: any) => RC; 10 | }; 11 | export default _default; 12 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/theme.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseFactory } from "fx-schema-form-core"; 2 | import { DefaultProps } from "../components"; 3 | import { RC, NsFactory } from "../models"; 4 | export interface ThemeHocOutProps { 5 | currentTheme: NsFactory; 6 | } 7 | export declare const name = "theme"; 8 | export declare const hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 9 | declare const _default: { 10 | name: string; 11 | hoc: (hocFactory: BaseFactory) => () => (Component: any) => RC; 12 | }; 13 | export default _default; 14 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/theme.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/hocs/theme.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK7C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC;AAS5B,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,UAA4B,EAAE,EAAE;IAChD,MAAM,CAAC,GAAG,EAAE;QACR,MAAM,CAAC,CAAC,SAAc,EAAyB,EAAE;YAC7C,MAAM,UAAU,GAAG,SAAS,CAAC;YAC7B,uBAAwB,SAAQ,aAAgC;gBACrD,MAAM;oBACT,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,QAAsB,CAAC;oBACpD,IAAI,SAAS,CAAC;oBAEd,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;wBACxC,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,UAAU,CAAC,CAAC;oBACtD,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACJ,MAAM,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,UAAU,MAAM,CAAC,CAAC;oBACtD,CAAC;oBAED,MAAM,CAAC,oBAAC,SAAS,kBAAC,YAAY,EAAE,SAAS,IAAM,IAAI,CAAC,KAAK,EAAI,CAAC;gBAClE,CAAC;aACJ;YAED,MAAM,CAAC,iBAAwB,CAAC;QACpC,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,eAAe;IACX,IAAI;IACJ,GAAG;CACN,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/utils.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | import { getTitle, getPathKeys, getOptions, normalizeDataPath, getRequiredKeys, getDefaultData, getActions, getPathProps } from "../libs/utils"; 3 | export const name = "utils"; 4 | export const hoc = (hocFactory) => { 5 | return () => { 6 | return (Component) => { 7 | class ComponentHoc extends PureComponent { 8 | render() { 9 | return (React.createElement(Component, Object.assign({ getTitle: getTitle, getPathKeys: getPathKeys, getOptions: getOptions, normalizeDataPath: normalizeDataPath, getRequiredKeys: getRequiredKeys, getDefaultData: getDefaultData, getActions: getActions, getPathProps: getPathProps }, this.props))); 10 | } 11 | } 12 | return ComponentHoc; 13 | }; 14 | }; 15 | }; 16 | export default { 17 | name, 18 | hoc 19 | }; 20 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/hocs/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/hocs/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS7C,OAAO,EACH,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EACpD,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAC5D,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC;AAmB5B,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,UAA4B,EAAE,EAAE;IAChD,MAAM,CAAC,GAAG,EAAE;QACR,MAAM,CAAC,CAAC,SAAc,EAAyB,EAAE;YAC7C,kBAAmB,SAAQ,aAAoC;gBACpD,MAAM;oBACT,MAAM,CAAC,CACH,oBAAC,SAAS,kBACN,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,IACtB,IAAI,CAAC,KAAK,EAAI,CACzB,CAAC;gBACN,CAAC;aACJ;YAED,MAAM,CAAC,YAAmB,CAAC;QAC/B,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,eAAe;IACX,IAAI;IACJ,GAAG;CACN,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/libs/dec.d.ts: -------------------------------------------------------------------------------- 1 | import { ErrorObject } from "ajv"; 2 | import { DefaultProps } from "../components"; 3 | import { RC } from "../models"; 4 | import { TreeMap, Tsn } from "./tree"; 5 | export interface SchemaFormHocSettings { 6 | rootReducerKey: string[]; 7 | parentKeys: string[]; 8 | errorText?: (err: ErrorObject, props: DefaultProps, keys: Tsn[]) => string; 9 | } 10 | export interface SchemaFormProps extends SchemaFormHocOutProps { 11 | root?: TreeMap; 12 | data?: any; 13 | errors?: any; 14 | isValid?: boolean; 15 | isValidating?: boolean; 16 | formKey?: string; 17 | initData?: any; 18 | shouldResetForm?: boolean; 19 | keepData?: boolean; 20 | } 21 | export interface SchemaFormHocOutProps { 22 | validateAll?: ($async?: boolean) => Promise; 23 | resetForm?: (keepData?: boolean) => Promise; 24 | } 25 | export declare const name = "schemaFormDec"; 26 | declare const _default: (settings?: SchemaFormHocSettings) => (Component: any) => RC; 27 | export default _default; 28 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/libs/merge.d.ts: -------------------------------------------------------------------------------- 1 | declare function mergeDeep(param1: any, param2: any, schema?: any): any; 2 | export default mergeDeep; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/libs/tree.d.ts: -------------------------------------------------------------------------------- 1 | export declare type Tsn = string | number; 2 | export declare class TreeMap { 3 | private key; 4 | value: any; 5 | readonly parent: TreeMap | undefined; 6 | children: TreeMap[]; 7 | constructor(key: string, value: any, parent?: TreeMap | undefined); 8 | addChild(keys: Array, value?: any): TreeMap | null; 9 | getKey(): string; 10 | getCurrentKeys(): Array; 11 | getIndexInParent(): number; 12 | contains(key: Tsn): TreeMap | null; 13 | containPath(keys: Array): TreeMap | null; 14 | removeFromParent(): void; 15 | insertToFromParent(toIndex: number): void; 16 | forEach(clearFunc: (node: TreeMap) => any, currentNode?: boolean): void; 17 | } 18 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/models/index.js: -------------------------------------------------------------------------------- 1 | export const schemaFormTypes = { 2 | hoc: "hoc", 3 | widget: "widget", 4 | template: "temp", 5 | field: "field" 6 | }; 7 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/models/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.tsx"],"names":[],"mappings":"AA4CA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,OAAO;CACjB,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/reducer.d.ts: -------------------------------------------------------------------------------- 1 | import { SchemaFormReducer } from "./reducers/schema.form"; 2 | export declare const schemaFormReducer: SchemaFormReducer<{}>; 3 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/reducer.js: -------------------------------------------------------------------------------- 1 | import { fromJS } from "immutable"; 2 | import { SchemaFormReducer } from "./reducers/schema.form"; 3 | export const schemaFormReducer = new SchemaFormReducer(fromJS({})); 4 | //# sourceMappingURL=reducer.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/reducer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.js","sourceRoot":"","sources":["../src/reducer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/reducers/reducer.d.ts: -------------------------------------------------------------------------------- 1 | import { Reducer } from "redux-act"; 2 | import { Store } from "redux"; 3 | export interface FxReducer { 4 | actions: any; 5 | reducer: Reducer; 6 | init(store: Store): void; 7 | } 8 | export declare const d = "data"; 9 | export declare const m = "meta"; 10 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/reducers/reducer.js: -------------------------------------------------------------------------------- 1 | export const d = "data"; 2 | export const m = "meta"; 3 | //# sourceMappingURL=reducer.js.map -------------------------------------------------------------------------------- /packages/fx-schema-form-react/libs/reducers/reducer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../src/reducers/reducer.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AACxB,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC"} -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/components/form/container.tsx: -------------------------------------------------------------------------------- 1 | import { compose, ComponentEnhancer, shouldUpdate } from "recompose"; 2 | 3 | import { DefaultProps } from "../index"; 4 | import { hocFactory } from "../../factory"; 5 | 6 | export const hoc: ComponentEnhancer = compose( 7 | shouldUpdate(() => false), 8 | hocFactory.get("utils")(), 9 | hocFactory.get("merge")() 10 | ); 11 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/components/form/index.tsx: -------------------------------------------------------------------------------- 1 | import { SchemaForm } from "./component"; 2 | import { DefaultPropsTypeCheck } from "../default.props"; 3 | 4 | SchemaForm.propTypes = Object.assign({}, DefaultPropsTypeCheck) as any; 5 | 6 | export { SchemaForm }; 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/components/formitem/container.tsx: -------------------------------------------------------------------------------- 1 | import { compose, ComponentEnhancer } from "recompose"; 2 | 3 | import { DefaultProps } from "../index"; 4 | import { hocFactory } from "../../factory"; 5 | 6 | export const hoc: ComponentEnhancer = compose( 7 | hocFactory.get("utils")(), 8 | hocFactory.get("make")() 9 | ); 10 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/components/formitem/index.tsx: -------------------------------------------------------------------------------- 1 | import { SchemaFormItem } from "./component"; 2 | import { DefaultPropsTypeCheck } from "../default.props"; 3 | 4 | SchemaFormItem.propTypes = Object.assign({}, DefaultPropsTypeCheck) as any; 5 | 6 | export { SchemaFormItem }; 7 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/components/index.tsx: -------------------------------------------------------------------------------- 1 | export { SchemaForm } from "./form"; 2 | export { DefaultProps } from "./default.props"; 3 | export { SchemaFormItem } from "./formitem"; 4 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/fields/arrayfield.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export class ArrayFieldComponent extends React.PureComponent { 4 | public render() { 5 | return ( 6 | <> 7 | {this.props.children} 8 | 9 | ); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/fields/index.tsx: -------------------------------------------------------------------------------- 1 | import { default as normalField, NormalField, name as n1 } from "./normal"; 2 | import { default as objectField, ObjectField, name as n2 } from "./object"; 3 | import { default as arrayField, ArrayField, name as n3 } from "./array"; 4 | 5 | export default [normalField, objectField, arrayField]; 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/hocs/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { BaseFactory } from "fx-schema-form-core"; 3 | 4 | import { default as merge } from "./merge"; 5 | import { default as utils } from "./utils"; 6 | import { default as theme } from "./theme"; 7 | import { default as field } from "./field"; 8 | import { default as array } from "./array"; 9 | import { default as validate } from "./validate"; 10 | import { default as make } from "./make"; 11 | import { default as temp } from "./temp"; 12 | import { default as data } from "./data"; 13 | import { default as resetkey } from "./resetkey"; 14 | 15 | export const hocs: Array<{ name: string, hoc: (hocFactory: BaseFactory) => any }> = 16 | [merge, utils, theme, field, array, validate, make, temp, data, resetkey]; 17 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/reducer.tsx: -------------------------------------------------------------------------------- 1 | import { fromJS } from "immutable"; 2 | 3 | import { SchemaFormReducer } from "./reducers/schema.form"; 4 | 5 | export const schemaFormReducer = new SchemaFormReducer(fromJS({})); 6 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/src/reducers/reducer.tsx: -------------------------------------------------------------------------------- 1 | import { Reducer } from "redux-act"; 2 | import { Store } from "redux"; 3 | 4 | export interface FxReducer { 5 | actions: any; 6 | reducer: Reducer; 7 | init(store: Store): void; 8 | } 9 | 10 | export const d = "data"; 11 | export const m = "meta"; 12 | -------------------------------------------------------------------------------- /packages/fx-schema-form-react/tests/setup.jsx: -------------------------------------------------------------------------------- 1 | import * as jsdom from 'jsdom'; 2 | 3 | if (typeof document === 'undefined') { 4 | global.document = jsdom.jsdom(''); 5 | global.window = document.defaultView; 6 | global.navigator = global.window.navigator; 7 | } --------------------------------------------------------------------------------