@hievilmath/browser-formidavim 1.1.3 → 1.1.4

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.
Files changed (3) hide show
  1. package/index.js +47 -47
  2. package/index.mjs +83 -79
  3. package/package.json +3 -2
package/index.mjs CHANGED
@@ -8191,7 +8191,7 @@ const Ys = {
8191
8191
  max-width: 600px;
8192
8192
  margin: 0 auto;
8193
8193
  position: relative;
8194
- `, Bl = ({ $isPreview: e, children: t }) => /* @__PURE__ */ p.jsxDEV(Gn, { store: To, children: /* @__PURE__ */ p.jsxDEV(Vi, { theme: Zi, children: /* @__PURE__ */ p.jsxDEV(rl, { $isPreview: e, children: /* @__PURE__ */ p.jsxDEV(nl, { children: t }, void 0, !1, {
8194
+ `, ol = ({ $isPreview: e, children: t }) => /* @__PURE__ */ p.jsxDEV(Gn, { store: To, children: /* @__PURE__ */ p.jsxDEV(Vi, { theme: Zi, children: /* @__PURE__ */ p.jsxDEV(rl, { $isPreview: e, children: /* @__PURE__ */ p.jsxDEV(nl, { children: t }, void 0, !1, {
8195
8195
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/RendererWrapper.tsx",
8196
8196
  lineNumber: 46,
8197
8197
  columnNumber: 11
@@ -8207,15 +8207,15 @@ const Ys = {
8207
8207
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/RendererWrapper.tsx",
8208
8208
  lineNumber: 43,
8209
8209
  columnNumber: 5
8210
- }, void 0), ol = ({
8210
+ }, void 0), al = ({
8211
8211
  currentStep: e,
8212
8212
  totalSteps: t,
8213
8213
  showOnMobile: r = !0,
8214
8214
  showOnDesktop: n = !0
8215
8215
  }) => {
8216
8216
  if (t <= 1) return null;
8217
- const o = /* @__PURE__ */ p.jsxDEV(sl, { children: /* @__PURE__ */ p.jsxDEV(
8218
- ll,
8217
+ const o = /* @__PURE__ */ p.jsxDEV(ll, { children: /* @__PURE__ */ p.jsxDEV(
8218
+ cl,
8219
8219
  {
8220
8220
  $currentStep: e,
8221
8221
  $totalSteps: t
@@ -8234,12 +8234,12 @@ const Ys = {
8234
8234
  columnNumber: 5
8235
8235
  }, void 0);
8236
8236
  return /* @__PURE__ */ p.jsxDEV(p.Fragment, { children: [
8237
- n && /* @__PURE__ */ p.jsxDEV(al, { children: o }, void 0, !1, {
8237
+ n && /* @__PURE__ */ p.jsxDEV(il, { children: o }, void 0, !1, {
8238
8238
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/FlowProgressTracker.tsx",
8239
8239
  lineNumber: 31,
8240
8240
  columnNumber: 9
8241
8241
  }, void 0),
8242
- r && /* @__PURE__ */ p.jsxDEV(il, { children: o }, void 0, !1, {
8242
+ r && /* @__PURE__ */ p.jsxDEV(sl, { children: o }, void 0, !1, {
8243
8243
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/FlowProgressTracker.tsx",
8244
8244
  lineNumber: 36,
8245
8245
  columnNumber: 9
@@ -8249,7 +8249,7 @@ const Ys = {
8249
8249
  lineNumber: 29,
8250
8250
  columnNumber: 5
8251
8251
  }, void 0);
8252
- }, al = y.div`
8252
+ }, il = y.div`
8253
8253
  display: none;
8254
8254
 
8255
8255
  @media (min-width: 768px) {
@@ -8257,7 +8257,7 @@ const Ys = {
8257
8257
  width: 500px;
8258
8258
  margin: 0 auto 25px;
8259
8259
  }
8260
- `, il = y.div`
8260
+ `, sl = y.div`
8261
8261
  display: block;
8262
8262
  position: absolute;
8263
8263
  bottom: 0;
@@ -8267,7 +8267,7 @@ const Ys = {
8267
8267
  @media (min-width: 768px) {
8268
8268
  display: none;
8269
8269
  }
8270
- `, sl = y.div`
8270
+ `, ll = y.div`
8271
8271
  width: 100%;
8272
8272
  height: 5px;
8273
8273
  background-color: ${(e) => {
@@ -8276,7 +8276,7 @@ const Ys = {
8276
8276
  }};
8277
8277
  border-radius: 0;
8278
8278
  overflow: hidden;
8279
- `, ll = y.div`
8279
+ `, cl = y.div`
8280
8280
  width: ${(e) => `calc((${e.$currentStep} / ${e.$totalSteps}) * 100%)`};
8281
8281
  height: 100%;
8282
8282
  background-color: ${(e) => {
@@ -8284,11 +8284,11 @@ const Ys = {
8284
8284
  return ((r = (t = e.theme) == null ? void 0 : t.colors) == null ? void 0 : r.ivimGreen) || "#85AF61";
8285
8285
  }};
8286
8286
  transition: width 0.3s ease-in-out;
8287
- `, cl = ({ flowForm: e, isPreview: t }) => {
8287
+ `, dl = ({ flowForm: e, isPreview: t }) => {
8288
8288
  if (!e || !e.form)
8289
8289
  return null;
8290
8290
  const r = /* @__PURE__ */ p.jsxDEV(
8291
- Al,
8291
+ jl,
8292
8292
  {
8293
8293
  form: e.form,
8294
8294
  isPreview: t
@@ -8307,7 +8307,7 @@ const Ys = {
8307
8307
  lineNumber: 25,
8308
8308
  columnNumber: 23
8309
8309
  }, void 0);
8310
- }, dl = ({ formComponent: e }) => {
8310
+ }, ul = ({ formComponent: e }) => {
8311
8311
  const t = e.props, { required: r, min: n, max: o, property: a, label: i = "Number Input", allowLeadingZero: s = !1 } = t || {}, l = 1, [d, c] = pt(""), m = (h) => {
8312
8312
  let { value: g } = h.target;
8313
8313
  s || (g = g.replace(/^0+/, "")), c(g);
@@ -8372,7 +8372,7 @@ const Ys = {
8372
8372
  var f;
8373
8373
  (f = g.form) != null && f.formComponents && g.form.formComponents.forEach((N) => {
8374
8374
  const R = N.componentId || "";
8375
- if (Rl[R]) {
8375
+ if (_l[R]) {
8376
8376
  const x = N.props, k = (x == null ? void 0 : x.property) || (x == null ? void 0 : x.propertyId) || (x == null ? void 0 : x.name) || (x == null ? void 0 : x.id);
8377
8377
  k && (h[k] = null);
8378
8378
  }
@@ -8393,7 +8393,7 @@ const Ys = {
8393
8393
  // Utilities
8394
8394
  generateFormDataFromFlow: c
8395
8395
  };
8396
- }, Bt = ({ errors: e }) => /* @__PURE__ */ p.jsxDEV(ul, { children: e.map((t, r) => /* @__PURE__ */ p.jsxDEV(ml, { children: t }, r, !1, {
8396
+ }, Bt = ({ errors: e }) => /* @__PURE__ */ p.jsxDEV(ml, { children: e.map((t, r) => /* @__PURE__ */ p.jsxDEV(hl, { children: t }, r, !1, {
8397
8397
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/visual/RenderError.tsx",
8398
8398
  lineNumber: 8,
8399
8399
  columnNumber: 17
@@ -8401,13 +8401,13 @@ const Ys = {
8401
8401
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/visual/RenderError.tsx",
8402
8402
  lineNumber: 6,
8403
8403
  columnNumber: 9
8404
- }, void 0), ul = y.div`
8404
+ }, void 0), ml = y.div`
8405
8405
  padding: 16px;
8406
8406
  background-color: #f5f5f5;
8407
8407
  border-radius: 8px;
8408
8408
  border: 1px solid #e0e0e0;
8409
8409
  margin: 8px 0;
8410
- `, ml = y.div`
8410
+ `, hl = y.div`
8411
8411
  font-family: 'Poppins', sans-serif;
8412
8412
  font-size: 14px;
8413
8413
  color: #666;
@@ -8507,7 +8507,7 @@ const Ys = {
8507
8507
  },
8508
8508
  void 0
8509
8509
  );
8510
- }, hl = ({ formComponent: e }) => {
8510
+ }, pl = ({ formComponent: e }) => {
8511
8511
  const t = e.props, { required: r, maxLength: n, propertyId: o, label: a = "Text Area Input" } = t || {}, [i, s] = pt(""), l = (d) => {
8512
8512
  const { value: c } = d.target;
8513
8513
  s(c);
@@ -8550,7 +8550,7 @@ const Ys = {
8550
8550
  columnNumber: 5
8551
8551
  }, void 0)
8552
8552
  );
8553
- }, pl = ({ formComponent: e }) => {
8553
+ }, fl = ({ formComponent: e }) => {
8554
8554
  const { getFlowValue: t, setFlowAndPatientValue: r } = tr(), n = e.props, { labelText: o, leftText: a, middleText: i, rightText: s, propertyId: l, required: d } = n || {}, c = t(l), m = (f) => {
8555
8555
  r(l, f);
8556
8556
  }, h = (f) => ({
@@ -8569,14 +8569,14 @@ const Ys = {
8569
8569
  Br,
8570
8570
  {
8571
8571
  $type: "symptomSurvey",
8572
- children: /* @__PURE__ */ p.jsxDEV(fl, { children: [
8572
+ children: /* @__PURE__ */ p.jsxDEV(bl, { children: [
8573
8573
  o && /* @__PURE__ */ p.jsxDEV(mo, { $color: "primary", $margin: "0px 0px 10px 0px", children: o }, void 0, !1, {
8574
8574
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/inputs/Scale.tsx",
8575
8575
  lineNumber: 77,
8576
8576
  columnNumber: 23
8577
8577
  }, void 0),
8578
- /* @__PURE__ */ p.jsxDEV(bl, { children: [
8579
- /* @__PURE__ */ p.jsxDEV(gl, { children: [
8578
+ /* @__PURE__ */ p.jsxDEV(gl, { children: [
8579
+ /* @__PURE__ */ p.jsxDEV(yl, { children: [
8580
8580
  a && /* @__PURE__ */ p.jsxDEV(br, { children: a }, void 0, !1, {
8581
8581
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/inputs/Scale.tsx",
8582
8582
  lineNumber: 80,
@@ -8597,8 +8597,8 @@ const Ys = {
8597
8597
  lineNumber: 79,
8598
8598
  columnNumber: 11
8599
8599
  }, void 0),
8600
- /* @__PURE__ */ p.jsxDEV(yl, { children: [1, 2, 3, 4, 5].map((f) => /* @__PURE__ */ p.jsxDEV(xl, { style: { display: "flex", flexDirection: "column", alignItems: "center" }, children: /* @__PURE__ */ p.jsxDEV(
8601
- $l,
8600
+ /* @__PURE__ */ p.jsxDEV(xl, { children: [1, 2, 3, 4, 5].map((f) => /* @__PURE__ */ p.jsxDEV($l, { style: { display: "flex", flexDirection: "column", alignItems: "center" }, children: /* @__PURE__ */ p.jsxDEV(
8601
+ wl,
8602
8602
  {
8603
8603
  $severity: f,
8604
8604
  $color: h(f),
@@ -8660,11 +8660,11 @@ y.h3`
8660
8660
  margin: 0;
8661
8661
  }
8662
8662
  `;
8663
- const fl = y.div`
8663
+ const bl = y.div`
8664
8664
  &&{
8665
8665
  margin-top: 15px;
8666
8666
  }
8667
- `, bl = y.div`
8667
+ `, gl = y.div`
8668
8668
  &&{
8669
8669
  background-color: ${(e) => e.theme.colors.neutral20};
8670
8670
  border-radius: 8px;
@@ -8673,7 +8673,7 @@ const fl = y.div`
8673
8673
  flex-direction: column;
8674
8674
  gap: 8px;
8675
8675
  }
8676
- `, gl = y.div`
8676
+ `, yl = y.div`
8677
8677
  &&{
8678
8678
  display: flex;
8679
8679
  justify-content: space-between;
@@ -8701,20 +8701,20 @@ const fl = y.div`
8701
8701
  text-align: right;
8702
8702
  }
8703
8703
  }
8704
- `, yl = y.div`
8704
+ `, xl = y.div`
8705
8705
  &&{
8706
8706
  display: flex;
8707
8707
  justify-content: space-between;
8708
8708
  gap: 8px;
8709
8709
  }
8710
- `, xl = y.div`
8710
+ `, $l = y.div`
8711
8711
  display: 'flex';
8712
8712
  flex-direction: 'column';
8713
8713
  align-items: 'center';
8714
8714
  width: 44px;
8715
8715
  max-width: 17%;
8716
8716
 
8717
- `, $l = y.button`
8717
+ `, wl = y.button`
8718
8718
  &&{
8719
8719
  width: 100%;
8720
8720
  height: 44px;
@@ -8742,14 +8742,14 @@ const fl = y.div`
8742
8742
  box-shadow: 0 0 0 2px ${(e) => e.theme.colors.primary}40;
8743
8743
  }
8744
8744
  }
8745
- `, wl = ({ formComponent: e }) => {
8745
+ `, vl = ({ formComponent: e }) => {
8746
8746
  const t = e.props;
8747
8747
  return t != null && t.text ? /* @__PURE__ */ p.jsxDEV(Ni, { $margin: "0px", $color: t.color, $align: t["text-align"], dangerouslySetInnerHTML: { __html: t.text } }, void 0, !1, {
8748
8748
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/visual/Header.tsx",
8749
8749
  lineNumber: 16,
8750
8750
  columnNumber: 5
8751
8751
  }, void 0) : null;
8752
- }, vl = ({ formComponent: e }) => {
8752
+ }, Cl = ({ formComponent: e }) => {
8753
8753
  const t = e.props;
8754
8754
  return t != null && t.src ? /* @__PURE__ */ p.jsxDEV(
8755
8755
  qi,
@@ -8769,7 +8769,7 @@ const fl = y.div`
8769
8769
  lineNumber: 13,
8770
8770
  columnNumber: 27
8771
8771
  }, void 0);
8772
- }, Cl = ({ formComponent: e }) => /* @__PURE__ */ p.jsxDEV(Sl, { children: /* @__PURE__ */ p.jsxDEV(Pl, { children: /* @__PURE__ */ p.jsxDEV(El, { children: /* @__PURE__ */ p.jsxDEV("svg", { width: "352", height: "243", viewBox: "0 0 352 243", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
8772
+ }, Sl = ({ formComponent: e }) => /* @__PURE__ */ p.jsxDEV(Pl, { children: /* @__PURE__ */ p.jsxDEV(El, { children: /* @__PURE__ */ p.jsxDEV(Vl, { children: /* @__PURE__ */ p.jsxDEV("svg", { width: "352", height: "243", viewBox: "0 0 352 243", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
8773
8773
  /* @__PURE__ */ p.jsxDEV("g", { "clip-path": "url(#clip0_356_13948)", children: [
8774
8774
  /* @__PURE__ */ p.jsxDEV("g", { "clip-path": "url(#clip1_356_13948)", children: [
8775
8775
  /* @__PURE__ */ p.jsxDEV("path", { d: "M351 195C151.369 195 32.4675 102 0 22V230H351V195Z", fill: "url(#paint0_linear_356_13948)" }, void 0, !1, {
@@ -8863,7 +8863,7 @@ const fl = y.div`
8863
8863
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/visual/WeightLossChart.tsx",
8864
8864
  lineNumber: 8,
8865
8865
  columnNumber: 5
8866
- }, void 0), Sl = y.div`
8866
+ }, void 0), Pl = y.div`
8867
8867
  && {
8868
8868
  display: flex;
8869
8869
  flex-direction: column;
@@ -8878,14 +8878,14 @@ const fl = y.div`
8878
8878
  padding: 0 5px;
8879
8879
  }
8880
8880
  }
8881
- `, Pl = y.div`
8881
+ `, El = y.div`
8882
8882
  && {
8883
8883
  position: relative;
8884
8884
  width: 100%;
8885
8885
  // height: 188px;
8886
8886
  // margin-bottom: 54px;
8887
8887
  }
8888
- `, El = y.div`
8888
+ `, Vl = y.div`
8889
8889
  && {
8890
8890
  position: relative;
8891
8891
  width: 100%;
@@ -8915,46 +8915,46 @@ Ao.textContent = `
8915
8915
  }
8916
8916
  `;
8917
8917
  document.head.appendChild(Ao);
8918
- const Vl = ({ formComponent: e }) => /* @__PURE__ */ p.jsxDEV("hr", { style: { height: "1px", border: "1px solid #D9D8D8", opacity: 1, margin: "20px 0" } }, void 0, !1, {
8918
+ const Ol = ({ formComponent: e }) => /* @__PURE__ */ p.jsxDEV("hr", { style: { height: "1px", border: "1px solid #D9D8D8", opacity: 1, margin: "20px 0" } }, void 0, !1, {
8919
8919
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/visual/Rule.tsx",
8920
8920
  lineNumber: 7,
8921
8921
  columnNumber: 5
8922
- }, void 0), Ol = ({ formComponent: e }) => {
8922
+ }, void 0), Nl = ({ formComponent: e }) => {
8923
8923
  var t;
8924
8924
  return (t = e.props) != null && t.text ? /* @__PURE__ */ p.jsxDEV(ki, { $margin: "0px", dangerouslySetInnerHTML: { __html: e.props.text } }, void 0, !1, {
8925
8925
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/visual/TextTip.tsx",
8926
8926
  lineNumber: 9,
8927
8927
  columnNumber: 5
8928
8928
  }, void 0) : null;
8929
- }, Nl = ({ formComponent: e }) => {
8929
+ }, kl = ({ formComponent: e }) => {
8930
8930
  const t = e.props;
8931
8931
  return t != null && t.text ? /* @__PURE__ */ p.jsxDEV(Ri, { $margin: "0px", $color: t.color, $align: t["text-align"], dangerouslySetInnerHTML: { __html: t.text } }, void 0, !1, {
8932
8932
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/visual/SmallText.tsx",
8933
8933
  lineNumber: 16,
8934
8934
  columnNumber: 5
8935
8935
  }, void 0) : null;
8936
- }, kl = ({ formComponent: e }) => {
8936
+ }, Rl = ({ formComponent: e }) => {
8937
8937
  const t = e.props;
8938
8938
  return t != null && t.text ? /* @__PURE__ */ p.jsxDEV(mo, { $margin: "0px", $color: t.color, $align: t["text-align"], dangerouslySetInnerHTML: { __html: t.text } }, void 0, !1, {
8939
8939
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/visual/Paragraph.tsx",
8940
8940
  lineNumber: 16,
8941
8941
  columnNumber: 5
8942
8942
  }, void 0) : null;
8943
- }, Rl = {
8943
+ }, _l = {
8944
8944
  number: "number",
8945
8945
  "number-input": "number",
8946
8946
  radio: "string",
8947
8947
  "radio-group": "string",
8948
8948
  checkbox: "array"
8949
- }, _l = {
8949
+ }, Dl = {
8950
8950
  // Visual components
8951
- header: wl,
8952
- image: vl,
8953
- "weight-loss-chart": Cl,
8954
- "horizontal-rule": Vl,
8955
- "text-tip": Ol,
8956
- "small-text": Nl,
8957
- paragraph: kl,
8951
+ header: vl,
8952
+ image: Cl,
8953
+ "weight-loss-chart": Sl,
8954
+ "horizontal-rule": Ol,
8955
+ "text-tip": Nl,
8956
+ "small-text": kl,
8957
+ paragraph: Rl,
8958
8958
  // 'description': DescriptionText, // To be implemented
8959
8959
  // 'html': HtmlBlock, // To be implemented
8960
8960
  // 'video': VideoBlock, // To be implemented
@@ -8964,9 +8964,9 @@ const Vl = ({ formComponent: e }) => /* @__PURE__ */ p.jsxDEV("hr", { style: { h
8964
8964
  checkbox: fr,
8965
8965
  radio: fr,
8966
8966
  "radio-group": fr,
8967
- number: dl,
8967
+ number: ul,
8968
8968
  // 'number-input': NumberInput,
8969
- scale: pl,
8969
+ scale: fl,
8970
8970
  // 'text-input': TextInputComponent,
8971
8971
  // Input components - to be implemented
8972
8972
  // 'text': TextInputComponent,
@@ -8977,7 +8977,7 @@ const Vl = ({ formComponent: e }) => /* @__PURE__ */ p.jsxDEV("hr", { style: { h
8977
8977
  // 'date': DateInput, // To be implemented
8978
8978
  // 'file': FileInput, // To be implemented
8979
8979
  // 'select': SelectInput, // To be implemented
8980
- textarea: hl
8980
+ textarea: pl
8981
8981
  // To be implemented
8982
8982
  // 'textRepeater': TextRepeaterInput, // To be implemented
8983
8983
  // 'phone': PhoneInput, // To be implemented
@@ -9010,9 +9010,9 @@ const Vl = ({ formComponent: e }) => /* @__PURE__ */ p.jsxDEV("hr", { style: { h
9010
9010
  return Object.keys(this.registry);
9011
9011
  }
9012
9012
  };
9013
- Wr.registry = { ..._l };
9013
+ Wr.registry = { ...Dl };
9014
9014
  let Dr = Wr;
9015
- const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 }) => {
9015
+ const Il = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 }) => {
9016
9016
  const o = (a) => {
9017
9017
  const i = a.componentId;
9018
9018
  if (!i)
@@ -9045,7 +9045,7 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9045
9045
  lineNumber: 29,
9046
9046
  columnNumber: 7
9047
9047
  }, void 0);
9048
- }, Il = (e, t) => {
9048
+ }, Tl = (e, t) => {
9049
9049
  const { operand: r, operator: n, value: o } = e, a = t(r), i = String(a || "").toLowerCase().trim(), s = String(o || "").toLowerCase().trim();
9050
9050
  switch (n) {
9051
9051
  case "==":
@@ -9096,12 +9096,12 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9096
9096
  default:
9097
9097
  return console.warn("Unknown operator:", n), !1;
9098
9098
  }
9099
- }, Tl = (e, t) => !e || !e.conditions || e.conditions.length === 0 ? !0 : e.conditions.some((r) => r.every((n) => Il(n, t))), Ml = (e, t) => (e && console.warn("evaluateCondition is deprecated. Use evaluateConditionWithFlowStore with the flow store instead."), !0), jo = () => {
9099
+ }, Al = (e, t) => !e || !e.conditions || e.conditions.length === 0 ? !0 : e.conditions.some((r) => r.every((n) => Tl(n, t))), Ml = (e, t) => (e && console.warn("evaluateCondition is deprecated. Use evaluateConditionWithFlowStore with the flow store instead."), !0), jo = () => {
9100
9100
  const { getPatientValue: e } = tr();
9101
9101
  return {
9102
- evaluateCondition: Ir(() => (r) => Tl(r, e), [e])
9102
+ evaluateCondition: Ir(() => (r) => Al(r, e), [e])
9103
9103
  };
9104
- }, Al = ({ form: e, isPreview: t }) => {
9104
+ }, jl = ({ form: e, isPreview: t }) => {
9105
9105
  const { evaluateCondition: r } = jo(), o = Ir(() => {
9106
9106
  var i;
9107
9107
  return ((i = e.formComponents) == null ? void 0 : i.map((s) => {
@@ -9117,7 +9117,7 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9117
9117
  return /* @__PURE__ */ p.jsxDEV(p.Fragment, { children: o.map((i, s) => {
9118
9118
  const l = s === 0 ? "first" : a === s + 1 ? "last" : null, d = i.isVisible;
9119
9119
  return /* @__PURE__ */ p.jsxDEV(
9120
- Dl,
9120
+ Il,
9121
9121
  {
9122
9122
  formComponent: i,
9123
9123
  isPreview: t,
@@ -9138,9 +9138,9 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9138
9138
  lineNumber: 32,
9139
9139
  columnNumber: 5
9140
9140
  }, void 0);
9141
- }, jl = y.form`
9141
+ }, Fl = y.form`
9142
9142
  padding: 20px 0px 20px;
9143
- `, Fo = ({ children: e, $bgColor: t }) => /* @__PURE__ */ p.jsxDEV(et, { $overflow: "hidden", $position: "static", $xSmall: !0, id: "MainFlowContainer", $bgColor: t || "white", $bRad: "0px", $marginBottom: "0px", $marginBottomMd: "0px", children: /* @__PURE__ */ p.jsxDEV(jl, { children: e }, void 0, !1, {
9143
+ `, Fo = ({ children: e, $bgColor: t }) => /* @__PURE__ */ p.jsxDEV(et, { $overflow: "hidden", $position: "static", $xSmall: !0, id: "MainFlowContainer", $bgColor: t || "white", $bRad: "0px", $marginBottom: "0px", $marginBottomMd: "0px", children: /* @__PURE__ */ p.jsxDEV(Fl, { children: e }, void 0, !1, {
9144
9144
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/FormWrapper.tsx",
9145
9145
  lineNumber: 18,
9146
9146
  columnNumber: 7
@@ -9148,7 +9148,7 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9148
9148
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/FormWrapper.tsx",
9149
9149
  lineNumber: 17,
9150
9150
  columnNumber: 5
9151
- }, void 0), Fl = ({ flow: e, isPreview: t, $bgColor: r }) => {
9151
+ }, void 0), Ul = ({ flow: e, isPreview: t, $bgColor: r }) => {
9152
9152
  var g;
9153
9153
  const [n, o] = pt(0), { evaluateCondition: a } = jo(), i = ((g = e.flowForms) == null ? void 0 : g.filter((f) => f.condition ? a(f.condition) : !0)) || [], s = i.length, l = i[n];
9154
9154
  if (!l) return null;
@@ -9159,7 +9159,7 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9159
9159
  };
9160
9160
  return console.log(l.bgColor), /* @__PURE__ */ p.jsxDEV(Li, { children: [
9161
9161
  /* @__PURE__ */ p.jsxDEV(
9162
- ol,
9162
+ al,
9163
9163
  {
9164
9164
  currentStep: n + 1,
9165
9165
  totalSteps: s,
@@ -9196,7 +9196,7 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9196
9196
  columnNumber: 7
9197
9197
  }, void 0),
9198
9198
  /* @__PURE__ */ p.jsxDEV(Fo, { $bgColor: l.bgColor, children: /* @__PURE__ */ p.jsxDEV(
9199
- cl,
9199
+ dl,
9200
9200
  {
9201
9201
  flowForm: l,
9202
9202
  isPreview: t
@@ -9247,14 +9247,14 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9247
9247
  lineNumber: 50,
9248
9248
  columnNumber: 5
9249
9249
  }, void 0);
9250
- }, Ul = ({ data: e, config: t, isPreview: r }) => {
9250
+ }, Hl = ({ data: e, config: t, isPreview: r }) => {
9251
9251
  const { setFlowValues: n, generateFormDataFromFlow: o, setPatientValues: a } = tr();
9252
9252
  return Tr(() => {
9253
9253
  a(e);
9254
9254
  const i = o(t);
9255
9255
  n(i);
9256
9256
  }, [e, t, a, n, o]), /* @__PURE__ */ p.jsxDEV(
9257
- Fl,
9257
+ Ul,
9258
9258
  {
9259
9259
  flow: t,
9260
9260
  isPreview: r
@@ -9277,8 +9277,8 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9277
9277
  ]).then(([c, m]) => {
9278
9278
  console.warn({ config: c, data: m, detail: "NetworkAwareWrapper" }), l({ config: c, data: m });
9279
9279
  });
9280
- }, []), s.config ? /* @__PURE__ */ p.jsxDEV(Gn, { store: To, children: /* @__PURE__ */ p.jsxDEV(
9281
- Ul,
9280
+ }, []), s.config ? /* @__PURE__ */ p.jsxDEV(Gn, { store: To, children: /* @__PURE__ */ p.jsxDEV(ol, { children: /* @__PURE__ */ p.jsxDEV(
9281
+ Hl,
9282
9282
  {
9283
9283
  data: s.data,
9284
9284
  isPreview: !1,
@@ -9288,30 +9288,34 @@ const Dl = ({ formComponent: e, isPreview: t, boundary: r, isVisible: n = !0 })
9288
9288
  !1,
9289
9289
  {
9290
9290
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/NetworkAwareWrapper.tsx",
9291
- lineNumber: 35,
9292
- columnNumber: 9
9291
+ lineNumber: 37,
9292
+ columnNumber: 13
9293
9293
  },
9294
9294
  void 0
9295
9295
  ) }, void 0, !1, {
9296
9296
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/NetworkAwareWrapper.tsx",
9297
- lineNumber: 34,
9297
+ lineNumber: 36,
9298
+ columnNumber: 9
9299
+ }, void 0) }, void 0, !1, {
9300
+ fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/NetworkAwareWrapper.tsx",
9301
+ lineNumber: 35,
9298
9302
  columnNumber: 12
9299
9303
  }, void 0) : /* @__PURE__ */ p.jsxDEV(p.Fragment, { children: r }, void 0, !1, {
9300
9304
  fileName: "/Users/lnorris/github.com/Ivim-Health/ivim/libs/browser/formidavim/src/lib/components/NetworkAwareWrapper.tsx",
9301
- lineNumber: 31,
9305
+ lineNumber: 32,
9302
9306
  columnNumber: 16
9303
9307
  }, void 0);
9304
9308
  };
9305
9309
  export {
9306
9310
  Dr as ComponentFactory,
9307
- cl as FlowFormRenderer,
9308
- ol as FlowProgressTracker,
9309
- Fl as FlowRenderer,
9310
- Dl as FormComponentRenderer,
9311
- Al as FormRenderer,
9311
+ dl as FlowFormRenderer,
9312
+ al as FlowProgressTracker,
9313
+ Ul as FlowRenderer,
9314
+ Il as FormComponentRenderer,
9315
+ jl as FormRenderer,
9312
9316
  Fo as FormWrapper,
9313
9317
  Ql as NetworkAwareWrapper,
9314
- Ul as Renderer,
9315
- Bl as RendererWrapper,
9318
+ Hl as Renderer,
9319
+ ol as RendererWrapper,
9316
9320
  Ml as evaluateCondition
9317
9321
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hievilmath/browser-formidavim",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "main": "./index.js",
5
5
  "module": "./index.mjs",
6
6
  "typings": "./index.d.ts",
@@ -11,6 +11,7 @@
11
11
  "axios": "*",
12
12
  "react": "*",
13
13
  "react-redux": "*",
14
- "react-router-dom": "*"
14
+ "react-router-dom": "*",
15
+ "styled-components": "*"
15
16
  }
16
17
  }