@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,672 @@
1
+ import { n as e } from "./rolldown-runtime-DPVXH0ON.js";
2
+ import { Dn as t, En as n, F as ee, G as r, Jn as i, Rn as te, Sn as a, T as ne, Tn as o, Zt as re, _n as s, bn as c, cn as l, et as ie, gt as ae, in as oe, j as se, k as ce, mn as u, st as le, t as ue, vt as de, xn as d } from "./platform-workbench-DJj42YQP.js";
3
+ import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, onMounted as fe, openBlock as b, ref as x, toDisplayString as S, unref as C, withCtx as w, withModifiers as T } from "vue";
4
+ //#region src/platform-components/staticTreeResourceModuleContext.ts
5
+ function pe(e, t = {}) {
6
+ let n = t.client ?? E(t.emptyQueryScopeName);
7
+ return {
8
+ ...e,
9
+ crud: n,
10
+ abilities: {
11
+ ...e.abilities,
12
+ crud: () => n,
13
+ tree: () => n,
14
+ enable: () => n,
15
+ tryCrud: () => n,
16
+ tryTree: () => e.abilities.hasTree() === !1 ? void 0 : n,
17
+ tryEnable: () => n
18
+ }
19
+ };
20
+ }
21
+ function E(e = "static.empty") {
22
+ return {
23
+ querySchema: async () => D(e),
24
+ query: async () => O(),
25
+ view: async () => ({}),
26
+ insert: async (e) => ({ record: e }),
27
+ update: async (e, t) => ({ record: t }),
28
+ delete: async () => 0,
29
+ enable: async () => 0,
30
+ disable: async () => 0,
31
+ tree: async () => k(),
32
+ treeFlat: async () => A(),
33
+ subtree: async () => k(),
34
+ sort: async () => 0
35
+ };
36
+ }
37
+ function D(e) {
38
+ return {
39
+ scopeName: e,
40
+ quickSearch: {
41
+ enabled: !1,
42
+ fields: [],
43
+ fieldSchemas: []
44
+ },
45
+ fields: [],
46
+ externalCriteria: [],
47
+ defaultSorts: []
48
+ };
49
+ }
50
+ function O() {
51
+ return {
52
+ records: [],
53
+ total: 0,
54
+ pageNum: 1,
55
+ pageSize: 20,
56
+ pages: 0,
57
+ totalKnown: !0
58
+ };
59
+ }
60
+ function k() {
61
+ return { records: [] };
62
+ }
63
+ function A() {
64
+ return { records: [] };
65
+ }
66
+ //#endregion
67
+ //#region src/views/ModuleActionManagementView.vue?vue&type=script&setup=true&lang.ts
68
+ var me = { class: "action-declaration-section" }, he = { class: "permission-governance-section" }, ge = { class: "governance-grid" }, j = { class: "governance-item" }, M = {
69
+ type: "button",
70
+ class: "governance-help",
71
+ "aria-label": "访问方式说明"
72
+ }, N = { class: "governance-reset-slot" }, P = { class: "governance-item" }, F = {
73
+ type: "button",
74
+ class: "governance-help",
75
+ "aria-label": "默认授予策略说明"
76
+ }, I = { class: "governance-reset-slot" }, L = { class: "governance-item" }, _e = {
77
+ type: "button",
78
+ class: "governance-help",
79
+ "aria-label": "动作授权说明"
80
+ }, ve = { class: "governance-reset-slot" }, ye = { class: "governance-switch-control" }, be = { class: "governance-item" }, xe = {
81
+ type: "button",
82
+ class: "governance-help",
83
+ "aria-label": "数据授权说明"
84
+ }, Se = { class: "governance-reset-slot" }, Ce = { class: "governance-switch-control" }, we = { key: 0 }, Te = {
85
+ key: 1,
86
+ class: "form-hint wide-field"
87
+ }, Ee = { class: "checkbox-field" }, De = { class: "checkbox-field" }, Oe = { class: "wide-field" }, ke = { class: "wide-field" }, R = /*@__PURE__*/ y({
88
+ name: "ModuleActionManagementView",
89
+ __name: "ModuleActionManagementView",
90
+ props: {
91
+ moduleAlias: {},
92
+ moduleTitle: {},
93
+ moduleKind: {},
94
+ title: {}
95
+ },
96
+ setup(e) {
97
+ let t = e, y = te({ moduleAlias: "platform.module_action" }), E = pe(y, { client: i(y.http, `/platform.module/${encodeURIComponent(t.moduleAlias)}/actions`) }), D = x(""), O = x([]), k = ne({
98
+ context: E,
99
+ confirmAction: re,
100
+ emptyDraft: () => q(t.moduleAlias),
101
+ normalizeDraft: (e) => J(e, t.moduleAlias),
102
+ copyRecord: (e) => ({ ...e }),
103
+ titleOf: Q,
104
+ fallbackTitle: "模块动作",
105
+ createTitle: "新建动作",
106
+ requiredMessage: "动作编码不能为空",
107
+ isValid: (e) => !!e.actionCode?.trim(),
108
+ recordName: "动作",
109
+ deleteTitle: "删除动作",
110
+ saveDeniedMessage: "当前用户无权保存模块动作",
111
+ createDeniedMessage: "当前用户无权新建模块动作",
112
+ enableDeniedMessage: "当前用户无权变更模块动作启停状态",
113
+ deleteDeniedMessage: () => "当前用户无权删除模块动作",
114
+ canDeleteRecord: (e) => e.systemManaged !== !0,
115
+ canEnableRecord: (e) => e.systemManaged !== !0
116
+ }), { selected: A, draft: R, mode: z, reloadKey: B, saving: V, cardTitle: Ae, canCreate: je, canEnable: Me } = k, Ne = f(() => {
117
+ if (z.value === "view") return !1;
118
+ let e = A.value ? J(A.value, t.moduleAlias) : q(t.moduleAlias);
119
+ return JSON.stringify(R.value) !== JSON.stringify(e);
120
+ });
121
+ ue("模块动作", () => Ne.value);
122
+ let Pe = f(() => je.value), Fe = f(() => O.value.map((e) => ({
123
+ value: e.executorKey,
124
+ label: e.description ? `${e.title} · ${e.description}` : e.title
125
+ }))), Ie = f(() => (O.value.find((e) => e.executorKey === R.value.executorKey)?.supportedLevels ?? [
126
+ "LIST",
127
+ "RECORD",
128
+ "BATCH",
129
+ "ANY"
130
+ ]).map((e) => ({
131
+ value: e,
132
+ label: {
133
+ LIST: "列表",
134
+ RECORD: "单条记录",
135
+ BATCH: "批量",
136
+ ANY: "任意"
137
+ }[e]
138
+ }))), Le = f(() => [
139
+ "actionCode",
140
+ "title",
141
+ "category",
142
+ "actionLevel",
143
+ "accessMode",
144
+ "executorType",
145
+ ...Z(R.value.executorKey) ? ["executorKey"] : [],
146
+ "actionAuth",
147
+ "dataAuth",
148
+ "defaultGrantPolicy",
149
+ ...Z(R.value.availableExpression) ? ["availableExpression"] : [],
150
+ ...Z(R.value.unavailableMessage) ? ["unavailableMessage"] : [],
151
+ ...R.value.sourceType ? ["sourceType"] : [],
152
+ ...Z(R.value.bindingAlias) ? ["bindingAlias"] : []
153
+ ]), Re = f(() => [
154
+ "actionCode",
155
+ "title",
156
+ "category",
157
+ "actionLevel",
158
+ "executorType",
159
+ ...Z(R.value.executorKey) ? ["executorKey"] : [],
160
+ ...R.value.sourceType ? ["sourceType"] : []
161
+ ]);
162
+ fe(() => void K());
163
+ let ze = f(() => k.readonly.value), H = f(() => ze.value || k.saving.value), Be = f(() => {
164
+ if (k.mode.value !== "view") return [
165
+ ...k.mode.value === "edit" && k.selected.value?.systemManaged === !0 && Ue(R.value) ? [{
166
+ key: "reset-permission-governance",
167
+ actionCode: "update",
168
+ title: "全部重置",
169
+ disabled: k.saving.value
170
+ }] : [],
171
+ {
172
+ key: "cancel",
173
+ title: "取消",
174
+ disabled: k.saving.value
175
+ },
176
+ {
177
+ key: "save",
178
+ actionCode: k.mode.value === "create" ? "create" : "update",
179
+ title: k.saving.value ? "保存中" : "保存",
180
+ primary: !0,
181
+ loading: k.saving.value
182
+ }
183
+ ];
184
+ let e = k.selected.value;
185
+ return [{
186
+ key: "edit",
187
+ actionCode: "update",
188
+ title: "编辑",
189
+ disabled: !e || !k.canUpdate.value
190
+ }, {
191
+ key: "delete",
192
+ actionCode: "delete",
193
+ title: "删除",
194
+ danger: !0,
195
+ loading: k.saving.value,
196
+ disabled: !e || e.systemManaged === !0 || !k.canDelete.value
197
+ }];
198
+ });
199
+ function Ve(e) {
200
+ let t = e;
201
+ return {
202
+ title: Q(t),
203
+ secondary: t.actionCode,
204
+ tag: t.systemManaged === !0 ? "平台托管" : t.executorKey ? "已绑定" : "待绑定",
205
+ muted: t.enabled === !1
206
+ };
207
+ }
208
+ function He(e) {
209
+ e.key === "edit" && k.startEdit(), e.key === "delete" && k.removeSelected(), e.key === "reset-permission-governance" && We(), e.key === "cancel" && k.cancelEdit(), e.key === "save" && k.save();
210
+ }
211
+ function Ue(e) {
212
+ return [
213
+ e.accessModeOverride,
214
+ e.actionAuthOverride,
215
+ e.dataAuthOverride,
216
+ e.defaultGrantPolicyOverride
217
+ ].some((e) => e != null);
218
+ }
219
+ function U(e) {
220
+ return R.value[e] != null;
221
+ }
222
+ function W(e) {
223
+ G(e, void 0);
224
+ }
225
+ function We() {
226
+ k.draft.value = {
227
+ ...k.draft.value,
228
+ accessModeOverride: void 0,
229
+ actionAuthOverride: void 0,
230
+ dataAuthOverride: void 0,
231
+ defaultGrantPolicyOverride: void 0
232
+ };
233
+ }
234
+ function G(e, t) {
235
+ k.draft.value = {
236
+ ...k.draft.value,
237
+ [e]: t ?? void 0
238
+ };
239
+ }
240
+ async function K() {
241
+ try {
242
+ O.value = await y.http.request({ path: "/platform.module/action-executors" });
243
+ } catch (e) {
244
+ O.value = [], de(e, {
245
+ source: "module-action-management",
246
+ phase: "load"
247
+ });
248
+ }
249
+ }
250
+ function Ge() {
251
+ k.startCreate();
252
+ }
253
+ function Ke(e) {
254
+ let t = typeof e == "string" ? e : void 0, n = O.value.find((e) => e.executorKey === t);
255
+ G("executorKey", t), n?.supportedLevels.length && G("actionLevel", n.supportedLevels[0]);
256
+ }
257
+ function q(e) {
258
+ return {
259
+ moduleAlias: e,
260
+ actionCode: "",
261
+ title: "",
262
+ category: "CUSTOM",
263
+ actionLevel: "ANY",
264
+ accessMode: "AUTH_REQUIRED",
265
+ actionAuth: !0,
266
+ dataAuth: !1,
267
+ defaultGrantPolicy: "NONE",
268
+ executorType: "SERVICE",
269
+ enabled: !0,
270
+ systemManaged: !1
271
+ };
272
+ }
273
+ function J(e, t) {
274
+ return {
275
+ ...e,
276
+ moduleAlias: t,
277
+ actionCode: Y(e.actionCode),
278
+ title: X(e.title) ?? Y(e.actionCode),
279
+ entityAlias: X(e.entityAlias),
280
+ permissionActionCode: X(e.permissionActionCode),
281
+ availableExpression: X(e.availableExpression),
282
+ unavailableMessage: X(e.unavailableMessage),
283
+ executorKey: X(e.executorKey)
284
+ };
285
+ }
286
+ function Y(e) {
287
+ return e?.trim() ?? "";
288
+ }
289
+ function X(e) {
290
+ return e?.trim() || void 0;
291
+ }
292
+ function Z(e) {
293
+ return !!e?.trim();
294
+ }
295
+ function Q(e) {
296
+ return e.title?.trim() || e.actionCode?.trim() || e.id || "未命名动作";
297
+ }
298
+ function $(e, t) {
299
+ return e === "actionAuth" || e === "dataAuth" ? t === !0 ? "启用" : "未启用" : typeof t == "string" ? {
300
+ category: {
301
+ STANDARD: "标准动作",
302
+ CUSTOM: "自定义动作",
303
+ DIALOG: "弹窗动作",
304
+ WORKFLOW: "工作流动作",
305
+ GENERATE: "生成动作"
306
+ },
307
+ actionLevel: {
308
+ LIST: "列表",
309
+ RECORD: "单条记录",
310
+ BATCH: "批量",
311
+ ANY: "任意"
312
+ },
313
+ accessMode: {
314
+ AUTH_REQUIRED: "需要授权",
315
+ LOGIN_REQUIRED: "登录可用",
316
+ ANONYMOUS_ALLOWED: "匿名可用"
317
+ },
318
+ executorType: {
319
+ STANDARD: "平台标准",
320
+ SERVICE: "服务(二开)",
321
+ DIALOG: "弹窗协议",
322
+ WORKFLOW: "工作流",
323
+ GENERATE: "生成器"
324
+ },
325
+ defaultGrantPolicy: {
326
+ NONE: "不默认授予",
327
+ ANY_LOGIN_USER: "所有登录用户",
328
+ OWNER: "记录所有者",
329
+ ASSIGNEE: "办理人",
330
+ MEMBER: "成员"
331
+ },
332
+ sourceType: {
333
+ STATIC_MODULE: "静态模块声明",
334
+ CODE_EXTENSION: "代码扩展",
335
+ DYNAMIC_MODULE: "动态模块配置",
336
+ WORKFLOW_DEFINITION: "工作流定义",
337
+ WORKFLOW_RUNTIME: "工作流运行时",
338
+ RECORD_GENERATION_RULE: "生单规则",
339
+ DOCUMENT_RELATION: "单据关系",
340
+ PRINT_TEMPLATE: "打印模板"
341
+ }
342
+ }[e]?.[t] : void 0;
343
+ }
344
+ return (t, i) => (b(), p(C(ce), {
345
+ "explorer-title": "模块动作",
346
+ "refresh-title": "刷新动作",
347
+ mode: C(z),
348
+ "detail-title": C(Ae),
349
+ "explorer-search-keyword": D.value,
350
+ "explorer-search-placeholder": "搜索动作名称或编码",
351
+ "onUpdate:explorerSearchKeyword": i[22] ||= (e) => D.value = e,
352
+ onRefresh: i[23] ||= (e) => B.value += 1
353
+ }, {
354
+ "explorer-actions": w(() => [v(C(le), {
355
+ class: "record-panel-create-button",
356
+ context: C(E),
357
+ "action-code": "create",
358
+ title: "新建动作",
359
+ "icon-only": "",
360
+ disabled: !Pe.value || C(V),
361
+ onClick: Ge
362
+ }, null, 8, ["context", "disabled"])]),
363
+ explorer: w(() => [v(C(ae), {
364
+ context: C(E),
365
+ "selected-id": C(A)?.id,
366
+ "reload-key": C(B),
367
+ keyword: D.value,
368
+ "empty-description": "当前模块暂无动作",
369
+ "loading-tip": "加载模块动作",
370
+ "fallback-title": "未命名动作",
371
+ "item-of": Ve,
372
+ onLoaded: i[0] ||= (e) => C(k).handleListLoaded(e),
373
+ onSelect: i[1] ||= (e) => C(k).handleSelect(e)
374
+ }, null, 8, [
375
+ "context",
376
+ "selected-id",
377
+ "reload-key",
378
+ "keyword"
379
+ ])]),
380
+ "detail-status": w(() => [C(z) === "view" && C(A) ? (b(), p(C(ee), {
381
+ key: 0,
382
+ enabled: C(A).enabled,
383
+ disabled: C(V) || C(A).systemManaged === !0 || !C(Me),
384
+ loading: C(V),
385
+ "show-label": !1,
386
+ onChange: C(k).toggleEnabled
387
+ }, null, 8, [
388
+ "enabled",
389
+ "disabled",
390
+ "loading",
391
+ "onChange"
392
+ ])) : m("v-if", !0)]),
393
+ "detail-actions": w(() => [v(C(ie), {
394
+ context: C(E),
395
+ actions: Be.value,
396
+ onAction: He
397
+ }, null, 8, ["context", "actions"])]),
398
+ default: w(() => [!C(A) && C(z) === "view" ? (b(), p(C(oe), {
399
+ key: 0,
400
+ description: e.moduleKind === "static" ? "静态模块动作由 Java 声明自动注册" : "当前模块暂无动作"
401
+ }, null, 8, ["description"])) : C(z) === "view" && C(A) ? (b(), p(C(r), {
402
+ key: 1,
403
+ record: C(R),
404
+ "display-of": $,
405
+ "field-names": Le.value,
406
+ fallback: {
407
+ actionCode: { label: "动作编码" },
408
+ title: { label: "动作名称" },
409
+ category: { label: "动作类别" },
410
+ actionLevel: { label: "执行层级" },
411
+ accessMode: { label: "访问方式" },
412
+ executorType: { label: "执行方式" },
413
+ executorKey: { label: "执行实现" },
414
+ actionAuth: { label: "动作授权" },
415
+ dataAuth: { label: "数据授权" },
416
+ defaultGrantPolicy: { label: "默认授予策略" },
417
+ availableExpression: { label: "可用条件" },
418
+ unavailableMessage: { label: "不可用提示" },
419
+ sourceType: { label: "注册来源" },
420
+ bindingAlias: { label: "绑定标识" }
421
+ }
422
+ }, null, 8, ["record", "field-names"])) : C(z) !== "create" && C(A)?.systemManaged ? (b(), h("form", {
423
+ key: 2,
424
+ class: "managed-action-editor",
425
+ onSubmit: i[10] ||= T((...e) => C(k).save && C(k).save(...e), ["prevent"])
426
+ }, [g("section", me, [i[24] ||= g("h3", null, "动作声明", -1), v(C(r), {
427
+ record: C(R),
428
+ "display-of": $,
429
+ "field-names": Re.value,
430
+ fallback: {
431
+ actionCode: { label: "动作编码" },
432
+ title: { label: "动作名称" },
433
+ category: { label: "动作类别" },
434
+ actionLevel: { label: "执行层级" },
435
+ executorType: { label: "执行方式" },
436
+ executorKey: { label: "执行实现" },
437
+ sourceType: { label: "注册来源" }
438
+ }
439
+ }, null, 8, ["record", "field-names"])]), g("section", he, [i[33] ||= g("h3", null, "权限治理", -1), g("div", ge, [
440
+ g("section", j, [g("header", null, [g("div", null, [g("h4", null, [i[25] ||= _(" 访问方式 ", -1), v(C(u), { title: "决定调用动作前需要满足的身份条件。" }, {
441
+ default: w(() => [g("button", M, [v(C(n), { name: "help" })])]),
442
+ _: 1
443
+ })])]), g("span", N, [U("accessModeOverride") ? (b(), p(C(o), {
444
+ key: 0,
445
+ type: "text",
446
+ size: "small",
447
+ disabled: H.value,
448
+ onClick: i[2] ||= (e) => W("accessModeOverride")
449
+ }, {
450
+ default: w(() => [...i[26] ||= [_("重置", -1)]]),
451
+ _: 1
452
+ }, 8, ["disabled"])) : m("v-if", !0)])]), v(C(d), {
453
+ value: C(R).accessModeOverride ?? C(R).accessMode,
454
+ disabled: H.value,
455
+ options: [
456
+ {
457
+ label: "需要授权",
458
+ value: "AUTH_REQUIRED"
459
+ },
460
+ {
461
+ label: "登录可用",
462
+ value: "LOGIN_REQUIRED"
463
+ },
464
+ {
465
+ label: "匿名可用",
466
+ value: "ANONYMOUS_ALLOWED"
467
+ }
468
+ ],
469
+ "onUpdate:value": i[3] ||= (e) => G("accessModeOverride", e)
470
+ }, null, 8, ["value", "disabled"])]),
471
+ g("section", P, [g("header", null, [g("div", null, [g("h4", null, [i[27] ||= _(" 默认授予策略 ", -1), v(C(u), { title: "定义满足条件的用户首次获得动作时的默认规则。" }, {
472
+ default: w(() => [g("button", F, [v(C(n), { name: "help" })])]),
473
+ _: 1
474
+ })])]), g("span", I, [U("defaultGrantPolicyOverride") ? (b(), p(C(o), {
475
+ key: 0,
476
+ type: "text",
477
+ size: "small",
478
+ disabled: H.value,
479
+ onClick: i[4] ||= (e) => W("defaultGrantPolicyOverride")
480
+ }, {
481
+ default: w(() => [...i[28] ||= [_("重置", -1)]]),
482
+ _: 1
483
+ }, 8, ["disabled"])) : m("v-if", !0)])]), v(C(d), {
484
+ value: C(R).defaultGrantPolicyOverride ?? C(R).defaultGrantPolicy,
485
+ disabled: H.value,
486
+ options: [
487
+ {
488
+ label: "不默认授予",
489
+ value: "NONE"
490
+ },
491
+ {
492
+ label: "所有登录用户",
493
+ value: "ANY_LOGIN_USER"
494
+ },
495
+ {
496
+ label: "记录所有者",
497
+ value: "OWNER"
498
+ },
499
+ {
500
+ label: "办理人",
501
+ value: "ASSIGNEE"
502
+ },
503
+ {
504
+ label: "成员",
505
+ value: "MEMBER"
506
+ }
507
+ ],
508
+ "onUpdate:value": i[5] ||= (e) => G("defaultGrantPolicyOverride", e)
509
+ }, null, 8, ["value", "disabled"])]),
510
+ g("section", L, [g("header", null, [g("div", null, [g("h4", null, [i[29] ||= _(" 动作授权 ", -1), v(C(u), { title: "控制角色是否需要被显式授予该动作。" }, {
511
+ default: w(() => [g("button", _e, [v(C(n), { name: "help" })])]),
512
+ _: 1
513
+ })])]), g("span", ve, [U("actionAuthOverride") ? (b(), p(C(o), {
514
+ key: 0,
515
+ type: "text",
516
+ size: "small",
517
+ disabled: H.value,
518
+ onClick: i[6] ||= (e) => W("actionAuthOverride")
519
+ }, {
520
+ default: w(() => [...i[30] ||= [_("重置", -1)]]),
521
+ _: 1
522
+ }, 8, ["disabled"])) : m("v-if", !0)])]), g("div", ye, [v(C(l), {
523
+ checked: (C(R).actionAuthOverride ?? C(R).actionAuth) !== !1,
524
+ disabled: H.value,
525
+ "checked-text": "开",
526
+ "unchecked-text": "关",
527
+ "onUpdate:checked": i[7] ||= (e) => G("actionAuthOverride", e)
528
+ }, null, 8, ["checked", "disabled"]), g("strong", null, S((C(R).actionAuthOverride ?? C(R).actionAuth) === !1 ? "未启用" : "已启用"), 1)])]),
529
+ g("section", be, [g("header", null, [g("div", null, [g("h4", null, [i[31] ||= _(" 数据授权 ", -1), v(C(u), { title: "启用后,读取和执行会继续按数据范围校验。" }, {
530
+ default: w(() => [g("button", xe, [v(C(n), { name: "help" })])]),
531
+ _: 1
532
+ })])]), g("span", Se, [U("dataAuthOverride") ? (b(), p(C(o), {
533
+ key: 0,
534
+ type: "text",
535
+ size: "small",
536
+ disabled: H.value,
537
+ onClick: i[8] ||= (e) => W("dataAuthOverride")
538
+ }, {
539
+ default: w(() => [...i[32] ||= [_("重置", -1)]]),
540
+ _: 1
541
+ }, 8, ["disabled"])) : m("v-if", !0)])]), g("div", Ce, [v(C(l), {
542
+ checked: (C(R).dataAuthOverride ?? C(R).dataAuth) === !0,
543
+ disabled: H.value,
544
+ "checked-text": "开",
545
+ "unchecked-text": "关",
546
+ "onUpdate:checked": i[9] ||= (e) => G("dataAuthOverride", e)
547
+ }, null, 8, ["checked", "disabled"]), g("strong", null, S((C(R).dataAuthOverride ?? C(R).dataAuth) === !0 ? "已启用" : "未启用"), 1)])])
548
+ ])])], 32)) : (b(), h("form", {
549
+ key: 3,
550
+ class: "static-record-form",
551
+ onSubmit: i[21] ||= T((...e) => C(k).save && C(k).save(...e), ["prevent"])
552
+ }, [
553
+ i[44] ||= g("p", { class: "form-hint wide-field" }, " 可以先保存动作,再绑定执行能力。待绑定动作不可执行,页面引用后需完成绑定才能发布。 ", -1),
554
+ g("label", null, [i[34] ||= g("span", null, "动作编码", -1), v(C(c), {
555
+ value: C(R).actionCode,
556
+ disabled: H.value,
557
+ "onUpdate:value": i[11] ||= (e) => G("actionCode", e)
558
+ }, null, 8, ["value", "disabled"])]),
559
+ g("label", null, [i[35] ||= g("span", null, "动作名称", -1), v(C(c), {
560
+ value: C(R).title,
561
+ disabled: H.value,
562
+ "onUpdate:value": i[12] ||= (e) => G("title", e)
563
+ }, null, 8, ["value", "disabled"])]),
564
+ g("label", null, [i[36] ||= g("span", null, "执行层级", -1), v(C(d), {
565
+ value: C(R).actionLevel,
566
+ disabled: H.value,
567
+ options: Ie.value,
568
+ "onUpdate:value": i[13] ||= (e) => G("actionLevel", e)
569
+ }, null, 8, [
570
+ "value",
571
+ "disabled",
572
+ "options"
573
+ ])]),
574
+ g("label", null, [i[37] ||= g("span", null, "访问方式", -1), v(C(d), {
575
+ value: C(R).accessMode,
576
+ disabled: H.value,
577
+ options: [
578
+ {
579
+ label: "需要授权",
580
+ value: "AUTH_REQUIRED"
581
+ },
582
+ {
583
+ label: "登录可用",
584
+ value: "LOGIN_REQUIRED"
585
+ },
586
+ {
587
+ label: "匿名可用",
588
+ value: "ANONYMOUS_ALLOWED"
589
+ }
590
+ ],
591
+ "onUpdate:value": i[14] ||= (e) => G("accessMode", e)
592
+ }, null, 8, ["value", "disabled"])]),
593
+ e.moduleKind === "dynamic" ? (b(), h("label", we, [i[38] ||= g("span", null, "执行能力(可稍后绑定)", -1), v(C(d), {
594
+ value: C(R).executorKey,
595
+ "allow-clear": "",
596
+ placeholder: "待绑定",
597
+ disabled: H.value,
598
+ options: Fe.value,
599
+ "onUpdate:value": i[15] ||= (e) => Ke(e)
600
+ }, null, 8, [
601
+ "value",
602
+ "disabled",
603
+ "options"
604
+ ])])) : m("v-if", !0),
605
+ e.moduleKind === "dynamic" ? m("v-if", !0) : (b(), h("p", Te, " 静态模块通过同编码的代码动作声明绑定执行能力。 ")),
606
+ g("label", Ee, [v(C(a), {
607
+ checked: C(R).actionAuth !== !1,
608
+ disabled: H.value,
609
+ "onUpdate:checked": i[16] ||= (e) => G("actionAuth", e)
610
+ }, {
611
+ default: w(() => [...i[39] ||= [_("启用动作授权", -1)]]),
612
+ _: 1
613
+ }, 8, ["checked", "disabled"])]),
614
+ g("label", De, [v(C(a), {
615
+ checked: C(R).dataAuth === !0,
616
+ disabled: H.value,
617
+ "onUpdate:checked": i[17] ||= (e) => G("dataAuth", e)
618
+ }, {
619
+ default: w(() => [...i[40] ||= [_("启用数据授权", -1)]]),
620
+ _: 1
621
+ }, 8, ["checked", "disabled"])]),
622
+ g("label", null, [i[41] ||= g("span", null, "默认授予策略", -1), v(C(d), {
623
+ value: C(R).defaultGrantPolicy,
624
+ disabled: H.value,
625
+ options: [
626
+ {
627
+ label: "不默认授予",
628
+ value: "NONE"
629
+ },
630
+ {
631
+ label: "所有登录用户",
632
+ value: "ANY_LOGIN_USER"
633
+ },
634
+ {
635
+ label: "记录所有者",
636
+ value: "OWNER"
637
+ },
638
+ {
639
+ label: "办理人",
640
+ value: "ASSIGNEE"
641
+ },
642
+ {
643
+ label: "成员",
644
+ value: "MEMBER"
645
+ }
646
+ ],
647
+ "onUpdate:value": i[18] ||= (e) => G("defaultGrantPolicy", e)
648
+ }, null, 8, ["value", "disabled"])]),
649
+ g("label", Oe, [i[42] ||= g("span", null, "可用条件表达式", -1), v(C(s), {
650
+ value: C(R).availableExpression,
651
+ disabled: H.value,
652
+ "onUpdate:value": i[19] ||= (e) => G("availableExpression", e)
653
+ }, null, 8, ["value", "disabled"])]),
654
+ g("label", ke, [i[43] ||= g("span", null, "不可用提示", -1), v(C(s), {
655
+ value: C(R).unavailableMessage,
656
+ disabled: H.value,
657
+ "onUpdate:value": i[20] ||= (e) => G("unavailableMessage", e)
658
+ }, null, 8, ["value", "disabled"])])
659
+ ], 32)), C(A) || C(z) !== "view" ? (b(), p(C(se), {
660
+ key: 4,
661
+ record: C(R)
662
+ }, null, 8, ["record"])) : m("v-if", !0)]),
663
+ _: 1
664
+ }, 8, [
665
+ "mode",
666
+ "detail-title",
667
+ "explorer-search-keyword"
668
+ ]));
669
+ }
670
+ }), z = /* @__PURE__ */ e({ default: () => B }), B = /*#__PURE__*/ t(R, [["__scopeId", "data-v-68b1667d"]]);
671
+ //#endregion
672
+ export { z as n, B as t };