@wise/dynamic-flow-client 2.8.5 → 2.8.6
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.js +41 -30
- package/build/main.min.js +1 -1
- package/build/types/legacy/jsonSchemaForm/help/Help.d.ts +1 -1
- package/build/types/legacy/layout/paragraph/DynamicParagraph.d.ts +2 -2
- package/build/types/revamp/domain/components/AlertComponent.d.ts +1 -7
- package/build/types/revamp/domain/components/BoxComponent.d.ts +4 -11
- package/build/types/revamp/domain/components/ButtonComponent.d.ts +4 -13
- package/build/types/revamp/domain/components/ColumnsComponent.d.ts +3 -13
- package/build/types/revamp/domain/components/DateInputComponent.d.ts +10 -0
- package/build/types/revamp/domain/components/HeadingComponent.d.ts +2 -8
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/ParagraphComponent.d.ts +2 -10
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +9 -0
- package/build/types/revamp/domain/mappers/layout/alertLayoutToComponent.d.ts +1 -2
- package/build/types/revamp/domain/mappers/layout/boxLayoutToComponents.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/buttonLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/columnsLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/headingLayoutToComponent.d.ts +1 -2
- package/build/types/revamp/domain/mappers/layout/paragraphLayoutToComponent.d.ts +1 -2
- package/build/types/revamp/domain/mappers/schema/{objectSchemaToComponent.d.ts → objectSchemaToComponent/objectSchemaToComponent.d.ts} +2 -2
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToDateInputComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToTextInputComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent/stringSchemaToUploadInputComponent.d.ts +5 -0
- package/build/types/revamp/domain/types.d.ts +5 -2
- package/build/types/revamp/renderers/mappers/alertComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/boxComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/dateInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/headingComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/paragraphComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/mappers/uploadInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/types.d.ts +24 -8
- package/build/types/revamp/wise/renderers/DateInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/UploadInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/components/FieldInput.d.ts +10 -0
- package/build/types/revamp/wise/renderers/components/VariableDateInput.d.ts +9 -0
- package/build/types/revamp/wise/renderers/components/VariableTextInput.d.ts +10 -0
- package/build/types/revamp/wise/renderers/hooks/useSnackBarIfAvailable.d.ts +10 -0
- package/build/types/revamp/wise/renderers/utils/input-utils.d.ts +1 -0
- package/build/types/revamp/wise/renderers/utils/value-utils.d.ts +3 -0
- package/build/types/revamp/wise/renderers/validators/type-validators.d.ts +9 -0
- package/package.json +1 -1
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent.d.ts +0 -5
- package/build/types/revamp/wise/renderers/utils/Label.d.ts +0 -5
- /package/build/types/common/{helpMessages → messages}/help.messages.d.ts +0 -0
- /package/build/types/{legacy/layout/paragraph/DynamicParagraph.messages.d.ts → common/messages/paragraph.messages.d.ts} +0 -0
- /package/build/types/common/{validationMessages → messages}/validation.messages.d.ts +0 -0
package/build/main.js
CHANGED
|
@@ -2541,19 +2541,23 @@ var DynamicColumns_default = DynamicColumns;
|
|
|
2541
2541
|
var import_components4 = require("@transferwise/components");
|
|
2542
2542
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2543
2543
|
function DynamicDecision({ component, onAction }) {
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2544
|
+
const { loading } = useDynamicFlow();
|
|
2545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getMargin(component.margin), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_components4.NavigationOptionsList, { children: component.options.map((option) => {
|
|
2546
|
+
var _a;
|
|
2547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2548
|
+
import_components4.NavigationOption,
|
|
2549
|
+
{
|
|
2550
|
+
title: option.title,
|
|
2551
|
+
content: option.description,
|
|
2552
|
+
disabled: (_a = option.disabled) != null ? _a : loading,
|
|
2553
|
+
media: getNavigationOptionMedia(option),
|
|
2554
|
+
showMediaCircle: false,
|
|
2555
|
+
showMediaAtAllSizes: true,
|
|
2556
|
+
onClick: () => onAction(option.action)
|
|
2557
|
+
},
|
|
2558
|
+
JSON.stringify(option)
|
|
2559
|
+
);
|
|
2560
|
+
}) }) });
|
|
2557
2561
|
}
|
|
2558
2562
|
var DynamicDecision_default = DynamicDecision;
|
|
2559
2563
|
|
|
@@ -2666,7 +2670,7 @@ var import_components7 = require("@transferwise/components");
|
|
|
2666
2670
|
var import_formatting = require("@transferwise/formatting");
|
|
2667
2671
|
var import_react_intl5 = require("react-intl");
|
|
2668
2672
|
|
|
2669
|
-
// src/common/
|
|
2673
|
+
// src/common/messages/validation.messages.ts
|
|
2670
2674
|
var import_react_intl4 = require("react-intl");
|
|
2671
2675
|
var validation_messages_default = (0, import_react_intl4.defineMessages)({
|
|
2672
2676
|
type: {
|
|
@@ -3520,7 +3524,7 @@ var import_react17 = require("react");
|
|
|
3520
3524
|
var import_components11 = require("@transferwise/components");
|
|
3521
3525
|
var import_react_intl13 = require("react-intl");
|
|
3522
3526
|
|
|
3523
|
-
// src/common/
|
|
3527
|
+
// src/common/messages/help.messages.ts
|
|
3524
3528
|
var import_react_intl12 = require("react-intl");
|
|
3525
3529
|
var help_messages_default = (0, import_react_intl12.defineMessages)({
|
|
3526
3530
|
helpAria: {
|
|
@@ -3532,7 +3536,7 @@ var help_messages_default = (0, import_react_intl12.defineMessages)({
|
|
|
3532
3536
|
|
|
3533
3537
|
// src/legacy/jsonSchemaForm/help/Help.tsx
|
|
3534
3538
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3535
|
-
|
|
3539
|
+
function Help(props) {
|
|
3536
3540
|
const intl = (0, import_react_intl13.useIntl)();
|
|
3537
3541
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3538
3542
|
import_components11.Info,
|
|
@@ -3544,7 +3548,7 @@ var Help = (props) => {
|
|
|
3544
3548
|
"aria-label": intl.formatMessage(help_messages_default.helpAria)
|
|
3545
3549
|
}
|
|
3546
3550
|
);
|
|
3547
|
-
}
|
|
3551
|
+
}
|
|
3548
3552
|
var Help_default = Help;
|
|
3549
3553
|
|
|
3550
3554
|
// src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
|
|
@@ -5350,9 +5354,9 @@ var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
|
|
|
5350
5354
|
var import_components26 = require("@transferwise/components");
|
|
5351
5355
|
var import_react_intl17 = require("react-intl");
|
|
5352
5356
|
|
|
5353
|
-
// src/
|
|
5357
|
+
// src/common/messages/paragraph.messages.ts
|
|
5354
5358
|
var import_react_intl16 = require("react-intl");
|
|
5355
|
-
var
|
|
5359
|
+
var paragraph_messages_default = (0, import_react_intl16.defineMessages)({
|
|
5356
5360
|
copy: {
|
|
5357
5361
|
id: "dynamicFlows.DynamicParagraph.copy",
|
|
5358
5362
|
defaultMessage: "Copy",
|
|
@@ -5377,21 +5381,28 @@ function noop2() {
|
|
|
5377
5381
|
|
|
5378
5382
|
// src/legacy/layout/paragraph/DynamicParagraph.tsx
|
|
5379
5383
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
"
|
|
5385
|
-
|
|
5386
|
-
|
|
5384
|
+
function DynamicParagraph({ component }) {
|
|
5385
|
+
return component.control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(BasicDynamicParagraph, { component });
|
|
5386
|
+
}
|
|
5387
|
+
function BasicDynamicParagraph({ component }) {
|
|
5388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("p", { className: getTextAlignmentAndMargin(component), children: [
|
|
5389
|
+
" ",
|
|
5390
|
+
component.text,
|
|
5391
|
+
" "
|
|
5392
|
+
] });
|
|
5393
|
+
}
|
|
5394
|
+
function CopyableDynamicParagraph({ component }) {
|
|
5387
5395
|
const { formatMessage } = (0, import_react_intl17.useIntl)();
|
|
5388
5396
|
const createSnackbar = useSnackBarIfAvailable();
|
|
5389
5397
|
const { text } = component;
|
|
5390
5398
|
const copy = () => {
|
|
5391
5399
|
var _a;
|
|
5392
|
-
(_a = navigator.clipboard) == null ? void 0 : _a.writeText(text).then(() => createSnackbar({ text: formatMessage(
|
|
5400
|
+
(_a = navigator.clipboard) == null ? void 0 : _a.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(noop3);
|
|
5393
5401
|
};
|
|
5394
|
-
const classNames8 = getTextAlignmentAndMargin({
|
|
5402
|
+
const classNames8 = `${getTextAlignmentAndMargin({
|
|
5403
|
+
align: component.align,
|
|
5404
|
+
margin: "sm"
|
|
5405
|
+
})} form-control`;
|
|
5395
5406
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: getTextAlignmentAndMargin(component), children: [
|
|
5396
5407
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5397
5408
|
"input",
|
|
@@ -5403,9 +5414,9 @@ var CopyableDynamicParagraph = ({ component }) => {
|
|
|
5403
5414
|
style: { textOverflow: "ellipsis" }
|
|
5404
5415
|
}
|
|
5405
5416
|
),
|
|
5406
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components26.Button, { block: true, onClick: copy, children: formatMessage(
|
|
5417
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components26.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
|
|
5407
5418
|
] });
|
|
5408
|
-
}
|
|
5419
|
+
}
|
|
5409
5420
|
function noop3() {
|
|
5410
5421
|
}
|
|
5411
5422
|
var DynamicParagraph_default = DynamicParagraph;
|