@salla.sa/twilight-components 2.14.290 → 2.14.291

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 (144) hide show
  1. package/dist/cjs/{filepond-CsSVZI6b.js → filepond-l0In8JzI.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DJjaIMfQ.js → filepond-plugin-file-poster--TMslLdw.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-DGUa4QzB.js → filepond-plugin-file-validate-size-asc4GviL.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-DJmeqtsg.js → filepond-plugin-file-validate-type-MAcIW_lX.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-5OewQYOY.js → filepond-plugin-image-edit-8yC2fM_b.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-CG2IXf0d.js → filepond-plugin-image-exif-orientation-D2TaYNJz.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-CBLsOLDc.js → filepond-plugin-image-preview-ZhHJTUGt.js} +1 -1
  8. package/dist/cjs/{index-DaoXQTQv.js → index-BCqSMje8.js} +1 -1
  9. package/dist/cjs/{index-QiRNeWgQ.js → index-CD__TuQ1.js} +2 -2
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/salla-accordion_62.cjs.entry.js +20 -15
  12. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-order-totals-card.cjs.entry.js +13 -8
  32. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  44. package/dist/cjs/twilight.cjs.js +1 -1
  45. package/dist/collection/components/salla-login-modal/salla-login-modal.js +3 -3
  46. package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +12 -7
  47. package/dist/components/index.js +2 -2
  48. package/dist/components/salla-login-modal.js +3 -3
  49. package/dist/components/salla-order-totals-card.js +12 -7
  50. package/dist/components/salla-quick-buy2.js +8 -3
  51. package/dist/esm/{filepond-DG5ftHEu.js → filepond-D-hh7StM.js} +1 -1
  52. package/dist/esm/{filepond-plugin-file-poster-DJnNcY8m.js → filepond-plugin-file-poster-B9peApDJ.js} +1 -1
  53. package/dist/esm/{filepond-plugin-file-validate-size-Ij_3QNnX.js → filepond-plugin-file-validate-size-Clsj6zmt.js} +1 -1
  54. package/dist/esm/{filepond-plugin-file-validate-type-KfkcHm4r.js → filepond-plugin-file-validate-type-NUNR5wrE.js} +1 -1
  55. package/dist/esm/{filepond-plugin-image-edit-DGwQ9z-F.js → filepond-plugin-image-edit-D9mIu1qc.js} +1 -1
  56. package/dist/esm/{filepond-plugin-image-exif-orientation-D3He5h3f.js → filepond-plugin-image-exif-orientation-DjJUiKBi.js} +1 -1
  57. package/dist/esm/{filepond-plugin-image-preview-CW-_uvrw.js → filepond-plugin-image-preview-Dqa9Qh69.js} +1 -1
  58. package/dist/esm/{index-BSnsSL0d.js → index-BdPAI7KX.js} +2 -2
  59. package/dist/esm/{index-D4ggsvU3.js → index-r_fPtAzd.js} +1 -1
  60. package/dist/esm/loader.js +2 -2
  61. package/dist/esm/salla-accordion_62.entry.js +20 -15
  62. package/dist/esm/salla-advertisement.entry.js +1 -1
  63. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  64. package/dist/esm/salla-apps-icons.entry.js +1 -1
  65. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  66. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  67. package/dist/esm/salla-contacts.entry.js +1 -1
  68. package/dist/esm/salla-filters-widget.entry.js +1 -1
  69. package/dist/esm/salla-filters.entry.js +1 -1
  70. package/dist/esm/salla-installment.entry.js +1 -1
  71. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  72. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  73. package/dist/esm/salla-metadata.entry.js +1 -1
  74. package/dist/esm/salla-notification-item.entry.js +1 -1
  75. package/dist/esm/salla-notifications.entry.js +1 -1
  76. package/dist/esm/salla-offer.entry.js +1 -1
  77. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  78. package/dist/esm/salla-order-details-options.entry.js +1 -1
  79. package/dist/esm/salla-order-details.entry.js +1 -1
  80. package/dist/esm/salla-order-summary.entry.js +1 -1
  81. package/dist/esm/salla-order-totals-card.entry.js +13 -8
  82. package/dist/esm/salla-orders.entry.js +1 -1
  83. package/dist/esm/salla-payments.entry.js +1 -1
  84. package/dist/esm/salla-price-range.entry.js +1 -1
  85. package/dist/esm/salla-review-card.entry.js +1 -1
  86. package/dist/esm/salla-reviews-page.entry.js +1 -1
  87. package/dist/esm/salla-reviews.entry.js +1 -1
  88. package/dist/esm/salla-social.entry.js +1 -1
  89. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  90. package/dist/esm/salla-tooltip.entry.js +1 -1
  91. package/dist/esm/salla-trust-badges.entry.js +1 -1
  92. package/dist/esm/salla-verify.entry.js +1 -1
  93. package/dist/esm/salla-wallet.entry.js +1 -1
  94. package/dist/esm/twilight.js +2 -2
  95. package/dist/twilight/p-0230315b.entry.js +4 -0
  96. package/dist/twilight/{p-b3d1e538.entry.js → p-025d49de.entry.js} +1 -1
  97. package/dist/twilight/{p-ebe69ca5.entry.js → p-0a7758ed.entry.js} +1 -1
  98. package/dist/twilight/{p-b8229259.entry.js → p-0c5e2e36.entry.js} +1 -1
  99. package/dist/twilight/{p-7434d2ef.entry.js → p-23541825.entry.js} +1 -1
  100. package/dist/twilight/{p-0619cc09.entry.js → p-2684045e.entry.js} +1 -1
  101. package/dist/twilight/{p-34ed3d3f.entry.js → p-2a4d5b5a.entry.js} +1 -1
  102. package/dist/twilight/p-2d563fd2.entry.js +4 -0
  103. package/dist/twilight/{p-6299bd02.entry.js → p-2d7377e6.entry.js} +1 -1
  104. package/dist/twilight/{p-5ae41031.entry.js → p-2e338f09.entry.js} +1 -1
  105. package/dist/twilight/{p-5aba0f7f.entry.js → p-2ebf898f.entry.js} +1 -1
  106. package/dist/twilight/{p-0beb6f5d.entry.js → p-3420836d.entry.js} +1 -1
  107. package/dist/twilight/{p-736693a1.entry.js → p-362bbc51.entry.js} +1 -1
  108. package/dist/twilight/{p-00955919.entry.js → p-4b2e8325.entry.js} +1 -1
  109. package/dist/twilight/{p-d3e3e3c0.entry.js → p-54a6b727.entry.js} +1 -1
  110. package/dist/twilight/{p-06cc0ac3.entry.js → p-5b2567af.entry.js} +1 -1
  111. package/dist/twilight/{p-06af203a.entry.js → p-5bff3464.entry.js} +1 -1
  112. package/dist/twilight/{p-33712517.entry.js → p-62f6d935.entry.js} +1 -1
  113. package/dist/twilight/p-70567b55.entry.js +11 -0
  114. package/dist/twilight/{p-c00a7ae6.entry.js → p-7ce146ac.entry.js} +1 -1
  115. package/dist/twilight/{p-532376e1.entry.js → p-8110e635.entry.js} +1 -1
  116. package/dist/twilight/{p-672f8206.entry.js → p-84f7d6ff.entry.js} +1 -1
  117. package/dist/twilight/{p-36fb1519.entry.js → p-85d33ec2.entry.js} +1 -1
  118. package/dist/twilight/{p-f9202fc1.entry.js → p-9706a388.entry.js} +1 -1
  119. package/dist/twilight/{p-7684f980.entry.js → p-9b001f92.entry.js} +1 -1
  120. package/dist/twilight/{p-43dbbda5.entry.js → p-9e190a6a.entry.js} +1 -1
  121. package/dist/twilight/{p-B2wjlPIP.js → p-BOK_dArT.js} +1 -1
  122. package/dist/twilight/{p-B1hrg10h.js → p-BUxBV1_U.js} +1 -1
  123. package/dist/twilight/{p-BSnsSL0d.js → p-BdPAI7KX.js} +1 -1
  124. package/dist/twilight/{p-DP8Fqw7G.js → p-CJ4oSd-N.js} +1 -1
  125. package/dist/twilight/{p-CaOlYtot.js → p-DVxWyl5d.js} +1 -1
  126. package/dist/twilight/p-Dkl8u_H6.js +9 -0
  127. package/dist/twilight/{p-DuneTSVd.js → p-DuzBFC4S.js} +1 -1
  128. package/dist/twilight/{p-Bgf4h7Oc.js → p-TjgJW4j-.js} +1 -1
  129. package/dist/twilight/{p-977818f1.entry.js → p-aa85a960.entry.js} +1 -1
  130. package/dist/twilight/{p-e9340ae5.entry.js → p-b2378248.entry.js} +1 -1
  131. package/dist/twilight/{p-075b3b52.entry.js → p-b354fb32.entry.js} +1 -1
  132. package/dist/twilight/{p-823e64aa.entry.js → p-b609c0a3.entry.js} +1 -1
  133. package/dist/twilight/{p-6e6f80ef.entry.js → p-c96ebac7.entry.js} +1 -1
  134. package/dist/twilight/{p-5c58eb9d.entry.js → p-ef28a883.entry.js} +1 -1
  135. package/dist/twilight/{p-0b3f063c.entry.js → p-efdf02d5.entry.js} +1 -1
  136. package/dist/twilight/{p-DdxZpDbY.js → p-oMzSzsXO.js} +1 -1
  137. package/dist/twilight/twilight.esm.js +1 -1
  138. package/dist/types/components/salla-order-totals-card/interfaces.d.ts +1 -0
  139. package/dist/types/components/salla-order-totals-card/salla-order-totals-card.d.ts +2 -1
  140. package/package.json +5 -5
  141. package/dist/twilight/p-06b5b3e4.entry.js +0 -4
  142. package/dist/twilight/p-51c65ed9.entry.js +0 -11
  143. package/dist/twilight/p-9Dp5S3a0.js +0 -9
  144. package/dist/twilight/p-ceb2f617.entry.js +0 -4
