@vef-framework-react/approval 2.27.0 → 2.28.0

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 (83) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/cjs/pages/delegation-page/form.cjs +1 -1
  3. package/dist/cjs/pages/flow-page/columns.cjs +1 -1
  4. package/dist/cjs/pages/flow-page/designer/basic-step.cjs +1 -1
  5. package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
  6. package/dist/cjs/pages/flow-page/designer/types.cjs +1 -1
  7. package/dist/cjs/pages/initiate-page/index.cjs +1 -1
  8. package/dist/cjs/types/index.cjs +1 -1
  9. package/dist/es/api/admin-api.js +1 -1
  10. package/dist/es/api/category-api.js +1 -1
  11. package/dist/es/api/delegation-api.js +1 -1
  12. package/dist/es/api/flow-api.js +1 -1
  13. package/dist/es/api/index.js +1 -1
  14. package/dist/es/api/instance-api.js +1 -1
  15. package/dist/es/api/my-api.js +1 -1
  16. package/dist/es/api/query.js +1 -1
  17. package/dist/es/components/action-dialog/index.js +1 -1
  18. package/dist/es/components/detail/action-modals.js +1 -1
  19. package/dist/es/components/detail/admin.js +1 -1
  20. package/dist/es/components/detail/drawer.js +1 -1
  21. package/dist/es/components/detail/index.js +1 -1
  22. package/dist/es/components/flow-graph/index.js +1 -1
  23. package/dist/es/components/flow-graph/node.js +1 -1
  24. package/dist/es/components/flow-graph/people-overlay.js +1 -1
  25. package/dist/es/components/flow-graph/people.js +1 -1
  26. package/dist/es/components/form-panel/index.js +1 -1
  27. package/dist/es/components/format.js +1 -1
  28. package/dist/es/components/icon.js +1 -1
  29. package/dist/es/components/index.js +1 -1
  30. package/dist/es/components/principal/index.js +1 -1
  31. package/dist/es/components/status/colors.js +1 -1
  32. package/dist/es/components/status/index.js +1 -1
  33. package/dist/es/components/status/labels.js +1 -1
  34. package/dist/es/components/timeline/index.js +1 -1
  35. package/dist/es/components/user/index.js +1 -1
  36. package/dist/es/index.js +9 -10
  37. package/dist/es/pages/admin-page/index.js +1 -1
  38. package/dist/es/pages/admin-page/instances.js +1 -1
  39. package/dist/es/pages/admin-page/metrics.js +1 -1
  40. package/dist/es/pages/admin-page/projections.js +1 -1
  41. package/dist/es/pages/admin-page/tasks.js +1 -1
  42. package/dist/es/pages/category-page/columns.js +1 -1
  43. package/dist/es/pages/category-page/form.js +1 -1
  44. package/dist/es/pages/category-page/index.js +1 -1
  45. package/dist/es/pages/delegation-page/columns.js +1 -1
  46. package/dist/es/pages/delegation-page/form.js +2 -5
  47. package/dist/es/pages/delegation-page/index.js +1 -1
  48. package/dist/es/pages/flow-page/columns.js +9 -2
  49. package/dist/es/pages/flow-page/designer/basic-step.js +13 -1
  50. package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
  51. package/dist/es/pages/flow-page/designer/form-step.js +1 -1
  52. package/dist/es/pages/flow-page/designer/index.js +106 -105
  53. package/dist/es/pages/flow-page/designer/review-step.js +1 -1
  54. package/dist/es/pages/flow-page/designer/types.js +2 -1
  55. package/dist/es/pages/flow-page/index.js +1 -1
  56. package/dist/es/pages/flow-page/search.js +1 -1
  57. package/dist/es/pages/flow-page/versions.js +1 -1
  58. package/dist/es/pages/index.js +1 -1
  59. package/dist/es/pages/initiate-page/index.js +3 -3
  60. package/dist/es/pages/initiate-page/start-drawer.js +1 -1
  61. package/dist/es/pages/my-instances-page/index.js +1 -1
  62. package/dist/es/pages/task-center-page/index.js +1 -1
  63. package/dist/es/pages/task-center-page/search.js +1 -1
  64. package/dist/es/permissions.js +1 -1
  65. package/dist/es/plugins/form-context.js +1 -1
  66. package/dist/es/plugins/index.js +1 -1
  67. package/dist/es/types/enums.js +1 -1
  68. package/dist/es/types/index.js +2 -3
  69. package/dist/types/pages/category-page/props.d.ts +2 -3
  70. package/dist/types/pages/delegation-page/form.d.ts +2 -2
  71. package/dist/types/pages/delegation-page/props.d.ts +2 -2
  72. package/dist/types/pages/flow-page/designer/basic-step.d.ts +1 -1
  73. package/dist/types/pages/flow-page/designer/types.d.ts +4 -0
  74. package/dist/types/pages/flow-page/props.d.ts +5 -5
  75. package/dist/types/pages/initiate-page/index.d.ts +3 -3
  76. package/dist/types/types/category.d.ts +2 -8
  77. package/dist/types/types/flow.d.ts +24 -3
  78. package/dist/types/types/index.d.ts +0 -1
  79. package/dist/types/types/instance.d.ts +2 -1
  80. package/package.json +7 -7
  81. package/dist/cjs/types/tenancy.cjs +0 -1
  82. package/dist/es/types/tenancy.js +0 -5
  83. package/dist/types/types/tenancy.d.ts +0 -14
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.27.0 made by Venus | 2026-10-15T04:02:45.982Z */
1
+ /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
2
2
  import { useInstanceApi as e } from "../../api/instance-api.js";
