@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,215 @@
|
|
|
1
|
+
import type { DictionaryCategory, DictionaryCategoryKind, DictionaryItem } from '@muyun/web-contracts';
|
|
2
|
+
import { type ModuleContext, type StaticModuleTreeClient } from '@muyun/web-core';
|
|
3
|
+
import type { UiConfirmOptions } from '@muyun/vue-ui-antdv';
|
|
4
|
+
import { type PlatformActionResultReactionHandler } from '@muyun/platform-components';
|
|
5
|
+
export type DictionaryCategoryMode = 'view' | 'edit' | 'create-root' | 'create-child';
|
|
6
|
+
export type DictionaryItemMode = 'view' | 'edit' | 'create';
|
|
7
|
+
type ConfirmAction = (options: UiConfirmOptions) => Promise<boolean>;
|
|
8
|
+
export interface DictionaryManagementStateOptions {
|
|
9
|
+
categoryActionResultReactionHandlers?: Record<string, PlatformActionResultReactionHandler | undefined>;
|
|
10
|
+
itemActionResultReactionHandlers?: Record<string, PlatformActionResultReactionHandler | undefined>;
|
|
11
|
+
}
|
|
12
|
+
export declare function createDictionaryManagementState(categoryContext: ModuleContext<DictionaryCategory>, categoryClientOf: () => StaticModuleTreeClient<DictionaryCategory>, itemClientOf: (categoryId: string) => StaticModuleTreeClient<DictionaryItem>, currentApplicationAlias: () => string | undefined, confirmAction: ConfirmAction, options?: DictionaryManagementStateOptions): {
|
|
13
|
+
categoryReloadKey: import("vue").Ref<number, number>;
|
|
14
|
+
itemReloadKey: import("vue").Ref<number, number>;
|
|
15
|
+
categories: import("vue").Ref<{
|
|
16
|
+
applicationAlias?: string | undefined;
|
|
17
|
+
alias?: string | undefined;
|
|
18
|
+
categoryKind?: DictionaryCategoryKind | undefined;
|
|
19
|
+
enabled?: boolean | undefined;
|
|
20
|
+
parentId?: string | undefined;
|
|
21
|
+
sortOrder?: number | undefined;
|
|
22
|
+
title?: string | undefined;
|
|
23
|
+
id?: string | undefined;
|
|
24
|
+
tenantId?: string | undefined;
|
|
25
|
+
version?: number | undefined;
|
|
26
|
+
deleted?: boolean | undefined;
|
|
27
|
+
deletedAt?: string | undefined;
|
|
28
|
+
createdBy?: string | undefined;
|
|
29
|
+
createdAt?: string | undefined;
|
|
30
|
+
updatedBy?: string | undefined;
|
|
31
|
+
updatedAt?: string | undefined;
|
|
32
|
+
}[], DictionaryCategory[] | {
|
|
33
|
+
applicationAlias?: string | undefined;
|
|
34
|
+
alias?: string | undefined;
|
|
35
|
+
categoryKind?: DictionaryCategoryKind | undefined;
|
|
36
|
+
enabled?: boolean | undefined;
|
|
37
|
+
parentId?: string | undefined;
|
|
38
|
+
sortOrder?: number | undefined;
|
|
39
|
+
title?: string | undefined;
|
|
40
|
+
id?: string | undefined;
|
|
41
|
+
tenantId?: string | undefined;
|
|
42
|
+
version?: number | undefined;
|
|
43
|
+
deleted?: boolean | undefined;
|
|
44
|
+
deletedAt?: string | undefined;
|
|
45
|
+
createdBy?: string | undefined;
|
|
46
|
+
createdAt?: string | undefined;
|
|
47
|
+
updatedBy?: string | undefined;
|
|
48
|
+
updatedAt?: string | undefined;
|
|
49
|
+
}[]>;
|
|
50
|
+
selectedCategory: import("vue").Ref<DictionaryCategory | undefined, DictionaryCategory | undefined>;
|
|
51
|
+
categoryDraft: import("vue").Ref<{
|
|
52
|
+
applicationAlias?: string | undefined;
|
|
53
|
+
alias?: string | undefined;
|
|
54
|
+
categoryKind?: DictionaryCategoryKind | undefined;
|
|
55
|
+
enabled?: boolean | undefined;
|
|
56
|
+
parentId?: string | undefined;
|
|
57
|
+
sortOrder?: number | undefined;
|
|
58
|
+
title?: string | undefined;
|
|
59
|
+
id?: string | undefined;
|
|
60
|
+
tenantId?: string | undefined;
|
|
61
|
+
version?: number | undefined;
|
|
62
|
+
deleted?: boolean | undefined;
|
|
63
|
+
deletedAt?: string | undefined;
|
|
64
|
+
createdBy?: string | undefined;
|
|
65
|
+
createdAt?: string | undefined;
|
|
66
|
+
updatedBy?: string | undefined;
|
|
67
|
+
updatedAt?: string | undefined;
|
|
68
|
+
}, DictionaryCategory | {
|
|
69
|
+
applicationAlias?: string | undefined;
|
|
70
|
+
alias?: string | undefined;
|
|
71
|
+
categoryKind?: DictionaryCategoryKind | undefined;
|
|
72
|
+
enabled?: boolean | undefined;
|
|
73
|
+
parentId?: string | undefined;
|
|
74
|
+
sortOrder?: number | undefined;
|
|
75
|
+
title?: string | undefined;
|
|
76
|
+
id?: string | undefined;
|
|
77
|
+
tenantId?: string | undefined;
|
|
78
|
+
version?: number | undefined;
|
|
79
|
+
deleted?: boolean | undefined;
|
|
80
|
+
deletedAt?: string | undefined;
|
|
81
|
+
createdBy?: string | undefined;
|
|
82
|
+
createdAt?: string | undefined;
|
|
83
|
+
updatedBy?: string | undefined;
|
|
84
|
+
updatedAt?: string | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
categoryMode: import("vue").Ref<DictionaryCategoryMode, DictionaryCategoryMode>;
|
|
87
|
+
categorySaving: import("vue").Ref<boolean, boolean>;
|
|
88
|
+
categoryError: import("vue").Ref<string | undefined, string | undefined>;
|
|
89
|
+
items: import("vue").Ref<{
|
|
90
|
+
categoryId?: string | undefined;
|
|
91
|
+
categoryAlias?: string | undefined;
|
|
92
|
+
code?: string | undefined;
|
|
93
|
+
enabled?: boolean | undefined;
|
|
94
|
+
parentId?: string | undefined;
|
|
95
|
+
sortOrder?: number | undefined;
|
|
96
|
+
title?: string | undefined;
|
|
97
|
+
id?: string | undefined;
|
|
98
|
+
tenantId?: string | undefined;
|
|
99
|
+
version?: number | undefined;
|
|
100
|
+
deleted?: boolean | undefined;
|
|
101
|
+
deletedAt?: string | undefined;
|
|
102
|
+
createdBy?: string | undefined;
|
|
103
|
+
createdAt?: string | undefined;
|
|
104
|
+
updatedBy?: string | undefined;
|
|
105
|
+
updatedAt?: string | undefined;
|
|
106
|
+
}[], DictionaryItem[] | {
|
|
107
|
+
categoryId?: string | undefined;
|
|
108
|
+
categoryAlias?: string | undefined;
|
|
109
|
+
code?: string | undefined;
|
|
110
|
+
enabled?: boolean | undefined;
|
|
111
|
+
parentId?: string | undefined;
|
|
112
|
+
sortOrder?: number | undefined;
|
|
113
|
+
title?: string | undefined;
|
|
114
|
+
id?: string | undefined;
|
|
115
|
+
tenantId?: string | undefined;
|
|
116
|
+
version?: number | undefined;
|
|
117
|
+
deleted?: boolean | undefined;
|
|
118
|
+
deletedAt?: string | undefined;
|
|
119
|
+
createdBy?: string | undefined;
|
|
120
|
+
createdAt?: string | undefined;
|
|
121
|
+
updatedBy?: string | undefined;
|
|
122
|
+
updatedAt?: string | undefined;
|
|
123
|
+
}[]>;
|
|
124
|
+
selectedItem: import("vue").Ref<DictionaryItem | undefined, DictionaryItem | undefined>;
|
|
125
|
+
itemDraft: import("vue").Ref<{
|
|
126
|
+
categoryId?: string | undefined;
|
|
127
|
+
categoryAlias?: string | undefined;
|
|
128
|
+
code?: string | undefined;
|
|
129
|
+
enabled?: boolean | undefined;
|
|
130
|
+
parentId?: string | undefined;
|
|
131
|
+
sortOrder?: number | undefined;
|
|
132
|
+
title?: string | undefined;
|
|
133
|
+
id?: string | undefined;
|
|
134
|
+
tenantId?: string | undefined;
|
|
135
|
+
version?: number | undefined;
|
|
136
|
+
deleted?: boolean | undefined;
|
|
137
|
+
deletedAt?: string | undefined;
|
|
138
|
+
createdBy?: string | undefined;
|
|
139
|
+
createdAt?: string | undefined;
|
|
140
|
+
updatedBy?: string | undefined;
|
|
141
|
+
updatedAt?: string | undefined;
|
|
142
|
+
}, DictionaryItem | {
|
|
143
|
+
categoryId?: string | undefined;
|
|
144
|
+
categoryAlias?: string | undefined;
|
|
145
|
+
code?: string | undefined;
|
|
146
|
+
enabled?: boolean | undefined;
|
|
147
|
+
parentId?: string | undefined;
|
|
148
|
+
sortOrder?: number | undefined;
|
|
149
|
+
title?: string | undefined;
|
|
150
|
+
id?: string | undefined;
|
|
151
|
+
tenantId?: string | undefined;
|
|
152
|
+
version?: number | undefined;
|
|
153
|
+
deleted?: boolean | undefined;
|
|
154
|
+
deletedAt?: string | undefined;
|
|
155
|
+
createdBy?: string | undefined;
|
|
156
|
+
createdAt?: string | undefined;
|
|
157
|
+
updatedBy?: string | undefined;
|
|
158
|
+
updatedAt?: string | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
itemMode: import("vue").Ref<DictionaryItemMode, DictionaryItemMode>;
|
|
161
|
+
itemLoading: import("vue").Ref<boolean, boolean>;
|
|
162
|
+
itemSaving: import("vue").Ref<boolean, boolean>;
|
|
163
|
+
itemError: import("vue").Ref<string | undefined, string | undefined>;
|
|
164
|
+
selectedCategoryId: import("vue").ComputedRef<string | undefined>;
|
|
165
|
+
selectedCategoryTitle: import("vue").ComputedRef<string>;
|
|
166
|
+
selectedCategoryIsDictionary: import("vue").ComputedRef<boolean>;
|
|
167
|
+
canCreateCategory: import("vue").ComputedRef<boolean>;
|
|
168
|
+
canUpdateCategory: import("vue").ComputedRef<boolean>;
|
|
169
|
+
canDeleteCategory: import("vue").ComputedRef<boolean>;
|
|
170
|
+
canToggleCategory: import("vue").ComputedRef<boolean>;
|
|
171
|
+
canQueryItem: import("vue").ComputedRef<boolean>;
|
|
172
|
+
canTreeItem: import("vue").ComputedRef<boolean>;
|
|
173
|
+
canCreateItem: import("vue").ComputedRef<boolean>;
|
|
174
|
+
canUpdateItem: import("vue").ComputedRef<boolean>;
|
|
175
|
+
canDeleteItem: import("vue").ComputedRef<boolean>;
|
|
176
|
+
canToggleItem: import("vue").ComputedRef<boolean>;
|
|
177
|
+
categoryReadonly: import("vue").ComputedRef<boolean>;
|
|
178
|
+
itemReadonly: import("vue").ComputedRef<boolean>;
|
|
179
|
+
categoryEditorTitle: import("vue").ComputedRef<string>;
|
|
180
|
+
itemCardTitle: import("vue").ComputedRef<string>;
|
|
181
|
+
handleCategoriesLoaded: (records: DictionaryCategory[]) => void;
|
|
182
|
+
handleSelectCategory: (record: DictionaryCategory) => void;
|
|
183
|
+
startCreateRootCategory: () => void;
|
|
184
|
+
startCreateChildCategory: () => void;
|
|
185
|
+
startEditCategory: () => void;
|
|
186
|
+
cancelCategoryEdit: () => void;
|
|
187
|
+
saveCategory: () => Promise<void>;
|
|
188
|
+
toggleCategory: () => Promise<void>;
|
|
189
|
+
deleteCategory: () => Promise<void>;
|
|
190
|
+
handleItemsLoaded: (records: DictionaryItem[]) => void;
|
|
191
|
+
loadItems: () => Promise<void>;
|
|
192
|
+
selectItem: (record: DictionaryItem) => void;
|
|
193
|
+
startCreateItem: () => void;
|
|
194
|
+
startCreateChildItem: (parent: DictionaryItem) => void;
|
|
195
|
+
startEditItem: () => void;
|
|
196
|
+
cancelItemEdit: () => void;
|
|
197
|
+
saveItem: () => Promise<void>;
|
|
198
|
+
toggleItem: () => Promise<void>;
|
|
199
|
+
deleteItem: () => Promise<void>;
|
|
200
|
+
resetForApplication: () => void;
|
|
201
|
+
};
|
|
202
|
+
export declare function dictionaryCategoryTitleOf(record: DictionaryCategory | undefined): string;
|
|
203
|
+
export declare function dictionaryItemTitleOf(record: DictionaryItem | undefined): string;
|
|
204
|
+
export declare function dictionaryCategoryKindTitle(record: DictionaryCategory | undefined): "目录" | "字典";
|
|
205
|
+
export declare function isDictionaryCategory(record: DictionaryCategory | undefined): boolean;
|
|
206
|
+
export declare function isFolderCategory(record: DictionaryCategory | undefined): boolean;
|
|
207
|
+
export declare function emptyDictionaryCategoryDraft(parentId?: string, applicationAlias?: string): DictionaryCategory;
|
|
208
|
+
export declare function copyDictionaryCategory(record: DictionaryCategory): DictionaryCategory;
|
|
209
|
+
export declare function normalizeDictionaryCategoryDraft(record: DictionaryCategory, applicationAlias?: string | undefined): DictionaryCategory;
|
|
210
|
+
export declare function isValidDictionaryCategory(record: DictionaryCategory): boolean;
|
|
211
|
+
export declare function emptyDictionaryItemDraft(category?: DictionaryCategory): DictionaryItem;
|
|
212
|
+
export declare function copyDictionaryItem(record: DictionaryItem): DictionaryItem;
|
|
213
|
+
export declare function normalizeDictionaryItemDraft(record: DictionaryItem, category: DictionaryCategory | undefined): DictionaryItem;
|
|
214
|
+
export declare function isValidDictionaryItem(record: DictionaryItem): boolean;
|
|
215
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type EmployeeDetailMode = 'view' | 'create' | 'edit';
|
|
2
|
+
export interface EmployeeFormDisabledState {
|
|
3
|
+
mode: EmployeeDetailMode;
|
|
4
|
+
loadingDetail: boolean;
|
|
5
|
+
saving: boolean;
|
|
6
|
+
selectedEmployeeId?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface EmployeeDetailRequestState {
|
|
9
|
+
activeRequestSeq: number;
|
|
10
|
+
requestSeq: number;
|
|
11
|
+
selectedEmployeeKey?: string;
|
|
12
|
+
recordId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface EmployeeDetailContentState {
|
|
15
|
+
mode: EmployeeDetailMode;
|
|
16
|
+
loadingDetail: boolean;
|
|
17
|
+
loadFailed: boolean;
|
|
18
|
+
selectedEmployeeId?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface EmployeeDetailContextSwitchState {
|
|
21
|
+
saving: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface EmployeeDetailCancelState {
|
|
24
|
+
mode: EmployeeDetailMode;
|
|
25
|
+
selectedEmployeeId?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface EmployeeRequiredFormFieldState {
|
|
28
|
+
fieldName: string;
|
|
29
|
+
label: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
visible: boolean;
|
|
32
|
+
value: unknown;
|
|
33
|
+
}
|
|
34
|
+
export declare function isEmployeeFormDisabled(state: EmployeeFormDisabledState): boolean;
|
|
35
|
+
export declare function shouldCommitEmployeeDetailRequest(state: EmployeeDetailRequestState): boolean;
|
|
36
|
+
export declare function shouldShowEmployeeDetailContent(state: EmployeeDetailContentState): boolean;
|
|
37
|
+
export declare function canSwitchEmployeeDetailContext(state: EmployeeDetailContextSwitchState): boolean;
|
|
38
|
+
export declare function shouldCloseEmployeeDetailOnCancel(state: EmployeeDetailCancelState): boolean;
|
|
39
|
+
export declare function validateEmployeeRequiredFormFields(fields: EmployeeRequiredFormFieldState[]): string | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Department, Employee, EmployeeAccount, Organization, UserAccount } from '@muyun/web-contracts';
|
|
2
|
+
import type { EmployeeDetailWorkspaceViewInput } from './employeeDetailWorkspaceView';
|
|
3
|
+
export interface EmployeeDetailWorkspaceSession {
|
|
4
|
+
selectedEmployee: Employee;
|
|
5
|
+
draft: Partial<Employee>;
|
|
6
|
+
organization?: Organization;
|
|
7
|
+
department?: Department;
|
|
8
|
+
account?: EmployeeAccount;
|
|
9
|
+
accountUser?: UserAccount;
|
|
10
|
+
showAccountProvisionForm: boolean;
|
|
11
|
+
accountProvisionDraft: Partial<UserAccount>;
|
|
12
|
+
mode: 'view' | 'edit';
|
|
13
|
+
}
|
|
14
|
+
export declare function handOffEmployeeDetailWorkspaceSession(input: EmployeeDetailWorkspaceViewInput, session: EmployeeDetailWorkspaceSession): Promise<"accepted" | "rejected">;
|
|
15
|
+
export declare function registerEmployeeDetailWorkspaceHandoffRecipient(input: EmployeeDetailWorkspaceViewInput, recipient: (session: EmployeeDetailWorkspaceSession) => boolean): () => void;
|
|
16
|
+
export declare function takeEmployeeDetailWorkspaceSession(input: EmployeeDetailWorkspaceViewInput): EmployeeDetailWorkspaceSession | undefined;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { FieldSpec } from '@muyun/web-contracts';
|
|
2
|
+
import type { ModuleContext } from '@muyun/web-core';
|
|
3
|
+
import type { UiConfirmOptions } from '@muyun/vue-ui-antdv';
|
|
4
|
+
import { type StaticCrudActionErrorHandler } from '../platform-components/staticCrudManagementState';
|
|
5
|
+
import type { PlatformActionResultReactionHandler } from '../platform-components/platformActionResultFeedback';
|
|
6
|
+
type ConfirmAction = (options: UiConfirmOptions) => Promise<boolean>;
|
|
7
|
+
export interface FieldSpecManagementStateOptions {
|
|
8
|
+
actionErrorHandlers?: StaticCrudActionErrorHandler<FieldSpec>[];
|
|
9
|
+
actionResultReactionHandlers?: Record<string, PlatformActionResultReactionHandler | undefined>;
|
|
10
|
+
}
|
|
11
|
+
export declare function createFieldSpecManagementState(fieldSpecContext: ModuleContext<FieldSpec>, confirmAction: ConfirmAction, options?: FieldSpecManagementStateOptions): {
|
|
12
|
+
specAliasReadonly: import("vue").ComputedRef<boolean>;
|
|
13
|
+
selected: import("vue").Ref<FieldSpec | undefined, FieldSpec | undefined>;
|
|
14
|
+
draft: import("vue").Ref<{
|
|
15
|
+
alias?: string | undefined;
|
|
16
|
+
fieldType?: string | undefined;
|
|
17
|
+
defaultLength?: number | undefined;
|
|
18
|
+
defaultPrecision?: number | undefined;
|
|
19
|
+
defaultScale?: number | undefined;
|
|
20
|
+
defaultQueryOperator?: string | undefined;
|
|
21
|
+
queryOperators?: string[] | undefined;
|
|
22
|
+
defaultUiControlAlias?: string | undefined;
|
|
23
|
+
uiControlAliases?: string[] | undefined;
|
|
24
|
+
enabled?: boolean | undefined;
|
|
25
|
+
sortOrder?: number | undefined;
|
|
26
|
+
title?: string | undefined;
|
|
27
|
+
id?: string | undefined;
|
|
28
|
+
tenantId?: string | undefined;
|
|
29
|
+
version?: number | undefined;
|
|
30
|
+
deleted?: boolean | undefined;
|
|
31
|
+
deletedAt?: string | undefined;
|
|
32
|
+
createdBy?: string | undefined;
|
|
33
|
+
createdAt?: string | undefined;
|
|
34
|
+
updatedBy?: string | undefined;
|
|
35
|
+
updatedAt?: string | undefined;
|
|
36
|
+
}, FieldSpec | {
|
|
37
|
+
alias?: string | undefined;
|
|
38
|
+
fieldType?: string | undefined;
|
|
39
|
+
defaultLength?: number | undefined;
|
|
40
|
+
defaultPrecision?: number | undefined;
|
|
41
|
+
defaultScale?: number | undefined;
|
|
42
|
+
defaultQueryOperator?: string | undefined;
|
|
43
|
+
queryOperators?: string[] | undefined;
|
|
44
|
+
defaultUiControlAlias?: string | undefined;
|
|
45
|
+
uiControlAliases?: string[] | undefined;
|
|
46
|
+
enabled?: boolean | undefined;
|
|
47
|
+
sortOrder?: number | undefined;
|
|
48
|
+
title?: string | undefined;
|
|
49
|
+
id?: string | undefined;
|
|
50
|
+
tenantId?: string | undefined;
|
|
51
|
+
version?: number | undefined;
|
|
52
|
+
deleted?: boolean | undefined;
|
|
53
|
+
deletedAt?: string | undefined;
|
|
54
|
+
createdBy?: string | undefined;
|
|
55
|
+
createdAt?: string | undefined;
|
|
56
|
+
updatedBy?: string | undefined;
|
|
57
|
+
updatedAt?: string | undefined;
|
|
58
|
+
}>;
|
|
59
|
+
mode: import("vue").Ref<import("../platform-components").StaticCrudCardMode, import("../platform-components").StaticCrudCardMode>;
|
|
60
|
+
reloadKey: import("vue").Ref<number, number>;
|
|
61
|
+
saving: import("vue").Ref<boolean, boolean>;
|
|
62
|
+
actionError: import("vue").Ref<string | undefined, string | undefined>;
|
|
63
|
+
cardTitle: import("vue").ComputedRef<string>;
|
|
64
|
+
readonly: import("vue").ComputedRef<boolean>;
|
|
65
|
+
canCreate: import("vue").ComputedRef<boolean>;
|
|
66
|
+
canUpdate: import("vue").ComputedRef<boolean>;
|
|
67
|
+
canDelete: import("vue").ComputedRef<boolean>;
|
|
68
|
+
canEnable: import("vue").ComputedRef<boolean>;
|
|
69
|
+
canMutate: import("vue").ComputedRef<boolean>;
|
|
70
|
+
handleListLoaded: (records: FieldSpec[]) => void;
|
|
71
|
+
handleReadonlyListLoaded: (records: FieldSpec[]) => void;
|
|
72
|
+
handleSelect: (record: FieldSpec) => void;
|
|
73
|
+
startCreate: () => void;
|
|
74
|
+
startEdit: () => void;
|
|
75
|
+
cancelEdit: () => void;
|
|
76
|
+
save: () => Promise<void>;
|
|
77
|
+
toggleEnabled: () => Promise<void>;
|
|
78
|
+
removeSelected: () => Promise<void>;
|
|
79
|
+
};
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { FieldUiControl } from '@muyun/web-contracts';
|
|
2
|
+
import type { ModuleContext } from '@muyun/web-core';
|
|
3
|
+
import type { UiConfirmOptions } from '@muyun/vue-ui-antdv';
|
|
4
|
+
import { type StaticCrudActionErrorHandler } from '../platform-components/staticCrudManagementState';
|
|
5
|
+
import type { PlatformActionResultReactionHandler } from '../platform-components/platformActionResultFeedback';
|
|
6
|
+
type ConfirmAction = (options: UiConfirmOptions) => Promise<boolean>;
|
|
7
|
+
export interface FieldUiControlManagementStateOptions {
|
|
8
|
+
actionErrorHandlers?: StaticCrudActionErrorHandler<FieldUiControl>[];
|
|
9
|
+
actionResultReactionHandlers?: Record<string, PlatformActionResultReactionHandler | undefined>;
|
|
10
|
+
}
|
|
11
|
+
export declare function createFieldUiControlManagementState(fieldUiControlContext: ModuleContext<FieldUiControl>, confirmAction: ConfirmAction, options?: FieldUiControlManagementStateOptions): {
|
|
12
|
+
controlAliasReadonly: import("vue").ComputedRef<boolean>;
|
|
13
|
+
selected: import("vue").Ref<FieldUiControl | undefined, FieldUiControl | undefined>;
|
|
14
|
+
draft: import("vue").Ref<{
|
|
15
|
+
alias?: string | undefined;
|
|
16
|
+
defaultFieldSpecAlias?: string | undefined;
|
|
17
|
+
valueShape?: "SCALAR" | "COLLECTION" | "COMPOSITE" | undefined;
|
|
18
|
+
primaryValueKey?: string | undefined;
|
|
19
|
+
queryMode?: "DEFAULT" | "BETWEEN" | undefined;
|
|
20
|
+
rendererType?: string | undefined;
|
|
21
|
+
icon?: string | undefined;
|
|
22
|
+
enabled?: boolean | undefined;
|
|
23
|
+
sortOrder?: number | undefined;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
id?: string | undefined;
|
|
26
|
+
tenantId?: string | undefined;
|
|
27
|
+
version?: number | undefined;
|
|
28
|
+
deleted?: boolean | undefined;
|
|
29
|
+
deletedAt?: string | undefined;
|
|
30
|
+
createdBy?: string | undefined;
|
|
31
|
+
createdAt?: string | undefined;
|
|
32
|
+
updatedBy?: string | undefined;
|
|
33
|
+
updatedAt?: string | undefined;
|
|
34
|
+
}, FieldUiControl | {
|
|
35
|
+
alias?: string | undefined;
|
|
36
|
+
defaultFieldSpecAlias?: string | undefined;
|
|
37
|
+
valueShape?: "SCALAR" | "COLLECTION" | "COMPOSITE" | undefined;
|
|
38
|
+
primaryValueKey?: string | undefined;
|
|
39
|
+
queryMode?: "DEFAULT" | "BETWEEN" | undefined;
|
|
40
|
+
rendererType?: string | undefined;
|
|
41
|
+
icon?: string | undefined;
|
|
42
|
+
enabled?: boolean | undefined;
|
|
43
|
+
sortOrder?: number | undefined;
|
|
44
|
+
title?: string | undefined;
|
|
45
|
+
id?: string | undefined;
|
|
46
|
+
tenantId?: string | undefined;
|
|
47
|
+
version?: number | undefined;
|
|
48
|
+
deleted?: boolean | undefined;
|
|
49
|
+
deletedAt?: string | undefined;
|
|
50
|
+
createdBy?: string | undefined;
|
|
51
|
+
createdAt?: string | undefined;
|
|
52
|
+
updatedBy?: string | undefined;
|
|
53
|
+
updatedAt?: string | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
mode: import("vue").Ref<import("../platform-components").StaticCrudCardMode, import("../platform-components").StaticCrudCardMode>;
|
|
56
|
+
reloadKey: import("vue").Ref<number, number>;
|
|
57
|
+
saving: import("vue").Ref<boolean, boolean>;
|
|
58
|
+
actionError: import("vue").Ref<string | undefined, string | undefined>;
|
|
59
|
+
cardTitle: import("vue").ComputedRef<string>;
|
|
60
|
+
readonly: import("vue").ComputedRef<boolean>;
|
|
61
|
+
canCreate: import("vue").ComputedRef<boolean>;
|
|
62
|
+
canUpdate: import("vue").ComputedRef<boolean>;
|
|
63
|
+
canDelete: import("vue").ComputedRef<boolean>;
|
|
64
|
+
canEnable: import("vue").ComputedRef<boolean>;
|
|
65
|
+
canMutate: import("vue").ComputedRef<boolean>;
|
|
66
|
+
handleListLoaded: (records: FieldUiControl[]) => void;
|
|
67
|
+
handleReadonlyListLoaded: (records: FieldUiControl[]) => void;
|
|
68
|
+
handleSelect: (record: FieldUiControl) => void;
|
|
69
|
+
startCreate: () => void;
|
|
70
|
+
startEdit: () => void;
|
|
71
|
+
cancelEdit: () => void;
|
|
72
|
+
save: () => Promise<void>;
|
|
73
|
+
toggleEnabled: () => Promise<void>;
|
|
74
|
+
removeSelected: () => Promise<void>;
|
|
75
|
+
};
|
|
76
|
+
export {};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { CurrentUser, MenuOpenMode, MenuPageMode, MenuRecord, MenuScheme } from '@muyun/web-contracts';
|
|
2
|
+
import type { ModuleContext } from '@muyun/web-core';
|
|
3
|
+
import type { UiConfirmOptions } from '@muyun/vue-ui-antdv';
|
|
4
|
+
export type MenuSchemeMode = 'view' | 'edit' | 'create';
|
|
5
|
+
export type MenuNodeMode = 'view' | 'edit' | 'create-root' | 'create-child';
|
|
6
|
+
type ConfirmAction = (options: UiConfirmOptions) => Promise<boolean>;
|
|
7
|
+
type MenuContextProvider = () => ModuleContext<MenuRecord>;
|
|
8
|
+
type CurrentUserProvider = () => CurrentUser | undefined;
|
|
9
|
+
export interface MenuManagementStateOptions {
|
|
10
|
+
currentUser?: CurrentUserProvider;
|
|
11
|
+
}
|
|
12
|
+
export declare function createMenuManagementState(schemeContext: ModuleContext<MenuScheme>, menuContextProvider: MenuContextProvider, confirmAction: ConfirmAction, options?: MenuManagementStateOptions): {
|
|
13
|
+
schemeReloadKey: import("vue").Ref<number, number>;
|
|
14
|
+
menuReloadKey: import("vue").Ref<number, number>;
|
|
15
|
+
schemes: import("vue").Ref<{
|
|
16
|
+
alias?: string | undefined;
|
|
17
|
+
scopeType?: import("@muyun/web-contracts").MenuScopeType | undefined;
|
|
18
|
+
scopeId?: string | undefined;
|
|
19
|
+
enabled?: boolean | undefined;
|
|
20
|
+
sortOrder?: number | undefined;
|
|
21
|
+
title?: string | undefined;
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
tenantId?: string | undefined;
|
|
24
|
+
version?: number | undefined;
|
|
25
|
+
deleted?: boolean | undefined;
|
|
26
|
+
deletedAt?: string | undefined;
|
|
27
|
+
createdBy?: string | undefined;
|
|
28
|
+
createdAt?: string | undefined;
|
|
29
|
+
updatedBy?: string | undefined;
|
|
30
|
+
updatedAt?: string | undefined;
|
|
31
|
+
}[], MenuScheme[] | {
|
|
32
|
+
alias?: string | undefined;
|
|
33
|
+
scopeType?: import("@muyun/web-contracts").MenuScopeType | undefined;
|
|
34
|
+
scopeId?: string | undefined;
|
|
35
|
+
enabled?: boolean | undefined;
|
|
36
|
+
sortOrder?: number | undefined;
|
|
37
|
+
title?: string | undefined;
|
|
38
|
+
id?: string | undefined;
|
|
39
|
+
tenantId?: string | undefined;
|
|
40
|
+
version?: number | undefined;
|
|
41
|
+
deleted?: boolean | undefined;
|
|
42
|
+
deletedAt?: string | undefined;
|
|
43
|
+
createdBy?: string | undefined;
|
|
44
|
+
createdAt?: string | undefined;
|
|
45
|
+
updatedBy?: string | undefined;
|
|
46
|
+
updatedAt?: string | undefined;
|
|
47
|
+
}[]>;
|
|
48
|
+
selectedScheme: import("vue").Ref<MenuScheme | undefined, MenuScheme | undefined>;
|
|
49
|
+
selectedMenu: import("vue").Ref<MenuRecord | undefined, MenuRecord | undefined>;
|
|
50
|
+
schemeDraft: import("vue").Ref<{
|
|
51
|
+
alias?: string | undefined;
|
|
52
|
+
scopeType?: import("@muyun/web-contracts").MenuScopeType | undefined;
|
|
53
|
+
scopeId?: string | undefined;
|
|
54
|
+
enabled?: boolean | undefined;
|
|
55
|
+
sortOrder?: number | undefined;
|
|
56
|
+
title?: string | undefined;
|
|
57
|
+
id?: string | undefined;
|
|
58
|
+
tenantId?: string | undefined;
|
|
59
|
+
version?: number | undefined;
|
|
60
|
+
deleted?: boolean | undefined;
|
|
61
|
+
deletedAt?: string | undefined;
|
|
62
|
+
createdBy?: string | undefined;
|
|
63
|
+
createdAt?: string | undefined;
|
|
64
|
+
updatedBy?: string | undefined;
|
|
65
|
+
updatedAt?: string | undefined;
|
|
66
|
+
}, MenuScheme | {
|
|
67
|
+
alias?: string | undefined;
|
|
68
|
+
scopeType?: import("@muyun/web-contracts").MenuScopeType | undefined;
|
|
69
|
+
scopeId?: string | undefined;
|
|
70
|
+
enabled?: boolean | undefined;
|
|
71
|
+
sortOrder?: number | undefined;
|
|
72
|
+
title?: string | undefined;
|
|
73
|
+
id?: string | undefined;
|
|
74
|
+
tenantId?: string | undefined;
|
|
75
|
+
version?: number | undefined;
|
|
76
|
+
deleted?: boolean | undefined;
|
|
77
|
+
deletedAt?: string | undefined;
|
|
78
|
+
createdBy?: string | undefined;
|
|
79
|
+
createdAt?: string | undefined;
|
|
80
|
+
updatedBy?: string | undefined;
|
|
81
|
+
updatedAt?: string | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
menuDraft: import("vue").Ref<{
|
|
84
|
+
id: string;
|
|
85
|
+
title: string;
|
|
86
|
+
schemeId: string;
|
|
87
|
+
openMode?: MenuOpenMode | undefined;
|
|
88
|
+
moduleAlias?: string | undefined;
|
|
89
|
+
route?: string | undefined;
|
|
90
|
+
externalUrl?: string | undefined;
|
|
91
|
+
pageMode?: MenuPageMode | undefined;
|
|
92
|
+
defaultUiConfigId?: string | undefined;
|
|
93
|
+
defaultQueryTemplateId?: string | undefined;
|
|
94
|
+
entryParamsJson?: string | undefined;
|
|
95
|
+
enabled?: boolean | undefined;
|
|
96
|
+
parentId?: string | undefined;
|
|
97
|
+
sortOrder?: number | undefined;
|
|
98
|
+
tenantId?: string | undefined;
|
|
99
|
+
version?: number | undefined;
|
|
100
|
+
deleted?: boolean | undefined;
|
|
101
|
+
deletedAt?: string | undefined;
|
|
102
|
+
createdBy?: string | undefined;
|
|
103
|
+
createdAt?: string | undefined;
|
|
104
|
+
updatedBy?: string | undefined;
|
|
105
|
+
updatedAt?: string | undefined;
|
|
106
|
+
}, MenuRecord | {
|
|
107
|
+
id: string;
|
|
108
|
+
title: string;
|
|
109
|
+
schemeId: string;
|
|
110
|
+
openMode?: MenuOpenMode | undefined;
|
|
111
|
+
moduleAlias?: string | undefined;
|
|
112
|
+
route?: string | undefined;
|
|
113
|
+
externalUrl?: string | undefined;
|
|
114
|
+
pageMode?: MenuPageMode | undefined;
|
|
115
|
+
defaultUiConfigId?: string | undefined;
|
|
116
|
+
defaultQueryTemplateId?: string | undefined;
|
|
117
|
+
entryParamsJson?: string | undefined;
|
|
118
|
+
enabled?: boolean | undefined;
|
|
119
|
+
parentId?: string | undefined;
|
|
120
|
+
sortOrder?: number | undefined;
|
|
121
|
+
tenantId?: string | undefined;
|
|
122
|
+
version?: number | undefined;
|
|
123
|
+
deleted?: boolean | undefined;
|
|
124
|
+
deletedAt?: string | undefined;
|
|
125
|
+
createdBy?: string | undefined;
|
|
126
|
+
createdAt?: string | undefined;
|
|
127
|
+
updatedBy?: string | undefined;
|
|
128
|
+
updatedAt?: string | undefined;
|
|
129
|
+
}>;
|
|
130
|
+
schemeMode: import("vue").Ref<MenuSchemeMode, MenuSchemeMode>;
|
|
131
|
+
menuMode: import("vue").Ref<MenuNodeMode, MenuNodeMode>;
|
|
132
|
+
savingScheme: import("vue").Ref<boolean, boolean>;
|
|
133
|
+
savingMenu: import("vue").Ref<boolean, boolean>;
|
|
134
|
+
selectedSchemeId: import("vue").ComputedRef<string | undefined>;
|
|
135
|
+
selectedSchemeTitle: import("vue").ComputedRef<string>;
|
|
136
|
+
selectedMenuTitle: import("vue").ComputedRef<string>;
|
|
137
|
+
schemeReadonly: import("vue").ComputedRef<boolean>;
|
|
138
|
+
menuReadonly: import("vue").ComputedRef<boolean>;
|
|
139
|
+
canCreateScheme: import("vue").ComputedRef<boolean>;
|
|
140
|
+
canUpdateScheme: import("vue").ComputedRef<boolean>;
|
|
141
|
+
canDeleteScheme: import("vue").ComputedRef<boolean>;
|
|
142
|
+
canToggleScheme: import("vue").ComputedRef<boolean>;
|
|
143
|
+
canCreateMenu: import("vue").ComputedRef<boolean>;
|
|
144
|
+
canUpdateMenu: import("vue").ComputedRef<boolean>;
|
|
145
|
+
canDeleteMenu: import("vue").ComputedRef<boolean>;
|
|
146
|
+
canToggleMenu: import("vue").ComputedRef<boolean>;
|
|
147
|
+
schemeCardTitle: import("vue").ComputedRef<string>;
|
|
148
|
+
menuCardTitle: import("vue").ComputedRef<string>;
|
|
149
|
+
handleSchemesLoaded: (records: MenuScheme[]) => void;
|
|
150
|
+
selectScheme: (record: MenuScheme) => void;
|
|
151
|
+
handleMenusLoaded: (records: MenuRecord[]) => void;
|
|
152
|
+
selectMenu: (record: MenuRecord) => void;
|
|
153
|
+
startCreateScheme: () => void;
|
|
154
|
+
startEditScheme: () => void;
|
|
155
|
+
cancelSchemeEdit: () => void;
|
|
156
|
+
startCreateRootMenu: () => void;
|
|
157
|
+
startCreateChildMenu: (parent?: MenuRecord) => void;
|
|
158
|
+
startEditMenu: () => void;
|
|
159
|
+
cancelMenuEdit: () => void;
|
|
160
|
+
saveScheme: () => Promise<void>;
|
|
161
|
+
saveMenu: () => Promise<void>;
|
|
162
|
+
toggleSchemeEnabled: () => Promise<void>;
|
|
163
|
+
toggleMenuEnabled: () => Promise<void>;
|
|
164
|
+
removeSelectedScheme: () => Promise<void>;
|
|
165
|
+
removeSelectedMenu: () => Promise<void>;
|
|
166
|
+
};
|
|
167
|
+
export declare function schemeTitleOf(record: MenuScheme | undefined): string;
|
|
168
|
+
export declare function menuTitleOf(record: MenuRecord | undefined): string;
|
|
169
|
+
export declare function emptySchemeDraft(currentUser?: CurrentUser): MenuScheme;
|
|
170
|
+
export declare function defaultMenuSchemeScope(currentUser?: CurrentUser): Pick<MenuScheme, 'tenantId' | 'scopeType' | 'scopeId'>;
|
|
171
|
+
export declare function emptyMenuDraft(schemeId?: string): MenuRecord;
|
|
172
|
+
export declare function copyScheme(record: MenuScheme): MenuScheme;
|
|
173
|
+
export declare function copyMenu(record: MenuRecord): MenuRecord;
|
|
174
|
+
export declare function normalizeSchemeDraft(record: MenuScheme, selected: MenuScheme | undefined, mode: MenuSchemeMode): MenuScheme;
|
|
175
|
+
export declare function normalizeMenuDraft(record: MenuRecord, schemeId: string | undefined): MenuRecord;
|
|
176
|
+
export declare function isValidScheme(record: MenuScheme): boolean;
|
|
177
|
+
export declare function validateMenu(record: MenuRecord): "所属方案和菜单名称不能为空" | "入口菜单必须选择打开方式" | undefined;
|
|
178
|
+
export {};
|