@ximatai/muyun-web-app 0.26.11 → 0.26.12

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 (142) hide show
  1. package/dist/ModuleActionManagementView-BHEooZ5L.js +672 -0
  2. package/dist/ModuleGovernanceView-DB3TWlMy.js +28521 -0
  3. package/dist/{RoleDetailWorkspaceView-UOm1ejGH.js → RoleDetailWorkspaceView-D6X7pAj5.js} +467 -457
  4. package/dist/index.css +1 -1
  5. package/dist/index.js +1942 -359
  6. package/dist/moduleGovernanceWorkspaceView-C5pqJOEJ.js +40 -0
  7. package/dist/platform-workbench-DJj42YQP.js +22911 -0
  8. package/dist/rolldown-runtime-DPVXH0ON.js +17 -0
  9. package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +0 -2
  10. package/dist/types/app/LoginView.vue.d.ts +1 -1
  11. package/dist/types/app/workbenchRouteSync.d.ts +10 -1
  12. package/dist/types/app/workbenchSessionTabs.d.ts +22 -0
  13. package/dist/types/app/workbenchStartup.d.ts +7 -0
  14. package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +4 -1
  15. package/dist/types/consumer/index.d.ts +1 -0
  16. package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +1 -1
  17. package/dist/types/dynamic-page-runtime/ModulePageHost.vue.d.ts +12 -1
  18. package/dist/types/dynamic-page-runtime/ModuleRecordDetailActions.vue.d.ts +17 -0
  19. package/dist/types/dynamic-page-runtime/NavigatorPanelActions.vue.d.ts +22 -0
  20. package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +11 -11
  21. package/dist/types/dynamic-page-runtime/childAggregateContext.d.ts +11 -0
  22. package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +80 -26
  23. package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +1 -1
  24. package/dist/types/dynamic-page-runtime/formActionResult.d.ts +5 -0
  25. package/dist/types/dynamic-page-runtime/formComputeCoordinator.d.ts +7 -4
  26. package/dist/types/dynamic-page-runtime/formValidationCoordinator.d.ts +17 -0
  27. package/dist/types/dynamic-page-runtime/index.d.ts +1 -1
  28. package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +6 -0
  29. package/dist/types/dynamic-page-runtime/pageActionInvocation.d.ts +7 -0
  30. package/dist/types/dynamic-page-runtime/pageActionPlacement.d.ts +14 -0
  31. package/dist/types/dynamic-page-runtime/recordMutationPayload.d.ts +3 -0
  32. package/dist/types/formula/FormulaRuntime.d.ts +6 -0
  33. package/dist/types/platform-admin-runtime/module-menu/ModuleMenuDrawer.vue.d.ts +7 -0
  34. package/dist/types/platform-admin-runtime/module-menu/ModuleMenuEntriesSection.vue.d.ts +7 -0
  35. package/dist/types/platform-admin-runtime/module-menu/moduleMenuClient.d.ts +16 -0
  36. package/dist/types/platform-admin-runtime/platformModulePageEnhancement.d.ts +2 -0
  37. package/dist/types/platform-components/AdaptiveHeaderActionBar.vue.d.ts +24 -0
  38. package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +15 -1
  39. package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +8 -3
  40. package/dist/types/platform-components/DetailRelationListPanel.vue.d.ts +1 -1
  41. package/dist/types/platform-components/FormulaExpressionEditor.vue.d.ts +54 -0
  42. package/dist/types/platform-components/ManagementExplorerColumn.vue.d.ts +15 -3
  43. package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +5 -3
  44. package/dist/types/platform-components/ManagementWorkspace.vue.d.ts +11 -0
  45. package/dist/types/platform-components/ModuleActionButton.vue.d.ts +3 -3
  46. package/dist/types/platform-components/QueryGroupedSummary.vue.d.ts +21 -0
  47. package/dist/types/platform-components/RecordDetailExtensionSection.vue.d.ts +2 -0
  48. package/dist/types/platform-components/RecordDetailFields.vue.d.ts +41 -2
  49. package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +4 -1
  50. package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +2 -0
  51. package/dist/types/platform-components/RecordExplorerCreateButton.vue.d.ts +16 -0
  52. package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +16 -5
  53. package/dist/types/platform-components/RecordFieldLabel.vue.d.ts +16 -0
  54. package/dist/types/platform-components/RecordFormFields.vue.d.ts +21 -2
  55. package/dist/types/platform-components/RecordFormGrid.vue.d.ts +24 -0
  56. package/dist/types/platform-components/RecordListExplorer.vue.d.ts +23 -1
  57. package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +1 -1
  58. package/dist/types/platform-components/RecordPanelButton.vue.d.ts +9 -3
  59. package/dist/types/platform-components/RecordPermissionDialog.vue.d.ts +15 -0
  60. package/dist/types/platform-components/RecordPicker.vue.d.ts +1 -1
  61. package/dist/types/platform-components/RecordQueryEnumFilter.vue.d.ts +17 -0
  62. package/dist/types/platform-components/RecordQueryListCell.vue.d.ts +12 -0
  63. package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +104 -61
  64. package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +124 -0
  65. package/dist/types/platform-components/RecordRelationTable.vue.d.ts +62 -0
  66. package/dist/types/platform-components/RecordRelationValue.vue.d.ts +9 -0
  67. package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +3 -3
  68. package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +2 -0
  69. package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +14 -3
  70. package/dist/types/platform-components/adaptiveHeaderActionLayout.d.ts +22 -0
  71. package/dist/types/platform-components/formulaExpressionTokens.d.ts +18 -0
  72. package/dist/types/platform-components/index.d.ts +20 -1
  73. package/dist/types/platform-components/managementExplorerContext.d.ts +11 -0
  74. package/dist/types/platform-components/managementWorkspaceContext.d.ts +20 -0
  75. package/dist/types/platform-components/managementWorkspaceLayout.d.ts +14 -0
  76. package/dist/types/platform-components/optionFieldOptionCache.d.ts +1 -1
  77. package/dist/types/platform-components/recordActionBarModel.d.ts +3 -0
  78. package/dist/types/platform-components/recordQueryListColumnModel.d.ts +42 -0
  79. package/dist/types/platform-components/selectionRefresh.d.ts +9 -0
  80. package/dist/types/platform-components/sortPartitionKey.d.ts +5 -0
  81. package/dist/types/platform-workbench/index.d.ts +2 -0
  82. package/dist/types/platform-workbench/useWorkspaceViewUnsavedState.d.ts +5 -0
  83. package/dist/types/platform-workbench/workbenchNavigation.d.ts +5 -1
  84. package/dist/types/platform-workbench/workspaceViewContract.d.ts +5 -0
  85. package/dist/types/platform-workbench/workspaceViewHost.d.ts +5 -0
  86. package/dist/types/platform-workbench/workspaceViewNavigation.d.ts +9 -0
  87. package/dist/types/platform-workbench/workspaceViewUnsavedState.d.ts +3 -0
  88. package/dist/types/views/BusinessRuleGovernanceSurface.vue.d.ts +10 -0
  89. package/dist/types/views/MetadataGovernanceSurface.vue.d.ts +8 -0
  90. package/dist/types/views/MetadataSourceTree.vue.d.ts +44 -0
  91. package/dist/types/views/ModuleBusinessPreview.vue.d.ts +7 -0
  92. package/dist/types/views/ModuleExperienceProfileOverview.vue.d.ts +7 -0
  93. package/dist/types/views/ModuleGovernanceView.vue.d.ts +9 -0
  94. package/dist/types/views/PageCompositionDescriptorPreview.vue.d.ts +54 -0
  95. package/dist/types/views/PageCompositionTree.vue.d.ts +103 -0
  96. package/dist/types/views/PageCompositionWorkspace.vue.d.ts +7 -0
  97. package/dist/types/views/PageQuerySummaryEditor.vue.d.ts +48 -0
  98. package/dist/types/views/businessRuleGovernance.d.ts +201 -0
  99. package/dist/types/views/metadataModelEditSession.d.ts +75 -0
  100. package/dist/types/views/metadataModelTree.d.ts +40 -0
  101. package/dist/types/views/metadataNaming.d.ts +7 -0
  102. package/dist/types/views/metadataOrchestrationState.d.ts +161 -6
  103. package/dist/types/views/metadataSourceTree.d.ts +10 -0
  104. package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +9 -0
  105. package/dist/types/views/pageCompositionDraftState.d.ts +375 -0
  106. package/dist/types/views/pageCompositionDragPayload.d.ts +26 -0
  107. package/dist/types/views/pageCompositionMode.d.ts +86 -0
  108. package/dist/types/views/pageCompositionPlacement.d.ts +48 -0
  109. package/dist/types/views/pageCompositionTransport.d.ts +9 -0
  110. package/dist/types/views/usePageCompositionActionPreviewDrag.d.ts +41 -0
  111. package/dist/types/views/usePageCompositionPreviewDrag.d.ts +48 -0
  112. package/dist/types/vue-ui-antdv/components/UiActionButton.vue.d.ts +2 -2
  113. package/dist/types/vue-ui-antdv/components/UiButton.vue.d.ts +6 -3
  114. package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +5 -2
  115. package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
  116. package/dist/types/vue-ui-antdv/components/UiPopover.vue.d.ts +22 -0
  117. package/dist/types/vue-ui-antdv/components/UiRecordExplorerItem.vue.d.ts +1 -1
  118. package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +5 -1
  119. package/dist/types/vue-ui-antdv/components/UiSwitch.vue.d.ts +1 -1
  120. package/dist/types/vue-ui-antdv/components/UiTextArea.vue.d.ts +38 -1
  121. package/dist/types/vue-ui-antdv/components/UiTokenInput.vue.d.ts +62 -0
  122. package/dist/types/vue-ui-antdv/components/UiTree.vue.d.ts +63 -9
  123. package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +1 -1
  124. package/dist/types/vue-ui-antdv/index.d.ts +6 -1
  125. package/dist/types/vue-ui-antdv/treeStructure.d.ts +18 -0
  126. package/dist/types/vue-ui-antdv/types.d.ts +64 -0
  127. package/dist/types/vue-ui-antdv/useTreeLoader.d.ts +21 -0
  128. package/dist/types/vue-ui-antdv/useTreeMotion.d.ts +9 -0
  129. package/dist/types/vue-ui-antdv/useUiTreeDrag.d.ts +32 -0
  130. package/dist/types/web-contracts/index.d.ts +67 -7
  131. package/dist/types/web-core/module/index.d.ts +1 -0
  132. package/dist/types/web-core/module/moduleContext.d.ts +15 -0
  133. package/dist/types/web-core/module/pageActionEntries.d.ts +21 -0
  134. package/dist/types/web-core/module/runtimeContext.d.ts +7 -3
  135. package/dist/types/web-core/module/staticModuleClient.d.ts +25 -2
  136. package/dist/workspaceViews-DI_1vYX9.js +3518 -0
  137. package/package.json +1 -1
  138. package/dist/MetadataOrchestrationView-F_Bmfn9K.js +0 -661
  139. package/dist/ModuleActionManagementView-Db_3Twom.js +0 -597
  140. package/dist/platform-components-59b4qzUL.js +0 -12489
  141. package/dist/types/views/metadataOrchestrationWorkspaceView.d.ts +0 -6
  142. package/dist/workspaceViews-BvV8mpML.js +0 -11149
