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,332 +1,332 @@
|
|
|
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 HcserviceV3 from './hcservice-v3';
|
|
11
|
-
import ControlTypeSupportor from './control-type-supportor';
|
|
12
|
-
import { message } from "antd";
|
|
13
|
-
const blocksCache = [];
|
|
14
|
-
const quickEntranceCache = [];
|
|
15
|
-
const messageCache = [];
|
|
16
|
-
const workbenchCache = [];
|
|
17
|
-
const enumMap = new Map(); //key mstrucId
|
|
18
|
-
// const optionsMap: Map<string, EnumItem[]> = new Map<string, EnumItem[]>();//key mstrucId
|
|
19
|
-
const selectConfigMap = new Map();
|
|
20
|
-
const ltmplConfigMap = new Map();
|
|
21
|
-
const l2LtmplConfigMap = new Map();
|
|
22
|
-
const dtmplConfigMap = new Map();
|
|
23
|
-
const viewDtmplConfigMap = new Map();
|
|
24
|
-
const addDtmplConfigMap = new Map();
|
|
25
|
-
const objctCacheMap = new Map();
|
|
26
|
-
function findUnloadEnumMstrucIdOfFields(fields) {
|
|
27
|
-
const mstrucIdArray = [];
|
|
28
|
-
if (fields) {
|
|
29
|
-
fields.forEach((item) => {
|
|
30
|
-
let controlType = ControlTypeSupportor.getSupportControlType(item);
|
|
31
|
-
if (controlType == "caselect" || controlType == "select" || controlType == "multiselect" || controlType == "steps" || controlType == "preselect" || controlType == "checkbox" || controlType == "radio") {
|
|
32
|
-
if (!enumMap.has(item.mstrucId)) {
|
|
33
|
-
mstrucIdArray.push(item.mstrucId);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return mstrucIdArray;
|
|
39
|
-
}
|
|
40
|
-
function findUnloadEnumMstrucIdOfActions(actions) {
|
|
41
|
-
const mstrucIds = [];
|
|
42
|
-
if (actions) {
|
|
43
|
-
actions.forEach((item) => {
|
|
44
|
-
let subs = findUnloadEnumMstrucIdOfFields(item.writes);
|
|
45
|
-
concat(mstrucIds, subs);
|
|
46
|
-
subs = findUnloadEnumMstrucIdOfFields(item.preposes);
|
|
47
|
-
concat(mstrucIds, subs);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
return mstrucIds;
|
|
51
|
-
}
|
|
52
|
-
function loadEnumOfDtmplConfig(selectConfig) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const mstrucIds = [];
|
|
55
|
-
if (selectConfig.groups) {
|
|
56
|
-
selectConfig.groups.forEach(group => {
|
|
57
|
-
let subs = findUnloadEnumMstrucIdOfFields(group.fields);
|
|
58
|
-
concat(mstrucIds, subs);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
let subs = findUnloadEnumMstrucIdOfActions(selectConfig.actions);
|
|
62
|
-
concat(mstrucIds, subs);
|
|
63
|
-
yield loadEnum(mstrucIds);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function concat(mstrucIds, sub) {
|
|
67
|
-
if (sub) {
|
|
68
|
-
sub.forEach((id) => {
|
|
69
|
-
if (!mstrucIds.includes(id)) {
|
|
70
|
-
mstrucIds.push(id);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
return mstrucIds;
|
|
75
|
-
}
|
|
76
|
-
function loadEnumOfSelectConfig(selectConfig) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
const mstrucIds = [];
|
|
79
|
-
let subs = findUnloadEnumMstrucIdOfFields(selectConfig.columns);
|
|
80
|
-
concat(mstrucIds, subs);
|
|
81
|
-
subs = findUnloadEnumMstrucIdOfFields(selectConfig.criterias);
|
|
82
|
-
concat(mstrucIds, subs);
|
|
83
|
-
yield loadEnum(mstrucIds);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function loadEnumOfLtmplConfig(selectConfig) {
|
|
87
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
const mstrucIds = [];
|
|
89
|
-
let subs = findUnloadEnumMstrucIdOfFields(selectConfig.columns);
|
|
90
|
-
concat(mstrucIds, subs);
|
|
91
|
-
subs = findUnloadEnumMstrucIdOfFields(selectConfig.criterias);
|
|
92
|
-
concat(mstrucIds, subs);
|
|
93
|
-
subs = findUnloadEnumMstrucIdOfFields(selectConfig.drillingParams);
|
|
94
|
-
concat(mstrucIds, subs);
|
|
95
|
-
subs = findUnloadEnumMstrucIdOfFields(selectConfig.reStatParams);
|
|
96
|
-
concat(mstrucIds, subs);
|
|
97
|
-
subs = findUnloadEnumMstrucIdOfActions(selectConfig.actions);
|
|
98
|
-
concat(mstrucIds, subs);
|
|
99
|
-
subs = findUnloadEnumMstrucIdOfActions(selectConfig.rowActions);
|
|
100
|
-
concat(mstrucIds, subs);
|
|
101
|
-
yield loadEnum(mstrucIds);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
function loadEnum(mstrucIds, path) {
|
|
105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
if (mstrucIds && mstrucIds.length > 0) {
|
|
107
|
-
let reqEnum = yield HcserviceV3.requestEnum(mstrucIds, path);
|
|
108
|
-
for (let key in reqEnum) {
|
|
109
|
-
let ems = reqEnum[key];
|
|
110
|
-
for (let option of ems) {
|
|
111
|
-
if (option['css']) {
|
|
112
|
-
option['color'] = option['css'].color;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
enumMap.set(key, ems);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function HCDataSource() {
|
|
121
|
-
}
|
|
122
|
-
HCDataSource.loadEnumOfFields = function (fields) {
|
|
123
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
const mstrucIds = findUnloadEnumMstrucIdOfFields(fields);
|
|
125
|
-
yield loadEnum(mstrucIds);
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
HCDataSource.loadEnumOfFieldsWithPath = function (fields, path) {
|
|
129
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
-
const mstrucIds = findUnloadEnumMstrucIdOfFields(fields);
|
|
131
|
-
yield loadEnum(mstrucIds, path);
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
HCDataSource.getOptions = function (mstrucId) {
|
|
135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
-
if (!mstrucId) {
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
if (!enumMap.has(mstrucId)) {
|
|
140
|
-
let reqOptions = yield HcserviceV3.requestOptions(mstrucId)[mstrucId];
|
|
141
|
-
if (reqOptions != null) {
|
|
142
|
-
for (let option of reqOptions) {
|
|
143
|
-
if (option['css']) {
|
|
144
|
-
option['color'] = option['css'].color;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
enumMap.set(mstrucId, reqOptions);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return enumMap.get(mstrucId);
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
HCDataSource.requestLtmplConfig = function (sourceId) {
|
|
154
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
-
if (!ltmplConfigMap.has(sourceId)) {
|
|
156
|
-
ltmplConfigMap.set(sourceId, yield HcserviceV3.requestLtmplConfig(sourceId));
|
|
157
|
-
//加载枚举
|
|
158
|
-
let res = ltmplConfigMap.get(sourceId);
|
|
159
|
-
yield loadEnumOfLtmplConfig(res.ltmplConfig);
|
|
160
|
-
}
|
|
161
|
-
return ltmplConfigMap.get(sourceId);
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
HCDataSource.requestL2LtmplConfig = function (sourceId) {
|
|
165
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
if (!l2LtmplConfigMap.has(sourceId)) {
|
|
167
|
-
l2LtmplConfigMap.set(sourceId, yield HcserviceV3.requestL2LtmplConfig(sourceId));
|
|
168
|
-
//加载枚举
|
|
169
|
-
let res = l2LtmplConfigMap.get(sourceId);
|
|
170
|
-
yield loadEnumOfLtmplConfig(res.ltmplConfig);
|
|
171
|
-
}
|
|
172
|
-
return l2LtmplConfigMap.get(sourceId);
|
|
173
|
-
});
|
|
174
|
-
};
|
|
175
|
-
HCDataSource.requestSelectConfig = function (sourceId) {
|
|
176
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
-
if (!selectConfigMap.has(sourceId)) {
|
|
178
|
-
selectConfigMap.set(sourceId, yield HcserviceV3.requestSelectConfig(sourceId));
|
|
179
|
-
//加载枚举
|
|
180
|
-
yield loadEnumOfSelectConfig(selectConfigMap.get(sourceId));
|
|
181
|
-
}
|
|
182
|
-
return selectConfigMap.get(sourceId);
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
HCDataSource.requestDtmplConfig = function (sourceId) {
|
|
186
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
-
if (!dtmplConfigMap.has(sourceId)) {
|
|
188
|
-
dtmplConfigMap.set(sourceId, yield HcserviceV3.requestDtmplConfig(sourceId));
|
|
189
|
-
//加载枚举
|
|
190
|
-
yield loadEnumOfDtmplConfig(dtmplConfigMap.get(sourceId));
|
|
191
|
-
}
|
|
192
|
-
return dtmplConfigMap.get(sourceId);
|
|
193
|
-
});
|
|
194
|
-
};
|
|
195
|
-
HCDataSource.requestViewDtmplConfig = function (sourceId) {
|
|
196
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
-
if (!viewDtmplConfigMap.has(sourceId)) {
|
|
198
|
-
viewDtmplConfigMap.set(sourceId, yield HcserviceV3.requestViewDtmplConfig(sourceId));
|
|
199
|
-
//加载枚举
|
|
200
|
-
yield loadEnumOfDtmplConfig(viewDtmplConfigMap.get(sourceId));
|
|
201
|
-
}
|
|
202
|
-
return viewDtmplConfigMap.get(sourceId);
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
|
-
HCDataSource.requestAddDtmplConfig = function (sourceId) {
|
|
206
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
-
if (!addDtmplConfigMap.has(sourceId)) {
|
|
208
|
-
addDtmplConfigMap.set(sourceId, yield HcserviceV3.requestAddDtmplConfig(sourceId));
|
|
209
|
-
//加载枚举
|
|
210
|
-
yield loadEnumOfDtmplConfig(addDtmplConfigMap.get(sourceId));
|
|
211
|
-
}
|
|
212
|
-
return addDtmplConfigMap.get(sourceId);
|
|
213
|
-
});
|
|
214
|
-
};
|
|
215
|
-
HCDataSource.getEnums = function (mstrucId) {
|
|
216
|
-
//这里是不是后续可以考虑防止串改
|
|
217
|
-
return enumMap.get(mstrucId);
|
|
218
|
-
};
|
|
219
|
-
HCDataSource.getEnumOption = function (mstrucId, enumValue) {
|
|
220
|
-
if (!enumValue) {
|
|
221
|
-
return null;
|
|
222
|
-
}
|
|
223
|
-
let options = this.getEnums(mstrucId);
|
|
224
|
-
let enumItem = undefined;
|
|
225
|
-
if (options) {
|
|
226
|
-
options.forEach((option) => {
|
|
227
|
-
if (option.value === enumValue) {
|
|
228
|
-
enumItem = option;
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
return enumItem;
|
|
234
|
-
};
|
|
235
|
-
HCDataSource.getEnumValueColor = (mstrucId, enumValue) => {
|
|
236
|
-
let enumItem = HCDataSource.getEnumOption(mstrucId, enumValue);
|
|
237
|
-
if (enumItem) {
|
|
238
|
-
return enumItem.color;
|
|
239
|
-
}
|
|
240
|
-
else {
|
|
241
|
-
return undefined;
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
HCDataSource.requestBlocks = (l2MenuId, blockId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
245
|
-
let result;
|
|
246
|
-
if (blocksCache.length < 1) {
|
|
247
|
-
let blockRes = yield HcserviceV3.requestBlocks(l2MenuId ? l2MenuId : undefined, blockId ? blockId : undefined);
|
|
248
|
-
for (let block of blockRes.blocks) {
|
|
249
|
-
blocksCache.push(block);
|
|
250
|
-
}
|
|
251
|
-
result = {
|
|
252
|
-
blocks: blockRes.blocks,
|
|
253
|
-
l2MenuId: blockRes.l2MenuId,
|
|
254
|
-
blockId: blockRes.blockId,
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
result = {
|
|
259
|
-
blocks: blocksCache,
|
|
260
|
-
blockId, l2MenuId
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
return result;
|
|
264
|
-
});
|
|
265
|
-
HCDataSource.quickEntranceMenus = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
266
|
-
let result;
|
|
267
|
-
if (quickEntranceCache.length < 1) {
|
|
268
|
-
let quicks = yield HcserviceV3.requestFaceplate_menu();
|
|
269
|
-
quickEntranceCache.splice(0, quickEntranceCache.length);
|
|
270
|
-
;
|
|
271
|
-
quickEntranceCache.push(...quicks);
|
|
272
|
-
}
|
|
273
|
-
return [...quickEntranceCache];
|
|
274
|
-
});
|
|
275
|
-
HCDataSource.messageMenus = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
276
|
-
let result;
|
|
277
|
-
if (messageCache.length < 1) {
|
|
278
|
-
messageCache.push(...yield HcserviceV3.requestMessagebar());
|
|
279
|
-
}
|
|
280
|
-
return [...messageCache];
|
|
281
|
-
});
|
|
282
|
-
HCDataSource.workbenchMenus = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
283
|
-
if (workbenchCache.length < 1) {
|
|
284
|
-
workbenchCache.push(...yield HcserviceV3.requestFaceplateStatistic_menu());
|
|
285
|
-
}
|
|
286
|
-
return [...workbenchCache];
|
|
287
|
-
});
|
|
288
|
-
HCDataSource.reload = function (roles) {
|
|
289
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
-
// if(roles.includes("admin")){
|
|
291
|
-
let res = yield HcserviceV3.reload();
|
|
292
|
-
if (res.status != 'success') {
|
|
293
|
-
// message.error(res.message);
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
this.clear();
|
|
297
|
-
message.success("执行成功");
|
|
298
|
-
// }else{
|
|
299
|
-
// this.clearOnly();
|
|
300
|
-
// message.success("执行成功");
|
|
301
|
-
// }
|
|
302
|
-
});
|
|
303
|
-
};
|
|
304
|
-
HCDataSource.cache = function (data) {
|
|
305
|
-
if (data) {
|
|
306
|
-
// console.log('put----',data);
|
|
307
|
-
objctCacheMap.set(data.code, data);
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
HCDataSource.getFromCache = function (code) {
|
|
311
|
-
//console.log('objctCacheMap',objctCacheMap);
|
|
312
|
-
return objctCacheMap.get(code);
|
|
313
|
-
};
|
|
314
|
-
HCDataSource.clear = function () {
|
|
315
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
316
|
-
enumMap.clear();
|
|
317
|
-
ltmplConfigMap.clear();
|
|
318
|
-
dtmplConfigMap.clear();
|
|
319
|
-
viewDtmplConfigMap.clear();
|
|
320
|
-
addDtmplConfigMap.clear();
|
|
321
|
-
selectConfigMap.clear();
|
|
322
|
-
l2LtmplConfigMap.clear();
|
|
323
|
-
// optionsMap.clear();
|
|
324
|
-
blocksCache.splice(0, blocksCache.length);
|
|
325
|
-
quickEntranceCache.splice(0, quickEntranceCache.length);
|
|
326
|
-
messageCache.splice(0, quickEntranceCache.length);
|
|
327
|
-
workbenchCache.splice(0, workbenchCache.length);
|
|
328
|
-
objctCacheMap.clear();
|
|
329
|
-
});
|
|
330
|
-
};
|
|
331
|
-
export default HCDataSource; //对外 TmplDataSource
|
|
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 HcserviceV3 from './hcservice-v3';
|
|
11
|
+
import ControlTypeSupportor from './control-type-supportor';
|
|
12
|
+
import { message } from "antd";
|
|
13
|
+
const blocksCache = [];
|
|
14
|
+
const quickEntranceCache = [];
|
|
15
|
+
const messageCache = [];
|
|
16
|
+
const workbenchCache = [];
|
|
17
|
+
const enumMap = new Map(); //key mstrucId
|
|
18
|
+
// const optionsMap: Map<string, EnumItem[]> = new Map<string, EnumItem[]>();//key mstrucId
|
|
19
|
+
const selectConfigMap = new Map();
|
|
20
|
+
const ltmplConfigMap = new Map();
|
|
21
|
+
const l2LtmplConfigMap = new Map();
|
|
22
|
+
const dtmplConfigMap = new Map();
|
|
23
|
+
const viewDtmplConfigMap = new Map();
|
|
24
|
+
const addDtmplConfigMap = new Map();
|
|
25
|
+
const objctCacheMap = new Map();
|
|
26
|
+
function findUnloadEnumMstrucIdOfFields(fields) {
|
|
27
|
+
const mstrucIdArray = [];
|
|
28
|
+
if (fields) {
|
|
29
|
+
fields.forEach((item) => {
|
|
30
|
+
let controlType = ControlTypeSupportor.getSupportControlType(item);
|
|
31
|
+
if (controlType == "caselect" || controlType == "select" || controlType == "multiselect" || controlType == "steps" || controlType == "preselect" || controlType == "checkbox" || controlType == "radio") {
|
|
32
|
+
if (!enumMap.has(item.mstrucId)) {
|
|
33
|
+
mstrucIdArray.push(item.mstrucId);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return mstrucIdArray;
|
|
39
|
+
}
|
|
40
|
+
function findUnloadEnumMstrucIdOfActions(actions) {
|
|
41
|
+
const mstrucIds = [];
|
|
42
|
+
if (actions) {
|
|
43
|
+
actions.forEach((item) => {
|
|
44
|
+
let subs = findUnloadEnumMstrucIdOfFields(item.writes);
|
|
45
|
+
concat(mstrucIds, subs);
|
|
46
|
+
subs = findUnloadEnumMstrucIdOfFields(item.preposes);
|
|
47
|
+
concat(mstrucIds, subs);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return mstrucIds;
|
|
51
|
+
}
|
|
52
|
+
function loadEnumOfDtmplConfig(selectConfig) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const mstrucIds = [];
|
|
55
|
+
if (selectConfig.groups) {
|
|
56
|
+
selectConfig.groups.forEach(group => {
|
|
57
|
+
let subs = findUnloadEnumMstrucIdOfFields(group.fields);
|
|
58
|
+
concat(mstrucIds, subs);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
let subs = findUnloadEnumMstrucIdOfActions(selectConfig.actions);
|
|
62
|
+
concat(mstrucIds, subs);
|
|
63
|
+
yield loadEnum(mstrucIds);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function concat(mstrucIds, sub) {
|
|
67
|
+
if (sub) {
|
|
68
|
+
sub.forEach((id) => {
|
|
69
|
+
if (!mstrucIds.includes(id)) {
|
|
70
|
+
mstrucIds.push(id);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return mstrucIds;
|
|
75
|
+
}
|
|
76
|
+
function loadEnumOfSelectConfig(selectConfig) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
const mstrucIds = [];
|
|
79
|
+
let subs = findUnloadEnumMstrucIdOfFields(selectConfig.columns);
|
|
80
|
+
concat(mstrucIds, subs);
|
|
81
|
+
subs = findUnloadEnumMstrucIdOfFields(selectConfig.criterias);
|
|
82
|
+
concat(mstrucIds, subs);
|
|
83
|
+
yield loadEnum(mstrucIds);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function loadEnumOfLtmplConfig(selectConfig) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
const mstrucIds = [];
|
|
89
|
+
let subs = findUnloadEnumMstrucIdOfFields(selectConfig.columns);
|
|
90
|
+
concat(mstrucIds, subs);
|
|
91
|
+
subs = findUnloadEnumMstrucIdOfFields(selectConfig.criterias);
|
|
92
|
+
concat(mstrucIds, subs);
|
|
93
|
+
subs = findUnloadEnumMstrucIdOfFields(selectConfig.drillingParams);
|
|
94
|
+
concat(mstrucIds, subs);
|
|
95
|
+
subs = findUnloadEnumMstrucIdOfFields(selectConfig.reStatParams);
|
|
96
|
+
concat(mstrucIds, subs);
|
|
97
|
+
subs = findUnloadEnumMstrucIdOfActions(selectConfig.actions);
|
|
98
|
+
concat(mstrucIds, subs);
|
|
99
|
+
subs = findUnloadEnumMstrucIdOfActions(selectConfig.rowActions);
|
|
100
|
+
concat(mstrucIds, subs);
|
|
101
|
+
yield loadEnum(mstrucIds);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function loadEnum(mstrucIds, path) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
if (mstrucIds && mstrucIds.length > 0) {
|
|
107
|
+
let reqEnum = yield HcserviceV3.requestEnum(mstrucIds, path);
|
|
108
|
+
for (let key in reqEnum) {
|
|
109
|
+
let ems = reqEnum[key];
|
|
110
|
+
for (let option of ems) {
|
|
111
|
+
if (option['css']) {
|
|
112
|
+
option['color'] = option['css'].color;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
enumMap.set(key, ems);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function HCDataSource() {
|
|
121
|
+
}
|
|
122
|
+
HCDataSource.loadEnumOfFields = function (fields) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
const mstrucIds = findUnloadEnumMstrucIdOfFields(fields);
|
|
125
|
+
yield loadEnum(mstrucIds);
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
HCDataSource.loadEnumOfFieldsWithPath = function (fields, path) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const mstrucIds = findUnloadEnumMstrucIdOfFields(fields);
|
|
131
|
+
yield loadEnum(mstrucIds, path);
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
HCDataSource.getOptions = function (mstrucId) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
if (!mstrucId) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
if (!enumMap.has(mstrucId)) {
|
|
140
|
+
let reqOptions = yield HcserviceV3.requestOptions(mstrucId)[mstrucId];
|
|
141
|
+
if (reqOptions != null) {
|
|
142
|
+
for (let option of reqOptions) {
|
|
143
|
+
if (option['css']) {
|
|
144
|
+
option['color'] = option['css'].color;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
enumMap.set(mstrucId, reqOptions);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return enumMap.get(mstrucId);
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
HCDataSource.requestLtmplConfig = function (sourceId) {
|
|
154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
if (!ltmplConfigMap.has(sourceId)) {
|
|
156
|
+
ltmplConfigMap.set(sourceId, yield HcserviceV3.requestLtmplConfig(sourceId));
|
|
157
|
+
//加载枚举
|
|
158
|
+
let res = ltmplConfigMap.get(sourceId);
|
|
159
|
+
yield loadEnumOfLtmplConfig(res.ltmplConfig);
|
|
160
|
+
}
|
|
161
|
+
return ltmplConfigMap.get(sourceId);
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
HCDataSource.requestL2LtmplConfig = function (sourceId) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
if (!l2LtmplConfigMap.has(sourceId)) {
|
|
167
|
+
l2LtmplConfigMap.set(sourceId, yield HcserviceV3.requestL2LtmplConfig(sourceId));
|
|
168
|
+
//加载枚举
|
|
169
|
+
let res = l2LtmplConfigMap.get(sourceId);
|
|
170
|
+
yield loadEnumOfLtmplConfig(res.ltmplConfig);
|
|
171
|
+
}
|
|
172
|
+
return l2LtmplConfigMap.get(sourceId);
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
HCDataSource.requestSelectConfig = function (sourceId) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
if (!selectConfigMap.has(sourceId)) {
|
|
178
|
+
selectConfigMap.set(sourceId, yield HcserviceV3.requestSelectConfig(sourceId));
|
|
179
|
+
//加载枚举
|
|
180
|
+
yield loadEnumOfSelectConfig(selectConfigMap.get(sourceId));
|
|
181
|
+
}
|
|
182
|
+
return selectConfigMap.get(sourceId);
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
HCDataSource.requestDtmplConfig = function (sourceId) {
|
|
186
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
+
if (!dtmplConfigMap.has(sourceId)) {
|
|
188
|
+
dtmplConfigMap.set(sourceId, yield HcserviceV3.requestDtmplConfig(sourceId));
|
|
189
|
+
//加载枚举
|
|
190
|
+
yield loadEnumOfDtmplConfig(dtmplConfigMap.get(sourceId));
|
|
191
|
+
}
|
|
192
|
+
return dtmplConfigMap.get(sourceId);
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
HCDataSource.requestViewDtmplConfig = function (sourceId) {
|
|
196
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
+
if (!viewDtmplConfigMap.has(sourceId)) {
|
|
198
|
+
viewDtmplConfigMap.set(sourceId, yield HcserviceV3.requestViewDtmplConfig(sourceId));
|
|
199
|
+
//加载枚举
|
|
200
|
+
yield loadEnumOfDtmplConfig(viewDtmplConfigMap.get(sourceId));
|
|
201
|
+
}
|
|
202
|
+
return viewDtmplConfigMap.get(sourceId);
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
HCDataSource.requestAddDtmplConfig = function (sourceId) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
+
if (!addDtmplConfigMap.has(sourceId)) {
|
|
208
|
+
addDtmplConfigMap.set(sourceId, yield HcserviceV3.requestAddDtmplConfig(sourceId));
|
|
209
|
+
//加载枚举
|
|
210
|
+
yield loadEnumOfDtmplConfig(addDtmplConfigMap.get(sourceId));
|
|
211
|
+
}
|
|
212
|
+
return addDtmplConfigMap.get(sourceId);
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
HCDataSource.getEnums = function (mstrucId) {
|
|
216
|
+
//这里是不是后续可以考虑防止串改
|
|
217
|
+
return enumMap.get(mstrucId);
|
|
218
|
+
};
|
|
219
|
+
HCDataSource.getEnumOption = function (mstrucId, enumValue) {
|
|
220
|
+
if (!enumValue) {
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
let options = this.getEnums(mstrucId);
|
|
224
|
+
let enumItem = undefined;
|
|
225
|
+
if (options) {
|
|
226
|
+
options.forEach((option) => {
|
|
227
|
+
if (option.value === enumValue) {
|
|
228
|
+
enumItem = option;
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return enumItem;
|
|
234
|
+
};
|
|
235
|
+
HCDataSource.getEnumValueColor = (mstrucId, enumValue) => {
|
|
236
|
+
let enumItem = HCDataSource.getEnumOption(mstrucId, enumValue);
|
|
237
|
+
if (enumItem) {
|
|
238
|
+
return enumItem.color;
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
return undefined;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
HCDataSource.requestBlocks = (l2MenuId, blockId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
245
|
+
let result;
|
|
246
|
+
if (blocksCache.length < 1) {
|
|
247
|
+
let blockRes = yield HcserviceV3.requestBlocks(l2MenuId ? l2MenuId : undefined, blockId ? blockId : undefined);
|
|
248
|
+
for (let block of blockRes.blocks) {
|
|
249
|
+
blocksCache.push(block);
|
|
250
|
+
}
|
|
251
|
+
result = {
|
|
252
|
+
blocks: blockRes.blocks,
|
|
253
|
+
l2MenuId: blockRes.l2MenuId,
|
|
254
|
+
blockId: blockRes.blockId,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
result = {
|
|
259
|
+
blocks: blocksCache,
|
|
260
|
+
blockId, l2MenuId
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
return result;
|
|
264
|
+
});
|
|
265
|
+
HCDataSource.quickEntranceMenus = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
266
|
+
let result;
|
|
267
|
+
if (quickEntranceCache.length < 1) {
|
|
268
|
+
let quicks = yield HcserviceV3.requestFaceplate_menu();
|
|
269
|
+
quickEntranceCache.splice(0, quickEntranceCache.length);
|
|
270
|
+
;
|
|
271
|
+
quickEntranceCache.push(...quicks);
|
|
272
|
+
}
|
|
273
|
+
return [...quickEntranceCache];
|
|
274
|
+
});
|
|
275
|
+
HCDataSource.messageMenus = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
276
|
+
let result;
|
|
277
|
+
if (messageCache.length < 1) {
|
|
278
|
+
messageCache.push(...yield HcserviceV3.requestMessagebar());
|
|
279
|
+
}
|
|
280
|
+
return [...messageCache];
|
|
281
|
+
});
|
|
282
|
+
HCDataSource.workbenchMenus = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
283
|
+
if (workbenchCache.length < 1) {
|
|
284
|
+
workbenchCache.push(...yield HcserviceV3.requestFaceplateStatistic_menu());
|
|
285
|
+
}
|
|
286
|
+
return [...workbenchCache];
|
|
287
|
+
});
|
|
288
|
+
HCDataSource.reload = function (roles) {
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
// if(roles.includes("admin")){
|
|
291
|
+
let res = yield HcserviceV3.reload();
|
|
292
|
+
if (res.status != 'success') {
|
|
293
|
+
// message.error(res.message);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
this.clear();
|
|
297
|
+
message.success("执行成功");
|
|
298
|
+
// }else{
|
|
299
|
+
// this.clearOnly();
|
|
300
|
+
// message.success("执行成功");
|
|
301
|
+
// }
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
HCDataSource.cache = function (data) {
|
|
305
|
+
if (data) {
|
|
306
|
+
// console.log('put----',data);
|
|
307
|
+
objctCacheMap.set(data.code, data);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
HCDataSource.getFromCache = function (code) {
|
|
311
|
+
//console.log('objctCacheMap',objctCacheMap);
|
|
312
|
+
return objctCacheMap.get(code);
|
|
313
|
+
};
|
|
314
|
+
HCDataSource.clear = function () {
|
|
315
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
316
|
+
enumMap.clear();
|
|
317
|
+
ltmplConfigMap.clear();
|
|
318
|
+
dtmplConfigMap.clear();
|
|
319
|
+
viewDtmplConfigMap.clear();
|
|
320
|
+
addDtmplConfigMap.clear();
|
|
321
|
+
selectConfigMap.clear();
|
|
322
|
+
l2LtmplConfigMap.clear();
|
|
323
|
+
// optionsMap.clear();
|
|
324
|
+
blocksCache.splice(0, blocksCache.length);
|
|
325
|
+
quickEntranceCache.splice(0, quickEntranceCache.length);
|
|
326
|
+
messageCache.splice(0, quickEntranceCache.length);
|
|
327
|
+
workbenchCache.splice(0, workbenchCache.length);
|
|
328
|
+
objctCacheMap.clear();
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
export default HCDataSource; //对外 TmplDataSource
|
|
332
332
|
//# sourceMappingURL=hc-data-source.js.map
|