@wise/dynamic-flow-client-internal 3.1.0-beta-2ae6d6.27 → 3.1.0-beta-bf3b9c.28

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
@@ -47,9 +47,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
47
47
  ));
48
48
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
49
49
 
50
- // ../../node_modules/.pnpm/@wise+dynamic-flow-client@3.1.0-beta-c06da4.35_@tr_x6ner2q5lhsu3n567sot4klgcu/node_modules/@wise/dynamic-flow-client/build/main.min.js
50
+ // ../../node_modules/.pnpm/@wise+dynamic-flow-client@3.1.0-beta-e9c47a.36_@tr_jlftmw3dlxgsqsa25ssaaf6ygu/node_modules/@wise/dynamic-flow-client/build/main.min.js
51
51
  var require_main_min = __commonJS({
52
- "../../node_modules/.pnpm/@wise+dynamic-flow-client@3.1.0-beta-c06da4.35_@tr_x6ner2q5lhsu3n567sot4klgcu/node_modules/@wise/dynamic-flow-client/build/main.min.js"(exports, module2) {
52
+ "../../node_modules/.pnpm/@wise+dynamic-flow-client@3.1.0-beta-e9c47a.36_@tr_jlftmw3dlxgsqsa25ssaaf6ygu/node_modules/@wise/dynamic-flow-client/build/main.min.js"(exports, module2) {
53
53
  "use strict";
54
54
  var Xh = Object.create;
55
55
  var bo = Object.defineProperty;
@@ -4000,9 +4000,13 @@ var require_main_min = __commonJS({
4000
4000
  } });
4001
4001
  var Uy = (e, { border: t = false, components: r, control: o, margin: n = "md", width: a = "xl" }, i) => By({ uid: e, border: t, control: o, margin: n, width: a, components: r.map((m, l) => Vt(`${e}.box-${l}`, m, i)) });
4002
4002
  var zy = (e) => C(s({ type: "button" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4003
- var jy = (e, { action: t, context: r, control: o, disabled: n, margin: a = "md", pinOrder: i, size: m, title: l }, { onAction: c }) => zy({ uid: e, context: MF({ context: r, action: t }), control: AF({ control: o, action: t }), disabled: PF({ disabled: n, action: t }), margin: a, pinOrder: i, size: m, title: IF({ title: l, action: t }), onClick: () => {
4004
- c(t);
4005
- } });
4003
+ var jy = (e, { action: t, context: r, control: o, disabled: n, margin: a = "md", pinOrder: i, size: m, title: l }, { onAction: c, step: p }) => {
4004
+ var u;
4005
+ let f = t != null && t.$ref ? (u = p == null ? void 0 : p.actions) == null ? void 0 : u.find((d) => d.$id === (t == null ? void 0 : t.$ref)) : void 0, y = s(s({}, t), f);
4006
+ return console.log(y), zy({ uid: e, context: MF({ context: r, action: y }), control: AF({ control: o, action: y }), disabled: PF({ disabled: n, action: y }), margin: a, pinOrder: i, size: m, title: IF({ title: l, action: y }), onClick: () => {
4007
+ c(y);
4008
+ } });
4009
+ };
4006
4010
  var IF = ({ title: e, action: t }) => {
4007
4011
  var r;
4008
4012
  return (r = e != null ? e : t == null ? void 0 : t.title) != null ? r : "";
@@ -4821,11 +4825,11 @@ var require_main_min = __commonJS({
4821
4825
  }, validate() {
4822
4826
  return Se(this.getChildren());
4823
4827
  } });
4824
- var Bf = (e, { schemaId: t, control: r, margin: o = "md" }, n) => {
4825
- let { step: a, stepLocalValue: i } = n, { model: m, errors: l, schemas: c } = a, p = c.find((f) => f.$id === t);
4826
- if (!p)
4828
+ var Bf = (e, { schemaId: t, schema: r, control: o, margin: n = "md" }, a) => {
4829
+ let { step: i, stepLocalValue: m } = a, { model: l, errors: c, schemas: p } = i, f = t != null ? t : r == null ? void 0 : r.$ref, y = p.find((u) => u.$id === f);
4830
+ if (!y)
4827
4831
  throw new Error("Bad layout schemaId");
4828
- return Vf({ uid: e, components: [et({ uid: `${e}.form`, schema: p, model: m != null ? m : null, localValue: i, validationErrors: l == null ? void 0 : l.validation }, n)], control: r, margin: o });
4832
+ return Vf({ uid: e, components: [et({ uid: `${e}.form`, schema: y, model: l != null ? l : null, localValue: m, validationErrors: c == null ? void 0 : c.validation }, a)], control: o, margin: n });
4829
4833
  };
4830
4834
  var Uf = (e) => C(s({ type: "image" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4831
4835
  var zf = (e, { accessibilityDescription: t, control: r, margin: o = "md", size: n = "md", text: a, url: i }) => Uf({ uid: e, accessibilityDescription: t != null ? t : a, control: r, margin: o, size: n, url: i });