@ibiz-template/runtime 0.5.3-beta.1 → 0.5.3-beta.11
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/dist/index.esm.js +1870 -553
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts +12 -2
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +22 -2
- package/out/application.js +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +8 -1
- package/out/controller/common/editor/editor.controller.d.ts +24 -0
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +50 -0
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +5 -2
- package/out/controller/constant/control/index.d.ts +1 -0
- package/out/controller/constant/control/index.d.ts.map +1 -1
- package/out/controller/constant/control/index.js +1 -0
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.d.ts +5 -0
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.d.ts.map +1 -0
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.js +6 -0
- package/out/controller/control/chart/chart.controller.js +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +1 -1
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +4 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +4 -0
- package/out/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.d.ts +8 -0
- package/out/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.js +10 -0
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.d.ts +8 -0
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.js +15 -0
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.d.ts +7 -0
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.js +10 -0
- package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.service.js +1 -10
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts +7 -0
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +11 -2
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts +0 -7
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +0 -9
- package/out/controller/control/tree/tree.controller.d.ts +17 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +22 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.js +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts +10 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.js +12 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts +34 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.js +68 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.d.ts +205 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.js +345 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts +3 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +14 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts +16 -8
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.js +26 -12
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts +59 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +240 -1
- package/out/controller/utils/jsonschema/entity.d.ts.map +1 -1
- package/out/controller/utils/jsonschema/entity.js +4 -1
- package/out/de-logic/utils/handle-src-val.d.ts +15 -0
- package/out/de-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/de-logic/utils/handle-src-val.js +10 -1
- package/out/global/global-util/global-util.d.ts +8 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +8 -1
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +4 -3
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/controller/common/i-icon/i-icon.d.ts +1 -0
- package/out/interface/controller/common/i-icon/i-icon.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts +23 -1
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts +17 -0
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-drbar.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-drbar.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-drtab.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-drtab.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts +60 -2
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts.map +1 -1
- package/out/interface/provider/i-async-action.provider.d.ts +3 -2
- package/out/interface/provider/i-async-action.provider.d.ts.map +1 -1
- package/out/interface/service/i-transaction/i-transaction.d.ts +83 -0
- package/out/interface/service/i-transaction/i-transaction.d.ts.map +1 -0
- package/out/interface/service/i-transaction/i-transaction.js +1 -0
- package/out/interface/service/index.d.ts +1 -0
- package/out/interface/service/index.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +9 -3
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/interface/util/i-view-stack/i-view-stack.d.ts +53 -0
- package/out/interface/util/i-view-stack/i-view-stack.d.ts.map +1 -0
- package/out/interface/util/i-view-stack/i-view-stack.js +1 -0
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/plugin/index.d.ts +1 -1
- package/out/plugin/index.d.ts.map +1 -1
- package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts +46 -0
- package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts.map +1 -1
- package/out/register/helper/app-menu-item-register.d.ts.map +1 -1
- package/out/register/helper/app-menu-item-register.js +1 -6
- package/out/register/helper/panel-item-register.d.ts.map +1 -1
- package/out/register/helper/panel-item-register.js +36 -30
- package/out/service/dto/method.dto.d.ts +1 -12
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +8 -20
- package/out/service/mqtt/mqtt.service.js +2 -2
- package/out/service/service/auth/v7-auth.service.d.ts +1 -2
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +29 -7
- package/out/service/service/entity/de.service.d.ts +1 -2
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +5 -2
- package/out/service/service/entity/method/de-action.d.ts +13 -1
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +167 -59
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +24 -21
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +6 -0
- package/out/service/utils/de-cache/de-cache.d.ts +11 -1
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +122 -18
- package/out/service/utils/de-dq-cond/ps-model-cond-engine-base.d.ts.map +1 -1
- package/out/service/utils/de-dq-cond/ps-model-cond-engine-base.js +4 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +34 -27
- package/out/service/utils/res-path/res-path.d.ts +2 -2
- package/out/service/utils/res-path/res-path.d.ts.map +1 -1
- package/out/service/utils/res-path/res-path.js +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +6 -0
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +93 -41
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +3 -0
- package/out/ui-action/provider/front-ui-action-provider.d.ts +1 -1
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +5 -1
- package/out/ui-logic/ui-logic-node/debug-param-node/debug-param-node.js +1 -1
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.js +0 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/script/script-function.js +1 -1
- package/out/utils/ui-domain/transaction.d.ts +66 -0
- package/out/utils/ui-domain/transaction.d.ts.map +1 -0
- package/out/utils/ui-domain/transaction.js +94 -0
- package/out/utils/ui-domain/ui-domain.d.ts +50 -6
- package/out/utils/ui-domain/ui-domain.d.ts.map +1 -1
- package/out/utils/ui-domain/ui-domain.js +68 -9
- package/out/utils/view-stack/view-stack.d.ts +29 -0
- package/out/utils/view-stack/view-stack.d.ts.map +1 -0
- package/out/utils/view-stack/view-stack.js +47 -0
- package/package.json +5 -5
- package/src/app-hub.ts +27 -2
- package/src/application.ts +1 -1
- package/src/command/app/open-app-view/open-app-view.ts +8 -1
- package/src/controller/common/editor/editor.controller.ts +54 -0
- package/src/controller/common/view/view.controller.ts +7 -2
- package/src/controller/constant/control/index.ts +1 -0
- package/src/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.ts +5 -0
- package/src/controller/control/chart/chart.controller.ts +1 -1
- package/src/controller/control/form/edit-form/edit-form.controller.ts +1 -1
- package/src/controller/control/form/form/form.controller.ts +11 -1
- package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +4 -0
- package/src/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.ts +14 -0
- package/src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.ts +16 -0
- package/src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.ts +9 -1
- package/src/controller/control/grid/grid/grid.service.ts +1 -11
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +12 -2
- package/src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts +0 -10
- package/src/controller/control/tree/tree.controller.ts +35 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/index.ts +1 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts +22 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts +88 -2
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts +522 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts +18 -1
- package/src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts +43 -12
- package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +305 -2
- package/src/controller/utils/jsonschema/entity.ts +4 -1
- package/src/de-logic/utils/handle-src-val.ts +29 -1
- package/src/global/global-util/global-util.ts +9 -0
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +4 -3
- package/src/interface/controller/common/i-icon/i-icon.ts +1 -0
- package/src/interface/controller/controller/control/i-tree-grid-ex.controller.ts +27 -2
- package/src/interface/controller/event/control/i-tree-grid-ex.event.ts +15 -1
- package/src/interface/controller/state/control/i-drbar.state.ts +8 -0
- package/src/interface/controller/state/control/i-drtab.state.ts +8 -0
- package/src/interface/controller/state/control/i-tree-grid-ex.state.ts +64 -2
- package/src/interface/provider/i-async-action.provider.ts +3 -2
- package/src/interface/service/i-transaction/i-transaction.ts +88 -0
- package/src/interface/service/index.ts +4 -0
- package/src/interface/service/service/i-app-de.service.ts +10 -3
- package/src/interface/util/i-view-stack/i-view-stack.ts +53 -0
- package/src/interface/util/index.ts +1 -0
- package/src/plugin/index.ts +4 -1
- package/src/plugin/remote-plugin-item/remote-plugin-item.ts +43 -0
- package/src/register/helper/app-menu-item-register.ts +1 -5
- package/src/register/helper/panel-item-register.ts +43 -37
- package/src/service/dto/method.dto.ts +7 -20
- package/src/service/mqtt/mqtt.service.ts +2 -2
- package/src/service/service/auth/v7-auth.service.ts +39 -19
- package/src/service/service/entity/de.service.ts +7 -9
- package/src/service/service/entity/method/de-action.ts +186 -64
- package/src/service/service/entity/method/fetch.ts +28 -29
- package/src/service/service/entity/method/method-renturn.ts +6 -0
- package/src/service/utils/de-cache/de-cache.ts +128 -19
- package/src/service/utils/de-dq-cond/ps-model-cond-engine-base.ts +4 -0
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +35 -32
- package/src/service/utils/res-path/res-path.ts +2 -2
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +111 -46
- package/src/service/vo/tree-node-data/tree-node-data.ts +3 -0
- package/src/ui-action/provider/front-ui-action-provider.ts +10 -1
- package/src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts +1 -1
- package/src/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.ts +0 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/script/script-function.ts +1 -1
- package/src/utils/ui-domain/transaction.ts +100 -0
- package/src/utils/ui-domain/ui-domain.ts +73 -9
- package/src/utils/view-stack/view-stack.ts +64 -0
package/out/utils/index.d.ts
CHANGED
|
@@ -14,5 +14,6 @@ export { ThemeUtil } from './theme-util/theme-util';
|
|
|
14
14
|
export { UIDomain } from './ui-domain/ui-domain';
|
|
15
15
|
export { UIDomainManager } from './ui-domain-manager/ui-domain-manager';
|
|
16
16
|
export { RawValueUtil } from './raw-value-util/raw-value-util';
|
|
17
|
+
export { ViewStack } from './view-stack/view-stack';
|
|
17
18
|
export { handleAllSettled } from './promise/promise';
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
package/out/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,yCAAyC,CAAC;AACjD,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,yCAAyC,CAAC;AACjD,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/out/utils/index.js
CHANGED
|
@@ -14,4 +14,5 @@ export { ThemeUtil } from './theme-util/theme-util';
|
|
|
14
14
|
export { UIDomain } from './ui-domain/ui-domain';
|
|
15
15
|
export { UIDomainManager } from './ui-domain-manager/ui-domain-manager';
|
|
16
16
|
export { RawValueUtil } from './raw-value-util/raw-value-util';
|
|
17
|
+
export { ViewStack } from './view-stack/view-stack';
|
|
17
18
|
export { handleAllSettled } from './promise/promise';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ITransaction, ITransactionState } from '../../interface';
|
|
2
|
+
/**
|
|
3
|
+
* 界面域下简单数据事务
|
|
4
|
+
*
|
|
5
|
+
* @author chitanda
|
|
6
|
+
* @date 2024-01-17 15:01:39
|
|
7
|
+
* @export
|
|
8
|
+
* @class Transaction
|
|
9
|
+
*/
|
|
10
|
+
export declare class Transaction implements ITransaction {
|
|
11
|
+
/**
|
|
12
|
+
* 待提交队列
|
|
13
|
+
*
|
|
14
|
+
* @author chitanda
|
|
15
|
+
* @date 2024-01-17 15:01:38
|
|
16
|
+
* @protected
|
|
17
|
+
*/
|
|
18
|
+
protected commitQueue: Map<string, () => void>;
|
|
19
|
+
/**
|
|
20
|
+
* 事务状态
|
|
21
|
+
*
|
|
22
|
+
* @author chitanda
|
|
23
|
+
* @date 2024-01-17 15:01:45
|
|
24
|
+
* @type {ITransactionState}
|
|
25
|
+
*/
|
|
26
|
+
readonly state: ITransactionState;
|
|
27
|
+
/**
|
|
28
|
+
* 开启事务
|
|
29
|
+
*
|
|
30
|
+
* @description 事务开启后,所有的数据操作都会被缓存,直到事务提交或者回滚
|
|
31
|
+
* @author chitanda
|
|
32
|
+
* @date 2024-01-17 15:01:46
|
|
33
|
+
*/
|
|
34
|
+
open(): void;
|
|
35
|
+
/**
|
|
36
|
+
* 新增变更事务回调,事务提交时会按照添加顺序倒序执行
|
|
37
|
+
*
|
|
38
|
+
* @author chitanda
|
|
39
|
+
* @date 2024-01-17 16:01:50
|
|
40
|
+
* @param {string} id 回调标识,用于去重。一个数据只能有一个回调
|
|
41
|
+
* @param {() => void} commit
|
|
42
|
+
*/
|
|
43
|
+
change(id: string, commit: () => void): void;
|
|
44
|
+
/**
|
|
45
|
+
* 提交事务
|
|
46
|
+
*
|
|
47
|
+
* @author chitanda
|
|
48
|
+
* @date 2024-01-17 15:01:05
|
|
49
|
+
*/
|
|
50
|
+
commit(): void;
|
|
51
|
+
/**
|
|
52
|
+
* 回滚事务
|
|
53
|
+
*
|
|
54
|
+
* @author chitanda
|
|
55
|
+
* @date 2024-01-17 19:01:43
|
|
56
|
+
*/
|
|
57
|
+
rollback(): void;
|
|
58
|
+
/**
|
|
59
|
+
* 关闭事务
|
|
60
|
+
*
|
|
61
|
+
* @author chitanda
|
|
62
|
+
* @date 2024-01-17 15:01:02
|
|
63
|
+
*/
|
|
64
|
+
close(): void;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/utils/ui-domain/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAElE;;;;;;;GAOG;AACH,qBAAa,WAAY,YAAW,YAAY;IAC9C;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAa;IAE3D;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAG/B;IAEF;;;;;;OAMG;IACH,IAAI,IAAI,IAAI;IAQZ;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,GAAG,IAAI;IAK5C;;;;;OAKG;IACH,MAAM,IAAI,IAAI;IAUd;;;;;OAKG;IACH,QAAQ,IAAI,IAAI;IAKhB;;;;;OAKG;IACH,KAAK,IAAI,IAAI;CAMd"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 界面域下简单数据事务
|
|
3
|
+
*
|
|
4
|
+
* @author chitanda
|
|
5
|
+
* @date 2024-01-17 15:01:39
|
|
6
|
+
* @export
|
|
7
|
+
* @class Transaction
|
|
8
|
+
*/
|
|
9
|
+
export class Transaction {
|
|
10
|
+
constructor() {
|
|
11
|
+
/**
|
|
12
|
+
* 待提交队列
|
|
13
|
+
*
|
|
14
|
+
* @author chitanda
|
|
15
|
+
* @date 2024-01-17 15:01:38
|
|
16
|
+
* @protected
|
|
17
|
+
*/
|
|
18
|
+
this.commitQueue = new Map();
|
|
19
|
+
/**
|
|
20
|
+
* 事务状态
|
|
21
|
+
*
|
|
22
|
+
* @author chitanda
|
|
23
|
+
* @date 2024-01-17 15:01:45
|
|
24
|
+
* @type {ITransactionState}
|
|
25
|
+
*/
|
|
26
|
+
this.state = {
|
|
27
|
+
isOpen: false,
|
|
28
|
+
isChange: false,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 开启事务
|
|
33
|
+
*
|
|
34
|
+
* @description 事务开启后,所有的数据操作都会被缓存,直到事务提交或者回滚
|
|
35
|
+
* @author chitanda
|
|
36
|
+
* @date 2024-01-17 15:01:46
|
|
37
|
+
*/
|
|
38
|
+
open() {
|
|
39
|
+
if (this.state.isOpen) {
|
|
40
|
+
ibiz.log.warn('事务已经开启, 单个界面域只能开启一个事务');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.state.isOpen = true;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 新增变更事务回调,事务提交时会按照添加顺序倒序执行
|
|
47
|
+
*
|
|
48
|
+
* @author chitanda
|
|
49
|
+
* @date 2024-01-17 16:01:50
|
|
50
|
+
* @param {string} id 回调标识,用于去重。一个数据只能有一个回调
|
|
51
|
+
* @param {() => void} commit
|
|
52
|
+
*/
|
|
53
|
+
change(id, commit) {
|
|
54
|
+
this.state.isChange = true;
|
|
55
|
+
this.commitQueue.set(id, commit);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 提交事务
|
|
59
|
+
*
|
|
60
|
+
* @author chitanda
|
|
61
|
+
* @date 2024-01-17 15:01:05
|
|
62
|
+
*/
|
|
63
|
+
commit() {
|
|
64
|
+
// 倒序提交
|
|
65
|
+
const commitQueue = Array.from(this.commitQueue.values()).reverse();
|
|
66
|
+
for (const commit of commitQueue) {
|
|
67
|
+
commit();
|
|
68
|
+
}
|
|
69
|
+
this.commitQueue.clear();
|
|
70
|
+
this.state.isChange = false;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 回滚事务
|
|
74
|
+
*
|
|
75
|
+
* @author chitanda
|
|
76
|
+
* @date 2024-01-17 19:01:43
|
|
77
|
+
*/
|
|
78
|
+
rollback() {
|
|
79
|
+
this.commitQueue.clear();
|
|
80
|
+
this.state.isChange = false;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 关闭事务
|
|
84
|
+
*
|
|
85
|
+
* @author chitanda
|
|
86
|
+
* @date 2024-01-17 15:01:02
|
|
87
|
+
*/
|
|
88
|
+
close() {
|
|
89
|
+
if (this.state.isChange) {
|
|
90
|
+
throw new Error('当前事务未提交,不可以直接关闭事务');
|
|
91
|
+
}
|
|
92
|
+
this.state.isOpen = false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IAppDERS } from '@ibiz/model-core';
|
|
2
|
+
import { Transaction } from './transaction';
|
|
2
3
|
/**
|
|
3
4
|
* 界面域
|
|
4
5
|
*
|
|
@@ -17,14 +18,41 @@ export declare class UIDomain {
|
|
|
17
18
|
*/
|
|
18
19
|
readonly id: string;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
+
* 状态
|
|
22
|
+
*
|
|
23
|
+
* @author chitanda
|
|
24
|
+
* @date 2024-01-15 19:01:51
|
|
25
|
+
* @type {{ rsInit: boolean }} 关系是否已经初始化
|
|
26
|
+
*/
|
|
27
|
+
readonly state: {
|
|
28
|
+
rsInit: boolean;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* DTO 子父关系映射
|
|
21
32
|
*
|
|
22
33
|
* @author chitanda
|
|
23
34
|
* @date 2023-12-26 15:12:13
|
|
24
35
|
* @protected
|
|
25
|
-
* @type {Map<string, IAppDERS[]>}
|
|
36
|
+
* @type {Map<string, IAppDERS[]>} Map<子实体, 当前实体的父关系>
|
|
26
37
|
*/
|
|
27
38
|
protected rsMap: Map<string, IAppDERS[]>;
|
|
39
|
+
/**
|
|
40
|
+
* DTO 父子关系映射
|
|
41
|
+
*
|
|
42
|
+
* @author chitanda
|
|
43
|
+
* @date 2024-01-15 17:01:42
|
|
44
|
+
* @protected
|
|
45
|
+
* @type {Map<string, IAppDERS[]>}
|
|
46
|
+
*/
|
|
47
|
+
protected rs2Map: Map<string, IAppDERS[]>;
|
|
48
|
+
/**
|
|
49
|
+
* 当前界面域下唯一事务
|
|
50
|
+
*
|
|
51
|
+
* @author chitanda
|
|
52
|
+
* @date 2024-01-17 15:01:07
|
|
53
|
+
* @type {Transaction}
|
|
54
|
+
*/
|
|
55
|
+
readonly transaction: Transaction;
|
|
28
56
|
/**
|
|
29
57
|
* Creates an instance of UIDomain.
|
|
30
58
|
*
|
|
@@ -39,19 +67,35 @@ export declare class UIDomain {
|
|
|
39
67
|
*
|
|
40
68
|
* @author chitanda
|
|
41
69
|
* @date 2023-12-26 15:12:31
|
|
42
|
-
* @param {string}
|
|
70
|
+
* @param {string} appDataEntityId
|
|
43
71
|
* @param {IAppDERS} configs
|
|
44
72
|
*/
|
|
45
|
-
setDERConfig(
|
|
73
|
+
setDERConfig(appDataEntityId: string, configs: IAppDERS[]): void;
|
|
46
74
|
/**
|
|
47
75
|
* 获取当前界面域下,具体实体的关系(在数据加载完成之后才有值)
|
|
48
76
|
*
|
|
49
77
|
* @author chitanda
|
|
50
78
|
* @date 2023-12-26 16:12:07
|
|
51
|
-
* @param {string}
|
|
79
|
+
* @param {string} appDataEntityId
|
|
52
80
|
* @return {*} {IAppDERS[]}
|
|
53
81
|
*/
|
|
54
|
-
getDERConfig(
|
|
82
|
+
getDERConfig(appDataEntityId: string): IAppDERS[];
|
|
83
|
+
/**
|
|
84
|
+
* 查询指定主实体下的所有子实体关系
|
|
85
|
+
*
|
|
86
|
+
* @author chitanda
|
|
87
|
+
* @date 2024-01-17 16:01:21
|
|
88
|
+
* @param {string} appDataEntityId
|
|
89
|
+
* @return {*} {IAppDERS[]}
|
|
90
|
+
*/
|
|
91
|
+
getDERConfigByMajor(appDataEntityId: string): IAppDERS[];
|
|
92
|
+
/**
|
|
93
|
+
* 根据模型给的子实体中的父关系模型,计算每个实体的子关系模型
|
|
94
|
+
*
|
|
95
|
+
* @author chitanda
|
|
96
|
+
* @date 2024-01-15 19:01:49
|
|
97
|
+
*/
|
|
98
|
+
calcParentRs(): void;
|
|
55
99
|
/**
|
|
56
100
|
* 界面域销毁
|
|
57
101
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-domain.d.ts","sourceRoot":"","sources":["../../../src/utils/ui-domain/ui-domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ui-domain.d.ts","sourceRoot":"","sources":["../../../src/utils/ui-domain/ui-domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;GAOG;AACH,qBAAa,QAAQ;IACnB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,CAAqB;IAExD;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAa;IAErD;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAa;IAEtD;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAqB;IAEtD;;;;;;;OAOG;gBACS,EAAE,CAAC,EAAE,MAAM;IAQvB;;;;;;;OAOG;IACH,YAAY,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI;IAIhE;;;;;;;OAOG;IACH,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ,EAAE;IAOjD;;;;;;;OAOG;IACH,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ,EAAE;IAOxD;;;;;OAKG;IACH,YAAY,IAAI,IAAI;IAcpB;;;;;OAKG;IACH,OAAO,IAAI,IAAI;CAWhB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createUUID } from 'qx-util';
|
|
2
|
+
import { Transaction } from './transaction';
|
|
2
3
|
/**
|
|
3
4
|
* 界面域
|
|
4
5
|
*
|
|
@@ -18,14 +19,39 @@ export class UIDomain {
|
|
|
18
19
|
*/
|
|
19
20
|
constructor(id) {
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* 状态
|
|
23
|
+
*
|
|
24
|
+
* @author chitanda
|
|
25
|
+
* @date 2024-01-15 19:01:51
|
|
26
|
+
* @type {{ rsInit: boolean }} 关系是否已经初始化
|
|
27
|
+
*/
|
|
28
|
+
this.state = { rsInit: false };
|
|
29
|
+
/**
|
|
30
|
+
* DTO 子父关系映射
|
|
22
31
|
*
|
|
23
32
|
* @author chitanda
|
|
24
33
|
* @date 2023-12-26 15:12:13
|
|
25
34
|
* @protected
|
|
26
|
-
* @type {Map<string, IAppDERS[]>}
|
|
35
|
+
* @type {Map<string, IAppDERS[]>} Map<子实体, 当前实体的父关系>
|
|
27
36
|
*/
|
|
28
37
|
this.rsMap = new Map();
|
|
38
|
+
/**
|
|
39
|
+
* DTO 父子关系映射
|
|
40
|
+
*
|
|
41
|
+
* @author chitanda
|
|
42
|
+
* @date 2024-01-15 17:01:42
|
|
43
|
+
* @protected
|
|
44
|
+
* @type {Map<string, IAppDERS[]>}
|
|
45
|
+
*/
|
|
46
|
+
this.rs2Map = new Map();
|
|
47
|
+
/**
|
|
48
|
+
* 当前界面域下唯一事务
|
|
49
|
+
*
|
|
50
|
+
* @author chitanda
|
|
51
|
+
* @date 2024-01-17 15:01:07
|
|
52
|
+
* @type {Transaction}
|
|
53
|
+
*/
|
|
54
|
+
this.transaction = new Transaction();
|
|
29
55
|
if (id) {
|
|
30
56
|
this.id = id;
|
|
31
57
|
}
|
|
@@ -38,26 +64,59 @@ export class UIDomain {
|
|
|
38
64
|
*
|
|
39
65
|
* @author chitanda
|
|
40
66
|
* @date 2023-12-26 15:12:31
|
|
41
|
-
* @param {string}
|
|
67
|
+
* @param {string} appDataEntityId
|
|
42
68
|
* @param {IAppDERS} configs
|
|
43
69
|
*/
|
|
44
|
-
setDERConfig(
|
|
45
|
-
this.rsMap.set(
|
|
70
|
+
setDERConfig(appDataEntityId, configs) {
|
|
71
|
+
this.rsMap.set(appDataEntityId, configs);
|
|
46
72
|
}
|
|
47
73
|
/**
|
|
48
74
|
* 获取当前界面域下,具体实体的关系(在数据加载完成之后才有值)
|
|
49
75
|
*
|
|
50
76
|
* @author chitanda
|
|
51
77
|
* @date 2023-12-26 16:12:07
|
|
52
|
-
* @param {string}
|
|
78
|
+
* @param {string} appDataEntityId
|
|
79
|
+
* @return {*} {IAppDERS[]}
|
|
80
|
+
*/
|
|
81
|
+
getDERConfig(appDataEntityId) {
|
|
82
|
+
if (this.rsMap.has(appDataEntityId)) {
|
|
83
|
+
return this.rsMap.get(appDataEntityId);
|
|
84
|
+
}
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 查询指定主实体下的所有子实体关系
|
|
89
|
+
*
|
|
90
|
+
* @author chitanda
|
|
91
|
+
* @date 2024-01-17 16:01:21
|
|
92
|
+
* @param {string} appDataEntityId
|
|
53
93
|
* @return {*} {IAppDERS[]}
|
|
54
94
|
*/
|
|
55
|
-
|
|
56
|
-
if (this.
|
|
57
|
-
return this.
|
|
95
|
+
getDERConfigByMajor(appDataEntityId) {
|
|
96
|
+
if (this.rs2Map.has(appDataEntityId)) {
|
|
97
|
+
return this.rs2Map.get(appDataEntityId);
|
|
58
98
|
}
|
|
59
99
|
return [];
|
|
60
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* 根据模型给的子实体中的父关系模型,计算每个实体的子关系模型
|
|
103
|
+
*
|
|
104
|
+
* @author chitanda
|
|
105
|
+
* @date 2024-01-15 19:01:49
|
|
106
|
+
*/
|
|
107
|
+
calcParentRs() {
|
|
108
|
+
this.rs2Map.clear();
|
|
109
|
+
this.rsMap.forEach((configs, appDataEntityId) => {
|
|
110
|
+
configs.forEach(config => {
|
|
111
|
+
config.minorAppDataEntityId = appDataEntityId;
|
|
112
|
+
const major = config.majorAppDataEntityId;
|
|
113
|
+
if (!this.rs2Map.has(major)) {
|
|
114
|
+
this.rs2Map.set(major, []);
|
|
115
|
+
}
|
|
116
|
+
this.rs2Map.get(major).push(config);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
61
120
|
/**
|
|
62
121
|
* 界面域销毁
|
|
63
122
|
*
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IAppView } from '@ibiz/model-core';
|
|
2
|
+
import { IViewController, IViewEvent, IViewStack, IViewState } from '../../interface';
|
|
3
|
+
/**
|
|
4
|
+
* 视图堆栈
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2024-01-18 10:01:47
|
|
8
|
+
* @export
|
|
9
|
+
* @class ViewStack
|
|
10
|
+
*/
|
|
11
|
+
export declare class ViewStack implements IViewStack {
|
|
12
|
+
private stackMap;
|
|
13
|
+
private stack;
|
|
14
|
+
private activeStack;
|
|
15
|
+
add(id: string, view: IViewController<IAppView, IViewState, IViewEvent>): void;
|
|
16
|
+
remove(id: string): void;
|
|
17
|
+
getActives(): IViewController[];
|
|
18
|
+
active(_id: string): void;
|
|
19
|
+
deactivate(_id: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* 重新计算激活视图堆栈
|
|
22
|
+
*
|
|
23
|
+
* @author chitanda
|
|
24
|
+
* @date 2024-01-18 14:01:23
|
|
25
|
+
* @protected
|
|
26
|
+
*/
|
|
27
|
+
protected recalculateActiveStack(): void;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=view-stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-stack.d.ts","sourceRoot":"","sources":["../../../src/utils/view-stack/view-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;GAOG;AACH,qBAAa,SAAU,YAAW,UAAU;IAC1C,OAAO,CAAC,QAAQ,CAA2C;IAE3D,OAAO,CAAC,KAAK,CAAyB;IAEtC,OAAO,CAAC,WAAW,CAAyB;IAE5C,GAAG,CACD,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,eAAe,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,GACtD,IAAI;IAMP,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IASxB,UAAU,IAAI,eAAe,EAAE;IAI/B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIzB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B;;;;;;OAMG;IACH,SAAS,CAAC,sBAAsB,IAAI,IAAI;CAGzC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 视图堆栈
|
|
3
|
+
*
|
|
4
|
+
* @author chitanda
|
|
5
|
+
* @date 2024-01-18 10:01:47
|
|
6
|
+
* @export
|
|
7
|
+
* @class ViewStack
|
|
8
|
+
*/
|
|
9
|
+
export class ViewStack {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.stackMap = new Map();
|
|
12
|
+
this.stack = [];
|
|
13
|
+
this.activeStack = [];
|
|
14
|
+
}
|
|
15
|
+
add(id, view) {
|
|
16
|
+
this.stack.push(view);
|
|
17
|
+
this.stackMap.set(id, view);
|
|
18
|
+
this.recalculateActiveStack();
|
|
19
|
+
}
|
|
20
|
+
remove(id) {
|
|
21
|
+
const view = this.stackMap.get(id);
|
|
22
|
+
if (view) {
|
|
23
|
+
this.stack.splice(this.stack.indexOf(view), 1);
|
|
24
|
+
this.stackMap.delete(id);
|
|
25
|
+
this.recalculateActiveStack();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
getActives() {
|
|
29
|
+
return this.activeStack;
|
|
30
|
+
}
|
|
31
|
+
active(_id) {
|
|
32
|
+
this.recalculateActiveStack();
|
|
33
|
+
}
|
|
34
|
+
deactivate(_id) {
|
|
35
|
+
this.recalculateActiveStack();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 重新计算激活视图堆栈
|
|
39
|
+
*
|
|
40
|
+
* @author chitanda
|
|
41
|
+
* @date 2024-01-18 14:01:23
|
|
42
|
+
* @protected
|
|
43
|
+
*/
|
|
44
|
+
recalculateActiveStack() {
|
|
45
|
+
this.activeStack = this.stack.filter(item => item.isActive === true);
|
|
46
|
+
}
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.5.3-beta.
|
|
3
|
+
"version": "0.5.3-beta.11",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"author": "chitanda",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@ibiz-template/core": "^0.5.
|
|
33
|
-
"@ibiz/model-core": "^0.1.
|
|
32
|
+
"@ibiz-template/core": "^0.5.3-beta.11",
|
|
33
|
+
"@ibiz/model-core": "^0.1.5",
|
|
34
34
|
"@types/path-browserify": "^1.0.2",
|
|
35
35
|
"@types/qs": "^6.9.11",
|
|
36
36
|
"@types/systemjs": "^6.13.5",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@ibiz-template/core": "^0.5.0-beta.0",
|
|
50
|
-
"@ibiz/model-core": "^0.1.
|
|
50
|
+
"@ibiz/model-core": "^0.1.5",
|
|
51
51
|
"async-validator": "^4.2.5",
|
|
52
52
|
"dayjs": "^1.11.7",
|
|
53
53
|
"echarts": "^5.4.3",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"qx-util": "^0.4.8",
|
|
60
60
|
"ramda": "^0.29.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "776931de0bca05f5e83edb1d584e155374776374"
|
|
63
63
|
}
|
package/src/app-hub.ts
CHANGED
|
@@ -66,6 +66,16 @@ export class AppHub implements IAppHubService {
|
|
|
66
66
|
*/
|
|
67
67
|
protected view2appMap: Map<string, string> = new Map();
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* 当前注册的应用视图优先级
|
|
71
|
+
*
|
|
72
|
+
* @author chitanda
|
|
73
|
+
* @date 2024-01-15 15:01:57
|
|
74
|
+
* @protected
|
|
75
|
+
* @type {Map<string, number>}
|
|
76
|
+
*/
|
|
77
|
+
protected view2appPriorityMap: Map<string, number> = new Map();
|
|
78
|
+
|
|
69
79
|
/**
|
|
70
80
|
* 实例化的应用视图模型
|
|
71
81
|
*
|
|
@@ -176,13 +186,28 @@ export class AppHub implements IAppHubService {
|
|
|
176
186
|
* 设置应用视图所属应用
|
|
177
187
|
*
|
|
178
188
|
* @author chitanda
|
|
179
|
-
* @date
|
|
189
|
+
* @date 2024-01-15 15:01:41
|
|
180
190
|
* @param {string} tag 视图 codeName 或者视图 id
|
|
181
191
|
* @param {string} [appId=ibiz.env.appId]
|
|
192
|
+
* @param {number} [priority=-1] 视图的优先级,值越小优先级越高。1为最高优先级
|
|
182
193
|
*/
|
|
183
|
-
setAppView(
|
|
194
|
+
setAppView(
|
|
195
|
+
tag: string,
|
|
196
|
+
appId: string = ibiz.env.appId,
|
|
197
|
+
priority: number = -1,
|
|
198
|
+
): void {
|
|
184
199
|
const id = this.calcAppViewId(tag);
|
|
200
|
+
if (this.view2appMap.has(id)) {
|
|
201
|
+
const _priority = this.view2appPriorityMap.get(id);
|
|
202
|
+
// 已经存在优先级高的视图直接跳过,若优先级相同或更高则覆盖
|
|
203
|
+
if (_priority && _priority < priority) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
185
207
|
this.view2appMap.set(id, appId);
|
|
208
|
+
if (priority !== -1) {
|
|
209
|
+
this.view2appPriorityMap.set(id, priority);
|
|
210
|
+
}
|
|
186
211
|
}
|
|
187
212
|
|
|
188
213
|
/**
|
package/src/application.ts
CHANGED
|
@@ -130,7 +130,7 @@ export class Application implements IAppService {
|
|
|
130
130
|
async init(): Promise<void> {
|
|
131
131
|
await this.authority.init();
|
|
132
132
|
await this.loadAppModelStyle();
|
|
133
|
-
if (ibiz.env.enableMqtt && ibiz.appData) {
|
|
133
|
+
if (ibiz.env.enableMqtt && ibiz.appData && ibiz.auth.isAnonymous !== true) {
|
|
134
134
|
this.mqtt = new MqttService(
|
|
135
135
|
ibiz.appData.mqtttopic,
|
|
136
136
|
getToken()!,
|
|
@@ -71,7 +71,14 @@ export class OpenAppViewCommand {
|
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
73
|
const { openMode = 'INDEXVIEWTAB' } = appView;
|
|
74
|
-
|
|
74
|
+
const viewOpenMode = opts.openMode || openMode;
|
|
75
|
+
if (viewOpenMode !== undefined && viewOpenMode !== 'INDEXVIEWTAB') {
|
|
76
|
+
// 除了走路由的,其他情况toRouteDepth转为undefined,避免影响后续操作
|
|
77
|
+
if (context.toRouteDepth) {
|
|
78
|
+
context.toRouteDepth = undefined;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
switch (viewOpenMode) {
|
|
75
82
|
case 'INDEXVIEWTAB':
|
|
76
83
|
if (opts.noWaitRoute) {
|
|
77
84
|
this.openIndexViewTab(appView, context, params);
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { IEditor, INavigateParamContainer } from '@ibiz/model-core';
|
|
3
|
+
import { DataTypes } from '@ibiz-template/core';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
3
5
|
import { convertNavData } from '../../../utils';
|
|
4
6
|
import {
|
|
5
7
|
IEditorContainerController,
|
|
6
8
|
IEditorController,
|
|
7
9
|
} from '../../../interface/controller';
|
|
10
|
+
import { ValueExUtil } from '../../utils';
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* 编辑器控制器基类
|
|
@@ -88,6 +91,28 @@ export class EditorController<T extends IEditor = IEditor>
|
|
|
88
91
|
return !!this.model.readOnly;
|
|
89
92
|
}
|
|
90
93
|
|
|
94
|
+
/**
|
|
95
|
+
* 值格式化
|
|
96
|
+
* @author lxm
|
|
97
|
+
* @date 2024-01-11 10:18:33
|
|
98
|
+
* @readonly
|
|
99
|
+
* @type {(string | undefined)}
|
|
100
|
+
*/
|
|
101
|
+
get valueFormat(): string | undefined {
|
|
102
|
+
return this.parent.valueFormat;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 数据类型
|
|
107
|
+
* @author lxm
|
|
108
|
+
* @date 2024-01-11 10:18:55
|
|
109
|
+
* @readonly
|
|
110
|
+
* @type {(number | undefined)}
|
|
111
|
+
*/
|
|
112
|
+
get dataType(): number | undefined {
|
|
113
|
+
return this.parent.dataType;
|
|
114
|
+
}
|
|
115
|
+
|
|
91
116
|
/**
|
|
92
117
|
* Creates an instance of EditorController.
|
|
93
118
|
* @author lxm
|
|
@@ -195,4 +220,33 @@ export class EditorController<T extends IEditor = IEditor>
|
|
|
195
220
|
toBoolean(value: string): boolean {
|
|
196
221
|
return Object.is('true', value);
|
|
197
222
|
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* 值格式化
|
|
226
|
+
* @author lxm
|
|
227
|
+
* @date 2023-08-25 05:18:11
|
|
228
|
+
* @param {unknown} value
|
|
229
|
+
* @return {*} {string}
|
|
230
|
+
*/
|
|
231
|
+
formatValue(value: unknown = ''): string {
|
|
232
|
+
// 根据数据类型增强转换显示文本
|
|
233
|
+
if (this.model.valueType !== 'SIMPLE') {
|
|
234
|
+
return ValueExUtil.toText(this.model, value);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// 根据格式化配置格式化显示
|
|
238
|
+
const strVal = `${value}`;
|
|
239
|
+
if (!this.valueFormat) {
|
|
240
|
+
return strVal;
|
|
241
|
+
}
|
|
242
|
+
const isDate = DataTypes.isDate(this.dataType!);
|
|
243
|
+
if (isDate) {
|
|
244
|
+
const formatVal = dayjs(strVal).format(this.valueFormat);
|
|
245
|
+
if (formatVal !== 'Invalid Date') {
|
|
246
|
+
return formatVal;
|
|
247
|
+
}
|
|
248
|
+
return strVal;
|
|
249
|
+
}
|
|
250
|
+
return ibiz.util.text.format(strVal, this.valueFormat);
|
|
251
|
+
}
|
|
198
252
|
}
|