@ibiz-template/vue3-util 0.6.1-dev.0 → 0.6.1-dev.2
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 +11 -7
- 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
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
require('../../../use/index.cjs');
|
|
5
|
+
var scrollContainer_controller = require('./scroll-container.controller.cjs');
|
|
6
|
+
require('./scroll-container.css');
|
|
7
|
+
var namespace = require('../../../use/namespace/namespace.cjs');
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
const ScrollContainer = /* @__PURE__ */ vue.defineComponent({
|
|
11
|
+
name: "IBizScrollContainer",
|
|
12
|
+
props: {
|
|
13
|
+
modelData: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
controller: {
|
|
18
|
+
type: scrollContainer_controller.ScrollContainerController,
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(props) {
|
|
23
|
+
const ns = namespace.useNamespace("scroll-container");
|
|
24
|
+
const {
|
|
25
|
+
id
|
|
26
|
+
} = props.modelData;
|
|
27
|
+
const classArr = vue.computed(() => {
|
|
28
|
+
const result = [ns.b(), ns.m(id), ...props.controller.containerClass, ns.is("hidden", !props.controller.state.visible)];
|
|
29
|
+
return result;
|
|
30
|
+
});
|
|
31
|
+
return {
|
|
32
|
+
ns,
|
|
33
|
+
classArr
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
render() {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
let left = null;
|
|
39
|
+
let top = null;
|
|
40
|
+
let right = null;
|
|
41
|
+
let bottom = null;
|
|
42
|
+
let center = null;
|
|
43
|
+
const slotStylle = {};
|
|
44
|
+
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
45
|
+
defaultSlots.forEach((slot) => {
|
|
46
|
+
const props = slot.props;
|
|
47
|
+
if (!props || !props.controller) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const {
|
|
51
|
+
width,
|
|
52
|
+
height
|
|
53
|
+
} = props.controller.state.layout;
|
|
54
|
+
switch (props.modelData.layoutPos.layoutPos) {
|
|
55
|
+
case "WEST":
|
|
56
|
+
left = slot;
|
|
57
|
+
slotStylle.left = {
|
|
58
|
+
width
|
|
59
|
+
};
|
|
60
|
+
break;
|
|
61
|
+
case "EAST":
|
|
62
|
+
right = slot;
|
|
63
|
+
slotStylle.right = {
|
|
64
|
+
width
|
|
65
|
+
};
|
|
66
|
+
break;
|
|
67
|
+
case "NORTH":
|
|
68
|
+
top = slot;
|
|
69
|
+
slotStylle.top = {
|
|
70
|
+
height
|
|
71
|
+
};
|
|
72
|
+
break;
|
|
73
|
+
case "SOUTH":
|
|
74
|
+
bottom = slot;
|
|
75
|
+
slotStylle.bottom = {
|
|
76
|
+
height
|
|
77
|
+
};
|
|
78
|
+
break;
|
|
79
|
+
case "CENTER":
|
|
80
|
+
center = slot;
|
|
81
|
+
break;
|
|
82
|
+
default:
|
|
83
|
+
ibiz.log.debug("\u672A\u9002\u914D\u7684\u5E03\u5C40\u5360\u4F4D".concat(props.modelData.layoutPos.layoutPos));
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
for (const key in slotStylle) {
|
|
88
|
+
if (slotStylle[key].width || slotStylle[key].height) {
|
|
89
|
+
slotStylle[key].flexShrink = 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return vue.createVNode("div", {
|
|
93
|
+
"class": this.classArr
|
|
94
|
+
}, [vue.createVNode("div", {
|
|
95
|
+
"class": [this.ns.e("header")],
|
|
96
|
+
"style": slotStylle.top
|
|
97
|
+
}, [top]), vue.createVNode("div", {
|
|
98
|
+
"class": [this.ns.b("content")]
|
|
99
|
+
}, [vue.createVNode("div", {
|
|
100
|
+
"class": this.ns.be("content", "left"),
|
|
101
|
+
"style": slotStylle.left
|
|
102
|
+
}, [left]), vue.createVNode("div", {
|
|
103
|
+
"class": this.ns.be("content", "center")
|
|
104
|
+
}, [center]), vue.createVNode("div", {
|
|
105
|
+
"class": this.ns.be("content", "right"),
|
|
106
|
+
"style": slotStylle.right
|
|
107
|
+
}, [right])]), vue.createVNode("div", {
|
|
108
|
+
"class": [this.ns.e("footer")],
|
|
109
|
+
"style": slotStylle.bottom
|
|
110
|
+
}, [bottom])]);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
exports.ScrollContainer = ScrollContainer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var runtime = require('@ibiz-template/runtime');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
class ScrollContainerController extends runtime.PanelItemController {
|
|
7
|
+
async onInit() {
|
|
8
|
+
await super.onInit();
|
|
9
|
+
this.state.layout.width = "100%";
|
|
10
|
+
this.state.layout.height = "100%";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.ScrollContainerController = ScrollContainerController;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-scroll-container{width:100%;height:100%;display:flex;flex-flow:column nowrap}.ibiz-scroll-container.is-hidden{display:none}.ibiz-scroll-container-content{flex-grow:1;overflow:auto;display:flex}.ibiz-scroll-container-content__center{flex-grow:1;overflow:auto}.ibiz-scroll-container-content__left{overflow:auto}.ibiz-scroll-container-content__right{overflow:auto}.ibiz-scroll-container-header{overflow:auto}.ibiz-scroll-container-footer{overflow:auto}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scrollContainer_controller = require('./scroll-container.controller.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
class ScrollContainerProvider {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.component = "IBizScrollContainer";
|
|
9
|
+
}
|
|
10
|
+
async createController(panelItem, panel, parent) {
|
|
11
|
+
const c = new scrollContainer_controller.ScrollContainerController(panelItem, panel, parent);
|
|
12
|
+
await c.init();
|
|
13
|
+
return c;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.ScrollContainerProvider = ScrollContainerProvider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scrollContainerItem_controller = require('./scroll-container-item.controller.cjs');
|
|
4
|
+
var scrollContainerItem = require('./scroll-container-item.cjs');
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
exports.ScrollContainerItemController = scrollContainerItem_controller.ScrollContainerItemController;
|
|
9
|
+
exports.ScrollContainerItem = scrollContainerItem.ScrollContainerItem;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
require('../../../use/index.cjs');
|
|
5
|
+
var scrollContainerItem_controller = require('./scroll-container-item.controller.cjs');
|
|
6
|
+
require('./scroll-container-item.css');
|
|
7
|
+
var namespace = require('../../../use/namespace/namespace.cjs');
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
function _isSlot(s) {
|
|
11
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
12
|
+
}
|
|
13
|
+
const ScrollContainerItem = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
+
name: "IBizScrollContainerItem",
|
|
15
|
+
props: {
|
|
16
|
+
modelData: {
|
|
17
|
+
type: Object,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
controller: {
|
|
21
|
+
type: scrollContainerItem_controller.ScrollContainerItemController,
|
|
22
|
+
required: true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(props) {
|
|
26
|
+
const ns = namespace.useNamespace("scroll-container-item");
|
|
27
|
+
const {
|
|
28
|
+
id
|
|
29
|
+
} = props.modelData;
|
|
30
|
+
const classArr = vue.computed(() => {
|
|
31
|
+
const result = [ns.b(), ns.m(id), ns.is("hidden", !props.controller.state.visible)];
|
|
32
|
+
return result;
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
ns,
|
|
36
|
+
classArr
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
render() {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
let _slot;
|
|
42
|
+
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
43
|
+
return vue.createVNode(vue.resolveComponent("iBizRow"), {
|
|
44
|
+
"class": this.classArr,
|
|
45
|
+
"layout": {
|
|
46
|
+
layout: "FLEX"
|
|
47
|
+
}
|
|
48
|
+
}, _isSlot(_slot = defaultSlots.map((slot) => {
|
|
49
|
+
const props = slot.props;
|
|
50
|
+
if (!props || !props.controller) {
|
|
51
|
+
return slot;
|
|
52
|
+
}
|
|
53
|
+
props.modelData.layoutPos.layout = "FLEX";
|
|
54
|
+
return vue.createVNode(vue.resolveComponent("iBizCol"), {
|
|
55
|
+
"layoutPos": props.modelData.layoutPos,
|
|
56
|
+
"state": props.controller.state
|
|
57
|
+
}, _isSlot(slot) ? slot : {
|
|
58
|
+
default: () => [slot]
|
|
59
|
+
});
|
|
60
|
+
})) ? _slot : {
|
|
61
|
+
default: () => [_slot]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
exports.ScrollContainerItem = ScrollContainerItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-scroll-container-item{width:100%;height:100%;overflow:auto}.ibiz-scroll-container-item.is-hidden{display:none}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scrollContainerItem_controller = require('./scroll-container-item.controller.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
class ScrollContainerItemProvider {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.component = "IBizScrollContainerItem";
|
|
9
|
+
}
|
|
10
|
+
async createController(panelItem, panel, parent) {
|
|
11
|
+
const c = new scrollContainerItem_controller.ScrollContainerItemController(panelItem, panel, parent);
|
|
12
|
+
await c.init();
|
|
13
|
+
return c;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.ScrollContainerItemProvider = ScrollContainerItemProvider;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('@ibiz-template/runtime');
|
|
6
|
+
require('../../util/index.cjs');
|
|
7
|
+
var singleDataContainer = require('./single-data-container.cjs');
|
|
8
|
+
var singleDataContainer_provider = require('./single-data-container.provider.cjs');
|
|
9
|
+
var singleDataContainer_state = require('./single-data-container.state.cjs');
|
|
10
|
+
var singleDataContainer_controller = require('./single-data-container.controller.cjs');
|
|
11
|
+
var install = require('../../util/install.cjs');
|
|
12
|
+
|
|
13
|
+
"use strict";
|
|
14
|
+
const IBizSingleDataContainer = install.withInstall(
|
|
15
|
+
singleDataContainer.SingleDataContainer,
|
|
16
|
+
function(v) {
|
|
17
|
+
v.component(singleDataContainer.SingleDataContainer.name, singleDataContainer.SingleDataContainer);
|
|
18
|
+
runtime.registerPanelItemProvider(
|
|
19
|
+
"CONTAINER_CONTAINER_SINGLEDATA",
|
|
20
|
+
() => new singleDataContainer_provider.SingleDataContainerProvider()
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
exports.SingleDataContainerState = singleDataContainer_state.SingleDataContainerState;
|
|
26
|
+
exports.SingleDataContainerController = singleDataContainer_controller.SingleDataContainerController;
|
|
27
|
+
exports.IBizSingleDataContainer = IBizSingleDataContainer;
|
|
28
|
+
exports.default = IBizSingleDataContainer;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
require('../../use/index.cjs');
|
|
5
|
+
var singleDataContainer_controller = require('./single-data-container.controller.cjs');
|
|
6
|
+
require('./single-data-container.css');
|
|
7
|
+
var namespace = require('../../use/namespace/namespace.cjs');
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
function _isSlot(s) {
|
|
11
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
12
|
+
}
|
|
13
|
+
const SingleDataContainer = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
+
name: "IBizSingleDataContainer",
|
|
15
|
+
props: {
|
|
16
|
+
modelData: {
|
|
17
|
+
type: Object,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
controller: {
|
|
21
|
+
type: singleDataContainer_controller.SingleDataContainerController,
|
|
22
|
+
required: true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(props) {
|
|
26
|
+
const ns = namespace.useNamespace("single-data-container");
|
|
27
|
+
const {
|
|
28
|
+
id
|
|
29
|
+
} = props.modelData;
|
|
30
|
+
const keys = Object.keys(props.controller.panelItems);
|
|
31
|
+
keys.forEach((key) => {
|
|
32
|
+
const panelItem = props.controller.panelItems[key];
|
|
33
|
+
panelItem.state = vue.reactive(panelItem.state);
|
|
34
|
+
});
|
|
35
|
+
const renderPanelItem = vue.inject("renderPanelItem");
|
|
36
|
+
const classArr = vue.computed(() => {
|
|
37
|
+
const result = [ns.b(), ns.m(id), ...props.controller.containerClass];
|
|
38
|
+
return result;
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
ns,
|
|
42
|
+
classArr,
|
|
43
|
+
renderPanelItem
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
render() {
|
|
47
|
+
let content;
|
|
48
|
+
if (this.$slots.default) {
|
|
49
|
+
content = this.$slots.default();
|
|
50
|
+
} else {
|
|
51
|
+
content = vue.createVNode(vue.resolveComponent("iBizRow"), {
|
|
52
|
+
"class": this.ns.b("content"),
|
|
53
|
+
"layout": this.modelData.layout
|
|
54
|
+
}, {
|
|
55
|
+
default: () => {
|
|
56
|
+
var _a;
|
|
57
|
+
return [(_a = this.modelData.panelItems) == null ? void 0 : _a.map((panelItem) => {
|
|
58
|
+
let _slot;
|
|
59
|
+
const childController = this.controller.panelItems[panelItem.id];
|
|
60
|
+
return vue.createVNode(vue.resolveComponent("iBizCol"), {
|
|
61
|
+
"layoutPos": panelItem.layoutPos,
|
|
62
|
+
"state": childController.state
|
|
63
|
+
}, _isSlot(_slot = this.renderPanelItem(panelItem, {
|
|
64
|
+
providers: this.controller.providers,
|
|
65
|
+
panelItems: this.controller.panelItems
|
|
66
|
+
})) ? _slot : {
|
|
67
|
+
default: () => [_slot]
|
|
68
|
+
});
|
|
69
|
+
})];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return vue.createVNode("div", {
|
|
74
|
+
"class": this.classArr
|
|
75
|
+
}, [content]);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
exports.SingleDataContainer = SingleDataContainer;
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@ibiz-template/core');
|
|
4
|
+
var runtime = require('@ibiz-template/runtime');
|
|
5
|
+
var singleDataContainer_state = require('./single-data-container.state.cjs');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
class SingleDataContainerController extends runtime.PanelItemController {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.isDataContainer = true;
|
|
12
|
+
/**
|
|
13
|
+
* 所有面板成员的控制器
|
|
14
|
+
*
|
|
15
|
+
* @author lxm
|
|
16
|
+
* @date 2022-08-24 20:08:07
|
|
17
|
+
* @type {{ [key: string]: IPanelItemController }}
|
|
18
|
+
*/
|
|
19
|
+
this.panelItems = {};
|
|
20
|
+
/**
|
|
21
|
+
* 所有面板成员的适配器
|
|
22
|
+
*
|
|
23
|
+
* @author lxm
|
|
24
|
+
* @date 2022-08-24 20:08:07
|
|
25
|
+
* @type {{ [key: string]: IPanelItemProvider }}
|
|
26
|
+
*/
|
|
27
|
+
this.providers = {};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 单项数据容器,根据数据模式
|
|
31
|
+
* @author lxm
|
|
32
|
+
* @date 2023-07-14 10:59:02
|
|
33
|
+
* @readonly
|
|
34
|
+
* @type {IData}
|
|
35
|
+
*/
|
|
36
|
+
get data() {
|
|
37
|
+
return this.state.data;
|
|
38
|
+
}
|
|
39
|
+
createState() {
|
|
40
|
+
var _a;
|
|
41
|
+
return new singleDataContainer_state.SingleDataContainerState((_a = this.parent) == null ? void 0 : _a.state);
|
|
42
|
+
}
|
|
43
|
+
async onInit() {
|
|
44
|
+
await super.onInit();
|
|
45
|
+
await this.initPanelItemControllers();
|
|
46
|
+
this.initContainerData();
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 初始化面板成员控制器
|
|
50
|
+
*
|
|
51
|
+
* @author lxm
|
|
52
|
+
* @date 2022-08-24 21:08:48
|
|
53
|
+
* @protected
|
|
54
|
+
*/
|
|
55
|
+
async initPanelItemControllers(panelItems = this.model.panelItems, panel = this.panel, parent = this) {
|
|
56
|
+
if (!panelItems) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
await Promise.all(
|
|
60
|
+
panelItems.map(async (panelItem) => {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
const panelItemProvider = await runtime.getPanelItemProvider(panelItem);
|
|
63
|
+
if (!panelItemProvider) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.providers[panelItem.id] = panelItemProvider;
|
|
67
|
+
const panelItemController = await panelItemProvider.createController(
|
|
68
|
+
panelItem,
|
|
69
|
+
panel,
|
|
70
|
+
parent
|
|
71
|
+
);
|
|
72
|
+
this.panelItems[panelItem.id] = panelItemController;
|
|
73
|
+
if (((_a = panelItem.panelItems) == null ? void 0 : _a.length) && !runtime.isDataContainer(panelItem)) {
|
|
74
|
+
await this.initPanelItemControllers(
|
|
75
|
+
panelItem.panelItems,
|
|
76
|
+
panel,
|
|
77
|
+
panelItemController
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
if ((_b = panelItem.panelTabPages) == null ? void 0 : _b.length) {
|
|
81
|
+
await this.initPanelItemControllers(
|
|
82
|
+
panelItem.panelTabPages,
|
|
83
|
+
panel,
|
|
84
|
+
panelItemController
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* 根据来源类型初始化容器数据
|
|
92
|
+
* @author lxm
|
|
93
|
+
* @date 2023-08-04 03:05:59
|
|
94
|
+
* @protected
|
|
95
|
+
*/
|
|
96
|
+
initContainerData() {
|
|
97
|
+
const { dataSourceType, dataName } = this.model;
|
|
98
|
+
switch (dataSourceType) {
|
|
99
|
+
case "DEACTION":
|
|
100
|
+
case "DEDATASET":
|
|
101
|
+
this.setDataByDeMethod();
|
|
102
|
+
break;
|
|
103
|
+
case "APPGLOBALPARAM":
|
|
104
|
+
this.setDataByAppGlobalParam();
|
|
105
|
+
break;
|
|
106
|
+
case "DELOGIC":
|
|
107
|
+
this.setDataByDeLogic();
|
|
108
|
+
break;
|
|
109
|
+
case "TOPVIEWSESSIONPARAM": {
|
|
110
|
+
if (!dataName) {
|
|
111
|
+
throw new core.RuntimeModelError(this.model, "\u6CA1\u6709\u914D\u7F6E\u6570\u636E\u5BF9\u8C61\u540D\u79F0");
|
|
112
|
+
}
|
|
113
|
+
this.bindViewData(this.panel.getTopView(), dataName);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case "VIEWSESSIONPARAM": {
|
|
117
|
+
if (!dataName) {
|
|
118
|
+
throw new core.RuntimeModelError(this.model, "\u6CA1\u6709\u914D\u7F6E\u6570\u636E\u5BF9\u8C61\u540D\u79F0");
|
|
119
|
+
}
|
|
120
|
+
this.bindViewData(this.panel.view, dataName);
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
default:
|
|
124
|
+
throw new core.ModelError(this.model, "\u6570\u636E\u6E90\u7C7B\u578B".concat(dataSourceType, "\u6682\u672A\u652F\u6301"));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* 面板状态变更通知
|
|
129
|
+
*
|
|
130
|
+
* @author lxm
|
|
131
|
+
* @date 2022-09-20 18:09:07
|
|
132
|
+
*/
|
|
133
|
+
childrenStateNotify(state) {
|
|
134
|
+
Object.values(this.panelItems).forEach((panelItem) => {
|
|
135
|
+
panelItem.panelStateNotify(state);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* 设置数据
|
|
140
|
+
* @author lxm
|
|
141
|
+
* @date 2023-09-05 05:42:09
|
|
142
|
+
* @param {IData[]} items
|
|
143
|
+
*/
|
|
144
|
+
async setData(data) {
|
|
145
|
+
var _a, _b;
|
|
146
|
+
const fields = runtime.getAllPanelField(this.model);
|
|
147
|
+
const fieldKeys = fields.map((item) => item.id);
|
|
148
|
+
const panelData = new runtime.PanelData(fields, data);
|
|
149
|
+
panelData._evt.on("change", (key) => {
|
|
150
|
+
if (fieldKeys.includes(key)) {
|
|
151
|
+
this.childDataChangeNotify([key]);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
(_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
|
|
155
|
+
this.state.data = panelData;
|
|
156
|
+
this.childrenStateNotify(runtime.PanelNotifyState.LOAD);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* 通过实体设置视图逻辑
|
|
160
|
+
* @author lxm
|
|
161
|
+
* @date 2023-08-04 03:00:31
|
|
162
|
+
* @protected
|
|
163
|
+
* @return {*} {Promise<void>}
|
|
164
|
+
*/
|
|
165
|
+
async setDataByDeLogic() {
|
|
166
|
+
const { appDataEntityId, appDELogicId } = this.model;
|
|
167
|
+
if (!appDELogicId) {
|
|
168
|
+
throw new core.RuntimeModelError(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
169
|
+
}
|
|
170
|
+
if (!appDataEntityId) {
|
|
171
|
+
throw new core.RuntimeModelError(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
172
|
+
}
|
|
173
|
+
const data = await runtime.execDELogicById(
|
|
174
|
+
appDELogicId,
|
|
175
|
+
appDataEntityId,
|
|
176
|
+
this.panel.context,
|
|
177
|
+
[],
|
|
178
|
+
this.panel.params
|
|
179
|
+
);
|
|
180
|
+
if (!data) {
|
|
181
|
+
throw new core.RuntimeError("\u5B9E\u4F53\u903B\u8F91".concat(appDELogicId, "\u6CA1\u6709\u8FD4\u56DE\u503C"));
|
|
182
|
+
}
|
|
183
|
+
this.setData(data);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* 设置全局变量为当前容器数据
|
|
187
|
+
* @author lxm
|
|
188
|
+
* @date 2023-08-04 01:55:07
|
|
189
|
+
* @protected
|
|
190
|
+
*/
|
|
191
|
+
setDataByAppGlobalParam() {
|
|
192
|
+
const { dataName } = this.model;
|
|
193
|
+
const originData = dataName ? ibiz.appData[dataName] : ibiz.appData;
|
|
194
|
+
if (originData) {
|
|
195
|
+
this.setData(originData);
|
|
196
|
+
} else {
|
|
197
|
+
ibiz.log.error("\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709".concat(dataName, "\u5C5E\u6027"));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* 请求实体行为并把返回值设置为当前容器的数据
|
|
202
|
+
* @author lxm
|
|
203
|
+
* @date 2023-08-04 11:47:17
|
|
204
|
+
* @protected
|
|
205
|
+
* @return {*} {Promise<void>}
|
|
206
|
+
*/
|
|
207
|
+
async setDataByDeMethod() {
|
|
208
|
+
const { appDEMethodId, appDataEntityId } = this.model;
|
|
209
|
+
if (!appDEMethodId) {
|
|
210
|
+
throw new core.RuntimeModelError(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u884C\u4E3A");
|
|
211
|
+
}
|
|
212
|
+
if (!appDataEntityId) {
|
|
213
|
+
throw new core.RuntimeModelError(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
214
|
+
}
|
|
215
|
+
const app = ibiz.hub.getApp(this.panel.context.srfappid);
|
|
216
|
+
const res = await app.deService.exec(
|
|
217
|
+
appDataEntityId,
|
|
218
|
+
appDEMethodId,
|
|
219
|
+
this.panel.context,
|
|
220
|
+
[],
|
|
221
|
+
this.panel.params
|
|
222
|
+
);
|
|
223
|
+
if (res.ok && res.data) {
|
|
224
|
+
this.setData(res.data);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* 绑定指定视图会话的变量
|
|
229
|
+
* @author lxm
|
|
230
|
+
* @date 2023-07-14 02:03:56
|
|
231
|
+
* @protected
|
|
232
|
+
* @param {IViewController} view 绑定视图控制器
|
|
233
|
+
* @param {string} dataName 变量名称
|
|
234
|
+
*/
|
|
235
|
+
bindViewData(view, dataName) {
|
|
236
|
+
if (!Object.prototype.hasOwnProperty.call(view.state, dataName)) {
|
|
237
|
+
ibiz.log.error("\u7ED1\u5B9A\u89C6\u56FE\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728".concat(dataName));
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
const updateData = () => {
|
|
241
|
+
const originData = view.state[dataName];
|
|
242
|
+
if (originData) {
|
|
243
|
+
this.setData(originData);
|
|
244
|
+
} else {
|
|
245
|
+
ibiz.log.error("\u89C6\u56FEstate\u91CC\u6CA1\u6709".concat(dataName, "\u5C5E\u6027"));
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
updateData();
|
|
249
|
+
view.evt.on("onDataChange", () => {
|
|
250
|
+
updateData();
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* 通知所有子面板成员面板操作过程中的数据变更
|
|
255
|
+
*
|
|
256
|
+
* @author lxm
|
|
257
|
+
* @date 2022-09-20 18:09:40
|
|
258
|
+
* @param {string[]} names
|
|
259
|
+
*/
|
|
260
|
+
childDataChangeNotify(names) {
|
|
261
|
+
Object.values(this.panelItems).forEach((panelItem) => {
|
|
262
|
+
panelItem.dataChangeNotify(names);
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* 设置面板数据的值
|
|
267
|
+
*
|
|
268
|
+
* @param {string} name 要设置的数据的属性名称
|
|
269
|
+
* @param {unknown} value 要设置的值
|
|
270
|
+
*/
|
|
271
|
+
async setDataValue(name, value) {
|
|
272
|
+
if (Object.prototype.hasOwnProperty.call(this.state.data, name) && this.state.data[name] === value) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
this.state.data[name] = value;
|
|
276
|
+
}
|
|
277
|
+
destroy() {
|
|
278
|
+
var _a, _b;
|
|
279
|
+
super.destroy();
|
|
280
|
+
(_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
|
|
281
|
+
Object.values(this.panelItems).forEach((item) => {
|
|
282
|
+
item.destroy();
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
exports.SingleDataContainerController = SingleDataContainerController;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-single-data-container{width:100%;height:100%}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var singleDataContainer_controller = require('./single-data-container.controller.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
class SingleDataContainerProvider {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.component = "IBizSingleDataContainer";
|
|
9
|
+
}
|
|
10
|
+
async createController(panelItem, panel, parent) {
|
|
11
|
+
const c = new singleDataContainer_controller.SingleDataContainerController(panelItem, panel, parent);
|
|
12
|
+
await c.init();
|
|
13
|
+
return c;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.SingleDataContainerProvider = SingleDataContainerProvider;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var runtime = require('@ibiz-template/runtime');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
class SingleDataContainerState extends runtime.PanelItemState {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
/**
|
|
10
|
+
* 单项数据容器数据
|
|
11
|
+
* @author lxm
|
|
12
|
+
* @date 2023-07-14 12:07:45
|
|
13
|
+
* @type {(IData | IData[])}
|
|
14
|
+
*/
|
|
15
|
+
this.data = {};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
exports.SingleDataContainerState = SingleDataContainerState;
|