@salesforce/metadata-plugins 1.3.0 → 1.5.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.
- package/README.md +30 -3
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -2
- package/dist/plugins/agent/AgentParser.d.ts +34 -0
- package/dist/plugins/agent/AgentParser.d.ts.map +1 -0
- package/dist/plugins/agent/AgentParser.js +189 -0
- package/dist/plugins/agent/AgentVisualizer.d.ts +27 -0
- package/dist/plugins/agent/AgentVisualizer.d.ts.map +1 -0
- package/dist/plugins/agent/AgentVisualizer.js +36 -0
- package/dist/plugins/agent/extract/assertNever.d.ts +23 -0
- package/dist/plugins/agent/extract/assertNever.d.ts.map +1 -0
- package/dist/plugins/agent/extract/assertNever.js +24 -0
- package/dist/plugins/agent/extract/ast-to-graph.d.ts +137 -0
- package/dist/plugins/agent/extract/ast-to-graph.d.ts.map +1 -0
- package/dist/plugins/agent/extract/ast-to-graph.js +523 -0
- package/dist/plugins/agent/extract/ast-utils.d.ts +61 -0
- package/dist/plugins/agent/extract/ast-utils.d.ts.map +1 -0
- package/dist/plugins/agent/extract/ast-utils.js +7 -0
- package/dist/plugins/agent/extract/parseNamespacedRef.d.ts +31 -0
- package/dist/plugins/agent/extract/parseNamespacedRef.d.ts.map +1 -0
- package/dist/plugins/agent/extract/parseNamespacedRef.js +31 -0
- package/dist/plugins/agent/extract/reasoningParser.d.ts +112 -0
- package/dist/plugins/agent/extract/reasoningParser.d.ts.map +1 -0
- package/dist/plugins/agent/extract/reasoningParser.js +804 -0
- package/dist/plugins/agent/types/AgentScriptData.d.ts +31 -0
- package/dist/plugins/agent/types/AgentScriptData.d.ts.map +1 -0
- package/dist/plugins/agent/types/AgentScriptData.js +7 -0
- package/dist/plugins/agent/ui/assets/index-CTzSDPPx.css +1 -0
- package/dist/plugins/agent/ui/assets/index-D0wb9GBs.js +71 -0
- package/dist/plugins/agent/ui/index.html +14 -0
- package/dist/plugins/flexipage/FlexipageParser.d.ts +1 -1
- package/dist/plugins/flexipage/FlexipageParser.js +1 -1
- package/dist/plugins/flexipage/FlexipageVisualizer.d.ts +1 -1
- package/dist/plugins/flexipage/FlexipageVisualizer.js +1 -1
- package/dist/plugins/flexipage/transformer/FlexipageToUemTransformer.d.ts +1 -1
- package/dist/plugins/flexipage/transformer/FlexipageToUemTransformer.js +1 -1
- package/dist/plugins/flexipage/transformer/FlexipageTransformerUtils.d.ts +1 -1
- package/dist/plugins/flexipage/transformer/FlexipageTransformerUtils.js +1 -1
- package/dist/plugins/flexipage/types/FlexipageMetadata.d.ts +1 -1
- package/dist/plugins/flexipage/types/FlexipageMetadata.js +1 -1
- package/dist/plugins/flow/FlowParser.d.ts +36 -0
- package/dist/plugins/flow/FlowParser.d.ts.map +1 -0
- package/dist/plugins/flow/FlowParser.js +240 -0
- package/dist/plugins/flow/FlowVisualizer.d.ts +28 -0
- package/dist/plugins/flow/FlowVisualizer.d.ts.map +1 -0
- package/dist/plugins/flow/FlowVisualizer.js +36 -0
- package/dist/plugins/flow/parser/details.d.ts +33 -0
- package/dist/plugins/flow/parser/details.d.ts.map +1 -0
- package/dist/plugins/flow/parser/details.js +353 -0
- package/dist/plugins/flow/parser/edges.d.ts +53 -0
- package/dist/plugins/flow/parser/edges.d.ts.map +1 -0
- package/dist/plugins/flow/parser/edges.js +197 -0
- package/dist/plugins/flow/parser/elementTypes.d.ts +47 -0
- package/dist/plugins/flow/parser/elementTypes.d.ts.map +1 -0
- package/dist/plugins/flow/parser/elementTypes.js +176 -0
- package/dist/plugins/flow/parser/flowLabels.d.ts +43 -0
- package/dist/plugins/flow/parser/flowLabels.d.ts.map +1 -0
- package/dist/plugins/flow/parser/flowLabels.js +42 -0
- package/dist/plugins/flow/parser/groups.d.ts +26 -0
- package/dist/plugins/flow/parser/groups.d.ts.map +1 -0
- package/dist/plugins/flow/parser/groups.js +56 -0
- package/dist/plugins/flow/parser/nodes.d.ts +25 -0
- package/dist/plugins/flow/parser/nodes.d.ts.map +1 -0
- package/dist/plugins/flow/parser/nodes.js +86 -0
- package/dist/plugins/flow/parser/resources.d.ts +21 -0
- package/dist/plugins/flow/parser/resources.d.ts.map +1 -0
- package/dist/plugins/flow/parser/resources.js +140 -0
- package/dist/plugins/flow/parser/startConfig.d.ts +29 -0
- package/dist/plugins/flow/parser/startConfig.d.ts.map +1 -0
- package/dist/plugins/flow/parser/startConfig.js +117 -0
- package/dist/plugins/flow/parser/xmlPrimitives.d.ts +53 -0
- package/dist/plugins/flow/parser/xmlPrimitives.d.ts.map +1 -0
- package/dist/plugins/flow/parser/xmlPrimitives.js +152 -0
- package/dist/plugins/flow/types/FlowData.d.ts +294 -0
- package/dist/plugins/flow/types/FlowData.d.ts.map +1 -0
- package/dist/plugins/flow/types/FlowData.js +7 -0
- package/dist/plugins/flow/ui/assets/index-Cb-x8fUq.css +1 -0
- package/dist/plugins/flow/ui/assets/index-DDfQ7eDI.js +48 -0
- package/dist/plugins/flow/ui/index.html +14 -0
- package/dist/plugins/schema/SchemaParser.d.ts +1 -1
- package/dist/plugins/schema/SchemaParser.js +1 -1
- package/dist/plugins/schema/SchemaVisualizer.d.ts +1 -1
- package/dist/plugins/schema/SchemaVisualizer.js +1 -1
- package/dist/plugins/schema/types/SchemaERDData.d.ts +1 -1
- package/dist/plugins/schema/types/SchemaERDData.js +1 -1
- package/dist/shared/bootstrap/createPluginApp.d.ts +1 -1
- package/dist/shared/bootstrap/createPluginApp.js +1 -1
- package/dist/shared/components/ErrorBoundary.d.ts +1 -1
- package/dist/shared/components/ErrorBoundary.js +1 -1
- package/dist/shared/uem/transformer/ITransformer.d.ts +1 -1
- package/dist/shared/uem/transformer/ITransformer.js +1 -1
- package/dist/shared/uem/transformer/TransformerRegistry.d.ts +1 -1
- package/dist/shared/uem/transformer/TransformerRegistry.js +1 -1
- package/dist/shared/uem/transformer/UemBasedVisualizer.d.ts +1 -1
- package/dist/shared/uem/transformer/UemBasedVisualizer.js +1 -1
- package/dist/shared/uem/types/UemMetadata.d.ts +1 -1
- package/dist/shared/uem/types/UemMetadata.js +1 -1
- package/dist/shared/uem/ui/components/PropertyRenderer/PropertyRenderer.d.ts +1 -1
- package/dist/shared/uem/ui/components/PropertyRenderer/PropertyRenderer.js +1 -1
- package/dist/shared/uem/ui/components/UEMVisualization/UEMVisualization.d.ts +1 -1
- package/dist/shared/uem/ui/components/UEMVisualization/UEMVisualization.js +1 -1
- package/dist/shared/utils/isPluginError.d.ts +1 -1
- package/dist/shared/utils/isPluginError.js +1 -1
- package/dist/shared/utils/patternMatcher.d.ts +1 -1
- package/dist/shared/utils/patternMatcher.js +1 -1
- package/dist/shared/utils/uemTreeUtils.d.ts +1 -1
- package/dist/shared/utils/uemTreeUtils.js +1 -1
- package/dist/shared/utils/vizDependentPathsHelper.d.ts +1 -1
- package/dist/shared/utils/vizDependentPathsHelper.js +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
import { str } from './xmlPrimitives.js';
|
|
8
|
+
export const ELEMENT_TYPES = [
|
|
9
|
+
{ tag: 'screens', kind: 'screen', typeLabel: 'Screen', metaTypeLabel: 'Screen' },
|
|
10
|
+
{ tag: 'actionCalls', kind: 'action', typeLabel: 'Action', metaTypeLabel: 'ActionCall' },
|
|
11
|
+
{
|
|
12
|
+
tag: 'apexPluginCalls',
|
|
13
|
+
kind: 'apexPluginCall',
|
|
14
|
+
typeLabel: 'Apex (Legacy)',
|
|
15
|
+
metaTypeLabel: 'ApexPluginCall',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
tag: 'assignments',
|
|
19
|
+
kind: 'assignment',
|
|
20
|
+
typeLabel: 'Assignment',
|
|
21
|
+
metaTypeLabel: 'Assignment',
|
|
22
|
+
},
|
|
23
|
+
{ tag: 'decisions', kind: 'decision', typeLabel: 'Decision', metaTypeLabel: 'Decision' },
|
|
24
|
+
{ tag: 'loops', kind: 'loop', typeLabel: 'Loop', metaTypeLabel: 'Loop' },
|
|
25
|
+
{
|
|
26
|
+
tag: 'recordCreates',
|
|
27
|
+
kind: 'recordCreate',
|
|
28
|
+
typeLabel: 'Create Records',
|
|
29
|
+
metaTypeLabel: 'RecordCreate',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
tag: 'recordLookups',
|
|
33
|
+
kind: 'recordLookup',
|
|
34
|
+
typeLabel: 'Get Records',
|
|
35
|
+
metaTypeLabel: 'RecordLookup',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
tag: 'recordUpdates',
|
|
39
|
+
kind: 'recordUpdate',
|
|
40
|
+
typeLabel: 'Update Records',
|
|
41
|
+
metaTypeLabel: 'RecordUpdate',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
tag: 'recordDeletes',
|
|
45
|
+
kind: 'recordDelete',
|
|
46
|
+
typeLabel: 'Delete Records',
|
|
47
|
+
metaTypeLabel: 'RecordDelete',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
tag: 'recordRollbacks',
|
|
51
|
+
kind: 'recordRollback',
|
|
52
|
+
typeLabel: 'Roll Back',
|
|
53
|
+
metaTypeLabel: 'RecordRollback',
|
|
54
|
+
},
|
|
55
|
+
// Some hand-authored flows use the shorter `<rollbacks>` tag for the same
|
|
56
|
+
// Record Rollback element — accept both so either form renders.
|
|
57
|
+
{
|
|
58
|
+
tag: 'rollbacks',
|
|
59
|
+
kind: 'recordRollback',
|
|
60
|
+
typeLabel: 'Roll Back',
|
|
61
|
+
metaTypeLabel: 'RecordRollback',
|
|
62
|
+
},
|
|
63
|
+
{ tag: 'subflows', kind: 'subflow', typeLabel: 'Subflow', metaTypeLabel: 'Subflow' },
|
|
64
|
+
{ tag: 'waits', kind: 'wait', typeLabel: 'Wait', metaTypeLabel: 'Wait' },
|
|
65
|
+
{
|
|
66
|
+
tag: 'collectionProcessors',
|
|
67
|
+
kind: 'collectionProcessor',
|
|
68
|
+
typeLabel: 'Collection',
|
|
69
|
+
metaTypeLabel: 'CollectionProcessor',
|
|
70
|
+
},
|
|
71
|
+
{ tag: 'transforms', kind: 'transform', typeLabel: 'Transform', metaTypeLabel: 'Transform' },
|
|
72
|
+
{
|
|
73
|
+
tag: 'customErrors',
|
|
74
|
+
kind: 'customError',
|
|
75
|
+
typeLabel: 'Custom Error',
|
|
76
|
+
metaTypeLabel: 'CustomError',
|
|
77
|
+
},
|
|
78
|
+
// Orchestrator flows: each <orchestratedStages> is a stage container on the canvas.
|
|
79
|
+
{
|
|
80
|
+
tag: 'orchestratedStages',
|
|
81
|
+
kind: 'stage',
|
|
82
|
+
typeLabel: 'Stage',
|
|
83
|
+
metaTypeLabel: 'OrchestratedStage',
|
|
84
|
+
},
|
|
85
|
+
// Flow Orchestrator (`FlowOrchestrator` processType) authors stage containers
|
|
86
|
+
// under a bare `<stages>` tag with nested `<stageSteps>`. The `<stages>` tag
|
|
87
|
+
// *also* names non-canvas stage resources on regular flows — the nodes pass
|
|
88
|
+
// filters those out by requiring `<stageSteps>` before emitting a node.
|
|
89
|
+
{
|
|
90
|
+
tag: 'stages',
|
|
91
|
+
kind: 'stage',
|
|
92
|
+
typeLabel: 'Stage',
|
|
93
|
+
metaTypeLabel: 'Stage',
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
/**
|
|
97
|
+
* Maps an ActionCall's `actionType` (or related tags) to a more specific
|
|
98
|
+
* FlowNodeKind so the tile picks up a dedicated icon instead of the generic
|
|
99
|
+
* "core action" chrome. Unknown types keep the default `action` kind.
|
|
100
|
+
*/
|
|
101
|
+
export function refineActionKind(record) {
|
|
102
|
+
const actionType = (str(record.actionType) ?? '').toLowerCase();
|
|
103
|
+
if (!actionType) {
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
if (actionType === 'apex') {
|
|
107
|
+
return 'apexAction';
|
|
108
|
+
}
|
|
109
|
+
if (actionType === 'emailsimple' || actionType === 'emailalert') {
|
|
110
|
+
return 'emailAction';
|
|
111
|
+
}
|
|
112
|
+
if (actionType.startsWith('externalservice') || actionType === 'httpcallout') {
|
|
113
|
+
return 'externalCallout';
|
|
114
|
+
}
|
|
115
|
+
if (actionType === 'routework') {
|
|
116
|
+
return 'routeWork';
|
|
117
|
+
}
|
|
118
|
+
if (actionType === 'addscreenpop') {
|
|
119
|
+
return 'addScreenPop';
|
|
120
|
+
}
|
|
121
|
+
if (actionType === 'addskillrequirement' || actionType === 'skillsbasedrouting') {
|
|
122
|
+
return 'addSkillRequirement';
|
|
123
|
+
}
|
|
124
|
+
if (actionType === 'checkavailability' ||
|
|
125
|
+
actionType === 'checkroutingavailability' ||
|
|
126
|
+
actionType.startsWith('lightningscheduler')) {
|
|
127
|
+
return 'checkAvailability';
|
|
128
|
+
}
|
|
129
|
+
if (actionType === 'setscreencomponentproperty') {
|
|
130
|
+
return 'setScreenProperty';
|
|
131
|
+
}
|
|
132
|
+
if (actionType === 'managedcontentrolestepinteractive') {
|
|
133
|
+
return 'managedContentStep';
|
|
134
|
+
}
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* `<collectionProcessors>` splits into Filter vs Sort by `collectionProcessorType`.
|
|
139
|
+
*/
|
|
140
|
+
export function refineCollectionProcessorKind(record) {
|
|
141
|
+
const type = (str(record.collectionProcessorType) ?? '').toLowerCase();
|
|
142
|
+
if (type === 'sortcollectionprocessor') {
|
|
143
|
+
return 'collectionSort';
|
|
144
|
+
}
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* `<assignments>` in Prompt Flows may carry `<elementSubtype>AddPromptInstructions</elementSubtype>`,
|
|
149
|
+
* which Flow Builder renders as an "Add Prompt Instructions" action tile rather
|
|
150
|
+
* than a generic assignment. `elementSubtype` in the XML is typically a string,
|
|
151
|
+
* but our XML reader occasionally hands back an object shape — read defensively.
|
|
152
|
+
*/
|
|
153
|
+
export function refineAssignmentKind(record) {
|
|
154
|
+
const raw = record.elementSubtype;
|
|
155
|
+
const subtype = str(raw) ?? str(raw?.['#text']) ?? undefined;
|
|
156
|
+
if ((subtype ?? '').toLowerCase() === 'addpromptinstructions') {
|
|
157
|
+
return 'addPromptInstructions';
|
|
158
|
+
}
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Compose the base kind (from ELEMENT_TYPES) with any per-kind refinement so a
|
|
163
|
+
* caller can get the final FlowNodeKind in one step.
|
|
164
|
+
*/
|
|
165
|
+
export function resolveKind(baseKind, record) {
|
|
166
|
+
if (baseKind === 'action') {
|
|
167
|
+
return refineActionKind(record) ?? baseKind;
|
|
168
|
+
}
|
|
169
|
+
if (baseKind === 'collectionProcessor') {
|
|
170
|
+
return refineCollectionProcessorKind(record) ?? baseKind;
|
|
171
|
+
}
|
|
172
|
+
if (baseKind === 'assignment') {
|
|
173
|
+
return refineAssignmentKind(record) ?? baseKind;
|
|
174
|
+
}
|
|
175
|
+
return baseKind;
|
|
176
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* User-facing string constants for the flow parser output. Kept centralized so
|
|
9
|
+
* localization or copy tweaks touch one file.
|
|
10
|
+
*/
|
|
11
|
+
/** Detail-group titles shown on the element inspector. */
|
|
12
|
+
export declare const DETAIL_TITLES: {
|
|
13
|
+
readonly faultHandling: "Fault Handling";
|
|
14
|
+
readonly startConfiguration: "Start Configuration";
|
|
15
|
+
readonly entryConditions: "Entry Conditions";
|
|
16
|
+
readonly loopThrough: "Loop Through This Collection";
|
|
17
|
+
readonly transform: "Transform";
|
|
18
|
+
readonly pauseConditions: "Pause Conditions";
|
|
19
|
+
readonly screenComponents: "Screen Components";
|
|
20
|
+
readonly setInputValues: "Set Input Values";
|
|
21
|
+
readonly storeOutputValues: "Store Output Values";
|
|
22
|
+
readonly setVariableValues: "Set Variable Values";
|
|
23
|
+
readonly setFieldValues: "Set Field Values";
|
|
24
|
+
readonly fieldsToStore: "Fields to Store";
|
|
25
|
+
readonly howManyToStore: "How Many Records to Store";
|
|
26
|
+
readonly action: "Action";
|
|
27
|
+
readonly subflow: "Subflow";
|
|
28
|
+
readonly steps: "Steps";
|
|
29
|
+
};
|
|
30
|
+
/** Synthetic node ids used by the parser. */
|
|
31
|
+
export declare const FLOW_START = "FLOW_START";
|
|
32
|
+
export declare const FLOW_END = "FLOW_END";
|
|
33
|
+
/** Fallback labels for connector routing. */
|
|
34
|
+
export declare const CONNECTOR_LABELS: {
|
|
35
|
+
readonly fault: "Fault";
|
|
36
|
+
readonly defaultOutcome: "Default Outcome";
|
|
37
|
+
readonly defaultPath: "Default Path";
|
|
38
|
+
readonly runImmediately: "Run Immediately";
|
|
39
|
+
readonly scheduledPath: "Scheduled Path";
|
|
40
|
+
readonly loopForEach: "For Each";
|
|
41
|
+
readonly loopAfterLast: "After Last";
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=flowLabels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowLabels.d.ts","sourceRoot":"","sources":["../../../../src/plugins/flow/parser/flowLabels.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;GAGG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAiBhB,CAAC;AAEX,6CAA6C;AAC7C,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,QAAQ,aAAa,CAAC;AAEnC,6CAA6C;AAC7C,eAAO,MAAM,gBAAgB;;;;;;;;CAQnB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* User-facing string constants for the flow parser output. Kept centralized so
|
|
9
|
+
* localization or copy tweaks touch one file.
|
|
10
|
+
*/
|
|
11
|
+
/** Detail-group titles shown on the element inspector. */
|
|
12
|
+
export const DETAIL_TITLES = {
|
|
13
|
+
faultHandling: 'Fault Handling',
|
|
14
|
+
startConfiguration: 'Start Configuration',
|
|
15
|
+
entryConditions: 'Entry Conditions',
|
|
16
|
+
loopThrough: 'Loop Through This Collection',
|
|
17
|
+
transform: 'Transform',
|
|
18
|
+
pauseConditions: 'Pause Conditions',
|
|
19
|
+
screenComponents: 'Screen Components',
|
|
20
|
+
setInputValues: 'Set Input Values',
|
|
21
|
+
storeOutputValues: 'Store Output Values',
|
|
22
|
+
setVariableValues: 'Set Variable Values',
|
|
23
|
+
setFieldValues: 'Set Field Values',
|
|
24
|
+
fieldsToStore: 'Fields to Store',
|
|
25
|
+
howManyToStore: 'How Many Records to Store',
|
|
26
|
+
action: 'Action',
|
|
27
|
+
subflow: 'Subflow',
|
|
28
|
+
steps: 'Steps',
|
|
29
|
+
};
|
|
30
|
+
/** Synthetic node ids used by the parser. */
|
|
31
|
+
export const FLOW_START = 'FLOW_START';
|
|
32
|
+
export const FLOW_END = 'FLOW_END';
|
|
33
|
+
/** Fallback labels for connector routing. */
|
|
34
|
+
export const CONNECTOR_LABELS = {
|
|
35
|
+
fault: 'Fault',
|
|
36
|
+
defaultOutcome: 'Default Outcome',
|
|
37
|
+
defaultPath: 'Default Path',
|
|
38
|
+
runImmediately: 'Run Immediately',
|
|
39
|
+
scheduledPath: 'Scheduled Path',
|
|
40
|
+
loopForEach: 'For Each',
|
|
41
|
+
loopAfterLast: 'After Last',
|
|
42
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* Canvas-group parsing.
|
|
9
|
+
*
|
|
10
|
+
* A "group" is a collapsible cluster of elements on the canvas. Salesforce
|
|
11
|
+
* serializes them two ways: explicit `<groups>` records with member ids, and
|
|
12
|
+
* per-element `groupId` back-pointers. We fold both into one `FlowGroup[]`.
|
|
13
|
+
*/
|
|
14
|
+
import type { FlowGroup, FlowNode } from '../types/FlowData.js';
|
|
15
|
+
/**
|
|
16
|
+
* Read the group an element belongs to. The upstream `ALC_GENERIC_GROUP` tag
|
|
17
|
+
* isn't finalized, so we probe several plausible shapes defensively.
|
|
18
|
+
*/
|
|
19
|
+
export declare function readGroupId(record: Record<string, unknown>): string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Collect canvas groups. Reads explicit `<groups>` containers if present, and
|
|
22
|
+
* also synthesizes groups from element `groupId` back-pointers so we render
|
|
23
|
+
* something sensible regardless of which serialization the flow uses.
|
|
24
|
+
*/
|
|
25
|
+
export declare function collectGroups(flow: Record<string, unknown>, nodes: FlowNode[]): FlowGroup[];
|
|
26
|
+
//# sourceMappingURL=groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../src/plugins/flow/parser/groups.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhE;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAO/E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,CAmC3F"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
import { arr, str } from './xmlPrimitives.js';
|
|
8
|
+
/**
|
|
9
|
+
* Read the group an element belongs to. The upstream `ALC_GENERIC_GROUP` tag
|
|
10
|
+
* isn't finalized, so we probe several plausible shapes defensively.
|
|
11
|
+
*/
|
|
12
|
+
export function readGroupId(record) {
|
|
13
|
+
return (str(record.groupName) ??
|
|
14
|
+
str(record.group) ??
|
|
15
|
+
str(record.elementSubtype?.group) ??
|
|
16
|
+
undefined);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Collect canvas groups. Reads explicit `<groups>` containers if present, and
|
|
20
|
+
* also synthesizes groups from element `groupId` back-pointers so we render
|
|
21
|
+
* something sensible regardless of which serialization the flow uses.
|
|
22
|
+
*/
|
|
23
|
+
export function collectGroups(flow, nodes) {
|
|
24
|
+
const byId = new Map();
|
|
25
|
+
for (const g of arr(flow.groups)) {
|
|
26
|
+
const rec = g;
|
|
27
|
+
const id = str(rec.name);
|
|
28
|
+
if (!id) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
byId.set(id, {
|
|
32
|
+
id,
|
|
33
|
+
label: str(rec.label) ?? id,
|
|
34
|
+
groupType: str(rec.groupType),
|
|
35
|
+
memberIds: arr(rec.members)
|
|
36
|
+
.map((m) => str(m) ?? str(m?.element))
|
|
37
|
+
.filter((m) => Boolean(m)),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
// Back-fill membership from element pointers.
|
|
41
|
+
for (const node of nodes) {
|
|
42
|
+
if (!node.groupId) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const existing = byId.get(node.groupId);
|
|
46
|
+
if (existing) {
|
|
47
|
+
if (!existing.memberIds.includes(node.id)) {
|
|
48
|
+
existing.memberIds.push(node.id);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
byId.set(node.groupId, { id: node.groupId, label: node.groupId, memberIds: [node.id] });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return [...byId.values()];
|
|
56
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* Node materialization pass.
|
|
9
|
+
*
|
|
10
|
+
* Turns each `<screens>`, `<decisions>`, `<recordLookups>`, etc. entry into a
|
|
11
|
+
* `FlowNode` with the right kind/label/detail. The synthetic Start node and
|
|
12
|
+
* per-branch End nodes are minted in `edges.ts` — this file only handles the
|
|
13
|
+
* user-authored element containers listed in `ELEMENT_TYPES`.
|
|
14
|
+
*/
|
|
15
|
+
import type { FlowNode } from '../types/FlowData.js';
|
|
16
|
+
export interface NodesPassResult {
|
|
17
|
+
nodes: FlowNode[];
|
|
18
|
+
/** All discovered element ids plus START_ID/END_ID, so edge resolution can identify targets. */
|
|
19
|
+
knownIds: Set<string>;
|
|
20
|
+
/** Whether any element carried `<locationX>`/`<locationY>` (used to pick free-form vs auto-layout). */
|
|
21
|
+
sawCoordinates: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** First pass: one `FlowNode` per authored element. */
|
|
24
|
+
export declare function collectNodes(flow: Record<string, unknown>, reservedIds: string[]): NodesPassResult;
|
|
25
|
+
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../src/plugins/flow/parser/nodes.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAiB,MAAM,sBAAsB,CAAC;AAwBpE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,gGAAgG;IAChG,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,uGAAuG;IACvG,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,uDAAuD;AACvD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,WAAW,EAAE,MAAM,EAAE,GACpB,eAAe,CA6DjB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
import { ELEMENT_TYPES, resolveKind } from './elementTypes.js';
|
|
8
|
+
import { deriveDetail, deriveDetails, isAutoLabel } from './details.js';
|
|
9
|
+
import { readGroupId } from './groups.js';
|
|
10
|
+
import { arr, num, str } from './xmlPrimitives.js';
|
|
11
|
+
/**
|
|
12
|
+
* Read a `<stages>` element's nested `<stageSteps>` into typed step rows. The
|
|
13
|
+
* `<stages>` tag is also used for non-canvas stage resources in classic flows;
|
|
14
|
+
* a stage element without `stageSteps` is filtered out by the caller.
|
|
15
|
+
*/
|
|
16
|
+
function readStageSteps(record) {
|
|
17
|
+
return arr(record.stageSteps)
|
|
18
|
+
.map((s) => s)
|
|
19
|
+
.filter((s) => str(s.name))
|
|
20
|
+
.map((s) => ({
|
|
21
|
+
name: str(s.name),
|
|
22
|
+
label: str(s.label) ?? str(s.name),
|
|
23
|
+
actionName: str(s.actionName),
|
|
24
|
+
actionType: str(s.actionType),
|
|
25
|
+
stepSubtype: str(s.stepSubtype),
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
/** First pass: one `FlowNode` per authored element. */
|
|
29
|
+
export function collectNodes(flow, reservedIds) {
|
|
30
|
+
const nodes = [];
|
|
31
|
+
const knownIds = new Set(reservedIds);
|
|
32
|
+
let sawCoordinates = false;
|
|
33
|
+
for (const { tag, kind, typeLabel, metaTypeLabel } of ELEMENT_TYPES) {
|
|
34
|
+
for (const el of arr(flow[tag])) {
|
|
35
|
+
if (!el || typeof el !== 'object') {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const record = el;
|
|
39
|
+
const id = str(record.name);
|
|
40
|
+
if (!id) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
// `<stages>` doubles as a canvas container (Flow Orchestrator, with nested
|
|
44
|
+
// `<stageSteps>`) and as a non-canvas stage resource on classic flows. Only
|
|
45
|
+
// the former belongs on the canvas — the resource-only variant is still
|
|
46
|
+
// surfaced in the Toolbox via `flow.stages` parsing. `<orchestratedStages>`
|
|
47
|
+
// is always a canvas container and also carries `<stageSteps>` (Approval /
|
|
48
|
+
// Managed Content orchestrators).
|
|
49
|
+
const stageSteps = tag === 'stages' || tag === 'orchestratedStages' ? readStageSteps(record) : undefined;
|
|
50
|
+
if (tag === 'stages' && (!stageSteps || stageSteps.length === 0)) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
knownIds.add(id);
|
|
54
|
+
const locationX = num(record.locationX);
|
|
55
|
+
const locationY = num(record.locationY);
|
|
56
|
+
if (locationX !== undefined && locationY !== undefined) {
|
|
57
|
+
sawCoordinates = true;
|
|
58
|
+
}
|
|
59
|
+
const label = str(record.label) ?? id;
|
|
60
|
+
// Some kinds subclassify off a discriminator field (actionType, etc.).
|
|
61
|
+
// Refine the base kind so the tile picks up its dedicated icon; the
|
|
62
|
+
// typeLabel stays the base so the legend still groups them together —
|
|
63
|
+
// except Prompt Flow's Add Prompt Instructions, which Flow Builder
|
|
64
|
+
// presents as its own element type (subtitle "Add Prompt Instructions"
|
|
65
|
+
// rather than "Assignment").
|
|
66
|
+
const refinedKind = resolveKind(kind, record);
|
|
67
|
+
const refinedTypeLabel = refinedKind === 'addPromptInstructions' ? 'Add Prompt Instructions' : typeLabel;
|
|
68
|
+
nodes.push({
|
|
69
|
+
id,
|
|
70
|
+
kind: refinedKind,
|
|
71
|
+
label,
|
|
72
|
+
typeLabel: refinedTypeLabel,
|
|
73
|
+
metaTypeLabel,
|
|
74
|
+
detail: deriveDetail(kind, record),
|
|
75
|
+
description: str(record.description),
|
|
76
|
+
details: deriveDetails(kind, record),
|
|
77
|
+
autoLabel: isAutoLabel(id, str(record.label)),
|
|
78
|
+
locationX,
|
|
79
|
+
locationY,
|
|
80
|
+
groupId: readGroupId(record),
|
|
81
|
+
steps: stageSteps,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return { nodes, knownIds, sawCoordinates };
|
|
86
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* Toolbox resource collection.
|
|
9
|
+
*
|
|
10
|
+
* Assembles the sidebar's "Resources" tree the way Flow Builder presents it:
|
|
11
|
+
* - `<variables>` are sub-categorized by data type (Apex / collection / record
|
|
12
|
+
* / primitive) rather than shown as one flat list.
|
|
13
|
+
* - constants / formulas / choices / textTemplates / stages map directly.
|
|
14
|
+
* - SYNTHESIZED resources with no standalone XML but visible in the Toolbox:
|
|
15
|
+
* each decision rule ("Decision Outcomes") and every element that stores
|
|
16
|
+
* its output automatically ("Outputs from X", "Y from Create Y").
|
|
17
|
+
*/
|
|
18
|
+
import type { FlowChoice, FlowConstant, FlowFormula, FlowNamedResource, FlowResource } from '../types/FlowData.js';
|
|
19
|
+
/** Build the Toolbox resource list — see file-level docstring. */
|
|
20
|
+
export declare function collectResources(flow: Record<string, unknown>, formulas: FlowFormula[], constants: FlowConstant[], choices: FlowChoice[], textTemplates: FlowNamedResource[], stages: FlowNamedResource[]): FlowResource[];
|
|
21
|
+
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/plugins/flow/parser/resources.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,YAAY,EAEb,MAAM,sBAAsB,CAAC;AA6B9B,kEAAkE;AAClE,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,QAAQ,EAAE,WAAW,EAAE,EACvB,SAAS,EAAE,YAAY,EAAE,EACzB,OAAO,EAAE,UAAU,EAAE,EACrB,aAAa,EAAE,iBAAiB,EAAE,EAClC,MAAM,EAAE,iBAAiB,EAAE,GAC1B,YAAY,EAAE,CAoHhB"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
import { arr, bool, str, unwrapRule } from './xmlPrimitives.js';
|
|
8
|
+
/**
|
|
9
|
+
* Emit one `recordOutput` resource per Create/Update-style element that keeps
|
|
10
|
+
* automatic outputs enabled. Called from `collectResources` for the specific
|
|
11
|
+
* tags (currently just `recordCreates`) that produce a single record variable.
|
|
12
|
+
*/
|
|
13
|
+
function autoStoresRecord(tag, flow, out) {
|
|
14
|
+
for (const raw of arr(flow[tag])) {
|
|
15
|
+
const el = raw;
|
|
16
|
+
const name = str(el.name);
|
|
17
|
+
if (!name) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (str(el.storeOutputAutomatically) === 'false') {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const label = str(el.label) ?? name;
|
|
24
|
+
const object = str(el.object) ?? 'Record';
|
|
25
|
+
out.push({
|
|
26
|
+
name: `${object} from ${label}`,
|
|
27
|
+
category: 'recordOutput',
|
|
28
|
+
dataType: object,
|
|
29
|
+
detail: `from ${label}`,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** Build the Toolbox resource list — see file-level docstring. */
|
|
34
|
+
export function collectResources(flow, formulas, constants, choices, textTemplates, stages) {
|
|
35
|
+
const out = [];
|
|
36
|
+
for (const raw of arr(flow.variables)) {
|
|
37
|
+
const v = raw;
|
|
38
|
+
const name = str(v.name);
|
|
39
|
+
if (!name) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const dataType = str(v.dataType) ?? 'String';
|
|
43
|
+
const isCollection = bool(v.isCollection);
|
|
44
|
+
const objectType = str(v.objectType); // set when the variable is an SObject
|
|
45
|
+
const ioHint = bool(v.isInput) && bool(v.isOutput)
|
|
46
|
+
? 'In/Out'
|
|
47
|
+
: bool(v.isInput)
|
|
48
|
+
? 'Input'
|
|
49
|
+
: bool(v.isOutput)
|
|
50
|
+
? 'Output'
|
|
51
|
+
: undefined;
|
|
52
|
+
let category;
|
|
53
|
+
let typeLabel = dataType;
|
|
54
|
+
if (dataType === 'Apex') {
|
|
55
|
+
category = 'apexVariable';
|
|
56
|
+
typeLabel = str(v.apexClass) ?? 'Apex';
|
|
57
|
+
}
|
|
58
|
+
else if (objectType || dataType === 'SObject') {
|
|
59
|
+
category = 'recordVariable';
|
|
60
|
+
typeLabel = objectType ?? 'SObject';
|
|
61
|
+
}
|
|
62
|
+
else if (isCollection) {
|
|
63
|
+
category = 'collectionVariable';
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
category = 'variable';
|
|
67
|
+
}
|
|
68
|
+
out.push({
|
|
69
|
+
name,
|
|
70
|
+
category,
|
|
71
|
+
dataType: `${typeLabel}${isCollection ? '[]' : ''}`,
|
|
72
|
+
detail: ioHint,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
for (const c of constants) {
|
|
76
|
+
out.push({ name: c.name, category: 'constant', dataType: c.dataType, detail: c.value });
|
|
77
|
+
}
|
|
78
|
+
for (const f of formulas) {
|
|
79
|
+
out.push({ name: f.name, category: 'formula', dataType: f.dataType, detail: f.expression });
|
|
80
|
+
}
|
|
81
|
+
for (const c of choices) {
|
|
82
|
+
out.push({
|
|
83
|
+
name: c.name,
|
|
84
|
+
category: 'choice',
|
|
85
|
+
dataType: c.dataType,
|
|
86
|
+
detail: c.kind === 'dynamic' ? 'Dynamic' : undefined,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
for (const t of textTemplates) {
|
|
90
|
+
out.push({ name: t.name, category: 'textTemplate', detail: t.detail });
|
|
91
|
+
}
|
|
92
|
+
for (const s of stages) {
|
|
93
|
+
out.push({ name: s.name, category: 'stage', detail: s.detail });
|
|
94
|
+
}
|
|
95
|
+
// Synthesized: automatic outputs from action/subflow + record elements.
|
|
96
|
+
const autoStores = (tag, makeName, category, objKey) => {
|
|
97
|
+
for (const raw of arr(flow[tag])) {
|
|
98
|
+
const el = raw;
|
|
99
|
+
const name = str(el.name);
|
|
100
|
+
if (!name) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
// Record lookups default to auto-store unless explicitly false; others
|
|
104
|
+
// require storeOutputAutomatically=true.
|
|
105
|
+
const auto = bool(el.storeOutputAutomatically) ||
|
|
106
|
+
(tag === 'recordLookups' && str(el.storeOutputAutomatically) !== 'false');
|
|
107
|
+
if (!auto) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const label = str(el.label) ?? name;
|
|
111
|
+
out.push({
|
|
112
|
+
name: makeName(label, name),
|
|
113
|
+
category,
|
|
114
|
+
dataType: objKey ? str(el[objKey]) : undefined,
|
|
115
|
+
detail: `from ${label}`,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
autoStores('actionCalls', (label) => `Outputs from ${label}`, 'actionOutput');
|
|
120
|
+
autoStores('subflows', (label) => `Outputs from ${label}`, 'actionOutput');
|
|
121
|
+
autoStores('recordLookups', (label) => label, 'recordOutput', 'object');
|
|
122
|
+
// Create/Update record elements expose a "{Object} from {Label}" record var.
|
|
123
|
+
autoStoresRecord('recordCreates', flow, out);
|
|
124
|
+
// Synthesized: each decision rule is a referenceable "Decision Outcome".
|
|
125
|
+
for (const raw of arr(flow.decisions)) {
|
|
126
|
+
const d = raw;
|
|
127
|
+
for (const ruleRaw of arr(d.rules)) {
|
|
128
|
+
const rule = unwrapRule(ruleRaw);
|
|
129
|
+
const name = str(rule.label) ?? str(rule.name);
|
|
130
|
+
if (name) {
|
|
131
|
+
out.push({
|
|
132
|
+
name,
|
|
133
|
+
category: 'decisionOutcome',
|
|
134
|
+
detail: `from ${str(d.label) ?? str(d.name)}`,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return out;
|
|
140
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* Parsing + presentation of the flow's Start element:
|
|
9
|
+
* - `readStartConfig` — raw trigger / schedule / entry-filter shape
|
|
10
|
+
* - `startDetails` — trigger-aware inspector groups
|
|
11
|
+
* - `readCanvasMode` — AUTO_LAYOUT vs FREE_FORM from `<processMetadataValues>`
|
|
12
|
+
* - `humanizeProcessType` — camel-case process-type → display label
|
|
13
|
+
*/
|
|
14
|
+
import type { FlowDetailGroup, FlowModel, FlowStartConfig } from '../types/FlowData.js';
|
|
15
|
+
/** Read a `CanvasMode` value from `<processMetadataValues>`. */
|
|
16
|
+
export declare function readCanvasMode(flow: Record<string, unknown>): FlowModel['canvasMode'];
|
|
17
|
+
/** Parse the Start element configuration (trigger, schedule, entry filters). */
|
|
18
|
+
export declare function readStartConfig(startEl: Record<string, unknown> | undefined): FlowStartConfig;
|
|
19
|
+
/**
|
|
20
|
+
* The Start element's configuration as inspector detail groups — so clicking
|
|
21
|
+
* the Start node opens the SAME element-details panel every other element uses
|
|
22
|
+
* (instead of a bespoke flow-level section). Sections are trigger-aware: a
|
|
23
|
+
* record-triggered flow shows its object + entry conditions, a scheduled flow
|
|
24
|
+
* its schedule, an autolaunched/screen flow just "Runs when launched".
|
|
25
|
+
*/
|
|
26
|
+
export declare function startDetails(processType: string | undefined, start: FlowStartConfig): FlowDetailGroup[];
|
|
27
|
+
/** "AutoLaunchedFlow" → "Autolaunched Flow", "Flow" → "Screen Flow", etc. */
|
|
28
|
+
export declare function humanizeProcessType(pt: string): string;
|
|
29
|
+
//# sourceMappingURL=startConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startConfig.d.ts","sourceRoot":"","sources":["../../../../src/plugins/flow/parser/startConfig.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,eAAe,EAEf,SAAS,EACT,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAI9B,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,CAWrF;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,eAAe,CAyB7F;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,KAAK,EAAE,eAAe,GACrB,eAAe,EAAE,CAkDnB;AAED,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAWtD"}
|