@wise/dynamic-flow-client 4.18.5 → 4.19.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/build/main.css +1 -1
- package/build/main.js +352 -112
- package/build/main.mjs +352 -112
- package/build/types/revamp/domain/components/AlertComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/AllOfComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/BoxComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ButtonComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ColumnsComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ConstComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/DateInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/DecisionComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/DividerComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/FormComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/HeadingComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ImageComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/InstructionsComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ListComponent.d.ts +3 -2
- package/build/types/revamp/domain/components/LoadingIndicatorComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/MarkdownComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ModalComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/ModalLayoutComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/MultiSelectInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ObjectComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ParagraphComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/PersistAsyncComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ProgressComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/RepeatableComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ReviewComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/SectionComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/SelectInputComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/StatusListComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/TabsComponent.d.ts +2 -2
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/TupleComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/searchComponent/SearchComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/step/StepDomainComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/step/ToolbarComponent.d.ts +3 -1
- package/build/types/revamp/domain/mappers/layout/alertLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/boxLayoutToComponents.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/columnsLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/decisionLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/deprecatedListLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/dividerLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/formLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/headingLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/imageLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/infoLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/instructionsLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/listLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/markdownLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/modalLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/paragraphLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/progressLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/reviewLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/searchLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/sectionLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/statusListLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/tabsLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.d.ts +14 -0
- package/build/types/revamp/domain/mappers/schema/persistAsyncSchemaToComponent.d.ts +14 -0
- package/build/types/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts +1 -0
- package/build/types/revamp/domain/mappers/utils/suggestions-utils.d.ts +1 -0
- package/build/types/revamp/domain/mappers/utils/tags-utils.d.ts +4 -0
- package/build/types/revamp/domain/types.d.ts +4 -2
- package/build/types/revamp/renderers/mappers/columnsComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/dateInputComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/textInputComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/utils/inputComponentToProps.d.ts +1 -0
- package/build/types/revamp/renderers/mappers/utils/mapSuggestions.d.ts +12 -0
- package/build/types/revamp/renderers/mappers/utils/mapTags.d.ts +8 -0
- package/build/types/revamp/tests/renderers/StepRenderer.test.d.ts +1 -0
- package/package.json +19 -19
package/build/main.js
CHANGED
|
@@ -1319,6 +1319,7 @@ var stepComponentToProps = (component, rendererMapperProps) => {
|
|
|
1319
1319
|
loadingState,
|
|
1320
1320
|
step,
|
|
1321
1321
|
title,
|
|
1322
|
+
tags,
|
|
1322
1323
|
onBehavior
|
|
1323
1324
|
} = component;
|
|
1324
1325
|
const childrenProps = component.getChildren().map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
@@ -1338,6 +1339,7 @@ var stepComponentToProps = (component, rendererMapperProps) => {
|
|
|
1338
1339
|
loadingState,
|
|
1339
1340
|
step,
|
|
1340
1341
|
title,
|
|
1342
|
+
tags,
|
|
1341
1343
|
children: childrenProps.map(rendererMapperProps.render),
|
|
1342
1344
|
childrenProps,
|
|
1343
1345
|
footer: footerProps.map(rendererMapperProps.render),
|
|
@@ -1351,7 +1353,7 @@ var getToolbarProps = (toolbar, rendererMapperProps) => {
|
|
|
1351
1353
|
if (!toolbar) {
|
|
1352
1354
|
return void 0;
|
|
1353
1355
|
}
|
|
1354
|
-
return __spreadValues(__spreadProps(__spreadValues({}, pick(toolbar, "uid", "control", "type")), {
|
|
1356
|
+
return __spreadValues(__spreadProps(__spreadValues({}, pick(toolbar, "uid", "control", "type", "tags")), {
|
|
1355
1357
|
type: "toolbar",
|
|
1356
1358
|
items: toolbar.items.map((item) => __spreadProps(__spreadValues({}, item), {
|
|
1357
1359
|
disabled: item.disabled || rendererMapperProps.stepLoadingState !== "idle"
|
|
@@ -1369,7 +1371,8 @@ var alertComponentToProps = (component, rendererMapperProps) => __spreadValues(_
|
|
|
1369
1371
|
"context",
|
|
1370
1372
|
"control",
|
|
1371
1373
|
"margin",
|
|
1372
|
-
"markdown"
|
|
1374
|
+
"markdown",
|
|
1375
|
+
"tags"
|
|
1373
1376
|
)), rendererMapperProps);
|
|
1374
1377
|
|
|
1375
1378
|
// src/revamp/renderers/mappers/utils/mapMediaToLegacyProps.ts
|
|
@@ -1389,7 +1392,17 @@ var allOfComponentToProps = (component, rendererMapperProps) => {
|
|
|
1389
1392
|
);
|
|
1390
1393
|
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
1391
1394
|
type: "form-section"
|
|
1392
|
-
}, pick(
|
|
1395
|
+
}, pick(
|
|
1396
|
+
component,
|
|
1397
|
+
"uid",
|
|
1398
|
+
"analyticsId",
|
|
1399
|
+
"control",
|
|
1400
|
+
"description",
|
|
1401
|
+
"help",
|
|
1402
|
+
"media",
|
|
1403
|
+
"tags",
|
|
1404
|
+
"title"
|
|
1405
|
+
)), mapMediaToLegacyProps(component.media)), rendererMapperProps), {
|
|
1393
1406
|
children: childrenProps.map(rendererMapperProps.render),
|
|
1394
1407
|
childrenProps
|
|
1395
1408
|
});
|
|
@@ -1422,6 +1435,7 @@ var inputComponentToProps = (component, type) => {
|
|
|
1422
1435
|
placeholder,
|
|
1423
1436
|
required,
|
|
1424
1437
|
title,
|
|
1438
|
+
tags,
|
|
1425
1439
|
validationAsyncState,
|
|
1426
1440
|
onBlur,
|
|
1427
1441
|
onFocus
|
|
@@ -1440,6 +1454,7 @@ var inputComponentToProps = (component, type) => {
|
|
|
1440
1454
|
placeholder,
|
|
1441
1455
|
required,
|
|
1442
1456
|
title,
|
|
1457
|
+
tags,
|
|
1443
1458
|
validationState: getValidationState(errors, validationAsyncState),
|
|
1444
1459
|
value: component.getLocalValue(),
|
|
1445
1460
|
onBlur: onBlur.bind(component),
|
|
@@ -1473,7 +1488,7 @@ var boxComponentToProps = (component, rendererMapperProps) => {
|
|
|
1473
1488
|
(c) => componentToRendererProps(c, rendererMapperProps)
|
|
1474
1489
|
);
|
|
1475
1490
|
const { border, control } = component;
|
|
1476
|
-
return __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "width", "margin")), rendererMapperProps), {
|
|
1491
|
+
return __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "width", "margin", "tags")), rendererMapperProps), {
|
|
1477
1492
|
control: mapBoxControl({ border, control }),
|
|
1478
1493
|
children: childrenProps.map(rendererMapperProps.render),
|
|
1479
1494
|
childrenProps
|
|
@@ -1503,14 +1518,24 @@ var buttonComponentToProps = (component, rendererMapperProps) => {
|
|
|
1503
1518
|
"margin",
|
|
1504
1519
|
"pinOrder",
|
|
1505
1520
|
"size",
|
|
1506
|
-
"onClick"
|
|
1521
|
+
"onClick",
|
|
1522
|
+
"tags"
|
|
1507
1523
|
)), {
|
|
1508
1524
|
disabled: component.disabled || rendererMapperProps.stepLoadingState !== "idle"
|
|
1509
1525
|
}), rendererMapperProps);
|
|
1510
1526
|
};
|
|
1511
1527
|
|
|
1512
1528
|
// src/revamp/renderers/mappers/columnsComponentToProps.ts
|
|
1513
|
-
var columnsComponentToProps = ({
|
|
1529
|
+
var columnsComponentToProps = ({
|
|
1530
|
+
uid,
|
|
1531
|
+
analyticsId,
|
|
1532
|
+
bias,
|
|
1533
|
+
control,
|
|
1534
|
+
margin,
|
|
1535
|
+
tags,
|
|
1536
|
+
startComponents,
|
|
1537
|
+
endComponents
|
|
1538
|
+
}, rendererMapperProps) => {
|
|
1514
1539
|
const startChildrenProps = startComponents.map(
|
|
1515
1540
|
(c) => componentToRendererProps(c, rendererMapperProps)
|
|
1516
1541
|
);
|
|
@@ -1524,6 +1549,7 @@ var columnsComponentToProps = ({ uid, analyticsId, bias, control, margin, startC
|
|
|
1524
1549
|
bias,
|
|
1525
1550
|
control,
|
|
1526
1551
|
margin,
|
|
1552
|
+
tags,
|
|
1527
1553
|
startChildren: startChildrenProps.map(rendererMapperProps.render),
|
|
1528
1554
|
endChildren: endChildrenProps.map(rendererMapperProps.render),
|
|
1529
1555
|
startChildrenProps,
|
|
@@ -1555,29 +1581,39 @@ var containerComponentToProps = (component, rendererMapperProps) => {
|
|
|
1555
1581
|
}, rendererMapperProps);
|
|
1556
1582
|
};
|
|
1557
1583
|
|
|
1584
|
+
// src/revamp/renderers/mappers/utils/mapTags.ts
|
|
1585
|
+
var mapTagsToLegacyProps = ({ tags }) => ({
|
|
1586
|
+
tags,
|
|
1587
|
+
tag: tags && tags.length >= 1 ? tags[0] : void 0
|
|
1588
|
+
});
|
|
1589
|
+
|
|
1590
|
+
// src/revamp/renderers/mappers/utils/mapSuggestions.ts
|
|
1591
|
+
var mapSuggestions = (suggestions) => suggestions ? {
|
|
1592
|
+
values: suggestions.values.map(mapSuggestionValue)
|
|
1593
|
+
} : void 0;
|
|
1594
|
+
var mapSuggestionValue = (suggestionValue) => __spreadValues(__spreadValues(__spreadValues({}, suggestionValue), mapTagsToLegacyProps(suggestionValue)), mapMediaToLegacyProps(suggestionValue.media));
|
|
1595
|
+
|
|
1558
1596
|
// src/revamp/renderers/mappers/dateInputComponentToProps.ts
|
|
1559
1597
|
var dateInputComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, inputComponentToProps(component, "input-date")), rendererMapperProps), {
|
|
1560
1598
|
autoComplete: component.autoComplete,
|
|
1561
1599
|
minimumDate: component.minimumDate,
|
|
1562
1600
|
maximumDate: component.maximumDate,
|
|
1563
|
-
suggestions: component.suggestions
|
|
1564
|
-
values: component.suggestions.values.map((suggestion) => __spreadValues(__spreadValues({}, suggestion), mapMediaToLegacyProps(suggestion.media)))
|
|
1565
|
-
} : void 0,
|
|
1601
|
+
suggestions: mapSuggestions(component.suggestions),
|
|
1566
1602
|
onChange: component.onChange.bind(component)
|
|
1567
1603
|
});
|
|
1568
1604
|
|
|
1569
1605
|
// src/revamp/renderers/mappers/decisionComponentToProps.ts
|
|
1570
|
-
var decisionComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "title")), rendererMapperProps), {
|
|
1606
|
+
var decisionComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "title", "tags")), rendererMapperProps), {
|
|
1571
1607
|
options: component.options.map((_a) => {
|
|
1572
1608
|
var _b = _a, { disabled, media } = _b, rest = __objRest(_b, ["disabled", "media"]);
|
|
1573
|
-
return __spreadProps(__spreadValues(__spreadValues({}, rest), mapMediaToLegacyProps(media)), {
|
|
1609
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, rest), mapTagsToLegacyProps(rest)), mapMediaToLegacyProps(media)), {
|
|
1574
1610
|
disabled: disabled || rendererMapperProps.stepLoadingState !== "idle"
|
|
1575
1611
|
});
|
|
1576
1612
|
})
|
|
1577
1613
|
});
|
|
1578
1614
|
|
|
1579
1615
|
// src/revamp/renderers/mappers/dividerComponentToProps.ts
|
|
1580
|
-
var dividerComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin")), rendererMapperProps);
|
|
1616
|
+
var dividerComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "tags")), rendererMapperProps);
|
|
1581
1617
|
|
|
1582
1618
|
// src/revamp/renderers/mappers/externalComponentToProps.ts
|
|
1583
1619
|
var externalComponentToProps = (component, rendererMapperProps) => {
|
|
@@ -1595,7 +1631,7 @@ var externalComponentToProps = (component, rendererMapperProps) => {
|
|
|
1595
1631
|
// src/revamp/renderers/mappers/formComponentToProps.ts
|
|
1596
1632
|
var formComponentToProps = (component, rendererMapperProps) => {
|
|
1597
1633
|
const childrenProps = component.getChildren().map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
1598
|
-
const { uid, analyticsId, control, margin } = component;
|
|
1634
|
+
const { uid, analyticsId, control, margin, tags } = component;
|
|
1599
1635
|
return __spreadValues({
|
|
1600
1636
|
uid,
|
|
1601
1637
|
analyticsId,
|
|
@@ -1603,12 +1639,24 @@ var formComponentToProps = (component, rendererMapperProps) => {
|
|
|
1603
1639
|
children: childrenProps.map(rendererMapperProps.render),
|
|
1604
1640
|
childrenProps,
|
|
1605
1641
|
control,
|
|
1606
|
-
margin
|
|
1642
|
+
margin,
|
|
1643
|
+
tags
|
|
1607
1644
|
}, rendererMapperProps);
|
|
1608
1645
|
};
|
|
1609
1646
|
|
|
1610
1647
|
// src/revamp/renderers/mappers/headingComponentToProps.ts
|
|
1611
|
-
var headingComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(
|
|
1648
|
+
var headingComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(
|
|
1649
|
+
component,
|
|
1650
|
+
"uid",
|
|
1651
|
+
"analyticsId",
|
|
1652
|
+
"type",
|
|
1653
|
+
"align",
|
|
1654
|
+
"control",
|
|
1655
|
+
"margin",
|
|
1656
|
+
"size",
|
|
1657
|
+
"tags",
|
|
1658
|
+
"text"
|
|
1659
|
+
)), rendererMapperProps);
|
|
1612
1660
|
|
|
1613
1661
|
// src/revamp/renderers/mappers/hiddenComponentToProps.ts
|
|
1614
1662
|
var hiddenComponentToProps = ({ uid }) => ({
|
|
@@ -1617,13 +1665,15 @@ var hiddenComponentToProps = ({ uid }) => ({
|
|
|
1617
1665
|
});
|
|
1618
1666
|
|
|
1619
1667
|
// src/revamp/renderers/mappers/imageComponentToProps.ts
|
|
1620
|
-
var imageComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "align", "control", "margin", "size")), rendererMapperProps), {
|
|
1668
|
+
var imageComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "align", "control", "margin", "size", "tags")), rendererMapperProps), {
|
|
1621
1669
|
uri: component.content.uri,
|
|
1622
1670
|
accessibilityDescription: component.content.accessibilityDescription
|
|
1623
1671
|
});
|
|
1624
1672
|
|
|
1625
1673
|
// src/revamp/renderers/mappers/instructionsComponentToProps.ts
|
|
1626
|
-
var instructionsComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "
|
|
1674
|
+
var instructionsComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadProps(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "title", "tags")), {
|
|
1675
|
+
items: component.items.map((item) => __spreadValues(__spreadValues({}, item), mapTagsToLegacyProps(item)))
|
|
1676
|
+
}), rendererMapperProps);
|
|
1627
1677
|
|
|
1628
1678
|
// src/revamp/renderers/mappers/integerInputComponentToProps.ts
|
|
1629
1679
|
var integerInputComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, inputComponentToProps(component, "input-integer")), rendererMapperProps), {
|
|
@@ -1634,34 +1684,45 @@ var integerInputComponentToProps = (component, rendererMapperProps) => __spreadP
|
|
|
1634
1684
|
});
|
|
1635
1685
|
|
|
1636
1686
|
// src/revamp/renderers/mappers/listComponentToProps.ts
|
|
1637
|
-
var listComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, pick(
|
|
1687
|
+
var listComponentToProps = (component, rendererMapperProps) => __spreadProps(__spreadValues(__spreadValues({}, pick(
|
|
1688
|
+
component,
|
|
1689
|
+
"uid",
|
|
1690
|
+
"analyticsId",
|
|
1691
|
+
"type",
|
|
1692
|
+
"callToAction",
|
|
1693
|
+
"control",
|
|
1694
|
+
"margin",
|
|
1695
|
+
"title",
|
|
1696
|
+
"tags"
|
|
1697
|
+
)), rendererMapperProps), {
|
|
1638
1698
|
items: component.items.map(mapItem)
|
|
1639
1699
|
});
|
|
1640
1700
|
var mapItem = (item) => {
|
|
1641
1701
|
var _a, _b;
|
|
1642
|
-
return __spreadValues(__spreadProps(__spreadValues({}, item), {
|
|
1702
|
+
return __spreadValues(__spreadValues(__spreadProps(__spreadValues({}, item), {
|
|
1643
1703
|
// populate deprecated fields
|
|
1644
1704
|
subtitle: item.description,
|
|
1645
1705
|
value: (_a = item.supportingValues) == null ? void 0 : _a.value,
|
|
1646
1706
|
subvalue: (_b = item.supportingValues) == null ? void 0 : _b.subvalue
|
|
1647
|
-
}), mapMediaToLegacyProps(item.media));
|
|
1707
|
+
}), mapTagsToLegacyProps(item)), mapMediaToLegacyProps(item.media));
|
|
1648
1708
|
};
|
|
1649
1709
|
|
|
1650
1710
|
// src/revamp/renderers/mappers/loadingIndicatorComponentToProps.ts
|
|
1651
|
-
var loadingIndicatorComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "size")), rendererMapperProps);
|
|
1711
|
+
var loadingIndicatorComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "size", "tags")), rendererMapperProps);
|
|
1652
1712
|
|
|
1653
1713
|
// src/revamp/renderers/mappers/markdownComponentToProps.ts
|
|
1654
|
-
var markdownComponentToProps = (control, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(control, "uid", "analyticsId", "type", "align", "margin", "content", "control")), rendererMapperProps);
|
|
1714
|
+
var markdownComponentToProps = (control, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(control, "uid", "analyticsId", "type", "align", "margin", "content", "control", "tags")), rendererMapperProps);
|
|
1655
1715
|
|
|
1656
1716
|
// src/revamp/renderers/mappers/modalComponentToProps.ts
|
|
1657
1717
|
var modalComponentToProps = (component, rendererMapperProps) => {
|
|
1658
|
-
const { uid, analyticsId, open, title, close } = component;
|
|
1718
|
+
const { uid, analyticsId, open, tags, title, close } = component;
|
|
1659
1719
|
const childrenProps = component.getChildren().map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
1660
1720
|
return __spreadValues({
|
|
1661
1721
|
uid,
|
|
1662
1722
|
analyticsId,
|
|
1663
1723
|
type: "modal",
|
|
1664
1724
|
open,
|
|
1725
|
+
tags,
|
|
1665
1726
|
title,
|
|
1666
1727
|
children: childrenProps.map(rendererMapperProps.render),
|
|
1667
1728
|
childrenProps,
|
|
@@ -1671,7 +1732,7 @@ var modalComponentToProps = (component, rendererMapperProps) => {
|
|
|
1671
1732
|
|
|
1672
1733
|
// src/revamp/renderers/mappers/modalLayoutComponentToProps.ts
|
|
1673
1734
|
var modalLayoutComponentToProps = (component, rendererMapperProps) => {
|
|
1674
|
-
const { uid, analyticsId, content, control, margin, trigger } = component;
|
|
1735
|
+
const { uid, analyticsId, content, control, margin, tags, trigger } = component;
|
|
1675
1736
|
const childrenProps = component.getChildren().map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
1676
1737
|
return __spreadValues({
|
|
1677
1738
|
uid,
|
|
@@ -1684,6 +1745,7 @@ var modalLayoutComponentToProps = (component, rendererMapperProps) => {
|
|
|
1684
1745
|
},
|
|
1685
1746
|
control,
|
|
1686
1747
|
margin,
|
|
1748
|
+
tags,
|
|
1687
1749
|
trigger
|
|
1688
1750
|
}, rendererMapperProps);
|
|
1689
1751
|
};
|
|
@@ -1733,14 +1795,24 @@ var objectComponentToProps = (component, rendererMapperProps) => {
|
|
|
1733
1795
|
const childrenProps = component.getChildren().map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
1734
1796
|
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
1735
1797
|
type: "form-section"
|
|
1736
|
-
}, pick(
|
|
1798
|
+
}, pick(
|
|
1799
|
+
component,
|
|
1800
|
+
"uid",
|
|
1801
|
+
"analyticsId",
|
|
1802
|
+
"control",
|
|
1803
|
+
"description",
|
|
1804
|
+
"help",
|
|
1805
|
+
"media",
|
|
1806
|
+
"tags",
|
|
1807
|
+
"title"
|
|
1808
|
+
)), mapMediaToLegacyProps(component.media)), rendererMapperProps), {
|
|
1737
1809
|
children: childrenProps.map(rendererMapperProps.render),
|
|
1738
1810
|
childrenProps
|
|
1739
1811
|
});
|
|
1740
1812
|
};
|
|
1741
1813
|
|
|
1742
1814
|
// src/revamp/renderers/mappers/paragraphComponentToProps.ts
|
|
1743
|
-
var paragraphComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "align", "control", "margin", "text")), rendererMapperProps);
|
|
1815
|
+
var paragraphComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "align", "control", "margin", "tags", "text")), rendererMapperProps);
|
|
1744
1816
|
|
|
1745
1817
|
// src/revamp/renderers/mappers/persistAsyncComponentToProps.ts
|
|
1746
1818
|
var persistAsyncComponentToProps = (component, rendererMapperProps) => {
|
|
@@ -1760,6 +1832,7 @@ var progressComponentToProps = (component, rendererMapperProps) => __spreadValue
|
|
|
1760
1832
|
"type",
|
|
1761
1833
|
"analyticsId",
|
|
1762
1834
|
"context",
|
|
1835
|
+
"tags",
|
|
1763
1836
|
"control",
|
|
1764
1837
|
"description",
|
|
1765
1838
|
"help",
|
|
@@ -1786,6 +1859,7 @@ var repeatableComponentToProps = (component, rendererMapperProps) => {
|
|
|
1786
1859
|
minItems,
|
|
1787
1860
|
summaryDefaults,
|
|
1788
1861
|
title = "",
|
|
1862
|
+
tags,
|
|
1789
1863
|
onEdit,
|
|
1790
1864
|
onAdd,
|
|
1791
1865
|
onSave,
|
|
@@ -1826,6 +1900,7 @@ var repeatableComponentToProps = (component, rendererMapperProps) => {
|
|
|
1826
1900
|
maxItems,
|
|
1827
1901
|
minItems,
|
|
1828
1902
|
title,
|
|
1903
|
+
tags,
|
|
1829
1904
|
validationState: mapErrorsToValidationState(errors),
|
|
1830
1905
|
onAdd: onAdd.bind(component),
|
|
1831
1906
|
onEdit: onEdit.bind(component),
|
|
@@ -1835,7 +1910,17 @@ var repeatableComponentToProps = (component, rendererMapperProps) => {
|
|
|
1835
1910
|
};
|
|
1836
1911
|
|
|
1837
1912
|
// src/revamp/renderers/mappers/reviewComponentToProps.ts
|
|
1838
|
-
var reviewComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadProps(__spreadValues({}, pick(
|
|
1913
|
+
var reviewComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadProps(__spreadValues({}, pick(
|
|
1914
|
+
component,
|
|
1915
|
+
"uid",
|
|
1916
|
+
"analyticsId",
|
|
1917
|
+
"type",
|
|
1918
|
+
"callToAction",
|
|
1919
|
+
"control",
|
|
1920
|
+
"margin",
|
|
1921
|
+
"title",
|
|
1922
|
+
"tags"
|
|
1923
|
+
)), {
|
|
1839
1924
|
fields: component.fields.map(mapField)
|
|
1840
1925
|
}), rendererMapperProps);
|
|
1841
1926
|
var mapField = (_a) => {
|
|
@@ -1844,7 +1929,7 @@ var mapField = (_a) => {
|
|
|
1844
1929
|
} = _b, rest = __objRest(_b, [
|
|
1845
1930
|
"media"
|
|
1846
1931
|
]);
|
|
1847
|
-
return __spreadValues(__spreadValues({}, rest), mapMediaToLegacyProps(media));
|
|
1932
|
+
return __spreadValues(__spreadValues(__spreadValues({}, rest), mapTagsToLegacyProps(rest)), mapMediaToLegacyProps(media));
|
|
1848
1933
|
};
|
|
1849
1934
|
|
|
1850
1935
|
// src/revamp/renderers/mappers/rootComponentToProps.ts
|
|
@@ -1884,7 +1969,7 @@ var getDomainLayerMedia = ({ icon, image, media }) => {
|
|
|
1884
1969
|
|
|
1885
1970
|
// src/revamp/renderers/mappers/searchComponentToProps.ts
|
|
1886
1971
|
var searchComponentToProps = (component, rendererMapperProps) => {
|
|
1887
|
-
const { uid, control, emptyMessage, error, isLoading, margin, query, results, title } = component;
|
|
1972
|
+
const { uid, control, emptyMessage, error, isLoading, margin, query, results, title, tags } = component;
|
|
1888
1973
|
const onChange = component.onChange.bind(component);
|
|
1889
1974
|
const onSelect = component.onSelect.bind(component);
|
|
1890
1975
|
const state = getSearchState({
|
|
@@ -1906,6 +1991,7 @@ var searchComponentToProps = (component, rendererMapperProps) => {
|
|
|
1906
1991
|
query,
|
|
1907
1992
|
state,
|
|
1908
1993
|
title,
|
|
1994
|
+
tags,
|
|
1909
1995
|
onChange
|
|
1910
1996
|
}, rendererMapperProps);
|
|
1911
1997
|
};
|
|
@@ -1944,7 +2030,17 @@ var sectionComponentToProps = (component, rendererMapperProps) => {
|
|
|
1944
2030
|
const childrenProps = component.components.map(
|
|
1945
2031
|
(c) => componentToRendererProps(c, rendererMapperProps)
|
|
1946
2032
|
);
|
|
1947
|
-
return __spreadProps(__spreadValues(__spreadValues({}, pick(
|
|
2033
|
+
return __spreadProps(__spreadValues(__spreadValues({}, pick(
|
|
2034
|
+
component,
|
|
2035
|
+
"uid",
|
|
2036
|
+
"analyticsId",
|
|
2037
|
+
"type",
|
|
2038
|
+
"title",
|
|
2039
|
+
"margin",
|
|
2040
|
+
"control",
|
|
2041
|
+
"callToAction",
|
|
2042
|
+
"tags"
|
|
2043
|
+
)), rendererMapperProps), {
|
|
1948
2044
|
children: childrenProps.map(rendererMapperProps.render),
|
|
1949
2045
|
childrenProps
|
|
1950
2046
|
});
|
|
@@ -1967,20 +2063,22 @@ var selectInputComponentToProps = (component, rendererMapperProps) => {
|
|
|
1967
2063
|
};
|
|
1968
2064
|
|
|
1969
2065
|
// src/revamp/renderers/mappers/statusListComponentToProps.ts
|
|
1970
|
-
var statusListComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "
|
|
2066
|
+
var statusListComponentToProps = (component, rendererMapperProps) => __spreadValues(__spreadProps(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "title", "tags")), {
|
|
2067
|
+
items: component.items.map((item) => __spreadValues(__spreadValues({}, item), mapTagsToLegacyProps(item)))
|
|
2068
|
+
}), rendererMapperProps);
|
|
1971
2069
|
|
|
1972
2070
|
// src/revamp/renderers/mappers/tabsComponentToProps.ts
|
|
1973
2071
|
var tabsComponentToProps = (component, rendererMapperProps) => {
|
|
1974
|
-
const tabs = component.tabs.map(({ components,
|
|
2072
|
+
const tabs = component.tabs.map(({ components, title, tags }) => {
|
|
1975
2073
|
const childrenProps = components.map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
1976
|
-
return {
|
|
1977
|
-
title
|
|
1978
|
-
|
|
2074
|
+
return __spreadProps(__spreadValues({
|
|
2075
|
+
title
|
|
2076
|
+
}, mapTagsToLegacyProps({ tags })), {
|
|
1979
2077
|
childrenProps,
|
|
1980
2078
|
children: childrenProps.map(rendererMapperProps.render)
|
|
1981
|
-
};
|
|
2079
|
+
});
|
|
1982
2080
|
});
|
|
1983
|
-
return __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin")), rendererMapperProps), {
|
|
2081
|
+
return __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "tags")), rendererMapperProps), {
|
|
1984
2082
|
tabs
|
|
1985
2083
|
});
|
|
1986
2084
|
};
|
|
@@ -1992,9 +2090,7 @@ var textInputComponentToProps = (component, rendererMapperProps) => __spreadProp
|
|
|
1992
2090
|
displayFormat: component.displayFormat,
|
|
1993
2091
|
maxLength: component.maxLength,
|
|
1994
2092
|
minLength: component.minLength,
|
|
1995
|
-
suggestions: component.suggestions
|
|
1996
|
-
values: component.suggestions.values.map((suggestion) => __spreadValues(__spreadValues({}, suggestion), mapMediaToLegacyProps(suggestion.media)))
|
|
1997
|
-
} : void 0,
|
|
2093
|
+
suggestions: mapSuggestions(component.suggestions),
|
|
1998
2094
|
onChange: component.onChange.bind(component)
|
|
1999
2095
|
});
|
|
2000
2096
|
|
|
@@ -2003,7 +2099,17 @@ var tupleComponentToProps = (component, rendererMapperProps) => {
|
|
|
2003
2099
|
const childrenProps = component.getChildren().map((c) => componentToRendererProps(c, rendererMapperProps));
|
|
2004
2100
|
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
2005
2101
|
type: "form-section"
|
|
2006
|
-
}, pick(
|
|
2102
|
+
}, pick(
|
|
2103
|
+
component,
|
|
2104
|
+
"uid",
|
|
2105
|
+
"analyticsId",
|
|
2106
|
+
"control",
|
|
2107
|
+
"description",
|
|
2108
|
+
"help",
|
|
2109
|
+
"media",
|
|
2110
|
+
"tags",
|
|
2111
|
+
"title"
|
|
2112
|
+
)), mapMediaToLegacyProps(component.media)), rendererMapperProps), {
|
|
2007
2113
|
children: childrenProps.map(rendererMapperProps.render),
|
|
2008
2114
|
childrenProps
|
|
2009
2115
|
});
|
|
@@ -2386,7 +2492,15 @@ var legacyActionTypeToControl = {
|
|
|
2386
2492
|
var mapLegacyActionTypeToControl = (type) => type && type in legacyActionTypeToControl ? legacyActionTypeToControl[type] : "secondary";
|
|
2387
2493
|
|
|
2388
2494
|
// src/revamp/domain/mappers/layout/alertLayoutToComponent.ts
|
|
2389
|
-
var alertLayoutToComponent = (uid, {
|
|
2495
|
+
var alertLayoutToComponent = (uid, {
|
|
2496
|
+
control,
|
|
2497
|
+
markdown,
|
|
2498
|
+
margin = "md",
|
|
2499
|
+
context = "neutral",
|
|
2500
|
+
callToAction,
|
|
2501
|
+
analyticsId,
|
|
2502
|
+
tags
|
|
2503
|
+
}, { onBehavior, step }) => {
|
|
2390
2504
|
var _a;
|
|
2391
2505
|
const cta = callToAction ? getDomainLayerCallToAction(callToAction, onBehavior, (_a = step.actions) != null ? _a : []) : void 0;
|
|
2392
2506
|
return createAlertComponent({
|
|
@@ -2396,7 +2510,8 @@ var alertLayoutToComponent = (uid, { control, markdown, margin = "md", context =
|
|
|
2396
2510
|
markdown,
|
|
2397
2511
|
margin,
|
|
2398
2512
|
callToAction: cta,
|
|
2399
|
-
context: mapLegacyContext(context)
|
|
2513
|
+
context: mapLegacyContext(context),
|
|
2514
|
+
tags
|
|
2400
2515
|
});
|
|
2401
2516
|
};
|
|
2402
2517
|
|
|
@@ -2417,13 +2532,22 @@ var removeMarginFromLayout = (component) => {
|
|
|
2417
2532
|
};
|
|
2418
2533
|
|
|
2419
2534
|
// src/revamp/domain/mappers/layout/boxLayoutToComponents.ts
|
|
2420
|
-
var boxLayoutToComponent = (uid, {
|
|
2535
|
+
var boxLayoutToComponent = (uid, {
|
|
2536
|
+
border = false,
|
|
2537
|
+
components,
|
|
2538
|
+
control,
|
|
2539
|
+
margin = "md",
|
|
2540
|
+
width = "xl",
|
|
2541
|
+
analyticsId,
|
|
2542
|
+
tags
|
|
2543
|
+
}, mapperProps, schemaComponents) => createBoxComponent({
|
|
2421
2544
|
uid,
|
|
2422
2545
|
analyticsId,
|
|
2423
2546
|
border,
|
|
2424
2547
|
control,
|
|
2425
2548
|
margin,
|
|
2426
2549
|
width,
|
|
2550
|
+
tags,
|
|
2427
2551
|
components: components.map((component, index) => {
|
|
2428
2552
|
const shouldRemoveMargin = index === components.length - 1 && component.margin === void 0;
|
|
2429
2553
|
const componentWithAdjustedMargin = shouldRemoveMargin ? removeMarginFromLayout(component) : component;
|
|
@@ -2456,7 +2580,17 @@ var buttonLayoutToComponent = (uid, button, mapperProps) => {
|
|
|
2456
2580
|
var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
|
|
2457
2581
|
var _a;
|
|
2458
2582
|
const { onBehavior } = mapperProps;
|
|
2459
|
-
const {
|
|
2583
|
+
const {
|
|
2584
|
+
context,
|
|
2585
|
+
control,
|
|
2586
|
+
disabled,
|
|
2587
|
+
margin = "md",
|
|
2588
|
+
pinOrder,
|
|
2589
|
+
size,
|
|
2590
|
+
title,
|
|
2591
|
+
analyticsId,
|
|
2592
|
+
tags
|
|
2593
|
+
} = button;
|
|
2460
2594
|
const behavior = getDomainLayerBehavior(button, (_a = mapperProps.step.actions) != null ? _a : []);
|
|
2461
2595
|
const onClick = () => {
|
|
2462
2596
|
void onBehavior(behavior);
|
|
@@ -2471,12 +2605,23 @@ var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
|
|
|
2471
2605
|
pinOrder,
|
|
2472
2606
|
size,
|
|
2473
2607
|
title: title != null ? title : "",
|
|
2474
|
-
onClick
|
|
2608
|
+
onClick,
|
|
2609
|
+
tags
|
|
2475
2610
|
});
|
|
2476
2611
|
};
|
|
2477
2612
|
var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
|
|
2478
2613
|
const { onBehavior, step } = mapperProps;
|
|
2479
|
-
const {
|
|
2614
|
+
const {
|
|
2615
|
+
context,
|
|
2616
|
+
control,
|
|
2617
|
+
disabled,
|
|
2618
|
+
margin = "md",
|
|
2619
|
+
pinOrder,
|
|
2620
|
+
size,
|
|
2621
|
+
title,
|
|
2622
|
+
analyticsId,
|
|
2623
|
+
tags
|
|
2624
|
+
} = button;
|
|
2480
2625
|
const { action } = button;
|
|
2481
2626
|
const inlinedAction = action ? inlineAction(action, step == null ? void 0 : step.actions) : {};
|
|
2482
2627
|
const onClick = () => {
|
|
@@ -2492,7 +2637,8 @@ var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
|
|
|
2492
2637
|
size,
|
|
2493
2638
|
title: getButtonTitle({ title, action: inlinedAction }),
|
|
2494
2639
|
onClick,
|
|
2495
|
-
analyticsId
|
|
2640
|
+
analyticsId,
|
|
2641
|
+
tags
|
|
2496
2642
|
});
|
|
2497
2643
|
};
|
|
2498
2644
|
var getButtonTitle = ({ title, action }) => {
|
|
@@ -2529,12 +2675,13 @@ var createColumnsComponent = (columnsProps) => __spreadProps(__spreadValues({},
|
|
|
2529
2675
|
});
|
|
2530
2676
|
|
|
2531
2677
|
// src/revamp/domain/mappers/layout/columnsLayoutToComponent.ts
|
|
2532
|
-
var columnsLayoutToComponent = (uid, { control, left, right, bias = "none", margin = "md", analyticsId }, mapperProps, schemaComponents) => createColumnsComponent({
|
|
2678
|
+
var columnsLayoutToComponent = (uid, { control, left, right, bias = "none", margin = "md", analyticsId, tags }, mapperProps, schemaComponents) => createColumnsComponent({
|
|
2533
2679
|
uid,
|
|
2534
2680
|
analyticsId,
|
|
2535
2681
|
control,
|
|
2536
2682
|
margin,
|
|
2537
2683
|
bias: mapLegacyBias(bias),
|
|
2684
|
+
tags,
|
|
2538
2685
|
startComponents: left.map(
|
|
2539
2686
|
(component, index) => mapLayoutToComponent(
|
|
2540
2687
|
`${uid}.columns-start-${index}`,
|
|
@@ -2554,6 +2701,9 @@ var createDecisionComponent = (decisionProps) => __spreadValues({
|
|
|
2554
2701
|
kind: "layout"
|
|
2555
2702
|
}, decisionProps);
|
|
2556
2703
|
|
|
2704
|
+
// src/revamp/domain/mappers/utils/tags-utils.ts
|
|
2705
|
+
var mapTags = ({ tag, tags }) => tags != null ? tags : tag != null ? [tag] : void 0;
|
|
2706
|
+
|
|
2557
2707
|
// src/revamp/domain/mappers/utils/utils.ts
|
|
2558
2708
|
var mapInlineAlert = (alert) => {
|
|
2559
2709
|
return alert ? {
|
|
@@ -2588,6 +2738,7 @@ var decisionLayoutToComponent = (uid, {
|
|
|
2588
2738
|
control,
|
|
2589
2739
|
margin = "md",
|
|
2590
2740
|
options,
|
|
2741
|
+
tags,
|
|
2591
2742
|
title
|
|
2592
2743
|
}, { onBehavior, step }) => createDecisionComponent({
|
|
2593
2744
|
uid,
|
|
@@ -2595,6 +2746,7 @@ var decisionLayoutToComponent = (uid, {
|
|
|
2595
2746
|
control,
|
|
2596
2747
|
margin,
|
|
2597
2748
|
options: options.map((option) => mapOption(option, onBehavior, step.actions)),
|
|
2749
|
+
tags,
|
|
2598
2750
|
title
|
|
2599
2751
|
});
|
|
2600
2752
|
var mapOption = (option, onBehavior, stepActions = []) => {
|
|
@@ -2605,6 +2757,7 @@ var mapOption = (option, onBehavior, stepActions = []) => {
|
|
|
2605
2757
|
href: behavior.type === "link" ? behavior.url : void 0,
|
|
2606
2758
|
media: getDomainLayerMedia(option),
|
|
2607
2759
|
inlineAlert: mapInlineAlert(option.inlineAlert),
|
|
2760
|
+
tags: mapTags(option),
|
|
2608
2761
|
onClick: () => {
|
|
2609
2762
|
void onBehavior(behavior);
|
|
2610
2763
|
}
|
|
@@ -2621,18 +2774,20 @@ var createStatusListComponent = (statusListProps) => __spreadValues({
|
|
|
2621
2774
|
var isDeprecatedListLayout = (layout) => {
|
|
2622
2775
|
return layout.items.some((item) => item.status);
|
|
2623
2776
|
};
|
|
2624
|
-
var deprecatedListLayoutToComponent = (uid, { analyticsId, control, items, margin = "md", title }) => createStatusListComponent({
|
|
2777
|
+
var deprecatedListLayoutToComponent = (uid, { analyticsId, control, items, margin = "md", title, tags }) => createStatusListComponent({
|
|
2625
2778
|
uid,
|
|
2626
2779
|
analyticsId,
|
|
2627
2780
|
control,
|
|
2628
|
-
items: items.map(({ description, icon, status, title: itemTitle }) => ({
|
|
2781
|
+
items: items.map(({ description, icon, status, title: itemTitle, tags: itemTags }) => ({
|
|
2629
2782
|
description,
|
|
2630
2783
|
icon: icon != null ? icon : { text: "" },
|
|
2631
2784
|
title: itemTitle != null ? itemTitle : "",
|
|
2632
|
-
status: status ? mapLegacyStatus(status) : void 0
|
|
2785
|
+
status: status ? mapLegacyStatus(status) : void 0,
|
|
2786
|
+
tags: itemTags
|
|
2633
2787
|
})),
|
|
2634
2788
|
margin,
|
|
2635
|
-
title
|
|
2789
|
+
title,
|
|
2790
|
+
tags
|
|
2636
2791
|
});
|
|
2637
2792
|
var mapLegacyStatus = (status) => {
|
|
2638
2793
|
switch (status) {
|
|
@@ -2653,7 +2808,7 @@ var createDividerComponent = (props) => __spreadValues({
|
|
|
2653
2808
|
}, props);
|
|
2654
2809
|
|
|
2655
2810
|
// src/revamp/domain/mappers/layout/dividerLayoutToComponent.ts
|
|
2656
|
-
var dividerLayoutToComponent = (uid, { control, margin = "md", analyticsId }) => createDividerComponent({ uid, analyticsId, control, margin });
|
|
2811
|
+
var dividerLayoutToComponent = (uid, { control, margin = "md", analyticsId, tags }) => createDividerComponent({ uid, analyticsId, control, margin, tags });
|
|
2657
2812
|
|
|
2658
2813
|
// src/revamp/domain/components/FormComponent.ts
|
|
2659
2814
|
var createFormComponent = (formProps) => __spreadProps(__spreadValues({}, formProps), {
|
|
@@ -2665,7 +2820,7 @@ var createFormComponent = (formProps) => __spreadProps(__spreadValues({}, formPr
|
|
|
2665
2820
|
});
|
|
2666
2821
|
|
|
2667
2822
|
// src/revamp/domain/mappers/layout/formLayoutToComponent.ts
|
|
2668
|
-
var formLayoutToComponent = (uid, { analyticsId, schemaId, schema: schemaRef, control, margin = "md" }, schemaComponents) => {
|
|
2823
|
+
var formLayoutToComponent = (uid, { analyticsId, schemaId, schema: schemaRef, control, margin = "md", tags }, schemaComponents) => {
|
|
2669
2824
|
const id = schemaId != null ? schemaId : schemaRef == null ? void 0 : schemaRef.$ref;
|
|
2670
2825
|
if (id == null) {
|
|
2671
2826
|
throw new Error(
|
|
@@ -2683,7 +2838,8 @@ var formLayoutToComponent = (uid, { analyticsId, schemaId, schema: schemaRef, co
|
|
|
2683
2838
|
analyticsId,
|
|
2684
2839
|
schemaComponent,
|
|
2685
2840
|
control,
|
|
2686
|
-
margin
|
|
2841
|
+
margin,
|
|
2842
|
+
tags
|
|
2687
2843
|
});
|
|
2688
2844
|
};
|
|
2689
2845
|
|
|
@@ -2694,13 +2850,14 @@ var createHeadingComponent = (headingProps) => __spreadValues({
|
|
|
2694
2850
|
}, headingProps);
|
|
2695
2851
|
|
|
2696
2852
|
// src/revamp/domain/mappers/layout/headingLayoutToComponent.ts
|
|
2697
|
-
var headingLayoutToComponent = (uid, { analyticsId, align = "left", margin = "md", size = "md", control, text }) => createHeadingComponent({
|
|
2853
|
+
var headingLayoutToComponent = (uid, { analyticsId, align = "left", margin = "md", size = "md", control, tags, text }) => createHeadingComponent({
|
|
2698
2854
|
uid,
|
|
2699
2855
|
analyticsId,
|
|
2700
2856
|
align: mapLegacyAlign(align),
|
|
2701
2857
|
control,
|
|
2702
2858
|
margin,
|
|
2703
2859
|
size,
|
|
2860
|
+
tags,
|
|
2704
2861
|
text
|
|
2705
2862
|
});
|
|
2706
2863
|
|
|
@@ -2719,6 +2876,7 @@ var imageLayoutToComponent = (uid, {
|
|
|
2719
2876
|
control,
|
|
2720
2877
|
margin = "md",
|
|
2721
2878
|
size = "md",
|
|
2879
|
+
tags,
|
|
2722
2880
|
text,
|
|
2723
2881
|
url
|
|
2724
2882
|
}) => {
|
|
@@ -2733,7 +2891,8 @@ var imageLayoutToComponent = (uid, {
|
|
|
2733
2891
|
} : { accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text, uri: url != null ? url : "" },
|
|
2734
2892
|
control,
|
|
2735
2893
|
margin,
|
|
2736
|
-
size
|
|
2894
|
+
size,
|
|
2895
|
+
tags
|
|
2737
2896
|
});
|
|
2738
2897
|
};
|
|
2739
2898
|
|
|
@@ -2744,13 +2903,14 @@ var createMarkdownComponent = (markdownProps) => __spreadValues({
|
|
|
2744
2903
|
}, markdownProps);
|
|
2745
2904
|
|
|
2746
2905
|
// src/revamp/domain/mappers/layout/infoLayoutToComponent.ts
|
|
2747
|
-
var infoLayoutToComponent = (uid, { analyticsId, align = "left", control, margin = "md", markdown: content }) => createMarkdownComponent({
|
|
2906
|
+
var infoLayoutToComponent = (uid, { analyticsId, align = "left", control, margin = "md", markdown: content, tags }) => createMarkdownComponent({
|
|
2748
2907
|
uid,
|
|
2749
2908
|
analyticsId,
|
|
2750
2909
|
align: mapLegacyAlign(align),
|
|
2751
2910
|
content,
|
|
2752
2911
|
control,
|
|
2753
|
-
margin
|
|
2912
|
+
margin,
|
|
2913
|
+
tags
|
|
2754
2914
|
});
|
|
2755
2915
|
|
|
2756
2916
|
// src/revamp/domain/components/InstructionsComponent.ts
|
|
@@ -2760,14 +2920,16 @@ var createInstructionsComponent = (instructionsProps) => __spreadValues({
|
|
|
2760
2920
|
}, instructionsProps);
|
|
2761
2921
|
|
|
2762
2922
|
// src/revamp/domain/mappers/layout/instructionsLayoutToComponent.ts
|
|
2763
|
-
var instructionsLayoutToComponent = (uid, { analyticsId, control, items, margin = "md", title }) => createInstructionsComponent({
|
|
2923
|
+
var instructionsLayoutToComponent = (uid, { analyticsId, control, items, margin = "md", tags, title }) => createInstructionsComponent({
|
|
2764
2924
|
uid,
|
|
2765
2925
|
analyticsId,
|
|
2766
2926
|
control,
|
|
2767
2927
|
items: items.map((item) => __spreadProps(__spreadValues({}, item), {
|
|
2768
|
-
context: mapLegacyContext(item.context)
|
|
2928
|
+
context: mapLegacyContext(item.context),
|
|
2929
|
+
tags: mapTags(item)
|
|
2769
2930
|
})),
|
|
2770
2931
|
margin,
|
|
2932
|
+
tags,
|
|
2771
2933
|
title
|
|
2772
2934
|
});
|
|
2773
2935
|
|
|
@@ -2778,7 +2940,7 @@ var createListComponent = (listProps) => __spreadValues({
|
|
|
2778
2940
|
}, listProps);
|
|
2779
2941
|
|
|
2780
2942
|
// src/revamp/domain/mappers/layout/listLayoutToComponent.ts
|
|
2781
|
-
var listLayoutToComponent = (uid, { analyticsId, callToAction, control, items, margin = "md", title }, mapperProps) => {
|
|
2943
|
+
var listLayoutToComponent = (uid, { analyticsId, callToAction, control, items, margin = "md", tags, title }, mapperProps) => {
|
|
2782
2944
|
var _a;
|
|
2783
2945
|
const { step, onBehavior } = mapperProps;
|
|
2784
2946
|
return createListComponent({
|
|
@@ -2788,18 +2950,44 @@ var listLayoutToComponent = (uid, { analyticsId, callToAction, control, items, m
|
|
|
2788
2950
|
items: items.map((item) => mapItem2(item, mapperProps)),
|
|
2789
2951
|
callToAction: getDomainLayerCallToAction(callToAction, onBehavior, (_a = step.actions) != null ? _a : []),
|
|
2790
2952
|
margin,
|
|
2953
|
+
tags,
|
|
2791
2954
|
title
|
|
2792
2955
|
});
|
|
2793
2956
|
};
|
|
2794
2957
|
var mapItem2 = (item, mapperProps) => {
|
|
2795
2958
|
var _b;
|
|
2796
|
-
const _a = item, {
|
|
2959
|
+
const _a = item, {
|
|
2960
|
+
value,
|
|
2961
|
+
subvalue,
|
|
2962
|
+
subtitle,
|
|
2963
|
+
callToAction,
|
|
2964
|
+
description,
|
|
2965
|
+
icon,
|
|
2966
|
+
image,
|
|
2967
|
+
media,
|
|
2968
|
+
additionalInfo,
|
|
2969
|
+
inlineAlert
|
|
2970
|
+
} = _a, rest = __objRest(_a, [
|
|
2971
|
+
"value",
|
|
2972
|
+
"subvalue",
|
|
2973
|
+
"subtitle",
|
|
2974
|
+
"callToAction",
|
|
2975
|
+
"description",
|
|
2976
|
+
"icon",
|
|
2977
|
+
"image",
|
|
2978
|
+
"media",
|
|
2979
|
+
"additionalInfo",
|
|
2980
|
+
"inlineAlert"
|
|
2981
|
+
]);
|
|
2982
|
+
const { step, onBehavior } = mapperProps;
|
|
2797
2983
|
return __spreadProps(__spreadValues({}, rest), {
|
|
2798
|
-
description:
|
|
2984
|
+
description: description != null ? description : subtitle,
|
|
2799
2985
|
media: getDomainLayerMedia({ icon, image, media }),
|
|
2800
2986
|
supportingValues: mapSupportingValues(item),
|
|
2801
|
-
additionalInfo: mapAdditionalInfo(
|
|
2802
|
-
inlineAlert: mapInlineAlert(
|
|
2987
|
+
additionalInfo: mapAdditionalInfo(additionalInfo, onBehavior),
|
|
2988
|
+
inlineAlert: mapInlineAlert(inlineAlert),
|
|
2989
|
+
callToAction: getDomainLayerCallToAction(callToAction, onBehavior, (_b = step.actions) != null ? _b : []),
|
|
2990
|
+
tags: mapTags(rest)
|
|
2803
2991
|
});
|
|
2804
2992
|
};
|
|
2805
2993
|
var mapSupportingValues = (item) => {
|
|
@@ -2817,16 +3005,24 @@ var createLoadingIndicatorComponent = (loadingIndicatorProps) => __spreadValues(
|
|
|
2817
3005
|
}, loadingIndicatorProps);
|
|
2818
3006
|
|
|
2819
3007
|
// src/revamp/domain/mappers/layout/loadingIndicatorLayoutToComponent.ts
|
|
2820
|
-
var loadingIndicatorLayoutToComponent = (uid, { analyticsId,
|
|
3008
|
+
var loadingIndicatorLayoutToComponent = (uid, { analyticsId, control, margin = "md", size = "md", tags }) => createLoadingIndicatorComponent({
|
|
3009
|
+
uid,
|
|
3010
|
+
analyticsId,
|
|
3011
|
+
control,
|
|
3012
|
+
margin,
|
|
3013
|
+
size,
|
|
3014
|
+
tags
|
|
3015
|
+
});
|
|
2821
3016
|
|
|
2822
3017
|
// src/revamp/domain/mappers/layout/markdownLayoutToComponent.ts
|
|
2823
|
-
var markdownLayoutToComponent = (uid, { analyticsId, align = "left", margin = "md", control, content }) => createMarkdownComponent({
|
|
3018
|
+
var markdownLayoutToComponent = (uid, { analyticsId, align = "left", margin = "md", control, content, tags }) => createMarkdownComponent({
|
|
2824
3019
|
uid,
|
|
2825
3020
|
analyticsId,
|
|
2826
3021
|
align: mapLegacyAlign(align),
|
|
2827
3022
|
control,
|
|
2828
3023
|
content,
|
|
2829
|
-
margin
|
|
3024
|
+
margin,
|
|
3025
|
+
tags
|
|
2830
3026
|
});
|
|
2831
3027
|
|
|
2832
3028
|
// src/revamp/domain/components/ModalLayoutComponent.ts
|
|
@@ -2840,7 +3036,7 @@ var createModalComponent = (modalProps) => __spreadProps(__spreadValues({
|
|
|
2840
3036
|
});
|
|
2841
3037
|
|
|
2842
3038
|
// src/revamp/domain/mappers/layout/modalLayoutToComponent.ts
|
|
2843
|
-
var modalLayoutToComponent = (uid, { analyticsId, content, control, margin = "md", trigger }, mapperProps, schemaComponents) => {
|
|
3039
|
+
var modalLayoutToComponent = (uid, { analyticsId, content, control, margin = "md", tags, trigger }, mapperProps, schemaComponents) => {
|
|
2844
3040
|
const { components, title } = content;
|
|
2845
3041
|
return createModalComponent({
|
|
2846
3042
|
uid,
|
|
@@ -2853,6 +3049,7 @@ var modalLayoutToComponent = (uid, { analyticsId, content, control, margin = "md
|
|
|
2853
3049
|
},
|
|
2854
3050
|
control,
|
|
2855
3051
|
margin,
|
|
3052
|
+
tags,
|
|
2856
3053
|
trigger
|
|
2857
3054
|
});
|
|
2858
3055
|
};
|
|
@@ -2864,13 +3061,14 @@ var createParagraphComponent = (paragraphProps) => __spreadValues({
|
|
|
2864
3061
|
}, paragraphProps);
|
|
2865
3062
|
|
|
2866
3063
|
// src/revamp/domain/mappers/layout/paragraphLayoutToComponent.ts
|
|
2867
|
-
var paragraphLayoutToComponent = (uid, { analyticsId, align = "left", control, margin = "md", text }) => createParagraphComponent({
|
|
3064
|
+
var paragraphLayoutToComponent = (uid, { analyticsId, align = "left", control, margin = "md", tags, text }) => createParagraphComponent({
|
|
2868
3065
|
uid,
|
|
2869
3066
|
analyticsId,
|
|
2870
3067
|
text,
|
|
2871
3068
|
control,
|
|
2872
3069
|
align: mapLegacyAlign(align),
|
|
2873
|
-
margin
|
|
3070
|
+
margin,
|
|
3071
|
+
tags
|
|
2874
3072
|
});
|
|
2875
3073
|
|
|
2876
3074
|
// src/revamp/domain/components/ReviewComponent.ts
|
|
@@ -2887,6 +3085,7 @@ var reviewLayoutToComponent = (uid, {
|
|
|
2887
3085
|
callToAction,
|
|
2888
3086
|
control,
|
|
2889
3087
|
margin = "md",
|
|
3088
|
+
tags,
|
|
2890
3089
|
orientation,
|
|
2891
3090
|
action
|
|
2892
3091
|
}, { onBehavior, step }) => createReviewComponent({
|
|
@@ -2896,6 +3095,7 @@ var reviewLayoutToComponent = (uid, {
|
|
|
2896
3095
|
control: getOrientationControl({ control, orientation }),
|
|
2897
3096
|
fields: fields.map((field) => mapReviewField(field, { onBehavior, step })),
|
|
2898
3097
|
margin,
|
|
3098
|
+
tags,
|
|
2899
3099
|
title
|
|
2900
3100
|
});
|
|
2901
3101
|
var getCallToAction2 = ({
|
|
@@ -2941,7 +3141,8 @@ var mapReviewField = (field, { onBehavior, step }) => {
|
|
|
2941
3141
|
onBehavior,
|
|
2942
3142
|
callToAction: field.callToAction,
|
|
2943
3143
|
stepActions: (_b = step.actions) != null ? _b : []
|
|
2944
|
-
})
|
|
3144
|
+
}),
|
|
3145
|
+
tags: mapTags(field)
|
|
2945
3146
|
});
|
|
2946
3147
|
};
|
|
2947
3148
|
|
|
@@ -2984,7 +3185,7 @@ var debounce = (callback, waitMs) => {
|
|
|
2984
3185
|
// src/revamp/domain/components/searchComponent/SearchComponent.ts
|
|
2985
3186
|
var DEBOUNCE_TIME = 400;
|
|
2986
3187
|
var createSearchComponent = (searchProps, performSearch, onBehavior, updateComponent) => {
|
|
2987
|
-
const { uid, analyticsId, control, emptyMessage, margin, title } = searchProps;
|
|
3188
|
+
const { uid, analyticsId, control, emptyMessage, margin, tags, title } = searchProps;
|
|
2988
3189
|
const update = getInputUpdateFunction(updateComponent);
|
|
2989
3190
|
let abortController = new AbortController();
|
|
2990
3191
|
const search = (component2, query, searchConfig) => {
|
|
@@ -3021,6 +3222,7 @@ var createSearchComponent = (searchProps, performSearch, onBehavior, updateCompo
|
|
|
3021
3222
|
control,
|
|
3022
3223
|
emptyMessage,
|
|
3023
3224
|
margin,
|
|
3225
|
+
tags,
|
|
3024
3226
|
title,
|
|
3025
3227
|
isLoading: false,
|
|
3026
3228
|
query: "",
|
|
@@ -3113,7 +3315,8 @@ var searchLayoutToComponent = (uid, {
|
|
|
3113
3315
|
param,
|
|
3114
3316
|
title,
|
|
3115
3317
|
url,
|
|
3116
|
-
margin = "md"
|
|
3318
|
+
margin = "md",
|
|
3319
|
+
tags
|
|
3117
3320
|
}, mapperProps) => {
|
|
3118
3321
|
const { httpClient, onBehavior, updateComponent } = mapperProps;
|
|
3119
3322
|
const search = getPerformSearchFunction(httpClient, { method, param, url });
|
|
@@ -3124,6 +3327,7 @@ var searchLayoutToComponent = (uid, {
|
|
|
3124
3327
|
control,
|
|
3125
3328
|
emptyMessage,
|
|
3126
3329
|
margin,
|
|
3330
|
+
tags,
|
|
3127
3331
|
title
|
|
3128
3332
|
},
|
|
3129
3333
|
search,
|
|
@@ -3133,7 +3337,7 @@ var searchLayoutToComponent = (uid, {
|
|
|
3133
3337
|
};
|
|
3134
3338
|
|
|
3135
3339
|
// src/revamp/domain/mappers/layout/statusListLayoutToComponent.ts
|
|
3136
|
-
var statusListLayoutToComponent = (uid, { analyticsId, control, items, margin = "md", title }, { onBehavior, step }) => createStatusListComponent({
|
|
3340
|
+
var statusListLayoutToComponent = (uid, { analyticsId, control, items, margin = "md", tags, title }, { onBehavior, step }) => createStatusListComponent({
|
|
3137
3341
|
uid,
|
|
3138
3342
|
analyticsId,
|
|
3139
3343
|
control,
|
|
@@ -3144,9 +3348,10 @@ var statusListLayoutToComponent = (uid, { analyticsId, control, items, margin =
|
|
|
3144
3348
|
onBehavior,
|
|
3145
3349
|
(_a = step.actions) != null ? _a : []
|
|
3146
3350
|
);
|
|
3147
|
-
return __spreadProps(__spreadValues({}, item), { callToAction });
|
|
3351
|
+
return __spreadProps(__spreadValues({}, item), { callToAction, tags: mapTags(item) });
|
|
3148
3352
|
}),
|
|
3149
3353
|
margin,
|
|
3354
|
+
tags,
|
|
3150
3355
|
title
|
|
3151
3356
|
});
|
|
3152
3357
|
|
|
@@ -3162,7 +3367,7 @@ var createSectionComponent = (props) => {
|
|
|
3162
3367
|
};
|
|
3163
3368
|
|
|
3164
3369
|
// src/revamp/domain/mappers/layout/sectionLayoutToComponent.ts
|
|
3165
|
-
var sectionLayoutToComponent = (uid, { analyticsId, control, title, components, callToAction, margin = "md" }, mapperProps, schemaComponents) => {
|
|
3370
|
+
var sectionLayoutToComponent = (uid, { analyticsId, control, title, components, callToAction, margin = "md", tags }, mapperProps, schemaComponents) => {
|
|
3166
3371
|
var _a;
|
|
3167
3372
|
return createSectionComponent({
|
|
3168
3373
|
uid,
|
|
@@ -3177,7 +3382,8 @@ var sectionLayoutToComponent = (uid, { analyticsId, control, title, components,
|
|
|
3177
3382
|
callToAction,
|
|
3178
3383
|
mapperProps.onBehavior,
|
|
3179
3384
|
(_a = mapperProps.step.actions) != null ? _a : []
|
|
3180
|
-
)
|
|
3385
|
+
),
|
|
3386
|
+
tags
|
|
3181
3387
|
});
|
|
3182
3388
|
};
|
|
3183
3389
|
|
|
@@ -3188,24 +3394,26 @@ var createTabsComponent = (tabsProps) => __spreadProps(__spreadValues({}, tabsPr
|
|
|
3188
3394
|
});
|
|
3189
3395
|
|
|
3190
3396
|
// src/revamp/domain/mappers/layout/tabsLayoutToComponent.ts
|
|
3191
|
-
var tabsLayoutToComponent = (uid, { analyticsId, control, margin = "md", tabs }, mapperProps, schemaComponents) => createTabsComponent({
|
|
3397
|
+
var tabsLayoutToComponent = (uid, { analyticsId, control, margin = "md", tags, tabs }, mapperProps, schemaComponents) => createTabsComponent({
|
|
3192
3398
|
uid,
|
|
3193
3399
|
analyticsId,
|
|
3194
3400
|
control,
|
|
3195
3401
|
margin,
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
title,
|
|
3199
|
-
components: components.map(
|
|
3200
|
-
(c, componentIndex) => mapLayoutToComponent(
|
|
3201
|
-
`${uid}.tabs-${tabIndex}-${componentIndex}`,
|
|
3202
|
-
c,
|
|
3203
|
-
mapperProps,
|
|
3204
|
-
schemaComponents
|
|
3205
|
-
)
|
|
3206
|
-
)
|
|
3207
|
-
}))
|
|
3402
|
+
tags,
|
|
3403
|
+
tabs: mapTabs(tabs, uid, mapperProps, schemaComponents)
|
|
3208
3404
|
});
|
|
3405
|
+
var mapTabs = (tabs, uid, mapperProps, schemaComponents) => tabs.map(({ components, tag, tags, title }, tabIndex) => ({
|
|
3406
|
+
title,
|
|
3407
|
+
tags: mapTags({ tag, tags }),
|
|
3408
|
+
components: components.map(
|
|
3409
|
+
(c, componentIndex) => mapLayoutToComponent(
|
|
3410
|
+
`${uid}.tabs-${tabIndex}-${componentIndex}`,
|
|
3411
|
+
c,
|
|
3412
|
+
mapperProps,
|
|
3413
|
+
schemaComponents
|
|
3414
|
+
)
|
|
3415
|
+
)
|
|
3416
|
+
}));
|
|
3209
3417
|
|
|
3210
3418
|
// src/revamp/domain/components/ProgressComponent.ts
|
|
3211
3419
|
var createProgressComponent = (progressProps) => __spreadValues({
|
|
@@ -3223,6 +3431,7 @@ var progressLayoutToComponent = (uid, {
|
|
|
3223
3431
|
margin = "md",
|
|
3224
3432
|
progress,
|
|
3225
3433
|
progressText,
|
|
3434
|
+
tags,
|
|
3226
3435
|
title
|
|
3227
3436
|
}) => createProgressComponent({
|
|
3228
3437
|
uid,
|
|
@@ -3234,6 +3443,7 @@ var progressLayoutToComponent = (uid, {
|
|
|
3234
3443
|
margin,
|
|
3235
3444
|
progress,
|
|
3236
3445
|
progressText,
|
|
3446
|
+
tags,
|
|
3237
3447
|
title
|
|
3238
3448
|
});
|
|
3239
3449
|
|
|
@@ -4137,7 +4347,19 @@ var summaryIfProvides = (summary, {
|
|
|
4137
4347
|
var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
4138
4348
|
var _a;
|
|
4139
4349
|
const { uid, schemaId, schema, required, validationErrors, onPersistAsync } = schemaMapperProps;
|
|
4140
|
-
const {
|
|
4350
|
+
const {
|
|
4351
|
+
$id,
|
|
4352
|
+
analyticsId,
|
|
4353
|
+
control,
|
|
4354
|
+
description,
|
|
4355
|
+
icon,
|
|
4356
|
+
image,
|
|
4357
|
+
keywords,
|
|
4358
|
+
media,
|
|
4359
|
+
tags,
|
|
4360
|
+
title,
|
|
4361
|
+
hidden
|
|
4362
|
+
} = schema;
|
|
4141
4363
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
4142
4364
|
uid,
|
|
4143
4365
|
id: $id != null ? $id : uid,
|
|
@@ -4151,6 +4373,7 @@ var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
|
4151
4373
|
keywords,
|
|
4152
4374
|
media: getDomainLayerMedia({ icon, image, media }),
|
|
4153
4375
|
required: Boolean(required),
|
|
4376
|
+
tags,
|
|
4154
4377
|
title,
|
|
4155
4378
|
onPersistAsync,
|
|
4156
4379
|
summariser: getSummariser(schema)
|
|
@@ -4206,7 +4429,8 @@ var createAllOfComponent = (allOfProps) => {
|
|
|
4206
4429
|
help,
|
|
4207
4430
|
hidden,
|
|
4208
4431
|
media,
|
|
4209
|
-
title
|
|
4432
|
+
title,
|
|
4433
|
+
tags
|
|
4210
4434
|
} = allOfProps;
|
|
4211
4435
|
return {
|
|
4212
4436
|
type: "all-of",
|
|
@@ -4222,6 +4446,7 @@ var createAllOfComponent = (allOfProps) => {
|
|
|
4222
4446
|
hidden,
|
|
4223
4447
|
media,
|
|
4224
4448
|
title,
|
|
4449
|
+
tags,
|
|
4225
4450
|
getChildren() {
|
|
4226
4451
|
return this.components;
|
|
4227
4452
|
},
|
|
@@ -4888,12 +5113,13 @@ var arraySchemaToMultiSelectComponent = (schemaMapperProps, mapperProps) => {
|
|
|
4888
5113
|
} = schemaMapperProps;
|
|
4889
5114
|
const initialModel = model != null ? model : null;
|
|
4890
5115
|
const options = schema.items.oneOf.map((childSchema, index) => {
|
|
4891
|
-
const { title: title2 = "", description, image, icon, media, keywords = [] } = childSchema;
|
|
5116
|
+
const { title: title2 = "", description, image, icon, media, keywords = [], tags } = childSchema;
|
|
4892
5117
|
return {
|
|
4893
5118
|
title: title2,
|
|
4894
5119
|
description,
|
|
4895
5120
|
media: getDomainLayerMedia({ icon, image, media }),
|
|
4896
5121
|
keywords,
|
|
5122
|
+
tags,
|
|
4897
5123
|
disabled: "disabled" in childSchema ? Boolean(childSchema.disabled) : false,
|
|
4898
5124
|
component: mapSchemaToComponent(
|
|
4899
5125
|
{
|
|
@@ -4953,7 +5179,8 @@ var createTupleComponent = (tupleProps) => {
|
|
|
4953
5179
|
hidden,
|
|
4954
5180
|
media,
|
|
4955
5181
|
summariser,
|
|
4956
|
-
title
|
|
5182
|
+
title,
|
|
5183
|
+
tags
|
|
4957
5184
|
} = tupleProps;
|
|
4958
5185
|
return {
|
|
4959
5186
|
type: "tuple",
|
|
@@ -4969,6 +5196,7 @@ var createTupleComponent = (tupleProps) => {
|
|
|
4969
5196
|
hidden,
|
|
4970
5197
|
media,
|
|
4971
5198
|
title,
|
|
5199
|
+
tags,
|
|
4972
5200
|
getChildren() {
|
|
4973
5201
|
return this.components;
|
|
4974
5202
|
},
|
|
@@ -5270,7 +5498,7 @@ var getValidModel = (model, defaultValue) => {
|
|
|
5270
5498
|
|
|
5271
5499
|
// src/revamp/domain/components/ConstComponent.ts
|
|
5272
5500
|
var createConstComponent = (hiddenProps) => {
|
|
5273
|
-
const { uid, schemaId, analyticsId, value, summary, layout, hidden } = hiddenProps;
|
|
5501
|
+
const { uid, schemaId, analyticsId, value, summary, layout, hidden, tags } = hiddenProps;
|
|
5274
5502
|
return {
|
|
5275
5503
|
type: "const",
|
|
5276
5504
|
kind: "input",
|
|
@@ -5279,6 +5507,7 @@ var createConstComponent = (hiddenProps) => {
|
|
|
5279
5507
|
analyticsId,
|
|
5280
5508
|
layout,
|
|
5281
5509
|
hidden,
|
|
5510
|
+
tags,
|
|
5282
5511
|
getLocalValue: () => value,
|
|
5283
5512
|
getSubmittableValue: async () => value,
|
|
5284
5513
|
getSubmittableValueSync: () => value,
|
|
@@ -5291,7 +5520,7 @@ var createConstComponent = (hiddenProps) => {
|
|
|
5291
5520
|
var constSchemaToComponent = (uid, schemaMapperProps, mapperProps) => {
|
|
5292
5521
|
var _a;
|
|
5293
5522
|
const { schema, schemaId } = schemaMapperProps;
|
|
5294
|
-
const { title, const: constValue, analyticsId, $id, layout, alert, hidden } = schema;
|
|
5523
|
+
const { title, const: constValue, analyticsId, $id, layout, alert, hidden, tags } = schema;
|
|
5295
5524
|
const titleOrValue = (_a = title != null ? title : constValue) != null ? _a : null;
|
|
5296
5525
|
return createConstComponent({
|
|
5297
5526
|
uid,
|
|
@@ -5300,7 +5529,8 @@ var constSchemaToComponent = (uid, schemaMapperProps, mapperProps) => {
|
|
|
5300
5529
|
summary: getConstSummary(schema, titleOrValue),
|
|
5301
5530
|
value: schema.const,
|
|
5302
5531
|
layout: getConstLayout(uid, mapperProps, layout, alert),
|
|
5303
|
-
hidden: Boolean(hidden)
|
|
5532
|
+
hidden: Boolean(hidden),
|
|
5533
|
+
tags
|
|
5304
5534
|
});
|
|
5305
5535
|
};
|
|
5306
5536
|
var getConstLayout = (uid, mapperProps, layout, alert) => {
|
|
@@ -5445,7 +5675,8 @@ var createObjectComponent = (objectProps) => {
|
|
|
5445
5675
|
hidden,
|
|
5446
5676
|
media,
|
|
5447
5677
|
summariser,
|
|
5448
|
-
title
|
|
5678
|
+
title,
|
|
5679
|
+
tags
|
|
5449
5680
|
} = objectProps;
|
|
5450
5681
|
return {
|
|
5451
5682
|
type: "object",
|
|
@@ -5461,6 +5692,7 @@ var createObjectComponent = (objectProps) => {
|
|
|
5461
5692
|
hidden,
|
|
5462
5693
|
media,
|
|
5463
5694
|
title,
|
|
5695
|
+
tags,
|
|
5464
5696
|
getChildren() {
|
|
5465
5697
|
return displayOrder.map((propName) => this.componentMap[propName]);
|
|
5466
5698
|
},
|
|
@@ -5680,12 +5912,13 @@ var oneOfSchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
|
5680
5912
|
);
|
|
5681
5913
|
}
|
|
5682
5914
|
const options = schema.oneOf.map((childSchema, index) => {
|
|
5683
|
-
const { title = "", description, image, icon, media, keywords = [] } = childSchema;
|
|
5915
|
+
const { title = "", description, image, icon, media, keywords = [], tags } = childSchema;
|
|
5684
5916
|
return {
|
|
5685
5917
|
title,
|
|
5686
5918
|
description,
|
|
5687
5919
|
media: getDomainLayerMedia({ icon, image, media }),
|
|
5688
5920
|
keywords,
|
|
5921
|
+
tags,
|
|
5689
5922
|
disabled: "disabled" in childSchema ? Boolean(childSchema.disabled) : false,
|
|
5690
5923
|
component: mapSchemaToComponent(
|
|
5691
5924
|
{
|
|
@@ -5821,7 +6054,8 @@ var mapStringSchemaSuggestions = (suggestions, logEvent) => {
|
|
|
5821
6054
|
}
|
|
5822
6055
|
return __spreadProps(__spreadValues({}, rest), {
|
|
5823
6056
|
media: getDomainLayerMedia({ icon, image, media }),
|
|
5824
|
-
value
|
|
6057
|
+
value,
|
|
6058
|
+
tags: mapTags(rest)
|
|
5825
6059
|
});
|
|
5826
6060
|
})
|
|
5827
6061
|
};
|
|
@@ -6075,7 +6309,7 @@ var isExactLocalValueMatch = (valueA, valueB) => {
|
|
|
6075
6309
|
|
|
6076
6310
|
// src/revamp/domain/components/PersistAsyncComponent.ts
|
|
6077
6311
|
var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, updateComponent) => {
|
|
6078
|
-
const { uid, analyticsId, schemaId, component, hidden, model, localValue } = props;
|
|
6312
|
+
const { uid, analyticsId, schemaId, component, hidden, model, localValue, tags } = props;
|
|
6079
6313
|
const update = getInputUpdateFunction(updateComponent);
|
|
6080
6314
|
const paComponent = {
|
|
6081
6315
|
type: "persist-async",
|
|
@@ -6090,6 +6324,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, u
|
|
|
6090
6324
|
submission: Promise.resolve(model != null ? model : null),
|
|
6091
6325
|
abortController: new AbortController(),
|
|
6092
6326
|
errors: [],
|
|
6327
|
+
tags,
|
|
6093
6328
|
_update(updateFn) {
|
|
6094
6329
|
update(this, updateFn);
|
|
6095
6330
|
},
|
|
@@ -6165,7 +6400,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, u
|
|
|
6165
6400
|
var isSupported = (type) => ["boolean", "text", "date", "integer", "number", "upload"].includes(type);
|
|
6166
6401
|
var persistAsyncSchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
6167
6402
|
const { uid, schema, model, localValue } = schemaMapperProps;
|
|
6168
|
-
const { persistAsync } = schema;
|
|
6403
|
+
const { persistAsync, tags } = schema;
|
|
6169
6404
|
const performPersistAsync = getPerformPersistAsyncFn(schema, persistAsync, mapperProps);
|
|
6170
6405
|
const onPersistAsync = async () => paComponent.persist().then(() => {
|
|
6171
6406
|
});
|
|
@@ -6186,7 +6421,8 @@ var persistAsyncSchemaToComponent = (schemaMapperProps, mapperProps) => {
|
|
|
6186
6421
|
component: childComponent,
|
|
6187
6422
|
schemaId: schema.$id,
|
|
6188
6423
|
model,
|
|
6189
|
-
localValue
|
|
6424
|
+
localValue,
|
|
6425
|
+
tags
|
|
6190
6426
|
},
|
|
6191
6427
|
performPersistAsync,
|
|
6192
6428
|
getSchemaOnChange(schema, mapperProps.onBehavior),
|
|
@@ -6271,12 +6507,14 @@ var mapToolbarToComponent = (uid, toolbar, mapperProps) => {
|
|
|
6271
6507
|
return __spreadProps(__spreadValues({}, toolbar), {
|
|
6272
6508
|
type: "toolbar",
|
|
6273
6509
|
uid: `${uid}.toolbar`,
|
|
6510
|
+
tags: toolbar.tags,
|
|
6274
6511
|
items: toolbar.items.map((item) => {
|
|
6275
6512
|
const context = item.context ? mapLegacyContext(item.context) : void 0;
|
|
6276
6513
|
const behavior = getDomainLayerBehavior({ behavior: item.behavior }, []);
|
|
6277
6514
|
return __spreadProps(__spreadValues({}, item), {
|
|
6278
6515
|
context: context ? mapLegacyContext(context) : void 0,
|
|
6279
6516
|
disabled: !!item.disabled,
|
|
6517
|
+
tags: item.tags,
|
|
6280
6518
|
onClick: () => {
|
|
6281
6519
|
void onBehavior(behavior);
|
|
6282
6520
|
}
|
|
@@ -6285,6 +6523,11 @@ var mapToolbarToComponent = (uid, toolbar, mapperProps) => {
|
|
|
6285
6523
|
});
|
|
6286
6524
|
};
|
|
6287
6525
|
|
|
6526
|
+
// src/revamp/domain/mappers/utils/feature-utils.ts
|
|
6527
|
+
var isFeatureEnabled = (features, featureName) => {
|
|
6528
|
+
return features[featureName] !== void 0 && features[featureName] !== false;
|
|
6529
|
+
};
|
|
6530
|
+
|
|
6288
6531
|
// src/revamp/domain/mappers/utils/groupLayoutByPinned.ts
|
|
6289
6532
|
var groupLayoutByPinned = (layouts) => {
|
|
6290
6533
|
return layouts.reduce(groupLayout, { pinned: [], nonPinned: [] });
|
|
@@ -6330,11 +6573,6 @@ var groupLayout = (acc, layout) => {
|
|
|
6330
6573
|
var hasChildren = (component) => "components" in component;
|
|
6331
6574
|
var hasColumns = (component) => "right" in component && "left" in component;
|
|
6332
6575
|
|
|
6333
|
-
// src/revamp/domain/mappers/utils/feature-utils.ts
|
|
6334
|
-
var isFeatureEnabled = (features, featureName) => {
|
|
6335
|
-
return features[featureName] !== void 0 && features[featureName] !== false;
|
|
6336
|
-
};
|
|
6337
|
-
|
|
6338
6576
|
// src/revamp/domain/mappers/mapStepToComponent.ts
|
|
6339
6577
|
var mapStepToComponent = (_a) => {
|
|
6340
6578
|
var _b = _a, {
|
|
@@ -6367,7 +6605,8 @@ var mapStepToComponent = (_a) => {
|
|
|
6367
6605
|
navigation,
|
|
6368
6606
|
polling,
|
|
6369
6607
|
refreshAfter,
|
|
6370
|
-
title
|
|
6608
|
+
title,
|
|
6609
|
+
tags
|
|
6371
6610
|
} = step;
|
|
6372
6611
|
const backNavigation = (_a2 = navigation == null ? void 0 : navigation.back) != null ? _a2 : navigation == null ? void 0 : navigation.backButton;
|
|
6373
6612
|
const back = backNavigation ? {
|
|
@@ -6428,6 +6667,7 @@ var mapStepToComponent = (_a) => {
|
|
|
6428
6667
|
stepPolling,
|
|
6429
6668
|
stepRefreshAfter,
|
|
6430
6669
|
title: displayStepTitle ? title : void 0,
|
|
6670
|
+
tags,
|
|
6431
6671
|
step,
|
|
6432
6672
|
updateComponent,
|
|
6433
6673
|
trackEvent,
|