@ximatai/muyun-web-app 0.26.27 → 0.26.29

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.
Files changed (71) hide show
  1. package/dist/{BusinessActivityLogView-Bbe-GbNG.js → BusinessActivityLogView-fzxP3P68.js} +2 -2
  2. package/dist/BusinessLogListDrawer-C7wb2R6q.js +868 -0
  3. package/dist/CodeConfigurationView-DXrXp7kg.js +2333 -0
  4. package/dist/{ConfigurationTranslationView-B3Cr9Wes.js → ConfigurationTranslationView-CNWJhB8C.js} +49 -49
  5. package/dist/{LoginAuditLogView-DOwkqtVB.js → LoginAuditLogView-D2q4WT8W.js} +2 -2
  6. package/dist/{ModuleActionManagementView-DNXAhdXk.js → ModuleActionManagementView-Xd8uB3iR.js} +191 -191
  7. package/dist/{ModuleGovernanceView-g5W2R_Zl.js → ModuleGovernanceView-BFCfy5wB.js} +3403 -3421
  8. package/dist/{RequestErrorLogView-9GIz2mkQ.js → RequestErrorLogView-C-dZhHvD.js} +2 -2
  9. package/dist/RoleDetailWorkspaceView-BmtEBE0r.js +1435 -0
  10. package/dist/{RuntimeLogView-C5i19Z-u.js → RuntimeLogView-BuFuboQh.js} +51 -51
  11. package/dist/{WorkflowAdministrationView-CnoTudpI.js → WorkflowAdministrationView-Cb6RnlGU.js} +57 -57
  12. package/dist/WorkflowConfigurationView-VLObweIg.js +2227 -0
  13. package/dist/{WorkflowWorkbenchView-DbWqspEB.js → WorkflowWorkbenchView-CbZervUv.js} +248 -248
  14. package/dist/{codeConfiguration-Bno8cWxB.js → codeConfiguration-DbUEhnW7.js} +66 -49
  15. package/dist/configurationEditorNavigation-DZeBbg3z.js +15 -0
  16. package/dist/formulaReferences-CKkkdA_R.js +23 -0
  17. package/dist/index.css +1 -1
  18. package/dist/index.js +727 -727
  19. package/dist/{moduleMenuWorkspace-DW13bHG5.js → moduleMenuWorkspace-COanAuqc.js} +237 -248
  20. package/dist/{platform-components-D3NvMY3T.js → platform-components-5joS6YaR.js} +4677 -4489
  21. package/dist/{platform-workbench-C4OFiuG5.js → platform-workbench-le7pFe4d.js} +5457 -5296
  22. package/dist/types/consumer/index.d.ts +2 -1
  23. package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +32 -26
  24. package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +60 -29
  25. package/dist/types/dynamic-page-runtime/ModuleRecordDetailActions.vue.d.ts +2 -0
  26. package/dist/types/dynamic-page-runtime/ModuleReferenceRecordDetailBrowser.vue.d.ts +13 -4
  27. package/dist/types/dynamic-page-runtime/index.d.ts +2 -2
  28. package/dist/types/dynamic-page-runtime/modulePageActionControls.d.ts +12 -0
  29. package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +18 -5
  30. package/dist/types/dynamic-page-runtime/recordFormAssistantCapabilities.d.ts +3 -1
  31. package/dist/types/dynamic-page-runtime/recordFormDraftAccess.d.ts +2 -0
  32. package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +16 -13
  33. package/dist/types/dynamic-page-runtime/useModuleRecordDataChanges.d.ts +4 -1
  34. package/dist/types/platform-components/ActionControlHost.vue.d.ts +16 -0
  35. package/dist/types/platform-components/AdaptiveHeaderActionBar.vue.d.ts +3 -0
  36. package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +2 -0
  37. package/dist/types/platform-components/ReferenceRecordDetailBrowser.vue.d.ts +10 -0
  38. package/dist/types/platform-components/actionControl.d.ts +28 -0
  39. package/dist/types/platform-components/adaptiveHeaderActionLayout.d.ts +4 -2
  40. package/dist/types/platform-components/index.d.ts +3 -2
  41. package/dist/types/platform-components/optionFieldOptionCache.d.ts +11 -1
  42. package/dist/types/platform-components/recordActionBarModel.d.ts +5 -0
  43. package/dist/types/platform-components/recordFormFieldModel.d.ts +1 -0
  44. package/dist/types/platform-components/referenceRecordDetailBrowser.d.ts +13 -1
  45. package/dist/types/platform-components/useWorkflowDesignSession.d.ts +141 -0
  46. package/dist/types/platform-components/workflowDesignEditing.d.ts +8 -7
  47. package/dist/types/platform-components/workflowDesignOperations.d.ts +107 -0
  48. package/dist/types/views/CodeRuleRecoveryPanel.vue.d.ts +20 -0
  49. package/dist/types/views/businessRuleGovernance.d.ts +1 -2
  50. package/dist/types/views/codeConfiguration.d.ts +29 -1
  51. package/dist/types/views/codeConfigurationAssistantSurface.d.ts +17 -0
  52. package/dist/types/views/codeRuleSaveRecovery.d.ts +12 -0
  53. package/dist/types/views/useCodeConfigurationAssistant.d.ts +10 -0
  54. package/dist/types/views/useCodeConfigurationSession.d.ts +16 -0
  55. package/dist/types/views/useWorkflowConfigurationAssistant.d.ts +16 -0
  56. package/dist/types/views/useWorkflowConfigurationContext.d.ts +16 -2
  57. package/dist/types/views/useWorkflowConfigurationSession.d.ts +146 -0
  58. package/dist/types/views/workflowConfigurationAssistantSurface.d.ts +169 -0
  59. package/dist/types/views/workflowSaveRecovery.d.ts +11 -0
  60. package/dist/types/vue-ui-antdv/components/sidePanelHost.d.ts +3 -1
  61. package/dist/types/vue-ui-antdv/index.d.ts +1 -0
  62. package/dist/types/web-core/formulaReferences.d.ts +2 -0
  63. package/dist/types/web-core/workflow.d.ts +11 -1
  64. package/dist/useWorkflowConfigurationContext-B9GigSF8.js +78 -0
  65. package/dist/{workspaceViews-D2Uh4KAq.js → workspaceViews-8-LaaGxD.js} +680 -680
  66. package/package.json +1 -1
  67. package/dist/BusinessLogListDrawer-BmF-14We.js +0 -868
  68. package/dist/CodeConfigurationView-DdPfBjoC.js +0 -1667
  69. package/dist/RoleDetailWorkspaceView-BuqRT0pd.js +0 -1435
  70. package/dist/WorkflowConfigurationView-Cku-F1Fm.js +0 -980
  71. package/dist/useWorkflowConfigurationContext-eQKyqe6_.js +0 -66
