@ximatai/muyun-web-app 0.26.3
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/EmployeeDetailWorkspaceView-mtdcsqgF.js +14 -0
- package/dist/EmployeeManagementView-CKKvQZaC.js +1706 -0
- package/dist/MetadataOrchestrationView-CprWBocy.js +655 -0
- package/dist/ModuleActionManagementView-DNuAQUPE.js +597 -0
- package/dist/RoleAuthorizationView-CQtSAJoJ.js +592 -0
- package/dist/RoleDetailWorkspaceView-Dh8DXpyS.js +26 -0
- package/dist/RoleManagementView-BrqaFV7y.js +1927 -0
- package/dist/SystemUserDetailWorkspaceView-N-kvycAu.js +17 -0
- package/dist/SystemUserManagementView-BVS5moV5.js +761 -0
- package/dist/UserDetailWorkspaceView-Iek6xwix.js +17 -0
- package/dist/UserManagementView-BR_Jz8O-.js +965 -0
- package/dist/currentUserContext-B1lj1WgF.js +11 -0
- package/dist/index.css +2 -0
- package/dist/index.js +7127 -0
- package/dist/pageRealtime-sRtDYlQP.js +140 -0
- package/dist/platform-components-bC1gwhic.js +8412 -0
- package/dist/types/App.vue.d.ts +3 -0
- package/dist/types/app/ChangeOwnPasswordDialog.vue.d.ts +27 -0
- package/dist/types/app/LoginView.vue.d.ts +14 -0
- package/dist/types/app/appWorkbenchStartup.d.ts +3 -0
- package/dist/types/app/devWorkbenchStartup.d.ts +1 -0
- package/dist/types/app/loginTenant.d.ts +6 -0
- package/dist/types/app/platformMessage.d.ts +6 -0
- package/dist/types/app/query.d.ts +3 -0
- package/dist/types/app/router.d.ts +1 -0
- package/dist/types/app/workbenchStartup.d.ts +24 -0
- package/dist/types/consumer/PlatformAdminOutlet.vue.d.ts +7 -0
- package/dist/types/consumer/index.d.ts +15 -0
- package/dist/types/dynamic-page-runtime/DynamicModuleHost.vue.d.ts +7 -0
- package/dist/types/dynamic-page-runtime/DynamicModulePage.vue.d.ts +7 -0
- package/dist/types/dynamic-page-runtime/actionReactions.d.ts +16 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +3 -0
- package/dist/types/dynamic-page-runtime/mockDescriptor.d.ts +2 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/types/platform-admin-runtime/PlatformAdminOutlet.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/WorkspaceViewDrawer.vue.d.ts +32 -0
- package/dist/types/platform-admin-runtime/WorkspaceViewOutlet.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/authSession.d.ts +8 -0
- package/dist/types/platform-admin-runtime/backendHttp.d.ts +3 -0
- package/dist/types/platform-admin-runtime/currentUserContext.d.ts +4 -0
- package/dist/types/platform-admin-runtime/index.d.ts +12 -0
- package/dist/types/platform-admin-runtime/moduleOpenApi.d.ts +36 -0
- package/dist/types/platform-admin-runtime/pageRealtime.d.ts +61 -0
- package/dist/types/platform-admin-runtime/platformAdminRoutes.d.ts +21 -0
- package/dist/types/platform-admin-runtime/realtime.d.ts +20 -0
- package/dist/types/platform-admin-runtime/sessionRecovery.d.ts +3 -0
- package/dist/types/platform-admin-runtime/useWorkspaceViewPromotion.d.ts +24 -0
- package/dist/types/platform-admin-runtime/workspaceViewContract.d.ts +36 -0
- package/dist/types/platform-admin-runtime/workspaceViewContributions.d.ts +3 -0
- package/dist/types/platform-admin-runtime/workspaceViewHost.d.ts +10 -0
- package/dist/types/platform-admin-runtime/workspaceViewSessions.d.ts +18 -0
- package/dist/types/platform-admin-runtime/workspaceViews.d.ts +18 -0
- package/dist/types/platform-components/ApplicationScopeSwitcher.vue.d.ts +18 -0
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +52 -0
- package/dist/types/platform-components/DateTimeText.vue.d.ts +15 -0
- package/dist/types/platform-components/DrawerOperationBar.vue.d.ts +18 -0
- package/dist/types/platform-components/EnabledSelect.vue.d.ts +14 -0
- package/dist/types/platform-components/ManagementExplorerColumn.vue.d.ts +13 -0
- package/dist/types/platform-components/ManagementWorkspace.vue.d.ts +19 -0
- package/dist/types/platform-components/ModuleActionButton.vue.d.ts +40 -0
- package/dist/types/platform-components/RecordActionBar.vue.d.ts +20 -0
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +37 -0
- package/dist/types/platform-components/RecordDetailFields.vue.d.ts +23 -0
- package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +37 -0
- package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +25 -0
- package/dist/types/platform-components/RecordExpandedSubtable.vue.d.ts +29 -0
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +39 -0
- package/dist/types/platform-components/RecordExternalChangeNotice.vue.d.ts +20 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +31 -0
- package/dist/types/platform-components/RecordListExplorer.vue.d.ts +42 -0
- package/dist/types/platform-components/RecordMetaSection.vue.d.ts +8 -0
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +74 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +35 -0
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +103 -0
- package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +18 -0
- package/dist/types/platform-components/RecordStatusTag.vue.d.ts +6 -0
- package/dist/types/platform-components/RecordTreeSelector.vue.d.ts +22 -0
- package/dist/types/platform-components/RecycleBinModeButton.vue.d.ts +16 -0
- package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +44 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +57 -0
- package/dist/types/platform-components/UserSessionExpandedSubtable.vue.d.ts +26 -0
- package/dist/types/platform-components/actionConfirmation.d.ts +3 -0
- package/dist/types/platform-components/crudRecordListModel.d.ts +10 -0
- package/dist/types/platform-components/drawerPromotion.d.ts +4 -0
- package/dist/types/platform-components/index.d.ts +76 -0
- package/dist/types/platform-components/optionFieldOptions.d.ts +10 -0
- package/dist/types/platform-components/pageLayoutContext.d.ts +6 -0
- package/dist/types/platform-components/platformActionResultFeedback.d.ts +12 -0
- package/dist/types/platform-components/platformActionResultReactions.d.ts +53 -0
- package/dist/types/platform-components/platformDateTime.d.ts +16 -0
- package/dist/types/platform-components/platformErrorFeedback.d.ts +15 -0
- package/dist/types/platform-components/platformTimeZoneContext.d.ts +3 -0
- package/dist/types/platform-components/recordActionBarModel.d.ts +27 -0
- package/dist/types/platform-components/recordDetailFieldModel.d.ts +7 -0
- package/dist/types/platform-components/recordDraftNormalizer.d.ts +1 -0
- package/dist/types/platform-components/recordEditorSessionState.d.ts +38 -0
- package/dist/types/platform-components/recordExplorerItemModel.d.ts +8 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +57 -0
- package/dist/types/platform-components/recordPickerConstraints.d.ts +20 -0
- package/dist/types/platform-components/recordPickerModel.d.ts +2 -0
- package/dist/types/platform-components/recycleBinState.d.ts +39 -0
- package/dist/types/platform-components/scopedResourceTreeModuleContext.d.ts +6 -0
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +10 -0
- package/dist/types/platform-components/softDeletedConflictHandler.d.ts +75 -0
- package/dist/types/platform-components/staticCrudManagementState.d.ts +66 -0
- package/dist/types/platform-components/staticFormActionFlow.d.ts +39 -0
- package/dist/types/platform-components/staticTreeResourceModuleContext.d.ts +7 -0
- package/dist/types/platform-components/treeRecordModel.d.ts +17 -0
- package/dist/types/platform-components/useRecycleBinExplorerMode.d.ts +26 -0
- package/dist/types/platform-components/userSessionPresentation.d.ts +12 -0
- package/dist/types/platform-workbench/Workbench.vue.d.ts +46 -0
- package/dist/types/platform-workbench/WorkbenchMenu.vue.d.ts +23 -0
- package/dist/types/platform-workbench/WorkbenchMenuTree.vue.d.ts +13 -0
- package/dist/types/platform-workbench/WorkbenchOutlet.vue.d.ts +7 -0
- package/dist/types/platform-workbench/hosts/BusinessRouteHost.vue.d.ts +7 -0
- package/dist/types/platform-workbench/hosts/ExternalPageHost.vue.d.ts +7 -0
- package/dist/types/platform-workbench/hosts/PlatformRouteHost.vue.d.ts +7 -0
- package/dist/types/platform-workbench/index.d.ts +11 -0
- package/dist/types/platform-workbench/menuNavigation.d.ts +28 -0
- package/dist/types/platform-workbench/menuTreeModel.d.ts +20 -0
- package/dist/types/platform-workbench/pageHostRegistry.d.ts +3 -0
- package/dist/types/platform-workbench/realtimeStatus.d.ts +7 -0
- package/dist/types/platform-workbench/workbenchNavigation.d.ts +12 -0
- package/dist/types/views/ApplicationManagementView.vue.d.ts +3 -0
- package/dist/types/views/DepartmentManagementView.vue.d.ts +3 -0
- package/dist/types/views/DictionaryManagementView.vue.d.ts +3 -0
- package/dist/types/views/EmployeeDetailContent.vue.d.ts +64 -0
- package/dist/types/views/EmployeeDetailWorkspaceView.vue.d.ts +6 -0
- package/dist/types/views/EmployeeEmploymentDrawer.vue.d.ts +14 -0
- package/dist/types/views/EmployeeEmploymentTable.vue.d.ts +18 -0
- package/dist/types/views/EmployeeManagementView.vue.d.ts +7 -0
- package/dist/types/views/FieldSpecManagementView.vue.d.ts +3 -0
- package/dist/types/views/FieldUiControlManagementView.vue.d.ts +3 -0
- package/dist/types/views/HomeView.vue.d.ts +3 -0
- package/dist/types/views/MenuManagementView.vue.d.ts +3 -0
- package/dist/types/views/MetadataOrchestrationView.vue.d.ts +8 -0
- package/dist/types/views/ModuleActionManagementView.vue.d.ts +9 -0
- package/dist/types/views/ModuleManagementView.vue.d.ts +3 -0
- package/dist/types/views/ModuleOpenApiView.vue.d.ts +10 -0
- package/dist/types/views/OpenApiCatalogView.vue.d.ts +9 -0
- package/dist/types/views/OrganizationManagementView.vue.d.ts +3 -0
- package/dist/types/views/PasswordManagementView.vue.d.ts +3 -0
- package/dist/types/views/PositionManagementView.vue.d.ts +3 -0
- package/dist/types/views/RoleAccountGrantDrawer.vue.d.ts +16 -0
- package/dist/types/views/RoleAuthorizationView.vue.d.ts +12 -0
- package/dist/types/views/RoleDetailWorkspaceView.vue.d.ts +9 -0
- package/dist/types/views/RoleEmploymentGrantDrawer.vue.d.ts +16 -0
- package/dist/types/views/RoleGroupMemberSelector.vue.d.ts +18 -0
- package/dist/types/views/RoleManagementView.vue.d.ts +9 -0
- package/dist/types/views/SystemUserDetailWorkspaceView.vue.d.ts +7 -0
- package/dist/types/views/SystemUserManagementView.vue.d.ts +7 -0
- package/dist/types/views/TenantManagementView.vue.d.ts +3 -0
- package/dist/types/views/UserDetailContent.vue.d.ts +32 -0
- package/dist/types/views/UserDetailWorkspaceView.vue.d.ts +7 -0
- package/dist/types/views/UserManagementView.vue.d.ts +8 -0
- package/dist/types/views/applicationManagementState.d.ts +64 -0
- package/dist/types/views/departmentManagementState.d.ts +137 -0
- package/dist/types/views/dictionaryManagementState.d.ts +215 -0
- package/dist/types/views/employeeDetailStateModel.d.ts +39 -0
- package/dist/types/views/employeeDetailWorkspaceSession.d.ts +16 -0
- package/dist/types/views/employeeDetailWorkspaceView.d.ts +4 -0
- package/dist/types/views/fieldSpecManagementState.d.ts +80 -0
- package/dist/types/views/fieldUiControlManagementState.d.ts +76 -0
- package/dist/types/views/menuManagementState.d.ts +178 -0
- package/dist/types/views/metadataOrchestrationState.d.ts +278 -0
- package/dist/types/views/metadataOrchestrationWorkspaceView.d.ts +6 -0
- package/dist/types/views/moduleActionManagementWorkspaceView.d.ts +7 -0
- package/dist/types/views/moduleManagementState.d.ts +76 -0
- package/dist/types/views/organizationManagementState.d.ts +64 -0
- package/dist/types/views/positionManagementState.d.ts +218 -0
- package/dist/types/views/roleAuthorizationWorkspaceSession.d.ts +17 -0
- package/dist/types/views/roleAuthorizationWorkspaceView.d.ts +5 -0
- package/dist/types/views/roleDetailWorkspaceSession.d.ts +19 -0
- package/dist/types/views/roleDetailWorkspaceView.d.ts +8 -0
- package/dist/types/views/roleGrantClient.d.ts +59 -0
- package/dist/types/views/systemUserDetailWorkspaceSession.d.ts +12 -0
- package/dist/types/views/systemUserDetailWorkspaceView.d.ts +5 -0
- package/dist/types/views/tenantManagementState.d.ts +64 -0
- package/dist/types/views/useEmployeeEmploymentRows.d.ts +20 -0
- package/dist/types/views/useUserSessionRows.d.ts +28 -0
- package/dist/types/views/userDetailStateModel.d.ts +11 -0
- package/dist/types/views/userDetailWorkspaceSession.d.ts +14 -0
- package/dist/types/views/userDetailWorkspaceView.d.ts +4 -0
- package/dist/types/vue-ui-antdv/components/ActionBar.vue.d.ts +11 -0
- package/dist/types/vue-ui-antdv/components/DictionarySelect.vue.d.ts +14 -0
- package/dist/types/vue-ui-antdv/components/ReferenceSelect.vue.d.ts +16 -0
- package/dist/types/vue-ui-antdv/components/UiActionButton.vue.d.ts +37 -0
- package/dist/types/vue-ui-antdv/components/UiBadge.vue.d.ts +20 -0
- package/dist/types/vue-ui-antdv/components/UiButton.vue.d.ts +41 -0
- package/dist/types/vue-ui-antdv/components/UiCheckbox.vue.d.ts +30 -0
- package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +71 -0
- package/dist/types/vue-ui-antdv/components/UiDropdown.vue.d.ts +29 -0
- package/dist/types/vue-ui-antdv/components/UiEmpty.vue.d.ts +6 -0
- package/dist/types/vue-ui-antdv/components/UiError.vue.d.ts +7 -0
- package/dist/types/vue-ui-antdv/components/UiForm.vue.d.ts +15 -0
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +7 -0
- package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +25 -0
- package/dist/types/vue-ui-antdv/components/UiMenu.vue.d.ts +19 -0
- package/dist/types/vue-ui-antdv/components/UiModal.vue.d.ts +36 -0
- package/dist/types/vue-ui-antdv/components/UiRecordExplorerItem.vue.d.ts +26 -0
- package/dist/types/vue-ui-antdv/components/UiSearchInput.vue.d.ts +22 -0
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +30 -0
- package/dist/types/vue-ui-antdv/components/UiSidePanel.vue.d.ts +28 -0
- package/dist/types/vue-ui-antdv/components/UiSidePanelHost.vue.d.ts +13 -0
- package/dist/types/vue-ui-antdv/components/UiSpin.vue.d.ts +22 -0
- package/dist/types/vue-ui-antdv/components/UiSwitch.vue.d.ts +22 -0
- package/dist/types/vue-ui-antdv/components/UiTable.vue.d.ts +13 -0
- package/dist/types/vue-ui-antdv/components/UiTabs.vue.d.ts +14 -0
- package/dist/types/vue-ui-antdv/components/UiTextArea.vue.d.ts +20 -0
- package/dist/types/vue-ui-antdv/components/UiTooltip.vue.d.ts +19 -0
- package/dist/types/vue-ui-antdv/components/UiTree.vue.d.ts +17 -0
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +30 -0
- package/dist/types/vue-ui-antdv/components/sidePanelHost.d.ts +3 -0
- package/dist/types/vue-ui-antdv/confirm.d.ts +5 -0
- package/dist/types/vue-ui-antdv/dataTableModel.d.ts +10 -0
- package/dist/types/vue-ui-antdv/dictionaries.d.ts +2 -0
- package/dist/types/vue-ui-antdv/feedback.d.ts +10 -0
- package/dist/types/vue-ui-antdv/index.d.ts +36 -0
- package/dist/types/vue-ui-antdv/references.d.ts +8 -0
- package/dist/types/vue-ui-antdv/registry.d.ts +3 -0
- package/dist/types/vue-ui-antdv/types.d.ts +65 -0
- package/dist/types/web-contracts/index.d.ts +862 -0
- package/dist/types/web-core/actionResult.d.ts +28 -0
- package/dist/types/web-core/clients.d.ts +23 -0
- package/dist/types/web-core/dataChanges.d.ts +15 -0
- package/dist/types/web-core/errors.d.ts +65 -0
- package/dist/types/web-core/http.d.ts +21 -0
- package/dist/types/web-core/index.d.ts +8 -0
- package/dist/types/web-core/mock.d.ts +6 -0
- package/dist/types/web-core/module/abilities.d.ts +21 -0
- package/dist/types/web-core/module/abilityCodes.d.ts +18 -0
- package/dist/types/web-core/module/index.d.ts +6 -0
- package/dist/types/web-core/module/moduleContext.d.ts +49 -0
- package/dist/types/web-core/module/recycleBin.d.ts +6 -0
- package/dist/types/web-core/module/runtimeContext.d.ts +65 -0
- package/dist/types/web-core/module/staticModuleClient.d.ts +45 -0
- package/dist/types/web-core/query.d.ts +16 -0
- package/dist/types/web-core/realtime.d.ts +104 -0
- package/dist/useUserSessionRows-CLM0ZvAF.js +128 -0
- package/dist/workspaceViewSessions-WsJU3OS7.js +1578 -0
- package/package.json +27 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
open?: boolean;
|
|
3
|
+
currentPassword: string;
|
|
4
|
+
newPassword: string;
|
|
5
|
+
confirmPassword: string;
|
|
6
|
+
saving?: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
close: () => any;
|
|
11
|
+
submit: () => any;
|
|
12
|
+
"update:currentPassword": (value: string) => any;
|
|
13
|
+
"update:newPassword": (value: string) => any;
|
|
14
|
+
"update:confirmPassword": (value: string) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onClose?: (() => any) | undefined;
|
|
17
|
+
onSubmit?: (() => any) | undefined;
|
|
18
|
+
"onUpdate:currentPassword"?: ((value: string) => any) | undefined;
|
|
19
|
+
"onUpdate:newPassword"?: ((value: string) => any) | undefined;
|
|
20
|
+
"onUpdate:confirmPassword"?: ((value: string) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
open: boolean;
|
|
23
|
+
error: string;
|
|
24
|
+
saving: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AuthClient } from '@muyun/web-core';
|
|
2
|
+
import type { LoginResult } from '@muyun/web-contracts';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
authClient: AuthClient;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
authenticated: (result: LoginResult) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onAuthenticated?: ((result: LoginResult) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function loadDevWorkbenchStartupState(): Promise<import("../web-contracts").WorkbenchStartupState>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface LoginTenantDefaults {
|
|
2
|
+
tenantId: string;
|
|
3
|
+
tenantLocked: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function resolveLoginTenantDefaults(envTenantId?: string | null, search?: string, pathname?: string): LoginTenantDefaults;
|
|
6
|
+
export declare function normalizeInitialValue(value: string | null | undefined): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PlatformErrorCode } from '@muyun/web-core';
|
|
2
|
+
/**
|
|
3
|
+
* Application-facing message boundary. The current platform only ships a zh-CN
|
|
4
|
+
* default dictionary; future locale packs resolve the same stable error code here.
|
|
5
|
+
*/
|
|
6
|
+
export declare function platformMessage(code: PlatformErrorCode, fallback: string, locale?: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const router: import("vue-router")._RouterClassic;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { MenuClient, SessionClient } from '@muyun/web-core';
|
|
2
|
+
import type { MenuNavigationTarget, MenuRecord, MenuTab, PageDescriptor, WorkbenchStartupState } from '@muyun/web-contracts';
|
|
3
|
+
import { type PageDescriptorResolveOptions } from '@muyun/platform-workbench';
|
|
4
|
+
export interface WorkbenchStartupClients {
|
|
5
|
+
sessionClient: SessionClient;
|
|
6
|
+
menuClient: MenuClient;
|
|
7
|
+
}
|
|
8
|
+
export declare function loadWorkbenchStartupState(clients: WorkbenchStartupClients, options?: PageDescriptorResolveOptions): Promise<WorkbenchStartupState>;
|
|
9
|
+
export declare function openMenuTab(tabs: MenuTab[], menu: MenuRecord, target: MenuNavigationTarget, options?: PageDescriptorResolveOptions): {
|
|
10
|
+
tabs: MenuTab[];
|
|
11
|
+
activeTabKey: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function openDirectTab(tabs: MenuTab[], descriptor: PageDescriptor): {
|
|
14
|
+
tabs: MenuTab[];
|
|
15
|
+
activeTabKey: string;
|
|
16
|
+
created: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function menuTargetUrl(menu: MenuRecord, target: MenuNavigationTarget): string;
|
|
19
|
+
export declare function activeTabUrlOf(state: WorkbenchStartupState): string | undefined;
|
|
20
|
+
export declare function restoreWorkbenchStartupStateFromUrl(state: WorkbenchStartupState, url: string, options?: PageDescriptorResolveOptions): WorkbenchStartupState;
|
|
21
|
+
export declare function closeMenuTab(tabs: MenuTab[], activeTabKey: string | undefined, closedTabKey: string): {
|
|
22
|
+
tabs: MenuTab[];
|
|
23
|
+
activeTabKey: string | undefined;
|
|
24
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PageDescriptor } from '@muyun/web-contracts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
descriptor?: PageDescriptor;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public App-consumer surface. It deliberately exposes the workbench shell
|
|
3
|
+
* and its runtime primitives, including first-party platform administration
|
|
4
|
+
* pages. It deliberately excludes pages owned by a consuming business App.
|
|
5
|
+
*
|
|
6
|
+
* Consumers must import `@ximatai/muyun-web-app/style.css` explicitly.
|
|
7
|
+
*/
|
|
8
|
+
import '../styles.css';
|
|
9
|
+
export * from '../web-contracts/index';
|
|
10
|
+
export * from '../web-core/index';
|
|
11
|
+
export * from '../platform-components/index';
|
|
12
|
+
export * from '../dynamic-page-runtime/index';
|
|
13
|
+
export * from '../platform-workbench/index';
|
|
14
|
+
export * from '../platform-admin-runtime/index';
|
|
15
|
+
export { default as PlatformAdminOutlet } from './PlatformAdminOutlet.vue';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DynamicModulePageDescriptor } from '@muyun/web-contracts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
descriptor: DynamicModulePageDescriptor;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DynamicPageDescriptor } from '@muyun/web-contracts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
descriptor: DynamicPageDescriptor;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ActionContract } from '@muyun/web-contracts';
|
|
2
|
+
export type DynamicLegacyActionRefresh = 'none' | 'record' | 'list' | 'all';
|
|
3
|
+
export interface DynamicActionReaction {
|
|
4
|
+
type: 'refresh-list' | 'refresh-detail';
|
|
5
|
+
payload?: {
|
|
6
|
+
moduleAlias?: string;
|
|
7
|
+
recordId?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface DynamicLegacyRefreshActionContract extends ActionContract {
|
|
11
|
+
refresh?: DynamicLegacyActionRefresh;
|
|
12
|
+
}
|
|
13
|
+
export declare function resolveDynamicActionReactions(action: ActionContract, context: {
|
|
14
|
+
moduleAlias: string;
|
|
15
|
+
recordId?: string;
|
|
16
|
+
}): DynamicActionReaction[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BusinessRoutePageDescriptor } from '@muyun/web-contracts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
descriptor: BusinessRoutePageDescriptor;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type DrawerPromotion } from '@muyun/platform-components';
|
|
2
|
+
import type { WorkspaceDrawerProfile } from './workspaceViewContract';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
profile?: WorkspaceDrawerProfile;
|
|
8
|
+
promotion?: DrawerPromotion;
|
|
9
|
+
};
|
|
10
|
+
declare var __VLS_11: {}, __VLS_13: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
operation?: (props: typeof __VLS_11) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_13) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
close: () => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onClose?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
subtitle: string;
|
|
22
|
+
profile: WorkspaceDrawerProfile;
|
|
23
|
+
promotion: DrawerPromotion;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BusinessRoutePageDescriptor } from '@muyun/web-contracts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
descriptor: BusinessRoutePageDescriptor;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function effectiveAuthToken(envToken?: string): string | undefined;
|
|
2
|
+
export declare function storedAuthToken(): string | undefined;
|
|
3
|
+
export declare function storedAuthSessionId(): string | undefined;
|
|
4
|
+
export declare function saveAuthToken(token: string): void;
|
|
5
|
+
export declare function saveAuthSessionId(sessionId?: string | null): void;
|
|
6
|
+
export declare function clearAuthToken(): void;
|
|
7
|
+
export declare function isAuthenticationRequiredError(cause: unknown): boolean;
|
|
8
|
+
export declare function isPasswordChangeRequiredError(cause: unknown): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { CurrentUser } from '@muyun/web-contracts';
|
|
3
|
+
export declare function provideCurrentUserContext(currentUser: Readonly<Ref<CurrentUser | undefined>>): void;
|
|
4
|
+
export declare function useCurrentUserContext(): Readonly<Ref<CurrentUser | undefined, CurrentUser | undefined>> | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* First-party management runtime shipped to management-oriented applications.
|
|
3
|
+
*
|
|
4
|
+
* It owns the platform administration route registry and the context APIs
|
|
5
|
+
* required by those pages. Application composition remains outside this
|
|
6
|
+
* directory: an App supplies its startup state, navigation and HTTP factory.
|
|
7
|
+
*/
|
|
8
|
+
export { default as PlatformAdminRouteOutlet } from './PlatformAdminOutlet.vue';
|
|
9
|
+
export { isPlatformAdminRoutePage, platformAdminModuleRoutes, platformAdminRouteLayouts, platformAdminRoutePrefixes, platformAdminRoutes, resolvePlatformAdminRoute, } from './platformAdminRoutes';
|
|
10
|
+
export type { PlatformAdminRoute } from './platformAdminRoutes';
|
|
11
|
+
export { provideCurrentUserContext, useCurrentUserContext } from './currentUserContext';
|
|
12
|
+
export { createBackendHttpClient } from './backendHttp';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { HttpClient } from '@muyun/web-core';
|
|
2
|
+
import type { PageDescriptor } from '@muyun/web-contracts';
|
|
3
|
+
export interface ModuleOpenApiDocument {
|
|
4
|
+
openapi: string;
|
|
5
|
+
info: {
|
|
6
|
+
title?: string;
|
|
7
|
+
version?: string;
|
|
8
|
+
};
|
|
9
|
+
paths: Record<string, unknown>;
|
|
10
|
+
components?: Record<string, unknown>;
|
|
11
|
+
'x-muyun-module-alias'?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Returns the module alias only for the dedicated, authenticated OpenAPI viewer path. */
|
|
14
|
+
export declare function moduleAliasFromOpenApiPath(pathname: string): string | undefined;
|
|
15
|
+
/** Creates the workbench page contract for one module's authenticated API document. */
|
|
16
|
+
export declare function createModuleOpenApiPageDescriptor(moduleAlias: string, moduleTitle?: string): PageDescriptor;
|
|
17
|
+
/** Recognizes the app-owned OpenAPI tab without teaching the shared route resolver about this feature. */
|
|
18
|
+
export declare function isModuleOpenApiPage(descriptor?: PageDescriptor): boolean;
|
|
19
|
+
export declare function isOpenApiCatalogPath(pathname: string): boolean;
|
|
20
|
+
export interface OpenApiModuleCatalogItem {
|
|
21
|
+
moduleAlias: string;
|
|
22
|
+
title: string;
|
|
23
|
+
moduleKind: 'static' | 'dynamic';
|
|
24
|
+
documentPath: string;
|
|
25
|
+
}
|
|
26
|
+
/** Loads the source-independent API document through the normal authenticated backend client. */
|
|
27
|
+
export declare function loadModuleOpenApi(client: HttpClient, moduleAlias: string): Promise<ModuleOpenApiDocument>;
|
|
28
|
+
export declare function loadOpenApiCatalog(client: HttpClient): Promise<OpenApiModuleCatalogItem[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Supplies the workbench session only to this application's frontend or configured backend origin.
|
|
31
|
+
* Scalar may render user-selectable servers, so forwarding the token to an arbitrary server would
|
|
32
|
+
* turn a documentation convenience into a credential leak.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createOpenApiAuthenticatedFetch(): typeof fetch;
|
|
35
|
+
/** Resolves the backend server used by the workbench's interactive API client. */
|
|
36
|
+
export declare function openApiBackendBaseUrl(): any;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type WebBusinessRealtimeEvent, type WebCommittedChangeSet, type WebDataChange } from '@muyun/web-contracts';
|
|
2
|
+
export interface PageRealtimeSubscription {
|
|
3
|
+
unsubscribe(): void;
|
|
4
|
+
}
|
|
5
|
+
export interface PageBusinessEventOptions {
|
|
6
|
+
type?: string | string[];
|
|
7
|
+
moduleAlias?: string;
|
|
8
|
+
recordId?: string | (() => string | undefined);
|
|
9
|
+
handler: (event: WebBusinessRealtimeEvent) => void | Promise<void>;
|
|
10
|
+
predicate?: (event: WebBusinessRealtimeEvent) => boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface PageDataChangeOptions {
|
|
13
|
+
moduleAlias?: string;
|
|
14
|
+
recordId?: string | (() => string | undefined);
|
|
15
|
+
handler: (changeSet: WebCommittedChangeSet, changes: WebDataChange[]) => void | Promise<void>;
|
|
16
|
+
predicate?: (change: WebDataChange) => boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface PageRecordExternalChangeOptions {
|
|
19
|
+
moduleAlias: string;
|
|
20
|
+
recordId: string | (() => string | undefined);
|
|
21
|
+
editing: boolean | (() => boolean);
|
|
22
|
+
saving?: boolean | (() => boolean);
|
|
23
|
+
changeTypes?: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface PageRecordExternalChangeState {
|
|
26
|
+
externalChangedRecordId: Readonly<{
|
|
27
|
+
value: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
externallyChanged: Readonly<{
|
|
30
|
+
value: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
markExternalRecordChanged(recordId: string | undefined): boolean;
|
|
33
|
+
clearExternalChanged(): void;
|
|
34
|
+
handleDataChanges(changes: WebDataChange[]): void;
|
|
35
|
+
}
|
|
36
|
+
export interface RealtimeRefreshQueueOptions<TKey extends string> {
|
|
37
|
+
delay?: number;
|
|
38
|
+
load: (run: RealtimeRefreshRun<TKey>) => void | Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
export interface RealtimeRefreshRun<TKey extends string> {
|
|
41
|
+
keys: TKey[];
|
|
42
|
+
isLatest(key: TKey): boolean;
|
|
43
|
+
active(): boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface RealtimeRefreshQueue<TKey extends string> {
|
|
46
|
+
enqueue(key: TKey | TKey[] | undefined): void;
|
|
47
|
+
reset(): void;
|
|
48
|
+
dispose(): void;
|
|
49
|
+
}
|
|
50
|
+
export declare function createPageBusinessEventHandler(options: PageBusinessEventOptions): (event: WebBusinessRealtimeEvent) => void;
|
|
51
|
+
export declare function createPageDataChangeHandler(options: PageDataChangeOptions): (changeSet: WebCommittedChangeSet) => void;
|
|
52
|
+
export declare function usePageDataChangeHandler(handler: (changeSet: WebCommittedChangeSet) => void | Promise<void>): void;
|
|
53
|
+
export declare function usePageModuleDataChanges(moduleAlias: string): void;
|
|
54
|
+
export declare function usePageBusinessEventHandler(handler: (event: WebBusinessRealtimeEvent) => void | Promise<void>): void;
|
|
55
|
+
export declare function usePageBusinessEvent(options: PageBusinessEventOptions): void;
|
|
56
|
+
export declare function usePageDataChange(options: PageDataChangeOptions): void;
|
|
57
|
+
export declare function usePageRecordExternalChange(options: PageRecordExternalChangeOptions): PageRecordExternalChangeState;
|
|
58
|
+
export declare function createPageRecordExternalChangeState(options: PageRecordExternalChangeOptions): PageRecordExternalChangeState;
|
|
59
|
+
export declare function useRealtimeRefreshQueue<TKey extends string>(options: RealtimeRefreshQueueOptions<TKey>): RealtimeRefreshQueue<TKey>;
|
|
60
|
+
export declare function createRealtimeRefreshQueue<TKey extends string>(options: RealtimeRefreshQueueOptions<TKey>): RealtimeRefreshQueue<TKey>;
|
|
61
|
+
export declare function usePageRealtimeSubscription(factory: () => PageRealtimeSubscription): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { BusinessRoutePageDescriptor, PageDescriptor, PageLayoutMode } from '@muyun/web-contracts';
|
|
3
|
+
export interface PlatformAdminRoute {
|
|
4
|
+
route: string;
|
|
5
|
+
moduleAlias: string;
|
|
6
|
+
component: Component;
|
|
7
|
+
/** Page layout contract resolved before the route enters the workbench. */
|
|
8
|
+
layout: PageLayoutMode;
|
|
9
|
+
/** Internal pages share a module context but must not replace that module's menu route. */
|
|
10
|
+
menuEntry?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const platformAdminRoutes: PlatformAdminRoute[];
|
|
13
|
+
export declare const platformAdminRoutePrefixes: string[];
|
|
14
|
+
export declare const platformAdminModuleRoutes: {
|
|
15
|
+
[k: string]: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const platformAdminRouteLayouts: {
|
|
18
|
+
[k: string]: PageLayoutMode;
|
|
19
|
+
};
|
|
20
|
+
export declare function resolvePlatformAdminRoute(descriptor?: BusinessRoutePageDescriptor): PlatformAdminRoute | undefined;
|
|
21
|
+
export declare function isPlatformAdminRoutePage(descriptor?: PageDescriptor): descriptor is BusinessRoutePageDescriptor;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type RealtimeClient, type RealtimeConnectionState } from '@muyun/web-core';
|
|
2
|
+
import type { WebBusinessRealtimeEvent, WebCommittedChangeSet, WebUserNotification } from '@muyun/web-contracts';
|
|
3
|
+
export declare const appDataChangeDispatcher: import("@muyun/web-core").DataChangeDispatcher;
|
|
4
|
+
export interface AppRealtimeOptions {
|
|
5
|
+
onUnauthorized?: () => void;
|
|
6
|
+
onUserNotification?: (notification: WebUserNotification) => void;
|
|
7
|
+
onStateChange?: (state: RealtimeConnectionState) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function createAppRealtimeClient(options?: AppRealtimeOptions): RealtimeClient;
|
|
10
|
+
export declare function connectAppRealtime(options?: AppRealtimeOptions): {
|
|
11
|
+
realtime: RealtimeClient;
|
|
12
|
+
disconnect(): Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
export declare function subscribeAppModuleDataChanges(moduleAlias: string): {
|
|
15
|
+
unsubscribe(): void;
|
|
16
|
+
};
|
|
17
|
+
export declare function subscribeAppDataChanges(handler: (changeSet: WebCommittedChangeSet) => void | Promise<void>): import("@muyun/web-core").DataChangeSubscription;
|
|
18
|
+
export declare function subscribeAppBusinessEvents(handler: (event: WebBusinessRealtimeEvent) => void | Promise<void>): {
|
|
19
|
+
unsubscribe(): void;
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { DrawerPromotion } from '@muyun/platform-components';
|
|
3
|
+
import { type WorkspaceViewDefinition, type WorkspaceViewInput } from './workspaceViews';
|
|
4
|
+
/** Facts required by the source host; dirty state belongs to the shared view session. */
|
|
5
|
+
export interface WorkspaceViewPromotionEligibility {
|
|
6
|
+
hasStableIdentity: boolean;
|
|
7
|
+
busy?: boolean;
|
|
8
|
+
/** A legacy host may decline until its detail state has moved into a view session. */
|
|
9
|
+
canChangeHost?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function canPromoteWorkspaceView(eligibility: WorkspaceViewPromotionEligibility): boolean;
|
|
12
|
+
export declare function useWorkspaceViewPromotion<TInput extends WorkspaceViewInput>(options: {
|
|
13
|
+
view: WorkspaceViewDefinition<TInput>;
|
|
14
|
+
input: MaybeRefOrGetter<TInput | undefined>;
|
|
15
|
+
/** A source host can provide its resolved business identity for the new tab label. */
|
|
16
|
+
title?: MaybeRefOrGetter<string | undefined>;
|
|
17
|
+
eligibility: MaybeRefOrGetter<WorkspaceViewPromotionEligibility>;
|
|
18
|
+
/** Transfers source state before the target opens; return false when an existing target rejects it. */
|
|
19
|
+
beforePromote?: (input: TInput) => boolean | void | Promise<boolean | void>;
|
|
20
|
+
onPromoted?: (result: {
|
|
21
|
+
created: boolean;
|
|
22
|
+
}) => void;
|
|
23
|
+
onPromotionRejected?: () => void;
|
|
24
|
+
}): import("vue").ComputedRef<DrawerPromotion | undefined>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { PageLayoutMode, RouteQueryValue } from '@muyun/web-contracts';
|
|
3
|
+
export type WorkspaceViewInput = object;
|
|
4
|
+
export type WorkspaceViewPresentation = 'drawer' | 'tab';
|
|
5
|
+
/**
|
|
6
|
+
* Semantic drawer capacities owned by the workbench, rather than by a
|
|
7
|
+
* particular business page. A work view declares the amount of workspace it
|
|
8
|
+
* needs; the host decides the actual pixel value and narrow-screen fallback.
|
|
9
|
+
*/
|
|
10
|
+
export type WorkspaceDrawerProfile = 'detail' | 'wide-work';
|
|
11
|
+
/** Stable declaration shared by all workbench view hosts. */
|
|
12
|
+
export interface WorkspaceViewDefinition<TInput extends WorkspaceViewInput> {
|
|
13
|
+
type: string;
|
|
14
|
+
route: string;
|
|
15
|
+
moduleAlias: string;
|
|
16
|
+
component: Component;
|
|
17
|
+
/** Vertical layout contract used when the work view is opened in a tab. */
|
|
18
|
+
layout?: PageLayoutMode;
|
|
19
|
+
/** Drawer capacity used when this view is opened as a drawer. */
|
|
20
|
+
drawerProfile?: WorkspaceDrawerProfile;
|
|
21
|
+
/** Title restored when a URL-addressable drawer returns to its ordinary route. */
|
|
22
|
+
routeTitle?: string;
|
|
23
|
+
titleOf(input: TInput): string;
|
|
24
|
+
/**
|
|
25
|
+
* Route context that remains after a drawer is closed.
|
|
26
|
+
*
|
|
27
|
+
* A work view may need parent-page context (for example a role ownership
|
|
28
|
+
* scope) both to identify the view and to return the user to the same
|
|
29
|
+
* ordinary route. This keeps that context distinct from the transient
|
|
30
|
+
* work-view presentation and record identity.
|
|
31
|
+
*/
|
|
32
|
+
parentRouteQueryOf?(input: TInput): Record<string, RouteQueryValue>;
|
|
33
|
+
parse(query: Record<string, RouteQueryValue>): TInput | undefined;
|
|
34
|
+
presentations: readonly WorkspaceViewPresentation[];
|
|
35
|
+
}
|
|
36
|
+
export declare function defineWorkspaceView<TInput extends WorkspaceViewInput>(definition: WorkspaceViewDefinition<TInput>): WorkspaceViewDefinition<TInput>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WorkspaceViewPresentation } from './workspaceViewContract';
|
|
2
|
+
/** Runtime host facts shared with a view without exposing workbench navigation to business code. */
|
|
3
|
+
export interface WorkspaceViewHost {
|
|
4
|
+
presentation: WorkspaceViewPresentation;
|
|
5
|
+
/** Updates the host tab label without leaking workbench navigation into business views. */
|
|
6
|
+
setTitle(title: string): void;
|
|
7
|
+
dismiss(): void;
|
|
8
|
+
}
|
|
9
|
+
export declare function provideWorkspaceViewHost(host: WorkspaceViewHost): void;
|
|
10
|
+
export declare function useWorkspaceViewHost(): WorkspaceViewHost | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WorkspaceViewDefinition, WorkspaceViewInput } from './workspaceViewContract';
|
|
2
|
+
/** A mounted workspace view may accept a source drawer's in-memory editing state. */
|
|
3
|
+
export type WorkspaceViewHandoffRecipient<TSession> = (session: TSession) => boolean | Promise<boolean>;
|
|
4
|
+
export declare function workspaceViewInstanceKey<TInput extends WorkspaceViewInput>(view: WorkspaceViewDefinition<TInput>, input: TInput): string;
|
|
5
|
+
export declare function getOrCreateWorkspaceViewSession<TInput extends WorkspaceViewInput, TSession>(view: WorkspaceViewDefinition<TInput>, input: TInput, create: () => TSession): TSession;
|
|
6
|
+
export declare function discardWorkspaceViewSession<TInput extends WorkspaceViewInput>(view: WorkspaceViewDefinition<TInput>, input: TInput): void;
|
|
7
|
+
/** Replaces a pending hand-off session before the target host is mounted. */
|
|
8
|
+
export declare function replaceWorkspaceViewSession<TInput extends WorkspaceViewInput, TSession>(view: WorkspaceViewDefinition<TInput>, input: TInput, session: TSession): void;
|
|
9
|
+
/**
|
|
10
|
+
* Delivers a workspace hand-off to an already mounted target when possible;
|
|
11
|
+
* otherwise stores it for the target that is about to mount. A recipient can
|
|
12
|
+
* reject the delivery when it owns conflicting, unsaved state.
|
|
13
|
+
*/
|
|
14
|
+
export declare function handOffWorkspaceViewSession<TInput extends WorkspaceViewInput, TSession>(view: WorkspaceViewDefinition<TInput>, input: TInput, session: TSession): Promise<"accepted" | "rejected">;
|
|
15
|
+
/** Registers the mounted host that can receive a hand-off for one stable workspace identity. */
|
|
16
|
+
export declare function registerWorkspaceViewHandoffRecipient<TInput extends WorkspaceViewInput, TSession>(view: WorkspaceViewDefinition<TInput>, input: TInput, recipient: WorkspaceViewHandoffRecipient<TSession>): () => void;
|
|
17
|
+
/** Consumes a one-time hand-off session; later deep links reload from the URL. */
|
|
18
|
+
export declare function takeWorkspaceViewSession<TInput extends WorkspaceViewInput, TSession>(view: WorkspaceViewDefinition<TInput>, input: TInput): TSession | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BusinessRoutePageDescriptor } from '@muyun/web-contracts';
|
|
2
|
+
import type { WorkspaceViewDefinition, WorkspaceViewInput, WorkspaceViewPresentation } from './workspaceViewContract';
|
|
3
|
+
export { defineWorkspaceView, type WorkspaceViewDefinition, type WorkspaceViewInput, type WorkspaceViewPresentation, } from './workspaceViewContract';
|
|
4
|
+
export interface ResolvedWorkspaceView {
|
|
5
|
+
view: WorkspaceViewDefinition<WorkspaceViewInput>;
|
|
6
|
+
input: WorkspaceViewInput;
|
|
7
|
+
presentation: WorkspaceViewPresentation;
|
|
8
|
+
}
|
|
9
|
+
export interface WorkspaceViewRegistry {
|
|
10
|
+
definitions: readonly WorkspaceViewDefinition<WorkspaceViewInput>[];
|
|
11
|
+
resolve(descriptor: BusinessRoutePageDescriptor): ResolvedWorkspaceView | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare function createWorkspaceViewRegistry(definitions: readonly WorkspaceViewDefinition<WorkspaceViewInput>[]): WorkspaceViewRegistry;
|
|
14
|
+
export declare const workspaceViewRegistry: WorkspaceViewRegistry;
|
|
15
|
+
export declare function createWorkspaceViewDescriptor<TInput extends WorkspaceViewInput>(view: WorkspaceViewDefinition<TInput>, input: TInput, presentation?: WorkspaceViewPresentation, title?: string): BusinessRoutePageDescriptor;
|
|
16
|
+
/** Returns the ordinary route descriptor after a URL-restored drawer is dismissed. */
|
|
17
|
+
export declare function dismissWorkspaceViewDescriptor(descriptor: BusinessRoutePageDescriptor, view: WorkspaceViewDefinition<WorkspaceViewInput>): BusinessRoutePageDescriptor;
|
|
18
|
+
export declare function resolveWorkspaceView(descriptor: BusinessRoutePageDescriptor): ResolvedWorkspaceView | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Option, OptionValue } from '@muyun/web-contracts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
value?: OptionValue | null;
|
|
4
|
+
options: Option[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:value": (value: OptionValue | null) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:value"?: ((value: OptionValue | null) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
value: OptionValue | null;
|
|
15
|
+
placeholder: string;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type UiRecordInlineAction } from '@muyun/vue-ui-antdv';
|
|
2
|
+
import { type ModuleContext } from '@muyun/web-core';
|
|
3
|
+
import type { RecordExplorerItemDescriptor } from './recordExplorerItemModel';
|
|
4
|
+
import { type CrudRecordListBase } from './crudRecordListModel';
|
|
5
|
+
export type CrudRecordListMode = 'normal' | 'recycleBin';
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
context: ModuleContext<CrudRecordListBase>;
|
|
8
|
+
selectedId?: string;
|
|
9
|
+
reloadKey?: number;
|
|
10
|
+
keyword?: string;
|
|
11
|
+
emptyDescription?: string;
|
|
12
|
+
loadingTip?: string;
|
|
13
|
+
fallbackTitle?: string;
|
|
14
|
+
titleOf?: (record: CrudRecordListBase) => string;
|
|
15
|
+
subtitleOf?: (record: CrudRecordListBase) => string | undefined;
|
|
16
|
+
itemOf?: (record: CrudRecordListBase) => RecordExplorerItemDescriptor | undefined;
|
|
17
|
+
actionsOf?: (record: CrudRecordListBase) => UiRecordInlineAction[];
|
|
18
|
+
filterOption?: (record: CrudRecordListBase, normalizedKeyword: string) => boolean;
|
|
19
|
+
tagOf?: (record: CrudRecordListBase) => string | undefined;
|
|
20
|
+
mutedOf?: (record: CrudRecordListBase) => boolean;
|
|
21
|
+
mode?: CrudRecordListMode;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
select: (record: CrudRecordListBase) => any;
|
|
25
|
+
action: (action: UiRecordInlineAction, record: CrudRecordListBase) => any;
|
|
26
|
+
loaded: (records: CrudRecordListBase[]) => any;
|
|
27
|
+
restored: () => any;
|
|
28
|
+
recycleBinSummary: (total: number | undefined) => any;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
onSelect?: ((record: CrudRecordListBase) => any) | undefined;
|
|
31
|
+
onAction?: ((action: UiRecordInlineAction, record: CrudRecordListBase) => any) | undefined;
|
|
32
|
+
onLoaded?: ((records: CrudRecordListBase[]) => any) | undefined;
|
|
33
|
+
onRestored?: (() => any) | undefined;
|
|
34
|
+
onRecycleBinSummary?: ((total: number | undefined) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
mode: CrudRecordListMode;
|
|
37
|
+
filterOption: (record: CrudRecordListBase, normalizedKeyword: string) => boolean;
|
|
38
|
+
emptyDescription: string;
|
|
39
|
+
selectedId: string;
|
|
40
|
+
keyword: string;
|
|
41
|
+
titleOf: (record: CrudRecordListBase) => string;
|
|
42
|
+
itemOf: (record: CrudRecordListBase) => RecordExplorerItemDescriptor | undefined;
|
|
43
|
+
actionsOf: (record: CrudRecordListBase) => UiRecordInlineAction[];
|
|
44
|
+
tagOf: (record: CrudRecordListBase) => string | undefined;
|
|
45
|
+
mutedOf: (record: CrudRecordListBase) => boolean;
|
|
46
|
+
reloadKey: number;
|
|
47
|
+
loadingTip: string;
|
|
48
|
+
fallbackTitle: string;
|
|
49
|
+
subtitleOf: (record: CrudRecordListBase) => string | undefined;
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const _default: typeof __VLS_export;
|
|
52
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type PlatformDateTimePrecision } from './platformDateTime';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
value?: string | number | Date | null;
|
|
4
|
+
emptyText?: string;
|
|
5
|
+
precision?: PlatformDateTimePrecision;
|
|
6
|
+
timeZone?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
value: string | number | Date | null;
|
|
10
|
+
emptyText: string;
|
|
11
|
+
precision: PlatformDateTimePrecision;
|
|
12
|
+
timeZone: string;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|