@esfaenza/flow-builder 20.0.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 +354 -0
- package/fesm2022/esfaenza-flow-builder.mjs +7270 -0
- package/fesm2022/esfaenza-flow-builder.mjs.map +1 -0
- package/index.d.ts +2666 -0
- package/package.json +26 -0
- package/styles/flow-builder.css +483 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,2666 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, AfterViewChecked } from '@angular/core';
|
|
3
|
+
import * as _esfaenza_flow_builder from '@esfaenza/flow-builder';
|
|
4
|
+
import { EFMarkerType, EFConnectableSide } from '@foblex/flow';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Modello del documento Flow — FRONTEND.md §3, §4, §5.
|
|
8
|
+
*
|
|
9
|
+
* Regole del contratto rispettate qui:
|
|
10
|
+
* - camelCase su ogni proprieta';
|
|
11
|
+
* - ogni campo e' opzionale (una definizione incompleta e' salvabile);
|
|
12
|
+
* - nessun `$type`: il tipo di un node e' la collection in cui sta (§3.1);
|
|
13
|
+
* - gli enum sono stringhe, ma i tipi sono aperti (`| string`) perche' gli elenchi
|
|
14
|
+
* autoritativi arrivano da `GET /flows/dictionaries` e possono crescere (§13.11).
|
|
15
|
+
*/
|
|
16
|
+
/** §4.2 — i sette tipi del sistema. Aperto: il dizionario `dataTypes` e' autoritativo. */
|
|
17
|
+
type FlowDataType = 'String' | 'Integer' | 'Number' | 'Date' | 'Boolean' | 'Enum' | 'Object' | string;
|
|
18
|
+
type FlowProcessType = 'Screen' | 'AutoLaunched' | 'Evaluation' | 'Orchestration' | string;
|
|
19
|
+
type FlowVersionStatus = 'Draft' | 'InvalidDraft' | 'UnderReview' | 'Active' | 'Obsolete' | string;
|
|
20
|
+
type FlowTriggerType = 'None' | 'RecordBeforeSave' | 'RecordAfterSave' | 'RecordBeforeDelete' | 'Scheduled' | 'Event' | string;
|
|
21
|
+
type FlowRecordTriggerType = 'Create' | 'Update' | 'CreateAndUpdate' | 'Delete' | string;
|
|
22
|
+
type FlowSortOrder = 'Asc' | 'Desc' | string;
|
|
23
|
+
type FlowOffsetUnit = 'Minutes' | 'Hours' | 'Days' | 'Months' | string;
|
|
24
|
+
type FlowCollectionProcessorType = 'Sort' | 'Filter' | string;
|
|
25
|
+
type FlowTransformType = 'Map' | 'Sum' | 'Count' | string;
|
|
26
|
+
type FlowTransactionModel = 'Automatic' | 'CurrentTransaction' | 'NewTransaction' | string;
|
|
27
|
+
/**
|
|
28
|
+
* §4.2 — un riferimento **oppure** un valore letterale.
|
|
29
|
+
* Va valorizzato **uno e un solo** campo; `formulaExpression` e' l'unica eccezione
|
|
30
|
+
* (espressione + tipo atteso). Piu' campi insieme = `VALUE_AMBIGUOUS`.
|
|
31
|
+
*/
|
|
32
|
+
interface FlowValue {
|
|
33
|
+
elementReference?: string;
|
|
34
|
+
stringValue?: string;
|
|
35
|
+
integerValue?: number;
|
|
36
|
+
numberValue?: number;
|
|
37
|
+
/** Formato roundtrip senza fuso: `2026-08-15T00:00:00` (§2, §4.2). */
|
|
38
|
+
dateValue?: string;
|
|
39
|
+
booleanValue?: boolean;
|
|
40
|
+
enumValue?: string;
|
|
41
|
+
formulaExpression?: string;
|
|
42
|
+
formulaDataType?: FlowDataType;
|
|
43
|
+
}
|
|
44
|
+
/** §3.5 — un connector e' sempre la stessa forma; cambia solo il campo in cui vive. */
|
|
45
|
+
interface FlowConnector {
|
|
46
|
+
targetReference?: string;
|
|
47
|
+
/** Solo suggerimento di disegno: la semantica di esecuzione e' identica (§3.5). */
|
|
48
|
+
isGoTo?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/** §4.3 — condizione su risorse. Per gli operatori unari `rightValue` e' l'esito atteso. */
|
|
51
|
+
interface FlowCondition {
|
|
52
|
+
leftValueReference?: string;
|
|
53
|
+
operator?: FlowComparisonOperator;
|
|
54
|
+
rightValue?: FlowValue;
|
|
55
|
+
}
|
|
56
|
+
type FlowComparisonOperator = 'EqualTo' | 'NotEqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo' | 'LessThan' | 'LessThanOrEqualTo' | 'Contains' | 'StartsWith' | 'EndsWith' | 'In' | 'NotIn' | 'IsNull' | 'IsBlank' | 'IsEmpty' | 'IsChanged' | 'WasSet' | 'WasVisited' | 'HasError' | 'None' | string;
|
|
57
|
+
/** §4.4 — filtro su campi di un'entita': struttura **diversa** dalle condizioni. */
|
|
58
|
+
interface FlowRecordFilter {
|
|
59
|
+
field?: string;
|
|
60
|
+
operator?: FlowRecordFilterOperator;
|
|
61
|
+
value?: FlowValue;
|
|
62
|
+
}
|
|
63
|
+
type FlowRecordFilterOperator = 'EqualTo' | 'NotEqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo' | 'LessThan' | 'LessThanOrEqualTo' | 'StartsWith' | 'EndsWith' | 'Contains' | 'IsNull' | string;
|
|
64
|
+
/** §4.3 — `and` | `or` | espressione sugli indici 1-based | `Formula`. */
|
|
65
|
+
type FlowConditionLogic = 'and' | 'or' | 'Formula' | string;
|
|
66
|
+
/** Blocco condizioni riusato da Decision rule, Wait event, Collection Processor, Start. */
|
|
67
|
+
interface FlowConditionHolder {
|
|
68
|
+
conditionLogic?: FlowConditionLogic;
|
|
69
|
+
conditions?: FlowCondition[];
|
|
70
|
+
/** Usato quando `conditionLogic === 'Formula'`; in quel caso `conditions` e' ignorato. */
|
|
71
|
+
formula?: string;
|
|
72
|
+
}
|
|
73
|
+
/** Parametro di input verso form / action / script / wait event. */
|
|
74
|
+
interface FlowInputParameter {
|
|
75
|
+
name?: string;
|
|
76
|
+
value?: FlowValue;
|
|
77
|
+
}
|
|
78
|
+
/** Parametro di output: `assignToReference` deve essere una destinazione scrivibile (§4.6). */
|
|
79
|
+
interface FlowOutputParameter {
|
|
80
|
+
name?: string;
|
|
81
|
+
assignToReference?: string;
|
|
82
|
+
}
|
|
83
|
+
/** Campo di un record → valore (Create/Update). */
|
|
84
|
+
interface FlowInputFieldAssignment {
|
|
85
|
+
field?: string;
|
|
86
|
+
value?: FlowValue;
|
|
87
|
+
}
|
|
88
|
+
/** Campo di un record → variabile (Get Records con output esplicito). */
|
|
89
|
+
interface FlowOutputFieldAssignment {
|
|
90
|
+
field?: string;
|
|
91
|
+
assignToReference?: string;
|
|
92
|
+
}
|
|
93
|
+
interface FlowVariable {
|
|
94
|
+
name?: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
dataType?: FlowDataType;
|
|
97
|
+
/** Obbligatorio per `Object` ed `Enum`: nome dell'entita' o del tipo di enum. */
|
|
98
|
+
objectType?: string;
|
|
99
|
+
isCollection?: boolean;
|
|
100
|
+
isInput?: boolean;
|
|
101
|
+
isOutput?: boolean;
|
|
102
|
+
/** Solo per `Number` e `Integer`; altrove e' `SCALE_NOT_APPLICABLE`. */
|
|
103
|
+
scale?: number;
|
|
104
|
+
value?: FlowValue;
|
|
105
|
+
}
|
|
106
|
+
interface FlowConstant {
|
|
107
|
+
name?: string;
|
|
108
|
+
description?: string;
|
|
109
|
+
dataType?: FlowDataType;
|
|
110
|
+
/** Non puo' referenziare altre risorse: `CONSTANT_REFERENCES_RESOURCE`. */
|
|
111
|
+
value?: FlowValue;
|
|
112
|
+
}
|
|
113
|
+
interface FlowFormula {
|
|
114
|
+
name?: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
dataType?: FlowDataType;
|
|
117
|
+
scale?: number;
|
|
118
|
+
/** Passata verbatim al motore di regole: il backend non la valida (§4.6). */
|
|
119
|
+
expression?: string;
|
|
120
|
+
}
|
|
121
|
+
interface FlowTextTemplate {
|
|
122
|
+
name?: string;
|
|
123
|
+
description?: string;
|
|
124
|
+
text?: string;
|
|
125
|
+
isViewedAsPlainText?: boolean;
|
|
126
|
+
}
|
|
127
|
+
interface FlowChoice {
|
|
128
|
+
name?: string;
|
|
129
|
+
description?: string;
|
|
130
|
+
dataType?: FlowDataType;
|
|
131
|
+
choiceText?: string;
|
|
132
|
+
value?: FlowValue;
|
|
133
|
+
}
|
|
134
|
+
interface FlowDynamicChoiceSet {
|
|
135
|
+
name?: string;
|
|
136
|
+
description?: string;
|
|
137
|
+
dataType?: FlowDataType;
|
|
138
|
+
object?: string;
|
|
139
|
+
displayField?: string;
|
|
140
|
+
valueField?: string;
|
|
141
|
+
sortField?: string;
|
|
142
|
+
sortOrder?: FlowSortOrder;
|
|
143
|
+
limit?: number;
|
|
144
|
+
/** Sempre in AND: nessun `filterLogic` qui (§4.4). */
|
|
145
|
+
filters?: FlowRecordFilter[];
|
|
146
|
+
}
|
|
147
|
+
interface FlowStage {
|
|
148
|
+
name?: string;
|
|
149
|
+
label?: string;
|
|
150
|
+
description?: string;
|
|
151
|
+
/** Devono essere distinti: `STAGE_ORDER_DUPLICATED`. */
|
|
152
|
+
stageOrder?: number;
|
|
153
|
+
isActive?: boolean;
|
|
154
|
+
}
|
|
155
|
+
/** Campi comuni a ogni node. `locationX`/`locationY` sono l'unico layout persistito (§3.5). */
|
|
156
|
+
interface FlowNodeBase {
|
|
157
|
+
name?: string;
|
|
158
|
+
label?: string;
|
|
159
|
+
description?: string;
|
|
160
|
+
locationX?: number;
|
|
161
|
+
locationY?: number;
|
|
162
|
+
}
|
|
163
|
+
/** §5.1 — lo screen dichiara *quale* form mostrare, non i suoi campi. */
|
|
164
|
+
interface FlowScreen extends FlowNodeBase {
|
|
165
|
+
formName?: string;
|
|
166
|
+
helpText?: string;
|
|
167
|
+
allowBack?: boolean;
|
|
168
|
+
allowFinish?: boolean;
|
|
169
|
+
allowPause?: boolean;
|
|
170
|
+
pausedText?: string;
|
|
171
|
+
inputParameters?: FlowInputParameter[];
|
|
172
|
+
outputParameters?: FlowOutputParameter[];
|
|
173
|
+
connector?: FlowConnector;
|
|
174
|
+
}
|
|
175
|
+
type FlowAssignmentOperator = 'Assign' | 'Add' | 'Subtract' | 'AddAtStart' | 'AssignCount' | 'RemoveFirst' | 'RemoveAll' | 'RemovePosition' | 'RemoveAfterFirst' | 'RemoveBeforeFirst' | 'RemoveUncommon' | string;
|
|
176
|
+
interface FlowAssignmentItem {
|
|
177
|
+
assignToReference?: string;
|
|
178
|
+
operator?: FlowAssignmentOperator;
|
|
179
|
+
value?: FlowValue;
|
|
180
|
+
}
|
|
181
|
+
/** §5.2 — le operazioni sono eseguite nell'ordine dichiarato. */
|
|
182
|
+
interface FlowAssignment extends FlowNodeBase {
|
|
183
|
+
assignmentItems?: FlowAssignmentItem[];
|
|
184
|
+
connector?: FlowConnector;
|
|
185
|
+
}
|
|
186
|
+
/** §5.3 — una regola per ramo; l'ordine e' semantico. */
|
|
187
|
+
interface FlowDecisionRule extends FlowConditionHolder {
|
|
188
|
+
name?: string;
|
|
189
|
+
label?: string;
|
|
190
|
+
description?: string;
|
|
191
|
+
connector?: FlowConnector;
|
|
192
|
+
}
|
|
193
|
+
interface FlowDecision extends FlowNodeBase {
|
|
194
|
+
rules?: FlowDecisionRule[];
|
|
195
|
+
defaultConnector?: FlowConnector;
|
|
196
|
+
defaultConnectorLabel?: string;
|
|
197
|
+
}
|
|
198
|
+
/** §5.4 */
|
|
199
|
+
interface FlowLoop extends FlowNodeBase {
|
|
200
|
+
collectionReference?: string;
|
|
201
|
+
assignNextValueToReference?: string;
|
|
202
|
+
iterationOrder?: FlowSortOrder;
|
|
203
|
+
nextValueConnector?: FlowConnector;
|
|
204
|
+
noMoreValuesConnector?: FlowConnector;
|
|
205
|
+
}
|
|
206
|
+
interface FlowSortOption {
|
|
207
|
+
sortField?: string;
|
|
208
|
+
sortOrder?: FlowSortOrder;
|
|
209
|
+
doesPutEmptyStringAndNullFirst?: boolean;
|
|
210
|
+
}
|
|
211
|
+
/** §5.5 — `assignNextValueToReference` e' l'elemento in esame, non la destinazione. */
|
|
212
|
+
interface FlowCollectionProcessor extends FlowNodeBase, FlowConditionHolder {
|
|
213
|
+
collectionProcessorType?: FlowCollectionProcessorType;
|
|
214
|
+
collectionReference?: string;
|
|
215
|
+
assignNextValueToReference?: string;
|
|
216
|
+
limit?: number;
|
|
217
|
+
sortOptions?: FlowSortOption[];
|
|
218
|
+
connector?: FlowConnector;
|
|
219
|
+
}
|
|
220
|
+
/** §5.6 */
|
|
221
|
+
interface FlowRecordLookup extends FlowNodeBase {
|
|
222
|
+
object?: string;
|
|
223
|
+
filterLogic?: FlowConditionLogic;
|
|
224
|
+
filters?: FlowRecordFilter[];
|
|
225
|
+
filterFormula?: string;
|
|
226
|
+
sortField?: string;
|
|
227
|
+
sortOrder?: FlowSortOrder;
|
|
228
|
+
getFirstRecordOnly?: boolean;
|
|
229
|
+
queriedFields?: string[];
|
|
230
|
+
limit?: number;
|
|
231
|
+
/** Alternativo a `outputReference`/`outputAssignments`: `OUTPUT_CONFIGURATION_CONFLICT`. */
|
|
232
|
+
storeOutputAutomatically?: boolean;
|
|
233
|
+
outputReference?: string;
|
|
234
|
+
outputAssignments?: FlowOutputFieldAssignment[];
|
|
235
|
+
/** Modellato ma non tradotto in query (§5.6). */
|
|
236
|
+
relatedRecords?: unknown[];
|
|
237
|
+
connector?: FlowConnector;
|
|
238
|
+
faultConnector?: FlowConnector;
|
|
239
|
+
}
|
|
240
|
+
/** §5.7 */
|
|
241
|
+
interface FlowRecordCreate extends FlowNodeBase {
|
|
242
|
+
object?: string;
|
|
243
|
+
inputReference?: string;
|
|
244
|
+
inputAssignments?: FlowInputFieldAssignment[];
|
|
245
|
+
filterLogic?: FlowConditionLogic;
|
|
246
|
+
filters?: FlowRecordFilter[];
|
|
247
|
+
doesUpsert?: boolean;
|
|
248
|
+
upsertExternalIdField?: string;
|
|
249
|
+
upsertStandardIdField?: string;
|
|
250
|
+
storeOutputAutomatically?: boolean;
|
|
251
|
+
assignRecordIdToReference?: string;
|
|
252
|
+
connector?: FlowConnector;
|
|
253
|
+
faultConnector?: FlowConnector;
|
|
254
|
+
}
|
|
255
|
+
interface FlowRecordUpdate extends FlowNodeBase {
|
|
256
|
+
object?: string;
|
|
257
|
+
inputReference?: string;
|
|
258
|
+
/** Nessun `filterLogic` qui: i filtri sono sempre in AND (§4.4). */
|
|
259
|
+
filters?: FlowRecordFilter[];
|
|
260
|
+
filterFormula?: string;
|
|
261
|
+
inputAssignments?: FlowInputFieldAssignment[];
|
|
262
|
+
connector?: FlowConnector;
|
|
263
|
+
faultConnector?: FlowConnector;
|
|
264
|
+
}
|
|
265
|
+
interface FlowRecordDelete extends FlowNodeBase {
|
|
266
|
+
object?: string;
|
|
267
|
+
inputReference?: string;
|
|
268
|
+
/** Senza filtri e' un **errore**, non un avviso (§5.7). */
|
|
269
|
+
filters?: FlowRecordFilter[];
|
|
270
|
+
connector?: FlowConnector;
|
|
271
|
+
faultConnector?: FlowConnector;
|
|
272
|
+
}
|
|
273
|
+
interface FlowRecordRollback extends FlowNodeBase {
|
|
274
|
+
connector?: FlowConnector;
|
|
275
|
+
}
|
|
276
|
+
/** §5.8 */
|
|
277
|
+
interface FlowActionCall extends FlowNodeBase {
|
|
278
|
+
actionType?: string;
|
|
279
|
+
actionName?: string;
|
|
280
|
+
flowTransactionModel?: FlowTransactionModel;
|
|
281
|
+
inputParameters?: FlowInputParameter[];
|
|
282
|
+
outputParameters?: FlowOutputParameter[];
|
|
283
|
+
storeOutputAutomatically?: boolean;
|
|
284
|
+
isWaitUntilCompleted?: boolean;
|
|
285
|
+
offset?: number;
|
|
286
|
+
offsetUnit?: FlowOffsetUnit;
|
|
287
|
+
/** Il ramo di timeout esiste solo con `EnableTimeoutPath`. */
|
|
288
|
+
timeoutPathUsage?: 'EnableTimeoutPath' | 'NoTimeoutPath' | string;
|
|
289
|
+
connector?: FlowConnector;
|
|
290
|
+
faultConnector?: FlowConnector;
|
|
291
|
+
timeoutConnector?: FlowConnector;
|
|
292
|
+
}
|
|
293
|
+
interface FlowScriptPluginCall extends FlowNodeBase {
|
|
294
|
+
scriptName?: string;
|
|
295
|
+
inputParameters?: FlowInputParameter[];
|
|
296
|
+
outputParameters?: FlowOutputParameter[];
|
|
297
|
+
storeOutputAutomatically?: boolean;
|
|
298
|
+
connector?: FlowConnector;
|
|
299
|
+
faultConnector?: FlowConnector;
|
|
300
|
+
}
|
|
301
|
+
/** §5.9 — i `name` sono le variabili isInput/isOutput del flow **invocato**. */
|
|
302
|
+
interface FlowSubflowInputAssignment {
|
|
303
|
+
name?: string;
|
|
304
|
+
value?: FlowValue;
|
|
305
|
+
}
|
|
306
|
+
interface FlowSubflowOutputAssignment {
|
|
307
|
+
name?: string;
|
|
308
|
+
assignToReference?: string;
|
|
309
|
+
}
|
|
310
|
+
interface FlowSubflow extends FlowNodeBase {
|
|
311
|
+
flowName?: string;
|
|
312
|
+
inputAssignments?: FlowSubflowInputAssignment[];
|
|
313
|
+
outputAssignments?: FlowSubflowOutputAssignment[];
|
|
314
|
+
storeOutputAutomatically?: boolean;
|
|
315
|
+
connector?: FlowConnector;
|
|
316
|
+
}
|
|
317
|
+
/** §5.10 */
|
|
318
|
+
interface FlowWaitEvent extends FlowConditionHolder {
|
|
319
|
+
name?: string;
|
|
320
|
+
label?: string;
|
|
321
|
+
description?: string;
|
|
322
|
+
eventType?: string;
|
|
323
|
+
filterLogic?: FlowConditionLogic;
|
|
324
|
+
filters?: FlowRecordFilter[];
|
|
325
|
+
inputParameters?: FlowInputParameter[];
|
|
326
|
+
outputParameters?: FlowOutputParameter[];
|
|
327
|
+
connector?: FlowConnector;
|
|
328
|
+
}
|
|
329
|
+
interface FlowWait extends FlowNodeBase {
|
|
330
|
+
waitEvents?: FlowWaitEvent[];
|
|
331
|
+
defaultConnector?: FlowConnector;
|
|
332
|
+
defaultConnectorLabel?: string;
|
|
333
|
+
faultConnector?: FlowConnector;
|
|
334
|
+
}
|
|
335
|
+
/** §5.11 */
|
|
336
|
+
interface FlowCustomErrorMessage {
|
|
337
|
+
errorMessage?: string;
|
|
338
|
+
isFieldError?: boolean;
|
|
339
|
+
fieldSelection?: string;
|
|
340
|
+
}
|
|
341
|
+
interface FlowCustomError extends FlowNodeBase {
|
|
342
|
+
customErrorMessages?: FlowCustomErrorMessage[];
|
|
343
|
+
}
|
|
344
|
+
/** §5.12 */
|
|
345
|
+
interface FlowTransformValueAction {
|
|
346
|
+
transformType?: FlowTransformType;
|
|
347
|
+
outputFieldApiName?: string;
|
|
348
|
+
value?: FlowValue;
|
|
349
|
+
inputParameters?: FlowInputParameter[];
|
|
350
|
+
}
|
|
351
|
+
interface FlowTransformValue {
|
|
352
|
+
transformValueActions?: FlowTransformValueAction[];
|
|
353
|
+
}
|
|
354
|
+
interface FlowTransform extends FlowNodeBase {
|
|
355
|
+
dataType?: FlowDataType;
|
|
356
|
+
objectType?: string;
|
|
357
|
+
isCollection?: boolean;
|
|
358
|
+
transformValues?: FlowTransformValue[];
|
|
359
|
+
/** **Array** per fedelta' storica: usa il primo (§3.5). */
|
|
360
|
+
connector?: FlowConnector[];
|
|
361
|
+
}
|
|
362
|
+
/** Non supportati dal motore: nascosti dalla palette (§3.2, §13.9). */
|
|
363
|
+
interface FlowUnsupportedNode extends FlowNodeBase {
|
|
364
|
+
connector?: FlowConnector;
|
|
365
|
+
[key: string]: unknown;
|
|
366
|
+
}
|
|
367
|
+
interface FlowSchedule {
|
|
368
|
+
frequency?: 'Once' | 'Daily' | 'Weekly' | 'Monthly' | string;
|
|
369
|
+
/** Data senza fuso: `2026-08-01T00:00:00`. */
|
|
370
|
+
startDate?: string;
|
|
371
|
+
/** `08:00:00`. */
|
|
372
|
+
startTime?: string;
|
|
373
|
+
}
|
|
374
|
+
interface FlowScheduledPath {
|
|
375
|
+
name?: string;
|
|
376
|
+
label?: string;
|
|
377
|
+
offsetNumber?: number;
|
|
378
|
+
offsetUnit?: FlowOffsetUnit;
|
|
379
|
+
timeSource?: string;
|
|
380
|
+
recordField?: string;
|
|
381
|
+
connector?: FlowConnector;
|
|
382
|
+
}
|
|
383
|
+
interface FlowStart {
|
|
384
|
+
locationX?: number;
|
|
385
|
+
locationY?: number;
|
|
386
|
+
/** Sempre necessario: senza, `START_NO_ENTRY_POINT`. */
|
|
387
|
+
connector?: FlowConnector;
|
|
388
|
+
triggerType?: FlowTriggerType;
|
|
389
|
+
object?: string;
|
|
390
|
+
recordTriggerType?: FlowRecordTriggerType;
|
|
391
|
+
filterLogic?: FlowConditionLogic;
|
|
392
|
+
filters?: FlowRecordFilter[];
|
|
393
|
+
filterFormula?: string;
|
|
394
|
+
doesRequireRecordChangedToMeetCriteria?: boolean;
|
|
395
|
+
schedule?: FlowSchedule;
|
|
396
|
+
scheduledPaths?: FlowScheduledPath[];
|
|
397
|
+
inputs?: FlowInputParameter[];
|
|
398
|
+
}
|
|
399
|
+
interface FlowCustomProperty {
|
|
400
|
+
name?: string;
|
|
401
|
+
value?: string;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* §3.1 — i node non stanno in un'unica lista: c'e' una collection per tipo.
|
|
405
|
+
* Il tipo di un node **e'** la collection in cui sta.
|
|
406
|
+
*/
|
|
407
|
+
interface FlowDefinition {
|
|
408
|
+
/** Identificatore. Rinominare passa da una primitiva dedicata, non dal JSON (§2). */
|
|
409
|
+
fullName?: string;
|
|
410
|
+
label?: string;
|
|
411
|
+
description?: string;
|
|
412
|
+
processType?: FlowProcessType;
|
|
413
|
+
/** Sola lettura per l'editor: lo governa il ciclo di vita (§8). */
|
|
414
|
+
status?: FlowVersionStatus;
|
|
415
|
+
interviewLabel?: string;
|
|
416
|
+
/** Array di uno per fedelta' storica: usa sempre il primo (§3.4). */
|
|
417
|
+
start?: FlowStart[];
|
|
418
|
+
variables?: FlowVariable[];
|
|
419
|
+
constants?: FlowConstant[];
|
|
420
|
+
formulas?: FlowFormula[];
|
|
421
|
+
textTemplates?: FlowTextTemplate[];
|
|
422
|
+
choices?: FlowChoice[];
|
|
423
|
+
dynamicChoiceSets?: FlowDynamicChoiceSet[];
|
|
424
|
+
stages?: FlowStage[];
|
|
425
|
+
screens?: FlowScreen[];
|
|
426
|
+
assignments?: FlowAssignment[];
|
|
427
|
+
decisions?: FlowDecision[];
|
|
428
|
+
loops?: FlowLoop[];
|
|
429
|
+
collectionProcessors?: FlowCollectionProcessor[];
|
|
430
|
+
recordLookups?: FlowRecordLookup[];
|
|
431
|
+
recordCreates?: FlowRecordCreate[];
|
|
432
|
+
recordUpdates?: FlowRecordUpdate[];
|
|
433
|
+
recordDeletes?: FlowRecordDelete[];
|
|
434
|
+
recordRollbacks?: FlowRecordRollback[];
|
|
435
|
+
actionCalls?: FlowActionCall[];
|
|
436
|
+
scriptPluginCalls?: FlowScriptPluginCall[];
|
|
437
|
+
subflows?: FlowSubflow[];
|
|
438
|
+
transforms?: FlowTransform[];
|
|
439
|
+
waits?: FlowWait[];
|
|
440
|
+
customErrors?: FlowCustomError[];
|
|
441
|
+
/** Non supportati: conservati nel round-trip ma non creabili dalla palette. */
|
|
442
|
+
steps?: FlowUnsupportedNode[];
|
|
443
|
+
experiments?: FlowUnsupportedNode[];
|
|
444
|
+
orchestratedStages?: FlowUnsupportedNode[];
|
|
445
|
+
apiVersion?: string;
|
|
446
|
+
timeZoneSidKey?: string;
|
|
447
|
+
triggerOrder?: number;
|
|
448
|
+
isTemplate?: boolean;
|
|
449
|
+
customProperties?: FlowCustomProperty[];
|
|
450
|
+
}
|
|
451
|
+
/** Le collection di node: `metadataProperty` del dizionario `elementTypes` (§3.2). */
|
|
452
|
+
declare const FLOW_NODE_COLLECTIONS: readonly ["screens", "assignments", "decisions", "loops", "collectionProcessors", "recordLookups", "recordCreates", "recordUpdates", "recordDeletes", "recordRollbacks", "actionCalls", "scriptPluginCalls", "subflows", "transforms", "waits", "customErrors", "steps", "experiments", "orchestratedStages"];
|
|
453
|
+
type FlowNodeCollection = (typeof FLOW_NODE_COLLECTIONS)[number];
|
|
454
|
+
/** Le collection di risorse (§4.6). Condividono lo spazio dei nomi con i node (§3.3). */
|
|
455
|
+
declare const FLOW_RESOURCE_COLLECTIONS: readonly ["variables", "constants", "formulas", "textTemplates", "choices", "dynamicChoiceSets", "stages"];
|
|
456
|
+
type FlowResourceCollection = (typeof FLOW_RESOURCE_COLLECTIONS)[number];
|
|
457
|
+
/** Il discriminatore `value` del dizionario `elementTypes`. */
|
|
458
|
+
type FlowElementType = 'Screen' | 'Assignment' | 'Decision' | 'Loop' | 'CollectionProcessor' | 'CustomError' | 'Wait' | 'RecordLookup' | 'RecordCreate' | 'RecordUpdate' | 'RecordDelete' | 'RecordRollback' | 'ActionCall' | 'ScriptCall' | 'Subflow' | 'Transform' | 'Step' | 'Experiment' | 'OrchestratedStage' | string;
|
|
459
|
+
/** Un node qualunque, come lo vede il canvas. */
|
|
460
|
+
type FlowAnyNode = FlowNodeBase & Record<string, unknown>;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Dizionari — FRONTEND.md §6.4.
|
|
464
|
+
*
|
|
465
|
+
* Sono statici: si caricano una volta e si tengono in cache. Nessun elenco di enum
|
|
466
|
+
* o di operatori va cablato nel frontend (§13.11): tutte le tendine leggono da qui.
|
|
467
|
+
*/
|
|
468
|
+
|
|
469
|
+
/** Ogni voce di dizionario ha almeno `value` (da scrivere) e `label` (da mostrare). */
|
|
470
|
+
interface FlowDictionaryEntry {
|
|
471
|
+
value: string;
|
|
472
|
+
label: string;
|
|
473
|
+
description?: string | null;
|
|
474
|
+
}
|
|
475
|
+
interface FlowDataTypeEntry extends FlowDictionaryEntry {
|
|
476
|
+
value: FlowDataType;
|
|
477
|
+
/** `Object` ed `Enum` richiedono `objectType` (§4.6). */
|
|
478
|
+
requiresObjectType?: boolean;
|
|
479
|
+
/** `scale` si applica solo ai numerici (§4.6). */
|
|
480
|
+
supportsScale?: boolean;
|
|
481
|
+
}
|
|
482
|
+
/** §3.2 — la voce che descrive un tipo di elemento. */
|
|
483
|
+
interface FlowElementTypeEntry extends FlowDictionaryEntry {
|
|
484
|
+
value: FlowElementType;
|
|
485
|
+
/** Categoria per raggruppare la palette: Interazione, Logica, Dati, Azione, Flow. */
|
|
486
|
+
category?: string | null;
|
|
487
|
+
/** La collection in cui scrivere il node (§3.1). */
|
|
488
|
+
metadataProperty?: FlowNodeCollection | string;
|
|
489
|
+
/** `false` → va nascosto dalla palette (§13.9). */
|
|
490
|
+
isSupported?: boolean;
|
|
491
|
+
hasFaultConnector?: boolean;
|
|
492
|
+
hasAutomaticOutput?: boolean;
|
|
493
|
+
}
|
|
494
|
+
/** §4.3 — operatore di confronto per le condizioni su risorse. */
|
|
495
|
+
interface FlowComparisonOperatorEntry extends FlowDictionaryEntry {
|
|
496
|
+
/**
|
|
497
|
+
* Trappola numero uno (§13.1): per gli unari `rightValue` e' l'**esito atteso**,
|
|
498
|
+
* non il termine di confronto.
|
|
499
|
+
*/
|
|
500
|
+
isUnary?: boolean;
|
|
501
|
+
/** A sinistra vuole il nome di un **node**, non di una risorsa (`WasVisited`, `HasError`). */
|
|
502
|
+
appliesToElements?: boolean;
|
|
503
|
+
/** Tipi a cui l'operatore si applica; vuoto o assente = qualunque tipo. */
|
|
504
|
+
appliesTo?: FlowDataType[] | null;
|
|
505
|
+
}
|
|
506
|
+
/** §5.2 — operatore di assegnazione. */
|
|
507
|
+
interface FlowAssignmentOperatorEntry extends FlowDictionaryEntry {
|
|
508
|
+
/** Ha senso solo su destinazioni collection; altrove e' un avviso. */
|
|
509
|
+
expectsCollection?: boolean;
|
|
510
|
+
}
|
|
511
|
+
/** §4.1 — variabile globale proponibile invece di farla digitare. */
|
|
512
|
+
interface FlowGlobalVariableEntry extends FlowDictionaryEntry {
|
|
513
|
+
/** `$Flow`, `$GlobalConstant`, `$Record`, `$User`, … */
|
|
514
|
+
scope?: string;
|
|
515
|
+
/** Percorsi noti dello scope; per gli scope dell'host e' vuoto. */
|
|
516
|
+
paths?: string[] | null;
|
|
517
|
+
/** `true` → il backend non sa quali percorsi esistano e accetta qualunque cosa (§4.1). */
|
|
518
|
+
isResolvedByHost?: boolean;
|
|
519
|
+
/** Disponibile solo con un trigger su record (`$Record`, `$Record__Prior`). */
|
|
520
|
+
requiresRecordTrigger?: boolean;
|
|
521
|
+
}
|
|
522
|
+
interface FlowResourceKindEntry extends FlowDictionaryEntry {
|
|
523
|
+
/** Solo le variabili sono scrivibili (§4.6). */
|
|
524
|
+
isWritable?: boolean;
|
|
525
|
+
/** La collection del documento in cui vive la risorsa. */
|
|
526
|
+
metadataProperty?: string;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* §6.4 — tutte le tendine statiche in una risposta.
|
|
530
|
+
* I campi sono opzionali: un backend che non popola un dizionario non deve far
|
|
531
|
+
* crollare l'editor, che degrada mostrando il valore grezzo.
|
|
532
|
+
*/
|
|
533
|
+
interface FlowDictionaries {
|
|
534
|
+
dataTypes?: FlowDataTypeEntry[];
|
|
535
|
+
comparisonOperators?: FlowComparisonOperatorEntry[];
|
|
536
|
+
assignmentOperators?: FlowAssignmentOperatorEntry[];
|
|
537
|
+
recordFilterOperators?: FlowDictionaryEntry[];
|
|
538
|
+
elementTypes?: FlowElementTypeEntry[];
|
|
539
|
+
resourceKinds?: FlowResourceKindEntry[];
|
|
540
|
+
globalVariables?: FlowGlobalVariableEntry[];
|
|
541
|
+
processTypes?: FlowDictionaryEntry[];
|
|
542
|
+
versionStatuses?: FlowDictionaryEntry[];
|
|
543
|
+
triggerTypes?: FlowDictionaryEntry[];
|
|
544
|
+
recordTriggerTypes?: FlowDictionaryEntry[];
|
|
545
|
+
startFrequencies?: FlowDictionaryEntry[];
|
|
546
|
+
offsetUnits?: FlowDictionaryEntry[];
|
|
547
|
+
sortOrders?: FlowDictionaryEntry[];
|
|
548
|
+
collectionProcessorTypes?: FlowDictionaryEntry[];
|
|
549
|
+
transformTypes?: FlowDictionaryEntry[];
|
|
550
|
+
transactionModels?: FlowDictionaryEntry[];
|
|
551
|
+
waitEventTypes?: FlowDictionaryEntry[];
|
|
552
|
+
conditionLogicModes?: FlowDictionaryEntry[];
|
|
553
|
+
screenNavigations?: FlowDictionaryEntry[];
|
|
554
|
+
}
|
|
555
|
+
interface FlowObjectSummary {
|
|
556
|
+
name: string;
|
|
557
|
+
label?: string | null;
|
|
558
|
+
description?: string | null;
|
|
559
|
+
}
|
|
560
|
+
interface FlowObjectDescription {
|
|
561
|
+
name: string;
|
|
562
|
+
label?: string | null;
|
|
563
|
+
fields?: FlowFieldDescription[];
|
|
564
|
+
}
|
|
565
|
+
interface FlowFieldDescription {
|
|
566
|
+
name: string;
|
|
567
|
+
label?: string | null;
|
|
568
|
+
dataType?: FlowDataType;
|
|
569
|
+
objectType?: string | null;
|
|
570
|
+
isFilterable?: boolean;
|
|
571
|
+
isSortable?: boolean;
|
|
572
|
+
isUpdateable?: boolean;
|
|
573
|
+
isRequired?: boolean;
|
|
574
|
+
/** `true` → i valori ammessi si chiedono a `.../fields/{field}/values`. */
|
|
575
|
+
hasClosedValueSet?: boolean;
|
|
576
|
+
}
|
|
577
|
+
/** `any` | `filterable` | `sortable` | `updateable` (§6.4). */
|
|
578
|
+
type FlowFieldUsage = 'any' | 'filterable' | 'sortable' | 'updateable';
|
|
579
|
+
interface FlowFieldValue {
|
|
580
|
+
value: string;
|
|
581
|
+
label?: string | null;
|
|
582
|
+
}
|
|
583
|
+
/** Voce di catalogo per action, script, form, eventi, tipi di enum. */
|
|
584
|
+
interface FlowCatalogEntry {
|
|
585
|
+
name: string;
|
|
586
|
+
label?: string | null;
|
|
587
|
+
description?: string | null;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Parametro dichiarato da un'action, uno script o un form.
|
|
591
|
+
* Con il catalogo popolato un parametro inesistente e' un **errore** (§5.8).
|
|
592
|
+
*/
|
|
593
|
+
interface FlowCatalogParameter {
|
|
594
|
+
name: string;
|
|
595
|
+
label?: string | null;
|
|
596
|
+
description?: string | null;
|
|
597
|
+
dataType?: FlowDataType;
|
|
598
|
+
objectType?: string | null;
|
|
599
|
+
isCollection?: boolean;
|
|
600
|
+
isInput?: boolean;
|
|
601
|
+
isOutput?: boolean;
|
|
602
|
+
isRequired?: boolean;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Payload delle primitive — FRONTEND.md §6, §7, §8, §10.
|
|
607
|
+
*/
|
|
608
|
+
|
|
609
|
+
/** Una riga per **nome**, non per versione (§6.1). */
|
|
610
|
+
interface FlowSummary {
|
|
611
|
+
flowName: string;
|
|
612
|
+
label?: string | null;
|
|
613
|
+
description?: string | null;
|
|
614
|
+
processType?: FlowProcessType;
|
|
615
|
+
activeVersion?: number | null;
|
|
616
|
+
latestVersion?: number;
|
|
617
|
+
versionCount?: number;
|
|
618
|
+
hasDraft?: boolean;
|
|
619
|
+
updatedAt?: string;
|
|
620
|
+
/** Esiste una versione attiva. Non ricalcolarlo lato client (§6.1). */
|
|
621
|
+
isRunnable?: boolean;
|
|
622
|
+
}
|
|
623
|
+
interface FlowVersionSummary {
|
|
624
|
+
flowName: string;
|
|
625
|
+
version: number;
|
|
626
|
+
status?: FlowVersionStatus;
|
|
627
|
+
label?: string | null;
|
|
628
|
+
description?: string | null;
|
|
629
|
+
processType?: FlowProcessType;
|
|
630
|
+
createdAt?: string;
|
|
631
|
+
/** Da conservare e rimandare come `expectedUpdatedAt` al salvataggio (§9). */
|
|
632
|
+
updatedAt?: string;
|
|
633
|
+
updatedBy?: string | null;
|
|
634
|
+
isActive?: boolean;
|
|
635
|
+
/** La versione e' una bozza. Non ricalcolarlo lato client (§6.1). */
|
|
636
|
+
isEditable?: boolean;
|
|
637
|
+
}
|
|
638
|
+
interface FlowListQuery {
|
|
639
|
+
search?: string;
|
|
640
|
+
processType?: FlowProcessType;
|
|
641
|
+
onlyActive?: boolean;
|
|
642
|
+
}
|
|
643
|
+
type FlowIssueSeverity = 'Error' | 'Warning' | 'Info' | string;
|
|
644
|
+
interface FlowValidationIssue {
|
|
645
|
+
/** Stabile: usalo per decidere il comportamento. Non interpretare `message` (§7). */
|
|
646
|
+
code: string;
|
|
647
|
+
severity: FlowIssueSeverity;
|
|
648
|
+
message: string;
|
|
649
|
+
/** Ancora per portare l'utente sull'elemento con un clic. */
|
|
650
|
+
elementName?: string | null;
|
|
651
|
+
/** Campo dentro l'elemento, es. `rules[Approvato].connector.targetReference`. */
|
|
652
|
+
path?: string | null;
|
|
653
|
+
}
|
|
654
|
+
interface FlowValidationResult {
|
|
655
|
+
/** Ordinati per gravita' decrescente (§7). */
|
|
656
|
+
issues: FlowValidationIssue[];
|
|
657
|
+
errorCount: number;
|
|
658
|
+
warningCount: number;
|
|
659
|
+
isValid: boolean;
|
|
660
|
+
}
|
|
661
|
+
interface FlowCreateRequest {
|
|
662
|
+
definition: FlowDefinition;
|
|
663
|
+
flowName?: string;
|
|
664
|
+
author?: string;
|
|
665
|
+
}
|
|
666
|
+
interface FlowSaveRequest {
|
|
667
|
+
definition: FlowDefinition;
|
|
668
|
+
/** Se indicato **vince** sul `fullName` del documento: e' cosi' che si rinomina (§6.2). */
|
|
669
|
+
flowName?: string;
|
|
670
|
+
/** Mandare sempre la versione che si sta editando rende il risultato prevedibile (§8). */
|
|
671
|
+
version?: number;
|
|
672
|
+
/** Concorrenza ottimistica: facoltativo ma raccomandato (§9). */
|
|
673
|
+
expectedUpdatedAt?: string;
|
|
674
|
+
author?: string;
|
|
675
|
+
/** Salva **e** attiva. Fallisce senza scrivere nulla se ci sono errori. */
|
|
676
|
+
activate?: boolean;
|
|
677
|
+
}
|
|
678
|
+
interface FlowSaveResult {
|
|
679
|
+
flowName: string;
|
|
680
|
+
version: number;
|
|
681
|
+
status: FlowVersionStatus;
|
|
682
|
+
isNewVersion: boolean;
|
|
683
|
+
/** Da conservare per il salvataggio successivo (§9). */
|
|
684
|
+
updatedAt: string;
|
|
685
|
+
/** Il salvataggio riesce anche con errori: guarda qui, non l'esito HTTP (§6.2). */
|
|
686
|
+
validation?: FlowValidationResult;
|
|
687
|
+
}
|
|
688
|
+
interface FlowCloneRequest {
|
|
689
|
+
targetFlowName: string;
|
|
690
|
+
label?: string;
|
|
691
|
+
fromVersion?: number;
|
|
692
|
+
author?: string;
|
|
693
|
+
}
|
|
694
|
+
interface FlowNewVersionRequest {
|
|
695
|
+
/** Versione da copiare; se omessa, l'ultima. */
|
|
696
|
+
from?: number;
|
|
697
|
+
author?: string;
|
|
698
|
+
}
|
|
699
|
+
type FlowReferenceKind = 'Variable' | 'Constant' | 'Formula' | 'TextTemplate' | 'Choice' | 'DynamicChoiceSet' | 'Stage'
|
|
700
|
+
/** Output automatico di un elemento: valido pur non essendo dichiarato (§4.5, §13.3). */
|
|
701
|
+
| 'ElementOutput' | 'Global' | string;
|
|
702
|
+
interface FlowReference {
|
|
703
|
+
name: string;
|
|
704
|
+
label?: string | null;
|
|
705
|
+
kind: FlowReferenceKind;
|
|
706
|
+
dataType?: FlowDataType | null;
|
|
707
|
+
isCollection?: boolean;
|
|
708
|
+
objectType?: string | null;
|
|
709
|
+
/** Per i campi di destinazione: solo le variabili sono scrivibili (§4.6). */
|
|
710
|
+
isWritable?: boolean;
|
|
711
|
+
description?: string | null;
|
|
712
|
+
}
|
|
713
|
+
/** Filtro opzionale per non trasferire riferimenti che il campo non accetta. */
|
|
714
|
+
interface FlowReferenceQuery {
|
|
715
|
+
definition: FlowDefinition;
|
|
716
|
+
dataType?: FlowDataType;
|
|
717
|
+
isCollection?: boolean;
|
|
718
|
+
objectType?: string;
|
|
719
|
+
}
|
|
720
|
+
interface FlowConnectorTarget {
|
|
721
|
+
name: string;
|
|
722
|
+
label?: string | null;
|
|
723
|
+
kind?: string;
|
|
724
|
+
}
|
|
725
|
+
type FlowConnectionKind = 'Start' | 'ScheduledPath' | 'Next' | 'Rule' | 'Default' | 'LoopNext' | 'LoopEnd' | 'WaitEvent' | 'Fault' | 'Timeout' | string;
|
|
726
|
+
interface FlowOutlineNode {
|
|
727
|
+
name: string;
|
|
728
|
+
label?: string | null;
|
|
729
|
+
kind: string;
|
|
730
|
+
description?: string | null;
|
|
731
|
+
locationX?: number;
|
|
732
|
+
locationY?: number;
|
|
733
|
+
/** `false` → nessun percorso lo raggiunge dallo Start: va reso "scollegato" (§6.4). */
|
|
734
|
+
isReachable?: boolean;
|
|
735
|
+
}
|
|
736
|
+
interface FlowOutlineConnection {
|
|
737
|
+
/** `null` identifica gli archi uscenti dallo Start, che non ha nome (§6.4). */
|
|
738
|
+
from?: string | null;
|
|
739
|
+
/** `null` → il connector esiste ma non ha destinazione: ramo incompleto (§6.4). */
|
|
740
|
+
to?: string | null;
|
|
741
|
+
kind: FlowConnectionKind;
|
|
742
|
+
label?: string | null;
|
|
743
|
+
isGoTo?: boolean;
|
|
744
|
+
}
|
|
745
|
+
interface FlowOutline {
|
|
746
|
+
flowName?: string | null;
|
|
747
|
+
label?: string | null;
|
|
748
|
+
processType?: FlowProcessType;
|
|
749
|
+
triggerType?: string | null;
|
|
750
|
+
entryElementName?: string | null;
|
|
751
|
+
nodes: FlowOutlineNode[];
|
|
752
|
+
connections: FlowOutlineConnection[];
|
|
753
|
+
}
|
|
754
|
+
type FlowInterviewStatus = 'Completed' | 'WaitingForScreen' | 'Paused' | 'Suspended'
|
|
755
|
+
/** **Non** e' un errore HTTP: la richiesta e' riuscita, il flow e' fallito (§6.5). */
|
|
756
|
+
| 'Failed'
|
|
757
|
+
/** I criteri dello Start non erano soddisfatti: non e' un errore (§6.5). */
|
|
758
|
+
| 'NotStarted' | string;
|
|
759
|
+
type FlowScreenNavigation = 'Next' | 'Previous' | 'Pause' | 'Finish' | string;
|
|
760
|
+
/** Il tipo dichiarato **vince** in lettura: distingue `Integer` da `Number` (§6.5). */
|
|
761
|
+
interface FlowTypedValue {
|
|
762
|
+
type?: FlowDataType;
|
|
763
|
+
value?: unknown;
|
|
764
|
+
}
|
|
765
|
+
interface FlowPendingScreen {
|
|
766
|
+
elementName?: string;
|
|
767
|
+
formName?: string;
|
|
768
|
+
label?: string | null;
|
|
769
|
+
helpText?: string | null;
|
|
770
|
+
inputs?: Record<string, FlowTypedValue>;
|
|
771
|
+
/** Piu' precisi dei flag del metadata: sono la verita' su cosa abilitare (§6.5). */
|
|
772
|
+
canGoBack?: boolean;
|
|
773
|
+
canFinish?: boolean;
|
|
774
|
+
canPause?: boolean;
|
|
775
|
+
}
|
|
776
|
+
interface FlowTraceEntry {
|
|
777
|
+
sequence?: number;
|
|
778
|
+
level?: string;
|
|
779
|
+
message?: string;
|
|
780
|
+
elementName?: string | null;
|
|
781
|
+
}
|
|
782
|
+
interface FlowInterviewResult {
|
|
783
|
+
interviewId?: string;
|
|
784
|
+
flowName?: string;
|
|
785
|
+
status: FlowInterviewStatus;
|
|
786
|
+
/** Opaco: da rimandare tale e quale (§6.5, §13.12). */
|
|
787
|
+
continuationToken?: string | null;
|
|
788
|
+
interviewKey?: string | null;
|
|
789
|
+
pendingScreen?: FlowPendingScreen | null;
|
|
790
|
+
outputs?: Record<string, FlowTypedValue>;
|
|
791
|
+
errors?: string[];
|
|
792
|
+
fault?: string | null;
|
|
793
|
+
currentElementName?: string | null;
|
|
794
|
+
steps?: number;
|
|
795
|
+
/** Popolato solo con `debug: true`. Puo' contenere dati personali (§6.5). */
|
|
796
|
+
trace?: FlowTraceEntry[];
|
|
797
|
+
/** Con `debug: true`: i valori di **tutte** le risorse, non solo gli output. */
|
|
798
|
+
resources?: Record<string, FlowTypedValue>;
|
|
799
|
+
isSuccess?: boolean;
|
|
800
|
+
}
|
|
801
|
+
interface FlowStartInterviewRequest {
|
|
802
|
+
flowName: string;
|
|
803
|
+
version?: number;
|
|
804
|
+
inputs?: Record<string, unknown>;
|
|
805
|
+
debug?: boolean;
|
|
806
|
+
}
|
|
807
|
+
interface FlowScreenResponseRequest {
|
|
808
|
+
continuationToken: string;
|
|
809
|
+
screenElementName?: string;
|
|
810
|
+
navigation?: FlowScreenNavigation;
|
|
811
|
+
outputs?: Record<string, unknown>;
|
|
812
|
+
debug?: boolean;
|
|
813
|
+
}
|
|
814
|
+
interface FlowResumeRequest {
|
|
815
|
+
interviewKey: string;
|
|
816
|
+
debug?: boolean;
|
|
817
|
+
}
|
|
818
|
+
interface FlowExportQuery {
|
|
819
|
+
version?: number;
|
|
820
|
+
indented?: boolean;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Errori categorizzati — FRONTEND.md §10.
|
|
825
|
+
*
|
|
826
|
+
* La UI si comporta in base alla **categoria**, non al messaggio. L'implementazione
|
|
827
|
+
* dell'interfaccia backend ha il compito di tradurre l'errore di trasporto
|
|
828
|
+
* (status HTTP, payload) in un `FlowApiError`: da lì in poi l'editor non conosce HTTP.
|
|
829
|
+
*/
|
|
830
|
+
|
|
831
|
+
/** Categorie di authoring (§10). */
|
|
832
|
+
type FlowErrorCategory =
|
|
833
|
+
/** Bug del client: la richiesta e' incompleta. */
|
|
834
|
+
'InvalidRequest'
|
|
835
|
+
/** Il documento non e' leggibile: tipicamente l'import di un file sbagliato. */
|
|
836
|
+
| 'InvalidDefinition'
|
|
837
|
+
/** Apri il pannello dei problemi: il payload contiene `validation`. */
|
|
838
|
+
| 'ValidationFailed' | 'FlowNotFound' | 'VersionNotFound'
|
|
839
|
+
/** Nome già usato: chiedi un altro nome. */
|
|
840
|
+
| 'AlreadyExists'
|
|
841
|
+
/** Versione non modificabile: proponi "Nuova versione" (§8.1). */
|
|
842
|
+
| 'NotEditable'
|
|
843
|
+
/** Qualcun altro ha salvato: proponi ricarica (§9). */
|
|
844
|
+
| 'VersionConflict'
|
|
845
|
+
/** Funzione non configurata su questo ambiente: disabilita il comando. */
|
|
846
|
+
| 'MissingService' | 'InvalidToken' | 'InterviewNotFound'
|
|
847
|
+
/** Fallback per un errore di trasporto non categorizzato. */
|
|
848
|
+
| 'Unknown' | string;
|
|
849
|
+
/** L'errore che ogni primitiva puo' rifiutare (§6, §10). */
|
|
850
|
+
declare class FlowApiError extends Error {
|
|
851
|
+
readonly category: FlowErrorCategory;
|
|
852
|
+
/** Presente con `ValidationFailed`: l'elenco da aprire nel pannello (§8.3). */
|
|
853
|
+
readonly validation?: FlowValidationResult | undefined;
|
|
854
|
+
/** Con `VersionConflict`: chi ha modificato nel frattempo (§9). */
|
|
855
|
+
readonly conflictingAuthor?: string | undefined;
|
|
856
|
+
readonly details?: unknown | undefined;
|
|
857
|
+
constructor(category: FlowErrorCategory, message: string,
|
|
858
|
+
/** Presente con `ValidationFailed`: l'elenco da aprire nel pannello (§8.3). */
|
|
859
|
+
validation?: FlowValidationResult | undefined,
|
|
860
|
+
/** Con `VersionConflict`: chi ha modificato nel frattempo (§9). */
|
|
861
|
+
conflictingAuthor?: string | undefined, details?: unknown | undefined);
|
|
862
|
+
static is(value: unknown): value is FlowApiError;
|
|
863
|
+
}
|
|
864
|
+
/** Mappatura HTTP suggerita (§10). Usata dall'implementazione HTTP dell'interfaccia. */
|
|
865
|
+
declare const FLOW_ERROR_HTTP_STATUS: Record<string, number>;
|
|
866
|
+
/** Messaggi di fallback: `message` del backend, quando c'e', ha la precedenza. */
|
|
867
|
+
declare const FLOW_ERROR_FALLBACK_MESSAGE: Record<string, string>;
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* L'unica porta verso il backend.
|
|
871
|
+
*
|
|
872
|
+
* **Tutto** il traffico di dati da e verso il backend passa da qui: nessun componente
|
|
873
|
+
* e nessun servizio della libreria conosce HTTP, URL o formati di trasporto. Chi integra
|
|
874
|
+
* il builder fornisce una implementazione di questa classe astratta e la registra come
|
|
875
|
+
* provider — `FlowBuilderApi` e' anche il token di dependency injection.
|
|
876
|
+
*
|
|
877
|
+
* Contratto di errore: ogni metodo, in caso di rifiuto, deve fallire con un
|
|
878
|
+
* {@link FlowApiError} categorizzato (§10). L'editor si comporta in base alla categoria,
|
|
879
|
+
* mai leggendo il messaggio.
|
|
880
|
+
*
|
|
881
|
+
* Contratto di forma: i metodi restituiscono `Promise`. Le primitive marcate
|
|
882
|
+
* "prende il documento in lavorazione" ricevono la definizione non ancora salvata,
|
|
883
|
+
* perche' la risposta dipende da cio' che l'utente sta scrivendo (§6.4).
|
|
884
|
+
*
|
|
885
|
+
* I metodi con implementazione di default che lancia `MissingService` sono opzionali:
|
|
886
|
+
* un ambiente che non li espone lascia l'editor funzionante, con il comando corrispondente
|
|
887
|
+
* disabilitato (§10, categoria `MissingService`).
|
|
888
|
+
*/
|
|
889
|
+
|
|
890
|
+
declare abstract class FlowBuilderApi {
|
|
891
|
+
/** `GET /flows` — una riga per nome, non per versione. */
|
|
892
|
+
abstract listFlows(query?: FlowListQuery): Promise<FlowSummary[]>;
|
|
893
|
+
/** `GET /flows/{name}/versions` — dalla piu' recente. */
|
|
894
|
+
abstract listVersions(flowName: string): Promise<FlowVersionSummary[]>;
|
|
895
|
+
/**
|
|
896
|
+
* `GET /flows/{name}?version=` — senza `version` restituisce la versione attiva,
|
|
897
|
+
* altrimenti l'ultima.
|
|
898
|
+
*/
|
|
899
|
+
abstract loadFlow(flowName: string, version?: number): Promise<FlowDefinition>;
|
|
900
|
+
/** `GET /flows/{name}/export` — il documento come stringa indentata. */
|
|
901
|
+
exportFlow(flowName: string, query?: FlowExportQuery): Promise<string>;
|
|
902
|
+
/**
|
|
903
|
+
* `POST /flows/parse` — normalizza un documento senza salvarlo.
|
|
904
|
+
* Serve all'import di un file: rifiuta con `InvalidDefinition` se non e' leggibile.
|
|
905
|
+
*/
|
|
906
|
+
parseFlow(definition: unknown): Promise<FlowDefinition>;
|
|
907
|
+
/** `POST /flows` — crea la versione 1. `AlreadyExists` se il nome e' già usato. */
|
|
908
|
+
abstract createFlow(request: FlowCreateRequest): Promise<FlowSaveResult>;
|
|
909
|
+
/**
|
|
910
|
+
* `PUT /flows/{name}` — salva sulla bozza esistente o ne crea una nuova versione.
|
|
911
|
+
* Riesce **anche con errori** di validazione: l'esito sano si legge in
|
|
912
|
+
* `FlowSaveResult.validation`, non nell'assenza di eccezione (§6.2).
|
|
913
|
+
*/
|
|
914
|
+
abstract saveFlow(flowName: string, request: FlowSaveRequest): Promise<FlowSaveResult>;
|
|
915
|
+
/** `POST /flows/{name}/versions?from=` — copia una versione in una nuova bozza. */
|
|
916
|
+
abstract createVersion(flowName: string, request?: FlowNewVersionRequest): Promise<FlowSaveResult>;
|
|
917
|
+
/** `POST /flows/{name}/clone` — copia il flow sotto un altro nome, versione 1. */
|
|
918
|
+
cloneFlow(flowName: string, request: FlowCloneRequest): Promise<FlowSaveResult>;
|
|
919
|
+
/**
|
|
920
|
+
* `POST /flows/{name}/versions/{v}/activate` — valida e attiva; la precedente
|
|
921
|
+
* diventa `Obsolete`. Con errori fallisce con `ValidationFailed` e il payload
|
|
922
|
+
* contiene l'elenco (§8.3).
|
|
923
|
+
*/
|
|
924
|
+
abstract activateVersion(flowName: string, version: number): Promise<FlowSaveResult>;
|
|
925
|
+
/** `POST /flows/{name}/deactivate` — il flow non e' piu' eseguibile. */
|
|
926
|
+
abstract deactivateFlow(flowName: string): Promise<void>;
|
|
927
|
+
/** `DELETE /flows/{name}/versions/{v}` — rifiutata sulla versione attiva. */
|
|
928
|
+
deleteVersion(flowName: string, version: number): Promise<void>;
|
|
929
|
+
/** `DELETE /flows/{name}` — rifiutata se esiste una versione attiva. */
|
|
930
|
+
deleteFlow(flowName: string): Promise<void>;
|
|
931
|
+
/**
|
|
932
|
+
* `POST /flows/validate` — non scrive nulla. È la primitiva del pannello dei
|
|
933
|
+
* problemi, richiamabile a ogni pausa di digitazione (§11, debounce 300–500 ms).
|
|
934
|
+
*/
|
|
935
|
+
abstract validateDefinition(definition: FlowDefinition): Promise<FlowValidationResult>;
|
|
936
|
+
/** `GET /flows/{name}/versions/{v}/validate` — valida una versione già salvata. */
|
|
937
|
+
validateVersion(flowName: string, version: number): Promise<FlowValidationResult>;
|
|
938
|
+
/**
|
|
939
|
+
* `GET /flows/dictionaries` — tutte le tendine statiche in una risposta.
|
|
940
|
+
* Statiche: si caricano una volta e si tengono in cache (§6.4, §13.11).
|
|
941
|
+
*/
|
|
942
|
+
abstract getDictionaries(): Promise<FlowDictionaries>;
|
|
943
|
+
/**
|
|
944
|
+
* `POST /flows/references` — i valori proponibili in un campo che accetta una risorsa.
|
|
945
|
+
* Include gli **output automatici** degli elementi, che non sono dichiarati in nessuna
|
|
946
|
+
* collection: e' il motivo per cui non va ricostruita lato client (§4.5, §13.3).
|
|
947
|
+
*/
|
|
948
|
+
abstract getReferences(query: FlowReferenceQuery): Promise<FlowReference[]>;
|
|
949
|
+
/**
|
|
950
|
+
* `POST /flows/references/writable` — solo le variabili, per i campi di destinazione.
|
|
951
|
+
* Ai campi `assignToReference` va aggiunto `$Flow.CurrentStage` / `$Flow.ActiveStages`
|
|
952
|
+
* se il flow dichiara stage (§5.2): quello lo fa l'editor, non la primitiva.
|
|
953
|
+
*/
|
|
954
|
+
abstract getWritableReferences(query: FlowReferenceQuery): Promise<FlowReference[]>;
|
|
955
|
+
/** `POST /flows/connector-targets?excluding=` — i node a cui un arco puo' puntare. */
|
|
956
|
+
abstract getConnectorTargets(definition: FlowDefinition, excluding?: string): Promise<FlowConnectorTarget[]>;
|
|
957
|
+
/**
|
|
958
|
+
* `POST /flows/outline` — node, archi e raggiungibilita' per il canvas.
|
|
959
|
+
* `isReachable` e' la fonte autoritativa dei node scollegati (§6.4).
|
|
960
|
+
*/
|
|
961
|
+
abstract getOutline(definition: FlowDefinition): Promise<FlowOutline>;
|
|
962
|
+
/** `GET /catalog/objects` — le entita' su cui i flow possono operare. */
|
|
963
|
+
abstract listObjects(): Promise<FlowObjectSummary[]>;
|
|
964
|
+
/** `GET /schema/{object}` — label e campi. */
|
|
965
|
+
describeObject(object: string): Promise<FlowObjectDescription>;
|
|
966
|
+
/** `GET /schema/{object}/fields?usage=` — proponi solo i campi validi per l'uso (§4.4). */
|
|
967
|
+
abstract listFields(object: string, usage?: FlowFieldUsage): Promise<FlowObjectDescription['fields']>;
|
|
968
|
+
/** `GET /schema/{object}/fields/{field}/values` — per non far digitare i valori. */
|
|
969
|
+
listFieldValues(object: string, field: string): Promise<FlowFieldValue[]>;
|
|
970
|
+
/** `GET /catalog/action-types` */
|
|
971
|
+
abstract listActionTypes(): Promise<FlowCatalogEntry[]>;
|
|
972
|
+
/** `GET /catalog/actions?type=` */
|
|
973
|
+
abstract listActions(actionType?: string): Promise<FlowCatalogEntry[]>;
|
|
974
|
+
/** `GET /catalog/actions/{type}/{name}/parameters` */
|
|
975
|
+
abstract listActionParameters(actionType: string, actionName: string): Promise<FlowCatalogParameter[]>;
|
|
976
|
+
/** `GET /catalog/scripts` */
|
|
977
|
+
abstract listScripts(): Promise<FlowCatalogEntry[]>;
|
|
978
|
+
/** `GET /catalog/scripts/{name}/parameters` */
|
|
979
|
+
abstract listScriptParameters(scriptName: string): Promise<FlowCatalogParameter[]>;
|
|
980
|
+
/** `GET /catalog/forms` — i form realizzati a mano nel frontend applicativo (§5.1). */
|
|
981
|
+
abstract listForms(): Promise<FlowCatalogEntry[]>;
|
|
982
|
+
/** `GET /catalog/forms/{name}/parameters` */
|
|
983
|
+
abstract listFormParameters(formName: string): Promise<FlowCatalogParameter[]>;
|
|
984
|
+
/** `GET /catalog/enum-types` — per `objectType` delle risorse `Enum`. */
|
|
985
|
+
abstract listEnumTypes(): Promise<FlowCatalogEntry[]>;
|
|
986
|
+
/** `GET /catalog/events` — per gli eventi di un Wait. */
|
|
987
|
+
abstract listEvents(): Promise<FlowCatalogEntry[]>;
|
|
988
|
+
/**
|
|
989
|
+
* `GET /flows/subflow-candidates?excluding=` — solo i flow con una versione attiva,
|
|
990
|
+
* escluso quello corrente (§5.9).
|
|
991
|
+
*/
|
|
992
|
+
abstract listSubflowCandidates(excluding?: string): Promise<FlowSummary[]>;
|
|
993
|
+
/**
|
|
994
|
+
* `POST /interviews` — avvia. Ricorda: `status: 'Failed'` **non** e' un errore
|
|
995
|
+
* di trasporto, e `debug: true` popola `trace` e `resources` con dati che
|
|
996
|
+
* possono essere personali (§6.5).
|
|
997
|
+
*/
|
|
998
|
+
startInterview(request: FlowStartInterviewRequest): Promise<FlowInterviewResult>;
|
|
999
|
+
/** `POST /interviews/screen` — il `continuationToken` va rimandato tale e quale (§13.12). */
|
|
1000
|
+
respondToScreen(request: FlowScreenResponseRequest): Promise<FlowInterviewResult>;
|
|
1001
|
+
/** `POST /interviews/resume` — riprende un'esecuzione in pausa. */
|
|
1002
|
+
resumeInterview(request: FlowResumeRequest): Promise<FlowInterviewResult>;
|
|
1003
|
+
/** `GET /interviews/{key}` — ispeziona una sospesa senza consumarla. */
|
|
1004
|
+
inspectInterview(interviewKey: string): Promise<FlowInterviewResult>;
|
|
1005
|
+
/** `DELETE /interviews/{key}` — abbandona. */
|
|
1006
|
+
abandonInterview(interviewKey: string): Promise<void>;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Implementazione HTTP dell'interfaccia {@link FlowBuilderApi}, sulle rotte proposte
|
|
1011
|
+
* dalla §6 di FRONTEND.md.
|
|
1012
|
+
*
|
|
1013
|
+
* I percorsi HTTP della specifica sono **una proposta**: le rotte definitive le decide
|
|
1014
|
+
* chi scrive i controller. Se le vostre differiscono, ci sono due strade e nessuna
|
|
1015
|
+
* tocca l'editor:
|
|
1016
|
+
* 1. estendere questa classe e sovrascrivere i soli metodi con rotta diversa;
|
|
1017
|
+
* 2. scrivere un'altra implementazione di `FlowBuilderApi` da zero.
|
|
1018
|
+
*
|
|
1019
|
+
* Qui vive l'unica conoscenza di HTTP della libreria, incluso il compito di tradurre
|
|
1020
|
+
* status e payload in {@link FlowApiError} categorizzati (§10).
|
|
1021
|
+
*/
|
|
1022
|
+
|
|
1023
|
+
interface FlowBuilderHttpConfig {
|
|
1024
|
+
/** Prefisso comune, es. `/api` o `https://host/api`. Senza slash finale. */
|
|
1025
|
+
baseUrl?: string;
|
|
1026
|
+
}
|
|
1027
|
+
declare const FLOW_BUILDER_HTTP_CONFIG: InjectionToken<FlowBuilderHttpConfig>;
|
|
1028
|
+
declare class HttpFlowBuilderApi extends FlowBuilderApi {
|
|
1029
|
+
private readonly http;
|
|
1030
|
+
private readonly config;
|
|
1031
|
+
protected url(path: string): string;
|
|
1032
|
+
/** Punto unico in cui un errore di trasporto diventa un errore di dominio. */
|
|
1033
|
+
protected request<T>(call: Promise<T>): Promise<T>;
|
|
1034
|
+
protected toApiError(error: unknown): FlowApiError;
|
|
1035
|
+
private get;
|
|
1036
|
+
private post;
|
|
1037
|
+
private put;
|
|
1038
|
+
private del;
|
|
1039
|
+
private static params;
|
|
1040
|
+
private static segment;
|
|
1041
|
+
listFlows(query?: FlowListQuery): Promise<FlowSummary[]>;
|
|
1042
|
+
listVersions(flowName: string): Promise<FlowVersionSummary[]>;
|
|
1043
|
+
loadFlow(flowName: string, version?: number): Promise<FlowDefinition>;
|
|
1044
|
+
exportFlow(flowName: string, query?: FlowExportQuery): Promise<string>;
|
|
1045
|
+
parseFlow(definition: unknown): Promise<FlowDefinition>;
|
|
1046
|
+
createFlow(request: FlowCreateRequest): Promise<FlowSaveResult>;
|
|
1047
|
+
saveFlow(flowName: string, request: FlowSaveRequest): Promise<FlowSaveResult>;
|
|
1048
|
+
createVersion(flowName: string, request?: FlowNewVersionRequest): Promise<FlowSaveResult>;
|
|
1049
|
+
cloneFlow(flowName: string, request: FlowCloneRequest): Promise<FlowSaveResult>;
|
|
1050
|
+
activateVersion(flowName: string, version: number): Promise<FlowSaveResult>;
|
|
1051
|
+
deactivateFlow(flowName: string): Promise<void>;
|
|
1052
|
+
deleteVersion(flowName: string, version: number): Promise<void>;
|
|
1053
|
+
deleteFlow(flowName: string): Promise<void>;
|
|
1054
|
+
validateDefinition(definition: FlowDefinition): Promise<FlowValidationResult>;
|
|
1055
|
+
validateVersion(flowName: string, version: number): Promise<FlowValidationResult>;
|
|
1056
|
+
getDictionaries(): Promise<FlowDictionaries>;
|
|
1057
|
+
getReferences(query: FlowReferenceQuery): Promise<FlowReference[]>;
|
|
1058
|
+
getWritableReferences(query: FlowReferenceQuery): Promise<FlowReference[]>;
|
|
1059
|
+
getConnectorTargets(definition: FlowDefinition, excluding?: string): Promise<FlowConnectorTarget[]>;
|
|
1060
|
+
getOutline(definition: FlowDefinition): Promise<FlowOutline>;
|
|
1061
|
+
listObjects(): Promise<FlowObjectSummary[]>;
|
|
1062
|
+
describeObject(object: string): Promise<FlowObjectDescription>;
|
|
1063
|
+
listFields(object: string, usage?: FlowFieldUsage): Promise<FlowObjectDescription['fields']>;
|
|
1064
|
+
listFieldValues(object: string, field: string): Promise<FlowFieldValue[]>;
|
|
1065
|
+
listActionTypes(): Promise<FlowCatalogEntry[]>;
|
|
1066
|
+
listActions(actionType?: string): Promise<FlowCatalogEntry[]>;
|
|
1067
|
+
listActionParameters(actionType: string, actionName: string): Promise<FlowCatalogParameter[]>;
|
|
1068
|
+
listScripts(): Promise<FlowCatalogEntry[]>;
|
|
1069
|
+
listScriptParameters(scriptName: string): Promise<FlowCatalogParameter[]>;
|
|
1070
|
+
listForms(): Promise<FlowCatalogEntry[]>;
|
|
1071
|
+
listFormParameters(formName: string): Promise<FlowCatalogParameter[]>;
|
|
1072
|
+
listEnumTypes(): Promise<FlowCatalogEntry[]>;
|
|
1073
|
+
listEvents(): Promise<FlowCatalogEntry[]>;
|
|
1074
|
+
listSubflowCandidates(excluding?: string): Promise<FlowSummary[]>;
|
|
1075
|
+
startInterview(request: FlowStartInterviewRequest): Promise<FlowInterviewResult>;
|
|
1076
|
+
respondToScreen(request: FlowScreenResponseRequest): Promise<FlowInterviewResult>;
|
|
1077
|
+
resumeInterview(request: FlowResumeRequest): Promise<FlowInterviewResult>;
|
|
1078
|
+
inspectInterview(interviewKey: string): Promise<FlowInterviewResult>;
|
|
1079
|
+
abandonInterview(interviewKey: string): Promise<void>;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Le uscite di ogni tipo di elemento — FRONTEND.md §3.5.
|
|
1084
|
+
*
|
|
1085
|
+
* Un connector e' sempre `{ targetReference, isGoTo }`. Quello che cambia e' **in quale
|
|
1086
|
+
* campo** vive, e il campo dipende dal tipo di elemento. Questo file e' l'unica sede di
|
|
1087
|
+
* quella mappa: canvas, inspector e outline locale la leggono da qui, invece di ripetere
|
|
1088
|
+
* `node['faultConnector']` in venti punti.
|
|
1089
|
+
*
|
|
1090
|
+
* Ogni uscita e' descritta da una chiave stabile piu' due accessori. La chiave finisce
|
|
1091
|
+
* nell'id del connettore sul canvas (`out:<node>:<key>`), quindi deve restare uguale fra
|
|
1092
|
+
* un render e l'altro: per i rami indicizzati (regole, eventi, scheduled path) usa
|
|
1093
|
+
* l'**indice** dentro la chiave.
|
|
1094
|
+
*
|
|
1095
|
+
* Nota: `Transform.connector` e' un array e `start` e' un array di uno, entrambi per
|
|
1096
|
+
* fedelta' storica; gli accessori qui sotto lo nascondono al resto della libreria.
|
|
1097
|
+
*/
|
|
1098
|
+
|
|
1099
|
+
/** Nome fittizio dello Start sul canvas: nel documento non ha `name` (§6.4, `from: null`). */
|
|
1100
|
+
declare const START_NODE_NAME = "$start";
|
|
1101
|
+
interface FlowOutlet {
|
|
1102
|
+
/** Stabile fra i render: entra nell'id del connettore del canvas. */
|
|
1103
|
+
key: string;
|
|
1104
|
+
/** Determina lo stile dell'arco: `Fault` rosso, `Rule` etichettato, … (§6.4). */
|
|
1105
|
+
kind: FlowConnectionKind;
|
|
1106
|
+
/** Etichetta mostrata sul connettore e nel form. */
|
|
1107
|
+
label: string;
|
|
1108
|
+
/** Etichetta di ramo definita dall'autore (label della regola, dell'evento). */
|
|
1109
|
+
branchLabel?: string | null;
|
|
1110
|
+
/**
|
|
1111
|
+
* `true` → l'assenza del connector e' un problema strutturale, non la fine legittima
|
|
1112
|
+
* di un percorso: il corpo di un Loop (§3.5).
|
|
1113
|
+
*/
|
|
1114
|
+
isStructural?: boolean;
|
|
1115
|
+
read(node: FlowAnyNode): FlowConnector | undefined;
|
|
1116
|
+
write(node: FlowAnyNode, connector: FlowConnector | undefined): void;
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Le uscite di un node, nell'ordine in cui vanno mostrate.
|
|
1120
|
+
* `type` e' il discriminatore di `elementTypes`; per lo Start passa `'Start'`.
|
|
1121
|
+
*/
|
|
1122
|
+
declare function outletsOf(type: FlowElementType, node: FlowAnyNode): FlowOutlet[];
|
|
1123
|
+
/** Trova un'uscita per chiave. */
|
|
1124
|
+
declare function outletByKey(type: FlowElementType, node: FlowAnyNode, key: string): FlowOutlet | undefined;
|
|
1125
|
+
/**
|
|
1126
|
+
* Mappa di fallback tipo → collection, usata quando il dizionario `elementTypes` non e'
|
|
1127
|
+
* disponibile. La fonte autoritativa resta `metadataProperty` del dizionario (§3.2).
|
|
1128
|
+
*/
|
|
1129
|
+
declare const FALLBACK_COLLECTION_BY_TYPE: Record<string, FlowNodeCollection>;
|
|
1130
|
+
/** Inverso della mappa: serve al flatten in lettura (§3.1). */
|
|
1131
|
+
declare const TYPE_BY_COLLECTION: Record<string, FlowElementType>;
|
|
1132
|
+
/** Etichette di fallback, se il dizionario non e' caricato. */
|
|
1133
|
+
declare const FALLBACK_TYPE_LABEL: Record<string, string>;
|
|
1134
|
+
/** I tre tipi che il motore rifiuta: nascosti dalla palette (§3.2, §13.9). */
|
|
1135
|
+
declare const UNSUPPORTED_TYPES: ReadonlySet<string>;
|
|
1136
|
+
/** Elementi che espongono il proprio risultato sotto il nome dell'elemento (§4.5). */
|
|
1137
|
+
declare const TYPES_WITH_AUTOMATIC_OUTPUT: ReadonlySet<string>;
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Il glifo di ogni tipo di elemento.
|
|
1141
|
+
*
|
|
1142
|
+
* Sono caratteri Unicode, non icone: la libreria non porta asset e non dipende da un font di
|
|
1143
|
+
* icone dell'applicazione ospite. Sta in `core` e non nel canvas perche' lo stesso glifo deve
|
|
1144
|
+
* comparire sulla palette e sul node: se divergessero, l'elemento trascinato non
|
|
1145
|
+
* assomiglierebbe a quello che compare sul canvas.
|
|
1146
|
+
*/
|
|
1147
|
+
declare const FLOW_ELEMENT_ICONS: Record<string, string>;
|
|
1148
|
+
/**
|
|
1149
|
+
* Il glifo del tipo. Per un tipo che il dizionario del backend aggiunge e questa mappa non
|
|
1150
|
+
* conosce, l'iniziale dell'etichetta e' un segnaposto migliore di un simbolo generico.
|
|
1151
|
+
*/
|
|
1152
|
+
declare function elementIcon(type: string, label?: string): string;
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* Nomi — FRONTEND.md §3.3, §13.5.
|
|
1156
|
+
*
|
|
1157
|
+
* Tre regole, tutte e tre implementate qui:
|
|
1158
|
+
* 1. `^[A-Za-z][A-Za-z0-9_]*$` — niente punti (i riferimenti si spezzano sul punto),
|
|
1159
|
+
* niente spazi, niente `$`;
|
|
1160
|
+
* 2. node e risorse condividono **un unico** spazio di nomi;
|
|
1161
|
+
* 3. il confronto e' **case-insensitive**.
|
|
1162
|
+
*/
|
|
1163
|
+
declare const FLOW_NAME_PATTERN: RegExp;
|
|
1164
|
+
type FlowNameProblem = 'empty' | 'pattern' | 'duplicate';
|
|
1165
|
+
interface FlowNameCheck {
|
|
1166
|
+
isValid: boolean;
|
|
1167
|
+
problem?: FlowNameProblem;
|
|
1168
|
+
message?: string;
|
|
1169
|
+
}
|
|
1170
|
+
/** Verifica solo la forma. */
|
|
1171
|
+
declare function isValidFlowName(name: string | undefined | null): boolean;
|
|
1172
|
+
/**
|
|
1173
|
+
* Verifica forma **e** unicita' contro l'insieme dei nomi già usati.
|
|
1174
|
+
* `currentName` esclude se stesso dal controllo, per non segnalare un elemento in modifica.
|
|
1175
|
+
*/
|
|
1176
|
+
declare function checkFlowName(name: string | undefined | null, usedNames: Iterable<string>, currentName?: string | null): FlowNameCheck;
|
|
1177
|
+
/**
|
|
1178
|
+
* Genera il nome tecnico da una label: `"Approva ordine"` → `Approva_Ordine` (§3.3).
|
|
1179
|
+
* Va lasciato modificabile finche' l'elemento e' nuovo.
|
|
1180
|
+
*/
|
|
1181
|
+
declare function slugifyFlowName(label: string | undefined | null): string;
|
|
1182
|
+
/**
|
|
1183
|
+
* Genera un nome libero a partire da una base, aggiungendo un suffisso numerico.
|
|
1184
|
+
* `Decisione`, `Decisione_1`, `Decisione_2`, …
|
|
1185
|
+
*/
|
|
1186
|
+
declare function uniqueFlowName(base: string, usedNames: Iterable<string>): string;
|
|
1187
|
+
/**
|
|
1188
|
+
* La prima parte di un riferimento, cioe' il nome che deve esistere.
|
|
1189
|
+
* `Cliente.Email` → `Cliente`; `$Record.Stato` → `$Record`; `Importo` → `Importo`.
|
|
1190
|
+
*/
|
|
1191
|
+
declare function referenceRoot(reference: string | undefined | null): string;
|
|
1192
|
+
/** `true` se il riferimento e' una variabile globale (`$Record`, `$Flow`, `$User`, …). */
|
|
1193
|
+
declare function isGlobalReference(reference: string | undefined | null): boolean;
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* `conditionLogic` — FRONTEND.md §4.3 e trappola §13.4.
|
|
1197
|
+
*
|
|
1198
|
+
* L'espressione custom referenzia gli **indici 1-based** delle condizioni. Se l'editor
|
|
1199
|
+
* cancella o riordina una condizione, gli indici scalano e l'espressione va riscritta:
|
|
1200
|
+
* senza, si ottiene un `CONDITION_LOGIC_INVALID` o — peggio — un'espressione valida che
|
|
1201
|
+
* punta alla condizione sbagliata.
|
|
1202
|
+
*/
|
|
1203
|
+
|
|
1204
|
+
/** Le tre forme non-espressione. `and` e' anche il default quando il campo e' assente. */
|
|
1205
|
+
declare function isCustomConditionLogic(logic: FlowConditionLogic | undefined): boolean;
|
|
1206
|
+
/**
|
|
1207
|
+
* Riscrive un'espressione custom dopo che le condizioni sono state rimappate.
|
|
1208
|
+
*
|
|
1209
|
+
* `mapping[oldIndex0Based]` = nuovo indice 0-based, oppure `-1` se la condizione e' stata
|
|
1210
|
+
* cancellata. Un indice cancellato non puo' essere rimpiazzato da niente di sensato: il
|
|
1211
|
+
* termine viene sostituito da un segnaposto e la funzione lo segnala, così la UI puo'
|
|
1212
|
+
* avvisare che l'espressione va rivista.
|
|
1213
|
+
*/
|
|
1214
|
+
declare function remapConditionLogic(logic: string, mapping: number[]): {
|
|
1215
|
+
logic: string;
|
|
1216
|
+
hasDroppedTerms: boolean;
|
|
1217
|
+
};
|
|
1218
|
+
/**
|
|
1219
|
+
* Rimuove la condizione all'indice indicato e aggiorna `conditionLogic` di conseguenza.
|
|
1220
|
+
* Muta l'oggetto passato (che nello store e' già una copia di lavoro).
|
|
1221
|
+
*/
|
|
1222
|
+
declare function removeCondition(holder: FlowConditionHolder, index: number): {
|
|
1223
|
+
hasDroppedTerms: boolean;
|
|
1224
|
+
};
|
|
1225
|
+
/** Sposta una condizione e riscrive l'espressione perche' punti agli stessi termini. */
|
|
1226
|
+
declare function moveCondition(holder: FlowConditionHolder, from: number, to: number): void;
|
|
1227
|
+
/**
|
|
1228
|
+
* Verifica che un'espressione custom sia sintatticamente accettabile e che ogni indice
|
|
1229
|
+
* esista. Serve al feedback immediato nel form: la verita' resta della validazione
|
|
1230
|
+
* del backend (`CONDITION_LOGIC_INVALID`).
|
|
1231
|
+
*/
|
|
1232
|
+
declare function checkConditionLogic(logic: string, conditionCount: number): string | null;
|
|
1233
|
+
|
|
1234
|
+
/** Un node come lo vede l'editor: il node piu' da dove viene. */
|
|
1235
|
+
interface FlowNodeRef {
|
|
1236
|
+
name: string;
|
|
1237
|
+
type: FlowElementType;
|
|
1238
|
+
collection: FlowNodeCollection;
|
|
1239
|
+
index: number;
|
|
1240
|
+
node: FlowAnyNode;
|
|
1241
|
+
}
|
|
1242
|
+
/** Un arco derivato dal documento, con la sua origine precisa. */
|
|
1243
|
+
interface FlowEdge {
|
|
1244
|
+
/** Id stabile: `<sorgente>|<chiave uscita>`. */
|
|
1245
|
+
id: string;
|
|
1246
|
+
/** `$start` per gli archi uscenti dallo Start. */
|
|
1247
|
+
from: string;
|
|
1248
|
+
/** `undefined` → il connector esiste ma non ha destinazione: ramo incompleto (§6.4). */
|
|
1249
|
+
to?: string;
|
|
1250
|
+
outletKey: string;
|
|
1251
|
+
kind: FlowConnectionKind;
|
|
1252
|
+
label?: string | null;
|
|
1253
|
+
isGoTo?: boolean;
|
|
1254
|
+
}
|
|
1255
|
+
/** Una risorsa come la vede l'editor. */
|
|
1256
|
+
interface FlowResourceRef {
|
|
1257
|
+
name: string;
|
|
1258
|
+
collection: FlowResourceCollection;
|
|
1259
|
+
index: number;
|
|
1260
|
+
resource: Record<string, unknown>;
|
|
1261
|
+
}
|
|
1262
|
+
/** Documento minimo per un flow nuovo (§11, "Creare un flow"). */
|
|
1263
|
+
declare function emptyFlowDefinition(fullName: string, label: string, processType: string): FlowDefinition;
|
|
1264
|
+
declare class FlowDocumentStore {
|
|
1265
|
+
private readonly _document;
|
|
1266
|
+
private readonly _isDirty;
|
|
1267
|
+
private readonly _undoStack;
|
|
1268
|
+
private readonly _redoStack;
|
|
1269
|
+
/** Il documento in lavorazione. Sola lettura: si modifica con i metodi di questo store. */
|
|
1270
|
+
readonly document: _angular_core.Signal<FlowDefinition>;
|
|
1271
|
+
readonly isDirty: _angular_core.Signal<boolean>;
|
|
1272
|
+
readonly canUndo: _angular_core.Signal<boolean>;
|
|
1273
|
+
readonly canRedo: _angular_core.Signal<boolean>;
|
|
1274
|
+
/** §3.4 — l'elemento Start: array di uno, usa sempre il primo. */
|
|
1275
|
+
readonly start: _angular_core.Signal<FlowStart>;
|
|
1276
|
+
/** §3.1 — tutte le collection appiattite in un'unica lista di node. */
|
|
1277
|
+
readonly nodes: _angular_core.Signal<FlowNodeRef[]>;
|
|
1278
|
+
readonly nodeByName: _angular_core.Signal<Map<string, FlowNodeRef>>;
|
|
1279
|
+
readonly resources: _angular_core.Signal<FlowResourceRef[]>;
|
|
1280
|
+
/**
|
|
1281
|
+
* §3.3 — l'insieme dei nomi già usati: node **e** risorse, un unico spazio di nomi.
|
|
1282
|
+
* Il controllo di unicita' che guarda solo le variabili lascia passare una variabile
|
|
1283
|
+
* omonima di un node (§13.5).
|
|
1284
|
+
*/
|
|
1285
|
+
readonly usedNames: _angular_core.Signal<string[]>;
|
|
1286
|
+
/** Gli archi derivati dal documento, Start incluso. */
|
|
1287
|
+
readonly edges: _angular_core.Signal<FlowEdge[]>;
|
|
1288
|
+
/**
|
|
1289
|
+
* Raggiungibilita' calcolata localmente, per un feedback immediato mentre si disegna.
|
|
1290
|
+
* La fonte autoritativa resta `isReachable` di `POST /flows/outline` (§6.4): questa e'
|
|
1291
|
+
* un'anticipazione, non un sostituto.
|
|
1292
|
+
*/
|
|
1293
|
+
readonly reachableNames: _angular_core.Signal<ReadonlySet<string>>;
|
|
1294
|
+
/** Carica un documento dal backend: azzera storico e flag di modifica. */
|
|
1295
|
+
load(definition: FlowDefinition): void;
|
|
1296
|
+
/** Dopo un salvataggio riuscito: il documento resta, la modifica non e' piu' pendente. */
|
|
1297
|
+
markSaved(): void;
|
|
1298
|
+
/**
|
|
1299
|
+
* Applica una modifica al documento.
|
|
1300
|
+
* Il mutatore riceve una **copia** e la modifica liberamente; lo store si occupa di
|
|
1301
|
+
* storico e di sostituire il riferimento (nuovo oggetto → i signal derivati ricalcolano).
|
|
1302
|
+
*/
|
|
1303
|
+
update(mutate: (draft: FlowDefinition) => void, options?: {
|
|
1304
|
+
silent?: boolean;
|
|
1305
|
+
}): void;
|
|
1306
|
+
private pushHistory;
|
|
1307
|
+
undo(): void;
|
|
1308
|
+
redo(): void;
|
|
1309
|
+
/** Inserisce un node nella collection indicata dal dizionario (`metadataProperty`). */
|
|
1310
|
+
addNode(collection: FlowNodeCollection, node: FlowAnyNode): void;
|
|
1311
|
+
/** Modifica un node per nome. Il mutatore riceve la copia di lavoro. */
|
|
1312
|
+
updateNode(name: string, mutate: (node: FlowAnyNode) => void, options?: {
|
|
1313
|
+
silent?: boolean;
|
|
1314
|
+
}): void;
|
|
1315
|
+
/** Modifica lo Start. */
|
|
1316
|
+
updateStart(mutate: (start: FlowStart) => void, options?: {
|
|
1317
|
+
silent?: boolean;
|
|
1318
|
+
}): void;
|
|
1319
|
+
/**
|
|
1320
|
+
* Sposta un node sul canvas. `silent` per non riempire lo storico durante il drag:
|
|
1321
|
+
* il chiamante registra un solo passo alla fine del gesto.
|
|
1322
|
+
*/
|
|
1323
|
+
moveNode(name: string, x: number, y: number, options?: {
|
|
1324
|
+
silent?: boolean;
|
|
1325
|
+
}): void;
|
|
1326
|
+
/**
|
|
1327
|
+
* Rimuove un node **e** ogni connector che lo referenzia: un `targetReference` orfano
|
|
1328
|
+
* e' `CONNECTOR_TARGET_UNKNOWN`, cioe' un errore che blocca l'attivazione (§7).
|
|
1329
|
+
*/
|
|
1330
|
+
removeNode(name: string): void;
|
|
1331
|
+
/** Azzera i connector che puntano a un node scomparso, Start compreso. */
|
|
1332
|
+
private static clearReferencesTo;
|
|
1333
|
+
/**
|
|
1334
|
+
* Rinomina un node riscrivendo **tutti** i riferimenti che lo raggiungono.
|
|
1335
|
+
* Nessuna primitiva del backend lo fa (§13.8): se l'editor offre la rinomina, la
|
|
1336
|
+
* riscrittura la deve fare lui. Copre `targetReference`, i riferimenti a risorsa e i
|
|
1337
|
+
* riferimenti a output automatico (`Vecchio.Campo` → `Nuovo.Campo`).
|
|
1338
|
+
*/
|
|
1339
|
+
renameNode(oldName: string, newName: string): void;
|
|
1340
|
+
/** Rinomina una risorsa, riscrivendo i riferimenti che la usano. */
|
|
1341
|
+
renameResource(collection: FlowResourceCollection, index: number, newName: string): void;
|
|
1342
|
+
/**
|
|
1343
|
+
* Riscrive ogni occorrenza di un nome nei campi che contengono riferimenti.
|
|
1344
|
+
* Cammina l'intero documento: e' l'unico modo per non dimenticare un campo, dato che
|
|
1345
|
+
* i riferimenti compaiono in una ventina di posti diversi (§4).
|
|
1346
|
+
*/
|
|
1347
|
+
private static rewriteReferences;
|
|
1348
|
+
/** Duplica un node con un nome nuovo, senza copiarne le uscite. */
|
|
1349
|
+
duplicateNode(name: string, newName: string, offset?: {
|
|
1350
|
+
x: number;
|
|
1351
|
+
y: number;
|
|
1352
|
+
}): void;
|
|
1353
|
+
/** Scrive la destinazione di un'uscita. `target` assente → il ramo resta incompleto. */
|
|
1354
|
+
setConnector(fromName: string, outletKey: string, target: string | undefined, isGoTo?: boolean): void;
|
|
1355
|
+
/** Rimuove un arco: il percorso finisce lì, che e' legittimo (§3.5). */
|
|
1356
|
+
removeConnector(fromName: string, outletKey: string): void;
|
|
1357
|
+
addResource(collection: FlowResourceCollection, resource: Record<string, unknown>): void;
|
|
1358
|
+
updateResource(collection: FlowResourceCollection, index: number, mutate: (resource: Record<string, unknown>) => void): void;
|
|
1359
|
+
removeResource(collection: FlowResourceCollection, index: number): void;
|
|
1360
|
+
/** Modifica i campi del documento radice (label, description, processType, …). */
|
|
1361
|
+
updateHeader(mutate: (definition: FlowDefinition) => void, options?: {
|
|
1362
|
+
silent?: boolean;
|
|
1363
|
+
}): void;
|
|
1364
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlowDocumentStore, never>;
|
|
1365
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlowDocumentStore>;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
declare class FlowDictionaryStore {
|
|
1369
|
+
private readonly api;
|
|
1370
|
+
private readonly _dictionaries;
|
|
1371
|
+
private readonly _isLoaded;
|
|
1372
|
+
private loading?;
|
|
1373
|
+
readonly dictionaries: _angular_core.Signal<FlowDictionaries>;
|
|
1374
|
+
readonly isLoaded: _angular_core.Signal<boolean>;
|
|
1375
|
+
/** Idempotente: chiamabile da ogni componente che ne ha bisogno. */
|
|
1376
|
+
load(): Promise<void>;
|
|
1377
|
+
readonly dataTypes: _angular_core.Signal<FlowDataTypeEntry[]>;
|
|
1378
|
+
readonly comparisonOperators: _angular_core.Signal<FlowComparisonOperatorEntry[]>;
|
|
1379
|
+
readonly assignmentOperators: _angular_core.Signal<_esfaenza_flow_builder.FlowAssignmentOperatorEntry[]>;
|
|
1380
|
+
readonly recordFilterOperators: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1381
|
+
readonly resourceKinds: _angular_core.Signal<_esfaenza_flow_builder.FlowResourceKindEntry[]>;
|
|
1382
|
+
readonly globalVariables: _angular_core.Signal<FlowGlobalVariableEntry[]>;
|
|
1383
|
+
readonly processTypes: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1384
|
+
readonly triggerTypes: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1385
|
+
readonly recordTriggerTypes: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1386
|
+
readonly startFrequencies: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1387
|
+
readonly offsetUnits: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1388
|
+
readonly sortOrders: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1389
|
+
readonly collectionProcessorTypes: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1390
|
+
readonly transformTypes: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1391
|
+
readonly transactionModels: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1392
|
+
readonly waitEventTypes: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1393
|
+
readonly conditionLogicModes: _angular_core.Signal<FlowDictionaryEntry[]>;
|
|
1394
|
+
readonly elementTypes: _angular_core.Signal<FlowElementTypeEntry[]>;
|
|
1395
|
+
/**
|
|
1396
|
+
* I tipi mostrabili nella palette: `isSupported: false` va nascosto (§3.2, §13.9).
|
|
1397
|
+
* Il filtro passa per la colonna del dizionario, non per una lista cablata; l'insieme
|
|
1398
|
+
* locale {@link UNSUPPORTED_TYPES} interviene solo se il dizionario non dichiara il flag.
|
|
1399
|
+
*/
|
|
1400
|
+
readonly paletteTypes: _angular_core.Signal<FlowElementTypeEntry[]>;
|
|
1401
|
+
/** Le categorie della palette, nell'ordine di prima apparizione nel dizionario. */
|
|
1402
|
+
readonly paletteCategories: _angular_core.Signal<string[]>;
|
|
1403
|
+
elementType(value: string): FlowElementTypeEntry | undefined;
|
|
1404
|
+
/** La collection in cui scrivere un node: `metadataProperty`, con fallback locale (§3.2). */
|
|
1405
|
+
collectionOf(type: string): FlowNodeCollection | undefined;
|
|
1406
|
+
/** Etichetta di un tipo, con fallback: un tipo sconosciuto mostra il proprio `value`. */
|
|
1407
|
+
labelOf(type: string): string;
|
|
1408
|
+
hasFaultConnector(type: string): boolean;
|
|
1409
|
+
hasAutomaticOutput(type: string): boolean;
|
|
1410
|
+
/** Etichetta di una voce di dizionario, con fallback sul valore grezzo. */
|
|
1411
|
+
static labelIn(entries: FlowDictionaryEntry[], value: string | undefined | null): string;
|
|
1412
|
+
operator(value: string | undefined | null): FlowComparisonOperatorEntry | undefined;
|
|
1413
|
+
/**
|
|
1414
|
+
* §13.1 — per gli operatori unari `rightValue` e' l'esito atteso, non un termine di
|
|
1415
|
+
* confronto. Il flag arriva dal dizionario (`isUnary`).
|
|
1416
|
+
*/
|
|
1417
|
+
isUnaryOperator(value: string | undefined | null): boolean;
|
|
1418
|
+
/** §4.3 — `WasVisited` e `HasError` vogliono a sinistra il nome di un **node**. */
|
|
1419
|
+
operatorAppliesToElements(value: string | undefined | null): boolean;
|
|
1420
|
+
/** §5.2 — operatore che ha senso solo su destinazioni collection. */
|
|
1421
|
+
assignmentExpectsCollection(value: string | undefined | null): boolean;
|
|
1422
|
+
/**
|
|
1423
|
+
* Operatori applicabili al tipo del lato sinistro: `appliesTo` vuoto = qualunque tipo (§4.3).
|
|
1424
|
+
*/
|
|
1425
|
+
operatorsFor(dataType: FlowDataType | undefined): FlowComparisonOperatorEntry[];
|
|
1426
|
+
dataType(value: string | undefined | null): FlowDataTypeEntry | undefined;
|
|
1427
|
+
/** §4.6 — `Object` ed `Enum` richiedono `objectType`. */
|
|
1428
|
+
requiresObjectType(dataType: string | undefined | null): boolean;
|
|
1429
|
+
/** §4.6 — `scale` si applica solo ai numerici. */
|
|
1430
|
+
supportsScale(dataType: string | undefined | null): boolean;
|
|
1431
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlowDictionaryStore, never>;
|
|
1432
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlowDictionaryStore>;
|
|
1433
|
+
}
|
|
1434
|
+
declare class FlowCatalogStore {
|
|
1435
|
+
private readonly api;
|
|
1436
|
+
private readonly objectsCache;
|
|
1437
|
+
private readonly fieldsCache;
|
|
1438
|
+
private readonly fieldValuesCache;
|
|
1439
|
+
private readonly entriesCache;
|
|
1440
|
+
private readonly parametersCache;
|
|
1441
|
+
/**
|
|
1442
|
+
* Una lista vuota significa "non lo so", non "nessuno": con il catalogo non popolato la
|
|
1443
|
+
* validazione salta i controlli invece di produrre falsi allarmi (§7). L'editor fa lo
|
|
1444
|
+
* stesso: se la lista e' vuota, lascia il campo libero invece di bloccarlo.
|
|
1445
|
+
*/
|
|
1446
|
+
listObjects(): Promise<FlowObjectSummary[]>;
|
|
1447
|
+
listFields(object: string, usage?: FlowFieldUsage): Promise<FlowFieldDescription[]>;
|
|
1448
|
+
listFieldValues(object: string, field: string): Promise<Array<{
|
|
1449
|
+
value: string;
|
|
1450
|
+
label?: string | null;
|
|
1451
|
+
}>>;
|
|
1452
|
+
listActionTypes(): Promise<FlowCatalogEntry[]>;
|
|
1453
|
+
listActions(actionType?: string): Promise<FlowCatalogEntry[]>;
|
|
1454
|
+
listActionParameters(actionType: string, actionName: string): Promise<FlowCatalogParameter[]>;
|
|
1455
|
+
listScripts(): Promise<FlowCatalogEntry[]>;
|
|
1456
|
+
listScriptParameters(scriptName: string): Promise<FlowCatalogParameter[]>;
|
|
1457
|
+
listForms(): Promise<FlowCatalogEntry[]>;
|
|
1458
|
+
listFormParameters(formName: string): Promise<FlowCatalogParameter[]>;
|
|
1459
|
+
listEnumTypes(): Promise<FlowCatalogEntry[]>;
|
|
1460
|
+
listEvents(): Promise<FlowCatalogEntry[]>;
|
|
1461
|
+
/** Da chiamare se lo schema cambia sotto i piedi (raro, ma il comando esiste). */
|
|
1462
|
+
clear(): void;
|
|
1463
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlowCatalogStore, never>;
|
|
1464
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlowCatalogStore>;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
declare class FlowValidationStore {
|
|
1468
|
+
private readonly api;
|
|
1469
|
+
private readonly destroyRef;
|
|
1470
|
+
private readonly _result;
|
|
1471
|
+
private readonly _isRunning;
|
|
1472
|
+
private readonly _lastError;
|
|
1473
|
+
private timer?;
|
|
1474
|
+
/** Cresce a ogni richiesta: scarta le risposte di validazioni superate. */
|
|
1475
|
+
private sequence;
|
|
1476
|
+
readonly result: _angular_core.Signal<FlowValidationResult | null>;
|
|
1477
|
+
readonly isRunning: _angular_core.Signal<boolean>;
|
|
1478
|
+
readonly lastError: _angular_core.Signal<string | null>;
|
|
1479
|
+
readonly issues: _angular_core.Signal<FlowValidationIssue[]>;
|
|
1480
|
+
readonly errorCount: _angular_core.Signal<number>;
|
|
1481
|
+
readonly warningCount: _angular_core.Signal<number>;
|
|
1482
|
+
readonly infoCount: _angular_core.Signal<number>;
|
|
1483
|
+
/**
|
|
1484
|
+
* `false` finche' non e' arrivata una validazione: non presentare l'assenza di rilievi
|
|
1485
|
+
* come garanzia di correttezza (§7, ultimo capoverso).
|
|
1486
|
+
*/
|
|
1487
|
+
readonly hasResult: _angular_core.Signal<boolean>;
|
|
1488
|
+
/** Zero errori: e' la condizione che l'attivazione esige (§8.3). */
|
|
1489
|
+
readonly canActivate: _angular_core.Signal<boolean>;
|
|
1490
|
+
/** Rilievi raggruppati per elemento, per l'evidenziazione sul canvas. */
|
|
1491
|
+
readonly issuesByElement: _angular_core.Signal<Map<string, FlowValidationIssue[]>>;
|
|
1492
|
+
/** I rilievi non ancorati a un elemento: riguardano il documento (§7, famiglia Definizione). */
|
|
1493
|
+
readonly documentIssues: _angular_core.Signal<FlowValidationIssue[]>;
|
|
1494
|
+
constructor();
|
|
1495
|
+
/** La gravita' peggiore su un elemento, per decidere il colore del node sul canvas. */
|
|
1496
|
+
severityOf(elementName: string): 'Error' | 'Warning' | 'Info' | null;
|
|
1497
|
+
/**
|
|
1498
|
+
* I rilievi che riguardano un campo dentro un elemento.
|
|
1499
|
+
* `path` e' del tipo `rules[Approvato].connector.targetReference`: il confronto e' per
|
|
1500
|
+
* prefisso, così `rules[Approvato]` cattura anche i rilievi piu' profondi.
|
|
1501
|
+
*/
|
|
1502
|
+
issuesAt(elementName: string | null, pathPrefix: string): FlowValidationIssue[];
|
|
1503
|
+
/** Programma una validazione dopo la pausa di digitazione (§11.4). */
|
|
1504
|
+
schedule(definition: FlowDefinition): void;
|
|
1505
|
+
/** Valida subito, saltando il debounce: prima di attivare, o su richiesta esplicita. */
|
|
1506
|
+
run(definition: FlowDefinition): Promise<FlowValidationResult | null>;
|
|
1507
|
+
/**
|
|
1508
|
+
* Sostituisce il risultato con quello arrivato da un'altra primitiva: il salvataggio
|
|
1509
|
+
* restituisce `validation` (§6.2) e l'attivazione fallita lo porta nel payload
|
|
1510
|
+
* dell'errore (§8.3). In entrambi i casi e' il risultato piu' fresco che esista.
|
|
1511
|
+
*/
|
|
1512
|
+
adopt(result: FlowValidationResult | undefined | null): void;
|
|
1513
|
+
clear(): void;
|
|
1514
|
+
private cancel;
|
|
1515
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlowValidationStore, never>;
|
|
1516
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlowValidationStore>;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
interface FlowLayoutNodeInput {
|
|
1520
|
+
name: string;
|
|
1521
|
+
width: number;
|
|
1522
|
+
height: number;
|
|
1523
|
+
}
|
|
1524
|
+
interface FlowLayoutResult {
|
|
1525
|
+
positions: Map<string, {
|
|
1526
|
+
x: number;
|
|
1527
|
+
y: number;
|
|
1528
|
+
}>;
|
|
1529
|
+
}
|
|
1530
|
+
type FlowLayoutDirection = 'TB' | 'LR';
|
|
1531
|
+
interface FlowLayoutOptions {
|
|
1532
|
+
direction?: FlowLayoutDirection;
|
|
1533
|
+
/** Distanza fra i livelli. */
|
|
1534
|
+
rankSeparation?: number;
|
|
1535
|
+
/** Distanza fra i node dello stesso livello. */
|
|
1536
|
+
nodeSeparation?: number;
|
|
1537
|
+
origin?: {
|
|
1538
|
+
x: number;
|
|
1539
|
+
y: number;
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
declare class FlowLayoutService {
|
|
1543
|
+
/**
|
|
1544
|
+
* Calcola le posizioni. Restituisce l'angolo in alto a sinistra di ogni node, perche'
|
|
1545
|
+
* e' cio' che `locationX`/`locationY` significano nel modello, mentre dagre ragiona in
|
|
1546
|
+
* centri.
|
|
1547
|
+
*/
|
|
1548
|
+
layout(nodes: FlowLayoutNodeInput[], edges: FlowEdge[], options?: FlowLayoutOptions): FlowLayoutResult;
|
|
1549
|
+
/**
|
|
1550
|
+
* Peso dell'arco: piu' alto = piu' dritto. Il percorso principale resta in colonna,
|
|
1551
|
+
* i rami di errore e di timeout si spostano di lato.
|
|
1552
|
+
*/
|
|
1553
|
+
private static weightOf;
|
|
1554
|
+
/** Lo Start apre sempre il grafo: utile per ordinare i node prima del layout. */
|
|
1555
|
+
static isStart(name: string): boolean;
|
|
1556
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlowLayoutService, never>;
|
|
1557
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlowLayoutService>;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
/** Cosa mostrare quando il salvataggio incontra una versione modificata da altri (§9). */
|
|
1561
|
+
interface FlowConflictState {
|
|
1562
|
+
message: string;
|
|
1563
|
+
conflictingAuthor?: string;
|
|
1564
|
+
}
|
|
1565
|
+
declare class FlowEditorSession {
|
|
1566
|
+
private readonly api;
|
|
1567
|
+
private readonly documentStore;
|
|
1568
|
+
private readonly validation;
|
|
1569
|
+
private readonly _flowName;
|
|
1570
|
+
private readonly _version;
|
|
1571
|
+
private readonly _versions;
|
|
1572
|
+
/** Conservato al caricamento, rimandato al salvataggio (§9.1, §9.2). */
|
|
1573
|
+
private readonly _expectedUpdatedAt;
|
|
1574
|
+
private readonly _isBusy;
|
|
1575
|
+
private readonly _lastSaveResult;
|
|
1576
|
+
private readonly _conflict;
|
|
1577
|
+
private readonly _author;
|
|
1578
|
+
readonly flowName: _angular_core.Signal<string | null>;
|
|
1579
|
+
readonly version: _angular_core.Signal<number | null>;
|
|
1580
|
+
readonly versions: _angular_core.Signal<FlowVersionSummary[]>;
|
|
1581
|
+
readonly isBusy: _angular_core.Signal<boolean>;
|
|
1582
|
+
readonly lastSaveResult: _angular_core.Signal<FlowSaveResult | null>;
|
|
1583
|
+
readonly conflict: _angular_core.Signal<FlowConflictState | null>;
|
|
1584
|
+
readonly expectedUpdatedAt: _angular_core.Signal<string | undefined>;
|
|
1585
|
+
/** `true` finche' il flow non e' mai stato salvato: il comando e' "Crea", non "Salva". */
|
|
1586
|
+
readonly isNew: _angular_core.Signal<boolean>;
|
|
1587
|
+
readonly currentVersionSummary: _angular_core.Signal<FlowVersionSummary | undefined>;
|
|
1588
|
+
/**
|
|
1589
|
+
* `isEditable` arriva dal backend e non va ricalcolato lato client (§6.1). Un flow nuovo,
|
|
1590
|
+
* non ancora salvato, e' modificabile per definizione.
|
|
1591
|
+
*/
|
|
1592
|
+
readonly isEditable: _angular_core.Signal<boolean>;
|
|
1593
|
+
/** Su una versione non modificabile il comando primario diventa "Nuova versione" (§8.1). */
|
|
1594
|
+
readonly primaryCommand: _angular_core.Signal<"create" | "save" | "newVersion">;
|
|
1595
|
+
readonly isActiveVersion: _angular_core.Signal<boolean>;
|
|
1596
|
+
/** Attivare esige zero errori (§8.3): il comando resta disabilitato finche' ce ne sono. */
|
|
1597
|
+
readonly canActivate: _angular_core.Signal<boolean>;
|
|
1598
|
+
setAuthor(author: string | undefined): void;
|
|
1599
|
+
/** Prepara un flow nuovo, non ancora salvato (§11, "Creare un flow"). */
|
|
1600
|
+
startNew(fullName: string, label: string, processType: string): void;
|
|
1601
|
+
/**
|
|
1602
|
+
* Carica una versione e conserva il suo `updatedAt` (§11, "Modificare", passo 1).
|
|
1603
|
+
* `version` assente → la versione attiva se c'e', altrimenti l'ultima.
|
|
1604
|
+
*/
|
|
1605
|
+
open(flowName: string, version?: number): Promise<void>;
|
|
1606
|
+
/** Senza `version` il backend restituisce la versione attiva, altrimenti l'ultima (§6.1). */
|
|
1607
|
+
private static pickVersion;
|
|
1608
|
+
/** Ricarica l'elenco versioni: dopo un'attivazione la precedente e' `Obsolete` (§8.4). */
|
|
1609
|
+
refreshVersions(): Promise<void>;
|
|
1610
|
+
/**
|
|
1611
|
+
* Crea o salva, a seconda dello stato. Non lancia su definizione invalida: il
|
|
1612
|
+
* salvataggio riesce anche con errori e il chiamante legge `validation` (§8.2).
|
|
1613
|
+
*
|
|
1614
|
+
* Rilancia `VersionConflict` dopo aver popolato {@link conflict}, perche' la UI deve
|
|
1615
|
+
* offrire "ricarica" o "salva come nuova versione" (§9.3).
|
|
1616
|
+
*/
|
|
1617
|
+
save(options?: {
|
|
1618
|
+
activate?: boolean;
|
|
1619
|
+
flowName?: string;
|
|
1620
|
+
}): Promise<FlowSaveResult>;
|
|
1621
|
+
private applySaveResult;
|
|
1622
|
+
/** Copia la versione corrente in una nuova bozza (§8.1): il comando delle versioni chiuse. */
|
|
1623
|
+
createNewVersion(): Promise<FlowSaveResult>;
|
|
1624
|
+
/**
|
|
1625
|
+
* Attiva la versione corrente (§11, "Attivare").
|
|
1626
|
+
* Valida prima in locale per un feedback immediato: se ci sono errori non chiama
|
|
1627
|
+
* l'attivazione, perche' fallirebbe comunque.
|
|
1628
|
+
*/
|
|
1629
|
+
activate(): Promise<FlowSaveResult>;
|
|
1630
|
+
deactivate(): Promise<void>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Elimina una versione. Da mettere dietro una conferma esplicita: il numero della versione
|
|
1633
|
+
* piu' alta viene riassegnato dopo un'eliminazione, e un'esecuzione sospesa nata su quel
|
|
1634
|
+
* numero riprenderebbe su una definizione diversa (§8, ultimo capoverso).
|
|
1635
|
+
*/
|
|
1636
|
+
deleteVersion(version: number): Promise<void>;
|
|
1637
|
+
/** Risoluzione del conflitto, prima opzione: ricarica e perde le modifiche locali (§9.3). */
|
|
1638
|
+
reloadAfterConflict(): Promise<void>;
|
|
1639
|
+
/**
|
|
1640
|
+
* Risoluzione del conflitto, seconda opzione: salva come nuova versione, conservando
|
|
1641
|
+
* le modifiche locali (§9.3). Il salvataggio senza `expectedUpdatedAt` e senza `version`
|
|
1642
|
+
* lascia scegliere al backend, che crea una nuova versione se l'ultima non e' toccabile.
|
|
1643
|
+
*/
|
|
1644
|
+
saveAsNewVersionAfterConflict(): Promise<FlowSaveResult>;
|
|
1645
|
+
dismissConflict(): void;
|
|
1646
|
+
/** L'ultima validazione conosciuta, da qualunque primitiva arrivi. */
|
|
1647
|
+
get validationResult(): FlowValidationResult | null;
|
|
1648
|
+
/** Il documento corrente, per chi deve mandarlo a una primitiva. */
|
|
1649
|
+
get definition(): FlowDefinition;
|
|
1650
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlowEditorSession, never>;
|
|
1651
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlowEditorSession>;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* Il view model del canvas.
|
|
1656
|
+
*
|
|
1657
|
+
* Gli id dei connettori sono stringhe costruite qui e in nessun altro posto: un mismatch
|
|
1658
|
+
* fra l'id dichiarato su un connettore e quello usato da una connessione fa sparire l'arco
|
|
1659
|
+
* **senza errori** — e' il fallimento silenzioso numero uno di @foblex/flow.
|
|
1660
|
+
*/
|
|
1661
|
+
|
|
1662
|
+
/** Il connettore di ingresso di un node. Lo Start non ne ha. */
|
|
1663
|
+
declare function targetConnectorId(nodeName: string): string;
|
|
1664
|
+
/** Il connettore di uscita di un node, uno per ramo (§3.5). */
|
|
1665
|
+
declare function sourceConnectorId(nodeName: string, outletKey: string): string;
|
|
1666
|
+
/** Inverso di {@link sourceConnectorId}. */
|
|
1667
|
+
declare function parseSourceConnectorId(id: string): {
|
|
1668
|
+
nodeName: string;
|
|
1669
|
+
outletKey: string;
|
|
1670
|
+
} | null;
|
|
1671
|
+
/** Inverso di {@link targetConnectorId}. */
|
|
1672
|
+
declare function parseTargetConnectorId(id: string): string | null;
|
|
1673
|
+
/** L'id del node sul canvas: prefissato per non collidere con quello dei connettori. */
|
|
1674
|
+
declare function canvasNodeId(nodeName: string): string;
|
|
1675
|
+
declare function parseCanvasNodeId(id: string): string | null;
|
|
1676
|
+
interface FlowCanvasNode {
|
|
1677
|
+
/** Nome nel documento; `$start` per lo Start, che nel modello non ha nome. */
|
|
1678
|
+
name: string;
|
|
1679
|
+
/** Id per il canvas. */
|
|
1680
|
+
id: string;
|
|
1681
|
+
/** `'Start'` oppure il discriminatore di `elementTypes`. */
|
|
1682
|
+
type: FlowElementType | 'Start';
|
|
1683
|
+
typeLabel: string;
|
|
1684
|
+
label: string;
|
|
1685
|
+
description?: string | null;
|
|
1686
|
+
position: {
|
|
1687
|
+
x: number;
|
|
1688
|
+
y: number;
|
|
1689
|
+
};
|
|
1690
|
+
outlets: FlowOutlet[];
|
|
1691
|
+
isStart: boolean;
|
|
1692
|
+
/** Categoria del dizionario: decide il colore dell'icona del node. */
|
|
1693
|
+
category?: string | null;
|
|
1694
|
+
/** Glifo mostrato nel badge dell'icona: dipende dal tipo, non dalla categoria. */
|
|
1695
|
+
icon: string;
|
|
1696
|
+
/**
|
|
1697
|
+
* La classe che porta la larghezza del node. Non e' costante: le uscite stanno in fila sul
|
|
1698
|
+
* bordo inferiore, quindi un elemento con molti rami ha bisogno di piu' spazio perche' le
|
|
1699
|
+
* etichette restino leggibili. E' una classe e non uno stile inline perche' @foblex/flow
|
|
1700
|
+
* riscrive l'attributo `style` del node per posizionarlo.
|
|
1701
|
+
*/
|
|
1702
|
+
widthClass: string;
|
|
1703
|
+
/**
|
|
1704
|
+
* Le etichette dei rami si mostrano solo quando i rami sono piu' di uno: su un `next`
|
|
1705
|
+
* unico l'etichetta direbbe soltanto «Successivo».
|
|
1706
|
+
*/
|
|
1707
|
+
showsOutletLabels: boolean;
|
|
1708
|
+
/** `false` → nessun percorso lo raggiunge dallo Start: va reso "scollegato" (§6.4). */
|
|
1709
|
+
isReachable: boolean;
|
|
1710
|
+
/** La gravita' peggiore dei rilievi sull'elemento (§7). */
|
|
1711
|
+
severity: FlowIssueSeverity | null;
|
|
1712
|
+
/** Numero di rilievi, per il badge. */
|
|
1713
|
+
issueCount: number;
|
|
1714
|
+
/** L'elemento espone il proprio risultato sotto il proprio nome (§4.5). */
|
|
1715
|
+
hasAutomaticOutput: boolean;
|
|
1716
|
+
/** Sintesi di una riga mostrata sul node (l'oggetto letto, il form mostrato, …). */
|
|
1717
|
+
subtitle?: string | null;
|
|
1718
|
+
/** Rami dichiarati ma senza destinazione: mostrati come tali, non come archi (§6.4). */
|
|
1719
|
+
danglingOutlets: FlowOutlet[];
|
|
1720
|
+
}
|
|
1721
|
+
interface FlowCanvasEdge {
|
|
1722
|
+
id: string;
|
|
1723
|
+
sourceId: string;
|
|
1724
|
+
targetId: string;
|
|
1725
|
+
kind: string;
|
|
1726
|
+
label?: string | null;
|
|
1727
|
+
isGoTo: boolean;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* Dimensioni nominali di un node, usate dal layout automatico.
|
|
1732
|
+
*
|
|
1733
|
+
* Le uscite stanno in fila sul bordo **inferiore**: e' la larghezza a dipendere dal numero
|
|
1734
|
+
* di rami, non l'altezza. L'altezza resta quella della card (intestazione, riga del nome
|
|
1735
|
+
* tecnico e badge, striscia delle uscite) e non cambia con i rami.
|
|
1736
|
+
*/
|
|
1737
|
+
declare const FLOW_NODE_WIDTH = 240;
|
|
1738
|
+
declare const FLOW_NODE_HEIGHT = 116;
|
|
1739
|
+
declare function flowNodeWidth(outletCount: number): number;
|
|
1740
|
+
/** La classe che porta quella larghezza: unico modo di sopravvivere ai riposizionamenti. */
|
|
1741
|
+
declare function flowNodeWidthClass(outletCount: number): string;
|
|
1742
|
+
declare class FlowCanvasComponent {
|
|
1743
|
+
private readonly store;
|
|
1744
|
+
private readonly dictionaries;
|
|
1745
|
+
private readonly validation;
|
|
1746
|
+
/**
|
|
1747
|
+
* Marker di fine arco: la variante "all states" crea sia quello normale sia quello
|
|
1748
|
+
* selezionato, evitando che l'arco selezionato perda la punta.
|
|
1749
|
+
*/
|
|
1750
|
+
readonly markerEnd = EFMarkerType.END_ALL_STATES;
|
|
1751
|
+
/**
|
|
1752
|
+
* I lati da cui gli archi partono e arrivano: uscite in basso, ingresso in alto.
|
|
1753
|
+
* Dichiararli e' quello che rende il grafo leggibile dall'alto verso il basso; lasciando
|
|
1754
|
+
* fare a foblex, il lato viene calcolato dalla posizione relativa e un ramo che risale
|
|
1755
|
+
* uscirebbe di fianco.
|
|
1756
|
+
*/
|
|
1757
|
+
readonly sides: typeof EFConnectableSide;
|
|
1758
|
+
/** Il nome dell'elemento selezionato, `$start` per lo Start. */
|
|
1759
|
+
readonly selectedName: _angular_core.InputSignal<string | null>;
|
|
1760
|
+
/**
|
|
1761
|
+
* L'outline del backend, quando disponibile: da' la raggiungibilita' autoritativa (§6.4).
|
|
1762
|
+
* Assente → si usa il calcolo locale.
|
|
1763
|
+
*/
|
|
1764
|
+
readonly outline: _angular_core.InputSignal<FlowOutline | null>;
|
|
1765
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<string | null>;
|
|
1766
|
+
readonly nodeOpened: _angular_core.OutputEmitterRef<string>;
|
|
1767
|
+
readonly nodeRemoveRequested: _angular_core.OutputEmitterRef<string>;
|
|
1768
|
+
readonly nodeDuplicateRequested: _angular_core.OutputEmitterRef<string>;
|
|
1769
|
+
/** Rilascio di un elemento dalla palette: tipo + punto nel sistema del canvas. */
|
|
1770
|
+
readonly elementDropped: _angular_core.OutputEmitterRef<{
|
|
1771
|
+
type: FlowElementType;
|
|
1772
|
+
x: number;
|
|
1773
|
+
y: number;
|
|
1774
|
+
}>;
|
|
1775
|
+
/** Raggiungibilita': backend se c'e', locale altrimenti. */
|
|
1776
|
+
private readonly reachability;
|
|
1777
|
+
readonly nodes: _angular_core.Signal<FlowCanvasNode[]>;
|
|
1778
|
+
private toCanvasNode;
|
|
1779
|
+
/** Gli archi con destinazione: solo questi diventano `<f-connection>`. */
|
|
1780
|
+
readonly edges: _angular_core.Signal<FlowCanvasEdge[]>;
|
|
1781
|
+
/** Sintesi mostrata sul node: la cosa che serve sapere senza aprire l'inspector. */
|
|
1782
|
+
private subtitleOf;
|
|
1783
|
+
/** Sullo Start conta il trigger: e' cio' che decide quando il flow parte (§3.4). */
|
|
1784
|
+
private startSubtitle;
|
|
1785
|
+
/**
|
|
1786
|
+
* Creazione di un arco. `targetId` assente significa rilascio nel vuoto: si lascia il
|
|
1787
|
+
* ramo dichiarato ma senza destinazione, che e' esattamente il "ramo incompleto" del
|
|
1788
|
+
* modello, invece di scartare il gesto.
|
|
1789
|
+
*/
|
|
1790
|
+
onCreateConnection(event: {
|
|
1791
|
+
sourceId: string;
|
|
1792
|
+
targetId?: string;
|
|
1793
|
+
}): void;
|
|
1794
|
+
/** Riassegnazione di un arco già disegnato, da un capo o dall'altro. */
|
|
1795
|
+
onReassignConnection(event: {
|
|
1796
|
+
endpoint: string;
|
|
1797
|
+
previousSourceId: string;
|
|
1798
|
+
nextSourceId?: string;
|
|
1799
|
+
previousTargetId: string;
|
|
1800
|
+
nextTargetId?: string;
|
|
1801
|
+
}): void;
|
|
1802
|
+
/**
|
|
1803
|
+
* Spostamento dei node. Un solo passo di storico per l'intero gesto: le posizioni
|
|
1804
|
+
* intermedie non sono modifiche che l'utente vuole annullare una per una.
|
|
1805
|
+
*/
|
|
1806
|
+
onMoveNodes(event: {
|
|
1807
|
+
nodes: Array<{
|
|
1808
|
+
id: string;
|
|
1809
|
+
position: {
|
|
1810
|
+
x: number;
|
|
1811
|
+
y: number;
|
|
1812
|
+
};
|
|
1813
|
+
}>;
|
|
1814
|
+
}): void;
|
|
1815
|
+
onSelectionChange(event: {
|
|
1816
|
+
nodeIds: string[];
|
|
1817
|
+
}): void;
|
|
1818
|
+
/** `Delete` sulla selezione: lo Start non e' cancellabile, e' uno per flow (§3.4). */
|
|
1819
|
+
onDeleteSelected(event: {
|
|
1820
|
+
nodeIds: string[];
|
|
1821
|
+
}): void;
|
|
1822
|
+
/** Rilascio di un elemento trascinato dalla palette. */
|
|
1823
|
+
onCreateNode(event: {
|
|
1824
|
+
data: unknown;
|
|
1825
|
+
externalItemRect: {
|
|
1826
|
+
x: number;
|
|
1827
|
+
y: number;
|
|
1828
|
+
};
|
|
1829
|
+
}): void;
|
|
1830
|
+
onNodeDoubleClick(name: string): void;
|
|
1831
|
+
/**
|
|
1832
|
+
* Il bottone «✎» sul node: apre il dettaglio senza aspettare il doppio click, che e' un
|
|
1833
|
+
* gesto che non si vede. `stopPropagation` evita che il click valga anche come selezione
|
|
1834
|
+
* dell'area sottostante.
|
|
1835
|
+
*/
|
|
1836
|
+
onEditClick(event: Event, name: string): void;
|
|
1837
|
+
connectorIdOf(node: FlowCanvasNode, outletKey: string): string;
|
|
1838
|
+
targetIdOf(node: FlowCanvasNode): string;
|
|
1839
|
+
isSelected(node: FlowCanvasNode): boolean;
|
|
1840
|
+
/** Etichette dei rami dichiarati senza destinazione, per il tooltip del badge. */
|
|
1841
|
+
danglingLabels(node: FlowCanvasNode): string;
|
|
1842
|
+
/** Classe della fascia colorata, per categoria del dizionario. */
|
|
1843
|
+
categoryClass(node: FlowCanvasNode): string;
|
|
1844
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlowCanvasComponent, never>;
|
|
1845
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FlowCanvasComponent, "fb-flow-canvas", never, { "selectedName": { "alias": "selectedName"; "required": false; "isSignal": true; }; "outline": { "alias": "outline"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "nodeOpened": "nodeOpened"; "nodeRemoveRequested": "nodeRemoveRequested"; "nodeDuplicateRequested": "nodeDuplicateRequested"; "elementDropped": "elementDropped"; }, never, never, true, never>;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
interface PaletteGroup {
|
|
1849
|
+
category: string;
|
|
1850
|
+
entries: FlowElementTypeEntry[];
|
|
1851
|
+
}
|
|
1852
|
+
declare class ElementPaletteComponent {
|
|
1853
|
+
private readonly dictionaries;
|
|
1854
|
+
/**
|
|
1855
|
+
* Il `processType` del flow: un flow `AutoLaunched` che contiene screen e' un errore di
|
|
1856
|
+
* validazione, perche' non c'e' nessuno a cui mostrarli (§3.1). La palette lo segnala
|
|
1857
|
+
* prima che l'utente lo scopra dal pannello dei problemi.
|
|
1858
|
+
*/
|
|
1859
|
+
readonly processType: _angular_core.InputSignal<string | undefined>;
|
|
1860
|
+
readonly elementPicked: _angular_core.OutputEmitterRef<string>;
|
|
1861
|
+
private readonly filter;
|
|
1862
|
+
readonly groups: _angular_core.Signal<PaletteGroup[]>;
|
|
1863
|
+
readonly isEmpty: _angular_core.Signal<boolean>;
|
|
1864
|
+
onFilter(value: string): void;
|
|
1865
|
+
pick(entry: FlowElementTypeEntry): void;
|
|
1866
|
+
/** Uno screen in un flow che non mostra nulla: si segnala, non si nasconde (§3.1). */
|
|
1867
|
+
isIncompatible(entry: FlowElementTypeEntry): boolean;
|
|
1868
|
+
incompatibleHint(entry: FlowElementTypeEntry): string | null;
|
|
1869
|
+
/** Lo stesso glifo che l'elemento avra' sul canvas, così il trascinamento e' prevedibile. */
|
|
1870
|
+
iconOf(entry: FlowElementTypeEntry): string;
|
|
1871
|
+
categoryClass(category: string): string;
|
|
1872
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ElementPaletteComponent, never>;
|
|
1873
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ElementPaletteComponent, "fb-element-palette", never, { "processType": { "alias": "processType"; "required": false; "isSignal": true; }; }, { "elementPicked": "elementPicked"; }, never, never, true, never>;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
declare class ReferencePickerComponent {
|
|
1877
|
+
private readonly api;
|
|
1878
|
+
private readonly store;
|
|
1879
|
+
private readonly dictionaries;
|
|
1880
|
+
readonly value: _angular_core.InputSignal<string | undefined>;
|
|
1881
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1882
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
1883
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1884
|
+
/** Filtra i riferimenti compatibili col campo che si sta compilando (§6.4). */
|
|
1885
|
+
readonly dataType: _angular_core.InputSignal<string | undefined>;
|
|
1886
|
+
readonly isCollection: _angular_core.InputSignal<boolean | undefined>;
|
|
1887
|
+
readonly objectType: _angular_core.InputSignal<string | undefined>;
|
|
1888
|
+
/**
|
|
1889
|
+
* `true` → propone solo destinazioni scrivibili. Assegnare a una costante o a una
|
|
1890
|
+
* formula e' `TARGET_NOT_WRITABLE` (§4.6).
|
|
1891
|
+
*/
|
|
1892
|
+
readonly writableOnly: _angular_core.InputSignal<boolean>;
|
|
1893
|
+
/**
|
|
1894
|
+
* `true` → aggiunge `$Flow.CurrentStage` e `$Flow.ActiveStages` alle destinazioni.
|
|
1895
|
+
* Sono le sole variabili globali scrivibili, e solo se il flow dichiara stage (§5.2).
|
|
1896
|
+
*/
|
|
1897
|
+
readonly allowStageTargets: _angular_core.InputSignal<boolean>;
|
|
1898
|
+
/**
|
|
1899
|
+
* `true` → a sinistra ci va il nome di un **node**, non di una risorsa: e' il caso di
|
|
1900
|
+
* `WasVisited` e `HasError` (§4.3).
|
|
1901
|
+
*/
|
|
1902
|
+
readonly elementsOnly: _angular_core.InputSignal<boolean>;
|
|
1903
|
+
readonly valueChange: _angular_core.OutputEmitterRef<string | undefined>;
|
|
1904
|
+
private readonly references;
|
|
1905
|
+
private readonly isLoading;
|
|
1906
|
+
private readonly loadError;
|
|
1907
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
1908
|
+
readonly query: _angular_core.WritableSignal<string>;
|
|
1909
|
+
constructor();
|
|
1910
|
+
/** Le due globali di stage, aggiunte alle destinazioni quando il flow dichiara stage. */
|
|
1911
|
+
private readonly stageTargets;
|
|
1912
|
+
readonly options: _angular_core.Signal<FlowReference[]>;
|
|
1913
|
+
/** Le opzioni raggruppate per `kind`, così gli output automatici si distinguono. */
|
|
1914
|
+
readonly groups: _angular_core.Signal<{
|
|
1915
|
+
kind: string;
|
|
1916
|
+
label: string;
|
|
1917
|
+
items: FlowReference[];
|
|
1918
|
+
}[]>;
|
|
1919
|
+
private static kindLabel;
|
|
1920
|
+
/**
|
|
1921
|
+
* Stato del valore corrente rispetto all'elenco.
|
|
1922
|
+
* - `known`: presente nell'elenco;
|
|
1923
|
+
* - `navigated`: la radice e' nota ma c'e' un percorso dopo il punto (campo di record,
|
|
1924
|
+
* output automatico navigato): la validazione non verifica i percorsi con il punto,
|
|
1925
|
+
* quindi si accetta senza segnalare;
|
|
1926
|
+
* - `host`: scope dell'host, non verificabile per costruzione (§4.1);
|
|
1927
|
+
* - `unknown`: nessuna corrispondenza: si avvisa, senza bloccare.
|
|
1928
|
+
*/
|
|
1929
|
+
readonly valueState: _angular_core.Signal<"empty" | "known" | "navigated" | "host" | "unknown">;
|
|
1930
|
+
readonly hint: _angular_core.Signal<string | null>;
|
|
1931
|
+
readonly errorMessage: _angular_core.Signal<string | null>;
|
|
1932
|
+
open(): void;
|
|
1933
|
+
close(): void;
|
|
1934
|
+
toggle(): void;
|
|
1935
|
+
onQuery(value: string): void;
|
|
1936
|
+
choose(reference: FlowReference): void;
|
|
1937
|
+
/** Scrittura libera: indispensabile per i campi di un record e per gli scope dell'host. */
|
|
1938
|
+
onManualInput(value: string): void;
|
|
1939
|
+
clear(): void;
|
|
1940
|
+
describe(reference: FlowReference): string;
|
|
1941
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ReferencePickerComponent, never>;
|
|
1942
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ReferencePickerComponent, "fb-reference-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "dataType": { "alias": "dataType"; "required": false; "isSignal": true; }; "isCollection": { "alias": "isCollection"; "required": false; "isSignal": true; }; "objectType": { "alias": "objectType"; "required": false; "isSignal": true; }; "writableOnly": { "alias": "writableOnly"; "required": false; "isSignal": true; }; "allowStageTargets": { "alias": "allowStageTargets"; "required": false; "isSignal": true; }; "elementsOnly": { "alias": "elementsOnly"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
/** Le modalita' offerte: una per campo del modello. */
|
|
1946
|
+
type ValueMode = 'reference' | 'literal' | 'formula' | 'globalConstant' | 'empty';
|
|
1947
|
+
declare class ValueEditorComponent {
|
|
1948
|
+
private readonly dictionaries;
|
|
1949
|
+
readonly value: _angular_core.InputSignal<FlowValue | undefined>;
|
|
1950
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1951
|
+
/** Il tipo atteso dalla destinazione: guida il controllo del letterale. */
|
|
1952
|
+
readonly dataType: _angular_core.InputSignal<string | undefined>;
|
|
1953
|
+
readonly objectType: _angular_core.InputSignal<string | undefined>;
|
|
1954
|
+
readonly isCollection: _angular_core.InputSignal<boolean | undefined>;
|
|
1955
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1956
|
+
/** Nasconde la modalita' formula dove il modello non la prevede. */
|
|
1957
|
+
readonly allowFormula: _angular_core.InputSignal<boolean>;
|
|
1958
|
+
readonly valueChange: _angular_core.OutputEmitterRef<FlowValue | undefined>;
|
|
1959
|
+
/** La modalita' dedotta dal campo effettivamente valorizzato. */
|
|
1960
|
+
readonly mode: _angular_core.Signal<ValueMode>;
|
|
1961
|
+
/**
|
|
1962
|
+
* Quanti campi di valore sono valorizzati: piu' di uno e' `VALUE_AMBIGUOUS` (§4.2).
|
|
1963
|
+
* Puo' capitare su un documento arrivato da un altro editor: si segnala e si offre
|
|
1964
|
+
* di normalizzarlo, invece di nasconderlo.
|
|
1965
|
+
*/
|
|
1966
|
+
readonly filledFieldCount: _angular_core.Signal<number>;
|
|
1967
|
+
readonly isAmbiguous: _angular_core.Signal<boolean>;
|
|
1968
|
+
/** Il campo del valore che corrisponde al `dataType` (§4.2, tabella dei sette tipi). */
|
|
1969
|
+
readonly literalField: _angular_core.Signal<keyof FlowValue>;
|
|
1970
|
+
/**
|
|
1971
|
+
* `Object` non ha un campo letterale: un record si passa per riferimento (§4.2).
|
|
1972
|
+
* Lo stesso vale per una collection.
|
|
1973
|
+
*/
|
|
1974
|
+
readonly literalAllowed: _angular_core.Signal<boolean>;
|
|
1975
|
+
readonly literalInputType: _angular_core.Signal<string>;
|
|
1976
|
+
readonly literalText: _angular_core.Signal<string>;
|
|
1977
|
+
readonly booleanValue: _angular_core.Signal<boolean>;
|
|
1978
|
+
readonly globalConstants: _angular_core.Signal<string[]>;
|
|
1979
|
+
readonly numericScaleHint: _angular_core.Signal<"Usa Number per importi e quantita’: Integer troncherebbe i decimali." | null>;
|
|
1980
|
+
setMode(mode: ValueMode): void;
|
|
1981
|
+
onReferenceChange(reference: string | undefined): void;
|
|
1982
|
+
onLiteralChange(raw: string): void;
|
|
1983
|
+
onBooleanChange(checked: boolean): void;
|
|
1984
|
+
onFormulaChange(expression: string): void;
|
|
1985
|
+
onFormulaTypeChange(dataType: string): void;
|
|
1986
|
+
onGlobalConstantChange(value: string): void;
|
|
1987
|
+
/** Normalizza un valore ambiguo tenendo il campo della modalita' corrente. */
|
|
1988
|
+
normalize(): void;
|
|
1989
|
+
private emit;
|
|
1990
|
+
readonly dataTypeOptions: _angular_core.Signal<_esfaenza_flow_builder.FlowDataTypeEntry[]>;
|
|
1991
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ValueEditorComponent, never>;
|
|
1992
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ValueEditorComponent, "fb-value-editor", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "dataType": { "alias": "dataType"; "required": false; "isSignal": true; }; "objectType": { "alias": "objectType"; "required": false; "isSignal": true; }; "isCollection": { "alias": "isCollection"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "allowFormula": { "alias": "allowFormula"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
declare class ConditionEditorComponent {
|
|
1996
|
+
private readonly dictionaries;
|
|
1997
|
+
/** Il contenitore: porta `conditions`, `conditionLogic` e, se serve, `formula`. */
|
|
1998
|
+
readonly holder: _angular_core.InputSignal<FlowConditionHolder>;
|
|
1999
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
2000
|
+
/** `false` dove il modello non prevede la modalita' formula sull'elemento. */
|
|
2001
|
+
readonly allowFormula: _angular_core.InputSignal<boolean>;
|
|
2002
|
+
/** Path per ancorare i rilievi di validazione, es. `rules[Approvato]`. */
|
|
2003
|
+
readonly issuePath: _angular_core.InputSignal<string>;
|
|
2004
|
+
/** Emesso a ogni modifica: il chiamante applica la mutazione allo store. */
|
|
2005
|
+
readonly changed: _angular_core.OutputEmitterRef<(holder: FlowConditionHolder) => void>;
|
|
2006
|
+
readonly conditions: _angular_core.Signal<FlowCondition[]>;
|
|
2007
|
+
readonly logicMode: _angular_core.Signal<"and" | "or" | "formula" | "custom">;
|
|
2008
|
+
readonly customLogic: _angular_core.Signal<string>;
|
|
2009
|
+
/** Feedback immediato sull'espressione: la verita' resta della validazione backend. */
|
|
2010
|
+
readonly customLogicError: _angular_core.Signal<string | null>;
|
|
2011
|
+
/** Con `Formula` il campo `conditions` viene **ignorato** dal motore (§4.3). */
|
|
2012
|
+
readonly conditionsIgnored: _angular_core.Signal<boolean>;
|
|
2013
|
+
readonly operators: _angular_core.Signal<_esfaenza_flow_builder.FlowComparisonOperatorEntry[]>;
|
|
2014
|
+
isUnary(condition: FlowCondition): boolean;
|
|
2015
|
+
appliesToElements(condition: FlowCondition): boolean;
|
|
2016
|
+
/** L'esito atteso di un operatore unario: assente equivale a `true` (§4.3). */
|
|
2017
|
+
unaryExpectation(condition: FlowCondition): boolean;
|
|
2018
|
+
/**
|
|
2019
|
+
* Testo che dice cosa e' stato scritto, in italiano. Serve perche' la differenza fra
|
|
2020
|
+
* `IsNull` + `true` e `IsNull` + `false` e' invisibile nel JSON e capitale a runtime.
|
|
2021
|
+
*/
|
|
2022
|
+
unarySummary(condition: FlowCondition): string;
|
|
2023
|
+
operatorLabel(operator: string | undefined): string;
|
|
2024
|
+
operatorDescription(operator: string | undefined): string | null;
|
|
2025
|
+
/** `None` consente di salvare una condizione incompleta: a runtime vale sempre falso. */
|
|
2026
|
+
isPlaceholderOperator(condition: FlowCondition): boolean;
|
|
2027
|
+
addCondition(): void;
|
|
2028
|
+
removeCondition(index: number): void;
|
|
2029
|
+
moveCondition(index: number, direction: -1 | 1): void;
|
|
2030
|
+
setLogicMode(mode: 'and' | 'or' | 'custom' | 'formula'): void;
|
|
2031
|
+
setCustomLogic(logic: string): void;
|
|
2032
|
+
setFormula(formula: string): void;
|
|
2033
|
+
setLeft(index: number, reference: string | undefined): void;
|
|
2034
|
+
setOperator(index: number, operator: string): void;
|
|
2035
|
+
setRightValue(index: number, value: FlowValue | undefined): void;
|
|
2036
|
+
setUnaryExpectation(index: number, expectation: boolean): void;
|
|
2037
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConditionEditorComponent, never>;
|
|
2038
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConditionEditorComponent, "fb-condition-editor", never, { "holder": { "alias": "holder"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "allowFormula": { "alias": "allowFormula"; "required": false; "isSignal": true; }; "issuePath": { "alias": "issuePath"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
/** Il contenitore dei filtri, qualunque elemento sia. */
|
|
2042
|
+
interface FilterHolder {
|
|
2043
|
+
filters?: FlowRecordFilter[];
|
|
2044
|
+
filterLogic?: string;
|
|
2045
|
+
filterFormula?: string;
|
|
2046
|
+
}
|
|
2047
|
+
declare class RecordFilterEditorComponent {
|
|
2048
|
+
private readonly catalog;
|
|
2049
|
+
private readonly dictionaries;
|
|
2050
|
+
readonly holder: _angular_core.InputSignal<FilterHolder>;
|
|
2051
|
+
readonly object: _angular_core.InputSignal<string | undefined>;
|
|
2052
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
2053
|
+
/** L'uso con cui chiedere i campi: `filterable` per i filtri, `updateable` altrove. */
|
|
2054
|
+
readonly usage: _angular_core.InputSignal<FlowFieldUsage>;
|
|
2055
|
+
/** `false` dove il modello non ha `filterLogic`: i filtri sono sempre in AND (§4.4). */
|
|
2056
|
+
readonly supportsLogic: _angular_core.InputSignal<boolean>;
|
|
2057
|
+
/** `true` dove esiste `filterFormula` come alternativa ai filtri. */
|
|
2058
|
+
readonly supportsFormula: _angular_core.InputSignal<boolean>;
|
|
2059
|
+
/**
|
|
2060
|
+
* Avviso da mostrare quando la lista e' vuota. Un Delete senza filtri e' un **errore**,
|
|
2061
|
+
* un Update senza filtri e' solo un avviso — ma aggiorna tutti i record dell'entita'
|
|
2062
|
+
* (§5.7, §13.10).
|
|
2063
|
+
*/
|
|
2064
|
+
readonly emptyWarning: _angular_core.InputSignal<string | null>;
|
|
2065
|
+
readonly emptyWarningSeverity: _angular_core.InputSignal<"error" | "warn">;
|
|
2066
|
+
readonly changed: _angular_core.OutputEmitterRef<(holder: FilterHolder) => void>;
|
|
2067
|
+
private readonly fields;
|
|
2068
|
+
readonly filters: _angular_core.Signal<FlowRecordFilter[]>;
|
|
2069
|
+
readonly operators: _angular_core.Signal<_esfaenza_flow_builder.FlowDictionaryEntry[]>;
|
|
2070
|
+
constructor();
|
|
2071
|
+
readonly fieldOptions: _angular_core.Signal<FlowFieldDescription[]>;
|
|
2072
|
+
/** Catalogo vuoto = "non lo so": si lascia il campo libero, non si blocca (§7). */
|
|
2073
|
+
readonly hasFieldCatalog: _angular_core.Signal<boolean>;
|
|
2074
|
+
readonly logicMode: _angular_core.Signal<"and" | "or" | "formula" | "custom">;
|
|
2075
|
+
readonly customLogic: _angular_core.Signal<string>;
|
|
2076
|
+
readonly showEmptyWarning: _angular_core.Signal<boolean>;
|
|
2077
|
+
addFilter(): void;
|
|
2078
|
+
removeFilter(index: number): void;
|
|
2079
|
+
setField(index: number, field: string): void;
|
|
2080
|
+
setOperator(index: number, operator: string): void;
|
|
2081
|
+
setValue(index: number, value: FlowValue | undefined): void;
|
|
2082
|
+
isNullOperator(filter: FlowRecordFilter): boolean;
|
|
2083
|
+
nullExpectation(filter: FlowRecordFilter): boolean;
|
|
2084
|
+
setNullExpectation(index: number, expectation: boolean): void;
|
|
2085
|
+
setLogicMode(mode: 'and' | 'or' | 'custom' | 'formula'): void;
|
|
2086
|
+
setCustomLogic(logic: string): void;
|
|
2087
|
+
setFormula(formula: string): void;
|
|
2088
|
+
/** Il tipo del campo, per proporre il controllo giusto sul valore. */
|
|
2089
|
+
fieldDataType(filter: FlowRecordFilter): string | undefined;
|
|
2090
|
+
/** `true` se il campo referenzia una relazione: la validazione non lo verifica (§4.4). */
|
|
2091
|
+
isRelationPath(filter: FlowRecordFilter): boolean;
|
|
2092
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RecordFilterEditorComponent, never>;
|
|
2093
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RecordFilterEditorComponent, "fb-record-filter-editor", never, { "holder": { "alias": "holder"; "required": true; "isSignal": true; }; "object": { "alias": "object"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "usage": { "alias": "usage"; "required": false; "isSignal": true; }; "supportsLogic": { "alias": "supportsLogic"; "required": false; "isSignal": true; }; "supportsFormula": { "alias": "supportsFormula"; "required": false; "isSignal": true; }; "emptyWarning": { "alias": "emptyWarning"; "required": false; "isSignal": true; }; "emptyWarningSeverity": { "alias": "emptyWarningSeverity"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
/** Contenitore generico: gli input hanno `value`, gli output `assignToReference`. */
|
|
2097
|
+
interface ParameterHolder {
|
|
2098
|
+
inputParameters?: FlowInputParameter[];
|
|
2099
|
+
outputParameters?: FlowOutputParameter[];
|
|
2100
|
+
}
|
|
2101
|
+
declare class ParameterEditorComponent {
|
|
2102
|
+
readonly holder: _angular_core.InputSignal<ParameterHolder>;
|
|
2103
|
+
/** Parametri dichiarati dal catalogo; vuoto = catalogo non popolato. */
|
|
2104
|
+
readonly catalogParameters: _angular_core.InputSignal<FlowCatalogParameter[]>;
|
|
2105
|
+
readonly inputTitle: _angular_core.InputSignal<string>;
|
|
2106
|
+
readonly outputTitle: _angular_core.InputSignal<string>;
|
|
2107
|
+
readonly showInputs: _angular_core.InputSignal<boolean>;
|
|
2108
|
+
readonly showOutputs: _angular_core.InputSignal<boolean>;
|
|
2109
|
+
/** `true` → gli output vanno all'output automatico, e i parametri sono ignorati. */
|
|
2110
|
+
readonly outputsDisabledReason: _angular_core.InputSignal<string | null>;
|
|
2111
|
+
readonly changed: _angular_core.OutputEmitterRef<(holder: ParameterHolder) => void>;
|
|
2112
|
+
readonly inputs: _angular_core.Signal<FlowInputParameter[]>;
|
|
2113
|
+
readonly outputs: _angular_core.Signal<FlowOutputParameter[]>;
|
|
2114
|
+
readonly hasCatalog: _angular_core.Signal<boolean>;
|
|
2115
|
+
readonly inputCatalog: _angular_core.Signal<FlowCatalogParameter[]>;
|
|
2116
|
+
readonly outputCatalog: _angular_core.Signal<FlowCatalogParameter[]>;
|
|
2117
|
+
/** Parametri obbligatori dichiarati dal catalogo e non ancora presenti. */
|
|
2118
|
+
readonly missingRequired: _angular_core.Signal<FlowCatalogParameter[]>;
|
|
2119
|
+
/** Parametri presenti che il catalogo non conosce: sarebbero `PARAMETER_UNKNOWN`. */
|
|
2120
|
+
unknownInput(parameter: FlowInputParameter): boolean;
|
|
2121
|
+
unknownOutput(parameter: FlowOutputParameter): boolean;
|
|
2122
|
+
describe(name: string | undefined): FlowCatalogParameter | undefined;
|
|
2123
|
+
addInput(name?: string): void;
|
|
2124
|
+
addOutput(name?: string): void;
|
|
2125
|
+
removeInput(index: number): void;
|
|
2126
|
+
removeOutput(index: number): void;
|
|
2127
|
+
setInputName(index: number, name: string): void;
|
|
2128
|
+
setInputValue(index: number, value: FlowValue | undefined): void;
|
|
2129
|
+
setOutputName(index: number, name: string): void;
|
|
2130
|
+
setOutputTarget(index: number, reference: string | undefined): void;
|
|
2131
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ParameterEditorComponent, never>;
|
|
2132
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ParameterEditorComponent, "fb-parameter-editor", never, { "holder": { "alias": "holder"; "required": true; "isSignal": true; }; "catalogParameters": { "alias": "catalogParameters"; "required": false; "isSignal": true; }; "inputTitle": { "alias": "inputTitle"; "required": false; "isSignal": true; }; "outputTitle": { "alias": "outputTitle"; "required": false; "isSignal": true; }; "showInputs": { "alias": "showInputs"; "required": false; "isSignal": true; }; "showOutputs": { "alias": "showOutputs"; "required": false; "isSignal": true; }; "outputsDisabledReason": { "alias": "outputsDisabledReason"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
interface FieldAssignmentHolder {
|
|
2136
|
+
inputAssignments?: FlowInputFieldAssignment[];
|
|
2137
|
+
}
|
|
2138
|
+
declare class FieldAssignmentEditorComponent {
|
|
2139
|
+
private readonly catalog;
|
|
2140
|
+
readonly holder: _angular_core.InputSignal<FieldAssignmentHolder>;
|
|
2141
|
+
readonly object: _angular_core.InputSignal<string | undefined>;
|
|
2142
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
2143
|
+
readonly disabledReason: _angular_core.InputSignal<string | null>;
|
|
2144
|
+
readonly changed: _angular_core.OutputEmitterRef<(holder: FieldAssignmentHolder) => void>;
|
|
2145
|
+
private readonly fields;
|
|
2146
|
+
readonly assignments: _angular_core.Signal<FlowInputFieldAssignment[]>;
|
|
2147
|
+
readonly fieldOptions: _angular_core.Signal<FlowFieldDescription[]>;
|
|
2148
|
+
readonly hasCatalog: _angular_core.Signal<boolean>;
|
|
2149
|
+
/** Campi obbligatori dell'entita' non ancora valorizzati. */
|
|
2150
|
+
readonly missingRequired: _angular_core.Signal<FlowFieldDescription[]>;
|
|
2151
|
+
constructor();
|
|
2152
|
+
add(field?: string): void;
|
|
2153
|
+
remove(index: number): void;
|
|
2154
|
+
setField(index: number, field: string): void;
|
|
2155
|
+
setValue(index: number, value: FlowValue | undefined): void;
|
|
2156
|
+
describe(name: string | undefined): FlowFieldDescription | undefined;
|
|
2157
|
+
/** Il catalogo e' popolato ma non conosce questo campo: sarebbe `FIELD_UNKNOWN`. */
|
|
2158
|
+
isUnknown(assignment: FlowInputFieldAssignment): boolean;
|
|
2159
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FieldAssignmentEditorComponent, never>;
|
|
2160
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FieldAssignmentEditorComponent, "fb-field-assignment-editor", never, { "holder": { "alias": "holder"; "required": true; "isSignal": true; }; "object": { "alias": "object"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "disabledReason": { "alias": "disabledReason"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
declare class ConnectorEditorComponent {
|
|
2164
|
+
private readonly api;
|
|
2165
|
+
private readonly store;
|
|
2166
|
+
/** Il node di cui si editano le uscite; per lo Start passa il nome fittizio. */
|
|
2167
|
+
readonly nodeName: _angular_core.InputSignal<string>;
|
|
2168
|
+
readonly node: _angular_core.InputSignal<FlowAnyNode>;
|
|
2169
|
+
readonly outlets: _angular_core.InputSignal<FlowOutlet[]>;
|
|
2170
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
2171
|
+
readonly connectorChanged: _angular_core.OutputEmitterRef<{
|
|
2172
|
+
outletKey: string;
|
|
2173
|
+
target?: string;
|
|
2174
|
+
isGoTo?: boolean;
|
|
2175
|
+
}>;
|
|
2176
|
+
private readonly targets;
|
|
2177
|
+
constructor();
|
|
2178
|
+
readonly targetOptions: _angular_core.Signal<FlowConnectorTarget[]>;
|
|
2179
|
+
currentTarget(outlet: FlowOutlet): string;
|
|
2180
|
+
isGoTo(outlet: FlowOutlet): boolean;
|
|
2181
|
+
/** Il connector esiste ma non ha destinazione: ramo incompleto, da mostrare come tale. */
|
|
2182
|
+
isDangling(outlet: FlowOutlet): boolean;
|
|
2183
|
+
/** Nessun connector: il percorso finisce lì. Legittimo, tranne sui rami strutturali. */
|
|
2184
|
+
isTerminal(outlet: FlowOutlet): boolean;
|
|
2185
|
+
hintFor(outlet: FlowOutlet): string | null;
|
|
2186
|
+
setTarget(outlet: FlowOutlet, target: string): void;
|
|
2187
|
+
setGoTo(outlet: FlowOutlet, isGoTo: boolean): void;
|
|
2188
|
+
clear(outlet: FlowOutlet): void;
|
|
2189
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConnectorEditorComponent, never>;
|
|
2190
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConnectorEditorComponent, "fb-connector-editor", never, { "nodeName": { "alias": "nodeName"; "required": true; "isSignal": true; }; "node": { "alias": "node"; "required": true; "isSignal": true; }; "outlets": { "alias": "outlets"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; }, { "connectorChanged": "connectorChanged"; }, never, never, true, never>;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
/**
|
|
2194
|
+
* `@Directive()` senza selettore: e' il modo in cui Angular riconosce come input quelli
|
|
2195
|
+
* dichiarati su una classe base ereditata da piu' componenti.
|
|
2196
|
+
*/
|
|
2197
|
+
declare abstract class NodeInspectorBase {
|
|
2198
|
+
protected readonly store: FlowDocumentStore;
|
|
2199
|
+
protected readonly dictionaries: FlowDictionaryStore;
|
|
2200
|
+
protected readonly validation: FlowValidationStore;
|
|
2201
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
2202
|
+
readonly node: _angular_core.InputSignal<FlowAnyNode>;
|
|
2203
|
+
/** Il tipo dell'elemento: ogni inspector sa il proprio, ma serve alle uscite. */
|
|
2204
|
+
abstract readonly elementType: FlowElementType;
|
|
2205
|
+
readonly outlets: _angular_core.Signal<FlowOutlet[]>;
|
|
2206
|
+
/** I rilievi ancorati a questo elemento (§7). */
|
|
2207
|
+
readonly issues: _angular_core.Signal<FlowValidationIssue[]>;
|
|
2208
|
+
/** I rilievi su un campo preciso, per evidenziarlo nel form. */
|
|
2209
|
+
issuesAt(pathPrefix: string): FlowValidationIssue[];
|
|
2210
|
+
hasIssueCode(code: string): boolean;
|
|
2211
|
+
/** Applica una modifica al node. */
|
|
2212
|
+
protected patch(mutate: (node: FlowAnyNode) => void): void;
|
|
2213
|
+
/** Scorciatoia per i campi semplici: valore vuoto → chiave omessa (§2). */
|
|
2214
|
+
protected setField(field: string, value: unknown): void;
|
|
2215
|
+
/** Scrive la destinazione di un'uscita. */
|
|
2216
|
+
onConnectorChanged(event: {
|
|
2217
|
+
outletKey: string;
|
|
2218
|
+
target?: string;
|
|
2219
|
+
isGoTo?: boolean;
|
|
2220
|
+
}): void;
|
|
2221
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NodeInspectorBase, never>;
|
|
2222
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NodeInspectorBase, never, never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
declare class ElementInspectorComponent {
|
|
2226
|
+
private readonly store;
|
|
2227
|
+
private readonly dictionaries;
|
|
2228
|
+
private readonly validation;
|
|
2229
|
+
/** Il nome dell'elemento selezionato; `$start` per lo Start. */
|
|
2230
|
+
readonly selectedName: _angular_core.InputSignal<string | null>;
|
|
2231
|
+
/**
|
|
2232
|
+
* `false` quando l'inspector e' dentro la dialog: lì il tipo e il titolo sono già
|
|
2233
|
+
* nell'intestazione della dialog, e ripeterli sprecherebbe la riga piu' preziosa.
|
|
2234
|
+
*/
|
|
2235
|
+
readonly showHeader: _angular_core.InputSignal<boolean>;
|
|
2236
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
2237
|
+
readonly removeRequested: _angular_core.OutputEmitterRef<string>;
|
|
2238
|
+
readonly duplicateRequested: _angular_core.OutputEmitterRef<string>;
|
|
2239
|
+
readonly isStart: _angular_core.Signal<boolean>;
|
|
2240
|
+
readonly reference: _angular_core.Signal<_esfaenza_flow_builder.FlowNodeRef | undefined>;
|
|
2241
|
+
readonly node: _angular_core.Signal<FlowAnyNode | undefined>;
|
|
2242
|
+
readonly type: _angular_core.Signal<string>;
|
|
2243
|
+
readonly typeLabel: _angular_core.Signal<string>;
|
|
2244
|
+
readonly isUnsupported: _angular_core.Signal<boolean>;
|
|
2245
|
+
/** I rilievi ancorati all'elemento (§7). */
|
|
2246
|
+
readonly issues: _angular_core.Signal<_esfaenza_flow_builder.FlowValidationIssue[]>;
|
|
2247
|
+
/** Il nome tecnico in modifica: si applica con un comando esplicito, non a ogni tasto. */
|
|
2248
|
+
readonly pendingName: _angular_core.WritableSignal<string | null>;
|
|
2249
|
+
readonly nameError: _angular_core.Signal<string | null>;
|
|
2250
|
+
/**
|
|
2251
|
+
* Quanti riferimenti verrebbero riscritti dalla rinomina. Serve a rendere visibile che
|
|
2252
|
+
* l'operazione tocca il resto del documento, non solo questo elemento.
|
|
2253
|
+
*/
|
|
2254
|
+
readonly referenceCount: _angular_core.Signal<number>;
|
|
2255
|
+
readonly canRename: _angular_core.Signal<boolean>;
|
|
2256
|
+
startRename(): void;
|
|
2257
|
+
onPendingNameInput(value: string): void;
|
|
2258
|
+
cancelRename(): void;
|
|
2259
|
+
/** Applica la rinomina riscrivendo tutti i riferimenti che raggiungono l'elemento. */
|
|
2260
|
+
applyRename(): void;
|
|
2261
|
+
setLabel(value: string): void;
|
|
2262
|
+
setDescription(value: string): void;
|
|
2263
|
+
/** Suggerisce il nome tecnico dalla label, come fa la creazione. */
|
|
2264
|
+
suggestNameFromLabel(): void;
|
|
2265
|
+
requestRemove(): void;
|
|
2266
|
+
requestDuplicate(): void;
|
|
2267
|
+
close(): void;
|
|
2268
|
+
/** Le coordinate sono l'unica informazione di layout che il modello conserva (§3.5). */
|
|
2269
|
+
readonly position: _angular_core.Signal<{
|
|
2270
|
+
x: number;
|
|
2271
|
+
y: number;
|
|
2272
|
+
}>;
|
|
2273
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ElementInspectorComponent, never>;
|
|
2274
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ElementInspectorComponent, "fb-element-inspector", never, { "selectedName": { "alias": "selectedName"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "removeRequested": "removeRequested"; "duplicateRequested": "duplicateRequested"; }, never, never, true, never>;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
declare class ElementDialogComponent {
|
|
2278
|
+
private readonly store;
|
|
2279
|
+
private readonly dictionaries;
|
|
2280
|
+
/** L'elemento da configurare; `$start` per lo Start. */
|
|
2281
|
+
readonly selectedName: _angular_core.InputSignal<string | null>;
|
|
2282
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
2283
|
+
readonly removeRequested: _angular_core.OutputEmitterRef<string>;
|
|
2284
|
+
readonly duplicateRequested: _angular_core.OutputEmitterRef<string>;
|
|
2285
|
+
private readonly panel;
|
|
2286
|
+
readonly isStart: _angular_core.Signal<boolean>;
|
|
2287
|
+
private readonly reference;
|
|
2288
|
+
readonly typeLabel: _angular_core.Signal<string>;
|
|
2289
|
+
readonly title: _angular_core.Signal<string>;
|
|
2290
|
+
constructor();
|
|
2291
|
+
close(): void;
|
|
2292
|
+
onRemoveRequested(name: string): void;
|
|
2293
|
+
onDuplicateRequested(name: string): void;
|
|
2294
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ElementDialogComponent, never>;
|
|
2295
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ElementDialogComponent, "fb-element-dialog", never, { "selectedName": { "alias": "selectedName"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "removeRequested": "removeRequested"; "duplicateRequested": "duplicateRequested"; }, never, never, true, never>;
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
declare class StartInspectorComponent {
|
|
2299
|
+
private readonly store;
|
|
2300
|
+
private readonly dictionaries;
|
|
2301
|
+
private readonly catalog;
|
|
2302
|
+
private readonly validation;
|
|
2303
|
+
readonly start: _angular_core.Signal<FlowStart>;
|
|
2304
|
+
readonly startNode: _angular_core.Signal<FlowAnyNode>;
|
|
2305
|
+
readonly outlets: _angular_core.Signal<_esfaenza_flow_builder.FlowOutlet[]>;
|
|
2306
|
+
readonly triggerTypes: _angular_core.Signal<_esfaenza_flow_builder.FlowDictionaryEntry[]>;
|
|
2307
|
+
readonly recordTriggerTypes: _angular_core.Signal<_esfaenza_flow_builder.FlowDictionaryEntry[]>;
|
|
2308
|
+
readonly frequencies: _angular_core.Signal<_esfaenza_flow_builder.FlowDictionaryEntry[]>;
|
|
2309
|
+
readonly offsetUnits: _angular_core.Signal<_esfaenza_flow_builder.FlowDictionaryEntry[]>;
|
|
2310
|
+
private readonly objects;
|
|
2311
|
+
constructor();
|
|
2312
|
+
readonly objectOptions: _angular_core.Signal<FlowObjectSummary[]>;
|
|
2313
|
+
readonly hasObjectCatalog: _angular_core.Signal<boolean>;
|
|
2314
|
+
readonly triggerType: _angular_core.Signal<string>;
|
|
2315
|
+
readonly isRecordTrigger: _angular_core.Signal<boolean>;
|
|
2316
|
+
readonly isScheduled: _angular_core.Signal<boolean>;
|
|
2317
|
+
readonly isEvent: _angular_core.Signal<boolean>;
|
|
2318
|
+
readonly hasEntryPoint: _angular_core.Signal<boolean>;
|
|
2319
|
+
readonly scheduledPaths: _angular_core.Signal<FlowScheduledPath[]>;
|
|
2320
|
+
/** I rilievi sul documento, che e' dove finiscono quelli dello Start (§7). */
|
|
2321
|
+
readonly issues: _angular_core.Signal<_esfaenza_flow_builder.FlowValidationIssue[]>;
|
|
2322
|
+
setTriggerType(value: string): void;
|
|
2323
|
+
setObject(value: string): void;
|
|
2324
|
+
setRecordTriggerType(value: string): void;
|
|
2325
|
+
setRequireChanged(value: boolean): void;
|
|
2326
|
+
setFrequency(value: string): void;
|
|
2327
|
+
setStartDate(value: string): void;
|
|
2328
|
+
setStartTime(value: string): void;
|
|
2329
|
+
/** La data arriva come `2026-08-01T00:00:00`; l'input `date` vuole solo la parte data. */
|
|
2330
|
+
readonly startDateValue: _angular_core.Signal<string>;
|
|
2331
|
+
readonly startTimeValue: _angular_core.Signal<string>;
|
|
2332
|
+
addScheduledPath(): void;
|
|
2333
|
+
removeScheduledPath(index: number): void;
|
|
2334
|
+
setPathField(index: number, field: keyof FlowScheduledPath, value: unknown): void;
|
|
2335
|
+
setPathOffsetNumber(index: number, value: string): void;
|
|
2336
|
+
onFiltersChanged(mutate: (holder: FilterHolder) => void): void;
|
|
2337
|
+
onConnectorChanged(event: {
|
|
2338
|
+
outletKey: string;
|
|
2339
|
+
target?: string;
|
|
2340
|
+
isGoTo?: boolean;
|
|
2341
|
+
}): void;
|
|
2342
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StartInspectorComponent, never>;
|
|
2343
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StartInspectorComponent, "fb-start-inspector", never, {}, {}, never, never, true, never>;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
interface ResourceKindDescriptor {
|
|
2347
|
+
collection: FlowResourceCollection;
|
|
2348
|
+
label: string;
|
|
2349
|
+
singular: string;
|
|
2350
|
+
isWritable: boolean;
|
|
2351
|
+
/** Cosa serve dichiarare, in una riga. */
|
|
2352
|
+
note: string;
|
|
2353
|
+
}
|
|
2354
|
+
declare class ResourcePanelComponent {
|
|
2355
|
+
private readonly store;
|
|
2356
|
+
private readonly dictionaries;
|
|
2357
|
+
private readonly catalog;
|
|
2358
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
2359
|
+
readonly kinds: ResourceKindDescriptor[];
|
|
2360
|
+
readonly dataTypes: _angular_core.Signal<_esfaenza_flow_builder.FlowDataTypeEntry[]>;
|
|
2361
|
+
readonly sortOrders: _angular_core.Signal<_esfaenza_flow_builder.FlowDictionaryEntry[]>;
|
|
2362
|
+
private readonly objects;
|
|
2363
|
+
private readonly enumTypes;
|
|
2364
|
+
/** La collection aperta nel pannello. */
|
|
2365
|
+
readonly activeCollection: _angular_core.WritableSignal<"variables" | "constants" | "formulas" | "textTemplates" | "choices" | "dynamicChoiceSets" | "stages">;
|
|
2366
|
+
/** L'indice della risorsa in modifica, o `null`. */
|
|
2367
|
+
readonly editingIndex: _angular_core.WritableSignal<number | null>;
|
|
2368
|
+
constructor();
|
|
2369
|
+
readonly objectOptions: _angular_core.Signal<FlowObjectSummary[]>;
|
|
2370
|
+
readonly enumOptions: _angular_core.Signal<FlowCatalogEntry[]>;
|
|
2371
|
+
readonly activeKind: _angular_core.Signal<ResourceKindDescriptor>;
|
|
2372
|
+
readonly items: _angular_core.Signal<FlowResourceRef[]>;
|
|
2373
|
+
countOf(collection: FlowResourceCollection): number;
|
|
2374
|
+
select(collection: FlowResourceCollection): void;
|
|
2375
|
+
toggleEdit(index: number): void;
|
|
2376
|
+
/** Nome valido e libero nello spazio dei nomi condiviso con i node (§3.3, §13.5). */
|
|
2377
|
+
nameError(reference: FlowResourceRef): string | null;
|
|
2378
|
+
add(): void;
|
|
2379
|
+
remove(reference: FlowResourceRef): void;
|
|
2380
|
+
rename(reference: FlowResourceRef, name: string): void;
|
|
2381
|
+
setField(reference: FlowResourceRef, field: string, value: unknown): void;
|
|
2382
|
+
setNumberField(reference: FlowResourceRef, field: string, raw: string): void;
|
|
2383
|
+
setBooleanField(reference: FlowResourceRef, field: string, value: boolean): void;
|
|
2384
|
+
setValue(reference: FlowResourceRef, value: FlowValue | undefined): void;
|
|
2385
|
+
setDataType(reference: FlowResourceRef, dataType: string): void;
|
|
2386
|
+
requiresObjectType(reference: FlowResourceRef): boolean;
|
|
2387
|
+
supportsScale(reference: FlowResourceRef): boolean;
|
|
2388
|
+
isEnum(reference: FlowResourceRef): boolean;
|
|
2389
|
+
/** Una costante che referenzia una risorsa e' `CONSTANT_REFERENCES_RESOURCE`. */
|
|
2390
|
+
constantReferencesResource(reference: FlowResourceRef): boolean;
|
|
2391
|
+
/** `stageOrder` duplicati: quale stage sia il corrente all'avvio diventa arbitrario. */
|
|
2392
|
+
duplicateStageOrder(reference: FlowResourceRef): boolean;
|
|
2393
|
+
string(reference: FlowResourceRef, field: string): string;
|
|
2394
|
+
boolean(reference: FlowResourceRef, field: string): boolean;
|
|
2395
|
+
value(reference: FlowResourceRef): FlowValue | undefined;
|
|
2396
|
+
close(): void;
|
|
2397
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResourcePanelComponent, never>;
|
|
2398
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ResourcePanelComponent, "fb-resource-panel", never, {}, { "closed": "closed"; }, never, never, true, never>;
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
type SeverityFilter = 'all' | 'Error' | 'Warning' | 'Info';
|
|
2402
|
+
declare class ProblemsPanelComponent {
|
|
2403
|
+
private readonly validation;
|
|
2404
|
+
/** Chiede di selezionare l'elemento: `$start` per i rilievi sul documento. */
|
|
2405
|
+
readonly elementFocused: _angular_core.OutputEmitterRef<string>;
|
|
2406
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
2407
|
+
readonly filter: _angular_core.WritableSignal<SeverityFilter>;
|
|
2408
|
+
readonly isRunning: _angular_core.Signal<boolean>;
|
|
2409
|
+
readonly hasResult: _angular_core.Signal<boolean>;
|
|
2410
|
+
readonly lastError: _angular_core.Signal<string | null>;
|
|
2411
|
+
readonly errorCount: _angular_core.Signal<number>;
|
|
2412
|
+
readonly warningCount: _angular_core.Signal<number>;
|
|
2413
|
+
readonly infoCount: _angular_core.Signal<number>;
|
|
2414
|
+
readonly issues: _angular_core.Signal<FlowValidationIssue[]>;
|
|
2415
|
+
readonly isClean: _angular_core.Signal<boolean>;
|
|
2416
|
+
setFilter(filter: SeverityFilter): void;
|
|
2417
|
+
focus(issue: FlowValidationIssue): void;
|
|
2418
|
+
close(): void;
|
|
2419
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProblemsPanelComponent, never>;
|
|
2420
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProblemsPanelComponent, "fb-problems-panel", never, {}, { "elementFocused": "elementFocused"; "closed": "closed"; }, never, never, true, never>;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
declare class VersionPanelComponent {
|
|
2424
|
+
private readonly session;
|
|
2425
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
2426
|
+
readonly versionOpened: _angular_core.OutputEmitterRef<number>;
|
|
2427
|
+
/** Comunica un esito all'host, che lo mostra come notifica. */
|
|
2428
|
+
readonly notice: _angular_core.OutputEmitterRef<{
|
|
2429
|
+
kind: "info" | "error";
|
|
2430
|
+
message: string;
|
|
2431
|
+
}>;
|
|
2432
|
+
readonly versions: _angular_core.Signal<FlowVersionSummary[]>;
|
|
2433
|
+
readonly currentVersion: _angular_core.Signal<number | null>;
|
|
2434
|
+
readonly isBusy: _angular_core.Signal<boolean>;
|
|
2435
|
+
readonly canActivate: _angular_core.Signal<boolean>;
|
|
2436
|
+
/** La versione per cui e' stata chiesta l'eliminazione: conferma in due passi. */
|
|
2437
|
+
readonly pendingDelete: _angular_core.WritableSignal<number | null>;
|
|
2438
|
+
isCurrent(version: FlowVersionSummary): boolean;
|
|
2439
|
+
statusLabel(version: FlowVersionSummary): string;
|
|
2440
|
+
open(version: FlowVersionSummary): void;
|
|
2441
|
+
activate(version: FlowVersionSummary): Promise<void>;
|
|
2442
|
+
deactivate(): Promise<void>;
|
|
2443
|
+
createNewVersion(): Promise<void>;
|
|
2444
|
+
requestDelete(version: FlowVersionSummary): void;
|
|
2445
|
+
cancelDelete(): void;
|
|
2446
|
+
confirmDelete(version: number): Promise<void>;
|
|
2447
|
+
readonly hasActiveVersion: _angular_core.Signal<boolean>;
|
|
2448
|
+
close(): void;
|
|
2449
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<VersionPanelComponent, never>;
|
|
2450
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<VersionPanelComponent, "fb-version-panel", never, {}, { "closed": "closed"; "versionOpened": "versionOpened"; "notice": "notice"; }, never, never, true, never>;
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
declare class DebugPanelComponent {
|
|
2454
|
+
private readonly api;
|
|
2455
|
+
private readonly store;
|
|
2456
|
+
private readonly session;
|
|
2457
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
2458
|
+
/** Chiede all'host di evidenziare l'elemento corrente dell'esecuzione. */
|
|
2459
|
+
readonly elementFocused: _angular_core.OutputEmitterRef<string>;
|
|
2460
|
+
readonly result: _angular_core.WritableSignal<FlowInterviewResult | null>;
|
|
2461
|
+
readonly isRunning: _angular_core.WritableSignal<boolean>;
|
|
2462
|
+
readonly errorMessage: _angular_core.WritableSignal<string | null>;
|
|
2463
|
+
readonly debugEnabled: _angular_core.WritableSignal<boolean>;
|
|
2464
|
+
/** I valori che l'utente compila nel piccolo form generato dalle variabili di input. */
|
|
2465
|
+
readonly inputValues: _angular_core.WritableSignal<Record<string, string>>;
|
|
2466
|
+
/** I valori raccolti per lo screen corrente, per nome di `outputParameters`. */
|
|
2467
|
+
readonly screenOutputs: _angular_core.WritableSignal<Record<string, string>>;
|
|
2468
|
+
/** Le variabili `isInput` del flow: il contratto verso chi lo invoca (§4.6). */
|
|
2469
|
+
readonly inputVariables: _angular_core.Signal<FlowVariable[]>;
|
|
2470
|
+
readonly canRun: _angular_core.Signal<boolean>;
|
|
2471
|
+
readonly status: _angular_core.Signal<string | null>;
|
|
2472
|
+
readonly pendingScreen: _angular_core.Signal<_esfaenza_flow_builder.FlowPendingScreen | null>;
|
|
2473
|
+
readonly isWaitingForScreen: _angular_core.Signal<boolean>;
|
|
2474
|
+
readonly trace: _angular_core.Signal<_esfaenza_flow_builder.FlowTraceEntry[]>;
|
|
2475
|
+
/** Le risorse come righe ordinate: il tipo dichiarato vince in lettura (§6.5). */
|
|
2476
|
+
readonly resourceRows: _angular_core.Signal<{
|
|
2477
|
+
name: string;
|
|
2478
|
+
type: string;
|
|
2479
|
+
value: string;
|
|
2480
|
+
}[]>;
|
|
2481
|
+
readonly outputRows: _angular_core.Signal<{
|
|
2482
|
+
name: string;
|
|
2483
|
+
type: string;
|
|
2484
|
+
value: string;
|
|
2485
|
+
}[]>;
|
|
2486
|
+
/** Gli input che lo screen corrente riceve, per mostrarli accanto al form generico. */
|
|
2487
|
+
readonly screenInputRows: _angular_core.Signal<{
|
|
2488
|
+
name: string;
|
|
2489
|
+
type: string;
|
|
2490
|
+
value: string;
|
|
2491
|
+
}[]>;
|
|
2492
|
+
/** I nomi degli output dichiarati dallo screen, per generare i campi da compilare. */
|
|
2493
|
+
readonly screenOutputNames: _angular_core.Signal<string[]>;
|
|
2494
|
+
private static render;
|
|
2495
|
+
setDebugEnabled(value: boolean): void;
|
|
2496
|
+
setInputValue(name: string, value: string): void;
|
|
2497
|
+
setScreenOutput(name: string, value: string): void;
|
|
2498
|
+
/** Converte i valori del form nel tipo dichiarato dalla variabile. */
|
|
2499
|
+
private coerceInputs;
|
|
2500
|
+
start(): Promise<void>;
|
|
2501
|
+
respond(navigation: FlowScreenNavigation): Promise<void>;
|
|
2502
|
+
private apply;
|
|
2503
|
+
private handleError;
|
|
2504
|
+
reset(): void;
|
|
2505
|
+
close(): void;
|
|
2506
|
+
/** L'etichetta dello stato, che non e' un errore anche quando dice "Failed" (§6.5). */
|
|
2507
|
+
statusLabel(): string;
|
|
2508
|
+
statusNote(): string | null;
|
|
2509
|
+
canGoBack(): boolean;
|
|
2510
|
+
canFinish(): boolean;
|
|
2511
|
+
canPause(): boolean;
|
|
2512
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DebugPanelComponent, never>;
|
|
2513
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DebugPanelComponent, "fb-debug-panel", never, {}, { "closed": "closed"; "elementFocused": "elementFocused"; }, never, never, true, never>;
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
type SidePanel = 'inspector' | 'resources' | 'versions' | 'debug';
|
|
2517
|
+
interface Notice {
|
|
2518
|
+
kind: 'info' | 'error';
|
|
2519
|
+
message: string;
|
|
2520
|
+
}
|
|
2521
|
+
declare class FlowBuilderComponent {
|
|
2522
|
+
private readonly api;
|
|
2523
|
+
private readonly destroyRef;
|
|
2524
|
+
protected readonly store: FlowDocumentStore;
|
|
2525
|
+
protected readonly dictionaries: FlowDictionaryStore;
|
|
2526
|
+
protected readonly session: FlowEditorSession;
|
|
2527
|
+
protected readonly validation: FlowValidationStore;
|
|
2528
|
+
private readonly layout;
|
|
2529
|
+
/** Il flow da aprire. Assente → si parte da un flow nuovo. */
|
|
2530
|
+
readonly flowName: _angular_core.InputSignal<string | null>;
|
|
2531
|
+
/** La versione da aprire; assente → l'attiva se c'e', altrimenti l'ultima (§6.1). */
|
|
2532
|
+
readonly version: _angular_core.InputSignal<number | null>;
|
|
2533
|
+
/** Registrato sulla versione e mostrato nell'elenco (§6.2). */
|
|
2534
|
+
readonly author: _angular_core.InputSignal<string | undefined>;
|
|
2535
|
+
/** `processType` iniziale di un flow nuovo. */
|
|
2536
|
+
readonly defaultProcessType: _angular_core.InputSignal<string>;
|
|
2537
|
+
/**
|
|
2538
|
+
* Dove si configura l'elemento selezionato.
|
|
2539
|
+
*
|
|
2540
|
+
* `dialog` (predefinito) apre il form in una finestra sopra il canvas, come il flow builder
|
|
2541
|
+
* di Salesforce: i form degli elementi sono grandi e in una colonna da 340px si scorreva
|
|
2542
|
+
* troppo. `panel` tiene il form nel pannello laterale, che e' piu' comodo quando si
|
|
2543
|
+
* modificano molti elementi di fila perche' non c'e' niente da aprire e chiudere.
|
|
2544
|
+
*/
|
|
2545
|
+
readonly inspectorMode: _angular_core.InputSignal<"panel" | "dialog">;
|
|
2546
|
+
readonly saved: _angular_core.OutputEmitterRef<FlowSaveResult>;
|
|
2547
|
+
readonly activated: _angular_core.OutputEmitterRef<FlowSaveResult>;
|
|
2548
|
+
readonly closeRequested: _angular_core.OutputEmitterRef<void>;
|
|
2549
|
+
readonly selectedName: _angular_core.WritableSignal<string | null>;
|
|
2550
|
+
readonly activePanel: _angular_core.WritableSignal<SidePanel>;
|
|
2551
|
+
/** La dialog del dettaglio e' aperta. Vale solo con `inspectorMode = 'dialog'`. */
|
|
2552
|
+
readonly isDialogOpen: _angular_core.WritableSignal<boolean>;
|
|
2553
|
+
readonly showProblems: _angular_core.WritableSignal<boolean>;
|
|
2554
|
+
readonly notice: _angular_core.WritableSignal<Notice | null>;
|
|
2555
|
+
readonly outline: _angular_core.WritableSignal<FlowOutline | null>;
|
|
2556
|
+
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
2557
|
+
/** Il documento e' cambiato: usato per riscadenzare validazione e outline. */
|
|
2558
|
+
private lastDocument?;
|
|
2559
|
+
private outlineTimer?;
|
|
2560
|
+
readonly isDialogMode: _angular_core.Signal<boolean>;
|
|
2561
|
+
/**
|
|
2562
|
+
* Il pannello effettivamente mostrato a lato. Con la dialog il tab «Elemento» non esiste:
|
|
2563
|
+
* avere lo stesso form in due posti confonde su quale dei due sia quello vero.
|
|
2564
|
+
*/
|
|
2565
|
+
readonly sidePanel: _angular_core.Signal<SidePanel>;
|
|
2566
|
+
readonly document: _angular_core.Signal<FlowDefinition>;
|
|
2567
|
+
readonly isDirty: _angular_core.Signal<boolean>;
|
|
2568
|
+
readonly canUndo: _angular_core.Signal<boolean>;
|
|
2569
|
+
readonly canRedo: _angular_core.Signal<boolean>;
|
|
2570
|
+
readonly primaryCommand: _angular_core.Signal<"create" | "save" | "newVersion">;
|
|
2571
|
+
readonly isEditable: _angular_core.Signal<boolean>;
|
|
2572
|
+
readonly conflict: _angular_core.Signal<_esfaenza_flow_builder.FlowConflictState | null>;
|
|
2573
|
+
readonly errorCount: _angular_core.Signal<number>;
|
|
2574
|
+
readonly warningCount: _angular_core.Signal<number>;
|
|
2575
|
+
readonly canActivate: _angular_core.Signal<boolean>;
|
|
2576
|
+
readonly isBusy: _angular_core.Signal<boolean>;
|
|
2577
|
+
readonly statusLabel: _angular_core.Signal<string>;
|
|
2578
|
+
constructor();
|
|
2579
|
+
private openOrCreate;
|
|
2580
|
+
private scheduleOutline;
|
|
2581
|
+
setLabel(value: string): void;
|
|
2582
|
+
setFullName(value: string): void;
|
|
2583
|
+
setDescription(value: string): void;
|
|
2584
|
+
setInterviewLabel(value: string): void;
|
|
2585
|
+
setProcessType(value: string): void;
|
|
2586
|
+
readonly processTypes: _angular_core.Signal<_esfaenza_flow_builder.FlowDictionaryEntry[]>;
|
|
2587
|
+
/** `AutoLaunched` + screen e' un errore di validazione: si segnala subito (§13.6). */
|
|
2588
|
+
readonly hasScreensInAutoLaunched: _angular_core.Signal<boolean>;
|
|
2589
|
+
/** Un flow `Screen` senza screen e' `SCREEN_FLOW_WITHOUT_SCREENS`. */
|
|
2590
|
+
readonly hasNoScreensInScreenFlow: _angular_core.Signal<boolean>;
|
|
2591
|
+
/** `Orchestration` non e' eseguibile dal motore. */
|
|
2592
|
+
readonly isOrchestration: _angular_core.Signal<boolean>;
|
|
2593
|
+
/**
|
|
2594
|
+
* Click singolo sul canvas: seleziona. Con la dialog il form **non** si apre qui: un click
|
|
2595
|
+
* capita anche solo per spostare un node, e una finestra che si apre a ogni click sarebbe
|
|
2596
|
+
* insopportabile. Nel pannello laterale, invece, mostrare subito il form non costa nulla.
|
|
2597
|
+
*/
|
|
2598
|
+
onSelectionChange(name: string | null): void;
|
|
2599
|
+
/** Doppio click o bottone «✎» sul node: qui il dettaglio si apre. */
|
|
2600
|
+
onNodeOpened(name: string): void;
|
|
2601
|
+
/** Porta l'utente sull'elemento **e** ne apre il form: e' l'ancora dei problemi (§7). */
|
|
2602
|
+
focusElement(name: string): void;
|
|
2603
|
+
/** Apre il dettaglio dell'elemento, nella dialog o nel pannello secondo la modalita'. */
|
|
2604
|
+
openElement(name: string): void;
|
|
2605
|
+
/** Il comando della top bar: apre il dettaglio di cio' che e' selezionato. */
|
|
2606
|
+
openSelectedElement(): void;
|
|
2607
|
+
closeDialog(): void;
|
|
2608
|
+
/**
|
|
2609
|
+
* Evidenzia l'elemento sul canvas senza cambiare pannello.
|
|
2610
|
+
* Serve durante la prova: l'esecuzione segnala su quale elemento e' ferma, ma sostituire
|
|
2611
|
+
* il pannello con l'inspector farebbe sparire il form da compilare a metà interview.
|
|
2612
|
+
*/
|
|
2613
|
+
highlightElement(name: string): void;
|
|
2614
|
+
/** Rilascio dalla palette: il punto di rilascio diventa `locationX`/`locationY` (§11). */
|
|
2615
|
+
onElementDropped(event: {
|
|
2616
|
+
type: FlowElementType;
|
|
2617
|
+
x: number;
|
|
2618
|
+
y: number;
|
|
2619
|
+
}): void;
|
|
2620
|
+
/** Click sulla palette: l'elemento si posiziona in una zona libera. */
|
|
2621
|
+
onElementPicked(type: FlowElementType): void;
|
|
2622
|
+
private createElement;
|
|
2623
|
+
onRemoveNode(name: string): void;
|
|
2624
|
+
onDuplicateNode(name: string): void;
|
|
2625
|
+
/** Riordina il grafo e **scrive** le coordinate nel documento (§3.5). */
|
|
2626
|
+
autoLayout(): void;
|
|
2627
|
+
undo(): void;
|
|
2628
|
+
redo(): void;
|
|
2629
|
+
save(): Promise<void>;
|
|
2630
|
+
createNewVersion(): Promise<void>;
|
|
2631
|
+
activate(): Promise<void>;
|
|
2632
|
+
/** §9.3 — prima opzione davanti a un conflitto. */
|
|
2633
|
+
reloadAfterConflict(): Promise<void>;
|
|
2634
|
+
/** §9.3 — seconda opzione: conserva le modifiche locali in una nuova versione. */
|
|
2635
|
+
saveAsNewVersionAfterConflict(): Promise<void>;
|
|
2636
|
+
dismissConflict(): void;
|
|
2637
|
+
/** Esporta il documento come JSON indentato, per un salvataggio fuori dal backend. */
|
|
2638
|
+
exportJson(): string;
|
|
2639
|
+
/**
|
|
2640
|
+
* Importa un documento. Passa da `POST /flows/parse`, che lo normalizza o lo rifiuta con
|
|
2641
|
+
* `InvalidDefinition`: e' l'unico modo di sapere se il file e' leggibile prima di caricarlo.
|
|
2642
|
+
*/
|
|
2643
|
+
importJson(raw: string): Promise<void>;
|
|
2644
|
+
onFileSelected(event: Event): void;
|
|
2645
|
+
openVersion(version: number): Promise<void>;
|
|
2646
|
+
/** Valida subito, senza attendere la pausa di digitazione. */
|
|
2647
|
+
validateNow(): Promise<void>;
|
|
2648
|
+
setPanel(panel: SidePanel): void;
|
|
2649
|
+
toggleProblems(): void;
|
|
2650
|
+
showNotice(notice: Notice): void;
|
|
2651
|
+
dismissNotice(): void;
|
|
2652
|
+
private showError;
|
|
2653
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlowBuilderComponent, never>;
|
|
2654
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FlowBuilderComponent, "fb-flow-builder", never, { "flowName": { "alias": "flowName"; "required": false; "isSignal": true; }; "version": { "alias": "version"; "required": false; "isSignal": true; }; "author": { "alias": "author"; "required": false; "isSignal": true; }; "defaultProcessType": { "alias": "defaultProcessType"; "required": false; "isSignal": true; }; "inspectorMode": { "alias": "inspectorMode"; "required": false; "isSignal": true; }; }, { "saved": "saved"; "activated": "activated"; "closeRequested": "closeRequested"; }, never, never, true, never>;
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2657
|
+
declare class SelectValueDirective implements AfterViewChecked {
|
|
2658
|
+
private readonly element;
|
|
2659
|
+
readonly fbValue: _angular_core.InputSignal<string | number | null | undefined>;
|
|
2660
|
+
ngAfterViewChecked(): void;
|
|
2661
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectValueDirective, never>;
|
|
2662
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SelectValueDirective, "select[fbValue]", never, { "fbValue": { "alias": "fbValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
export { ConditionEditorComponent, ConnectorEditorComponent, DebugPanelComponent, ElementDialogComponent, ElementInspectorComponent, ElementPaletteComponent, FALLBACK_COLLECTION_BY_TYPE, FALLBACK_TYPE_LABEL, FLOW_BUILDER_HTTP_CONFIG, FLOW_ELEMENT_ICONS, FLOW_ERROR_FALLBACK_MESSAGE, FLOW_ERROR_HTTP_STATUS, FLOW_NAME_PATTERN, FLOW_NODE_COLLECTIONS, FLOW_NODE_HEIGHT, FLOW_NODE_WIDTH, FLOW_RESOURCE_COLLECTIONS, FieldAssignmentEditorComponent, FlowApiError, FlowBuilderApi, FlowBuilderComponent, FlowCanvasComponent, FlowCatalogStore, FlowDictionaryStore, FlowDocumentStore, FlowEditorSession, FlowLayoutService, FlowValidationStore, HttpFlowBuilderApi, NodeInspectorBase, ParameterEditorComponent, ProblemsPanelComponent, RecordFilterEditorComponent, ReferencePickerComponent, ResourcePanelComponent, START_NODE_NAME, SelectValueDirective, StartInspectorComponent, TYPES_WITH_AUTOMATIC_OUTPUT, TYPE_BY_COLLECTION, UNSUPPORTED_TYPES, ValueEditorComponent, VersionPanelComponent, canvasNodeId, checkConditionLogic, checkFlowName, elementIcon, emptyFlowDefinition, flowNodeWidth, flowNodeWidthClass, isCustomConditionLogic, isGlobalReference, isValidFlowName, moveCondition, outletByKey, outletsOf, parseCanvasNodeId, parseSourceConnectorId, parseTargetConnectorId, referenceRoot, remapConditionLogic, removeCondition, slugifyFlowName, sourceConnectorId, targetConnectorId, uniqueFlowName };
|
|
2666
|
+
export type { FieldAssignmentHolder, FilterHolder, FlowActionCall, FlowAnyNode, FlowAssignment, FlowAssignmentItem, FlowAssignmentOperator, FlowAssignmentOperatorEntry, FlowBuilderHttpConfig, FlowCanvasEdge, FlowCanvasNode, FlowCatalogEntry, FlowCatalogParameter, FlowChoice, FlowCloneRequest, FlowCollectionProcessor, FlowCollectionProcessorType, FlowComparisonOperator, FlowComparisonOperatorEntry, FlowCondition, FlowConditionHolder, FlowConditionLogic, FlowConflictState, FlowConnectionKind, FlowConnector, FlowConnectorTarget, FlowConstant, FlowCreateRequest, FlowCustomError, FlowCustomErrorMessage, FlowCustomProperty, FlowDataType, FlowDataTypeEntry, FlowDecision, FlowDecisionRule, FlowDefinition, FlowDictionaries, FlowDictionaryEntry, FlowDynamicChoiceSet, FlowEdge, FlowElementType, FlowElementTypeEntry, FlowErrorCategory, FlowExportQuery, FlowFieldDescription, FlowFieldUsage, FlowFieldValue, FlowFormula, FlowGlobalVariableEntry, FlowInputFieldAssignment, FlowInputParameter, FlowInterviewResult, FlowInterviewStatus, FlowIssueSeverity, FlowLayoutDirection, FlowLayoutNodeInput, FlowLayoutOptions, FlowLayoutResult, FlowListQuery, FlowLoop, FlowNameCheck, FlowNameProblem, FlowNewVersionRequest, FlowNodeBase, FlowNodeCollection, FlowNodeRef, FlowObjectDescription, FlowObjectSummary, FlowOffsetUnit, FlowOutlet, FlowOutline, FlowOutlineConnection, FlowOutlineNode, FlowOutputFieldAssignment, FlowOutputParameter, FlowPendingScreen, FlowProcessType, FlowRecordCreate, FlowRecordDelete, FlowRecordFilter, FlowRecordFilterOperator, FlowRecordLookup, FlowRecordRollback, FlowRecordTriggerType, FlowRecordUpdate, FlowReference, FlowReferenceKind, FlowReferenceQuery, FlowResourceCollection, FlowResourceKindEntry, FlowResourceRef, FlowResumeRequest, FlowSaveRequest, FlowSaveResult, FlowSchedule, FlowScheduledPath, FlowScreen, FlowScreenNavigation, FlowScreenResponseRequest, FlowScriptPluginCall, FlowSortOption, FlowSortOrder, FlowStage, FlowStart, FlowStartInterviewRequest, FlowSubflow, FlowSubflowInputAssignment, FlowSubflowOutputAssignment, FlowSummary, FlowTextTemplate, FlowTraceEntry, FlowTransactionModel, FlowTransform, FlowTransformType, FlowTransformValue, FlowTransformValueAction, FlowTriggerType, FlowTypedValue, FlowUnsupportedNode, FlowValidationIssue, FlowValidationResult, FlowValue, FlowVariable, FlowVersionStatus, FlowVersionSummary, FlowWait, FlowWaitEvent, ParameterHolder, ValueMode };
|