@salla.sa/twilight-components 2.14.298 → 2.14.300

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 (150) hide show
  1. package/dist/cjs/{Helper-C9UmWIYn.js → Helper-B5NunIdR.js} +1 -0
  2. package/dist/cjs/{filepond-Dn-jnnWy.js → filepond-BScg3EjA.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-4K4RC5sx.js → filepond-plugin-file-poster-C0equ1tk.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-B85pytvJ.js → filepond-plugin-file-validate-size-DbSDO39t.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-vWh-hrFq.js → filepond-plugin-file-validate-type-oNrCSQ4M.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-B3-_-hIs.js → filepond-plugin-image-edit-CEs1Wvna.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-Cbkb7_k1.js → filepond-plugin-image-exif-orientation-CR0z9rwJ.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-CqcNMHtt.js → filepond-plugin-image-preview-QCP0yf11.js} +1 -1
  9. package/dist/cjs/{index-Z2nWod3c.js → index-bUFB5h9D.js} +1 -1
  10. package/dist/cjs/{index-DENUwtYT.js → index-tXQykYB9.js} +2 -2
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/salla-accordion_62.cjs.entry.js +29 -30
  13. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  21. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  22. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-notifications.cjs.entry.js +2 -2
  28. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  35. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-reviews-page.cjs.entry.js +2 -2
  39. package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  46. package/dist/cjs/twilight.cjs.js +1 -1
  47. package/dist/collection/Helpers/Helper.js +1 -0
  48. package/dist/collection/components/salla-products-list/salla-products-list.js +3 -3
  49. package/dist/collection/components/salla-user-menu/salla-user-menu.js +18 -19
  50. package/dist/components/Helper.js +1 -0
  51. package/dist/components/index.js +2 -2
  52. package/dist/components/salla-products-list2.js +1 -1
  53. package/dist/components/salla-user-menu.js +18 -19
  54. package/dist/esm/{Helper-B51hb0bi.js → Helper-Bt5Zv9cl.js} +1 -0
  55. package/dist/esm/{filepond-q8kfR-qI.js → filepond-DZgILbOT.js} +1 -1
  56. package/dist/esm/{filepond-plugin-file-poster-CAkqJrqM.js → filepond-plugin-file-poster-DMXXHQ1L.js} +1 -1
  57. package/dist/esm/{filepond-plugin-file-validate-size-lHUJVKW0.js → filepond-plugin-file-validate-size-uKHV0jNp.js} +1 -1
  58. package/dist/esm/{filepond-plugin-file-validate-type-FHDAVW2X.js → filepond-plugin-file-validate-type-D8hhJ9EB.js} +1 -1
  59. package/dist/esm/{filepond-plugin-image-edit-drdbdxxE.js → filepond-plugin-image-edit-0X2RSyN6.js} +1 -1
  60. package/dist/esm/{filepond-plugin-image-exif-orientation-Kqs0PJBo.js → filepond-plugin-image-exif-orientation-0v28bqEm.js} +1 -1
  61. package/dist/esm/{filepond-plugin-image-preview-BZGs88rC.js → filepond-plugin-image-preview-rwaj1mis.js} +1 -1
  62. package/dist/esm/{index-CPlWMNOm.js → index-DA5HnTzR.js} +1 -1
  63. package/dist/esm/{index-Bh2SK07N.js → index-Vf9-v4wr.js} +2 -2
  64. package/dist/esm/loader.js +2 -2
  65. package/dist/esm/salla-accordion_62.entry.js +29 -30
  66. package/dist/esm/salla-advertisement.entry.js +1 -1
  67. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  68. package/dist/esm/salla-apps-icons.entry.js +1 -1
  69. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  70. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  71. package/dist/esm/salla-contacts.entry.js +1 -1
  72. package/dist/esm/salla-custom-fields.entry.js +1 -1
  73. package/dist/esm/salla-filters-widget.entry.js +2 -2
  74. package/dist/esm/salla-filters.entry.js +2 -2
  75. package/dist/esm/salla-installment.entry.js +1 -1
  76. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  77. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  78. package/dist/esm/salla-metadata.entry.js +1 -1
  79. package/dist/esm/salla-notification-item.entry.js +1 -1
  80. package/dist/esm/salla-notifications.entry.js +2 -2
  81. package/dist/esm/salla-offer.entry.js +1 -1
  82. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  83. package/dist/esm/salla-order-details-options.entry.js +1 -1
  84. package/dist/esm/salla-order-details.entry.js +1 -1
  85. package/dist/esm/salla-order-summary.entry.js +1 -1
  86. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  87. package/dist/esm/salla-orders.entry.js +2 -2
  88. package/dist/esm/salla-payments.entry.js +1 -1
  89. package/dist/esm/salla-price-range.entry.js +1 -1
  90. package/dist/esm/salla-review-card.entry.js +1 -1
  91. package/dist/esm/salla-reviews-page.entry.js +2 -2
  92. package/dist/esm/salla-reviews.entry.js +2 -2
  93. package/dist/esm/salla-social.entry.js +1 -1
  94. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  95. package/dist/esm/salla-tooltip.entry.js +1 -1
  96. package/dist/esm/salla-trust-badges.entry.js +1 -1
  97. package/dist/esm/salla-verify.entry.js +1 -1
  98. package/dist/esm/salla-wallet.entry.js +1 -1
  99. package/dist/esm/twilight.js +2 -2
  100. package/dist/twilight/{p-BLPRGu3L.js → p--XHnNbTg.js} +1 -1
  101. package/dist/twilight/{p-62fd72e0.entry.js → p-060b76fc.entry.js} +1 -1
  102. package/dist/twilight/{p-d6c99665.entry.js → p-10627275.entry.js} +1 -1
  103. package/dist/twilight/{p-c31e0731.entry.js → p-11258ae1.entry.js} +1 -1
  104. package/dist/twilight/{p-5460b611.entry.js → p-11734c15.entry.js} +2 -2
  105. package/dist/twilight/{p-dbce8093.entry.js → p-11e3381f.entry.js} +1 -1
  106. package/dist/twilight/{p-c69d87e4.entry.js → p-151c103f.entry.js} +1 -1
  107. package/dist/twilight/{p-8d246fcd.entry.js → p-20c4c8af.entry.js} +1 -1
  108. package/dist/twilight/{p-6891ae55.entry.js → p-3d92ba5c.entry.js} +1 -1
  109. package/dist/twilight/{p-5789243f.entry.js → p-446bd291.entry.js} +1 -1
  110. package/dist/twilight/{p-de903389.entry.js → p-4ba71acf.entry.js} +1 -1
  111. package/dist/twilight/{p-4c74e526.entry.js → p-4d3071a5.entry.js} +1 -1
  112. package/dist/twilight/{p-842debd3.entry.js → p-53ad8f04.entry.js} +1 -1
  113. package/dist/twilight/{p-4df42ff8.entry.js → p-5426fed3.entry.js} +1 -1
  114. package/dist/twilight/{p-1863db37.entry.js → p-65103ff7.entry.js} +1 -1
  115. package/dist/twilight/{p-85d168c9.entry.js → p-6d112428.entry.js} +1 -1
  116. package/dist/twilight/{p-7d3b2c8d.entry.js → p-70750924.entry.js} +1 -1
  117. package/dist/twilight/{p-11d325ba.entry.js → p-7a980667.entry.js} +1 -1
  118. package/dist/twilight/{p-af92eed9.entry.js → p-81f65a33.entry.js} +1 -1
  119. package/dist/twilight/{p-b4127acc.entry.js → p-83a0e642.entry.js} +1 -1
  120. package/dist/twilight/{p-b2ab5fcc.entry.js → p-8f3f3530.entry.js} +1 -1
  121. package/dist/twilight/{p-ccfd9c1e.entry.js → p-91b68094.entry.js} +1 -1
  122. package/dist/twilight/{p-5981c13b.entry.js → p-9795c6d0.entry.js} +1 -1
  123. package/dist/twilight/{p-5f46651c.entry.js → p-97e6602f.entry.js} +1 -1
  124. package/dist/twilight/{p-CtJEHiDh.js → p-B7BW4Mdj.js} +1 -1
  125. package/dist/twilight/{p-BcA-Dpxf.js → p-BmD3prgX.js} +1 -1
  126. package/dist/twilight/{p-HMoEZhqa.js → p-CPQv1htQ.js} +1 -1
  127. package/dist/twilight/p-DQd7LCNI.js +9 -0
  128. package/dist/twilight/{p-sK70mswA.js → p-DUIBkQ0L.js} +1 -1
  129. package/dist/twilight/p-Dljb4XCt.js +4 -0
  130. package/dist/twilight/{p-DykGR1vx.js → p-EFshmXnQ.js} +1 -1
  131. package/dist/twilight/{p-Bh2SK07N.js → p-Vf9-v4wr.js} +1 -1
  132. package/dist/twilight/{p-ecddf6ff.entry.js → p-a9adb89e.entry.js} +1 -1
  133. package/dist/twilight/{p-e584c46f.entry.js → p-afeeefb3.entry.js} +1 -1
  134. package/dist/twilight/{p-cef92263.entry.js → p-b7ca90d8.entry.js} +1 -1
  135. package/dist/twilight/{p-3f62e05b.entry.js → p-bb3a0dbc.entry.js} +1 -1
  136. package/dist/twilight/{p-0d04ca56.entry.js → p-c77da76a.entry.js} +1 -1
  137. package/dist/twilight/{p-9d46ba91.entry.js → p-d062aafc.entry.js} +1 -1
  138. package/dist/twilight/{p-b2548a59.entry.js → p-ddd3cb10.entry.js} +1 -1
  139. package/dist/twilight/{p-8f481f80.entry.js → p-dfb1f2bb.entry.js} +1 -1
  140. package/dist/twilight/{p-5f815dc4.entry.js → p-f155cb58.entry.js} +1 -1
  141. package/dist/twilight/{p-99b49b76.entry.js → p-f54b0939.entry.js} +1 -1
  142. package/dist/twilight/{p-e23f38dc.entry.js → p-fadae641.entry.js} +1 -1
  143. package/dist/twilight/{p-B0jU8m7y.js → p-ozyDVWVs.js} +1 -1
  144. package/dist/twilight/twilight.esm.js +1 -1
  145. package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -1
  146. package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +2 -2
  147. package/dist/types/components.d.ts +2 -2
  148. package/package.json +5 -5
  149. package/dist/twilight/p-DFYs0E0K.js +0 -9
  150. package/dist/twilight/p-X-ZUrwUQ.js +0 -4