@@ -225,10 +225,10 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoginModal
225
225
  this.modal.close();
226
226
  Salla.auth.event.tokenFetched(token);
227
227
  try {
228
- await Salla.cart.api.assign();
228
+ await Salla.api.cart.assign();
229
229
  }
230
- catch (error) {
231
- Salla.log('Error on assign');
230
+ catch (err) {
231
+ Salla.log('Error on assign after handle iframe', err);
232
232
  }
233
233
  withCartReset && Salla.cart.reset();
234
234
  !Salla.auth.api.isSessionless() && await Salla.auth.api.request('auth/jwt');
@@ -19,7 +19,7 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
19
19
  }
20
20
  }
21
21
  async componentWillLoad() {
22
- await new Promise(resolve => salla.onReady(resolve));
22
+ await Salla.onReady();
23
23
  if (this.order) {
24
24
  this.setSummaryFromProp(this.order);
25
25
  }
@@ -37,8 +37,11 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
37
37
  renderTotalRow(label, amount, labelClass, valueClass, isBold) {
38
38
  return (h("div", { class: "s-order-totals-card-row" }, h("div", { class: "s-order-totals-card-row-inner" }, h("dt", { class: labelClass || 's-order-totals-card-label' }, label), h("dd", { class: valueClass || 's-order-totals-card-value' }, isBold ? (h("b", { innerHTML: salla.money(amount) })) : (h("span", { innerHTML: salla.money(amount) }))))));
39
39
  }
40
- renderDsicountRow() {
41
- return (this.summary?.discounts?.map(discount => (h("div", { class: "s-order-totals-card-row", key: discount.name }, h("div", { class: "s-order-totals-card-row-inner" }, h("dt", { class: "s-order-totals-card-discount" }, discount.name), h("dd", { class: "s-order-totals-card-value" }, discount.discount))))));
40
+ renderDiscountRow() {
41
+ return this.summary?.discounts?.map(discount => (h("div", { class: "s-order-totals-card-row", key: discount.name }, h("div", { class: "s-order-totals-card-row-inner" }, h("dt", { class: "s-order-totals-card-discount" }, discount.name), h("dd", { class: "s-order-totals-card-value" }, discount.discount)))));
42
+ }
43
+ renderRefundRow(amount) {
44
+ return (h("div", { class: "s-order-totals-card-row" }, h("div", { class: "s-order-totals-card-row-inner" }, h("dt", { class: "s-order-totals-card-refund-label" }, h("span", { class: "s-order-totals-card-refund-icon" }, h("i", { class: "sicon-info" })), h("span", null, " ", salla.lang.get('pages.orders.refund_amount'))), h("dd", { class: "s-order-totals-card-refund-value" }, h("b", { innerHTML: salla.money(amount) })))));
42
45
  }
43
46
  render() {
44
47
  if (!this.summary) {
@@ -47,12 +50,14 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
47
50
  const { summary } = this;
48
51
  const hasOptions = Array.isArray(summary.options) ? summary.options.length > 0 : false;
49
52
  return (h(Host, { class: "s-order-totals-card-wrapper" }, h("div", { class: "s-order-totals-card-panel" }, h("h2", { id: "summary-heading", class: "s-order-totals-card-heading" }, salla.lang.get('pages.orders.summary')), h("div", { class: "s-order-totals-card-flow" }, h("dl", { class: "s-order-totals-card-list" }, this.renderTotalRow(salla.lang.get('pages.cart.items_total'), summary.sub_total), hasOptions &&
50
- this.renderTotalRow(salla.lang.get('pages.cart.order_options_total'), summary.options_total), summary.discounts && this.renderDsicountRow(), summary.cod_cost &&
53
+ this.renderTotalRow(salla.lang.get('pages.cart.order_options_total'), summary.options_total), summary.discounts && this.renderDiscountRow(), summary.cod_cost &&
51
54
  this.renderTotalRow(salla.lang.get('pages.orders.cod_cost'), summary.cod_cost, ''), summary.shipping_cost &&
52
55
  this.renderTotalRow(salla.lang.get('pages.orders.shipping_cost'), summary.shipping_cost, 's-order-totals-card-shipping'), summary.tax &&
53
- this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.paid_amount ?
54
- this.renderTotalRow(salla.lang.get('pages.orders.partially_paid'), summary.paid_amount, '') : null, summary.remaining_amount ?
55
- this.renderTotalRow(salla.lang.get('pages.orders.remaining_amount'), summary.remaining_amount, '') : null, h("div", { class: "s-order-totals-card-total" }, this.renderTotalRow(salla.lang.get('pages.orders.final_total'), summary.total, 's-order-totals-card-total-label', 's-order-totals-card-total-value', true)))))));
56
+ this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.paid_amount
57
+ ? this.renderTotalRow(salla.lang.get('pages.orders.partially_paid'), summary.paid_amount, '')
58
+ : null, summary.remaining_amount
59
+ ? this.renderTotalRow(salla.lang.get('pages.orders.remaining_amount'), summary.remaining_amount, '')
60
+ : null, h("div", { class: "s-order-totals-card-total" }, this.renderTotalRow(salla.lang.get('pages.orders.final_total'), summary.total, 's-order-totals-card-total-label', 's-order-totals-card-total-value', true)), summary.refund_amount ? (h("div", { class: "s-order-totals-card-refund" }, this.renderRefundRow(summary.refund_amount))) : null)))));
56
61
  }
