@ibiz-template/vue3-util 0.6.1-dev.0 → 0.6.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/lib/_virtual/_commonjsHelpers.cjs +46 -0
- package/lib/common/badge/badge.cjs +34 -0
- package/lib/common/badge/badge.css +1 -0
- package/lib/common/code-list/code-list.cjs +105 -0
- package/lib/common/code-list/code-list.css +1 -0
- package/lib/common/control-base/control-base.cjs +102 -0
- package/lib/common/control-base/control-base.css +1 -0
- package/lib/common/control-loading-placeholder/control-loading-placeholder.cjs +32 -0
- package/lib/common/control-shell/control-shell.cjs +58 -0
- package/lib/common/control-shell/control-shell.css +1 -0
- package/lib/common/icon/icon.cjs +103 -0
- package/lib/common/index.cjs +21 -0
- package/lib/common/router-view/router-view.cjs +77 -0
- package/lib/common/view-shell/view-shell.cjs +137 -0
- package/lib/common/view-shell/view-shell.css +1 -0
- package/lib/control/index.cjs +10 -0
- package/lib/control/panel/index.cjs +9 -0
- package/lib/control/panel/panel/index.cjs +18 -0
- package/lib/control/panel/panel/panel.cjs +142 -0
- package/lib/control/panel/panel/panel.css +1 -0
- package/lib/control/panel/panel/panel.provider.cjs +10 -0
- package/lib/control/panel/view-layout-panel/index.cjs +24 -0
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +144 -0
- package/lib/control/panel/view-layout-panel/view-layout-panel.css +1 -0
- package/lib/control/panel/view-layout-panel/view-layout-panel.provider.cjs +10 -0
- package/lib/hooks/app/app.hooks.cjs +26 -0
- package/lib/hooks/index.cjs +7 -0
- package/lib/interface/index.cjs +5 -0
- package/lib/interface/util/index.cjs +5 -0
- package/lib/interface/util/route/route.cjs +3 -0
- package/lib/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.cjs +540 -0
- package/lib/panel-component/grid-container/grid-container.cjs +108 -0
- package/lib/panel-component/grid-container/grid-container.controller.cjs +14 -0
- package/lib/panel-component/grid-container/grid-container.css +1 -0
- package/lib/panel-component/grid-container/grid-container.provider.cjs +17 -0
- package/lib/panel-component/grid-container/grid-container.state.cjs +9 -0
- package/lib/panel-component/grid-container/index.cjs +25 -0
- package/lib/panel-component/index.cjs +73 -0
- package/lib/panel-component/multi-data-container/index.cjs +28 -0
- package/lib/panel-component/multi-data-container/multi-data-container-item.controller.cjs +119 -0
- package/lib/panel-component/multi-data-container/multi-data-container-itm.state.cjs +19 -0
- package/lib/panel-component/multi-data-container/multi-data-container.cjs +89 -0
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +262 -0
- package/lib/panel-component/multi-data-container/multi-data-container.css +1 -0
- package/lib/panel-component/multi-data-container/multi-data-container.provider.cjs +17 -0
- package/lib/panel-component/multi-data-container/multi-data-container.state.cjs +19 -0
- package/lib/panel-component/nav-pos/index.cjs +22 -0
- package/lib/panel-component/nav-pos/nav-pos.cjs +107 -0
- package/lib/panel-component/nav-pos/nav-pos.controller.cjs +312 -0
- package/lib/panel-component/nav-pos/nav-pos.css +1 -0
- package/lib/panel-component/nav-pos/nav-pos.provider.cjs +26 -0
- package/lib/panel-component/nav-pos/nav-pos.state.cjs +49 -0
- package/lib/panel-component/panel-container/index.cjs +29 -0
- package/lib/panel-component/panel-container/panel-container.cjs +72 -0
- package/lib/panel-component/panel-container/panel-container.controller.cjs +14 -0
- package/lib/panel-component/panel-container/panel-container.css +1 -0
- package/lib/panel-component/panel-container/panel-container.provider.cjs +17 -0
- package/lib/panel-component/panel-container/panel-container.state.cjs +9 -0
- package/lib/panel-component/panel-container-group/index.cjs +28 -0
- package/lib/panel-component/panel-container-group/panel-container-group.cjs +110 -0
- package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +37 -0
- package/lib/panel-component/panel-container-group/panel-container-group.css +1 -0
- package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +17 -0
- package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +9 -0
- package/lib/panel-component/panel-container-image/index.cjs +28 -0
- package/lib/panel-component/panel-container-image/panel-container-image.cjs +95 -0
- package/lib/panel-component/panel-container-image/panel-container-image.controller.cjs +14 -0
- package/lib/panel-component/panel-container-image/panel-container-image.css +1 -0
- package/lib/panel-component/panel-container-image/panel-container-image.provider.cjs +17 -0
- package/lib/panel-component/panel-container-image/panel-container-image.state.cjs +9 -0
- package/lib/panel-component/panel-ctrl-pos/index.cjs +20 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.cjs +47 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.cjs +25 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.css +1 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.cjs +17 -0
- package/lib/panel-component/panel-field/index.cjs +20 -0
- package/lib/panel-component/panel-field/panel-field.cjs +78 -0
- package/lib/panel-component/panel-field/panel-field.controller.cjs +132 -0
- package/lib/panel-component/panel-field/panel-field.css +1 -0
- package/lib/panel-component/panel-field/panel-field.provider.cjs +17 -0
- package/lib/panel-component/panel-field/panel-field.state.cjs +9 -0
- package/lib/panel-component/panel-item-render/index.cjs +24 -0
- package/lib/panel-component/panel-item-render/panel-item-render.cjs +49 -0
- package/lib/panel-component/panel-item-render/panel-item-render.controller.cjs +31 -0
- package/lib/panel-component/panel-item-render/panel-item-render.provider.cjs +17 -0
- package/lib/panel-component/panel-rawitem/index.cjs +32 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.cjs +61 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.controller.cjs +30 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.css +1 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.provider.cjs +17 -0
- package/lib/panel-component/panel-tab-page/index.cjs +18 -0
- package/lib/panel-component/panel-tab-page/panel-tab-page.cjs +65 -0
- package/lib/panel-component/panel-tab-page/panel-tab-page.provider.cjs +17 -0
- package/lib/panel-component/scroll-container/index.cjs +55 -0
- package/lib/panel-component/scroll-container/scroll-container/index.cjs +9 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.cjs +114 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.controller.cjs +14 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.css +1 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.provider.cjs +17 -0
- package/lib/panel-component/scroll-container/scroll-container-item/index.cjs +9 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.cjs +66 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.cjs +9 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.css +1 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.cjs +17 -0
- package/lib/panel-component/single-data-container/index.cjs +28 -0
- package/lib/panel-component/single-data-container/single-data-container.cjs +79 -0
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +287 -0
- package/lib/panel-component/single-data-container/single-data-container.css +1 -0
- package/lib/panel-component/single-data-container/single-data-container.provider.cjs +17 -0
- package/lib/panel-component/single-data-container/single-data-container.state.cjs +19 -0
- package/lib/plugin/index.cjs +7 -0
- package/{src/plugin/plugin-factory/plugin-factory.ts → lib/plugin/plugin-factory/plugin-factory.cjs} +137 -182
- package/lib/props/common.cjs +17 -0
- package/lib/props/editor/array.cjs +14 -0
- package/lib/props/editor/autocomplete.cjs +14 -0
- package/lib/props/editor/cascader.cjs +14 -0
- package/lib/props/editor/check-box-list.cjs +14 -0
- package/lib/props/editor/check-box.cjs +14 -0
- package/lib/props/editor/code.cjs +23 -0
- package/lib/props/editor/color-picker.cjs +14 -0
- package/lib/props/editor/common.cjs +62 -0
- package/lib/props/editor/data-picker.cjs +14 -0
- package/lib/props/editor/date-picker.cjs +14 -0
- package/lib/props/editor/date-range.cjs +14 -0
- package/lib/props/editor/dropdown-list.cjs +14 -0
- package/lib/props/editor/html.cjs +14 -0
- package/lib/props/editor/index.cjs +86 -0
- package/lib/props/editor/list-box.cjs +14 -0
- package/lib/props/editor/markdown.cjs +22 -0
- package/lib/props/editor/number-range.cjs +14 -0
- package/lib/props/editor/radio-button-list.cjs +14 -0
- package/lib/props/editor/rate.cjs +14 -0
- package/lib/props/editor/raw.cjs +14 -0
- package/lib/props/editor/slider.cjs +14 -0
- package/lib/props/editor/span.cjs +14 -0
- package/lib/props/editor/stepper.cjs +14 -0
- package/lib/props/editor/switch.cjs +14 -0
- package/lib/props/editor/text-box.cjs +30 -0
- package/lib/props/editor/upload.cjs +14 -0
- package/lib/props/index.cjs +89 -0
- package/lib/use/click-outside/click-outside.cjs +50 -0
- package/lib/use/control/index.cjs +7 -0
- package/lib/use/control/use-control-controller/use-control-controller.cjs +78 -0
- package/lib/use/event/event.cjs +39 -0
- package/lib/use/focus-blur/focus-blur.cjs +48 -0
- package/lib/use/index.cjs +34 -0
- package/lib/use/namespace/namespace.cjs +10 -0
- package/lib/use/route/route.cjs +31 -0
- package/lib/use/util/index.cjs +14 -0
- package/lib/use/view/index.cjs +7 -0
- package/lib/use/view/use-view-controller/use-view-controller.cjs +86 -0
- package/lib/use/vue/vue.cjs +64 -0
- package/lib/util/control/prepare-control.cjs +24 -0
- package/lib/util/index.cjs +43 -0
- package/lib/util/install.cjs +11 -0
- package/lib/util/overlay-container/overlay-container.cjs +116 -0
- package/lib/util/overlay-popover-container/overlay-popover-container.cjs +12 -0
- package/lib/util/overlay-view-util/overlay-view-util.cjs +70 -0
- package/lib/util/render/render.cjs +22 -0
- package/lib/util/route/route-listener.cjs +75 -0
- package/lib/util/route/route.cjs +302 -0
- package/lib/util/router-callback/router-callback-item.cjs +74 -0
- package/{src/util/router-callback/router-callback.ts → lib/util/router-callback/router-callback.cjs} +28 -40
- package/lib/util/store/app-store/app-store.cjs +12 -0
- package/lib/util/store/index.cjs +12 -0
- package/lib/util/store/ui-store/ui-store.cjs +17 -0
- package/lib/util/store/ui-store/z-index.cjs +20 -0
- package/lib/view/app-redirect-view/app-redirect-view.cjs +29 -0
- package/lib/view/common/index.cjs +15 -0
- package/lib/view/common/view.cjs +129 -0
- package/lib/view/common/view.css +1 -0
- package/lib/view/common/view.provider.cjs +10 -0
- package/lib/view/de-redirect-view/de-redirect-view.cjs +64 -0
- package/lib/view/de-redirect-view/de-redirect-view.provider.cjs +10 -0
- package/lib/view/de-redirect-view/index.cjs +22 -0
- package/lib/view/index.cjs +15 -0
- package/lib/view/portal-view/index.cjs +23 -0
- package/lib/view/portal-view/portal-view.cjs +95 -0
- package/lib/view/portal-view/portal-view.provider.cjs +10 -0
- package/lib/view/todo-redirect/todo-redirect.cjs +54 -0
- package/package.json +5 -5
- package/src/common/badge/badge.scss +0 -29
- package/src/common/badge/badge.tsx +0 -26
- package/src/common/code-list/code-list.scss +0 -15
- package/src/common/code-list/code-list.tsx +0 -127
- package/src/common/control-base/control-base.scss +0 -4
- package/src/common/control-base/control-base.tsx +0 -130
- package/src/common/control-loading-placeholder/control-loading-placeholder.tsx +0 -22
- package/src/common/control-shell/control-shell.scss +0 -5
- package/src/common/control-shell/control-shell.tsx +0 -70
- package/src/common/icon/icon.tsx +0 -82
- package/src/common/index.ts +0 -8
- package/src/common/router-view/router-view.tsx +0 -74
- package/src/common/view-shell/view-shell.scss +0 -5
- package/src/common/view-shell/view-shell.tsx +0 -163
- package/src/control/index.ts +0 -1
- package/src/control/panel/index.ts +0 -2
- package/src/control/panel/panel/index.ts +0 -12
- package/src/control/panel/panel/panel.provider.ts +0 -14
- package/src/control/panel/panel/panel.scss +0 -9
- package/src/control/panel/panel/panel.tsx +0 -166
- package/src/control/panel/view-layout-panel/index.ts +0 -18
- package/src/control/panel/view-layout-panel/view-layout-panel.provider.ts +0 -14
- package/src/control/panel/view-layout-panel/view-layout-panel.scss +0 -9
- package/src/control/panel/view-layout-panel/view-layout-panel.tsx +0 -178
- package/src/hooks/app/app.hooks.ts +0 -31
- package/src/hooks/index.ts +0 -1
- package/src/index.ts +0 -18
- package/src/interface/index.ts +0 -1
- package/src/interface/util/index.ts +0 -1
- package/src/interface/util/route/route.ts +0 -116
- package/src/panel-component/grid-container/grid-container.controller.ts +0 -18
- package/src/panel-component/grid-container/grid-container.provider.ts +0 -30
- package/src/panel-component/grid-container/grid-container.scss +0 -17
- package/src/panel-component/grid-container/grid-container.state.ts +0 -12
- package/src/panel-component/grid-container/grid-container.tsx +0 -119
- package/src/panel-component/grid-container/index.ts +0 -19
- package/src/panel-component/index.ts +0 -13
- package/src/panel-component/multi-data-container/index.ts +0 -22
- package/src/panel-component/multi-data-container/multi-data-container-item.controller.ts +0 -166
- package/src/panel-component/multi-data-container/multi-data-container-itm.state.ts +0 -20
- package/src/panel-component/multi-data-container/multi-data-container.controller.ts +0 -308
- package/src/panel-component/multi-data-container/multi-data-container.provider.ts +0 -30
- package/src/panel-component/multi-data-container/multi-data-container.scss +0 -10
- package/src/panel-component/multi-data-container/multi-data-container.state.ts +0 -20
- package/src/panel-component/multi-data-container/multi-data-container.tsx +0 -109
- package/src/panel-component/nav-pos/index.ts +0 -16
- package/src/panel-component/nav-pos/nav-pos.controller.ts +0 -401
- package/src/panel-component/nav-pos/nav-pos.provider.ts +0 -38
- package/src/panel-component/nav-pos/nav-pos.scss +0 -4
- package/src/panel-component/nav-pos/nav-pos.state.ts +0 -52
- package/src/panel-component/nav-pos/nav-pos.tsx +0 -121
- package/src/panel-component/panel-container/index.ts +0 -27
- package/src/panel-component/panel-container/panel-container.controller.ts +0 -18
- package/src/panel-component/panel-container/panel-container.provider.ts +0 -30
- package/src/panel-component/panel-container/panel-container.scss +0 -15
- package/src/panel-component/panel-container/panel-container.state.ts +0 -12
- package/src/panel-component/panel-container/panel-container.tsx +0 -72
- package/src/panel-component/panel-container-group/index.ts +0 -22
- package/src/panel-component/panel-container-group/panel-container-group.controller.ts +0 -43
- package/src/panel-component/panel-container-group/panel-container-group.provider.ts +0 -30
- package/src/panel-component/panel-container-group/panel-container-group.scss +0 -91
- package/src/panel-component/panel-container-group/panel-container-group.state.ts +0 -12
- package/src/panel-component/panel-container-group/panel-container-group.tsx +0 -112
- package/src/panel-component/panel-container-image/index.ts +0 -22
- package/src/panel-component/panel-container-image/panel-container-image.controller.ts +0 -18
- package/src/panel-component/panel-container-image/panel-container-image.provider.ts +0 -30
- package/src/panel-component/panel-container-image/panel-container-image.scss +0 -18
- package/src/panel-component/panel-container-image/panel-container-image.state.ts +0 -12
- package/src/panel-component/panel-container-image/panel-container-image.tsx +0 -95
- package/src/panel-component/panel-ctrl-pos/index.ts +0 -14
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.ts +0 -53
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.ts +0 -30
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.scss +0 -8
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.tsx +0 -53
- package/src/panel-component/panel-field/index.ts +0 -14
- package/src/panel-component/panel-field/panel-field.controller.ts +0 -174
- package/src/panel-component/panel-field/panel-field.provider.ts +0 -28
- package/src/panel-component/panel-field/panel-field.scss +0 -36
- package/src/panel-component/panel-field/panel-field.state.ts +0 -12
- package/src/panel-component/panel-field/panel-field.tsx +0 -81
- package/src/panel-component/panel-item-render/index.ts +0 -18
- package/src/panel-component/panel-item-render/panel-item-render.controller.ts +0 -52
- package/src/panel-component/panel-item-render/panel-item-render.provider.ts +0 -30
- package/src/panel-component/panel-item-render/panel-item-render.tsx +0 -50
- package/src/panel-component/panel-rawitem/index.ts +0 -26
- package/src/panel-component/panel-rawitem/panel-rawitem.controller.ts +0 -34
- package/src/panel-component/panel-rawitem/panel-rawitem.provider.ts +0 -28
- package/src/panel-component/panel-rawitem/panel-rawitem.scss +0 -8
- package/src/panel-component/panel-rawitem/panel-rawitem.tsx +0 -61
- package/src/panel-component/panel-tab-page/index.ts +0 -12
- package/src/panel-component/panel-tab-page/panel-tab-page.provider.ts +0 -27
- package/src/panel-component/panel-tab-page/panel-tab-page.tsx +0 -55
- package/src/panel-component/scroll-container/index.ts +0 -44
- package/src/panel-component/scroll-container/scroll-container/index.ts +0 -2
- package/src/panel-component/scroll-container/scroll-container/scroll-container.controller.ts +0 -32
- package/src/panel-component/scroll-container/scroll-container/scroll-container.provider.ts +0 -30
- package/src/panel-component/scroll-container/scroll-container/scroll-container.scss +0 -34
- package/src/panel-component/scroll-container/scroll-container/scroll-container.tsx +0 -110
- package/src/panel-component/scroll-container/scroll-container-item/index.ts +0 -2
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.ts +0 -25
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.ts +0 -30
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.scss +0 -9
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.tsx +0 -60
- package/src/panel-component/single-data-container/index.ts +0 -22
- package/src/panel-component/single-data-container/single-data-container.controller.ts +0 -345
- package/src/panel-component/single-data-container/single-data-container.provider.ts +0 -30
- package/src/panel-component/single-data-container/single-data-container.scss +0 -10
- package/src/panel-component/single-data-container/single-data-container.state.ts +0 -20
- package/src/panel-component/single-data-container/single-data-container.tsx +0 -95
- package/src/plugin/index.ts +0 -1
- package/src/props/common.ts +0 -30
- package/src/props/editor/array.ts +0 -27
- package/src/props/editor/autocomplete.ts +0 -27
- package/src/props/editor/cascader.ts +0 -27
- package/src/props/editor/check-box-list.ts +0 -27
- package/src/props/editor/check-box.ts +0 -27
- package/src/props/editor/code.ts +0 -36
- package/src/props/editor/color-picker.ts +0 -27
- package/src/props/editor/common.ts +0 -94
- package/src/props/editor/data-picker.ts +0 -27
- package/src/props/editor/date-picker.ts +0 -27
- package/src/props/editor/date-range.ts +0 -23
- package/src/props/editor/dropdown-list.ts +0 -27
- package/src/props/editor/html.ts +0 -27
- package/src/props/editor/index.ts +0 -25
- package/src/props/editor/list-box.ts +0 -27
- package/src/props/editor/markdown.ts +0 -35
- package/src/props/editor/number-range.ts +0 -23
- package/src/props/editor/radio-button-list.ts +0 -27
- package/src/props/editor/rate.ts +0 -23
- package/src/props/editor/raw.ts +0 -23
- package/src/props/editor/slider.ts +0 -23
- package/src/props/editor/span.ts +0 -27
- package/src/props/editor/stepper.ts +0 -23
- package/src/props/editor/switch.ts +0 -23
- package/src/props/editor/text-box.ts +0 -79
- package/src/props/editor/upload.ts +0 -27
- package/src/props/index.ts +0 -2
- package/src/types/index.d.ts +0 -8
- package/src/use/click-outside/click-outside.ts +0 -72
- package/src/use/control/index.ts +0 -1
- package/src/use/control/use-control-controller/use-control-controller.ts +0 -153
- package/src/use/event/event.ts +0 -57
- package/src/use/focus-blur/focus-blur.ts +0 -83
- package/src/use/index.ts +0 -9
- package/src/use/namespace/namespace.ts +0 -14
- package/src/use/route/route.ts +0 -47
- package/src/use/util/index.ts +0 -26
- package/src/use/view/index.ts +0 -1
- package/src/use/view/use-view-controller/use-view-controller.ts +0 -153
- package/src/use/vue/vue.ts +0 -142
- package/src/util/control/prepare-control.ts +0 -33
- package/src/util/index.ts +0 -10
- package/src/util/install.ts +0 -14
- package/src/util/overlay-container/overlay-container.ts +0 -155
- package/src/util/overlay-popover-container/overlay-popover-container.ts +0 -30
- package/src/util/overlay-view-util/overlay-view-util.ts +0 -89
- package/src/util/render/render.ts +0 -28
- package/src/util/route/route-listener.ts +0 -91
- package/src/util/route/route.ts +0 -520
- package/src/util/router-callback/router-callback-item.ts +0 -98
- package/src/util/store/app-store/app-store.ts +0 -10
- package/src/util/store/index.ts +0 -6
- package/src/util/store/ui-store/ui-store.ts +0 -27
- package/src/util/store/ui-store/z-index.ts +0 -53
- package/src/view/app-redirect-view/app-redirect-view.tsx +0 -26
- package/src/view/common/index.ts +0 -10
- package/src/view/common/view.provider.ts +0 -14
- package/src/view/common/view.scss +0 -38
- package/src/view/common/view.tsx +0 -152
- package/src/view/de-redirect-view/de-redirect-view.provider.ts +0 -14
- package/src/view/de-redirect-view/de-redirect-view.tsx +0 -62
- package/src/view/de-redirect-view/index.ts +0 -17
- package/src/view/index.ts +0 -5
- package/src/view/portal-view/index.ts +0 -18
- package/src/view/portal-view/portal-view.provider.ts +0 -14
- package/src/view/portal-view/portal-view.tsx +0 -79
- package/src/view/todo-redirect/todo-redirect.tsx +0 -51
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { IFlexLayoutPos, IPanelContainer } from '@ibiz/model-core';
|
|
2
|
-
import { computed, defineComponent, PropType, ref, Ref, VNode } from 'vue';
|
|
3
|
-
import { useNamespace } from '../../use';
|
|
4
|
-
import { GridContainerController } from './grid-container.controller';
|
|
5
|
-
import './grid-container.scss';
|
|
6
|
-
|
|
7
|
-
export const GridContainer = defineComponent({
|
|
8
|
-
name: 'IBizGridContainer',
|
|
9
|
-
props: {
|
|
10
|
-
modelData: {
|
|
11
|
-
type: Object as PropType<IPanelContainer>,
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
controller: {
|
|
15
|
-
type: GridContainerController,
|
|
16
|
-
required: true,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
setup(props) {
|
|
20
|
-
const ns = useNamespace('grid-container');
|
|
21
|
-
const { id } = props.modelData;
|
|
22
|
-
|
|
23
|
-
// 类名控制
|
|
24
|
-
const classArr = computed(() => {
|
|
25
|
-
let result: Array<string | false> = [ns.b(), ns.m(id)];
|
|
26
|
-
result = [
|
|
27
|
-
...result,
|
|
28
|
-
...props.controller.containerClass,
|
|
29
|
-
ns.is('hidden', !props.controller.state.visible),
|
|
30
|
-
];
|
|
31
|
-
return result;
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const layoutModel = computed(() => {
|
|
35
|
-
return { ...props.modelData.layout, layout: 'TABLE_12COL' };
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
const convertLayoutPos = (
|
|
39
|
-
layoutPos: IFlexLayoutPos,
|
|
40
|
-
adaptGrow: number,
|
|
41
|
-
): IFlexLayoutPos => {
|
|
42
|
-
const result = {
|
|
43
|
-
...layoutPos,
|
|
44
|
-
layout: 'TABLE_12COL',
|
|
45
|
-
colXS: layoutPos.grow || adaptGrow,
|
|
46
|
-
colSM: layoutPos.grow || adaptGrow,
|
|
47
|
-
colMD: layoutPos.grow || adaptGrow,
|
|
48
|
-
colLG: layoutPos.grow || adaptGrow,
|
|
49
|
-
};
|
|
50
|
-
delete result.grow;
|
|
51
|
-
return result;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// 自适应列个数, 算一次记录下来,后续不用计算
|
|
55
|
-
const adaptCols: Ref<undefined | number> = ref(undefined);
|
|
56
|
-
// 自适应列默认占据的grow
|
|
57
|
-
const adaptGrow: Ref<number> = ref(12);
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
ns,
|
|
61
|
-
classArr,
|
|
62
|
-
layoutModel,
|
|
63
|
-
convertLayoutPos,
|
|
64
|
-
adaptGrow,
|
|
65
|
-
adaptCols,
|
|
66
|
-
};
|
|
67
|
-
},
|
|
68
|
-
render() {
|
|
69
|
-
// 内容区默认插槽处理,封装app-col
|
|
70
|
-
const defaultSlots: VNode[] = this.$slots.default?.() || [];
|
|
71
|
-
|
|
72
|
-
if (this.adaptCols === undefined) {
|
|
73
|
-
// 当前已经配置的grow
|
|
74
|
-
let currentGrow = 0;
|
|
75
|
-
// 自适应列个数
|
|
76
|
-
let adaptCols = 0;
|
|
77
|
-
defaultSlots.forEach(slot => {
|
|
78
|
-
const props = slot.props as IData;
|
|
79
|
-
if (props && props.modelData && props.modelData.layoutPos) {
|
|
80
|
-
if (typeof props.modelData.layoutPos.grow === 'number') {
|
|
81
|
-
currentGrow += props.modelData.layoutPos.grow;
|
|
82
|
-
} else if (typeof props.modelData.layoutPos.grow === 'undefined') {
|
|
83
|
-
adaptCols += 1;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
// 自适应列默认占据的grow
|
|
88
|
-
let adaptGrow = 12;
|
|
89
|
-
if (adaptCols > 0) {
|
|
90
|
-
adaptGrow = (12 - currentGrow) / adaptCols;
|
|
91
|
-
}
|
|
92
|
-
this.adaptCols = adaptCols;
|
|
93
|
-
this.adaptGrow = adaptGrow;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return (
|
|
97
|
-
<iBizRow class={this.classArr} layout={this.layoutModel}>
|
|
98
|
-
{defaultSlots.map(slot => {
|
|
99
|
-
const props = slot.props as IData;
|
|
100
|
-
if (!props || !props.controller) {
|
|
101
|
-
return slot;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return (
|
|
105
|
-
<iBizCol
|
|
106
|
-
layoutPos={this.convertLayoutPos(
|
|
107
|
-
props.modelData.layoutPos,
|
|
108
|
-
this.adaptGrow,
|
|
109
|
-
)}
|
|
110
|
-
state={props.controller.state}
|
|
111
|
-
>
|
|
112
|
-
{slot}
|
|
113
|
-
</iBizCol>
|
|
114
|
-
);
|
|
115
|
-
})}
|
|
116
|
-
</iBizRow>
|
|
117
|
-
);
|
|
118
|
-
},
|
|
119
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
3
|
-
import { withInstall } from '../../util';
|
|
4
|
-
import { GridContainer } from './grid-container';
|
|
5
|
-
import { GridContainerProvider } from './grid-container.provider';
|
|
6
|
-
import { GridContainerState } from './grid-container.state';
|
|
7
|
-
import { GridContainerController } from './grid-container.controller';
|
|
8
|
-
|
|
9
|
-
export { GridContainerState, GridContainerController };
|
|
10
|
-
|
|
11
|
-
export const IBizGridContainer = withInstall(GridContainer, function (v: App) {
|
|
12
|
-
v.component(GridContainer.name, GridContainer);
|
|
13
|
-
registerPanelItemProvider(
|
|
14
|
-
'CONTAINER_CONTAINER_GRID',
|
|
15
|
-
() => new GridContainerProvider(),
|
|
16
|
-
);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export default IBizGridContainer;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './panel-container';
|
|
2
|
-
export * from './panel-ctrl-pos';
|
|
3
|
-
export * from './scroll-container';
|
|
4
|
-
export * from './nav-pos';
|
|
5
|
-
export * from './panel-field';
|
|
6
|
-
export * from './panel-rawitem';
|
|
7
|
-
export * from './multi-data-container';
|
|
8
|
-
export * from './single-data-container';
|
|
9
|
-
export * from './grid-container';
|
|
10
|
-
export * from './panel-container-image';
|
|
11
|
-
export * from './panel-container-group';
|
|
12
|
-
export * from './panel-tab-page';
|
|
13
|
-
export * from './panel-item-render';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
3
|
-
import { withInstall } from '../../util';
|
|
4
|
-
import { MultiDataContainer } from './multi-data-container';
|
|
5
|
-
import { MultiDataContainerProvider } from './multi-data-container.provider';
|
|
6
|
-
import { MultiDataContainerState } from './multi-data-container.state';
|
|
7
|
-
import { MultiDataContainerController } from './multi-data-container.controller';
|
|
8
|
-
|
|
9
|
-
export { MultiDataContainerState, MultiDataContainerController };
|
|
10
|
-
|
|
11
|
-
export const IBizMultiDataContainer = withInstall(
|
|
12
|
-
MultiDataContainer,
|
|
13
|
-
function (v: App) {
|
|
14
|
-
v.component(MultiDataContainer.name, MultiDataContainer);
|
|
15
|
-
registerPanelItemProvider(
|
|
16
|
-
'CONTAINER_CONTAINER_MULTIDATA',
|
|
17
|
-
() => new MultiDataContainerProvider(),
|
|
18
|
-
);
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export default IBizMultiDataContainer;
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getAllPanelField,
|
|
3
|
-
IPanelController,
|
|
4
|
-
IPanelDataContainerController,
|
|
5
|
-
IPanelItemContainerController,
|
|
6
|
-
IPanelItemController,
|
|
7
|
-
isDataContainer,
|
|
8
|
-
PanelData,
|
|
9
|
-
PanelNotifyState,
|
|
10
|
-
} from '@ibiz-template/runtime';
|
|
11
|
-
import { IPanelContainer, IPanelItem, IPanelTabPanel } from '@ibiz/model-core';
|
|
12
|
-
import { MultiDataContainerItemState } from './multi-data-container-itm.state';
|
|
13
|
-
import { MultiDataContainerController } from './multi-data-container.controller';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 多项数据容器每一个数据项的控制器
|
|
17
|
-
* @author lxm
|
|
18
|
-
* @date 2023-09-05 05:04:01
|
|
19
|
-
* @export
|
|
20
|
-
* @class MultiDataContainerItemController
|
|
21
|
-
* @extends {PanelItemController<IPanelContainer>}
|
|
22
|
-
* @implements {IPanelDataContainerController}
|
|
23
|
-
*/
|
|
24
|
-
export class MultiDataContainerItemController
|
|
25
|
-
implements IPanelDataContainerController
|
|
26
|
-
{
|
|
27
|
-
state = new MultiDataContainerItemState();
|
|
28
|
-
|
|
29
|
-
readonly isDataContainer = true;
|
|
30
|
-
|
|
31
|
-
get data(): IData {
|
|
32
|
-
return this.state.data;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 所有面板成员的控制器
|
|
37
|
-
*
|
|
38
|
-
* @author lxm
|
|
39
|
-
* @date 2022-08-24 20:08:07
|
|
40
|
-
* @type {{ [key: string]: IPanelItemController }}
|
|
41
|
-
*/
|
|
42
|
-
panelItems: { [key: string]: IPanelItemController } = {};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Creates an instance of PanelItemController.
|
|
46
|
-
* @author lxm
|
|
47
|
-
* @date 2023-04-27 06:37:12
|
|
48
|
-
* @param {T} model 面板成员模型
|
|
49
|
-
* @param {PanelController} panel 面板控制器
|
|
50
|
-
* @param {PanelItemController} [parent] 父容器控制器
|
|
51
|
-
*/
|
|
52
|
-
constructor(
|
|
53
|
-
public readonly model: IPanelContainer,
|
|
54
|
-
public readonly panel: IPanelController,
|
|
55
|
-
public readonly parent: MultiDataContainerController,
|
|
56
|
-
data: PanelData,
|
|
57
|
-
) {
|
|
58
|
-
this.state.data = data;
|
|
59
|
-
|
|
60
|
-
const fields = getAllPanelField(this.model);
|
|
61
|
-
const fieldKeys = fields.map(item => item.id!);
|
|
62
|
-
|
|
63
|
-
// 面板属性变更的触发变更通知
|
|
64
|
-
data._evt.on('change', key => {
|
|
65
|
-
if (fieldKeys.includes(key)) {
|
|
66
|
-
this.childDataChangeNotify([key]);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* 初始化方法
|
|
73
|
-
* @author lxm
|
|
74
|
-
* @date 2023-09-05 05:48:53
|
|
75
|
-
* @return {*} {Promise<void>}
|
|
76
|
-
*/
|
|
77
|
-
async init(): Promise<void> {
|
|
78
|
-
await this.initChildrenController();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* 初始化面板成员控制器
|
|
83
|
-
*
|
|
84
|
-
* @author lxm
|
|
85
|
-
* @date 2022-08-24 21:08:48
|
|
86
|
-
* @protected
|
|
87
|
-
*/
|
|
88
|
-
protected async initChildrenController(
|
|
89
|
-
panelItems: IPanelItem[] | undefined = this.model.panelItems,
|
|
90
|
-
panel: IPanelController = this.panel,
|
|
91
|
-
parent: IPanelItemContainerController | undefined = this,
|
|
92
|
-
): Promise<void> {
|
|
93
|
-
if (!panelItems) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
await Promise.all(
|
|
97
|
-
panelItems.map(async panelItem => {
|
|
98
|
-
// 生成面板成员控制器
|
|
99
|
-
const panelItemProvider = this.parent.providers[panelItem.id!];
|
|
100
|
-
if (!panelItemProvider) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
const panelItemController = await panelItemProvider.createController(
|
|
104
|
-
panelItem,
|
|
105
|
-
panel,
|
|
106
|
-
parent,
|
|
107
|
-
);
|
|
108
|
-
this.panelItems[panelItem.id!] = panelItemController;
|
|
109
|
-
// 有子成员的,且不是数据容器的。生成子控制器
|
|
110
|
-
if (
|
|
111
|
-
(panelItem as IPanelContainer).panelItems?.length &&
|
|
112
|
-
!isDataContainer(panelItem)
|
|
113
|
-
) {
|
|
114
|
-
await this.initChildrenController(
|
|
115
|
-
(panelItem as IPanelContainer).panelItems,
|
|
116
|
-
panel,
|
|
117
|
-
panelItemController as IPanelItemContainerController,
|
|
118
|
-
);
|
|
119
|
-
} else if ((panelItem as IPanelTabPanel).panelTabPages?.length) {
|
|
120
|
-
await this.initChildrenController(
|
|
121
|
-
(panelItem as IPanelTabPanel).panelTabPages,
|
|
122
|
-
panel,
|
|
123
|
-
panelItemController as IPanelItemContainerController,
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
}),
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
async dataChangeNotify(_names: string[]): Promise<void> {
|
|
131
|
-
// 不需要实现
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
async childDataChangeNotify(names: string[]): Promise<void> {
|
|
135
|
-
Object.values(this.panelItems).forEach(panelItem => {
|
|
136
|
-
panelItem.dataChangeNotify(names);
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
async panelStateNotify(state: PanelNotifyState): Promise<void> {
|
|
141
|
-
Object.values(this.panelItems).forEach(panelItem => {
|
|
142
|
-
panelItem.panelStateNotify(state);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
async setDataValue(name: string, value: unknown): Promise<void> {
|
|
147
|
-
if (
|
|
148
|
-
Object.prototype.hasOwnProperty.call(this.state.data, name) &&
|
|
149
|
-
this.state.data[name] === value
|
|
150
|
-
) {
|
|
151
|
-
// *`面板里没有属性${name}或者${name}的值未发生改变`
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// 改变值
|
|
156
|
-
this.state.data[name] = value;
|
|
157
|
-
this.childDataChangeNotify([name]);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
destroy(): void {
|
|
161
|
-
this.data.destroy?.();
|
|
162
|
-
Object.values(this.panelItems).forEach(item => {
|
|
163
|
-
item.destroy();
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 多项数据容器项状态
|
|
5
|
-
*
|
|
6
|
-
* @author lxm
|
|
7
|
-
* @date 2023-02-07 06:04:27
|
|
8
|
-
* @export
|
|
9
|
-
* @class MultiDataContainerItemState
|
|
10
|
-
* @extends {PanelItemState}
|
|
11
|
-
*/
|
|
12
|
-
export class MultiDataContainerItemState extends PanelItemState {
|
|
13
|
-
/**
|
|
14
|
-
* 多项数据容器数据
|
|
15
|
-
* @author lxm
|
|
16
|
-
* @date 2023-07-14 12:07:45
|
|
17
|
-
* @type {(IData | IData[])}
|
|
18
|
-
*/
|
|
19
|
-
data: IData = {};
|
|
20
|
-
}
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ModelError,
|
|
3
|
-
RuntimeError,
|
|
4
|
-
RuntimeModelError,
|
|
5
|
-
} from '@ibiz-template/core';
|
|
6
|
-
import {
|
|
7
|
-
execDELogicById,
|
|
8
|
-
getAllPanelField,
|
|
9
|
-
getPanelItemProvider,
|
|
10
|
-
IPanelDataContainerController,
|
|
11
|
-
IPanelItemProvider,
|
|
12
|
-
isDataContainer,
|
|
13
|
-
IViewController,
|
|
14
|
-
PanelData,
|
|
15
|
-
PanelItemController,
|
|
16
|
-
PanelNotifyState,
|
|
17
|
-
} from '@ibiz-template/runtime';
|
|
18
|
-
import { IPanelContainer, IPanelItem, IPanelTabPanel } from '@ibiz/model-core';
|
|
19
|
-
import { MultiDataContainerItemController } from './multi-data-container-item.controller';
|
|
20
|
-
import { MultiDataContainerState } from './multi-data-container.state';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 多项数据容器控制器
|
|
24
|
-
*
|
|
25
|
-
* @export
|
|
26
|
-
* @class MultiDataContainerController
|
|
27
|
-
* @extends {PanelItemController}
|
|
28
|
-
*/
|
|
29
|
-
export class MultiDataContainerController
|
|
30
|
-
extends PanelItemController<IPanelContainer>
|
|
31
|
-
implements IPanelDataContainerController
|
|
32
|
-
{
|
|
33
|
-
declare state: MultiDataContainerState;
|
|
34
|
-
|
|
35
|
-
readonly isDataContainer = true;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* 数据项的控制器
|
|
39
|
-
*
|
|
40
|
-
* @author lxm
|
|
41
|
-
* @date 2023-09-05 05:35:25
|
|
42
|
-
* @type {MultiDataContainerItemController[]}
|
|
43
|
-
*/
|
|
44
|
-
dataItems: MultiDataContainerItemController[] = [];
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* 所有面板成员的适配器
|
|
48
|
-
*
|
|
49
|
-
* @author lxm
|
|
50
|
-
* @date 2022-08-24 20:08:07
|
|
51
|
-
* @type {{ [key: string]: IPanelItemProvider }}
|
|
52
|
-
*/
|
|
53
|
-
providers: { [key: string]: IPanelItemProvider } = {};
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 多项数据容器,根据数据模式
|
|
57
|
-
* @author lxm
|
|
58
|
-
* @date 2023-07-14 10:59:02
|
|
59
|
-
* @readonly
|
|
60
|
-
* @type {IData}
|
|
61
|
-
*/
|
|
62
|
-
get data(): IData {
|
|
63
|
-
return this.state.items;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
protected createState(): MultiDataContainerState {
|
|
67
|
-
return new MultiDataContainerState(this.parent?.state);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
protected async onInit(): Promise<void> {
|
|
71
|
-
await super.onInit();
|
|
72
|
-
await this.initPanelItemProviders();
|
|
73
|
-
this.initContainerData();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* 初始化面板成员控制器
|
|
78
|
-
*
|
|
79
|
-
* @author lxm
|
|
80
|
-
* @date 2022-08-24 21:08:48
|
|
81
|
-
* @protected
|
|
82
|
-
*/
|
|
83
|
-
protected async initPanelItemProviders(
|
|
84
|
-
panelItems: IPanelItem[] | undefined = this.model.panelItems,
|
|
85
|
-
): Promise<void> {
|
|
86
|
-
if (!panelItems) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
await Promise.all(
|
|
90
|
-
panelItems.map(async panelItem => {
|
|
91
|
-
// 生成面板成员控制器
|
|
92
|
-
const panelItemProvider = await getPanelItemProvider(panelItem);
|
|
93
|
-
if (!panelItemProvider) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
this.providers[panelItem.id!] = panelItemProvider;
|
|
97
|
-
// 有子成员的,且不是数据容器的。生成子控制器
|
|
98
|
-
if (
|
|
99
|
-
(panelItem as IPanelContainer).panelItems?.length &&
|
|
100
|
-
!isDataContainer(panelItem)
|
|
101
|
-
) {
|
|
102
|
-
await this.initPanelItemProviders(
|
|
103
|
-
(panelItem as IPanelContainer).panelItems,
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
if ((panelItem as IPanelTabPanel).panelTabPages?.length) {
|
|
107
|
-
await this.initPanelItemProviders(
|
|
108
|
-
(panelItem as IPanelTabPanel).panelTabPages,
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
}),
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* 根据来源类型初始化容器数据
|
|
117
|
-
* @author lxm
|
|
118
|
-
* @date 2023-08-04 03:05:59
|
|
119
|
-
* @protected
|
|
120
|
-
*/
|
|
121
|
-
protected initContainerData(): void {
|
|
122
|
-
const { dataSourceType, dataName } = this.model;
|
|
123
|
-
switch (dataSourceType) {
|
|
124
|
-
case 'DEACTION':
|
|
125
|
-
case 'DEDATASET':
|
|
126
|
-
this.setDataByDeMethod();
|
|
127
|
-
break;
|
|
128
|
-
case 'APPGLOBALPARAM':
|
|
129
|
-
this.setDataByAppGlobalParam();
|
|
130
|
-
break;
|
|
131
|
-
case 'DELOGIC':
|
|
132
|
-
this.setDataByDeLogic();
|
|
133
|
-
break;
|
|
134
|
-
case 'TOPVIEWSESSIONPARAM': {
|
|
135
|
-
if (!dataName) {
|
|
136
|
-
throw new RuntimeModelError(this.model, '没有配置数据对象名称');
|
|
137
|
-
}
|
|
138
|
-
this.bindViewData(this.panel.getTopView(), dataName);
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
case 'VIEWSESSIONPARAM': {
|
|
142
|
-
if (!dataName) {
|
|
143
|
-
throw new RuntimeModelError(this.model, '没有配置数据对象名称');
|
|
144
|
-
}
|
|
145
|
-
this.bindViewData(this.panel.view, dataName);
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
default:
|
|
149
|
-
throw new ModelError(this.model, `数据源类型${dataSourceType}暂未支持`);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* 面板状态变更通知
|
|
155
|
-
*
|
|
156
|
-
* @author lxm
|
|
157
|
-
* @date 2022-09-20 18:09:07
|
|
158
|
-
*/
|
|
159
|
-
childrenStateNotify(state: PanelNotifyState): void {
|
|
160
|
-
this.dataItems.forEach(dataItem => {
|
|
161
|
-
dataItem.panelStateNotify(state);
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* 设置数据集合
|
|
167
|
-
* @author lxm
|
|
168
|
-
* @date 2023-09-05 05:42:09
|
|
169
|
-
* @param {IData[]} items
|
|
170
|
-
*/
|
|
171
|
-
async setData(items: IData[]): Promise<void> {
|
|
172
|
-
const fields = getAllPanelField(this.model);
|
|
173
|
-
const _items = items.map(item => new PanelData(fields, item));
|
|
174
|
-
|
|
175
|
-
this.dataItems = _items.map(item => {
|
|
176
|
-
return new MultiDataContainerItemController(
|
|
177
|
-
this.model,
|
|
178
|
-
this.panel,
|
|
179
|
-
this,
|
|
180
|
-
item,
|
|
181
|
-
);
|
|
182
|
-
});
|
|
183
|
-
if (this.dataItems.length) {
|
|
184
|
-
await Promise.all(
|
|
185
|
-
this.dataItems.map(controller => {
|
|
186
|
-
return controller.init();
|
|
187
|
-
}),
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
this.state.items = _items;
|
|
191
|
-
this.childrenStateNotify(PanelNotifyState.LOAD);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* 通过实体设置视图逻辑
|
|
196
|
-
* @author lxm
|
|
197
|
-
* @date 2023-08-04 03:00:31
|
|
198
|
-
* @protected
|
|
199
|
-
* @return {*} {Promise<void>}
|
|
200
|
-
*/
|
|
201
|
-
protected async setDataByDeLogic(): Promise<void> {
|
|
202
|
-
const { appDataEntityId, appDELogicId } = this.model;
|
|
203
|
-
if (!appDELogicId) {
|
|
204
|
-
throw new RuntimeModelError(this.model, '没有配置实体逻辑');
|
|
205
|
-
}
|
|
206
|
-
if (!appDataEntityId) {
|
|
207
|
-
throw new RuntimeModelError(this.model, '没有配置实体');
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
const data = await execDELogicById(
|
|
211
|
-
appDELogicId,
|
|
212
|
-
appDataEntityId,
|
|
213
|
-
this.panel.context,
|
|
214
|
-
[],
|
|
215
|
-
this.panel.params,
|
|
216
|
-
);
|
|
217
|
-
|
|
218
|
-
if (!data) {
|
|
219
|
-
throw new RuntimeError(`实体逻辑${appDELogicId}没有返回值`);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
this.setData(data as IData[]);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* 设置全局变量为当前容器数据
|
|
227
|
-
* @author lxm
|
|
228
|
-
* @date 2023-08-04 01:55:07
|
|
229
|
-
* @protected
|
|
230
|
-
*/
|
|
231
|
-
protected setDataByAppGlobalParam(): void {
|
|
232
|
-
const { dataName } = this.model;
|
|
233
|
-
const originData = dataName ? ibiz.appData![dataName] : ibiz.appData!;
|
|
234
|
-
if (originData) {
|
|
235
|
-
this.setData(originData as IData[]);
|
|
236
|
-
} else {
|
|
237
|
-
ibiz.log.error(`全局变量里没有${dataName}属性`);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* 请求实体行为并把返回值设置为当前容器的数据
|
|
243
|
-
* @author lxm
|
|
244
|
-
* @date 2023-08-04 11:47:17
|
|
245
|
-
* @protected
|
|
246
|
-
* @return {*} {Promise<void>}
|
|
247
|
-
*/
|
|
248
|
-
protected async setDataByDeMethod(): Promise<void> {
|
|
249
|
-
const { appDEMethodId, appDataEntityId } = this.model;
|
|
250
|
-
if (!appDEMethodId) {
|
|
251
|
-
throw new RuntimeModelError(this.model, '没有配置实体行为');
|
|
252
|
-
}
|
|
253
|
-
if (!appDataEntityId) {
|
|
254
|
-
throw new RuntimeModelError(this.model, '没有配置实体');
|
|
255
|
-
}
|
|
256
|
-
const app = ibiz.hub.getApp(this.panel.context.srfappid);
|
|
257
|
-
const res = await app.deService.exec(
|
|
258
|
-
appDataEntityId,
|
|
259
|
-
appDEMethodId,
|
|
260
|
-
this.panel.context,
|
|
261
|
-
[],
|
|
262
|
-
this.panel.params,
|
|
263
|
-
);
|
|
264
|
-
if (res.ok && res.data) {
|
|
265
|
-
this.setData(res.data as IData[]);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* 绑定指定视图会话的变量
|
|
271
|
-
* @author lxm
|
|
272
|
-
* @date 2023-07-14 02:03:56
|
|
273
|
-
* @protected
|
|
274
|
-
* @param {IViewController} view 绑定视图控制器
|
|
275
|
-
* @param {string} dataName 变量名称
|
|
276
|
-
*/
|
|
277
|
-
protected bindViewData(view: IViewController, dataName: string): void {
|
|
278
|
-
if (!Object.prototype.hasOwnProperty.call(view.state, dataName)) {
|
|
279
|
-
ibiz.log.error(`绑定视图的会话不存在${dataName}`);
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
const updateData = (): void => {
|
|
283
|
-
const originData = (view.state as IData)[dataName] as IData[];
|
|
284
|
-
if (originData) {
|
|
285
|
-
this.setData(originData);
|
|
286
|
-
} else {
|
|
287
|
-
ibiz.log.error(`视图state里没有${dataName}属性`);
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
updateData(); // 先绑定一次
|
|
291
|
-
|
|
292
|
-
// 每次视图数据变更之后更新一下
|
|
293
|
-
view.evt.on('onDataChange', () => {
|
|
294
|
-
updateData();
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
setDataValue(_name: string, _value: unknown): Promise<void> {
|
|
299
|
-
throw new Error('Method not implemented.');
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
destroy(): void {
|
|
303
|
-
super.destroy();
|
|
304
|
-
this.dataItems.forEach(item => {
|
|
305
|
-
item.destroy();
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IPanelItemProvider,
|
|
3
|
-
PanelController,
|
|
4
|
-
PanelItemController,
|
|
5
|
-
} from '@ibiz-template/runtime';
|
|
6
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
7
|
-
import { MultiDataContainerController } from './multi-data-container.controller';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 多项数据容器适配器
|
|
11
|
-
*
|
|
12
|
-
* @author lxm
|
|
13
|
-
* @date 2022-09-19 22:09:03
|
|
14
|
-
* @export
|
|
15
|
-
* @class MultiDataContainerProvider
|
|
16
|
-
* @implements {EditorProvider}
|
|
17
|
-
*/
|
|
18
|
-
export class MultiDataContainerProvider implements IPanelItemProvider {
|
|
19
|
-
component: string = 'IBizMultiDataContainer';
|
|
20
|
-
|
|
21
|
-
async createController(
|
|
22
|
-
panelItem: IPanelContainer,
|
|
23
|
-
panel: PanelController,
|
|
24
|
-
parent: PanelItemController | undefined,
|
|
25
|
-
): Promise<PanelItemController> {
|
|
26
|
-
const c = new MultiDataContainerController(panelItem, panel, parent);
|
|
27
|
-
await c.init();
|
|
28
|
-
return c;
|
|
29
|
-
}
|
|
30
|
-
}
|