amis 1.9.0-beta.12 → 1.9.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Schema.d.ts +4 -2
- package/lib/Schema.js.map +1 -1
- package/lib/SchemaRenderer.d.ts +2 -2
- package/lib/SchemaRenderer.js +3 -3
- package/lib/SchemaRenderer.js.map +2 -2
- package/lib/actions/Action.d.ts +8 -6
- package/lib/actions/Action.js.map +2 -2
- package/lib/actions/AjaxAction.d.ts +10 -7
- package/lib/actions/AjaxAction.js +27 -21
- package/lib/actions/AjaxAction.js.map +2 -2
- package/lib/actions/BreakAction.d.ts +2 -2
- package/lib/actions/BreakAction.js.map +1 -1
- package/lib/actions/BroadcastAction.d.ts +3 -3
- package/lib/actions/BroadcastAction.js +3 -2
- package/lib/actions/BroadcastAction.js.map +2 -2
- package/lib/actions/CmptAction.d.ts +2 -2
- package/lib/actions/CmptAction.js +7 -9
- package/lib/actions/CmptAction.js.map +2 -2
- package/lib/actions/ContinueAction.d.ts +2 -2
- package/lib/actions/ContinueAction.js.map +1 -1
- package/lib/actions/CopyAction.d.ts +7 -4
- package/lib/actions/CopyAction.js +8 -6
- package/lib/actions/CopyAction.js.map +2 -2
- package/lib/actions/CustomAction.d.ts +2 -2
- package/lib/actions/CustomAction.js.map +1 -1
- package/lib/actions/DialogAction.d.ts +14 -8
- package/lib/actions/DialogAction.js +6 -6
- package/lib/actions/DialogAction.js.map +2 -2
- package/lib/actions/DrawerAction.d.ts +3 -3
- package/lib/actions/DrawerAction.js.map +1 -1
- package/lib/actions/EmailAction.d.ts +10 -7
- package/lib/actions/EmailAction.js +4 -5
- package/lib/actions/EmailAction.js.map +2 -2
- package/lib/actions/LinkAction.d.ts +19 -11
- package/lib/actions/LinkAction.js +6 -5
- package/lib/actions/LinkAction.js.map +2 -2
- package/lib/actions/LoopAction.d.ts +6 -3
- package/lib/actions/LoopAction.js +22 -20
- package/lib/actions/LoopAction.js.map +2 -2
- package/lib/actions/PageAction.d.ts +8 -5
- package/lib/actions/PageAction.js +3 -2
- package/lib/actions/PageAction.js.map +2 -2
- package/lib/actions/ParallelAction.d.ts +2 -2
- package/lib/actions/ParallelAction.js.map +1 -1
- package/lib/actions/SwitchAction.d.ts +2 -2
- package/lib/actions/SwitchAction.js.map +1 -1
- package/lib/actions/ToastAction.d.ts +2 -2
- package/lib/actions/ToastAction.js +6 -4
- package/lib/actions/ToastAction.js.map +2 -2
- package/lib/components/Editor.d.ts +84 -84
- package/lib/components/InputBox.js +1 -1
- package/lib/components/InputBox.js.map +2 -2
- package/lib/components/Pagination.d.ts +1175 -0
- package/lib/components/Pagination.js +274 -0
- package/lib/components/Pagination.js.map +13 -0
- package/lib/components/PickerContainer.d.ts +1 -0
- package/lib/components/PickerContainer.js +3 -2
- package/lib/components/PickerContainer.js.map +2 -2
- package/lib/components/Rating.js +11 -9
- package/lib/components/Rating.js.map +2 -2
- package/lib/components/Select.js +3 -3
- package/lib/components/Select.js.map +2 -2
- package/lib/components/Tag.d.ts +148 -0
- package/lib/components/Tag.js +96 -0
- package/lib/components/Tag.js.map +13 -0
- package/lib/components/TooltipWrapper.d.ts +25 -21
- package/lib/components/TooltipWrapper.js +11 -1
- package/lib/components/TooltipWrapper.js.map +2 -2
- package/lib/components/TransferDropDown.d.ts +85 -84
- package/lib/components/TransferDropDown.js +2 -2
- package/lib/components/TransferDropDown.js.map +2 -2
- package/lib/components/Tree.d.ts +84 -84
- package/lib/components/formula/VariableList.d.ts +1 -0
- package/lib/components/formula/VariableList.js.map +2 -2
- package/lib/components/icons.js +2 -0
- package/lib/components/icons.js.map +2 -2
- package/lib/components/index.d.ts +4 -1
- package/lib/components/index.js +7 -1
- package/lib/components/index.js.map +2 -2
- package/lib/components/schema-editor/Array.d.ts +11 -0
- package/lib/components/schema-editor/Array.js +66 -0
- package/lib/components/schema-editor/Array.js.map +13 -0
- package/lib/components/schema-editor/Common.d.ts +29 -0
- package/lib/components/schema-editor/Common.js +69 -0
- package/lib/components/schema-editor/Common.js.map +13 -0
- package/lib/components/schema-editor/Item.d.ts +9 -0
- package/lib/components/schema-editor/Item.js +31 -0
- package/lib/components/schema-editor/Item.js.map +13 -0
- package/lib/components/schema-editor/Object.d.ts +44 -0
- package/lib/components/schema-editor/Object.js +191 -0
- package/lib/components/schema-editor/Object.js.map +13 -0
- package/lib/components/schema-editor/SchemaVariableList.d.ts +316 -0
- package/lib/components/schema-editor/SchemaVariableList.js +74 -0
- package/lib/components/schema-editor/SchemaVariableList.js.map +13 -0
- package/lib/components/schema-editor/SchemaVariableListPicker.d.ts +305 -0
- package/lib/components/schema-editor/SchemaVariableListPicker.js +32 -0
- package/lib/components/schema-editor/SchemaVariableListPicker.js.map +13 -0
- package/lib/components/schema-editor/index.d.ts +520 -0
- package/lib/components/schema-editor/index.js +118 -0
- package/lib/components/schema-editor/index.js.map +13 -0
- package/lib/components/table/Cell.d.ts +930 -0
- package/lib/components/table/Cell.js +36 -0
- package/lib/components/table/Cell.js.map +13 -0
- package/lib/components/table/HeadCellDropDown.d.ts +514 -0
- package/lib/components/table/HeadCellDropDown.js +52 -0
- package/lib/components/table/HeadCellDropDown.js.map +13 -0
- package/lib/components/table/HeadCellFilter.d.ts +771 -0
- package/lib/components/table/HeadCellFilter.js +106 -0
- package/lib/components/table/HeadCellFilter.js.map +13 -0
- package/lib/components/table/HeadCellSelect.d.ts +672 -0
- package/lib/components/table/HeadCellSelect.js +46 -0
- package/lib/components/table/HeadCellSelect.js.map +13 -0
- package/lib/components/table/HeadCellSort.d.ts +498 -0
- package/lib/components/table/HeadCellSort.js +67 -0
- package/lib/components/table/HeadCellSort.js.map +13 -0
- package/lib/components/table/index.d.ts +1355 -0
- package/lib/components/table/index.js +1095 -0
- package/lib/components/table/index.js.map +13 -0
- package/lib/env.d.ts +2 -4
- package/lib/env.js.map +2 -2
- package/lib/factory.js +0 -95
- package/lib/factory.js.map +2 -2
- package/lib/icons/dot.js +11 -0
- package/lib/index.d.ts +6 -1
- package/lib/index.js +9 -2
- package/lib/index.js.map +2 -2
- package/lib/locale/de-DE.js +18 -1
- package/lib/locale/de-DE.js.map +2 -2
- package/lib/locale/en-US.js +18 -1
- package/lib/locale/en-US.js.map +2 -2
- package/lib/locale/zh-CN.js +20 -1
- package/lib/locale/zh-CN.js.map +2 -2
- package/lib/renderers/Action.js +0 -2
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/Carousel.d.ts +5 -1
- package/lib/renderers/Carousel.js +18 -5
- package/lib/renderers/Carousel.js.map +2 -2
- package/lib/renderers/Form/ButtonGroupSelect.d.ts +2 -0
- package/lib/renderers/Form/ButtonGroupSelect.js +7 -0
- package/lib/renderers/Form/ButtonGroupSelect.js.map +2 -2
- package/lib/renderers/Form/Checkbox.js +3 -4
- package/lib/renderers/Form/Checkbox.js.map +2 -2
- package/lib/renderers/Form/Checkboxes.d.ts +2 -1
- package/lib/renderers/Form/Checkboxes.js +19 -14
- package/lib/renderers/Form/Checkboxes.js.map +2 -2
- package/lib/renderers/Form/Combo.js +23 -4
- package/lib/renderers/Form/Combo.js.map +2 -2
- package/lib/renderers/Form/DiffEditor.d.ts +126 -18
- package/lib/renderers/Form/Editor.d.ts +412 -112
- package/lib/renderers/Form/Editor.js +10 -1
- package/lib/renderers/Form/Editor.js.map +2 -2
- package/lib/renderers/Form/InputExcel.js +6 -1
- package/lib/renderers/Form/InputExcel.js.map +2 -2
- package/lib/renderers/Form/InputFile.js +1 -2
- package/lib/renderers/Form/InputFile.js.map +2 -2
- package/lib/renderers/Form/InputTree.js +1 -1
- package/lib/renderers/Form/InputTree.js.map +2 -2
- package/lib/renderers/Form/Item.d.ts +0 -6
- package/lib/renderers/Form/JSONSchemaEditor.d.ts +41 -0
- package/lib/renderers/Form/JSONSchemaEditor.js +33 -0
- package/lib/renderers/Form/JSONSchemaEditor.js.map +13 -0
- package/lib/renderers/Form/ListSelect.d.ts +2 -0
- package/lib/renderers/Form/ListSelect.js +7 -0
- package/lib/renderers/Form/ListSelect.js.map +2 -2
- package/lib/renderers/Form/Options.js +1 -0
- package/lib/renderers/Form/Options.js.map +2 -2
- package/lib/renderers/Form/Select.js +12 -1
- package/lib/renderers/Form/Select.js.map +2 -2
- package/lib/renderers/Form/TabsTransfer.d.ts +1 -1
- package/lib/renderers/Form/TabsTransfer.js +2 -2
- package/lib/renderers/Form/TabsTransfer.js.map +2 -2
- package/lib/renderers/Form/TreeSelect.d.ts +4 -0
- package/lib/renderers/Form/TreeSelect.js +2 -2
- package/lib/renderers/Form/TreeSelect.js.map +2 -2
- package/lib/renderers/Form/wrapControl.js +10 -5
- package/lib/renderers/Form/wrapControl.js.map +2 -2
- package/lib/renderers/Pagination.d.ts +49 -30
- package/lib/renderers/Pagination.js +3 -132
- package/lib/renderers/Pagination.js.map +2 -2
- package/lib/renderers/Table/HeadCellSearchDropdown.js +0 -1
- package/lib/renderers/Table/HeadCellSearchDropdown.js.map +2 -2
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.d.ts +29 -0
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.js +158 -0
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.js.map +13 -0
- package/lib/renderers/Table-v2/TableCell.d.ts +6 -0
- package/lib/renderers/Table-v2/TableCell.js +28 -0
- package/lib/renderers/Table-v2/TableCell.js.map +13 -0
- package/lib/renderers/Table-v2/index.d.ts +256 -0
- package/lib/renderers/Table-v2/index.js +548 -0
- package/lib/renderers/Table-v2/index.js.map +13 -0
- package/lib/renderers/Tabs.js +1 -1
- package/lib/renderers/Tabs.js.map +2 -2
- package/lib/renderers/Tag.d.ts +66 -0
- package/lib/renderers/Tag.js +53 -0
- package/lib/renderers/Tag.js.map +13 -0
- package/lib/renderers/Wizard.js +3 -3
- package/lib/renderers/Wizard.js.map +2 -2
- package/lib/schemaExtend.js +24 -30
- package/lib/schemaExtend.js.map +2 -2
- package/lib/store/combo.d.ts +140 -20
- package/lib/store/form.d.ts +56 -8
- package/lib/store/formItem.d.ts +3 -1
- package/lib/store/formItem.js +3 -1
- package/lib/store/formItem.js.map +2 -2
- package/lib/store/index.js +2 -0
- package/lib/store/index.js.map +2 -2
- package/lib/store/table-v2.d.ts +308 -0
- package/lib/store/table-v2.js +452 -0
- package/lib/store/table-v2.js.map +13 -0
- package/lib/store/table.d.ts +112 -16
- package/lib/store/table.js +1 -1
- package/lib/store/table.js.map +2 -2
- package/lib/themes/ang-ie11.css +1686 -120
- package/lib/themes/ang.css +1807 -208
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +1667 -101
- package/lib/themes/antd.css +1789 -201
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +1662 -97
- package/lib/themes/cxd.css +1983 -394
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +1667 -101
- package/lib/themes/dark.css +1789 -201
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default-ie11.css +1662 -97
- package/lib/themes/default.css +1983 -394
- package/lib/themes/default.css.map +1 -1
- package/lib/utils/DataSchema.d.ts +25 -0
- package/lib/utils/DataSchema.js +104 -0
- package/lib/utils/DataSchema.js.map +13 -0
- package/lib/utils/DataScope.d.ts +23 -0
- package/lib/utils/DataScope.js +140 -0
- package/lib/utils/DataScope.js.map +13 -0
- package/lib/utils/handleAction.js +1 -1
- package/lib/utils/handleAction.js.map +2 -2
- package/lib/utils/renderer-event.d.ts +8 -2
- package/lib/utils/renderer-event.js +102 -1
- package/lib/utils/renderer-event.js.map +2 -2
- package/package.json +3 -2
- package/schema.json +1476 -469
- package/scss/_properties.scss +69 -0
- package/scss/components/_button.scss +37 -39
- package/scss/components/_context-menu.scss +3 -18
- package/scss/components/_json-schema-editor.scss +126 -0
- package/scss/components/_pagination.scss +104 -23
- package/scss/components/_result-box.scss +2 -2
- package/scss/components/_table-v2.scss +912 -0
- package/scss/components/_tag.scss +177 -0
- package/scss/components/form/_selection.scss +1 -14
- package/scss/components/form/_text.scss +1 -1
- package/scss/themes/_antd-variables.scss +0 -13
- package/scss/themes/_common.scss +3 -0
- package/scss/themes/_cxd-variables.scss +7 -17
- package/scss/themes/_dark-variables.scss +0 -13
- package/scss/themes/cxd.scss +1 -1
- package/sdk/ang-ie11.css +2240 -227
- package/sdk/ang.css +2905 -859
- package/sdk/antd-ie11.css +2233 -220
- package/sdk/antd.css +2905 -870
- package/sdk/barcode.js +51 -51
- package/sdk/charts.js +14 -14
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +65 -65
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +2223 -211
- package/sdk/cxd.css +2911 -875
- package/sdk/dark-ie11.css +2233 -220
- package/sdk/dark.css +2905 -870
- package/sdk/exceljs.js +1 -1
- package/sdk/locale/de-DE.js +18 -1
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +16 -16
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +2223 -211
- package/sdk/sdk.css +2911 -875
- package/sdk/sdk.js +1326 -1270
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +57 -57
- package/src/Schema.ts +7 -0
- package/src/SchemaRenderer.tsx +4 -5
- package/src/actions/Action.ts +7 -6
- package/src/actions/AjaxAction.ts +33 -24
- package/src/actions/BreakAction.ts +2 -2
- package/src/actions/BroadcastAction.ts +6 -5
- package/src/actions/CmptAction.ts +5 -6
- package/src/actions/ContinueAction.ts +2 -2
- package/src/actions/CopyAction.ts +14 -8
- package/src/actions/CustomAction.ts +2 -2
- package/src/actions/DialogAction.ts +16 -10
- package/src/actions/DrawerAction.ts +3 -3
- package/src/actions/EmailAction.ts +12 -12
- package/src/actions/LinkAction.ts +34 -14
- package/src/actions/LoopAction.ts +13 -8
- package/src/actions/PageAction.ts +9 -6
- package/src/actions/ParallelAction.ts +2 -2
- package/src/actions/SwitchAction.ts +2 -2
- package/src/actions/ToastAction.ts +9 -5
- package/src/components/InputBox.tsx +1 -0
- package/src/components/Pagination.tsx +446 -0
- package/src/components/PickerContainer.tsx +8 -5
- package/src/components/Rating.tsx +16 -9
- package/src/components/Select.tsx +3 -3
- package/src/components/Tag.tsx +179 -0
- package/src/components/TooltipWrapper.tsx +14 -1
- package/src/components/TransferDropDown.tsx +3 -0
- package/src/components/formula/VariableList.tsx +1 -0
- package/src/components/icons.tsx +2 -0
- package/src/components/index.tsx +7 -1
- package/src/components/schema-editor/Array.tsx +95 -0
- package/src/components/schema-editor/Common.tsx +138 -0
- package/src/components/schema-editor/Item.tsx +36 -0
- package/src/components/schema-editor/Object.tsx +299 -0
- package/src/components/schema-editor/SchemaVariableList.tsx +97 -0
- package/src/components/schema-editor/SchemaVariableListPicker.tsx +66 -0
- package/src/components/schema-editor/index.tsx +211 -0
- package/src/components/table/Cell.tsx +70 -0
- package/src/components/table/HeadCellDropDown.tsx +115 -0
- package/src/components/table/HeadCellFilter.tsx +193 -0
- package/src/components/table/HeadCellSelect.tsx +86 -0
- package/src/components/table/HeadCellSort.tsx +102 -0
- package/src/components/table/index.tsx +1681 -0
- package/src/env.tsx +7 -14
- package/src/factory.tsx +3 -106
- package/src/icons/dot.svg +11 -0
- package/src/index.tsx +8 -1
- package/src/locale/de-DE.ts +18 -1
- package/src/locale/en-US.ts +18 -1
- package/src/locale/zh-CN.ts +20 -1
- package/src/renderers/Action.tsx +1 -1
- package/src/renderers/Carousel.tsx +21 -6
- package/src/renderers/Form/ButtonGroupSelect.tsx +10 -1
- package/src/renderers/Form/Checkbox.tsx +4 -4
- package/src/renderers/Form/Checkboxes.tsx +31 -25
- package/src/renderers/Form/Combo.tsx +20 -4
- package/src/renderers/Form/Editor.tsx +15 -1
- package/src/renderers/Form/InputExcel.tsx +6 -1
- package/src/renderers/Form/InputFile.tsx +1 -2
- package/src/renderers/Form/InputTree.tsx +1 -1
- package/src/renderers/Form/JSONSchemaEditor.tsx +67 -0
- package/src/renderers/Form/ListSelect.tsx +9 -1
- package/src/renderers/Form/Options.tsx +1 -1
- package/src/renderers/Form/Select.tsx +7 -0
- package/src/renderers/Form/TabsTransfer.tsx +2 -2
- package/src/renderers/Form/TreeSelect.tsx +8 -1
- package/src/renderers/Form/wrapControl.tsx +11 -5
- package/src/renderers/Pagination.tsx +65 -253
- package/src/renderers/Table/HeadCellSearchDropdown.tsx +0 -1
- package/src/renderers/Table-v2/HeadCellSearchDropdown.tsx +244 -0
- package/src/renderers/Table-v2/TableCell.tsx +19 -0
- package/src/renderers/Table-v2/index.tsx +1140 -0
- package/src/renderers/Tabs.tsx +1 -1
- package/src/renderers/Tag.tsx +128 -0
- package/src/renderers/Wizard.tsx +3 -3
- package/src/schemaExtend.ts +24 -28
- package/src/store/formItem.ts +5 -1
- package/src/store/index.ts +2 -0
- package/src/store/table-v2.ts +646 -0
- package/src/store/table.ts +1 -1
- package/src/utils/DataSchema.ts +131 -0
- package/src/utils/DataScope.ts +190 -0
- package/src/utils/handleAction.ts +1 -1
- package/src/utils/renderer-event.ts +113 -2
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"file": "SchemaVariableList.js",
|
4
|
+
"sourceRoot": "",
|
5
|
+
"sources": [
|
6
|
+
"/src/components/schema-editor/SchemaVariableList.tsx"
|
7
|
+
],
|
8
|
+
"names": [],
|
9
|
+
"mappings": ";;;;AAAA,6DAA0B;AAC1B,uCAAqD;AACrD,qCAAkD;AAClD,qDAAkD;AAElD,6CAA4C;AAE5C,sFAAmD;AACnD,kFAA+C;AAY/C;IAAwC,mDAGvC;IAOC,4BAAY,KAA8B;QAA1C,YACE,kBAAM,KAAK,CAAC,SACb;QARD,WAAK,GAAG;YACN,SAAS,EAAE,KAAI,CAAC,kBAAkB,CAAC,KAAI,CAAC,KAAK,CAAC;SAC/C,CAAC;;IAMF,CAAC;IAED,+CAAkB,GAAlB,UAAmB,SAAkC;QACnD,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,OAAO,EAAE;YACvC,IAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;aAC1C,CAAC,CAAC;SACJ;IACH,CAAC;IAED,+CAAkB,GAAlB,UAAmB,KAA8B;QAC/C,IAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;YAC1C,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;YACxB,CAAC,CAAC,KAAK,CAAC,OAAO;gBACf,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;gBACjB,CAAC,CAAC,EAAE,CAAC;QAEP,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO,EAAE,CAAC;SACX;QACD,IAAM,UAAU,GAAG,IAAI,uBAAU,CAAC,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,OAAO,UAAU,CAAC,qBAAqB,EAAE,CAAC;IAC5C,CAAC;IAGD,yCAAY,GAAZ,UAAa,IAAS;;QACb,IAAA,QAAQ,GAAI,IAAI,CAAC,KAAK,SAAd,CAAe;QAC9B,IAAM,MAAM,GAAG,MAAA,IAAI,CAAC,UAAU,0CAAE,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAE5D,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,IAAI,CAAC,KAAK,EAAE,MAAO,CAAC,CAAC;IAClC,CAAC;IAGD,uCAAU,GAAV,UAAW,MAAW;QACd,IAAA,KAAkC,IAAI,CAAC,KAAK,EAA/B,EAAE,gBAAA,EAAa,EAAE,eAAc,CAAC;QAEnD,OAAO,CACL,wCAAM,SAAS,EAAE,EAAE,CAAC,iCAAiC,CAAC;YACpD,6CAAQ,MAAM,CAAC,KAAK,CAAS;YAC7B,8BAAC,wBAAc,IAAC,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,YAAY,EAAC,MAAM;gBAC9D,wCAAM,SAAS,EAAE,EAAE,CAAC,qCAAqC,CAAC,IACvD,EAAE,CAAC,qBAAc,MAAM,CAAC,IAAI,IAAI,KAAK,CAAE,CAAC,CACpC,CACQ,CACZ,CACR,CAAC;IACJ,CAAC;IAED,mCAAM,GAAN;QACE,OAAO,CACL,8BAAC,sBAAY,IACX,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,UAAU,EAAC,MAAM,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,GAC3B,CACH,CAAC;IACJ,CAAC;IAjCD;QADC,iBAAQ;;;;0DAMR;IAGD;QADC,iBAAQ;;;;wDAcR;IAaH,yBAAC;CAAA,AA1ED,CAAwC,eAAK,CAAC,SAAS,GA0EtD;AA1EY,gDAAkB;AA4E/B,kBAAe,IAAA,mBAAU,EAAC,IAAA,iBAAS,EAAC,kBAAkB,CAAC,CAAC,CAAC",
|
10
|
+
"sourcesContent": [
|
11
|
+
"import React from 'react';\nimport {localeable, LocaleProps} from '../../locale';\nimport {themeable, ThemeProps} from '../../theme';\nimport {DataSchema} from '../../utils/DataSchema';\nimport type {JSONSchema} from '../../utils/DataScope';\nimport {autobind} from '../../utils/helper';\nimport {VariableItem} from '../formula/Editor';\nimport VariableList from '../formula/VariableList';\nimport TooltipWrapper from '../TooltipWrapper';\n\nexport interface SchemaVariableListProps extends LocaleProps, ThemeProps {\n schemas?: Array<JSONSchema> | JSONSchema;\n value?: string;\n onSelect?: (value: string, schema: JSONSchema) => void;\n}\n\nexport interface SchemaVariableListState {\n variables: Array<VariableItem>;\n}\n\nexport class SchemaVariableList extends React.Component<\n SchemaVariableListProps,\n SchemaVariableListState\n> {\n state = {\n variables: this.schemasToVaraibles(this.props)\n };\n\n dataSchema?: DataSchema;\n\n constructor(props: SchemaVariableListProps) {\n super(props);\n }\n\n componentDidUpdate(prevProps: SchemaVariableListProps) {\n const props = this.props;\n\n if (props.schemas !== prevProps.schemas) {\n this.setState({\n variables: this.schemasToVaraibles(props)\n });\n }\n }\n\n schemasToVaraibles(props: SchemaVariableListProps) {\n const schemas = Array.isArray(props.schemas)\n ? props.schemas.concat()\n : props.schemas\n ? [props.schemas]\n : [];\n\n if (!schemas.length) {\n return [];\n }\n const dataSchema = new DataSchema(schemas);\n this.dataSchema = dataSchema;\n return dataSchema.getDataPropsAsOptions();\n }\n\n @autobind\n handleSelect(item: any) {\n const {onSelect} = this.props;\n const schema = this.dataSchema?.getSchemaByPath(item.value);\n\n onSelect?.(item.value, schema!);\n }\n\n @autobind\n itemRender(option: any) {\n const {classnames: cx, translate: __} = this.props;\n\n return (\n <span className={cx(`FormulaEditor-VariableList-item`)}>\n <label>{option.label}</label>\n <TooltipWrapper tooltip={option.description} tooltipTheme=\"dark\">\n <span className={cx(`FormulaEditor-VariableList-item-tag`)}>\n {__(`SchemaType.${option.type || 'any'}`)}\n </span>\n </TooltipWrapper>\n </span>\n );\n }\n\n render() {\n return (\n <VariableList\n data={this.state.variables}\n value={this.props.value}\n onSelect={this.handleSelect}\n selectMode=\"tree\"\n itemRender={this.itemRender}\n />\n );\n }\n}\n\nexport default localeable(themeable(SchemaVariableList));\n"
|
12
|
+
]
|
13
|
+
}
|
@@ -0,0 +1,305 @@
|
|
1
|
+
/// <reference types="hoist-non-react-statics" />
|
2
|
+
import React from 'react';
|
3
|
+
import { SchemaVariableListProps } from './SchemaVariableList';
|
4
|
+
export interface SchemaVariableListPickerProps extends SchemaVariableListProps {
|
5
|
+
children: (props: {
|
6
|
+
onClick: (e: React.MouseEvent) => void;
|
7
|
+
setState: (state: any) => void;
|
8
|
+
isOpened: boolean;
|
9
|
+
}) => JSX.Element;
|
10
|
+
value?: any;
|
11
|
+
onConfirm?: (value?: any) => void;
|
12
|
+
onCancel?: () => void;
|
13
|
+
}
|
14
|
+
export declare class SchemaVariableListPicker extends React.Component<SchemaVariableListPickerProps> {
|
15
|
+
render(): JSX.Element;
|
16
|
+
}
|
17
|
+
declare const _default: {
|
18
|
+
new (props: (Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
19
|
+
locale?: string | undefined;
|
20
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
21
|
+
}) | Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
22
|
+
locale?: string | undefined;
|
23
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
24
|
+
}>): {
|
25
|
+
render(): JSX.Element;
|
26
|
+
context: any;
|
27
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
28
|
+
locale?: string | undefined;
|
29
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
30
|
+
}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
31
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
32
|
+
readonly props: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
33
|
+
locale?: string | undefined;
|
34
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
35
|
+
}> & Readonly<{
|
36
|
+
children?: React.ReactNode;
|
37
|
+
}>;
|
38
|
+
state: Readonly<{}>;
|
39
|
+
refs: {
|
40
|
+
[key: string]: React.ReactInstance;
|
41
|
+
};
|
42
|
+
componentDidMount?(): void;
|
43
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
44
|
+
locale?: string | undefined;
|
45
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
46
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
47
|
+
componentWillUnmount?(): void;
|
48
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
49
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
50
|
+
locale?: string | undefined;
|
51
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
52
|
+
}>, prevState: Readonly<{}>): any;
|
53
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
54
|
+
locale?: string | undefined;
|
55
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
56
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
57
|
+
componentWillMount?(): void;
|
58
|
+
UNSAFE_componentWillMount?(): void;
|
59
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
60
|
+
locale?: string | undefined;
|
61
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
62
|
+
}>, nextContext: any): void;
|
63
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
64
|
+
locale?: string | undefined;
|
65
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
66
|
+
}>, nextContext: any): void;
|
67
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
68
|
+
locale?: string | undefined;
|
69
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
70
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
71
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
72
|
+
locale?: string | undefined;
|
73
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
74
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
75
|
+
};
|
76
|
+
new (props: Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
77
|
+
locale?: string | undefined;
|
78
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
79
|
+
}, context: any): {
|
80
|
+
render(): JSX.Element;
|
81
|
+
context: any;
|
82
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
83
|
+
locale?: string | undefined;
|
84
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
85
|
+
}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
86
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
87
|
+
readonly props: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
88
|
+
locale?: string | undefined;
|
89
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
90
|
+
}> & Readonly<{
|
91
|
+
children?: React.ReactNode;
|
92
|
+
}>;
|
93
|
+
state: Readonly<{}>;
|
94
|
+
refs: {
|
95
|
+
[key: string]: React.ReactInstance;
|
96
|
+
};
|
97
|
+
componentDidMount?(): void;
|
98
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
99
|
+
locale?: string | undefined;
|
100
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
101
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
102
|
+
componentWillUnmount?(): void;
|
103
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
104
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
105
|
+
locale?: string | undefined;
|
106
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
107
|
+
}>, prevState: Readonly<{}>): any;
|
108
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
109
|
+
locale?: string | undefined;
|
110
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
111
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
112
|
+
componentWillMount?(): void;
|
113
|
+
UNSAFE_componentWillMount?(): void;
|
114
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
115
|
+
locale?: string | undefined;
|
116
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
117
|
+
}>, nextContext: any): void;
|
118
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
119
|
+
locale?: string | undefined;
|
120
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
121
|
+
}>, nextContext: any): void;
|
122
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
123
|
+
locale?: string | undefined;
|
124
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
125
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
126
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, keyof import("../../locale").LocaleProps> & {
|
127
|
+
locale?: string | undefined;
|
128
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
129
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
130
|
+
};
|
131
|
+
displayName: string;
|
132
|
+
contextType: React.Context<string>;
|
133
|
+
ComposedComponent: React.ComponentType<{
|
134
|
+
new (props: (Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps) | Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>): {
|
135
|
+
render(): JSX.Element;
|
136
|
+
context: any;
|
137
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
138
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
139
|
+
readonly props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
|
140
|
+
children?: React.ReactNode;
|
141
|
+
}>;
|
142
|
+
state: Readonly<{}>;
|
143
|
+
refs: {
|
144
|
+
[key: string]: React.ReactInstance;
|
145
|
+
};
|
146
|
+
componentDidMount?(): void;
|
147
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
148
|
+
componentWillUnmount?(): void;
|
149
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
150
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
151
|
+
componentDidUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
152
|
+
componentWillMount?(): void;
|
153
|
+
UNSAFE_componentWillMount?(): void;
|
154
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
155
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
156
|
+
componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
157
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
158
|
+
};
|
159
|
+
new (props: Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, context: any): {
|
160
|
+
render(): JSX.Element;
|
161
|
+
context: any;
|
162
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
163
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
164
|
+
readonly props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
|
165
|
+
children?: React.ReactNode;
|
166
|
+
}>;
|
167
|
+
state: Readonly<{}>;
|
168
|
+
refs: {
|
169
|
+
[key: string]: React.ReactInstance;
|
170
|
+
};
|
171
|
+
componentDidMount?(): void;
|
172
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
173
|
+
componentWillUnmount?(): void;
|
174
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
175
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
176
|
+
componentDidUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
177
|
+
componentWillMount?(): void;
|
178
|
+
UNSAFE_componentWillMount?(): void;
|
179
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
180
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
181
|
+
componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
182
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
183
|
+
};
|
184
|
+
displayName: string;
|
185
|
+
contextType: React.Context<string>;
|
186
|
+
ComposedComponent: React.ComponentType<typeof SchemaVariableListPicker>;
|
187
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof SchemaVariableListPicker, {}> & {
|
188
|
+
ComposedComponent: typeof SchemaVariableListPicker;
|
189
|
+
}>;
|
190
|
+
} & import("hoist-non-react-statics").NonReactStatics<{
|
191
|
+
new (props: (Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps) | Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>): {
|
192
|
+
render(): JSX.Element;
|
193
|
+
context: any;
|
194
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
195
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
196
|
+
readonly props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
|
197
|
+
children?: React.ReactNode;
|
198
|
+
}>;
|
199
|
+
state: Readonly<{}>;
|
200
|
+
refs: {
|
201
|
+
[key: string]: React.ReactInstance;
|
202
|
+
};
|
203
|
+
componentDidMount?(): void;
|
204
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
205
|
+
componentWillUnmount?(): void;
|
206
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
207
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
208
|
+
componentDidUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
209
|
+
componentWillMount?(): void;
|
210
|
+
UNSAFE_componentWillMount?(): void;
|
211
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
212
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
213
|
+
componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
214
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
215
|
+
};
|
216
|
+
new (props: Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, context: any): {
|
217
|
+
render(): JSX.Element;
|
218
|
+
context: any;
|
219
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
220
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
221
|
+
readonly props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
|
222
|
+
children?: React.ReactNode;
|
223
|
+
}>;
|
224
|
+
state: Readonly<{}>;
|
225
|
+
refs: {
|
226
|
+
[key: string]: React.ReactInstance;
|
227
|
+
};
|
228
|
+
componentDidMount?(): void;
|
229
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
230
|
+
componentWillUnmount?(): void;
|
231
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
232
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
233
|
+
componentDidUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
234
|
+
componentWillMount?(): void;
|
235
|
+
UNSAFE_componentWillMount?(): void;
|
236
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
237
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
238
|
+
componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
239
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
240
|
+
};
|
241
|
+
displayName: string;
|
242
|
+
contextType: React.Context<string>;
|
243
|
+
ComposedComponent: React.ComponentType<typeof SchemaVariableListPicker>;
|
244
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof SchemaVariableListPicker, {}> & {
|
245
|
+
ComposedComponent: typeof SchemaVariableListPicker;
|
246
|
+
}, {}> & {
|
247
|
+
ComposedComponent: {
|
248
|
+
new (props: (Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps) | Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>): {
|
249
|
+
render(): JSX.Element;
|
250
|
+
context: any;
|
251
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
252
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
253
|
+
readonly props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
|
254
|
+
children?: React.ReactNode;
|
255
|
+
}>;
|
256
|
+
state: Readonly<{}>;
|
257
|
+
refs: {
|
258
|
+
[key: string]: React.ReactInstance;
|
259
|
+
};
|
260
|
+
componentDidMount?(): void;
|
261
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
262
|
+
componentWillUnmount?(): void;
|
263
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
264
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
265
|
+
componentDidUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
266
|
+
componentWillMount?(): void;
|
267
|
+
UNSAFE_componentWillMount?(): void;
|
268
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
269
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
270
|
+
componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
271
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
272
|
+
};
|
273
|
+
new (props: Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps, context: any): {
|
274
|
+
render(): JSX.Element;
|
275
|
+
context: any;
|
276
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
277
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
278
|
+
readonly props: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
|
279
|
+
children?: React.ReactNode;
|
280
|
+
}>;
|
281
|
+
state: Readonly<{}>;
|
282
|
+
refs: {
|
283
|
+
[key: string]: React.ReactInstance;
|
284
|
+
};
|
285
|
+
componentDidMount?(): void;
|
286
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
287
|
+
componentWillUnmount?(): void;
|
288
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
289
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
290
|
+
componentDidUpdate?(prevProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
291
|
+
componentWillMount?(): void;
|
292
|
+
UNSAFE_componentWillMount?(): void;
|
293
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
294
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
295
|
+
componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
296
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<SchemaVariableListPickerProps, keyof import("../../theme").ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
297
|
+
};
|
298
|
+
displayName: string;
|
299
|
+
contextType: React.Context<string>;
|
300
|
+
ComposedComponent: React.ComponentType<typeof SchemaVariableListPicker>;
|
301
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof SchemaVariableListPicker, {}> & {
|
302
|
+
ComposedComponent: typeof SchemaVariableListPicker;
|
303
|
+
};
|
304
|
+
};
|
305
|
+
export default _default;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SchemaVariableListPicker = void 0;
|
4
|
+
var tslib_1 = require("tslib");
|
5
|
+
var react_1 = (0, tslib_1.__importDefault)(require("react"));
|
6
|
+
var locale_1 = require("../../locale");
|
7
|
+
var theme_1 = require("../../theme");
|
8
|
+
var PickerContainer_1 = (0, tslib_1.__importDefault)(require("../PickerContainer"));
|
9
|
+
var SchemaVariableList_1 = (0, tslib_1.__importDefault)(require("./SchemaVariableList"));
|
10
|
+
var SchemaVariableListPicker = /** @class */ (function (_super) {
|
11
|
+
(0, tslib_1.__extends)(SchemaVariableListPicker, _super);
|
12
|
+
function SchemaVariableListPicker() {
|
13
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
14
|
+
}
|
15
|
+
SchemaVariableListPicker.prototype.render = function () {
|
16
|
+
var _a = this.props, __ = _a.translate, schemas = _a.schemas, value = _a.value, onConfirm = _a.onConfirm, onCancel = _a.onCancel, children = _a.children;
|
17
|
+
return (react_1.default.createElement(PickerContainer_1.default, { title: __('Select.placeholder'), bodyRender: function (_a) {
|
18
|
+
var _b;
|
19
|
+
var onClose = _a.onClose, value = _a.value, onChange = _a.onChange, setState = _a.setState, stateSchemas = _a.schemas, states = (0, tslib_1.__rest)(_a, ["onClose", "value", "onChange", "setState", "schemas"]);
|
20
|
+
return (react_1.default.createElement(SchemaVariableList_1.default, { value: (_b = value === null || value === void 0 ? void 0 : value.value) !== null && _b !== void 0 ? _b : value, onSelect: function (value, schema) {
|
21
|
+
return onChange({
|
22
|
+
value: value,
|
23
|
+
schema: schema
|
24
|
+
});
|
25
|
+
}, schemas: stateSchemas !== null && stateSchemas !== void 0 ? stateSchemas : schemas }));
|
26
|
+
}, value: value, onConfirm: onConfirm, onCancel: onCancel }, children));
|
27
|
+
};
|
28
|
+
return SchemaVariableListPicker;
|
29
|
+
}(react_1.default.Component));
|
30
|
+
exports.SchemaVariableListPicker = SchemaVariableListPicker;
|
31
|
+
exports.default = (0, locale_1.localeable)((0, theme_1.themeable)(SchemaVariableListPicker));
|
32
|
+
//# sourceMappingURL=./components/schema-editor/SchemaVariableListPicker.js.map
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"file": "SchemaVariableListPicker.js",
|
4
|
+
"sourceRoot": "",
|
5
|
+
"sources": [
|
6
|
+
"/src/components/schema-editor/SchemaVariableListPicker.tsx"
|
7
|
+
],
|
8
|
+
"names": [],
|
9
|
+
"mappings": ";;;;AAAA,6DAA0B;AAC1B,uCAAwC;AACxC,qCAAsC;AAEtC,oFAAiD;AACjD,yFAE8B;AAa9B;IAA8C,yDAA8C;IAA5F;;IA2CA,CAAC;IA1CC,yCAAM,GAAN;QACQ,IAAA,KAOF,IAAI,CAAC,KAAK,EAND,EAAE,eAAA,EACb,OAAO,aAAA,EACP,KAAK,WAAA,EACL,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,QAAQ,cACI,CAAC;QAEf,OAAO,CACL,8BAAC,yBAAe,IACd,KAAK,EAAE,EAAE,CAAC,oBAAoB,CAAC,EAC/B,UAAU,EAAE,UAAC,EAOZ;;gBANC,IAAA,OAAO,aAAA,EACP,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,QAAQ,cAAA,EACC,YAAY,aAAA,EAClB,MAAM,2BANE,uDAOZ,CADU;gBAET,OAAO,CACL,8BAAC,4BAAkB,IACjB,KAAK,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,mCAAI,KAAK,EAC5B,QAAQ,EAAE,UAAC,KAAK,EAAE,MAAM;wBACtB,OAAA,QAAQ,CAAC;4BACP,KAAK,OAAA;4BACL,MAAM,QAAA;yBACP,CAAC;oBAHF,CAGE,EAEJ,OAAO,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,OAAO,GAChC,CACH,CAAC;YACJ,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,IAEjB,QAAQ,CACO,CACnB,CAAC;IACJ,CAAC;IACH,+BAAC;AAAD,CAAC,AA3CD,CAA8C,eAAK,CAAC,SAAS,GA2C5D;AA3CY,4DAAwB;AA6CrC,kBAAe,IAAA,mBAAU,EAAC,IAAA,iBAAS,EAAC,wBAAwB,CAAC,CAAC,CAAC",
|
10
|
+
"sourcesContent": [
|
11
|
+
"import React from 'react';\nimport {localeable} from '../../locale';\nimport {themeable} from '../../theme';\nimport {autobind} from '../../utils/helper';\nimport PickerContainer from '../PickerContainer';\nimport SchemaVariableList, {\n SchemaVariableListProps\n} from './SchemaVariableList';\n\nexport interface SchemaVariableListPickerProps extends SchemaVariableListProps {\n children: (props: {\n onClick: (e: React.MouseEvent) => void;\n setState: (state: any) => void;\n isOpened: boolean;\n }) => JSX.Element;\n value?: any;\n onConfirm?: (value?: any) => void;\n onCancel?: () => void;\n}\n\nexport class SchemaVariableListPicker extends React.Component<SchemaVariableListPickerProps> {\n render() {\n const {\n translate: __,\n schemas,\n value,\n onConfirm,\n onCancel,\n children\n } = this.props;\n\n return (\n <PickerContainer\n title={__('Select.placeholder')}\n bodyRender={({\n onClose,\n value,\n onChange,\n setState,\n schemas: stateSchemas,\n ...states\n }) => {\n return (\n <SchemaVariableList\n value={value?.value ?? value}\n onSelect={(value, schema) =>\n onChange({\n value,\n schema\n })\n }\n schemas={stateSchemas ?? schemas}\n />\n );\n }}\n value={value}\n onConfirm={onConfirm}\n onCancel={onCancel}\n >\n {children}\n </PickerContainer>\n );\n }\n}\n\nexport default localeable(themeable(SchemaVariableListPicker));\n"
|
12
|
+
]
|
13
|
+
}
|