@ibiz-template/mob-vue3-components 0.7.41-alpha.21 → 0.7.41-alpha.23
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/chart-CVnUjHjl.js +2 -0
- package/dist/{chart-j1WkpBhc.js.map → chart-CVnUjHjl.js.map} +1 -1
- package/dist/ibiz-markdown-editor-MwEhH1r_.js +2 -0
- package/dist/ibiz-markdown-editor-MwEhH1r_.js.map +1 -0
- package/dist/index-CopTozpr.js +2 -0
- package/dist/index-CopTozpr.js.map +1 -0
- package/dist/index-Cxv8dJIk.js +2 -0
- package/dist/index-Cxv8dJIk.js.map +1 -0
- package/dist/index-DV0pS0zU.js +2 -0
- package/dist/index-DV0pS0zU.js.map +1 -0
- package/dist/index.min.css +14 -14
- package/dist/index.system.min.js +1 -1
- package/dist/quill-CeDXLpcJ.js +2 -0
- package/dist/{quill-D-355-KZ.js.map → quill-CeDXLpcJ.js.map} +1 -1
- package/dist/quill-editor-C5mEMG93.js +2 -0
- package/dist/quill-editor-C5mEMG93.js.map +1 -0
- package/dist/quill-editor-preview-BPS9uMa7.js +2 -0
- package/dist/quill-editor-preview-BPS9uMa7.js.map +1 -0
- package/dist/tree-SAqvldtV.js +2 -0
- package/dist/{tree-sdPuTW-7.js.map → tree-SAqvldtV.js.map} +1 -1
- package/dist/xlsx-util-b5CesqYd.js +3 -0
- package/dist/xlsx-util-b5CesqYd.js.map +1 -0
- package/es/_virtual/FileSaver.min.mjs +3 -0
- package/es/_virtual/index12.mjs +2 -2
- package/es/_virtual/index13.mjs +2 -2
- package/es/_virtual/index14.mjs +2 -2
- package/es/_virtual/index18.mjs +2 -2
- package/es/_virtual/index19.mjs +2 -2
- package/es/common/action-group/action-group.css +1 -1
- package/es/common/action-group/action-group.mjs +44 -43
- package/es/common/button-list/button-list.css +1 -1
- package/es/common/button-list/button-list.mjs +16 -25
- package/es/common/col/col.mjs +1 -1
- package/es/common/cropping/cropping.mjs +5 -5
- package/es/common/date-range-picker/components/range-picker/range-picker.mjs +2 -4
- package/es/common/date-range-picker/components/single-picker/single-picker.mjs +2 -4
- package/es/common/date-range-picker/date-range-picker.mjs +2 -2
- package/es/common/emoji-select/components/emoji-item/emoji-item.mjs +4 -4
- package/es/common/emoji-select/components/emoji-list/emoji-list.mjs +1 -1
- package/es/common/emoji-select/icons/categories.mjs +9 -57
- package/es/common/float-button/float-button.css +1 -1
- package/es/common/float-button/float-button.mjs +12 -7
- package/es/common/keep-alive/keep-alive.mjs +2 -2
- package/es/common/keep-alive/scheduler.mjs +1 -1
- package/es/common/preview-image/preview-image.mjs +4 -4
- package/es/common/rawitem/rawitem.mjs +2 -2
- package/es/common/row/row.mjs +1 -1
- package/es/common/split/split.mjs +9 -9
- package/es/common/split-trigger/split-trigger.css +1 -1
- package/es/common/split-trigger/split-trigger.mjs +1 -1
- package/es/common/tab-layout/tab-default-layout/tab-default-layout.mjs +1 -0
- package/es/common/tab-layout/tab-dropdown/tab-dropdown.mjs +1 -1
- package/es/common/tab-layout/tab-sidebar-layout/tab-sidebar-layout.css +1 -1
- package/es/common/view-message/view-message.mjs +1 -1
- package/es/control/app-menu/app-menu.mjs +1 -1
- package/es/control/app-menu/custom-menu-design/custom-menu-design.mjs +1 -1
- package/es/control/app-menu/menu-render-util.mjs +2 -0
- package/es/control/app-menu-icon-view/app-menu-icon-view.css +1 -1
- package/es/control/app-menu-icon-view/app-menu-icon-view.mjs +2 -2
- package/es/control/app-menu-icon-view/index.mjs +1 -1
- package/es/control/app-menu-list-view/app-menu-list-view.css +1 -1
- package/es/control/app-menu-list-view/app-menu-list-view.mjs +1 -1
- package/es/control/app-menu-list-view/index.mjs +1 -1
- package/es/control/calendar/calendar.css +1 -1
- package/es/control/calendar/calendar.mjs +7 -7
- package/es/control/caption-bar/caption-bar.css +1 -1
- package/es/control/caption-bar/caption-bar.mjs +1 -1
- package/es/control/chart/chart.mjs +1 -1
- package/es/control/dashboard/custom-dashboard-design/custom-dashboard-design.css +1 -1
- package/es/control/dashboard/dashboard.css +1 -1
- package/es/control/dashboard/dashboard.mjs +3 -1
- package/es/control/dashboard/portlet/actionbar-portlet/actionbar-portlet.mjs +1 -1
- package/es/control/dashboard/portlet/chart-portlet/chart-portlet.mjs +1 -1
- package/es/control/dashboard/portlet/container-portlet/container-portlet.mjs +1 -1
- package/es/control/dashboard/portlet/html-portlet/html-portlet.mjs +1 -1
- package/es/control/dashboard/portlet/list-portlet/list-portlet.mjs +1 -1
- package/es/control/dashboard/portlet/menu-portlet/menu-portlet.mjs +1 -1
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +4 -4
- package/es/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.mjs +1 -1
- package/es/control/dashboard/portlet/view-portlet/view-portlet.mjs +1 -1
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.mjs +7 -7
- package/es/control/drbar/drbar.css +1 -1
- package/es/control/drbar/drbar.mjs +1 -1
- package/es/control/drtab/drtab.controller.mjs +2 -2
- package/es/control/drtab/drtab.css +1 -1
- package/es/control/drtab/drtab.mjs +1 -1
- package/es/control/form/edit-form/edit-form.mjs +1 -1
- package/es/control/form/form/form.mjs +2 -2
- package/es/control/form/form-detail/form-button/form-button.css +1 -1
- package/es/control/form/form-detail/form-button/form-button.mjs +1 -1
- package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +1 -1
- package/es/control/form/form-detail/form-item/form-item-container/form-item-container.mjs +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +6 -6
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.provider.mjs +2 -2
- package/es/control/form/search-form/search-form.mjs +1 -1
- package/es/control/list/list/list.mjs +1 -1
- package/es/control/list/md-ctrl/md-ctrl.css +1 -1
- package/es/control/list/md-ctrl/md-ctrl.mjs +2 -2
- package/es/control/pickup-view-panel/pickup-view-panel.mjs +1 -1
- package/es/control/search-bar/filter-field-select/filter-field-select.mjs +1 -1
- package/es/control/search-bar/filter-mode-select/filter-mode-select.mjs +1 -1
- package/es/control/search-bar/filter-tree/filter-tree.css +1 -1
- package/es/control/search-bar/filter-tree/filter-tree.mjs +1 -1
- package/es/control/search-bar/search-bar.css +1 -1
- package/es/control/search-bar/search-bar.mjs +10 -6
- package/es/control/tab-exp-panel/tab-exp-panel.css +1 -1
- package/es/control/tab-exp-panel/tab-exp-panel.mjs +1 -1
- package/es/control/toolbar/float-toolbar/float-toolbar.css +1 -1
- package/es/control/toolbar/float-toolbar/float-toolbar.mjs +13 -7
- package/es/control/toolbar/toolbar-render-util.mjs +59 -32
- package/es/control/toolbar/toolbar.css +1 -1
- package/es/control/toolbar/toolbar.mjs +1 -1
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree/tree.mjs +9 -9
- package/es/control/tree-exp-bar/tree-exp-bar.mjs +1 -1
- package/es/control/wizard-panel/wizard-panel.css +1 -1
- package/es/control/wizard-panel/wizard-panel.mjs +6 -6
- package/es/editor/array/ibiz-array/ibiz-array.css +1 -1
- package/es/editor/cascader/ibiz-cascader/ibiz-cascader.mjs +2 -2
- package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.mjs +1 -1
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +2 -2
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +2 -2
- package/es/editor/data-picker/picker-editor.controller.mjs +2 -2
- package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.css +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +7 -7
- package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.mjs +1 -1
- package/es/editor/html/html-editor.controller.mjs +26 -9
- package/es/editor/html/quill-editor/quill-editor.css +1 -1
- package/es/editor/html/quill-editor/quill-editor.mjs +12 -3
- package/es/editor/html/quill-editor-preview/quill-editor-preview.css +1 -1
- package/es/editor/html/quill-editor-preview/quill-editor-preview.mjs +5 -6
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +15 -4
- package/es/editor/markdown/markdown-editor.controller.mjs +23 -3
- package/es/editor/qrcode/ibiz-qrcode/ibiz-qrcode.mjs +1 -1
- package/es/editor/slider/ibiz-slider/ibiz-slider.css +1 -1
- package/es/editor/slider/ibiz-slider/ibiz-slider.mjs +2 -2
- package/es/editor/span/span/span.mjs +7 -7
- package/es/editor/span/span-link/span-link.mjs +1 -1
- package/es/editor/stepper/ibiz-stepper/ibiz-stepper.css +1 -1
- package/es/editor/stepper/ibiz-stepper/ibiz-stepper.mjs +1 -1
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +1 -1
- package/es/editor/text-box/input/input.mjs +36 -5
- package/es/editor/text-box/signature/signature.mjs +59 -19
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.css +1 -1
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +2 -2
- package/es/editor/upload/upload-editor.controller.mjs +18 -1
- package/es/editor/upload/use/use-van-upload.mjs +6 -2
- package/es/ibiz-vue3.mjs +1 -0
- package/es/index.mjs +5 -1
- package/es/locale/en/index.mjs +26 -0
- package/es/locale/zh-CN/index.mjs +29 -1
- package/es/mob-app/App.mjs +10 -1
- package/es/mob-app/components/modal-router-shell/modal-router-shell.mjs +6 -4
- package/es/mob-app/components/router-shell/router-shell.mjs +1 -1
- package/es/mob-app/guard/auth-guard/auth-guard.mjs +206 -194
- package/es/mob-app/guard/auth-guard/dyna-auth-guard.mjs +65 -0
- package/es/mob-app/guard/index.mjs +1 -0
- package/es/mob-app/index.mjs +1 -0
- package/es/mob-app/main.mjs +17 -2
- package/es/mob-app/router/index.mjs +136 -79
- package/es/mob-app/util/unauthorized-handler/unauthorized-handler.mjs +5 -5
- package/es/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1_patch_hash_73bpcwbs2m5ip4qppmz6a7epsa/node_modules/@amap/amap-jsapi-loader/dist/index.mjs +1 -1
- package/es/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.mjs +1 -1
- package/es/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.mjs +1 -1
- package/es/node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.mjs +15 -0
- package/es/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.mjs +1 -1
- package/es/node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.mjs +1 -1
- package/es/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx.mjs +24580 -0
- package/es/panel-component/async-action/async-action/async-action.mjs +2 -2
- package/es/panel-component/async-action/async-action-preview/async-action-preview.mjs +3 -3
- package/es/panel-component/async-action/async-action-result/async-action-result.mjs +1 -1
- package/es/panel-component/nav-pos-index/nav-pos-index.controller.mjs +2 -2
- package/es/panel-component/panel-app-title/panel-app-title.mjs +2 -2
- package/es/panel-component/panel-button/panel-button.css +1 -1
- package/es/panel-component/panel-carousel/panel-carousel.controller.mjs +1 -1
- package/es/panel-component/panel-video-player/panel-video-player.controller.mjs +2 -2
- package/es/panel-component/split-container/split-container.controller.mjs +1 -1
- package/es/panel-component/user-message/common/internal-message-default/internal-message-default.provider.mjs +1 -1
- package/es/panel-component/user-message/user-message.mjs +1 -1
- package/es/panel-component/user-message/user-message.util.mjs +1 -1
- package/es/panel-component/view-content-panel-container/view-content-panel-container.css +1 -1
- package/es/panel-component/view-content-panel-container/view-content-panel-container.mjs +29 -15
- package/es/platform/ios-platform-provider.mjs +2 -2
- package/es/platform/wechat-official-platform-provider.mjs +1 -1
- package/es/util/ai-chat-util/ai-chat-util.mjs +1095 -0
- package/es/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
- package/es/util/ai-chat-util/ai-feedback/ai-feedback.mjs +140 -0
- package/es/util/app-drawer/app-drawer-component.mjs +18 -14
- package/es/util/app-modal/app-modal-component.mjs +7 -2
- package/es/util/app-popover/app-popover-component.mjs +4 -4
- package/es/util/app-util/app-util.mjs +112 -7
- package/es/util/button-util/button-util.mjs +33 -1
- package/es/util/confirm-util/confirm-util.mjs +4 -4
- package/es/util/directive/loading.mjs +1 -1
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/util/index.mjs +4 -1
- package/es/util/list-util/list-render-util.mjs +24 -5
- package/es/util/loading-util/loading-util.mjs +1 -1
- package/es/util/open-view-util/open-view-util.mjs +1 -1
- package/es/util/print-preview-util/print-preview-markdown/icon/icon.mjs +46 -0
- package/es/util/print-preview-util/print-preview-markdown/print-preview-markdown.css +1 -0
- package/es/util/print-preview-util/print-preview-markdown/print-preview-markdown.mjs +62 -0
- package/es/util/print-preview-util/print-preview-util.mjs +57 -0
- package/es/util/scan-qrcode/scan-qrcode.mjs +1 -1
- package/es/util/user-route-util/user-route-util.mjs +55 -0
- package/es/util/xlsx-util/xlsx-util.mjs +163 -0
- package/es/view/portal-view/portal-view.mjs +3 -2
- package/es/view-engine/index-view.engine.mjs +4 -0
- package/es/view-engine/index.mjs +31 -31
- package/es/view-engine/login-view.engine.mjs +1 -1
- package/es/view-engine/mob-calendar-view.engine.mjs +12 -1
- package/es/view-engine/mob-edit-view.engine.mjs +1 -1
- package/es/view-engine/mob-pickup-md-view.engine.mjs +1 -0
- package/es/view-engine/mob-wf-dyna-action-view.engine.mjs +1 -1
- package/es/view-engine/mob-wf-dyna-edit-view.engine.mjs +1 -1
- package/es/view-engine/mob-wf-dyna-start-view.engine.mjs +1 -1
- package/lib/_virtual/FileSaver.min.cjs +5 -0
- package/lib/_virtual/index12.cjs +2 -2
- package/lib/_virtual/index13.cjs +2 -2
- package/lib/_virtual/index14.cjs +2 -2
- package/lib/_virtual/index18.cjs +2 -2
- package/lib/_virtual/index19.cjs +2 -2
- package/lib/common/action-group/action-group.cjs +42 -41
- package/lib/common/action-group/action-group.css +1 -1
- package/lib/common/button-list/button-list.cjs +14 -23
- package/lib/common/button-list/button-list.css +1 -1
- package/lib/common/col/col.cjs +1 -1
- package/lib/common/cropping/cropping.cjs +5 -5
- package/lib/common/date-range-picker/components/range-picker/range-picker.cjs +2 -4
- package/lib/common/date-range-picker/components/single-picker/single-picker.cjs +2 -4
- package/lib/common/date-range-picker/date-range-picker.cjs +2 -2
- package/lib/common/emoji-select/components/emoji-item/emoji-item.cjs +4 -4
- package/lib/common/emoji-select/components/emoji-list/emoji-list.cjs +1 -1
- package/lib/common/emoji-select/icons/categories.cjs +9 -57
- package/lib/common/float-button/float-button.cjs +11 -6
- package/lib/common/float-button/float-button.css +1 -1
- package/lib/common/keep-alive/keep-alive.cjs +2 -2
- package/lib/common/keep-alive/scheduler.cjs +1 -1
- package/lib/common/preview-image/preview-image.cjs +4 -4
- package/lib/common/rawitem/rawitem.cjs +2 -2
- package/lib/common/row/row.cjs +1 -1
- package/lib/common/split/split.cjs +9 -9
- package/lib/common/split-trigger/split-trigger.cjs +1 -1
- package/lib/common/split-trigger/split-trigger.css +1 -1
- package/lib/common/tab-layout/tab-default-layout/tab-default-layout.cjs +1 -0
- package/lib/common/tab-layout/tab-dropdown/tab-dropdown.cjs +1 -1
- package/lib/common/tab-layout/tab-sidebar-layout/tab-sidebar-layout.css +1 -1
- package/lib/common/view-message/view-message.cjs +1 -1
- package/lib/control/app-menu/app-menu.cjs +1 -1
- package/lib/control/app-menu/custom-menu-design/custom-menu-design.cjs +1 -1
- package/lib/control/app-menu/menu-render-util.cjs +2 -0
- package/lib/control/app-menu-icon-view/app-menu-icon-view.cjs +2 -2
- package/lib/control/app-menu-icon-view/app-menu-icon-view.css +1 -1
- package/lib/control/app-menu-icon-view/index.cjs +1 -1
- package/lib/control/app-menu-list-view/app-menu-list-view.cjs +1 -1
- package/lib/control/app-menu-list-view/app-menu-list-view.css +1 -1
- package/lib/control/app-menu-list-view/index.cjs +1 -1
- package/lib/control/calendar/calendar.cjs +7 -7
- package/lib/control/calendar/calendar.css +1 -1
- package/lib/control/caption-bar/caption-bar.cjs +1 -1
- package/lib/control/caption-bar/caption-bar.css +1 -1
- package/lib/control/chart/chart.cjs +1 -1
- package/lib/control/dashboard/custom-dashboard-design/custom-dashboard-design.css +1 -1
- package/lib/control/dashboard/dashboard.cjs +3 -1
- package/lib/control/dashboard/dashboard.css +1 -1
- package/lib/control/dashboard/portlet/actionbar-portlet/actionbar-portlet.cjs +1 -1
- package/lib/control/dashboard/portlet/chart-portlet/chart-portlet.cjs +1 -1
- package/lib/control/dashboard/portlet/container-portlet/container-portlet.cjs +1 -1
- package/lib/control/dashboard/portlet/html-portlet/html-portlet.cjs +1 -1
- package/lib/control/dashboard/portlet/list-portlet/list-portlet.cjs +1 -1
- package/lib/control/dashboard/portlet/menu-portlet/menu-portlet.cjs +1 -1
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +4 -4
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/lib/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.cjs +1 -1
- package/lib/control/dashboard/portlet/view-portlet/view-portlet.cjs +1 -1
- package/lib/control/data-view/data-view.cjs +7 -7
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drbar/drbar.cjs +1 -1
- package/lib/control/drbar/drbar.css +1 -1
- package/lib/control/drtab/drtab.cjs +1 -1
- package/lib/control/drtab/drtab.controller.cjs +2 -2
- package/lib/control/drtab/drtab.css +1 -1
- package/lib/control/form/edit-form/edit-form.cjs +1 -1
- package/lib/control/form/form/form.cjs +2 -2
- package/lib/control/form/form-detail/form-button/form-button.cjs +1 -1
- package/lib/control/form/form-detail/form-button/form-button.css +1 -1
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +1 -1
- package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +6 -6
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.provider.cjs +2 -2
- package/lib/control/form/search-form/search-form.cjs +1 -1
- package/lib/control/list/list/list.cjs +1 -1
- package/lib/control/list/md-ctrl/md-ctrl.cjs +2 -2
- package/lib/control/list/md-ctrl/md-ctrl.css +1 -1
- package/lib/control/pickup-view-panel/pickup-view-panel.cjs +1 -1
- package/lib/control/search-bar/filter-field-select/filter-field-select.cjs +1 -1
- package/lib/control/search-bar/filter-mode-select/filter-mode-select.cjs +1 -1
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +1 -1
- package/lib/control/search-bar/filter-tree/filter-tree.css +1 -1
- package/lib/control/search-bar/search-bar.cjs +10 -6
- package/lib/control/search-bar/search-bar.css +1 -1
- package/lib/control/tab-exp-panel/tab-exp-panel.cjs +1 -1
- package/lib/control/tab-exp-panel/tab-exp-panel.css +1 -1
- package/lib/control/toolbar/float-toolbar/float-toolbar.cjs +13 -7
- package/lib/control/toolbar/float-toolbar/float-toolbar.css +1 -1
- package/lib/control/toolbar/toolbar-render-util.cjs +59 -32
- package/lib/control/toolbar/toolbar.cjs +1 -1
- package/lib/control/toolbar/toolbar.css +1 -1
- package/lib/control/tree/tree.cjs +9 -9
- package/lib/control/tree/tree.css +1 -1
- package/lib/control/tree-exp-bar/tree-exp-bar.cjs +1 -1
- package/lib/control/wizard-panel/wizard-panel.cjs +6 -6
- package/lib/control/wizard-panel/wizard-panel.css +1 -1
- package/lib/editor/array/ibiz-array/ibiz-array.css +1 -1
- package/lib/editor/cascader/ibiz-cascader/ibiz-cascader.cjs +2 -2
- package/lib/editor/color-picker/ibiz-color-picker/ibiz-color-picker.cjs +1 -1
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +2 -2
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +2 -2
- package/lib/editor/data-picker/picker-editor.controller.cjs +2 -2
- package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.css +1 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +7 -7
- package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.cjs +1 -1
- package/lib/editor/html/html-editor.controller.cjs +26 -9
- package/lib/editor/html/quill-editor/quill-editor.cjs +12 -3
- package/lib/editor/html/quill-editor/quill-editor.css +1 -1
- package/lib/editor/html/quill-editor-preview/quill-editor-preview.cjs +5 -6
- package/lib/editor/html/quill-editor-preview/quill-editor-preview.css +1 -1
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +15 -4
- package/lib/editor/markdown/markdown-editor.controller.cjs +23 -3
- package/lib/editor/qrcode/ibiz-qrcode/ibiz-qrcode.cjs +1 -1
- package/lib/editor/slider/ibiz-slider/ibiz-slider.cjs +2 -2
- package/lib/editor/slider/ibiz-slider/ibiz-slider.css +1 -1
- package/lib/editor/span/span/span.cjs +7 -7
- package/lib/editor/span/span-link/span-link.cjs +1 -1
- package/lib/editor/stepper/ibiz-stepper/ibiz-stepper.cjs +1 -1
- package/lib/editor/stepper/ibiz-stepper/ibiz-stepper.css +1 -1
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +1 -1
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
- package/lib/editor/text-box/input/input.cjs +35 -4
- package/lib/editor/text-box/signature/signature.cjs +59 -19
- package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +2 -2
- package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.css +1 -1
- package/lib/editor/upload/upload-editor.controller.cjs +18 -1
- package/lib/editor/upload/use/use-van-upload.cjs +6 -2
- package/lib/ibiz-vue3.cjs +1 -0
- package/lib/index.cjs +10 -0
- package/lib/locale/en/index.cjs +26 -0
- package/lib/locale/zh-CN/index.cjs +29 -1
- package/lib/mob-app/App.cjs +9 -0
- package/lib/mob-app/components/modal-router-shell/modal-router-shell.cjs +6 -4
- package/lib/mob-app/components/router-shell/router-shell.cjs +1 -1
- package/lib/mob-app/guard/auth-guard/auth-guard.cjs +206 -194
- package/lib/mob-app/guard/auth-guard/dyna-auth-guard.cjs +67 -0
- package/lib/mob-app/guard/index.cjs +2 -0
- package/lib/mob-app/index.cjs +2 -0
- package/lib/mob-app/main.cjs +17 -2
- package/lib/mob-app/router/index.cjs +136 -79
- package/lib/mob-app/util/unauthorized-handler/unauthorized-handler.cjs +5 -5
- package/lib/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1_patch_hash_73bpcwbs2m5ip4qppmz6a7epsa/node_modules/@amap/amap-jsapi-loader/dist/index.cjs +1 -1
- package/lib/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.cjs +1 -1
- package/lib/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.cjs +1 -1
- package/lib/node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.cjs +20 -0
- package/lib/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.cjs +1 -1
- package/lib/node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.cjs +1 -1
- package/lib/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx.cjs +24599 -0
- package/lib/panel-component/async-action/async-action/async-action.cjs +2 -2
- package/lib/panel-component/async-action/async-action-preview/async-action-preview.cjs +3 -3
- package/lib/panel-component/async-action/async-action-result/async-action-result.cjs +1 -1
- package/lib/panel-component/nav-pos-index/nav-pos-index.controller.cjs +2 -2
- package/lib/panel-component/panel-app-title/panel-app-title.cjs +2 -2
- package/lib/panel-component/panel-button/panel-button.css +1 -1
- package/lib/panel-component/panel-carousel/panel-carousel.controller.cjs +1 -1
- package/lib/panel-component/panel-video-player/panel-video-player.controller.cjs +2 -2
- package/lib/panel-component/split-container/split-container.controller.cjs +1 -1
- package/lib/panel-component/user-message/common/internal-message-default/internal-message-default.provider.cjs +1 -1
- package/lib/panel-component/user-message/user-message.cjs +1 -1
- package/lib/panel-component/user-message/user-message.util.cjs +1 -1
- package/lib/panel-component/view-content-panel-container/view-content-panel-container.cjs +29 -15
- package/lib/panel-component/view-content-panel-container/view-content-panel-container.css +1 -1
- package/lib/platform/ios-platform-provider.cjs +2 -2
- package/lib/platform/wechat-official-platform-provider.cjs +1 -1
- package/lib/util/ai-chat-util/ai-chat-util.cjs +1097 -0
- package/lib/util/ai-chat-util/ai-feedback/ai-feedback.cjs +142 -0
- package/lib/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
- package/lib/util/app-drawer/app-drawer-component.cjs +18 -14
- package/lib/util/app-modal/app-modal-component.cjs +7 -2
- package/lib/util/app-popover/app-popover-component.cjs +4 -4
- package/lib/util/app-util/app-util.cjs +111 -6
- package/lib/util/button-util/button-util.cjs +34 -0
- package/lib/util/confirm-util/confirm-util.cjs +4 -4
- package/lib/util/directive/loading.cjs +1 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/util/index.cjs +8 -0
- package/lib/util/list-util/list-render-util.cjs +24 -5
- package/lib/util/loading-util/loading-util.cjs +1 -1
- package/lib/util/open-view-util/open-view-util.cjs +1 -1
- package/lib/util/print-preview-util/print-preview-markdown/icon/icon.cjs +52 -0
- package/lib/util/print-preview-util/print-preview-markdown/print-preview-markdown.cjs +64 -0
- package/lib/util/print-preview-util/print-preview-markdown/print-preview-markdown.css +1 -0
- package/lib/util/print-preview-util/print-preview-util.cjs +59 -0
- package/lib/util/scan-qrcode/scan-qrcode.cjs +1 -1
- package/lib/util/user-route-util/user-route-util.cjs +58 -0
- package/lib/util/xlsx-util/xlsx-util.cjs +166 -0
- package/lib/view/portal-view/portal-view.cjs +3 -2
- package/lib/view-engine/index-view.engine.cjs +4 -0
- package/lib/view-engine/index.cjs +31 -31
- package/lib/view-engine/login-view.engine.cjs +1 -1
- package/lib/view-engine/mob-calendar-view.engine.cjs +11 -0
- package/lib/view-engine/mob-edit-view.engine.cjs +1 -1
- package/lib/view-engine/mob-pickup-md-view.engine.cjs +1 -0
- package/lib/view-engine/mob-wf-dyna-action-view.engine.cjs +1 -1
- package/lib/view-engine/mob-wf-dyna-edit-view.engine.cjs +1 -1
- package/lib/view-engine/mob-wf-dyna-start-view.engine.cjs +1 -1
- package/package.json +14 -11
- package/dist/chart-j1WkpBhc.js +0 -2
- package/dist/ibiz-markdown-editor-DMe7ZdYW.js +0 -2
- package/dist/ibiz-markdown-editor-DMe7ZdYW.js.map +0 -1
- package/dist/index-BkzKmBm3.js +0 -2
- package/dist/index-BkzKmBm3.js.map +0 -1
- package/dist/index-CADWRoaa.js +0 -76
- package/dist/index-CADWRoaa.js.map +0 -1
- package/dist/index-ugd4IDkI.js +0 -2
- package/dist/index-ugd4IDkI.js.map +0 -1
- package/dist/quill-D-355-KZ.js +0 -50
- package/dist/quill-editor-DyVF1l3P.js +0 -2
- package/dist/quill-editor-DyVF1l3P.js.map +0 -1
- package/dist/quill-editor-preview-3eAbHBYz.js +0 -2
- package/dist/quill-editor-preview-3eAbHBYz.js.map +0 -1
- package/dist/tree-sdPuTW-7.js +0 -2
|
@@ -1,66 +1,121 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var core = require('@ibiz-template/core');
|
|
4
|
-
var modelHelper = require('@ibiz-template/model-helper');
|
|
5
4
|
var ramda = require('ramda');
|
|
6
5
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
6
|
var devtool = require('@ibiz-template/devtool');
|
|
8
|
-
var index = require('../../../locale/index.cjs');
|
|
9
7
|
var authGuardHooks = require('../auth-guard-hooks.cjs');
|
|
10
8
|
|
|
11
9
|
"use strict";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
class AuthGuard {
|
|
11
|
+
/**
|
|
12
|
+
* @description 总的入口校验
|
|
13
|
+
* @param {IParams} appContext
|
|
14
|
+
* @param {boolean} [permission=true]
|
|
15
|
+
* @returns {*} {Promise<boolean>}
|
|
16
|
+
* @memberof AuthGuard
|
|
17
|
+
*/
|
|
18
|
+
async verify(appContext, permission = true) {
|
|
19
|
+
if (permission) {
|
|
20
|
+
let result = true;
|
|
21
|
+
try {
|
|
22
|
+
if (ibiz.env.enableAnonymous) {
|
|
23
|
+
await this.anonymousValidate(appContext);
|
|
24
|
+
} else {
|
|
25
|
+
await this.appInit(appContext);
|
|
26
|
+
}
|
|
27
|
+
} catch (error) {
|
|
28
|
+
result = false;
|
|
29
|
+
error.tag = "APPINIT";
|
|
30
|
+
ibiz.util.error.handle(error);
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
if (ibiz.env.enableAnonymous) {
|
|
35
|
+
try {
|
|
36
|
+
await this.anonymousValidate(appContext);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
error.tag = "APPINIT";
|
|
39
|
+
ibiz.util.error.handle(error);
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
await this.initModel(appContext, false);
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
24
46
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
47
|
+
/**
|
|
48
|
+
* @description 加载应用数据
|
|
49
|
+
* @param {IParams} [context]
|
|
50
|
+
* @returns {*} {Promise<void>}
|
|
51
|
+
* @memberof AuthGuard
|
|
52
|
+
*/
|
|
53
|
+
async loadAppData(context) {
|
|
54
|
+
let res;
|
|
55
|
+
if (context && Object.keys(context).length > 0) {
|
|
56
|
+
res = await ibiz.net.get("/appdata", context);
|
|
57
|
+
} else {
|
|
58
|
+
res = await ibiz.net.get("/appdata");
|
|
59
|
+
}
|
|
60
|
+
if (res.ok) {
|
|
61
|
+
ibiz.appData = res.data;
|
|
62
|
+
ibiz.appData.context.modeldesigndefaultmode = "close";
|
|
63
|
+
if (window.location.search && window.location.search.indexOf("srfignoredevtool=true") !== -1)
|
|
64
|
+
return;
|
|
65
|
+
devtool.updateDevToolConfig();
|
|
33
66
|
}
|
|
34
67
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
68
|
+
/**
|
|
69
|
+
* @description 加载组织数据
|
|
70
|
+
* @returns {*} {Promise<void>}
|
|
71
|
+
* @memberof AuthGuard
|
|
72
|
+
*/
|
|
73
|
+
async loadOrgData() {
|
|
74
|
+
const res = await ibiz.net.get("/uaa/getbydcsystem/".concat(ibiz.env.dcSystem));
|
|
75
|
+
if (res.ok) {
|
|
76
|
+
const orgDataItems = res.data;
|
|
77
|
+
if (orgDataItems) {
|
|
78
|
+
const [data] = orgDataItems;
|
|
79
|
+
ibiz.orgData = data;
|
|
47
80
|
}
|
|
48
81
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* @description 加载主题插件
|
|
85
|
+
* @returns {*} {Promise<void>}
|
|
86
|
+
* @memberof AuthGuard
|
|
87
|
+
*/
|
|
88
|
+
async loadTheme() {
|
|
89
|
+
const app = ibiz.hub.getApp();
|
|
90
|
+
const uiThemes = app.model.appUIThemes || [];
|
|
91
|
+
if (uiThemes.length > 0) {
|
|
92
|
+
const colorThemes = uiThemes.filter((uiTheme) => {
|
|
93
|
+
return uiTheme.themeParams && uiTheme.themeParams["icon-theme"] !== "true";
|
|
94
|
+
});
|
|
95
|
+
if (colorThemes.length > 0) {
|
|
96
|
+
for (let index = 0; index < colorThemes.length; index++) {
|
|
97
|
+
const colorTheme = colorThemes[index];
|
|
98
|
+
await ibiz.util.theme.loadTheme(colorTheme);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const iconThemes = uiThemes.filter((uiTheme) => {
|
|
102
|
+
return uiTheme.themeParams && uiTheme.themeParams["icon-theme"] === "true";
|
|
103
|
+
});
|
|
104
|
+
if (iconThemes.length > 0) {
|
|
105
|
+
for (let index = 0; index < iconThemes.length; index++) {
|
|
106
|
+
const iconTheme = iconThemes[index];
|
|
107
|
+
await ibiz.util.theme.loadTheme(iconTheme, "ICON");
|
|
108
|
+
}
|
|
56
109
|
}
|
|
57
110
|
}
|
|
58
111
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
112
|
+
/**
|
|
113
|
+
* @description 根据应用自定义参数解析成环境变量
|
|
114
|
+
* @param {IApplication} app
|
|
115
|
+
* @returns {*} {Promise<void>}
|
|
116
|
+
* @memberof AuthGuard
|
|
117
|
+
*/
|
|
118
|
+
async initEnvironment(app) {
|
|
64
119
|
const userParam = app.userParam;
|
|
65
120
|
if (userParam) {
|
|
66
121
|
Object.keys(userParam).forEach((key) => {
|
|
@@ -83,172 +138,129 @@ async function initEnvironment() {
|
|
|
83
138
|
ibiz.log.setLevel(ibiz.env.logLevel);
|
|
84
139
|
}
|
|
85
140
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const app = await ibiz.hub.getAppAsync(ibiz.env.appId);
|
|
107
|
-
await initEnvironment();
|
|
108
|
-
await vue3Util.AppHooks.initedApp.call({ context, app });
|
|
109
|
-
const appModel = app.model;
|
|
110
|
-
ibiz.env.isMob = appModel.mobileApp === true;
|
|
111
|
-
if (ibiz.env.isEnableMultiLan) {
|
|
112
|
-
const lang = ibiz.i18n.getLang();
|
|
113
|
-
const m = await helper.getPSAppLang(lang.replace("-", "_").toUpperCase());
|
|
114
|
-
const items = m.languageItems || [];
|
|
115
|
-
const data = {};
|
|
116
|
-
items.forEach((item) => {
|
|
117
|
-
data[item.lanResTag] = item.content;
|
|
118
|
-
});
|
|
119
|
-
index.i18n.global.mergeLocaleMessage(lang, data);
|
|
120
|
-
}
|
|
121
|
-
const module = await import('@ibiz-template/mob-theme');
|
|
122
|
-
const theme = module.default || module;
|
|
123
|
-
vue3Util.AppHooks.useComponent.callSync(null, theme);
|
|
124
|
-
if (ibiz.config.theme)
|
|
125
|
-
ibiz.util.theme.setTheme(ibiz.config.theme);
|
|
126
|
-
if (appModel.appUIThemes) {
|
|
127
|
-
await loadTheme();
|
|
128
|
-
}
|
|
129
|
-
if (app.model.title) {
|
|
130
|
-
ibiz.util.setBrowserTitle("");
|
|
141
|
+
/**
|
|
142
|
+
* @description 初始化模型
|
|
143
|
+
* @param {IParams} context
|
|
144
|
+
* @param {boolean} [_permission=true]
|
|
145
|
+
* @returns {*} {Promise<void>}
|
|
146
|
+
* @memberof AuthGuard
|
|
147
|
+
*/
|
|
148
|
+
async initModel(context, _permission = true) {
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @description 应用参数初始化
|
|
152
|
+
* @param {IParams} context
|
|
153
|
+
* @returns {*} {Promise<void>}
|
|
154
|
+
* @memberof AuthGuard
|
|
155
|
+
*/
|
|
156
|
+
async appInit(context) {
|
|
157
|
+
await vue3Util.AppHooks.beforeInitApp.call({ context });
|
|
158
|
+
await authGuardHooks.AuthGuardHooks.beforeAuth.call(null, null);
|
|
159
|
+
if (ibiz.env.isSaaSMode === true) {
|
|
160
|
+
await this.loadOrgData();
|
|
131
161
|
}
|
|
162
|
+
await this.loadAppData(context);
|
|
163
|
+
await authGuardHooks.AuthGuardHooks.afterAuth.call(null, null);
|
|
164
|
+
await vue3Util.AppHooks.authedApp.call({ context });
|
|
165
|
+
await this.initModel(context);
|
|
166
|
+
await ibiz.auth.extendLogin(context);
|
|
167
|
+
await ibiz.hub.notice.init();
|
|
132
168
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
169
|
+
/**
|
|
170
|
+
* @description 抛401异常
|
|
171
|
+
*/
|
|
172
|
+
throw401() {
|
|
173
|
+
throw new core.HttpError({
|
|
174
|
+
response: {
|
|
175
|
+
status: 401,
|
|
176
|
+
statusText: ibiz.i18n.t("mobApp.authGuard.noPermission")
|
|
177
|
+
}
|
|
178
|
+
});
|
|
139
179
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
if (status === 401) {
|
|
164
|
-
const refreshToken = core.getAppCookie(core.CoreConst.REFRESH_TOKEN);
|
|
165
|
-
if (refreshToken) {
|
|
166
|
-
await ibiz.auth.refreshToken();
|
|
167
|
-
await appInit(context);
|
|
168
|
-
return;
|
|
180
|
+
/**
|
|
181
|
+
* @description 匿名登录
|
|
182
|
+
* @param {IParams} context
|
|
183
|
+
* @returns {*} {Promise<void>}
|
|
184
|
+
*/
|
|
185
|
+
async anonymousValidate(context) {
|
|
186
|
+
const authInfo = ibiz.auth.getAuthInfo();
|
|
187
|
+
if (authInfo && !authInfo.isAnonymous) {
|
|
188
|
+
try {
|
|
189
|
+
await this.appInit(context);
|
|
190
|
+
return;
|
|
191
|
+
} catch (error) {
|
|
192
|
+
const { status } = error;
|
|
193
|
+
if (status === 401) {
|
|
194
|
+
const refreshToken = core.getAppCookie(core.CoreConst.REFRESH_TOKEN);
|
|
195
|
+
if (refreshToken) {
|
|
196
|
+
await ibiz.auth.refreshToken();
|
|
197
|
+
await this.appInit(context);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
ibiz.auth.clearAuthData();
|
|
201
|
+
} else {
|
|
202
|
+
throw error;
|
|
169
203
|
}
|
|
170
|
-
ibiz.auth.clearAuthData();
|
|
171
|
-
} else {
|
|
172
|
-
throw error;
|
|
173
204
|
}
|
|
174
205
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
206
|
+
if (authInfo == null ? void 0 : authInfo.token) {
|
|
207
|
+
try {
|
|
208
|
+
await this.appInit(context);
|
|
209
|
+
} catch (error) {
|
|
210
|
+
const { status } = error;
|
|
211
|
+
if (status === 401) {
|
|
212
|
+
const loginResult = await ibiz.auth.anonymousLogin();
|
|
213
|
+
if (!loginResult) {
|
|
214
|
+
this.throw401();
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
await this.appInit(context);
|
|
218
|
+
} else {
|
|
219
|
+
throw error;
|
|
186
220
|
}
|
|
187
|
-
await appInit(context);
|
|
188
|
-
} else {
|
|
189
|
-
throw error;
|
|
190
221
|
}
|
|
191
222
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
await appInit(context);
|
|
200
|
-
}
|
|
201
|
-
const urlPaths = window.location.hash.split("/");
|
|
202
|
-
const viewName = urlPaths[urlPaths.length - 2];
|
|
203
|
-
let viewModel;
|
|
204
|
-
try {
|
|
205
|
-
if (["#", "index"].includes(viewName) && ibiz.hub.defaultPage) {
|
|
206
|
-
viewModel = await ibiz.hub.getAppView(ibiz.hub.defaultPage.id);
|
|
207
|
-
} else {
|
|
208
|
-
viewModel = await ibiz.hub.getAppView(viewName);
|
|
223
|
+
if (!authInfo || !authInfo.token) {
|
|
224
|
+
const loginResult = await ibiz.auth.anonymousLogin();
|
|
225
|
+
if (!loginResult) {
|
|
226
|
+
this.throw401();
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
await this.appInit(context);
|
|
209
230
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
if (!viewModel) {
|
|
214
|
-
ibiz.log.error(
|
|
215
|
-
`\u627E\u4E0D\u5230\u89C6\u56FE\u6A21\u578B${viewName},\u8BF7\u786E\u4FDD\u8BE5\u89C6\u56FE\u914D\u7F6E\u4E86\u533F\u540D\u8BBF\u95EE\u548C\u7528\u6237\u5F15\u7528`
|
|
216
|
-
);
|
|
217
|
-
throw401();
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if (viewModel.accUserMode !== 3) {
|
|
221
|
-
throw401();
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
async function AuthGuard(appContext, permission = true) {
|
|
225
|
-
if (permission) {
|
|
226
|
-
let result = true;
|
|
231
|
+
const urlPaths = window.location.hash.split("/");
|
|
232
|
+
const viewName = urlPaths[urlPaths.length - 2];
|
|
233
|
+
let viewModel;
|
|
227
234
|
try {
|
|
228
|
-
if (ibiz.
|
|
229
|
-
await
|
|
235
|
+
if (["#", "index"].includes(viewName) && ibiz.hub.defaultPage) {
|
|
236
|
+
viewModel = await ibiz.hub.getAppView(ibiz.hub.defaultPage.id);
|
|
230
237
|
} else {
|
|
231
|
-
await
|
|
238
|
+
viewModel = await ibiz.hub.getAppView(viewName);
|
|
232
239
|
}
|
|
233
240
|
} catch (error) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
241
|
+
ibiz.log.error(error);
|
|
242
|
+
}
|
|
243
|
+
if (!viewModel) {
|
|
244
|
+
ibiz.log.error(
|
|
245
|
+
"\u627E\u4E0D\u5230\u89C6\u56FE\u6A21\u578B".concat(viewName, ",\u8BF7\u786E\u4FDD\u8BE5\u89C6\u56FE\u914D\u7F6E\u4E86\u533F\u540D\u8BBF\u95EE\u548C\u7528\u6237\u5F15\u7528")
|
|
246
|
+
);
|
|
247
|
+
this.throw401();
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
if (viewModel.accUserMode !== 3) {
|
|
251
|
+
this.throw401();
|
|
237
252
|
}
|
|
238
|
-
return result;
|
|
239
253
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
ibiz.util.
|
|
246
|
-
|
|
254
|
+
async initTheme(appModel) {
|
|
255
|
+
const module = await import('@ibiz-template/mob-theme');
|
|
256
|
+
const theme = module.default || module;
|
|
257
|
+
vue3Util.AppHooks.useComponent.callSync(null, theme);
|
|
258
|
+
if (ibiz.config.theme)
|
|
259
|
+
ibiz.util.theme.setTheme(ibiz.config.theme);
|
|
260
|
+
if (appModel.appUIThemes) {
|
|
261
|
+
await this.loadTheme();
|
|
247
262
|
}
|
|
248
|
-
} else {
|
|
249
|
-
await initModel(appContext, false);
|
|
250
263
|
}
|
|
251
|
-
return true;
|
|
252
264
|
}
|
|
253
265
|
|
|
254
266
|
exports.AuthGuard = AuthGuard;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var modelHelper = require('@ibiz-template/model-helper');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
var authGuard = require('./auth-guard.cjs');
|
|
6
|
+
var index = require('../../../locale/index.cjs');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __publicField = (obj, key, value) => {
|
|
12
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
13
|
+
return value;
|
|
14
|
+
};
|
|
15
|
+
class DynaAuthGuard extends authGuard.AuthGuard {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
__publicField(this, "hasModelInit", false);
|
|
19
|
+
__publicField(this, "noPermissionModel", false);
|
|
20
|
+
}
|
|
21
|
+
async initModel(context, permission = true) {
|
|
22
|
+
if (!this.hasModelInit || this.hasModelInit && this.noPermissionModel !== permission) {
|
|
23
|
+
const helper = new modelHelper.ModelHelper(
|
|
24
|
+
async (url) => {
|
|
25
|
+
if (ibiz.env.isLocalModel) {
|
|
26
|
+
const res2 = await ibiz.net.getModel("./model".concat(url));
|
|
27
|
+
return res2.data;
|
|
28
|
+
}
|
|
29
|
+
const res = await ibiz.net.get(
|
|
30
|
+
"".concat(ibiz.env.remoteModelUrl).concat(url),
|
|
31
|
+
void 0,
|
|
32
|
+
permission ? {} : { srfdcsystem: ibiz.env.dcSystem }
|
|
33
|
+
);
|
|
34
|
+
return res.data;
|
|
35
|
+
},
|
|
36
|
+
ibiz.env.appId,
|
|
37
|
+
context,
|
|
38
|
+
permission
|
|
39
|
+
);
|
|
40
|
+
const app = await ibiz.hub.getAppAsync(ibiz.env.appId);
|
|
41
|
+
await this.initEnvironment(app);
|
|
42
|
+
await vue3Util.AppHooks.initedApp.call({ context, app });
|
|
43
|
+
const appModel = app.model;
|
|
44
|
+
ibiz.env.isMob = appModel.mobileApp === true;
|
|
45
|
+
if (ibiz.env.isEnableMultiLan) {
|
|
46
|
+
const lang = ibiz.i18n.getLang();
|
|
47
|
+
const m = await helper.getPSAppLang(
|
|
48
|
+
lang.replace("-", "_").toUpperCase()
|
|
49
|
+
);
|
|
50
|
+
const items = m.languageItems || [];
|
|
51
|
+
const data = {};
|
|
52
|
+
items.forEach((item) => {
|
|
53
|
+
data[item.lanResTag] = item.content;
|
|
54
|
+
});
|
|
55
|
+
index.i18n.global.mergeLocaleMessage(lang, data);
|
|
56
|
+
}
|
|
57
|
+
await this.initTheme(app);
|
|
58
|
+
if (app.model.title) {
|
|
59
|
+
ibiz.util.setBrowserTitle("");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
this.noPermissionModel = permission;
|
|
63
|
+
this.hasModelInit = true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
exports.DynaAuthGuard = DynaAuthGuard;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var authGuard = require('./auth-guard/auth-guard.cjs');
|
|
4
|
+
var dynaAuthGuard = require('./auth-guard/dyna-auth-guard.cjs');
|
|
4
5
|
var authGuardHooks = require('./auth-guard-hooks.cjs');
|
|
5
6
|
|
|
6
7
|
"use strict";
|
|
7
8
|
|
|
8
9
|
exports.AuthGuard = authGuard.AuthGuard;
|
|
10
|
+
exports.DynaAuthGuard = dynaAuthGuard.DynaAuthGuard;
|
|
9
11
|
exports.AuthGuardHooks = authGuardHooks.AuthGuardHooks;
|
package/lib/mob-app/index.cjs
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
var main = require('./main.cjs');
|
|
4
4
|
require('./guard/index.cjs');
|
|
5
5
|
var authGuardHooks = require('./guard/auth-guard-hooks.cjs');
|
|
6
|
+
var authGuard = require('./guard/auth-guard/auth-guard.cjs');
|
|
6
7
|
|
|
7
8
|
"use strict";
|
|
8
9
|
|
|
9
10
|
exports.runApp = main.runApp;
|
|
10
11
|
exports.AuthGuardHooks = authGuardHooks.AuthGuardHooks;
|
|
12
|
+
exports.AuthGuard = authGuard.AuthGuard;
|
package/lib/mob-app/main.cjs
CHANGED
|
@@ -10,7 +10,9 @@ var createVueApp = require('./create-vue-app.cjs');
|
|
|
10
10
|
var index = require('./router/index.cjs');
|
|
11
11
|
require('./util/index.cjs');
|
|
12
12
|
require('../util/index.cjs');
|
|
13
|
+
require('./guard/index.cjs');
|
|
13
14
|
var unauthorizedHandler = require('./util/unauthorized-handler/unauthorized-handler.cjs');
|
|
15
|
+
var dynaAuthGuard = require('./guard/auth-guard/dyna-auth-guard.cjs');
|
|
14
16
|
var appUtil = require('../util/app-util/app-util.cjs');
|
|
15
17
|
var openViewUtil = require('../util/open-view-util/open-view-util.cjs');
|
|
16
18
|
var messageUtil = require('../util/message-util/message-util.cjs');
|
|
@@ -20,10 +22,12 @@ var notificationUtil = require('../util/notification-util/notification-util.cjs'
|
|
|
20
22
|
var loadingUtil = require('../util/loading-util/loading-util.cjs');
|
|
21
23
|
var overlayController = require('../util/overlay-controller/overlay-controller.cjs');
|
|
22
24
|
var fullscreenUtil = require('../util/fullscreen/fullscreen-util.cjs');
|
|
25
|
+
var printPreviewUtil = require('../util/print-preview-util/print-preview-util.cjs');
|
|
23
26
|
var qrcodeUtil = require('../util/qrcode-util/qrcode-util.cjs');
|
|
27
|
+
var aiChatUtil = require('../util/ai-chat-util/ai-chat-util.cjs');
|
|
24
28
|
|
|
25
29
|
"use strict";
|
|
26
|
-
async function runApp(plugins) {
|
|
30
|
+
async function runApp(plugins, opts) {
|
|
27
31
|
vue3Util.AppHooks.createApp.tap((_, app2) => {
|
|
28
32
|
if (plugins) {
|
|
29
33
|
plugins.forEach((plugin) => {
|
|
@@ -61,7 +65,16 @@ async function runApp(plugins) {
|
|
|
61
65
|
});
|
|
62
66
|
await attachEnvironmentConfig.attachEnvironmentConfig();
|
|
63
67
|
devtool.install();
|
|
64
|
-
|
|
68
|
+
let authGuard;
|
|
69
|
+
if (opts == null ? void 0 : opts.getAuthGuard) {
|
|
70
|
+
authGuard = opts.getAuthGuard();
|
|
71
|
+
} else {
|
|
72
|
+
authGuard = new dynaAuthGuard.DynaAuthGuard();
|
|
73
|
+
}
|
|
74
|
+
index.AppRouter.setAuthGuard(
|
|
75
|
+
(context, notLogin) => authGuard.verify(context, notLogin)
|
|
76
|
+
);
|
|
77
|
+
const router = index.AppRouter.getRouter(opts == null ? void 0 : opts.userRoutes);
|
|
65
78
|
app.use(router);
|
|
66
79
|
devtool.listenOpenDevTool(router);
|
|
67
80
|
ibiz.appUtil = new appUtil.AppUtil(router);
|
|
@@ -74,10 +87,12 @@ async function runApp(plugins) {
|
|
|
74
87
|
ibiz.overlay = new overlayController.OverlayController();
|
|
75
88
|
ibiz.platform = runtime.getPlatformProvider();
|
|
76
89
|
ibiz.fullscreenUtil = new fullscreenUtil.FullscreenUtil();
|
|
90
|
+
ibiz.printPreview = new printPreviewUtil.PrintPreviewUtil();
|
|
77
91
|
ibiz.util.text.format = (value, code) => {
|
|
78
92
|
return app.config.globalProperties.$textFormat(value, code);
|
|
79
93
|
};
|
|
80
94
|
ibiz.qrcodeUtil = new qrcodeUtil.QrcodeUtil();
|
|
95
|
+
ibiz.aiChatUtil = new aiChatUtil.AIChatUtil();
|
|
81
96
|
await ibiz.i18n.init();
|
|
82
97
|
app.mount("#app");
|
|
83
98
|
}
|