@expedite-commerce/expedite-components 0.2.134 → 0.2.135

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.
@@ -37328,18 +37328,25 @@ const gE = ["innerHTML"], vE = {
37328
37328
  });
37329
37329
  });
37330
37330
  const p = fe(() => {
37331
- var h;
37332
- return (h = a.chatStyles) == null ? void 0 : h.bgColor;
37331
+ var v;
37332
+ return (v = a.chatStyles) == null ? void 0 : v.bgColor;
37333
37333
  }), u = fe(() => `linear-gradient(180deg, ${p.value} 0%, transparent 100%)`), m = fe(() => {
37334
- var h;
37335
- return (h = a.chatStyles) == null ? void 0 : h.textColor;
37336
- }), d = (h, v, y = !1) => {
37337
- if (console.info("performAction action", h), typeof h == "string" && h.startsWith("playbookNavigate:") && h !== "playbookNavigate:Checkout" && h !== "playbookNavigate:Add Products") {
37338
- const x = h.slice(17);
37339
- i.navigateToBean(x);
37334
+ var v;
37335
+ return (v = a.chatStyles) == null ? void 0 : v.textColor;
37336
+ }), d = (v, y, x) => {
37337
+ var E;
37338
+ const b = ((E = i == null ? void 0 : i.currentPlaybook) == null ? void 0 : E.playBookSteps) || [], C = (O) => String(O || "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "_"), A = b.findIndex((O) => {
37339
+ const R = C(O == null ? void 0 : O.stepComponent), w = String((O == null ? void 0 : O.stepName) || "").trim().toLowerCase();
37340
+ return v.includes(R) || y.some((k) => w.includes(k));
37341
+ });
37342
+ A >= 0 ? i.navigateToStep({ stepName: b[A].stepName }) : i.loadComponent(x);
37343
+ }, g = (v, y, x = !1) => {
37344
+ if (console.info("performAction action", v), typeof v == "string" && v.startsWith("playbookNavigate:") && v !== "playbookNavigate:Checkout" && v !== "playbookNavigate:Add Products") {
37345
+ const b = v.slice(17);
37346
+ i.navigateToBean(b);
37340
37347
  return;
37341
37348
  }
37342
- h === "addProducts" || h === "playbookNavigate:Add Products" ? i.loadComponent("catalog") : h === "quoteDocument" ? t.openQuoteDocument(v.requestId) : h === "quoteItem" ? i.loadComponent("cart") : h === "Undo" ? a.undoAction(v.requestId) : h === "playbookNavigate:Checkout" && l("component-action", {
37349
+ v === "addProducts" || v === "playbookNavigate:Add Products" ? d(["catalog", "adaptive_search"], ["catalog", "add products"], "catalog") : v === "quoteDocument" ? t.openQuoteDocument(y.requestId) : v === "quoteItem" ? i.loadComponent("cart") : v === "Undo" ? a.undoAction(y.requestId) : v === "playbookNavigate:Checkout" && l("component-action", {
37343
37350
  component: "chat",
37344
37351
  action: "checkout",
37345
37352
  details: {
@@ -37347,16 +37354,16 @@ const gE = ["innerHTML"], vE = {
37347
37354
  label: "Checkout"
37348
37355
  }
37349
37356
  });
37350
- }, g = (h) => {
37351
- if (!h)
37357
+ }, h = (v) => {
37358
+ if (!v)
37352
37359
  return "";
37353
- let v = h.replace(/\\r\\n/g, `
37360
+ let y = v.replace(/\\r\\n/g, `
37354
37361
  `).replace(/\\n/g, `
37355
37362
  `).replace(/\\r/g, `
37356
37363
  `);
37357
- return v = v.replace(/^[ \t]*•[ \t]+/gm, "- "), v;
37364
+ return y = y.replace(/^[ \t]*•[ \t]+/gm, "- "), y;
37358
37365
  };
37359
- return (h, v) => (M(), P("div", {
37366
+ return (v, y) => (M(), P("div", {
37360
37367
  class: Be(["chat-messages", { "root-path": f.value }])
37361
37368
  }, [
37362
37369
  _("div", {
@@ -37368,34 +37375,34 @@ const gE = ["innerHTML"], vE = {
37368
37375
  ref: n,
37369
37376
  class: "messages-wrapper"
37370
37377
  }, [
37371
- (M(!0), P(Te, null, Le([...e.messages], (y, x) => {
37372
- var b;
37378
+ (M(!0), P(Te, null, Le([...e.messages], (x, b) => {
37379
+ var C;
37373
37380
  return M(), P("div", {
37374
- key: x,
37381
+ key: b,
37375
37382
  class: Be(["message", {
37376
- "user-message": y.type === "user"
37383
+ "user-message": x.type === "user"
37377
37384
  }])
37378
37385
  }, [
37379
37386
  _("div", bE, [
37380
- y.name ? (M(), P("div", xE, ge(y.name), 1)) : ae("", !0),
37387
+ x.name ? (M(), P("div", xE, ge(x.name), 1)) : ae("", !0),
37381
37388
  _("div", {
37382
- class: Be(["message-text ect-relative", { "error-message": y.error, strikethrough: y.undone }]),
37383
- style: De(y.type === "user" ? { color: m.value, backgroundColor: p.value } : {})
37389
+ class: Be(["message-text ect-relative", { "error-message": x.error, strikethrough: x.undone }]),
37390
+ style: De(x.type === "user" ? { color: m.value, backgroundColor: p.value } : {})
37384
37391
  }, [
37385
37392
  _("div", _E, [
37386
37393
  se(Xs, {
37387
- source: g(y.message)
37394
+ source: h(x.message)
37388
37395
  }, null, 8, ["source"])
37389
37396
  ]),
37390
- ((b = y == null ? void 0 : y.filesData) == null ? void 0 : b.length) > 0 ? (M(!0), P(Te, { key: 0 }, Le(y == null ? void 0 : y.filesData, (C) => (M(), Ae(ix, {
37391
- key: C.name,
37397
+ ((C = x == null ? void 0 : x.filesData) == null ? void 0 : C.length) > 0 ? (M(!0), P(Te, { key: 0 }, Le(x == null ? void 0 : x.filesData, (A) => (M(), Ae(ix, {
37398
+ key: A.name,
37392
37399
  info: {
37393
- iconUrl: (C == null ? void 0 : C.type) === "csv" ? Ie(u0) : Ie(s0),
37394
- fileName: C == null ? void 0 : C.name,
37395
- fileSize: C == null ? void 0 : C.size
37400
+ iconUrl: (A == null ? void 0 : A.type) === "csv" ? Ie(u0) : Ie(s0),
37401
+ fileName: A == null ? void 0 : A.name,
37402
+ fileSize: A == null ? void 0 : A.size
37396
37403
  },
37397
- background: y.type == "user" ? "#fff" : "#f8f8f8",
37398
- "encoded-string": C == null ? void 0 : C.encodedString
37404
+ background: x.type == "user" ? "#fff" : "#f8f8f8",
37405
+ "encoded-string": A == null ? void 0 : A.encodedString
37399
37406
  }, null, 8, ["info", "background", "encoded-string"]))), 128)) : ae("", !0)
37400
37407
  ], 6)
37401
37408
  ])
@@ -37417,7 +37424,7 @@ const gE = ["innerHTML"], vE = {
37417
37424
  }, [
37418
37425
  _("div", kE, [
37419
37426
  se(Xs, {
37420
- source: g(e.loadingMessage)
37427
+ source: h(e.loadingMessage)
37421
37428
  }, null, 8, ["source"])
37422
37429
  ])
37423
37430
  ], 512)
@@ -37430,13 +37437,13 @@ const gE = ["innerHTML"], vE = {
37430
37437
  ], 2)) : e.buttonLinks.length > 0 ? (M(), P("div", wE, [
37431
37438
  se(ex, {
37432
37439
  links: e.buttonLinks,
37433
- onPerformAction: d
37440
+ onPerformAction: g
37434
37441
  }, null, 8, ["links"])
37435
37442
  ])) : ae("", !0)
37436
37443
  ], 512)
37437
37444
  ], 2));
37438
37445
  }
37439
- }, SE = /* @__PURE__ */ Ne(IE, [["__scopeId", "data-v-49c2843b"]]), OE = { class: "ai-upload ect-flex-inline ect-items-center" }, TE = {
37446
+ }, SE = /* @__PURE__ */ Ne(IE, [["__scopeId", "data-v-f47da80c"]]), OE = { class: "ai-upload ect-flex-inline ect-items-center" }, TE = {
37440
37447
  __name: "FileUpload",
37441
37448
  props: {
37442
37449
  // Prop to reset the file input state when changed to true