3
3
  import { useMyApprovalApi as t } from "../../api/my-api.js";
4
4
  import { formatTimestamp as n } from "../../components/format.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.27.0 made by Venus | 2026-10-15T04:02:45.982Z */
1
+ /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
2
2
  import { useMyApprovalApi as e } from "../../api/my-api.js";
3
3
  import { formatTimestamp as t } from "../../components/format.js";
4
4
  import { TaskStatusTag as n } from "../../components/status/index.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.27.0 made by Venus | 2026-10-15T04:02:45.982Z */
1
+ /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
2
2
  import { INSTANCE_STATUS_OPTIONS as e, TASK_STATUS_LABELS as t } from "../../components/status/labels.js";
3
3
  import { Col as n, DatePicker as r, Labeled as i, Row as a, Select as o, useFormContext as s } from "@vef-framework-react/components";
4
4
  import { Fragment as c, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.27.0 made by Venus | 2026-10-15T04:02:45.982Z */
1
+ /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
2
2
  //#region src/permissions.ts
3
3
  var e = {
4
4
  category: {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.27.0 made by Venus | 2026-10-15T04:02:45.982Z */
1
+ /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
2
2
  //#region src/plugins/form-context.ts
3
3
  var e = [
4
4
  {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.27.0 made by Venus | 2026-10-15T04:02:45.982Z */
1
+ /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
2
2
  import { createContext as e, use as t, useMemo as n, useState as r } from "react";
3
3
  import { createApprovalRegistries as i } from "@vef-framework-react/approval-form-bridge";
4
4
  import { jsx as a } from "@emotion/react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.27.0 made by Venus | 2026-10-15T04:02:45.982Z */
1
+ /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
2
2
  //#region src/types/enums.ts
3
3
  var e = [
4
4
  "approved",
@@ -1,4 +1,3 @@
1
- /*! @vef-framework-react/approval v2.27.0 made by Venus | 2026-10-15T04:02:45.982Z */
1
+ /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
2
2
  import { BUILTIN_INITIATOR_KINDS as e, FINAL_INSTANCE_STATUSES as t, isFinalInstanceStatus as n } from "./enums.js";
3
- import { SHARED_TENANT_ID as r } from "./tenancy.js";
4
- export { e as BUILTIN_INITIATOR_KINDS, t as FINAL_INSTANCE_STATUSES, r as SHARED_TENANT_ID, n as isFinalInstanceStatus };
3
+ export { e as BUILTIN_INITIATOR_KINDS, t as FINAL_INSTANCE_STATUSES, n as isFinalInstanceStatus };
@@ -9,9 +9,8 @@ export interface ApprovalCategoryPageProps {
9
9
  /**
10
10
  * The tenant whose categories the page manages: the tree shows them, and
11
11
  * new categories are created under it. Categories are managed across
12
- * tenants, gated by the permissions — `SHARED_TENANT_ID` manages the shared
13
- * categories, the home of shared flows. Single-tenant deployments keep the
14
- * default.
12
+ * tenants, gated by the permissions; a shared flow sits under a category of
13
+ * the tenant that owns it. Single-tenant deployments keep the default.
15
14
  *
16
15
  * @default "default"
17
16
  */
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * The create/update form body for a delegation: who delegates to whom, the
3
3
  * active window, and the optional flow/category scope (both empty = all
4
- * flows). `tenantId` narrows the category scope to that tenant's categories
5
- * plus the shared ones; omitted, every tenant's are offered.
4
+ * flows). `tenantId` narrows the category scope to that tenant's categories;
5
+ * omitted, every tenant's are offered.
6
6
  */
7
7
  export declare function DelegationForm({ tenantId }: {
8
8
  tenantId?: string;
@@ -7,8 +7,8 @@ export interface ApprovalDelegationPageProps {
7
7
  */
8
8
  permissions?: Partial<DelegationPermissionCodes>;
9
9
  /**
10
- * The tenant whose categories the category scope offers, beside the shared
11
- * ones. Omitted, every tenant's categories are offered.
10
+ * The tenant whose categories the category scope offers. Omitted, every
11
+ * tenant's categories are offered.
12
12
  */
13
13
  tenantId?: string;
14
14
  /**
@@ -13,7 +13,7 @@ export interface BasicStepProps {
13
13
  initiatorKinds?: ReadonlyArray<KindDescriptor<InitiatorKind>>;
14
14
  categoryOptions: CategoryTreeOption[];
15
15
  /**
16
- * The flow code is immutable after creation.
16
+ * The flow code and whether the flow is shared are immutable after creation.
17
17
  */
18
18
  isEditing: boolean;
19
19
  onBasicChange: (patch: Partial<FlowDraftBasic>) => void;
@@ -7,6 +7,10 @@ import { BindingMode, BusinessBindingConfig, InitiatorParams, StorageMode } from
7
7
  */
8
8
  export interface FlowDraftBasic {
9
9
  tenantId: string;
10
+ /**
11
+ * Offers the flow to every tenant; fixed once the flow is created.
12
+ */
13
+ isShared: boolean;
10
14
  code: string;
11
15
  name: string;
12
16
  categoryId: string;
@@ -7,11 +7,11 @@ export interface ApprovalFlowPageProps {
7
7
  */
8
8
  permissions?: Partial<FlowPermissionCodes>;
9
9
  /**
10
- * The tenant whose flows the page manages: the list shows them, and new
11
- * flows are created under it. Flows are managed across tenants, gated by
12
- * the permissions, so whoever may manage flows may pass any tenant —
13
- * `SHARED_TENANT_ID` manages the shared flows, offered to every tenant.
14
- * Single-tenant deployments keep the default.
10
+ * The tenant whose flows the page manages: the list shows the flows it owns,
11
+ * its shared ones included, and new flows are created under it — shared
12
+ * with every tenant when the designer's switch says so. Flows are managed
13
+ * across tenants, gated by the permissions, so whoever may manage flows may
14
+ * pass any tenant. Single-tenant deployments keep the default.
15
15
  *
16
16
  * @default "default"
17
17
  */
@@ -16,8 +16,8 @@ export interface ApprovalInitiatePageProps {
16
16
  }
17
17
  /**
18
18
  * The initiation portal: every flow the current user may start — its tenant's
19
- * own flows plus the shared ones — grouped by category, searchable by keyword
20
- * and label. Clicking a card opens the start
21
- * drawer with the published form.
19
+ * own flows plus the ones other tenants share — grouped by category,
20
+ * searchable by keyword and label. Clicking a card opens the start drawer with
21
+ * the published form.
22
22
  */
23
23
  export declare function ApprovalInitiatePage({ labels, title, onStarted }: ApprovalInitiatePageProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -35,14 +35,8 @@ export interface CategorySearch {
35
35
  name?: string;
36
36
  isActive?: boolean;
37
37
  /**
38
- * Narrows the read to one tenant's categories — `SHARED_TENANT_ID` for the
39
- * shared ones. Omitted, every tenant's are read: categories are managed
40
- * across tenants, gated by permission.
38
+ * Narrows the read to one tenant's categories. Omitted, every tenant's are
39
+ * read: categories are managed across tenants, gated by permission.
41
40
  */
42
41
  tenantId?: string;
43
- /**
44
- * Adds the shared categories to the named tenant's — what a picker scoping
45
- * a delegation needs, since shared flows sit under shared categories.
46
- */
47
- includeShared?: boolean;
48
42
  }
@@ -30,7 +30,17 @@ export interface BusinessBindingConfig {
30
30
  * A flow definition record, mirroring the Go `approval.Flow`.
31
31
  */
32
32
  export interface Flow extends FullAudited {
33
+ /**
34
+ * The tenant that owns and manages the flow; it never changes.
35
+ */
33
36
  tenantId: string;
37
+ /**
38
+ * Offers the flow to every tenant beside its own flows: any tenant starts
39
+ * it like one of its own, and a flow of that tenant with the same code takes
40
+ * its place there. A shared flow routes no task or CC to specific people.
41
+ * Fixed at creation.
42
+ */
43
+ isShared: boolean;
34
44
  categoryId: string;
35
45
  code: string;
36
46
  name: string;
@@ -126,6 +136,11 @@ export interface InitiatorParams {
126
136
  */
127
137
  export interface CreateFlowParams {
128
138
  tenantId: string;
139
+ /**
140
+ * Offers the flow to every tenant (`Flow.isShared`). Its code must then be
141
+ * unique among the shared flows of every tenant.
142
+ */
143
+ isShared?: boolean;
129
144
  code: string;
130
145
  name: string;
131
146
  categoryId: string;
@@ -187,11 +202,17 @@ export interface ToggleFlowActiveParams {
187
202
  */
188
203
  export interface FlowSearch {
189
204
  /**
190
- * Narrows the list to one tenant's flows — `SHARED_TENANT_ID` for the
191
- * shared ones. Omitted, every tenant's are listed: flows are managed across
192
- * tenants, gated by permission.
205
+ * Narrows the list to the flows one tenant owns, its shared ones included.
206
+ * Omitted, every tenant's are listed: flows are managed across tenants,
207
+ * gated by permission.
193
208
  */
194
209
  tenantId?: string;
210
+ /**
211
+ * Adds to `tenantId`'s flows the shared flows of other tenants whose code it
212
+ * has not taken for a flow of its own — every flow a start by code finds in
213
+ * that tenant, which is what a picker of a tenant's usable flows needs.
214
+ */
215
+ includeShared?: boolean;
195
216
  categoryId?: string;
196
217
  keyword?: string;
197
218
  isActive?: boolean;
@@ -7,4 +7,3 @@ export * from './enums';
7
7
  export type * from './flow';
8
8
  export type * from './instance';
9
9
  export type * from './my';
10
- export * from './tenancy';
@@ -1,7 +1,8 @@
1
1
  import { AddAssigneeType, ProcessTaskAction } from './enums';
2
2
  /**
3
3
  * Parameters for `approval/instance.start`. The instance runs in the tenant
4
- * the caller acts in, from that tenant's own flows or the shared ones.
4
+ * the caller acts in, from that tenant's own flows or the ones other tenants
5
+ * share.
5
6
  * `formData` is the form renderer's submit payload, validated server-side
6
7
  * against the version's derived field list.
7
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vef-framework-react/approval",
3
- "version": "2.27.0",
3
+ "version": "2.28.0",
4
4
  "private": false,
5
5
  "description": "Approval engine pages and runtime components for VEF framework",
6
6
  "keywords": [
@@ -44,12 +44,12 @@
44
44
  "@xyflow/react": "^12.11.1",
45
45
  "dayjs": "^1.11.0",
46
46
  "lucide-react": "^1.23.0",
47
- "@vef-framework-react/approval-flow-editor": "2.27.0",
48
- "@vef-framework-react/core": "2.27.0",
49
- "@vef-framework-react/components": "2.27.0",
50
- "@vef-framework-react/shared": "2.27.0",
51
- "@vef-framework-react/form-editor": "2.27.0",
52
- "@vef-framework-react/approval-form-bridge": "2.27.0"
47
+ "@vef-framework-react/approval-form-bridge": "2.28.0",
48
+ "@vef-framework-react/components": "2.28.0",
49
+ "@vef-framework-react/form-editor": "2.28.0",
50
+ "@vef-framework-react/core": "2.28.0",
51
+ "@vef-framework-react/approval-flow-editor": "2.28.0",
52
+ "@vef-framework-react/shared": "2.28.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "react": "^19.2.7"
@@ -1 +0,0 @@
1
- var e=`0`;exports.SHARED_TENANT_ID=e;
@@ -1,5 +0,0 @@
1
- /*! @vef-framework-react/approval v2.27.0 made by Venus | 2026-10-15T04:02:45.982Z */
2
- //#region src/types/tenancy.ts
3
- var e = "0";
4
- //#endregion
5
- export { e as SHARED_TENANT_ID };
@@ -1,14 +0,0 @@
1
- /**
2
- * The reserved tenant of shared flows and categories, mirroring the Go
3
- * `approval.SharedTenantID`. A shared flow belongs to no tenant and is offered
4
- * to every tenant beside its own flows — a tenant flow with the same code
5
- * takes its place within that tenant — and each instance of it runs in, and
6
- * belongs to, the tenant that started it.
7
- *
8
- * Shared definitions are managed like any other, gated by the flow and
9
- * category permissions: pass it as the `tenantId` of `ApprovalFlowPage` /
10
- * `ApprovalCategoryPage` to manage them. A shared flow sits under a shared
11
- * category and routes no task or CC to specific people, which the flow
12
- * designer enforces once the flow's tenant is this one.
13
- */
14
- export declare const SHARED_TENANT_ID = "0";