@nyaruka/temba-components 0.138.6 → 0.140.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/.github/workflows/cla.yml +1 -1
- package/.github/workflows/copilot-setup-steps.yml +6 -1
- package/CHANGELOG.md +26 -0
- package/demo/data/flows/sample-flow.json +24 -0
- package/dist/locales/es.js +5 -5
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.js +5 -5
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/locale-codes.js +2 -11
- package/dist/locales/locale-codes.js.map +1 -1
- package/dist/locales/pt.js +5 -5
- package/dist/locales/pt.js.map +1 -1
- package/dist/temba-components.js +1112 -882
- package/dist/temba-components.js.map +1 -1
- package/out-tsc/src/display/Chat.js +10 -7
- package/out-tsc/src/display/Chat.js.map +1 -1
- package/out-tsc/src/display/Dropdown.js +3 -1
- package/out-tsc/src/display/Dropdown.js.map +1 -1
- package/out-tsc/src/display/FloatingTab.js +25 -32
- package/out-tsc/src/display/FloatingTab.js.map +1 -1
- package/out-tsc/src/display/Thumbnail.js +163 -5
- package/out-tsc/src/display/Thumbnail.js.map +1 -1
- package/out-tsc/src/flow/CanvasMenu.js +5 -3
- package/out-tsc/src/flow/CanvasMenu.js.map +1 -1
- package/out-tsc/src/flow/CanvasNode.js +70 -29
- package/out-tsc/src/flow/CanvasNode.js.map +1 -1
- package/out-tsc/src/flow/Editor.js +290 -239
- package/out-tsc/src/flow/Editor.js.map +1 -1
- package/out-tsc/src/flow/NodeEditor.js +118 -10
- package/out-tsc/src/flow/NodeEditor.js.map +1 -1
- package/out-tsc/src/flow/Plumber.js +757 -403
- package/out-tsc/src/flow/Plumber.js.map +1 -1
- package/out-tsc/src/flow/StickyNote.js +13 -4
- package/out-tsc/src/flow/StickyNote.js.map +1 -1
- package/out-tsc/src/flow/actions/audio-player.js +112 -0
- package/out-tsc/src/flow/actions/audio-player.js.map +1 -0
- package/out-tsc/src/flow/actions/enter_flow.js +43 -0
- package/out-tsc/src/flow/actions/enter_flow.js.map +1 -0
- package/out-tsc/src/flow/actions/play_audio.js +57 -4
- package/out-tsc/src/flow/actions/play_audio.js.map +1 -1
- package/out-tsc/src/flow/actions/say_msg.js +86 -3
- package/out-tsc/src/flow/actions/say_msg.js.map +1 -1
- package/out-tsc/src/flow/config.js +11 -3
- package/out-tsc/src/flow/config.js.map +1 -1
- package/out-tsc/src/flow/nodes/shared-rules.js +1 -1
- package/out-tsc/src/flow/nodes/shared-rules.js.map +1 -1
- package/out-tsc/src/flow/nodes/terminal.js +7 -0
- package/out-tsc/src/flow/nodes/terminal.js.map +1 -0
- package/out-tsc/src/flow/nodes/wait_for_audio.js +77 -0
- package/out-tsc/src/flow/nodes/wait_for_audio.js.map +1 -0
- package/out-tsc/src/flow/nodes/wait_for_dial.js +151 -0
- package/out-tsc/src/flow/nodes/wait_for_dial.js.map +1 -0
- package/out-tsc/src/flow/nodes/wait_for_digits.js +61 -1
- package/out-tsc/src/flow/nodes/wait_for_digits.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_menu.js +173 -2
- package/out-tsc/src/flow/nodes/wait_for_menu.js.map +1 -1
- package/out-tsc/src/flow/operators.js +21 -5
- package/out-tsc/src/flow/operators.js.map +1 -1
- package/out-tsc/src/flow/types.js.map +1 -1
- package/out-tsc/src/flow/utils.js +213 -65
- package/out-tsc/src/flow/utils.js.map +1 -1
- package/out-tsc/src/form/ArrayEditor.js +4 -2
- package/out-tsc/src/form/ArrayEditor.js.map +1 -1
- package/out-tsc/src/form/FieldRenderer.js +49 -0
- package/out-tsc/src/form/FieldRenderer.js.map +1 -1
- package/out-tsc/src/interfaces.js +2 -0
- package/out-tsc/src/interfaces.js.map +1 -1
- package/out-tsc/src/layout/Dialog.js +52 -7
- package/out-tsc/src/layout/Dialog.js.map +1 -1
- package/out-tsc/src/list/TicketList.js +4 -1
- package/out-tsc/src/list/TicketList.js.map +1 -1
- package/out-tsc/src/live/TembaChart.js.map +1 -1
- package/out-tsc/src/locales/es.js +5 -5
- package/out-tsc/src/locales/es.js.map +1 -1
- package/out-tsc/src/locales/fr.js +5 -5
- package/out-tsc/src/locales/fr.js.map +1 -1
- package/out-tsc/src/locales/locale-codes.js +2 -11
- package/out-tsc/src/locales/locale-codes.js.map +1 -1
- package/out-tsc/src/locales/pt.js +5 -5
- package/out-tsc/src/locales/pt.js.map +1 -1
- package/out-tsc/src/simulator/Simulator.js +10 -3
- package/out-tsc/src/simulator/Simulator.js.map +1 -1
- package/out-tsc/src/store/AppState.js +89 -3
- package/out-tsc/src/store/AppState.js.map +1 -1
- package/out-tsc/test/actions/play_audio.test.js +118 -0
- package/out-tsc/test/actions/play_audio.test.js.map +1 -0
- package/out-tsc/test/actions/say_msg.test.js +158 -0
- package/out-tsc/test/actions/say_msg.test.js.map +1 -0
- package/out-tsc/test/nodes/wait_for_audio.test.js +156 -0
- package/out-tsc/test/nodes/wait_for_audio.test.js.map +1 -0
- package/out-tsc/test/nodes/wait_for_dial.test.js +336 -0
- package/out-tsc/test/nodes/wait_for_dial.test.js.map +1 -0
- package/out-tsc/test/nodes/wait_for_digits.test.js +198 -84
- package/out-tsc/test/nodes/wait_for_digits.test.js.map +1 -1
- package/out-tsc/test/nodes/wait_for_menu.test.js +340 -0
- package/out-tsc/test/nodes/wait_for_menu.test.js.map +1 -0
- package/out-tsc/test/temba-floating-tab.test.js +4 -6
- package/out-tsc/test/temba-floating-tab.test.js.map +1 -1
- package/out-tsc/test/temba-flow-collision.test.js +473 -220
- package/out-tsc/test/temba-flow-collision.test.js.map +1 -1
- package/out-tsc/test/temba-flow-editor.test.js +0 -2
- package/out-tsc/test/temba-flow-editor.test.js.map +1 -1
- package/out-tsc/test/temba-flow-plumber-connections.test.js +83 -84
- package/out-tsc/test/temba-flow-plumber-connections.test.js.map +1 -1
- package/out-tsc/test/temba-flow-plumber.test.js +102 -93
- package/out-tsc/test/temba-flow-plumber.test.js.map +1 -1
- package/out-tsc/test/temba-node-type-selector.test.js +6 -6
- package/out-tsc/test/temba-node-type-selector.test.js.map +1 -1
- package/package.json +1 -1
- package/screenshots/truth/actions/play_audio/editor/expression-url.png +0 -0
- package/screenshots/truth/actions/play_audio/editor/static-url.png +0 -0
- package/screenshots/truth/actions/play_audio/render/expression-url.png +0 -0
- package/screenshots/truth/actions/play_audio/render/static-url.png +0 -0
- package/screenshots/truth/actions/say_msg/editor/multiline-text.png +0 -0
- package/screenshots/truth/actions/say_msg/editor/simple-text.png +0 -0
- package/screenshots/truth/actions/say_msg/editor/text-with-audio-url.png +0 -0
- package/screenshots/truth/actions/say_msg/render/multiline-text.png +0 -0
- package/screenshots/truth/actions/say_msg/render/simple-text.png +0 -0
- package/screenshots/truth/actions/say_msg/render/text-with-audio-url.png +0 -0
- package/screenshots/truth/editor/router.png +0 -0
- package/screenshots/truth/editor/wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_audio/editor/basic-audio-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_audio/render/basic-audio-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_dial/editor/basic-dial.png +0 -0
- package/screenshots/truth/nodes/wait_for_dial/editor/dial-with-limits.png +0 -0
- package/screenshots/truth/nodes/wait_for_dial/render/basic-dial.png +0 -0
- package/screenshots/truth/nodes/wait_for_dial/render/dial-with-limits.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/editor/basic-digits-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/editor/digits-with-rules.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/render/basic-digits-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/render/digits-with-rules.png +0 -0
- package/screenshots/truth/nodes/wait_for_menu/editor/menu-with-digits.png +0 -0
- package/screenshots/truth/nodes/wait_for_menu/render/menu-with-digits.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/editor/basic-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/editor/custom-result-name.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/editor/no-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/editor/short-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/render/basic-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/render/custom-result-name.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/render/no-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/render/short-timeout.png +0 -0
- package/src/display/Chat.ts +13 -7
- package/src/display/Dropdown.ts +3 -1
- package/src/display/FloatingTab.ts +24 -33
- package/src/display/Thumbnail.ts +162 -2
- package/src/flow/CanvasMenu.ts +8 -3
- package/src/flow/CanvasNode.ts +75 -30
- package/src/flow/Editor.ts +336 -288
- package/src/flow/NodeEditor.ts +137 -9
- package/src/flow/Plumber.ts +1011 -457
- package/src/flow/StickyNote.ts +14 -4
- package/src/flow/actions/audio-player.ts +127 -0
- package/src/flow/actions/enter_flow.ts +44 -0
- package/src/flow/actions/play_audio.ts +64 -5
- package/src/flow/actions/say_msg.ts +94 -4
- package/src/flow/config.ts +11 -3
- package/src/flow/nodes/shared-rules.ts +1 -1
- package/src/flow/nodes/terminal.ts +9 -0
- package/src/flow/nodes/wait_for_audio.ts +88 -0
- package/src/flow/nodes/wait_for_dial.ts +176 -0
- package/src/flow/nodes/wait_for_digits.ts +86 -2
- package/src/flow/nodes/wait_for_menu.ts +209 -3
- package/src/flow/operators.ts +23 -5
- package/src/flow/types.ts +23 -1
- package/src/flow/utils.ts +238 -81
- package/src/form/ArrayEditor.ts +4 -2
- package/src/form/FieldRenderer.ts +64 -1
- package/src/interfaces.ts +3 -1
- package/src/layout/Dialog.ts +53 -7
- package/src/list/TicketList.ts +4 -1
- package/src/live/TembaChart.ts +1 -1
- package/src/locales/es.ts +13 -18
- package/src/locales/fr.ts +13 -18
- package/src/locales/locale-codes.ts +2 -11
- package/src/locales/pt.ts +13 -18
- package/src/simulator/Simulator.ts +13 -3
- package/src/store/AppState.ts +105 -1
- package/src/store/flow-definition.d.ts +2 -0
- package/test/actions/play_audio.test.ts +155 -0
- package/test/actions/say_msg.test.ts +196 -0
- package/test/nodes/wait_for_audio.test.ts +182 -0
- package/test/nodes/wait_for_dial.test.ts +382 -0
- package/test/nodes/wait_for_digits.test.ts +233 -109
- package/test/nodes/wait_for_menu.test.ts +383 -0
- package/test/temba-floating-tab.test.ts +4 -6
- package/test/temba-flow-collision.test.ts +495 -293
- package/test/temba-flow-editor.test.ts +0 -2
- package/test/temba-flow-plumber-connections.test.ts +97 -97
- package/test/temba-flow-plumber.test.ts +116 -103
- package/test/temba-node-type-selector.test.ts +6 -6
- package/screenshots/truth/nodes/wait_for_digits/editor/phone-number-collection.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/editor/single-digit-with-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/editor/verification-code.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/render/phone-number-collection.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/render/single-digit-with-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/render/verification-code.png +0 -0
|
@@ -6,6 +6,7 @@ import { NODE_CONFIG, ACTION_CONFIG } from './config';
|
|
|
6
6
|
import { ACTION_GROUP_METADATA, SPLIT_GROUP_METADATA } from './types';
|
|
7
7
|
import { CustomEventType } from '../interfaces';
|
|
8
8
|
import { generateUUID } from '../utils';
|
|
9
|
+
import { formatIssueMessage } from './utils';
|
|
9
10
|
import { FieldRenderer } from '../form/FieldRenderer';
|
|
10
11
|
import { renderMarkdownInline } from '../markdown';
|
|
11
12
|
import { fromStore, zustand } from '../store/AppState';
|
|
@@ -50,6 +51,19 @@ export class NodeEditor extends RapidElement {
|
|
|
50
51
|
margin-top: 15px;
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
.issue-warning {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 8px;
|
|
58
|
+
color: var(--color-error, tomato);
|
|
59
|
+
font-size: 13px;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.issue-warning:hover .issue-text {
|
|
64
|
+
text-decoration: underline;
|
|
65
|
+
}
|
|
66
|
+
|
|
53
67
|
.form-actions {
|
|
54
68
|
display: flex;
|
|
55
69
|
gap: 10px;
|
|
@@ -107,12 +121,29 @@ export class NodeEditor extends RapidElement {
|
|
|
107
121
|
color: var(--color-label, #777);
|
|
108
122
|
}
|
|
109
123
|
|
|
124
|
+
.form-row-inline-label {
|
|
125
|
+
font-size: 20px;
|
|
126
|
+
font-weight: 300;
|
|
127
|
+
color: #ccc;
|
|
128
|
+
min-width: 20px;
|
|
129
|
+
text-align: center;
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
user-select: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
110
136
|
.form-row-help {
|
|
111
137
|
font-size: 12px;
|
|
112
138
|
color: #666;
|
|
113
139
|
margin-top: 6px;
|
|
114
140
|
}
|
|
115
141
|
|
|
142
|
+
.form-text {
|
|
143
|
+
color: #666;
|
|
144
|
+
font-size: 13px;
|
|
145
|
+
}
|
|
146
|
+
|
|
116
147
|
.form-group {
|
|
117
148
|
border: 1px solid #e0e0e0;
|
|
118
149
|
border-radius: 6px;
|
|
@@ -397,7 +428,11 @@ export class NodeEditor extends RapidElement {
|
|
|
397
428
|
initializeFormData() {
|
|
398
429
|
var _a, _b, _c, _d, _e;
|
|
399
430
|
const nodeConfig = this.getNodeConfig();
|
|
400
|
-
|
|
431
|
+
// Temporary: terminal nodes defer to action configs, same as execute_actions
|
|
432
|
+
if ((!nodeConfig ||
|
|
433
|
+
nodeConfig.type === 'execute_actions' ||
|
|
434
|
+
nodeConfig.type === 'terminal') &&
|
|
435
|
+
this.action) {
|
|
401
436
|
// Action editing mode - use action config
|
|
402
437
|
const actionConfig = ACTION_CONFIG[this.action.type];
|
|
403
438
|
// Check if we're in localization mode
|
|
@@ -516,8 +551,11 @@ export class NodeEditor extends RapidElement {
|
|
|
516
551
|
// If we have a node and nodeUI, check if we should use node config
|
|
517
552
|
if (this.node && this.nodeUI) {
|
|
518
553
|
const nodeConfig = this.getNodeConfig();
|
|
519
|
-
//
|
|
520
|
-
|
|
554
|
+
// Temporary: terminal nodes defer to action configs for editing, same as execute_actions
|
|
555
|
+
// For execute_actions/terminal nodes, defer to action editing if an action is selected
|
|
556
|
+
if ((this.nodeUI.type === 'execute_actions' ||
|
|
557
|
+
this.nodeUI.type === 'terminal') &&
|
|
558
|
+
this.action) {
|
|
521
559
|
return ACTION_CONFIG[this.action.type] || null;
|
|
522
560
|
}
|
|
523
561
|
// For all other nodes with a config, use the node config
|
|
@@ -1181,6 +1219,7 @@ export class NodeEditor extends RapidElement {
|
|
|
1181
1219
|
return FieldRenderer.renderField(fieldName, fieldConfig, value, {
|
|
1182
1220
|
errors,
|
|
1183
1221
|
onChange: (e) => {
|
|
1222
|
+
var _a, _b;
|
|
1184
1223
|
// Handle different change event types
|
|
1185
1224
|
if (fieldName && config.type === 'key-value') {
|
|
1186
1225
|
// Special handling for key-value editor
|
|
@@ -1197,6 +1236,12 @@ export class NodeEditor extends RapidElement {
|
|
|
1197
1236
|
// Special handling for message editor
|
|
1198
1237
|
this.handleMessageEditorChange(fieldName, e);
|
|
1199
1238
|
}
|
|
1239
|
+
else if (fieldName && config.type === 'media') {
|
|
1240
|
+
// Extract URL from media picker's attachment
|
|
1241
|
+
const picker = e.target;
|
|
1242
|
+
const url = ((_b = (_a = picker.attachments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url) || '';
|
|
1243
|
+
this.handleNewFieldChange(fieldName, url);
|
|
1244
|
+
}
|
|
1200
1245
|
else {
|
|
1201
1246
|
// Default handling for most field types
|
|
1202
1247
|
this.handleFormFieldChange(fieldName, e);
|
|
@@ -1276,12 +1321,16 @@ export class NodeEditor extends RapidElement {
|
|
|
1276
1321
|
return this.renderRow(item, config, renderedFields);
|
|
1277
1322
|
case 'group':
|
|
1278
1323
|
return this.renderGroup(item, config, renderedFields);
|
|
1324
|
+
case 'spacer':
|
|
1325
|
+
return html ``;
|
|
1326
|
+
case 'text':
|
|
1327
|
+
return html `<div class="form-text">${item.text}</div>`;
|
|
1279
1328
|
default:
|
|
1280
1329
|
return html ``;
|
|
1281
1330
|
}
|
|
1282
1331
|
}
|
|
1283
1332
|
renderRow(rowConfig, config, renderedFields) {
|
|
1284
|
-
const { items, gap = '1rem', label, helpText } = rowConfig;
|
|
1333
|
+
const { items, gap = '1rem', label, helpText, inlineLabels, marginBottom } = rowConfig;
|
|
1285
1334
|
// Collect all fields from this row for width calculations
|
|
1286
1335
|
const fieldsInRow = this.collectFieldsFromItems(items);
|
|
1287
1336
|
const validFields = fieldsInRow.filter((fieldName) => { var _a; return (_a = config.form) === null || _a === void 0 ? void 0 : _a[fieldName]; });
|
|
@@ -1309,8 +1358,17 @@ export class NodeEditor extends RapidElement {
|
|
|
1309
1358
|
}
|
|
1310
1359
|
});
|
|
1311
1360
|
const rowContent = html `
|
|
1312
|
-
<div
|
|
1361
|
+
<div
|
|
1362
|
+
class="form-row"
|
|
1363
|
+
style="display: flex; gap: ${gap};${marginBottom
|
|
1364
|
+
? ` margin-bottom: ${marginBottom};`
|
|
1365
|
+
: ''}"
|
|
1366
|
+
>
|
|
1313
1367
|
${items.map((item) => {
|
|
1368
|
+
// Spacer items render as empty flex children
|
|
1369
|
+
if (typeof item !== 'string' && item.type === 'spacer') {
|
|
1370
|
+
return html `<div style="flex: 1 1 0;"></div>`;
|
|
1371
|
+
}
|
|
1314
1372
|
// Get the field name from the item
|
|
1315
1373
|
const fieldName = typeof item === 'string'
|
|
1316
1374
|
? item
|
|
@@ -1322,10 +1380,20 @@ export class NodeEditor extends RapidElement {
|
|
|
1322
1380
|
? fieldFlexStyles.get(fieldName)
|
|
1323
1381
|
: '';
|
|
1324
1382
|
const itemContent = this.renderLayoutItem(item, config, renderedFields);
|
|
1383
|
+
// When inlineLabels is provided, render the label inline to the left
|
|
1384
|
+
const inlineLabel = inlineLabels && fieldName ? inlineLabels[fieldName] : null;
|
|
1325
1385
|
// Wrap in a div with flex style if we have a flex style
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1386
|
+
if (flexStyle) {
|
|
1387
|
+
return inlineLabel
|
|
1388
|
+
? html `<div
|
|
1389
|
+
style="${flexStyle} display: flex; align-items: center; gap: 0.35rem;"
|
|
1390
|
+
>
|
|
1391
|
+
<span class="form-row-inline-label">${inlineLabel}</span>
|
|
1392
|
+
<div style="flex: 1 1 0; min-width: 0;">${itemContent}</div>
|
|
1393
|
+
</div>`
|
|
1394
|
+
: html `<div style="${flexStyle}">${itemContent}</div>`;
|
|
1395
|
+
}
|
|
1396
|
+
return itemContent;
|
|
1329
1397
|
})}
|
|
1330
1398
|
</div>
|
|
1331
1399
|
`;
|
|
@@ -1640,8 +1708,36 @@ export class NodeEditor extends RapidElement {
|
|
|
1640
1708
|
</div>
|
|
1641
1709
|
`;
|
|
1642
1710
|
}
|
|
1643
|
-
|
|
1711
|
+
handleIssueClick(issue) {
|
|
1712
|
+
this.fireCustomEvent(CustomEventType.ShowIssue, { issue });
|
|
1713
|
+
}
|
|
1714
|
+
renderIssueWarnings() {
|
|
1644
1715
|
var _a, _b;
|
|
1716
|
+
const issues = [];
|
|
1717
|
+
// Check for action-level issues
|
|
1718
|
+
if (this.action && ((_a = this.issuesByAction) === null || _a === void 0 ? void 0 : _a.has(this.action.uuid))) {
|
|
1719
|
+
issues.push(...this.issuesByAction.get(this.action.uuid));
|
|
1720
|
+
}
|
|
1721
|
+
// Check for node-level issues (issues without action_uuid)
|
|
1722
|
+
if (this.node && ((_b = this.issuesByNode) === null || _b === void 0 ? void 0 : _b.has(this.node.uuid))) {
|
|
1723
|
+
issues.push(...this.issuesByNode.get(this.node.uuid));
|
|
1724
|
+
}
|
|
1725
|
+
if (issues.length === 0)
|
|
1726
|
+
return '';
|
|
1727
|
+
return html `
|
|
1728
|
+
${issues.map((issue) => html `
|
|
1729
|
+
<div
|
|
1730
|
+
class="issue-warning"
|
|
1731
|
+
@click=${() => this.handleIssueClick(issue)}
|
|
1732
|
+
>
|
|
1733
|
+
<temba-icon name="alert_warning" size="1.2"></temba-icon>
|
|
1734
|
+
<span class="issue-text">${formatIssueMessage(issue)}</span>
|
|
1735
|
+
</div>
|
|
1736
|
+
`)}
|
|
1737
|
+
`;
|
|
1738
|
+
}
|
|
1739
|
+
render() {
|
|
1740
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1645
1741
|
if (!this.isOpen) {
|
|
1646
1742
|
return html ``;
|
|
1647
1743
|
}
|
|
@@ -1660,6 +1756,8 @@ export class NodeEditor extends RapidElement {
|
|
|
1660
1756
|
<temba-dialog
|
|
1661
1757
|
header="${header}"
|
|
1662
1758
|
.open="${this.isOpen}"
|
|
1759
|
+
.originX=${(_b = (_a = this.dialogOrigin) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : null}
|
|
1760
|
+
.originY=${(_d = (_c = this.dialogOrigin) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : null}
|
|
1663
1761
|
@temba-button-clicked=${this.handleDialogButtonClick}
|
|
1664
1762
|
primaryButtonName="Save"
|
|
1665
1763
|
cancelButtonName="Cancel"
|
|
@@ -1668,9 +1766,10 @@ export class NodeEditor extends RapidElement {
|
|
|
1668
1766
|
>
|
|
1669
1767
|
<div class="node-editor-form">
|
|
1670
1768
|
${this.renderFields()}
|
|
1671
|
-
${((
|
|
1769
|
+
${((_f = (_e = this.getNodeConfig()) === null || _e === void 0 ? void 0 : _e.router) === null || _f === void 0 ? void 0 : _f.configurable)
|
|
1672
1770
|
? this.renderRouterSection()
|
|
1673
1771
|
: null}
|
|
1772
|
+
${this.renderIssueWarnings()}
|
|
1674
1773
|
</div>
|
|
1675
1774
|
|
|
1676
1775
|
<div slot="gutter">${this.renderGutter()}</div>
|
|
@@ -1687,6 +1786,9 @@ __decorate([
|
|
|
1687
1786
|
__decorate([
|
|
1688
1787
|
property({ type: Object })
|
|
1689
1788
|
], NodeEditor.prototype, "nodeUI", void 0);
|
|
1789
|
+
__decorate([
|
|
1790
|
+
property({ attribute: false })
|
|
1791
|
+
], NodeEditor.prototype, "dialogOrigin", void 0);
|
|
1690
1792
|
__decorate([
|
|
1691
1793
|
property({ type: Boolean })
|
|
1692
1794
|
], NodeEditor.prototype, "isOpen", void 0);
|
|
@@ -1717,4 +1819,10 @@ __decorate([
|
|
|
1717
1819
|
__decorate([
|
|
1718
1820
|
fromStore(zustand, (state) => state.flowDefinition)
|
|
1719
1821
|
], NodeEditor.prototype, "flowDefinition", void 0);
|
|
1822
|
+
__decorate([
|
|
1823
|
+
fromStore(zustand, (state) => state.issuesByNode)
|
|
1824
|
+
], NodeEditor.prototype, "issuesByNode", void 0);
|
|
1825
|
+
__decorate([
|
|
1826
|
+
fromStore(zustand, (state) => state.issuesByAction)
|
|
1827
|
+
], NodeEditor.prototype, "issuesByAction", void 0);
|
|
1720
1828
|
//# sourceMappingURL=NodeEditor.js.map
|