@ibiz-template/vue3-util 0.6.0 → 0.6.1-alpha.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/dist/index.system.min.js +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +12 -3
- package/es/util/overlay-container/overlay-container.mjs +1 -1
- package/es/util/router-callback/router-callback.d.ts +1 -1
- package/es/util/router-callback/router-callback.d.ts.map +1 -1
- package/es/util/router-callback/router-callback.mjs +6 -2
- 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} +33 -37
- 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 +14 -10
- 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 -393
- package/src/panel-component/nav-pos/nav-pos.provider.ts +0 -38
- package/src/panel-component/nav-pos/nav-pos.scss +0 -4
- package/src/panel-component/nav-pos/nav-pos.state.ts +0 -52
- package/src/panel-component/nav-pos/nav-pos.tsx +0 -121
- package/src/panel-component/panel-container/index.ts +0 -27
- package/src/panel-component/panel-container/panel-container.controller.ts +0 -18
- package/src/panel-component/panel-container/panel-container.provider.ts +0 -30
- package/src/panel-component/panel-container/panel-container.scss +0 -15
- package/src/panel-component/panel-container/panel-container.state.ts +0 -12
- package/src/panel-component/panel-container/panel-container.tsx +0 -72
- package/src/panel-component/panel-container-group/index.ts +0 -22
- package/src/panel-component/panel-container-group/panel-container-group.controller.ts +0 -43
- package/src/panel-component/panel-container-group/panel-container-group.provider.ts +0 -30
- package/src/panel-component/panel-container-group/panel-container-group.scss +0 -91
- package/src/panel-component/panel-container-group/panel-container-group.state.ts +0 -12
- package/src/panel-component/panel-container-group/panel-container-group.tsx +0 -112
- package/src/panel-component/panel-container-image/index.ts +0 -22
- package/src/panel-component/panel-container-image/panel-container-image.controller.ts +0 -18
- package/src/panel-component/panel-container-image/panel-container-image.provider.ts +0 -30
- package/src/panel-component/panel-container-image/panel-container-image.scss +0 -18
- package/src/panel-component/panel-container-image/panel-container-image.state.ts +0 -12
- package/src/panel-component/panel-container-image/panel-container-image.tsx +0 -95
- package/src/panel-component/panel-ctrl-pos/index.ts +0 -14
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.ts +0 -53
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.ts +0 -30
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.scss +0 -8
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.tsx +0 -53
- package/src/panel-component/panel-field/index.ts +0 -14
- package/src/panel-component/panel-field/panel-field.controller.ts +0 -174
- package/src/panel-component/panel-field/panel-field.provider.ts +0 -28
- package/src/panel-component/panel-field/panel-field.scss +0 -36
- package/src/panel-component/panel-field/panel-field.state.ts +0 -12
- package/src/panel-component/panel-field/panel-field.tsx +0 -81
- package/src/panel-component/panel-item-render/index.ts +0 -18
- package/src/panel-component/panel-item-render/panel-item-render.controller.ts +0 -52
- package/src/panel-component/panel-item-render/panel-item-render.provider.ts +0 -30
- package/src/panel-component/panel-item-render/panel-item-render.tsx +0 -50
- package/src/panel-component/panel-rawitem/index.ts +0 -26
- package/src/panel-component/panel-rawitem/panel-rawitem.controller.ts +0 -34
- package/src/panel-component/panel-rawitem/panel-rawitem.provider.ts +0 -28
- package/src/panel-component/panel-rawitem/panel-rawitem.scss +0 -8
- package/src/panel-component/panel-rawitem/panel-rawitem.tsx +0 -61
- package/src/panel-component/panel-tab-page/index.ts +0 -12
- package/src/panel-component/panel-tab-page/panel-tab-page.provider.ts +0 -27
- package/src/panel-component/panel-tab-page/panel-tab-page.tsx +0 -55
- package/src/panel-component/scroll-container/index.ts +0 -44
- package/src/panel-component/scroll-container/scroll-container/index.ts +0 -2
- package/src/panel-component/scroll-container/scroll-container/scroll-container.controller.ts +0 -32
- package/src/panel-component/scroll-container/scroll-container/scroll-container.provider.ts +0 -30
- package/src/panel-component/scroll-container/scroll-container/scroll-container.scss +0 -34
- package/src/panel-component/scroll-container/scroll-container/scroll-container.tsx +0 -110
- package/src/panel-component/scroll-container/scroll-container-item/index.ts +0 -2
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.ts +0 -25
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.ts +0 -30
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.scss +0 -9
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.tsx +0 -60
- package/src/panel-component/single-data-container/index.ts +0 -22
- package/src/panel-component/single-data-container/single-data-container.controller.ts +0 -345
- package/src/panel-component/single-data-container/single-data-container.provider.ts +0 -30
- package/src/panel-component/single-data-container/single-data-container.scss +0 -10
- package/src/panel-component/single-data-container/single-data-container.state.ts +0 -20
- package/src/panel-component/single-data-container/single-data-container.tsx +0 -95
- package/src/plugin/index.ts +0 -1
- package/src/props/common.ts +0 -30
- package/src/props/editor/array.ts +0 -27
- package/src/props/editor/autocomplete.ts +0 -27
- package/src/props/editor/cascader.ts +0 -27
- package/src/props/editor/check-box-list.ts +0 -27
- package/src/props/editor/check-box.ts +0 -27
- package/src/props/editor/code.ts +0 -36
- package/src/props/editor/color-picker.ts +0 -27
- package/src/props/editor/common.ts +0 -94
- package/src/props/editor/data-picker.ts +0 -27
- package/src/props/editor/date-picker.ts +0 -27
- package/src/props/editor/date-range.ts +0 -23
- package/src/props/editor/dropdown-list.ts +0 -27
- package/src/props/editor/html.ts +0 -27
- package/src/props/editor/index.ts +0 -25
- package/src/props/editor/list-box.ts +0 -27
- package/src/props/editor/markdown.ts +0 -35
- package/src/props/editor/number-range.ts +0 -23
- package/src/props/editor/radio-button-list.ts +0 -27
- package/src/props/editor/rate.ts +0 -23
- package/src/props/editor/raw.ts +0 -23
- package/src/props/editor/slider.ts +0 -23
- package/src/props/editor/span.ts +0 -27
- package/src/props/editor/stepper.ts +0 -23
- package/src/props/editor/switch.ts +0 -23
- package/src/props/editor/text-box.ts +0 -79
- package/src/props/editor/upload.ts +0 -27
- package/src/props/index.ts +0 -2
- package/src/types/index.d.ts +0 -8
- package/src/use/click-outside/click-outside.ts +0 -72
- package/src/use/control/index.ts +0 -1
- package/src/use/control/use-control-controller/use-control-controller.ts +0 -153
- package/src/use/event/event.ts +0 -57
- package/src/use/focus-blur/focus-blur.ts +0 -83
- package/src/use/index.ts +0 -9
- package/src/use/namespace/namespace.ts +0 -14
- package/src/use/route/route.ts +0 -47
- package/src/use/util/index.ts +0 -26
- package/src/use/view/index.ts +0 -1
- package/src/use/view/use-view-controller/use-view-controller.ts +0 -153
- package/src/use/vue/vue.ts +0 -142
- package/src/util/control/prepare-control.ts +0 -33
- package/src/util/index.ts +0 -10
- package/src/util/install.ts +0 -14
- package/src/util/overlay-container/overlay-container.ts +0 -155
- package/src/util/overlay-popover-container/overlay-popover-container.ts +0 -30
- package/src/util/overlay-view-util/overlay-view-util.ts +0 -89
- package/src/util/render/render.ts +0 -28
- package/src/util/route/route-listener.ts +0 -91
- package/src/util/route/route.ts +0 -520
- package/src/util/router-callback/router-callback-item.ts +0 -98
- package/src/util/store/app-store/app-store.ts +0 -10
- package/src/util/store/index.ts +0 -6
- package/src/util/store/ui-store/ui-store.ts +0 -27
- package/src/util/store/ui-store/z-index.ts +0 -53
- package/src/view/app-redirect-view/app-redirect-view.tsx +0 -26
- package/src/view/common/index.ts +0 -10
- package/src/view/common/view.provider.ts +0 -14
- package/src/view/common/view.scss +0 -38
- package/src/view/common/view.tsx +0 -152
- package/src/view/de-redirect-view/de-redirect-view.provider.ts +0 -14
- package/src/view/de-redirect-view/de-redirect-view.tsx +0 -62
- package/src/view/de-redirect-view/index.ts +0 -17
- package/src/view/index.ts +0 -5
- package/src/view/portal-view/index.ts +0 -18
- package/src/view/portal-view/portal-view.provider.ts +0 -14
- package/src/view/portal-view/portal-view.tsx +0 -79
- package/src/view/todo-redirect/todo-redirect.tsx +0 -51
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue$1 = require('../../vue/vue.cjs');
|
|
5
|
+
var index = require('../../util/index.cjs');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
function watchAndUpdateContextParams(props, control) {
|
|
9
|
+
vue.watch(
|
|
10
|
+
() => ({ context: props.context, params: props.params }),
|
|
11
|
+
(newVal) => {
|
|
12
|
+
control.updateContextParams({ ...newVal });
|
|
13
|
+
ibiz.log.debug("".concat(control.model.id, "\u7684\u4E0A\u4E0B\u6587\u6216\u89C6\u56FE\u53C2\u6570\u53D8\u66F4\uFF1A"), newVal);
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function watchAndUpdateState(props, control, excludeFields = []) {
|
|
18
|
+
const excludeKeys = ["context", "params", "modelData", ...excludeFields];
|
|
19
|
+
vue.watch(
|
|
20
|
+
() => {
|
|
21
|
+
const watchProps = {};
|
|
22
|
+
Object.keys(props).forEach((key) => {
|
|
23
|
+
if (!excludeKeys.includes(key)) {
|
|
24
|
+
watchProps[key] = props[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return watchProps;
|
|
28
|
+
},
|
|
29
|
+
(newVal, oldVal) => {
|
|
30
|
+
const changeProps = {};
|
|
31
|
+
Object.keys(newVal).forEach((key) => {
|
|
32
|
+
if (newVal[key] !== (oldVal || {})[key]) {
|
|
33
|
+
changeProps[key] = newVal[key];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
ibiz.log.debug("\u90E8\u4EF6 [".concat(control.model.name, "] state \u53D8\u66F4"), changeProps);
|
|
37
|
+
Object.keys(changeProps).forEach((key) => {
|
|
38
|
+
if (changeProps[key] !== void 0) {
|
|
39
|
+
control.state[key] = changeProps[key];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
{ immediate: true }
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function useControlController(fn, opts) {
|
|
47
|
+
const ctx = index.useCtx();
|
|
48
|
+
const props = vue$1.useProps();
|
|
49
|
+
ctx.evt.emit("onForecast", props.modelData.name);
|
|
50
|
+
const provider = props.provider;
|
|
51
|
+
let c;
|
|
52
|
+
if (provider == null ? void 0 : provider.createController) {
|
|
53
|
+
c = provider.createController(
|
|
54
|
+
props.modelData,
|
|
55
|
+
props.context,
|
|
56
|
+
props.params,
|
|
57
|
+
ctx
|
|
58
|
+
);
|
|
59
|
+
} else {
|
|
60
|
+
c = fn(props.modelData, props.context, props.params, ctx);
|
|
61
|
+
}
|
|
62
|
+
watchAndUpdateContextParams(props, c);
|
|
63
|
+
watchAndUpdateState(props, c, opts == null ? void 0 : opts.excludePropsKeys);
|
|
64
|
+
c.state = vue.reactive(c.state);
|
|
65
|
+
vue.onActivated(() => c.onActivated());
|
|
66
|
+
vue.onDeactivated(() => c.onDeactivated());
|
|
67
|
+
c.force = vue$1.useForce();
|
|
68
|
+
const vue$2 = vue.getCurrentInstance().proxy;
|
|
69
|
+
c.evt.onAll((eventName, event) => {
|
|
70
|
+
vue$2.$emit(eventName.slice(2), event);
|
|
71
|
+
});
|
|
72
|
+
vue$2.$emit("controllerAppear", c);
|
|
73
|
+
c.created();
|
|
74
|
+
vue.onBeforeUnmount(() => c.destroyed());
|
|
75
|
+
return c;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
exports.useControlController = useControlController;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@ibiz-template/core');
|
|
4
|
+
var ramda = require('ramda');
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
function useEventListener(elRef, eventName, listener, options = {}) {
|
|
9
|
+
let cleanup = core.NOOP;
|
|
10
|
+
vue.watch(
|
|
11
|
+
elRef,
|
|
12
|
+
(newVal, oldVal) => {
|
|
13
|
+
if (newVal !== oldVal) {
|
|
14
|
+
if (ramda.isNil(newVal)) {
|
|
15
|
+
cleanup();
|
|
16
|
+
cleanup = core.NOOP;
|
|
17
|
+
} else {
|
|
18
|
+
cleanup = core.listenJSEvent(
|
|
19
|
+
(newVal == null ? void 0 : newVal.$el) || newVal,
|
|
20
|
+
eventName,
|
|
21
|
+
listener,
|
|
22
|
+
options
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{ immediate: true }
|
|
28
|
+
);
|
|
29
|
+
vue.onBeforeUnmount(() => {
|
|
30
|
+
if (cleanup !== core.NOOP) {
|
|
31
|
+
cleanup();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return () => {
|
|
35
|
+
cleanup();
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
exports.useEventListener = useEventListener;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var clickOutside = require('../click-outside/click-outside.cjs');
|
|
5
|
+
var event = require('../event/event.cjs');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
function useFocusAndBlur(focus, blur) {
|
|
9
|
+
const componentRef = vue.ref();
|
|
10
|
+
const isFocus = vue.ref(false);
|
|
11
|
+
let outsideFuns;
|
|
12
|
+
const doBlur = () => {
|
|
13
|
+
if (!isFocus.value) {
|
|
14
|
+
ibiz.log.debug("\u6CA1\u6709\u805A\u7126\uFF0C\u4E0D\u89E6\u53D1\u5931\u7126");
|
|
15
|
+
}
|
|
16
|
+
blur();
|
|
17
|
+
outsideFuns.stop();
|
|
18
|
+
isFocus.value = false;
|
|
19
|
+
};
|
|
20
|
+
const pause = () => {
|
|
21
|
+
if (outsideFuns) {
|
|
22
|
+
outsideFuns.pause();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const stop = () => {
|
|
26
|
+
if (outsideFuns) {
|
|
27
|
+
outsideFuns.stop();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
event.useEventListener(
|
|
31
|
+
componentRef,
|
|
32
|
+
"click",
|
|
33
|
+
(_evt) => {
|
|
34
|
+
if (!isFocus.value) {
|
|
35
|
+
outsideFuns = clickOutside.useClickOutside(componentRef, () => {
|
|
36
|
+
doBlur();
|
|
37
|
+
});
|
|
38
|
+
isFocus.value = true;
|
|
39
|
+
focus();
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{ capture: true }
|
|
43
|
+
// 捕获防止内部ui拦截点击事件
|
|
44
|
+
);
|
|
45
|
+
return { componentRef, isFocus, doBlur, pause, stop };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
exports.useFocusAndBlur = useFocusAndBlur;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var clickOutside = require('./click-outside/click-outside.cjs');
|
|
4
|
+
require('./control/index.cjs');
|
|
5
|
+
var event = require('./event/event.cjs');
|
|
6
|
+
var focusBlur = require('./focus-blur/focus-blur.cjs');
|
|
7
|
+
var namespace = require('./namespace/namespace.cjs');
|
|
8
|
+
var route = require('./route/route.cjs');
|
|
9
|
+
var index = require('./util/index.cjs');
|
|
10
|
+
require('./view/index.cjs');
|
|
11
|
+
var vue = require('./vue/vue.cjs');
|
|
12
|
+
var useControlController = require('./control/use-control-controller/use-control-controller.cjs');
|
|
13
|
+
var useViewController = require('./view/use-view-controller/use-view-controller.cjs');
|
|
14
|
+
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
exports.useClickOutside = clickOutside.useClickOutside;
|
|
18
|
+
exports.useEventListener = event.useEventListener;
|
|
19
|
+
exports.useFocusAndBlur = focusBlur.useFocusAndBlur;
|
|
20
|
+
exports.useNamespace = namespace.useNamespace;
|
|
21
|
+
exports.useRouteKey = route.useRouteKey;
|
|
22
|
+
exports.useRouterQuery = route.useRouterQuery;
|
|
23
|
+
exports.useCtx = index.useCtx;
|
|
24
|
+
exports.useMobCtx = index.useMobCtx;
|
|
25
|
+
exports.EmptyVNode = vue.EmptyVNode;
|
|
26
|
+
exports.getOrigin = vue.getOrigin;
|
|
27
|
+
exports.isEmptyVNode = vue.isEmptyVNode;
|
|
28
|
+
exports.useController = vue.useController;
|
|
29
|
+
exports.useForce = vue.useForce;
|
|
30
|
+
exports.useForceTogether = vue.useForceTogether;
|
|
31
|
+
exports.useProps = vue.useProps;
|
|
32
|
+
exports.usePropsWatch = vue.usePropsWatch;
|
|
33
|
+
exports.useControlController = useControlController.useControlController;
|
|
34
|
+
exports.useViewController = useViewController.useViewController;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vueRouter = require('vue-router');
|
|
4
|
+
var vue = require('vue');
|
|
5
|
+
require('../../util/index.cjs');
|
|
6
|
+
var routeListener = require('../../util/route/route-listener.cjs');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
function useRouterQuery() {
|
|
10
|
+
const route = vueRouter.useRoute();
|
|
11
|
+
const { query } = route;
|
|
12
|
+
return query;
|
|
13
|
+
}
|
|
14
|
+
function useRouteKey(originKey, route, routeKey) {
|
|
15
|
+
if (!routeKey) {
|
|
16
|
+
routeKey = vue.ref("");
|
|
17
|
+
}
|
|
18
|
+
routeKey.value = originKey.value;
|
|
19
|
+
const routeListener$1 = new routeListener.RouteListener(route);
|
|
20
|
+
vue.watch(originKey, (newVal, oldVal) => {
|
|
21
|
+
if (newVal !== oldVal) {
|
|
22
|
+
routeListener$1.nextChange(() => {
|
|
23
|
+
routeKey.value = newVal;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return routeKey;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
exports.useRouteKey = useRouteKey;
|
|
31
|
+
exports.useRouterQuery = useRouterQuery;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var qxUtil = require('qx-util');
|
|
4
|
+
var vue = require('vue');
|
|
5
|
+
var vue$1 = require('../../vue/vue.cjs');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
function watchAndUpdateContextParams(props, view) {
|
|
9
|
+
vue.watch(
|
|
10
|
+
() => ({ context: props.context, params: props.params }),
|
|
11
|
+
(newVal) => {
|
|
12
|
+
view.context.reset({}, newVal.context);
|
|
13
|
+
qxUtil.clearAll(view.params);
|
|
14
|
+
Object.assign(view.params, newVal.params);
|
|
15
|
+
view.handleContextParams();
|
|
16
|
+
ibiz.log.debug("".concat(view.model.id, "\u7684\u4E0A\u4E0B\u6587\u6216\u89C6\u56FE\u53C2\u6570\u53D8\u66F4\uFF1A"), newVal);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
function watchAndUpdateState(props, view) {
|
|
21
|
+
vue.watch(
|
|
22
|
+
() => {
|
|
23
|
+
return props.state ? { ...props.state } : {};
|
|
24
|
+
},
|
|
25
|
+
(newVal, oldVal) => {
|
|
26
|
+
const changeProps = {};
|
|
27
|
+
Object.keys(newVal).forEach((key) => {
|
|
28
|
+
if (newVal[key] !== (oldVal || {})[key]) {
|
|
29
|
+
changeProps[key] = newVal[key];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
ibiz.log.debug("\u89C6\u56FE [".concat(view.model.name, "] state \u53D8\u66F4"), changeProps);
|
|
33
|
+
Object.keys(changeProps).forEach((key) => {
|
|
34
|
+
view.state[key] = changeProps[key];
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
{ immediate: true }
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function useViewController(fn) {
|
|
41
|
+
const props = vue$1.useProps();
|
|
42
|
+
const ctx = vue.inject("ctx", void 0);
|
|
43
|
+
ctx == null ? void 0 : ctx.evt.emit("onForecast", props.modelData.name);
|
|
44
|
+
const provider = props.provider;
|
|
45
|
+
let c;
|
|
46
|
+
if (provider == null ? void 0 : provider.createController) {
|
|
47
|
+
c = provider.createController(
|
|
48
|
+
props.modelData,
|
|
49
|
+
props.context,
|
|
50
|
+
props.params,
|
|
51
|
+
ctx
|
|
52
|
+
);
|
|
53
|
+
} else {
|
|
54
|
+
c = fn(props.modelData, props.context, props.params, ctx);
|
|
55
|
+
}
|
|
56
|
+
ibiz.util.viewStack.add(c.id, c);
|
|
57
|
+
watchAndUpdateContextParams(props, c);
|
|
58
|
+
watchAndUpdateState(props, c);
|
|
59
|
+
vue.provide("ctx", c.ctx);
|
|
60
|
+
c.state = vue.reactive(c.state);
|
|
61
|
+
c.slotProps = vue.reactive(c.slotProps);
|
|
62
|
+
if (props.modal) {
|
|
63
|
+
c.modal = props.modal;
|
|
64
|
+
}
|
|
65
|
+
vue.onActivated(() => {
|
|
66
|
+
c.onActivated();
|
|
67
|
+
ibiz.util.viewStack.active(c.id);
|
|
68
|
+
});
|
|
69
|
+
vue.onDeactivated(() => {
|
|
70
|
+
c.onDeactivated();
|
|
71
|
+
ibiz.util.viewStack.deactivate(c.id);
|
|
72
|
+
});
|
|
73
|
+
c.force = vue$1.useForce();
|
|
74
|
+
const vue$2 = vue.getCurrentInstance().proxy;
|
|
75
|
+
c.evt.onAll((eventName, event) => {
|
|
76
|
+
vue$2.$emit(eventName.slice(2), event);
|
|
77
|
+
});
|
|
78
|
+
c.created();
|
|
79
|
+
vue.onBeforeUnmount(() => {
|
|
80
|
+
c.destroyed();
|
|
81
|
+
ibiz.util.viewStack.remove(c.id);
|
|
82
|
+
});
|
|
83
|
+
return c;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.useViewController = useViewController;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var qxUtil = require('qx-util');
|
|
4
|
+
var vue = require('vue');
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
function useProps() {
|
|
8
|
+
const vue$1 = vue.getCurrentInstance().proxy;
|
|
9
|
+
return vue$1.$props;
|
|
10
|
+
}
|
|
11
|
+
function getOrigin(val) {
|
|
12
|
+
return vue.isReactive(val) ? vue.toRaw(val) : val;
|
|
13
|
+
}
|
|
14
|
+
function usePropsWatch(key, callback, options) {
|
|
15
|
+
const props = useProps();
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(props, key)) {
|
|
17
|
+
vue.watch(
|
|
18
|
+
() => props[key],
|
|
19
|
+
(newVal, oldVal) => {
|
|
20
|
+
callback(getOrigin(newVal), getOrigin(oldVal));
|
|
21
|
+
},
|
|
22
|
+
options
|
|
23
|
+
);
|
|
24
|
+
callback(getOrigin(props[key]), void 0);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function useForce() {
|
|
28
|
+
const vue$1 = vue.getCurrentInstance().proxy;
|
|
29
|
+
return (callback) => {
|
|
30
|
+
vue$1.$forceUpdate();
|
|
31
|
+
if (callback && qxUtil.isFunc(callback)) {
|
|
32
|
+
vue$1.$nextTick(() => {
|
|
33
|
+
callback();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function useForceTogether(vue, controller) {
|
|
39
|
+
const orignForce = controller.force;
|
|
40
|
+
const selfForce = useForce();
|
|
41
|
+
controller.force = (callback) => {
|
|
42
|
+
orignForce(callback);
|
|
43
|
+
selfForce();
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function useController(controller) {
|
|
47
|
+
controller.force = useForce();
|
|
48
|
+
}
|
|
49
|
+
const EmptyVNode = vue.createCommentVNode("EmptyVNode");
|
|
50
|
+
function isEmptyVNode(nodes) {
|
|
51
|
+
if (!Array.isArray(nodes)) {
|
|
52
|
+
return nodes === EmptyVNode;
|
|
53
|
+
}
|
|
54
|
+
return nodes.length === 1 && nodes[0] === EmptyVNode;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
exports.EmptyVNode = EmptyVNode;
|
|
58
|
+
exports.getOrigin = getOrigin;
|
|
59
|
+
exports.isEmptyVNode = isEmptyVNode;
|
|
60
|
+
exports.useController = useController;
|
|
61
|
+
exports.useForce = useForce;
|
|
62
|
+
exports.useForceTogether = useForceTogether;
|
|
63
|
+
exports.useProps = useProps;
|
|
64
|
+
exports.usePropsWatch = usePropsWatch;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../../use/index.cjs');
|
|
4
|
+
var namespace = require('../../use/namespace/namespace.cjs');
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
function prepareControl(c) {
|
|
8
|
+
const commonNs = namespace.useNamespace("control");
|
|
9
|
+
const { controlType, sysCss, codeName } = c.model;
|
|
10
|
+
const typeClass = controlType.toLowerCase();
|
|
11
|
+
const sysCssName = sysCss == null ? void 0 : sysCss.cssName;
|
|
12
|
+
const ns = namespace.useNamespace("control-".concat(typeClass));
|
|
13
|
+
const controlClass = [
|
|
14
|
+
commonNs.b(),
|
|
15
|
+
commonNs.b(typeClass),
|
|
16
|
+
commonNs.m(codeName)
|
|
17
|
+
];
|
|
18
|
+
if (sysCssName) {
|
|
19
|
+
controlClass.push(sysCssName);
|
|
20
|
+
}
|
|
21
|
+
return { controlClass, ns };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.prepareControl = prepareControl;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var route = require('./route/route.cjs');
|
|
4
|
+
var routeListener = require('./route/route-listener.cjs');
|
|
5
|
+
var install = require('./install.cjs');
|
|
6
|
+
var prepareControl = require('./control/prepare-control.cjs');
|
|
7
|
+
var render = require('./render/render.cjs');
|
|
8
|
+
var overlayContainer = require('./overlay-container/overlay-container.cjs');
|
|
9
|
+
var overlayPopoverContainer = require('./overlay-popover-container/overlay-popover-container.cjs');
|
|
10
|
+
var overlayViewUtil = require('./overlay-view-util/overlay-view-util.cjs');
|
|
11
|
+
var routerCallback = require('./router-callback/router-callback.cjs');
|
|
12
|
+
var index = require('./store/index.cjs');
|
|
13
|
+
var appStore = require('./store/app-store/app-store.cjs');
|
|
14
|
+
var uiStore = require('./store/ui-store/ui-store.cjs');
|
|
15
|
+
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
exports.calcResRoutePath = route.calcResRoutePath;
|
|
19
|
+
exports.excludeViewTypes = route.excludeViewTypes;
|
|
20
|
+
exports.generateRoutePath = route.generateRoutePath;
|
|
21
|
+
exports.generateRoutePathByModal = route.generateRoutePathByModal;
|
|
22
|
+
exports.getNestedRoutePath = route.getNestedRoutePath;
|
|
23
|
+
exports.getOwnRouteContext = route.getOwnRouteContext;
|
|
24
|
+
exports.onRouteChange = route.onRouteChange;
|
|
25
|
+
exports.parseRouteViewData = route.parseRouteViewData;
|
|
26
|
+
exports.route2routePath = route.route2routePath;
|
|
27
|
+
exports.routePath2string = route.routePath2string;
|
|
28
|
+
exports.RouteListener = routeListener.RouteListener;
|
|
29
|
+
exports.withInstall = install.withInstall;
|
|
30
|
+
exports.prepareControl = prepareControl.prepareControl;
|
|
31
|
+
exports.renderString = render.renderString;
|
|
32
|
+
exports.OverlayContainer = overlayContainer.OverlayContainer;
|
|
33
|
+
exports.OverlayPopoverContainer = overlayPopoverContainer.OverlayPopoverContainer;
|
|
34
|
+
exports.createOverlayView = overlayViewUtil.createOverlayView;
|
|
35
|
+
exports.getDrawerPlacement = overlayViewUtil.getDrawerPlacement;
|
|
36
|
+
exports.openViewDrawer = overlayViewUtil.openViewDrawer;
|
|
37
|
+
exports.openViewFloatWindow = overlayViewUtil.openViewFloatWindow;
|
|
38
|
+
exports.openViewModal = overlayViewUtil.openViewModal;
|
|
39
|
+
exports.openViewPopover = overlayViewUtil.openViewPopover;
|
|
40
|
+
exports.routerCallback = routerCallback.routerCallback;
|
|
41
|
+
exports.piniaInstance = index.piniaInstance;
|
|
42
|
+
exports.useAppStore = appStore.useAppStore;
|
|
43
|
+
exports.useUIStore = uiStore.useUIStore;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var qxUtil = require('qx-util');
|
|
4
|
+
var vue = require('vue');
|
|
5
|
+
var core = require('@ibiz-template/core');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
class OverlayContainer {
|
|
9
|
+
/**
|
|
10
|
+
* 创建全局呈现
|
|
11
|
+
*
|
|
12
|
+
* @author chitanda
|
|
13
|
+
* @date 2022-11-09 14:11:52
|
|
14
|
+
* @param {unknown} component
|
|
15
|
+
* @param {(h: CreateElement) => VNode} render
|
|
16
|
+
* @param {IPopoverOptions} [opts]
|
|
17
|
+
*/
|
|
18
|
+
constructor(component, render, opts) {
|
|
19
|
+
this.component = component;
|
|
20
|
+
this.render = render;
|
|
21
|
+
this.opts = opts;
|
|
22
|
+
/**
|
|
23
|
+
* 内部事件
|
|
24
|
+
*
|
|
25
|
+
* @author chitanda
|
|
26
|
+
* @date 2022-11-09 12:11:42
|
|
27
|
+
* @protected
|
|
28
|
+
*/
|
|
29
|
+
this.evt = new qxUtil.QXEvent();
|
|
30
|
+
this.init();
|
|
31
|
+
}
|
|
32
|
+
static createVueApp(_rootComponent, _rootProps) {
|
|
33
|
+
throw new core.RuntimeError("\u6CA1\u6709\u6CE8\u5165createVueApp\u65B9\u6CD5");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 初始化飘窗
|
|
37
|
+
*
|
|
38
|
+
* @author chitanda
|
|
39
|
+
* @date 2022-11-09 12:11:55
|
|
40
|
+
* @protected
|
|
41
|
+
* @return {*} {void}
|
|
42
|
+
*/
|
|
43
|
+
init() {
|
|
44
|
+
const self = this;
|
|
45
|
+
const { render, opts } = this;
|
|
46
|
+
const container = document.createElement("div");
|
|
47
|
+
document.body.appendChild(container);
|
|
48
|
+
const vm = OverlayContainer.createVueApp({
|
|
49
|
+
mounted() {
|
|
50
|
+
self.modal = this.$refs.root;
|
|
51
|
+
},
|
|
52
|
+
unmounted() {
|
|
53
|
+
document.body.removeChild(container);
|
|
54
|
+
self.evt.emit("dismiss", self.result);
|
|
55
|
+
},
|
|
56
|
+
render() {
|
|
57
|
+
return vue.h(
|
|
58
|
+
self.component,
|
|
59
|
+
{
|
|
60
|
+
ref: "root",
|
|
61
|
+
opts,
|
|
62
|
+
onDismiss(data) {
|
|
63
|
+
self.result = data;
|
|
64
|
+
vm.unmount();
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{ default: render }
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
ibiz.plugin.register(vm);
|
|
72
|
+
vm.mount(container);
|
|
73
|
+
this.vm = vm;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* 打开飘窗
|
|
77
|
+
*
|
|
78
|
+
* @author chitanda
|
|
79
|
+
* @date 2022-11-09 12:11:52
|
|
80
|
+
* @param {HTMLElement} target
|
|
81
|
+
* @return {*} {Promise<void>}
|
|
82
|
+
*/
|
|
83
|
+
async present() {
|
|
84
|
+
return this.modal.present();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 手动调用关闭飘窗
|
|
88
|
+
*
|
|
89
|
+
* @author chitanda
|
|
90
|
+
* @date 2022-11-09 12:11:39
|
|
91
|
+
* @param {unknown} [data]
|
|
92
|
+
* @return {*} {Promise<void>}
|
|
93
|
+
*/
|
|
94
|
+
async dismiss(data) {
|
|
95
|
+
await this.modal.dismiss(data);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* 订阅窗口关闭
|
|
99
|
+
*
|
|
100
|
+
* @author chitanda
|
|
101
|
+
* @date 2022-11-09 12:11:20
|
|
102
|
+
* @template T
|
|
103
|
+
* @return {*} {Promise<T>}
|
|
104
|
+
*/
|
|
105
|
+
async onWillDismiss() {
|
|
106
|
+
return new Promise((resolve) => {
|
|
107
|
+
const callback = (data) => {
|
|
108
|
+
resolve(data);
|
|
109
|
+
this.evt.off("dismiss", callback);
|
|
110
|
+
};
|
|
111
|
+
this.evt.on("dismiss", callback);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
exports.OverlayContainer = OverlayContainer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var overlayContainer = require('../overlay-container/overlay-container.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
class OverlayPopoverContainer extends overlayContainer.OverlayContainer {
|
|
7
|
+
present(target) {
|
|
8
|
+
return this.modal.present(target);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
exports.OverlayPopoverContainer = OverlayPopoverContainer;
|