57
62
  static get watchers() { return {
58
63
  "order": ["handleOrderChange"]
@@ -662,13 +662,18 @@ window.SallaApplePay = {
662
662
 
663
663
  selectApplePayShippingMethod: (company_id, private_company_id) => {
664
664
  salla.logger.log('🍏 Pay: select shipping method ', 'company_id : ' + company_id, 'private_company_id: ' + private_company_id);
665
-
666
- return Http.requestWithSupportAjax(SallaApplePay.detail.shippingMethodSelected.url.replace('{id}', SallaApplePay.id), {
665
+ const payload = {
667
666
  address_id: SallaApplePay.address_id,
668
667
  company_id: company_id,
669
668
  private_company_id: private_company_id,
670
669
  payment_method: 'apple_pay'
671
- }, 'post').then(() => {
670
+ };
671
+ const selectedShippingMethod = SallaApplePay.shipping_methods?.find((item)=> item.company === company_id || item.ship_id === company_id);
672
+ if (selectedShippingMethod?.route_id){
673
+ payload.shipping_route_id = selectedShippingMethod.route_id;
674
+ payload.type = selectedShippingMethod.type;
675
+ }
676
+ return Http.requestWithSupportAjax(SallaApplePay.detail.shippingMethodSelected.url.replace('{id}', SallaApplePay.id), payload, 'post').then(() => {
672
677
  if (typeof SallaApplePay.detail.shippingMethodSelected.onSuccess === 'function') {
673
678
  SallaApplePay.detail.shippingMethodSelected.onSuccess(data);
674
679
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-BSnsSL0d.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.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-BSnsSL0d.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.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-BSnsSL0d.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.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-BSnsSL0d.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.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-BSnsSL0d.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.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-BSnsSL0d.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.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-BSnsSL0d.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {