@propeller-commerce/propeller-v2-vue-ui 0.3.34 → 0.3.35

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.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { h as createServices, H as isContact, J as isCustomer, M as ok, j as err, p as getAddresses, x as getDefaultInvoiceAddress, w as getDefaultDeliveryAddress, b as attributeNameMatches, q as getAttributeDisplayName, g as collectAttributeValues, l as filterProductsBySelections, k as extractAttributeValues, y as getLabel, z as getLanguageString, n as formatPrice, o as formatSurcharge, D as getProductImageUrl, E as getProductSku, v as getCountryName, B as getLocalizedValue, s as getClusterSku, r as getClusterImageUrl, c as buildClusterJsonLd, O as safeJsonStringify, d as buildItemListJsonLd, e as buildProductJsonLd } from "./index-BN8nyGRL.js";
2
2
  import { C, a, f, i, m, t, u, A, F, G, I, K, L, N, P, Q, R, S, T } from "./index-BN8nyGRL.js";
3
- import { u as useInfraProps, n as usePropellerDeps, a as PropellerScopeKey, j as _sfc_main$W, d as _sfc_main$X, e as _sfc_main$Y, m as usePropellerContext, h as _sfc_main$Z, i as _sfc_main$_, l as _sfc_main$$ } from "./ProductVideos.vue_vue_type_script_setup_true_lang-BGWkb9cO.js";
4
- import { _, b, c, f as f2, g, k, P as P2, p, t as t2, o, q } from "./ProductVideos.vue_vue_type_script_setup_true_lang-BGWkb9cO.js";
3
+ import { u as useInfraProps, n as usePropellerDeps, a as PropellerScopeKey, j as _sfc_main$W, d as _sfc_main$X, e as _sfc_main$Y, m as usePropellerContext, h as _sfc_main$Z, i as _sfc_main$_, l as _sfc_main$$ } from "./ProductVideos.vue_vue_type_script_setup_true_lang-Cb_g4zYe.js";
4
+ import { _, b, c, f as f2, g, k, P as P2, p, t as t2, o, q } from "./ProductVideos.vue_vue_type_script_setup_true_lang-Cb_g4zYe.js";
5
5
  import { provide, inject, ref, unref, computed, watch, markRaw, defineComponent, reactive, renderSlot, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, Fragment, createTextVNode, onMounted, onUnmounted, withModifiers, renderList, normalizeClass, createBlock, resolveDynamicComponent, withCtx, normalizeStyle, createVNode, createStaticVNode, withKeys, mergeProps, nextTick, createSlots, normalizeProps, guardReactiveProps } from "vue";
6
6
  import { YesNo, AddressType, CartService, CartStatus, CartAddressType, Gender, PurchaseRole, CrossupsellType, PaymentStatuses, OrderSearchFields, OrderItemClass, ProductSortField, ProductSearchableField, ProductStatus, SortOrder, AttributeType, OrderSortField, OrderType, BundleCondition } from "@propeller-commerce/propeller-sdk-v2";
7
7
  const ProductGridInjectionKey = /* @__PURE__ */ Symbol("propeller-product-grid");
@@ -3184,6 +3184,11 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
3184
3184
  function getLabel$1(key, fallback) {
3185
3185
  return getLabel(props.labels, key, fallback);
3186
3186
  }
3187
+ const noAccountParts = computed(() => {
3188
+ const tpl = getLabel$1("noAccount", "Don't have an account? {link}");
3189
+ const [before, after = ""] = tpl.split("{link}");
3190
+ return { before, after };
3191
+ });
3187
3192
  async function handleSubmit(e) {
3188
3193
  e.preventDefault();
3189
3194
  if (props.beforeLogin) {
@@ -3370,7 +3375,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
3370
3375
  }, toDisplayString(getLabel$1("forgotPassword", "Forgot Password?")), 1)
3371
3376
  ]) : createCommentVNode("", true),
3372
3377
  createElementVNode("div", _hoisted_20$n, [
3373
- createTextVNode(toDisplayString(getLabel$1("noAccount", "Don't have an account?")), 1),
3378
+ createTextVNode(toDisplayString(noAccountParts.value.before), 1),
3374
3379
  __props.displayRegisterLink !== false ? renderSlot(_ctx.$slots, "registerLink", {
3375
3380
  key: 0,
3376
3381
  onClick: (e) => __props.onRegisterClick?.(e),
@@ -3383,7 +3388,8 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
3383
3388
  if (__props.onRegisterClick) __props.onRegisterClick();
3384
3389
  })
3385
3390
  }, toDisplayString(getLabel$1("registerLink", "Register")), 1)
3386
- ]) : createCommentVNode("", true)
3391
+ ]) : createCommentVNode("", true),
3392
+ createTextVNode(toDisplayString(noAccountParts.value.after), 1)
3387
3393
  ])
