@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,39 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from 'vue';
|
|
2
|
+
import type { PurgeReport, RecycleBinItem, RestoreReport, WebQueryRequest } from '@muyun/web-contracts';
|
|
3
|
+
import { type ModuleContext } from '@muyun/web-core';
|
|
4
|
+
export interface RecycleBinStateOptions<TRecord> {
|
|
5
|
+
context: MaybeRefOrGetter<ModuleContext<TRecord>>;
|
|
6
|
+
recordTitle?: (record: TRecord) => string;
|
|
7
|
+
/** 外部刷新信号,变化时重新加载列表 */
|
|
8
|
+
reloadKey?: Ref<number>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useRecycleBinState<TRecord>(options: RecycleBinStateOptions<TRecord>): {
|
|
11
|
+
items: Ref<{
|
|
12
|
+
record: import("vue").UnwrapRef<TRecord>;
|
|
13
|
+
sourceDeleteOperationId: string | null;
|
|
14
|
+
deletedAt: string;
|
|
15
|
+
restorable: boolean;
|
|
16
|
+
purgeable: boolean;
|
|
17
|
+
unavailableReason?: string | undefined;
|
|
18
|
+
}[], RecycleBinItem<TRecord>[] | {
|
|
19
|
+
record: import("vue").UnwrapRef<TRecord>;
|
|
20
|
+
sourceDeleteOperationId: string | null;
|
|
21
|
+
deletedAt: string;
|
|
22
|
+
restorable: boolean;
|
|
23
|
+
purgeable: boolean;
|
|
24
|
+
unavailableReason?: string | undefined;
|
|
25
|
+
}[]>;
|
|
26
|
+
loading: Ref<boolean, boolean>;
|
|
27
|
+
acting: Ref<boolean, boolean>;
|
|
28
|
+
actingOperationId: Ref<string | undefined, string | undefined>;
|
|
29
|
+
total: Ref<number, number>;
|
|
30
|
+
summaryTotal: Ref<number | undefined, number | undefined>;
|
|
31
|
+
pageNum: Ref<number, number>;
|
|
32
|
+
pageSize: Ref<number, number>;
|
|
33
|
+
isEmpty: import("vue").ComputedRef<boolean>;
|
|
34
|
+
recordTitleOf: (item: RecycleBinItem<TRecord>) => string;
|
|
35
|
+
load: (request?: WebQueryRequest) => Promise<boolean>;
|
|
36
|
+
refreshSummary: () => Promise<number | undefined>;
|
|
37
|
+
restore: (item: RecycleBinItem<TRecord>, reload?: boolean) => Promise<RestoreReport | undefined>;
|
|
38
|
+
purge: (item: RecycleBinItem<TRecord>, reload?: boolean) => Promise<PurgeReport | undefined>;
|
|
39
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ModuleContext } from '@muyun/web-core';
|
|
2
|
+
export interface ScopedResourceTreeModuleContextOptions {
|
|
3
|
+
resourcePath?: string;
|
|
4
|
+
emptyQueryScopeName?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createScopedResourceTreeModuleContext<TRecord, TContextRecord = unknown>(context: ModuleContext<TContextRecord>, options: ScopedResourceTreeModuleContextOptions): ModuleContext<TRecord>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ModuleContext, StaticModuleTreeClient } from '@muyun/web-core';
|
|
2
|
+
export interface ScopedTreeModuleContextOptions {
|
|
3
|
+
scopeFieldName: string;
|
|
4
|
+
scopeValue: string | undefined;
|
|
5
|
+
treePath: string;
|
|
6
|
+
sortPath?: string;
|
|
7
|
+
treeQueryParam?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function createScopedTreeModuleContext<TRecord>(context: ModuleContext<TRecord>, options: ScopedTreeModuleContextOptions): ModuleContext<TRecord>;
|
|
10
|
+
export declare function createScopedTreeClient<TRecord>(context: ModuleContext<TRecord>, options: ScopedTreeModuleContextOptions): StaticModuleTreeClient<TRecord>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type UiConfirmOptions } from '@muyun/vue-ui-antdv';
|
|
2
|
+
import type { PlatformActionErrorHandler } from './platformErrorFeedback';
|
|
3
|
+
type ConfirmAction = (options: UiConfirmOptions) => Promise<boolean>;
|
|
4
|
+
/**
|
|
5
|
+
* 软删除冲突定位信息,从后端 RESOURCE_SOFT_DELETED_CONFLICT 错误详情中提取。
|
|
6
|
+
*/
|
|
7
|
+
export interface SoftDeletedConflictInfo {
|
|
8
|
+
/** 冲突资源所属模块 alias,如 iam.tenant */
|
|
9
|
+
moduleAlias: string;
|
|
10
|
+
/** 冲突资源记录 ID */
|
|
11
|
+
recordId: string;
|
|
12
|
+
/** 删除时间(ISO 字符串) */
|
|
13
|
+
deletedAt?: string;
|
|
14
|
+
/** 是否可恢复 */
|
|
15
|
+
recoveryAvailable: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 从 AppError 中提取软删除冲突信息。
|
|
19
|
+
* 如果错误不是 RESOURCE_SOFT_DELETED_CONFLICT,返回 undefined。
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractSoftDeletedConflict(cause: unknown): SoftDeletedConflictInfo | undefined;
|
|
22
|
+
export interface SoftDeletedConflictHandlerOptions {
|
|
23
|
+
/** 资源展示名称,用于提示文案,如“租户”、“组织” */
|
|
24
|
+
resourceLabel?: string;
|
|
25
|
+
/** 用户点击“去回收站恢复”时的回调 */
|
|
26
|
+
onNavigateToRecycleBin?: (info: SoftDeletedConflictInfo) => void;
|
|
27
|
+
/** 确认弹窗实现,默认使用平台 confirmAction,测试时可注入 fake */
|
|
28
|
+
confirmAction?: ConfirmAction;
|
|
29
|
+
}
|
|
30
|
+
export interface SoftDeletedConflictHandler {
|
|
31
|
+
/**
|
|
32
|
+
* 尝试处理错误。如果是软删除冲突,弹出引导弹窗并返回 true;否则返回 false。
|
|
33
|
+
*/
|
|
34
|
+
handle: (cause: unknown) => Promise<boolean>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 创建适用于 StaticCrudManagementState.actionErrorHandlers 的软删除冲突处理器。
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const state = useFlatCrudManagementState({
|
|
42
|
+
* // ...
|
|
43
|
+
* actionErrorHandlers: [
|
|
44
|
+
* createSoftDeletedConflictErrorHandler({
|
|
45
|
+
* resourceLabel: '租户',
|
|
46
|
+
* onNavigateToRecycleBin: () => switchToRecycleBin(),
|
|
47
|
+
* }),
|
|
48
|
+
* ],
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function createSoftDeletedConflictErrorHandler<TContext>(options?: SoftDeletedConflictHandlerOptions): PlatformActionErrorHandler<TContext>;
|
|
53
|
+
/**
|
|
54
|
+
* 平台级软删除冲突处理器。
|
|
55
|
+
*
|
|
56
|
+
* 当新建记录因唯一键与回收站中已删除记录冲突时,
|
|
57
|
+
* 弹出说明弹窗并引导用户前往回收站恢复。
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const conflictHandler = useSoftDeletedConflictHandler({
|
|
62
|
+
* resourceLabel: '租户',
|
|
63
|
+
* onNavigateToRecycleBin: () => switchToRecycleBin(),
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* try {
|
|
67
|
+
* await crud.insert(formValues);
|
|
68
|
+
* } catch (cause) {
|
|
69
|
+
* if (await conflictHandler.handle(cause)) return;
|
|
70
|
+
* presentPlatformError(cause, { source: 'tenant-create', phase: 'action' });
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function useSoftDeletedConflictHandler(options?: SoftDeletedConflictHandlerOptions): SoftDeletedConflictHandler;
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type ModuleContext } from '@muyun/web-core';
|
|
2
|
+
import type { UiConfirmOptions } from '@muyun/vue-ui-antdv';
|
|
3
|
+
import { type PlatformActionResultReactionHandler } from './platformActionResultFeedback';
|
|
4
|
+
import { type PlatformActionErrorHandler } from './platformErrorFeedback';
|
|
5
|
+
export type StaticCrudCardMode = 'view' | 'edit' | 'create';
|
|
6
|
+
export type StaticCrudActionCode = 'create' | 'update' | 'delete' | 'enable' | 'disable';
|
|
7
|
+
export interface StaticCrudRecord {
|
|
8
|
+
id?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
version?: number;
|
|
12
|
+
}
|
|
13
|
+
export type StaticCrudConfirmAction = (options: UiConfirmOptions) => Promise<boolean>;
|
|
14
|
+
export interface StaticCrudActionErrorContext<TRecord extends StaticCrudRecord> {
|
|
15
|
+
actionCode: StaticCrudActionCode;
|
|
16
|
+
mode: StaticCrudCardMode;
|
|
17
|
+
record: TRecord | undefined;
|
|
18
|
+
}
|
|
19
|
+
export type StaticCrudActionErrorHandler<TRecord extends StaticCrudRecord> = PlatformActionErrorHandler<StaticCrudActionErrorContext<TRecord>>;
|
|
20
|
+
export interface StaticCrudManagementOptions<TRecord extends StaticCrudRecord> {
|
|
21
|
+
context: ModuleContext<TRecord>;
|
|
22
|
+
confirmAction: StaticCrudConfirmAction;
|
|
23
|
+
emptyDraft: () => TRecord;
|
|
24
|
+
normalizeDraft: (record: TRecord, selected: TRecord | undefined, mode: StaticCrudCardMode) => TRecord;
|
|
25
|
+
copyRecord?: (record: TRecord) => TRecord;
|
|
26
|
+
titleOf: (record: TRecord) => string;
|
|
27
|
+
fallbackTitle: string;
|
|
28
|
+
createTitle: string;
|
|
29
|
+
requiredMessage: string;
|
|
30
|
+
isValid: (record: TRecord) => boolean;
|
|
31
|
+
recordName: string;
|
|
32
|
+
deleteTitle: string;
|
|
33
|
+
saveDeniedMessage: string;
|
|
34
|
+
createDeniedMessage: string;
|
|
35
|
+
enableDeniedMessage: string;
|
|
36
|
+
deleteDeniedMessage: (record: TRecord | undefined) => string;
|
|
37
|
+
canDeleteRecord?: (record: TRecord) => boolean;
|
|
38
|
+
canEnableRecord?: (record: TRecord, actionCode: 'enable' | 'disable') => boolean;
|
|
39
|
+
validateBeforeSave?: (record: TRecord) => string | undefined;
|
|
40
|
+
actionErrorHandlers?: StaticCrudActionErrorHandler<TRecord>[];
|
|
41
|
+
actionResultReactionHandlers?: Record<string, PlatformActionResultReactionHandler | undefined>;
|
|
42
|
+
}
|
|
43
|
+
export declare function useFlatCrudManagementState<TRecord extends StaticCrudRecord>(options: StaticCrudManagementOptions<TRecord>): {
|
|
44
|
+
selected: import("vue").Ref<TRecord | undefined, TRecord | undefined>;
|
|
45
|
+
draft: [TRecord] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<TRecord, import("vue").Ref<TRecord, TRecord>, TRecord> : import("vue").Ref<import("vue").UnwrapRef<TRecord>, TRecord | import("vue").UnwrapRef<TRecord>>;
|
|
46
|
+
mode: import("vue").Ref<StaticCrudCardMode, StaticCrudCardMode>;
|
|
47
|
+
reloadKey: import("vue").Ref<number, number>;
|
|
48
|
+
saving: import("vue").Ref<boolean, boolean>;
|
|
49
|
+
actionError: import("vue").Ref<string | undefined, string | undefined>;
|
|
50
|
+
cardTitle: import("vue").ComputedRef<string>;
|
|
51
|
+
readonly: import("vue").ComputedRef<boolean>;
|
|
52
|
+
canCreate: import("vue").ComputedRef<boolean>;
|
|
53
|
+
canUpdate: import("vue").ComputedRef<boolean>;
|
|
54
|
+
canDelete: import("vue").ComputedRef<boolean>;
|
|
55
|
+
canEnable: import("vue").ComputedRef<boolean>;
|
|
56
|
+
canMutate: import("vue").ComputedRef<boolean>;
|
|
57
|
+
handleListLoaded: (records: TRecord[]) => void;
|
|
58
|
+
handleReadonlyListLoaded: (records: TRecord[]) => void;
|
|
59
|
+
handleSelect: (record: TRecord) => void;
|
|
60
|
+
startCreate: () => void;
|
|
61
|
+
startEdit: () => void;
|
|
62
|
+
cancelEdit: () => void;
|
|
63
|
+
save: () => Promise<void>;
|
|
64
|
+
toggleEnabled: () => Promise<void>;
|
|
65
|
+
removeSelected: () => Promise<void>;
|
|
66
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import { type StaticRecordMutationResult } from '@muyun/web-core';
|
|
3
|
+
import { type PlatformActionResultReactionHandler } from './platformActionResultFeedback';
|
|
4
|
+
import { type PlatformActionErrorHandler } from './platformErrorFeedback';
|
|
5
|
+
export type StaticFormSaveMode = 'create' | 'edit';
|
|
6
|
+
export interface StaticFormActionErrorContext<TRecord> {
|
|
7
|
+
mode: StaticFormSaveMode;
|
|
8
|
+
record: TRecord;
|
|
9
|
+
}
|
|
10
|
+
export interface StaticFormSaveOptions<TRecord> {
|
|
11
|
+
loading: Ref<boolean>;
|
|
12
|
+
mode: StaticFormSaveMode;
|
|
13
|
+
source?: string;
|
|
14
|
+
validateContext?: () => string | undefined;
|
|
15
|
+
canSave: () => boolean;
|
|
16
|
+
deniedMessage: string;
|
|
17
|
+
createRecord: () => TRecord;
|
|
18
|
+
validateRecord?: (record: TRecord) => string | undefined;
|
|
19
|
+
save: (record: TRecord, mode: StaticFormSaveMode) => Promise<StaticRecordMutationResult<TRecord>>;
|
|
20
|
+
onSaved: (result: StaticRecordMutationResult<TRecord>) => void;
|
|
21
|
+
successMessage?: string;
|
|
22
|
+
reactionHandlers?: Record<string, PlatformActionResultReactionHandler | undefined>;
|
|
23
|
+
actionErrorHandlers?: StaticFormActionErrorHandler<TRecord>[];
|
|
24
|
+
}
|
|
25
|
+
export type StaticFormActionErrorHandler<TRecord> = PlatformActionErrorHandler<StaticFormActionErrorContext<TRecord>>;
|
|
26
|
+
export interface StaticRecordActionOptions<TRecord, TResult = unknown> {
|
|
27
|
+
loading: Ref<boolean>;
|
|
28
|
+
source?: string;
|
|
29
|
+
record: () => TRecord | undefined;
|
|
30
|
+
canExecute: (record: TRecord) => boolean;
|
|
31
|
+
deniedMessage: string;
|
|
32
|
+
confirm?: (record: TRecord) => Promise<boolean>;
|
|
33
|
+
execute: (record: TRecord) => Promise<TResult>;
|
|
34
|
+
onExecuted: (result: TResult, record: TRecord) => void | Promise<void>;
|
|
35
|
+
successMessage?: string;
|
|
36
|
+
reactionHandlers?: Record<string, PlatformActionResultReactionHandler | undefined>;
|
|
37
|
+
}
|
|
38
|
+
export declare function executeStaticFormSave<TRecord>(options: StaticFormSaveOptions<TRecord>): Promise<StaticRecordMutationResult<TRecord> | undefined>;
|
|
39
|
+
export declare function executeStaticRecordAction<TRecord, TResult = unknown>(options: StaticRecordActionOptions<TRecord, TResult>): Promise<TResult | undefined>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ModuleContext, StaticModuleTreeClient } from '@muyun/web-core';
|
|
2
|
+
export interface StaticTreeResourceModuleContextOptions<TRecord> {
|
|
3
|
+
client?: StaticModuleTreeClient<TRecord>;
|
|
4
|
+
emptyQueryScopeName?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createStaticTreeResourceModuleContext<TRecord, TContextRecord = unknown>(context: ModuleContext<TContextRecord>, options?: StaticTreeResourceModuleContextOptions<TRecord>): ModuleContext<TRecord>;
|
|
7
|
+
export declare function createEmptyStaticTreeClient<TRecord>(scopeName?: string): StaticModuleTreeClient<TRecord>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { WebTreeNode } from '@muyun/web-contracts';
|
|
2
|
+
export interface TreeRecordBase {
|
|
3
|
+
id?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
code?: string;
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function defaultTreeRecordTitle<TRecord extends TreeRecordBase>(record: TRecord, fallback?: string): string;
|
|
9
|
+
export declare function flattenTreeRecords<TRecord>(nodes: WebTreeNode<TRecord>[]): TRecord[];
|
|
10
|
+
export declare function filterTreeRecords<TRecord>(nodes: WebTreeNode<TRecord>[], keyword: string, matches: (record: TRecord, normalizedKeyword: string) => boolean): WebTreeNode<TRecord>[];
|
|
11
|
+
export declare function defaultTreeRecordMatches<TRecord extends TreeRecordBase>(record: TRecord, normalizedKeyword: string, titleOf?: (record: TRecord) => string): boolean;
|
|
12
|
+
export declare function firstTwoTreeLevels<TRecord extends {
|
|
13
|
+
id?: string;
|
|
14
|
+
}>(nodes: WebTreeNode<TRecord>[]): string[];
|
|
15
|
+
export declare function expandAllTreeRecords<TRecord extends {
|
|
16
|
+
id?: string;
|
|
17
|
+
}>(node: WebTreeNode<TRecord>): string[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from 'vue';
|
|
2
|
+
import { type ModuleContext } from '@muyun/web-core';
|
|
3
|
+
export type RecycleBinExplorerMode = 'normal' | 'recycleBin';
|
|
4
|
+
export interface RecycleBinExplorerModeOptions<TRecord> {
|
|
5
|
+
context: MaybeRefOrGetter<ModuleContext<TRecord>>;
|
|
6
|
+
listReloadKey: Ref<number>;
|
|
7
|
+
searchKeyword?: Ref<string>;
|
|
8
|
+
canChange?: () => boolean;
|
|
9
|
+
resetSelection?: () => void;
|
|
10
|
+
}
|
|
11
|
+
/** Shared mode controller for standard and micro-list recycle-bin explorers. */
|
|
12
|
+
export declare function useRecycleBinExplorerMode<TRecord>(options: RecycleBinExplorerModeOptions<TRecord>): {
|
|
13
|
+
mode: Ref<RecycleBinExplorerMode, RecycleBinExplorerMode>;
|
|
14
|
+
total: Ref<number | undefined, number | undefined>;
|
|
15
|
+
enabled: import("vue").ComputedRef<boolean>;
|
|
16
|
+
canEnter: import("vue").ComputedRef<boolean>;
|
|
17
|
+
active: import("vue").ComputedRef<boolean>;
|
|
18
|
+
buttonVisible: import("vue").ComputedRef<boolean>;
|
|
19
|
+
hasRecords: import("vue").ComputedRef<boolean | undefined>;
|
|
20
|
+
reloadKey: import("vue").ComputedRef<number>;
|
|
21
|
+
enter: () => void;
|
|
22
|
+
leave: () => void;
|
|
23
|
+
toggle: () => void;
|
|
24
|
+
refresh: () => void;
|
|
25
|
+
updateSummary: (nextTotal: number | undefined) => void;
|
|
26
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UserSessionView } from '@muyun/web-contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Stable presentation rules for the IAM online-session capability.
|
|
4
|
+
*
|
|
5
|
+
* Both tenant users and system accounts are backed by the same user-session
|
|
6
|
+
* resource. Keeping these labels here prevents management pages from
|
|
7
|
+
* gradually developing different interpretations of the same session facts.
|
|
8
|
+
*/
|
|
9
|
+
export declare function userSessionPresenceTitle(session: Pick<UserSessionView, 'presenceStatus' | 'presenceStatusTitle'>): string;
|
|
10
|
+
export declare function userSessionBrowserTitle(session: UserSessionView): string;
|
|
11
|
+
export declare function userSessionTerminalTitle(session: UserSessionView): string;
|
|
12
|
+
export declare function userSessionPresenceDescription(session: UserSessionView): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { MenuNavigationTarget, MenuRecord, MenuTab, PageDescriptor, WorkbenchStartupState } from '@muyun/web-contracts';
|
|
2
|
+
import type { WorkbenchRealtimeStatus } from './realtimeStatus';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
startup?: WorkbenchStartupState;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
activeTabKey?: string;
|
|
8
|
+
realtimeStatus?: WorkbenchRealtimeStatus;
|
|
9
|
+
};
|
|
10
|
+
declare var __VLS_66: {
|
|
11
|
+
activeTab: MenuTab;
|
|
12
|
+
target: MenuNavigationTarget | undefined;
|
|
13
|
+
pageDescriptor: PageDescriptor | undefined;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
default?: (props: typeof __VLS_66) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
selectMenu: (menu: MenuRecord, target: MenuNavigationTarget) => any;
|
|
20
|
+
invalidMenu: (menu: MenuRecord) => any;
|
|
21
|
+
changeTab: (key: string) => any;
|
|
22
|
+
closeTab: (key: string) => any;
|
|
23
|
+
"update:activeTabKey": (key: string) => any;
|
|
24
|
+
userCommand: (key: string) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
26
|
+
onSelectMenu?: ((menu: MenuRecord, target: MenuNavigationTarget) => any) | undefined;
|
|
27
|
+
onInvalidMenu?: ((menu: MenuRecord) => any) | undefined;
|
|
28
|
+
onChangeTab?: ((key: string) => any) | undefined;
|
|
29
|
+
onCloseTab?: ((key: string) => any) | undefined;
|
|
30
|
+
"onUpdate:activeTabKey"?: ((key: string) => any) | undefined;
|
|
31
|
+
onUserCommand?: ((key: string) => any) | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
loading: boolean;
|
|
34
|
+
error: string;
|
|
35
|
+
realtimeStatus: WorkbenchRealtimeStatus;
|
|
36
|
+
startup: WorkbenchStartupState;
|
|
37
|
+
activeTabKey: string;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { MenuNavigationTarget, MenuRecord, MenuTreeNode } from '@muyun/web-contracts';
|
|
2
|
+
import { type WorkbenchRealtimeStatus } from './realtimeStatus';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
menus: MenuTreeNode[];
|
|
5
|
+
selectedMenuId?: string;
|
|
6
|
+
tenantLabel?: string;
|
|
7
|
+
searchPlaceholder?: string;
|
|
8
|
+
realtimeStatus?: WorkbenchRealtimeStatus;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
selectMenu: (menu: MenuRecord, target: MenuNavigationTarget) => any;
|
|
12
|
+
invalidMenu: (menu: MenuRecord) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onSelectMenu?: ((menu: MenuRecord, target: MenuNavigationTarget) => any) | undefined;
|
|
15
|
+
onInvalidMenu?: ((menu: MenuRecord) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
selectedMenuId: string;
|
|
18
|
+
tenantLabel: string;
|
|
19
|
+
searchPlaceholder: string;
|
|
20
|
+
realtimeStatus: WorkbenchRealtimeStatus;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MenuNavigationTarget, MenuRecord } from '@muyun/web-contracts';
|
|
2
|
+
import type { WorkbenchMenuNode } from './menuTreeModel';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
node: WorkbenchMenuNode;
|
|
5
|
+
level?: number;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
selectMenu: (menu: MenuRecord, target: MenuNavigationTarget) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onSelectMenu?: ((menu: MenuRecord, target: MenuNavigationTarget) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -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,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,7 @@
|
|
|
1
|
+
import type { ExternalLinkPageDescriptor, RemoteUrlPageDescriptor } from '@muyun/web-contracts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
descriptor: ExternalLinkPageDescriptor | RemoteUrlPageDescriptor;
|
|
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 { PlatformRoutePageDescriptor } from '@muyun/web-contracts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
descriptor: PlatformRoutePageDescriptor;
|
|
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,11 @@
|
|
|
1
|
+
export { default as Workbench } from './Workbench.vue';
|
|
2
|
+
export { default as WorkbenchMenu } from './WorkbenchMenu.vue';
|
|
3
|
+
export { default as WorkbenchOutlet } from './WorkbenchOutlet.vue';
|
|
4
|
+
export { provideWorkbenchNavigation, useWorkbenchNavigation } from './workbenchNavigation';
|
|
5
|
+
export type { WorkbenchNavigation, WorkbenchPageOpenResult } from './workbenchNavigation';
|
|
6
|
+
export { createMenuTab, findFirstNavigationMenu, getMenuNavigationTarget, isTabMenuTarget, isWindowMenuTarget, pageDescriptorFromUrl, pageDescriptorToUrl, resolvePageDescriptor, tabKeyOf, tryPageDescriptorFromUrl, } from './menuNavigation';
|
|
7
|
+
export type { PageDescriptorResolveOptions, PageDescriptorUrlParseOptions } from './menuNavigation';
|
|
8
|
+
export { buildWorkbenchMegaMenuModel, createWorkbenchMenuNodes, filterWorkbenchMenuNodes, findWorkbenchMenuNodeById, findWorkbenchMenuPath, firstDeepRootIdOf, } from './menuTreeModel';
|
|
9
|
+
export type { WorkbenchMegaMenuModel, WorkbenchMenuNode } from './menuTreeModel';
|
|
10
|
+
export { presentWorkbenchRealtimeStatus } from './realtimeStatus';
|
|
11
|
+
export type { WorkbenchRealtimeStatus, WorkbenchRealtimeStatusPresentation } from './realtimeStatus';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { MenuNavigationTarget, MenuRecord, MenuTab, MenuTreeNode, PageDescriptor, PageLayoutMode } from '@muyun/web-contracts';
|
|
2
|
+
export interface PageDescriptorResolveOptions {
|
|
3
|
+
title?: string;
|
|
4
|
+
platformRoutePrefixes?: string[];
|
|
5
|
+
businessRoutePrefixes?: string[];
|
|
6
|
+
/** Optional legacy mapping for framework-owned static business pages. */
|
|
7
|
+
businessModuleRoutes?: Record<string, string>;
|
|
8
|
+
/** Page layout contracts keyed by a static business route. */
|
|
9
|
+
businessRouteLayouts?: Record<string, PageLayoutMode>;
|
|
10
|
+
businessRouteNames?: string[];
|
|
11
|
+
businessPageKeys?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface PageDescriptorUrlParseOptions {
|
|
14
|
+
title?: string;
|
|
15
|
+
platformRoutePrefixes?: string[];
|
|
16
|
+
businessRoutePrefixes?: string[];
|
|
17
|
+
businessRouteLayouts?: Record<string, PageLayoutMode>;
|
|
18
|
+
}
|
|
19
|
+
export declare function getMenuNavigationTarget(menu: MenuRecord): MenuNavigationTarget | undefined;
|
|
20
|
+
export declare function isTabMenuTarget(target: MenuNavigationTarget): boolean;
|
|
21
|
+
export declare function isWindowMenuTarget(target: MenuNavigationTarget): boolean;
|
|
22
|
+
export declare function resolvePageDescriptor(target: MenuNavigationTarget, options?: PageDescriptorResolveOptions): PageDescriptor;
|
|
23
|
+
export declare function createMenuTab(menu: MenuRecord, target: MenuNavigationTarget, options?: PageDescriptorResolveOptions): MenuTab;
|
|
24
|
+
export declare function findFirstNavigationMenu(nodes: MenuTreeNode[]): MenuRecord | undefined;
|
|
25
|
+
export declare function tabKeyOf(descriptor: PageDescriptor): string;
|
|
26
|
+
export declare function pageDescriptorToUrl(descriptor: PageDescriptor): string;
|
|
27
|
+
export declare function pageDescriptorFromUrl(url: string, options?: PageDescriptorUrlParseOptions): PageDescriptor;
|
|
28
|
+
export declare function tryPageDescriptorFromUrl(url: string, options?: PageDescriptorUrlParseOptions): PageDescriptor | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MenuNavigationTarget, MenuRecord, MenuTreeNode } from '@muyun/web-contracts';
|
|
2
|
+
export interface WorkbenchMenuNode {
|
|
3
|
+
record: MenuRecord;
|
|
4
|
+
children: WorkbenchMenuNode[];
|
|
5
|
+
target?: MenuNavigationTarget;
|
|
6
|
+
navigable: boolean;
|
|
7
|
+
hasChildren: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface WorkbenchMegaMenuModel {
|
|
10
|
+
root: WorkbenchMenuNode;
|
|
11
|
+
groups: WorkbenchMenuNode[];
|
|
12
|
+
columns: WorkbenchMenuNode[][];
|
|
13
|
+
activeDeepRoot?: WorkbenchMenuNode;
|
|
14
|
+
}
|
|
15
|
+
export declare function createWorkbenchMenuNodes(nodes: MenuTreeNode[]): WorkbenchMenuNode[];
|
|
16
|
+
export declare function filterWorkbenchMenuNodes(nodes: WorkbenchMenuNode[], keyword: string): WorkbenchMenuNode[];
|
|
17
|
+
export declare function findWorkbenchMenuPath(nodes: WorkbenchMenuNode[], menuId: string, path?: WorkbenchMenuNode[]): WorkbenchMenuNode[];
|
|
18
|
+
export declare function findWorkbenchMenuNodeById(nodes: WorkbenchMenuNode[], menuId: string): WorkbenchMenuNode | undefined;
|
|
19
|
+
export declare function firstDeepRootIdOf(node: WorkbenchMenuNode): string | undefined;
|
|
20
|
+
export declare function buildWorkbenchMegaMenuModel(root: WorkbenchMenuNode, activeDeepRootId: string | undefined, columnCount?: number): WorkbenchMegaMenuModel;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PageHostType } from '@muyun/web-contracts';
|
|
2
|
+
export type PageHostComponentName = 'PlatformRouteHost' | 'BusinessRouteHost' | 'DynamicModuleHost' | 'ExternalPageHost';
|
|
3
|
+
export declare function resolvePageHostComponentName(hostType: PageHostType): PageHostComponentName;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type WorkbenchRealtimeStatus = 'unavailable' | 'connecting' | 'connected' | 'disconnected';
|
|
2
|
+
export interface WorkbenchRealtimeStatusPresentation {
|
|
3
|
+
label: string;
|
|
4
|
+
title: string;
|
|
5
|
+
tone: Exclude<WorkbenchRealtimeStatus, 'unavailable'>;
|
|
6
|
+
}
|
|
7
|
+
export declare function presentWorkbenchRealtimeStatus(status: WorkbenchRealtimeStatus): WorkbenchRealtimeStatusPresentation | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PageDescriptor } from '@muyun/web-contracts';
|
|
2
|
+
export interface WorkbenchNavigation {
|
|
3
|
+
/** Opens a page and reports whether the target host was newly created. */
|
|
4
|
+
openPage(descriptor: PageDescriptor): WorkbenchPageOpenResult;
|
|
5
|
+
/** Replaces one existing host by its stable tab key without changing that tab's identity. */
|
|
6
|
+
replacePage(pageKey: string, descriptor: PageDescriptor): void;
|
|
7
|
+
}
|
|
8
|
+
export interface WorkbenchPageOpenResult {
|
|
9
|
+
created: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function provideWorkbenchNavigation(navigation: WorkbenchNavigation): void;
|
|
12
|
+
export declare function useWorkbenchNavigation(): WorkbenchNavigation | undefined;
|
|
@@ -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,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,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,64 @@
|
|
|
1
|
+
import { type RecordFormFieldFallback, type RecordFormFieldPickerConfig, type RecordFormFieldValue } from '@muyun/platform-components';
|
|
2
|
+
import type { Department, Employee, EmployeeAccount, UserAccount } from '@muyun/web-contracts';
|
|
3
|
+
import type { ModuleContext } from '@muyun/web-core';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
mode: 'view' | 'create' | 'edit';
|
|
6
|
+
draft: Partial<Employee>;
|
|
7
|
+
selectedEmployee?: Employee;
|
|
8
|
+
selectedOrganization?: {
|
|
9
|
+
id?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
};
|
|
12
|
+
detailDepartment?: Department;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
loadFailed: boolean;
|
|
15
|
+
formDisabled: boolean;
|
|
16
|
+
showContent: boolean;
|
|
17
|
+
fields: Map<string, import('../platform-components/recordFormFieldModel').RecordFormFieldDescriptor>;
|
|
18
|
+
fallback: Record<string, RecordFormFieldFallback>;
|
|
19
|
+
pickerConfigs: Record<string, RecordFormFieldPickerConfig>;
|
|
20
|
+
displayOf: (fieldName: string, value: unknown) => string | number | boolean | undefined | null;
|
|
21
|
+
visibleOf: (fieldName: string) => boolean;
|
|
22
|
+
labelOf: (fieldName: string) => string;
|
|
23
|
+
requiredOf: (fieldName: string) => boolean;
|
|
24
|
+
externallyChanged: boolean;
|
|
25
|
+
account?: EmployeeAccount;
|
|
26
|
+
accountUser?: UserAccount;
|
|
27
|
+
loadingAccounts: boolean;
|
|
28
|
+
accountsLoadFailed: boolean;
|
|
29
|
+
savingAccount: boolean;
|
|
30
|
+
canManageAccounts: boolean;
|
|
31
|
+
showAccountProvisionForm: boolean;
|
|
32
|
+
accountProvisionDraft: Partial<UserAccount>;
|
|
33
|
+
accountUserTitle: string;
|
|
34
|
+
accountUserDescription: string;
|
|
35
|
+
accountStatusTitle: string;
|
|
36
|
+
optionContext: ModuleContext<unknown>;
|
|
37
|
+
};
|
|
38
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
save: () => any;
|
|
40
|
+
updateField: (fieldName: string, value: RecordFormFieldValue) => any;
|
|
41
|
+
retry: () => any;
|
|
42
|
+
reloadExternal: () => any;
|
|
43
|
+
dismissExternal: () => any;
|
|
44
|
+
retryAccounts: () => any;
|
|
45
|
+
startAccountProvision: () => any;
|
|
46
|
+
cancelAccountProvision: () => any;
|
|
47
|
+
provisionAccount: () => any;
|
|
48
|
+
removeAccount: () => any;
|
|
49
|
+
updateAccountProvisionField: (fieldName: "username" | "password", value: string) => any;
|
|
50
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
51
|
+
onSave?: (() => any) | undefined;
|
|
52
|
+
onUpdateField?: ((fieldName: string, value: RecordFormFieldValue) => any) | undefined;
|
|
53
|
+
onRetry?: (() => any) | undefined;
|
|
54
|
+
onReloadExternal?: (() => any) | undefined;
|
|
55
|
+
onDismissExternal?: (() => any) | undefined;
|
|
56
|
+
onRetryAccounts?: (() => any) | undefined;
|
|
57
|
+
onStartAccountProvision?: (() => any) | undefined;
|
|
58
|
+
onCancelAccountProvision?: (() => any) | undefined;
|
|
59
|
+
onProvisionAccount?: (() => any) | undefined;
|
|
60
|
+
onRemoveAccount?: (() => any) | undefined;
|
|
61
|
+
onUpdateAccountProvisionField?: ((fieldName: "username" | "password", value: string) => any) | undefined;
|
|
62
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
|
+
declare const _default: typeof __VLS_export;
|
|
64
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
recordId: string;
|
|
3
|
+
};
|
|
4
|
+
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>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Employee } from '@muyun/web-contracts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
employee?: Employee;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
close: () => any;
|
|
8
|
+
saved: (employeeId: string) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onClose?: (() => any) | undefined;
|
|
11
|
+
onSaved?: ((employeeId: string) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|