@socotra/ec-react-components 2.4.0 → 2.4.1-next.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/dist/index.es.js CHANGED
@@ -10424,7 +10424,7 @@ var IQ = [
10424
10424
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ ce.jsx(l, { ...u, ref: a });
10425
10425
  });
10426
10426
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
10427
- }, {}), Mm = "Switch", [wQ, boe] = pc(Mm), [EQ, $Q] = wQ(Mm), $I = le.forwardRef(
10427
+ }, {}), Mm = "Switch", [wQ, _oe] = pc(Mm), [EQ, $Q] = wQ(Mm), $I = le.forwardRef(
10428
10428
  (e, t) => {
10429
10429
  const {
10430
10430
  __scopeSwitch: r,
@@ -16499,7 +16499,7 @@ function Bne(e) {
16499
16499
  const t = le.useContext(Gne);
16500
16500
  return e || t || "ltr";
16501
16501
  }
16502
- var Kn = "Accordion", jne = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [Xm, Wne, Vne] = xne(Kn), [gc, _oe] = pc(Kn, [
16502
+ var Kn = "Accordion", jne = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [Xm, Wne, Vne] = xne(Kn), [gc, Aoe] = pc(Kn, [
16503
16503
  Vne,
16504
16504
  Iw
16505
16505
  ]), Um = Iw(), Tw = Z.forwardRef(
@@ -20915,7 +20915,7 @@ g.object({
20915
20915
  billingTrigger: jie,
20916
20916
  createdAt: g.string().optional(),
20917
20917
  createdBy: g.string().optional(),
20918
- currency: g.string().optional(),
20918
+ currency: g.string(),
20919
20919
  timezone: g.string().optional(),
20920
20920
  branchHeadTransactionLocators: g.array(g.string()).optional(),
20921
20921
  static: g.record(g.any()).optional(),
@@ -20951,7 +20951,7 @@ const rE = g.enum([
20951
20951
  locator: g.string(),
20952
20952
  staticName: g.string().optional(),
20953
20953
  name: g.string().optional(),
20954
- state: eg,
20954
+ documentInstanceState: eg,
20955
20955
  referenceType: Qm
20956
20956
  }), Zie = g.object({
20957
20957
  locator: g.string(),
@@ -20987,22 +20987,21 @@ const zie = g.object({
20987
20987
  name: g.string(),
20988
20988
  state: eg,
20989
20989
  referenceType: Qm
20990
- });
20991
- g.object({
20990
+ }), Xie = g.object({
20992
20991
  locator: g.string(),
20993
20992
  staticLocator: g.string(),
20994
20993
  type: g.string(),
20995
20994
  chargeSummaries: g.record(g.number()),
20996
20995
  data: g.record(g.any())
20997
- });
20998
- const Xie = g.object({
20996
+ }), Uie = g.object({
20999
20997
  locator: g.string(),
21000
20998
  startTime: g.string(),
21001
20999
  endTime: g.string(),
21002
21000
  duration: g.number(),
21003
21001
  basedOn: g.string(),
21004
21002
  type: g.enum(["coverage", "gap"]),
21005
- documentSummary: zie.array()
21003
+ documentSummary: zie.array(),
21004
+ elements: Xie.array()
21006
21005
  }), aE = g.object({
21007
21006
  locator: g.string(),
21008
21007
  staticLocator: g.string(),
@@ -21020,7 +21019,7 @@ aE.extend({
21020
21019
  duration: g.number(),
21021
21020
  durationBasis: ag,
21022
21021
  termNumber: g.number().int(),
21023
- subsegments: Xie.array()
21022
+ subsegments: Uie.array()
21024
21023
  });
21025
21024
  g.object({
21026
21025
  locator: g.string(),
@@ -21052,11 +21051,11 @@ g.object({
21052
21051
  processingErrors: g.string().optional(),
21053
21052
  readyAt: g.string().optional()
21054
21053
  });
21055
- const Uie = g.object({
21054
+ const Yie = g.object({
21056
21055
  locator: g.string(),
21057
21056
  action: g.literal("add"),
21058
21057
  elements: g.array(Die)
21059
- }), Yie = g.object({
21058
+ }), Jie = g.object({
21060
21059
  locator: g.string(),
21061
21060
  staticLocator: g.string(),
21062
21061
  action: g.literal("modify"),
@@ -21064,7 +21063,7 @@ const Uie = g.object({
21064
21063
  removeData: g.record(g.string(), g.any()),
21065
21064
  setCoverageTerms: g.record(g.string(), g.string()),
21066
21065
  setData: g.record(g.string(), g.any())
21067
- }), Jie = g.object({
21066
+ }), qie = g.object({
21068
21067
  locator: g.string(),
21069
21068
  action: g.literal("params"),
21070
21069
  effectiveTime: g.string(),
@@ -21075,11 +21074,11 @@ const Uie = g.object({
21075
21074
  newPolicyEndTime: g.string().optional(),
21076
21075
  preferences: Km.optional(),
21077
21076
  triggerBillingChange: g.boolean().optional()
21078
- }), qie = g.object({
21077
+ }), Kie = g.object({
21079
21078
  locator: g.string(),
21080
21079
  action: g.literal("delete"),
21081
21080
  staticElementLocators: g.array(g.string())
21082
- }), Kie = g.enum([
21081
+ }), Qie = g.enum([
21083
21082
  "draft",
21084
21083
  "initialized",
21085
21084
  "validated",
@@ -21099,7 +21098,7 @@ const Uie = g.object({
21099
21098
  locator: g.string(),
21100
21099
  policyLocator: g.string(),
21101
21100
  termLocator: g.string(),
21102
- transactionState: Kie,
21101
+ transactionState: Qie,
21103
21102
  createdAt: g.string().datetime(),
21104
21103
  createdBy: g.string().uuid(),
21105
21104
  effectiveTime: g.string().datetime(),
@@ -21107,10 +21106,10 @@ const Uie = g.object({
21107
21106
  transactionType: g.string(),
21108
21107
  changeInstructions: g.array(
21109
21108
  g.union([
21110
- Uie,
21111
21109
  Yie,
21112
21110
  Jie,
21113
- qie
21111
+ qie,
21112
+ Kie
21114
21113
  ])
21115
21114
  ).optional(),
21116
21115
  aggregateTransactionLocator: g.string().optional(),
@@ -21289,15 +21288,15 @@ const Ws = (e) => {
21289
21288
  properties: p
21290
21289
  };
21291
21290
  };
21292
- var Qie = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
21293
- function eoe(e) {
21291
+ var eoe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
21292
+ function toe(e) {
21294
21293
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
21295
21294
  }
21296
21295
  var iE = { exports: {} };
21297
21296
  (function(e, t) {
21298
21297
  (function(r, n) {
21299
21298
  e.exports = n();
21300
- })(Qie, function() {
21299
+ })(eoe, function() {
21301
21300
  var r = 1e3, n = 6e4, a = 36e5, s = "millisecond", u = "second", l = "minute", d = "hour", f = "day", p = "week", m = "month", v = "quarter", I = "year", w = "date", E = "Invalid Date", A = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, b = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, _ = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(ie) {
21302
21301
  var J = ["th", "st", "nd", "rd"], K = ie % 100;
21303
21302
  return "[" + ie + (J[(K - 20) % 10] || J[K] || J[0]) + "]";
@@ -21569,8 +21568,8 @@ var iE = { exports: {} };
21569
21568
  }, Q.en = W[F], Q.Ls = W, Q.p = {}, Q;
21570
21569
  });
21571
21570
  })(iE);
21572
- var toe = iE.exports;
21573
- const Di = /* @__PURE__ */ eoe(toe), roe = ({ data: e }) => {
21571
+ var roe = iE.exports;
21572
+ const Di = /* @__PURE__ */ toe(roe), noe = ({ data: e }) => {
21574
21573
  const t = {}, r = structuredClone(e);
21575
21574
  return r.default && (r.default.startTime && (t.startTime = Di(r.default.startTime).format()), r.default.endTime && (t.endTime = Di(r.default.endTime).format()), r.default.expirationTime && (t.expirationTime = Di(r.default.expirationTime).format())), r.advanced && (r.advanced.currency && (t.currency = r.advanced.currency), r.advanced.timezone && (t.timezone = r.advanced.timezone), r.advanced.billingPlan && (t.billingPlan = r.advanced.billingPlan), r.advanced.defaultTermDuration && (t.defaultTermDuration = r.advanced.defaultTermDuration), r.advanced.installmentPlan && (t.installmentPlan = r.advanced.installmentPlan), r.advanced.durationBasis && (t.durationBasis = r.advanced.durationBasis), r.advanced.delinquencyPlanName && (t.delinquencyPlanName = r.advanced.delinquencyPlanName)), r.coverageTerms && (t.setCoverageTerms = e.coverageTerms), delete r.coverageTerms, delete r.default, delete r.advanced, t.setData = r, t;
21576
21575
  };
@@ -21624,13 +21623,13 @@ const oE = ({
21624
21623
  coverageTermOptions: ((s = e == null ? void 0 : e.element) == null ? void 0 : s.coverageTerms) ?? {}
21625
21624
  })
21626
21625
  };
21627
- }, noe = (e, t) => ({
21626
+ }, aoe = (e, t) => ({
21628
21627
  ...e.data,
21629
21628
  coverageTerms: oE({
21630
21629
  coverageTermOptions: e.coverageTerms ?? {},
21631
21630
  coverageTermDataModel: t
21632
21631
  })
21633
- }), aoe = (e) => {
21632
+ }), ioe = (e) => {
21634
21633
  var t;
21635
21634
  e = e ?? "";
21636
21635
  const r = e.replace(/\?|\*|!|\+/g, ""), n = (t = e.match(/\?|\*|!|\+/g)) == null ? void 0 : t.pop();
@@ -21845,8 +21844,8 @@ var Fp = { exports: {} };
21845
21844
  };
21846
21845
  t.default = E, e.exports = E, e.exports.default = E;
21847
21846
  })(Fp, Fp.exports);
21848
- var ioe = Fp.exports;
21849
- const Cc = /* @__PURE__ */ nt(ioe);
21847
+ var ooe = Fp.exports;
21848
+ const Cc = /* @__PURE__ */ nt(ooe);
21850
21849
  var jl = { exports: {} };
21851
21850
  /**
21852
21851
  * @license
@@ -25597,7 +25596,7 @@ const sE = ({
25597
25596
  }
25598
25597
  );
25599
25598
  Ic.displayName = "Button";
25600
- const ooe = {
25599
+ const soe = {
25601
25600
  title: "",
25602
25601
  type: "object",
25603
25602
  definitions: {},
@@ -25746,7 +25745,7 @@ const ooe = {
25746
25745
  });
25747
25746
  Cc(Ga);
25748
25747
  Ms(Ga);
25749
- const soe = ({
25748
+ const uoe = ({
25750
25749
  accountsModel: e,
25751
25750
  accountType: t,
25752
25751
  dataTypes: r,
@@ -25776,7 +25775,7 @@ const soe = ({
25776
25775
  a && !l && (L([]), A({ ...w }));
25777
25776
  }, [a, p, l, w]);
25778
25777
  const F = Oe(() => {
25779
- const ae = { ...ooe }, ee = ae.properties ?? {};
25778
+ const ae = { ...soe }, ee = ae.properties ?? {};
25780
25779
  ee.autoRenewalPlanName.enum = (n == null ? void 0 : n.autoRenewalPlans) ?? [], ee.delinquencyPlanName.enum = (n == null ? void 0 : n.delinquencyPlans) ?? [], ee.excessCreditPlanName.enum = (n == null ? void 0 : n.excessCreditPlans) ?? [], ee.shortfallTolerancePlanName.enum = (n == null ? void 0 : n.shortfallTolerancePlans) ?? [], ee.invoiceDocument.enum = (n == null ? void 0 : n.invoiceDocument) ?? [];
25781
25780
  const ge = ["no option"];
25782
25781
  return Object.keys(ee).forEach((ie) => {
@@ -25871,7 +25870,7 @@ const soe = ({
25871
25870
  }
25872
25871
  ) });
25873
25872
  };
25874
- soe.displayName = "AccountForm";
25873
+ uoe.displayName = "AccountForm";
25875
25874
  const cE = (e, t) => {
25876
25875
  const r = {
25877
25876
  title: "Coverages",
@@ -25881,7 +25880,7 @@ const cE = (e, t) => {
25881
25880
  properties: {}
25882
25881
  };
25883
25882
  return e.forEach((n) => {
25884
- const a = aoe(n).name;
25883
+ const a = ioe(n).name;
25885
25884
  if (!t[a])
25886
25885
  return;
25887
25886
  const s = t[a], u = s.options, l = {
@@ -25892,7 +25891,7 @@ const cE = (e, t) => {
25892
25891
  };
25893
25892
  r.properties && !r.properties[a] && (r.properties[a] = l), r.required && !r.required.includes(a) && r.required.push(a);
25894
25893
  }), r;
25895
- }, uoe = (e) => {
25894
+ }, loe = (e) => {
25896
25895
  const t = ["-"], r = Object.keys(e.delinquencyPlans), n = r.length ? r : t, a = Object.keys(e.autoRenewalPlans), s = a.length ? a : t;
25897
25896
  return {
25898
25897
  Advanced: {
@@ -25941,7 +25940,7 @@ const cE = (e, t) => {
25941
25940
  }
25942
25941
  }
25943
25942
  };
25944
- }, loe = {
25943
+ }, coe = {
25945
25944
  Default: {
25946
25945
  title: "",
25947
25946
  type: "object",
@@ -25970,7 +25969,7 @@ const cE = (e, t) => {
25970
25969
  });
25971
25970
  Cc(Ba);
25972
25971
  Ms(Ba);
25973
- const coe = ({
25972
+ const doe = ({
25974
25973
  quote: e,
25975
25974
  dataModel: t,
25976
25975
  dataTypes: r,
@@ -25984,7 +25983,7 @@ const coe = ({
25984
25983
  id: p
25985
25984
  }) => {
25986
25985
  const m = Oe(() => t.products[e.productName], [t, e.productName]), v = Oe(
25987
- () => uoe(t),
25986
+ () => loe(t),
25988
25987
  [t]
25989
25988
  ), [I, w] = Ot(
25990
25989
  z_(e, m, t)
@@ -26004,7 +26003,7 @@ const coe = ({
26004
26003
  );
26005
26004
  N.definitions = {
26006
26005
  ...N.definitions,
26007
- ...loe,
26006
+ ...coe,
26008
26007
  ...v,
26009
26008
  coverageTerms: cE(
26010
26009
  m.coverageTerms ?? [],
@@ -26037,7 +26036,7 @@ const coe = ({
26037
26036
  return;
26038
26037
  } else
26039
26038
  _([]);
26040
- const ae = roe({
26039
+ const ae = noe({
26041
26040
  data: I
26042
26041
  });
26043
26042
  return a(ae), I;
@@ -26117,13 +26116,13 @@ const coe = ({
26117
26116
  }
26118
26117
  ) });
26119
26118
  };
26120
- coe.displayName = "QuoteForm";
26119
+ doe.displayName = "QuoteForm";
26121
26120
  const ja = new Ds({
26122
26121
  allErrors: !0
26123
26122
  });
26124
26123
  Cc(ja);
26125
26124
  Ms(ja);
26126
- const doe = ({
26125
+ const foe = ({
26127
26126
  elementModel: e,
26128
26127
  dataTypes: t,
26129
26128
  disabled: r,
@@ -26138,7 +26137,7 @@ const doe = ({
26138
26137
  id: m
26139
26138
  }) => {
26140
26139
  const [v, I] = Ot(
26141
- noe(d, a)
26140
+ aoe(d, a)
26142
26141
  ), [w, E] = Ot(!1), [A, b] = Ot();
26143
26142
  fn(() => {
26144
26143
  r && !u && (b([]), I(
@@ -26246,8 +26245,8 @@ const doe = ({
26246
26245
  }
26247
26246
  ) });
26248
26247
  };
26249
- doe.displayName = "ElementForm";
26250
- const foe = () => ({
26248
+ foe.displayName = "ElementForm";
26249
+ const poe = () => ({
26251
26250
  title: "",
26252
26251
  type: "object",
26253
26252
  definitions: {},
@@ -26287,7 +26286,7 @@ const foe = () => ({
26287
26286
  });
26288
26287
  Cc(ig);
26289
26288
  Ms(ig);
26290
- const poe = (e, t) => ({
26289
+ const hoe = (e, t) => ({
26291
26290
  data: (t == null ? void 0 : t.data) ?? {},
26292
26291
  currency: e.currency,
26293
26292
  timezone: e.timezone,
@@ -26296,7 +26295,7 @@ const poe = (e, t) => ({
26296
26295
  billingTrigger: e.billingTrigger,
26297
26296
  autoRenewalPlanName: e.autoRenewalPlanName,
26298
26297
  delinquencyPlanName: e.delinquencyPlanName
26299
- }), hoe = ({
26298
+ }), moe = ({
26300
26299
  policy: e,
26301
26300
  segment: t,
26302
26301
  dataModel: r,
@@ -26304,9 +26303,9 @@ const poe = (e, t) => ({
26304
26303
  title: a
26305
26304
  }) => {
26306
26305
  const s = Oe(() => r.products[e.productName], [r, e.productName]), u = r.dataTypes, l = t.element, d = Oe(
26307
- () => poe(e, l),
26306
+ () => hoe(e, l),
26308
26307
  [e, l]
26309
- ), f = Oe(() => foe(), []), p = Ws({
26308
+ ), f = Oe(() => poe(), []), p = Ws({
26310
26309
  data: s.data ?? {},
26311
26310
  dataTypes: u,
26312
26311
  scope: ["P"],
@@ -26340,11 +26339,11 @@ const poe = (e, t) => ({
26340
26339
  }
26341
26340
  ) }) });
26342
26341
  };
26343
- hoe.displayName = "PolicyForm";
26342
+ moe.displayName = "PolicyForm";
26344
26343
  export {
26345
- soe as AccountForm,
26346
- doe as ElementForm,
26347
- hoe as PolicyForm,
26348
- coe as QuoteForm
26344
+ uoe as AccountForm,
26345
+ foe as ElementForm,
26346
+ moe as PolicyForm,
26347
+ doe as QuoteForm
26349
26348
  };
26350
26349
  //# sourceMappingURL=index.es.js.map