aldehyde 0.2.20 → 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 -426
- 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 -77
- package/lib/tmpl/hcservice-v3.js +803 -803
- 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 -746
- 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 +12 -12
- 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/interface.tsx +5 -1
- package/src/aldehyde/units/index.tsx +10 -10
- package/src/aldehyde/welcome/quick-entrance.tsx +1 -1
- package/src/aldehyde/welcome/workbench.tsx +1 -1
|
@@ -1,427 +1,428 @@
|
|
|
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
|
-
import * as React from 'react';
|
|
11
|
-
import { Button, Col, Divider, Row, Select, Spin, Tag } from 'antd';
|
|
12
|
-
import { AlignLeftOutlined, EditOutlined, PlusOutlined, SearchOutlined, TableOutlined } from '@ant-design/icons';
|
|
13
|
-
import debounce from 'lodash/debounce';
|
|
14
|
-
import './index.css';
|
|
15
|
-
import HcserviceV3 from "../../tmpl/hcservice-v3";
|
|
16
|
-
import HCDataSource from "../../tmpl/hc-data-source";
|
|
17
|
-
import DtmplViewDrawer from "../../module/dtmpl-view-drawer";
|
|
18
|
-
import DtmplEditPage from "../../module/dtmpl-edit-page";
|
|
19
|
-
import DtmplCustomEditModalPage from "../../custom-page/dtmpl-custom-edit-modal-page";
|
|
20
|
-
import { LtmplModal } from "../../index";
|
|
21
|
-
;
|
|
22
|
-
;
|
|
23
|
-
|
|
24
|
-
constructor() {
|
|
25
|
-
super(...arguments);
|
|
26
|
-
this.state = {
|
|
27
|
-
titleId: undefined,
|
|
28
|
-
optionCacheKey: undefined,
|
|
29
|
-
pageNo: 1,
|
|
30
|
-
loading: false,
|
|
31
|
-
optionsCache: {},
|
|
32
|
-
codeLabel: {},
|
|
33
|
-
ltmplConfig: undefined,
|
|
34
|
-
showView: false,
|
|
35
|
-
showEdit: false,
|
|
36
|
-
showTable: false,
|
|
37
|
-
drawCode: undefined,
|
|
38
|
-
preMainCode: undefined,
|
|
39
|
-
};
|
|
40
|
-
this.dropdownRender = (menu) => {
|
|
41
|
-
const { fieldConfig } = this.props;
|
|
42
|
-
const { actions } = fieldConfig;
|
|
43
|
-
// console.log("menu",menu);
|
|
44
|
-
return React.createElement(React.Fragment, null,
|
|
45
|
-
menu,
|
|
46
|
-
actions && actions.indexOf('add') >= 0 ?
|
|
47
|
-
React.createElement(React.Fragment, null,
|
|
48
|
-
React.createElement(Divider, { style: { margin: '8px 0' } }),
|
|
49
|
-
React.createElement(Row, { justify: "end" },
|
|
50
|
-
React.createElement(Col, null,
|
|
51
|
-
React.createElement(Button, { type: "text", icon: React.createElement(TableOutlined, { style: { color: '#0958d9' } }), onClick: () => this.showTable() })),
|
|
52
|
-
React.createElement(Col, null,
|
|
53
|
-
React.createElement(Button, { type: "text", icon: React.createElement(PlusOutlined, { style: { color: '#0958d9' } }), onClick: () => this.editItem() })))) : null);
|
|
54
|
-
};
|
|
55
|
-
this.editItem = (code) => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
let ltmplConfig = yield this.loadLtmplConfig();
|
|
57
|
-
this.setState({
|
|
58
|
-
showEdit: true,
|
|
59
|
-
showTable: false,
|
|
60
|
-
showView: false,
|
|
61
|
-
drawCode: code,
|
|
62
|
-
ltmplConfig,
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
this.showTable = () => __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
this.setState({
|
|
67
|
-
showEdit: false,
|
|
68
|
-
showTable: true,
|
|
69
|
-
showView: false,
|
|
70
|
-
drawCode: undefined,
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
this.loadLtmplConfig = () => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
const { fieldConfig } = this.props;
|
|
75
|
-
const { ltmplConfig } = this.state;
|
|
76
|
-
let ltmplConfig_ = ltmplConfig;
|
|
77
|
-
if (!ltmplConfig_) {
|
|
78
|
-
ltmplConfig_ = (yield HCDataSource.requestLtmplConfig(fieldConfig.id)).ltmplConfig;
|
|
79
|
-
}
|
|
80
|
-
this.setState({
|
|
81
|
-
ltmplConfig: ltmplConfig_
|
|
82
|
-
});
|
|
83
|
-
return ltmplConfig_;
|
|
84
|
-
});
|
|
85
|
-
this.showItem = (code) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
let ltmplConfig = yield this.loadLtmplConfig();
|
|
87
|
-
this.setState({
|
|
88
|
-
showEdit: false,
|
|
89
|
-
showTable: false,
|
|
90
|
-
showView: true,
|
|
91
|
-
drawCode: code,
|
|
92
|
-
ltmplConfig,
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
this.initCache = () => {
|
|
96
|
-
this.setState({
|
|
97
|
-
optionsCache: {},
|
|
98
|
-
codeLabel: {}
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
// componentWillUnmount(): void {
|
|
102
|
-
// this.setState=(state,callback)=>{
|
|
103
|
-
// return
|
|
104
|
-
// }
|
|
105
|
-
// }
|
|
106
|
-
this.toOption = (code, title, onEntityClick) => {
|
|
107
|
-
const { fieldConfig } = this.props;
|
|
108
|
-
const { actions } = fieldConfig;
|
|
109
|
-
const { codeLabel } = this.state;
|
|
110
|
-
codeLabel[code] = title;
|
|
111
|
-
let option = {
|
|
112
|
-
value: code,
|
|
113
|
-
label: React.createElement(React.Fragment, null,
|
|
114
|
-
title,
|
|
115
|
-
actions && actions.indexOf("detail") >= 0 ?
|
|
116
|
-
React.createElement(Button, { size: 'small', type: 'text' },
|
|
117
|
-
React.createElement(AlignLeftOutlined, { style: { color: '#0958d9' }, onClick: (event) => {
|
|
118
|
-
event.stopPropagation();
|
|
119
|
-
this.showItem(code);
|
|
120
|
-
} })) : null,
|
|
121
|
-
actions && actions.indexOf("edit") >= 0 ?
|
|
122
|
-
React.createElement(Button, { size: 'small', type: 'text' },
|
|
123
|
-
React.createElement(EditOutlined, { style: { color: '#0958d9' }, onClick: (event) => {
|
|
124
|
-
event.stopPropagation();
|
|
125
|
-
this.editItem(code);
|
|
126
|
-
} }))
|
|
127
|
-
: null),
|
|
128
|
-
};
|
|
129
|
-
return option;
|
|
130
|
-
};
|
|
131
|
-
this.doClose = () => {
|
|
132
|
-
this.setState({
|
|
133
|
-
drawCode: undefined,
|
|
134
|
-
showEdit: false,
|
|
135
|
-
showView: false,
|
|
136
|
-
showTable: false,
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
|
-
this.drawSubmited = () => {
|
|
140
|
-
this.initCache();
|
|
141
|
-
this.doClose();
|
|
142
|
-
};
|
|
143
|
-
this.closeTable = () => {
|
|
144
|
-
this.drawSubmited();
|
|
145
|
-
};
|
|
146
|
-
this.toValueArray = (value) => {
|
|
147
|
-
let result = [];
|
|
148
|
-
let valueArray = this.toArray(value);
|
|
149
|
-
for (let v of valueArray) {
|
|
150
|
-
if (v) {
|
|
151
|
-
let vs = v.split("@R@");
|
|
152
|
-
if (vs[1] != 'null') {
|
|
153
|
-
result.push(vs[0]);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return result;
|
|
158
|
-
};
|
|
159
|
-
this.toArray = (value) => {
|
|
160
|
-
let valueArray = [];
|
|
161
|
-
if (value instanceof Array) {
|
|
162
|
-
valueArray = value;
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
if (value) {
|
|
166
|
-
valueArray = value.split(',');
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
valueArray = [];
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
return valueArray;
|
|
173
|
-
};
|
|
174
|
-
this.toOptions = (value, onEntityClick) => {
|
|
175
|
-
const { fieldConfig } = this.props;
|
|
176
|
-
let options = [];
|
|
177
|
-
//console.log('options value', value);
|
|
178
|
-
let valueArray = this.toArray(value);
|
|
179
|
-
for (let v of valueArray) {
|
|
180
|
-
if (v) {
|
|
181
|
-
let vs = v.split("@R@");
|
|
182
|
-
if (vs[1] != 'null') {
|
|
183
|
-
options.push(this.toOption(vs[0], vs[1], onEntityClick));
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
//添加补充项
|
|
188
|
-
if (fieldConfig.suppleOptions) {
|
|
189
|
-
fieldConfig.suppleOptions.forEach((o) => {
|
|
190
|
-
let had = false;
|
|
191
|
-
options.forEach((s) => {
|
|
192
|
-
if (s['value'] == o.code) {
|
|
193
|
-
had = true;
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
if (!had) {
|
|
198
|
-
options.push(this.toOption(o.code, o.title, undefined));
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
//console.log('options', options);
|
|
203
|
-
return options;
|
|
204
|
-
};
|
|
205
|
-
this.fetchNextPage = () => __awaiter(this, void 0, void 0, function* () {
|
|
206
|
-
const { optionCacheKey, titleId, optionsCache } = this.state;
|
|
207
|
-
let optionCache = optionsCache[optionCacheKey];
|
|
208
|
-
let pageInfo = optionCache.pageInfo;
|
|
209
|
-
if (!optionCache.touchEnd) {
|
|
210
|
-
pageInfo.pageNo = pageInfo.pageNo + 1;
|
|
211
|
-
let dataSource = yield this.loadData(optionCache.queryKey.key, Object.assign({}, pageInfo), titleId);
|
|
212
|
-
if (dataSource) {
|
|
213
|
-
optionCache.options = [...optionCache.options, ...dataSource.options];
|
|
214
|
-
optionCache.touchEnd = dataSource.touchEnd;
|
|
215
|
-
}
|
|
216
|
-
this.setState({
|
|
217
|
-
pageNo: pageInfo.pageNo,
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
this.fetchOptions = (searchText) => __awaiter(this, void 0, void 0, function* () {
|
|
222
|
-
const { fieldConfig, mainCode, baseCriteria } = this.props;
|
|
223
|
-
const { optionsCache, ltmplConfig, preMainCode } = this.state;
|
|
224
|
-
const currentMainCode = mainCode ? mainCode : fieldConfig.mainCode;
|
|
225
|
-
if (preMainCode != currentMainCode) {
|
|
226
|
-
this.setState({ preMainCode: currentMainCode.toString() });
|
|
227
|
-
//清空,
|
|
228
|
-
this.initCache();
|
|
229
|
-
}
|
|
230
|
-
let optionCacheKey = "withoutValue";
|
|
231
|
-
//先从缓存里拿
|
|
232
|
-
if (searchText) {
|
|
233
|
-
optionCacheKey = searchText;
|
|
234
|
-
}
|
|
235
|
-
let titleId = this.state.titleId;
|
|
236
|
-
let optionCache = optionsCache[optionCacheKey];
|
|
237
|
-
if (!optionCache) {
|
|
238
|
-
this.setState({
|
|
239
|
-
loading: true,
|
|
240
|
-
});
|
|
241
|
-
let ltmplConfig_ = ltmplConfig;
|
|
242
|
-
if (!ltmplConfig_) {
|
|
243
|
-
ltmplConfig_ = yield this.loadLtmplConfig();
|
|
244
|
-
}
|
|
245
|
-
let pageInfo = {
|
|
246
|
-
pageNo: 1,
|
|
247
|
-
pageSize: 6,
|
|
248
|
-
virtualEndPageNo: undefined,
|
|
249
|
-
};
|
|
250
|
-
titleId = ltmplConfig_.primaryColumn.id;
|
|
251
|
-
//得到第一个过滤条件
|
|
252
|
-
let firstCriteria = ltmplConfig_.primaryCriteria;
|
|
253
|
-
let formItemName = 'undefinedCriteria';
|
|
254
|
-
if (firstCriteria) {
|
|
255
|
-
formItemName = 'c_' + firstCriteria.id;
|
|
256
|
-
}
|
|
257
|
-
const { defaultPageSize } = ltmplConfig_;
|
|
258
|
-
if (defaultPageSize) {
|
|
259
|
-
pageInfo.pageSize = defaultPageSize;
|
|
260
|
-
}
|
|
261
|
-
/** 构建 dataSource **/
|
|
262
|
-
//构建过滤条件
|
|
263
|
-
let criteriaData = {};
|
|
264
|
-
if (baseCriteria) {
|
|
265
|
-
criteriaData = Object.assign({}, baseCriteria);
|
|
266
|
-
}
|
|
267
|
-
// let mainCode_ = mainCode;
|
|
268
|
-
// if (baseCriteria) {
|
|
269
|
-
// criteriaData = {...baseCriteria}
|
|
270
|
-
// if (!mainCode) {
|
|
271
|
-
// mainCode_ = baseCriteria['mainCode']; //当只在条件中设置mainCode时,保证生效不被设置为null
|
|
272
|
-
// }
|
|
273
|
-
// }
|
|
274
|
-
criteriaData[formItemName] = searchText;
|
|
275
|
-
let queryKey = yield HcserviceV3.requestLtmplQueryKey(fieldConfig.id, Object.assign(Object.assign(Object.assign({}, criteriaData), pageInfo), { mainCode: currentMainCode }));
|
|
276
|
-
let sourceData = yield this.loadData(queryKey.key, pageInfo, titleId);
|
|
277
|
-
optionCache = {
|
|
278
|
-
options: sourceData.options,
|
|
279
|
-
pageInfo,
|
|
280
|
-
queryKey,
|
|
281
|
-
searchValue: searchText,
|
|
282
|
-
touchEnd: sourceData.touchEnd
|
|
283
|
-
};
|
|
284
|
-
optionsCache[optionCacheKey] = optionCache;
|
|
285
|
-
this.setState({
|
|
286
|
-
optionCacheKey,
|
|
287
|
-
titleId,
|
|
288
|
-
optionsCache: Object.assign({}, optionsCache),
|
|
289
|
-
loading: false,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
if (this.state.optionCacheKey == optionCacheKey && optionCacheKey == 'withoutValue') {
|
|
294
|
-
this.setState({
|
|
295
|
-
loading: false,
|
|
296
|
-
optionCacheKey,
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
else {
|
|
300
|
-
debounce(() => {
|
|
301
|
-
this.setState({
|
|
302
|
-
loading: false,
|
|
303
|
-
optionCacheKey,
|
|
304
|
-
});
|
|
305
|
-
}, 500)();
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
this.onChange = (values) => {
|
|
310
|
-
const { codeLabel } = this.state;
|
|
311
|
-
let newValues = [...values];
|
|
312
|
-
if (values && values.length > this.props.maxSelected) {
|
|
313
|
-
newValues.shift();
|
|
314
|
-
}
|
|
315
|
-
let formValues = [];
|
|
316
|
-
newValues.forEach((c) => {
|
|
317
|
-
if (c.indexOf("@R@") > 0) {
|
|
318
|
-
formValues.push(c);
|
|
319
|
-
}
|
|
320
|
-
else {
|
|
321
|
-
formValues.push(c + "@R@" + codeLabel[c]);
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
this.props.onChange(formValues);
|
|
325
|
-
};
|
|
326
|
-
this.tagRender = (props) => {
|
|
327
|
-
const { label, closable, onClose } = props;
|
|
328
|
-
const onPreventMouseDown = (event) => {
|
|
329
|
-
event.preventDefault();
|
|
330
|
-
event.stopPropagation();
|
|
331
|
-
};
|
|
332
|
-
return (React.createElement(Tag, { onMouseDown: onPreventMouseDown, closable: closable, onClose: onClose, style: { marginRight: 3 } }, label));
|
|
333
|
-
};
|
|
334
|
-
this.loadData = (queryKey, pageInfo, titleId) => __awaiter(this, void 0, void 0, function* () {
|
|
335
|
-
const { onEntityClick, baseCriteria } = this.props;
|
|
336
|
-
let queryData = yield HcserviceV3.requestQueryData(queryKey, pageInfo);
|
|
337
|
-
let options = [];
|
|
338
|
-
pageInfo = queryData.pageInfo;
|
|
339
|
-
queryData.entities.forEach((item, index) => {
|
|
340
|
-
let title = item.fieldMap[titleId];
|
|
341
|
-
//放入全局对象缓存
|
|
342
|
-
//这个缓存后续还需要完善,因为太多了,容易爆掉
|
|
343
|
-
HCDataSource.cache(item);
|
|
344
|
-
if (title) {
|
|
345
|
-
let ts = title.split('@R@');
|
|
346
|
-
let t = ts && ts.length > 0 ? ts[ts.length - 1] : title;
|
|
347
|
-
if (t != 'null') {
|
|
348
|
-
let option = this.toOption(item.code, t, onEntityClick);
|
|
349
|
-
options.push(option);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
return { options, touchEnd: queryData.touchEnd };
|
|
354
|
-
});
|
|
355
|
-
this.debounceFetcher = () => {
|
|
356
|
-
const loadOptions = (val) => {
|
|
357
|
-
this.fetchOptions(val);
|
|
358
|
-
};
|
|
359
|
-
return debounce(loadOptions, 800);
|
|
360
|
-
};
|
|
361
|
-
this.debounceFetchNextPage = () => {
|
|
362
|
-
// this.setState({
|
|
363
|
-
// loading: true,
|
|
364
|
-
// })
|
|
365
|
-
debounce(this.fetchNextPage, 200)();
|
|
366
|
-
// this.setState({
|
|
367
|
-
// loading: false,
|
|
368
|
-
// })
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
componentDidUpdate(prevProps) {
|
|
372
|
-
const { baseCriteria, mainCode, fieldConfig } = this.props;
|
|
373
|
-
let { baseCriteria: preBaseCriteria, mainCode: preMainCode, fieldConfig: preFieldConfig } = prevProps;
|
|
374
|
-
if ((baseCriteria && JSON.stringify(baseCriteria) != JSON.stringify(preBaseCriteria)) || (mainCode && mainCode != preMainCode)
|
|
375
|
-
|| (fieldConfig && preFieldConfig && fieldConfig.id != preFieldConfig.id)) {
|
|
376
|
-
this.initCache();
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
render() {
|
|
380
|
-
const { id, value, fieldConfig, onChange, disabled, style, maxSelected, onEntityClick, mainCode } = this.props;
|
|
381
|
-
const { actions } = fieldConfig;
|
|
382
|
-
const { optionCacheKey, loading, optionsCache, drawCode, showEdit, showView, showTable, ltmplConfig } = this.state;
|
|
383
|
-
let initOptions = this.toOptions(value, onEntityClick);
|
|
384
|
-
let exists;
|
|
385
|
-
let properOptions = [...initOptions];
|
|
386
|
-
let listHeight = 256;
|
|
387
|
-
if (optionCacheKey && optionsCache[optionCacheKey]) {
|
|
388
|
-
let optionCache = optionsCache[optionCacheKey];
|
|
389
|
-
if (optionCache['pageInfo'] && optionCache.pageInfo.pageSize < 8) {
|
|
390
|
-
listHeight = 32 * (optionCache['pageInfo'].pageSize) - 10;
|
|
391
|
-
}
|
|
392
|
-
for (let option of optionCache.options) {
|
|
393
|
-
exists = false;
|
|
394
|
-
for (let init of initOptions) {
|
|
395
|
-
if (init['value'] == option['value']) {
|
|
396
|
-
exists = true;
|
|
397
|
-
//用查询的覆盖之前的
|
|
398
|
-
init['label'] = option['label'];
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
if (!exists) {
|
|
402
|
-
properOptions.push(option);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
return React.createElement(React.Fragment, null,
|
|
407
|
-
React.createElement(Select, { disabled: disabled, id: id, listHeight: listHeight, style: Object.assign({}, style), onChange: this.onChange, value: this.toValueArray(value), mode: "multiple", placeholder: `请选择${fieldConfig.title}`, notFoundContent: loading ? React.createElement(Spin, { size: 'small' }) : "无数据", allowClear: true, showArrow: true, suffixIcon: React.createElement(SearchOutlined, null), dropdownRender: this.dropdownRender, tagRender: actions && (actions.indexOf("detail") >= 0 || actions.indexOf("edit") >= 0) ? this.tagRender : undefined, onSearch: this.debounceFetcher(), onClick: disabled ? null : () => {
|
|
408
|
-
debounce(this.fetchOptions, 100)(undefined);
|
|
409
|
-
}, options: loading ? [] : properOptions, onPopupScroll: (e) => {
|
|
410
|
-
const { target } = e;
|
|
411
|
-
if (target['scrollTop'] + target['offsetHeight'] + 1 >= target['scrollHeight']) {
|
|
412
|
-
this.debounceFetchNextPage();
|
|
413
|
-
}
|
|
414
|
-
} }),
|
|
415
|
-
showView && drawCode ?
|
|
416
|
-
React.createElement(DtmplViewDrawer, { placement: 'left', onClose: this.doClose, open: showView, sourceId: fieldConfig.id, code: drawCode }) : null,
|
|
417
|
-
showEdit && ltmplConfig ? ltmplConfig.customEditPagePath ? React.createElement(DtmplCustomEditModalPage, { open: showEdit, onOk: () => {
|
|
418
|
-
this.drawSubmited();
|
|
419
|
-
}, customPath: ltmplConfig.customEditPagePath, sourceId: fieldConfig.id, mainCode: mainCode, code: drawCode })
|
|
420
|
-
: React.createElement(DtmplEditPage, { pageType: "modal", open: showEdit, onCancel: this.doClose, mainCode: mainCode, width: 960, sourceId: fieldConfig.id, code: drawCode, onOk: this.drawSubmited }) : null,
|
|
421
|
-
showTable ? React.createElement(LtmplModal, { open: showTable, onCancel: this.closeTable, width: 960, sourceId: fieldConfig.id, mainCode: mainCode }) : null);
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
EntitySelect.defaultProps = {
|
|
425
|
-
maxSelected: 100,
|
|
426
|
-
};
|
|
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
|
+
import * as React from 'react';
|
|
11
|
+
import { Button, Col, Divider, Row, Select, Spin, Tag } from 'antd';
|
|
12
|
+
import { AlignLeftOutlined, EditOutlined, PlusOutlined, SearchOutlined, TableOutlined } from '@ant-design/icons';
|
|
13
|
+
import debounce from 'lodash/debounce';
|
|
14
|
+
import './index.css';
|
|
15
|
+
import HcserviceV3 from "../../tmpl/hcservice-v3";
|
|
16
|
+
import HCDataSource from "../../tmpl/hc-data-source";
|
|
17
|
+
import DtmplViewDrawer from "../../module/dtmpl-view-drawer";
|
|
18
|
+
import DtmplEditPage from "../../module/dtmpl-edit-page";
|
|
19
|
+
import DtmplCustomEditModalPage from "../../custom-page/dtmpl-custom-edit-modal-page";
|
|
20
|
+
import { LtmplModal } from "../../index";
|
|
21
|
+
;
|
|
22
|
+
;
|
|
23
|
+
class EntitySelect extends React.PureComponent {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.state = {
|
|
27
|
+
titleId: undefined,
|
|
28
|
+
optionCacheKey: undefined,
|
|
29
|
+
pageNo: 1,
|
|
30
|
+
loading: false,
|
|
31
|
+
optionsCache: {},
|
|
32
|
+
codeLabel: {},
|
|
33
|
+
ltmplConfig: undefined,
|
|
34
|
+
showView: false,
|
|
35
|
+
showEdit: false,
|
|
36
|
+
showTable: false,
|
|
37
|
+
drawCode: undefined,
|
|
38
|
+
preMainCode: undefined,
|
|
39
|
+
};
|
|
40
|
+
this.dropdownRender = (menu) => {
|
|
41
|
+
const { fieldConfig } = this.props;
|
|
42
|
+
const { actions } = fieldConfig;
|
|
43
|
+
// console.log("menu",menu);
|
|
44
|
+
return React.createElement(React.Fragment, null,
|
|
45
|
+
menu,
|
|
46
|
+
actions && actions.indexOf('add') >= 0 ?
|
|
47
|
+
React.createElement(React.Fragment, null,
|
|
48
|
+
React.createElement(Divider, { style: { margin: '8px 0' } }),
|
|
49
|
+
React.createElement(Row, { justify: "end" },
|
|
50
|
+
React.createElement(Col, null,
|
|
51
|
+
React.createElement(Button, { type: "text", icon: React.createElement(TableOutlined, { style: { color: '#0958d9' } }), onClick: () => this.showTable() })),
|
|
52
|
+
React.createElement(Col, null,
|
|
53
|
+
React.createElement(Button, { type: "text", icon: React.createElement(PlusOutlined, { style: { color: '#0958d9' } }), onClick: () => this.editItem() })))) : null);
|
|
54
|
+
};
|
|
55
|
+
this.editItem = (code) => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
let ltmplConfig = yield this.loadLtmplConfig();
|
|
57
|
+
this.setState({
|
|
58
|
+
showEdit: true,
|
|
59
|
+
showTable: false,
|
|
60
|
+
showView: false,
|
|
61
|
+
drawCode: code,
|
|
62
|
+
ltmplConfig,
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
this.showTable = () => __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
this.setState({
|
|
67
|
+
showEdit: false,
|
|
68
|
+
showTable: true,
|
|
69
|
+
showView: false,
|
|
70
|
+
drawCode: undefined,
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
this.loadLtmplConfig = () => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const { fieldConfig } = this.props;
|
|
75
|
+
const { ltmplConfig } = this.state;
|
|
76
|
+
let ltmplConfig_ = ltmplConfig;
|
|
77
|
+
if (!ltmplConfig_) {
|
|
78
|
+
ltmplConfig_ = (yield HCDataSource.requestLtmplConfig(fieldConfig.id)).ltmplConfig;
|
|
79
|
+
}
|
|
80
|
+
this.setState({
|
|
81
|
+
ltmplConfig: ltmplConfig_
|
|
82
|
+
});
|
|
83
|
+
return ltmplConfig_;
|
|
84
|
+
});
|
|
85
|
+
this.showItem = (code) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
let ltmplConfig = yield this.loadLtmplConfig();
|
|
87
|
+
this.setState({
|
|
88
|
+
showEdit: false,
|
|
89
|
+
showTable: false,
|
|
90
|
+
showView: true,
|
|
91
|
+
drawCode: code,
|
|
92
|
+
ltmplConfig,
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
this.initCache = () => {
|
|
96
|
+
this.setState({
|
|
97
|
+
optionsCache: {},
|
|
98
|
+
codeLabel: {}
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
// componentWillUnmount(): void {
|
|
102
|
+
// this.setState=(state,callback)=>{
|
|
103
|
+
// return
|
|
104
|
+
// }
|
|
105
|
+
// }
|
|
106
|
+
this.toOption = (code, title, onEntityClick) => {
|
|
107
|
+
const { fieldConfig } = this.props;
|
|
108
|
+
const { actions } = fieldConfig;
|
|
109
|
+
const { codeLabel } = this.state;
|
|
110
|
+
codeLabel[code] = title;
|
|
111
|
+
let option = {
|
|
112
|
+
value: code,
|
|
113
|
+
label: React.createElement(React.Fragment, null,
|
|
114
|
+
title,
|
|
115
|
+
actions && actions.indexOf("detail") >= 0 ?
|
|
116
|
+
React.createElement(Button, { size: 'small', type: 'text' },
|
|
117
|
+
React.createElement(AlignLeftOutlined, { style: { color: '#0958d9' }, onClick: (event) => {
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
this.showItem(code);
|
|
120
|
+
} })) : null,
|
|
121
|
+
actions && actions.indexOf("edit") >= 0 ?
|
|
122
|
+
React.createElement(Button, { size: 'small', type: 'text' },
|
|
123
|
+
React.createElement(EditOutlined, { style: { color: '#0958d9' }, onClick: (event) => {
|
|
124
|
+
event.stopPropagation();
|
|
125
|
+
this.editItem(code);
|
|
126
|
+
} }))
|
|
127
|
+
: null),
|
|
128
|
+
};
|
|
129
|
+
return option;
|
|
130
|
+
};
|
|
131
|
+
this.doClose = () => {
|
|
132
|
+
this.setState({
|
|
133
|
+
drawCode: undefined,
|
|
134
|
+
showEdit: false,
|
|
135
|
+
showView: false,
|
|
136
|
+
showTable: false,
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
this.drawSubmited = () => {
|
|
140
|
+
this.initCache();
|
|
141
|
+
this.doClose();
|
|
142
|
+
};
|
|
143
|
+
this.closeTable = () => {
|
|
144
|
+
this.drawSubmited();
|
|
145
|
+
};
|
|
146
|
+
this.toValueArray = (value) => {
|
|
147
|
+
let result = [];
|
|
148
|
+
let valueArray = this.toArray(value);
|
|
149
|
+
for (let v of valueArray) {
|
|
150
|
+
if (v) {
|
|
151
|
+
let vs = v.split("@R@");
|
|
152
|
+
if (vs[1] != 'null') {
|
|
153
|
+
result.push(vs[0]);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return result;
|
|
158
|
+
};
|
|
159
|
+
this.toArray = (value) => {
|
|
160
|
+
let valueArray = [];
|
|
161
|
+
if (value instanceof Array) {
|
|
162
|
+
valueArray = value;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
if (value) {
|
|
166
|
+
valueArray = value.split(',');
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
valueArray = [];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return valueArray;
|
|
173
|
+
};
|
|
174
|
+
this.toOptions = (value, onEntityClick) => {
|
|
175
|
+
const { fieldConfig } = this.props;
|
|
176
|
+
let options = [];
|
|
177
|
+
//console.log('options value', value);
|
|
178
|
+
let valueArray = this.toArray(value);
|
|
179
|
+
for (let v of valueArray) {
|
|
180
|
+
if (v) {
|
|
181
|
+
let vs = v.split("@R@");
|
|
182
|
+
if (vs[1] != 'null') {
|
|
183
|
+
options.push(this.toOption(vs[0], vs[1], onEntityClick));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
//添加补充项
|
|
188
|
+
if (fieldConfig.suppleOptions) {
|
|
189
|
+
fieldConfig.suppleOptions.forEach((o) => {
|
|
190
|
+
let had = false;
|
|
191
|
+
options.forEach((s) => {
|
|
192
|
+
if (s['value'] == o.code) {
|
|
193
|
+
had = true;
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
if (!had) {
|
|
198
|
+
options.push(this.toOption(o.code, o.title, undefined));
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
//console.log('options', options);
|
|
203
|
+
return options;
|
|
204
|
+
};
|
|
205
|
+
this.fetchNextPage = () => __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
const { optionCacheKey, titleId, optionsCache } = this.state;
|
|
207
|
+
let optionCache = optionsCache[optionCacheKey];
|
|
208
|
+
let pageInfo = optionCache.pageInfo;
|
|
209
|
+
if (!optionCache.touchEnd) {
|
|
210
|
+
pageInfo.pageNo = pageInfo.pageNo + 1;
|
|
211
|
+
let dataSource = yield this.loadData(optionCache.queryKey.key, Object.assign({}, pageInfo), titleId);
|
|
212
|
+
if (dataSource) {
|
|
213
|
+
optionCache.options = [...optionCache.options, ...dataSource.options];
|
|
214
|
+
optionCache.touchEnd = dataSource.touchEnd;
|
|
215
|
+
}
|
|
216
|
+
this.setState({
|
|
217
|
+
pageNo: pageInfo.pageNo,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
this.fetchOptions = (searchText) => __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
const { fieldConfig, mainCode, baseCriteria } = this.props;
|
|
223
|
+
const { optionsCache, ltmplConfig, preMainCode } = this.state;
|
|
224
|
+
const currentMainCode = mainCode ? mainCode : fieldConfig.mainCode;
|
|
225
|
+
if (preMainCode != currentMainCode) {
|
|
226
|
+
this.setState({ preMainCode: currentMainCode.toString() });
|
|
227
|
+
//清空,
|
|
228
|
+
this.initCache();
|
|
229
|
+
}
|
|
230
|
+
let optionCacheKey = "withoutValue";
|
|
231
|
+
//先从缓存里拿
|
|
232
|
+
if (searchText) {
|
|
233
|
+
optionCacheKey = searchText;
|
|
234
|
+
}
|
|
235
|
+
let titleId = this.state.titleId;
|
|
236
|
+
let optionCache = optionsCache[optionCacheKey];
|
|
237
|
+
if (!optionCache) {
|
|
238
|
+
this.setState({
|
|
239
|
+
loading: true,
|
|
240
|
+
});
|
|
241
|
+
let ltmplConfig_ = ltmplConfig;
|
|
242
|
+
if (!ltmplConfig_) {
|
|
243
|
+
ltmplConfig_ = yield this.loadLtmplConfig();
|
|
244
|
+
}
|
|
245
|
+
let pageInfo = {
|
|
246
|
+
pageNo: 1,
|
|
247
|
+
pageSize: 6,
|
|
248
|
+
virtualEndPageNo: undefined,
|
|
249
|
+
};
|
|
250
|
+
titleId = ltmplConfig_.primaryColumn.id;
|
|
251
|
+
//得到第一个过滤条件
|
|
252
|
+
let firstCriteria = ltmplConfig_.primaryCriteria;
|
|
253
|
+
let formItemName = 'undefinedCriteria';
|
|
254
|
+
if (firstCriteria) {
|
|
255
|
+
formItemName = 'c_' + firstCriteria.id;
|
|
256
|
+
}
|
|
257
|
+
const { defaultPageSize } = ltmplConfig_;
|
|
258
|
+
if (defaultPageSize) {
|
|
259
|
+
pageInfo.pageSize = defaultPageSize;
|
|
260
|
+
}
|
|
261
|
+
/** 构建 dataSource **/
|
|
262
|
+
//构建过滤条件
|
|
263
|
+
let criteriaData = {};
|
|
264
|
+
if (baseCriteria) {
|
|
265
|
+
criteriaData = Object.assign({}, baseCriteria);
|
|
266
|
+
}
|
|
267
|
+
// let mainCode_ = mainCode;
|
|
268
|
+
// if (baseCriteria) {
|
|
269
|
+
// criteriaData = {...baseCriteria}
|
|
270
|
+
// if (!mainCode) {
|
|
271
|
+
// mainCode_ = baseCriteria['mainCode']; //当只在条件中设置mainCode时,保证生效不被设置为null
|
|
272
|
+
// }
|
|
273
|
+
// }
|
|
274
|
+
criteriaData[formItemName] = searchText;
|
|
275
|
+
let queryKey = yield HcserviceV3.requestLtmplQueryKey(fieldConfig.id, Object.assign(Object.assign(Object.assign({}, criteriaData), pageInfo), { mainCode: currentMainCode }));
|
|
276
|
+
let sourceData = yield this.loadData(queryKey.key, pageInfo, titleId);
|
|
277
|
+
optionCache = {
|
|
278
|
+
options: sourceData.options,
|
|
279
|
+
pageInfo,
|
|
280
|
+
queryKey,
|
|
281
|
+
searchValue: searchText,
|
|
282
|
+
touchEnd: sourceData.touchEnd
|
|
283
|
+
};
|
|
284
|
+
optionsCache[optionCacheKey] = optionCache;
|
|
285
|
+
this.setState({
|
|
286
|
+
optionCacheKey,
|
|
287
|
+
titleId,
|
|
288
|
+
optionsCache: Object.assign({}, optionsCache),
|
|
289
|
+
loading: false,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
if (this.state.optionCacheKey == optionCacheKey && optionCacheKey == 'withoutValue') {
|
|
294
|
+
this.setState({
|
|
295
|
+
loading: false,
|
|
296
|
+
optionCacheKey,
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
debounce(() => {
|
|
301
|
+
this.setState({
|
|
302
|
+
loading: false,
|
|
303
|
+
optionCacheKey,
|
|
304
|
+
});
|
|
305
|
+
}, 500)();
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
this.onChange = (values) => {
|
|
310
|
+
const { codeLabel } = this.state;
|
|
311
|
+
let newValues = [...values];
|
|
312
|
+
if (values && values.length > this.props.maxSelected) {
|
|
313
|
+
newValues.shift();
|
|
314
|
+
}
|
|
315
|
+
let formValues = [];
|
|
316
|
+
newValues.forEach((c) => {
|
|
317
|
+
if (c.indexOf("@R@") > 0) {
|
|
318
|
+
formValues.push(c);
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
formValues.push(c + "@R@" + codeLabel[c]);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
this.props.onChange(formValues);
|
|
325
|
+
};
|
|
326
|
+
this.tagRender = (props) => {
|
|
327
|
+
const { label, closable, onClose } = props;
|
|
328
|
+
const onPreventMouseDown = (event) => {
|
|
329
|
+
event.preventDefault();
|
|
330
|
+
event.stopPropagation();
|
|
331
|
+
};
|
|
332
|
+
return (React.createElement(Tag, { onMouseDown: onPreventMouseDown, closable: closable, onClose: onClose, style: { marginRight: 3 } }, label));
|
|
333
|
+
};
|
|
334
|
+
this.loadData = (queryKey, pageInfo, titleId) => __awaiter(this, void 0, void 0, function* () {
|
|
335
|
+
const { onEntityClick, baseCriteria } = this.props;
|
|
336
|
+
let queryData = yield HcserviceV3.requestQueryData(queryKey, pageInfo);
|
|
337
|
+
let options = [];
|
|
338
|
+
pageInfo = queryData.pageInfo;
|
|
339
|
+
queryData.entities.forEach((item, index) => {
|
|
340
|
+
let title = item.fieldMap[titleId];
|
|
341
|
+
//放入全局对象缓存
|
|
342
|
+
//这个缓存后续还需要完善,因为太多了,容易爆掉
|
|
343
|
+
HCDataSource.cache(item);
|
|
344
|
+
if (title) {
|
|
345
|
+
let ts = title.split('@R@');
|
|
346
|
+
let t = ts && ts.length > 0 ? ts[ts.length - 1] : title;
|
|
347
|
+
if (t != 'null') {
|
|
348
|
+
let option = this.toOption(item.code, t, onEntityClick);
|
|
349
|
+
options.push(option);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
return { options, touchEnd: queryData.touchEnd };
|
|
354
|
+
});
|
|
355
|
+
this.debounceFetcher = () => {
|
|
356
|
+
const loadOptions = (val) => {
|
|
357
|
+
this.fetchOptions(val);
|
|
358
|
+
};
|
|
359
|
+
return debounce(loadOptions, 800);
|
|
360
|
+
};
|
|
361
|
+
this.debounceFetchNextPage = () => {
|
|
362
|
+
// this.setState({
|
|
363
|
+
// loading: true,
|
|
364
|
+
// })
|
|
365
|
+
debounce(this.fetchNextPage, 200)();
|
|
366
|
+
// this.setState({
|
|
367
|
+
// loading: false,
|
|
368
|
+
// })
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
componentDidUpdate(prevProps) {
|
|
372
|
+
const { baseCriteria, mainCode, fieldConfig } = this.props;
|
|
373
|
+
let { baseCriteria: preBaseCriteria, mainCode: preMainCode, fieldConfig: preFieldConfig } = prevProps;
|
|
374
|
+
if ((baseCriteria && JSON.stringify(baseCriteria) != JSON.stringify(preBaseCriteria)) || (mainCode && mainCode != preMainCode)
|
|
375
|
+
|| (fieldConfig && preFieldConfig && fieldConfig.id != preFieldConfig.id)) {
|
|
376
|
+
this.initCache();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
render() {
|
|
380
|
+
const { id, value, fieldConfig, onChange, disabled, style, maxSelected, onEntityClick, mainCode } = this.props;
|
|
381
|
+
const { actions } = fieldConfig;
|
|
382
|
+
const { optionCacheKey, loading, optionsCache, drawCode, showEdit, showView, showTable, ltmplConfig } = this.state;
|
|
383
|
+
let initOptions = this.toOptions(value, onEntityClick);
|
|
384
|
+
let exists;
|
|
385
|
+
let properOptions = [...initOptions];
|
|
386
|
+
let listHeight = 256;
|
|
387
|
+
if (optionCacheKey && optionsCache[optionCacheKey]) {
|
|
388
|
+
let optionCache = optionsCache[optionCacheKey];
|
|
389
|
+
if (optionCache['pageInfo'] && optionCache.pageInfo.pageSize < 8) {
|
|
390
|
+
listHeight = 32 * (optionCache['pageInfo'].pageSize) - 10;
|
|
391
|
+
}
|
|
392
|
+
for (let option of optionCache.options) {
|
|
393
|
+
exists = false;
|
|
394
|
+
for (let init of initOptions) {
|
|
395
|
+
if (init['value'] == option['value']) {
|
|
396
|
+
exists = true;
|
|
397
|
+
//用查询的覆盖之前的
|
|
398
|
+
init['label'] = option['label'];
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
if (!exists) {
|
|
402
|
+
properOptions.push(option);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
return React.createElement(React.Fragment, null,
|
|
407
|
+
React.createElement(Select, { disabled: disabled, id: id, listHeight: listHeight, style: Object.assign({}, style), onChange: this.onChange, value: this.toValueArray(value), mode: "multiple", placeholder: `请选择${fieldConfig.title}`, notFoundContent: loading ? React.createElement(Spin, { size: 'small' }) : "无数据", allowClear: true, showArrow: true, suffixIcon: React.createElement(SearchOutlined, null), dropdownRender: this.dropdownRender, tagRender: actions && (actions.indexOf("detail") >= 0 || actions.indexOf("edit") >= 0) ? this.tagRender : undefined, onSearch: this.debounceFetcher(), onClick: disabled ? null : () => {
|
|
408
|
+
debounce(this.fetchOptions, 100)(undefined);
|
|
409
|
+
}, options: loading ? [] : properOptions, onPopupScroll: (e) => {
|
|
410
|
+
const { target } = e;
|
|
411
|
+
if (target['scrollTop'] + target['offsetHeight'] + 1 >= target['scrollHeight']) {
|
|
412
|
+
this.debounceFetchNextPage();
|
|
413
|
+
}
|
|
414
|
+
} }),
|
|
415
|
+
showView && drawCode ?
|
|
416
|
+
React.createElement(DtmplViewDrawer, { placement: 'left', onClose: this.doClose, open: showView, sourceId: fieldConfig.id, code: drawCode }) : null,
|
|
417
|
+
showEdit && ltmplConfig ? ltmplConfig.customEditPagePath ? React.createElement(DtmplCustomEditModalPage, { open: showEdit, onOk: () => {
|
|
418
|
+
this.drawSubmited();
|
|
419
|
+
}, customPath: ltmplConfig.customEditPagePath, sourceId: fieldConfig.id, mainCode: mainCode, code: drawCode })
|
|
420
|
+
: React.createElement(DtmplEditPage, { pageType: "modal", open: showEdit, onCancel: this.doClose, mainCode: mainCode, width: 960, sourceId: fieldConfig.id, code: drawCode, onOk: this.drawSubmited }) : null,
|
|
421
|
+
showTable ? React.createElement(LtmplModal, { open: showTable, onCancel: this.closeTable, width: 960, sourceId: fieldConfig.id, mainCode: mainCode }) : null);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
EntitySelect.defaultProps = {
|
|
425
|
+
maxSelected: 100,
|
|
426
|
+
};
|
|
427
|
+
export default EntitySelect;
|
|
427
428
|
//# sourceMappingURL=entity-select.js.map
|