aldehyde 0.2.19 → 0.2.21
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/controls/action/index.d.ts +50 -50
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/action/index.js +187 -187
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/action/utils.d.ts +8 -8
- package/lib/controls/action/utils.js +109 -109
- package/lib/controls/auto-complete/index.d.ts +6 -6
- package/lib/controls/auto-complete/index.js +51 -51
- package/lib/controls/cascader/index.d.ts +22 -22
- package/lib/controls/cascader/index.d.ts.map +1 -1
- package/lib/controls/cascader/index.js +107 -106
- package/lib/controls/cascader/index.js.map +1 -1
- package/lib/controls/chemstruc/graph.d.ts +28 -28
- package/lib/controls/chemstruc/graph.d.ts.map +1 -1
- package/lib/controls/chemstruc/graph.js +120 -119
- package/lib/controls/chemstruc/graph.js.map +1 -1
- package/lib/controls/code-editor/sql-code-editor.d.ts +14 -14
- package/lib/controls/code-editor/sql-code-editor.js +52 -51
- package/lib/controls/code-editor/sql-code-editor.js.map +1 -1
- package/lib/controls/collapse-card/index.d.ts +19 -19
- package/lib/controls/collapse-card/index.d.ts.map +1 -1
- package/lib/controls/collapse-card/index.js +62 -62
- package/lib/controls/color-picker/index.d.ts +18 -18
- package/lib/controls/color-picker/index.d.ts.map +1 -1
- package/lib/controls/color-picker/index.js +59 -59
- package/lib/controls/counting-tag/index.d.ts +17 -17
- package/lib/controls/counting-tag/index.js +31 -30
- package/lib/controls/counting-tag/index.js.map +1 -1
- package/lib/controls/cquery/cquick-button.d.ts +23 -23
- package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
- package/lib/controls/cquery/cquick-button.js +72 -72
- package/lib/controls/cquery/cquick-button.js.map +1 -1
- package/lib/controls/date-picker/index.d.ts +6 -6
- package/lib/controls/date-picker/index.js +83 -83
- package/lib/controls/entity-select/entity-select.d.ts +73 -73
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.js +427 -423
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/entity-select/lab-tree-select.d.ts +24 -24
- package/lib/controls/entity-select/lab-tree-select.d.ts.map +1 -1
- package/lib/controls/entity-select/lab-tree-select.js +121 -120
- package/lib/controls/entity-select/lab-tree-select.js.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.d.ts +19 -19
- package/lib/controls/entity-select/popover-entity-select.js +92 -91
- package/lib/controls/entity-select/popover-entity-select.js.map +1 -1
- package/lib/controls/entry-control.d.ts +12 -12
- package/lib/controls/entry-control.js +202 -202
- package/lib/controls/enum-badge/index.d.ts +6 -6
- package/lib/controls/enum-badge/index.js +13 -13
- package/lib/controls/enum-tag/index.d.ts +6 -6
- package/lib/controls/enum-tag/index.js +23 -23
- package/lib/controls/file-view/drawer-file-view.d.ts +21 -21
- package/lib/controls/file-view/drawer-file-view.d.ts.map +1 -1
- package/lib/controls/file-view/drawer-file-view.js +56 -55
- package/lib/controls/file-view/drawer-file-view.js.map +1 -1
- package/lib/controls/file-view/index.d.ts +27 -27
- package/lib/controls/file-view/index.d.ts.map +1 -1
- package/lib/controls/file-view/index.js +135 -134
- package/lib/controls/file-view/index.js.map +1 -1
- package/lib/controls/html-editor/draft.d.ts +21 -21
- package/lib/controls/html-editor/draft.d.ts.map +1 -1
- package/lib/controls/html-editor/draft.js +121 -121
- package/lib/controls/html-editor/draft.js.map +1 -1
- package/lib/controls/html-editor/tinymce.d.ts +12 -7
- package/lib/controls/html-editor/tinymce.d.ts.map +1 -1
- package/lib/controls/html-editor/tinymce.js +44 -43
- package/lib/controls/html-editor/tinymce.js.map +1 -1
- package/lib/controls/input-number/index.d.ts +6 -6
- package/lib/controls/input-number/index.js +68 -68
- package/lib/controls/input-range/index.d.ts +6 -6
- package/lib/controls/input-range/index.js +27 -27
- package/lib/controls/password-setter/index.d.ts +8 -7
- package/lib/controls/password-setter/index.d.ts.map +1 -1
- package/lib/controls/password-setter/index.js +50 -50
- package/lib/controls/progress/index.d.ts +6 -6
- package/lib/controls/progress/index.js +44 -44
- package/lib/controls/relation-existion/index.d.ts +19 -19
- package/lib/controls/relation-existion/index.d.ts.map +1 -1
- package/lib/controls/relation-existion/index.js +74 -74
- package/lib/controls/rfield/index.d.ts +28 -28
- package/lib/controls/rfield/index.d.ts.map +1 -1
- package/lib/controls/rfield/index.js +130 -130
- package/lib/controls/signature/index.d.ts +30 -30
- package/lib/controls/signature/index.d.ts.map +1 -1
- package/lib/controls/signature/index.js +129 -128
- package/lib/controls/signature/index.js.map +1 -1
- package/lib/controls/steps/index.d.ts +6 -6
- package/lib/controls/steps/index.js +41 -41
- package/lib/controls/text/ellipsis-text.d.ts +21 -21
- package/lib/controls/text/ellipsis-text.js +46 -45
- package/lib/controls/text/ellipsis-text.js.map +1 -1
- package/lib/controls/upload/index.d.ts +14 -14
- package/lib/controls/upload/index.js +99 -99
- package/lib/controls/view-control.d.ts +9 -9
- package/lib/controls/view-control.js +174 -174
- package/lib/custom-page/custom-page-router.d.ts +7 -22
- package/lib/custom-page/custom-page-router.d.ts.map +1 -1
- package/lib/custom-page/custom-page-router.js +66 -64
- package/lib/custom-page/custom-page-router.js.map +1 -1
- package/lib/custom-page/def-custom-page.d.ts +6 -5
- package/lib/custom-page/def-custom-page.d.ts.map +1 -1
- package/lib/custom-page/def-custom-page.js +13 -13
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts +42 -42
- package/lib/custom-page/dtmpl-custom-edit-modal-page.js +35 -34
- package/lib/custom-page/dtmpl-custom-edit-modal-page.js.map +1 -1
- package/lib/detail/button/cquery-button-bar.d.ts +15 -15
- package/lib/detail/button/cquery-button-bar.js +74 -74
- package/lib/detail/button/submit-button-bar.d.ts +18 -18
- package/lib/detail/button/submit-button-bar.d.ts.map +1 -1
- package/lib/detail/button/submit-button-bar.js +103 -104
- package/lib/detail/button/submit-button-bar.js.map +1 -1
- package/lib/detail/edit/dtmpl-edit.d.ts +47 -47
- package/lib/detail/edit/dtmpl-edit.d.ts.map +1 -1
- package/lib/detail/edit/dtmpl-edit.js +197 -196
- package/lib/detail/edit/dtmpl-edit.js.map +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts +38 -38
- package/lib/detail/edit/fields-edit-card.js +64 -63
- package/lib/detail/edit/fields-edit-card.js.map +1 -1
- package/lib/detail/edit/modal-row-edit.d.ts +30 -30
- package/lib/detail/edit/modal-row-edit.js +56 -55
- package/lib/detail/edit/modal-row-edit.js.map +1 -1
- package/lib/detail/edit/post-result/index.d.ts +16 -16
- package/lib/detail/edit/post-result/index.js +27 -27
- package/lib/detail/edit/row-edit-card.d.ts +41 -41
- package/lib/detail/edit/row-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/row-edit-card.js +84 -83
- package/lib/detail/edit/row-edit-card.js.map +1 -1
- package/lib/detail/edit/row-editor.d.ts +32 -32
- package/lib/detail/edit/row-editor.d.ts.map +1 -1
- package/lib/detail/edit/row-editor.js +56 -55
- package/lib/detail/edit/row-editor.js.map +1 -1
- package/lib/detail/rightbar/index.d.ts +19 -19
- package/lib/detail/rightbar/index.js +51 -50
- package/lib/detail/rightbar/index.js.map +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts +43 -43
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +96 -96
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/detail/view/dtmpl-view.d.ts +41 -41
- package/lib/detail/view/dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/dtmpl-view.js +115 -115
- package/lib/detail/view/dtmpl-view.js.map +1 -1
- package/lib/detail/view/field-view-group.d.ts +16 -16
- package/lib/detail/view/field-view-group.js +50 -50
- package/lib/detail/view/modal-dtmpl-view.d.ts +27 -27
- package/lib/detail/view/modal-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.js +32 -31
- package/lib/detail/view/modal-dtmpl-view.js.map +1 -1
- package/lib/detail/view/snapshot-timeline.d.ts +31 -31
- package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
- package/lib/detail/view/snapshot-timeline.js +89 -89
- package/lib/detail/view/snapshot-timeline.js.map +1 -1
- package/lib/exportor/export-frame.d.ts +49 -49
- package/lib/exportor/export-frame.d.ts.map +1 -1
- package/lib/exportor/export-frame.js +142 -141
- package/lib/exportor/export-frame.js.map +1 -1
- package/lib/exportor/index.d.ts +15 -15
- package/lib/exportor/index.js +43 -43
- package/lib/form/criteria-form.d.ts +19 -19
- package/lib/form/criteria-form.js +147 -147
- package/lib/form/dtmpl-form.d.ts +44 -44
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/dtmpl-form.js +204 -203
- package/lib/form/dtmpl-form.js.map +1 -1
- package/lib/form/field-group-form.d.ts +20 -20
- package/lib/form/field-group-form.js +57 -57
- package/lib/form/fields-form.d.ts +19 -19
- package/lib/form/fields-form.js +31 -31
- package/lib/form/form-Item-group.d.ts +29 -29
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/form/form-Item-group.js +108 -107
- package/lib/form/form-Item-group.js.map +1 -1
- package/lib/icon/index.d.ts +10 -10
- package/lib/icon/index.js +21 -21
- package/lib/import/excel-import.d.ts +47 -47
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/import/excel-import.js +234 -234
- package/lib/import/template-builder.d.ts +28 -20
- package/lib/import/template-builder.d.ts.map +1 -1
- package/lib/import/template-builder.js +425 -425
- package/lib/index.d.ts +41 -40
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +79 -78
- package/lib/index.js.map +1 -1
- package/lib/layout/MainPage.d.ts +4 -33
- package/lib/layout/MainPage.d.ts.map +1 -1
- package/lib/layout/MainPage.js +204 -204
- package/lib/layout/MainPage.js.map +1 -1
- package/lib/layout/footer/index.d.ts +6 -5
- package/lib/layout/footer/index.d.ts.map +1 -1
- package/lib/layout/footer/index.js +10 -10
- package/lib/layout/header/index.d.ts +14 -14
- package/lib/layout/header/index.js +35 -35
- package/lib/layout/menu/block.d.ts +16 -8
- package/lib/layout/menu/block.d.ts.map +1 -1
- package/lib/layout/menu/block.js +46 -47
- package/lib/layout/menu/block.js.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts +23 -23
- package/lib/layout/menu/l2menu-message-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.js +96 -96
- package/lib/layout/menu/l2menu-quick-bar.d.ts +29 -29
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.js +93 -93
- package/lib/layout/menu/menu-2layers.d.ts +13 -2
- package/lib/layout/menu/menu-2layers.d.ts.map +1 -1
- package/lib/layout/menu/menu-2layers.js +69 -70
- package/lib/layout/menu/menu-2layers.js.map +1 -1
- package/lib/layout/menu/menu-render.d.ts +8 -8
- package/lib/layout/menu/menu-render.js +74 -74
- package/lib/layout/menu/reset-password.d.ts +24 -24
- package/lib/layout/menu/reset-password.d.ts.map +1 -1
- package/lib/layout/menu/reset-password.js +113 -113
- package/lib/layout/menu/user-bar.d.ts +22 -22
- package/lib/layout/menu/user-bar.js +99 -99
- package/lib/layout/menu/userinfo-bar.d.ts +16 -16
- package/lib/layout/menu/userinfo-bar.d.ts.map +1 -1
- package/lib/layout/menu/userinfo-bar.js +43 -43
- package/lib/layout/sidebar/index.d.ts +11 -11
- package/lib/layout/sidebar/index.js +17 -17
- package/lib/login/context-setter.d.ts +23 -23
- package/lib/login/context-setter.d.ts.map +1 -1
- package/lib/login/context-setter.js +97 -97
- package/lib/login/context-setter.js.map +1 -1
- package/lib/login/login-context.d.ts +21 -10
- package/lib/login/login-context.d.ts.map +1 -1
- package/lib/login/login-context.js +126 -126
- package/lib/login/login.d.ts +2 -10
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +105 -101
- package/lib/login/login.js.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts +42 -42
- package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.js +162 -162
- package/lib/module/dtmpl-edit-card.js.map +1 -1
- package/lib/module/dtmpl-edit-drawer.d.ts +16 -16
- package/lib/module/dtmpl-edit-drawer.js +7 -7
- package/lib/module/dtmpl-edit-modal.d.ts +17 -17
- package/lib/module/dtmpl-edit-modal.js +7 -7
- package/lib/module/dtmpl-edit-page.d.ts +59 -59
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.js +191 -191
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/module/dtmpl-editor.d.ts +38 -38
- package/lib/module/dtmpl-editor.d.ts.map +1 -1
- package/lib/module/dtmpl-editor.js +146 -145
- package/lib/module/dtmpl-editor.js.map +1 -1
- package/lib/module/dtmpl-view-card.d.ts +18 -18
- package/lib/module/dtmpl-view-card.d.ts.map +1 -1
- package/lib/module/dtmpl-view-card.js +45 -45
- package/lib/module/dtmpl-view-drawer.d.ts +26 -26
- package/lib/module/dtmpl-view-drawer.js +39 -39
- package/lib/module/dtmpl-view-drawer.js.map +1 -1
- package/lib/module/dtmpl-view-modal.d.ts +27 -27
- package/lib/module/dtmpl-view-modal.js +35 -35
- package/lib/module/dtmpl-view-modal.js.map +1 -1
- package/lib/module/ltmpl-drawer.d.ts +28 -28
- package/lib/module/ltmpl-drawer.js +37 -36
- package/lib/module/ltmpl-drawer.js.map +1 -1
- package/lib/module/ltmpl-modal.d.ts +28 -28
- package/lib/module/ltmpl-modal.js +36 -35
- package/lib/module/ltmpl-modal.js.map +1 -1
- package/lib/module/ltmpl-table.d.ts +61 -56
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/module/ltmpl-table.js +217 -210
- package/lib/module/ltmpl-table.js.map +1 -1
- package/lib/routable/dtmpl-route.d.ts +9 -30
- package/lib/routable/dtmpl-route.d.ts.map +1 -1
- package/lib/routable/dtmpl-route.js +151 -154
- package/lib/routable/dtmpl-route.js.map +1 -1
- package/lib/routable/import-route.d.ts +5 -12
- package/lib/routable/import-route.d.ts.map +1 -1
- package/lib/routable/import-route.js +29 -28
- package/lib/routable/import-route.js.map +1 -1
- package/lib/routable/ltmpl-route.d.ts +10 -28
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.js +188 -169
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/lib/routable/withroute.d.ts +3 -0
- package/lib/routable/withroute.d.ts.map +1 -0
- package/lib/routable/withroute.js +11 -0
- package/lib/routable/withroute.js.map +1 -0
- package/lib/table/act-table.d.ts +90 -89
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +529 -532
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-selector.d.ts +24 -24
- package/lib/table/column/column-selector.js +59 -59
- package/lib/table/column/column-selector.js.map +1 -1
- package/lib/table/l2-act-table.d.ts +27 -22
- package/lib/table/l2-act-table.d.ts.map +1 -1
- package/lib/table/l2-act-table.js +86 -79
- package/lib/table/l2-act-table.js.map +1 -1
- package/lib/table/modal-select-table.d.ts +46 -41
- package/lib/table/modal-select-table.d.ts.map +1 -1
- package/lib/table/modal-select-table.js +215 -207
- package/lib/table/modal-select-table.js.map +1 -1
- package/lib/table/pagination.d.ts +16 -16
- package/lib/table/pagination.d.ts.map +1 -1
- package/lib/table/pagination.js +39 -39
- package/lib/table/pagination.js.map +1 -1
- package/lib/table/query-table.d.ts +73 -64
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +264 -256
- package/lib/table/query-table.js.map +1 -1
- package/lib/table/relation-table.d.ts +64 -64
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +425 -425
- package/lib/table/relation-table.js.map +1 -1
- package/lib/table/select-table.d.ts +45 -40
- package/lib/table/select-table.d.ts.map +1 -1
- package/lib/table/select-table.js +226 -220
- package/lib/table/select-table.js.map +1 -1
- package/lib/table/selected-rows-card.d.ts +15 -15
- package/lib/table/selected-rows-card.js +46 -46
- package/lib/table/stat/restat.d.ts +25 -25
- package/lib/table/stat/restat.d.ts.map +1 -1
- package/lib/table/stat/restat.js +60 -60
- package/lib/table/stat/restat.js.map +1 -1
- package/lib/table/table-util.d.ts +4 -4
- package/lib/table/table-util.js +25 -25
- package/lib/tmpl/control-type-supportor.d.ts +8 -8
- package/lib/tmpl/control-type-supportor.js +98 -98
- package/lib/tmpl/hc-data-source.d.ts +25 -25
- package/lib/tmpl/hc-data-source.js +331 -331
- package/lib/tmpl/hcservice-v3.d.ts +77 -76
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +803 -787
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +272 -269
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js +3 -3
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/tmpl/superagent.d.ts +9 -9
- package/lib/tmpl/superagent.js +142 -142
- package/lib/tmpl/tmpl-config-analysis.d.ts +6 -6
- package/lib/tmpl/tmpl-config-analysis.js +106 -106
- package/lib/units/EncryptUtils.d.ts +6 -6
- package/lib/units/EncryptUtils.js +30 -29
- package/lib/units/EncryptUtils.js.map +1 -1
- package/lib/units/index.d.ts +80 -81
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +747 -742
- package/lib/units/index.js.map +1 -1
- package/lib/units/storage.d.ts +2 -2
- package/lib/units/storage.js +1 -1
- package/lib/welcome/HCWelcome.d.ts +17 -13
- package/lib/welcome/HCWelcome.d.ts.map +1 -1
- package/lib/welcome/HCWelcome.js +199 -198
- package/lib/welcome/HCWelcome.js.map +1 -1
- package/lib/welcome/quick-entrance.d.ts +19 -19
- package/lib/welcome/quick-entrance.d.ts.map +1 -1
- package/lib/welcome/quick-entrance.js +78 -78
- package/lib/welcome/workbench.d.ts +19 -19
- package/lib/welcome/workbench.d.ts.map +1 -1
- package/lib/welcome/workbench.js +77 -77
- package/package.json +10 -10
- package/src/aldehyde/controls/action/index.tsx +2 -3
- package/src/aldehyde/controls/cascader/index.tsx +1 -1
- package/src/aldehyde/controls/chemstruc/graph.tsx +2 -2
- package/src/aldehyde/controls/collapse-card/index.tsx +1 -1
- package/src/aldehyde/controls/color-picker/index.tsx +1 -1
- package/src/aldehyde/controls/cquery/cquick-button.tsx +1 -1
- package/src/aldehyde/controls/entity-select/entity-select.tsx +17 -20
- package/src/aldehyde/controls/entity-select/lab-tree-select.tsx +1 -1
- package/src/aldehyde/controls/file-view/drawer-file-view.tsx +1 -1
- package/src/aldehyde/controls/file-view/index.tsx +1 -1
- package/src/aldehyde/controls/html-editor/draft.tsx +2 -2
- package/src/aldehyde/controls/relation-existion/index.tsx +1 -1
- package/src/aldehyde/controls/rfield/index.tsx +4 -4
- package/src/aldehyde/controls/signature/index.tsx +3 -3
- package/src/aldehyde/custom-page/custom-page-router.tsx +18 -15
- package/src/aldehyde/detail/button/submit-button-bar.tsx +1 -2
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +11 -11
- package/src/aldehyde/detail/edit/row-edit-card.tsx +1 -1
- package/src/aldehyde/detail/edit/row-editor.tsx +1 -1
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +6 -6
- package/src/aldehyde/detail/view/dtmpl-view.tsx +4 -4
- package/src/aldehyde/detail/view/modal-dtmpl-view.tsx +0 -2
- package/src/aldehyde/detail/view/snapshot-timeline.tsx +2 -2
- package/src/aldehyde/exportor/export-frame.tsx +11 -11
- package/src/aldehyde/form/dtmpl-form.tsx +3 -3
- package/src/aldehyde/form/form-Item-group.tsx +1 -1
- package/src/aldehyde/import/excel-import.tsx +11 -11
- package/src/aldehyde/index.tsx +4 -2
- package/src/aldehyde/layout/MainPage.tsx +17 -19
- package/src/aldehyde/layout/menu/block.tsx +3 -3
- package/src/aldehyde/layout/menu/l2menu-message-bar.tsx +3 -3
- package/src/aldehyde/layout/menu/l2menu-quick-bar.tsx +4 -4
- package/src/aldehyde/layout/menu/menu-2layers.tsx +3 -4
- package/src/aldehyde/layout/menu/menu-render.tsx +1 -1
- package/src/aldehyde/layout/menu/reset-password.tsx +3 -3
- package/src/aldehyde/layout/menu/userinfo-bar.tsx +1 -1
- package/src/aldehyde/login/context-setter.tsx +3 -3
- package/src/aldehyde/login/login.js +9 -2
- package/src/aldehyde/module/dtmpl-edit-card.tsx +8 -8
- package/src/aldehyde/module/dtmpl-edit-page.tsx +8 -8
- package/src/aldehyde/module/dtmpl-editor.tsx +5 -5
- package/src/aldehyde/module/dtmpl-view-card.tsx +1 -1
- package/src/aldehyde/module/ltmpl-table.tsx +22 -11
- package/src/aldehyde/routable/dtmpl-route.tsx +32 -34
- package/src/aldehyde/routable/import-route.tsx +4 -3
- package/src/aldehyde/routable/ltmpl-route.tsx +100 -75
- package/src/aldehyde/routable/withroute.tsx +22 -0
- package/src/aldehyde/table/act-table.tsx +31 -32
- package/src/aldehyde/table/l2-act-table.tsx +15 -8
- package/src/aldehyde/table/modal-select-table.tsx +22 -12
- package/src/aldehyde/table/pagination.tsx +3 -4
- package/src/aldehyde/table/query-table.tsx +63 -51
- package/src/aldehyde/table/relation-table.tsx +9 -9
- package/src/aldehyde/table/select-table.tsx +22 -10
- package/src/aldehyde/table/stat/restat.tsx +2 -2
- package/src/aldehyde/tmpl/hcservice-v3.tsx +15 -0
- package/src/aldehyde/tmpl/interface.tsx +5 -1
- package/src/aldehyde/units/index.tsx +18 -13
- package/src/aldehyde/welcome/quick-entrance.tsx +1 -1
- package/src/aldehyde/welcome/workbench.tsx +1 -1
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
export default class ActionUtils {
|
|
2
|
-
static isShow(actionConfig, data, formRef) {
|
|
3
|
-
//所有data都必须满足条件才能显示
|
|
4
|
-
//let comparator=actionConfig.comparator;
|
|
5
|
-
let preFieldConfigs = actionConfig.preposes;
|
|
6
|
-
if (!preFieldConfigs || preFieldConfigs.length <= 0) {
|
|
7
|
-
return true;
|
|
8
|
-
}
|
|
9
|
-
let isShow = true;
|
|
10
|
-
if (formRef && formRef.current) {
|
|
11
|
-
for (let fieldConfig of preFieldConfigs) {
|
|
12
|
-
if (!fieldConfig) {
|
|
13
|
-
continue;
|
|
14
|
-
}
|
|
15
|
-
let value = this.getFormRefValue(formRef, fieldConfig.id);
|
|
16
|
-
// if (value) {
|
|
17
|
-
if (!this.comparator(fieldConfig.comparator, value, fieldConfig.defaultValue)) {
|
|
18
|
-
isShow = false;
|
|
19
|
-
break;
|
|
20
|
-
}
|
|
21
|
-
//} else if (data) {
|
|
22
|
-
// if (!isShow) {
|
|
23
|
-
// // break;
|
|
24
|
-
// // }
|
|
25
|
-
// // for (let d1 of data) {
|
|
26
|
-
// // if (d1 && d1['fieldMap']) {
|
|
27
|
-
// // if (!this.comparator(fieldConfig.comparator, d1['fieldMap'][fieldConfig.id], fieldConfig.defaultValue)) {
|
|
28
|
-
// // isShow = false;
|
|
29
|
-
// // break;
|
|
30
|
-
// // }
|
|
31
|
-
// // } else if (!this.comparator(fieldConfig.comparator, d1[fieldConfig.id], fieldConfig.defaultValue)){
|
|
32
|
-
// // isShow = false;
|
|
33
|
-
// // break;
|
|
34
|
-
// // }else{
|
|
35
|
-
// // isShow = false;
|
|
36
|
-
// // break;
|
|
37
|
-
// // }
|
|
38
|
-
// // }
|
|
39
|
-
// // }
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
else if (data) {
|
|
43
|
-
for (let d of data) {
|
|
44
|
-
if (!isShow) {
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
if (!d) {
|
|
48
|
-
isShow = false;
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
for (let fieldConfig of preFieldConfigs) {
|
|
52
|
-
if (d['fieldMap']) {
|
|
53
|
-
if (!this.comparator(fieldConfig.comparator, d['fieldMap'][fieldConfig.id], fieldConfig.defaultValue)) {
|
|
54
|
-
isShow = false;
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
if (!this.comparator(fieldConfig.comparator, d[fieldConfig.id], fieldConfig.defaultValue)) {
|
|
60
|
-
isShow = false;
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
isShow = false;
|
|
69
|
-
}
|
|
70
|
-
return isShow;
|
|
71
|
-
}
|
|
72
|
-
static comparator(comparator, value, defaultValue) {
|
|
73
|
-
let dvs;
|
|
74
|
-
if (!comparator) {
|
|
75
|
-
comparator = 'equal';
|
|
76
|
-
}
|
|
77
|
-
if (!defaultValue) {
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
if (!value && value != '0') {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
switch (comparator) {
|
|
84
|
-
case "equal":
|
|
85
|
-
return value == defaultValue;
|
|
86
|
-
case "exclude":
|
|
87
|
-
(typeof (defaultValue) == 'string') ? dvs = defaultValue.split(',') : dvs = defaultValue;
|
|
88
|
-
return !dvs.includes(value);
|
|
89
|
-
case "includeOne":
|
|
90
|
-
(typeof (defaultValue) == 'string') ? dvs = defaultValue.split(',') : dvs = defaultValue;
|
|
91
|
-
return dvs.includes(value);
|
|
92
|
-
case "noGreater":
|
|
93
|
-
return value <= defaultValue;
|
|
94
|
-
case "noLess":
|
|
95
|
-
return value >= defaultValue;
|
|
96
|
-
case "unequal":
|
|
97
|
-
return value != defaultValue;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
static getFormRefValue(formRef, key) {
|
|
101
|
-
if (formRef && formRef.current) {
|
|
102
|
-
// console.log("formRef.current.getFieldsValue",formRef.current.getFieldValue(key));
|
|
103
|
-
return formRef.current.getFieldValue(key);
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
return false;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
1
|
+
export default class ActionUtils {
|
|
2
|
+
static isShow(actionConfig, data, formRef) {
|
|
3
|
+
//所有data都必须满足条件才能显示
|
|
4
|
+
//let comparator=actionConfig.comparator;
|
|
5
|
+
let preFieldConfigs = actionConfig.preposes;
|
|
6
|
+
if (!preFieldConfigs || preFieldConfigs.length <= 0) {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
let isShow = true;
|
|
10
|
+
if (formRef && formRef.current) {
|
|
11
|
+
for (let fieldConfig of preFieldConfigs) {
|
|
12
|
+
if (!fieldConfig) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
let value = this.getFormRefValue(formRef, fieldConfig.id);
|
|
16
|
+
// if (value) {
|
|
17
|
+
if (!this.comparator(fieldConfig.comparator, value, fieldConfig.defaultValue)) {
|
|
18
|
+
isShow = false;
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
//} else if (data) {
|
|
22
|
+
// if (!isShow) {
|
|
23
|
+
// // break;
|
|
24
|
+
// // }
|
|
25
|
+
// // for (let d1 of data) {
|
|
26
|
+
// // if (d1 && d1['fieldMap']) {
|
|
27
|
+
// // if (!this.comparator(fieldConfig.comparator, d1['fieldMap'][fieldConfig.id], fieldConfig.defaultValue)) {
|
|
28
|
+
// // isShow = false;
|
|
29
|
+
// // break;
|
|
30
|
+
// // }
|
|
31
|
+
// // } else if (!this.comparator(fieldConfig.comparator, d1[fieldConfig.id], fieldConfig.defaultValue)){
|
|
32
|
+
// // isShow = false;
|
|
33
|
+
// // break;
|
|
34
|
+
// // }else{
|
|
35
|
+
// // isShow = false;
|
|
36
|
+
// // break;
|
|
37
|
+
// // }
|
|
38
|
+
// // }
|
|
39
|
+
// // }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (data) {
|
|
43
|
+
for (let d of data) {
|
|
44
|
+
if (!isShow) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
if (!d) {
|
|
48
|
+
isShow = false;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
for (let fieldConfig of preFieldConfigs) {
|
|
52
|
+
if (d['fieldMap']) {
|
|
53
|
+
if (!this.comparator(fieldConfig.comparator, d['fieldMap'][fieldConfig.id], fieldConfig.defaultValue)) {
|
|
54
|
+
isShow = false;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
if (!this.comparator(fieldConfig.comparator, d[fieldConfig.id], fieldConfig.defaultValue)) {
|
|
60
|
+
isShow = false;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
isShow = false;
|
|
69
|
+
}
|
|
70
|
+
return isShow;
|
|
71
|
+
}
|
|
72
|
+
static comparator(comparator, value, defaultValue) {
|
|
73
|
+
let dvs;
|
|
74
|
+
if (!comparator) {
|
|
75
|
+
comparator = 'equal';
|
|
76
|
+
}
|
|
77
|
+
if (!defaultValue) {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
if (!value && value != '0') {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
switch (comparator) {
|
|
84
|
+
case "equal":
|
|
85
|
+
return value == defaultValue;
|
|
86
|
+
case "exclude":
|
|
87
|
+
(typeof (defaultValue) == 'string') ? dvs = defaultValue.split(',') : dvs = defaultValue;
|
|
88
|
+
return !dvs.includes(value);
|
|
89
|
+
case "includeOne":
|
|
90
|
+
(typeof (defaultValue) == 'string') ? dvs = defaultValue.split(',') : dvs = defaultValue;
|
|
91
|
+
return dvs.includes(value);
|
|
92
|
+
case "noGreater":
|
|
93
|
+
return value <= defaultValue;
|
|
94
|
+
case "noLess":
|
|
95
|
+
return value >= defaultValue;
|
|
96
|
+
case "unequal":
|
|
97
|
+
return value != defaultValue;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
static getFormRefValue(formRef, key) {
|
|
101
|
+
if (formRef && formRef.current) {
|
|
102
|
+
// console.log("formRef.current.getFieldsValue",formRef.current.getFieldValue(key));
|
|
103
|
+
return formRef.current.getFieldValue(key);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
110
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EControlProps } from "../../tmpl/interface";
|
|
3
|
-
interface AutoCompleteProps extends EControlProps {
|
|
4
|
-
}
|
|
5
|
-
declare const AutoComplete: React.FC<AutoCompleteProps>;
|
|
6
|
-
export default AutoComplete;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EControlProps } from "../../tmpl/interface";
|
|
3
|
+
interface AutoCompleteProps extends EControlProps {
|
|
4
|
+
}
|
|
5
|
+
declare const AutoComplete: React.FC<AutoCompleteProps>;
|
|
6
|
+
export default AutoComplete;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AutoComplete as AntdAutoComplete, Input } from "antd";
|
|
3
|
-
import HCDataSource from "../../tmpl/hc-data-source";
|
|
4
|
-
const { TextArea } = Input;
|
|
5
|
-
const AutoComplete = (props) => {
|
|
6
|
-
const { id, value, itemType, fieldConfig, onChange } = props;
|
|
7
|
-
let entryControl = undefined;
|
|
8
|
-
const changeValue = (value1) => {
|
|
9
|
-
if (onChange) {
|
|
10
|
-
let newvalue = undefined;
|
|
11
|
-
if (value1 === undefined) {
|
|
12
|
-
return "";
|
|
13
|
-
}
|
|
14
|
-
let bb = value1.startsWith("@@");
|
|
15
|
-
if (bb) {
|
|
16
|
-
newvalue = (value ? value : "") + value1.substring(2, value1.length);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
newvalue = value1;
|
|
20
|
-
}
|
|
21
|
-
onChange(newvalue);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
let placeholder = !fieldConfig.disabled ? `请输入${fieldConfig.title}` : "无需输入";
|
|
25
|
-
let disabled = fieldConfig.disabled;
|
|
26
|
-
let antdControlProps = {
|
|
27
|
-
id, placeholder, disabled,
|
|
28
|
-
};
|
|
29
|
-
const getSelectArray = () => {
|
|
30
|
-
let data = HCDataSource.getEnums(fieldConfig.mstrucId);
|
|
31
|
-
if (!data) {
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
const options = [];
|
|
35
|
-
data.map((item) => {
|
|
36
|
-
const option = {
|
|
37
|
-
value: "@@" + item.value,
|
|
38
|
-
label: item.title
|
|
39
|
-
};
|
|
40
|
-
options.push(option);
|
|
41
|
-
return false;
|
|
42
|
-
});
|
|
43
|
-
return options;
|
|
44
|
-
};
|
|
45
|
-
entryControl = React.createElement(AntdAutoComplete, { allowClear: true, dropdownMatchSelectWidth: true, options: getSelectArray(), onChange: changeValue, value: value },
|
|
46
|
-
React.createElement(TextArea, Object.assign({ style: {
|
|
47
|
-
height: 150,
|
|
48
|
-
} }, antdControlProps)));
|
|
49
|
-
return entryControl;
|
|
50
|
-
};
|
|
51
|
-
export default AutoComplete;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AutoComplete as AntdAutoComplete, Input } from "antd";
|
|
3
|
+
import HCDataSource from "../../tmpl/hc-data-source";
|
|
4
|
+
const { TextArea } = Input;
|
|
5
|
+
const AutoComplete = (props) => {
|
|
6
|
+
const { id, value, itemType, fieldConfig, onChange } = props;
|
|
7
|
+
let entryControl = undefined;
|
|
8
|
+
const changeValue = (value1) => {
|
|
9
|
+
if (onChange) {
|
|
10
|
+
let newvalue = undefined;
|
|
11
|
+
if (value1 === undefined) {
|
|
12
|
+
return "";
|
|
13
|
+
}
|
|
14
|
+
let bb = value1.startsWith("@@");
|
|
15
|
+
if (bb) {
|
|
16
|
+
newvalue = (value ? value : "") + value1.substring(2, value1.length);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
newvalue = value1;
|
|
20
|
+
}
|
|
21
|
+
onChange(newvalue);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
let placeholder = !fieldConfig.disabled ? `请输入${fieldConfig.title}` : "无需输入";
|
|
25
|
+
let disabled = fieldConfig.disabled;
|
|
26
|
+
let antdControlProps = {
|
|
27
|
+
id, placeholder, disabled,
|
|
28
|
+
};
|
|
29
|
+
const getSelectArray = () => {
|
|
30
|
+
let data = HCDataSource.getEnums(fieldConfig.mstrucId);
|
|
31
|
+
if (!data) {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
const options = [];
|
|
35
|
+
data.map((item) => {
|
|
36
|
+
const option = {
|
|
37
|
+
value: "@@" + item.value,
|
|
38
|
+
label: item.title
|
|
39
|
+
};
|
|
40
|
+
options.push(option);
|
|
41
|
+
return false;
|
|
42
|
+
});
|
|
43
|
+
return options;
|
|
44
|
+
};
|
|
45
|
+
entryControl = React.createElement(AntdAutoComplete, { allowClear: true, dropdownMatchSelectWidth: true, options: getSelectArray(), onChange: changeValue, value: value },
|
|
46
|
+
React.createElement(TextArea, Object.assign({ style: {
|
|
47
|
+
height: 150,
|
|
48
|
+
} }, antdControlProps)));
|
|
49
|
+
return entryControl;
|
|
50
|
+
};
|
|
51
|
+
export default AutoComplete;
|
|
52
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EControlProps, EnumItem } from "../../tmpl/interface";
|
|
3
|
-
interface CascaderProps extends EControlProps {
|
|
4
|
-
baseValue?: string[];
|
|
5
|
-
}
|
|
6
|
-
interface CascaderState {
|
|
7
|
-
options
|
|
8
|
-
}
|
|
9
|
-
export default class Cascader extends React.PureComponent<CascaderProps, CascaderState> {
|
|
10
|
-
static defaultProps: {
|
|
11
|
-
baseValue: any[];
|
|
12
|
-
};
|
|
13
|
-
state: {
|
|
14
|
-
options: any[];
|
|
15
|
-
};
|
|
16
|
-
componentDidMount(): Promise<void>;
|
|
17
|
-
handleChange: (value: any) => void;
|
|
18
|
-
getOptions: () => Promise<any[]>;
|
|
19
|
-
buildOptions: (options: EnumItem[], ops: object[]) => void;
|
|
20
|
-
render(): JSX.Element;
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EControlProps, EnumItem } from "../../tmpl/interface";
|
|
3
|
+
interface CascaderProps extends EControlProps {
|
|
4
|
+
baseValue?: string[];
|
|
5
|
+
}
|
|
6
|
+
interface CascaderState {
|
|
7
|
+
options?: object[];
|
|
8
|
+
}
|
|
9
|
+
export default class Cascader extends React.PureComponent<CascaderProps, CascaderState> {
|
|
10
|
+
static defaultProps: {
|
|
11
|
+
baseValue: any[];
|
|
12
|
+
};
|
|
13
|
+
state: {
|
|
14
|
+
options: any[];
|
|
15
|
+
};
|
|
16
|
+
componentDidMount(): Promise<void>;
|
|
17
|
+
handleChange: (value: any) => void;
|
|
18
|
+
getOptions: () => Promise<any[]>;
|
|
19
|
+
buildOptions: (options: EnumItem[], ops: object[]) => void;
|
|
20
|
+
render(): JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/aldehyde/controls/cascader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAG9D,UAAU,aAAc,SAAQ,aAAa;IAEzC,SAAS,CAAC,EAAC,MAAM,EAAE,CAAC;CAEvB;AAED,UAAU,aAAa;IACnB,OAAO,EAAC,MAAM,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/aldehyde/controls/cascader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAG9D,UAAU,aAAc,SAAQ,aAAa;IAEzC,SAAS,CAAC,EAAC,MAAM,EAAE,CAAC;CAEvB;AAED,UAAU,aAAa;IACnB,OAAO,CAAC,EAAC,MAAM,EAAE,CAAA;CACpB;AAED,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC;IAEnF,MAAM,CAAC,YAAY;;MAElB;IAED,KAAK;;MAEJ;IAEK,iBAAiB;IAQvB,YAAY,uBAWX;IAED,UAAU,uBAmCT;IAED,YAAY,YAAU,QAAQ,EAAE,OAAK,MAAM,EAAE,UAe5C;IAED,MAAM;CAaT"}
|
|
@@ -1,107 +1,108 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
-
var t = {};
|
|
12
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
-
t[p] = s[p];
|
|
14
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
-
t[p[i]] = s[p[i]];
|
|
18
|
-
}
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
|
-
import React from 'react';
|
|
22
|
-
import { Cascader as AntdCascader } from 'antd';
|
|
23
|
-
import HCDataSource from "../../tmpl/hc-data-source";
|
|
24
|
-
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
this.state = {
|
|
28
|
-
options: [],
|
|
29
|
-
};
|
|
30
|
-
this.handleChange = (value) => {
|
|
31
|
-
const { onChange } = this.props;
|
|
32
|
-
let res = undefined;
|
|
33
|
-
//console.log('Cascader',value);
|
|
34
|
-
if (value) {
|
|
35
|
-
res = value.join("->");
|
|
36
|
-
// console.log("value.join(\"->\")",res)
|
|
37
|
-
}
|
|
38
|
-
if (onChange) {
|
|
39
|
-
onChange(res);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
this.getOptions = () => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
const { fieldConfig, baseValue } = this.props;
|
|
44
|
-
let options = yield HCDataSource.getOptions(fieldConfig.mstrucId);
|
|
45
|
-
const ops = [];
|
|
46
|
-
let newOptions = [];
|
|
47
|
-
let nextOptions = options;
|
|
48
|
-
let currentOptions = newOptions;
|
|
49
|
-
//先根据 baseValue 过滤一层
|
|
50
|
-
if (baseValue.length > 0) {
|
|
51
|
-
baseValue.map((v, i) => {
|
|
52
|
-
if (i > 0) {
|
|
53
|
-
currentOptions[0].subOptions = [];
|
|
54
|
-
currentOptions = currentOptions[0].subOptions;
|
|
55
|
-
}
|
|
56
|
-
if (nextOptions) {
|
|
57
|
-
for (let option of nextOptions) {
|
|
58
|
-
if (option.title == v) {
|
|
59
|
-
currentOptions.push(Object.assign({}, option));
|
|
60
|
-
nextOptions = option.subOptions;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
newOptions = options;
|
|
68
|
-
}
|
|
69
|
-
this.buildOptions(newOptions, ops);
|
|
70
|
-
return ops;
|
|
71
|
-
});
|
|
72
|
-
this.buildOptions = (options, ops) => {
|
|
73
|
-
options.forEach((item) => {
|
|
74
|
-
const op = {};
|
|
75
|
-
op["value"] = item.title;
|
|
76
|
-
op["label"] = item.title;
|
|
77
|
-
op["key"] = item.id;
|
|
78
|
-
ops.push(op);
|
|
79
|
-
if (item.subOptions) {
|
|
80
|
-
let children = [];
|
|
81
|
-
op['children'] = children;
|
|
82
|
-
this.buildOptions(item.subOptions, children);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
op["isLeaf"] = true;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
componentDidMount() {
|
|
91
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
let options = yield this.getOptions();
|
|
93
|
-
this.setState({
|
|
94
|
-
options
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
render() {
|
|
99
|
-
const { options } = this.state;
|
|
100
|
-
const _a = this.props, { fieldConfig, onChange, value } = _a, other = __rest(_a, ["fieldConfig", "onChange", "value"]);
|
|
101
|
-
return (React.createElement(AntdCascader, Object.assign({ displayRender: label => label.join('->'), options: options, value: value ? value.split('->') : undefined, onChange: this.handleChange }, other)));
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
Cascader.defaultProps = {
|
|
105
|
-
baseValue: [], //['level1','level2']
|
|
106
|
-
};
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
import React from 'react';
|
|
22
|
+
import { Cascader as AntdCascader } from 'antd';
|
|
23
|
+
import HCDataSource from "../../tmpl/hc-data-source";
|
|
24
|
+
class Cascader extends React.PureComponent {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.state = {
|
|
28
|
+
options: [],
|
|
29
|
+
};
|
|
30
|
+
this.handleChange = (value) => {
|
|
31
|
+
const { onChange } = this.props;
|
|
32
|
+
let res = undefined;
|
|
33
|
+
//console.log('Cascader',value);
|
|
34
|
+
if (value) {
|
|
35
|
+
res = value.join("->");
|
|
36
|
+
// console.log("value.join(\"->\")",res)
|
|
37
|
+
}
|
|
38
|
+
if (onChange) {
|
|
39
|
+
onChange(res);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
this.getOptions = () => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const { fieldConfig, baseValue } = this.props;
|
|
44
|
+
let options = yield HCDataSource.getOptions(fieldConfig.mstrucId);
|
|
45
|
+
const ops = [];
|
|
46
|
+
let newOptions = [];
|
|
47
|
+
let nextOptions = options;
|
|
48
|
+
let currentOptions = newOptions;
|
|
49
|
+
//先根据 baseValue 过滤一层
|
|
50
|
+
if (baseValue.length > 0) {
|
|
51
|
+
baseValue.map((v, i) => {
|
|
52
|
+
if (i > 0) {
|
|
53
|
+
currentOptions[0].subOptions = [];
|
|
54
|
+
currentOptions = currentOptions[0].subOptions;
|
|
55
|
+
}
|
|
56
|
+
if (nextOptions) {
|
|
57
|
+
for (let option of nextOptions) {
|
|
58
|
+
if (option.title == v) {
|
|
59
|
+
currentOptions.push(Object.assign({}, option));
|
|
60
|
+
nextOptions = option.subOptions;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
newOptions = options;
|
|
68
|
+
}
|
|
69
|
+
this.buildOptions(newOptions, ops);
|
|
70
|
+
return ops;
|
|
71
|
+
});
|
|
72
|
+
this.buildOptions = (options, ops) => {
|
|
73
|
+
options.forEach((item) => {
|
|
74
|
+
const op = {};
|
|
75
|
+
op["value"] = item.title;
|
|
76
|
+
op["label"] = item.title;
|
|
77
|
+
op["key"] = item.id;
|
|
78
|
+
ops.push(op);
|
|
79
|
+
if (item.subOptions) {
|
|
80
|
+
let children = [];
|
|
81
|
+
op['children'] = children;
|
|
82
|
+
this.buildOptions(item.subOptions, children);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
op["isLeaf"] = true;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
componentDidMount() {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
let options = yield this.getOptions();
|
|
93
|
+
this.setState({
|
|
94
|
+
options
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
render() {
|
|
99
|
+
const { options } = this.state;
|
|
100
|
+
const _a = this.props, { fieldConfig, onChange, value } = _a, other = __rest(_a, ["fieldConfig", "onChange", "value"]);
|
|
101
|
+
return (React.createElement(AntdCascader, Object.assign({ displayRender: label => label.join('->'), options: options, value: value ? value.split('->') : undefined, onChange: this.handleChange }, other)));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
Cascader.defaultProps = {
|
|
105
|
+
baseValue: [], //['level1','level2']
|
|
106
|
+
};
|
|
107
|
+
export default Cascader;
|
|
107
108
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/aldehyde/controls/cascader/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAc,QAAQ,IAAI,YAAY,EAAC,MAAM,MAAM,CAAA;AAE1D,OAAO,YAAY,MAAM,2BAA2B,CAAC;AAYrD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/aldehyde/controls/cascader/index.tsx"],"names":[],"mappings":"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"}
|