3388
3394
  ])) : createCommentVNode("", true)
3389
3395
  ], 8, _hoisted_1$P);
@@ -4941,6 +4947,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
4941
4947
  enableDelete: { type: Boolean, default: true },
4942
4948
  enableSetDefault: { type: Boolean, default: true },
4943
4949
  showDefaultBadge: { type: Boolean, default: false },
4950
+ showTypeBadge: { type: Boolean },
4944
4951
  onEdit: {},
4945
4952
  afterEdit: {},
4946
4953
  onDelete: {},
@@ -5105,7 +5112,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
5105
5112
  "data-type": addr.value?.type || ""
5106
5113
  }, [
5107
5114
  createElementVNode("div", _hoisted_3$J, [
5108
- __props.addressType ? renderSlot(_ctx.$slots, "typeBadge", {
5115
+ __props.addressType && __props.showTypeBadge !== false ? renderSlot(_ctx.$slots, "typeBadge", {
5109
5116
  key: 0,
5110
5117
  address: addr.value,
5111
5118
  addressType: __props.addressType,
@@ -7418,6 +7425,11 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
7418
7425
  function getLabel$1(key, fallback) {
7419
7426
  return getLabel(props.labels, key, fallback);
7420
7427
  }
7428
+ const termsConsentParts = computed(() => {
7429
+ const tpl = getLabel$1("termsConsent", "I agree to the {link}");
7430
+ const [before, after = ""] = tpl.split("{link}");
7431
+ return { before, after };
7432
+ });
7421
7433
  function getCountryName$1(code) {
7422
7434
  return getCountryName(code, props.countries);
7423
7435
  }
@@ -7537,12 +7549,13 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
7537
7549
  onChange: _cache[2] || (_cache[2] = async (event) => handleTermsChange(event.target.checked))
7538
7550
  }, null, 40, _hoisted_30$c),
7539
7551
  createElementVNode("label", _hoisted_31$c, [
7540
- createTextVNode(toDisplayString(getLabel$1("termsPrefix", "I agree to the")), 1),
7552
+ createTextVNode(toDisplayString(termsConsentParts.value.before), 1),
7541
7553
  createElementVNode("a", {
7542
7554
  href: "#",
7543
7555
  class: "text-primary hover:underline font-medium",
7544
7556
  onClick: _cache[3] || (_cache[3] = async (event) => handleTermsLinkClick(event))
7545
- }, toDisplayString(getLabel$1("termsLink", "Terms and Conditions")), 1)
7557
+ }, toDisplayString(getLabel$1("termsLink", "Terms and Conditions")), 1),
7558
+ createTextVNode(toDisplayString(termsConsentParts.value.after), 1)
7546
7559
  ])
7547
7560
  ])) : createCommentVNode("", true),
7548
7561
  showPurchaseButton.value ? (openBlock(), createElementBlock("button", {
@@ -11377,6 +11390,11 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
11377
11390
  function getLabel$1(key, fallback) {
11378
11391
  return getLabel(props.labels, key, fallback);
11379
11392
  }
11393
+ const deletePromptParts = computed(() => {
11394
+ const tpl = getLabel$1("deleteConfirm", 'Are you sure you want to delete "{name}"?');
11395
+ const [before, after = ""] = tpl.split("{name}");
11396
+ return { before, after };
11397
+ });
11380
11398
  return (_ctx, _cache) => {
11381
11399
  return openBlock(), createElementBlock("div", {
11382
11400
  class: normalizeClass(`propeller-favorite-lists ${__props.className || ""}`),
@@ -11536,7 +11554,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
11536
11554
  y2: "12"
11537
11555
  })
11538
11556
  ], -1)),
11539
- createTextVNode(toDisplayString(getTotalCount(list)) + " " + toDisplayString(getLabel$1("items", "items")), 1)
11557
+ createTextVNode(toDisplayString(getTotalCount(list)) + " " + toDisplayString(getTotalCount(list) === 1 ? getLabel$1("itemSingular", "item") : getLabel$1("itemPlural", "items")), 1)
11540
11558
  ])) : createCommentVNode("", true)
11541
11559
  ])
11542
11560
  ])) : createCommentVNode("", true)
@@ -11690,9 +11708,9 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
11690
11708
  ]),
11691
11709
  createElementVNode("div", _hoisted_46$7, [
11692
11710
  createElementVNode("p", _hoisted_47$7, [
11693
- createTextVNode(toDisplayString(getLabel$1("deleteConfirm", "Are you sure you want to delete")), 1),
11694
- createElementVNode("strong", null, '"' + toDisplayString(unref(listToDelete)?.name) + '"', 1),
11695
- _cache[20] || (_cache[20] = createTextVNode("? ", -1))
11711
+ createTextVNode(toDisplayString(deletePromptParts.value.before), 1),
11712
+ createElementVNode("strong", null, toDisplayString(unref(listToDelete)?.name), 1),
11713
+ createTextVNode(toDisplayString(deletePromptParts.value.after), 1)
11696
11714
  ]),
11697
11715
  createElementVNode("p", _hoisted_48$7, toDisplayString(getLabel$1("deleteWarning", "This action cannot be undone.")), 1)
11698
11716
  ]),
