@rytass/bpm-core-react 0.20.1 → 0.21.1

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 (176) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +1 -1
  3. package/dist/approval-instance-list-page.css +1 -1
  4. package/dist/chunks/{FormBuilderView-CFRiw04B.js → FormBuilderView-6KdApi-D.js} +667 -584
  5. package/dist/chunks/FormBuilderView-6KdApi-D.js.map +1 -0
  6. package/dist/chunks/FormBuilderView-CGKkuVFi.cjs +4 -0
  7. package/dist/chunks/FormBuilderView-CGKkuVFi.cjs.map +1 -0
  8. package/dist/chunks/{FormRendererView-lYSaR8CQ.cjs → FormRendererView-B-xycC9S.cjs} +3 -3
  9. package/dist/chunks/{FormRendererView-lYSaR8CQ.cjs.map → FormRendererView-B-xycC9S.cjs.map} +1 -1
  10. package/dist/chunks/{FormRendererView-GfbVWEGa.js → FormRendererView-BcQKUi1A.js} +238 -238
  11. package/dist/chunks/{FormRendererView-GfbVWEGa.js.map → FormRendererView-BcQKUi1A.js.map} +1 -1
  12. package/dist/chunks/approval-instance-list-page-BI5fIXc-.js +724 -0
  13. package/dist/chunks/approval-instance-list-page-BI5fIXc-.js.map +1 -0
  14. package/dist/chunks/approval-instance-list-page-Cv5I1YPX.cjs +2 -0
  15. package/dist/chunks/approval-instance-list-page-Cv5I1YPX.cjs.map +1 -0
  16. package/dist/chunks/{categories-DQUtVEiV.cjs → categories-CyyqG6wG.cjs} +2 -2
  17. package/dist/chunks/{categories-DQUtVEiV.cjs.map → categories-CyyqG6wG.cjs.map} +1 -1
  18. package/dist/chunks/{categories-BAdxjNSA.js → categories-f7E-RJEc.js} +9 -9
  19. package/dist/chunks/{categories-BAdxjNSA.js.map → categories-f7E-RJEc.js.map} +1 -1
  20. package/dist/chunks/{compose-egQlRjuZ.js → compose-DFuLPmOA.js} +5 -5
  21. package/dist/chunks/{compose-egQlRjuZ.js.map → compose-DFuLPmOA.js.map} +1 -1
  22. package/dist/chunks/compose-DK3ocWwG.cjs +2 -0
  23. package/dist/chunks/compose-DK3ocWwG.cjs.map +1 -0
  24. package/dist/chunks/{delegations-CVmtpkRn.cjs → delegations-ClRCwD1I.cjs} +2 -2
  25. package/dist/chunks/{delegations-CVmtpkRn.cjs.map → delegations-ClRCwD1I.cjs.map} +1 -1
  26. package/dist/chunks/{delegations-9-yvWWws.js → delegations-CqND-Qtz.js} +5 -5
  27. package/dist/chunks/{delegations-9-yvWWws.js.map → delegations-CqND-Qtz.js.map} +1 -1
  28. package/dist/chunks/{delegations-CrfjsH94.cjs → delegations-D43VDSz1.cjs} +2 -2
  29. package/dist/chunks/{delegations-CrfjsH94.cjs.map → delegations-D43VDSz1.cjs.map} +1 -1
  30. package/dist/chunks/{delegations-CxnNvTCc.js → delegations-zisffLwk.js} +5 -5
  31. package/dist/chunks/{delegations-CxnNvTCc.js.map → delegations-zisffLwk.js.map} +1 -1
  32. package/dist/chunks/designer-CAUWEKJ4.cjs +69 -0
  33. package/dist/chunks/designer-CAUWEKJ4.cjs.map +1 -0
  34. package/dist/chunks/{designer-CZDlQ9Nf.js → designer-CCy5EbOe.js} +2380 -1786
  35. package/dist/chunks/designer-CCy5EbOe.js.map +1 -0
  36. package/dist/chunks/detail-C5KrUC7s.cjs +5 -0
  37. package/dist/chunks/detail-C5KrUC7s.cjs.map +1 -0
  38. package/dist/chunks/{detail-ByZV1XaI.js → detail-Dnc4PPWO.js} +804 -777
  39. package/dist/chunks/detail-Dnc4PPWO.js.map +1 -0
  40. package/dist/chunks/instance-error-message-BEM4O_Kj.js +208 -0
  41. package/dist/chunks/instance-error-message-BEM4O_Kj.js.map +1 -0
  42. package/dist/chunks/instance-error-message-BpCLCOjp.cjs +2 -0
  43. package/dist/chunks/instance-error-message-BpCLCOjp.cjs.map +1 -0
  44. package/dist/chunks/organization-time-zone-provider-B7CXQril.cjs +2 -0
  45. package/dist/chunks/organization-time-zone-provider-B7CXQril.cjs.map +1 -0
  46. package/dist/chunks/organization-time-zone-provider-DNL8yo4-.js +42 -0
  47. package/dist/chunks/organization-time-zone-provider-DNL8yo4-.js.map +1 -0
  48. package/dist/chunks/{providers-BbCs23sk.js → providers-CQWekD7_.js} +197 -196
  49. package/dist/chunks/providers-CQWekD7_.js.map +1 -0
  50. package/dist/chunks/providers-VUOh6i0i.cjs +2 -0
  51. package/dist/chunks/providers-VUOh6i0i.cjs.map +1 -0
  52. package/dist/components/approval-instance-field-filter-controls.d.cts +12 -0
  53. package/dist/components/approval-instance-field-filter-controls.d.ts +12 -0
  54. package/dist/components/approval-instance-field-filters.d.cts +86 -0
  55. package/dist/components/approval-instance-field-filters.d.ts +86 -0
  56. package/dist/components/approval-instance-list-page.d.cts +4 -0
  57. package/dist/components/approval-instance-list-page.d.ts +4 -0
  58. package/dist/components/notification-drawer-options.d.cts +18 -0
  59. package/dist/components/notification-drawer-options.d.ts +18 -0
  60. package/dist/index.cjs +1 -1
  61. package/dist/index.cjs.map +1 -1
  62. package/dist/index.d.cts +1 -0
  63. package/dist/index.d.ts +1 -0
  64. package/dist/index.js +23 -23
  65. package/dist/index.js.map +1 -1
  66. package/dist/lib/organization-time-zone-provider.d.cts +20 -0
  67. package/dist/lib/organization-time-zone-provider.d.ts +20 -0
  68. package/dist/lib/organization-time-zone.d.cts +8 -0
  69. package/dist/lib/organization-time-zone.d.ts +8 -0
  70. package/dist/lib/providers.d.cts +10 -1
  71. package/dist/lib/providers.d.ts +10 -1
  72. package/dist/next/BPMNextProviders.d.cts +8 -1
  73. package/dist/next/BPMNextProviders.d.ts +8 -1
  74. package/dist/next/index.cjs +1 -1
  75. package/dist/next/index.cjs.map +1 -1
  76. package/dist/next/index.js +12 -11
  77. package/dist/next/index.js.map +1 -1
  78. package/dist/next/workflow-chat-route.cjs +2 -2
  79. package/dist/next/workflow-chat-route.cjs.map +1 -1
  80. package/dist/next/workflow-chat-route.js +13 -13
  81. package/dist/pages/admin/delegations/index.cjs +1 -1
  82. package/dist/pages/admin/delegations/index.js +1 -1
  83. package/dist/pages/delegations/index.cjs +1 -1
  84. package/dist/pages/delegations/index.js +1 -1
  85. package/dist/pages/instances/detail/index.cjs +1 -1
  86. package/dist/pages/instances/detail/index.js +1 -1
  87. package/dist/pages/templates/categories/index.cjs +1 -1
  88. package/dist/pages/templates/categories/index.js +1 -1
  89. package/dist/pages/templates/compose/index.cjs +1 -1
  90. package/dist/pages/templates/compose/index.js +1 -1
  91. package/dist/pages/templates/designer/index.cjs +1 -1
  92. package/dist/pages/templates/designer/index.js +1 -1
  93. package/dist/views/admin/delegations/index.cjs +1 -1
  94. package/dist/views/admin/delegations/index.js +1 -1
  95. package/dist/views/admin/index.cjs +1 -1
  96. package/dist/views/admin/index.js +1 -1
  97. package/dist/views/admin/webhook-endpoints/index.cjs +1 -1
  98. package/dist/views/admin/webhook-endpoints/index.cjs.map +1 -1
  99. package/dist/views/admin/webhook-endpoints/index.js +60 -60
  100. package/dist/views/admin/webhook-endpoints/index.js.map +1 -1
  101. package/dist/views/cc/index.cjs +1 -1
  102. package/dist/views/cc/index.js +1 -1
  103. package/dist/views/delegations/index.cjs +1 -1
  104. package/dist/views/delegations/index.js +1 -1
  105. package/dist/views/forms/builder/FormBuilderView.d.cts +8 -1
  106. package/dist/views/forms/builder/FormBuilderView.d.ts +8 -1
  107. package/dist/views/forms/builder/index.cjs +1 -1
  108. package/dist/views/forms/builder/index.js +1 -1
  109. package/dist/views/forms/renderer/index.cjs +1 -1
  110. package/dist/views/forms/renderer/index.js +1 -1
  111. package/dist/views/instances/approver-filled-form.d.cts +8 -5
  112. package/dist/views/instances/approver-filled-form.d.ts +8 -5
  113. package/dist/views/instances/detail/index.cjs +1 -1
  114. package/dist/views/instances/detail/index.js +1 -1
  115. package/dist/views/instances/detail/sections/InstanceTasksSection.d.cts +2 -1
  116. package/dist/views/instances/detail/sections/InstanceTasksSection.d.ts +2 -1
  117. package/dist/views/instances/detail/sections/shared.d.cts +0 -1
  118. package/dist/views/instances/detail/sections/shared.d.ts +0 -1
  119. package/dist/views/instances/new/index.cjs +1 -1
  120. package/dist/views/instances/new/index.cjs.map +1 -1
  121. package/dist/views/instances/new/index.js +8 -8
  122. package/dist/views/instances/new/index.js.map +1 -1
  123. package/dist/views/search/index.cjs +1 -1
  124. package/dist/views/search/index.js +1 -1
  125. package/dist/views/sent/index.cjs +1 -1
  126. package/dist/views/sent/index.js +1 -1
  127. package/dist/views/templates/categories/index.cjs +1 -1
  128. package/dist/views/templates/categories/index.js +1 -1
  129. package/dist/views/templates/compose/index.cjs +1 -1
  130. package/dist/views/templates/compose/index.js +1 -1
  131. package/dist/views/templates/designer/NotifyWebhookTargetsEditor.d.cts +2 -0
  132. package/dist/views/templates/designer/NotifyWebhookTargetsEditor.d.ts +2 -0
  133. package/dist/views/templates/designer/approver-resolver-model.d.cts +105 -1
  134. package/dist/views/templates/designer/approver-resolver-model.d.ts +105 -1
  135. package/dist/views/templates/designer/dynamic-form-resolver-options.d.cts +5 -0
  136. package/dist/views/templates/designer/dynamic-form-resolver-options.d.ts +5 -0
  137. package/dist/views/templates/designer/index.cjs +1 -1
  138. package/dist/views/templates/designer/index.js +1 -1
  139. package/dist/views/templates/designer/node-actor-resolver-options.d.cts +44 -1
  140. package/dist/views/templates/designer/node-actor-resolver-options.d.ts +44 -1
  141. package/dist/views/templates/designer/notify-recipient-options.d.cts +81 -0
  142. package/dist/views/templates/designer/notify-recipient-options.d.ts +81 -0
  143. package/dist/views/templates/designer/position-level-options.d.cts +3 -1
  144. package/dist/views/templates/designer/position-level-options.d.ts +3 -1
  145. package/dist/views/templates/designer/position-scope.d.cts +51 -0
  146. package/dist/views/templates/designer/position-scope.d.ts +51 -0
  147. package/dist/views/templates/index.cjs +1 -1
  148. package/dist/views/templates/index.cjs.map +1 -1
  149. package/dist/views/templates/index.js +7 -7
  150. package/package.json +3 -3
  151. package/dist/chunks/FormBuilderView-CFRiw04B.js.map +0 -1
  152. package/dist/chunks/FormBuilderView-CpUgbSbt.cjs +0 -3
  153. package/dist/chunks/FormBuilderView-CpUgbSbt.cjs.map +0 -1
  154. package/dist/chunks/approval-instance-list-page-BnI4t5mD.js +0 -279
  155. package/dist/chunks/approval-instance-list-page-BnI4t5mD.js.map +0 -1
  156. package/dist/chunks/approval-instance-list-page-fqvmkBlg.cjs +0 -2
  157. package/dist/chunks/approval-instance-list-page-fqvmkBlg.cjs.map +0 -1
  158. package/dist/chunks/compose-Bb5bUVFd.cjs +0 -2
  159. package/dist/chunks/compose-Bb5bUVFd.cjs.map +0 -1
  160. package/dist/chunks/designer-CX9bhYJS.cjs +0 -69
  161. package/dist/chunks/designer-CX9bhYJS.cjs.map +0 -1
  162. package/dist/chunks/designer-CZDlQ9Nf.js.map +0 -1
  163. package/dist/chunks/detail-ByZV1XaI.js.map +0 -1
  164. package/dist/chunks/detail-ChseSF55.cjs +0 -5
  165. package/dist/chunks/detail-ChseSF55.cjs.map +0 -1
  166. package/dist/chunks/instance-error-message-DTARGbGo.cjs +0 -2
  167. package/dist/chunks/instance-error-message-DTARGbGo.cjs.map +0 -1
  168. package/dist/chunks/instance-error-message-q6gy5evy.js +0 -120
  169. package/dist/chunks/instance-error-message-q6gy5evy.js.map +0 -1
  170. package/dist/chunks/language-provider-Bdnx3Gxl.cjs +0 -2
  171. package/dist/chunks/language-provider-Bdnx3Gxl.cjs.map +0 -1
  172. package/dist/chunks/language-provider-phkWOapf.js +0 -17
  173. package/dist/chunks/language-provider-phkWOapf.js.map +0 -1
  174. package/dist/chunks/providers-BbCs23sk.js.map +0 -1
  175. package/dist/chunks/providers-D_KAgOOu.cjs +0 -2
  176. package/dist/chunks/providers-D_KAgOOu.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { ApproverResolver, ApproverResolverFallback } from '@rytass/bpm-core-shared/workflow';