@@ -0,0 +1,201 @@
1
+ export type BusinessRuleKind = 'CALCULATION' | 'VALIDATION' | 'UI_CONTROL';
2
+ export interface BusinessRuleEditableField {
3
+ fieldName: string;
4
+ title: string;
5
+ fieldSpecAlias: string;
6
+ valueType: string;
7
+ /** Direct child fields declare the aggregate functions that can consume them. */
8
+ aggregateFunctions?: string[];
9
+ }
10
+ /**
11
+ * The page-reference-fields response is deliberately a small, UI-neutral catalogue. Formula
12
+ * governance consumes it as a source directory; it does not treat it as a save-time authority.
13
+ */
14
+ export interface BusinessRuleReferenceField {
15
+ id: string;
16
+ name: string;
17
+ label?: string;
18
+ valueType: string;
19
+ referenceModuleAlias?: string;
20
+ referenceCardinality?: string;
21
+ expandable?: boolean;
22
+ readOnly?: boolean;
23
+ systemManaged?: boolean;
24
+ value?: unknown;
25
+ /** Additive catalogue metadata; absent means use the stable conservative fallback below. */
26
+ formulaReadable?: boolean;
27
+ formulaDisabledReason?: string;
28
+ /** Direct child fields declare the aggregate functions that can consume them. */
29
+ aggregateFunctions?: string[];
30
+ }
31
+ export interface BusinessRuleFormulaParameter {
32
+ name: string;
33
+ description: string;
34
+ }
35
+ /** A portable formula capability. A server catalogue can replace this list without changing the surface. */
36
+ export interface BusinessRuleFormulaCapability {
37
+ id: string;
38
+ label: string;
39
+ purpose: string;
40
+ /** Explains the business problem the formula solves before showing its example. */
41
+ description: string;
42
+ category: string;
43
+ signature: string;
44
+ parameters: BusinessRuleFormulaParameter[];
45
+ returnType: string;
46
+ example: string;
47
+ insertion: string;
48
+ firstParameterSelection: {
49
+ start: number;
50
+ end: number;
51
+ };
52
+ }
53
+ /** The additive backend catalogue shape. UI-only insertion details remain derived from the portable name. */
54
+ export interface BusinessRuleFormulaCatalogEntry {
55
+ name: string;
56
+ category?: string;
57
+ title?: string;
58
+ description?: string;
59
+ parameters?: BusinessRuleFormulaParameter[];
60
+ returnType?: string;
61
+ example?: string;
62
+ }
63
+ export declare const portableFormulaCapabilities: readonly BusinessRuleFormulaCapability[];
64
+ export declare function normalizeFormulaCapabilities(entries: readonly (BusinessRuleFormulaCapability | BusinessRuleFormulaCatalogEntry)[] | undefined): BusinessRuleFormulaCapability[];
65
+ export declare function searchableFormulaCapabilities(capabilities: readonly BusinessRuleFormulaCapability[], keyword: string): BusinessRuleFormulaCapability[];
66
+ /** Root fields that cannot safely become scalar formula input have a visible, deterministic reason. */
67
+ export declare function formulaFieldUnusableReason(field: BusinessRuleReferenceField): string | undefined;
68
+ /**
69
+ * Prevents a child field from being inserted as a scalar or into an aggregate whose value type
70
+ * cannot consume it. The server remains authoritative; this only keeps authoring feedback close
71
+ * to the attempted insertion.
72
+ */
73
+ export declare function aggregateFieldInsertionReason(field: BusinessRuleReferenceField, expression: string, selectionStart: number): string | undefined;
74
+ export interface UiControlTarget {
75
+ elementKey: string;
76
+ hide: boolean;
77
+ readOnly: boolean;
78
+ }
79
+ export interface UiControlForm {
80
+ key: string;
81
+ title: string;
82
+ elements: Array<{
83
+ key: string;
84
+ label: string;
85
+ }>;
86
+ }
87
+ export interface UiControlSnapshot {
88
+ baselineFingerprint: string;
89
+ rules: Array<{
90
+ code: string;
91
+ formKey: string;
92
+ expression: string;
93
+ enabled: boolean;
94
+ targets: UiControlTarget[];
95
+ }>;
96
+ forms: UiControlForm[];
97
+ }
98
+ export interface BusinessRuleSnapshotRule {
99
+ formKey?: string;
100
+ targets?: UiControlTarget[];
101
+ code: string;
102
+ kind: BusinessRuleKind | string;
103
+ phase: string;
104
+ targetField?: string;
105
+ expression: string;
106
+ enabled: boolean;
107
+ severity?: string;
108
+ messageTemplate?: string;
109
+ stopOnError?: boolean;
110
+ editable: boolean;
111
+ readOnlyReason?: string;
112
+ }
113
+ export interface BusinessRuleSnapshot {
114
+ moduleAlias: string;
115
+ baselineFingerprint: string;
116
+ editableFields: BusinessRuleEditableField[];
117
+ /** Already authorised referenced paths used by the persisted snapshot. These are read-only trial facts. */
118
+ referenceFields?: Array<{
119
+ path: string;
120
+ title: string;
121
+ valueType: string;
122
+ }>;
123
+ /** Direct child fields, which may only appear within a child aggregation function. */
124
+ aggregateFields?: BusinessRuleEditableField[];
125
+ /** Additive portable function directory emitted by the server. */
126
+ functions?: BusinessRuleFormulaCatalogEntry[];
127
+ rules: BusinessRuleSnapshotRule[];
128
+ }
129
+ export interface BusinessRuleProposal {
130
+ formKey?: string;
131
+ targets?: UiControlTarget[];
132
+ code: string;
133
+ kind: BusinessRuleKind;
134
+ targetField?: string;
135
+ expression: string;
136
+ enabled: boolean;
137
+ messageTemplate?: string;
138
+ }
139
+ export interface BusinessRuleIssue {
140
+ code: string;
141
+ ruleCode?: string;
142
+ field?: string;
143
+ message: string;
144
+ }
145
+ export interface BusinessRulePreview {
146
+ snapshot: BusinessRuleSnapshot;
147
+ proposalFingerprint: string;
148
+ executionOrder: string[];
149
+ errors: BusinessRuleIssue[];
150
+ }
151
+ export interface BusinessRuleTrialResult {
152
+ preview: BusinessRulePreview;
153
+ values: Record<string, unknown>;
154
+ changedFields: string[];
155
+ errors: BusinessRuleIssue[];
156
+ }
157
+ export interface BusinessRuleApplyResult {
158
+ snapshot: BusinessRuleSnapshot;
159
+ preview: BusinessRulePreview;
160
+ activatedModules: string[];
161
+ }
162
+ export interface FormulaInsertion {
163
+ value: string;
164
+ selectionStart: number;
165
+ selectionEnd: number;
166
+ }
167
+ export interface BusinessRuleChangeImpact {
168
+ added: BusinessRuleProposal[];
169
+ modified: BusinessRuleProposal[];
170
+ deleted: BusinessRuleProposal[];
171
+ }
172
+ export interface BusinessRuleFormulaTemplate {
173
+ id: string;
174
+ label: string;
175
+ expression: string;
176
+ help: string;
177
+ }
178
+ export declare function editableProposals(snapshot: BusinessRuleSnapshot): BusinessRuleProposal[];
179
+ export declare function readonlyRules(snapshot: BusinessRuleSnapshot): BusinessRuleSnapshotRule[];
180
+ export declare function toProposal(rule: Pick<BusinessRuleSnapshotRule, keyof BusinessRuleProposal>): BusinessRuleProposal;
181
+ export declare function newBusinessRule(kind: BusinessRuleKind, existingRules: readonly Pick<BusinessRuleProposal, 'code'>[]): BusinessRuleProposal;
182
+ export declare function isBusinessRuleKind(value: string): value is BusinessRuleKind;
183
+ export declare function proposalFingerprintOf(proposals: readonly BusinessRuleProposal[]): string;
184
+ export declare function typedSampleValue(value: string, valueType: string): unknown;
185
+ /**
186
+ * Inserts formula text at the active selection. The returned selection keeps the editor focused
187
+ * immediately after the inserted text, including when a selected range was replaced.
188
+ */
189
+ export declare function insertFormulaText(expression: string, selectionStart: number | undefined, selectionEnd: number | undefined, text: string): FormulaInsertion;
190
+ /** Reads only real field tokens; references inside string literals are formula text, not dependencies. */
191
+ export declare function referencedFormulaFields(expression: string): string[];
192
+ /** Replaces only executable field tokens with their business names for read-only UI summaries. */
193
+ export declare function presentableFormulaExpression(expression: string, fields: readonly BusinessRuleEditableField[]): string;
194
+ /**
195
+ * Trial inputs are the real external dependencies of all enabled rules. Targets produced by an
196
+ * enabled calculation are intentionally omitted, including targets referenced by a later rule.
197
+ */
198
+ export declare function externalTrialInputFields(fields: readonly BusinessRuleEditableField[], rules: readonly BusinessRuleProposal[]): BusinessRuleEditableField[];
199
+ export declare function filterBusinessRuleFields(fields: readonly BusinessRuleEditableField[], keyword: string): BusinessRuleEditableField[];
200
+ export declare function formulaTemplates(kind: BusinessRuleKind, fields: readonly BusinessRuleEditableField[], targetField?: string): BusinessRuleFormulaTemplate[];
201
+ export declare function businessRuleChangeImpact(snapshot: BusinessRuleSnapshot, proposals: readonly BusinessRuleProposal[]): BusinessRuleChangeImpact;
@@ -0,0 +1,75 @@
1
+ import type { MetadataField, ModuleMetadataRelation } from '../web-contracts/index';
2
+ import { type MetadataFieldPropertyDraft, type MetadataFieldPropertySummary } from './metadataOrchestrationState';
3
+ export type MetadataFieldGovernanceKind = 'BUSINESS' | 'CAPABILITY_DERIVED' | 'PLATFORM_SYSTEM' | 'RELATION_FOREIGN_KEY';
4
+ export interface MetadataFieldChangeSetDraft {
5
+ operation: 'ADD' | 'UPDATE' | 'DELETE';
6
+ fieldId?: string;
7
+ expectedFieldVersion?: number;
8
+ field?: MetadataField;
9
+ /** JSON-facing command contract; projection mappings remain an ordered string array. */
10
+ property?: MetadataFieldPropertyChangeSetPayload;
11
+ }
12
+ export type MetadataFieldPropertyChangeSetPayload = MetadataFieldPropertyDraft;
13
+ export declare function toFieldPropertyChangeSetPayload(property: MetadataFieldPropertyDraft): MetadataFieldPropertyChangeSetPayload;
14
+ export interface MetadataRelationChangeSetProposal {
15
+ expectedMetadataVersion: number;
16
+ fieldDrafts: MetadataFieldChangeSetDraft[];
17
+ }
18
+ /** Input facts are loaded for every node before a module-wide edit session begins. */
19
+ export interface MetadataModelRelationDraftSource {
20
+ relationId: string;
21
+ metadataId: string;
22
+ parentMetadataId?: string;
23
+ sortOrder?: number;
24
+ expectedMetadataVersion: number;
25
+ fields: MetadataField[];
26
+ /** The server's sortable set; definition protection does not restrict display ordering. */
27
+ sortableFieldIds?: string[];
28
+ fieldProperties?: MetadataFieldPropertySummary[];
29
+ }
30
+ export interface MetadataModelRelationDraft {
31
+ metadataId: string;
32
+ relationId: string;
33
+ expectedMetadataVersion: number;
34
+ fields: Record<string, MetadataField>;
35
+ fieldProperties: Record<string, MetadataFieldPropertyDraft>;
36
+ parentMetadataId?: string;
37
+ fieldOrder: string[];
38
+ sortableFieldIds: string[];
39
+ }
40
+ export interface MetadataModelChangeSetProposal {
41
+ relationDrafts: Array<MetadataRelationChangeSetProposal & {
42
+ relationId: string;
43
+ }>;
44
+ relationOrders: Array<{
45
+ parentMetadataId?: string;
46
+ relationIds: string[];
47
+ }>;
48
+ fieldOrders: Array<{
49
+ relationId: string;
50
+ fieldIds: string[];
51
+ }>;
52
+ }
53
+ /**
54
+ * A single local session for the entire visible metadata model. It deliberately reuses the
55
+ * relation-level field proposal shape: the module façade owns atomic validation/persistence while
56
+ * this class keeps every tree action local until the user chooses one publish operation.
57
+ */
58
+ export declare function createMetadataModelWorkspaceEditSession(): {
59
+ draft: import("vue").Ref<Record<string, MetadataModelRelationDraft> | undefined, Record<string, MetadataModelRelationDraft> | undefined>;
60
+ relationOrder: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
61
+ editing: import("vue").ComputedRef<boolean>;
62
+ isDirty: import("vue").ComputedRef<boolean>;
63
+ begin: (sources: MetadataModelRelationDraftSource[]) => void;
64
+ cancel: () => void;
65
+ relation: (relationId: string) => MetadataModelRelationDraft | undefined;
66
+ fieldsForDisplay: (relationId: string, fallback: MetadataField[]) => MetadataField[];
67
+ propertyForField: (relationId: string, field: MetadataField) => MetadataFieldPropertyDraft;
68
+ stageField: (relationId: string, field: MetadataField, property?: MetadataFieldPropertyDraft, replaceNewFieldKey?: string) => void;
69
+ stageFieldOrder: (relationId: string, fieldIds: string[]) => void;
70
+ stageRelationOrder: (parentMetadataId: string | undefined, relationIds: string[]) => void;
71
+ buildProposal: () => MetadataModelChangeSetProposal | undefined;
72
+ };
73
+ export declare function metadataFieldGovernanceKind(field: MetadataField, relation: ModuleMetadataRelation | undefined, capabilityFieldNames: ReadonlySet<string>): MetadataFieldGovernanceKind;
74
+ export declare function metadataFieldGovernanceLabel(kind: MetadataFieldGovernanceKind): string;
75
+ export declare function isSessionEditableMetadataField(field: MetadataField, relation: ModuleMetadataRelation | undefined, capabilityFieldNames: ReadonlySet<string>): boolean;
@@ -0,0 +1,40 @@
1
+ import type { Metadata, MetadataField, ModuleMetadataRelation } from '../web-contracts/index';
2
+ import type { UiTreeDropEvent, UiTreeNode } from '../vue-ui-antdv/index';
3
+ export type MetadataModelTreeNodeKind = 'METADATA' | 'FIELD';
4
+ export interface MetadataModelTreeNode extends UiTreeNode {
5
+ modelKind: MetadataModelTreeNodeKind;
6
+ relationId?: string;
7
+ fieldId?: string;
8
+ /** Parent relation, not the visual root. It makes the reorder boundary explicit. */
9
+ parentRelationId?: string;
10
+ /** Locked nodes are intentionally visible but never draggable. */
11
+ draggable?: boolean;
12
+ }
13
+ export interface MetadataModelTreeInput {
14
+ relations: ModuleMetadataRelation[];
15
+ metadataById: Record<string, Metadata>;
16
+ fieldsByRelation: Record<string, MetadataField[]>;
17
+ fieldLocked: (relation: ModuleMetadataRelation, field: MetadataField) => boolean;
18
+ }
19
+ /**
20
+ * The governance tree is a projection of the model, not a second persistence shape. Metadata
21
+ * branches and field leaves retain their relation/field identities so the page can route to
22
+ * strongly typed cards. The explorer title already states "元数据", so entity nodes are roots
23
+ * rather than being wrapped in a redundant virtual node.
24
+ */
25
+ export declare function buildMetadataModelTree(input: MetadataModelTreeInput): MetadataModelTreeNode[];
26
+ export declare function metadataNodeKey(relationId: string): string;
27
+ export declare function fieldNodeKey(relationId: string, fieldId: string): string;
28
+ export declare function parseMetadataModelTreeKey(key: string): {
29
+ kind: 'METADATA';
30
+ relationId: string;
31
+ } | {
32
+ kind: 'FIELD';
33
+ relationId: string;
34
+ fieldId: string;
35
+ } | undefined;
36
+ /** Only same-parent gap drops are legal. Dropping "on" a node would imply changing model structure. */
37
+ export declare function canReorderMetadataModelTree(event: UiTreeDropEvent): boolean;
38
+ export declare function reorderedIds<T extends {
39
+ id?: string;
40
+ }>(items: T[], sourceId: string, targetId: string, place: -1 | 1): string[];
@@ -0,0 +1,7 @@
1
+ import type { MetadataFieldPropertyKind } from './metadataOrchestrationState';
2
+ export declare function physicalNameOf(fieldName?: string): string;
3
+ export declare function generatedFieldName(title?: string): string;
4
+ /** Default names for newly created business fields; runtime semantics remain metadata-driven. */
5
+ export declare function generatedBusinessFieldName(title: string | undefined, kind: MetadataFieldPropertyKind): string;
6
+ /** Metadata identifiers use lower snake case; they are stable after explicit editing. */
7
+ export declare function generatedMetadataAlias(title: string, maxLength?: number): string;
@@ -1,7 +1,7 @@
1
1
  import type { FieldSpec, Metadata, MetadataField, ModuleMetadataRelation } from '../web-contracts/index';
