@timeax/digital-service-engine 0.3.1 → 0.3.3
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.
- package/dist/core/index.cjs +471 -434
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +1 -8
- package/dist/core/index.d.ts +1 -8
- package/dist/core/index.js +471 -434
- package/dist/core/index.js.map +1 -1
- package/dist/react/index.cjs +1636 -1145
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +66 -29
- package/dist/react/index.d.ts +66 -29
- package/dist/react/index.js +1635 -1145
- package/dist/react/index.js.map +1 -1
- package/dist/workspace/index.cjs +651 -173
- package/dist/workspace/index.cjs.map +1 -1
- package/dist/workspace/index.d.cts +71 -24
- package/dist/workspace/index.d.ts +71 -24
- package/dist/workspace/index.js +650 -173
- package/dist/workspace/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -857,12 +857,26 @@ interface MergeResult {
|
|
|
857
857
|
readonly conflicts?: number;
|
|
858
858
|
readonly message?: string;
|
|
859
859
|
}
|
|
860
|
+
type WorkspaceLoadContext = Readonly<{
|
|
861
|
+
workspaceId: string;
|
|
862
|
+
actorId?: string;
|
|
863
|
+
branchId?: string;
|
|
864
|
+
since?: string | number;
|
|
865
|
+
}>;
|
|
866
|
+
type WorkspaceActorLoadContext = WorkspaceLoadContext & Readonly<{
|
|
867
|
+
actorId: string;
|
|
868
|
+
}>;
|
|
869
|
+
type WorkspaceBranchLoadContext = WorkspaceLoadContext & Readonly<{
|
|
870
|
+
branchId: string;
|
|
871
|
+
}>;
|
|
872
|
+
type WorkspaceActorBranchLoadContext = WorkspaceLoadContext & Readonly<{
|
|
873
|
+
actorId: string;
|
|
874
|
+
branchId: string;
|
|
875
|
+
}>;
|
|
860
876
|
type ServicesInput = readonly DgpServiceCapability[] | DgpServiceMap;
|
|
861
877
|
interface ServicesBackend {
|
|
862
|
-
get(
|
|
863
|
-
refresh(
|
|
864
|
-
since?: number | string;
|
|
865
|
-
}>): Result<ServicesInput>;
|
|
878
|
+
get(ctx: WorkspaceLoadContext): Result<ServicesInput>;
|
|
879
|
+
refresh(ctx: WorkspaceLoadContext): Result<ServicesInput>;
|
|
866
880
|
}
|
|
867
881
|
interface BranchParticipant {
|
|
868
882
|
readonly id: string;
|
|
@@ -879,10 +893,8 @@ interface BranchParticipant {
|
|
|
879
893
|
readonly updatedAt?: string;
|
|
880
894
|
}
|
|
881
895
|
interface BranchAccessBackend {
|
|
882
|
-
listParticipants(
|
|
883
|
-
refreshParticipants(
|
|
884
|
-
since?: number | string;
|
|
885
|
-
}>): Result<readonly BranchParticipant[]>;
|
|
896
|
+
listParticipants(ctx: WorkspaceBranchLoadContext): Result<readonly BranchParticipant[]>;
|
|
897
|
+
refreshParticipants(ctx: WorkspaceBranchLoadContext): Result<readonly BranchParticipant[]>;
|
|
886
898
|
}
|
|
887
899
|
interface ServiceSnapshot {
|
|
888
900
|
readonly schema_version: string;
|
|
@@ -996,12 +1008,13 @@ interface FieldTemplate {
|
|
|
996
1008
|
}
|
|
997
1009
|
/** Narrow list/search input */
|
|
998
1010
|
interface TemplatesListParams {
|
|
999
|
-
readonly workspaceId:
|
|
1000
|
-
readonly
|
|
1011
|
+
readonly workspaceId: WorkspaceLoadContext["workspaceId"];
|
|
1012
|
+
readonly actorId?: WorkspaceLoadContext["actorId"];
|
|
1013
|
+
readonly branchId?: WorkspaceLoadContext["branchId"];
|
|
1001
1014
|
readonly q?: string;
|
|
1002
1015
|
readonly tags?: readonly string[];
|
|
1003
1016
|
readonly category?: string;
|
|
1004
|
-
readonly since?:
|
|
1017
|
+
readonly since?: WorkspaceLoadContext["since"];
|
|
1005
1018
|
}
|
|
1006
1019
|
interface TemplateCreateInput {
|
|
1007
1020
|
readonly key?: string;
|
|
@@ -1121,23 +1134,23 @@ type LiveOptions = {
|
|
|
1121
1134
|
protocols?: readonly string[];
|
|
1122
1135
|
};
|
|
1123
1136
|
interface AuthorsBackend {
|
|
1124
|
-
list(
|
|
1137
|
+
list(ctx: WorkspaceLoadContext): Result<readonly Author[]>;
|
|
1125
1138
|
get(authorId: string): Result<Author | null>;
|
|
1126
|
-
refresh(
|
|
1139
|
+
refresh(ctx: WorkspaceLoadContext): Result<readonly Author[]>;
|
|
1127
1140
|
}
|
|
1128
1141
|
interface PermissionsBackend {
|
|
1129
|
-
get(
|
|
1130
|
-
refresh(
|
|
1142
|
+
get(ctx: WorkspaceActorLoadContext): Result<PermissionsMap>;
|
|
1143
|
+
refresh(ctx: WorkspaceActorLoadContext): Result<PermissionsMap>;
|
|
1131
1144
|
}
|
|
1132
1145
|
interface BranchesBackend {
|
|
1133
|
-
list(
|
|
1146
|
+
list(ctx: WorkspaceLoadContext): Result<readonly Branch[]>;
|
|
1134
1147
|
create(workspaceId: string, name: string, opts?: Readonly<{
|
|
1135
1148
|
fromId?: string;
|
|
1136
1149
|
}>): Result<Branch>;
|
|
1137
1150
|
setMain(workspaceId: string, branchId: string): Result<Branch>;
|
|
1138
1151
|
merge(workspaceId: string, sourceId: string, targetId: string): Result<MergeResult>;
|
|
1139
1152
|
delete(workspaceId: string, branchId: string): Result<void>;
|
|
1140
|
-
refresh(
|
|
1153
|
+
refresh(ctx: WorkspaceLoadContext): Result<readonly Branch[]>;
|
|
1141
1154
|
}
|
|
1142
1155
|
interface WorkspaceInfo {
|
|
1143
1156
|
readonly id: string;
|
|
@@ -1152,10 +1165,7 @@ interface WorkspaceInfo {
|
|
|
1152
1165
|
* This is intentionally transport-agnostic and minimal so other layers (e.g. canvas/comments)
|
|
1153
1166
|
* can reuse it without redefining identity types.
|
|
1154
1167
|
*/
|
|
1155
|
-
interface BackendScope {
|
|
1156
|
-
readonly workspaceId: string;
|
|
1157
|
-
readonly actorId: string;
|
|
1158
|
-
readonly branchId: string;
|
|
1168
|
+
interface BackendScope extends WorkspaceActorBranchLoadContext {
|
|
1159
1169
|
}
|
|
1160
1170
|
/**
|
|
1161
1171
|
* Generic canvas comments backend contract.
|
|
@@ -1206,7 +1216,7 @@ interface CommentsBackend<ThreadDTO = unknown, MessageDTO = unknown, AnchorDTO =
|
|
|
1206
1216
|
* - If branchId is provided -> branch-scoped policies
|
|
1207
1217
|
* - If branchId is omitted -> workspace-scoped policies
|
|
1208
1218
|
*/
|
|
1209
|
-
interface PolicyScope extends
|
|
1219
|
+
interface PolicyScope extends WorkspaceActorLoadContext {
|
|
1210
1220
|
}
|
|
1211
1221
|
interface PoliciesLoadResult {
|
|
1212
1222
|
/** the raw JSON the host stored (authoring format) */
|
|
@@ -1651,6 +1661,7 @@ type DuplicateOptions = {
|
|
|
1651
1661
|
nameStrategy?: (old?: string) => string | undefined;
|
|
1652
1662
|
optionIdStrategy?: (old: string) => string;
|
|
1653
1663
|
};
|
|
1664
|
+
type DuplicateManyOptions = Omit<DuplicateOptions, "id">;
|
|
1654
1665
|
type EditorNodeLookup = {
|
|
1655
1666
|
kind: "tag";
|
|
1656
1667
|
data?: Tag;
|
|
@@ -1703,6 +1714,7 @@ declare class Editor {
|
|
|
1703
1714
|
redo(): boolean;
|
|
1704
1715
|
clearService(id: string): void;
|
|
1705
1716
|
duplicate(ref: NodeRef, opts?: DuplicateOptions): string;
|
|
1717
|
+
duplicateMany(ids: readonly string[], opts?: DuplicateManyOptions): string[];
|
|
1706
1718
|
reLabel(id: string, nextLabel: string): void;
|
|
1707
1719
|
setFieldName(fieldId: string, nextName: string | null | undefined): void;
|
|
1708
1720
|
getLastPolicyDiagnostics(): PolicyDiagnostic[] | undefined;
|
|
@@ -1755,6 +1767,29 @@ declare class Editor {
|
|
|
1755
1767
|
updateField(id: string, patch: Partial<Field>): void;
|
|
1756
1768
|
removeField(id: string): void;
|
|
1757
1769
|
remove(id: string): void;
|
|
1770
|
+
removeMany(ids: readonly string[]): void;
|
|
1771
|
+
clearServiceMany(ids: readonly string[]): void;
|
|
1772
|
+
rebindMany(ids: readonly string[], targetTagId: string, opts?: {
|
|
1773
|
+
allowTagCycles?: boolean;
|
|
1774
|
+
}): void;
|
|
1775
|
+
includeMany(receiverId: string, ids: readonly string[]): void;
|
|
1776
|
+
excludeMany(receiverId: string, ids: readonly string[]): void;
|
|
1777
|
+
clearRelationsMany(ids: readonly string[], mode?: "owned" | "incoming" | "both"): void;
|
|
1778
|
+
renameLabelsMany(ids: readonly string[], input: {
|
|
1779
|
+
prefix?: string;
|
|
1780
|
+
suffix?: string;
|
|
1781
|
+
}): void;
|
|
1782
|
+
setPricingRoleMany(ids: readonly string[], role: "base" | "utility"): void;
|
|
1783
|
+
clearFieldDefaultsMany(ids: readonly string[]): void;
|
|
1784
|
+
clearFieldValidationMany(ids: readonly string[]): void;
|
|
1785
|
+
autoCreateOptionsMany(ids: readonly string[], makeOption?: (fieldId: string) => {
|
|
1786
|
+
id?: string;
|
|
1787
|
+
label: string;
|
|
1788
|
+
value?: string | number;
|
|
1789
|
+
}): void;
|
|
1790
|
+
clearAllOptionsMany(ids: readonly string[]): void;
|
|
1791
|
+
removeNoticesForNodes(ids: readonly string[]): void;
|
|
1792
|
+
setNoticesVisibilityForNodes(ids: readonly string[], type: "public" | "private"): void;
|
|
1758
1793
|
getNode(id: string): EditorNodeLookup;
|
|
1759
1794
|
getFieldQuantityRule(id: string): QuantityRule | undefined;
|
|
1760
1795
|
setFieldQuantityRule(id: string, rule: unknown): void;
|
|
@@ -1977,7 +2012,19 @@ interface UseCanvasReturn {
|
|
|
1977
2012
|
graph: GraphSnapshot;
|
|
1978
2013
|
api: CanvasAPI;
|
|
1979
2014
|
props?: ServiceProps;
|
|
1980
|
-
|
|
2015
|
+
selectionCapabilities: SelectionCapabilities;
|
|
2016
|
+
}
|
|
2017
|
+
type SelectionCapabilities = {
|
|
2018
|
+
hasTags: boolean;
|
|
2019
|
+
hasFields: boolean;
|
|
2020
|
+
hasOptions: boolean;
|
|
2021
|
+
hasServiceBearingNodes: boolean;
|
|
2022
|
+
hasSelectedFieldWithOptions: boolean;
|
|
2023
|
+
hasNoticesForSelection: boolean;
|
|
2024
|
+
canIncludeExcludeTargets: boolean;
|
|
2025
|
+
canRebind: boolean;
|
|
2026
|
+
};
|
|
2027
|
+
declare function deriveSelectionCapabilities(props: ServiceProps | undefined, selectionInfo: CanvasSelection): SelectionCapabilities;
|
|
1981
2028
|
/** ---------------- hook ---------------- */
|
|
1982
2029
|
declare function useCanvas(): UseCanvasReturn;
|
|
1983
2030
|
|
|
@@ -2280,4 +2327,4 @@ interface WorkspaceProps {
|
|
|
2280
2327
|
*/
|
|
2281
2328
|
declare function Workspace(props: WorkspaceProps): React.JSX.Element;
|
|
2282
2329
|
|
|
2283
|
-
export { type Actor, type AdapterOptions, type Author, type AuthorsBackend, type BackendError, type BackendResult, type BackendScope, type Branch, type BranchAccessBackend, type BranchParticipant, type BranchesBackend, type BranchesSlice, Canvas, CanvasProvider, type CanvasSelection, type ClearTarget, type CommentsBackend, type Commit, type CreateMemoryWorkspaceBackendOptions, type Draft, type ErrorKind, type ErrorLog, type FieldTemplate, type FlowCanvasProps, type LabelPlacement, type LiveOptions, type Loadable, type MemoryBackendSeed, type MemorySeedBranchSnapshots, type MemorySeedComments, type MemorySeedParticipants, type MergeResult, type MergedErrors, type PermissionsBackend, type PermissionsMap, type PoliciesBackend, type PoliciesLoadResult, type PolicyScope, type Result, type ServiceSnapshot, type ServicesBackend, type ServicesInput, type SnapshotSlice, type SnapshotsBackend, type SnapshotsLoadResult, type TemplateCreateInput, type TemplateUpdatePatch, type TemplateValidator, type TemplatesBackend, type TemplatesListParams, type ToolsConfig, type TreeNode, type UseCanvasReturn, type UseErrorsOptions, type UseErrorsReturn, type ValidationRow, Workspace, type WorkspaceAPI, type WorkspaceBackend, type WorkspaceBootSection, type WorkspaceBootSectionState, type WorkspaceBootSectionStatus, type WorkspaceBootState, WorkspaceContext, type WorkspaceEvent, type WorkspaceInfo, type WorkspaceLiveAdapter, type WorkspaceLiveAdapterContext, type WorkspaceLiveAdapterHandlers, type WorkspaceLiveAdapterRegistry, type WorkspaceLiveStatus, type WorkspaceLiveTick, type WorkspaceProps, WorkspaceProvider, type WorkspaceProviderProps, createMemoryWorkspaceBackend, createPollAdapter, useCanvas, useCanvasAPI, useCanvasFromBuilder, useCanvasFromExisting, useCanvasOwned, useErrors, useWorkspace, useWorkspaceBoot, useWorkspaceMaybe };
|
|
2330
|
+
export { type Actor, type AdapterOptions, type Author, type AuthorsBackend, type BackendError, type BackendResult, type BackendScope, type Branch, type BranchAccessBackend, type BranchParticipant, type BranchesBackend, type BranchesSlice, Canvas, CanvasProvider, type CanvasSelection, type ClearTarget, type CommentsBackend, type Commit, type CreateMemoryWorkspaceBackendOptions, type Draft, type ErrorKind, type ErrorLog, type FieldTemplate, type FlowCanvasProps, type LabelPlacement, type LiveOptions, type Loadable, type MemoryBackendSeed, type MemorySeedBranchSnapshots, type MemorySeedComments, type MemorySeedParticipants, type MergeResult, type MergedErrors, type PermissionsBackend, type PermissionsMap, type PoliciesBackend, type PoliciesLoadResult, type PolicyScope, type Result, type SelectionCapabilities, type ServiceSnapshot, type ServicesBackend, type ServicesInput, type SnapshotSlice, type SnapshotsBackend, type SnapshotsLoadResult, type TemplateCreateInput, type TemplateUpdatePatch, type TemplateValidator, type TemplatesBackend, type TemplatesListParams, type ToolsConfig, type TreeNode, type UseCanvasReturn, type UseErrorsOptions, type UseErrorsReturn, type ValidationRow, Workspace, type WorkspaceAPI, type WorkspaceActorBranchLoadContext, type WorkspaceActorLoadContext, type WorkspaceBackend, type WorkspaceBootSection, type WorkspaceBootSectionState, type WorkspaceBootSectionStatus, type WorkspaceBootState, type WorkspaceBranchLoadContext, WorkspaceContext, type WorkspaceEvent, type WorkspaceInfo, type WorkspaceLiveAdapter, type WorkspaceLiveAdapterContext, type WorkspaceLiveAdapterHandlers, type WorkspaceLiveAdapterRegistry, type WorkspaceLiveStatus, type WorkspaceLiveTick, type WorkspaceLoadContext, type WorkspaceProps, WorkspaceProvider, type WorkspaceProviderProps, createMemoryWorkspaceBackend, createPollAdapter, deriveSelectionCapabilities, useCanvas, useCanvasAPI, useCanvasFromBuilder, useCanvasFromExisting, useCanvasOwned, useErrors, useWorkspace, useWorkspaceBoot, useWorkspaceMaybe };
|
|
@@ -857,12 +857,26 @@ interface MergeResult {
|
|
|
857
857
|
readonly conflicts?: number;
|
|
858
858
|
readonly message?: string;
|
|
859
859
|
}
|
|
860
|
+
type WorkspaceLoadContext = Readonly<{
|
|
861
|
+
workspaceId: string;
|
|
862
|
+
actorId?: string;
|
|
863
|
+
branchId?: string;
|
|
864
|
+
since?: string | number;
|
|
865
|
+
}>;
|
|
866
|
+
type WorkspaceActorLoadContext = WorkspaceLoadContext & Readonly<{
|
|
867
|
+
actorId: string;
|
|
868
|
+
}>;
|
|
869
|
+
type WorkspaceBranchLoadContext = WorkspaceLoadContext & Readonly<{
|
|
870
|
+
branchId: string;
|
|
871
|
+
}>;
|
|
872
|
+
type WorkspaceActorBranchLoadContext = WorkspaceLoadContext & Readonly<{
|
|
873
|
+
actorId: string;
|
|
874
|
+
branchId: string;
|
|
875
|
+
}>;
|
|
860
876
|
type ServicesInput = readonly DgpServiceCapability[] | DgpServiceMap;
|
|
861
877
|
interface ServicesBackend {
|
|
862
|
-
get(
|
|
863
|
-
refresh(
|
|
864
|
-
since?: number | string;
|
|
865
|
-
}>): Result<ServicesInput>;
|
|
878
|
+
get(ctx: WorkspaceLoadContext): Result<ServicesInput>;
|
|
879
|
+
refresh(ctx: WorkspaceLoadContext): Result<ServicesInput>;
|
|
866
880
|
}
|
|
867
881
|
interface BranchParticipant {
|
|
868
882
|
readonly id: string;
|
|
@@ -879,10 +893,8 @@ interface BranchParticipant {
|
|
|
879
893
|
readonly updatedAt?: string;
|
|
880
894
|
}
|
|
881
895
|
interface BranchAccessBackend {
|
|
882
|
-
listParticipants(
|
|
883
|
-
refreshParticipants(
|
|
884
|
-
since?: number | string;
|
|
885
|
-
}>): Result<readonly BranchParticipant[]>;
|
|
896
|
+
listParticipants(ctx: WorkspaceBranchLoadContext): Result<readonly BranchParticipant[]>;
|
|
897
|
+
refreshParticipants(ctx: WorkspaceBranchLoadContext): Result<readonly BranchParticipant[]>;
|
|
886
898
|
}
|
|
887
899
|
interface ServiceSnapshot {
|
|
888
900
|
readonly schema_version: string;
|
|
@@ -996,12 +1008,13 @@ interface FieldTemplate {
|
|
|
996
1008
|
}
|
|
997
1009
|
/** Narrow list/search input */
|
|
998
1010
|
interface TemplatesListParams {
|
|
999
|
-
readonly workspaceId:
|
|
1000
|
-
readonly
|
|
1011
|
+
readonly workspaceId: WorkspaceLoadContext["workspaceId"];
|
|
1012
|
+
readonly actorId?: WorkspaceLoadContext["actorId"];
|
|
1013
|
+
readonly branchId?: WorkspaceLoadContext["branchId"];
|
|
1001
1014
|
readonly q?: string;
|
|
1002
1015
|
readonly tags?: readonly string[];
|
|
1003
1016
|
readonly category?: string;
|
|
1004
|
-
readonly since?:
|
|
1017
|
+
readonly since?: WorkspaceLoadContext["since"];
|
|
1005
1018
|
}
|
|
1006
1019
|
interface TemplateCreateInput {
|
|
1007
1020
|
readonly key?: string;
|
|
@@ -1121,23 +1134,23 @@ type LiveOptions = {
|
|
|
1121
1134
|
protocols?: readonly string[];
|
|
1122
1135
|
};
|
|
1123
1136
|
interface AuthorsBackend {
|
|
1124
|
-
list(
|
|
1137
|
+
list(ctx: WorkspaceLoadContext): Result<readonly Author[]>;
|
|
1125
1138
|
get(authorId: string): Result<Author | null>;
|
|
1126
|
-
refresh(
|
|
1139
|
+
refresh(ctx: WorkspaceLoadContext): Result<readonly Author[]>;
|
|
1127
1140
|
}
|
|
1128
1141
|
interface PermissionsBackend {
|
|
1129
|
-
get(
|
|
1130
|
-
refresh(
|
|
1142
|
+
get(ctx: WorkspaceActorLoadContext): Result<PermissionsMap>;
|
|
1143
|
+
refresh(ctx: WorkspaceActorLoadContext): Result<PermissionsMap>;
|
|
1131
1144
|
}
|
|
1132
1145
|
interface BranchesBackend {
|
|
1133
|
-
list(
|
|
1146
|
+
list(ctx: WorkspaceLoadContext): Result<readonly Branch[]>;
|
|
1134
1147
|
create(workspaceId: string, name: string, opts?: Readonly<{
|
|
1135
1148
|
fromId?: string;
|
|
1136
1149
|
}>): Result<Branch>;
|
|
1137
1150
|
setMain(workspaceId: string, branchId: string): Result<Branch>;
|
|
1138
1151
|
merge(workspaceId: string, sourceId: string, targetId: string): Result<MergeResult>;
|
|
1139
1152
|
delete(workspaceId: string, branchId: string): Result<void>;
|
|
1140
|
-
refresh(
|
|
1153
|
+
refresh(ctx: WorkspaceLoadContext): Result<readonly Branch[]>;
|
|
1141
1154
|
}
|
|
1142
1155
|
interface WorkspaceInfo {
|
|
1143
1156
|
readonly id: string;
|
|
@@ -1152,10 +1165,7 @@ interface WorkspaceInfo {
|
|
|
1152
1165
|
* This is intentionally transport-agnostic and minimal so other layers (e.g. canvas/comments)
|
|
1153
1166
|
* can reuse it without redefining identity types.
|
|
1154
1167
|
*/
|
|
1155
|
-
interface BackendScope {
|
|
1156
|
-
readonly workspaceId: string;
|
|
1157
|
-
readonly actorId: string;
|
|
1158
|
-
readonly branchId: string;
|
|
1168
|
+
interface BackendScope extends WorkspaceActorBranchLoadContext {
|
|
1159
1169
|
}
|
|
1160
1170
|
/**
|
|
1161
1171
|
* Generic canvas comments backend contract.
|
|
@@ -1206,7 +1216,7 @@ interface CommentsBackend<ThreadDTO = unknown, MessageDTO = unknown, AnchorDTO =
|
|
|
1206
1216
|
* - If branchId is provided -> branch-scoped policies
|
|
1207
1217
|
* - If branchId is omitted -> workspace-scoped policies
|
|
1208
1218
|
*/
|
|
1209
|
-
interface PolicyScope extends
|
|
1219
|
+
interface PolicyScope extends WorkspaceActorLoadContext {
|
|
1210
1220
|
}
|
|
1211
1221
|
interface PoliciesLoadResult {
|
|
1212
1222
|
/** the raw JSON the host stored (authoring format) */
|
|
@@ -1651,6 +1661,7 @@ type DuplicateOptions = {
|
|
|
1651
1661
|
nameStrategy?: (old?: string) => string | undefined;
|
|
1652
1662
|
optionIdStrategy?: (old: string) => string;
|
|
1653
1663
|
};
|
|
1664
|
+
type DuplicateManyOptions = Omit<DuplicateOptions, "id">;
|
|
1654
1665
|
type EditorNodeLookup = {
|
|
1655
1666
|
kind: "tag";
|
|
1656
1667
|
data?: Tag;
|
|
@@ -1703,6 +1714,7 @@ declare class Editor {
|
|
|
1703
1714
|
redo(): boolean;
|
|
1704
1715
|
clearService(id: string): void;
|
|
1705
1716
|
duplicate(ref: NodeRef, opts?: DuplicateOptions): string;
|
|
1717
|
+
duplicateMany(ids: readonly string[], opts?: DuplicateManyOptions): string[];
|
|
1706
1718
|
reLabel(id: string, nextLabel: string): void;
|
|
1707
1719
|
setFieldName(fieldId: string, nextName: string | null | undefined): void;
|
|
1708
1720
|
getLastPolicyDiagnostics(): PolicyDiagnostic[] | undefined;
|
|
@@ -1755,6 +1767,29 @@ declare class Editor {
|
|
|
1755
1767
|
updateField(id: string, patch: Partial<Field>): void;
|
|
1756
1768
|
removeField(id: string): void;
|
|
1757
1769
|
remove(id: string): void;
|
|
1770
|
+
removeMany(ids: readonly string[]): void;
|
|
1771
|
+
clearServiceMany(ids: readonly string[]): void;
|
|
1772
|
+
rebindMany(ids: readonly string[], targetTagId: string, opts?: {
|
|
1773
|
+
allowTagCycles?: boolean;
|
|
1774
|
+
}): void;
|
|
1775
|
+
includeMany(receiverId: string, ids: readonly string[]): void;
|
|
1776
|
+
excludeMany(receiverId: string, ids: readonly string[]): void;
|
|
1777
|
+
clearRelationsMany(ids: readonly string[], mode?: "owned" | "incoming" | "both"): void;
|
|
1778
|
+
renameLabelsMany(ids: readonly string[], input: {
|
|
1779
|
+
prefix?: string;
|
|
1780
|
+
suffix?: string;
|
|
1781
|
+
}): void;
|
|
1782
|
+
setPricingRoleMany(ids: readonly string[], role: "base" | "utility"): void;
|
|
1783
|
+
clearFieldDefaultsMany(ids: readonly string[]): void;
|
|
1784
|
+
clearFieldValidationMany(ids: readonly string[]): void;
|
|
1785
|
+
autoCreateOptionsMany(ids: readonly string[], makeOption?: (fieldId: string) => {
|
|
1786
|
+
id?: string;
|
|
1787
|
+
label: string;
|
|
1788
|
+
value?: string | number;
|
|
1789
|
+
}): void;
|
|
1790
|
+
clearAllOptionsMany(ids: readonly string[]): void;
|
|
1791
|
+
removeNoticesForNodes(ids: readonly string[]): void;
|
|
1792
|
+
setNoticesVisibilityForNodes(ids: readonly string[], type: "public" | "private"): void;
|
|
1758
1793
|
getNode(id: string): EditorNodeLookup;
|
|
1759
1794
|
getFieldQuantityRule(id: string): QuantityRule | undefined;
|
|
1760
1795
|
setFieldQuantityRule(id: string, rule: unknown): void;
|
|
@@ -1977,7 +2012,19 @@ interface UseCanvasReturn {
|
|
|
1977
2012
|
graph: GraphSnapshot;
|
|
1978
2013
|
api: CanvasAPI;
|
|
1979
2014
|
props?: ServiceProps;
|
|
1980
|
-
|
|
2015
|
+
selectionCapabilities: SelectionCapabilities;
|
|
2016
|
+
}
|
|
2017
|
+
type SelectionCapabilities = {
|
|
2018
|
+
hasTags: boolean;
|
|
2019
|
+
hasFields: boolean;
|
|
2020
|
+
hasOptions: boolean;
|
|
2021
|
+
hasServiceBearingNodes: boolean;
|
|
2022
|
+
hasSelectedFieldWithOptions: boolean;
|
|
2023
|
+
hasNoticesForSelection: boolean;
|
|
2024
|
+
canIncludeExcludeTargets: boolean;
|
|
2025
|
+
canRebind: boolean;
|
|
2026
|
+
};
|
|
2027
|
+
declare function deriveSelectionCapabilities(props: ServiceProps | undefined, selectionInfo: CanvasSelection): SelectionCapabilities;
|
|
1981
2028
|
/** ---------------- hook ---------------- */
|
|
1982
2029
|
declare function useCanvas(): UseCanvasReturn;
|
|
1983
2030
|
|
|
@@ -2280,4 +2327,4 @@ interface WorkspaceProps {
|
|
|
2280
2327
|
*/
|
|
2281
2328
|
declare function Workspace(props: WorkspaceProps): React.JSX.Element;
|
|
2282
2329
|
|
|
2283
|
-
export { type Actor, type AdapterOptions, type Author, type AuthorsBackend, type BackendError, type BackendResult, type BackendScope, type Branch, type BranchAccessBackend, type BranchParticipant, type BranchesBackend, type BranchesSlice, Canvas, CanvasProvider, type CanvasSelection, type ClearTarget, type CommentsBackend, type Commit, type CreateMemoryWorkspaceBackendOptions, type Draft, type ErrorKind, type ErrorLog, type FieldTemplate, type FlowCanvasProps, type LabelPlacement, type LiveOptions, type Loadable, type MemoryBackendSeed, type MemorySeedBranchSnapshots, type MemorySeedComments, type MemorySeedParticipants, type MergeResult, type MergedErrors, type PermissionsBackend, type PermissionsMap, type PoliciesBackend, type PoliciesLoadResult, type PolicyScope, type Result, type ServiceSnapshot, type ServicesBackend, type ServicesInput, type SnapshotSlice, type SnapshotsBackend, type SnapshotsLoadResult, type TemplateCreateInput, type TemplateUpdatePatch, type TemplateValidator, type TemplatesBackend, type TemplatesListParams, type ToolsConfig, type TreeNode, type UseCanvasReturn, type UseErrorsOptions, type UseErrorsReturn, type ValidationRow, Workspace, type WorkspaceAPI, type WorkspaceBackend, type WorkspaceBootSection, type WorkspaceBootSectionState, type WorkspaceBootSectionStatus, type WorkspaceBootState, WorkspaceContext, type WorkspaceEvent, type WorkspaceInfo, type WorkspaceLiveAdapter, type WorkspaceLiveAdapterContext, type WorkspaceLiveAdapterHandlers, type WorkspaceLiveAdapterRegistry, type WorkspaceLiveStatus, type WorkspaceLiveTick, type WorkspaceProps, WorkspaceProvider, type WorkspaceProviderProps, createMemoryWorkspaceBackend, createPollAdapter, useCanvas, useCanvasAPI, useCanvasFromBuilder, useCanvasFromExisting, useCanvasOwned, useErrors, useWorkspace, useWorkspaceBoot, useWorkspaceMaybe };
|
|
2330
|
+
export { type Actor, type AdapterOptions, type Author, type AuthorsBackend, type BackendError, type BackendResult, type BackendScope, type Branch, type BranchAccessBackend, type BranchParticipant, type BranchesBackend, type BranchesSlice, Canvas, CanvasProvider, type CanvasSelection, type ClearTarget, type CommentsBackend, type Commit, type CreateMemoryWorkspaceBackendOptions, type Draft, type ErrorKind, type ErrorLog, type FieldTemplate, type FlowCanvasProps, type LabelPlacement, type LiveOptions, type Loadable, type MemoryBackendSeed, type MemorySeedBranchSnapshots, type MemorySeedComments, type MemorySeedParticipants, type MergeResult, type MergedErrors, type PermissionsBackend, type PermissionsMap, type PoliciesBackend, type PoliciesLoadResult, type PolicyScope, type Result, type SelectionCapabilities, type ServiceSnapshot, type ServicesBackend, type ServicesInput, type SnapshotSlice, type SnapshotsBackend, type SnapshotsLoadResult, type TemplateCreateInput, type TemplateUpdatePatch, type TemplateValidator, type TemplatesBackend, type TemplatesListParams, type ToolsConfig, type TreeNode, type UseCanvasReturn, type UseErrorsOptions, type UseErrorsReturn, type ValidationRow, Workspace, type WorkspaceAPI, type WorkspaceActorBranchLoadContext, type WorkspaceActorLoadContext, type WorkspaceBackend, type WorkspaceBootSection, type WorkspaceBootSectionState, type WorkspaceBootSectionStatus, type WorkspaceBootState, type WorkspaceBranchLoadContext, WorkspaceContext, type WorkspaceEvent, type WorkspaceInfo, type WorkspaceLiveAdapter, type WorkspaceLiveAdapterContext, type WorkspaceLiveAdapterHandlers, type WorkspaceLiveAdapterRegistry, type WorkspaceLiveStatus, type WorkspaceLiveTick, type WorkspaceLoadContext, type WorkspaceProps, WorkspaceProvider, type WorkspaceProviderProps, createMemoryWorkspaceBackend, createPollAdapter, deriveSelectionCapabilities, useCanvas, useCanvasAPI, useCanvasFromBuilder, useCanvasFromExisting, useCanvasOwned, useErrors, useWorkspace, useWorkspaceBoot, useWorkspaceMaybe };
|