@ibiz-template/vue3-util 0.7.41-alpha.13 → 0.7.41-alpha.131
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/dist/index.system.min.js +1 -1
- package/es/common/badge/badge.css +1 -1
- package/es/common/badge/badge.d.ts +6 -8
- package/es/common/badge/badge.d.ts.map +1 -1
- package/es/common/badge/badge.mjs +13 -7
- package/es/common/code-list/code-list.d.ts +10 -10
- package/es/common/code-list/code-list.d.ts.map +1 -1
- package/es/common/code-list/code-list.mjs +1 -1
- package/es/common/control-base/control-base.d.ts.map +1 -1
- package/es/common/control-base/control-base.mjs +9 -15
- package/es/common/control-loading-placeholder/control-loading-placeholder.d.ts +4 -4
- package/es/common/control-loading-placeholder/control-loading-placeholder.d.ts.map +1 -1
- package/es/common/control-shell/control-shell.d.ts +7 -7
- package/es/common/control-shell/control-shell.d.ts.map +1 -1
- package/es/common/control-shell/control-shell.mjs +1 -1
- package/es/common/custom-render/custom-render.d.ts +4 -4
- package/es/common/custom-render/custom-render.d.ts.map +1 -1
- package/es/common/icon/icon.d.ts +4 -4
- package/es/common/icon/icon.d.ts.map +1 -1
- package/es/common/icon/icon.mjs +12 -0
- package/es/common/index.d.ts +1 -0
- package/es/common/index.d.ts.map +1 -1
- package/es/common/index.mjs +1 -0
- package/es/common/router-view/router-view.d.ts +7 -8
- package/es/common/router-view/router-view.d.ts.map +1 -1
- package/es/common/router-view/router-view.mjs +1 -1
- package/es/common/signature-pad/signature-pad.css +1 -0
- package/es/common/signature-pad/signature-pad.d.ts +19 -0
- package/es/common/signature-pad/signature-pad.d.ts.map +1 -0
- package/es/common/signature-pad/signature-pad.mjs +165 -0
- package/es/common/signature-pad/util/bezier.d.ts +58 -0
- package/es/common/signature-pad/util/bezier.d.ts.map +1 -0
- package/es/common/signature-pad/util/bezier.mjs +109 -0
- package/es/common/signature-pad/util/point.d.ts +55 -0
- package/es/common/signature-pad/util/point.d.ts.map +1 -0
- package/es/common/signature-pad/util/point.mjs +51 -0
- package/es/common/signature-pad/util/signature_pad.d.ts +593 -0
- package/es/common/signature-pad/util/signature_pad.d.ts.map +1 -0
- package/es/common/signature-pad/util/signature_pad.mjs +1018 -0
- package/es/common/view-shell/view-shell.d.ts +19 -12
- package/es/common/view-shell/view-shell.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.mjs +42 -23
- package/es/control/panel/panel/index.d.ts +5 -5
- package/es/control/panel/panel/index.d.ts.map +1 -1
- package/es/control/panel/panel/panel.d.ts +6 -6
- package/es/control/panel/panel/panel.d.ts.map +1 -1
- package/es/control/panel/panel/panel.mjs +13 -5
- package/es/control/panel/view-layout-panel/index.d.ts +5 -5
- package/es/control/panel/view-layout-panel/index.d.ts.map +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +7 -7
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts.map +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +6 -6
- package/es/index.mjs +9 -11
- package/es/locale/en/index.d.ts +1 -0
- package/es/locale/en/index.d.ts.map +1 -1
- package/es/locale/en/index.mjs +2 -1
- package/es/locale/zh-CN/index.d.ts +1 -0
- package/es/locale/zh-CN/index.d.ts.map +1 -1
- package/es/locale/zh-CN/index.mjs +2 -1
- package/es/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.mjs +2 -2
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.d.ts.map +1 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.mjs +3 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.css +1 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts +6 -4
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts.map +1 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.mjs +17 -6
- package/es/panel-component/auth-wxmp-qrcode/index.d.ts +6 -4
- package/es/panel-component/auth-wxmp-qrcode/index.d.ts.map +1 -1
- package/es/panel-component/grid-container/grid-container.controller.d.ts +3 -3
- package/es/panel-component/grid-container/grid-container.controller.d.ts.map +1 -1
- package/es/panel-component/grid-container/grid-container.controller.mjs +2 -2
- package/es/panel-component/grid-container/grid-container.d.ts +8 -6
- package/es/panel-component/grid-container/grid-container.d.ts.map +1 -1
- package/es/panel-component/grid-container/grid-container.mjs +17 -6
- package/es/panel-component/grid-container/grid-container.state.d.ts +3 -3
- package/es/panel-component/grid-container/grid-container.state.d.ts.map +1 -1
- package/es/panel-component/grid-container/grid-container.state.mjs +2 -2
- package/es/panel-component/grid-container/index.d.ts +8 -6
- package/es/panel-component/grid-container/index.d.ts.map +1 -1
- package/es/panel-component/index.d.ts +0 -1
- package/es/panel-component/index.d.ts.map +1 -1
- package/es/panel-component/index.mjs +1 -5
- package/es/panel-component/multi-data-container/index.d.ts +6 -4
- package/es/panel-component/multi-data-container/index.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts +4 -4
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +88 -69
- package/es/panel-component/multi-data-container/multi-data-container.d.ts +7 -5
- package/es/panel-component/multi-data-container/multi-data-container.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.mjs +20 -6
- package/es/panel-component/multi-data-container/multi-data-container.state.d.ts +3 -3
- package/es/panel-component/multi-data-container/multi-data-container.state.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.state.mjs +2 -2
- package/es/panel-component/multi-data-container-raw/index.d.ts +6 -4
- package/es/panel-component/multi-data-container-raw/index.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts +4 -4
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.mjs +88 -69
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts +7 -5
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.mjs +23 -7
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.state.d.ts +3 -3
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.state.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.state.mjs +2 -2
- package/es/panel-component/nav-pos/index.d.ts +7 -5
- package/es/panel-component/nav-pos/index.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts +1 -1
- package/es/panel-component/nav-pos/nav-pos.d.ts +8 -6
- package/es/panel-component/nav-pos/nav-pos.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.mjs +20 -5
- package/es/panel-component/panel-container/index.d.ts +7 -6
- package/es/panel-component/panel-container/index.d.ts.map +1 -1
- package/es/panel-component/panel-container/index.mjs +1 -2
- package/es/panel-component/panel-container/panel-container.d.ts +7 -5
- package/es/panel-component/panel-container/panel-container.d.ts.map +1 -1
- package/es/panel-component/panel-container/panel-container.mjs +36 -15
- package/es/panel-component/panel-container/panel-container.provider.d.ts +2 -2
- package/es/panel-component/panel-container/panel-container.provider.d.ts.map +1 -1
- package/es/panel-component/panel-container/panel-container.provider.mjs +1 -1
- package/es/panel-component/panel-container-image/index.d.ts +6 -4
- package/es/panel-component/panel-container-image/index.d.ts.map +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.controller.d.ts +3 -3
- package/es/panel-component/panel-container-image/panel-container-image.controller.d.ts.map +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.controller.mjs +2 -2
- package/es/panel-component/panel-container-image/panel-container-image.css +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.d.ts +6 -4
- package/es/panel-component/panel-container-image/panel-container-image.d.ts.map +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.mjs +24 -10
- package/es/panel-component/panel-container-image/panel-container-image.state.d.ts +3 -3
- package/es/panel-component/panel-container-image/panel-container-image.state.d.ts.map +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.state.mjs +2 -2
- package/es/panel-component/panel-container-tabs/index.d.ts +6 -6
- package/es/panel-component/panel-container-tabs/index.d.ts.map +1 -1
- package/es/panel-component/panel-container-tabs/panel-container-tabs.d.ts +5 -5
- package/es/panel-component/panel-container-tabs/panel-container-tabs.d.ts.map +1 -1
- package/es/panel-component/panel-container-tabs/panel-container-tabs.mjs +1 -1
- package/es/panel-component/panel-container-tabs/panel-container-tabs.provider.d.ts +2 -2
- package/es/panel-component/panel-container-tabs/panel-container-tabs.provider.d.ts.map +1 -1
- package/es/panel-component/panel-container-tabs/panel-container-tabs.provider.mjs +1 -1
- package/es/panel-component/panel-ctrl-pos/index.d.ts +6 -4
- package/es/panel-component/panel-ctrl-pos/index.d.ts.map +1 -1
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.d.ts +6 -4
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.d.ts.map +1 -1
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.mjs +12 -4
- package/es/panel-component/panel-ctrl-view-page-caption/index.d.ts +6 -4
- package/es/panel-component/panel-ctrl-view-page-caption/index.d.ts.map +1 -1
- package/es/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.css +1 -0
- package/es/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.d.ts +7 -4
- package/es/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.d.ts.map +1 -1
- package/es/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.mjs +16 -8
- package/es/panel-component/panel-field/index.d.ts +7 -4
- package/es/panel-component/panel-field/index.d.ts.map +1 -1
- package/es/panel-component/panel-field/panel-field.controller.d.ts +12 -0
- package/es/panel-component/panel-field/panel-field.controller.d.ts.map +1 -1
- package/es/panel-component/panel-field/panel-field.controller.mjs +37 -3
- package/es/panel-component/panel-field/panel-field.css +1 -1
- package/es/panel-component/panel-field/panel-field.d.ts +7 -4
- package/es/panel-component/panel-field/panel-field.d.ts.map +1 -1
- package/es/panel-component/panel-field/panel-field.mjs +29 -12
- package/es/panel-component/panel-item-render/index.d.ts +6 -4
- package/es/panel-component/panel-item-render/index.d.ts.map +1 -1
- package/es/panel-component/panel-item-render/panel-item-render.controller.d.ts.map +1 -1
- package/es/panel-component/panel-item-render/panel-item-render.controller.mjs +7 -5
- package/es/panel-component/panel-item-render/panel-item-render.d.ts +6 -4
- package/es/panel-component/panel-item-render/panel-item-render.d.ts.map +1 -1
- package/es/panel-component/panel-item-render/panel-item-render.mjs +13 -4
- package/es/panel-component/panel-rawitem/index.d.ts +8 -6
- package/es/panel-component/panel-rawitem/index.d.ts.map +1 -1
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts +8 -6
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts.map +1 -1
- package/es/panel-component/panel-rawitem/panel-rawitem.mjs +15 -10
- package/es/panel-component/panel-tab-page/index.d.ts +8 -6
- package/es/panel-component/panel-tab-page/index.d.ts.map +1 -1
- package/es/panel-component/panel-tab-page/panel-tab-page.d.ts +10 -8
- package/es/panel-component/panel-tab-page/panel-tab-page.d.ts.map +1 -1
- package/es/panel-component/panel-tab-page/panel-tab-page.mjs +23 -8
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.d.ts +2 -2
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.d.ts.map +1 -1
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.mjs +2 -2
- package/es/panel-component/scroll-container/index.d.ts +6 -4
- package/es/panel-component/scroll-container/index.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.d.ts +3 -3
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.mjs +2 -2
- package/es/panel-component/scroll-container/scroll-container/scroll-container.d.ts +6 -4
- package/es/panel-component/scroll-container/scroll-container/scroll-container.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container/scroll-container.mjs +26 -15
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.d.ts +3 -3
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.mjs +2 -2
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.d.ts +6 -4
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.mjs +21 -6
- package/es/panel-component/single-data-container/index.d.ts +6 -4
- package/es/panel-component/single-data-container/index.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +4 -4
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +98 -73
- package/es/panel-component/single-data-container/single-data-container.d.ts +7 -5
- package/es/panel-component/single-data-container/single-data-container.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.mjs +22 -6
- package/es/panel-component/single-data-container/single-data-container.state.d.ts +3 -3
- package/es/panel-component/single-data-container/single-data-container.state.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.state.mjs +2 -2
- package/es/panel-component/teleport-placeholder/index.d.ts +7 -5
- package/es/panel-component/teleport-placeholder/index.d.ts.map +1 -1
- package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts +7 -5
- package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts.map +1 -1
- package/es/panel-component/teleport-placeholder/teleport-placeholder.mjs +11 -4
- package/es/plugin/plugin-factory/plugin-factory.d.ts +15 -0
- package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
- package/es/plugin/plugin-factory/plugin-factory.mjs +34 -6
- package/es/props/editor/autocomplete.d.ts +2 -2
- package/es/props/editor/check-box-list.d.ts +2 -2
- package/es/props/editor/check-box.d.ts +2 -2
- package/es/props/editor/code.d.ts +17 -0
- package/es/props/editor/code.d.ts.map +1 -1
- package/es/props/editor/code.mjs +7 -2
- package/es/props/editor/common.d.ts +7 -0
- package/es/props/editor/common.d.ts.map +1 -1
- package/es/props/editor/common.mjs +5 -1
- package/es/props/editor/data-picker.d.ts +2 -2
- package/es/props/editor/date-picker.d.ts +2 -2
- package/es/props/editor/date-range-select.d.ts +4 -0
- package/es/props/editor/date-range-select.d.ts.map +1 -1
- package/es/props/editor/date-range.d.ts +2 -2
- package/es/props/editor/dropdown-list.d.ts +2 -2
- package/es/props/editor/html.d.ts +17 -0
- package/es/props/editor/html.d.ts.map +1 -1
- package/es/props/editor/html.mjs +7 -2
- package/es/props/editor/index.mjs +3 -3
- package/es/props/editor/list-box.d.ts +2 -2
- package/es/props/editor/markdown.d.ts +89 -0
- package/es/props/editor/markdown.d.ts.map +1 -1
- package/es/props/editor/markdown.mjs +28 -3
- package/es/props/editor/number-range.d.ts +2 -2
- package/es/props/editor/radio-button-list.d.ts +2 -2
- package/es/props/editor/rate.d.ts +2 -2
- package/es/props/editor/raw.d.ts +2 -2
- package/es/props/editor/slider.d.ts +2 -2
- package/es/props/editor/span.d.ts +18 -2
- package/es/props/editor/span.d.ts.map +1 -1
- package/es/props/editor/span.mjs +6 -1
- package/es/props/editor/stepper.d.ts +2 -2
- package/es/props/editor/switch.d.ts +2 -2
- package/es/props/editor/text-box.d.ts +2 -2
- package/es/props/index.mjs +3 -3
- package/es/use/index.d.ts +2 -0
- package/es/use/index.d.ts.map +1 -1
- package/es/use/index.mjs +4 -2
- package/es/use/popover/popover.d.ts +7 -0
- package/es/use/popover/popover.d.ts.map +1 -1
- package/es/use/popover/popover.mjs +9 -2
- package/es/use/storage/index.d.ts +4 -6
- package/es/use/storage/index.d.ts.map +1 -1
- package/es/use/storage/index.mjs +16 -11
- package/es/use/tooltip/tooltip.d.ts +103 -0
- package/es/use/tooltip/tooltip.d.ts.map +1 -0
- package/es/use/tooltip/tooltip.mjs +68 -0
- package/es/use/use-semantic-node/use-semantic-node.d.ts +15 -0
- package/es/use/use-semantic-node/use-semantic-node.d.ts.map +1 -0
- package/es/use/use-semantic-node/use-semantic-node.mjs +100 -0
- package/es/use/vue/vue.d.ts +9 -0
- package/es/use/vue/vue.d.ts.map +1 -1
- package/es/use/vue/vue.mjs +15 -2
- package/es/util/index.d.ts +0 -1
- package/es/util/index.d.ts.map +1 -1
- package/es/util/index.mjs +0 -1
- package/es/util/install.d.ts.map +1 -1
- package/es/util/overlay-container/overlay-container.d.ts +1 -1
- package/es/util/overlay-container/overlay-container.d.ts.map +1 -1
- package/es/util/overlay-container/overlay-container.mjs +7 -2
- package/es/util/overlay-view-util/overlay-view-util.d.ts +2 -2
- package/es/util/overlay-view-util/overlay-view-util.d.ts.map +1 -1
- package/es/util/overlay-view-util/overlay-view-util.mjs +2 -1
- package/es/util/route/route.d.ts.map +1 -1
- package/es/util/route/route.mjs +13 -3
- package/es/util/store/app-store/app-store.d.ts +2 -2
- package/es/util/store/ui-store/ui-store.d.ts +2 -2
- package/es/view/app-redirect-view/app-redirect-view.d.ts +1 -1
- package/es/view/app-redirect-view/app-redirect-view.d.ts.map +1 -1
- package/es/view/app-redirect-view/app-redirect-view.mjs +1 -1
- package/es/view/common/index.d.ts +5 -5
- package/es/view/common/index.d.ts.map +1 -1
- package/es/view/common/view.d.ts +5 -5
- package/es/view/common/view.d.ts.map +1 -1
- package/es/view/common/view.mjs +17 -3
- package/es/view/de-redirect-view/de-redirect-view.d.ts +8 -8
- package/es/view/de-redirect-view/de-redirect-view.d.ts.map +1 -1
- package/es/view/de-redirect-view/de-redirect-view.mjs +1 -1
- package/es/view/de-redirect-view/index.d.ts +8 -8
- package/es/view/de-redirect-view/index.d.ts.map +1 -1
- package/es/view/html-view/html-view.d.ts +8 -9
- package/es/view/html-view/html-view.d.ts.map +1 -1
- package/es/view/html-view/html-view.mjs +10 -17
- package/es/view/html-view/index.d.ts +7 -8
- package/es/view/html-view/index.d.ts.map +1 -1
- package/es/view/portal-view/index.d.ts +5 -5
- package/es/view/portal-view/index.d.ts.map +1 -1
- package/es/view/portal-view/portal-view.d.ts +5 -5
- package/es/view/portal-view/portal-view.d.ts.map +1 -1
- package/es/view/todo-redirect/todo-redirect.d.ts +1 -1
- package/es/view/todo-redirect/todo-redirect.d.ts.map +1 -1
- package/lib/common/badge/badge.cjs +12 -6
- package/lib/common/badge/badge.css +1 -1
- package/lib/common/control-base/control-base.cjs +8 -14
- package/lib/common/icon/icon.cjs +12 -0
- package/lib/common/index.cjs +2 -0
- package/lib/common/signature-pad/signature-pad.cjs +167 -0
- package/lib/common/signature-pad/signature-pad.css +1 -0
- package/lib/common/signature-pad/util/bezier.cjs +111 -0
- package/lib/common/signature-pad/util/point.cjs +53 -0
- package/lib/common/signature-pad/util/signature_pad.cjs +1022 -0
- package/lib/common/view-shell/view-shell.cjs +40 -21
- package/lib/control/panel/panel/panel.cjs +11 -3
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +4 -4
- package/lib/index.cjs +57 -47
- package/lib/locale/en/index.cjs +2 -1
- package/lib/locale/zh-CN/index.cjs +2 -1
- package/lib/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.cjs +2 -2
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.cjs +16 -5
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.cjs +3 -1
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.css +1 -1
- package/lib/panel-component/grid-container/grid-container.cjs +16 -5
- package/lib/panel-component/grid-container/grid-container.controller.cjs +1 -1
- package/lib/panel-component/grid-container/grid-container.state.cjs +1 -1
- package/lib/panel-component/index.cjs +21 -22
- package/lib/panel-component/multi-data-container/multi-data-container.cjs +19 -5
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +87 -68
- package/lib/panel-component/multi-data-container/multi-data-container.state.cjs +1 -1
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.cjs +22 -6
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.controller.cjs +87 -68
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.state.cjs +1 -1
- package/lib/panel-component/nav-pos/nav-pos.cjs +18 -3
- package/lib/panel-component/panel-container/index.cjs +8 -4
- package/lib/panel-component/panel-container/panel-container.cjs +36 -15
- package/lib/panel-component/panel-container/panel-container.provider.cjs +2 -2
- package/lib/panel-component/panel-container-image/panel-container-image.cjs +23 -9
- package/lib/panel-component/panel-container-image/panel-container-image.controller.cjs +1 -1
- package/lib/panel-component/panel-container-image/panel-container-image.css +1 -1
- package/lib/panel-component/panel-container-image/panel-container-image.state.cjs +1 -1
- package/lib/panel-component/panel-container-tabs/panel-container-tabs.cjs +2 -2
- package/lib/panel-component/panel-container-tabs/panel-container-tabs.provider.cjs +2 -2
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.cjs +11 -3
- package/lib/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.cjs +15 -7
- package/lib/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.css +1 -0
- package/lib/panel-component/panel-field/panel-field.cjs +28 -11
- package/lib/panel-component/panel-field/panel-field.controller.cjs +37 -3
- package/lib/panel-component/panel-field/panel-field.css +1 -1
- package/lib/panel-component/panel-item-render/panel-item-render.cjs +12 -3
- package/lib/panel-component/panel-item-render/panel-item-render.controller.cjs +7 -5
- package/lib/panel-component/panel-rawitem/panel-rawitem.cjs +14 -9
- package/lib/panel-component/panel-tab-page/panel-tab-page.cjs +21 -6
- package/lib/panel-component/panel-tab-page/panel-tab-page.provider.cjs +1 -1
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.cjs +25 -14
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.controller.cjs +1 -1
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.cjs +20 -5
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.cjs +1 -1
- package/lib/panel-component/single-data-container/single-data-container.cjs +21 -5
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +97 -72
- package/lib/panel-component/single-data-container/single-data-container.state.cjs +1 -1
- package/lib/panel-component/teleport-placeholder/teleport-placeholder.cjs +10 -3
- package/lib/plugin/plugin-factory/plugin-factory.cjs +33 -5
- package/lib/props/editor/code.cjs +6 -0
- package/lib/props/editor/common.cjs +5 -1
- package/lib/props/editor/html.cjs +6 -0
- package/lib/props/editor/index.cjs +3 -0
- package/lib/props/editor/markdown.cjs +27 -1
- package/lib/props/editor/span.cjs +6 -1
- package/lib/props/index.cjs +3 -0
- package/lib/use/index.cjs +8 -0
- package/lib/use/popover/popover.cjs +8 -0
- package/lib/use/storage/index.cjs +16 -11
- package/lib/use/tooltip/tooltip.cjs +72 -0
- package/lib/use/use-semantic-node/use-semantic-node.cjs +102 -0
- package/lib/use/vue/vue.cjs +14 -0
- package/lib/util/index.cjs +0 -2
- package/lib/util/overlay-container/overlay-container.cjs +7 -2
- package/lib/util/overlay-view-util/overlay-view-util.cjs +2 -1
- package/lib/util/route/route.cjs +13 -3
- package/lib/view/common/view.cjs +15 -1
- package/lib/view/html-view/html-view.cjs +8 -15
- package/package.json +8 -7
- package/src/common/badge/badge.scss +49 -0
- package/src/common/badge/badge.tsx +55 -0
- package/src/common/code-list/code-list.scss +15 -0
- package/src/common/code-list/code-list.tsx +184 -0
- package/src/common/control-base/control-base.scss +42 -0
- package/src/common/control-base/control-base.tsx +308 -0
- package/src/common/control-loading-placeholder/control-loading-placeholder.tsx +22 -0
- package/src/common/control-shell/control-shell.scss +5 -0
- package/src/common/control-shell/control-shell.tsx +90 -0
- package/src/common/custom-render/custom-render.scss +4 -0
- package/src/common/custom-render/custom-render.tsx +111 -0
- package/src/common/icon/icon.scss +13 -0
- package/src/common/icon/icon.tsx +105 -0
- package/src/common/index.ts +10 -0
- package/src/common/router-view/router-view.tsx +74 -0
- package/src/common/signature-pad/signature-pad.scss +10 -0
- package/src/common/signature-pad/signature-pad.tsx +174 -0
- package/src/common/signature-pad/util/bezier.ts +164 -0
- package/src/common/signature-pad/util/point.ts +96 -0
- package/src/common/signature-pad/util/signature_pad.ts +1543 -0
- package/src/common/view-shell/view-shell.scss +5 -0
- package/src/common/view-shell/view-shell.tsx +337 -0
- package/src/control/index.ts +1 -0
- package/src/control/panel/index.ts +2 -0
- package/src/control/panel/panel/index.ts +12 -0
- package/src/control/panel/panel/panel.provider.ts +14 -0
- package/src/control/panel/panel/panel.scss +9 -0
- package/src/control/panel/panel/panel.tsx +273 -0
- package/src/control/panel/view-layout-panel/index.ts +18 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.provider.ts +14 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.scss +9 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.tsx +266 -0
- package/src/hooks/app/app.hooks.ts +63 -0
- package/src/hooks/index.ts +1 -0
- package/src/index.ts +19 -0
- package/src/interface/index.ts +1 -0
- package/src/interface/util/index.ts +1 -0
- package/src/interface/util/route/route.ts +116 -0
- package/src/locale/en/index.ts +74 -0
- package/src/locale/index.ts +2 -0
- package/src/locale/zh-CN/index.ts +66 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.ts +248 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.ts +28 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.scss +51 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.ts +58 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.tsx +109 -0
- package/src/panel-component/auth-wxmp-qrcode/index.ts +18 -0
- package/src/panel-component/grid-container/grid-container.controller.ts +24 -0
- package/src/panel-component/grid-container/grid-container.provider.ts +30 -0
- package/src/panel-component/grid-container/grid-container.scss +17 -0
- package/src/panel-component/grid-container/grid-container.state.ts +12 -0
- package/src/panel-component/grid-container/grid-container.tsx +141 -0
- package/src/panel-component/grid-container/index.ts +19 -0
- package/src/panel-component/index.ts +17 -0
- package/src/panel-component/multi-data-container/index.ts +22 -0
- package/src/panel-component/multi-data-container/multi-data-container-item.controller.ts +179 -0
- package/src/panel-component/multi-data-container/multi-data-container-itm.state.ts +20 -0
- package/src/panel-component/multi-data-container/multi-data-container.controller.ts +456 -0
- package/src/panel-component/multi-data-container/multi-data-container.provider.ts +30 -0
- package/src/panel-component/multi-data-container/multi-data-container.scss +10 -0
- package/src/panel-component/multi-data-container/multi-data-container.state.ts +19 -0
- package/src/panel-component/multi-data-container/multi-data-container.tsx +137 -0
- package/src/panel-component/multi-data-container-raw/index.ts +22 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.controller.ts +448 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.provider.ts +30 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.scss +12 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.state.ts +19 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.tsx +129 -0
- package/src/panel-component/nav-pos/index.ts +16 -0
- package/src/panel-component/nav-pos/nav-pos.controller.ts +438 -0
- package/src/panel-component/nav-pos/nav-pos.provider.ts +38 -0
- package/src/panel-component/nav-pos/nav-pos.scss +4 -0
- package/src/panel-component/nav-pos/nav-pos.state.ts +55 -0
- package/src/panel-component/nav-pos/nav-pos.tsx +166 -0
- package/src/panel-component/panel-container/index.ts +30 -0
- package/src/panel-component/panel-container/panel-container.provider.ts +30 -0
- package/src/panel-component/panel-container/panel-container.scss +21 -0
- package/src/panel-component/panel-container/panel-container.tsx +138 -0
- package/src/panel-component/panel-container-image/index.ts +22 -0
- package/src/panel-component/panel-container-image/panel-container-image.controller.ts +24 -0
- package/src/panel-component/panel-container-image/panel-container-image.provider.ts +30 -0
- package/src/panel-component/panel-container-image/panel-container-image.scss +17 -0
- package/src/panel-component/panel-container-image/panel-container-image.state.ts +12 -0
- package/src/panel-component/panel-container-image/panel-container-image.tsx +116 -0
- package/src/panel-component/panel-container-tabs/index.ts +18 -0
- package/src/panel-component/panel-container-tabs/panel-container-tabs.provider.ts +30 -0
- package/src/panel-component/panel-container-tabs/panel-container-tabs.scss +25 -0
- package/src/panel-component/panel-container-tabs/panel-container-tabs.tsx +47 -0
- package/src/panel-component/panel-ctrl-pos/index.ts +14 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.ts +50 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.ts +30 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.scss +8 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.tsx +72 -0
- package/src/panel-component/panel-ctrl-view-page-caption/index.ts +18 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.controller.ts +32 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.provider.ts +30 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.scss +13 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.state.ts +17 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.tsx +77 -0
- package/src/panel-component/panel-field/index.ts +14 -0
- package/src/panel-component/panel-field/panel-field.controller.ts +272 -0
- package/src/panel-component/panel-field/panel-field.provider.ts +28 -0
- package/src/panel-component/panel-field/panel-field.scss +79 -0
- package/src/panel-component/panel-field/panel-field.state.ts +17 -0
- package/src/panel-component/panel-field/panel-field.tsx +138 -0
- package/src/panel-component/panel-item-render/index.ts +18 -0
- package/src/panel-component/panel-item-render/panel-item-render.controller.ts +53 -0
- package/src/panel-component/panel-item-render/panel-item-render.provider.ts +30 -0
- package/src/panel-component/panel-item-render/panel-item-render.tsx +69 -0
- package/src/panel-component/panel-rawitem/index.ts +26 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.controller.ts +54 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.provider.ts +28 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.scss +8 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.tsx +126 -0
- package/src/panel-component/panel-tab-page/index.ts +12 -0
- package/src/panel-component/panel-tab-page/panel-tab-page.provider.ts +28 -0
- package/src/panel-component/panel-tab-page/panel-tab-page.tsx +83 -0
- package/src/panel-component/scroll-container/index.ts +44 -0
- package/src/panel-component/scroll-container/scroll-container/index.ts +2 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.controller.ts +29 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.provider.ts +30 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.scss +40 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.tsx +155 -0
- package/src/panel-component/scroll-container/scroll-container-item/index.ts +2 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.ts +21 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.ts +30 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.scss +9 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.tsx +80 -0
- package/src/panel-component/single-data-container/index.ts +22 -0
- package/src/panel-component/single-data-container/single-data-container.controller.ts +507 -0
- package/src/panel-component/single-data-container/single-data-container.provider.ts +30 -0
- package/src/panel-component/single-data-container/single-data-container.scss +10 -0
- package/src/panel-component/single-data-container/single-data-container.state.ts +17 -0
- package/src/panel-component/single-data-container/single-data-container.tsx +124 -0
- package/src/panel-component/teleport-placeholder/index.ts +20 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.controller.ts +54 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.provider.ts +30 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.scss +8 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.state.ts +17 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.tsx +65 -0
- package/src/plugin/index.ts +1 -0
- package/src/plugin/plugin-factory/plugin-factory.ts +519 -0
- package/src/props/common.ts +30 -0
- package/src/props/editor/array.ts +28 -0
- package/src/props/editor/autocomplete.ts +28 -0
- package/src/props/editor/cascader.ts +28 -0
- package/src/props/editor/check-box-list.ts +28 -0
- package/src/props/editor/check-box.ts +28 -0
- package/src/props/editor/code.ts +56 -0
- package/src/props/editor/color-picker.ts +28 -0
- package/src/props/editor/common.ts +120 -0
- package/src/props/editor/data-picker.ts +28 -0
- package/src/props/editor/date-picker.ts +29 -0
- package/src/props/editor/date-range-select.ts +52 -0
- package/src/props/editor/date-range.ts +29 -0
- package/src/props/editor/dropdown-list.ts +28 -0
- package/src/props/editor/html.ts +44 -0
- package/src/props/editor/index.ts +29 -0
- package/src/props/editor/input-ip.ts +28 -0
- package/src/props/editor/input-number.ts +28 -0
- package/src/props/editor/list-box.ts +28 -0
- package/src/props/editor/map-picker.ts +28 -0
- package/src/props/editor/markdown.ts +74 -0
- package/src/props/editor/number-range.ts +28 -0
- package/src/props/editor/radio-button-list.ts +28 -0
- package/src/props/editor/rate.ts +28 -0
- package/src/props/editor/raw.ts +28 -0
- package/src/props/editor/slider.ts +28 -0
- package/src/props/editor/span.ts +33 -0
- package/src/props/editor/stepper.ts +28 -0
- package/src/props/editor/switch.ts +28 -0
- package/src/props/editor/text-box.ts +28 -0
- package/src/props/editor/upload.ts +28 -0
- package/src/props/index.ts +2 -0
- package/src/types/index.d.ts +8 -0
- package/src/use/autofocus-blur/autofocus-blur.ts +31 -0
- package/src/use/click-outside/click-outside.ts +72 -0
- package/src/use/codeList-listen/codelist-listen.ts +28 -0
- package/src/use/control/index.ts +1 -0
- package/src/use/control/use-control-controller/use-control-controller.ts +186 -0
- package/src/use/event/event.ts +57 -0
- package/src/use/focus-blur/focus-blur.ts +83 -0
- package/src/use/index.ts +16 -0
- package/src/use/namespace/namespace.ts +14 -0
- package/src/use/popover/popover.ts +157 -0
- package/src/use/route/route.ts +47 -0
- package/src/use/storage/index.ts +46 -0
- package/src/use/tooltip/tooltip.ts +153 -0
- package/src/use/use-semantic-node/use-semantic-node.ts +154 -0
- package/src/use/util/index.ts +26 -0
- package/src/use/view/index.ts +2 -0
- package/src/use/view/use-view-controller/use-view-controller.ts +163 -0
- package/src/use/view/use-view-operation/use-view-operation.ts +44 -0
- package/src/use/vue/vue.ts +168 -0
- package/src/use/vue-use/computed-async.ts +151 -0
- package/src/use/vue-use/index.ts +1 -0
- package/src/util/index.ts +9 -0
- package/src/util/install.ts +14 -0
- package/src/util/overlay-container/overlay-container.ts +162 -0
- package/src/util/overlay-popover-container/overlay-popover-container.ts +30 -0
- package/src/util/overlay-view-util/overlay-view-util.ts +93 -0
- package/src/util/render/render.ts +54 -0
- package/src/util/route/route-listener.ts +91 -0
- package/src/util/route/route.ts +606 -0
- package/src/util/router-callback/router-callback-item.ts +98 -0
- package/src/util/router-callback/router-callback.ts +110 -0
- package/src/util/store/app-store/app-store.ts +10 -0
- package/src/util/store/index.ts +6 -0
- package/src/util/store/ui-store/ui-store.ts +37 -0
- package/src/util/store/ui-store/z-index.ts +53 -0
- package/src/view/app-data-upload-view/app-data-upload-view.provider.ts +31 -0
- package/src/view/app-redirect-view/app-redirect-view.tsx +26 -0
- package/src/view/common/index.ts +19 -0
- package/src/view/common/view.provider.ts +14 -0
- package/src/view/common/view.scss +39 -0
- package/src/view/common/view.tsx +285 -0
- package/src/view/de-redirect-view/de-redirect-view.provider.ts +14 -0
- package/src/view/de-redirect-view/de-redirect-view.tsx +86 -0
- package/src/view/de-redirect-view/index.ts +17 -0
- package/src/view/html-view/html-view.provider.ts +14 -0
- package/src/view/html-view/html-view.scss +7 -0
- package/src/view/html-view/html-view.tsx +86 -0
- package/src/view/html-view/index.ts +10 -0
- package/src/view/index.ts +6 -0
- package/src/view/md-custom-view/md-custom-view.provider.ts +30 -0
- package/src/view/portal-view/index.ts +18 -0
- package/src/view/portal-view/portal-view.provider.ts +14 -0
- package/src/view/portal-view/portal-view.tsx +83 -0
- package/src/view/todo-redirect/todo-redirect.tsx +51 -0
- package/es/panel-component/panel-container/panel-container.controller.d.ts +0 -21
- package/es/panel-component/panel-container/panel-container.controller.d.ts.map +0 -1
- package/es/panel-component/panel-container/panel-container.controller.mjs +0 -12
- package/es/panel-component/panel-container/panel-container.state.d.ts +0 -10
- package/es/panel-component/panel-container/panel-container.state.d.ts.map +0 -1
- package/es/panel-component/panel-container/panel-container.state.mjs +0 -7
- package/es/panel-component/panel-container-group/index.d.ts +0 -29
- package/es/panel-component/panel-container-group/index.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/index.mjs +0 -21
- package/es/panel-component/panel-container-group/panel-container-group.controller.d.ts +0 -34
- package/es/panel-component/panel-container-group/panel-container-group.controller.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.controller.mjs +0 -31
- package/es/panel-component/panel-container-group/panel-container-group.css +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.d.ts +0 -46
- package/es/panel-component/panel-container-group/panel-container-group.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.mjs +0 -119
- package/es/panel-component/panel-container-group/panel-container-group.provider.d.ts +0 -16
- package/es/panel-component/panel-container-group/panel-container-group.provider.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.provider.mjs +0 -15
- package/es/panel-component/panel-container-group/panel-container-group.state.d.ts +0 -13
- package/es/panel-component/panel-container-group/panel-container-group.state.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.state.mjs +0 -7
- package/es/util/control/prepare-control.d.ts +0 -15
- package/es/util/control/prepare-control.d.ts.map +0 -1
- package/es/util/control/prepare-control.mjs +0 -22
- package/lib/panel-component/panel-container/panel-container.controller.cjs +0 -14
- package/lib/panel-component/panel-container/panel-container.state.cjs +0 -9
- package/lib/panel-component/panel-container-group/index.cjs +0 -28
- package/lib/panel-component/panel-container-group/panel-container-group.cjs +0 -121
- package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +0 -33
- package/lib/panel-component/panel-container-group/panel-container-group.css +0 -1
- package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +0 -17
- package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +0 -9
- package/lib/util/control/prepare-control.cjs +0 -24
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ModelError,
|
|
3
|
+
RuntimeError,
|
|
4
|
+
RuntimeModelError,
|
|
5
|
+
} from '@ibiz-template/core';
|
|
6
|
+
import {
|
|
7
|
+
convertNavData,
|
|
8
|
+
execDELogicById,
|
|
9
|
+
getAllPanelField,
|
|
10
|
+
getPanelItemProvider,
|
|
11
|
+
IPanelController,
|
|
12
|
+
IPanelDataContainerController,
|
|
13
|
+
IPanelItemContainerController,
|
|
14
|
+
IPanelItemController,
|
|
15
|
+
IPanelItemProvider,
|
|
16
|
+
isDataContainer,
|
|
17
|
+
IViewController,
|
|
18
|
+
PanelData,
|
|
19
|
+
PanelContainerController,
|
|
20
|
+
PanelNotifyState,
|
|
21
|
+
ScriptFactory,
|
|
22
|
+
PanelDataContainerEventName,
|
|
23
|
+
} from '@ibiz-template/runtime';
|
|
24
|
+
import { IPanelContainer, IPanelItem, IPanelTabPanel } from '@ibiz/model-core';
|
|
25
|
+
import { SingleDataContainerState } from './single-data-container.state';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @description 单项数据容器控制器
|
|
29
|
+
* @export
|
|
30
|
+
* @class SingleDataContainerController
|
|
31
|
+
* @extends {PanelContainerController<IPanelContainer>}
|
|
32
|
+
* @implements {IPanelDataContainerController}
|
|
33
|
+
*/
|
|
34
|
+
export class SingleDataContainerController
|
|
35
|
+
extends PanelContainerController<IPanelContainer>
|
|
36
|
+
implements IPanelDataContainerController
|
|
37
|
+
{
|
|
38
|
+
/**
|
|
39
|
+
* @description 单项数据容器状态
|
|
40
|
+
* @exposedoc
|
|
41
|
+
* @type {SingleDataContainerState}
|
|
42
|
+
* @memberof SingleDataContainerController
|
|
43
|
+
*/
|
|
44
|
+
declare state: SingleDataContainerState;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @description 是否是数据父容器
|
|
48
|
+
* @exposedoc
|
|
49
|
+
* @memberof SingleDataContainerController
|
|
50
|
+
*/
|
|
51
|
+
readonly isDataContainer = true;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @description 所有面板成员的控制器
|
|
55
|
+
* @exposedoc
|
|
56
|
+
* @type {{ [key: string]: IPanelItemController }}
|
|
57
|
+
* @memberof SingleDataContainerController
|
|
58
|
+
*/
|
|
59
|
+
panelItems: { [key: string]: IPanelItemController } = {};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @description 所有面板成员的适配器
|
|
63
|
+
* @type {{ [key: string]: IPanelItemProvider }}
|
|
64
|
+
* @memberof SingleDataContainerController
|
|
65
|
+
*/
|
|
66
|
+
providers: { [key: string]: IPanelItemProvider } = {};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @description 单项数据容器数据,根据配置的数据模式计算后返回的数据
|
|
70
|
+
* @exposedoc
|
|
71
|
+
* @readonly
|
|
72
|
+
* @type {IData}
|
|
73
|
+
* @memberof SingleDataContainerController
|
|
74
|
+
*/
|
|
75
|
+
get data(): IData {
|
|
76
|
+
return this.state.data;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
protected createState(): SingleDataContainerState {
|
|
80
|
+
return new SingleDataContainerState(this.parent?.state);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
protected async onInit(): Promise<void> {
|
|
84
|
+
await super.onInit();
|
|
85
|
+
await this.initPanelItemControllers();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 面板状态变更通知
|
|
90
|
+
*
|
|
91
|
+
* @param {PanelNotifyState} _state
|
|
92
|
+
* @return {*} {Promise<void>}
|
|
93
|
+
* @memberof SingleDataContainerController
|
|
94
|
+
*/
|
|
95
|
+
async panelStateNotify(_state: PanelNotifyState): Promise<void> {
|
|
96
|
+
super.panelStateNotify(_state);
|
|
97
|
+
if (_state === PanelNotifyState.LOAD) {
|
|
98
|
+
this.initContainerData();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 初始化面板成员控制器
|
|
104
|
+
*
|
|
105
|
+
* @author lxm
|
|
106
|
+
* @date 2022-08-24 21:08:48
|
|
107
|
+
* @protected
|
|
108
|
+
*/
|
|
109
|
+
protected async initPanelItemControllers(
|
|
110
|
+
panelItems: IPanelItem[] | undefined = this.model.panelItems,
|
|
111
|
+
panel: IPanelController = this.panel,
|
|
112
|
+
parent: IPanelItemContainerController | undefined = this,
|
|
113
|
+
): Promise<void> {
|
|
114
|
+
if (!panelItems) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
await Promise.all(
|
|
118
|
+
panelItems.map(async panelItem => {
|
|
119
|
+
// 生成面板成员控制器
|
|
120
|
+
const panelItemProvider = await getPanelItemProvider(
|
|
121
|
+
panelItem,
|
|
122
|
+
panel.model,
|
|
123
|
+
panel.view.model,
|
|
124
|
+
);
|
|
125
|
+
if (!panelItemProvider) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.providers[panelItem.id!] = panelItemProvider;
|
|
129
|
+
const panelItemController = await panelItemProvider.createController(
|
|
130
|
+
panelItem,
|
|
131
|
+
panel,
|
|
132
|
+
parent,
|
|
133
|
+
);
|
|
134
|
+
this.panelItems[panelItem.id!] = panelItemController;
|
|
135
|
+
// 有子成员的,且不是数据容器的。生成子控制器
|
|
136
|
+
if (
|
|
137
|
+
(panelItem as IPanelContainer).panelItems?.length &&
|
|
138
|
+
!isDataContainer(panelItem)
|
|
139
|
+
) {
|
|
140
|
+
await this.initPanelItemControllers(
|
|
141
|
+
(panelItem as IPanelContainer).panelItems,
|
|
142
|
+
panel,
|
|
143
|
+
panelItemController as IPanelItemContainerController,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
if ((panelItem as IPanelTabPanel).panelTabPages?.length) {
|
|
147
|
+
await this.initPanelItemControllers(
|
|
148
|
+
(panelItem as IPanelTabPanel).panelTabPages,
|
|
149
|
+
panel,
|
|
150
|
+
panelItemController as IPanelItemContainerController,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
}),
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* 计算导航参数
|
|
159
|
+
*
|
|
160
|
+
* @author tony001
|
|
161
|
+
* @date 2024-07-30 18:07:52
|
|
162
|
+
* @protected
|
|
163
|
+
* @return {*} {IData}
|
|
164
|
+
*/
|
|
165
|
+
protected computeNavParams(): IData {
|
|
166
|
+
const parentData = this.dataParent.data || {};
|
|
167
|
+
const { navigateContexts, navigateParams } = this.model;
|
|
168
|
+
const context = this.panel.context.clone();
|
|
169
|
+
Object.assign(
|
|
170
|
+
context,
|
|
171
|
+
convertNavData(
|
|
172
|
+
navigateContexts,
|
|
173
|
+
parentData,
|
|
174
|
+
this.panel.context,
|
|
175
|
+
this.panel.params,
|
|
176
|
+
),
|
|
177
|
+
);
|
|
178
|
+
const params = convertNavData(
|
|
179
|
+
navigateParams,
|
|
180
|
+
parentData,
|
|
181
|
+
this.panel.context,
|
|
182
|
+
this.panel.params,
|
|
183
|
+
);
|
|
184
|
+
Object.assign(params, this.panel.params);
|
|
185
|
+
return { context, params };
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* 根据来源类型初始化容器数据
|
|
190
|
+
* @author lxm
|
|
191
|
+
* @date 2023-08-04 03:05:59
|
|
192
|
+
* @protected
|
|
193
|
+
*/
|
|
194
|
+
protected async initContainerData(): Promise<void> {
|
|
195
|
+
const {
|
|
196
|
+
dataName,
|
|
197
|
+
scriptCode,
|
|
198
|
+
dataSourceType,
|
|
199
|
+
dataRegionType,
|
|
200
|
+
showBusyIndicator,
|
|
201
|
+
} = this.model;
|
|
202
|
+
try {
|
|
203
|
+
if (showBusyIndicator) this.startLoading();
|
|
204
|
+
// 登录表单
|
|
205
|
+
if (dataRegionType === 'LOGINFORM') {
|
|
206
|
+
this.setLoginForm();
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
switch (dataSourceType) {
|
|
210
|
+
case 'DEACTION':
|
|
211
|
+
case 'DEDATASET':
|
|
212
|
+
await this.setDataByDeMethod();
|
|
213
|
+
break;
|
|
214
|
+
case 'APPGLOBALPARAM':
|
|
215
|
+
this.setDataByAppGlobalParam();
|
|
216
|
+
break;
|
|
217
|
+
case 'DELOGIC':
|
|
218
|
+
await this.setDataByDeLogic();
|
|
219
|
+
break;
|
|
220
|
+
case 'TOPVIEWSESSIONPARAM': {
|
|
221
|
+
if (!dataName) {
|
|
222
|
+
throw new RuntimeModelError(
|
|
223
|
+
this.model,
|
|
224
|
+
ibiz.i18n.t('vue3Util.panelComponent.noConfiguardDataObject'),
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
this.bindViewData(this.panel.getTopView(), dataName);
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
case 'VIEWSESSIONPARAM': {
|
|
231
|
+
if (!dataName) {
|
|
232
|
+
throw new RuntimeModelError(
|
|
233
|
+
this.model,
|
|
234
|
+
ibiz.i18n.t('vue3Util.panelComponent.noConfiguardDataObject'),
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
this.bindViewData(this.panel.view, dataName);
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
case 'ACTIVEDATAPARAM': {
|
|
241
|
+
if (!dataName) {
|
|
242
|
+
throw new RuntimeModelError(
|
|
243
|
+
this.model,
|
|
244
|
+
ibiz.i18n.t('vue3Util.panelComponent.noConfiguardDataObject'),
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
await this.setData(this.dataParent.data[dataName]);
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
case 'CUSTOM': {
|
|
251
|
+
if (!scriptCode) {
|
|
252
|
+
throw new RuntimeModelError(
|
|
253
|
+
this.model,
|
|
254
|
+
ibiz.i18n.t('vue3Util.panelComponent.noConfiguredScript'),
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
const computeData = ScriptFactory.execScriptFn(
|
|
258
|
+
{
|
|
259
|
+
...this.panel.getEventArgs(),
|
|
260
|
+
data: this.dataParent.data,
|
|
261
|
+
},
|
|
262
|
+
scriptCode,
|
|
263
|
+
{
|
|
264
|
+
isAsync: false,
|
|
265
|
+
singleRowReturn: true,
|
|
266
|
+
},
|
|
267
|
+
) as IData;
|
|
268
|
+
await this.setData(computeData);
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
default:
|
|
272
|
+
throw new ModelError(
|
|
273
|
+
this.model,
|
|
274
|
+
ibiz.i18n.t('vue3Util.panelComponent.noSupportedDataSourceType', {
|
|
275
|
+
dataSourceType,
|
|
276
|
+
}),
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
} finally {
|
|
280
|
+
if (showBusyIndicator) this.endLoading();
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* 面板状态变更通知
|
|
286
|
+
*
|
|
287
|
+
* @author lxm
|
|
288
|
+
* @date 2022-09-20 18:09:07
|
|
289
|
+
*/
|
|
290
|
+
childrenStateNotify(state: PanelNotifyState): void {
|
|
291
|
+
Object.values(this.panelItems).forEach(panelItem => {
|
|
292
|
+
panelItem.panelStateNotify(state);
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @description 设置单项数据容器数据
|
|
298
|
+
* @exposedoc
|
|
299
|
+
* @param {IData} data 单项数据容器数据
|
|
300
|
+
* @returns {*} {Promise<void>}
|
|
301
|
+
* @memberof SingleDataContainerController
|
|
302
|
+
*/
|
|
303
|
+
async setData(data: IData): Promise<void> {
|
|
304
|
+
const fields = getAllPanelField(this.model);
|
|
305
|
+
const fieldKeys = fields.map(item => item.id!);
|
|
306
|
+
const panelData = new PanelData(fields, data);
|
|
307
|
+
|
|
308
|
+
// 面板属性变更的触发变更通知
|
|
309
|
+
panelData._evt.on('change', key => {
|
|
310
|
+
if (fieldKeys.includes(key)) {
|
|
311
|
+
this.childDataChangeNotify([key]);
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
// 清空上一个,如果存在的话。
|
|
315
|
+
this.data.destroy?.();
|
|
316
|
+
this.state.data = panelData;
|
|
317
|
+
this.childrenStateNotify(PanelNotifyState.LOAD);
|
|
318
|
+
this.panel.evt.emit('onPanelDataContainerEvent', {
|
|
319
|
+
panelDataContainerName: this.model.id!,
|
|
320
|
+
panelDataContainerEventName: PanelDataContainerEventName.onLoadSuccess,
|
|
321
|
+
data: [this.data],
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* 设置登录表单数据
|
|
327
|
+
*
|
|
328
|
+
* @protected
|
|
329
|
+
* @memberof SingleDataContainerController
|
|
330
|
+
*/
|
|
331
|
+
protected setLoginForm(): void {
|
|
332
|
+
this.setData({});
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* 通过实体设置视图逻辑
|
|
337
|
+
* @author lxm
|
|
338
|
+
* @date 2023-08-04 03:00:31
|
|
339
|
+
* @protected
|
|
340
|
+
* @return {*} {Promise<void>}
|
|
341
|
+
*/
|
|
342
|
+
protected async setDataByDeLogic(): Promise<void> {
|
|
343
|
+
const { appDataEntityId, appDELogicId } = this.model;
|
|
344
|
+
if (!appDELogicId) {
|
|
345
|
+
throw new RuntimeModelError(
|
|
346
|
+
this.model,
|
|
347
|
+
ibiz.i18n.t('vue3Util.panelComponent.noConfiguredEntityLogic'),
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
if (!appDataEntityId) {
|
|
351
|
+
throw new RuntimeModelError(
|
|
352
|
+
this.model,
|
|
353
|
+
ibiz.i18n.t('vue3Util.panelComponent.noConfiguredEntity'),
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
const { context, params } = this.computeNavParams();
|
|
357
|
+
const data = await execDELogicById(
|
|
358
|
+
appDELogicId,
|
|
359
|
+
appDataEntityId,
|
|
360
|
+
context,
|
|
361
|
+
this.panel.data,
|
|
362
|
+
params,
|
|
363
|
+
);
|
|
364
|
+
|
|
365
|
+
if (!data) {
|
|
366
|
+
throw new RuntimeError(
|
|
367
|
+
ibiz.i18n.t('vue3Util.panelComponent.noReturnValue', { appDELogicId }),
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
this.setData(data as IData);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* 设置全局变量为当前容器数据
|
|
376
|
+
* @author lxm
|
|
377
|
+
* @date 2023-08-04 01:55:07
|
|
378
|
+
* @protected
|
|
379
|
+
*/
|
|
380
|
+
protected setDataByAppGlobalParam(): void {
|
|
381
|
+
const { dataName } = this.model;
|
|
382
|
+
const originData = dataName ? ibiz.appData![dataName] : ibiz.appData!;
|
|
383
|
+
if (originData) {
|
|
384
|
+
this.setData(originData as IData);
|
|
385
|
+
} else {
|
|
386
|
+
ibiz.log.error(
|
|
387
|
+
ibiz.i18n.t('vue3Util.panelComponent.noAttribute', { dataName }),
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* 请求实体行为并把返回值设置为当前容器的数据
|
|
394
|
+
* @author lxm
|
|
395
|
+
* @date 2023-08-04 11:47:17
|
|
396
|
+
* @protected
|
|
397
|
+
* @return {*} {Promise<void>}
|
|
398
|
+
*/
|
|
399
|
+
protected async setDataByDeMethod(): Promise<void> {
|
|
400
|
+
const { appDEMethodId, appDataEntityId } = this.model;
|
|
401
|
+
if (!appDEMethodId) {
|
|
402
|
+
throw new RuntimeModelError(
|
|
403
|
+
this.model,
|
|
404
|
+
ibiz.i18n.t('vue3Util.panelComponent.noConfiguerdEntityBehanior'),
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
if (!appDataEntityId) {
|
|
408
|
+
throw new RuntimeModelError(
|
|
409
|
+
this.model,
|
|
410
|
+
ibiz.i18n.t('vue3Util.panelComponent.noConfiguredEntity'),
|
|
411
|
+
);
|
|
412
|
+
}
|
|
413
|
+
const app = ibiz.hub.getApp(this.panel.context.srfappid);
|
|
414
|
+
const { context, params } = this.computeNavParams();
|
|
415
|
+
const res = await app.deService.exec(
|
|
416
|
+
appDataEntityId,
|
|
417
|
+
appDEMethodId,
|
|
418
|
+
context,
|
|
419
|
+
undefined,
|
|
420
|
+
params,
|
|
421
|
+
);
|
|
422
|
+
if (res.ok && res.data) {
|
|
423
|
+
this.setData(res.data as IData);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* 绑定指定视图会话的变量
|
|
429
|
+
* @author lxm
|
|
430
|
+
* @date 2023-07-14 02:03:56
|
|
431
|
+
* @protected
|
|
432
|
+
* @param {IViewController} view 绑定视图控制器
|
|
433
|
+
* @param {string} dataName 变量名称
|
|
434
|
+
*/
|
|
435
|
+
protected bindViewData(view: IViewController, dataName: string): void {
|
|
436
|
+
if (!Object.prototype.hasOwnProperty.call(view.state, dataName)) {
|
|
437
|
+
ibiz.log.error(
|
|
438
|
+
ibiz.i18n.t('vue3Util.panelComponent.sessionView', { dataName }),
|
|
439
|
+
);
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
const updateData = (): void => {
|
|
443
|
+
const originData = (view.state as IData)[dataName] as IData;
|
|
444
|
+
if (originData) {
|
|
445
|
+
this.setData(originData);
|
|
446
|
+
} else {
|
|
447
|
+
ibiz.log.error(
|
|
448
|
+
ibiz.i18n.t('vue3Util.panelComponent.viewStateAttribute', {
|
|
449
|
+
dataName,
|
|
450
|
+
}),
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
updateData(); // 先绑定一次
|
|
455
|
+
|
|
456
|
+
// 每次视图数据变更之后更新一下
|
|
457
|
+
view.evt.on('onDataChange', () => {
|
|
458
|
+
updateData();
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* 通知所有子面板成员面板操作过程中的数据变更
|
|
464
|
+
*
|
|
465
|
+
* @author lxm
|
|
466
|
+
* @date 2022-09-20 18:09:40
|
|
467
|
+
* @param {string[]} names
|
|
468
|
+
*/
|
|
469
|
+
childDataChangeNotify(names: string[]): void {
|
|
470
|
+
Object.values(this.panelItems).forEach(panelItem => {
|
|
471
|
+
panelItem.dataChangeNotify(names);
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @description 设置面板数据的值
|
|
477
|
+
* @exposedoc
|
|
478
|
+
* @param {string} name 要设置的数据的属性名称
|
|
479
|
+
* @param {unknown} value 要设置的值
|
|
480
|
+
* @returns {*} {Promise<void>}
|
|
481
|
+
* @memberof SingleDataContainerController
|
|
482
|
+
*/
|
|
483
|
+
async setDataValue(name: string, value: unknown): Promise<void> {
|
|
484
|
+
if (
|
|
485
|
+
Object.prototype.hasOwnProperty.call(this.state.data, name) &&
|
|
486
|
+
this.state.data[name] === value
|
|
487
|
+
) {
|
|
488
|
+
// *`面板里没有属性${name}或者${name}的值未发生改变`
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// 改变值
|
|
493
|
+
this.state.data[name] = value;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @description 销毁
|
|
498
|
+
* @memberof SingleDataContainerController
|
|
499
|
+
*/
|
|
500
|
+
destroy(): void {
|
|
501
|
+
super.destroy();
|
|
502
|
+
this.data.destroy?.();
|
|
503
|
+
Object.values(this.panelItems).forEach(item => {
|
|
504
|
+
item.destroy();
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PanelContainerState } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 单项数据容器状态
|
|
5
|
+
* @export
|
|
6
|
+
* @class SingleDataContainerState
|
|
7
|
+
* @extends {PanelContainerState}
|
|
8
|
+
*/
|
|
9
|
+
export class SingleDataContainerState extends PanelContainerState {
|
|
10
|
+
/**
|
|
11
|
+
* @description 单项数据容器数据
|
|
12
|
+
* @exposedoc
|
|
13
|
+
* @type {IData}
|
|
14
|
+
* @memberof SingleDataContainerState
|
|
15
|
+
*/
|
|
16
|
+
data: IData = {};
|
|
17
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
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, useSemanticNode } from '../../use';
|
|
15
|
+
import { SingleDataContainerController } from './single-data-container.controller';
|
|
16
|
+
import './single-data-container.scss';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 单项数据容器
|
|
20
|
+
* @primary
|
|
21
|
+
* @description 用于配置自定义数据源,该容器内的子面板项中的数据由此容器提供。
|
|
22
|
+
* @param {*} props
|
|
23
|
+
* @return {*}
|
|
24
|
+
*/
|
|
25
|
+
export const SingleDataContainer = defineComponent({
|
|
26
|
+
name: 'IBizSingleDataContainer',
|
|
27
|
+
props: {
|
|
28
|
+
/**
|
|
29
|
+
* @description 单项数据容器模型
|
|
30
|
+
*/
|
|
31
|
+
modelData: {
|
|
32
|
+
type: Object as PropType<IPanelContainer>,
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* @description 单项数据容器控制器
|
|
37
|
+
*/
|
|
38
|
+
controller: {
|
|
39
|
+
type: SingleDataContainerController,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
setup(props) {
|
|
44
|
+
const ns = useNamespace('single-data-container');
|
|
45
|
+
const { id } = props.modelData;
|
|
46
|
+
const { semanticClass, semanticStyle } = useSemanticNode(props.controller);
|
|
47
|
+
|
|
48
|
+
// 面板成员state响应式
|
|
49
|
+
const keys = Object.keys(props.controller.panelItems);
|
|
50
|
+
keys.forEach(key => {
|
|
51
|
+
const panelItem = props.controller.panelItems[key];
|
|
52
|
+
panelItem.state = reactive(panelItem.state);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// 获取上层的绘制函数
|
|
56
|
+
const renderPanelItem = inject<
|
|
57
|
+
(
|
|
58
|
+
panelItem: IPanelItem,
|
|
59
|
+
options?: {
|
|
60
|
+
providers: {
|
|
61
|
+
[key: string]: IPanelItemProvider;
|
|
62
|
+
};
|
|
63
|
+
panelItems: {
|
|
64
|
+
[key: string]: IPanelItemController;
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
) => VNode | null
|
|
68
|
+
>('renderPanelItem')!;
|
|
69
|
+
|
|
70
|
+
// 类名控制
|
|
71
|
+
const classArr = computed(() => {
|
|
72
|
+
const result: Array<string | false> = [
|
|
73
|
+
ns.b(),
|
|
74
|
+
ns.m(id),
|
|
75
|
+
...props.controller.containerClass,
|
|
76
|
+
];
|
|
77
|
+
return result;
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return { ns, classArr, renderPanelItem, semanticClass, semanticStyle };
|
|
81
|
+
},
|
|
82
|
+
render() {
|
|
83
|
+
let content: VNode | VNode[];
|
|
84
|
+
if (this.$slots.default) {
|
|
85
|
+
content = this.$slots.default();
|
|
86
|
+
} else {
|
|
87
|
+
// 内容区默认插槽处理,封装app-col
|
|
88
|
+
content = (
|
|
89
|
+
<iBizRow
|
|
90
|
+
class={[this.ns.b('content'), this.semanticClass('content')]}
|
|
91
|
+
style={this.semanticStyle('content')}
|
|
92
|
+
layout={this.modelData.layout}
|
|
93
|
+
>
|
|
94
|
+
{this.modelData.panelItems?.map(panelItem => {
|
|
95
|
+
const childController = this.controller.panelItems[panelItem.id!];
|
|
96
|
+
return (
|
|
97
|
+
<iBizCol
|
|
98
|
+
class={this.semanticClass('item', { item: childController })}
|
|
99
|
+
style={this.semanticStyle('item', { item: childController })}
|
|
100
|
+
layoutPos={panelItem.layoutPos}
|
|
101
|
+
state={childController.state}
|
|
102
|
+
>
|
|
103
|
+
{this.renderPanelItem(panelItem, {
|
|
104
|
+
providers: this.controller.providers,
|
|
105
|
+
panelItems: this.controller.panelItems,
|
|
106
|
+
})}
|
|
107
|
+
</iBizCol>
|
|
108
|
+
);
|
|
109
|
+
})}
|
|
110
|
+
</iBizRow>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
return (
|
|
114
|
+
<div
|
|
115
|
+
class={[this.classArr, this.semanticClass('root')]}
|
|
116
|
+
style={this.semanticStyle('root')}
|
|
117
|
+
v-loading={this.controller.state.loading}
|
|
118
|
+
element-loading-text={this.controller.state.loadingText}
|
|
119
|
+
>
|
|
120
|
+
{content}
|
|
121
|
+
</div>
|
|
122
|
+
);
|
|
123
|
+
},
|
|
124
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
import { withInstall } from '../../util';
|
|
4
|
+
import { TeleportPlaceholder } from './teleport-placeholder';
|
|
5
|
+
import { TeleportPlaceholderProvider } from './teleport-placeholder.provider';
|
|
6
|
+
|
|
7
|
+
export { TeleportPlaceholderProvider };
|
|
8
|
+
|
|
9
|
+
export const IBizTeleportPlaceholder = withInstall(
|
|
10
|
+
TeleportPlaceholder,
|
|
11
|
+
function (v: App) {
|
|
12
|
+
v.component(TeleportPlaceholder.name!, TeleportPlaceholder);
|
|
13
|
+
registerPanelItemProvider(
|
|
14
|
+
'RAWITEM_TELEPORT_PLACEHOLDER',
|
|
15
|
+
() => new TeleportPlaceholderProvider(),
|
|
16
|
+
);
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export default IBizTeleportPlaceholder;
|