2
2
  import type { RecordExplorerItemDescriptor } from '../platform-components/recordExplorerItemModel';
3
3
  /** Editor lifecycle of the metadata orchestration workspace. */
4
- export type MetadataOrchestrationMode = 'view' | 'create-main' | 'create-field' | 'edit-field';
4
+ export type MetadataOrchestrationMode = 'view' | 'create-main' | 'create-field' | 'create-reference-field' | 'create-dictionary-field' | 'edit-field';
5
5
  export interface MainMetadataDraft {
6
6
  alias: string;
7
7
  title: string;
@@ -10,6 +10,52 @@ export interface MainMetadataDraft {
10
10
  dataScopeEnabled: boolean;
11
11
  }
12
12
  export type MetadataFieldDraft = Partial<MetadataField>;
13
+ /**
14
+ * A field's business property is distinct from its physical field specification. For example,
15
+ * a reference can still use a short-text column to store a target key.
16
+ */
17
+ export type MetadataFieldPropertyKind = 'BASIC' | 'MODULE_REFERENCE' | 'DICTIONARY' | 'LEGACY_LOCKED';
18
+ export interface MetadataFieldReferencePropertyConfig {
19
+ targetModuleAlias?: string;
20
+ targetMetadataId?: string;
21
+ targetKeyField?: string;
22
+ targetLabelField?: string;
23
+ cardinality?: 'ONE' | 'MANY';
24
+ targetUnavailablePolicy?: 'PRESERVE_HISTORY' | 'RESTRICT' | 'CASCADE_DELETE';
25
+ projectionMappings?: string[];
26
+ }
27
+ export interface MetadataFieldDictionaryPropertyConfig {
28
+ dictionaryApplicationAlias?: string;
29
+ dictionaryCategoryAlias?: string;
30
+ selectionMode?: 'SINGLE' | 'MULTIPLE';
31
+ }
32
+ /**
33
+ * The platform field-spec catalog owns these stable storage shapes. A property editor must
34
+ * select a legal shape rather than exposing every scalar type as a possible reference/dictionary
35
+ * backing store.
36
+ */
37
+ export declare function storageFieldSpecAliasOf(kind: MetadataFieldPropertyKind, selectionMode?: MetadataFieldDictionaryPropertyConfig['selectionMode']): string | undefined;
38
+ export interface MetadataFieldPropertyDraft {
39
+ kind: MetadataFieldPropertyKind;
40
+ expectedBindingVersion?: number;
41
+ referenceConfig?: MetadataFieldReferencePropertyConfig;
42
+ dictionaryConfig?: MetadataFieldDictionaryPropertyConfig;
43
+ }
44
+ /** Relation-scoped property facts supplied by the module-governance read model. */
45
+ export interface MetadataFieldPropertySummary extends MetadataFieldPropertyDraft {
46
+ fieldId?: string;
47
+ fieldName?: string;
48
+ fieldSpecAlias?: string;
49
+ bindingVersion?: number;
50
+ legacyReason?: string;
51
+ /** Transport shape of the relation-scoped property summary. */
52
+ reference?: MetadataFieldReferencePropertyConfig;
53
+ dictionary?: {
54
+ applicationAlias?: string;
55
+ categoryAlias?: string;
56
+ selectionMode?: 'SINGLE' | 'MULTIPLE';
57
+ };
58
+ }
13
59
  export interface FieldSpecOption {
14
60
  value: string;
15
61
  label: string;
@@ -19,7 +65,7 @@ export declare function createMetadataOrchestrationState(): {
19
65
  moduleAlias?: string | undefined;
20
66
  metadataId?: string | undefined;
21
67
  relationAlias?: string | undefined;
22
- relationRole?: "MAIN" | "CHILD" | undefined;
68
+ relationRole?: "main" | "child" | "MAIN" | "CHILD" | undefined;
23
69
  parentMetadataId?: string | undefined;
24
70
  foreignKey?: string | undefined;
25
71
  autoPopulate?: boolean | undefined;
@@ -38,7 +84,7 @@ export declare function createMetadataOrchestrationState(): {
38
84
  moduleAlias?: string | undefined;
39
85
  metadataId?: string | undefined;
40
86
  relationAlias?: string | undefined;
41
- relationRole?: "MAIN" | "CHILD" | undefined;
87
+ relationRole?: "main" | "child" | "MAIN" | "CHILD" | undefined;
42
88
  parentMetadataId?: string | undefined;
43
89
  foreignKey?: string | undefined;
44
90
  autoPopulate?: boolean | undefined;
@@ -111,6 +157,61 @@ export declare function createMetadataOrchestrationState(): {
111
157
  updatedBy?: string | undefined;
112
158
  updatedAt?: string | undefined;
113
159
  }[]>;
160
+ allFields: import("vue").Ref<{
161
+ metadataId?: string | undefined;
162
+ fieldName?: string | undefined;
163
+ columnName?: string | undefined;
164
+ fieldSpecAlias?: string | undefined;
165
+ fieldOwnership?: string | undefined;
166
+ fieldForm?: string | undefined;
167
+ ownerFieldId?: string | undefined;
168
+ fieldRole?: string | undefined;
169
+ systemManaged?: boolean | undefined;
170
+ required?: boolean | undefined;
171
+ uniqueField?: boolean | undefined;
172
+ indexed?: boolean | undefined;
173
+ sortableField?: boolean | undefined;
174
+ titleField?: boolean | undefined;
175
+ enabled?: boolean | undefined;
176
+ sortOrder?: number | undefined;
177
+ title?: string | undefined;
178
+ id?: string | undefined;
179
+ tenantId?: string | undefined;
180
+ version?: number | undefined;
181
+ deleted?: boolean | undefined;
182
+ deletedAt?: string | undefined;
183
+ createdBy?: string | undefined;
184
+ createdAt?: string | undefined;
185
+ updatedBy?: string | undefined;
186
+ updatedAt?: string | undefined;
187
+ }[], MetadataField[] | {
188
+ metadataId?: string | undefined;
189
+ fieldName?: string | undefined;
190
+ columnName?: string | undefined;
191
+ fieldSpecAlias?: string | undefined;
192
+ fieldOwnership?: string | undefined;
193
+ fieldForm?: string | undefined;
194
+ ownerFieldId?: string | undefined;
195
+ fieldRole?: string | undefined;
196
+ systemManaged?: boolean | undefined;
197
+ required?: boolean | undefined;
198
+ uniqueField?: boolean | undefined;
199
+ indexed?: boolean | undefined;
200
+ sortableField?: boolean | undefined;
201
+ titleField?: boolean | undefined;
202
+ enabled?: boolean | undefined;
203
+ sortOrder?: number | undefined;
204
+ title?: string | undefined;
205
+ id?: string | undefined;
206
+ tenantId?: string | undefined;
207
+ version?: number | undefined;
208
+ deleted?: boolean | undefined;
209
+ deletedAt?: string | undefined;
210
+ createdBy?: string | undefined;
211
+ createdAt?: string | undefined;
212
+ updatedBy?: string | undefined;
213
+ updatedAt?: string | undefined;
214
+ }[]>;
114
215
  fieldSpecs: import("vue").Ref<{
115
216
  alias?: string | undefined;
116
217
  fieldType?: string | undefined;
@@ -121,6 +222,7 @@ export declare function createMetadataOrchestrationState(): {
121
222
  queryOperators?: string[] | undefined;
122
223
  defaultUiControlAlias?: string | undefined;
123
224
  uiControlAliases?: string[] | undefined;
225
+ safeTargetFieldSpecAliases?: string[] | undefined;
124
226
  enabled?: boolean | undefined;
125
227
  sortOrder?: number | undefined;
126
228
  title?: string | undefined;
@@ -143,6 +245,7 @@ export declare function createMetadataOrchestrationState(): {
143
245
  queryOperators?: string[] | undefined;
144
246
  defaultUiControlAlias?: string | undefined;
145
247
  uiControlAliases?: string[] | undefined;
248
+ safeTargetFieldSpecAliases?: string[] | undefined;
146
249
  enabled?: boolean | undefined;
147
250
  sortOrder?: number | undefined;
148
251
  title?: string | undefined;
@@ -225,11 +328,46 @@ export declare function createMetadataOrchestrationState(): {
225
328
  updatedBy?: string | undefined;
226
329
  updatedAt?: string | undefined;
227
330
  }>;
331
+ fieldPropertyDraft: import("vue").Ref<{
332
+ kind: MetadataFieldPropertyKind;
333
+ expectedBindingVersion?: number | undefined;
334
+ referenceConfig?: {
335
+ targetModuleAlias?: string | undefined;
336
+ targetMetadataId?: string | undefined;
337
+ targetKeyField?: string | undefined;
338
+ targetLabelField?: string | undefined;
339
+ cardinality?: "ONE" | "MANY" | undefined;
340
+ targetUnavailablePolicy?: "PRESERVE_HISTORY" | "RESTRICT" | "CASCADE_DELETE" | undefined;
341
+ projectionMappings?: string[] | undefined;
342
+ } | undefined;
343
+ dictionaryConfig?: {
344
+ dictionaryApplicationAlias?: string | undefined;
345
+ dictionaryCategoryAlias?: string | undefined;
346
+ selectionMode?: "SINGLE" | "MULTIPLE" | undefined;
347
+ } | undefined;
348
+ }, MetadataFieldPropertyDraft | {
349
+ kind: MetadataFieldPropertyKind;
350
+ expectedBindingVersion?: number | undefined;
351
+ referenceConfig?: {
352
+ targetModuleAlias?: string | undefined;
353
+ targetMetadataId?: string | undefined;
354
+ targetKeyField?: string | undefined;
355
+ targetLabelField?: string | undefined;
356
+ cardinality?: "ONE" | "MANY" | undefined;
357
+ targetUnavailablePolicy?: "PRESERVE_HISTORY" | "RESTRICT" | "CASCADE_DELETE" | undefined;
358
+ projectionMappings?: string[] | undefined;
359
+ } | undefined;
360
+ dictionaryConfig?: {
361
+ dictionaryApplicationAlias?: string | undefined;
362
+ dictionaryCategoryAlias?: string | undefined;
363
+ selectionMode?: "SINGLE" | "MULTIPLE" | undefined;
364
+ } | undefined;
365
+ }>;
228
366
  selectedRelation: import("vue").ComputedRef<{
229
367
  moduleAlias?: string | undefined;
230
368
  metadataId?: string | undefined;
231
369
  relationAlias?: string | undefined;
232
- relationRole?: "MAIN" | "CHILD" | undefined;
370
+ relationRole?: "main" | "child" | "MAIN" | "CHILD" | undefined;
233
371
  parentMetadataId?: string | undefined;
234
372
  foreignKey?: string | undefined;
235
373
  autoPopulate?: boolean | undefined;
@@ -257,8 +395,9 @@ export declare function createMetadataOrchestrationState(): {
257
395
  selectRelation: (relation: ModuleMetadataRelation) => boolean;
258
396
  focusRelation: (relationId: string | undefined) => void;
259
397
  startCreateMain: () => void;
260
- startCreateField: () => void;
261
- startEditField: (field: MetadataField) => void;
398
+ startCreateField: (kind?: MetadataFieldPropertyKind) => void;
399
+ startEditField: (field: MetadataField, property?: MetadataFieldPropertyDraft) => void;
400
+ startConfigureFieldProperty: (field: MetadataField, kind: Exclude<MetadataFieldPropertyKind, "BASIC" | "LEGACY_LOCKED">) => void;
262
401
  cancelEditor: () => void;
263
402
  };
264
403
  export type MetadataOrchestrationState = ReturnType<typeof createMetadataOrchestrationState>;
@@ -266,13 +405,29 @@ export declare function emptyMainMetadataDraft(): MainMetadataDraft;
266
405
  export declare function normalizeMainMetadataDraft(draft: MainMetadataDraft): MainMetadataDraft;
267
406
  export declare function isValidMainMetadataDraft(draft: MainMetadataDraft): boolean;
268
407
  export declare function emptyFieldDraft(): MetadataFieldDraft;
408
+ export declare function emptyFieldPropertyDraft(kind: MetadataFieldPropertyKind): MetadataFieldPropertyDraft;
409
+ export declare function copyFieldPropertyDraft(property: MetadataFieldPropertyDraft): MetadataFieldPropertyDraft;
410
+ /** Converts the read-model's concise bindings into the draft contract accepted by change sets. */
411
+ export declare function propertyDraftFromSummary(summary: MetadataFieldPropertySummary): MetadataFieldPropertyDraft;
269
412
  export declare function copyMetadataField(field: MetadataField): MetadataFieldDraft;
270
413
  export declare function isValidFieldDraft(draft: MetadataFieldDraft): boolean;
271
414
  export declare function normalizeFieldDraft(draft: MetadataFieldDraft): MetadataFieldDraft;
415
+ export declare function normalizeFieldPropertyDraft(property: MetadataFieldPropertyDraft): MetadataFieldPropertyDraft;
416
+ export declare function isValidFieldPropertyDraft(property: MetadataFieldPropertyDraft): boolean;
417
+ export declare function metadataFieldPropertyLabel(kind: MetadataFieldPropertyKind): string;
418
+ export declare function metadataFieldPropertySummary(property: MetadataFieldPropertyDraft): string;
272
419
  /** Only business-owned physical fields are orchestrated; platform-managed fields stay hidden. */
273
420
  export declare function orchestratableFields(fields: MetadataField[]): MetadataField[];
421
+ /** Only these field facts may be changed through the metadata field editor. */
422
+ export declare function isOrchestratableField(field: MetadataField): boolean;
274
423
  export declare function fieldSpecOptionListOf(specs: FieldSpec[]): FieldSpecOption[];
424
+ /** Filters a populated entity to the source specification's server-declared safe targets. */
425
+ export declare function dataSafeFieldSpecOptions(specs: FieldSpec[], currentAlias?: string): FieldSpecOption[];
426
+ /** Use the catalog title for human-facing metadata surfaces; aliases remain stable machine identities. */
427
+ export declare function fieldSpecDisplayLabel(fieldSpecAlias: string | undefined, specs: FieldSpec[]): string;
275
428
  export declare function entityTitleOf(relation: ModuleMetadataRelation, metadata: Metadata | undefined): string;
276
429
  export declare function relationRoleTag(role: ModuleMetadataRelation['relationRole']): string | undefined;
430
+ /** Java code enums are serialized by their stable lower-case code in runtime responses. */
431
+ export declare function isMainRelation(role: ModuleMetadataRelation['relationRole'] | undefined): boolean;
277
432
  export declare function entityExplorerItem(relation: ModuleMetadataRelation, metadata: Metadata | undefined): RecordExplorerItemDescriptor;
278
433
  export declare function metadataSubtitleOf(metadata: Metadata | undefined): string | undefined;
@@ -0,0 +1,10 @@
1
+ import type { UiTreeNode } from '../vue-ui-antdv/index';
2
+ /** Shared metadata presentation; consumers supply actions and capability restrictions. */
3
+ export declare function metadataSourceFieldNode(field: {
4
+ title: string;
5
+ fieldName: string;
6
+ platformReadOnly?: boolean;
7
+ referenceModuleAlias?: string;
8
+ expandable?: boolean;
9
+ }, options: Pick<UiTreeNode, 'key'> & Partial<UiTreeNode>): UiTreeNode;
10
+ export declare function metadataSourceRoot(title: string, children: UiTreeNode[]): UiTreeNode;
@@ -0,0 +1,9 @@
1
+ export declare const moduleGovernanceTabs: readonly ["overview", "metadata", "actions", "rules", "ui", "preview"];
2
+ export type ModuleGovernanceTab = (typeof moduleGovernanceTabs)[number];
3
+ export interface ModuleGovernanceWorkspaceViewInput {
4
+ moduleAlias: string;
5
+ moduleTitle?: string;
6
+ governanceTab?: ModuleGovernanceTab;
7
+ }
8
+ /** The module-scoped home for configuration governance surfaces. */
9
+ export declare const moduleGovernanceWorkspaceView: import("../platform-workbench/workspaceViewContract.ts").WorkspaceViewDefinition<ModuleGovernanceWorkspaceViewInput>;