expedite-components 0.5.11 → 0.5.13

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.
@@ -2070,8 +2070,9 @@ const wi = {
2070
2070
  };
2071
2071
  });
2072
2072
  function xc(e) {
2073
- return e.offerData.pricingTypes.forEach((o) => {
2074
- o.appliedOnField === "Catalog Price" ? (e.catalogPrice = o, e.salesPrice = o.offerPrice, e.price = o.offerPrice) : o.appliedOnField === "MRC" ? (e.mrcPrice = o, e.mrc = o.offerPrice) : o.appliedOnField === "YRC" && (e.yrcPrice = o, e.yrc = o.offerPrice);
2073
+ var o;
2074
+ return e.offerData && ((o = e.offerData) == null ? void 0 : o.pricingTypes.length) > 0 && e.offerData.pricingTypes.forEach((t) => {
2075
+ t.appliedOnField === "Catalog Price" ? (e.catalogPrice = t, e.salesPrice = t.offerPrice, e.price = t.offerPrice) : t.appliedOnField === "MRC" ? (e.mrcPrice = t, e.mrc = t.offerPrice) : t.appliedOnField === "YRC" && (e.yrcPrice = t, e.yrc = t.offerPrice);
2075
2076
  }), e;
2076
2077
  }
2077
2078
  function _c(e) {
@@ -4146,7 +4147,7 @@ const St = st("comConfigurator", () => {
4146
4147
  }), W.affectedOptions.forEach((ie) => {
4147
4148
  K.add(ie);
4148
4149
  });
4149
- }), console.info("rulesByPublishKey", K), D(H), H.categoryOptions.forEach((ne) => {
4150
+ }), console.info("rulesByPublishKey", K), H.categoryOptions || (H.categoryOptions = []), D(H), H.categoryOptions.forEach((ne) => {
4150
4151
  ne.key = ne.category.toLowerCase().replace(/\s+/g, "-").replace(/[&]/g, ""), ne.itemTypes.forEach((W) => {
4151
4152
  W.selected = [], W.numberOfColumns || (W.numberOfColumns = 1), W.numberOfColumns > 1 && (W.lightboxAttributes = !0), W.maxNumber || (W.maxNumber = 100), W.minNumber || (W.minNumber = 0), W.maxQuantity || (W.maxQuantity = 1e4), W.minQuantity || (W.minQuantity = 1), W.maxNumber === 1 ? (W.isRadio = !0, W.minMessage = "Please select 1 option", W.maxMessage = "", W.isKit = W.options.some((ie) => ie.relationshipInfo.relationship === "Kit")) : (W.minMessage = `Minimum of ${W.minNumber} selection${W.minNumber !== 1 ? "s" : ""} required`, W.maxMessage = `Maximum of ${W.maxNumber} selection${W.maxNumber !== 1 ? "s" : ""} allowed`), W.options.forEach((ie) => {
4152
4153
  ne.showImage = ne.showImage || !!ie.defaultImageURL, ie.showAttributesModal = !1, ie.calculateRules = K.has("option." + ie.publishKey) || ie.relationshipInfo.pricingRuleFormula, ie.qty = W.minQuantity || 1, ie.getTags = () => (ie.attributes = ie.attributes || [], ie.attributes.filter((ce) => ce.value !== null && ce.value !== "").map((ce) => ({
@@ -20012,7 +20013,7 @@ const J9 = /* @__PURE__ */ Ie(Q9, [["render", W9], ["__scopeId", "data-v-b36acc6
20012
20013
  ]))
20013
20014
  ], 8, Th));
20014
20015
  }
20015
- }, Lh = (e) => (yt("data-v-4cc9ff27"), e = e(), xt(), e), Nh = /* @__PURE__ */ Lh(() => /* @__PURE__ */ b("div", { class: "dropdowntp" }, null, -1)), Fh = {
20016
+ }, Lh = (e) => (yt("data-v-85023da5"), e = e(), xt(), e), Nh = /* @__PURE__ */ Lh(() => /* @__PURE__ */ b("div", { class: "dropdowntp" }, null, -1)), Fh = {
20016
20017
  __name: "ExpediteConfigurator",
20017
20018
  props: {
20018
20019
  setupData: {
@@ -20047,35 +20048,38 @@ const J9 = /* @__PURE__ */ Ie(Q9, [["render", W9], ["__scopeId", "data-v-b36acc6
20047
20048
  const n = kt(), r = St(), s = e, d = o, g = () => {
20048
20049
  d("ready", r.exposeProperties());
20049
20050
  };
20051
+ function m(c) {
20052
+ if (r.isChangedConfiguration)
20053
+ return c.preventDefault(), c.returnValue = "", "";
20054
+ }
20050
20055
  return yn(() => {
20051
- console.info("!!!!!!!!!!!!!!!!!!ExpediteConfigurator onBeforemount!!!!!!!!!!!!!!");
20052
- const { orgType: m, orgId: c, userId: l } = s.setupData;
20053
- t.quoteId = s.quoteId, t.setSetupData(s.setupData, s.securityContext), r.initializeController(m, c, l);
20056
+ const { orgType: c, orgId: l, userId: x } = s.setupData;
20057
+ t.quoteId = s.quoteId, t.setSetupData(s.setupData, s.securityContext), r.initializeController(c, l, x), window.addEventListener("beforeunload", m);
20054
20058
  }), Br(() => {
20055
- console.info("!!!!!!!!!!!!!!!!!!ExpediteConfigurator onBeforeUnmount!!!!!!!!!!!!!!");
20056
- }), (m, c) => ($(), X(xe, null, [
20059
+ window.removeEventListener("beforeunload", m);
20060
+ }), (c, l) => ($(), X(xe, null, [
20057
20061
  de(cu),
20058
20062
  de(_o),
20059
20063
  Oe(n).errorPopup ? ($(), _e(Ws, {
20060
20064
  key: 0,
20061
20065
  data: Oe(n).errorPopup,
20062
- onClose: c[0] || (c[0] = (l) => Oe(n).errorPopup = null)
20066
+ onClose: l[0] || (l[0] = (x) => Oe(n).errorPopup = null)
20063
20067
  }, null, 8, ["data"])) : ue("", !0),
20064
20068
  Oe(r).message ? ($(), _e(nu, {
20065
20069
  key: 1,
20066
20070
  message: Oe(r).message,
20067
- onClose: c[1] || (c[1] = (l) => Oe(r).message = null)
20071
+ onClose: l[1] || (l[1] = (x) => Oe(r).message = null)
20068
20072
  }, null, 8, ["message"])) : ue("", !0),
20069
20073
  Nh,
20070
20074
  de(Rh, {
20071
20075
  "item-id": s.itemId,
20072
20076
  "qli-id": s.qliId,
20073
20077
  onReady: g,
20074
- onAction: c[2] || (c[2] = (l) => d("action", l))
20078
+ onAction: l[2] || (l[2] = (x) => d("action", x))
20075
20079
  }, null, 8, ["item-id", "qli-id"])
20076
20080
  ], 64));
20077
20081
  }
20078
- }, Gl = /* @__PURE__ */ Ie(Fh, [["__scopeId", "data-v-4cc9ff27"]]), Ph = st("mygpt", () => {
20082
+ }, Gl = /* @__PURE__ */ Ie(Fh, [["__scopeId", "data-v-85023da5"]]), Ph = st("mygpt", () => {
20079
20083
  const e = Y("");
20080
20084
  async function o(n, r = "gpt-3.5-turbo", s = 300) {
20081
20085
  var d, g, m;