@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
package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.ts
DELETED
|
@@ -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 { ScrollContainerItemController } from './scroll-container-item.controller';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 面板滚动条容器项适配器
|
|
11
|
-
*
|
|
12
|
-
* @author lxm
|
|
13
|
-
* @date 2022-09-19 22:09:03
|
|
14
|
-
* @export
|
|
15
|
-
* @class ScrollContainerItemProvider
|
|
16
|
-
* @implements {EditorProvider}
|
|
17
|
-
*/
|
|
18
|
-
export class ScrollContainerItemProvider implements IPanelItemProvider {
|
|
19
|
-
component: string = 'IBizScrollContainerItem';
|
|
20
|
-
|
|
21
|
-
async createController(
|
|
22
|
-
panelItem: IPanelContainer,
|
|
23
|
-
panel: PanelController,
|
|
24
|
-
parent: PanelItemController | undefined,
|
|
25
|
-
): Promise<ScrollContainerItemController> {
|
|
26
|
-
const c = new ScrollContainerItemController(panelItem, panel, parent);
|
|
27
|
-
await c.init();
|
|
28
|
-
return c;
|
|
29
|
-
}
|
|
30
|
-
}
|
package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.tsx
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
2
|
-
import { computed, defineComponent, PropType, VNode } from 'vue';
|
|
3
|
-
import { useNamespace } from '../../../use';
|
|
4
|
-
import { ScrollContainerItemController } from './scroll-container-item.controller';
|
|
5
|
-
import './scroll-container-item.scss';
|
|
6
|
-
|
|
7
|
-
export const ScrollContainerItem = defineComponent({
|
|
8
|
-
name: 'IBizScrollContainerItem',
|
|
9
|
-
props: {
|
|
10
|
-
modelData: {
|
|
11
|
-
type: Object as PropType<IPanelContainer>,
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
controller: {
|
|
15
|
-
type: ScrollContainerItemController,
|
|
16
|
-
required: true,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
setup(props) {
|
|
20
|
-
const ns = useNamespace('scroll-container-item');
|
|
21
|
-
const { id } = props.modelData;
|
|
22
|
-
|
|
23
|
-
// 类名控制
|
|
24
|
-
const classArr = computed(() => {
|
|
25
|
-
const result: Array<string | false> = [
|
|
26
|
-
ns.b(),
|
|
27
|
-
ns.m(id),
|
|
28
|
-
ns.is('hidden', !props.controller.state.visible),
|
|
29
|
-
];
|
|
30
|
-
return result;
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
return { ns, classArr };
|
|
34
|
-
},
|
|
35
|
-
render() {
|
|
36
|
-
// 内容区默认插槽处理,封装app-col
|
|
37
|
-
const defaultSlots: VNode[] = this.$slots.default?.() || [];
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<iBizRow class={this.classArr} layout={{ layout: 'FLEX' }}>
|
|
41
|
-
{defaultSlots.map(slot => {
|
|
42
|
-
const props = slot.props as IData;
|
|
43
|
-
if (!props || !props.controller) {
|
|
44
|
-
return slot;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
props.modelData.layoutPos.layout = 'FLEX';
|
|
48
|
-
return (
|
|
49
|
-
<iBizCol
|
|
50
|
-
layoutPos={props.modelData.layoutPos}
|
|
51
|
-
state={props.controller.state}
|
|
52
|
-
>
|
|
53
|
-
{slot}
|
|
54
|
-
</iBizCol>
|
|
55
|
-
);
|
|
56
|
-
})}
|
|
57
|
-
</iBizRow>
|
|
58
|
-
);
|
|
59
|
-
},
|
|
60
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
3
|
-
import { withInstall } from '../../util';
|
|
4
|
-
import { SingleDataContainer } from './single-data-container';
|
|
5
|
-
import { SingleDataContainerProvider } from './single-data-container.provider';
|
|
6
|
-
import { SingleDataContainerState } from './single-data-container.state';
|
|
7
|
-
import { SingleDataContainerController } from './single-data-container.controller';
|
|
8
|
-
|
|
9
|
-
export { SingleDataContainerState, SingleDataContainerController };
|
|
10
|
-
|
|
11
|
-
export const IBizSingleDataContainer = withInstall(
|
|
12
|
-
SingleDataContainer,
|
|
13
|
-
function (v: App) {
|
|
14
|
-
v.component(SingleDataContainer.name, SingleDataContainer);
|
|
15
|
-
registerPanelItemProvider(
|
|
16
|
-
'CONTAINER_CONTAINER_SINGLEDATA',
|
|
17
|
-
() => new SingleDataContainerProvider(),
|
|
18
|
-
);
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export default IBizSingleDataContainer;
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ModelError,
|
|
3
|
-
RuntimeError,
|
|
4
|
-
RuntimeModelError,
|
|
5
|
-
} from '@ibiz-template/core';
|
|
6
|
-
import {
|
|
7
|
-
execDELogicById,
|
|
8
|
-
getAllPanelField,
|
|
9
|
-
getPanelItemProvider,
|
|
10
|
-
IPanelController,
|
|
11
|
-
IPanelDataContainerController,
|
|
12
|
-
IPanelItemContainerController,
|
|
13
|
-
IPanelItemController,
|
|
14
|
-
IPanelItemProvider,
|
|
15
|
-
isDataContainer,
|
|
16
|
-
IViewController,
|
|
17
|
-
PanelData,
|
|
18
|
-
PanelItemController,
|
|
19
|
-
PanelNotifyState,
|
|
20
|
-
} from '@ibiz-template/runtime';
|
|
21
|
-
import { IPanelContainer, IPanelItem, IPanelTabPanel } from '@ibiz/model-core';
|
|
22
|
-
import { SingleDataContainerState } from './single-data-container.state';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 单项数据容器控制器
|
|
26
|
-
*
|
|
27
|
-
* @export
|
|
28
|
-
* @class SingleDataContainerController
|
|
29
|
-
* @extends {PanelItemController}
|
|
30
|
-
*/
|
|
31
|
-
export class SingleDataContainerController
|
|
32
|
-
extends PanelItemController<IPanelContainer>
|
|
33
|
-
implements IPanelDataContainerController
|
|
34
|
-
{
|
|
35
|
-
declare state: SingleDataContainerState;
|
|
36
|
-
|
|
37
|
-
readonly isDataContainer = true;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 所有面板成员的控制器
|
|
41
|
-
*
|
|
42
|
-
* @author lxm
|
|
43
|
-
* @date 2022-08-24 20:08:07
|
|
44
|
-
* @type {{ [key: string]: IPanelItemController }}
|
|
45
|
-
*/
|
|
46
|
-
panelItems: { [key: string]: IPanelItemController } = {};
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 所有面板成员的适配器
|
|
50
|
-
*
|
|
51
|
-
* @author lxm
|
|
52
|
-
* @date 2022-08-24 20:08:07
|
|
53
|
-
* @type {{ [key: string]: IPanelItemProvider }}
|
|
54
|
-
*/
|
|
55
|
-
providers: { [key: string]: IPanelItemProvider } = {};
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* 单项数据容器,根据数据模式
|
|
59
|
-
* @author lxm
|
|
60
|
-
* @date 2023-07-14 10:59:02
|
|
61
|
-
* @readonly
|
|
62
|
-
* @type {IData}
|
|
63
|
-
*/
|
|
64
|
-
get data(): IData {
|
|
65
|
-
return this.state.data;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
protected createState(): SingleDataContainerState {
|
|
69
|
-
return new SingleDataContainerState(this.parent?.state);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
protected async onInit(): Promise<void> {
|
|
73
|
-
await super.onInit();
|
|
74
|
-
await this.initPanelItemControllers();
|
|
75
|
-
this.initContainerData();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* 初始化面板成员控制器
|
|
80
|
-
*
|
|
81
|
-
* @author lxm
|
|
82
|
-
* @date 2022-08-24 21:08:48
|
|
83
|
-
* @protected
|
|
84
|
-
*/
|
|
85
|
-
protected async initPanelItemControllers(
|
|
86
|
-
panelItems: IPanelItem[] | undefined = this.model.panelItems,
|
|
87
|
-
panel: IPanelController = this.panel,
|
|
88
|
-
parent: IPanelItemContainerController | undefined = this,
|
|
89
|
-
): Promise<void> {
|
|
90
|
-
if (!panelItems) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
await Promise.all(
|
|
94
|
-
panelItems.map(async panelItem => {
|
|
95
|
-
// 生成面板成员控制器
|
|
96
|
-
const panelItemProvider = await getPanelItemProvider(panelItem);
|
|
97
|
-
if (!panelItemProvider) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
this.providers[panelItem.id!] = panelItemProvider;
|
|
101
|
-
const panelItemController = await panelItemProvider.createController(
|
|
102
|
-
panelItem,
|
|
103
|
-
panel,
|
|
104
|
-
parent,
|
|
105
|
-
);
|
|
106
|
-
this.panelItems[panelItem.id!] = panelItemController;
|
|
107
|
-
// 有子成员的,且不是数据容器的。生成子控制器
|
|
108
|
-
if (
|
|
109
|
-
(panelItem as IPanelContainer).panelItems?.length &&
|
|
110
|
-
!isDataContainer(panelItem)
|
|
111
|
-
) {
|
|
112
|
-
await this.initPanelItemControllers(
|
|
113
|
-
(panelItem as IPanelContainer).panelItems,
|
|
114
|
-
panel,
|
|
115
|
-
panelItemController as IPanelItemContainerController,
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
if ((panelItem as IPanelTabPanel).panelTabPages?.length) {
|
|
119
|
-
await this.initPanelItemControllers(
|
|
120
|
-
(panelItem as IPanelTabPanel).panelTabPages,
|
|
121
|
-
panel,
|
|
122
|
-
panelItemController as IPanelItemContainerController,
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
}),
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* 根据来源类型初始化容器数据
|
|
131
|
-
* @author lxm
|
|
132
|
-
* @date 2023-08-04 03:05:59
|
|
133
|
-
* @protected
|
|
134
|
-
*/
|
|
135
|
-
protected initContainerData(): void {
|
|
136
|
-
const { dataSourceType, dataName } = this.model;
|
|
137
|
-
switch (dataSourceType) {
|
|
138
|
-
case 'DEACTION':
|
|
139
|
-
case 'DEDATASET':
|
|
140
|
-
this.setDataByDeMethod();
|
|
141
|
-
break;
|
|
142
|
-
case 'APPGLOBALPARAM':
|
|
143
|
-
this.setDataByAppGlobalParam();
|
|
144
|
-
break;
|
|
145
|
-
case 'DELOGIC':
|
|
146
|
-
this.setDataByDeLogic();
|
|
147
|
-
break;
|
|
148
|
-
case 'TOPVIEWSESSIONPARAM': {
|
|
149
|
-
if (!dataName) {
|
|
150
|
-
throw new RuntimeModelError(this.model, '没有配置数据对象名称');
|
|
151
|
-
}
|
|
152
|
-
this.bindViewData(this.panel.getTopView(), dataName);
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
case 'VIEWSESSIONPARAM': {
|
|
156
|
-
if (!dataName) {
|
|
157
|
-
throw new RuntimeModelError(this.model, '没有配置数据对象名称');
|
|
158
|
-
}
|
|
159
|
-
this.bindViewData(this.panel.view, dataName);
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
default:
|
|
163
|
-
throw new ModelError(this.model, `数据源类型${dataSourceType}暂未支持`);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* 面板状态变更通知
|
|
169
|
-
*
|
|
170
|
-
* @author lxm
|
|
171
|
-
* @date 2022-09-20 18:09:07
|
|
172
|
-
*/
|
|
173
|
-
childrenStateNotify(state: PanelNotifyState): void {
|
|
174
|
-
Object.values(this.panelItems).forEach(panelItem => {
|
|
175
|
-
panelItem.panelStateNotify(state);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* 设置数据
|
|
181
|
-
* @author lxm
|
|
182
|
-
* @date 2023-09-05 05:42:09
|
|
183
|
-
* @param {IData[]} items
|
|
184
|
-
*/
|
|
185
|
-
async setData(data: IData): Promise<void> {
|
|
186
|
-
const fields = getAllPanelField(this.model);
|
|
187
|
-
const fieldKeys = fields.map(item => item.id!);
|
|
188
|
-
const panelData = new PanelData(fields, data);
|
|
189
|
-
|
|
190
|
-
// 面板属性变更的触发变更通知
|
|
191
|
-
panelData._evt.on('change', key => {
|
|
192
|
-
if (fieldKeys.includes(key)) {
|
|
193
|
-
this.childDataChangeNotify([key]);
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
// 清空上一个,如果存在的话。
|
|
197
|
-
this.data.destroy?.();
|
|
198
|
-
this.state.data = panelData;
|
|
199
|
-
this.childrenStateNotify(PanelNotifyState.LOAD);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* 通过实体设置视图逻辑
|
|
204
|
-
* @author lxm
|
|
205
|
-
* @date 2023-08-04 03:00:31
|
|
206
|
-
* @protected
|
|
207
|
-
* @return {*} {Promise<void>}
|
|
208
|
-
*/
|
|
209
|
-
protected async setDataByDeLogic(): Promise<void> {
|
|
210
|
-
const { appDataEntityId, appDELogicId } = this.model;
|
|
211
|
-
if (!appDELogicId) {
|
|
212
|
-
throw new RuntimeModelError(this.model, '没有配置实体逻辑');
|
|
213
|
-
}
|
|
214
|
-
if (!appDataEntityId) {
|
|
215
|
-
throw new RuntimeModelError(this.model, '没有配置实体');
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
const data = await execDELogicById(
|
|
219
|
-
appDELogicId,
|
|
220
|
-
appDataEntityId,
|
|
221
|
-
this.panel.context,
|
|
222
|
-
[],
|
|
223
|
-
this.panel.params,
|
|
224
|
-
);
|
|
225
|
-
|
|
226
|
-
if (!data) {
|
|
227
|
-
throw new RuntimeError(`实体逻辑${appDELogicId}没有返回值`);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
this.setData(data as IData);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* 设置全局变量为当前容器数据
|
|
235
|
-
* @author lxm
|
|
236
|
-
* @date 2023-08-04 01:55:07
|
|
237
|
-
* @protected
|
|
238
|
-
*/
|
|
239
|
-
protected setDataByAppGlobalParam(): void {
|
|
240
|
-
const { dataName } = this.model;
|
|
241
|
-
const originData = dataName ? ibiz.appData![dataName] : ibiz.appData!;
|
|
242
|
-
if (originData) {
|
|
243
|
-
this.setData(originData as IData);
|
|
244
|
-
} else {
|
|
245
|
-
ibiz.log.error(`全局变量里没有${dataName}属性`);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* 请求实体行为并把返回值设置为当前容器的数据
|
|
251
|
-
* @author lxm
|
|
252
|
-
* @date 2023-08-04 11:47:17
|
|
253
|
-
* @protected
|
|
254
|
-
* @return {*} {Promise<void>}
|
|
255
|
-
*/
|
|
256
|
-
protected async setDataByDeMethod(): Promise<void> {
|
|
257
|
-
const { appDEMethodId, appDataEntityId } = this.model;
|
|
258
|
-
if (!appDEMethodId) {
|
|
259
|
-
throw new RuntimeModelError(this.model, '没有配置实体行为');
|
|
260
|
-
}
|
|
261
|
-
if (!appDataEntityId) {
|
|
262
|
-
throw new RuntimeModelError(this.model, '没有配置实体');
|
|
263
|
-
}
|
|
264
|
-
const app = ibiz.hub.getApp(this.panel.context.srfappid);
|
|
265
|
-
const res = await app.deService.exec(
|
|
266
|
-
appDataEntityId,
|
|
267
|
-
appDEMethodId,
|
|
268
|
-
this.panel.context,
|
|
269
|
-
[],
|
|
270
|
-
this.panel.params,
|
|
271
|
-
);
|
|
272
|
-
if (res.ok && res.data) {
|
|
273
|
-
this.setData(res.data as IData);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* 绑定指定视图会话的变量
|
|
279
|
-
* @author lxm
|
|
280
|
-
* @date 2023-07-14 02:03:56
|
|
281
|
-
* @protected
|
|
282
|
-
* @param {IViewController} view 绑定视图控制器
|
|
283
|
-
* @param {string} dataName 变量名称
|
|
284
|
-
*/
|
|
285
|
-
protected bindViewData(view: IViewController, dataName: string): void {
|
|
286
|
-
if (!Object.prototype.hasOwnProperty.call(view.state, dataName)) {
|
|
287
|
-
ibiz.log.error(`绑定视图的会话不存在${dataName}`);
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
const updateData = (): void => {
|
|
291
|
-
const originData = (view.state as IData)[dataName] as IData;
|
|
292
|
-
if (originData) {
|
|
293
|
-
this.setData(originData);
|
|
294
|
-
} else {
|
|
295
|
-
ibiz.log.error(`视图state里没有${dataName}属性`);
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
updateData(); // 先绑定一次
|
|
299
|
-
|
|
300
|
-
// 每次视图数据变更之后更新一下
|
|
301
|
-
view.evt.on('onDataChange', () => {
|
|
302
|
-
updateData();
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* 通知所有子面板成员面板操作过程中的数据变更
|
|
308
|
-
*
|
|
309
|
-
* @author lxm
|
|
310
|
-
* @date 2022-09-20 18:09:40
|
|
311
|
-
* @param {string[]} names
|
|
312
|
-
*/
|
|
313
|
-
childDataChangeNotify(names: string[]): void {
|
|
314
|
-
Object.values(this.panelItems).forEach(panelItem => {
|
|
315
|
-
panelItem.dataChangeNotify(names);
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* 设置面板数据的值
|
|
321
|
-
*
|
|
322
|
-
* @param {string} name 要设置的数据的属性名称
|
|
323
|
-
* @param {unknown} value 要设置的值
|
|
324
|
-
*/
|
|
325
|
-
async setDataValue(name: string, value: unknown): Promise<void> {
|
|
326
|
-
if (
|
|
327
|
-
Object.prototype.hasOwnProperty.call(this.state.data, name) &&
|
|
328
|
-
this.state.data[name] === value
|
|
329
|
-
) {
|
|
330
|
-
// *`面板里没有属性${name}或者${name}的值未发生改变`
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// 改变值
|
|
335
|
-
this.state.data[name] = value;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
destroy(): void {
|
|
339
|
-
super.destroy();
|
|
340
|
-
this.data.destroy?.();
|
|
341
|
-
Object.values(this.panelItems).forEach(item => {
|
|
342
|
-
item.destroy();
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
}
|
|
@@ -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 { SingleDataContainerController } from './single-data-container.controller';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 单项数据容器适配器
|
|
11
|
-
*
|
|
12
|
-
* @author lxm
|
|
13
|
-
* @date 2022-09-19 22:09:03
|
|
14
|
-
* @export
|
|
15
|
-
* @class SingleDataContainerProvider
|
|
16
|
-
* @implements {EditorProvider}
|
|
17
|
-
*/
|
|
18
|
-
export class SingleDataContainerProvider implements IPanelItemProvider {
|
|
19
|
-
component: string = 'IBizSingleDataContainer';
|
|
20
|
-
|
|
21
|
-
async createController(
|
|
22
|
-
panelItem: IPanelContainer,
|
|
23
|
-
panel: PanelController,
|
|
24
|
-
parent: PanelItemController | undefined,
|
|
25
|
-
): Promise<PanelItemController> {
|
|
26
|
-
const c = new SingleDataContainerController(panelItem, panel, parent);
|
|
27
|
-
await c.init();
|
|
28
|
-
return c;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -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 SingleDataContainerState
|
|
10
|
-
* @extends {PanelItemState}
|
|
11
|
-
*/
|
|
12
|
-
export class SingleDataContainerState 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,95 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IPanelItemProvider,
|
|
3
|
-
IPanelItemController,
|
|
4
|
-
} from '@ibiz-template/runtime';
|
|
5
|
-
import { IPanelContainer, IPanelItem } from '@ibiz/model-core';
|
|
6
|
-
import {
|
|
7
|
-
computed,
|
|
8
|
-
defineComponent,
|
|
9
|
-
inject,
|
|
10
|
-
PropType,
|
|
11
|
-
reactive,
|
|
12
|
-
VNode,
|
|
13
|
-
} from 'vue';
|
|
14
|
-
import { useNamespace } from '../../use';
|
|
15
|
-
import { SingleDataContainerController } from './single-data-container.controller';
|
|
16
|
-
import './single-data-container.scss';
|
|
17
|
-
|
|
18
|
-
export const SingleDataContainer = defineComponent({
|
|
19
|
-
name: 'IBizSingleDataContainer',
|
|
20
|
-
props: {
|
|
21
|
-
modelData: {
|
|
22
|
-
type: Object as PropType<IPanelContainer>,
|
|
23
|
-
required: true,
|
|
24
|
-
},
|
|
25
|
-
controller: {
|
|
26
|
-
type: SingleDataContainerController,
|
|
27
|
-
required: true,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
setup(props) {
|
|
31
|
-
const ns = useNamespace('single-data-container');
|
|
32
|
-
const { id } = props.modelData;
|
|
33
|
-
|
|
34
|
-
// 面板成员state响应式
|
|
35
|
-
const keys = Object.keys(props.controller.panelItems);
|
|
36
|
-
keys.forEach(key => {
|
|
37
|
-
const panelItem = props.controller.panelItems[key];
|
|
38
|
-
panelItem.state = reactive(panelItem.state);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// 获取上层的绘制函数
|
|
42
|
-
const renderPanelItem = inject<
|
|
43
|
-
(
|
|
44
|
-
panelItem: IPanelItem,
|
|
45
|
-
options?: {
|
|
46
|
-
providers: {
|
|
47
|
-
[key: string]: IPanelItemProvider;
|
|
48
|
-
};
|
|
49
|
-
panelItems: {
|
|
50
|
-
[key: string]: IPanelItemController;
|
|
51
|
-
};
|
|
52
|
-
},
|
|
53
|
-
) => VNode | null
|
|
54
|
-
>('renderPanelItem')!;
|
|
55
|
-
|
|
56
|
-
// 类名控制
|
|
57
|
-
const classArr = computed(() => {
|
|
58
|
-
const result: Array<string | false> = [
|
|
59
|
-
ns.b(),
|
|
60
|
-
ns.m(id),
|
|
61
|
-
...props.controller.containerClass,
|
|
62
|
-
];
|
|
63
|
-
return result;
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
return { ns, classArr, renderPanelItem };
|
|
67
|
-
},
|
|
68
|
-
render() {
|
|
69
|
-
let content: VNode | VNode[];
|
|
70
|
-
if (this.$slots.default) {
|
|
71
|
-
content = this.$slots.default();
|
|
72
|
-
} else {
|
|
73
|
-
// 内容区默认插槽处理,封装app-col
|
|
74
|
-
content = (
|
|
75
|
-
<iBizRow class={this.ns.b('content')} layout={this.modelData.layout}>
|
|
76
|
-
{this.modelData.panelItems?.map(panelItem => {
|
|
77
|
-
const childController = this.controller.panelItems[panelItem.id!];
|
|
78
|
-
return (
|
|
79
|
-
<iBizCol
|
|
80
|
-
layoutPos={panelItem.layoutPos}
|
|
81
|
-
state={childController.state}
|
|
82
|
-
>
|
|
83
|
-
{this.renderPanelItem(panelItem, {
|
|
84
|
-
providers: this.controller.providers,
|
|
85
|
-
panelItems: this.controller.panelItems,
|
|
86
|
-
})}
|
|
87
|
-
</iBizCol>
|
|
88
|
-
);
|
|
89
|
-
})}
|
|
90
|
-
</iBizRow>
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
return <div class={this.classArr}>{content}</div>;
|
|
94
|
-
},
|
|
95
|
-
});
|
package/src/plugin/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { PluginFactory } from './plugin-factory/plugin-factory';
|
package/src/props/common.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 必填props类型
|
|
3
|
-
*
|
|
4
|
-
* @author lxm
|
|
5
|
-
* @date 2022-11-01 19:11:47
|
|
6
|
-
* @export
|
|
7
|
-
* @class RequiredProp
|
|
8
|
-
* @template T type的类型
|
|
9
|
-
* @template D 默认值的类型
|
|
10
|
-
* @template V 校验函数的类型
|
|
11
|
-
*/
|
|
12
|
-
export class RequiredProp<T, D = undefined, V = undefined> {
|
|
13
|
-
readonly required = true;
|
|
14
|
-
|
|
15
|
-
type: T;
|
|
16
|
-
|
|
17
|
-
default?: D | undefined;
|
|
18
|
-
|
|
19
|
-
validator?: V | undefined;
|
|
20
|
-
|
|
21
|
-
constructor(type: T, _default?: D, validator?: V) {
|
|
22
|
-
if (_default) {
|
|
23
|
-
this.default = _default;
|
|
24
|
-
}
|
|
25
|
-
if (validator) {
|
|
26
|
-
this.validator = validator;
|
|
27
|
-
}
|
|
28
|
-
this.type = type;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { getEditorProps, getGridEditorCommonProps } from './common';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 获取数组编辑器的props
|
|
5
|
-
*
|
|
6
|
-
* @author lxm
|
|
7
|
-
* @date 2022-11-01 19:11:12
|
|
8
|
-
* @export
|
|
9
|
-
* @template C
|
|
10
|
-
* @returns {*}
|
|
11
|
-
*/
|
|
12
|
-
export function getArrayProps<C>() {
|
|
13
|
-
return { ...getEditorProps<C>(), value: [Array<string>, Array<number>] };
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* 获取表格数组编辑器的props
|
|
18
|
-
*
|
|
19
|
-
* @author lxm
|
|
20
|
-
* @date 2022-11-01 19:11:12
|
|
21
|
-
* @export
|
|
22
|
-
* @template C
|
|
23
|
-
* @returns {*}
|
|
24
|
-
*/
|
|
25
|
-
export function getGridArrayProps<C>() {
|
|
26
|
-
return { ...getArrayProps<C>(), ...getGridEditorCommonProps() };
|
|
27
|
-
}
|