@ibiz-template/vue3-util 0.2.11 → 0.2.13
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 -0
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/es/_virtual/_commonjsHelpers.mjs +40 -0
- package/es/common/code-list/code-list.css +1 -0
- package/es/common/code-list/code-list.d.ts +58 -0
- package/es/common/code-list/code-list.d.ts.map +1 -0
- package/es/common/code-list/code-list.mjs +85 -0
- package/es/common/control-base/control-base.css +1 -0
- package/es/common/control-base/control-base.d.ts +2 -0
- package/es/common/control-base/control-base.d.ts.map +1 -0
- package/es/common/control-base/control-base.mjs +99 -0
- package/es/common/control-loading-placeholder/control-loading-placeholder.d.ts +31 -0
- package/es/common/control-loading-placeholder/control-loading-placeholder.d.ts.map +1 -0
- package/es/common/control-loading-placeholder/control-loading-placeholder.mjs +30 -0
- package/es/common/control-shell/control-shell.css +1 -0
- package/es/common/control-shell/control-shell.d.ts +21 -0
- package/es/common/control-shell/control-shell.d.ts.map +1 -0
- package/es/common/control-shell/control-shell.mjs +56 -0
- package/es/common/icon/icon.d.ts +29 -0
- package/es/common/icon/icon.d.ts.map +1 -0
- package/es/common/icon/icon.mjs +89 -0
- package/es/common/index.d.ts +9 -0
- package/es/common/index.d.ts.map +1 -0
- package/es/common/index.mjs +9 -0
- package/es/common/router-view/router-view.d.ts +30 -0
- package/es/common/router-view/router-view.d.ts.map +1 -0
- package/es/common/router-view/router-view.mjs +75 -0
- package/es/common/view-shell/view-shell.css +1 -0
- package/es/common/view-shell/view-shell.d.ts +40 -0
- package/es/common/view-shell/view-shell.d.ts.map +1 -0
- package/es/common/view-shell/view-shell.mjs +77 -0
- package/{out → es}/index.d.ts +3 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.mjs +95 -0
- package/es/interface/index.mjs +3 -0
- package/es/interface/util/index.mjs +3 -0
- package/es/interface/util/route/route.mjs +1 -0
- package/es/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.mjs +535 -0
- package/es/panel-component/grid-container/grid-container.controller.d.ts +15 -0
- package/es/panel-component/grid-container/grid-container.controller.d.ts.map +1 -0
- package/es/panel-component/grid-container/grid-container.controller.mjs +12 -0
- package/es/panel-component/grid-container/grid-container.css +1 -0
- package/es/panel-component/grid-container/grid-container.d.ts +38 -0
- package/es/panel-component/grid-container/grid-container.d.ts.map +1 -0
- package/es/panel-component/grid-container/grid-container.mjs +106 -0
- package/es/panel-component/grid-container/grid-container.provider.d.ts +16 -0
- package/es/panel-component/grid-container/grid-container.provider.d.ts.map +1 -0
- package/es/panel-component/grid-container/grid-container.provider.mjs +15 -0
- package/es/panel-component/grid-container/grid-container.state.d.ts +13 -0
- package/es/panel-component/grid-container/grid-container.state.d.ts.map +1 -0
- package/es/panel-component/grid-container/grid-container.state.mjs +7 -0
- package/es/panel-component/grid-container/index.d.ts +38 -0
- package/es/panel-component/grid-container/index.d.ts.map +1 -0
- package/es/panel-component/grid-container/index.mjs +18 -0
- package/es/panel-component/index.d.ts +10 -0
- package/es/panel-component/index.d.ts.map +1 -0
- package/es/panel-component/index.mjs +28 -0
- package/es/panel-component/multi-data-container/index.d.ts +37 -0
- package/es/panel-component/multi-data-container/index.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/index.mjs +21 -0
- package/es/panel-component/multi-data-container/multi-data-container-item.controller.d.ts +61 -0
- package/es/panel-component/multi-data-container/multi-data-container-item.controller.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container-item.controller.mjs +117 -0
- package/es/panel-component/multi-data-container/multi-data-container-itm.state.d.ts +20 -0
- package/es/panel-component/multi-data-container/multi-data-container-itm.state.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container-itm.state.mjs +17 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts +107 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +260 -0
- package/es/panel-component/multi-data-container/multi-data-container.css +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.d.ts +36 -0
- package/es/panel-component/multi-data-container/multi-data-container.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.mjs +87 -0
- package/es/panel-component/multi-data-container/multi-data-container.provider.d.ts +16 -0
- package/es/panel-component/multi-data-container/multi-data-container.provider.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.provider.mjs +15 -0
- package/es/panel-component/multi-data-container/multi-data-container.state.d.ts +20 -0
- package/es/panel-component/multi-data-container/multi-data-container.state.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.state.mjs +17 -0
- package/es/panel-component/nav-pos/index.d.ts +28 -0
- package/es/panel-component/nav-pos/index.d.ts.map +1 -0
- package/es/panel-component/nav-pos/index.mjs +15 -0
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts +163 -0
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -0
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +283 -0
- package/es/panel-component/nav-pos/nav-pos.css +1 -0
- package/es/panel-component/nav-pos/nav-pos.d.ts +29 -0
- package/es/panel-component/nav-pos/nav-pos.d.ts.map +1 -0
- package/es/panel-component/nav-pos/nav-pos.mjs +105 -0
- package/es/panel-component/nav-pos/nav-pos.provider.d.ts +23 -0
- package/es/panel-component/nav-pos/nav-pos.provider.d.ts.map +1 -0
- package/es/panel-component/nav-pos/nav-pos.provider.mjs +24 -0
- package/es/panel-component/nav-pos/nav-pos.state.d.ts +50 -0
- package/es/panel-component/nav-pos/nav-pos.state.d.ts.map +1 -0
- package/es/panel-component/nav-pos/nav-pos.state.mjs +47 -0
- package/es/panel-component/panel-container/index.d.ts +27 -0
- package/es/panel-component/panel-container/index.d.ts.map +1 -0
- package/es/panel-component/panel-container/index.mjs +22 -0
- package/es/panel-component/panel-container/panel-container.controller.d.ts +15 -0
- package/es/panel-component/panel-container/panel-container.controller.d.ts.map +1 -0
- package/es/panel-component/panel-container/panel-container.controller.mjs +12 -0
- package/es/panel-component/panel-container/panel-container.css +1 -0
- package/es/panel-component/panel-container/panel-container.d.ts +27 -0
- package/es/panel-component/panel-container/panel-container.d.ts.map +1 -0
- package/es/panel-component/panel-container/panel-container.mjs +70 -0
- package/es/panel-component/panel-container/panel-container.provider.d.ts +16 -0
- package/es/panel-component/panel-container/panel-container.provider.d.ts.map +1 -0
- package/es/panel-component/panel-container/panel-container.provider.mjs +15 -0
- package/es/panel-component/panel-container/panel-container.state.d.ts +13 -0
- package/es/panel-component/panel-container/panel-container.state.d.ts.map +1 -0
- package/es/panel-component/panel-container/panel-container.state.mjs +7 -0
- package/es/panel-component/panel-ctrl-pos/index.d.ts +25 -0
- package/es/panel-component/panel-ctrl-pos/index.d.ts.map +1 -0
- package/es/panel-component/panel-ctrl-pos/index.mjs +14 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.d.ts +36 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.d.ts.map +1 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.mjs +23 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.css +1 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.d.ts +25 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.d.ts.map +1 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.mjs +45 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.d.ts +17 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.d.ts.map +1 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.mjs +15 -0
- package/es/panel-component/panel-field/index.d.ts +26 -0
- package/es/panel-component/panel-field/index.d.ts.map +1 -0
- package/es/panel-component/panel-field/index.mjs +14 -0
- package/es/panel-component/panel-field/panel-field.controller.d.ts +75 -0
- package/es/panel-component/panel-field/panel-field.controller.d.ts.map +1 -0
- package/es/panel-component/panel-field/panel-field.controller.mjs +90 -0
- package/es/panel-component/panel-field/panel-field.css +1 -0
- package/es/panel-component/panel-field/panel-field.d.ts +28 -0
- package/es/panel-component/panel-field/panel-field.d.ts.map +1 -0
- package/es/panel-component/panel-field/panel-field.mjs +73 -0
- package/es/panel-component/panel-field/panel-field.provider.d.ts +15 -0
- package/es/panel-component/panel-field/panel-field.provider.d.ts.map +1 -0
- package/es/panel-component/panel-field/panel-field.provider.mjs +15 -0
- package/es/panel-component/panel-field/panel-field.state.d.ts +13 -0
- package/es/panel-component/panel-field/panel-field.state.d.ts.map +1 -0
- package/es/panel-component/panel-field/panel-field.state.mjs +7 -0
- package/es/panel-component/panel-rawitem/index.d.ts +25 -0
- package/es/panel-component/panel-rawitem/index.d.ts.map +1 -0
- package/es/panel-component/panel-rawitem/index.mjs +18 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.controller.d.ts +29 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.controller.d.ts.map +1 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.controller.mjs +28 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.css +1 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts +27 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts.map +1 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.mjs +50 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.provider.d.ts +15 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.provider.d.ts.map +1 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.provider.mjs +15 -0
- package/es/panel-component/scroll-container/index.d.ts +26 -0
- package/es/panel-component/scroll-container/index.d.ts.map +1 -0
- package/es/panel-component/scroll-container/index.mjs +46 -0
- package/es/panel-component/scroll-container/scroll-container/index.d.ts +3 -0
- package/es/panel-component/scroll-container/scroll-container/index.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container/index.mjs +4 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.d.ts +23 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.mjs +12 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.css +1 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.d.ts +27 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.mjs +112 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.provider.d.ts +17 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.provider.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.provider.mjs +15 -0
- package/es/panel-component/scroll-container/scroll-container-item/index.d.ts +3 -0
- package/es/panel-component/scroll-container/scroll-container-item/index.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/index.mjs +4 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.d.ts +22 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.mjs +7 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.css +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.d.ts +27 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.mjs +64 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.d.ts +17 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.mjs +15 -0
- package/es/panel-component/single-data-container/index.d.ts +37 -0
- package/es/panel-component/single-data-container/index.d.ts.map +1 -0
- package/es/panel-component/single-data-container/index.mjs +21 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +122 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts.map +1 -0
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +285 -0
- package/es/panel-component/single-data-container/single-data-container.css +1 -0
- package/es/panel-component/single-data-container/single-data-container.d.ts +36 -0
- package/es/panel-component/single-data-container/single-data-container.d.ts.map +1 -0
- package/es/panel-component/single-data-container/single-data-container.mjs +77 -0
- package/es/panel-component/single-data-container/single-data-container.provider.d.ts +16 -0
- package/es/panel-component/single-data-container/single-data-container.provider.d.ts.map +1 -0
- package/es/panel-component/single-data-container/single-data-container.provider.mjs +15 -0
- package/es/panel-component/single-data-container/single-data-container.state.d.ts +20 -0
- package/es/panel-component/single-data-container/single-data-container.state.d.ts.map +1 -0
- package/es/panel-component/single-data-container/single-data-container.state.mjs +17 -0
- package/es/plugin/index.mjs +3 -0
- package/es/plugin/plugin-factory/plugin-factory.mjs +292 -0
- package/es/props/common.mjs +15 -0
- package/es/props/editor/array.mjs +11 -0
- package/es/props/editor/autocomplete.mjs +11 -0
- package/es/props/editor/cascader.mjs +11 -0
- package/es/props/editor/check-box-list.mjs +11 -0
- package/es/props/editor/check-box.mjs +11 -0
- package/es/props/editor/code.mjs +20 -0
- package/es/props/editor/color-picker.mjs +11 -0
- package/es/props/editor/common.mjs +48 -0
- package/es/props/editor/data-picker.mjs +11 -0
- package/es/props/editor/date-picker.mjs +11 -0
- package/es/props/editor/date-range.mjs +11 -0
- package/es/props/editor/dropdown-list.mjs +11 -0
- package/es/props/editor/html.mjs +11 -0
- package/es/props/editor/index.mjs +27 -0
- package/es/props/editor/list-box.mjs +11 -0
- package/es/props/editor/markdown.mjs +19 -0
- package/es/props/editor/number-range.mjs +11 -0
- package/es/props/editor/radio-button-list.mjs +11 -0
- package/es/props/editor/rate.mjs +11 -0
- package/es/props/editor/raw.mjs +11 -0
- package/es/props/editor/slider.mjs +11 -0
- package/{out → es}/props/editor/span.d.ts +2 -2
- package/es/props/editor/span.mjs +11 -0
- package/es/props/editor/stepper.mjs +11 -0
- package/es/props/editor/switch.mjs +11 -0
- package/es/props/editor/text-box.mjs +23 -0
- package/es/props/editor/upload.mjs +11 -0
- package/es/props/index.mjs +29 -0
- package/es/use/click-outside/click-outside.mjs +48 -0
- package/es/use/control/index.mjs +3 -0
- package/es/use/control/use-control-controller/use-control-controller.mjs +74 -0
- package/es/use/event/event.mjs +37 -0
- package/es/use/focus-blur/focus-blur.mjs +46 -0
- package/es/use/index.mjs +13 -0
- package/es/use/namespace/namespace.mjs +8 -0
- package/es/use/route/route.mjs +28 -0
- package/es/use/util/index.mjs +11 -0
- package/{out/use/view/index.js → es/use/view/index.mjs} +3 -1
- package/es/use/view/use-view-controller/use-view-controller.mjs +72 -0
- package/es/use/vue/vue.mjs +55 -0
- package/es/util/control/prepare-control.mjs +22 -0
- package/es/util/index.d.ts +11 -0
- package/es/util/index.d.ts.map +1 -0
- package/es/util/index.mjs +14 -0
- package/es/util/install.mjs +9 -0
- package/es/util/overlay-container/overlay-container.d.ts +93 -0
- package/es/util/overlay-container/overlay-container.d.ts.map +1 -0
- package/es/util/overlay-container/overlay-container.mjs +114 -0
- package/es/util/overlay-popover-container/overlay-popover-container.d.ts +17 -0
- package/es/util/overlay-popover-container/overlay-popover-container.d.ts.map +1 -0
- package/es/util/overlay-popover-container/overlay-popover-container.mjs +10 -0
- package/es/util/overlay-view-util/overlay-view-util.d.ts +9 -0
- package/es/util/overlay-view-util/overlay-view-util.d.ts.map +1 -0
- package/es/util/overlay-view-util/overlay-view-util.mjs +63 -0
- package/es/util/render/render.mjs +20 -0
- package/es/util/route/route-listener.mjs +73 -0
- package/{out → es}/util/route/route.d.ts +20 -20
- package/es/util/route/route.d.ts.map +1 -0
- package/es/util/route/route.mjs +252 -0
- package/es/util/router-callback/router-callback-item.d.ts +62 -0
- package/es/util/router-callback/router-callback-item.d.ts.map +1 -0
- package/es/util/router-callback/router-callback-item.mjs +72 -0
- package/es/util/router-callback/router-callback.d.ts +60 -0
- package/es/util/router-callback/router-callback.d.ts.map +1 -0
- package/es/util/router-callback/router-callback.mjs +86 -0
- package/es/util/store/app-store/app-store.d.ts +10 -0
- package/es/util/store/app-store/app-store.d.ts.map +1 -0
- package/es/util/store/app-store/app-store.mjs +10 -0
- package/es/util/store/index.d.ts +4 -0
- package/es/util/store/index.d.ts.map +1 -0
- package/es/util/store/index.mjs +8 -0
- package/es/util/store/ui-store/ui-store.d.ts +32 -0
- package/es/util/store/ui-store/ui-store.d.ts.map +1 -0
- package/es/util/store/ui-store/ui-store.mjs +15 -0
- package/es/util/store/ui-store/z-index.d.ts +35 -0
- package/es/util/store/ui-store/z-index.d.ts.map +1 -0
- package/es/util/store/ui-store/z-index.mjs +18 -0
- package/es/view/app-redirect-view/app-redirect-view.d.ts +2 -0
- package/es/view/app-redirect-view/app-redirect-view.d.ts.map +1 -0
- package/es/view/app-redirect-view/app-redirect-view.mjs +27 -0
- package/es/view/common/index.d.ts +49 -0
- package/es/view/common/index.d.ts.map +1 -0
- package/es/view/common/index.mjs +13 -0
- package/es/view/common/view.css +1 -0
- package/es/view/common/view.d.ts +53 -0
- package/es/view/common/view.d.ts.map +1 -0
- package/es/view/common/view.mjs +143 -0
- package/es/view/common/view.provider.d.ts +14 -0
- package/es/view/common/view.provider.d.ts.map +1 -0
- package/es/view/common/view.provider.mjs +8 -0
- package/es/view/index.d.ts +5 -0
- package/es/view/index.d.ts.map +1 -0
- package/es/view/index.mjs +6 -0
- package/es/view/portal-view/index.d.ts +41 -0
- package/es/view/portal-view/index.d.ts.map +1 -0
- package/es/view/portal-view/index.mjs +21 -0
- package/es/view/portal-view/portal-view.d.ts +44 -0
- package/es/view/portal-view/portal-view.d.ts.map +1 -0
- package/es/view/portal-view/portal-view.mjs +93 -0
- package/es/view/portal-view/portal-view.provider.d.ts +14 -0
- package/es/view/portal-view/portal-view.provider.d.ts.map +1 -0
- package/es/view/portal-view/portal-view.provider.mjs +8 -0
- package/es/view/todo-redirect/todo-redirect.d.ts +2 -0
- package/es/view/todo-redirect/todo-redirect.d.ts.map +1 -0
- package/es/view/todo-redirect/todo-redirect.mjs +52 -0
- package/lib/index.cjs +236 -0
- package/package.json +20 -16
- package/src/common/code-list/code-list.scss +5 -0
- package/src/common/code-list/code-list.tsx +108 -0
- package/src/common/control-base/control-base.scss +4 -0
- package/src/common/control-base/control-base.tsx +129 -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 +70 -0
- package/src/common/icon/icon.tsx +69 -0
- package/src/common/index.ts +8 -0
- package/src/common/router-view/router-view.tsx +74 -0
- package/src/common/view-shell/view-shell.scss +5 -0
- package/src/common/view-shell/view-shell.tsx +70 -0
- package/src/index.ts +3 -0
- package/src/panel-component/grid-container/grid-container.controller.ts +18 -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 +119 -0
- package/src/panel-component/grid-container/index.ts +19 -0
- package/src/panel-component/index.ts +9 -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 +166 -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 +308 -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 +20 -0
- package/src/panel-component/multi-data-container/multi-data-container.tsx +109 -0
- package/src/panel-component/nav-pos/index.ts +16 -0
- package/src/panel-component/nav-pos/nav-pos.controller.ts +373 -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 +52 -0
- package/src/panel-component/nav-pos/nav-pos.tsx +121 -0
- package/src/panel-component/panel-container/index.ts +27 -0
- package/src/panel-component/panel-container/panel-container.controller.ts +18 -0
- package/src/panel-component/panel-container/panel-container.provider.ts +30 -0
- package/src/panel-component/panel-container/panel-container.scss +15 -0
- package/src/panel-component/panel-container/panel-container.state.ts +12 -0
- package/src/panel-component/panel-container/panel-container.tsx +72 -0
- package/src/panel-component/panel-ctrl-pos/index.ts +14 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.ts +53 -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 +53 -0
- package/src/panel-component/panel-field/index.ts +14 -0
- package/src/panel-component/panel-field/panel-field.controller.ts +130 -0
- package/src/panel-component/panel-field/panel-field.provider.ts +28 -0
- package/src/panel-component/panel-field/panel-field.scss +36 -0
- package/src/panel-component/panel-field/panel-field.state.ts +12 -0
- package/src/panel-component/panel-field/panel-field.tsx +78 -0
- package/src/panel-component/panel-rawitem/index.ts +18 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.controller.ts +34 -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 +51 -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 +32 -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 +34 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.tsx +110 -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 +25 -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 +60 -0
- package/src/panel-component/single-data-container/index.ts +22 -0
- package/src/panel-component/single-data-container/single-data-container.controller.ts +345 -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 +20 -0
- package/src/panel-component/single-data-container/single-data-container.tsx +95 -0
- package/src/props/editor/span.ts +1 -1
- package/src/util/index.ts +5 -0
- package/src/util/overlay-container/overlay-container.ts +155 -0
- package/src/util/overlay-popover-container/overlay-popover-container.ts +30 -0
- package/src/util/overlay-view-util/overlay-view-util.ts +89 -0
- package/src/util/route/route.ts +142 -142
- package/src/util/router-callback/router-callback-item.ts +98 -0
- package/src/util/router-callback/router-callback.ts +97 -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 +27 -0
- package/src/util/store/ui-store/z-index.ts +53 -0
- package/src/view/app-redirect-view/app-redirect-view.tsx +26 -0
- package/src/view/common/index.ts +10 -0
- package/src/view/common/view.provider.ts +14 -0
- package/src/view/common/view.scss +38 -0
- package/src/view/common/view.tsx +180 -0
- package/src/view/index.ts +4 -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 +79 -0
- package/src/view/todo-redirect/todo-redirect.tsx +51 -0
- package/dist/index.esm.js +0 -1859
- package/out/index.d.ts.map +0 -1
- package/out/index.js +0 -5
- package/out/interface/index.js +0 -1
- package/out/interface/util/index.js +0 -1
- package/out/interface/util/route/route.js +0 -1
- package/out/plugin/index.js +0 -1
- package/out/plugin/plugin-factory/plugin-factory.js +0 -297
- package/out/props/common.js +0 -23
- package/out/props/editor/array.js +0 -25
- package/out/props/editor/autocomplete.js +0 -25
- package/out/props/editor/cascader.js +0 -25
- package/out/props/editor/check-box-list.js +0 -25
- package/out/props/editor/check-box.js +0 -25
- package/out/props/editor/code.js +0 -29
- package/out/props/editor/color-picker.js +0 -25
- package/out/props/editor/common.js +0 -79
- package/out/props/editor/data-picker.js +0 -25
- package/out/props/editor/date-picker.js +0 -25
- package/out/props/editor/date-range.js +0 -21
- package/out/props/editor/dropdown-list.js +0 -25
- package/out/props/editor/html.js +0 -25
- package/out/props/editor/index.js +0 -25
- package/out/props/editor/list-box.js +0 -25
- package/out/props/editor/markdown.js +0 -28
- package/out/props/editor/number-range.js +0 -21
- package/out/props/editor/radio-button-list.js +0 -25
- package/out/props/editor/rate.js +0 -21
- package/out/props/editor/raw.js +0 -21
- package/out/props/editor/slider.js +0 -21
- package/out/props/editor/span.js +0 -25
- package/out/props/editor/stepper.js +0 -21
- package/out/props/editor/switch.js +0 -21
- package/out/props/editor/text-box.js +0 -73
- package/out/props/editor/upload.js +0 -25
- package/out/props/index.js +0 -2
- package/out/use/click-outside/click-outside.js +0 -50
- package/out/use/control/index.js +0 -1
- package/out/use/control/use-control-controller/use-control-controller.js +0 -94
- package/out/use/event/event.js +0 -39
- package/out/use/focus-blur/focus-blur.js +0 -63
- package/out/use/index.js +0 -9
- package/out/use/namespace/namespace.js +0 -13
- package/out/use/route/route.js +0 -41
- package/out/use/util/index.js +0 -23
- package/out/use/view/use-view-controller/use-view-controller.js +0 -94
- package/out/use/vue/vue.js +0 -112
- package/out/util/control/prepare-control.js +0 -25
- package/out/util/index.d.ts +0 -6
- package/out/util/index.d.ts.map +0 -1
- package/out/util/index.js +0 -5
- package/out/util/install.js +0 -6
- package/out/util/render/render.js +0 -28
- package/out/util/route/route-listener.js +0 -76
- package/out/util/route/route.d.ts.map +0 -1
- package/out/util/route/route.js +0 -385
- /package/{out → es}/interface/index.d.ts +0 -0
- /package/{out → es}/interface/index.d.ts.map +0 -0
- /package/{out → es}/interface/util/index.d.ts +0 -0
- /package/{out → es}/interface/util/index.d.ts.map +0 -0
- /package/{out → es}/interface/util/route/route.d.ts +0 -0
- /package/{out → es}/interface/util/route/route.d.ts.map +0 -0
- /package/{out → es}/plugin/index.d.ts +0 -0
- /package/{out → es}/plugin/index.d.ts.map +0 -0
- /package/{out → es}/plugin/plugin-factory/plugin-factory.d.ts +0 -0
- /package/{out → es}/plugin/plugin-factory/plugin-factory.d.ts.map +0 -0
- /package/{out → es}/props/common.d.ts +0 -0
- /package/{out → es}/props/common.d.ts.map +0 -0
- /package/{out → es}/props/editor/array.d.ts +0 -0
- /package/{out → es}/props/editor/array.d.ts.map +0 -0
- /package/{out → es}/props/editor/autocomplete.d.ts +0 -0
- /package/{out → es}/props/editor/autocomplete.d.ts.map +0 -0
- /package/{out → es}/props/editor/cascader.d.ts +0 -0
- /package/{out → es}/props/editor/cascader.d.ts.map +0 -0
- /package/{out → es}/props/editor/check-box-list.d.ts +0 -0
- /package/{out → es}/props/editor/check-box-list.d.ts.map +0 -0
- /package/{out → es}/props/editor/check-box.d.ts +0 -0
- /package/{out → es}/props/editor/check-box.d.ts.map +0 -0
- /package/{out → es}/props/editor/code.d.ts +0 -0
- /package/{out → es}/props/editor/code.d.ts.map +0 -0
- /package/{out → es}/props/editor/color-picker.d.ts +0 -0
- /package/{out → es}/props/editor/color-picker.d.ts.map +0 -0
- /package/{out → es}/props/editor/common.d.ts +0 -0
- /package/{out → es}/props/editor/common.d.ts.map +0 -0
- /package/{out → es}/props/editor/data-picker.d.ts +0 -0
- /package/{out → es}/props/editor/data-picker.d.ts.map +0 -0
- /package/{out → es}/props/editor/date-picker.d.ts +0 -0
- /package/{out → es}/props/editor/date-picker.d.ts.map +0 -0
- /package/{out → es}/props/editor/date-range.d.ts +0 -0
- /package/{out → es}/props/editor/date-range.d.ts.map +0 -0
- /package/{out → es}/props/editor/dropdown-list.d.ts +0 -0
- /package/{out → es}/props/editor/dropdown-list.d.ts.map +0 -0
- /package/{out → es}/props/editor/html.d.ts +0 -0
- /package/{out → es}/props/editor/html.d.ts.map +0 -0
- /package/{out → es}/props/editor/index.d.ts +0 -0
- /package/{out → es}/props/editor/index.d.ts.map +0 -0
- /package/{out → es}/props/editor/list-box.d.ts +0 -0
- /package/{out → es}/props/editor/list-box.d.ts.map +0 -0
- /package/{out → es}/props/editor/markdown.d.ts +0 -0
- /package/{out → es}/props/editor/markdown.d.ts.map +0 -0
- /package/{out → es}/props/editor/number-range.d.ts +0 -0
- /package/{out → es}/props/editor/number-range.d.ts.map +0 -0
- /package/{out → es}/props/editor/radio-button-list.d.ts +0 -0
- /package/{out → es}/props/editor/radio-button-list.d.ts.map +0 -0
- /package/{out → es}/props/editor/rate.d.ts +0 -0
- /package/{out → es}/props/editor/rate.d.ts.map +0 -0
- /package/{out → es}/props/editor/raw.d.ts +0 -0
- /package/{out → es}/props/editor/raw.d.ts.map +0 -0
- /package/{out → es}/props/editor/slider.d.ts +0 -0
- /package/{out → es}/props/editor/slider.d.ts.map +0 -0
- /package/{out → es}/props/editor/span.d.ts.map +0 -0
- /package/{out → es}/props/editor/stepper.d.ts +0 -0
- /package/{out → es}/props/editor/stepper.d.ts.map +0 -0
- /package/{out → es}/props/editor/switch.d.ts +0 -0
- /package/{out → es}/props/editor/switch.d.ts.map +0 -0
- /package/{out → es}/props/editor/text-box.d.ts +0 -0
- /package/{out → es}/props/editor/text-box.d.ts.map +0 -0
- /package/{out → es}/props/editor/upload.d.ts +0 -0
- /package/{out → es}/props/editor/upload.d.ts.map +0 -0
- /package/{out → es}/props/index.d.ts +0 -0
- /package/{out → es}/props/index.d.ts.map +0 -0
- /package/{out → es}/use/click-outside/click-outside.d.ts +0 -0
- /package/{out → es}/use/click-outside/click-outside.d.ts.map +0 -0
- /package/{out → es}/use/control/index.d.ts +0 -0
- /package/{out → es}/use/control/index.d.ts.map +0 -0
- /package/{out → es}/use/control/use-control-controller/use-control-controller.d.ts +0 -0
- /package/{out → es}/use/control/use-control-controller/use-control-controller.d.ts.map +0 -0
- /package/{out → es}/use/event/event.d.ts +0 -0
- /package/{out → es}/use/event/event.d.ts.map +0 -0
- /package/{out → es}/use/focus-blur/focus-blur.d.ts +0 -0
- /package/{out → es}/use/focus-blur/focus-blur.d.ts.map +0 -0
- /package/{out → es}/use/index.d.ts +0 -0
- /package/{out → es}/use/index.d.ts.map +0 -0
- /package/{out → es}/use/namespace/namespace.d.ts +0 -0
- /package/{out → es}/use/namespace/namespace.d.ts.map +0 -0
- /package/{out → es}/use/route/route.d.ts +0 -0
- /package/{out → es}/use/route/route.d.ts.map +0 -0
- /package/{out → es}/use/util/index.d.ts +0 -0
- /package/{out → es}/use/util/index.d.ts.map +0 -0
- /package/{out → es}/use/view/index.d.ts +0 -0
- /package/{out → es}/use/view/index.d.ts.map +0 -0
- /package/{out → es}/use/view/use-view-controller/use-view-controller.d.ts +0 -0
- /package/{out → es}/use/view/use-view-controller/use-view-controller.d.ts.map +0 -0
- /package/{out → es}/use/vue/vue.d.ts +0 -0
- /package/{out → es}/use/vue/vue.d.ts.map +0 -0
- /package/{out → es}/util/control/prepare-control.d.ts +0 -0
- /package/{out → es}/util/control/prepare-control.d.ts.map +0 -0
- /package/{out → es}/util/install.d.ts +0 -0
- /package/{out → es}/util/install.d.ts.map +0 -0
- /package/{out → es}/util/render/render.d.ts +0 -0
- /package/{out → es}/util/render/render.d.ts.map +0 -0
- /package/{out → es}/util/route/route-listener.d.ts +0 -0
- /package/{out → es}/util/route/route-listener.d.ts.map +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IDrawerOptions,
|
|
3
|
+
IFloatWindowOptions,
|
|
4
|
+
IModal,
|
|
5
|
+
IModalData,
|
|
6
|
+
IModalOptions,
|
|
7
|
+
IPopoverOptions,
|
|
8
|
+
} from '@ibiz-template/runtime';
|
|
9
|
+
import { h, resolveComponent, VNode } from 'vue';
|
|
10
|
+
|
|
11
|
+
export function createOverlayView(props?: IParams): (modal: IModal) => VNode {
|
|
12
|
+
return (modal: IModal) => {
|
|
13
|
+
const viewShell = resolveComponent('IBizViewShell');
|
|
14
|
+
return h(viewShell, {
|
|
15
|
+
...props,
|
|
16
|
+
modal,
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function openViewModal(
|
|
22
|
+
props?: IParams,
|
|
23
|
+
opts?: IModalOptions,
|
|
24
|
+
): Promise<IModalData> {
|
|
25
|
+
const overlay = ibiz.overlay.createModal(
|
|
26
|
+
createOverlayView(props),
|
|
27
|
+
undefined,
|
|
28
|
+
opts,
|
|
29
|
+
);
|
|
30
|
+
overlay.present();
|
|
31
|
+
const result: IModalData = await overlay.onWillDismiss();
|
|
32
|
+
return result || { ok: false };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export async function openViewFloatWindow(
|
|
36
|
+
props?: IParams,
|
|
37
|
+
opts?: IFloatWindowOptions,
|
|
38
|
+
): Promise<IModalData> {
|
|
39
|
+
const overlay = ibiz.overlay.createFloatWindow(
|
|
40
|
+
createOverlayView(props),
|
|
41
|
+
undefined,
|
|
42
|
+
opts,
|
|
43
|
+
);
|
|
44
|
+
overlay.present();
|
|
45
|
+
const result: IModalData = await overlay.onWillDismiss();
|
|
46
|
+
return result || { ok: false };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export async function openViewDrawer(
|
|
50
|
+
props?: IParams,
|
|
51
|
+
opts?: IDrawerOptions,
|
|
52
|
+
): Promise<IModalData> {
|
|
53
|
+
const overlay = ibiz.overlay.createDrawer(
|
|
54
|
+
createOverlayView(props),
|
|
55
|
+
undefined,
|
|
56
|
+
opts,
|
|
57
|
+
);
|
|
58
|
+
await overlay.present();
|
|
59
|
+
const result: IModalData = await overlay.onWillDismiss();
|
|
60
|
+
return result || { ok: false };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export async function openViewPopover(
|
|
64
|
+
event: MouseEvent,
|
|
65
|
+
props?: IParams,
|
|
66
|
+
opts?: IPopoverOptions,
|
|
67
|
+
): Promise<IModalData> {
|
|
68
|
+
const overlay = ibiz.overlay.createPopover(
|
|
69
|
+
createOverlayView(props),
|
|
70
|
+
undefined,
|
|
71
|
+
opts,
|
|
72
|
+
);
|
|
73
|
+
overlay.present(event.target as HTMLElement);
|
|
74
|
+
const result: IModalData = await overlay.onWillDismiss();
|
|
75
|
+
return result || { ok: false };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const PlacementMap: IData = {
|
|
79
|
+
DRAWER_LEFT: 'left',
|
|
80
|
+
DRAWER_RIGHT: 'right',
|
|
81
|
+
DRAWER_TOP: 'top',
|
|
82
|
+
DRAWER_BOTTOM: 'bottom',
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export function getDrawerPlacement(
|
|
86
|
+
openMode: string,
|
|
87
|
+
): IDrawerOptions['placement'] {
|
|
88
|
+
return PlacementMap[openMode] || 'right';
|
|
89
|
+
}
|
package/src/util/route/route.ts
CHANGED
|
@@ -11,6 +11,146 @@ import {
|
|
|
11
11
|
} from '@ibiz-template/runtime';
|
|
12
12
|
import { IRoutePath, IRoutePathNode, IRouteViewData } from '../../interface';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* 路径字符串转换成路由路径对象
|
|
16
|
+
*
|
|
17
|
+
* @author lxm
|
|
18
|
+
* @date 2022-08-18 11:08:08
|
|
19
|
+
* @export
|
|
20
|
+
* @param {string} pathStr 以/开头的路径,即router的path
|
|
21
|
+
* @returns {*} {IRoutePath}
|
|
22
|
+
*/
|
|
23
|
+
export function route2routePath(route: Route): IRoutePath {
|
|
24
|
+
// 一共匹配了几级路由
|
|
25
|
+
const depth = route.matched.length;
|
|
26
|
+
|
|
27
|
+
// 解析路径节点
|
|
28
|
+
const pathNodes: IRoutePathNode[] = [];
|
|
29
|
+
for (let index = 1; index <= depth; index++) {
|
|
30
|
+
const viewName = route.path.split('/')[index * 2];
|
|
31
|
+
const paramsStr = route.params[`params${index}`] as string;
|
|
32
|
+
|
|
33
|
+
/** 路由参数,默认是视图参数 */
|
|
34
|
+
let params: IParams | undefined;
|
|
35
|
+
|
|
36
|
+
/** 上下文参数 */
|
|
37
|
+
let context: IParams | undefined;
|
|
38
|
+
let srfnav: string | undefined;
|
|
39
|
+
// params为占位符时置空
|
|
40
|
+
if (!paramsStr || paramsStr === ibiz.env.routePlaceholder) {
|
|
41
|
+
params = undefined;
|
|
42
|
+
} else {
|
|
43
|
+
// 首页上下文要解析
|
|
44
|
+
params = qs.parse(paramsStr, {
|
|
45
|
+
strictNullHandling: true,
|
|
46
|
+
delimiter: ';',
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 路由参数存在的时候,解析里面的上下文。
|
|
51
|
+
if (params) {
|
|
52
|
+
if (index === 1) {
|
|
53
|
+
// 首页的时候,路由上的参数是资源路径,属于上下文
|
|
54
|
+
context = params;
|
|
55
|
+
params = undefined;
|
|
56
|
+
} else {
|
|
57
|
+
if (params.srfnavctx) {
|
|
58
|
+
// 解析额外上下文
|
|
59
|
+
context = JSON.parse(decodeURIComponent(params.srfnavctx));
|
|
60
|
+
delete params.srfnavctx;
|
|
61
|
+
}
|
|
62
|
+
if (params.srfnav) {
|
|
63
|
+
// 解析额外自身视图导航参数
|
|
64
|
+
srfnav = params.srfnav;
|
|
65
|
+
delete params.srfnav;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
pathNodes.push({ viewName, context, params, srfnav });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// 解析应用上下文
|
|
74
|
+
let appContext;
|
|
75
|
+
if (
|
|
76
|
+
route.params.appContext &&
|
|
77
|
+
route.params.appContext !== ibiz.env.routePlaceholder
|
|
78
|
+
) {
|
|
79
|
+
appContext = qs.parse(route.params.appContext as string, {
|
|
80
|
+
strictNullHandling: true,
|
|
81
|
+
delimiter: ';',
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return { appContext, pathNodes };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 路由路径对象转路径字符串
|
|
90
|
+
*
|
|
91
|
+
* @author lxm
|
|
92
|
+
* @date 2022-08-18 13:08:57
|
|
93
|
+
* @export
|
|
94
|
+
* @param {IRoutePath} routePath 路由路径对象
|
|
95
|
+
* @returns {*} {string}
|
|
96
|
+
*/
|
|
97
|
+
export function routePath2string(routePath: IRoutePath): string {
|
|
98
|
+
let pathStr = '';
|
|
99
|
+
// 应用上下文
|
|
100
|
+
if (routePath.appContext) {
|
|
101
|
+
pathStr += `/${qs.stringify(routePath.appContext, {
|
|
102
|
+
delimiter: ';',
|
|
103
|
+
strictNullHandling: true,
|
|
104
|
+
})}`;
|
|
105
|
+
} else {
|
|
106
|
+
pathStr += `/${ibiz.env.routePlaceholder}`;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// 每一层级的视图路由的拼装
|
|
110
|
+
routePath.pathNodes.forEach((pathNode: IRoutePathNode, index: number) => {
|
|
111
|
+
pathStr += `/${pathNode.viewName}/`;
|
|
112
|
+
let routeParams: IParams = {};
|
|
113
|
+
// 首页路由
|
|
114
|
+
if (index === 0) {
|
|
115
|
+
if (notNilEmpty(pathNode.context)) {
|
|
116
|
+
// 对象转成a=11;b=222的格式,字符串直接附加在后面
|
|
117
|
+
routeParams = pathNode.context!;
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
// 非首页路由,视图参数直接放到路由参数上,上下文转换后放到路由参数的srfnavctx上
|
|
121
|
+
routeParams = notNilEmpty(pathNode.params) ? pathNode.params! : {};
|
|
122
|
+
|
|
123
|
+
// 合并视图上下文
|
|
124
|
+
if (notNilEmpty(pathNode.context)) {
|
|
125
|
+
const objStr = JSON.stringify(pathNode.context);
|
|
126
|
+
// undefined 的vlaue会被JSON.stringify删除,可能会转成{}
|
|
127
|
+
if (objStr !== '{}') {
|
|
128
|
+
routeParams!.srfnavctx = encodeURIComponent(objStr);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// 合并视图导航参数
|
|
133
|
+
if (pathNode.srfnav) {
|
|
134
|
+
routeParams.srfnav = pathNode.srfnav;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const paramsStr = qs.stringify(routeParams, {
|
|
139
|
+
delimiter: ';',
|
|
140
|
+
strictNullHandling: true,
|
|
141
|
+
skipNulls: true,
|
|
142
|
+
});
|
|
143
|
+
// 把路由参数转换到路由路径上去
|
|
144
|
+
if (notNilEmpty(paramsStr)) {
|
|
145
|
+
pathStr += paramsStr;
|
|
146
|
+
} else {
|
|
147
|
+
pathStr += ibiz.env.routePlaceholder;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
return pathStr;
|
|
152
|
+
}
|
|
153
|
+
|
|
14
154
|
/**
|
|
15
155
|
* 获取自身的路由上下文,排除了部分不需要路由携带的参数
|
|
16
156
|
*
|
|
@@ -238,146 +378,6 @@ export async function parseRouteViewData(
|
|
|
238
378
|
};
|
|
239
379
|
}
|
|
240
380
|
|
|
241
|
-
/**
|
|
242
|
-
* 路径字符串转换成路由路径对象
|
|
243
|
-
*
|
|
244
|
-
* @author lxm
|
|
245
|
-
* @date 2022-08-18 11:08:08
|
|
246
|
-
* @export
|
|
247
|
-
* @param {string} pathStr 以/开头的路径,即router的path
|
|
248
|
-
* @returns {*} {IRoutePath}
|
|
249
|
-
*/
|
|
250
|
-
export function route2routePath(route: Route): IRoutePath {
|
|
251
|
-
// 一共匹配了几级路由
|
|
252
|
-
const depth = route.matched.length;
|
|
253
|
-
|
|
254
|
-
// 解析路径节点
|
|
255
|
-
const pathNodes: IRoutePathNode[] = [];
|
|
256
|
-
for (let index = 1; index <= depth; index++) {
|
|
257
|
-
const viewName = route.path.split('/')[index * 2];
|
|
258
|
-
const paramsStr = route.params[`params${index}`] as string;
|
|
259
|
-
|
|
260
|
-
/** 路由参数,默认是视图参数 */
|
|
261
|
-
let params: IParams | undefined;
|
|
262
|
-
|
|
263
|
-
/** 上下文参数 */
|
|
264
|
-
let context: IParams | undefined;
|
|
265
|
-
let srfnav: string | undefined;
|
|
266
|
-
// params为占位符时置空
|
|
267
|
-
if (!paramsStr || paramsStr === ibiz.env.routePlaceholder) {
|
|
268
|
-
params = undefined;
|
|
269
|
-
} else {
|
|
270
|
-
// 首页上下文要解析
|
|
271
|
-
params = qs.parse(paramsStr, {
|
|
272
|
-
strictNullHandling: true,
|
|
273
|
-
delimiter: ';',
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// 路由参数存在的时候,解析里面的上下文。
|
|
278
|
-
if (params) {
|
|
279
|
-
if (index === 1) {
|
|
280
|
-
// 首页的时候,路由上的参数是资源路径,属于上下文
|
|
281
|
-
context = params;
|
|
282
|
-
params = undefined;
|
|
283
|
-
} else {
|
|
284
|
-
if (params.srfnavctx) {
|
|
285
|
-
// 解析额外上下文
|
|
286
|
-
context = JSON.parse(decodeURIComponent(params.srfnavctx));
|
|
287
|
-
delete params.srfnavctx;
|
|
288
|
-
}
|
|
289
|
-
if (params.srfnav) {
|
|
290
|
-
// 解析额外自身视图导航参数
|
|
291
|
-
srfnav = params.srfnav;
|
|
292
|
-
delete params.srfnav;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
pathNodes.push({ viewName, context, params, srfnav });
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
// 解析应用上下文
|
|
301
|
-
let appContext;
|
|
302
|
-
if (
|
|
303
|
-
route.params.appContext &&
|
|
304
|
-
route.params.appContext !== ibiz.env.routePlaceholder
|
|
305
|
-
) {
|
|
306
|
-
appContext = qs.parse(route.params.appContext as string, {
|
|
307
|
-
strictNullHandling: true,
|
|
308
|
-
delimiter: ';',
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
return { appContext, pathNodes };
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* 路由路径对象转路径字符串
|
|
317
|
-
*
|
|
318
|
-
* @author lxm
|
|
319
|
-
* @date 2022-08-18 13:08:57
|
|
320
|
-
* @export
|
|
321
|
-
* @param {IRoutePath} routePath 路由路径对象
|
|
322
|
-
* @returns {*} {string}
|
|
323
|
-
*/
|
|
324
|
-
export function routePath2string(routePath: IRoutePath): string {
|
|
325
|
-
let pathStr = '';
|
|
326
|
-
// 应用上下文
|
|
327
|
-
if (routePath.appContext) {
|
|
328
|
-
pathStr += `/${qs.stringify(routePath.appContext, {
|
|
329
|
-
delimiter: ';',
|
|
330
|
-
strictNullHandling: true,
|
|
331
|
-
})}`;
|
|
332
|
-
} else {
|
|
333
|
-
pathStr += `/${ibiz.env.routePlaceholder}`;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
// 每一层级的视图路由的拼装
|
|
337
|
-
routePath.pathNodes.forEach((pathNode: IRoutePathNode, index: number) => {
|
|
338
|
-
pathStr += `/${pathNode.viewName}/`;
|
|
339
|
-
let routeParams: IParams = {};
|
|
340
|
-
// 首页路由
|
|
341
|
-
if (index === 0) {
|
|
342
|
-
if (notNilEmpty(pathNode.context)) {
|
|
343
|
-
// 对象转成a=11;b=222的格式,字符串直接附加在后面
|
|
344
|
-
routeParams = pathNode.context!;
|
|
345
|
-
}
|
|
346
|
-
} else {
|
|
347
|
-
// 非首页路由,视图参数直接放到路由参数上,上下文转换后放到路由参数的srfnavctx上
|
|
348
|
-
routeParams = notNilEmpty(pathNode.params) ? pathNode.params! : {};
|
|
349
|
-
|
|
350
|
-
// 合并视图上下文
|
|
351
|
-
if (notNilEmpty(pathNode.context)) {
|
|
352
|
-
const objStr = JSON.stringify(pathNode.context);
|
|
353
|
-
// undefined 的vlaue会被JSON.stringify删除,可能会转成{}
|
|
354
|
-
if (objStr !== '{}') {
|
|
355
|
-
routeParams!.srfnavctx = encodeURIComponent(objStr);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// 合并视图导航参数
|
|
360
|
-
if (pathNode.srfnav) {
|
|
361
|
-
routeParams.srfnav = pathNode.srfnav;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
const paramsStr = qs.stringify(routeParams, {
|
|
366
|
-
delimiter: ';',
|
|
367
|
-
strictNullHandling: true,
|
|
368
|
-
skipNulls: true,
|
|
369
|
-
});
|
|
370
|
-
// 把路由参数转换到路由路径上去
|
|
371
|
-
if (notNilEmpty(paramsStr)) {
|
|
372
|
-
pathStr += paramsStr;
|
|
373
|
-
} else {
|
|
374
|
-
pathStr += ibiz.env.routePlaceholder;
|
|
375
|
-
}
|
|
376
|
-
});
|
|
377
|
-
|
|
378
|
-
return pathStr;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
381
|
/**
|
|
382
382
|
* 获取指定层级的路由路径
|
|
383
383
|
* @author lxm
|
|
@@ -397,8 +397,8 @@ export function getNestedRoutePath(
|
|
|
397
397
|
return '';
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
//
|
|
401
|
-
if (route.name) {
|
|
400
|
+
// 只有当前层级的路由的代名称的路由如login,404等直接返回path
|
|
401
|
+
if (route.matched.length === depth && route.name) {
|
|
402
402
|
return route.path;
|
|
403
403
|
}
|
|
404
404
|
const routePath = route2routePath(route);
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { IModalData } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 路由视图关闭回调
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2023-07-13 21:07:51
|
|
8
|
+
* @export
|
|
9
|
+
* @class RouterCallbackItem
|
|
10
|
+
*/
|
|
11
|
+
export class RouterCallbackItem {
|
|
12
|
+
protected resolve?: (modal: IModalData) => void;
|
|
13
|
+
|
|
14
|
+
protected promise?: Promise<IModalData>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 销毁定时器
|
|
18
|
+
*
|
|
19
|
+
* @author chitanda
|
|
20
|
+
* @date 2023-07-13 21:07:51
|
|
21
|
+
* @type {number}
|
|
22
|
+
*/
|
|
23
|
+
timeout?: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 是否已经有打开的视图认领此回调,如果在一定时间内没有被认领,则会被清除
|
|
27
|
+
*
|
|
28
|
+
* @author chitanda
|
|
29
|
+
* @date 2023-07-13 21:07:35
|
|
30
|
+
*/
|
|
31
|
+
isActivated = false;
|
|
32
|
+
|
|
33
|
+
constructor(
|
|
34
|
+
public from: string,
|
|
35
|
+
public to: string,
|
|
36
|
+
) {
|
|
37
|
+
ibiz.log.debug('openRouter: ', from, to);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 等待视图关闭
|
|
42
|
+
*
|
|
43
|
+
* @author chitanda
|
|
44
|
+
* @date 2023-07-13 21:07:34
|
|
45
|
+
* @return {*} {Promise<IModalData>}
|
|
46
|
+
*/
|
|
47
|
+
onWillDismiss(): Promise<IModalData> {
|
|
48
|
+
if (!this.promise) {
|
|
49
|
+
this.promise = new Promise(resolve => {
|
|
50
|
+
this.resolve = resolve;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return this.promise.then(modal => {
|
|
54
|
+
ibiz.log.debug('onWillDismiss: ', this.from, this.to, modal);
|
|
55
|
+
return modal;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 关闭视图
|
|
61
|
+
*
|
|
62
|
+
* @author chitanda
|
|
63
|
+
* @date 2023-07-13 21:07:06
|
|
64
|
+
* @param {IModalData} modal
|
|
65
|
+
*/
|
|
66
|
+
close(modal: IModalData): void {
|
|
67
|
+
ibiz.log.debug('closeRouter: ', this.from, this.to, modal);
|
|
68
|
+
if (this.resolve) {
|
|
69
|
+
this.resolve(modal);
|
|
70
|
+
this.resolve = undefined;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 激活回调
|
|
76
|
+
*
|
|
77
|
+
* @author chitanda
|
|
78
|
+
* @date 2023-07-13 21:07:29
|
|
79
|
+
*/
|
|
80
|
+
active(): void {
|
|
81
|
+
ibiz.log.debug('activeRouter: ', this.from, this.to);
|
|
82
|
+
this.isActivated = true;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 销毁回调
|
|
87
|
+
*
|
|
88
|
+
* @author chitanda
|
|
89
|
+
* @date 2023-07-13 21:07:21
|
|
90
|
+
*/
|
|
91
|
+
destroy(): void {
|
|
92
|
+
ibiz.log.debug('destroyRouter: ', this.from, this.to);
|
|
93
|
+
if (this.resolve) {
|
|
94
|
+
this.resolve({ ok: false });
|
|
95
|
+
this.resolve = undefined;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { IModalData } from '@ibiz-template/runtime';
|
|
2
|
+
import { Router } from 'vue-router';
|
|
3
|
+
import { RouterCallbackItem } from './router-callback-item';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 路由打开视图回调,连通上级视图的关闭
|
|
7
|
+
*
|
|
8
|
+
* @author chitanda
|
|
9
|
+
* @date 2023-07-13 20:07:20
|
|
10
|
+
* @export
|
|
11
|
+
* @class RouterCallback
|
|
12
|
+
*/
|
|
13
|
+
export class RouterCallback {
|
|
14
|
+
/**
|
|
15
|
+
* 回调实例
|
|
16
|
+
*
|
|
17
|
+
* @author chitanda
|
|
18
|
+
* @date 2023-07-13 20:07:12
|
|
19
|
+
* @protected
|
|
20
|
+
* @type {Map<string, RouterCallbackItem>}
|
|
21
|
+
*/
|
|
22
|
+
protected map: Map<string, RouterCallbackItem> = new Map();
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 打开视图
|
|
26
|
+
*
|
|
27
|
+
* @author chitanda
|
|
28
|
+
* @date 2023-07-13 20:07:13
|
|
29
|
+
* @param {Router} router
|
|
30
|
+
* @param {string} path
|
|
31
|
+
* @return {*} {Promise<IModalData>}
|
|
32
|
+
*/
|
|
33
|
+
async open(router: Router, path: string): Promise<IModalData> {
|
|
34
|
+
const from = router.currentRoute.value.fullPath;
|
|
35
|
+
router.push({ path });
|
|
36
|
+
const to = path;
|
|
37
|
+
if (this.map.has(to)) {
|
|
38
|
+
const item = this.map.get(to)!;
|
|
39
|
+
return item.onWillDismiss();
|
|
40
|
+
}
|
|
41
|
+
const item = new RouterCallbackItem(from, to);
|
|
42
|
+
this.map.set(to, item);
|
|
43
|
+
this.scheduledDestruction(item);
|
|
44
|
+
return item.onWillDismiss();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 关闭视图回调
|
|
49
|
+
*
|
|
50
|
+
* @author chitanda
|
|
51
|
+
* @date 2023-07-13 20:07:38
|
|
52
|
+
* @param {string} toFullPath
|
|
53
|
+
* @param {IModalData} modal
|
|
54
|
+
*/
|
|
55
|
+
close(toFullPath: string, modal: IModalData): void {
|
|
56
|
+
const item = this.map.get(toFullPath);
|
|
57
|
+
if (item) {
|
|
58
|
+
item.close(modal);
|
|
59
|
+
this.map.delete(toFullPath);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 激活回调
|
|
65
|
+
*
|
|
66
|
+
* @author chitanda
|
|
67
|
+
* @date 2023-07-13 21:07:03
|
|
68
|
+
* @param {string} toFullPath
|
|
69
|
+
*/
|
|
70
|
+
active(toFullPath: string): void {
|
|
71
|
+
const item = this.map.get(toFullPath);
|
|
72
|
+
if (item) {
|
|
73
|
+
window.clearTimeout(item.timeout);
|
|
74
|
+
item.timeout = undefined;
|
|
75
|
+
item.active();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 一分钟内未激活的视图回调会被清除
|
|
81
|
+
*
|
|
82
|
+
* @author chitanda
|
|
83
|
+
* @date 2023-07-13 21:07:57
|
|
84
|
+
* @protected
|
|
85
|
+
* @param {RouterCallbackItem} item
|
|
86
|
+
*/
|
|
87
|
+
protected scheduledDestruction(item: RouterCallbackItem): void {
|
|
88
|
+
item.timeout = window.setTimeout(() => {
|
|
89
|
+
item.timeout = undefined;
|
|
90
|
+
item.destroy();
|
|
91
|
+
this.map.delete(item.to);
|
|
92
|
+
}, 10 * 1000);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 路由打开视图回调,连通上级视图的关闭工具类
|
|
97
|
+
export const routerCallback = new RouterCallback();
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineStore } from 'pinia';
|
|
2
|
+
import { reactive, Ref } from 'vue';
|
|
3
|
+
import { useZIndexStore } from './z-index';
|
|
4
|
+
|
|
5
|
+
export interface IUIState {
|
|
6
|
+
/**
|
|
7
|
+
* ui层级
|
|
8
|
+
*
|
|
9
|
+
* @author lxm
|
|
10
|
+
* @date 2022-08-18 21:08:48
|
|
11
|
+
* @type {number}
|
|
12
|
+
*/
|
|
13
|
+
zIndex: Ref<number>;
|
|
14
|
+
|
|
15
|
+
theme: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const useUIStore = defineStore('uiStore', () => {
|
|
19
|
+
const zIndex = useZIndexStore();
|
|
20
|
+
|
|
21
|
+
const UIStore = reactive<IUIState>({
|
|
22
|
+
zIndex: zIndex.zIndex,
|
|
23
|
+
theme: 'light',
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return { UIStore, zIndex };
|
|
27
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Ref, ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface IzIndexStore {
|
|
4
|
+
/**
|
|
5
|
+
* 当前最高的ui层级
|
|
6
|
+
*
|
|
7
|
+
* @author lxm
|
|
8
|
+
* @date 2022-08-18 21:08:48
|
|
9
|
+
* @type {number}
|
|
10
|
+
*/
|
|
11
|
+
zIndex: Ref<number>;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 增加Ui层级,返回增加后的层级
|
|
15
|
+
*
|
|
16
|
+
* @author lxm
|
|
17
|
+
* @date 2022-08-18 21:08:22
|
|
18
|
+
*/
|
|
19
|
+
increment(): number;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 减少Ui层级
|
|
23
|
+
*
|
|
24
|
+
* @author lxm
|
|
25
|
+
* @date 2022-08-18 21:08:22
|
|
26
|
+
*/
|
|
27
|
+
decrement(): void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 定义zIndex的全局状态变量
|
|
32
|
+
*
|
|
33
|
+
* @author lxm
|
|
34
|
+
* @date 2022-08-18 21:08:26
|
|
35
|
+
* @export
|
|
36
|
+
* @returns {*}
|
|
37
|
+
*/
|
|
38
|
+
export function useZIndexStore(): IzIndexStore {
|
|
39
|
+
const DEFAULT_INDEX = 500;
|
|
40
|
+
const INCREMENT_VALUE = 1;
|
|
41
|
+
const zIndex = ref(DEFAULT_INDEX);
|
|
42
|
+
|
|
43
|
+
function increment(): number {
|
|
44
|
+
zIndex.value += INCREMENT_VALUE;
|
|
45
|
+
return zIndex.value;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function decrement() {
|
|
49
|
+
zIndex.value -= INCREMENT_VALUE;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return { zIndex, increment, decrement };
|
|
53
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { IBizContext } from '@ibiz-template/core';
|
|
3
|
+
import { toLocalOpenWFRedirectView } from '@ibiz-template/runtime';
|
|
4
|
+
|
|
5
|
+
export const AppRedirectView = defineComponent({
|
|
6
|
+
setup() {
|
|
7
|
+
const context = IBizContext.create(ibiz.appData?.context || {});
|
|
8
|
+
|
|
9
|
+
onUnmounted(() => {
|
|
10
|
+
context.destroy();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const { href } = window.location;
|
|
14
|
+
|
|
15
|
+
async function toRedirect(): Promise<void> {
|
|
16
|
+
await toLocalOpenWFRedirectView(context, href);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
onMounted(() => ibiz.util.hiddenAppLoading());
|
|
20
|
+
|
|
21
|
+
toRedirect();
|
|
22
|
+
},
|
|
23
|
+
render() {
|
|
24
|
+
return <div>重定向跳转中</div>;
|
|
25
|
+
},
|
|
26
|
+
});
|