@@ -116,7 +116,7 @@ const SallaProductsList = /*@__PURE__*/ proxyCustomElement(class SallaProductsLi
116
116
  return salla.config.get('store.settings.product.filters') && this.filtersResults;
117
117
  }
118
118
  isSourceWithoutValue() {
119
- return ['offers', 'latest', 'sales', 'wishlist', 'top-rated'].includes(this.getSource());
119
+ return ['offers', 'latest', 'sales', 'wishlist', 'top-rated', 'reorder'].includes(this.getSource());
120
120
  }
121
121
  animateItems() {
122
122
  anime({
@@ -71,7 +71,7 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
71
71
  notifications: salla.helpers.number(salla.storage.get('user.notifications') || 0),
72
72
  pending_orders: salla.helpers.number(salla.storage.get('user.pending_orders') || 0),
73
73
  };
74
- this.sallaAccountEnabled = Salla.config.get('store.features').includes('salla-account');
74
+ this.sallaAccountEnabled = false;
75
75
  this.hasBadges = Number(salla.storage.get('user.pending_orders')) > 0 ||
76
76
  Number(salla.storage.get('user.notifications')) > 0;
77
77
  /**
@@ -157,18 +157,19 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
157
157
  }
158
158
  });
159
159
  }
160
- componentWillLoad() {
161
- return salla.onReady().then(() => {
162
- this.profileUrl = `${salla.config.get('account.url', 'https://accounts.salla.com')}/${salla.config.get('user.language_code')}/user?store=${salla.config.get('store.id')}&info=${salla.storage.get('token')}`;
163
- const trigger = this.host.querySelector('[slot="trigger"]');
164
- this.triggerSlot =
165
- '<div class="s-user-menu-trigger"><div class="s-user-menu-avatar-wrap"><img class="s-user-menu-trigger-avatar" src="{avatar}" alt="{first_name}{last_name}" /></div><div class="s-user-menu-trigger-content"><span class="s-user-menu-trigger-hello">{hello}</span><p class="s-user-menu-trigger-name">{first_name} {last_name}</p></div> <i class="s-user-menu-trigger-icon">{icon}</i></div>';
166
- if (!trigger) {
167
- return;
168
- }
169
- this.triggerSlot = trigger.innerHTML;
170
- trigger.innerHTML = this.replaceParams(trigger.innerHTML);
171
- });
160
+ async componentWillLoad() {
161
+ await salla.onReady();
162
+ await salla.lang.onLoaded();
163
+ this.sallaAccountEnabled = Salla.config.get('store.features')?.includes('salla-account');
164
+ this.profileUrl = `${salla.config.get('account.url', 'https://accounts.salla.com')}/${salla.config.get('user.language_code')}/user?store=${salla.config.get('store.id')}&info=${salla.storage.get('token')}`;
165
+ const trigger = this.host.querySelector('[slot="trigger"]');
166
+ this.triggerSlot =
167
+ '<div class="s-user-menu-trigger"><div class="s-user-menu-avatar-wrap"><img class="s-user-menu-trigger-avatar" src="{avatar}" alt="{first_name}{last_name}" /></div><div class="s-user-menu-trigger-content"><span class="s-user-menu-trigger-hello">{hello}</span><p class="s-user-menu-trigger-name">{first_name} {last_name}</p></div> <i class="s-user-menu-trigger-icon">{icon}</i></div>';
168
+ if (!trigger) {
169
+ return;
170
+ }
171
+ this.triggerSlot = trigger.innerHTML;
172
+ trigger.innerHTML = this.replaceParams(trigger.innerHTML);
172
173
  }
173
174
  fetchFreshProfile() {
174
175
  //don't request fetchFreshProfile unless token is injected into the api
@@ -220,20 +221,18 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
220
221
  }, id: "trigger-slot", onClick: e => this.open(e), onKeyUp: e => this.open(e), innerHTML: this.replaceParams(this.triggerSlot) }));
221
222
  }
222
223
  getItemAnchorLinkAttrs(itemKey) {
223
- if (itemKey === 'profile' && this.profileUrl) {
224
- return this.sallaAccountEnabled ?
225
- { href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' } :
226
- { href: '/profile' };
224
+ if (itemKey === 'profile' && this.profileUrl && this.sallaAccountEnabled) {
225
+ return { href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' };
227
226
  }
228
227
  // Fix loyalty program URL mapping from master
229
228
  const urlKey = itemKey === 'loyalty_program' ? 'loyalty' : itemKey;
230
- return { href: salla.url.get(urlKey) };
229
+ return { href: Salla.url.get(urlKey) };
231
230
  }
232
231
  getMenuItem([itemKey, itemValue], i) {
233
232
  //todo:: enhancement support slot here
234
233
  if (itemKey === 'wallet' && !window.can_access_wallet)
235
234
  return;
236
- if (itemKey === 'loyalty_program' && !salla.config.get('store.features').includes('loyalty-system'))
235
+ if (itemKey === 'loyalty_program' && !Salla.config.get('store.features').includes('loyalty-system'))
237
236
  return;
238
237
  return (h("li", { class: {
239
238
  's-user-menu-dropdown-item': true,
@@ -57,6 +57,7 @@ class Helper {
57
57
  // 'categories':'',
58
58
  'latest': 'blocks.home.latest_products',
59
59
  'offers': 'common.titles.discounts',
60
+ 'reorder': 'common.titles.products',
60
61
  // 'search':'',
61
62
  // 'landing-page':'',
62
63
  // 'tags':'',
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Bh2SK07N.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Vf9-v4wr.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Bh2SK07N.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Vf9-v4wr.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Bh2SK07N.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Vf9-v4wr.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Bh2SK07N.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Vf9-v4wr.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Bh2SK07N.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Vf9-v4wr.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Bh2SK07N.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Vf9-v4wr.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Bh2SK07N.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Vf9-v4wr.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Bh2SK07N.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Vf9-v4wr.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {