amis 1.4.2-beta.1 → 1.4.2-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 +11 -3
- package/lib/Schema.js.map +1 -1
- package/lib/components/AnchorNav.d.ts +22 -21
- package/lib/components/AnchorNav.js +7 -3
- package/lib/components/AnchorNav.js.map +2 -2
- package/lib/components/ArrayInput.d.ts +84 -84
- package/lib/components/AssociatedSelection.d.ts +930 -0
- package/lib/components/AssociatedSelection.js +89 -0
- package/lib/components/AssociatedSelection.js.map +13 -0
- package/lib/components/Badge.js +2 -2
- package/lib/components/Badge.js.map +2 -2
- package/lib/components/{ChainedCheckboxes.d.ts → ChainedSelection.d.ts} +267 -98
- package/lib/components/{ChainedCheckboxes.js → ChainedSelection.js} +30 -24
- package/lib/components/ChainedSelection.js.map +13 -0
- package/lib/components/Checkbox.d.ts +20 -20
- package/lib/components/Collapse.d.ts +51 -23
- package/lib/components/Collapse.js +69 -11
- package/lib/components/Collapse.js.map +2 -2
- package/lib/components/CollapseGroup.d.ts +88 -0
- package/lib/components/CollapseGroup.js +81 -0
- package/lib/components/CollapseGroup.js.map +13 -0
- package/lib/components/ColorPicker.d.ts +84 -84
- package/lib/components/DatePicker.d.ts +84 -84
- package/lib/components/DateRangePicker.d.ts +84 -84
- package/lib/components/Editor.d.ts +84 -84
- package/lib/components/GridNav.d.ts +52 -0
- package/lib/components/GridNav.js +123 -0
- package/lib/components/GridNav.js.map +13 -0
- package/lib/components/GroupedSelection.d.ts +907 -0
- package/lib/components/GroupedSelection.js +48 -0
- package/lib/components/GroupedSelection.js.map +13 -0
- package/lib/components/InputBox.d.ts +22 -21
- package/lib/components/InputBox.js +10 -2
- package/lib/components/InputBox.js.map +2 -2
- package/lib/components/Link.d.ts +29 -36
- package/lib/components/Link.js +14 -15
- package/lib/components/Link.js.map +2 -2
- package/lib/components/ListGroup.d.ts +21 -21
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/ModalManager.js.map +2 -2
- package/lib/components/MonthRangePicker.d.ts +84 -84
- package/lib/components/NumberInput.d.ts +20 -20
- package/lib/components/PickerColumn.d.ts +514 -0
- package/lib/components/PickerColumn.js +279 -0
- package/lib/components/PickerColumn.js.map +13 -0
- package/lib/components/PickerContainer.d.ts +513 -0
- package/lib/components/PickerContainer.js +96 -0
- package/lib/components/PickerContainer.js.map +13 -0
- package/lib/components/Radios.d.ts +22 -21
- package/lib/components/Radios.js +1 -0
- package/lib/components/Radios.js.map +2 -2
- package/lib/components/Rating.d.ts +21 -21
- package/lib/components/ResultBox.d.ts +84 -84
- package/lib/components/ResultBox.js +10 -2
- package/lib/components/ResultBox.js.map +2 -2
- package/lib/components/SearchBox.d.ts +84 -84
- package/lib/components/SearchBox.js +4 -4
- package/lib/components/SearchBox.js.map +2 -2
- package/lib/components/Select.d.ts +245 -237
- package/lib/components/Select.js +25 -4
- package/lib/components/Select.js.map +2 -2
- package/lib/components/{Checkboxes.d.ts → Selection.d.ts} +273 -98
- package/lib/components/Selection.js +134 -0
- package/lib/components/Selection.js.map +13 -0
- package/lib/components/{TableCheckboxes.d.ts → TableSelection.d.ts} +266 -96
- package/lib/components/{TableCheckboxes.js → TableSelection.js} +30 -30
- package/lib/components/TableSelection.js.map +13 -0
- package/lib/components/Tabs.d.ts +20 -20
- package/lib/components/TabsTransfer.d.ts +84 -84
- package/lib/components/TabsTransfer.js +9 -9
- package/lib/components/TabsTransfer.js.map +2 -2
- package/lib/components/TabsTransferPicker.d.ts +489 -0
- package/lib/components/TabsTransferPicker.js +60 -0
- package/lib/components/TabsTransferPicker.js.map +13 -0
- package/lib/components/Toast.d.ts +86 -85
- package/lib/components/Toast.js +6 -3
- package/lib/components/Toast.js.map +2 -2
- package/lib/components/Transfer.d.ts +908 -274
- package/lib/components/Transfer.js +31 -24
- package/lib/components/Transfer.js.map +2 -2
- package/lib/components/TransferDropDown.d.ts +488 -0
- package/lib/components/TransferDropDown.js +59 -0
- package/lib/components/TransferDropDown.js.map +13 -0
- package/lib/components/TransferPicker.d.ts +493 -0
- package/lib/components/TransferPicker.js +60 -0
- package/lib/components/TransferPicker.js.map +13 -0
- package/lib/components/Tree.d.ts +115 -84
- package/lib/components/Tree.js +183 -30
- package/lib/components/Tree.js.map +2 -2
- package/lib/components/{TreeCheckboxes.d.ts → TreeSelection.d.ts} +269 -99
- package/lib/components/{TreeCheckboxes.js → TreeSelection.js} +36 -32
- package/lib/components/TreeSelection.js.map +13 -0
- package/lib/components/WithRemoteConfig.js +1 -1
- package/lib/components/WithRemoteConfig.js.map +2 -2
- package/lib/components/condition-builder/Field.js +5 -2
- package/lib/components/condition-builder/Field.js.map +2 -2
- package/lib/components/condition-builder/Func.js +2 -2
- package/lib/components/condition-builder/Func.js.map +2 -2
- package/lib/components/condition-builder/InputSwitch.js +2 -2
- package/lib/components/condition-builder/InputSwitch.js.map +2 -2
- package/lib/components/condition-builder/Item.js +3 -3
- package/lib/components/condition-builder/Item.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 +8 -8
- package/lib/components/index.js +16 -16
- package/lib/components/index.js.map +2 -2
- package/lib/envOverwrite.d.ts +1 -1
- package/lib/envOverwrite.js +24 -9
- package/lib/envOverwrite.js.map +2 -2
- package/lib/factory.d.ts +15 -1
- package/lib/factory.js +35 -6
- package/lib/factory.js.map +2 -2
- package/lib/helper.css.map +1 -1
- package/lib/hooks/index.d.ts +5 -0
- package/lib/hooks/index.js +14 -0
- package/lib/hooks/index.js.map +13 -0
- package/lib/hooks/use-set-state.d.ts +2 -0
- package/lib/hooks/use-set-state.js +15 -0
- package/lib/hooks/use-set-state.js.map +13 -0
- package/lib/hooks/use-touch.d.ts +16 -0
- package/lib/hooks/use-touch.js +73 -0
- package/lib/hooks/use-touch.js.map +13 -0
- package/lib/hooks/use-update-effect.d.ts +3 -0
- package/lib/hooks/use-update-effect.js +17 -0
- package/lib/hooks/use-update-effect.js.map +13 -0
- package/lib/icons/download.js +7 -0
- package/lib/icons/drag-bar.js +10 -3
- package/lib/index.d.ts +5 -0
- package/lib/index.js +6 -1
- package/lib/index.js.map +2 -2
- package/lib/locale/de-DE.js +2 -0
- package/lib/locale/de-DE.js.map +2 -2
- package/lib/locale/en-US.js +3 -0
- package/lib/locale/en-US.js.map +2 -2
- package/lib/locale/zh-CN.js +5 -2
- package/lib/locale/zh-CN.js.map +2 -2
- package/lib/renderers/Action.d.ts +4 -3
- package/lib/renderers/Action.js +17 -4
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/AnchorNav.d.ts +1 -0
- package/lib/renderers/AnchorNav.js +2 -2
- package/lib/renderers/AnchorNav.js.map +2 -2
- package/lib/renderers/Avatar.js +3 -3
- package/lib/renderers/Avatar.js.map +2 -2
- package/lib/renderers/Breadcrumb.js +1 -1
- package/lib/renderers/Breadcrumb.js.map +2 -2
- package/lib/renderers/CRUD.d.ts +9 -0
- package/lib/renderers/CRUD.js +24 -4
- package/lib/renderers/CRUD.js.map +2 -2
- package/lib/renderers/Card.d.ts +4 -0
- package/lib/renderers/Card.js +29 -23
- package/lib/renderers/Card.js.map +2 -2
- package/lib/renderers/Chart.js +1 -1
- package/lib/renderers/Chart.js.map +2 -2
- package/lib/renderers/Collapse.d.ts +25 -20
- package/lib/renderers/Collapse.js +10 -72
- package/lib/renderers/Collapse.js.map +2 -2
- package/lib/renderers/CollapseGroup.d.ts +42 -0
- package/lib/renderers/CollapseGroup.js +33 -0
- package/lib/renderers/CollapseGroup.js.map +13 -0
- package/lib/renderers/DropDownButton.js +1 -1
- package/lib/renderers/DropDownButton.js.map +2 -2
- package/lib/renderers/Form/DiffEditor.d.ts +4 -3
- package/lib/renderers/Form/Editor.d.ts +3 -2
- package/lib/renderers/Form/InputCity.d.ts +84 -84
- package/lib/renderers/Form/InputCity.js +7 -6
- package/lib/renderers/Form/InputCity.js.map +2 -2
- package/lib/renderers/Form/InputColor.d.ts +84 -84
- package/lib/renderers/Form/InputFile.d.ts +6 -0
- package/lib/renderers/Form/InputFile.js +28 -8
- package/lib/renderers/Form/InputFile.js.map +2 -2
- package/lib/renderers/Form/InputImage.js +11 -4
- package/lib/renderers/Form/InputImage.js.map +2 -2
- package/lib/renderers/Form/Item.d.ts +1 -1
- package/lib/renderers/Form/Item.js +2 -1
- package/lib/renderers/Form/Item.js.map +2 -2
- package/lib/renderers/Form/Options.js +13 -3
- package/lib/renderers/Form/Options.js.map +2 -2
- package/lib/renderers/Form/Select.d.ts +42 -4
- package/lib/renderers/Form/Select.js +37 -3
- package/lib/renderers/Form/Select.js.map +2 -2
- package/lib/renderers/Form/TabsTransferPicker.d.ts +48 -0
- package/lib/renderers/Form/TabsTransferPicker.js +29 -0
- package/lib/renderers/Form/TabsTransferPicker.js.map +13 -0
- package/lib/renderers/Form/Transfer.js +18 -3
- package/lib/renderers/Form/Transfer.js.map +2 -2
- package/lib/renderers/Form/TransferPicker.d.ts +52 -0
- package/lib/renderers/Form/TransferPicker.js +43 -0
- package/lib/renderers/Form/TransferPicker.js.map +13 -0
- package/lib/renderers/Form/TreeSelect.js +2 -2
- package/lib/renderers/Form/TreeSelect.js.map +2 -2
- package/lib/renderers/Form/index.d.ts +5 -0
- package/lib/renderers/Form/index.js +5 -3
- package/lib/renderers/Form/index.js.map +2 -2
- package/lib/renderers/Form/wrapControl.js +13 -1
- package/lib/renderers/Form/wrapControl.js.map +2 -2
- package/lib/renderers/GridNav.d.ts +99 -0
- package/lib/renderers/GridNav.js +82 -0
- package/lib/renderers/GridNav.js.map +13 -0
- package/lib/renderers/IFrame.js +1 -3
- package/lib/renderers/IFrame.js.map +2 -2
- package/lib/renderers/Json.d.ts +4 -0
- package/lib/renderers/Json.js +4 -13
- package/lib/renderers/Json.js.map +2 -2
- package/lib/renderers/Link.d.ts +4 -2
- package/lib/renderers/Link.js +15 -6
- package/lib/renderers/Link.js.map +2 -2
- package/lib/renderers/List.js +1 -1
- package/lib/renderers/List.js.map +2 -2
- package/lib/renderers/Mapping.d.ts +9 -2
- package/lib/renderers/Mapping.js +18 -6
- package/lib/renderers/Mapping.js.map +2 -2
- package/lib/renderers/Nav.d.ts +21 -21
- package/lib/renderers/Nav.js +39 -21
- package/lib/renderers/Nav.js.map +2 -2
- package/lib/renderers/Portlet.d.ts +125 -0
- package/lib/renderers/Portlet.js +156 -0
- package/lib/renderers/Portlet.js.map +13 -0
- package/lib/renderers/Property.js +2 -1
- package/lib/renderers/Property.js.map +2 -2
- package/lib/renderers/SearchBox.d.ts +6 -1
- package/lib/renderers/SearchBox.js +19 -5
- package/lib/renderers/SearchBox.js.map +2 -2
- package/lib/renderers/Table/TableContent.d.ts +4 -1
- package/lib/renderers/Table/TableContent.js +21 -1
- package/lib/renderers/Table/TableContent.js.map +2 -2
- package/lib/renderers/Table/index.d.ts +5 -1
- package/lib/renderers/Table/index.js +65 -30
- package/lib/renderers/Table/index.js.map +2 -2
- package/lib/renderers/Tabs.js +9 -1
- package/lib/renderers/Tabs.js.map +2 -2
- package/lib/renderers/WebComponent.js +1 -1
- package/lib/renderers/WebComponent.js.map +2 -2
- package/lib/store/combo.d.ts +2 -16
- package/lib/store/crud.js +3 -7
- package/lib/store/crud.js.map +2 -2
- package/lib/store/form.d.ts +1 -1
- package/lib/store/form.js +5 -6
- package/lib/store/form.js.map +2 -2
- package/lib/store/formItem.js +44 -4
- package/lib/store/formItem.js.map +2 -2
- package/lib/store/service.js +5 -4
- package/lib/store/service.js.map +2 -2
- package/lib/store/table.d.ts +3 -2
- package/lib/store/table.js +35 -12
- package/lib/store/table.js.map +2 -2
- package/lib/themes/ang-ie11.css +689 -175
- package/lib/themes/ang.css +689 -175
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +689 -175
- package/lib/themes/antd.css +689 -175
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +728 -213
- package/lib/themes/cxd.css +728 -213
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +689 -175
- package/lib/themes/dark.css +689 -175
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default.css +728 -213
- package/lib/themes/default.css.map +1 -1
- package/lib/types.d.ts +38 -1
- package/lib/types.js +0 -5
- package/lib/types.js.map +2 -2
- package/lib/utils/api.d.ts +4 -2
- package/lib/utils/api.js +104 -17
- package/lib/utils/api.js.map +2 -2
- package/lib/utils/dom.d.ts +4 -0
- package/lib/utils/dom.js +11 -1
- package/lib/utils/dom.js.map +2 -2
- package/lib/utils/helper.d.ts +8 -0
- package/lib/utils/helper.js +28 -2
- package/lib/utils/helper.js.map +2 -2
- package/lib/utils/icon.js +3 -0
- package/lib/utils/icon.js.map +2 -2
- package/package.json +1 -1
- package/schema.json +3326 -836
- package/scss/_mixins.scss +1 -3
- package/scss/_properties.scss +25 -1
- package/scss/base/_common.scss +3 -0
- package/scss/base/_normalize.scss +2 -0
- package/scss/components/_anchor-nav.scss +89 -29
- package/scss/components/_card.scss +8 -14
- package/scss/components/_collapse-group.scss +11 -0
- package/scss/components/_collapse.scss +48 -22
- package/scss/components/_grid-nav.scss +128 -0
- package/scss/components/_input-box.scss +1 -0
- package/scss/components/_mapping.scss +6 -0
- package/scss/components/_nav.scss +2 -2
- package/scss/components/_picker-columns.scss +124 -0
- package/scss/components/_popover.scss +13 -0
- package/scss/components/_portlet.scss +51 -0
- package/scss/components/_result-box.scss +1 -0
- package/scss/components/_spinner.scss +5 -4
- package/scss/components/_status.scss +1 -1
- package/scss/components/_table.scss +32 -0
- package/scss/components/form/_checks.scss +0 -351
- package/scss/components/form/_combo.scss +4 -0
- package/scss/components/form/_fieldset.scss +5 -1
- package/scss/components/form/_file.scss +11 -0
- package/scss/components/form/_form.scss +48 -0
- package/scss/components/form/_selection.scss +354 -0
- package/scss/components/form/_transfer.scss +75 -18
- package/scss/components/form/_tree.scss +42 -0
- package/scss/themes/_common.scss +7 -0
- package/scss/themes/_cxd-variables.scss +8 -6
- package/scss/themes/cxd.scss +17 -12
- package/sdk/ang-ie11.css +786 -196
- package/sdk/ang.css +820 -213
- package/sdk/antd-ie11.css +786 -196
- package/sdk/antd.css +820 -213
- package/sdk/charts.js +13 -13
- package/sdk/color-picker.js +65 -69
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +825 -236
- package/sdk/cxd.css +862 -254
- package/sdk/dark-ie11.css +787 -197
- package/sdk/dark.css +820 -213
- package/sdk/exceljs.js +1 -1
- package/sdk/helper.css.map +1 -1
- package/sdk/iconfont.svg +2513 -0
- package/sdk/iconfont.ttf +0 -0
- package/sdk/iconfont.woff +0 -0
- package/sdk/locale/de-DE.js +2 -0
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +20 -28
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +825 -236
- package/sdk/sdk.css +862 -254
- package/sdk/sdk.js +1243 -1175
- 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 +19 -1
- package/src/components/AnchorNav.tsx +15 -4
- package/src/components/{AssociatedCheckboxes.tsx → AssociatedSelection.tsx} +43 -37
- package/src/components/Badge.tsx +3 -3
- package/src/components/{ChainedCheckboxes.tsx → ChainedSelection.tsx} +57 -40
- package/src/components/Collapse.tsx +144 -20
- package/src/components/CollapseGroup.tsx +130 -0
- package/src/components/GridNav.tsx +233 -0
- package/src/components/{ListCheckboxes.tsx → GroupedSelection.tsx} +26 -21
- package/src/components/InputBox.tsx +10 -9
- package/src/components/Link.tsx +28 -37
- package/src/components/ModalManager.ts +1 -1
- package/src/components/PickerColumn.tsx +429 -0
- package/src/components/PickerContainer.tsx +128 -0
- package/src/components/Radios.tsx +3 -8
- package/src/components/ResultBox.tsx +9 -9
- package/src/components/SearchBox.tsx +4 -5
- package/src/components/Select.tsx +57 -5
- package/src/components/{Checkboxes.tsx → Selection.tsx} +75 -21
- package/src/components/{TableCheckboxes.tsx → TableSelection.tsx} +46 -25
- package/src/components/TabsTransfer.tsx +13 -7
- package/src/components/TabsTransferPicker.tsx +85 -0
- package/src/components/Toast.tsx +23 -16
- package/src/components/Transfer.tsx +71 -50
- package/src/components/TransferDropDown.tsx +120 -0
- package/src/components/TransferPicker.tsx +91 -0
- package/src/components/Tree.tsx +194 -8
- package/src/components/{TreeCheckboxes.tsx → TreeSelection.tsx} +33 -26
- package/src/components/WithRemoteConfig.tsx +7 -2
- package/src/components/condition-builder/Field.tsx +5 -5
- package/src/components/condition-builder/Func.tsx +3 -3
- package/src/components/condition-builder/InputSwitch.tsx +3 -3
- package/src/components/condition-builder/Item.tsx +5 -12
- package/src/components/icons.tsx +2 -0
- package/src/components/index.tsx +13 -13
- package/src/envOverwrite.ts +20 -8
- package/src/factory.tsx +70 -9
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-set-state.ts +19 -0
- package/src/hooks/use-touch.ts +100 -0
- package/src/hooks/use-update-effect.ts +16 -0
- package/src/icons/download.svg +4 -0
- package/src/icons/drag-bar.svg +12 -6
- package/src/index.tsx +5 -0
- package/src/locale/de-DE.ts +2 -0
- package/src/locale/en-US.ts +3 -0
- package/src/locale/zh-CN.ts +5 -2
- package/src/renderers/Action.tsx +28 -2
- package/src/renderers/AnchorNav.tsx +4 -0
- package/src/renderers/Avatar.tsx +8 -4
- package/src/renderers/Breadcrumb.tsx +5 -1
- package/src/renderers/CRUD.tsx +33 -3
- package/src/renderers/Card.tsx +63 -34
- package/src/renderers/Chart.tsx +6 -2
- package/src/renderers/Collapse.tsx +70 -115
- package/src/renderers/CollapseGroup.tsx +80 -0
- package/src/renderers/DropDownButton.tsx +1 -1
- package/src/renderers/Form/InputCity.tsx +4 -8
- package/src/renderers/Form/InputFile.tsx +65 -24
- package/src/renderers/Form/InputImage.tsx +11 -3
- package/src/renderers/Form/Item.tsx +3 -2
- package/src/renderers/Form/Options.tsx +16 -2
- package/src/renderers/Form/Select.tsx +162 -21
- package/src/renderers/Form/TabsTransferPicker.tsx +123 -0
- package/src/renderers/Form/Transfer.tsx +19 -4
- package/src/renderers/Form/TransferPicker.tsx +145 -0
- package/src/renderers/Form/TreeSelect.tsx +25 -0
- package/src/renderers/Form/index.tsx +15 -2
- package/src/renderers/Form/wrapControl.tsx +26 -1
- package/src/renderers/GridNav.tsx +204 -0
- package/src/renderers/IFrame.tsx +2 -4
- package/src/renderers/Json.tsx +9 -9
- package/src/renderers/Link.tsx +27 -13
- package/src/renderers/List.tsx +1 -1
- package/src/renderers/Mapping.tsx +27 -11
- package/src/renderers/Nav.tsx +108 -60
- package/src/renderers/Portlet.tsx +423 -0
- package/src/renderers/Property.tsx +3 -2
- package/src/renderers/SearchBox.tsx +23 -4
- package/src/renderers/Table/TableContent.tsx +40 -2
- package/src/renderers/Table/index.tsx +88 -43
- package/src/renderers/Tabs.tsx +9 -1
- package/src/renderers/WebComponent.tsx +2 -2
- package/src/store/crud.ts +3 -8
- package/src/store/form.ts +5 -10
- package/src/store/formItem.ts +94 -2
- package/src/store/service.ts +5 -4
- package/src/store/table.ts +55 -14
- package/src/types.ts +58 -1
- package/src/utils/api.ts +133 -26
- package/src/utils/dom.tsx +12 -0
- package/src/utils/helper.ts +27 -0
- package/src/utils/icon.tsx +4 -0
- package/tsconfig-for-declaration.json +1 -1
- package/dump.rdb +0 -0
- package/lib/components/AssociatedCheckboxes.d.ts +0 -762
- package/lib/components/AssociatedCheckboxes.js +0 -90
- package/lib/components/AssociatedCheckboxes.js.map +0 -13
- package/lib/components/ChainedCheckboxes.js.map +0 -13
- package/lib/components/Checkboxes.js +0 -101
- package/lib/components/Checkboxes.js.map +0 -13
- package/lib/components/ListCheckboxes.d.ts +0 -739
- package/lib/components/ListCheckboxes.js +0 -48
- package/lib/components/ListCheckboxes.js.map +0 -13
- package/lib/components/ListRadios.d.ts +0 -763
- package/lib/components/ListRadios.js +0 -86
- package/lib/components/ListRadios.js.map +0 -13
- package/lib/components/TableCheckboxes.js.map +0 -13
- package/lib/components/TreeCheckboxes.js.map +0 -13
- package/lib/components/TreeRadios.d.ts +0 -838
- package/lib/components/TreeRadios.js +0 -116
- package/lib/components/TreeRadios.js.map +0 -13
- package/src/components/ListRadios.tsx +0 -159
- package/src/components/TreeRadios.tsx +0 -202
@@ -0,0 +1,513 @@
|
|
1
|
+
/// <reference types="hoist-non-react-statics" />
|
2
|
+
import React from 'react';
|
3
|
+
import { ThemeProps } from '../theme';
|
4
|
+
import { LocaleProps } from '../locale';
|
5
|
+
export interface PickerContainerProps extends ThemeProps, LocaleProps {
|
6
|
+
title?: string;
|
7
|
+
children: (props: {
|
8
|
+
onClick: (e: React.MouseEvent) => void;
|
9
|
+
isOpened: boolean;
|
10
|
+
}) => JSX.Element;
|
11
|
+
popOverRender: (props: {
|
12
|
+
onClose: () => void;
|
13
|
+
value: any;
|
14
|
+
onChange: (value: any) => void;
|
15
|
+
}) => JSX.Element;
|
16
|
+
value?: any;
|
17
|
+
onConfirm?: (value?: any) => void;
|
18
|
+
onCancel?: () => void;
|
19
|
+
popOverContainer?: any;
|
20
|
+
popOverClassName?: string;
|
21
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
22
|
+
}
|
23
|
+
export interface PickerContainerState {
|
24
|
+
isOpened: boolean;
|
25
|
+
value?: any;
|
26
|
+
}
|
27
|
+
export declare class PickerContainer extends React.Component<PickerContainerProps, PickerContainerState> {
|
28
|
+
state: PickerContainerState;
|
29
|
+
componentDidUpdate(prevProps: PickerContainerProps): void;
|
30
|
+
handleClick(): void;
|
31
|
+
close(e?: any, callback?: () => void): void;
|
32
|
+
handleChange(value: any): void;
|
33
|
+
confirm(): void;
|
34
|
+
render(): JSX.Element;
|
35
|
+
}
|
36
|
+
declare const _default: {
|
37
|
+
new (props: (Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
38
|
+
locale?: string | undefined;
|
39
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
40
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps) | Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
41
|
+
locale?: string | undefined;
|
42
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
43
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>): {
|
44
|
+
render(): JSX.Element;
|
45
|
+
context: any;
|
46
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
47
|
+
locale?: string | undefined;
|
48
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
49
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
50
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
51
|
+
readonly props: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
52
|
+
locale?: string | undefined;
|
53
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
54
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps> & Readonly<{
|
55
|
+
children?: React.ReactNode;
|
56
|
+
}>;
|
57
|
+
state: Readonly<{}>;
|
58
|
+
refs: {
|
59
|
+
[key: string]: React.ReactInstance;
|
60
|
+
};
|
61
|
+
componentDidMount?(): void;
|
62
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
63
|
+
locale?: string | undefined;
|
64
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
65
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
66
|
+
componentWillUnmount?(): void;
|
67
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
68
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
69
|
+
locale?: string | undefined;
|
70
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
71
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
72
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
73
|
+
locale?: string | undefined;
|
74
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
75
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
76
|
+
componentWillMount?(): void;
|
77
|
+
UNSAFE_componentWillMount?(): void;
|
78
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
79
|
+
locale?: string | undefined;
|
80
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
81
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
|
82
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
83
|
+
locale?: string | undefined;
|
84
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
85
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
|
86
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
87
|
+
locale?: string | undefined;
|
88
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
89
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
90
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
91
|
+
locale?: string | undefined;
|
92
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
93
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
94
|
+
};
|
95
|
+
new (props: Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
96
|
+
locale?: string | undefined;
|
97
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
98
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps, context: any): {
|
99
|
+
render(): JSX.Element;
|
100
|
+
context: any;
|
101
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
102
|
+
locale?: string | undefined;
|
103
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
104
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
105
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
106
|
+
readonly props: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
107
|
+
locale?: string | undefined;
|
108
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
109
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps> & Readonly<{
|
110
|
+
children?: React.ReactNode;
|
111
|
+
}>;
|
112
|
+
state: Readonly<{}>;
|
113
|
+
refs: {
|
114
|
+
[key: string]: React.ReactInstance;
|
115
|
+
};
|
116
|
+
componentDidMount?(): void;
|
117
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
118
|
+
locale?: string | undefined;
|
119
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
120
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
121
|
+
componentWillUnmount?(): void;
|
122
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
123
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
124
|
+
locale?: string | undefined;
|
125
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
126
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
127
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
128
|
+
locale?: string | undefined;
|
129
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
130
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
131
|
+
componentWillMount?(): void;
|
132
|
+
UNSAFE_componentWillMount?(): void;
|
133
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
134
|
+
locale?: string | undefined;
|
135
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
136
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
|
137
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
138
|
+
locale?: string | undefined;
|
139
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
140
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
|
141
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
142
|
+
locale?: string | undefined;
|
143
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
144
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
145
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<PickerContainerProps, keyof LocaleProps> & {
|
146
|
+
locale?: string | undefined;
|
147
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
148
|
+
}, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
149
|
+
};
|
150
|
+
displayName: string;
|
151
|
+
contextType: React.Context<string>;
|
152
|
+
ComposedComponent: React.ComponentType<{
|
153
|
+
new (props: (Omit<PickerContainerProps, keyof LocaleProps> & {
|
154
|
+
locale?: string | undefined;
|
155
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
156
|
+
}) | Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
157
|
+
locale?: string | undefined;
|
158
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
159
|
+
}>): {
|
160
|
+
render(): JSX.Element;
|
161
|
+
context: any;
|
162
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
163
|
+
locale?: string | undefined;
|
164
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
165
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
166
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
167
|
+
readonly props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
168
|
+
locale?: string | undefined;
|
169
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
170
|
+
}> & Readonly<{
|
171
|
+
children?: React.ReactNode;
|
172
|
+
}>;
|
173
|
+
state: Readonly<{}>;
|
174
|
+
refs: {
|
175
|
+
[key: string]: React.ReactInstance;
|
176
|
+
};
|
177
|
+
componentDidMount?(): void;
|
178
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
179
|
+
locale?: string | undefined;
|
180
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
181
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
182
|
+
componentWillUnmount?(): void;
|
183
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
184
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
185
|
+
locale?: string | undefined;
|
186
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
187
|
+
}>, prevState: Readonly<{}>): any;
|
188
|
+
componentDidUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
189
|
+
locale?: string | undefined;
|
190
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
191
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
192
|
+
componentWillMount?(): void;
|
193
|
+
UNSAFE_componentWillMount?(): void;
|
194
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
195
|
+
locale?: string | undefined;
|
196
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
197
|
+
}>, nextContext: any): void;
|
198
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
199
|
+
locale?: string | undefined;
|
200
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
201
|
+
}>, nextContext: any): void;
|
202
|
+
componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
203
|
+
locale?: string | undefined;
|
204
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
205
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
206
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
207
|
+
locale?: string | undefined;
|
208
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
209
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
210
|
+
};
|
211
|
+
new (props: Omit<PickerContainerProps, keyof LocaleProps> & {
|
212
|
+
locale?: string | undefined;
|
213
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
214
|
+
}, context: any): {
|
215
|
+
render(): JSX.Element;
|
216
|
+
context: any;
|
217
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
218
|
+
locale?: string | undefined;
|
219
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
220
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
221
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
222
|
+
readonly props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
223
|
+
locale?: string | undefined;
|
224
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
225
|
+
}> & Readonly<{
|
226
|
+
children?: React.ReactNode;
|
227
|
+
}>;
|
228
|
+
state: Readonly<{}>;
|
229
|
+
refs: {
|
230
|
+
[key: string]: React.ReactInstance;
|
231
|
+
};
|
232
|
+
componentDidMount?(): void;
|
233
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
234
|
+
locale?: string | undefined;
|
235
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
236
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
237
|
+
componentWillUnmount?(): void;
|
238
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
239
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
240
|
+
locale?: string | undefined;
|
241
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
242
|
+
}>, prevState: Readonly<{}>): any;
|
243
|
+
componentDidUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
244
|
+
locale?: string | undefined;
|
245
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
246
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
247
|
+
componentWillMount?(): void;
|
248
|
+
UNSAFE_componentWillMount?(): void;
|
249
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
250
|
+
locale?: string | undefined;
|
251
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
252
|
+
}>, nextContext: any): void;
|
253
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
254
|
+
locale?: string | undefined;
|
255
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
256
|
+
}>, nextContext: any): void;
|
257
|
+
componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
258
|
+
locale?: string | undefined;
|
259
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
260
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
261
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
262
|
+
locale?: string | undefined;
|
263
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
264
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
265
|
+
};
|
266
|
+
displayName: string;
|
267
|
+
contextType: React.Context<string>;
|
268
|
+
ComposedComponent: React.ComponentType<typeof PickerContainer>;
|
269
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof PickerContainer, {}> & {
|
270
|
+
ComposedComponent: typeof PickerContainer;
|
271
|
+
}>;
|
272
|
+
} & import("hoist-non-react-statics").NonReactStatics<{
|
273
|
+
new (props: (Omit<PickerContainerProps, keyof LocaleProps> & {
|
274
|
+
locale?: string | undefined;
|
275
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
276
|
+
}) | Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
277
|
+
locale?: string | undefined;
|
278
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
279
|
+
}>): {
|
280
|
+
render(): JSX.Element;
|
281
|
+
context: any;
|
282
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
283
|
+
locale?: string | undefined;
|
284
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
285
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
286
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
287
|
+
readonly props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
288
|
+
locale?: string | undefined;
|
289
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
290
|
+
}> & Readonly<{
|
291
|
+
children?: React.ReactNode;
|
292
|
+
}>;
|
293
|
+
state: Readonly<{}>;
|
294
|
+
refs: {
|
295
|
+
[key: string]: React.ReactInstance;
|
296
|
+
};
|
297
|
+
componentDidMount?(): void;
|
298
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
299
|
+
locale?: string | undefined;
|
300
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
301
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
302
|
+
componentWillUnmount?(): void;
|
303
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
304
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
305
|
+
locale?: string | undefined;
|
306
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
307
|
+
}>, prevState: Readonly<{}>): any;
|
308
|
+
componentDidUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
309
|
+
locale?: string | undefined;
|
310
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
311
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
312
|
+
componentWillMount?(): void;
|
313
|
+
UNSAFE_componentWillMount?(): void;
|
314
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
315
|
+
locale?: string | undefined;
|
316
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
317
|
+
}>, nextContext: any): void;
|
318
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
319
|
+
locale?: string | undefined;
|
320
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
321
|
+
}>, nextContext: any): void;
|
322
|
+
componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
323
|
+
locale?: string | undefined;
|
324
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
325
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
326
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
327
|
+
locale?: string | undefined;
|
328
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
329
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
330
|
+
};
|
331
|
+
new (props: Omit<PickerContainerProps, keyof LocaleProps> & {
|
332
|
+
locale?: string | undefined;
|
333
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
334
|
+
}, context: any): {
|
335
|
+
render(): JSX.Element;
|
336
|
+
context: any;
|
337
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
338
|
+
locale?: string | undefined;
|
339
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
340
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
341
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
342
|
+
readonly props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
343
|
+
locale?: string | undefined;
|
344
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
345
|
+
}> & Readonly<{
|
346
|
+
children?: React.ReactNode;
|
347
|
+
}>;
|
348
|
+
state: Readonly<{}>;
|
349
|
+
refs: {
|
350
|
+
[key: string]: React.ReactInstance;
|
351
|
+
};
|
352
|
+
componentDidMount?(): void;
|
353
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
354
|
+
locale?: string | undefined;
|
355
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
356
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
357
|
+
componentWillUnmount?(): void;
|
358
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
359
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
360
|
+
locale?: string | undefined;
|
361
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
362
|
+
}>, prevState: Readonly<{}>): any;
|
363
|
+
componentDidUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
364
|
+
locale?: string | undefined;
|
365
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
366
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
367
|
+
componentWillMount?(): void;
|
368
|
+
UNSAFE_componentWillMount?(): void;
|
369
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
370
|
+
locale?: string | undefined;
|
371
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
372
|
+
}>, nextContext: any): void;
|
373
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
374
|
+
locale?: string | undefined;
|
375
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
376
|
+
}>, nextContext: any): void;
|
377
|
+
componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
378
|
+
locale?: string | undefined;
|
379
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
380
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
381
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
382
|
+
locale?: string | undefined;
|
383
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
384
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
385
|
+
};
|
386
|
+
displayName: string;
|
387
|
+
contextType: React.Context<string>;
|
388
|
+
ComposedComponent: React.ComponentType<typeof PickerContainer>;
|
389
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof PickerContainer, {}> & {
|
390
|
+
ComposedComponent: typeof PickerContainer;
|
391
|
+
}, {}> & {
|
392
|
+
ComposedComponent: {
|
393
|
+
new (props: (Omit<PickerContainerProps, keyof LocaleProps> & {
|
394
|
+
locale?: string | undefined;
|
395
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
396
|
+
}) | Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
397
|
+
locale?: string | undefined;
|
398
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
399
|
+
}>): {
|
400
|
+
render(): JSX.Element;
|
401
|
+
context: any;
|
402
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
403
|
+
locale?: string | undefined;
|
404
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
405
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
406
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
407
|
+
readonly props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
408
|
+
locale?: string | undefined;
|
409
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
410
|
+
}> & Readonly<{
|
411
|
+
children?: React.ReactNode;
|
412
|
+
}>;
|
413
|
+
state: Readonly<{}>;
|
414
|
+
refs: {
|
415
|
+
[key: string]: React.ReactInstance;
|
416
|
+
};
|
417
|
+
componentDidMount?(): void;
|
418
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
419
|
+
locale?: string | undefined;
|
420
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
421
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
422
|
+
componentWillUnmount?(): void;
|
423
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
424
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
425
|
+
locale?: string | undefined;
|
426
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
427
|
+
}>, prevState: Readonly<{}>): any;
|
428
|
+
componentDidUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
429
|
+
locale?: string | undefined;
|
430
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
431
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
432
|
+
componentWillMount?(): void;
|
433
|
+
UNSAFE_componentWillMount?(): void;
|
434
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
435
|
+
locale?: string | undefined;
|
436
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
437
|
+
}>, nextContext: any): void;
|
438
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
439
|
+
locale?: string | undefined;
|
440
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
441
|
+
}>, nextContext: any): void;
|
442
|
+
componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
443
|
+
locale?: string | undefined;
|
444
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
445
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
446
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
447
|
+
locale?: string | undefined;
|
448
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
449
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
450
|
+
};
|
451
|
+
new (props: Omit<PickerContainerProps, keyof LocaleProps> & {
|
452
|
+
locale?: string | undefined;
|
453
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
454
|
+
}, context: any): {
|
455
|
+
render(): JSX.Element;
|
456
|
+
context: any;
|
457
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
458
|
+
locale?: string | undefined;
|
459
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
460
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
461
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
462
|
+
readonly props: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
463
|
+
locale?: string | undefined;
|
464
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
465
|
+
}> & Readonly<{
|
466
|
+
children?: React.ReactNode;
|
467
|
+
}>;
|
468
|
+
state: Readonly<{}>;
|
469
|
+
refs: {
|
470
|
+
[key: string]: React.ReactInstance;
|
471
|
+
};
|
472
|
+
componentDidMount?(): void;
|
473
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
474
|
+
locale?: string | undefined;
|
475
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
476
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
477
|
+
componentWillUnmount?(): void;
|
478
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
479
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
480
|
+
locale?: string | undefined;
|
481
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
482
|
+
}>, prevState: Readonly<{}>): any;
|
483
|
+
componentDidUpdate?(prevProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
484
|
+
locale?: string | undefined;
|
485
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
486
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
487
|
+
componentWillMount?(): void;
|
488
|
+
UNSAFE_componentWillMount?(): void;
|
489
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
490
|
+
locale?: string | undefined;
|
491
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
492
|
+
}>, nextContext: any): void;
|
493
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
494
|
+
locale?: string | undefined;
|
495
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
496
|
+
}>, nextContext: any): void;
|
497
|
+
componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
498
|
+
locale?: string | undefined;
|
499
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
500
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
501
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<PickerContainerProps, keyof LocaleProps> & {
|
502
|
+
locale?: string | undefined;
|
503
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
504
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
505
|
+
};
|
506
|
+
displayName: string;
|
507
|
+
contextType: React.Context<string>;
|
508
|
+
ComposedComponent: React.ComponentType<typeof PickerContainer>;
|
509
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof PickerContainer, {}> & {
|
510
|
+
ComposedComponent: typeof PickerContainer;
|
511
|
+
};
|
512
|
+
};
|
513
|
+
export default _default;
|
@@ -0,0 +1,96 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.PickerContainer = void 0;
|
4
|
+
var tslib_1 = require("tslib");
|
5
|
+
var react_1 = (0, tslib_1.__importDefault)(require("react"));
|
6
|
+
var helper_1 = require("../utils/helper");
|
7
|
+
var Modal_1 = (0, tslib_1.__importDefault)(require("./Modal"));
|
8
|
+
var theme_1 = require("../theme");
|
9
|
+
var locale_1 = require("../locale");
|
10
|
+
var Button_1 = (0, tslib_1.__importDefault)(require("./Button"));
|
11
|
+
var PickerContainer = /** @class */ (function (_super) {
|
12
|
+
(0, tslib_1.__extends)(PickerContainer, _super);
|
13
|
+
function PickerContainer() {
|
14
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
15
|
+
_this.state = {
|
16
|
+
isOpened: false,
|
17
|
+
value: _this.props.value
|
18
|
+
};
|
19
|
+
return _this;
|
20
|
+
}
|
21
|
+
PickerContainer.prototype.componentDidUpdate = function (prevProps) {
|
22
|
+
var props = this.props;
|
23
|
+
if (props.value !== prevProps.value) {
|
24
|
+
this.setState({
|
25
|
+
value: props.value
|
26
|
+
});
|
27
|
+
}
|
28
|
+
};
|
29
|
+
PickerContainer.prototype.handleClick = function () {
|
30
|
+
this.setState({
|
31
|
+
isOpened: true
|
32
|
+
});
|
33
|
+
};
|
34
|
+
PickerContainer.prototype.close = function (e, callback) {
|
35
|
+
var _this = this;
|
36
|
+
this.setState({
|
37
|
+
isOpened: false
|
38
|
+
}, callback || (function () { var _a, _b; return (_b = (_a = _this.props).onCancel) === null || _b === void 0 ? void 0 : _b.call(_a); }));
|
39
|
+
};
|
40
|
+
PickerContainer.prototype.handleChange = function (value) {
|
41
|
+
this.setState({
|
42
|
+
value: value
|
43
|
+
});
|
44
|
+
};
|
45
|
+
PickerContainer.prototype.confirm = function () {
|
46
|
+
var _this = this;
|
47
|
+
var onConfirm = this.props.onConfirm;
|
48
|
+
this.close(undefined, function () { return onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(_this.state.value); });
|
49
|
+
};
|
50
|
+
PickerContainer.prototype.render = function () {
|
51
|
+
var _a = this.props, children = _a.children, dropdownRender = _a.popOverRender, title = _a.title, __ = _a.translate, size = _a.size;
|
52
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
53
|
+
children({
|
54
|
+
isOpened: this.state.isOpened,
|
55
|
+
onClick: this.handleClick
|
56
|
+
}),
|
57
|
+
react_1.default.createElement(Modal_1.default, { size: size, closeOnEsc: true, show: this.state.isOpened, onHide: this.close },
|
58
|
+
react_1.default.createElement(Modal_1.default.Header, { onClose: this.close }, __(title || 'Select.placeholder')),
|
59
|
+
react_1.default.createElement(Modal_1.default.Body, null, dropdownRender({
|
60
|
+
onClose: this.close,
|
61
|
+
value: this.state.value,
|
62
|
+
onChange: this.handleChange
|
63
|
+
})),
|
64
|
+
react_1.default.createElement(Modal_1.default.Footer, null,
|
65
|
+
react_1.default.createElement(Button_1.default, { onClick: this.close }, __('cancel')),
|
66
|
+
react_1.default.createElement(Button_1.default, { onClick: this.confirm, level: "primary" }, __('confirm'))))));
|
67
|
+
};
|
68
|
+
(0, tslib_1.__decorate)([
|
69
|
+
helper_1.autobind,
|
70
|
+
(0, tslib_1.__metadata)("design:type", Function),
|
71
|
+
(0, tslib_1.__metadata)("design:paramtypes", []),
|
72
|
+
(0, tslib_1.__metadata)("design:returntype", void 0)
|
73
|
+
], PickerContainer.prototype, "handleClick", null);
|
74
|
+
(0, tslib_1.__decorate)([
|
75
|
+
helper_1.autobind,
|
76
|
+
(0, tslib_1.__metadata)("design:type", Function),
|
77
|
+
(0, tslib_1.__metadata)("design:paramtypes", [Object, Function]),
|
78
|
+
(0, tslib_1.__metadata)("design:returntype", void 0)
|
79
|
+
], PickerContainer.prototype, "close", null);
|
80
|
+
(0, tslib_1.__decorate)([
|
81
|
+
helper_1.autobind,
|
82
|
+
(0, tslib_1.__metadata)("design:type", Function),
|
83
|
+
(0, tslib_1.__metadata)("design:paramtypes", [Object]),
|
84
|
+
(0, tslib_1.__metadata)("design:returntype", void 0)
|
85
|
+
], PickerContainer.prototype, "handleChange", null);
|
86
|
+
(0, tslib_1.__decorate)([
|
87
|
+
helper_1.autobind,
|
88
|
+
(0, tslib_1.__metadata)("design:type", Function),
|
89
|
+
(0, tslib_1.__metadata)("design:paramtypes", []),
|
90
|
+
(0, tslib_1.__metadata)("design:returntype", void 0)
|
91
|
+
], PickerContainer.prototype, "confirm", null);
|
92
|
+
return PickerContainer;
|
93
|
+
}(react_1.default.Component));
|
94
|
+
exports.PickerContainer = PickerContainer;
|
95
|
+
exports.default = (0, theme_1.themeable)((0, locale_1.localeable)(PickerContainer));
|
96
|
+
//# sourceMappingURL=./components/PickerContainer.js.map
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"file": "PickerContainer.js",
|
4
|
+
"sourceRoot": "",
|
5
|
+
"sources": [
|
6
|
+
"/src/components/PickerContainer.tsx"
|
7
|
+
],
|
8
|
+
"names": [],
|
9
|
+
"mappings": ";;;;AAAA,6DAA0B;AAC1B,0CAAyC;AAIzC,+DAA4B;AAC5B,kCAA+C;AAC/C,oCAAkD;AAClD,iEAA8B;AA0B9B;IAAqC,gDAGpC;IAHD;QAAA,qEA2FC;QAvFC,WAAK,GAAyB;YAC5B,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,KAAI,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;;IAoFJ,CAAC;IAlFC,4CAAkB,GAAlB,UAAmB,SAA+B;QAChD,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,EAAE;YACnC,IAAI,CAAC,QAAQ,CAAC;gBACZ,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB,CAAC,CAAC;SACJ;IACH,CAAC;IAGD,qCAAW,GAAX;QACE,IAAI,CAAC,QAAQ,CAAC;YACZ,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;IACL,CAAC;IAGD,+BAAK,GAAL,UAAM,CAAO,EAAE,QAAqB;QADpC,iBAQC;QANC,IAAI,CAAC,QAAQ,CACX;YACE,QAAQ,EAAE,KAAK;SAChB,EACD,QAAQ,IAAI,CAAC,0BAAM,OAAA,MAAA,MAAA,KAAI,CAAC,KAAK,EAAC,QAAQ,kDAAI,CAAA,EAAA,CAAC,CAC5C,CAAC;IACJ,CAAC;IAGD,sCAAY,GAAZ,UAAa,KAAU;QACrB,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK,OAAA;SACN,CAAC,CAAC;IACL,CAAC;IAGD,iCAAO,GAAP;QADA,iBAKC;QAHQ,IAAA,SAAS,GAAI,IAAI,CAAC,KAAK,UAAd,CAAe;QAE/B,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,cAAM,OAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAA7B,CAA6B,CAAC,CAAC;IAC7D,CAAC;IAED,gCAAM,GAAN;QACQ,IAAA,KAMF,IAAI,CAAC,KAAK,EALZ,QAAQ,cAAA,EACO,cAAc,mBAAA,EAC7B,KAAK,WAAA,EACM,EAAE,eAAA,EACb,IAAI,UACQ,CAAC;QACf,OAAO,CACL;YACG,QAAQ,CAAC;gBACR,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;gBAC7B,OAAO,EAAE,IAAI,CAAC,WAAW;aAC1B,CAAC;YAEF,8BAAC,eAAK,IACJ,IAAI,EAAE,IAAI,EACV,UAAU,QACV,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EACzB,MAAM,EAAE,IAAI,CAAC,KAAK;gBAElB,8BAAC,eAAK,CAAC,MAAM,IAAC,OAAO,EAAE,IAAI,CAAC,KAAK,IAC9B,EAAE,CAAC,KAAK,IAAI,oBAAoB,CAAC,CACrB;gBACf,8BAAC,eAAK,CAAC,IAAI,QACR,cAAc,CAAC;oBACd,OAAO,EAAE,IAAI,CAAC,KAAK;oBACnB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;oBACvB,QAAQ,EAAE,IAAI,CAAC,YAAY;iBAC5B,CAAC,CACS;gBACb,8BAAC,eAAK,CAAC,MAAM;oBACX,8BAAC,gBAAM,IAAC,OAAO,EAAE,IAAI,CAAC,KAAK,IAAG,EAAE,CAAC,QAAQ,CAAC,CAAU;oBACpD,8BAAC,gBAAM,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAC,SAAS,IAC3C,EAAE,CAAC,SAAS,CAAC,CACP,CACI,CACT,CACP,CACJ,CAAC;IACJ,CAAC;IAtED;QADC,iBAAQ;;;;sDAKR;IAGD;QADC,iBAAQ;;;;gDAQR;IAGD;QADC,iBAAQ;;;;uDAKR;IAGD;QADC,iBAAQ;;;;kDAKR;IA2CH,sBAAC;CAAA,AA3FD,CAAqC,eAAK,CAAC,SAAS,GA2FnD;AA3FY,0CAAe;AA6F5B,kBAAe,IAAA,iBAAS,EAAC,IAAA,mBAAU,EAAC,eAAe,CAAC,CAAC,CAAC",
|
10
|
+
"sourcesContent": [
|
11
|
+
"import React from 'react';\nimport {autobind} from '../utils/helper';\nimport Overlay from './Overlay';\nimport PopOver from './PopOver';\nimport {findDOMNode} from 'react-dom';\nimport Modal from './Modal';\nimport {themeable, ThemeProps} from '../theme';\nimport {localeable, LocaleProps} from '../locale';\nimport Button from './Button';\n\nexport interface PickerContainerProps extends ThemeProps, LocaleProps {\n title?: string;\n children: (props: {\n onClick: (e: React.MouseEvent) => void;\n isOpened: boolean;\n }) => JSX.Element;\n popOverRender: (props: {\n onClose: () => void;\n value: any;\n onChange: (value: any) => void;\n }) => JSX.Element;\n value?: any;\n onConfirm?: (value?: any) => void;\n onCancel?: () => void;\n popOverContainer?: any;\n popOverClassName?: string;\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n}\n\nexport interface PickerContainerState {\n isOpened: boolean;\n value?: any;\n}\n\nexport class PickerContainer extends React.Component<\n PickerContainerProps,\n PickerContainerState\n> {\n state: PickerContainerState = {\n isOpened: false,\n value: this.props.value\n };\n\n componentDidUpdate(prevProps: PickerContainerProps) {\n const props = this.props;\n\n if (props.value !== prevProps.value) {\n this.setState({\n value: props.value\n });\n }\n }\n\n @autobind\n handleClick() {\n this.setState({\n isOpened: true\n });\n }\n\n @autobind\n close(e?: any, callback?: () => void) {\n this.setState(\n {\n isOpened: false\n },\n callback || (() => this.props.onCancel?.())\n );\n }\n\n @autobind\n handleChange(value: any) {\n this.setState({\n value\n });\n }\n\n @autobind\n confirm() {\n const {onConfirm} = this.props;\n\n this.close(undefined, () => onConfirm?.(this.state.value));\n }\n\n render() {\n const {\n children,\n popOverRender: dropdownRender,\n title,\n translate: __,\n size\n } = this.props;\n return (\n <>\n {children({\n isOpened: this.state.isOpened,\n onClick: this.handleClick\n })}\n\n <Modal\n size={size}\n closeOnEsc\n show={this.state.isOpened}\n onHide={this.close}\n >\n <Modal.Header onClose={this.close}>\n {__(title || 'Select.placeholder')}\n </Modal.Header>\n <Modal.Body>\n {dropdownRender({\n onClose: this.close,\n value: this.state.value,\n onChange: this.handleChange\n })}\n </Modal.Body>\n <Modal.Footer>\n <Button onClick={this.close}>{__('cancel')}</Button>\n <Button onClick={this.confirm} level=\"primary\">\n {__('confirm')}\n </Button>\n </Modal.Footer>\n </Modal>\n </>\n );\n }\n}\n\nexport default themeable(localeable(PickerContainer));\n"
|
12
|
+
]
|
13
|
+
}
|