@oinone/kunlun-vue-admin-layout 6.2.0
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/README.md +1 -0
- package/dist/oinone-kunlun-vue-admin-layout.css +1 -0
- package/dist/oinone-kunlun-vue-admin-layout.esm.js +12049 -0
- package/dist/oinone-kunlun-vue-admin-layout.scss +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/src/basic/MaskWidget.d.ts +17 -0
- package/dist/types/src/basic/index.d.ts +2 -0
- package/dist/types/src/basic/register/index.d.ts +1 -0
- package/dist/types/src/basic/register/manager.d.ts +7 -0
- package/dist/types/src/basic/token/BaseMaskWidget.d.ts +55 -0
- package/dist/types/src/basic/token/index.d.ts +1 -0
- package/dist/types/src/component/app-switcher/AppSwitcher.vue.d.ts +84 -0
- package/dist/types/src/component/app-switcher/AppSwitcherMask.vue.d.ts +61 -0
- package/dist/types/src/component/app-switcher/AppSwitcherWidget.d.ts +33 -0
- package/dist/types/src/component/app-switcher/index.d.ts +3 -0
- package/dist/types/src/component/breadcrumb/BreadcrumbWidget.d.ts +33 -0
- package/dist/types/src/component/breadcrumb/DefaultBreadcrumb.vue.d.ts +58 -0
- package/dist/types/src/component/breadcrumb/index.d.ts +2 -0
- package/dist/types/src/component/debug/Debug.vue.d.ts +11 -0
- package/dist/types/src/component/debug/DebugWidget.d.ts +8 -0
- package/dist/types/src/component/debug/constants.d.ts +2 -0
- package/dist/types/src/component/debug/index.d.ts +6 -0
- package/dist/types/src/component/debug/spi/DebugMaskEditor.d.ts +6 -0
- package/dist/types/src/component/debug/spi/DebugRouterInitializeService.d.ts +4 -0
- package/dist/types/src/component/debug/spi/index.d.ts +1 -0
- package/dist/types/src/component/debug/typing.d.ts +159 -0
- package/dist/types/src/component/debug/view/DebugMainView.vue.d.ts +28 -0
- package/dist/types/src/component/debug/view/DebugMainViewWidget.d.ts +9 -0
- package/dist/types/src/component/debug/view/components/DebugDefaultInfo.vue.d.ts +22 -0
- package/dist/types/src/component/debug/view/components/DebugJsonView.vue.d.ts +26 -0
- package/dist/types/src/component/debug/view/components/DebugRequestInfoPanel.vue.d.ts +22 -0
- package/dist/types/src/component/debug/view/components/DebugResponsePanel.vue.d.ts +12 -0
- package/dist/types/src/component/debug/view/debug-api/DebugApi.vue.d.ts +52 -0
- package/dist/types/src/component/debug/view/debug-api/DebugApiWidget.d.ts +32 -0
- package/dist/types/src/component/debug/view/debug-utils.d.ts +44 -0
- package/dist/types/src/component/debug/view/debug-view/DebugView.vue.d.ts +78 -0
- package/dist/types/src/component/debug/view/debug-view/DebugViewWidget.d.ts +26 -0
- package/dist/types/src/component/debug/view/index.d.ts +5 -0
- package/dist/types/src/component/debug/view/service/DebugRuntimeContextService.d.ts +18 -0
- package/dist/types/src/component/debug/view/service/DebugStackInfoService.d.ts +27 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugDefaultRuntimeContextService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeActionService.d.ts +7 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeDslService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeFieldService.d.ts +7 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeLayoutService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeMaskService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeTemplateService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeViewService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugBizStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugConfigureService.d.ts +4 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugDefaultStackInfoService.d.ts +8 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugExceptionStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugFunctionService.d.ts +4 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugHalfBizStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugModelService.d.ts +4 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugPureBizStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceGqlRequestContextService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceSceneAnalysisService.d.ts +7 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceSessionService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/index.d.ts +20 -0
- package/dist/types/src/component/debug/view/storage.d.ts +19 -0
- package/dist/types/src/component/debug/view/useDebugRequestInfo.d.ts +7 -0
- package/dist/types/src/component/divider/Divider.vue.d.ts +2 -0
- package/dist/types/src/component/divider/DividerWidget.d.ts +4 -0
- package/dist/types/src/component/divider/index.d.ts +1 -0
- package/dist/types/src/component/index.d.ts +14 -0
- package/dist/types/src/component/language/DefaultLanguage.vue.d.ts +34 -0
- package/dist/types/src/component/language/LanguageWidget.d.ts +16 -0
- package/dist/types/src/component/language/index.d.ts +1 -0
- package/dist/types/src/component/layout/BaseMaskLayoutWidget.d.ts +4 -0
- package/dist/types/src/component/layout/MaskBlock.vue.d.ts +24 -0
- package/dist/types/src/component/layout/block/MaskBlockWidget.d.ts +4 -0
- package/dist/types/src/component/layout/block/index.d.ts +1 -0
- package/dist/types/src/component/layout/container/MaskContainerWidget.d.ts +4 -0
- package/dist/types/src/component/layout/container/index.d.ts +1 -0
- package/dist/types/src/component/layout/content/MaskContentWidget.d.ts +7 -0
- package/dist/types/src/component/layout/content/index.d.ts +1 -0
- package/dist/types/src/component/layout/grid/Grid.vue.d.ts +2 -0
- package/dist/types/src/component/layout/grid/GridWidget.d.ts +9 -0
- package/dist/types/src/component/layout/grid/index.d.ts +1 -0
- package/dist/types/src/component/layout/header/MaskHeaderWidget.d.ts +4 -0
- package/dist/types/src/component/layout/header/index.d.ts +1 -0
- package/dist/types/src/component/layout/index.d.ts +9 -0
- package/dist/types/src/component/layout/mask/MaskRootWidget.d.ts +4 -0
- package/dist/types/src/component/layout/mask/index.d.ts +1 -0
- package/dist/types/src/component/layout/sidebar/MaskSidebarWidget.d.ts +10 -0
- package/dist/types/src/component/layout/sidebar/index.d.ts +1 -0
- package/dist/types/src/component/layout/widget/MaskCommonWidget.d.ts +14 -0
- package/dist/types/src/component/layout/widget/index.d.ts +1 -0
- package/dist/types/src/component/menu/DefaultMenu.vue.d.ts +115 -0
- package/dist/types/src/component/menu/DefaultSubMenu.vue.d.ts +17 -0
- package/dist/types/src/component/menu/MenuWidget.d.ts +71 -0
- package/dist/types/src/component/menu/index.d.ts +3 -0
- package/dist/types/src/component/multi-tabs/MultiTabs.vue.d.ts +151 -0
- package/dist/types/src/component/multi-tabs/MultiTabsWidget.d.ts +60 -0
- package/dist/types/src/component/multi-tabs/index.d.ts +2 -0
- package/dist/types/src/component/multi-tabs/typing.d.ts +6 -0
- package/dist/types/src/component/notification/DefaultNotification.vue.d.ts +61 -0
- package/dist/types/src/component/notification/NotificationWidget.d.ts +139 -0
- package/dist/types/src/component/notification/index.d.ts +2 -0
- package/dist/types/src/component/order-statistic/OrderStatistic.vue.d.ts +8 -0
- package/dist/types/src/component/order-statistic/index.d.ts +14 -0
- package/dist/types/src/component/partner-switcher/PartnerSwitcher.vue.d.ts +28 -0
- package/dist/types/src/component/partner-switcher/PartnerSwitcherWidget.d.ts +15 -0
- package/dist/types/src/component/partner-switcher/index.d.ts +6 -0
- package/dist/types/src/component/partner-switcher/service/PartnerSwitcherService.d.ts +17 -0
- package/dist/types/src/component/partner-switcher/service/impl/PartnerSwitcherServiceImpl.d.ts +17 -0
- package/dist/types/src/component/partner-switcher/service/index.d.ts +2 -0
- package/dist/types/src/component/partner-switcher/session/PartnerInfoSession.d.ts +26 -0
- package/dist/types/src/component/partner-switcher/session/impl/DefaultPartnerInfoSession.d.ts +15 -0
- package/dist/types/src/component/partner-switcher/session/index.d.ts +2 -0
- package/dist/types/src/component/partner-switcher/spi/PartnerSwitcherMaskEditor.d.ts +6 -0
- package/dist/types/src/component/partner-switcher/spi/index.d.ts +1 -0
- package/dist/types/src/component/partner-switcher/typing/index.d.ts +1 -0
- package/dist/types/src/component/partner-switcher/typing/partner.d.ts +20 -0
- package/dist/types/src/component/quick-search/QuickSearch.vue.d.ts +29 -0
- package/dist/types/src/component/quick-search/index.d.ts +24 -0
- package/dist/types/src/component/user/DefaultUser.vue.d.ts +39 -0
- package/dist/types/src/component/user/UserWidget.d.ts +16 -0
- package/dist/types/src/component/user/index.d.ts +1 -0
- package/dist/types/src/config/DebugConfig.d.ts +16 -0
- package/dist/types/src/config/PartnerSwitcherConfig.d.ts +16 -0
- package/dist/types/src/config/index.d.ts +2 -0
- package/dist/types/src/index.d.ts +10 -0
- package/dist/types/src/service/index.d.ts +5 -0
- package/dist/types/src/service/menu-service.d.ts +12 -0
- package/dist/types/src/service/message-service.d.ts +16 -0
- package/dist/types/src/service/module-service.d.ts +7 -0
- package/dist/types/src/service/top-bar-service.d.ts +10 -0
- package/dist/types/src/service/user-service.d.ts +4 -0
- package/dist/types/src/spi/index.d.ts +1 -0
- package/dist/types/src/spi/mask-editor.d.ts +54 -0
- package/dist/types/src/tags/Block.vue.d.ts +5 -0
- package/dist/types/src/tags/Breadcrumb.vue.d.ts +5 -0
- package/dist/types/src/tags/Container.vue.d.ts +5 -0
- package/dist/types/src/tags/Content.vue.d.ts +5 -0
- package/dist/types/src/tags/Header.vue.d.ts +5 -0
- package/dist/types/src/tags/Mask.vue.d.ts +5 -0
- package/dist/types/src/tags/MultiTabs.vue.d.ts +5 -0
- package/dist/types/src/tags/Sidebar.vue.d.ts +5 -0
- package/dist/types/src/tags/Widget.vue.d.ts +5 -0
- package/dist/types/src/tags/context/context.d.ts +8 -0
- package/dist/types/src/tags/context/index.d.ts +1 -0
- package/dist/types/src/tags/index.d.ts +6 -0
- package/dist/types/src/tags/mixin/MaskWidgetTagMixin.d.ts +2 -0
- package/dist/types/src/tags/mixin/index.d.ts +3 -0
- package/dist/types/src/tags/mixin/typing.d.ts +6 -0
- package/dist/types/src/tags/mixin/use-mask-widget-tag.d.ts +38 -0
- package/dist/types/src/tags/register/index.d.ts +1 -0
- package/dist/types/src/tags/register/manager.d.ts +9 -0
- package/dist/types/src/tags/resolve/index.d.ts +2 -0
- package/dist/types/src/tags/resolve/internal/index.d.ts +2 -0
- package/dist/types/src/tags/resolve/internal/typing.d.ts +5 -0
- package/dist/types/src/tags/resolve/internal/widget-resolve.d.ts +3 -0
- package/dist/types/src/tags/resolve/typing.d.ts +26 -0
- package/dist/types/src/tags/resolve/widget-resolve.d.ts +5 -0
- package/dist/types/src/template/default-mask.d.ts +2 -0
- package/dist/types/src/template/index.d.ts +6 -0
- package/dist/types/src/theme/index.d.ts +1 -0
- package/dist/types/src/typing/constant.d.ts +1 -0
- package/dist/types/src/typing/index.d.ts +3 -0
- package/dist/types/src/typing/menu.d.ts +12 -0
- package/dist/types/src/typing/stream-symble.d.ts +12 -0
- package/dist/types/src/util/HomepageUtils.d.ts +3 -0
- package/dist/types/src/util/MenuUtil.d.ts +5 -0
- package/dist/types/src/util/index.d.ts +3 -0
- package/dist/types/src/util/unauthorized-action.d.ts +14 -0
- package/dist/types/src/utils.d.ts +86 -0
- package/index.ts +1 -0
- package/package.json +47 -0
- package/rollup.config.js +33 -0
- package/src/basic/MaskWidget.ts +74 -0
- package/src/basic/index.ts +2 -0
- package/src/basic/register/index.ts +1 -0
- package/src/basic/register/manager.ts +17 -0
- package/src/basic/token/BaseMaskWidget.ts +187 -0
- package/src/basic/token/index.ts +1 -0
- package/src/component/app-switcher/AppSwitcher.vue +133 -0
- package/src/component/app-switcher/AppSwitcherMask.vue +237 -0
- package/src/component/app-switcher/AppSwitcherWidget.ts +152 -0
- package/src/component/app-switcher/index.ts +3 -0
- package/src/component/breadcrumb/BreadcrumbWidget.ts +167 -0
- package/src/component/breadcrumb/DefaultBreadcrumb.vue +95 -0
- package/src/component/breadcrumb/index.ts +2 -0
- package/src/component/debug/Debug.vue +28 -0
- package/src/component/debug/DebugWidget.ts +38 -0
- package/src/component/debug/constants.ts +3 -0
- package/src/component/debug/index.ts +6 -0
- package/src/component/debug/spi/DebugMaskEditor.ts +19 -0
- package/src/component/debug/spi/DebugRouterInitializeService.ts +21 -0
- package/src/component/debug/spi/index.ts +1 -0
- package/src/component/debug/typing.ts +191 -0
- package/src/component/debug/view/DebugMainView.vue +206 -0
- package/src/component/debug/view/DebugMainViewWidget.ts +42 -0
- package/src/component/debug/view/components/DebugDefaultInfo.vue +31 -0
- package/src/component/debug/view/components/DebugJsonView.vue +107 -0
- package/src/component/debug/view/components/DebugRequestInfoPanel.vue +129 -0
- package/src/component/debug/view/components/DebugResponsePanel.vue +66 -0
- package/src/component/debug/view/components/runtime-context/DebugRuntimeFieldComponent.vue +29 -0
- package/src/component/debug/view/debug-api/DebugApi.vue +225 -0
- package/src/component/debug/view/debug-api/DebugApiWidget.ts +400 -0
- package/src/component/debug/view/debug-utils.ts +114 -0
- package/src/component/debug/view/debug-view/DebugView.vue +331 -0
- package/src/component/debug/view/debug-view/DebugViewWidget.ts +181 -0
- package/src/component/debug/view/index.ts +6 -0
- package/src/component/debug/view/service/DebugRuntimeContextService.ts +21 -0
- package/src/component/debug/view/service/DebugStackInfoService.ts +33 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugDefaultRuntimeContextService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeActionService.ts +28 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeDslService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeFieldService.ts +33 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeLayoutService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeMaskService.ts +30 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeTemplateService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeViewService.ts +16 -0
- package/src/component/debug/view/service/impl/stack-info/DebugBizStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugConfigureService.ts +6 -0
- package/src/component/debug/view/service/impl/stack-info/DebugDefaultStackInfoService.ts +62 -0
- package/src/component/debug/view/service/impl/stack-info/DebugExceptionStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugFunctionService.ts +6 -0
- package/src/component/debug/view/service/impl/stack-info/DebugHalfBizStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugModelService.ts +6 -0
- package/src/component/debug/view/service/impl/stack-info/DebugPureBizStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugStacktraceGqlRequestContextService.ts +22 -0
- package/src/component/debug/view/service/impl/stack-info/DebugStacktraceSceneAnalysisService.ts +35 -0
- package/src/component/debug/view/service/impl/stack-info/DebugStacktraceSessionService.ts +19 -0
- package/src/component/debug/view/service/index.ts +22 -0
- package/src/component/debug/view/storage.ts +35 -0
- package/src/component/debug/view/useDebugRequestInfo.ts +17 -0
- package/src/component/divider/Divider.vue +15 -0
- package/src/component/divider/DividerWidget.ts +12 -0
- package/src/component/divider/index.ts +1 -0
- package/src/component/index.ts +15 -0
- package/src/component/language/DefaultLanguage.vue +111 -0
- package/src/component/language/LanguageWidget.ts +72 -0
- package/src/component/language/index.ts +1 -0
- package/src/component/layout/BaseMaskLayoutWidget.ts +12 -0
- package/src/component/layout/MaskBlock.vue +31 -0
- package/src/component/layout/block/MaskBlockWidget.ts +17 -0
- package/src/component/layout/block/index.ts +1 -0
- package/src/component/layout/container/MaskContainerWidget.ts +13 -0
- package/src/component/layout/container/index.ts +1 -0
- package/src/component/layout/content/MaskContentWidget.ts +41 -0
- package/src/component/layout/content/index.ts +1 -0
- package/src/component/layout/grid/Grid.vue +10 -0
- package/src/component/layout/grid/GridWidget.ts +62 -0
- package/src/component/layout/grid/index.ts +1 -0
- package/src/component/layout/header/MaskHeaderWidget.ts +13 -0
- package/src/component/layout/header/index.ts +1 -0
- package/src/component/layout/index.ts +9 -0
- package/src/component/layout/mask/MaskRootWidget.ts +13 -0
- package/src/component/layout/mask/index.ts +1 -0
- package/src/component/layout/sidebar/MaskSidebarWidget.ts +31 -0
- package/src/component/layout/sidebar/index.ts +1 -0
- package/src/component/layout/widget/MaskCommonWidget.ts +95 -0
- package/src/component/layout/widget/index.ts +1 -0
- package/src/component/menu/DefaultMenu.vue +252 -0
- package/src/component/menu/DefaultSubMenu.vue +68 -0
- package/src/component/menu/MenuWidget.ts +349 -0
- package/src/component/menu/index.ts +3 -0
- package/src/component/menu/style/common.scss +411 -0
- package/src/component/menu/style/index.scss +2 -0
- package/src/component/menu/style/menu-theme/index.scss +5 -0
- package/src/component/menu/style/menu-theme/theme2.scss +37 -0
- package/src/component/menu/style/menu-theme/theme3.scss +59 -0
- package/src/component/menu/style/menu-theme/theme4.scss +56 -0
- package/src/component/menu/style/menu-theme/theme5.scss +45 -0
- package/src/component/menu/style/menu-theme/theme6.scss +45 -0
- package/src/component/menu/style/mixin.scss +23 -0
- package/src/component/multi-tabs/MultiTabs.vue +475 -0
- package/src/component/multi-tabs/MultiTabsWidget.ts +450 -0
- package/src/component/multi-tabs/index.ts +2 -0
- package/src/component/multi-tabs/style/index.scss +217 -0
- package/src/component/multi-tabs/style/mixin.scss +13 -0
- package/src/component/multi-tabs/style/parameters.scss +2 -0
- package/src/component/multi-tabs/style/theme1.scss +92 -0
- package/src/component/multi-tabs/style/theme2.scss +89 -0
- package/src/component/multi-tabs/style/theme3.scss +60 -0
- package/src/component/multi-tabs/style/theme4.scss +85 -0
- package/src/component/multi-tabs/typing.ts +7 -0
- package/src/component/notification/DefaultNotification.vue +455 -0
- package/src/component/notification/NotificationWidget.ts +332 -0
- package/src/component/notification/index.ts +2 -0
- package/src/component/order-statistic/OrderStatistic.vue +12 -0
- package/src/component/order-statistic/index.ts +146 -0
- package/src/component/partner-switcher/PartnerSwitcher.vue +75 -0
- package/src/component/partner-switcher/PartnerSwitcherWidget.ts +70 -0
- package/src/component/partner-switcher/index.ts +6 -0
- package/src/component/partner-switcher/service/PartnerSwitcherService.ts +20 -0
- package/src/component/partner-switcher/service/impl/PartnerSwitcherServiceImpl.ts +48 -0
- package/src/component/partner-switcher/service/index.ts +2 -0
- package/src/component/partner-switcher/session/PartnerInfoSession.ts +32 -0
- package/src/component/partner-switcher/session/impl/DefaultPartnerInfoSession.ts +46 -0
- package/src/component/partner-switcher/session/index.ts +2 -0
- package/src/component/partner-switcher/spi/PartnerSwitcherMaskEditor.ts +24 -0
- package/src/component/partner-switcher/spi/index.ts +1 -0
- package/src/component/partner-switcher/typing/index.ts +1 -0
- package/src/component/partner-switcher/typing/partner.ts +22 -0
- package/src/component/quick-search/QuickSearch.vue +34 -0
- package/src/component/quick-search/index.ts +237 -0
- package/src/component/style/index.scss +4 -0
- package/src/component/style/layout.scss +229 -0
- package/src/component/user/DefaultUser.vue +92 -0
- package/src/component/user/UserWidget.ts +129 -0
- package/src/component/user/index.ts +1 -0
- package/src/config/DebugConfig.ts +30 -0
- package/src/config/PartnerSwitcherConfig.ts +30 -0
- package/src/config/index.ts +2 -0
- package/src/index.ts +11 -0
- package/src/service/index.ts +5 -0
- package/src/service/menu-service.ts +105 -0
- package/src/service/message-service.ts +65 -0
- package/src/service/module-service.ts +69 -0
- package/src/service/top-bar-service.ts +144 -0
- package/src/service/user-service.ts +10 -0
- package/src/shim-translate.d.ts +7 -0
- package/src/shim-vue.d.ts +6 -0
- package/src/spi/index.ts +1 -0
- package/src/spi/mask-editor.ts +102 -0
- package/src/tags/Block.vue +16 -0
- package/src/tags/Breadcrumb.vue +16 -0
- package/src/tags/Container.vue +16 -0
- package/src/tags/Content.vue +16 -0
- package/src/tags/Header.vue +16 -0
- package/src/tags/Mask.vue +16 -0
- package/src/tags/MultiTabs.vue +16 -0
- package/src/tags/Sidebar.vue +16 -0
- package/src/tags/Widget.vue +16 -0
- package/src/tags/context/context.ts +24 -0
- package/src/tags/context/index.ts +1 -0
- package/src/tags/index.ts +48 -0
- package/src/tags/mixin/MaskWidgetTagMixin.ts +79 -0
- package/src/tags/mixin/index.ts +3 -0
- package/src/tags/mixin/typing.ts +8 -0
- package/src/tags/mixin/use-mask-widget-tag.ts +172 -0
- package/src/tags/register/index.ts +1 -0
- package/src/tags/register/manager.ts +43 -0
- package/src/tags/resolve/index.ts +2 -0
- package/src/tags/resolve/internal/index.ts +2 -0
- package/src/tags/resolve/internal/typing.ts +6 -0
- package/src/tags/resolve/internal/widget-resolve.ts +57 -0
- package/src/tags/resolve/typing.ts +39 -0
- package/src/tags/resolve/widget-resolve.ts +64 -0
- package/src/template/default-mask.ts +51 -0
- package/src/template/index.ts +26 -0
- package/src/theme/index.ts +1 -0
- package/src/typing/constant.ts +3 -0
- package/src/typing/index.ts +3 -0
- package/src/typing/menu.ts +15 -0
- package/src/typing/stream-symble.ts +14 -0
- package/src/util/HomepageUtils.ts +41 -0
- package/src/util/MenuUtil.ts +18 -0
- package/src/util/index.ts +3 -0
- package/src/util/unauthorized-action.ts +98 -0
- package/src/utils.ts +716 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="oio-debug-view" v-if="activeDebugTab === 'debugView'">
|
|
3
|
+
<div class="oio-debug-view-wrapper">
|
|
4
|
+
<oio-group v-if="isShowPageParameters" class="oio-debug-page-parameters" title="页面参数">
|
|
5
|
+
<oio-form class="oio-debug-info-form">
|
|
6
|
+
<oio-form-item
|
|
7
|
+
v-for="parameter of resolvedPageParameters"
|
|
8
|
+
:key="parameter.key"
|
|
9
|
+
:label="parameter.label"
|
|
10
|
+
:class="['oio-debug-page-parameters-item', parameter.isObject && 'oio-debug-page-parameters-object']"
|
|
11
|
+
>
|
|
12
|
+
<pre v-if="parameter.isObject">{{ parameter.value }}</pre>
|
|
13
|
+
<span v-else>{{ parameter.value }}</span>
|
|
14
|
+
</oio-form-item>
|
|
15
|
+
</oio-form>
|
|
16
|
+
<template #titleToolbar>
|
|
17
|
+
<oio-button type="primary" size="small" async @click="onRefresh">刷新页面信息</oio-button>
|
|
18
|
+
</template>
|
|
19
|
+
</oio-group>
|
|
20
|
+
<oio-group v-if="isShowViewAction" class="oio-debug-view-action" title="页面信息">
|
|
21
|
+
<oio-form class="oio-debug-info-form">
|
|
22
|
+
<oio-form>
|
|
23
|
+
<oio-row>
|
|
24
|
+
<oio-col v-for="parameters of resolvedViewAction" flex="1" :key="parameters.key">
|
|
25
|
+
<oio-form-item v-for="parameter of parameters.value" :key="parameter.key" :label="parameter.label">
|
|
26
|
+
<span>{{ parameter.value }}</span>
|
|
27
|
+
</oio-form-item>
|
|
28
|
+
</oio-col>
|
|
29
|
+
</oio-row>
|
|
30
|
+
</oio-form>
|
|
31
|
+
</oio-form>
|
|
32
|
+
</oio-group>
|
|
33
|
+
</div>
|
|
34
|
+
<oio-tabs v-if="isShowViewAction" class="oio-debug-tabs" destroyInactiveTabPane>
|
|
35
|
+
<oio-tab tab="DSL" key="1">
|
|
36
|
+
<debug-json-view :text="resolvedDsl" text-class="oio-debug-textarea" />
|
|
37
|
+
</oio-tab>
|
|
38
|
+
<oio-tab tab="Layout" key="2">
|
|
39
|
+
<debug-json-view :text="resolvedLayout" text-class="oio-debug-textarea" />
|
|
40
|
+
</oio-tab>
|
|
41
|
+
<oio-tab tab="Mask" key="3">
|
|
42
|
+
<debug-json-view :text="resolvedMask" text-class="oio-debug-textarea" />
|
|
43
|
+
</oio-tab>
|
|
44
|
+
</oio-tabs>
|
|
45
|
+
<oio-tabs v-if="isShowResolvedRuntimeContextPanel" class="oio-debug-tabs" destroyInactiveTabPane>
|
|
46
|
+
<oio-tab v-for="panel of runtimeContextPanels" :tab="panel.title" :key="panel.key">
|
|
47
|
+
<component v-if="panel.component" :is="panel.component" v-bind="constructPanelProps(panel)" />
|
|
48
|
+
<debug-default-info v-else v-bind="panel" />
|
|
49
|
+
</oio-tab>
|
|
50
|
+
</oio-tabs>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
<script lang="ts">
|
|
54
|
+
import { RuntimeModule, RuntimeViewAction, ViewActionQueryParameter } from '@oinone/kunlun-engine';
|
|
55
|
+
import { TreeNode } from '@oinone/kunlun-shared';
|
|
56
|
+
import {
|
|
57
|
+
OioButton,
|
|
58
|
+
OioCol,
|
|
59
|
+
OioForm,
|
|
60
|
+
OioFormItem,
|
|
61
|
+
OioGroup,
|
|
62
|
+
OioRow,
|
|
63
|
+
OioTab,
|
|
64
|
+
OioTabs,
|
|
65
|
+
OioTextarea
|
|
66
|
+
} from '@oinone/kunlun-vue-ui-antd';
|
|
67
|
+
import { get as getValue, isArray, isPlainObject } from 'lodash-es';
|
|
68
|
+
import { computed, defineComponent, PropType } from 'vue';
|
|
69
|
+
import { RuntimeMenu } from '../../../../typing';
|
|
70
|
+
import { DebugErrorPanel } from '../../typing';
|
|
71
|
+
import DebugDefaultInfo from '../components/DebugDefaultInfo.vue';
|
|
72
|
+
import DebugJsonView from '../components/DebugJsonView.vue';
|
|
73
|
+
import { DebugUtils } from '../debug-utils';
|
|
74
|
+
|
|
75
|
+
interface ParameterItem {
|
|
76
|
+
key: string;
|
|
77
|
+
label: string;
|
|
78
|
+
value: string;
|
|
79
|
+
isObject: boolean;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export default defineComponent({
|
|
83
|
+
name: 'DebugView',
|
|
84
|
+
components: {
|
|
85
|
+
OioButton,
|
|
86
|
+
OioForm,
|
|
87
|
+
OioFormItem,
|
|
88
|
+
OioGroup,
|
|
89
|
+
OioRow,
|
|
90
|
+
OioCol,
|
|
91
|
+
OioTabs,
|
|
92
|
+
OioTab,
|
|
93
|
+
OioTextarea,
|
|
94
|
+
DebugDefaultInfo,
|
|
95
|
+
DebugJsonView
|
|
96
|
+
},
|
|
97
|
+
inheritAttrs: false,
|
|
98
|
+
props: {
|
|
99
|
+
activeDebugTab: {
|
|
100
|
+
type: String
|
|
101
|
+
},
|
|
102
|
+
pageParameters: {
|
|
103
|
+
type: Object as PropType<ViewActionQueryParameter | null>
|
|
104
|
+
},
|
|
105
|
+
viewAction: {
|
|
106
|
+
type: Object as PropType<RuntimeViewAction | null>
|
|
107
|
+
},
|
|
108
|
+
module: {
|
|
109
|
+
type: Object as PropType<RuntimeModule | null>
|
|
110
|
+
},
|
|
111
|
+
menus: {
|
|
112
|
+
type: Object as PropType<TreeNode<RuntimeMenu>[] | null>
|
|
113
|
+
},
|
|
114
|
+
runtimeContextPanels: {
|
|
115
|
+
type: Array as PropType<DebugErrorPanel[]>
|
|
116
|
+
},
|
|
117
|
+
onRefresh: {
|
|
118
|
+
type: Function
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
setup(props) {
|
|
122
|
+
const isShowPageParameters = computed(() => {
|
|
123
|
+
return !!props.pageParameters;
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
const isShowViewAction = computed(() => {
|
|
127
|
+
return !!props.viewAction;
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
const isShowModule = computed(() => {
|
|
131
|
+
return !!props.module;
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const isShowMenus = computed(() => {
|
|
135
|
+
return !!props.menus?.length;
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
const isShowResolvedRuntimeContextPanel = computed(() => {
|
|
139
|
+
return !!props.runtimeContextPanels?.length;
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
const convertLabelByKey = (key: string | [string, string]): Omit<ParameterItem, 'value' | 'isObject'> => {
|
|
143
|
+
if (isArray(key)) {
|
|
144
|
+
return {
|
|
145
|
+
key: key[0],
|
|
146
|
+
label: `${key[1]}:`
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
key,
|
|
151
|
+
label: `${key}:`
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const convertParameterItem = (data: Record<string, unknown>, key: string | [string, string]): ParameterItem => {
|
|
156
|
+
let value;
|
|
157
|
+
if (isArray(key)) {
|
|
158
|
+
value = `${getValue(data, key[0]) ?? ''}`;
|
|
159
|
+
} else {
|
|
160
|
+
value = `${getValue(data, key) ?? ''}`;
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
...convertLabelByKey(key),
|
|
164
|
+
value,
|
|
165
|
+
isObject: false
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const convertParameterItems = (data, ...keys: (string | [string, string])[]): ParameterItem[] => {
|
|
170
|
+
return keys.map((key) => convertParameterItem(data, key));
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const beautifyJSON = (data: unknown) => {
|
|
174
|
+
if (typeof data === 'string') {
|
|
175
|
+
try {
|
|
176
|
+
return DebugUtils.toJSONString(JSON.parse(data));
|
|
177
|
+
} catch (ignored) {}
|
|
178
|
+
return data;
|
|
179
|
+
}
|
|
180
|
+
return DebugUtils.toJSONString(data);
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const resolvedPageParameters = computed(() => {
|
|
184
|
+
if (!props.pageParameters) {
|
|
185
|
+
return [];
|
|
186
|
+
}
|
|
187
|
+
const parameters: ParameterItem[] = [];
|
|
188
|
+
for (const key in props.pageParameters) {
|
|
189
|
+
let value = decodeURIComponent(props.pageParameters[key]! as string);
|
|
190
|
+
if (value == null) {
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
let isObject = false;
|
|
194
|
+
try {
|
|
195
|
+
const jsonData = JSON.parse(value);
|
|
196
|
+
if (isPlainObject(jsonData) || Array.isArray(jsonData)) {
|
|
197
|
+
value = beautifyJSON(jsonData);
|
|
198
|
+
isObject = true;
|
|
199
|
+
}
|
|
200
|
+
} catch (ignored) {}
|
|
201
|
+
parameters.push({
|
|
202
|
+
...convertLabelByKey(key),
|
|
203
|
+
value,
|
|
204
|
+
isObject
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
return parameters;
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const resolvedViewAction = computed(() => {
|
|
211
|
+
if (!props.viewAction) {
|
|
212
|
+
return [[], [], []].map((value, index) => ({ key: `${index + 1}`, value }));
|
|
213
|
+
}
|
|
214
|
+
return [
|
|
215
|
+
convertParameterItems(
|
|
216
|
+
props.viewAction,
|
|
217
|
+
'id',
|
|
218
|
+
'model',
|
|
219
|
+
'name',
|
|
220
|
+
'title',
|
|
221
|
+
'displayName',
|
|
222
|
+
'contextType',
|
|
223
|
+
'target',
|
|
224
|
+
'domain',
|
|
225
|
+
'filter'
|
|
226
|
+
),
|
|
227
|
+
convertParameterItems(
|
|
228
|
+
props.viewAction,
|
|
229
|
+
'module',
|
|
230
|
+
'moduleName',
|
|
231
|
+
'resModule',
|
|
232
|
+
'resModuleName',
|
|
233
|
+
['resView.id', 'resViewId'],
|
|
234
|
+
['resView.model', 'resViewModel'],
|
|
235
|
+
['resView.name', 'resViewName'],
|
|
236
|
+
['resView.type', 'resViewType']
|
|
237
|
+
),
|
|
238
|
+
convertParameterItems(props.viewAction, ['mask', 'maskName'], ['resView.baseLayoutName', 'layoutName'])
|
|
239
|
+
].map((value, index) => ({ key: `${index + 1}`, value }));
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
const resolvedDsl = computed(() => {
|
|
243
|
+
const dsl = props.viewAction?.resView?.dsl;
|
|
244
|
+
if (dsl) {
|
|
245
|
+
return beautifyJSON(dsl);
|
|
246
|
+
}
|
|
247
|
+
return undefined;
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
const resolvedLayout = computed(() => {
|
|
251
|
+
const layout = props.viewAction?.resView?.layout;
|
|
252
|
+
if (layout) {
|
|
253
|
+
return beautifyJSON(layout);
|
|
254
|
+
}
|
|
255
|
+
return undefined;
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
const resolvedMask = computed(() => {
|
|
259
|
+
return props.viewAction?.resMaskDefinition?.template;
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
const constructPanelProps = (panel: DebugErrorPanel) => {
|
|
263
|
+
const properties = { ...panel };
|
|
264
|
+
delete properties.component;
|
|
265
|
+
return properties;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
return {
|
|
269
|
+
isShowPageParameters,
|
|
270
|
+
isShowViewAction,
|
|
271
|
+
isShowModule,
|
|
272
|
+
isShowMenus,
|
|
273
|
+
isShowResolvedRuntimeContextPanel,
|
|
274
|
+
|
|
275
|
+
resolvedPageParameters,
|
|
276
|
+
resolvedViewAction,
|
|
277
|
+
resolvedDsl,
|
|
278
|
+
resolvedLayout,
|
|
279
|
+
resolvedMask,
|
|
280
|
+
constructPanelProps
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
</script>
|
|
285
|
+
<style lang="scss">
|
|
286
|
+
.oio-debug-view {
|
|
287
|
+
display: flex;
|
|
288
|
+
flex-direction: column;
|
|
289
|
+
row-gap: 24px;
|
|
290
|
+
|
|
291
|
+
.oio-debug-view-wrapper {
|
|
292
|
+
display: flex;
|
|
293
|
+
column-gap: 16px;
|
|
294
|
+
align-items: flex-start;
|
|
295
|
+
|
|
296
|
+
& > div {
|
|
297
|
+
flex: 1;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.oio-debug-view-action,
|
|
301
|
+
.oio-debug-page-parameters {
|
|
302
|
+
.oio-group-title-wrapper {
|
|
303
|
+
height: 48px;
|
|
304
|
+
}
|
|
305
|
+
.oio-group-content {
|
|
306
|
+
height: 440px;
|
|
307
|
+
overflow-y: auto;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
.oio-debug-view-action {
|
|
311
|
+
flex: 3;
|
|
312
|
+
}
|
|
313
|
+
.oio-debug-page-parameters {
|
|
314
|
+
max-width: 500px;
|
|
315
|
+
&-item {
|
|
316
|
+
.ant-form-item-control-input-content {
|
|
317
|
+
word-break: break-all;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
&-object > .ant-form-item-control {
|
|
321
|
+
padding-top: 5px;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.oio-debug-info-form.oio-form .oio-form-item.oio-form-item-horizontal > .ant-form-item-label {
|
|
327
|
+
width: 120px;
|
|
328
|
+
max-width: unset;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
</style>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ModuleCache,
|
|
3
|
+
RuntimeContext,
|
|
4
|
+
RuntimeContextManager,
|
|
5
|
+
RuntimeContextServiceToken,
|
|
6
|
+
RuntimeModule,
|
|
7
|
+
RuntimeViewAction,
|
|
8
|
+
ViewActionCache,
|
|
9
|
+
ViewActionQueryParameter
|
|
10
|
+
} from '@oinone/kunlun-engine';
|
|
11
|
+
import { useSessionPath } from '@oinone/kunlun-request';
|
|
12
|
+
import { Router } from '@oinone/kunlun-router';
|
|
13
|
+
import { TreeNode, uniqueKeyGenerator } from '@oinone/kunlun-shared';
|
|
14
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
15
|
+
import { VueWidget, Widget } from '@oinone/kunlun-vue-widget';
|
|
16
|
+
import { MenuService } from '../../../../service';
|
|
17
|
+
import { RuntimeMenu } from '../../../../typing';
|
|
18
|
+
import { DebugErrorPanel } from '../../typing';
|
|
19
|
+
import { DebugUtils } from '../debug-utils';
|
|
20
|
+
import { DebugRuntimeContextServiceToken } from '../service/DebugRuntimeContextService';
|
|
21
|
+
import { DebugInfoStorage } from '../storage';
|
|
22
|
+
import DebugView from './DebugView.vue';
|
|
23
|
+
|
|
24
|
+
export class DebugViewWidget extends VueWidget {
|
|
25
|
+
protected router!: Router;
|
|
26
|
+
|
|
27
|
+
public initialize(props) {
|
|
28
|
+
super.initialize(props);
|
|
29
|
+
this.setComponent(DebugView);
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@Widget.Inject()
|
|
34
|
+
@Widget.Reactive()
|
|
35
|
+
protected activeDebugTab?: string;
|
|
36
|
+
|
|
37
|
+
@Widget.Reactive()
|
|
38
|
+
private pageParameters: ViewActionQueryParameter | null | undefined;
|
|
39
|
+
|
|
40
|
+
@Widget.Reactive()
|
|
41
|
+
private viewAction: RuntimeViewAction | null | undefined;
|
|
42
|
+
|
|
43
|
+
@Widget.Reactive()
|
|
44
|
+
private module: RuntimeModule | null | undefined;
|
|
45
|
+
|
|
46
|
+
@Widget.Reactive()
|
|
47
|
+
private menus: TreeNode<RuntimeMenu>[] | null | undefined;
|
|
48
|
+
|
|
49
|
+
@Widget.Reactive()
|
|
50
|
+
private runtimeContextPanels: DebugErrorPanel[] | undefined;
|
|
51
|
+
|
|
52
|
+
private runtimeContext: RuntimeContext | undefined;
|
|
53
|
+
|
|
54
|
+
@Widget.Method()
|
|
55
|
+
public async onRefresh() {
|
|
56
|
+
const page = DebugUtils.getPageParameters();
|
|
57
|
+
if (!page) {
|
|
58
|
+
this.pageParameters = null;
|
|
59
|
+
this.viewAction = null;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this.pageParameters = page;
|
|
63
|
+
DebugUtils.getDebugStorage().pageParameters = page;
|
|
64
|
+
await this.resolvePageParameters(page);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
protected async resolveViewAction(page: ViewActionQueryParameter): Promise<boolean> {
|
|
68
|
+
const { model, action, path } = page;
|
|
69
|
+
if (!model || !action) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
const viewAction = await useSessionPath(path, () => ViewActionCache.get(model, action, true));
|
|
74
|
+
if (viewAction) {
|
|
75
|
+
this.viewAction = viewAction;
|
|
76
|
+
DebugUtils.getDebugStorage().viewAction = viewAction;
|
|
77
|
+
this.resolveDsl(viewAction);
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
} catch (e) {
|
|
81
|
+
console.error('Fetch view action error.', e);
|
|
82
|
+
}
|
|
83
|
+
this.viewAction = null;
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
protected async resolveModule(page: ViewActionQueryParameter): Promise<boolean> {
|
|
88
|
+
const { module: moduleName } = page;
|
|
89
|
+
if (!moduleName) {
|
|
90
|
+
this.module = null;
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
const module = await ModuleCache.get(moduleName);
|
|
94
|
+
if (module) {
|
|
95
|
+
this.module = module;
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
this.module = null;
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
protected async resolveMenu(page: ViewActionQueryParameter): Promise<boolean> {
|
|
103
|
+
const { module: moduleName } = page;
|
|
104
|
+
if (!moduleName) {
|
|
105
|
+
this.menus = null;
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
this.menus = MenuService.convert(await MenuService.queryMenus(moduleName));
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
protected resolveDsl(viewAction: RuntimeViewAction) {
|
|
113
|
+
this.runtimeContextPanels = [];
|
|
114
|
+
const handle = this.runtimeContext?.handle;
|
|
115
|
+
if (handle) {
|
|
116
|
+
RuntimeContextManager.delete(handle);
|
|
117
|
+
this.runtimeContext = undefined;
|
|
118
|
+
DebugUtils.getDebugStorage().runtimeContext = undefined;
|
|
119
|
+
}
|
|
120
|
+
const dsl = viewAction.resView?.dsl;
|
|
121
|
+
if (!dsl) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const runtimeContext = SPI.RawInstantiate(RuntimeContextServiceToken)?.createRuntimeContextByViewAction(
|
|
125
|
+
viewAction,
|
|
126
|
+
false,
|
|
127
|
+
uniqueKeyGenerator()
|
|
128
|
+
);
|
|
129
|
+
if (!runtimeContext) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
runtimeContext.deepResolve();
|
|
133
|
+
DebugUtils.getDebugStorage().runtimeContext = runtimeContext;
|
|
134
|
+
const panels: DebugErrorPanel[] = [];
|
|
135
|
+
this.resolveRuntimeContext(panels, runtimeContext);
|
|
136
|
+
this.runtimeContextPanels = panels;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
protected resolveRuntimeContext(runtimeContextPanels: DebugErrorPanel[], runtimeContext: RuntimeContext) {
|
|
140
|
+
const services = SPI.RawInstantiates(DebugRuntimeContextServiceToken);
|
|
141
|
+
let index = 1;
|
|
142
|
+
for (const service of services) {
|
|
143
|
+
const panel = service.analysis(runtimeContext) as unknown as DebugErrorPanel;
|
|
144
|
+
if (panel) {
|
|
145
|
+
panel.key = `${index++}`;
|
|
146
|
+
runtimeContextPanels.push(panel);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
protected async resolvePageParameters(page: ViewActionQueryParameter) {
|
|
152
|
+
await this.resolveViewAction(page);
|
|
153
|
+
// if (!(await this.resolveViewAction(page))) {
|
|
154
|
+
// return;
|
|
155
|
+
// }
|
|
156
|
+
// await this.resolveModule(page);
|
|
157
|
+
// await this.resolveMenu(page);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
protected onStorageUpdate = async (storage: DebugInfoStorage) => {
|
|
161
|
+
const that = this.getOperator<this>();
|
|
162
|
+
const { pageParameters, viewAction, runtimeContext } = storage;
|
|
163
|
+
that.pageParameters = pageParameters;
|
|
164
|
+
that.viewAction = viewAction;
|
|
165
|
+
that.runtimeContext = runtimeContext;
|
|
166
|
+
if (runtimeContext) {
|
|
167
|
+
const panels: DebugErrorPanel[] = [];
|
|
168
|
+
that.resolveRuntimeContext(panels, runtimeContext);
|
|
169
|
+
that.runtimeContextPanels = panels;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
protected async mounted() {
|
|
174
|
+
await this.onRefresh();
|
|
175
|
+
DebugUtils.getDebugStorage().onUpdate(this.onStorageUpdate.bind(this));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
protected unmounted() {
|
|
179
|
+
DebugUtils.getDebugStorage().clearOnUpdate(this.onStorageUpdate.bind(this));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RuntimeContext } from '@oinone/kunlun-engine';
|
|
2
|
+
import { ServiceIdentifier } from '@oinone/kunlun-spi';
|
|
3
|
+
import { DebugErrorAnalysisResult } from '../../typing';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 调试运行时上下文异常分析服务
|
|
7
|
+
*/
|
|
8
|
+
export interface DebugRuntimeContextService {
|
|
9
|
+
/**
|
|
10
|
+
* 异常分析
|
|
11
|
+
* @param runtimeContext 运行时上下文
|
|
12
|
+
* @return 错误面板信息
|
|
13
|
+
*/
|
|
14
|
+
analysis(runtimeContext: RuntimeContext): DebugErrorAnalysisResult | undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 调试运行时上下文异常分析服务Token
|
|
19
|
+
*/
|
|
20
|
+
export const DebugRuntimeContextServiceToken =
|
|
21
|
+
ServiceIdentifier<DebugRuntimeContextService>('DebugRuntimeContextService');
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ServiceIdentifier } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugErrorAnalysisResult, DebugResponseError } from '../../typing';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 调试异常分析服务
|
|
6
|
+
*/
|
|
7
|
+
export interface DebugStackInfoService {
|
|
8
|
+
/**
|
|
9
|
+
* 异常分析
|
|
10
|
+
* @param error 当前异常信息
|
|
11
|
+
* @param errors 全部异常信息
|
|
12
|
+
* @return 错误面板信息
|
|
13
|
+
*/
|
|
14
|
+
analysis(error: DebugResponseError, errors: DebugResponseError[]): DebugErrorAnalysisResult | undefined;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 解析栈信息
|
|
18
|
+
* @param error 当前异常信息
|
|
19
|
+
* @param errors 全部异常信息
|
|
20
|
+
*/
|
|
21
|
+
parseStackInfo(error: DebugResponseError, errors: DebugResponseError[]): unknown;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 调试异常分析服务Token
|
|
26
|
+
*/
|
|
27
|
+
export const DebugStackInfoServiceToken = ServiceIdentifier<DebugStackInfoService>('DebugStackInfoService');
|
|
28
|
+
|
|
29
|
+
export const DebugDefaultStackInfoServiceType = '__default__';
|
|
30
|
+
|
|
31
|
+
export const DebugUnhandledExceptionTitle = '未解析异常';
|
|
32
|
+
|
|
33
|
+
export const DebugUnhandledExceptionMessage = '所有未经解析处理的异常信息';
|
package/src/component/debug/view/service/impl/runtime-context/DebugDefaultRuntimeContextService.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RuntimeContext } from '@oinone/kunlun-engine';
|
|
2
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
+
import { DebugErrorAnalysisResult } from '../../../../typing';
|
|
4
|
+
import { DebugUtils } from '../../../debug-utils';
|
|
5
|
+
import { DebugRuntimeContextService, DebugRuntimeContextServiceToken } from '../../DebugRuntimeContextService';
|
|
6
|
+
|
|
7
|
+
@SPI.Service(DebugRuntimeContextServiceToken, { priority: 1000 })
|
|
8
|
+
export class DebugDefaultRuntimeContextService implements DebugRuntimeContextService {
|
|
9
|
+
public analysis(runtimeContext: RuntimeContext): DebugErrorAnalysisResult | undefined {
|
|
10
|
+
return {
|
|
11
|
+
title: '完整上下文',
|
|
12
|
+
message: '运行时上下文全部内容',
|
|
13
|
+
stackInfo: DebugUtils.runtimeContextToJSONString(runtimeContext)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RuntimeContext } from '@oinone/kunlun-engine';
|
|
2
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
+
import { DebugErrorAnalysisResult } from '../../../../typing';
|
|
4
|
+
import { DebugUtils } from '../../../debug-utils';
|
|
5
|
+
import { DebugRuntimeContextService, DebugRuntimeContextServiceToken } from '../../DebugRuntimeContextService';
|
|
6
|
+
|
|
7
|
+
@SPI.Service(DebugRuntimeContextServiceToken, { priority: 20 })
|
|
8
|
+
export class DebugRuntimeActionService implements DebugRuntimeContextService {
|
|
9
|
+
public analysis(runtimeContext: RuntimeContext): DebugErrorAnalysisResult | undefined {
|
|
10
|
+
return {
|
|
11
|
+
title: '页面动作',
|
|
12
|
+
message: '运行时上下文动作',
|
|
13
|
+
stackInfo: DebugUtils.toJSONString(this.simplifyActions(runtimeContext))
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
protected simplifyActions(runtimeContext: RuntimeContext) {
|
|
18
|
+
return {
|
|
19
|
+
handle: runtimeContext.handle,
|
|
20
|
+
modelActions: runtimeContext.model.modelActions.map((v) => {
|
|
21
|
+
const simplifyAction = { ...v };
|
|
22
|
+
delete simplifyAction.modelDefinition;
|
|
23
|
+
return simplifyAction;
|
|
24
|
+
}),
|
|
25
|
+
childrenContext: runtimeContext.childrenContext.map((v) => this.simplifyActions(v))
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RuntimeContext } from '@oinone/kunlun-engine';
|
|
2
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
+
import { DebugErrorAnalysisResult } from '../../../../typing';
|
|
4
|
+
import { DebugUtils } from '../../../debug-utils';
|
|
5
|
+
import { DebugRuntimeContextService, DebugRuntimeContextServiceToken } from '../../DebugRuntimeContextService';
|
|
6
|
+
|
|
7
|
+
@SPI.Service(DebugRuntimeContextServiceToken, { priority: 40 })
|
|
8
|
+
export class DebugRuntimeDslService implements DebugRuntimeContextService {
|
|
9
|
+
public analysis(runtimeContext: RuntimeContext): DebugErrorAnalysisResult | undefined {
|
|
10
|
+
return {
|
|
11
|
+
title: '运行时DSL',
|
|
12
|
+
message: '运行时上下文DSL',
|
|
13
|
+
stackInfo: DebugUtils.toJSONString(runtimeContext.viewDsl)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { RuntimeContext } from '@oinone/kunlun-engine';
|
|
2
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
+
import { DebugErrorAnalysisResult } from '../../../../typing';
|
|
4
|
+
import { DebugUtils } from '../../../debug-utils';
|
|
5
|
+
import { DebugRuntimeContextService, DebugRuntimeContextServiceToken } from '../../DebugRuntimeContextService';
|
|
6
|
+
|
|
7
|
+
@SPI.Service(DebugRuntimeContextServiceToken, { priority: 10 })
|
|
8
|
+
export class DebugRuntimeFieldService implements DebugRuntimeContextService {
|
|
9
|
+
public analysis(runtimeContext: RuntimeContext): DebugErrorAnalysisResult | undefined {
|
|
10
|
+
const simplifyFields = this.simplifyFields(runtimeContext);
|
|
11
|
+
return {
|
|
12
|
+
title: '页面字段',
|
|
13
|
+
message: '运行时上下文字段',
|
|
14
|
+
simplifyFields,
|
|
15
|
+
stackInfo: DebugUtils.toJSONString(simplifyFields)
|
|
16
|
+
// component: defineAsyncComponent(
|
|
17
|
+
// () => import('../../../components/runtime-context/DebugRuntimeFieldComponent.vue')
|
|
18
|
+
// )
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
protected simplifyFields(runtimeContext: RuntimeContext) {
|
|
23
|
+
return {
|
|
24
|
+
handle: runtimeContext.handle,
|
|
25
|
+
modelFields: runtimeContext.model.modelFields.map((v) => {
|
|
26
|
+
const simplifyField = { ...v };
|
|
27
|
+
delete simplifyField.modelDefinition;
|
|
28
|
+
return simplifyField;
|
|
29
|
+
}),
|
|
30
|
+
childrenContext: runtimeContext.childrenContext.map((v) => this.simplifyFields(v))
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RuntimeContext } from '@oinone/kunlun-engine';
|
|
2
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
+
import { DebugErrorAnalysisResult } from '../../../../typing';
|
|
4
|
+
import { DebugUtils } from '../../../debug-utils';
|
|
5
|
+
import { DebugRuntimeContextService, DebugRuntimeContextServiceToken } from '../../DebugRuntimeContextService';
|
|
6
|
+
|
|
7
|
+
@SPI.Service(DebugRuntimeContextServiceToken, { priority: 50 })
|
|
8
|
+
export class DebugRuntimeLayoutService implements DebugRuntimeContextService {
|
|
9
|
+
public analysis(runtimeContext: RuntimeContext): DebugErrorAnalysisResult | undefined {
|
|
10
|
+
return {
|
|
11
|
+
title: '运行时Layout',
|
|
12
|
+
message: '运行时上下文Layout',
|
|
13
|
+
stackInfo: DebugUtils.toJSONString(runtimeContext.viewLayout)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|