@@ -0,0 +1,28 @@
1
+ import type { Component } from 'vue';
2
+ /** A frontend-owned control, mounted once in the platform action bar. */
3
+ export interface ActionControl {
4
+ component: Component;
5
+ moduleAlias: string;
6
+ record: Readonly<Record<string, unknown>>;
7
+ sessionKey: string | number;
8
+ /** Identity of the owning page scope, including its tenant boundary. */
9
+ scopeKey: object;
10
+ active: boolean;
11
+ refresh(): void;
12
+ }
13
+ /** The component receives this read-only value as its `context` prop. */
14
+ export interface ActionControlContext {
15
+ actionKey: string;
16
+ title: string;
17
+ moduleAlias: string;
18
+ record: Readonly<Record<string, unknown>>;
19
+ sessionKey: string | number;
20
+ active: boolean;
21
+ disabled: boolean;
22
+ disabledReason?: string;
23
+ loading: boolean;
24
+ /** Aborted on inactivity, disablement, record/session changes and unmount. */
25
+ signal: AbortSignal;
26
+ /** Refreshes record data, action availability and its list while this session is usable. */
27
+ refresh(): void;
28
+ }
@@ -1,13 +1,15 @@
1
1
  /**
2
2
  * Business-facing action importance. The shell decides whether an action is
3
- * rendered directly or collected under "更多"; callers never declare a UI
4
- * placement.
3
+ * rendered directly or collected under "更多". Control adjacency is a separate
4
+ * constraint and does not promote a business operation's importance.
5
5
  */
6
6
  export type HeaderActionLevel = 'primary' | 'standard' | 'secondary';
7
7
  export interface HeaderActionLayoutItem {
8
8
  key: string;
9
9
  level?: HeaderActionLevel;
10
10
  width: number;
11
+ keepDirect?: boolean;
12
+ placement?: 'after-primary';
11
13
  }
