@wise/dynamic-flow-client 3.1.2 → 3.2.0-beta-928206.39

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 CHANGED
@@ -149,10 +149,10 @@ var init_clsx = __esm({
149
149
  }
150
150
  });
151
151
 
152
- // ../../node_modules/.pnpm/@wise+art@2.9.2_@transferwise+neptune-css@14.8.0_@types+react@18.0.29_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index-d9418379.esm.js
152
+ // ../../node_modules/.pnpm/@wise+art@2.9.2_@transferwise+neptune-css@14.9.5_@types+react@18.0.29_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index-d9418379.esm.js
153
153
  var import_react17, import_jsx_runtime28, unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
154
154
  var init_index_d9418379_esm = __esm({
155
- "../../node_modules/.pnpm/@wise+art@2.9.2_@transferwise+neptune-css@14.8.0_@types+react@18.0.29_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index-d9418379.esm.js"() {
155
+ "../../node_modules/.pnpm/@wise+art@2.9.2_@transferwise+neptune-css@14.9.5_@types+react@18.0.29_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index-d9418379.esm.js"() {
156
156
  "use strict";
157
157
  init_clsx();
158
158
  import_react17 = require("react");
@@ -4414,7 +4414,7 @@ var FormControl = _FormControl;
4414
4414
  // src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
4415
4415
  var import_components14 = require("@transferwise/components");
4416
4416
 
4417
- // ../../node_modules/.pnpm/@wise+art@2.9.2_@transferwise+neptune-css@14.8.0_@types+react@18.0.29_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index.esm.js
4417
+ // ../../node_modules/.pnpm/@wise+art@2.9.2_@transferwise+neptune-css@14.9.5_@types+react@18.0.29_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index.esm.js
4418
4418
  init_index_d9418379_esm();
4419
4419
  init_clsx();
4420
4420
  var import_react18 = require("react");
@@ -5007,7 +5007,7 @@ function PromotedOneOfRadioControl(props) {
5007
5007
  const radios = [
5008
5008
  __spreadValues({
5009
5009
  value: "promoted",
5010
- // TODO: LOW avoid type assertion below the expression may be nullish, but "label" cannot be
5010
+ // TODO: LOW avoid type assertion below: the expression may be nullish, but "label" cannot be
5011
5011
  label: ((_a = promotion.promoted) == null ? void 0 : _a.title) || promotedOneOf.title,
5012
5012
  secondary: ((_b = promotion.promoted) == null ? void 0 : _b.description) || promotedOneOf.description
5013
5013
  }, getAvatarPropertyForRadioOption(promotedOneOf)),
@@ -8680,7 +8680,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
8680
8680
  return deterministicId || (id ? `radix-${id}` : "");
8681
8681
  }
8682
8682
 
8683
- // ../../node_modules/.pnpm/@wise+forms@0.3.1_@transferwise+components@46.10.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.esm.js
8683
+ // ../../node_modules/.pnpm/@wise+forms@0.3.1_@transferwise+components@46.17.2_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.esm.js
8684
8684
  var import_components39 = require("@transferwise/components");
8685
8685
  var import_classnames9 = __toESM(require_classnames());
8686
8686
  var import_react49 = require("react");
@@ -9962,12 +9962,12 @@ function RadioInputRendererComponent(props) {
9962
9962
  name: id,
9963
9963
  radios: options.map((option, index) => ({
9964
9964
  label: option.title,
9965
- value: String(index),
9965
+ value: index,
9966
9966
  secondary: option.description,
9967
9967
  disabled: option.disabled || disabled,
9968
9968
  avatar: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(OptionMedia, { icon: option.icon, image: option.image })
9969
9969
  })),
9970
- selectedValue: String(selectedIndex),
9970
+ selectedValue: selectedIndex != null ? selectedIndex : void 0,
9971
9971
  onChange: onSelect
9972
9972
  }
9973
9973
  ) }) }),
@@ -11493,20 +11493,20 @@ var getPerformPersistAsync = ({
11493
11493
  const { idProperty, param, method, url } = persistAsyncConfig;
11494
11494
  const trackFailure = (json) => {
11495
11495
  const analytics = getAnalyticsFromErrorResponse(json);
11496
- trackEvent("PersistAsync Failed", __spreadValues({ schemaId }, analytics));
11496
+ trackEvent("PersistAsync Failed", __spreadValues({ schema: schemaId }, analytics));
11497
11497
  };
11498
11498
  return async function performPersistAsync({ value, signal }) {
11499
11499
  let response;
11500
11500
  let json;
11501
11501
  try {
11502
- trackEvent("PersistAsync Triggered", { schemaId });
11502
+ trackEvent("PersistAsync Triggered", { schema: schemaId });
11503
11503
  response = await httpClient(
11504
11504
  url,
11505
11505
  constructPayload({ value, signal, requestConfig: { method, param } })
11506
11506
  );
11507
11507
  json = await response.json();
11508
11508
  if (response.ok && isObject2(json)) {
11509
- trackEvent("PersistAsync Succeeded", { schemaId });
11509
+ trackEvent("PersistAsync Succeeded", { schema: schemaId });
11510
11510
  if (json[idProperty] === void 0) {
11511
11511
  logEvent(
11512
11512
  "error",
@@ -11601,12 +11601,12 @@ var getPerformValidationAsync = ({
11601
11601
  const { method, param, url } = validationAsyncConfig;
11602
11602
  const trackFailureAndReturn = (json) => {
11603
11603
  const analytics = getAnalyticsFromErrorResponse(json);
11604
- trackEvent("ValidationAsync Failed", __spreadValues({ schemaId }, analytics));
11604
+ trackEvent("ValidationAsync Failed", __spreadValues({ schema: schemaId }, analytics));
11605
11605
  return null;
11606
11606
  };
11607
11607
  return async function performValidationAsync({ value, signal }) {
11608
11608
  let response;
11609
- trackEvent("ValidationAsync Triggered", { schemaId });
11609
+ trackEvent("ValidationAsync Triggered", { schema: schemaId });
11610
11610
  try {
11611
11611
  response = await httpClient(
11612
11612
  url,
@@ -11618,12 +11618,12 @@ var getPerformValidationAsync = ({
11618
11618
  const json = await response.json().catch(() => null);
11619
11619
  const message = getValidationMessage(json);
11620
11620
  if (response.ok) {
11621
- trackEvent("ValidationAsync Succeeded", { schemaId });
11621
+ trackEvent("ValidationAsync Succeeded", { schema: schemaId });
11622
11622
  return message;
11623
11623
  }
11624
11624
  if (response.status === 422) {
11625
11625
  if (message) {
11626
- trackEvent("ValidationAsync Succeeded", { schemaId });
11626
+ trackEvent("ValidationAsync Succeeded", { schema: schemaId });
11627
11627
  throw new Error(message);
11628
11628
  }
11629
11629
  }