@@ -12478,6 +12496,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
12478
12496
  [SortOrder.DESC]: "High to Low",
12479
12497
  clearAll: "Clear All",
12480
12498
  products: " Products",
12499
+ productSingular: "Product",
12500
+ productPlural: "Products",
12481
12501
  from: "from",
12482
12502
  results: "results",
12483
12503
  perPage: " per page",
@@ -12576,7 +12596,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
12576
12596
  }, [
12577
12597
  createElementVNode("div", _hoisted_2$m, [
12578
12598
  createElementVNode("div", _hoisted_3$m, [
12579
- __props.itemsFound !== void 0 && __props.itemsFound > 0 ? (openBlock(), createElementBlock("span", _hoisted_4$j, toDisplayString(__props.itemsFound) + toDisplayString(getLabel2("products")), 1)) : createCommentVNode("", true)
12599
+ __props.itemsFound !== void 0 && __props.itemsFound > 0 ? (openBlock(), createElementBlock("span", _hoisted_4$j, toDisplayString(__props.itemsFound) + " " + toDisplayString(__props.itemsFound === 1 ? getLabel2("productSingular") : getLabel2("productPlural")), 1)) : createCommentVNode("", true)
12580
12600
  ]),
12581
12601
  createElementVNode("div", _hoisted_5$j, [
12582
12602
  createElementVNode("select", {
@@ -13836,6 +13856,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
13836
13856
  formatPrice: { type: Function },
13837
13857
  formatDate: { type: Function },
13838
13858
  getStatusColor: { type: Function },
13859
+ statusLabels: {},
13839
13860
  labels: {},
13840
13861
  onCartCreated: { type: Function },
13841
13862
  afterReorder: { type: Function },
@@ -13907,6 +13928,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
13907
13928
  if (!price) return "-";
13908
13929
  return formatPrice(price, { symbol: infra.currency ?? "€" });
13909
13930
  }
13931
+ function statusLabel(status) {
13932
+ return props.statusLabels?.[status] || status;
13933
+ }
13910
13934
  function getStatusColor(status) {
13911
13935
  if (props.getStatusColor) return props.getStatusColor(status);
13912
13936
  switch (status) {
@@ -14221,7 +14245,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
14221
14245
  class: normalizeClass(`propeller-order-list__status px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${getStatusColor(
14222
14246
  order.status
14223
14247
  )}`)
14224
- }, toDisplayString(order.status), 11, _hoisted_38$6)) : createCommentVNode("", true),
14248
+ }, toDisplayString(statusLabel(order.status)), 11, _hoisted_38$6)) : createCommentVNode("", true),
14225
14249
  col === "total" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
14226
14250
  createTextVNode(toDisplayString(formatPrice$1(order.total?.net)), 1)
14227
14251
  ], 64)) : createCommentVNode("", true),
@@ -18740,6 +18764,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
18740
18764
  function getLabel$1(key, fallback) {
18741
18765
  return getLabel(props.labels, key, fallback);
18742
18766
  }
18767
+ const termsConsentParts = computed(() => {
18768
+ const tpl = getLabel$1("termsConsent", "I agree to the {link}");
18769
+ const [before, after = ""] = tpl.split("{link}");
18770
+ return { before, after };
18771
+ });
18743
18772
  function handleTermsChange(checked) {
18744
18773
  termsAccepted.value = checked;
18745
18774
  }
@@ -18777,12 +18806,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
18777
18806
  onChange: _cache[0] || (_cache[0] = async (event) => handleTermsChange(event.target.checked))
18778
18807
  }, null, 40, _hoisted_4$3),
18779
18808
  createElementVNode("label", _hoisted_5$3, [
18780
- createTextVNode(toDisplayString(getLabel$1("termsPrefix", "I agree to the")), 1),
18809
+ createTextVNode(toDisplayString(termsConsentParts.value.before), 1),
18781
18810
  createElementVNode("a", {
18782
18811
  href: "#",
18783
18812
  class: "text-primary hover:underline font-medium",
18784
18813
  onClick: _cache[1] || (_cache[1] = async (event) => handleTermsLinkClick(event))
18785
- }, toDisplayString(getLabel$1("termsLink", "Terms and Conditions")), 1)
18814
+ }, toDisplayString(getLabel$1("termsLink", "Terms and Conditions")), 1),
18815
+ createTextVNode(toDisplayString(termsConsentParts.value.after), 1)
18786
18816
  ])
18787
18817
  ])) : createCommentVNode("", true),
18788
18818
  createElementVNode("button", {