@salesforce/metadata-plugins 1.4.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 +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- 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/package.json +5 -5
|
@@ -0,0 +1,117 @@
|
|
|
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 { DETAIL_TITLES } from './flowLabels.js';
|
|
8
|
+
import { arr, formatValue, str } from './xmlPrimitives.js';
|
|
9
|
+
/** Read a `CanvasMode` value from `<processMetadataValues>`. */
|
|
10
|
+
export function readCanvasMode(flow) {
|
|
11
|
+
for (const pmv of arr(flow.processMetadataValues)) {
|
|
12
|
+
const rec = pmv;
|
|
13
|
+
if (str(rec.name) === 'CanvasMode') {
|
|
14
|
+
const val = formatValue(rec.value);
|
|
15
|
+
if (val === 'AUTO_LAYOUT_CANVAS' || val === 'FREE_FORM_CANVAS') {
|
|
16
|
+
return val;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
/** Parse the Start element configuration (trigger, schedule, entry filters). */
|
|
23
|
+
export function readStartConfig(startEl) {
|
|
24
|
+
if (!startEl) {
|
|
25
|
+
return { filters: [] };
|
|
26
|
+
}
|
|
27
|
+
const schedule = startEl.schedule;
|
|
28
|
+
return {
|
|
29
|
+
triggerType: str(startEl.triggerType),
|
|
30
|
+
object: str(startEl.object),
|
|
31
|
+
recordTriggerType: str(startEl.recordTriggerType),
|
|
32
|
+
schedule: schedule
|
|
33
|
+
? {
|
|
34
|
+
frequency: str(schedule.frequency),
|
|
35
|
+
startDate: str(schedule.startDate),
|
|
36
|
+
startTime: str(schedule.startTime),
|
|
37
|
+
}
|
|
38
|
+
: undefined,
|
|
39
|
+
filterLogic: str(startEl.filterLogic),
|
|
40
|
+
filters: arr(startEl.filters)
|
|
41
|
+
.map((c) => c)
|
|
42
|
+
.map((c) => ({
|
|
43
|
+
label: str(c.field) ?? '',
|
|
44
|
+
value: `${str(c.operator) ?? ''} ${formatValue(c.value) ?? ''}`.trim(),
|
|
45
|
+
}))
|
|
46
|
+
.filter((r) => r.label),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The Start element's configuration as inspector detail groups — so clicking
|
|
51
|
+
* the Start node opens the SAME element-details panel every other element uses
|
|
52
|
+
* (instead of a bespoke flow-level section). Sections are trigger-aware: a
|
|
53
|
+
* record-triggered flow shows its object + entry conditions, a scheduled flow
|
|
54
|
+
* its schedule, an autolaunched/screen flow just "Runs when launched".
|
|
55
|
+
*/
|
|
56
|
+
export function startDetails(processType, start) {
|
|
57
|
+
const groups = [];
|
|
58
|
+
const trigger = [];
|
|
59
|
+
if (processType) {
|
|
60
|
+
trigger.push({ label: 'Flow Type', value: humanizeProcessType(processType) });
|
|
61
|
+
}
|
|
62
|
+
if (start.triggerType) {
|
|
63
|
+
trigger.push({ label: 'Trigger', value: start.triggerType });
|
|
64
|
+
}
|
|
65
|
+
if (start.object) {
|
|
66
|
+
trigger.push({ label: 'Object', value: start.object });
|
|
67
|
+
}
|
|
68
|
+
if (start.recordTriggerType) {
|
|
69
|
+
trigger.push({ label: 'Triggered When', value: start.recordTriggerType });
|
|
70
|
+
}
|
|
71
|
+
if (start.schedule?.frequency) {
|
|
72
|
+
trigger.push({ label: 'Frequency', value: start.schedule.frequency });
|
|
73
|
+
}
|
|
74
|
+
if (start.schedule?.startDate) {
|
|
75
|
+
trigger.push({ label: 'Start Date', value: start.schedule.startDate });
|
|
76
|
+
}
|
|
77
|
+
if (start.schedule?.startTime) {
|
|
78
|
+
trigger.push({ label: 'Start Time', value: start.schedule.startTime });
|
|
79
|
+
}
|
|
80
|
+
if (trigger.length) {
|
|
81
|
+
groups.push({ title: DETAIL_TITLES.startConfiguration, rows: trigger });
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
// No trigger metadata (autolaunched / screen flow) — make that explicit.
|
|
85
|
+
groups.push({
|
|
86
|
+
title: DETAIL_TITLES.startConfiguration,
|
|
87
|
+
rows: processType ? [{ label: 'Flow Type', value: humanizeProcessType(processType) }] : [],
|
|
88
|
+
note: 'Runs when the flow is launched (no trigger).',
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// Entry conditions (record-triggered flows that filter which records run).
|
|
92
|
+
if (start.filters.length) {
|
|
93
|
+
groups.push({
|
|
94
|
+
title: DETAIL_TITLES.entryConditions,
|
|
95
|
+
rows: [
|
|
96
|
+
...(start.filterLogic
|
|
97
|
+
? [{ label: 'Condition Requirements', value: start.filterLogic }]
|
|
98
|
+
: []),
|
|
99
|
+
...start.filters,
|
|
100
|
+
],
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return groups;
|
|
104
|
+
}
|
|
105
|
+
/** "AutoLaunchedFlow" → "Autolaunched Flow", "Flow" → "Screen Flow", etc. */
|
|
106
|
+
export function humanizeProcessType(pt) {
|
|
107
|
+
const map = {
|
|
108
|
+
Flow: 'Screen Flow',
|
|
109
|
+
AutoLaunchedFlow: 'Autolaunched Flow',
|
|
110
|
+
Orchestrator: 'Orchestration',
|
|
111
|
+
};
|
|
112
|
+
if (map[pt]) {
|
|
113
|
+
return map[pt];
|
|
114
|
+
}
|
|
115
|
+
// Generic: split CamelCase into words.
|
|
116
|
+
return pt.replace(/([a-z])([A-Z])/g, '$1 $2');
|
|
117
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
* XML coercion helpers used across the flow parser.
|
|
9
|
+
*
|
|
10
|
+
* The XML parser we consume returns loose `unknown` shapes: attributes may be
|
|
11
|
+
* strings, numbers, booleans, or objects with a `#text` payload; repeated
|
|
12
|
+
* elements collapse to a single object when there is only one occurrence. These
|
|
13
|
+
* helpers normalize those shapes so downstream parser code can treat every
|
|
14
|
+
* value uniformly.
|
|
15
|
+
*/
|
|
16
|
+
import { SalesforceXMLParser } from '@salesforce/metadata-core-sdk';
|
|
17
|
+
/** A raw value pulled from the parsed XML tree. */
|
|
18
|
+
export type XmlValue = unknown;
|
|
19
|
+
/** Ensure repeated XML elements are always seen as an array. */
|
|
20
|
+
export declare const arr: typeof SalesforceXMLParser.arrayify;
|
|
21
|
+
/** Read an XML value as a trimmed non-empty string, or undefined. */
|
|
22
|
+
export declare function str(value: XmlValue): string | undefined;
|
|
23
|
+
/** Read an XML value as a finite number, or undefined. */
|
|
24
|
+
export declare function num(value: XmlValue): number | undefined;
|
|
25
|
+
/** Read an XML value as a boolean (case-insensitive "true"). */
|
|
26
|
+
export declare function bool(value: XmlValue): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Format a `{!ref}`-style reference or literal value for display. Handles the
|
|
29
|
+
* various `<*Value>` wrappers Flow XML uses for typed literals.
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatValue(value: XmlValue): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Normalizes a decision `<rules>` entry. Standard Salesforce metadata puts
|
|
34
|
+
* `connector`/`label`/`name` directly inside each repeated `<rules>` element,
|
|
35
|
+
* but some hand-authored / legacy files nest them under an extra `<rule>`
|
|
36
|
+
* wrapper. Descend through `.rule` when present so both shapes resolve.
|
|
37
|
+
*/
|
|
38
|
+
export declare function unwrapRule(rule: XmlValue): Record<string, unknown>;
|
|
39
|
+
/** Pulls `<connector><targetReference>` from any element-shaped object. */
|
|
40
|
+
export declare function connectorTarget(connector: XmlValue): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Detect `<isGoTo>true</isGoTo>` on a connector. Flow Builder marks a "Go To"
|
|
43
|
+
* connector this way when the source element jumps to an already-placed
|
|
44
|
+
* downstream element rather than nesting it as a fan-out child.
|
|
45
|
+
*/
|
|
46
|
+
export declare function connectorIsGoTo(connector: XmlValue): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Iterate a repeated XML container and produce a typed list. Skips entries
|
|
49
|
+
* that fail the `name` filter, so callers don't need to repeat the arrify +
|
|
50
|
+
* record-cast + name-filter dance for every resource kind.
|
|
51
|
+
*/
|
|
52
|
+
export declare function mapNamedList<T>(container: XmlValue, build: (record: Record<string, unknown>, name: string) => T): T[];
|
|
53
|
+
//# sourceMappingURL=xmlPrimitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xmlPrimitives.d.ts","sourceRoot":"","sources":["../../../../src/plugins/flow/parser/xmlPrimitives.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;GAQG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,mDAAmD;AACnD,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC;AAE/B,gEAAgE;AAChE,eAAO,MAAM,GAAG,qCAA+B,CAAC;AAuBhD,qEAAqE;AACrE,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAevD;AAED,0DAA0D;AAC1D,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAOvD;AAED,gEAAgE;AAChE,wBAAgB,IAAI,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAE7C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAyB/D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASlE;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,SAAS,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAKvE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,QAAQ,GAAG,OAAO,CAK5D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,SAAS,EAAE,QAAQ,EACnB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC,GAC1D,CAAC,EAAE,CAcL"}
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
* XML coercion helpers used across the flow parser.
|
|
9
|
+
*
|
|
10
|
+
* The XML parser we consume returns loose `unknown` shapes: attributes may be
|
|
11
|
+
* strings, numbers, booleans, or objects with a `#text` payload; repeated
|
|
12
|
+
* elements collapse to a single object when there is only one occurrence. These
|
|
13
|
+
* helpers normalize those shapes so downstream parser code can treat every
|
|
14
|
+
* value uniformly.
|
|
15
|
+
*/
|
|
16
|
+
import { SalesforceXMLParser } from '@salesforce/metadata-core-sdk';
|
|
17
|
+
/** Ensure repeated XML elements are always seen as an array. */
|
|
18
|
+
export const arr = SalesforceXMLParser.arrayify;
|
|
19
|
+
/**
|
|
20
|
+
* Decode the five predefined XML entities plus numeric character references.
|
|
21
|
+
* `SalesforceXMLParser` runs with `processEntities: false` for DoS safety, so
|
|
22
|
+
* strings arrive with `'`, `&`, etc. still encoded — we decode here so
|
|
23
|
+
* user-facing text renders as authored (e.g. `variant's` → `variant's`).
|
|
24
|
+
* `&` is decoded last to avoid double-decoding sequences like `&lt;`.
|
|
25
|
+
*/
|
|
26
|
+
function decodeXmlEntities(input) {
|
|
27
|
+
if (input.indexOf('&') === -1) {
|
|
28
|
+
return input;
|
|
29
|
+
}
|
|
30
|
+
return input
|
|
31
|
+
.replace(/'/g, "'")
|
|
32
|
+
.replace(/"/g, '"')
|
|
33
|
+
.replace(/</g, '<')
|
|
34
|
+
.replace(/>/g, '>')
|
|
35
|
+
.replace(/&#(\d+);/g, (_, dec) => String.fromCodePoint(Number(dec)))
|
|
36
|
+
.replace(/&#[xX]([0-9a-fA-F]+);/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16)))
|
|
37
|
+
.replace(/&/g, '&');
|
|
38
|
+
}
|
|
39
|
+
/** Read an XML value as a trimmed non-empty string, or undefined. */
|
|
40
|
+
export function str(value) {
|
|
41
|
+
if (value === undefined || value === null) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (typeof value === 'string') {
|
|
45
|
+
const trimmed = value.trim();
|
|
46
|
+
return trimmed ? decodeXmlEntities(trimmed) : undefined;
|
|
47
|
+
}
|
|
48
|
+
if (typeof value === 'number' || typeof value === 'boolean') {
|
|
49
|
+
return String(value);
|
|
50
|
+
}
|
|
51
|
+
if (typeof value === 'object' && '#text' in value) {
|
|
52
|
+
return str(value['#text']);
|
|
53
|
+
}
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
/** Read an XML value as a finite number, or undefined. */
|
|
57
|
+
export function num(value) {
|
|
58
|
+
const s = str(value);
|
|
59
|
+
if (s === undefined) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
const n = Number(s);
|
|
63
|
+
return Number.isFinite(n) ? n : undefined;
|
|
64
|
+
}
|
|
65
|
+
/** Read an XML value as a boolean (case-insensitive "true"). */
|
|
66
|
+
export function bool(value) {
|
|
67
|
+
return /^true$/i.test(str(value) ?? '');
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Format a `{!ref}`-style reference or literal value for display. Handles the
|
|
71
|
+
* various `<*Value>` wrappers Flow XML uses for typed literals.
|
|
72
|
+
*/
|
|
73
|
+
export function formatValue(value) {
|
|
74
|
+
if (value === undefined || value === null) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
if (typeof value === 'object') {
|
|
78
|
+
const v = value;
|
|
79
|
+
const ref = str(v.elementReference);
|
|
80
|
+
if (ref) {
|
|
81
|
+
return `{!${ref}}`;
|
|
82
|
+
}
|
|
83
|
+
for (const key of [
|
|
84
|
+
'stringValue',
|
|
85
|
+
'numberValue',
|
|
86
|
+
'booleanValue',
|
|
87
|
+
'dateValue',
|
|
88
|
+
'dateTimeValue',
|
|
89
|
+
]) {
|
|
90
|
+
const found = str(v[key]);
|
|
91
|
+
if (found !== undefined) {
|
|
92
|
+
return found;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
return str(value);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Normalizes a decision `<rules>` entry. Standard Salesforce metadata puts
|
|
101
|
+
* `connector`/`label`/`name` directly inside each repeated `<rules>` element,
|
|
102
|
+
* but some hand-authored / legacy files nest them under an extra `<rule>`
|
|
103
|
+
* wrapper. Descend through `.rule` when present so both shapes resolve.
|
|
104
|
+
*/
|
|
105
|
+
export function unwrapRule(rule) {
|
|
106
|
+
if (!rule || typeof rule !== 'object') {
|
|
107
|
+
return {};
|
|
108
|
+
}
|
|
109
|
+
const record = rule;
|
|
110
|
+
if (record.rule && typeof record.rule === 'object' && !Array.isArray(record.rule)) {
|
|
111
|
+
return record.rule;
|
|
112
|
+
}
|
|
113
|
+
return record;
|
|
114
|
+
}
|
|
115
|
+
/** Pulls `<connector><targetReference>` from any element-shaped object. */
|
|
116
|
+
export function connectorTarget(connector) {
|
|
117
|
+
if (!connector || typeof connector !== 'object') {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
return str(connector.targetReference);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Detect `<isGoTo>true</isGoTo>` on a connector. Flow Builder marks a "Go To"
|
|
124
|
+
* connector this way when the source element jumps to an already-placed
|
|
125
|
+
* downstream element rather than nesting it as a fan-out child.
|
|
126
|
+
*/
|
|
127
|
+
export function connectorIsGoTo(connector) {
|
|
128
|
+
if (!connector || typeof connector !== 'object') {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
return bool(connector.isGoTo);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Iterate a repeated XML container and produce a typed list. Skips entries
|
|
135
|
+
* that fail the `name` filter, so callers don't need to repeat the arrify +
|
|
136
|
+
* record-cast + name-filter dance for every resource kind.
|
|
137
|
+
*/
|
|
138
|
+
export function mapNamedList(container, build) {
|
|
139
|
+
const out = [];
|
|
140
|
+
for (const raw of arr(container)) {
|
|
141
|
+
if (!raw || typeof raw !== 'object') {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
const record = raw;
|
|
145
|
+
const name = str(record.name);
|
|
146
|
+
if (!name) {
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
out.push(build(record, name));
|
|
150
|
+
}
|
|
151
|
+
return out;
|
|
152
|
+
}
|
|
@@ -0,0 +1,294 @@
|
|
|
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
|
+
* Flow data types.
|
|
9
|
+
*
|
|
10
|
+
* Two families live here:
|
|
11
|
+
* - The **parser** types (`FlowModel`, `FlowNode`, `FlowEdge`, …) — the shape
|
|
12
|
+
* `FlowParser` produces from `.flow-meta.xml`. `FlowModel` is the plugin's
|
|
13
|
+
* `TData`.
|
|
14
|
+
* - The **view** types (`FlowModelView`, `FlowNodeView`, …) — the shape the
|
|
15
|
+
* renderer consumes. They mirror the parser types but relax several fields to
|
|
16
|
+
* optional so the renderer can also accept synthetic/derived models (e.g. the
|
|
17
|
+
* collapsed-group summary node uses the extra `'group'` kind).
|
|
18
|
+
*
|
|
19
|
+
* A single `FlowNodeKind` (which includes the renderer-only `'group'` value)
|
|
20
|
+
* serves both families.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Canonical node kinds for a Salesforce Flow, mirroring the element palette
|
|
24
|
+
* shown in Flow Builder. `start` and `end` are synthetic bookends the parser
|
|
25
|
+
* always injects so the graph reads top-to-bottom like the real canvas.
|
|
26
|
+
* `group` is a renderer-only synthetic kind: a collapsed 264 canvas group
|
|
27
|
+
* rendered as a single summary card.
|
|
28
|
+
*/
|
|
29
|
+
export type FlowNodeKind = 'start' | 'end' | 'screen' | 'action' | 'apexAction' | 'apexPluginCall' | 'emailAction' | 'externalCallout' | 'routeWork' | 'addScreenPop' | 'addSkillRequirement' | 'checkAvailability' | 'setScreenProperty' | 'assignment' | 'addPromptInstructions' | 'decision' | 'loop' | 'recordCreate' | 'recordLookup' | 'recordUpdate' | 'recordDelete' | 'recordRollback' | 'subflow' | 'wait' | 'collectionProcessor' | 'collectionSort' | 'transform' | 'customError' | 'stage' | 'interactiveStep' | 'managedContentStep'
|
|
30
|
+
/** Synthetic node: a collapsed 264 canvas group rendered as a summary card. */
|
|
31
|
+
| 'group';
|
|
32
|
+
/**
|
|
33
|
+
* A step inside a Flow Orchestrator stage (`<stageSteps>`). Rendered as a row
|
|
34
|
+
* on the stage container card. The `stepSubtype` drives the row icon (interactive
|
|
35
|
+
* vs background step) and the assignee/action-name context surfaces on hover.
|
|
36
|
+
*/
|
|
37
|
+
export interface FlowStageStep {
|
|
38
|
+
/** API name (`<name>`). */
|
|
39
|
+
name: string;
|
|
40
|
+
/** Display label; falls back to `name` when the XML label is absent. */
|
|
41
|
+
label: string;
|
|
42
|
+
/** Referenced action (`<actionName>`) — the automated call the step invokes. */
|
|
43
|
+
actionName?: string;
|
|
44
|
+
/** Raw `<actionType>` (e.g. `stepInteractive`, `stepBackground`). */
|
|
45
|
+
actionType?: string;
|
|
46
|
+
/** Raw `<stepSubtype>` (e.g. `interactiveStep`, `backgroundStep`) — drives the row icon. */
|
|
47
|
+
stepSubtype?: string;
|
|
48
|
+
}
|
|
49
|
+
/** One label/value pair inside a detail group (e.g. "Object" → "Account"). */
|
|
50
|
+
export interface FlowDetailRow {
|
|
51
|
+
label: string;
|
|
52
|
+
value: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A titled group of detail rows for an element (e.g. "Filters", "Assignments",
|
|
56
|
+
* "Input Parameters"). The renderer shows these behind progressive disclosure
|
|
57
|
+
* so the card stays compact but every configured detail is reachable. `note`
|
|
58
|
+
* carries a graceful fallback message for shapes we can't fully destructure
|
|
59
|
+
* (e.g. complex Transform mappings).
|
|
60
|
+
*/
|
|
61
|
+
export interface FlowDetailGroup {
|
|
62
|
+
title: string;
|
|
63
|
+
rows?: FlowDetailRow[];
|
|
64
|
+
note?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface FlowNode {
|
|
67
|
+
/** API name (`<name>`); synthetic nodes use `FLOW_START` / `FLOW_END`. */
|
|
68
|
+
id: string;
|
|
69
|
+
kind: FlowNodeKind;
|
|
70
|
+
/** Human label (`<label>`) falling back to the API name. */
|
|
71
|
+
label: string;
|
|
72
|
+
/** Short type word shown on the node chrome, e.g. "Get Records". */
|
|
73
|
+
typeLabel: string;
|
|
74
|
+
/**
|
|
75
|
+
* Raw-style metadata type word shown as the node subtitle in the designer
|
|
76
|
+
* view (e.g. "ActionCall", "RecordCreate", "Screen", "FlowStart").
|
|
77
|
+
*/
|
|
78
|
+
metaTypeLabel: string;
|
|
79
|
+
/** Optional one-line detail (object queried, subflow name, etc.). */
|
|
80
|
+
detail?: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Full, structured element configuration grouped for progressive disclosure.
|
|
84
|
+
* Empty for synthetic Start/End nodes.
|
|
85
|
+
*/
|
|
86
|
+
details: FlowDetailGroup[];
|
|
87
|
+
/**
|
|
88
|
+
* True when the element's label looks auto-generated (missing, equal to the
|
|
89
|
+
* API name, or the API name is just a humanized echo of the label).
|
|
90
|
+
*/
|
|
91
|
+
autoLabel: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Designer coordinates from the Flow XML (`<locationX>`/`<locationY>`), when
|
|
94
|
+
* present. Undefined for autolaunched flows authored without the free-form
|
|
95
|
+
* designer (the renderer falls back to auto layout).
|
|
96
|
+
*/
|
|
97
|
+
locationX?: number;
|
|
98
|
+
locationY?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Group this element belongs to (`<group>`/groupType, gated `ALC_GENERIC_GROUP`,
|
|
101
|
+
* GA 264). Undefined when the element is ungrouped. The exact metadata tag is
|
|
102
|
+
* still in flux upstream, so the parser reads it defensively.
|
|
103
|
+
*/
|
|
104
|
+
groupId?: string;
|
|
105
|
+
/**
|
|
106
|
+
* For Flow Orchestrator stage nodes (`kind: 'stage'`): the ordered list of
|
|
107
|
+
* steps this stage contains. Populated only when the source `<stages>` element
|
|
108
|
+
* carried `<stageSteps>` children — plain orchestrator stages authored as
|
|
109
|
+
* resources have no steps and remain absent from the canvas.
|
|
110
|
+
*/
|
|
111
|
+
steps?: FlowStageStep[];
|
|
112
|
+
}
|
|
113
|
+
export interface FlowEdge {
|
|
114
|
+
from: string;
|
|
115
|
+
to: string;
|
|
116
|
+
/** Branch label — decision outcome name, loop branch, fault path, etc. */
|
|
117
|
+
label?: string;
|
|
118
|
+
/** True for the decision default outcome / loop "after last" branch. */
|
|
119
|
+
isDefault?: boolean;
|
|
120
|
+
/** True for fault connectors (`<faultConnector>`). */
|
|
121
|
+
isFault?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Flow Builder's Auto-Layout Canvas "Go To" reference: a connector whose
|
|
124
|
+
* `<isGoTo>` is `true` jumps to an already-placed element instead of pulling
|
|
125
|
+
* it into this branch's subtree. The renderer draws it as an inline
|
|
126
|
+
* `→ Target` text arrow at the source's exit slot, and layout excludes it
|
|
127
|
+
* from parent selection so the target stays where its structural parent
|
|
128
|
+
* placed it.
|
|
129
|
+
*/
|
|
130
|
+
isGoTo?: boolean;
|
|
131
|
+
}
|
|
132
|
+
export interface FlowVariable {
|
|
133
|
+
name: string;
|
|
134
|
+
dataType: string;
|
|
135
|
+
isCollection: boolean;
|
|
136
|
+
isInput: boolean;
|
|
137
|
+
isOutput: boolean;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Flow Builder's Toolbox groups resources into categories that don't map 1:1
|
|
141
|
+
* to XML tags — variables are sub-grouped by their datatype shape, and some
|
|
142
|
+
* entries (automatic element outputs, decision outcomes) are *synthesized* from
|
|
143
|
+
* other elements rather than declared as standalone resources. We mirror that
|
|
144
|
+
* taxonomy so the panel can reproduce the Toolbox.
|
|
145
|
+
*/
|
|
146
|
+
export type FlowResourceCategory = 'apexVariable' | 'collectionVariable' | 'recordVariable' | 'variable' | 'constant' | 'formula' | 'choice' | 'textTemplate' | 'stage' | 'actionOutput' | 'recordOutput' | 'decisionOutcome';
|
|
147
|
+
export interface FlowResource {
|
|
148
|
+
name: string;
|
|
149
|
+
category: FlowResourceCategory;
|
|
150
|
+
/** Type/shape hint (e.g. "Text", "Account", apex class name). */
|
|
151
|
+
dataType?: string;
|
|
152
|
+
/** Secondary line (e.g. "from Create Contact", "Boolean"). */
|
|
153
|
+
detail?: string;
|
|
154
|
+
}
|
|
155
|
+
/** A `<formulas>` resource — surfaced in the designer's Resources/Formulas list. */
|
|
156
|
+
export interface FlowFormula {
|
|
157
|
+
name: string;
|
|
158
|
+
dataType?: string;
|
|
159
|
+
expression?: string;
|
|
160
|
+
}
|
|
161
|
+
/** A `<constants>` resource. */
|
|
162
|
+
export interface FlowConstant {
|
|
163
|
+
name: string;
|
|
164
|
+
dataType?: string;
|
|
165
|
+
value?: string;
|
|
166
|
+
}
|
|
167
|
+
/** A `<choices>` / `<dynamicChoiceSets>` resource (screen picklist sources). */
|
|
168
|
+
export interface FlowChoice {
|
|
169
|
+
name: string;
|
|
170
|
+
dataType?: string;
|
|
171
|
+
/** 'choice' for static `<choices>`, 'dynamic' for record-backed sets. */
|
|
172
|
+
kind: 'choice' | 'dynamic';
|
|
173
|
+
}
|
|
174
|
+
/** A `<textTemplates>` / `<stages>` resource, kept generic for the panel. */
|
|
175
|
+
export interface FlowNamedResource {
|
|
176
|
+
name: string;
|
|
177
|
+
detail?: string;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The flow's Start element configuration. Flow Builder shows this on-canvas.
|
|
181
|
+
* `triggerType`/`object`/`recordTriggerType` are only set for record/schedule-
|
|
182
|
+
* triggered flows.
|
|
183
|
+
*/
|
|
184
|
+
export interface FlowStartConfig {
|
|
185
|
+
triggerType?: string;
|
|
186
|
+
object?: string;
|
|
187
|
+
recordTriggerType?: string;
|
|
188
|
+
schedule?: {
|
|
189
|
+
frequency?: string;
|
|
190
|
+
startDate?: string;
|
|
191
|
+
startTime?: string;
|
|
192
|
+
};
|
|
193
|
+
filterLogic?: string;
|
|
194
|
+
filters: FlowDetailRow[];
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* A canvas group (`ALC_GENERIC_GROUP`, GA 264). `memberIds` lists the elements
|
|
198
|
+
* it contains so the renderer can draw the stacked container + summary count.
|
|
199
|
+
*/
|
|
200
|
+
export interface FlowGroup {
|
|
201
|
+
id: string;
|
|
202
|
+
label: string;
|
|
203
|
+
groupType?: string;
|
|
204
|
+
memberIds: string[];
|
|
205
|
+
}
|
|
206
|
+
export interface FlowModel {
|
|
207
|
+
flowName: string;
|
|
208
|
+
label: string;
|
|
209
|
+
processType?: string;
|
|
210
|
+
status?: string;
|
|
211
|
+
description?: string;
|
|
212
|
+
apiVersion?: string;
|
|
213
|
+
/** `<interviewLabel>` — shown in the designer's Flow Properties panel. */
|
|
214
|
+
interviewLabel?: string;
|
|
215
|
+
/**
|
|
216
|
+
* `CanvasMode` from `<processMetadataValues>` — `AUTO_LAYOUT_CANVAS` or
|
|
217
|
+
* `FREE_FORM_CANVAS`.
|
|
218
|
+
*/
|
|
219
|
+
canvasMode?: 'AUTO_LAYOUT_CANVAS' | 'FREE_FORM_CANVAS';
|
|
220
|
+
start: FlowStartConfig;
|
|
221
|
+
nodes: FlowNode[];
|
|
222
|
+
edges: FlowEdge[];
|
|
223
|
+
variables: FlowVariable[];
|
|
224
|
+
formulas: FlowFormula[];
|
|
225
|
+
constants: FlowConstant[];
|
|
226
|
+
choices: FlowChoice[];
|
|
227
|
+
textTemplates: FlowNamedResource[];
|
|
228
|
+
stages: FlowNamedResource[];
|
|
229
|
+
/**
|
|
230
|
+
* The full Toolbox resource list, categorized the way Flow Builder presents
|
|
231
|
+
* it — including synthesized entries (element auto-outputs, decision
|
|
232
|
+
* outcomes) that aren't standalone XML resources.
|
|
233
|
+
*/
|
|
234
|
+
resources: FlowResource[];
|
|
235
|
+
groups: FlowGroup[];
|
|
236
|
+
/**
|
|
237
|
+
* True when at least one element carried `<locationX>`/`<locationY>` coords,
|
|
238
|
+
* meaning the flow can be drawn in its authored ("Original") layout.
|
|
239
|
+
*/
|
|
240
|
+
hasDesignerCoordinates: boolean;
|
|
241
|
+
sourcePath: string;
|
|
242
|
+
metadata: {
|
|
243
|
+
nodeCount: number;
|
|
244
|
+
edgeCount: number;
|
|
245
|
+
decisionCount: number;
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* View types mirror the parser types with two exceptions:
|
|
250
|
+
* - `FlowNodeView` carries an extra `groupConnections` field populated when
|
|
251
|
+
* the collapse transform synthesizes a `kind: 'group'` summary node.
|
|
252
|
+
* - `FlowEdgeView` carries `isFaultStub` set by the collapse transform when a
|
|
253
|
+
* fault path is collapsed.
|
|
254
|
+
*
|
|
255
|
+
* The remaining view types are structurally identical to their parser twins;
|
|
256
|
+
* they are aliased so downstream code can keep its historical import names
|
|
257
|
+
* without maintaining two parallel families that drift.
|
|
258
|
+
*/
|
|
259
|
+
export type FlowDetailRowView = FlowDetailRow;
|
|
260
|
+
export type FlowDetailGroupView = FlowDetailGroup;
|
|
261
|
+
export type FlowVariableView = FlowVariable;
|
|
262
|
+
export type FlowFormulaView = FlowFormula;
|
|
263
|
+
export type FlowConstantView = FlowConstant;
|
|
264
|
+
export type FlowChoiceView = FlowChoice;
|
|
265
|
+
export type FlowNamedResourceView = FlowNamedResource;
|
|
266
|
+
export type FlowStartConfigView = FlowStartConfig;
|
|
267
|
+
export type FlowGroupView = FlowGroup;
|
|
268
|
+
export type FlowResourceCategoryView = FlowResourceCategory;
|
|
269
|
+
export type FlowResourceView = FlowResource;
|
|
270
|
+
export type FlowNodeView = FlowNode & {
|
|
271
|
+
/**
|
|
272
|
+
* For a synthetic collapsed-group summary node (`kind: 'group'`): how many
|
|
273
|
+
* connections cross the group boundary. Drives the "N incoming, M outgoing
|
|
274
|
+
* connections" line on the collapsed container. Never set on real elements.
|
|
275
|
+
*/
|
|
276
|
+
groupConnections?: {
|
|
277
|
+
incoming: number;
|
|
278
|
+
outgoing: number;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
export type FlowEdgeView = FlowEdge & {
|
|
282
|
+
/**
|
|
283
|
+
* View-only flag set by the collapse transform when a fault path is collapsed:
|
|
284
|
+
* the fault edge is retained (so its "Fault" badge stays on the canvas as a
|
|
285
|
+
* short dashed stub off the source), but its target and downstream subtree are
|
|
286
|
+
* hidden. Never emitted by the parser — purely a render marker.
|
|
287
|
+
*/
|
|
288
|
+
isFaultStub?: boolean;
|
|
289
|
+
};
|
|
290
|
+
export type FlowModelView = Omit<FlowModel, 'nodes' | 'edges'> & {
|
|
291
|
+
nodes: FlowNodeView[];
|
|
292
|
+
edges: FlowEdgeView[];
|
|
293
|
+
};
|
|
294
|
+
//# sourceMappingURL=FlowData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowData.d.ts","sourceRoot":"","sources":["../../../../src/plugins/flow/types/FlowData.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;;;;;GAcG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,iBAAiB,GACjB,WAAW,GACX,cAAc,GACd,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,YAAY,GACZ,uBAAuB,GACvB,UAAU,GACV,MAAM,GACN,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,SAAS,GACT,MAAM,GACN,qBAAqB,GACrB,gBAAgB,GAChB,WAAW,GACX,aAAa,GACb,OAAO,GACP,iBAAiB,GACjB,oBAAoB;AACtB,+EAA+E;GAC7E,OAAO,CAAC;AAIZ;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,8EAA8E;A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px solid var(--mv-panel-border);display:flex;align-items:center;gap:var(--mv-spacing-xs)}.mv-zoom-bar__btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;border-radius:var(--mv-radius-md);background:transparent;color:var(--mv-text-secondary);cursor:pointer;padding:0;transition:background var(--mv-transition-fast),color var(--mv-transition-fast)}.mv-zoom-bar__btn:hover{background:var(--mv-bg-surface-hover);color:var(--mv-text-primary)}.mv-zoom-bar__btn--active{background:var(--mv-bg-surface-hover);color:var(--mv-interactive-primary)}.mv-zoom-bar__btn--disabled{opacity:.4;cursor:not-allowed}.mv-zoom-bar__level{font-size:var(--mv-font-size-sm);font-weight:var(--mv-font-weight-medium);color:var(--mv-text-primary);min-width:40px;text-align:center;-webkit-user-select:none;user-select:none}.mv-zoom-bar__divider{width:1px;height:20px;background:var(--mv-separator);margin:0 var(--mv-spacing-xs)}.mv-legend-panel{position:absolute;bottom:100%;right:0;margin-bottom:var(--mv-spacing-xs);width:200px;background:var(--mv-panel-bg);border:1px solid var(--mv-panel-border);border-radius:var(--mv-radius-lg);box-shadow:var(--mv-shadow-lg);z-index:100;overflow:hidden}.mv-legend-panel__header{padding:var(--mv-spacing-sm) var(--mv-spacing-md);font-size:var(--mv-font-size-xs);font-weight:var(--mv-font-weight-semibold);color:var(--mv-text-secondary);letter-spacing:.5px;text-transform:uppercase;border-bottom:1px solid var(--mv-separator)}.mv-legend-panel__body{padding:var(--mv-spacing-sm) 0}.mv-legend-panel__item{display:flex;align-items:center;gap:var(--mv-spacing-md);padding:var(--mv-spacing-sm) var(--mv-spacing-md);font-size:var(--mv-font-size-sm);color:var(--mv-text-primary)}.mv-legend-panel__icon{display:flex;align-items:center;justify-content:center;width:28px;flex-shrink:0}html,body,#root{height:100%;margin:0;padding:0;overflow:hidden}.flow-legend-wrap{position:absolute;right:16px;bottom:68px;width:220px;z-index:6;pointer-events:none}.flow-legend-wrap .mv-legend-panel{position:relative;bottom:auto;right:auto;width:100%;pointer-events:auto}
|