amis 1.3.5-beta.6 → 1.4.2-beta.1
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/README.md +1 -1
- package/lib/Schema.d.ts +17 -0
- package/lib/Schema.js.map +1 -1
- package/lib/components/Alert.js +3 -1
- package/lib/components/Alert.js.map +2 -2
- package/lib/components/Badge.d.ts +16 -3
- package/lib/components/Badge.js +53 -4
- package/lib/components/Badge.js.map +2 -2
- package/lib/components/Button.d.ts +24 -22
- package/lib/components/Button.js +13 -7
- package/lib/components/Button.js.map +2 -2
- package/lib/components/Checkbox.d.ts +1 -1
- package/lib/components/Checkbox.js +1 -1
- package/lib/components/Checkbox.js.map +2 -2
- package/lib/components/Collapse.js +1 -1
- package/lib/components/Collapse.js.map +2 -2
- package/lib/components/DatePicker.js +1 -1
- package/lib/components/DatePicker.js.map +2 -2
- package/lib/components/DateRangePicker.js +1 -1
- package/lib/components/DateRangePicker.js.map +2 -2
- package/lib/components/Drawer.js +1 -1
- package/lib/components/Drawer.js.map +2 -2
- package/lib/components/InputBox.js +1 -1
- package/lib/components/InputBox.js.map +2 -2
- package/lib/components/Link.d.ts +91 -0
- package/lib/components/Link.js +44 -0
- package/lib/components/Link.js.map +13 -0
- package/lib/components/Modal.js +1 -1
- package/lib/components/Modal.js.map +2 -2
- package/lib/components/MonthRangePicker.js +1 -1
- package/lib/components/MonthRangePicker.js.map +2 -2
- package/lib/components/RichText.d.ts +6 -1
- package/lib/components/RichText.js +207 -8
- package/lib/components/RichText.js.map +2 -2
- package/lib/components/Select.d.ts +7 -0
- package/lib/components/Select.js +3 -0
- package/lib/components/Select.js.map +2 -2
- package/lib/components/SparkLine.d.ts +85 -84
- package/lib/components/SparkLine.js +2 -2
- package/lib/components/SparkLine.js.map +2 -2
- package/lib/components/Steps.d.ts +3 -3
- package/lib/components/Steps.js.map +1 -1
- package/lib/components/Toast.js +2 -2
- package/lib/components/Toast.js.map +2 -2
- package/lib/components/Tree.js +5 -3
- package/lib/components/Tree.js.map +2 -2
- package/lib/components/WithRemoteConfig.d.ts +8 -0
- package/lib/components/WithRemoteConfig.js +28 -2
- package/lib/components/WithRemoteConfig.js.map +2 -2
- package/lib/components/calendar/DaysView.js +2 -2
- package/lib/components/calendar/DaysView.js.map +2 -2
- package/lib/components/condition-builder/Field.js +0 -1
- package/lib/components/condition-builder/Field.js.map +2 -2
- package/lib/components/condition-builder/Value.js +2 -1
- package/lib/components/condition-builder/Value.js.map +2 -2
- package/lib/components/condition-builder/types.d.ts +5 -0
- package/lib/components/condition-builder/types.js.map +1 -1
- package/lib/components/icons.js +14 -0
- package/lib/components/icons.js.map +2 -2
- package/lib/factory.d.ts +5 -1
- package/lib/factory.js +9 -4
- package/lib/factory.js.map +2 -2
- package/lib/helper.css.map +1 -1
- package/lib/icons/clock.js +10 -0
- package/lib/icons/loading-outline.js +7 -0
- package/lib/icons/status-close.js +11 -0
- package/lib/icons/status-fail.js +11 -0
- package/lib/icons/status-info.js +10 -0
- package/lib/icons/status-success.js +11 -0
- package/lib/icons/status-warning.js +10 -0
- package/lib/index.js +1 -1
- package/lib/locale/de-DE.js +3 -0
- package/lib/locale/de-DE.js.map +2 -2
- package/lib/locale/en-US.js +4 -1
- 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 +16 -1
- package/lib/renderers/Action.js +5 -5
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/CRUD.d.ts +2 -2
- package/lib/renderers/CRUD.js +32 -26
- package/lib/renderers/CRUD.js.map +2 -2
- package/lib/renderers/Collapse.d.ts +1 -1
- package/lib/renderers/Collapse.js +7 -3
- package/lib/renderers/Collapse.js.map +2 -2
- package/lib/renderers/Dialog.d.ts +0 -252
- package/lib/renderers/Dialog.js +1 -4
- package/lib/renderers/Dialog.js.map +2 -2
- package/lib/renderers/Drawer.js +0 -3
- package/lib/renderers/Drawer.js.map +2 -2
- package/lib/renderers/DropDownButton.d.ts +13 -1
- package/lib/renderers/DropDownButton.js +9 -5
- package/lib/renderers/DropDownButton.js.map +2 -2
- package/lib/renderers/Form/ButtonGroupSelect.js +3 -0
- package/lib/renderers/Form/ButtonGroupSelect.js.map +2 -2
- package/lib/renderers/Form/Checkbox.d.ts +5 -0
- package/lib/renderers/Form/Checkbox.js +4 -0
- package/lib/renderers/Form/Checkbox.js.map +2 -2
- package/lib/renderers/Form/Combo.js +2 -2
- package/lib/renderers/Form/Combo.js.map +2 -2
- package/lib/renderers/Form/DiffEditor.d.ts +0 -2
- package/lib/renderers/Form/Editor.d.ts +0 -2
- package/lib/renderers/Form/Editor.js +1 -1
- package/lib/renderers/Form/Editor.js.map +2 -2
- package/lib/renderers/Form/InputExcel.d.ts +5 -0
- package/lib/renderers/Form/InputExcel.js +24 -3
- package/lib/renderers/Form/InputExcel.js.map +2 -2
- package/lib/renderers/Form/InputFile.js +2 -2
- package/lib/renderers/Form/InputFile.js.map +2 -2
- package/lib/renderers/Form/InputImage.d.ts +8 -0
- package/lib/renderers/Form/InputImage.js +7 -4
- package/lib/renderers/Form/InputImage.js.map +2 -2
- package/lib/renderers/Form/InputTable.d.ts +23 -5
- package/lib/renderers/Form/InputTable.js +32 -3
- package/lib/renderers/Form/InputTable.js.map +2 -2
- package/lib/renderers/Form/Options.js +6 -3
- package/lib/renderers/Form/Options.js.map +2 -2
- package/lib/renderers/Form/Picker.js +2 -2
- package/lib/renderers/Form/Picker.js.map +2 -2
- package/lib/renderers/Form/wrapControl.js +2 -2
- package/lib/renderers/Form/wrapControl.js.map +2 -2
- package/lib/renderers/IFrame.js +2 -2
- package/lib/renderers/IFrame.js.map +2 -2
- package/lib/renderers/Image.d.ts +1 -0
- package/lib/renderers/Image.js +15 -1
- package/lib/renderers/Image.js.map +2 -2
- package/lib/renderers/Json.js +5 -1
- package/lib/renderers/Json.js.map +2 -2
- package/lib/renderers/Link.d.ts +16 -3
- package/lib/renderers/Link.js +16 -13
- package/lib/renderers/Link.js.map +2 -2
- package/lib/renderers/Log.d.ts +2 -2
- package/lib/renderers/Log.js +7 -1
- package/lib/renderers/Log.js.map +2 -2
- package/lib/renderers/Nav.d.ts +81 -25
- package/lib/renderers/Nav.js +272 -29
- package/lib/renderers/Nav.js.map +2 -2
- package/lib/renderers/Page.js +4 -1
- package/lib/renderers/Page.js.map +2 -2
- package/lib/renderers/Service.d.ts +10 -1
- package/lib/renderers/Service.js +85 -3
- package/lib/renderers/Service.js.map +2 -2
- package/lib/renderers/SparkLine.d.ts +4 -0
- package/lib/renderers/SparkLine.js.map +2 -2
- package/lib/renderers/Steps.d.ts +4 -4
- package/lib/renderers/Steps.js +5 -2
- package/lib/renderers/Steps.js.map +2 -2
- package/lib/renderers/Table/ColumnToggler.d.ts +113 -0
- package/lib/renderers/Table/ColumnToggler.js +216 -0
- package/lib/renderers/Table/ColumnToggler.js.map +13 -0
- package/lib/renderers/Table/ItemActionsWrapper.d.ts +11 -0
- package/lib/renderers/Table/ItemActionsWrapper.js +31 -0
- package/lib/renderers/Table/ItemActionsWrapper.js.map +13 -0
- package/lib/renderers/Table/TableBody.d.ts +5 -1
- package/lib/renderers/Table/TableBody.js +5 -1
- package/lib/renderers/Table/TableBody.js.map +2 -2
- package/lib/renderers/Table/TableCell.js +3 -1
- package/lib/renderers/Table/TableCell.js.map +2 -2
- package/lib/renderers/Table/TableContent.d.ts +1 -1
- package/lib/renderers/Table/TableContent.js +4 -0
- package/lib/renderers/Table/TableContent.js.map +2 -2
- package/lib/renderers/Table/index.d.ts +22 -4
- package/lib/renderers/Table/index.js +196 -81
- package/lib/renderers/Table/index.js.map +2 -2
- package/lib/store/app.d.ts +0 -1
- package/lib/store/combo.d.ts +0 -2
- package/lib/store/crud.d.ts +3 -3
- package/lib/store/crud.js +41 -36
- package/lib/store/crud.js.map +2 -2
- package/lib/store/form.d.ts +0 -1
- package/lib/store/modal.d.ts +1 -1
- package/lib/store/modal.js +4 -0
- package/lib/store/modal.js.map +2 -2
- package/lib/store/root.d.ts +0 -1
- package/lib/store/service.d.ts +0 -1
- package/lib/store/service.js +0 -13
- package/lib/store/service.js.map +2 -2
- package/lib/store/table.d.ts +258 -3
- package/lib/store/table.js +83 -7
- package/lib/store/table.js.map +2 -2
- package/lib/themes/ang-ie11.css +941 -98
- package/lib/themes/ang.css +941 -98
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +941 -98
- package/lib/themes/antd.css +941 -98
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +1580 -411
- package/lib/themes/cxd.css +1580 -411
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +941 -98
- package/lib/themes/dark.css +941 -98
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default.css +1580 -411
- package/lib/themes/default.css.map +1 -1
- package/lib/utils/api.js +16 -4
- package/lib/utils/api.js.map +2 -2
- package/lib/utils/attachmentAdpator.d.ts +7 -0
- package/lib/utils/attachmentAdpator.js +82 -0
- package/lib/utils/attachmentAdpator.js.map +13 -0
- package/lib/utils/handleAction.d.ts +7 -0
- package/lib/utils/handleAction.js +30 -0
- package/lib/utils/handleAction.js.map +13 -0
- package/lib/utils/helper.d.ts +1 -1
- package/lib/utils/helper.js +3 -3
- package/lib/utils/helper.js.map +2 -2
- package/lib/utils/tpl-builtin.d.ts +1 -1
- package/lib/utils/tpl-builtin.js +25 -15
- package/lib/utils/tpl-builtin.js.map +2 -2
- package/lib/utils/validations.js +62 -5
- package/lib/utils/validations.js.map +2 -2
- package/package.json +1 -2
- package/schema.json +633 -273
- package/scss/_mixins.scss +29 -0
- package/scss/_properties.scss +64 -13
- package/scss/_utilities.scss +4 -0
- package/scss/components/_badge.scss +67 -2
- package/scss/components/_button.scss +34 -3
- package/scss/components/_collapse.scss +26 -8
- package/scss/components/_column-toggler.scss +234 -0
- package/scss/components/_dropdown.scss +2 -1
- package/scss/components/_image-gallery.scss +1 -1
- package/scss/components/_images.scss +2 -1
- package/scss/components/_link.scss +6 -0
- package/scss/components/_markdown.scss +266 -0
- package/scss/components/_nav.scss +236 -154
- package/scss/components/_page.scss +5 -4
- package/scss/components/_progress.scss +2 -0
- package/scss/components/_spinner.scss +6 -2
- package/scss/components/_steps.scss +1 -1
- package/scss/components/_table.scss +25 -1
- package/scss/components/form/_color.scss +1 -0
- package/scss/components/form/_date-range.scss +2 -0
- package/scss/components/form/_date.scss +2 -0
- package/scss/components/form/_fieldset.scss +1 -2
- package/scss/components/form/_file.scss +5 -4
- package/scss/components/form/_group.scss +4 -0
- package/scss/components/form/_image.scss +7 -2
- package/scss/components/form/_list.scss +1 -0
- package/scss/components/form/_location.scss +1 -1
- package/scss/components/form/_text.scss +13 -0
- package/scss/components/form/_textarea.scss +10 -0
- package/scss/components/form/_transfer.scss +2 -0
- package/scss/themes/_common.scss +3 -0
- package/scss/themes/_cxd-colors.scss +56 -0
- package/scss/themes/_cxd-variables.scss +217 -92
- package/scss/themes/cxd.scss +366 -0
- package/sdk/ang-ie11.css +1192 -176
- package/sdk/ang.css +1175 -118
- package/sdk/antd-ie11.css +1177 -163
- package/sdk/antd.css +1175 -118
- package/sdk/charts.js +13 -13
- package/sdk/color-picker.js +67 -67
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +2538 -1222
- package/sdk/cxd.css +1825 -401
- package/sdk/dark-ie11.css +1192 -176
- package/sdk/dark.css +1175 -118
- package/sdk/exceljs.js +1 -1
- package/sdk/helper.css.map +1 -1
- package/sdk/ie11-patch.css +1 -0
- package/sdk/locale/de-DE.js +3 -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 +22 -24
- package/sdk/rich-text.js +62 -64
- package/sdk/sdk-ie11.css +2538 -1222
- package/sdk/sdk.css +1825 -401
- package/sdk/sdk.js +1139 -1113
- 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 +18 -0
- package/src/components/Alert.tsx +3 -1
- package/src/components/Badge.tsx +124 -21
- package/src/components/Button.tsx +23 -7
- package/src/components/Checkbox.tsx +5 -2
- package/src/components/Collapse.tsx +14 -9
- package/src/components/DatePicker.tsx +1 -1
- package/src/components/DateRangePicker.tsx +23 -11
- package/src/components/Drawer.tsx +3 -2
- package/src/components/InputBox.tsx +1 -1
- package/src/components/Link.tsx +94 -0
- package/src/components/Modal.tsx +3 -2
- package/src/components/MonthRangePicker.tsx +10 -2
- package/src/components/RichText.tsx +244 -3
- package/src/components/Select.tsx +4 -0
- package/src/components/SparkLine.tsx +4 -1
- package/src/components/Steps.tsx +3 -3
- package/src/components/Toast.tsx +5 -5
- package/src/components/Tree.tsx +6 -8
- package/src/components/WithRemoteConfig.tsx +37 -2
- package/src/components/calendar/DaysView.tsx +2 -2
- package/src/components/condition-builder/Field.tsx +1 -2
- package/src/components/condition-builder/Value.tsx +3 -0
- package/src/components/condition-builder/types.ts +6 -0
- package/src/components/icons.tsx +15 -0
- package/src/factory.tsx +13 -3
- package/src/icons/clock.svg +1 -0
- package/src/icons/loading-outline.svg +4 -0
- package/src/icons/status-close.svg +10 -0
- package/src/icons/status-fail.svg +10 -0
- package/src/icons/status-info.svg +8 -0
- package/src/icons/status-success.svg +10 -0
- package/src/icons/status-warning.svg +8 -0
- package/src/locale/de-DE.ts +3 -0
- package/src/locale/en-US.ts +4 -1
- package/src/locale/zh-CN.ts +5 -2
- package/src/renderers/Action.tsx +71 -13
- package/src/renderers/CRUD.tsx +44 -59
- package/src/renderers/Collapse.tsx +6 -2
- package/src/renderers/Dialog.tsx +1 -5
- package/src/renderers/Drawer.tsx +0 -4
- package/src/renderers/DropDownButton.tsx +34 -12
- package/src/renderers/Form/ButtonGroupSelect.tsx +3 -0
- package/src/renderers/Form/Checkbox.tsx +8 -0
- package/src/renderers/Form/Combo.tsx +2 -3
- package/src/renderers/Form/Editor.tsx +19 -20
- package/src/renderers/Form/InputExcel.tsx +28 -3
- package/src/renderers/Form/InputFile.tsx +2 -1
- package/src/renderers/Form/InputImage.tsx +28 -10
- package/src/renderers/Form/InputTable.tsx +88 -9
- package/src/renderers/Form/Options.tsx +16 -5
- package/src/renderers/Form/Picker.tsx +3 -2
- package/src/renderers/Form/wrapControl.tsx +2 -2
- package/src/renderers/IFrame.tsx +2 -1
- package/src/renderers/Image.tsx +10 -0
- package/src/renderers/Json.tsx +10 -1
- package/src/renderers/Link.tsx +36 -11
- package/src/renderers/Log.tsx +16 -3
- package/src/renderers/Nav.tsx +340 -56
- package/src/renderers/Page.tsx +3 -1
- package/src/renderers/Service.tsx +101 -3
- package/src/renderers/SparkLine.tsx +5 -0
- package/src/renderers/Steps.tsx +12 -9
- package/src/renderers/Table/ColumnToggler.tsx +544 -0
- package/src/renderers/Table/ItemActionsWrapper.tsx +44 -0
- package/src/renderers/Table/TableBody.tsx +3 -2
- package/src/renderers/Table/TableCell.tsx +16 -1
- package/src/renderers/Table/TableContent.tsx +3 -1
- package/src/renderers/Table/index.tsx +240 -60
- package/src/store/crud.ts +34 -38
- package/src/store/modal.ts +4 -0
- package/src/store/service.ts +0 -19
- package/src/store/table.ts +103 -4
- package/src/utils/api.ts +24 -4
- package/src/utils/attachmentAdpator.ts +90 -0
- package/src/utils/handleAction.ts +41 -0
- package/src/utils/helper.ts +4 -3
- package/src/utils/tpl-builtin.ts +48 -17
- package/src/utils/validations.ts +80 -12
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<title>状态-失败</title>
|
4
|
+
<g id="状态-失败" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5
|
+
<g id="图示-图标">
|
6
|
+
<rect id="矩形" stroke="#979797" stroke-width="1.33333333" fill="#D8D8D8" opacity="0" x="0.666666667" y="0.666666667" width="14.6666667" height="14.6666667"></rect>
|
7
|
+
<path d="M10.4361,11.0054 L7.9531,8.5394 L5.4861,11.0224 L4.7771,10.3184 L7.2431,7.8344 L4.7601,5.3674 L5.4651,4.6584 L7.9481,7.1244 L10.4151,4.6424 L11.1241,5.3464 L8.6571,7.8294 L11.1411,10.2964 L10.4361,11.0054 Z M1.00001937,8.0244 C1.0131,11.8894 4.1581,15.0134 8.0231,14.9994934 C11.8901,14.9864 15.0131,11.8424 15.0001806,7.9764 C14.9871,4.1104 11.8421,0.9864 7.9771,1.00030657 C4.1101,1.0134 0.9871,4.1574 1.00001937,8.0244 Z" id="图标-填色" fill="#E8684A"></path>
|
8
|
+
</g>
|
9
|
+
</g>
|
10
|
+
</svg>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<title>6.图标/6.提示/通知/面</title>
|
4
|
+
<g id="6.图标/6.提示/通知/面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5
|
+
<polygon id="Clip-2" points="1.0001 1 15 1 15 14.9999 1.0001 14.9999"></polygon>
|
6
|
+
<path d="M8.0001,0.9999 C11.8661,0.9999 15.0001,4.1349 15.0001,7.9999 C15.0001,11.8659 11.8661,14.9999 8.0001,14.9999 C4.1341,14.9999 1.0001,11.8659 1.0001,7.9999 C1.0001,4.1349 4.1341,0.9999 8.0001,0.9999 Z M8.5001,6.5459 L7.5001,6.5459 L7.5001,11.9999 L8.5001,11.9999 L8.5001,6.5459 Z M8.0001,3.9999 C7.6681,3.9999 7.4001,4.2679 7.4001,4.5999 C7.4001,4.9309 7.6681,5.1999 8.0001,5.1999 C8.3321,5.1999 8.6001,4.9309 8.6001,4.5999 C8.6001,4.2679 8.3321,3.9999 8.0001,3.9999 Z" id="图标-填色" fill="#2468F2"></path>
|
7
|
+
</g>
|
8
|
+
</svg>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<title>状态-成功</title>
|
4
|
+
<g id="状态-成功" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5
|
+
<g id="图标-提示">
|
6
|
+
<rect id="矩形" stroke="#979797" stroke-width="1.33333333" fill="#D8D8D8" opacity="0" x="0.666666667" y="0.666666667" width="14.6666667" height="14.6666667"></rect>
|
7
|
+
<path d="M7.0286,11.0408 L6.3196,10.3358 L6.3206,10.3348 L4.1896,8.2188 L4.8946,7.5088 L7.0256,9.6258 L11.2526,5.3698 L11.9616,6.0738 L7.0286,11.0408 Z M7.9766,0.999759561 C4.1106,1.0138 0.9866,4.1578 0.999559574,8.0228 C1.0126,11.8898 4.1576,15.0138 8.0236,14.9998469 C11.8896,14.9868 15.0126,11.8428 14.9996404,7.9768 C14.9866,4.1098 11.8426,0.9868 7.9766,0.999759561 L7.9766,0.999759561 Z" id="图标-填色" fill="#0BC280"></path>
|
8
|
+
</g>
|
9
|
+
</g>
|
10
|
+
</svg>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<title>6.图标/6.提示/异常/面</title>
|
4
|
+
<g id="6.图标/6.提示/异常/面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5
|
+
<polygon id="Clip-2" points="1.0001 1 15 1 15 14.9997 1.0001 14.9997"></polygon>
|
6
|
+
<path d="M8.0001,0.9997 C11.8661,0.9997 15.0001,4.1347 15.0001,7.9997 C15.0001,11.8657 11.8661,14.9997 8.0001,14.9997 C4.1341,14.9997 1.0001,11.8657 1.0001,7.9997 C1.0001,4.1347 4.1341,0.9997 8.0001,0.9997 Z M8.0001,10.7997 C7.6681,10.7997 7.4001,11.0687 7.4001,11.3997 C7.4001,11.7307 7.6681,11.9997 8.0001,11.9997 C8.3321,11.9997 8.6001,11.7307 8.6001,11.3997 C8.6001,11.0687 8.3321,10.7997 8.0001,10.7997 Z M8.5001,3.9997 L7.5001,3.9997 L7.5001,9.4547 L8.5001,9.4547 L8.5001,3.9997 Z" id="形状结合" fill="#FFB200"></path>
|
7
|
+
</g>
|
8
|
+
</svg>
|
package/src/locale/de-DE.ts
CHANGED
@@ -158,6 +158,7 @@ register('de-DE', {
|
|
158
158
|
'System.requestError': 'Anfragefehler: ',
|
159
159
|
'System.requestErrorStatus': 'Anfragefehler, Statuscode:',
|
160
160
|
'Table.addRow': 'Zeile hinzufügen',
|
161
|
+
'Table.copyRow': 'Zeile kopieren',
|
161
162
|
'Table.columnsVisibility': 'Klicken, um die Sichtbarkeit der Spalten zu steuern',
|
162
163
|
'Table.deleteRow': 'Aktuele Zeile löschen',
|
163
164
|
'Table.discard': 'Verwerfen',
|
@@ -171,6 +172,8 @@ register('de-DE', {
|
|
171
172
|
'Table.startSort': 'Klicken, um Sortierung zu starten',
|
172
173
|
'Table.valueField': 'valueField muss vorhanden sein',
|
173
174
|
'Table.index': 'Index',
|
175
|
+
'Table.toggleColumn': 'Spalten anzeigen',
|
176
|
+
'Table.searchFields': 'Abfragefelder setzen',
|
174
177
|
'Tag.placeholder': 'Noch kein Tag',
|
175
178
|
'Tag.tip': 'Kürzlich verwendetes Tag',
|
176
179
|
'Text.add': 'Neu {{label}}',
|
package/src/locale/en-US.ts
CHANGED
@@ -158,7 +158,8 @@ register('en-US', {
|
|
158
158
|
'System.copy': 'Content copied',
|
159
159
|
'System.requestError': 'Request error: ',
|
160
160
|
'System.requestErrorStatus': 'Request error, status code: ',
|
161
|
-
'Table.addRow': 'Add
|
161
|
+
'Table.addRow': 'Add row',
|
162
|
+
'Table.copyRow': 'Copy row',
|
162
163
|
'Table.columnsVisibility': 'Click to control columns visibility',
|
163
164
|
'Table.deleteRow': 'Delete current row',
|
164
165
|
'Table.discard': 'Discard',
|
@@ -172,6 +173,8 @@ register('en-US', {
|
|
172
173
|
'Table.startSort': 'Click to start sorting',
|
173
174
|
'Table.valueField': 'Must have valueField',
|
174
175
|
'Table.index': 'Index',
|
176
|
+
'Table.toggleColumn': 'Display columns',
|
177
|
+
'Table.searchFields': 'Set query fields',
|
175
178
|
'Tag.placeholder': 'No tag yet',
|
176
179
|
'Tag.tip': 'Recently used tag',
|
177
180
|
'Text.add': 'New {{label}}',
|
package/src/locale/zh-CN.ts
CHANGED
@@ -83,7 +83,7 @@ register('zh-CN', {
|
|
83
83
|
'desc': '降序',
|
84
84
|
'Dialog.close': '关闭',
|
85
85
|
'Embed.invalidRoot': '选择器不对,页面上没有此元素',
|
86
|
-
'Embed.downloading': '
|
86
|
+
'Embed.downloading': '文件即将开始下载',
|
87
87
|
'Excel.placeholder': '拖拽 Excel 到这,或点击上传',
|
88
88
|
'fetchFailed': '初始化失败',
|
89
89
|
'File.continueAdd': '继续添加',
|
@@ -99,7 +99,7 @@ register('zh-CN', {
|
|
99
99
|
'File.start': '开始上传',
|
100
100
|
'File.upload': '上传文件',
|
101
101
|
'File.uploadFailed': '接口返回错误,请仔细检查',
|
102
|
-
'File.uploading': '
|
102
|
+
'File.uploading': '上传中...',
|
103
103
|
'Form.loadOptionsFailed': '加载选项失败,原因:{{reason}}',
|
104
104
|
'Form.submit': '提交',
|
105
105
|
'Form.title': '表单',
|
@@ -163,6 +163,7 @@ register('zh-CN', {
|
|
163
163
|
'System.requestError': '接口报错:',
|
164
164
|
'System.requestErrorStatus': '接口出错,状态码是:',
|
165
165
|
'Table.addRow': '新增一行',
|
166
|
+
'Table.copyRow': '复制一行',
|
166
167
|
'Table.columnsVisibility': '点击选择显示列',
|
167
168
|
'Table.deleteRow': '删除当前行',
|
168
169
|
'Table.discard': '放弃',
|
@@ -176,6 +177,8 @@ register('zh-CN', {
|
|
176
177
|
'Table.startSort': '点击开始排序',
|
177
178
|
'Table.valueField': '请配置 valueField',
|
178
179
|
'Table.index': '序号',
|
180
|
+
'Table.toggleColumn': '显示列',
|
181
|
+
'Table.searchFields': '设置查询字段',
|
179
182
|
'Tag.placeholder': '暂无标签',
|
180
183
|
'Tag.tip': '最近使用的标签',
|
181
184
|
'Text.add': '新增:{{label}}',
|
package/src/renderers/Action.tsx
CHANGED
@@ -35,6 +35,10 @@ export interface ButtonSchema extends BaseSchema {
|
|
35
35
|
* 右侧 icon 上的 css 类名
|
36
36
|
*/
|
37
37
|
rightIconClassName?: SchemaClassName;
|
38
|
+
/**
|
39
|
+
* loading 上的css 类名
|
40
|
+
*/
|
41
|
+
loadingClassName?: SchemaClassName;
|
38
42
|
|
39
43
|
/**
|
40
44
|
* 按钮文字
|
@@ -131,6 +135,15 @@ export interface ButtonSchema extends BaseSchema {
|
|
131
135
|
* 键盘快捷键
|
132
136
|
*/
|
133
137
|
hotKey?: string;
|
138
|
+
/**
|
139
|
+
* 是否显示loading效果
|
140
|
+
*/
|
141
|
+
loadingOn?: string;
|
142
|
+
|
143
|
+
/**
|
144
|
+
* 自定义事件处理函数
|
145
|
+
*/
|
146
|
+
onClick?: string | any;
|
134
147
|
}
|
135
148
|
|
136
149
|
export interface AjaxActionSchema extends ButtonSchema {
|
@@ -416,44 +429,80 @@ export const createSyntheticEvent = <T extends Element, E extends Event>(
|
|
416
429
|
export interface ActionProps
|
417
430
|
extends Omit<
|
418
431
|
ButtonSchema,
|
419
|
-
'className' | 'iconClassName' | 'rightIconClassName'
|
432
|
+
'className' | 'iconClassName' | 'rightIconClassName' | 'loadingClassName'
|
420
433
|
>,
|
421
434
|
ThemeProps,
|
422
435
|
Omit<
|
423
436
|
AjaxActionSchema,
|
424
|
-
|
437
|
+
| 'type'
|
438
|
+
| 'className'
|
439
|
+
| 'iconClassName'
|
440
|
+
| 'rightIconClassName'
|
441
|
+
| 'loadingClassName'
|
425
442
|
>,
|
426
443
|
Omit<
|
427
444
|
UrlActionSchema,
|
428
|
-
|
445
|
+
| 'type'
|
446
|
+
| 'className'
|
447
|
+
| 'iconClassName'
|
448
|
+
| 'rightIconClassName'
|
449
|
+
| 'loadingClassName'
|
429
450
|
>,
|
430
451
|
Omit<
|
431
452
|
LinkActionSchema,
|
432
|
-
|
453
|
+
| 'type'
|
454
|
+
| 'className'
|
455
|
+
| 'iconClassName'
|
456
|
+
| 'rightIconClassName'
|
457
|
+
| 'loadingClassName'
|
433
458
|
>,
|
434
459
|
Omit<
|
435
460
|
DialogActionSchema,
|
436
|
-
|
461
|
+
| 'type'
|
462
|
+
| 'className'
|
463
|
+
| 'iconClassName'
|
464
|
+
| 'rightIconClassName'
|
465
|
+
| 'loadingClassName'
|
437
466
|
>,
|
438
467
|
Omit<
|
439
468
|
DrawerActionSchema,
|
440
|
-
|
469
|
+
| 'type'
|
470
|
+
| 'className'
|
471
|
+
| 'iconClassName'
|
472
|
+
| 'rightIconClassName'
|
473
|
+
| 'loadingClassName'
|
441
474
|
>,
|
442
475
|
Omit<
|
443
476
|
CopyActionSchema,
|
444
|
-
|
477
|
+
| 'type'
|
478
|
+
| 'className'
|
479
|
+
| 'iconClassName'
|
480
|
+
| 'rightIconClassName'
|
481
|
+
| 'loadingClassName'
|
445
482
|
>,
|
446
483
|
Omit<
|
447
484
|
ReloadActionSchema,
|
448
|
-
|
485
|
+
| 'type'
|
486
|
+
| 'className'
|
487
|
+
| 'iconClassName'
|
488
|
+
| 'rightIconClassName'
|
489
|
+
| 'loadingClassName'
|
449
490
|
>,
|
450
491
|
Omit<
|
451
492
|
EmailActionSchema,
|
452
|
-
|
493
|
+
| 'type'
|
494
|
+
| 'className'
|
495
|
+
| 'iconClassName'
|
496
|
+
| 'rightIconClassName'
|
497
|
+
| 'loadingClassName'
|
453
498
|
>,
|
454
499
|
Omit<
|
455
500
|
OtherActionSchema,
|
456
|
-
|
501
|
+
| 'type'
|
502
|
+
| 'className'
|
503
|
+
| 'iconClassName'
|
504
|
+
| 'rightIconClassName'
|
505
|
+
| 'loadingClassName'
|
457
506
|
> {
|
458
507
|
actionType: any;
|
459
508
|
onAction?: (
|
@@ -619,6 +668,7 @@ export class Action extends React.Component<ActionProps, ActionState> {
|
|
619
668
|
iconClassName,
|
620
669
|
rightIcon,
|
621
670
|
rightIconClassName,
|
671
|
+
loadingClassName,
|
622
672
|
primary,
|
623
673
|
size,
|
624
674
|
level,
|
@@ -638,7 +688,10 @@ export class Action extends React.Component<ActionProps, ActionState> {
|
|
638
688
|
isMenuItem,
|
639
689
|
active,
|
640
690
|
activeLevel,
|
691
|
+
tooltipTrigger,
|
641
692
|
tooltipContainer,
|
693
|
+
tooltipRootClose,
|
694
|
+
loading,
|
642
695
|
classnames: cx
|
643
696
|
} = this.props;
|
644
697
|
|
@@ -678,6 +731,8 @@ export class Action extends React.Component<ActionProps, ActionState> {
|
|
678
731
|
? activeLevel
|
679
732
|
: level || (primary ? 'primary' : undefined)
|
680
733
|
}
|
734
|
+
loadingClassName={loadingClassName}
|
735
|
+
loading={loading}
|
681
736
|
onClick={this.handleAction}
|
682
737
|
type={type && ~allowedType.indexOf(type) ? type : 'button'}
|
683
738
|
disabled={disabled}
|
@@ -685,12 +740,14 @@ export class Action extends React.Component<ActionProps, ActionState> {
|
|
685
740
|
overrideClassName={isMenuItem}
|
686
741
|
tooltip={filterContents(tooltip, data)}
|
687
742
|
disabledTip={filterContents(disabledTip, data)}
|
688
|
-
|
743
|
+
tooltipPlacement={tooltipPlacement}
|
689
744
|
tooltipContainer={tooltipContainer}
|
745
|
+
tooltipTrigger={tooltipTrigger}
|
746
|
+
tooltipRootClose={tooltipRootClose}
|
690
747
|
block={block}
|
691
748
|
iconOnly={!!(icon && !label && level !== 'link')}
|
692
749
|
>
|
693
|
-
{iconElement}
|
750
|
+
{!loading ? iconElement : ''}
|
694
751
|
{label ? <span>{filter(String(label), data)}</span> : null}
|
695
752
|
{rightIconElement}
|
696
753
|
</Button>
|
@@ -736,13 +793,14 @@ export class ActionRenderer extends React.Component<
|
|
736
793
|
}
|
737
794
|
|
738
795
|
render() {
|
739
|
-
const {env, disabled, btnDisabled, ...rest} = this.props;
|
796
|
+
const {env, disabled, btnDisabled, loading, ...rest} = this.props;
|
740
797
|
|
741
798
|
return (
|
742
799
|
<Action
|
743
800
|
{...(rest as any)}
|
744
801
|
disabled={disabled || btnDisabled}
|
745
802
|
onAction={this.handleAction}
|
803
|
+
loading={loading}
|
746
804
|
isCurrentUrl={this.isCurrentAction}
|
747
805
|
tooltipContainer={
|
748
806
|
env.getModalContainer ? env.getModalContainer : undefined
|
package/src/renderers/CRUD.tsx
CHANGED
@@ -1,43 +1,28 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
|
3
|
-
import PropTypes from 'prop-types';
|
4
3
|
import {Renderer, RendererProps} from '../factory';
|
5
|
-
import {
|
6
|
-
SchemaNode,
|
7
|
-
Schema,
|
8
|
-
Action,
|
9
|
-
Api,
|
10
|
-
ApiObject,
|
11
|
-
PlainObject
|
12
|
-
} from '../types';
|
4
|
+
import {SchemaNode, Schema, Action, PlainObject} from '../types';
|
13
5
|
import {CRUDStore, ICRUDStore} from '../store/crud';
|
14
6
|
import {
|
15
7
|
createObject,
|
16
8
|
extendObject,
|
17
9
|
anyChanged,
|
18
10
|
isObjectShallowModified,
|
19
|
-
noop,
|
20
11
|
isVisible,
|
21
12
|
getPropValue,
|
22
13
|
getVariable,
|
23
14
|
qsstringify,
|
24
|
-
qsparse
|
15
|
+
qsparse,
|
16
|
+
isArrayChildrenModified
|
25
17
|
} from '../utils/helper';
|
26
|
-
import {
|
27
|
-
import partition from 'lodash/partition';
|
28
|
-
import Scoped, {ScopedContext, IScopedContext} from '../Scoped';
|
18
|
+
import {ScopedContext, IScopedContext} from '../Scoped';
|
29
19
|
import Button from '../components/Button';
|
30
20
|
import Select from '../components/Select';
|
31
21
|
import getExprProperties from '../utils/filter-schema';
|
32
22
|
import pick from 'lodash/pick';
|
33
23
|
import {findDOMNode} from 'react-dom';
|
34
24
|
import {evalExpression, filter} from '../utils/tpl';
|
35
|
-
import {
|
36
|
-
isValidApi,
|
37
|
-
buildApi,
|
38
|
-
isEffectiveApi,
|
39
|
-
isApiOutdated
|
40
|
-
} from '../utils/api';
|
25
|
+
import {isEffectiveApi, isApiOutdated, str2function} from '../utils/api';
|
41
26
|
import omit from 'lodash/omit';
|
42
27
|
import find from 'lodash/find';
|
43
28
|
import findIndex from 'lodash/findIndex';
|
@@ -48,7 +33,6 @@ import {
|
|
48
33
|
BaseSchema,
|
49
34
|
SchemaApi,
|
50
35
|
SchemaClassName,
|
51
|
-
SchemaCollection,
|
52
36
|
SchemaExpression,
|
53
37
|
SchemaMessage,
|
54
38
|
SchemaName,
|
@@ -362,6 +346,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
362
346
|
'footerToolbar',
|
363
347
|
'filterTogglable',
|
364
348
|
'filterDefaultVisible',
|
349
|
+
'autoGenerateFilter',
|
365
350
|
'syncResponse2Query',
|
366
351
|
'keepItemSelectionOnPageChange',
|
367
352
|
'labelTpl',
|
@@ -478,8 +463,8 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
478
463
|
this.handleFilterInit({});
|
479
464
|
}
|
480
465
|
|
481
|
-
|
482
|
-
if (this.props.pickerMode && val) {
|
466
|
+
let val: any;
|
467
|
+
if (this.props.pickerMode && (val = getPropValue(this.props))) {
|
483
468
|
store.setSelectedItems(val);
|
484
469
|
}
|
485
470
|
}
|
@@ -500,8 +485,14 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
500
485
|
this.renderFooterToolbar = this.renderFooterToolbar.bind(this);
|
501
486
|
}
|
502
487
|
|
503
|
-
|
504
|
-
if (
|
488
|
+
let val: any;
|
489
|
+
if (
|
490
|
+
this.props.pickerMode &&
|
491
|
+
isArrayChildrenModified(
|
492
|
+
(val = getPropValue(this.props)),
|
493
|
+
getPropValue(prevProps)
|
494
|
+
)
|
495
|
+
) {
|
505
496
|
store.setSelectedItems(val);
|
506
497
|
}
|
507
498
|
|
@@ -654,6 +645,13 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
654
645
|
return Promise.resolve({
|
655
646
|
items: store.selectedItems.concat()
|
656
647
|
});
|
648
|
+
} else if (action.onClick) {
|
649
|
+
store.setCurrentAction(action);
|
650
|
+
let onClick = action.onClick;
|
651
|
+
if (typeof onClick === 'string') {
|
652
|
+
onClick = str2function(onClick, 'event', 'props', 'data');
|
653
|
+
}
|
654
|
+
onClick && onClick(e, this.props, ctx);
|
657
655
|
} else {
|
658
656
|
onAction(e, action, ctx, throwErrors, delegate || this.context);
|
659
657
|
}
|
@@ -1057,7 +1055,10 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1057
1055
|
(!stopAutoRefreshWhen ||
|
1058
1056
|
!(
|
1059
1057
|
(stopAutoRefreshWhenModalIsOpen && store.hasModalOpened) ||
|
1060
|
-
evalExpression(
|
1058
|
+
evalExpression(
|
1059
|
+
stopAutoRefreshWhen,
|
1060
|
+
createObject(store.data, store.query)
|
1061
|
+
)
|
1061
1062
|
)) &&
|
1062
1063
|
(this.timer = setTimeout(
|
1063
1064
|
silentPolling
|
@@ -1497,15 +1498,11 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1497
1498
|
hasBulkActions() {
|
1498
1499
|
const {bulkActions, itemActions, store} = this.props;
|
1499
1500
|
|
1500
|
-
if (
|
1501
|
-
(!bulkActions || !bulkActions.length) &&
|
1502
|
-
(!itemActions || !itemActions.length)
|
1503
|
-
) {
|
1501
|
+
if (!bulkActions || !bulkActions.length) {
|
1504
1502
|
return false;
|
1505
1503
|
}
|
1506
1504
|
|
1507
1505
|
let bulkBtns: Array<ActionSchema> = [];
|
1508
|
-
let itemBtns: Array<ActionSchema> = [];
|
1509
1506
|
const ctx = store.mergedData;
|
1510
1507
|
|
1511
1508
|
if (bulkActions && bulkActions.length) {
|
@@ -1517,21 +1514,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1517
1514
|
.filter(item => !item.hidden && item.visible !== false);
|
1518
1515
|
}
|
1519
1516
|
|
1520
|
-
|
1521
|
-
store.data,
|
1522
|
-
store.selectedItems.length ? store.selectedItems[0] : {}
|
1523
|
-
);
|
1524
|
-
|
1525
|
-
if (itemActions && itemActions.length) {
|
1526
|
-
itemBtns = itemActions
|
1527
|
-
.map(item => ({
|
1528
|
-
...item,
|
1529
|
-
...getExprProperties(item as Schema, itemData)
|
1530
|
-
}))
|
1531
|
-
.filter(item => !item.hidden && item.visible !== false);
|
1532
|
-
}
|
1533
|
-
|
1534
|
-
return bulkBtns.length || itemBtns.length;
|
1517
|
+
return bulkBtns.length;
|
1535
1518
|
}
|
1536
1519
|
|
1537
1520
|
renderBulkActions(childProps: any) {
|
@@ -1539,11 +1522,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1539
1522
|
|
1540
1523
|
const items = childProps.items;
|
1541
1524
|
|
1542
|
-
if (
|
1543
|
-
!items.length ||
|
1544
|
-
((!bulkActions || !bulkActions.length) &&
|
1545
|
-
(!itemActions || !itemActions.length))
|
1546
|
-
) {
|
1525
|
+
if (!items.length || !bulkActions || !bulkActions.length) {
|
1547
1526
|
return null;
|
1548
1527
|
}
|
1549
1528
|
|
@@ -1595,7 +1574,6 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1595
1574
|
render(
|
1596
1575
|
`bulk-action/${index}`,
|
1597
1576
|
{
|
1598
|
-
size: 'sm',
|
1599
1577
|
...omit(btn, ['visibleOn', 'hiddenOn', 'disabledOn']),
|
1600
1578
|
type: 'button',
|
1601
1579
|
ignoreConfirm: true
|
@@ -1619,7 +1597,6 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1619
1597
|
render(
|
1620
1598
|
`bulk-action/${index}`,
|
1621
1599
|
{
|
1622
|
-
size: 'sm',
|
1623
1600
|
...omit(btn, ['visibleOn', 'hiddenOn', 'disabledOn']),
|
1624
1601
|
type: 'button'
|
1625
1602
|
},
|
@@ -1776,16 +1753,17 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1776
1753
|
);
|
1777
1754
|
}
|
1778
1755
|
|
1779
|
-
renderExportCSV() {
|
1756
|
+
renderExportCSV(toolbar: Schema) {
|
1780
1757
|
const {
|
1781
1758
|
store,
|
1782
1759
|
classPrefix: ns,
|
1783
1760
|
classnames: cx,
|
1784
1761
|
translate: __,
|
1785
|
-
loadDataOnce
|
1786
|
-
api
|
1762
|
+
loadDataOnce
|
1787
1763
|
} = this.props;
|
1788
1764
|
|
1765
|
+
const api = (toolbar as Schema).api;
|
1766
|
+
|
1789
1767
|
return (
|
1790
1768
|
<Button
|
1791
1769
|
classPrefix={ns}
|
@@ -1797,7 +1775,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1797
1775
|
}
|
1798
1776
|
size="sm"
|
1799
1777
|
>
|
1800
|
-
{__('CRUD.exportCSV')}
|
1778
|
+
{toolbar.label || __('CRUD.exportCSV')}
|
1801
1779
|
</Button>
|
1802
1780
|
);
|
1803
1781
|
}
|
@@ -1812,6 +1790,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1812
1790
|
return null;
|
1813
1791
|
}
|
1814
1792
|
|
1793
|
+
const {render, store} = this.props;
|
1815
1794
|
const type = (toolbar as Schema).type || toolbar;
|
1816
1795
|
|
1817
1796
|
if (type === 'bulkActions' || type === 'bulk-actions') {
|
@@ -1827,9 +1806,10 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1827
1806
|
} else if (type === 'filter-toggler') {
|
1828
1807
|
return this.renderFilterToggler();
|
1829
1808
|
} else if (type === 'export-csv') {
|
1830
|
-
return this.renderExportCSV();
|
1809
|
+
return this.renderExportCSV(toolbar as Schema);
|
1831
1810
|
} else if (Array.isArray(toolbar)) {
|
1832
1811
|
const children: Array<any> = toolbar
|
1812
|
+
.filter((toolbar: any) => isVisible(toolbar, store.filterData))
|
1833
1813
|
.map((toolbar, index) => ({
|
1834
1814
|
dom: this.renderToolbar(toolbar, index, childProps, toolbarRenderer),
|
1835
1815
|
toolbar
|
@@ -1871,7 +1851,6 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
1871
1851
|
return result;
|
1872
1852
|
}
|
1873
1853
|
|
1874
|
-
const {render, store} = this.props;
|
1875
1854
|
const $$editable = childProps.$$editable;
|
1876
1855
|
|
1877
1856
|
return render(`toolbar/${index}`, toolbar, {
|
@@ -2014,6 +1993,8 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
2014
1993
|
popOverContainer,
|
2015
1994
|
translate: __,
|
2016
1995
|
onQuery,
|
1996
|
+
autoGenerateFilter,
|
1997
|
+
onSelect,
|
2017
1998
|
...rest
|
2018
1999
|
} = this.props;
|
2019
2000
|
|
@@ -2064,6 +2045,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
2064
2045
|
key: 'body',
|
2065
2046
|
className: cx('Crud-body', bodyClassName),
|
2066
2047
|
ref: this.controlRef,
|
2048
|
+
autoGenerateFilter: !filter && autoGenerateFilter,
|
2067
2049
|
selectable: !!(
|
2068
2050
|
(this.hasBulkActionsToolbar() && this.hasBulkActions()) ||
|
2069
2051
|
pickerMode
|
@@ -2096,6 +2078,9 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|
2096
2078
|
onSelect: this.handleSelect,
|
2097
2079
|
onPopOverOpened: this.handleChildPopOverOpen,
|
2098
2080
|
onPopOverClosed: this.handleChildPopOverClose,
|
2081
|
+
onSearchableFromReset: this.handleFilterReset,
|
2082
|
+
onSearchableFromSubmit: this.handleFilterSubmit,
|
2083
|
+
onSearchableFromInit: this.handleFilterInit,
|
2099
2084
|
headerToolbarRender: this.renderHeaderToolbar,
|
2100
2085
|
footerToolbarRender: this.renderFooterToolbar,
|
2101
2086
|
data: store.mergedData
|
@@ -7,6 +7,7 @@ import {
|
|
7
7
|
SchemaCollection,
|
8
8
|
SchemaTpl
|
9
9
|
} from '../Schema';
|
10
|
+
import {isClickOnInput} from '../utils/helper';
|
10
11
|
|
11
12
|
/**
|
12
13
|
* Collapse 折叠渲染器,格式说明。
|
@@ -134,7 +135,10 @@ export default class Collapse extends React.Component<
|
|
134
135
|
}
|
135
136
|
}
|
136
137
|
|
137
|
-
toggleCollapsed() {
|
138
|
+
toggleCollapsed(e: React.MouseEvent<HTMLElement>) {
|
139
|
+
if (isClickOnInput(e)) {
|
140
|
+
return;
|
141
|
+
}
|
138
142
|
this.props.collapsable !== false &&
|
139
143
|
this.setState({
|
140
144
|
collapsed: !this.state.collapsed
|
@@ -172,8 +176,8 @@ export default class Collapse extends React.Component<
|
|
172
176
|
onClick={this.toggleCollapsed}
|
173
177
|
className={cx(`Collapse-header`, headingClassName)}
|
174
178
|
>
|
175
|
-
{render('heading', finalTitle)}
|
176
179
|
{collapsable && <span className={cx('Collapse-arrow')} />}
|
180
|
+
{render('heading', finalTitle)}
|
177
181
|
</HeadingComponent>
|
178
182
|
) : null,
|
179
183
|
|
package/src/renderers/Dialog.tsx
CHANGED
@@ -318,7 +318,7 @@ export default class Dialog extends React.Component<DialogProps> {
|
|
318
318
|
handleExited() {
|
319
319
|
const {lazySchema, store} = this.props;
|
320
320
|
if (isAlive(store)) {
|
321
|
-
store.
|
321
|
+
store.reset();
|
322
322
|
store.setEntered(false);
|
323
323
|
if (typeof lazySchema === 'function') {
|
324
324
|
store.setSchema('');
|
@@ -629,10 +629,6 @@ export class DialogRenderer extends Dialog {
|
|
629
629
|
tryChildrenToHandle(action: Action, ctx: object, rawAction?: Action) {
|
630
630
|
const scoped = this.context as IScopedContext;
|
631
631
|
|
632
|
-
if (action.fromDialog) {
|
633
|
-
return false;
|
634
|
-
}
|
635
|
-
|
636
632
|
const targets: Array<any> = [];
|
637
633
|
const {onConfirm, store} = this.props;
|
638
634
|
|
package/src/renderers/Drawer.tsx
CHANGED
@@ -687,10 +687,6 @@ export class DrawerRenderer extends Drawer {
|
|
687
687
|
tryChildrenToHandle(action: Action, ctx: object, rawAction?: Action) {
|
688
688
|
const scoped = this.context as IScopedContext;
|
689
689
|
|
690
|
-
if (action.fromDialog) {
|
691
|
-
return false;
|
692
|
-
}
|
693
|
-
|
694
690
|
const targets: Array<any> = [];
|
695
691
|
const {onConfirm, store} = this.props;
|
696
692
|
|