1
+ import { ApproverResolver, ApproverResolverFallback, OrgManagerChainStart } from '@rytass/bpm-core-shared/workflow';
2
2
  import { FormDefinitionSchema } from '@rytass/bpm-core-shared/form';
3
3
  import { OrgUnitRecord, PositionRecord } from '@rytass/bpm-core-client/organization';
4
4
  import { OrgUnitOption, PositionOption } from '../../../components/admin-picker-options.cjs';
@@ -208,4 +208,108 @@ export type ApproverManagerRuleView = Readonly<{
208
208
  */
209
209
  export declare function readApproverManagerRule(resolver: ApproverResolver): ApproverManagerRuleView | null;
210
210
  export declare function withPreferClosestOrgUnit(resolver: ApproverResolver, preferClosestOrgUnit: boolean): ApproverResolver;
211
+ type OrgManagerChainResolver = Extract<ApproverResolver, {
212
+ readonly type: 'ORG_MANAGER_CHAIN';
213
+ }>;
214
+ export type OrgManagerChainStartMode = OrgManagerChainStart['type'];
215
+ export type OrgManagerChainStartOption = Readonly<{
216
+ id: string;
217
+ name: string;
218
+ }>;
219
+ /** The choices of 從誰的主管開始. Today's behaviour is the first one. */
220
+ export declare const ORG_MANAGER_CHAIN_START_OPTIONS: readonly Readonly<{
221
+ id: OrgManagerChainStartMode;
222
+ name: string;
223
+ }>[];
224
+ /** The id of the read-only entry an unknown start is shown as. */
225
+ export declare const UNSUPPORTED_ORG_MANAGER_CHAIN_START_OPTION_ID = "UNSUPPORTED";
226
+ /** The 從職等幾開始簽 choice that leaves the setting out. */
227
+ export declare const NO_START_POSITION_LEVEL_OPTION_ID = "NONE";
228
+ export declare const START_POSITION_LEVEL_HINT = "\u8077\u7B49\u4F4E\u65BC\u9019\u88E1\u7684\u4E3B\u7BA1\u53EA\u6703\u88AB\u7565\u904E\u3001\u4E0D\u7C3D\u6838\uFF1B\u7559\u767D\u5247\u5F9E\u93C8\u4E0A\u7B2C\u4E00\u4F4D\u6709\u8077\u7B49\u7684\u4E3B\u7BA1\u958B\u59CB\u7C3D\u3002\u4E0D\u53EF\u9AD8\u65BC\u300C\u7C3D\u5230\u8077\u7B49\u300D\u3002";
229
+ export declare const START_POSITION_LEVEL_ABOVE_MIN_HINT = "\u8D77\u59CB\u8077\u7B49\u4E0D\u53EF\u9AD8\u65BC\u7C3D\u5230\u8077\u7B49\uFF0C\u767C\u5E03\u524D\u5FC5\u9808\u4FEE\u6B63\u3002";
230
+ /**
231
+ * Where the chain starts, or `null` for a start this build does not know (a
232
+ * definition saved by a newer BPMCore): shown read-only, never rewritten.
233
+ * No `startFrom` is the initiator.
234
+ */
235
+ export declare function readOrgManagerChainStartMode(resolver: OrgManagerChainResolver): OrgManagerChainStartMode | null;
236
+ export type OrgManagerChainStartChoice = Readonly<{
237
+ /** Hint under the select: what the chosen start means. */
238
+ hint: string;
239
+ options: readonly OrgManagerChainStartOption[];
240
+ selected: OrgManagerChainStartOption;
241
+ }>;
242
+ /**
243
+ * The 從誰的主管開始 select. A start this build does not know is the current
244
+ * value as an extra read-only entry; picking it writes nothing
245
+ * ({@link readOrgManagerChainStartPick}).
246
+ */
247
+ export declare function readOrgManagerChainStartChoice(resolver: OrgManagerChainResolver): OrgManagerChainStartChoice;
248
+ /**
249
+ * The resolver after 從誰的主管開始 is set to `mode`: the initiator drops the
250
+ * `startFrom` key (the same as never having set it), a form field or earlier
251
+ * stages starts empty for the author to fill. The start level and the rest of
252
+ * the resolver are kept.
253
+ */
254
+ export declare function withOrgManagerChainStart(resolver: OrgManagerChainResolver, mode: OrgManagerChainStartMode): OrgManagerChainResolver;
255
+ /**
256
+ * The resolver a 從誰的主管開始 pick produces, or `null` when the pick must
257
+ * change nothing: no option, the read-only unsupported entry, or the start the
258
+ * resolver already has (re-picking it used to clear the field or stages
259
+ * already chosen).
260
+ */
261
+ export declare function readOrgManagerChainStartPick(resolver: ApproverResolver, optionId: string | null): OrgManagerChainResolver | null;
262
+ /** The form field a `FORM_MEMBER` start names, else `null`. */
263
+ export declare function readOrgManagerChainStartFormPath(resolver: OrgManagerChainResolver): string | null;
264
+ /** The stages a `NODE_ACTOR` start names, else `null`. */
265
+ export declare function readOrgManagerChainStartNodeIds(resolver: OrgManagerChainResolver): readonly string[] | null;
266
+ /**
267
+ * The resolver with the field of a `FORM_MEMBER` start set. Any other start
268
+ * comes back as the same object: there is no field to write.
269
+ */
270
+ export declare function withOrgManagerChainStartFormPath(resolver: OrgManagerChainResolver, formPath: string): OrgManagerChainResolver;
271
+ /**
272
+ * The resolver with the stages of a `NODE_ACTOR` start set. Any other start
273
+ * comes back as the same object.
274
+ */
275
+ export declare function withOrgManagerChainStartNodeIds(resolver: OrgManagerChainResolver, nodeIds: readonly string[]): OrgManagerChainResolver;
276
+ /**
277
+ * The resolver after 簽到職等 is set to `minPositionLevel`: `startFrom`,
278
+ * `startPositionLevel` and `fallback` stay as they were.
279
+ */
280
+ export declare function withOrgManagerChainMinPositionLevel(resolver: OrgManagerChainResolver, minPositionLevel: number): OrgManagerChainResolver;
281
+ export type OrgManagerChainStartLevelChoice = Readonly<{
282
+ /** The stored level is not a whole number: shown, not offered. */
283
+ invalid: boolean;
284
+ options: readonly OrgManagerChainStartOption[];
285
+ selected: OrgManagerChainStartOption;
286
+ }>;
287
+ /**
288
+ * The 從職等幾開始簽 select: 不指定 plus the position levels at or below
289
+ * 簽到職等 (a start above it cannot be published, so it is not offered). A
290
+ * stored level the directory has no position for, or one above 簽到職等, stays
291
+ * in the list so the select can show it; a stored value that is not a number
292
+ * is shown as invalid rather than as 不指定.
293
+ */
294
+ export declare function readOrgManagerChainStartLevelChoice(resolver: OrgManagerChainResolver, positions: readonly PositionRecord[]): OrgManagerChainStartLevelChoice;
295
+ /**
296
+ * The resolver a 從職等幾開始簽 pick produces, or `null` when the pick must
297
+ * change nothing: no option, the invalid entry, or the level already stored.
298
+ * 不指定 drops the `startPositionLevel` key (never writes `undefined`).
299
+ */
300
+ export declare function readOrgManagerChainStartLevelPick(resolver: ApproverResolver, optionId: string | null): OrgManagerChainResolver | null;
301
+ /**
302
+ * Why the chosen 簽到職等 and 從職等幾開始簽 cannot be published together, or
303
+ * `null`. The same rule as the publish check (`readOrgManagerChainIssue`),
304
+ * said under the select as the author picks.
305
+ */
306
+ export declare function readOrgManagerChainStartLevelProblem(resolver: OrgManagerChainResolver): string | null;
307
+ /**
308
+ * The hint under 無主管時 for a manager chain. With neither the start nor the
309
+ * start level set it is the text it always was. Otherwise it adds the two ways
310
+ * the engine ends up at the fallback with nobody on the chain: no start person
311
+ * (`resolveOrgManagerChainStart` returns no member) and no manager at or above
312
+ * the start level (the chain stays empty and `resolveFallbackAssignees` runs).
313
+ */
314
+ export declare function readOrgManagerChainFallbackHint(resolver: OrgManagerChainResolver): string;
211
315
  export {};
@@ -1,4 +1,4 @@
1
- import { ApproverResolver, ApproverResolverFallback } from '@rytass/bpm-core-shared/workflow';
1
+ import { ApproverResolver, ApproverResolverFallback, OrgManagerChainStart } from '@rytass/bpm-core-shared/workflow';
2
2
  import { FormDefinitionSchema } from '@rytass/bpm-core-shared/form';
3
3
  import { OrgUnitRecord, PositionRecord } from '@rytass/bpm-core-client/organization';
4
4
  import { OrgUnitOption, PositionOption } from '../../../components/admin-picker-options.js';
@@ -208,4 +208,108 @@ export type ApproverManagerRuleView = Readonly<{
208
208
  */
209
209
  export declare function readApproverManagerRule(resolver: ApproverResolver): ApproverManagerRuleView | null;
210
210
  export declare function withPreferClosestOrgUnit(resolver: ApproverResolver, preferClosestOrgUnit: boolean): ApproverResolver;
211
+ type OrgManagerChainResolver = Extract<ApproverResolver, {
212
+ readonly type: 'ORG_MANAGER_CHAIN';
213
+ }>;
214
+ export type OrgManagerChainStartMode = OrgManagerChainStart['type'];
215
+ export type OrgManagerChainStartOption = Readonly<{
216
+ id: string;
217
+ name: string;
218
+ }>;
219
+ /** The choices of 從誰的主管開始. Today's behaviour is the first one. */
220
+ export declare const ORG_MANAGER_CHAIN_START_OPTIONS: readonly Readonly<{
221
+ id: OrgManagerChainStartMode;
222
+ name: string;
223
+ }>[];
224
+ /** The id of the read-only entry an unknown start is shown as. */
225
+ export declare const UNSUPPORTED_ORG_MANAGER_CHAIN_START_OPTION_ID = "UNSUPPORTED";
226
+ /** The 從職等幾開始簽 choice that leaves the setting out. */
227
+ export declare const NO_START_POSITION_LEVEL_OPTION_ID = "NONE";
228
+ export declare const START_POSITION_LEVEL_HINT = "\u8077\u7B49\u4F4E\u65BC\u9019\u88E1\u7684\u4E3B\u7BA1\u53EA\u6703\u88AB\u7565\u904E\u3001\u4E0D\u7C3D\u6838\uFF1B\u7559\u767D\u5247\u5F9E\u93C8\u4E0A\u7B2C\u4E00\u4F4D\u6709\u8077\u7B49\u7684\u4E3B\u7BA1\u958B\u59CB\u7C3D\u3002\u4E0D\u53EF\u9AD8\u65BC\u300C\u7C3D\u5230\u8077\u7B49\u300D\u3002";
229
+ export declare const START_POSITION_LEVEL_ABOVE_MIN_HINT = "\u8D77\u59CB\u8077\u7B49\u4E0D\u53EF\u9AD8\u65BC\u7C3D\u5230\u8077\u7B49\uFF0C\u767C\u5E03\u524D\u5FC5\u9808\u4FEE\u6B63\u3002";
230
+ /**
231
+ * Where the chain starts, or `null` for a start this build does not know (a
232
+ * definition saved by a newer BPMCore): shown read-only, never rewritten.
233
+ * No `startFrom` is the initiator.
234
+ */
235
+ export declare function readOrgManagerChainStartMode(resolver: OrgManagerChainResolver): OrgManagerChainStartMode | null;
236
+ export type OrgManagerChainStartChoice = Readonly<{
237
+ /** Hint under the select: what the chosen start means. */
238
+ hint: string;
239
+ options: readonly OrgManagerChainStartOption[];
240
+ selected: OrgManagerChainStartOption;
241
+ }>;
242
+ /**
243
+ * The 從誰的主管開始 select. A start this build does not know is the current
244
+ * value as an extra read-only entry; picking it writes nothing
245
+ * ({@link readOrgManagerChainStartPick}).
246
+ */
247
+ export declare function readOrgManagerChainStartChoice(resolver: OrgManagerChainResolver): OrgManagerChainStartChoice;
248
+ /**
249
+ * The resolver after 從誰的主管開始 is set to `mode`: the initiator drops the
250
+ * `startFrom` key (the same as never having set it), a form field or earlier
251
+ * stages starts empty for the author to fill. The start level and the rest of
252
+ * the resolver are kept.
253
+ */
254
+ export declare function withOrgManagerChainStart(resolver: OrgManagerChainResolver, mode: OrgManagerChainStartMode): OrgManagerChainResolver;
255
+ /**
256
+ * The resolver a 從誰的主管開始 pick produces, or `null` when the pick must
257
+ * change nothing: no option, the read-only unsupported entry, or the start the
258
+ * resolver already has (re-picking it used to clear the field or stages
259
+ * already chosen).
260
+ */
261
+ export declare function readOrgManagerChainStartPick(resolver: ApproverResolver, optionId: string | null): OrgManagerChainResolver | null;
262
+ /** The form field a `FORM_MEMBER` start names, else `null`. */
263
+ export declare function readOrgManagerChainStartFormPath(resolver: OrgManagerChainResolver): string | null;
264
+ /** The stages a `NODE_ACTOR` start names, else `null`. */
265
+ export declare function readOrgManagerChainStartNodeIds(resolver: OrgManagerChainResolver): readonly string[] | null;
266
+ /**
267
+ * The resolver with the field of a `FORM_MEMBER` start set. Any other start
268
+ * comes back as the same object: there is no field to write.
269
+ */
270
+ export declare function withOrgManagerChainStartFormPath(resolver: OrgManagerChainResolver, formPath: string): OrgManagerChainResolver;
271
+ /**
272
+ * The resolver with the stages of a `NODE_ACTOR` start set. Any other start
273
+ * comes back as the same object.
274
+ */
275
+ export declare function withOrgManagerChainStartNodeIds(resolver: OrgManagerChainResolver, nodeIds: readonly string[]): OrgManagerChainResolver;
276
+ /**
277
+ * The resolver after 簽到職等 is set to `minPositionLevel`: `startFrom`,
278
+ * `startPositionLevel` and `fallback` stay as they were.
279
+ */
280
+ export declare function withOrgManagerChainMinPositionLevel(resolver: OrgManagerChainResolver, minPositionLevel: number): OrgManagerChainResolver;
281
+ export type OrgManagerChainStartLevelChoice = Readonly<{
282
+ /** The stored level is not a whole number: shown, not offered. */
283
+ invalid: boolean;
284
+ options: readonly OrgManagerChainStartOption[];
285
+ selected: OrgManagerChainStartOption;
286
+ }>;
287
+ /**
288
+ * The 從職等幾開始簽 select: 不指定 plus the position levels at or below
289
+ * 簽到職等 (a start above it cannot be published, so it is not offered). A
290
+ * stored level the directory has no position for, or one above 簽到職等, stays
291
+ * in the list so the select can show it; a stored value that is not a number
292
+ * is shown as invalid rather than as 不指定.
293
+ */
294
+ export declare function readOrgManagerChainStartLevelChoice(resolver: OrgManagerChainResolver, positions: readonly PositionRecord[]): OrgManagerChainStartLevelChoice;
295
+ /**
296
+ * The resolver a 從職等幾開始簽 pick produces, or `null` when the pick must
297
+ * change nothing: no option, the invalid entry, or the level already stored.
298
+ * 不指定 drops the `startPositionLevel` key (never writes `undefined`).
299
+ */
300
+ export declare function readOrgManagerChainStartLevelPick(resolver: ApproverResolver, optionId: string | null): OrgManagerChainResolver | null;
301
+ /**
302
+ * Why the chosen 簽到職等 and 從職等幾開始簽 cannot be published together, or
303
+ * `null`. The same rule as the publish check (`readOrgManagerChainIssue`),
304
+ * said under the select as the author picks.
305
+ */
306
+ export declare function readOrgManagerChainStartLevelProblem(resolver: OrgManagerChainResolver): string | null;
307
+ /**
308
+ * The hint under 無主管時 for a manager chain. With neither the start nor the
309
+ * start level set it is the text it always was. Otherwise it adds the two ways
310
+ * the engine ends up at the fallback with nobody on the chain: no start person
311
+ * (`resolveOrgManagerChainStart` returns no member) and no manager at or above
312
+ * the start level (the chain stays empty and `resolveFallbackAssignees` runs).
313
+ */
314
+ export declare function readOrgManagerChainFallbackHint(resolver: OrgManagerChainResolver): string;
211
315
  export {};
@@ -46,6 +46,11 @@ export declare function readFormMemberManagerFieldChoice(schema: FormDefinitionS
46
46
  export declare function readOrgUnitFieldOptions(schema: FormDefinitionSchema | null): readonly MemberFieldOption[];
47
47
  /** The field picker for 組織 = 表單欄位 of 指定組織主管. */
48
48
  export declare function readFormOrgUnitFieldChoice(schema: FormDefinitionSchema | null, formPath: string): DynamicFormFieldChoice;
49
+ /**
50
+ * What a form field is called in a sentence: its label, or the field key when
51
+ * the form has no such field (any more) or the field has no label.
52
+ */
53
+ export declare function readFormFieldDisplayName(schema: FormDefinitionSchema | null, formPath: string): string;
49
54
  /**
50
55
  * 依表單欄位:<label>; the field key when the form does not have it (any
51
56
  * more), and a marker when the key names something that is not a member field.
@@ -46,6 +46,11 @@ export declare function readFormMemberManagerFieldChoice(schema: FormDefinitionS
46
46
  export declare function readOrgUnitFieldOptions(schema: FormDefinitionSchema | null): readonly MemberFieldOption[];
47
47
  /** The field picker for 組織 = 表單欄位 of 指定組織主管. */
48
48
  export declare function readFormOrgUnitFieldChoice(schema: FormDefinitionSchema | null, formPath: string): DynamicFormFieldChoice;
49
+ /**
50
+ * What a form field is called in a sentence: its label, or the field key when
51
+ * the form has no such field (any more) or the field has no label.
52
+ */
53
+ export declare function readFormFieldDisplayName(schema: FormDefinitionSchema | null, formPath: string): string;
49
54
  /**
50
55
  * 依表單欄位:<label>; the field key when the form does not have it (any
51
56
  * more), and a marker when the key names something that is not a member field.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/designer-CX9bhYJS.cjs");exports.TemplateDesignerView=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/designer-CAUWEKJ4.cjs");exports.TemplateDesignerView=e.t;
@@ -1 +1 @@
1
- export { t as TemplateDesignerView } from "../../../chunks/designer-CZDlQ9Nf.js";
1
+ export { t as TemplateDesignerView } from "../../../chunks/designer-CCy5EbOe.js";
@@ -1,4 +1,4 @@
1
- import { WorkflowDefinition } from '@rytass/bpm-core-shared/workflow';
1
+ import { ExcludeInitiatorWhenEmpty, WorkflowDefinition } from '@rytass/bpm-core-shared/workflow';
2
2
  export type NodeActorOption = Readonly<{
3
3
  id: string;
4
4
  name: string;
@@ -16,6 +16,16 @@ export type NodeActorStageChoice = Readonly<{
16
16
  export declare const NO_UPSTREAM_USER_TASK_HINT = "\u9019\u500B\u7BC0\u9EDE\u524D\u9762\u6C92\u6709\u53EF\u4EE5\u9078\u7684\u7C3D\u6838\u95DC\u5361\uFF0C\u8ACB\u5148\u5728\u5B83\u524D\u9762\u52A0\u5165\u7C3D\u6838\u7BC0\u9EDE\uFF08\u6C92\u6709\u9032\u5165\u689D\u4EF6\u3001\u6C92\u8A2D\u8DF3\u904E\u6B64\u95DC\uFF0C\u4E5F\u6C92\u8A2D\u903E\u6642\u81EA\u52D5\u6838\u51C6\uFF09";
17
17
  /** The 關卡 picker's hint while the selection has no problem to report. */
18
18
  export declare const NODE_ACTOR_STAGE_HINT = "\u7C3D\u6838\u4EBA\u53D6\u81EA\u4F60\u9078\u7684\u524D\u9762\u95DC\u5361\u5BE6\u969B\u7C3D\u6838\u7684\u4EBA\uFF1B\u53EF\u8907\u9078\uFF0C\u6574\u7D44\u8981\u6DB5\u84CB\u6BCF\u689D\u8DEF\u5F91\u3002\u8907\u9078\u591A\u500B\u95DC\u5361\u6642\uFF0C\u53D6\u6700\u8FD1\u5BE6\u969B\u8D70\u5230\u7684\u90A3\u4E00\u95DC\u7684\u7C3D\u6838\u4EBA\uFF0C\u4E0D\u662F\u5168\u90E8\u95DC\u5361\u7684\u7C3D\u6838\u4EBA\u3002";
19
+ /**
20
+ * The 關卡 picker's hint for a manager chain's 前面關卡的簽核者 start, while
21
+ * the selection has no problem to report.
22
+ */
23
+ export declare const ORG_MANAGER_CHAIN_STAGE_HINT = "\u8D77\u9EDE\u662F\u4F60\u9078\u7684\u524D\u9762\u95DC\u5361\u5BE6\u969B\u7C3D\u6838\u7684\u90A3\u4E00\u4F4D\uFF0C\u5F9E\u4ED6\u7684\u4E3B\u7BA1\u958B\u59CB\u5F80\u4E0A\u7C3D\uFF1B\u53EA\u80FD\u9078\u6BCF\u6B21\u53EA\u6703\u6709\u4E00\u4F4D\u7C3D\u6838\u4EBA\u7684\u95DC\u5361\u3002\u53EF\u8907\u9078\uFF0C\u6574\u7D44\u8981\u6DB5\u84CB\u6BCF\u689D\u8DEF\u5F91\uFF0C\u53D6\u6700\u8FD1\u5BE6\u969B\u8D70\u5230\u7684\u90A3\u4E00\u95DC\u7684\u7C3D\u6838\u8005\u3002";
24
+ /**
25
+ * The 關卡 picker's hint when every stage upstream of a manager chain may end
26
+ * with several signers, so none can be the start.
27
+ */
28
+ export declare const ORG_MANAGER_CHAIN_ONLY_MULTI_APPROVER_STAGES_HINT = "\u524D\u9762\u7684\u7C3D\u6838\u95DC\u5361\u90FD\u53EF\u80FD\u6709\u591A\u4F4D\u7C3D\u6838\u4EBA\uFF0C\u6240\u4EE5\u4E0D\u80FD\u7576\u4E3B\u7BA1\u93C8\u7684\u8D77\u9EDE\uFF1B\u8ACB\u6539\u7528\u53EA\u6709\u4E00\u4F4D\u7C3D\u6838\u4EBA\u7684\u95DC\u5361\uFF0C\u6216\u6539\u9078\u5176\u4ED6\u8D77\u9EDE\u3002";
19
29
  /**
20
30
  * The 關卡 picker of 依前面關卡的簽核者: the user tasks upstream of `nodeId`
21
31
  * that always end with a real signer (`readNodeActorSourceSkipReasons` is
@@ -29,6 +39,16 @@ export declare const NODE_ACTOR_STAGE_HINT = "\u7C3D\u6838\u4EBA\u53D6\u81EA\u4F
29
39
  * stored choice stays visible until the author fixes it.
30
40
  */
31
41
  export declare function readNodeActorStageChoice(definition: WorkflowDefinition, nodeId: string, selectedIds: readonly string[]): NodeActorStageChoice;
42
+ /**
43
+ * The 關卡 picker of a manager chain's 前面關卡的簽核者 start: the same stages
44
+ * as {@link readNodeActorStageChoice} offers, minus the ones that may end with
45
+ * several signers. The chain climbs from one person, so a stage that
46
+ * `canUserTaskHaveMultipleApprovers` is not offered (a 並行全部同意 stage still
47
+ * is for 依前面關卡的簽核者, which takes everyone). A stored stage of that kind
48
+ * stays in the list, marked, and the selection's problems include the
49
+ * single-signer rule the publish lint runs (`readSingleApproverSourceIssues`).
50
+ */
51
+ export declare function readOrgManagerChainStageChoice(definition: WorkflowDefinition, nodeId: string, selectedIds: readonly string[]): NodeActorStageChoice;
32
52
  /**
33
53
  * The graph problems of every 依前面關卡的簽核者 node, naming the node: the
34
54
  * checks the backend publish lint runs (`readNodeActorSourceIssues`), for the
@@ -36,3 +56,26 @@ export declare function readNodeActorStageChoice(definition: WorkflowDefinition,
36
56
  * `readApproverResolverIssue`, which owns that message.
37
57
  */
38
58
  export declare function readNodeActorGraphIssues(definition: WorkflowDefinition): readonly string[];
59
+ /** The hint under the 不可與前面關卡同一人 picker while it has no problem to report. */
60
+ export declare const EXCLUDE_NODE_ACTORS_STAGE_HINT = "\u6B64\u95DC\u7684\u7C3D\u6838\u4EBA\u4E0D\u6703\u662F\u4F60\u9078\u7684\u524D\u9762\u95DC\u5361\u5BE6\u969B\u7C3D\u6838\u7684\u4EBA\uFF08\u542B\u5176\u4EE3\u7406\u4EBA\uFF09\uFF0C\u4E5F\u4E0D\u80FD\u88AB\u8F49\u7C3D\u6216\u52A0\u7C3D\u5230\u6B64\u95DC\uFF1B\u53EF\u8907\u9078\uFF0C\u6BCF\u500B\u95DC\u5361\u90FD\u6703\u6392\u9664\u3002\u53EA\u80FD\u9078\u6BCF\u689D\u8DEF\u5F91\u90FD\u6703\u7D93\u904E\u3001\u800C\u4E14\u4E00\u5B9A\u6709\u4EBA\u5BE6\u969B\u7C3D\u6838\u7684\u95DC\u5361\uFF08\u6C92\u6709\u9032\u5165\u689D\u4EF6\u3001\u6C92\u8A2D\u8DF3\u904E\u6B64\u95DC\u3001\u6C92\u8A2D\u903E\u6642\u81EA\u52D5\u6838\u51C6\uFF09\uFF1B\u689D\u4EF6\u5F0F\u7684\u95DC\u5361\u3001\u5E73\u884C\u5206\u652F\u4E0A\u7684\u95DC\u5361\u90FD\u4E0D\u652F\u63F4\uFF0C\u689D\u4EF6\u5F0F\u7684\u8ACB\u6539\u7528\u5206\u6D41\u628A\u5169\u95DC\u653E\u5728\u540C\u4E00\u689D\u8DEF\u7DDA\u4E0A\uFF0C\u5E73\u884C\u5206\u652F\u4E0A\u7684\u8ACB\u6539\u6210\u5148\u5F8C\u4E32\u63A5\u3002";
61
+ /** Shown when no earlier stage can be picked. */
62
+ export declare const NO_EXCLUDABLE_STAGE_HINT = "\u9019\u500B\u7BC0\u9EDE\u524D\u9762\u6C92\u6709\u53EF\u4EE5\u9078\u7684\u7C3D\u6838\u95DC\u5361\uFF0C\u8ACB\u5148\u5728\u5B83\u524D\u9762\u52A0\u5165\u7C3D\u6838\u7BC0\u9EDE\uFF08\u6BCF\u689D\u8DEF\u5F91\u90FD\u6703\u7D93\u904E\u3001\u6C92\u6709\u9032\u5165\u689D\u4EF6\u3001\u6C92\u8A2D\u8DF3\u904E\u6B64\u95DC\uFF0C\u4E5F\u6C92\u8A2D\u903E\u6642\u81EA\u52D5\u6838\u51C6\uFF09";
63
+ /**
64
+ * The 不可與前面關卡同一人 picker: the user tasks that pass the publish
65
+ * check on their own (`readExcludeNodeActorsIssues` with just that stage
66
+ * listed: upstream of `nodeId`, on every path to it, not skippable, a real
67
+ * signer every time). Each listed stage has to pass alone, so unlike the
68
+ * `NODE_ACTOR` picker nothing is left to the selection as a whole. A stored
69
+ * stage that does not qualify (gone, no longer upstream, or skippable) stays in
70
+ * the list, marked, and the selection's `problems` say why, so the stored
71
+ * choice is never dropped silently.
72
+ */
73
+ export declare function readExcludeNodeActorStageChoice(definition: WorkflowDefinition, nodeId: string, selectedIds: readonly string[], whenEmpty: ExcludeInitiatorWhenEmpty): NodeActorStageChoice;
74
+ /**
75
+ * The graph problems of every node with 不可與前面關卡同一人, naming the node:
76
+ * the checks the backend publish lint runs (`readExcludeNodeActorsIssues`),
77
+ * for the designer to show before publish. The shape of the setting (no stage
78
+ * chosen, no 排除後沒有簽核人時) is left to `readExcludeNodeActorsShapeIssue`,
79
+ * which blocks saving.
80
+ */
81
+ export declare function readExcludeNodeActorsGraphIssues(definition: WorkflowDefinition): readonly string[];
@@ -1,4 +1,4 @@
1
- import { WorkflowDefinition } from '@rytass/bpm-core-shared/workflow';
1
+ import { ExcludeInitiatorWhenEmpty, WorkflowDefinition } from '@rytass/bpm-core-shared/workflow';
2
2
  export type NodeActorOption = Readonly<{
3
3
  id: string;
4
4
  name: string;
@@ -16,6 +16,16 @@ export type NodeActorStageChoice = Readonly<{
16
16
  export declare const NO_UPSTREAM_USER_TASK_HINT = "\u9019\u500B\u7BC0\u9EDE\u524D\u9762\u6C92\u6709\u53EF\u4EE5\u9078\u7684\u7C3D\u6838\u95DC\u5361\uFF0C\u8ACB\u5148\u5728\u5B83\u524D\u9762\u52A0\u5165\u7C3D\u6838\u7BC0\u9EDE\uFF08\u6C92\u6709\u9032\u5165\u689D\u4EF6\u3001\u6C92\u8A2D\u8DF3\u904E\u6B64\u95DC\uFF0C\u4E5F\u6C92\u8A2D\u903E\u6642\u81EA\u52D5\u6838\u51C6\uFF09";
17
17
  /** The 關卡 picker's hint while the selection has no problem to report. */
18
18
  export declare const NODE_ACTOR_STAGE_HINT = "\u7C3D\u6838\u4EBA\u53D6\u81EA\u4F60\u9078\u7684\u524D\u9762\u95DC\u5361\u5BE6\u969B\u7C3D\u6838\u7684\u4EBA\uFF1B\u53EF\u8907\u9078\uFF0C\u6574\u7D44\u8981\u6DB5\u84CB\u6BCF\u689D\u8DEF\u5F91\u3002\u8907\u9078\u591A\u500B\u95DC\u5361\u6642\uFF0C\u53D6\u6700\u8FD1\u5BE6\u969B\u8D70\u5230\u7684\u90A3\u4E00\u95DC\u7684\u7C3D\u6838\u4EBA\uFF0C\u4E0D\u662F\u5168\u90E8\u95DC\u5361\u7684\u7C3D\u6838\u4EBA\u3002";
19
+ /**
20
+ * The 關卡 picker's hint for a manager chain's 前面關卡的簽核者 start, while
21
+ * the selection has no problem to report.
22
+ */
23
+ export declare const ORG_MANAGER_CHAIN_STAGE_HINT = "\u8D77\u9EDE\u662F\u4F60\u9078\u7684\u524D\u9762\u95DC\u5361\u5BE6\u969B\u7C3D\u6838\u7684\u90A3\u4E00\u4F4D\uFF0C\u5F9E\u4ED6\u7684\u4E3B\u7BA1\u958B\u59CB\u5F80\u4E0A\u7C3D\uFF1B\u53EA\u80FD\u9078\u6BCF\u6B21\u53EA\u6703\u6709\u4E00\u4F4D\u7C3D\u6838\u4EBA\u7684\u95DC\u5361\u3002\u53EF\u8907\u9078\uFF0C\u6574\u7D44\u8981\u6DB5\u84CB\u6BCF\u689D\u8DEF\u5F91\uFF0C\u53D6\u6700\u8FD1\u5BE6\u969B\u8D70\u5230\u7684\u90A3\u4E00\u95DC\u7684\u7C3D\u6838\u8005\u3002";
24
+ /**
25
+ * The 關卡 picker's hint when every stage upstream of a manager chain may end
26
+ * with several signers, so none can be the start.
27
+ */
28
+ export declare const ORG_MANAGER_CHAIN_ONLY_MULTI_APPROVER_STAGES_HINT = "\u524D\u9762\u7684\u7C3D\u6838\u95DC\u5361\u90FD\u53EF\u80FD\u6709\u591A\u4F4D\u7C3D\u6838\u4EBA\uFF0C\u6240\u4EE5\u4E0D\u80FD\u7576\u4E3B\u7BA1\u93C8\u7684\u8D77\u9EDE\uFF1B\u8ACB\u6539\u7528\u53EA\u6709\u4E00\u4F4D\u7C3D\u6838\u4EBA\u7684\u95DC\u5361\uFF0C\u6216\u6539\u9078\u5176\u4ED6\u8D77\u9EDE\u3002";
19
29
  /**
20
30
  * The 關卡 picker of 依前面關卡的簽核者: the user tasks upstream of `nodeId`
21
31
  * that always end with a real signer (`readNodeActorSourceSkipReasons` is
@@ -29,6 +39,16 @@ export declare const NODE_ACTOR_STAGE_HINT = "\u7C3D\u6838\u4EBA\u53D6\u81EA\u4F
29
39
  * stored choice stays visible until the author fixes it.
30
40
  */
31
41
  export declare function readNodeActorStageChoice(definition: WorkflowDefinition, nodeId: string, selectedIds: readonly string[]): NodeActorStageChoice;
42
+ /**
43
+ * The 關卡 picker of a manager chain's 前面關卡的簽核者 start: the same stages
44
+ * as {@link readNodeActorStageChoice} offers, minus the ones that may end with
45
+ * several signers. The chain climbs from one person, so a stage that
46
+ * `canUserTaskHaveMultipleApprovers` is not offered (a 並行全部同意 stage still
47
+ * is for 依前面關卡的簽核者, which takes everyone). A stored stage of that kind
48
+ * stays in the list, marked, and the selection's problems include the
49
+ * single-signer rule the publish lint runs (`readSingleApproverSourceIssues`).
50
+ */
51
+ export declare function readOrgManagerChainStageChoice(definition: WorkflowDefinition, nodeId: string, selectedIds: readonly string[]): NodeActorStageChoice;
32
52
  /**
33
53
  * The graph problems of every 依前面關卡的簽核者 node, naming the node: the
34
54
  * checks the backend publish lint runs (`readNodeActorSourceIssues`), for the
@@ -36,3 +56,26 @@ export declare function readNodeActorStageChoice(definition: WorkflowDefinition,
36
56
  * `readApproverResolverIssue`, which owns that message.
37
57
  */
38
58
  export declare function readNodeActorGraphIssues(definition: WorkflowDefinition): readonly string[];
59
+ /** The hint under the 不可與前面關卡同一人 picker while it has no problem to report. */
60
+ export declare const EXCLUDE_NODE_ACTORS_STAGE_HINT = "\u6B64\u95DC\u7684\u7C3D\u6838\u4EBA\u4E0D\u6703\u662F\u4F60\u9078\u7684\u524D\u9762\u95DC\u5361\u5BE6\u969B\u7C3D\u6838\u7684\u4EBA\uFF08\u542B\u5176\u4EE3\u7406\u4EBA\uFF09\uFF0C\u4E5F\u4E0D\u80FD\u88AB\u8F49\u7C3D\u6216\u52A0\u7C3D\u5230\u6B64\u95DC\uFF1B\u53EF\u8907\u9078\uFF0C\u6BCF\u500B\u95DC\u5361\u90FD\u6703\u6392\u9664\u3002\u53EA\u80FD\u9078\u6BCF\u689D\u8DEF\u5F91\u90FD\u6703\u7D93\u904E\u3001\u800C\u4E14\u4E00\u5B9A\u6709\u4EBA\u5BE6\u969B\u7C3D\u6838\u7684\u95DC\u5361\uFF08\u6C92\u6709\u9032\u5165\u689D\u4EF6\u3001\u6C92\u8A2D\u8DF3\u904E\u6B64\u95DC\u3001\u6C92\u8A2D\u903E\u6642\u81EA\u52D5\u6838\u51C6\uFF09\uFF1B\u689D\u4EF6\u5F0F\u7684\u95DC\u5361\u3001\u5E73\u884C\u5206\u652F\u4E0A\u7684\u95DC\u5361\u90FD\u4E0D\u652F\u63F4\uFF0C\u689D\u4EF6\u5F0F\u7684\u8ACB\u6539\u7528\u5206\u6D41\u628A\u5169\u95DC\u653E\u5728\u540C\u4E00\u689D\u8DEF\u7DDA\u4E0A\uFF0C\u5E73\u884C\u5206\u652F\u4E0A\u7684\u8ACB\u6539\u6210\u5148\u5F8C\u4E32\u63A5\u3002";
61
+ /** Shown when no earlier stage can be picked. */
62
+ export declare const NO_EXCLUDABLE_STAGE_HINT = "\u9019\u500B\u7BC0\u9EDE\u524D\u9762\u6C92\u6709\u53EF\u4EE5\u9078\u7684\u7C3D\u6838\u95DC\u5361\uFF0C\u8ACB\u5148\u5728\u5B83\u524D\u9762\u52A0\u5165\u7C3D\u6838\u7BC0\u9EDE\uFF08\u6BCF\u689D\u8DEF\u5F91\u90FD\u6703\u7D93\u904E\u3001\u6C92\u6709\u9032\u5165\u689D\u4EF6\u3001\u6C92\u8A2D\u8DF3\u904E\u6B64\u95DC\uFF0C\u4E5F\u6C92\u8A2D\u903E\u6642\u81EA\u52D5\u6838\u51C6\uFF09";
63
+ /**
64
+ * The 不可與前面關卡同一人 picker: the user tasks that pass the publish
65
+ * check on their own (`readExcludeNodeActorsIssues` with just that stage
66
+ * listed: upstream of `nodeId`, on every path to it, not skippable, a real
67
+ * signer every time). Each listed stage has to pass alone, so unlike the
68
+ * `NODE_ACTOR` picker nothing is left to the selection as a whole. A stored
69
+ * stage that does not qualify (gone, no longer upstream, or skippable) stays in
70
+ * the list, marked, and the selection's `problems` say why, so the stored
71
+ * choice is never dropped silently.
72
+ */
73
+ export declare function readExcludeNodeActorStageChoice(definition: WorkflowDefinition, nodeId: string, selectedIds: readonly string[], whenEmpty: ExcludeInitiatorWhenEmpty): NodeActorStageChoice;
74
+ /**
75
+ * The graph problems of every node with 不可與前面關卡同一人, naming the node:
76
+ * the checks the backend publish lint runs (`readExcludeNodeActorsIssues`),
77
+ * for the designer to show before publish. The shape of the setting (no stage
78
+ * chosen, no 排除後沒有簽核人時) is left to `readExcludeNodeActorsShapeIssue`,
79
+ * which blocks saving.
80
+ */
81
+ export declare function readExcludeNodeActorsGraphIssues(definition: WorkflowDefinition): readonly string[];
@@ -0,0 +1,81 @@
1
+ import { ApproverResolver, ServiceAction } from '@rytass/bpm-core-shared/workflow';
2
+ import { PositionRecord } from '@rytass/bpm-core-client/organization';
3
+ import { ApproverResolverModeOption } from './approver-resolver-model.cjs';
4
+ /**
5
+ * The 知會對象 sources the designer can edit. The engine accepts more for a
6
+ * notify node (`isNotifyRecipientResolverType`): 發起人主管, 主管鏈 and 運算式
7
+ * stay readable and are kept as saved, but the designer does not edit them.
8
+ *
9
+ * Keyed by the JSON `type`, not by the approver panel's screen option: that
10
+ * option folds FORM_MEMBER_MANAGER into 依表單欄位指定 and
11
+ * FORM_ORG_UNIT_MANAGER into 指定組織主管, neither of which a notify node
12
+ * may use.
13
+ */
14
+ export type NotifyRecipientMode = Extract<ApproverResolver['type'], 'DIRECT' | 'DYNAMIC_FORM' | 'ORG_UNIT_MANAGER' | 'ORG_UNIT_MEMBER' | 'ORG_UNIT_POSITION' | 'POSITION'>;
15
+ export declare function isNotifyRecipientEditableType(type: string): type is NotifyRecipientMode;
16
+ /**
17
+ * The editable sources, worded exactly as the 簽核來源 select words them so
18
+ * the two panels never name one source two ways.
19
+ */
20
+ export declare const NOTIFY_RECIPIENT_MODE_OPTIONS: readonly ApproverResolverModeOption[];
21
+ /** The id of the read-only entry a source the designer does not edit is shown as. */
22
+ export declare const READ_ONLY_NOTIFY_RECIPIENT_OPTION_ID = "READ_ONLY";
23
+ /** The recipients of a notify action; the empty 指定會員 when it has none. */
24
+ export declare const EMPTY_NOTIFY_RECIPIENTS: ApproverResolver;
25
+ /**
26
+ * A notify action's recipients, or the empty 指定會員 for an action that is
27
+ * not a notify yet (the panel is also what turns one into a notify) or that
28
+ * carries no readable recipients (raw JSON that has not been linted).
29
+ */
30
+ export declare function readNotifyRecipients(action: ServiceAction): ApproverResolver;
31
+ export type NotifyRecipientSourceChoice = Readonly<{
32
+ /** Hint under the select, `null` when nothing needs saying. */
33
+ hint: string | null;
34
+ options: readonly Readonly<{
35
+ id: string;
36
+ name: string;
37
+ }>[];
38
+ /** `true` when the stored source is not one the designer edits. */
39
+ readOnly: boolean;
40
+ selected: Readonly<{
41
+ id: string;
42
+ name: string;
43
+ }>;
44
+ }>;
45
+ /**
46
+ * The 知會對象來源 select. A stored source the designer does not edit
47
+ * (發起人主管, 主管鏈, 運算式, one a notify node may not use, or one a newer
48
+ * BPMCore saved) is shown as a read-only entry that is the current value:
49
+ * nothing is written unless the author explicitly picks another source.
50
+ */
51
+ export declare function readNotifyRecipientSourceChoice(recipients: ApproverResolver): NotifyRecipientSourceChoice;
52
+ /**
53
+ * The recipients a 知會對象來源 pick produces, or `null` when the pick must
54
+ * change nothing: no option, an id that is not an editable source (the
55
+ * read-only entry included), or the source already stored. Re-picking the
56
+ * shown source would otherwise rebuild a clean default and wipe what the
57
+ * author had filled in.
58
+ */
59
+ export declare function readNotifyRecipientSourcePick(recipients: ApproverResolver, optionId: string | null, positions: readonly PositionRecord[]): ApproverResolver | null;
60
+ /**
61
+ * The action with new recipients. Only the recipients change: channels,
62
+ * template and webhooks belong to the same action and survive. An action that
63
+ * is not a notify yet becomes one with the default channel.
64
+ */
65
+ export declare function withNotifyRecipients(action: ServiceAction, recipients: ApproverResolver): ServiceAction;
66
+ /**
67
+ * Picks the organization. 組織特定職位 clears its position (it may not belong
68
+ * to the new organization); 指定組織主管 goes through the approver editor
69
+ * state so its 無主管時 and 只取最近一層主管 settings survive.
70
+ */
71
+ export declare function withNotifyOrgUnit(recipients: ApproverResolver, orgUnitId: string): ApproverResolver;
72
+ /**
73
+ * Switches 包含下層 of 組織任一人 or 組織特定職位; the latter clears its
74
+ * position, the way the 簽核來源 panel does, because the positions on offer
75
+ * change with the scope.
76
+ */
77
+ export declare function withNotifyIncludeDescendants(recipients: ApproverResolver, includeDescendants: boolean): ApproverResolver;
78
+ /** Picks the position of 指定職位 or 組織特定職位. */
79
+ export declare function withNotifyPosition(recipients: ApproverResolver, positionId: string): ApproverResolver;
80
+ /** Picks the member field of 依表單欄位指定 (the person in the field only). */
81
+ export declare function withNotifyFormPath(recipients: ApproverResolver, formPath: string): ApproverResolver;
@@ -0,0 +1,81 @@
1
+ import { ApproverResolver, ServiceAction } from '@rytass/bpm-core-shared/workflow';
2
+ import { PositionRecord } from '@rytass/bpm-core-client/organization';
3
+ import { ApproverResolverModeOption } from './approver-resolver-model.js';
4
+ /**
5
+ * The 知會對象 sources the designer can edit. The engine accepts more for a
6
+ * notify node (`isNotifyRecipientResolverType`): 發起人主管, 主管鏈 and 運算式
7
+ * stay readable and are kept as saved, but the designer does not edit them.
8
+ *
9
+ * Keyed by the JSON `type`, not by the approver panel's screen option: that
10
+ * option folds FORM_MEMBER_MANAGER into 依表單欄位指定 and
11
+ * FORM_ORG_UNIT_MANAGER into 指定組織主管, neither of which a notify node
12
+ * may use.
13
+ */
14
+ export type NotifyRecipientMode = Extract<ApproverResolver['type'], 'DIRECT' | 'DYNAMIC_FORM' | 'ORG_UNIT_MANAGER' | 'ORG_UNIT_MEMBER' | 'ORG_UNIT_POSITION' | 'POSITION'>;
15
+ export declare function isNotifyRecipientEditableType(type: string): type is NotifyRecipientMode;
16
+ /**
17
+ * The editable sources, worded exactly as the 簽核來源 select words them so
18
+ * the two panels never name one source two ways.
19
+ */
20
+ export declare const NOTIFY_RECIPIENT_MODE_OPTIONS: readonly ApproverResolverModeOption[];
21
+ /** The id of the read-only entry a source the designer does not edit is shown as. */
22
+ export declare const READ_ONLY_NOTIFY_RECIPIENT_OPTION_ID = "READ_ONLY";
23
+ /** The recipients of a notify action; the empty 指定會員 when it has none. */
24
+ export declare const EMPTY_NOTIFY_RECIPIENTS: ApproverResolver;
25
+ /**
26
+ * A notify action's recipients, or the empty 指定會員 for an action that is
27
+ * not a notify yet (the panel is also what turns one into a notify) or that
28
+ * carries no readable recipients (raw JSON that has not been linted).
29
+ */
30
+ export declare function readNotifyRecipients(action: ServiceAction): ApproverResolver;
31
+ export type NotifyRecipientSourceChoice = Readonly<{
32
+ /** Hint under the select, `null` when nothing needs saying. */
33
+ hint: string | null;
34
+ options: readonly Readonly<{
35
+ id: string;
36
+ name: string;
37
+ }>[];
38
+ /** `true` when the stored source is not one the designer edits. */
39
+ readOnly: boolean;
40
+ selected: Readonly<{
41
+ id: string;
42
+ name: string;
43
+ }>;
44
+ }>;
45
+ /**
46
+ * The 知會對象來源 select. A stored source the designer does not edit
47
+ * (發起人主管, 主管鏈, 運算式, one a notify node may not use, or one a newer
48
+ * BPMCore saved) is shown as a read-only entry that is the current value:
49
+ * nothing is written unless the author explicitly picks another source.
50
+ */
51
+ export declare function readNotifyRecipientSourceChoice(recipients: ApproverResolver): NotifyRecipientSourceChoice;
52
+ /**
53
+ * The recipients a 知會對象來源 pick produces, or `null` when the pick must
54
+ * change nothing: no option, an id that is not an editable source (the
55
+ * read-only entry included), or the source already stored. Re-picking the
56
+ * shown source would otherwise rebuild a clean default and wipe what the
57
+ * author had filled in.
58
+ */
59
+ export declare function readNotifyRecipientSourcePick(recipients: ApproverResolver, optionId: string | null, positions: readonly PositionRecord[]): ApproverResolver | null;
60
+ /**
61
+ * The action with new recipients. Only the recipients change: channels,
62
+ * template and webhooks belong to the same action and survive. An action that
63
+ * is not a notify yet becomes one with the default channel.
64
+ */
65
+ export declare function withNotifyRecipients(action: ServiceAction, recipients: ApproverResolver): ServiceAction;
66
+ /**
67
+ * Picks the organization. 組織特定職位 clears its position (it may not belong
68
+ * to the new organization); 指定組織主管 goes through the approver editor
69
+ * state so its 無主管時 and 只取最近一層主管 settings survive.
70
+ */
71
+ export declare function withNotifyOrgUnit(recipients: ApproverResolver, orgUnitId: string): ApproverResolver;
72
+ /**
73
+ * Switches 包含下層 of 組織任一人 or 組織特定職位; the latter clears its
74
+ * position, the way the 簽核來源 panel does, because the positions on offer
75
+ * change with the scope.
76
+ */
77
+ export declare function withNotifyIncludeDescendants(recipients: ApproverResolver, includeDescendants: boolean): ApproverResolver;
78
+ /** Picks the position of 指定職位 or 組織特定職位. */
79
+ export declare function withNotifyPosition(recipients: ApproverResolver, positionId: string): ApproverResolver;
80
+ /** Picks the member field of 依表單欄位指定 (the person in the field only). */
81
+ export declare function withNotifyFormPath(recipients: ApproverResolver, formPath: string): ApproverResolver;
@@ -10,8 +10,10 @@ type PositionLevelSource = Pick<PositionRecord, 'level' | 'name'>;
10
10
  * labelled with the positions sitting on that level. A saved level that no
11
11
  * position carries (positions deleted or not loaded yet) is still offered so
12
12
  * the select never renders blank and the stored value is not silently changed.
13
+ * `currentLevel` is that saved level; `null` offers only the directory's own
14
+ * levels, for a field that has no value yet.
13
15
  */
14
- export declare function readMinPositionLevelOptions(positions: readonly PositionLevelSource[], currentLevel: number): readonly PositionLevelOption[];
16
+ export declare function readMinPositionLevelOptions(positions: readonly PositionLevelSource[], currentLevel: number | null): readonly PositionLevelOption[];
15
17
  /** The highest level in the directory, or `1` when there are no positions. */
16
18
  export declare function readDefaultMinPositionLevel(positions: readonly PositionLevelSource[]): number;
17
19
  export {};
@@ -10,8 +10,10 @@ type PositionLevelSource = Pick<PositionRecord, 'level' | 'name'>;
10
10
  * labelled with the positions sitting on that level. A saved level that no
11
11
  * position carries (positions deleted or not loaded yet) is still offered so
12
12
  * the select never renders blank and the stored value is not silently changed.
13
+ * `currentLevel` is that saved level; `null` offers only the directory's own
14
+ * levels, for a field that has no value yet.
13
15
  */
14
- export declare function readMinPositionLevelOptions(positions: readonly PositionLevelSource[], currentLevel: number): readonly PositionLevelOption[];
16
+ export declare function readMinPositionLevelOptions(positions: readonly PositionLevelSource[], currentLevel: number | null): readonly PositionLevelOption[];
15
17
  /** The highest level in the directory, or `1` when there are no positions. */
16
18
  export declare function readDefaultMinPositionLevel(positions: readonly PositionLevelSource[]): number;
17
19
  export {};