12
14
  export interface HeaderActionLayout {
13
15
  directKeys: string[];
@@ -31,6 +31,7 @@ export { reconcileSelectedKey, reconcileSelectedKeys } from './selectionRefresh'
31
31
  export { MANAGEMENT_WORKSPACE_LAYOUT, listDetailWorkspaceMinWidth } from './managementWorkspaceLayout';
32
32
  export { providePageLayout, usePageLayout } from './pageLayoutContext';
33
33
  export { default as RecordActionBar } from './RecordActionBar.vue';
34
+ export type { ActionControl, ActionControlContext } from './actionControl';
34
35
  export { default as RecordQueryListSurface } from './RecordQueryListSurface.vue';
35
36
  export { default as RecordQueryEnumFilter } from './RecordQueryEnumFilter.vue';
36
37
  export { default as QueryGroupedSummary } from './QueryGroupedSummary.vue';
@@ -42,7 +43,7 @@ export { default as RecordDetailDrawer } from './RecordDetailDrawer.vue';
42
43
  export { default as ReferenceRecordDetailBrowser } from './ReferenceRecordDetailBrowser.vue';
43
44
  export { default as ReadonlyReferenceValue } from './ReadonlyReferenceValue.vue';
44
45
  export { createReferenceRecordDetailBrowser, provideReferenceRecordDetailBrowser, } from './referenceRecordDetailBrowser';
45
- export type { ReferenceRecordDetailBrowser as ReferenceRecordDetailBrowserState, ReferenceRecordDetailMutation, } from './referenceRecordDetailBrowser';
46
+ export type { ReferenceRecordDetailBrowser as ReferenceRecordDetailBrowserState, ReferenceRecordDetailMutation, ReferenceRecordOpenResult, ReferenceRecordOpenCheck, } from './referenceRecordDetailBrowser';
46
47
  export type { DrawerPromotion } from './drawerPromotion';
47
48
  export { default as RecordExternalChangeNotice } from './RecordExternalChangeNotice.vue';
48
49
  export { default as RecordDetailFields } from './RecordDetailFields.vue';
@@ -122,7 +123,7 @@ export { defaultActionIcon, mergeRecordActions, resolveRecordActions } from './r
122
123
  export { normalizeRecordDraft } from './recordDraftNormalizer';
123
124
  export { acceptedMediaTypes, appendUploadedFileReference, fileReferenceIds, issueFileReferenceUploadAccess, uploadedFileId, } from './fileReferenceTransfer';
124
125
  export { resolveRecordDetailDisplayValue } from './recordDetailFieldModel';
125
- export { loadOptionFieldItems } from './optionFieldOptionCache';
126
+ export { loadOptionFieldItems, optionFieldState, settleOptionFieldItems, type OptionFieldCandidateState, } from './optionFieldOptionCache';
126
127
  export { formatPlatformDateTime, resolveBrowserTimeZone } from './platformDateTime';
127
128
  export { formatPlatformFileSize } from './platformFileSize';
128
129
  export type { PlatformFileSizeDisplay, PlatformFileSizeOptions } from './platformFileSize';
@@ -1,3 +1,13 @@
1
1
  import type { OptionItemDescriptor } from '../web-contracts/index';
2
2
  import type { ModuleContext } from '../web-core/index';
3
- export declare function loadOptionFieldItems(context: Pick<ModuleContext<unknown>, 'moduleAlias' | 'http'>, fieldName: string, entityAlias?: string, moduleAlias?: string, forceRefresh?: boolean): Promise<OptionItemDescriptor[]>;
3
+ type OptionContext = Pick<ModuleContext<unknown>, 'moduleAlias' | 'http'>;
4
+ export interface OptionFieldCandidateState {
5
+ status: 'idle' | 'loading' | 'ready' | 'error';
6
+ items: OptionItemDescriptor[];
7
+ }
8
+ /** Reactive read access; reading candidates never initiates an assistant-specific request. */
9
+ export declare function optionFieldState(context: OptionContext, fieldName: string, entityAlias?: string, moduleAlias?: string): Readonly<OptionFieldCandidateState>;
10
+ export declare function loadOptionFieldItems(context: OptionContext, fieldName: string, entityAlias?: string, moduleAlias?: string, forceRefresh?: boolean): Promise<OptionItemDescriptor[]>;
11
+ /** Wait for the standard editor's current loads, without starting or cancelling shared requests. */
12
+ export declare function settleOptionFieldItems(context: OptionContext, fieldNames: string[], signal: AbortSignal, entityAlias?: string): Promise<void>;
13
+ export {};
@@ -1,7 +1,12 @@
1
1
  import { type LanguageContext } from '../web-core/index';
2
2
  import type { ModuleContext } from '../web-core/index';
3
3
  import type { UiIconName } from '../vue-ui-antdv/index';
4
+ import type { ActionControl } from './actionControl';
4
5
  export interface RecordActionItem {
6
+ /** Frontend-only interactive presentation; never converted to a menu click. */
7
+ control?: ActionControl;
8
+ /** Follow the first visible primary action; append if no primary action exists. */
9
+ placement?: 'after-primary';
5
10
  key?: string;
6
11
  actionCode?: string;
7
12
  title: string;
@@ -124,6 +124,7 @@ export interface RecordFormFieldState {
124
124
  hasOption: boolean;
125
125
  optionSelectionMode?: 'SINGLE' | 'MULTIPLE';
126
126
  optionTitleField?: string;
127
+ optionLoadStatus?: 'idle' | 'loading' | 'ready' | 'error';
127
128
  optionItems?: import('../web-contracts/index').OptionItemDescriptor[];
128
129
  referenceTitleField?: string;
129
130
  /** The compiled reference contract remains available to read-only detail and list renderers. */
@@ -18,6 +18,16 @@ export type ReferenceRecordDetailMutation = {
18
18
  type: 'saved' | 'deleted' | 'unavailable';
19
19
  record?: QueryListRecord;
20
20
  };
21
+ /** `loaded` reports data readiness, not a DOM visibility or animation acknowledgement. */
22
+ export type ReferenceRecordOpenResult = {
23
+ status: 'loaded';
24
+ } | {
25
+ status: 'rejected';
26
+ reason: 'missing-host' | 'invalid-target' | 'access-denied' | 'busy' | 'leave-blocked' | 'superseded' | 'not-found' | 'load-failed';
27
+ };
28
+ export type ReferenceRecordOpenCheck = () => Extract<ReferenceRecordOpenResult, {
29
+ status: 'rejected';
30
+ }> | undefined;
21
31
  export interface ReferenceRecordDetailBrowser {
22
32
  revision: {
23
33
  value: number;
@@ -35,7 +45,9 @@ export interface ReferenceRecordDetailBrowser {
35
45
  value: string;
36
46
  };
37
47
  canBrowse(targetModuleAlias: string, recordId: string): boolean;
38
- open(targetModuleAlias: string, recordId: string): Promise<void>;
48
+ open(targetModuleAlias: string, recordId: string): Promise<ReferenceRecordOpenResult>;
49
+ /** Presentation adapters register readiness here so every open entry uses the same gate. */
50
+ setBeforeOpen(check: ReferenceRecordOpenCheck): () => void;
39
51
  /** Registers the owning full surface's leave authority. */
40
52
  setBeforeLeave(guard: () => boolean | Promise<boolean>): () => void;
41
53
  confirmLeave(): boolean | Promise<boolean>;
@@ -0,0 +1,141 @@
1
+ import type { WorkflowDesign, WorkflowNode, WorkflowRoute } from '../web-contracts/index';
2
+ import { prepareWorkflowDesignOperations, type WorkflowDesignOperationBatch } from './workflowDesignOperations';
3
+ /** Shared draft ownership, independent of canvas, properties and assistant entry points. */
4
+ export declare function useWorkflowDesignSession(): {
5
+ design: import("vue").Ref<{
6
+ nodes: {
7
+ nodeTitleText?: {
8
+ source: {
9
+ sourceKind: "CODE" | "CONFIG";
10
+ sourceId: string;
11
+ sourceVersion: string;
12
+ originalText: string;
13
+ };
14
+ languages: Record<string, {
15
+ text: string;
16
+ requestedTag: string;
17
+ resourceTag?: string | null;
18
+ missing: boolean;
19
+ fallback: boolean;
20
+ }>;
21
+ } | undefined;
22
+ id?: string | undefined;
23
+ version?: number | undefined;
24
+ nodeKey: string;
25
+ title?: string | undefined;
26
+ nodeTitle?: string | undefined;
27
+ nodeType: string;
28
+ nodeStatus?: string | undefined;
29
+ approvalMode?: string | undefined;
30
+ approvalRatio?: number | undefined;
31
+ participantPolicyText?: string | undefined;
32
+ milestoneType?: string | undefined;
33
+ routeMode?: string | undefined;
34
+ selectorNodeKey?: string | undefined;
35
+ convergeNodeKey?: string | undefined;
36
+ convergeMode?: string | undefined;
37
+ convergeRatio?: number | undefined;
38
+ requireManualSelectionReason?: boolean | undefined;
39
+ allowReject?: boolean | undefined;
40
+ autoApproveSameUser?: boolean | undefined;
41
+ requireRejectReason?: boolean | undefined;
42
+ allowRejectReturnToMe?: boolean | undefined;
43
+ allowRollback?: boolean | undefined;
44
+ requireRollbackReason?: boolean | undefined;
45
+ allowAddSign?: boolean | undefined;
46
+ warningDurationMinutes?: number | undefined;
47
+ overtimeDurationMinutes?: number | undefined;
48
+ taskDefinitionId?: string | undefined;
49
+ nodeConfigText?: string | undefined;
50
+ }[];
51
+ links: {
52
+ id?: string | undefined;
53
+ routeKey: string;
54
+ sourceNodeKey: string;
55
+ targetNodeKey: string;
56
+ title?: string | undefined;
57
+ conditionExpression?: string | undefined;
58
+ defaultRoute?: boolean | undefined;
59
+ routeStatus?: string | undefined;
60
+ routeReason?: string | undefined;
61
+ selectedReason?: string | undefined;
62
+ }[];
63
+ layoutJson?: string | undefined;
64
+ }, WorkflowDesign | {
65
+ nodes: {
66
+ nodeTitleText?: {
67
+ source: {
68
+ sourceKind: "CODE" | "CONFIG";
69
+ sourceId: string;
70
+ sourceVersion: string;
71
+ originalText: string;
72
+ };
73
+ languages: Record<string, {
74
+ text: string;
75
+ requestedTag: string;
76
+ resourceTag?: string | null;
77
+ missing: boolean;
78
+ fallback: boolean;
79
+ }>;
80
+ } | undefined;
81
+ id?: string | undefined;
82
+ version?: number | undefined;
83
+ nodeKey: string;
84
+ title?: string | undefined;
85
+ nodeTitle?: string | undefined;
86
+ nodeType: string;
87
+ nodeStatus?: string | undefined;
88
+ approvalMode?: string | undefined;
89
+ approvalRatio?: number | undefined;
90
+ participantPolicyText?: string | undefined;
91
+ milestoneType?: string | undefined;
92
+ routeMode?: string | undefined;
93
+ selectorNodeKey?: string | undefined;
94
+ convergeNodeKey?: string | undefined;
95
+ convergeMode?: string | undefined;
96
+ convergeRatio?: number | undefined;
97
+ requireManualSelectionReason?: boolean | undefined;
98
+ allowReject?: boolean | undefined;
99
+ autoApproveSameUser?: boolean | undefined;
100
+ requireRejectReason?: boolean | undefined;
101
+ allowRejectReturnToMe?: boolean | undefined;
102
+ allowRollback?: boolean | undefined;
103
+ requireRollbackReason?: boolean | undefined;
104
+ allowAddSign?: boolean | undefined;
105
+ warningDurationMinutes?: number | undefined;
106
+ overtimeDurationMinutes?: number | undefined;
107
+ taskDefinitionId?: string | undefined;
108
+ nodeConfigText?: string | undefined;
109
+ }[];
110
+ links: {
111
+ id?: string | undefined;
112
+ routeKey: string;
113
+ sourceNodeKey: string;
114
+ targetNodeKey: string;
115
+ title?: string | undefined;
116
+ conditionExpression?: string | undefined;
117
+ defaultRoute?: boolean | undefined;
118
+ routeStatus?: string | undefined;
119
+ routeReason?: string | undefined;
120
+ selectedReason?: string | undefined;
121
+ }[];
122
+ layoutJson?: string | undefined;
123
+ }>;
124
+ history: {
125
+ checkpoint(): () => boolean;
126
+ canUndo: import("vue").ComputedRef<boolean>;
127
+ canRedo: import("vue").ComputedRef<boolean>;
128
+ dirty: import("vue").ComputedRef<boolean>;
129
+ undo: () => void;
130
+ redo: () => void;
131
+ markSaved: () => void;
132
+ reset: (value: WorkflowDesign, persisted?: WorkflowDesign) => void;
133
+ };
134
+ updateNode: (key: string, patch: Partial<WorkflowNode>) => void;
135
+ updateRoute: (key: string, patch: Partial<WorkflowRoute>) => void;
136
+ prepare: (batch: WorkflowDesignOperationBatch, fields: Parameters<typeof prepareWorkflowDesignOperations>[2], current: () => boolean) => () => {
137
+ changes: string[];
138
+ created: Record<string, Record<string, string>>;
139
+ diagnostics: import("./workflowDesignOperations").WorkflowDraftDiagnostics;
140
+ };
141
+ };
@@ -1,11 +1,12 @@
1
+ import { type LanguageContext } from '../web-core/index';
1
2
  import type { WorkflowDesign, WorkflowNode, WorkflowRoute } from '../web-contracts/index';
2
3
  export declare function createWorkflowApprovalNode(nodeKey: string, title: string): WorkflowNode;
3
4
  /** A branch and its convergence are one editable business structure. */
4
- export declare function insertWorkflowBranch(design: WorkflowDesign, routeKey: string, key: string): WorkflowDesign;
5
- export declare function appendWorkflowBranchPath(design: WorkflowDesign, branchKey: string, key: string): WorkflowDesign;
6
- export declare function removeWorkflowBranch(design: WorkflowDesign, branchKey: string): WorkflowDesign;
7
- export declare function updateWorkflowRoute(design: WorkflowDesign, routeKey: string, patch: Partial<WorkflowRoute>): WorkflowDesign;
5
+ export declare function insertWorkflowBranch(design: WorkflowDesign, routeKey: string, key: string, language?: LanguageContext): WorkflowDesign;
6
+ export declare function appendWorkflowBranchPath(design: WorkflowDesign, branchKey: string, key: string, language?: LanguageContext): WorkflowDesign;
7
+ export declare function removeWorkflowBranch(design: WorkflowDesign, branchKey: string, language?: LanguageContext): WorkflowDesign;
8
+ export declare function updateWorkflowRoute(design: WorkflowDesign, routeKey: string, patch: Partial<WorkflowRoute>, language?: LanguageContext): WorkflowDesign;
8
9
  /** Edits the semantic graph; coordinates never decide workflow structure. */
9
- export declare function insertWorkflowNode(design: WorkflowDesign, routeKey: string, node: WorkflowNode): WorkflowDesign;
10
- export declare function removeWorkflowNode(design: WorkflowDesign, nodeKey: string): WorkflowDesign;
11
- export declare function createWorkflowDesign(approval: boolean): WorkflowDesign;
10
+ export declare function insertWorkflowNode(design: WorkflowDesign, routeKey: string, node: WorkflowNode, language?: LanguageContext): WorkflowDesign;
11
+ export declare function removeWorkflowNode(design: WorkflowDesign, nodeKey: string, language?: LanguageContext): WorkflowDesign;
12
+ export declare function createWorkflowDesign(approval: boolean, language?: LanguageContext): WorkflowDesign;
@@ -0,0 +1,107 @@
1
+ import { type LanguageContext } from '../web-core/index';
2
+ import type { AssistantFieldPolicy, WorkflowDesign } from '../web-contracts/index';
3
+ export interface WorkflowParticipantField {
4
+ name: string;
5
+ label?: string;
6
+ referenceModule?: string;
7
+ assistantPolicy?: AssistantFieldPolicy;
8
+ fieldControl?: {
9
+ alias?: string;
10
+ };
11
+ }
12
+ /** The complete manual directory remains authoritative; only automatic assistant projection is restricted. */
13
+ export declare function workflowParticipantFieldVisible(field: WorkflowParticipantField): boolean;
14
+ /** Derived configuration may expose only field references declared visible in the current directory. */
15
+ export declare function workflowAssistantExpressionVisible(expression: string | undefined, fields: readonly WorkflowParticipantField[]): boolean;
16
+ export type WorkflowDraftReference = string | {
17
+ created: string;
18
+ part: string;
19
+ };
20
+ export type WorkflowDraftParticipant = {
21
+ type: 'INITIATOR_SELF';
22
+ } | {
23
+ type: 'FIELD';
24
+ fieldName: string;
25
+ } | {
26
+ type: 'RELATIVE';
27
+ relation: 'SUPERVISOR';
28
+ depth: number;
29
+ fieldName?: string;
30
+ };
31
+ export interface WorkflowNodeDraftPatch {
32
+ title?: string;
33
+ approvalMode?: 'all' | 'any' | 'ratio' | 'notice';
34
+ approvalRatio?: number;
35
+ participants?: WorkflowDraftParticipant[];
36
+ milestoneType?: 'approval_completed';
37
+ }
38
+ export type WorkflowDesignOperation = {
39
+ op: 'insert-node';
40
+ as: string;
41
+ route: WorkflowDraftReference;
42
+ node: WorkflowNodeDraftPatch & {
43
+ kind: 'approval' | 'notice' | 'milestone';
44
+ title: string;
45
+ };
46
+ } | {
47
+ op: 'update-node';
48
+ node: WorkflowDraftReference;
49
+ patch: WorkflowNodeDraftPatch;
50
+ } | {
51
+ op: 'delete-node';
52
+ node: WorkflowDraftReference;
53
+ } | {
54
+ op: 'insert-branch';
55
+ as: string;
56
+ route: WorkflowDraftReference;
57
+ title?: string;
58
+ } | {
59
+ op: 'append-path';
60
+ as: string;
61
+ branch: WorkflowDraftReference;
62
+ } | {
63
+ op: 'delete-branch';
64
+ branch: WorkflowDraftReference;
65
+ } | {
66
+ op: 'update-branch';
67
+ branch: WorkflowDraftReference;
68
+ patch: {
69
+ title?: string;
70
+ routeMode?: 'auto' | 'manual';
71
+ selectorNode?: WorkflowDraftReference;
72
+ requireManualSelectionReason?: boolean;
73
+ convergeMode?: 'all' | 'any' | 'ratio';
74
+ convergeRatio?: number;
75
+ };
76
+ } | {
77
+ op: 'update-route';
78
+ route: WorkflowDraftReference;
79
+ patch: {
80
+ title?: string;
81
+ conditionExpression?: string;
82
+ defaultRoute?: boolean;
83
+ };
84
+ };
85
+ export interface WorkflowDesignOperationBatch {
86
+ operations: WorkflowDesignOperation[];
87
+ }
88
+ export declare function workflowDesignOperationsSchema(): Record<string, unknown>;
89
+ export declare function parseWorkflowDesignOperations(input: unknown, language?: LanguageContext): WorkflowDesignOperationBatch;
90
+ export interface WorkflowDraftDiagnostics {
91
+ valid: boolean;
92
+ errors: string[];
93
+ warnings: string[];
94
+ truncated: boolean;
95
+ formulaCheck: 'requires-server-validation';
96
+ publishedValidation: false;
97
+ }
98
+ /** Local diagnostics describe an incomplete editable draft, never formal publish readiness. */
99
+ export declare function diagnoseWorkflowDraft(design: WorkflowDesign, fields?: readonly WorkflowParticipantField[], language?: LanguageContext): WorkflowDraftDiagnostics;
100
+ /** Pure preparation: all operations succeed before the caller publishes one history entry. */
101
+ export declare function prepareWorkflowDesignOperations(design: WorkflowDesign, input: WorkflowDesignOperationBatch, fields?: readonly WorkflowParticipantField[], language?: LanguageContext): {
102
+ design: WorkflowDesign;
103
+ changes: string[];
104
+ created: Record<string, Record<string, string>>;
105
+ diagnostics: WorkflowDraftDiagnostics;
106
+ };
107
+ export declare function workflowDesignChangeLines(before: WorkflowDesign, after: WorkflowDesign, language?: LanguageContext): string[];
@@ -0,0 +1,20 @@
1
+ import type { CodeRule, CodeTarget } from './codeConfiguration';
2
+ type __VLS_Props = {
3
+ rule?: CodeRule;
4
+ target?: CodeTarget;
5
+ busy: boolean;
6
+ resolved: boolean;
7
+ feedback: string;
8
+ error: string;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ check: () => any;
12
+ abandon: () => any;
13
+ adopt: () => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onCheck?: (() => any) | undefined;
16
+ onAbandon?: (() => any) | undefined;
17
+ onAdopt?: (() => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  import { type LanguageContext, type OperationErrorMessage } from '../web-core/index';
2
2
  import type { TextPresentation } from '../web-contracts/index';
3
+ export { referencedFormulaFields } from '../web-core/formulaReferences';
3
4
  export type BusinessRuleKind = 'CALCULATION' | 'VALIDATION' | 'UI_CONTROL';
4
5
  /** Save-validation behavior shared by manual editing and assistant rule inputs. */
5
6
  export declare const businessRuleValidationHelp = "\u516C\u5F0F\u4E3A\u771F\u65F6\u5141\u8BB8\u4FDD\u5B58\uFF0C\u4E3A\u5047\u65F6\u963B\u6B62\u4FDD\u5B58\u5E76\u663E\u793A\u5931\u8D25\u63D0\u793A\uFF1B\u5F53\u524D\u7F16\u8F91\u5668\u4E0D\u652F\u6301\u53EA\u63D0\u9192\u800C\u4ECD\u5141\u8BB8\u4FDD\u5B58\u7684\u89C4\u5219\u3002";
@@ -204,8 +205,6 @@ export declare function typedSampleValue(value: string, valueType: string): unkn
204
205
  * immediately after the inserted text, including when a selected range was replaced.
205
206
  */
206
207
  export declare function insertFormulaText(expression: string, selectionStart: number | undefined, selectionEnd: number | undefined, text: string): FormulaInsertion;
207
- /** Reads only real field tokens; references inside string literals are formula text, not dependencies. */
208
- export declare function referencedFormulaFields(expression: string): string[];
209
208
  /** Replaces only executable field tokens with their business names for read-only UI summaries. */
210
209
  export declare function presentableFormulaExpression(expression: string, fields: readonly BusinessRuleEditableField[]): string;
211
210
  /**
@@ -66,6 +66,8 @@ export interface CodeSegment {
66
66
  sortOrder: number;
67
67
  mappings: CodeMapping[];
68
68
  }
69
+ /** Check source references against the current catalog without evaluating formulas. */
70
+ export declare function codeSegmentSourcesVisible(segment: CodeSegment, sources: ReadonlySet<string>): boolean;
69
71
  export interface CodeSequencePolicy {
70
72
  id?: string;
71
73
  version?: number;
@@ -111,6 +113,9 @@ export declare function newCodeSequence(): CodeSequencePolicy;
111
113
  export declare function newCodeRule(target: CodeTarget, field: CodeField): CodeRule;
112
114
  /** Match the rule's supported dependency kinds without parsing formula expressions in the browser. */
113
115
  export declare function codeRuleSupportsRenumbering(rule: CodeRule): boolean;
116
+ /** Validate the active draft without discarding temporarily inactive editor values. */
117
+ export declare function validateCodeRuleDraft(rule: CodeRule, language?: LanguageContext): void;
118
+ /** Normalize only at the save/preview boundary, never while editing a candidate. */
114
119
  export declare function prepareCodeRule(rule: CodeRule, language?: LanguageContext): CodeRule;
115
120
  /** Direct inputs only; formula samples can be added from the source catalog without parsing formulas in the browser. */
116
121
  export declare function codeTrialSources(target: CodeTarget, rule?: CodeRule): CodeSource[];
@@ -122,6 +127,29 @@ export declare function createCodeConfigurationClient(http: HttpClient, language
122
127
  targets: (moduleAlias?: string) => Promise<CodeTarget[]>;
123
128
  rules: (target: CodeTarget) => Promise<CodeRule[]>;
124
129
  bind(target: CodeTarget, field: CodeField, role: CodeRole | null, trigger: CodeTrigger): Promise<CodeTarget>;
125
- save(rule: CodeRule): Promise<CodeRule>;
130
+ save(rule: CodeRule, requestId?: string): Promise<CodeRule>;
131
+ view: (id: string) => Promise<CodeRule>;
132
+ receipt: (reference: {
133
+ requestId: string;
134
+ moduleAlias: string;
135
+ entityAlias: string;
136
+ fieldName: string;
137
+ }) => Promise<{
138
+ committed: boolean;
139
+ cancelled: boolean;
140
+ ruleId: string | null;
141
+ savedVersion: number | null;
142
+ }>;
143
+ abandon: (reference: {
144
+ requestId: string;
145
+ moduleAlias: string;
146
+ entityAlias: string;
147
+ fieldName: string;
148
+ }) => Promise<{
149
+ committed: boolean;
150
+ cancelled: boolean;
151
+ ruleId: string | null;
152
+ savedVersion: number | null;
153
+ }>;
126
154
  preview(rule: CodeRule, context: Record<string, unknown>, sequenceValue: number, signal?: AbortSignal): Promise<CodePreview>;
127
155
  };
@@ -0,0 +1,17 @@
1
+ import { type AssistantSurface, type AssistantTurnRequester } from '../web-core/index';
2
+ import { type CodeRule, type CodeTarget, type CodePreview } from './codeConfiguration';
3
+ export interface CodeConfigurationAssistantAdapter {
4
+ state(): {
5
+ ready: boolean;
6
+ previewable?: boolean;
7
+ editable: boolean;
8
+ busy: boolean;
9
+ dirty: boolean;
10
+ recoveryRequired: boolean;
11
+ draft?: CodeRule;
12
+ target?: CodeTarget;
13
+ };
14
+ prepare(patch: Record<string, unknown>, current: () => boolean): () => unknown;
15
+ trial(signal: AbortSignal, current: () => boolean): Promise<CodePreview>;
16
+ }
17
+ export declare function createCodeConfigurationAssistantSurface(adapter: CodeConfigurationAssistantAdapter, requestTurn: AssistantTurnRequester): AssistantSurface;
@@ -0,0 +1,12 @@
1
+ export interface CodeRuleSaveReference {
2
+ requestId: string;
3
+ moduleAlias: string;
4
+ entityAlias: string;
5
+ fieldName: string;
6
+ ruleId?: string;
7
+ }
8
+ export declare function codeRuleSaveRecovery(scope: string, storage: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>): {
9
+ restore: () => CodeRuleSaveReference | undefined;
10
+ save(value: CodeRuleSaveReference): void;
11
+ clear(requestId: string): void;
12
+ };
@@ -0,0 +1,10 @@
1
+ import { type HttpClient } from '../web-core/index';
2
+ import { type CodeConfigurationAssistantAdapter } from './codeConfigurationAssistantSurface';
3
+ export declare function useCodeConfigurationAssistant(options: {
4
+ http: HttpClient;
5
+ scopedHttp(): HttpClient;
6
+ scope(): string;
7
+ revision(): string;
8
+ active(): boolean;
9
+ adapter: CodeConfigurationAssistantAdapter;
10
+ }): void;
@@ -0,0 +1,16 @@
1
+ import { type CodeRule, type CodeTarget } from './codeConfiguration';
2
+ import { type LanguageContext } from '../web-core/index';
3
+ /** The editor and assistant own one candidate and one saved baseline. */
4
+ export declare function useCodeConfigurationSession(language: LanguageContext): {
5
+ draft: import("vue").Ref<CodeRule | undefined, CodeRule | undefined>;
6
+ original: import("vue").Ref<string, string>;
7
+ active: import("vue").Ref<boolean, boolean>;
8
+ dirty: import("vue").ComputedRef<boolean>;
9
+ recoveryRequired: import("vue").Ref<boolean, boolean>;
10
+ reset: (rule?: CodeRule) => void;
11
+ prepare: (patch: Record<string, unknown>, target: CodeTarget, current: () => boolean) => () => {
12
+ changedFields: string[];
13
+ unsaved: boolean;
14
+ saved: boolean;
15
+ };
16
+ };
@@ -0,0 +1,16 @@
1
+ import { type HttpClient } from '../web-core/index';
2
+ import { type WorkflowConfigurationAssistantAdapter } from './workflowConfigurationAssistantSurface';
3
+ import type { useWorkflowConfigurationSession } from './useWorkflowConfigurationSession';
4
+ /** Page-instance lifecycle and fresh server action facts; never conversation history authority. */
5
+ export declare function useWorkflowConfigurationAssistant(options: {
6
+ session: Pick<ReturnType<typeof useWorkflowConfigurationSession>, 'scope' | 'active'>;
7
+ http: HttpClient;
8
+ definitionId(): string;
9
+ adapter: WorkflowConfigurationAssistantAdapter;
10
+ revision(): string;
11
+ interactionRevision(): string;
12
+ }): {
13
+ readable: import("vue").Ref<boolean, boolean>;
14
+ writable: import("vue").Ref<boolean, boolean>;
15
+ accessLoading: import("vue").Ref<boolean, boolean>;
16
+ };
@@ -1,5 +1,6 @@
1
+ import { type MaybeRefOrGetter } from 'vue';
1
2
  /** Shared module facts and formula assistance for definition management and design. */
2
- export declare function useWorkflowConfigurationContext(moduleAlias: string): {
3
+ export declare function useWorkflowConfigurationContext(moduleAlias: MaybeRefOrGetter<string>): {
3
4
  context: import("../web-core/index").ModuleContext<unknown>;
4
5
  client: {
5
6
  formulaFunctions: () => Promise<{
@@ -22,17 +23,30 @@ export declare function useWorkflowConfigurationContext(moduleAlias: string): {
22
23
  upgrade: (id: string) => Promise<import("../web-contracts").WorkflowVersion>;
23
24
  saveSelection: (id: string, payload: import("../web-contracts").WorkflowDefinitionSelection) => Promise<import("../web-contracts").WorkflowDefinition>;
24
25
  design: (id: string, versionId: string) => Promise<import("../web-contracts").WorkflowDesign>;
25
- saveDesign: (id: string, versionId: string, expectedVersion: number, design: import("../web-contracts").WorkflowDesign) => Promise<import("../web-contracts").WorkflowVersion>;
26
+ saveDesign: (id: string, versionId: string, expectedVersion: number, design: import("../web-contracts").WorkflowDesign, requestId?: string) => Promise<import("../web-contracts").WorkflowVersion>;
27
+ saveReceipt: (id: string, versionId: string, requestId: string) => Promise<{
28
+ committed: boolean;
29
+ cancelled: boolean;
30
+ savedVersion: number | null;
31
+ }>;
32
+ abandonSave: (id: string, versionId: string, requestId: string) => Promise<{
33
+ committed: boolean;
34
+ cancelled: boolean;
35
+ savedVersion: number | null;
36
+ }>;
26
37
  validate: (id: string, versionId: string) => Promise<unknown>;
27
38
  publish: (id: string, versionId: string, definitionVersion: number, expectedVersion: number) => Promise<import("../web-contracts").WorkflowVersion>;
28
39
  changeStatus: (id: string, action: "enable" | "disable" | "archive", expectedVersion: number) => Promise<import("../web-contracts").WorkflowDefinition>;
29
40
  };
30
41
  language: import("../web-core/index").LanguageContext;
31
42
  businessRuntime: import("vue").ComputedRef<import("../web-core/index").ModuleRuntimeContext | undefined>;
43
+ businessLoading: import("vue").ComputedRef<boolean>;
32
44
  fields: import("vue").ComputedRef<{
33
45
  name: string;
34
46
  label: string;
35
47
  valueType: import("../web-contracts").ViewFieldValueType | undefined;
48
+ assistantPolicy: import("../web-contracts").AssistantFieldPolicy | undefined;
49
+ fieldControl: import("../web-contracts").ResolvedFieldControlDescriptor | undefined;
36
50
  referenceModule: string | undefined;
37
51
  }[]>;
38
52
  organizationContext: import("vue").ComputedRef<import("../web-core/index").ModuleContext<Record<string, unknown>> | undefined>;