@salla.sa/twilight-components 2.14.305 → 2.14.307

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 (145) hide show
  1. package/dist/cjs/{filepond-CGAkApL-.js → filepond-Btud-9cx.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DYFFANjm.js → filepond-plugin-file-poster--Gwmscgl.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-BtBMyItP.js → filepond-plugin-file-validate-size-BOJQxGjN.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-GEqsaFeg.js → filepond-plugin-file-validate-type-C77Hrmz7.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-BL8FuIZG.js → filepond-plugin-image-edit-DI9lM8fO.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BO_s8dgb.js → filepond-plugin-image-exif-orientation-DLoZc-P9.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-D1PeMZgA.js → filepond-plugin-image-preview-DHeIf3Qv.js} +1 -1
  8. package/dist/cjs/{index-DqxvZ_dy.js → index-BW35Qz0q.js} +1 -1
  9. package/dist/cjs/{index-BLIAsiFR.js → index-C_8SUOhh.js} +2 -2
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/salla-accordion_62.cjs.entry.js +95 -67
  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-custom-fields.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  45. package/dist/cjs/twilight.cjs.js +2 -2
  46. package/dist/collection/components/salla-file-upload/salla-file-upload.js +23 -14
  47. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +72 -61
  48. package/dist/components/index.js +2 -2
  49. package/dist/components/salla-file-upload2.js +22 -13
  50. package/dist/components/salla-rating-modal.js +64 -61
  51. package/dist/esm/{filepond-Cmwauemw.js → filepond-BDCqb9n1.js} +1 -1
  52. package/dist/esm/{filepond-plugin-file-poster-BiHq23PZ.js → filepond-plugin-file-poster-Csff9zr1.js} +1 -1
  53. package/dist/esm/{filepond-plugin-file-validate-size-ACFA-aZw.js → filepond-plugin-file-validate-size-uT0vdpSK.js} +1 -1
  54. package/dist/esm/{filepond-plugin-file-validate-type-CoLjBvRi.js → filepond-plugin-file-validate-type-C71qG90l.js} +1 -1
  55. package/dist/esm/{filepond-plugin-image-edit-WEb_gBFl.js → filepond-plugin-image-edit-AV3f4iVU.js} +1 -1
  56. package/dist/esm/{filepond-plugin-image-exif-orientation-CX72KA0b.js → filepond-plugin-image-exif-orientation-BrahCgFe.js} +1 -1
  57. package/dist/esm/{filepond-plugin-image-preview-D3MDyjxO.js → filepond-plugin-image-preview-B73Halt8.js} +1 -1
  58. package/dist/esm/{index-09rQwPEf.js → index-CkTB8LrG.js} +2 -2
  59. package/dist/esm/{index-BrA22FUH.js → index-DAIvUtTl.js} +1 -1
  60. package/dist/esm/loader.js +3 -3
  61. package/dist/esm/salla-accordion_62.entry.js +95 -67
  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-custom-fields.entry.js +1 -1
  69. package/dist/esm/salla-filters-widget.entry.js +1 -1
  70. package/dist/esm/salla-filters.entry.js +1 -1
  71. package/dist/esm/salla-installment.entry.js +1 -1
  72. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  73. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  74. package/dist/esm/salla-metadata.entry.js +1 -1
  75. package/dist/esm/salla-notification-item.entry.js +1 -1
  76. package/dist/esm/salla-notifications.entry.js +1 -1
  77. package/dist/esm/salla-offer.entry.js +1 -1
  78. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  79. package/dist/esm/salla-order-details-options.entry.js +1 -1
  80. package/dist/esm/salla-order-details.entry.js +1 -1
  81. package/dist/esm/salla-order-summary.entry.js +1 -1
  82. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  83. package/dist/esm/salla-orders.entry.js +1 -1
  84. package/dist/esm/salla-payments.entry.js +1 -1
  85. package/dist/esm/salla-price-range.entry.js +1 -1
  86. package/dist/esm/salla-review-card.entry.js +1 -1
  87. package/dist/esm/salla-reviews-page.entry.js +1 -1
  88. package/dist/esm/salla-reviews.entry.js +1 -1
  89. package/dist/esm/salla-social.entry.js +1 -1
  90. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  91. package/dist/esm/salla-tooltip.entry.js +1 -1
  92. package/dist/esm/salla-trust-badges.entry.js +1 -1
  93. package/dist/esm/salla-verify.entry.js +1 -1
  94. package/dist/esm/salla-wallet.entry.js +1 -1
  95. package/dist/esm/twilight.js +3 -3
  96. package/dist/twilight/{p-69603ed4.entry.js → p-07e3af79.entry.js} +1 -1
  97. package/dist/twilight/{p-e7e1f61b.entry.js → p-152cca87.entry.js} +1 -1
  98. package/dist/twilight/{p-a0242896.entry.js → p-1ac688b1.entry.js} +1 -1
  99. package/dist/twilight/{p-5b7fa291.entry.js → p-2bc66d76.entry.js} +1 -1
  100. package/dist/twilight/{p-bc00393d.entry.js → p-2e1acb31.entry.js} +1 -1
  101. package/dist/twilight/{p-352c96bd.entry.js → p-2f0c4c48.entry.js} +1 -1
  102. package/dist/twilight/{p-5341d148.entry.js → p-369e287b.entry.js} +1 -1
  103. package/dist/twilight/{p-9d1346f5.entry.js → p-391bfab0.entry.js} +1 -1
  104. package/dist/twilight/{p-57aa0484.entry.js → p-39fbc8df.entry.js} +1 -1
  105. package/dist/twilight/{p-302a4e27.entry.js → p-3d65ce04.entry.js} +1 -1
  106. package/dist/twilight/{p-714fa08b.entry.js → p-49d27a30.entry.js} +1 -1
  107. package/dist/twilight/{p-20f27ca5.entry.js → p-4b743277.entry.js} +1 -1
  108. package/dist/twilight/{p-d1d77250.entry.js → p-50066053.entry.js} +1 -1
  109. package/dist/twilight/{p-62f245c1.entry.js → p-5e393287.entry.js} +1 -1
  110. package/dist/twilight/{p-717fafd1.entry.js → p-683db036.entry.js} +1 -1
  111. package/dist/twilight/{p-05f6c6ba.entry.js → p-69d77416.entry.js} +1 -1
  112. package/dist/twilight/{p-aeb3e351.entry.js → p-6da8bb12.entry.js} +1 -1
  113. package/dist/twilight/{p-fc82cede.entry.js → p-774db722.entry.js} +1 -1
  114. package/dist/twilight/{p-480b46b6.entry.js → p-7826e12d.entry.js} +1 -1
  115. package/dist/twilight/{p-3e0508dc.entry.js → p-7fec8b2b.entry.js} +1 -1
  116. package/dist/twilight/{p-Di6S6G0K.js → p-85r8le_w.js} +1 -1
  117. package/dist/twilight/{p-8433e94f.entry.js → p-89ed3133.entry.js} +1 -1
  118. package/dist/twilight/{p-D7JM1EWO.js → p-AkZZv6o3.js} +1 -1
  119. package/dist/twilight/{p-BCHGvsP5.js → p-CDzETZL4.js} +1 -1
  120. package/dist/twilight/{p-BF067TIH.js → p-CR3Odb2N.js} +1 -1
  121. package/dist/twilight/p-CkTB8LrG.js +5 -0
  122. package/dist/twilight/{p-BgYaybbS.js → p-CoViVjAD.js} +1 -1
  123. package/dist/twilight/{p-Dd-AI-4W.js → p-D9xbcyYI.js} +1 -1
  124. package/dist/twilight/{p-Dd-pZ28X.js → p-Wr2wkBmL.js} +1 -1
  125. package/dist/twilight/{p-57520514.entry.js → p-a4b4dfb6.entry.js} +1 -1
  126. package/dist/twilight/{p-3bcb3760.entry.js → p-a5611c44.entry.js} +1 -1
  127. package/dist/twilight/{p-f4d28445.entry.js → p-b1eb710a.entry.js} +1 -1
  128. package/dist/twilight/{p-0aa95e1e.entry.js → p-c4312308.entry.js} +1 -1
  129. package/dist/twilight/p-c7aec160.entry.js +11 -0
  130. package/dist/twilight/{p-218a9eb2.entry.js → p-d1e5e51e.entry.js} +1 -1
  131. package/dist/twilight/{p-fd157d55.entry.js → p-d3fc316c.entry.js} +1 -1
  132. package/dist/twilight/{p-8332a8ef.entry.js → p-d70e73be.entry.js} +1 -1
  133. package/dist/twilight/{p-76d9eaa3.entry.js → p-dbe530e9.entry.js} +1 -1
  134. package/dist/twilight/{p-e53b912e.entry.js → p-e0386eb6.entry.js} +1 -1
  135. package/dist/twilight/{p-52021ccb.entry.js → p-e086a18a.entry.js} +1 -1
  136. package/dist/twilight/{p-b01fdd25.entry.js → p-e41ed882.entry.js} +1 -1
  137. package/dist/twilight/{p-5e96a2f6.entry.js → p-ea727ca3.entry.js} +1 -1
  138. package/dist/twilight/{p-BssKqCoe.js → p-xlB0zmD0.js} +1 -1
  139. package/dist/twilight/twilight.esm.js +1 -1
  140. package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +5 -5
  141. package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +21 -19
  142. package/dist/types/components.d.ts +2 -2
  143. package/package.json +5 -5
  144. package/dist/twilight/p-09rQwPEf.js +0 -5
  145. package/dist/twilight/p-73072d04.entry.js +0 -11
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement, c as createEvent, d as getDefaultExportFromCjs, F as Fragment, j as axios } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement, c as createEvent, d as getDefaultExportFromCjs, F as Fragment, j as axios } from './index-CkTB8LrG.js';
5
5
  import { a as anime } from './anime.es-CgtvEd63.js';
6
6
  import { A as ArrowDownIcon, S as SpecialDiscountIcon } from './special-discount-yRO-ZESF.js';
7
7
  import { I as IconVerified } from './check-uTyAzPSy.js';
@@ -3524,13 +3524,13 @@ const SallaFileUpload = class {
3524
3524
  return;
3525
3525
  try {
3526
3526
  const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
3527
- import('./filepond-Cmwauemw.js').then(function (n) { return n.f; }),
3528
- import('./filepond-plugin-file-validate-size-ACFA-aZw.js').then(function (n) { return n.f; }),
3529
- import('./filepond-plugin-image-exif-orientation-CX72KA0b.js').then(function (n) { return n.f; }),
3530
- import('./filepond-plugin-image-preview-D3MDyjxO.js').then(function (n) { return n.f; }),
3531
- import('./filepond-plugin-image-edit-WEb_gBFl.js').then(function (n) { return n.f; }),
3532
- import('./filepond-plugin-file-validate-type-CoLjBvRi.js').then(function (n) { return n.f; }),
3533
- import('./filepond-plugin-file-poster-BiHq23PZ.js').then(function (n) { return n.f; })
3527
+ import('./filepond-BDCqb9n1.js').then(function (n) { return n.f; }),
3528
+ import('./filepond-plugin-file-validate-size-uT0vdpSK.js').then(function (n) { return n.f; }),
3529
+ import('./filepond-plugin-image-exif-orientation-BrahCgFe.js').then(function (n) { return n.f; }),
3530
+ import('./filepond-plugin-image-preview-B73Halt8.js').then(function (n) { return n.f; }),
3531
+ import('./filepond-plugin-image-edit-AV3f4iVU.js').then(function (n) { return n.f; }),
3532
+ import('./filepond-plugin-file-validate-type-C71qG90l.js').then(function (n) { return n.f; }),
3533
+ import('./filepond-plugin-file-poster-Csff9zr1.js').then(function (n) { return n.f; })
3534
3534
  ]);
3535
3535
  this.FilePond = FilePondModule;
3536
3536
  // Register plugins
@@ -3824,11 +3824,11 @@ const SallaFileUpload = class {
3824
3824
  }
3825
3825
  }
3826
3826
  render() {
3827
- return (h(Host, { key: '68939496fd8cfcc89a7a5d21e7e4daedab0db536', class: {
3827
+ return (h(Host, { key: '45383bff9bc408ef0328e888751827e6fc70038d', class: {
3828
3828
  "s-file-upload": true,
3829
3829
  "s-file-upload-profile-image": this.profileImage,
3830
3830
  "s-file-upload-multiple": this.allowMultiple,
3831
- } }, h("input", { key: 'adef3f296d759850322faf038602143a0239201d', type: "file", name: this.name, value: this.value, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.maxFilesCount)) : '', h("input", { key: 'dc74f8a155eeedd294548f782ed158f1a889b373', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.value, ref: input => this.hiddenInput = input })));
3831
+ } }, h("input", { key: '323e469923868db4e322d67c1dd8a7efc245fe5f', type: "file", name: this.name, value: this.value, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.maxFilesCount)) : '', h("input", { key: '42458ac28b13ba4e6c6dc80a30054e0e567a9366', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.value, ref: input => this.hiddenInput = input })));
3832
3832
  }
3833
3833
  componentDidLoad() {
3834
3834
  let files = this.getFiles();
@@ -3869,10 +3869,18 @@ const SallaFileUpload = class {
3869
3869
  },
3870
3870
  onprocessfile: (error, file) => {
3871
3871
  if (this.allowMultiple && !error) {
3872
- const lastUploadedFile = this.uploadedFiles[this.uploadedFiles.length - 1];
3873
- if (lastUploadedFile) {
3874
- file.setMetadata('id', lastUploadedFile.id, true);
3875
- file.setMetadata('url', lastUploadedFile.url, true);
3872
+ // Find the uploaded file data using the serverId returned from onload
3873
+ const serverId = file.serverId;
3874
+ const uploadedFile = this.uploadedFiles.find(f => f.id === serverId);
3875
+ if (uploadedFile) {
3876
+ // Set metadata on the file
3877
+ file.setMetadata('id', uploadedFile.id, true);
3878
+ file.setMetadata('url', uploadedFile.url, true);
3879
+ this.value = {
3880
+ id: uploadedFile.id,
3881
+ url: uploadedFile.url
3882
+ };
3883
+ this.uploadedHandler();
3876
3884
  }
3877
3885
  }
3878
3886
  },
@@ -3913,20 +3921,21 @@ const SallaFileUpload = class {
3913
3921
  let responseData = JSON.parse(response).data;
3914
3922
  if ((this.instantUpload || this.allowMultiple) && Array.isArray(responseData) && responseData.length > 0) {
3915
3923
  const fileId = `${this.host.id}-${Math.floor(100 + Math.random() * 900)}`;
3924
+ const fileUrl = responseData[0];
3925
+ // Store the upload result to be picked up by onprocessfile
3916
3926
  this.uploadedFiles.push({
3917
3927
  id: fileId,
3918
- url: responseData[0]
3928
+ url: fileUrl
3919
3929
  });
3920
- this.value = {
3921
- id: fileId,
3922
- url: responseData[0]
3923
- };
3930
+ // Return the serverId that FilePond will use to identify this file
3931
+ // We'll use the fileId as the serverId
3932
+ return fileId;
3924
3933
  }
3925
3934
  else {
3926
3935
  this.value = responseData.filePath || responseData.url;
3936
+ this.uploadedHandler();
3937
+ return this.value;
3927
3938
  }
3928
- this.uploadedHandler();
3929
- return this.value;
3930
3939
  },
3931
3940
  headers: salla.api.getHeaders(),
3932
3941
  onerror: response => {
@@ -10675,6 +10684,15 @@ const SallaRatingModal = class {
10675
10684
  registerInstance(this, hostRef);
10676
10685
  this.hasError = false;
10677
10686
  this.showContactWidget = true;
10687
+ this.images = [];
10688
+ this.productImages = {};
10689
+ this.editItemImages = [];
10690
+ this.contact_body = (store, id, customer) => salla.lang.get('pages.rating.contact_subject', { store, id, customer });
10691
+ this.editMode = false;
10692
+ this.defaultMode = false;
10693
+ this.deleteMode = false;
10694
+ this.shouldOpenDeleteModal = false;
10695
+ this.editItem = null;
10678
10696
  this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
10679
10697
  this.contactSubjectLabel = salla.lang.get('pages.rating.contact_subject');
10680
10698
  this.editReviewLabel = salla.lang.get('pages.rating.edit_review');
@@ -10688,24 +10706,16 @@ const SallaRatingModal = class {
10688
10706
  this.confirmDeleteBtn = salla.lang.get('common.elements.confirm_delete');
10689
10707
  this.updatedSuccessfullyLabel = salla.lang.get("pages.rating.review_updated_successfully");
10690
10708
  this.deletedSuccessfullyLabel = salla.lang.get("pages.rating.review_deleted_successfully");
10709
+ this.contactUsLabel = salla.lang.get('blocks.footer.social');
10691
10710
  this.allowAttachImages = salla.config.get('store.settings.rating.allow_attach_images');
10692
10711
  this.allowContactSupport = salla.config.get('store.settings.rating.allow_contact_support');
10693
- this.contactUsLabel = salla.lang.get('blocks.footer.social');
10694
- this.images = [];
10695
- this.productImages = {};
10696
- this.editItemImages = [];
10697
- this.contact_body = (store, id, customer) => salla.lang.get('pages.rating.contact_subject', { store, id, customer });
10698
- this.editMode = false;
10699
- this.defaultMode = false;
10700
- this.deleteMode = false;
10701
- this.shouldOpenDeleteModal = false;
10702
- this.editItem = null;
10703
10712
  this.contentRefs = [];
10704
10713
  this.hiddenInputs = [];
10705
10714
  this.isOpen = [];
10706
10715
  this.stepsCount = 0;
10707
10716
  this.currentIndex = 0;
10708
10717
  this.submitted = [];
10718
+ this.MAX_UPLOAD_LIMIT = 3;
10709
10719
  this.onOpen = (index) => {
10710
10720
  return new Promise((resolve) => {
10711
10721
  anime({
@@ -10736,7 +10746,7 @@ const SallaRatingModal = class {
10736
10746
  await (this.isOpen[index] ? this.onOpen(index) : this.onClose(index));
10737
10747
  await new Promise((resolve) => setTimeout(resolve, 101));
10738
10748
  if (this.body && this.currentTab) {
10739
- setTimeout(() => this.body.setAttribute('style', 'height:' + (this.currentTab.offsetHeight + (this.editMode ? 60 : 0)) + 'px'));
10749
+ setTimeout(() => this.body.setAttribute('style', `height:${this.currentTab.offsetHeight + (this.editMode ? 60 : 0)}px`));
10740
10750
  }
10741
10751
  };
10742
10752
  salla.onReady(() => {
@@ -10769,8 +10779,10 @@ const SallaRatingModal = class {
10769
10779
  await setNestedAsync('en.trans', 'pages.rating.review_updated_successfully', 'The review has been successfully updated.');
10770
10780
  await setNestedAsync('ar.trans', 'pages.rating.review_deleted_successfully', 'تم حذف التقييم بنجاح');
10771
10781
  await setNestedAsync('en.trans', 'pages.rating.review_deleted_successfully', 'The review has been successfully deleted.');
10772
- await setNestedAsync('ar.trans', 'common.uploader.max_three_images', '.أضف 3 صور كحد أقصى');
10773
- await setNestedAsync('en.trans', 'common.uploader.max_three_images', 'Add up to 3 images maximum.');
10782
+ await setNestedAsync('ar.trans', 'pages.rating.images_count', 'الصور ( :current من أصل :total )');
10783
+ await setNestedAsync('en.trans', 'pages.rating.images_count', 'Images ( :current of :total )');
10784
+ await setNestedAsync('ar.trans', 'common.uploader.max_three_images', `.أضف ${this.MAX_UPLOAD_LIMIT} صور كحد أقصى`);
10785
+ await setNestedAsync('en.trans', 'common.uploader.max_three_images', `Add up to ${this.MAX_UPLOAD_LIMIT} images maximum.`);
10774
10786
  await setNestedAsync('ar.trans', 'common.elements.confirm_delete', 'تأكيد الحذف');
10775
10787
  await setNestedAsync('en.trans', 'common.elements.confirm_delete', 'Confirm deletion');
10776
10788
  this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
@@ -10799,7 +10811,17 @@ const SallaRatingModal = class {
10799
10811
  return new Promise((resolve) => {
10800
10812
  setTimeout(() => {
10801
10813
  this.modal.open().then(() => this.order || salla.api.withoutNotifier(() => salla.rating.api.order(this.orderId ? this.orderId : salla.config.get('page.id'))).then(res => this.order = res.data))
10802
- .then(() => this.modal.setTitle(salla.lang.get('pages.rating.rate_order') + ' <span class="unicode">(#' + this.order.id + ')</span>'))
10814
+ .then(() => this.modal.setTitle(`${salla.lang.get('pages.rating.rate_order')} <span class="unicode">(#${this.order.id})</span>`))
10815
+ .then(() => {
10816
+ // Initialize productImages for all products
10817
+ const initialImages = {};
10818
+ if (this.order?.products) {
10819
+ for (const item of this.order.products) {
10820
+ initialImages[item.product.id] = [];
10821
+ }
10822
+ }
10823
+ this.productImages = initialImages;
10824
+ })
10803
10825
  .then(() => this.modal.stopLoading())
10804
10826
  .then(() => this.stepsCount = [this.order.testimonials_enabled, this.order.products_enabled, this.order.shipping_enabled].filter(enabled => enabled).length)
10805
10827
  .then(() => setTimeout(() => this.handleWizard(), 100))
@@ -10838,9 +10860,9 @@ const SallaRatingModal = class {
10838
10860
  }
10839
10861
  }
10840
10862
  async editReview() {
10841
- let data = {};
10863
+ const data = {};
10842
10864
  this.editModal.querySelectorAll('[name]').forEach((input) => {
10843
- let inputData = salla.helpers.inputData(input.name, input.value, data);
10865
+ const inputData = salla.helpers.inputData(input.name, input.value, data);
10844
10866
  data[inputData.name] = inputData.value;
10845
10867
  });
10846
10868
  data.images && (data.images = data.images.split(','));
@@ -10890,16 +10912,16 @@ const SallaRatingModal = class {
10890
10912
  this.currentTab = current || this.steps[this.currentIndex];
10891
10913
  Helper.toggleClassIf('.s-rating-modal-step-dot', 's-rating-modal-bg-gray', 's-rating-modal-bg-primary', dot => dot != this.dots[this.currentIndex])
10892
10914
  .toggleClassIf('.s-rating-modal-step', 's-rating-modal-active', 's-rating-modal-hidden', tab => tab == this.currentTab);
10893
- if (this.currentIndex != 0) {
10915
+ if (this.currentIndex !== 0) {
10894
10916
  // the animation
10895
10917
  Helper.toggleElementClassIf(this.currentTab, 's-rating-modal-unactive', 's-rating-modal-hidden', () => true);
10896
10918
  setTimeout(() => Helper.toggleElementClassIf(this.currentTab, 's-rating-modal-active', 's-rating-modal-unactive', () => true), 300);
10897
10919
  }
10898
10920
  // Btn text
10899
- let nextType = this.steps[this.currentIndex + 1]?.dataset.type;
10900
- this.nextBtn?.setText(nextType ? salla.lang.get('pages.rating.rate') + ' ' + salla.lang.get('pages.rating.' + nextType)
10921
+ const nextType = this.steps[this.currentIndex + 1]?.dataset.type;
10922
+ this.nextBtn?.setText(nextType ? `${salla.lang.get('pages.rating.rate')} ${salla.lang.get(`pages.rating.${nextType}`)}`
10901
10923
  : salla.lang.get('pages.rating.send_ratings'));
10902
- setTimeout(() => this.body?.setAttribute('style', 'height:' + this.currentTab?.offsetHeight + 'px'));
10924
+ setTimeout(() => this.body?.setAttribute('style', `height:${this.currentTab?.offsetHeight}px`));
10903
10925
  }
10904
10926
  previousTab() {
10905
10927
  this.currentIndex > 0 && this.currentIndex--;
@@ -10942,15 +10964,13 @@ const SallaRatingModal = class {
10942
10964
  validationMessage.innerHTML = salla.lang.get(`pages.rating.rate_${type}_stars`).replace(' (:item)', '');
10943
10965
  throw new Error(validationMessage.innerHTML);
10944
10966
  }
10945
- else {
10946
- validationMessage.innerHTML = '';
10947
- }
10967
+ validationMessage.innerHTML = '';
10948
10968
  }
10949
10969
  sendFeedback() {
10950
- let data = {};
10970
+ const data = {};
10951
10971
  this.currentTab.querySelectorAll('[name]').forEach((input) => {
10952
10972
  //decode names like `<input name="jamal[inner]" value="hi">` to be {name:jamal, value: {inner:"hi"}}
10953
- let inputData = salla.helpers.inputData(input.name, input.value, data);
10973
+ const inputData = salla.helpers.inputData(input.name, input.value, data);
10954
10974
  data[inputData.name] = inputData.value;
10955
10975
  });
10956
10976
  if (this.allowAttachImages && data.products) {
@@ -10963,15 +10983,15 @@ const SallaRatingModal = class {
10963
10983
  if (Object.keys(data).length == 0) {
10964
10984
  return;
10965
10985
  }
10966
- data['order_id'] = this.orderId;
10967
- data['type'] = this.currentTab.dataset.type;
10986
+ data.order_id = this.orderId;
10987
+ data.type = this.currentTab.dataset.type;
10968
10988
  this.submitted.push(this.currentIndex);
10969
10989
  return salla.rating.api[this.currentTab.dataset.type](data);
10970
10990
  }
10971
10991
  showThankYou() {
10972
10992
  let seconds = 10;
10973
10993
  let timeToClose = setInterval(() => {
10974
- this.thanksTime.innerHTML = '00:0' + (seconds--);
10994
+ this.thanksTime.innerHTML = `00:0${seconds--}`;
10975
10995
  if (seconds > 0) {
10976
10996
  return;
10977
10997
  }
@@ -11006,7 +11026,7 @@ const SallaRatingModal = class {
11006
11026
  if (isOpen.detail) {
11007
11027
  return;
11008
11028
  }
11009
- this.modal && this.modal.close();
11029
+ this.modal?.close();
11010
11030
  this.editItem = null;
11011
11031
  this.editItemImages = [];
11012
11032
  this.hiddenInputs[1] && (this.hiddenInputs[1].value = '');
@@ -11020,11 +11040,16 @@ const SallaRatingModal = class {
11020
11040
  getDeleteModal() {
11021
11041
  return (h("salla-modal", { ref: modal => this.deleteModal = modal, width: "xs", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-delete-wrapper", ref: el => this.body = el }, h("h3", null, this.confirmDeletionLabel), h("p", null, this.areYouSureLabel), h("div", { class: "s-rating-modal-delete-actions" }, h("salla-button", { loaderPosition: 'center', onClick: () => this.deleteReview() }, this.confirmDeleteBtn), h("salla-button", { color: 'danger', fill: 'outline', onClick: () => this.deleteModal.close() }, this.cancelLabel)))));
11022
11042
  }
11043
+ renderUploadedImagesCount(productId) {
11044
+ // In edit mode, use editItemImages; in default mode, use productImages
11045
+ const imageCount = this.editMode ? this.editItemImages.length : (this.productImages[productId] || []).length;
11046
+ return (h("span", { class: "s-rating-modal-upload-count" }, salla.lang.choice("pages.rating.images_count", imageCount, { current: imageCount, total: this.MAX_UPLOAD_LIMIT })));
11047
+ }
11023
11048
  getEditModal() {
11024
11049
  return (h("salla-modal", { ref: modal => this.editModal = modal, width: "md", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-edit-wrapper", ref: el => this.body = el }, this.editType === "store" && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "store", ref: currentTab => this.currentTab = currentTab }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", value: this.editItem.content, class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType === "shipping" && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "shipping", ref: currentTab => this.currentTab = currentTab }, this.editItem.shipping.logo
11025
11050
  ? h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.editItem.shipping.logo, class: "s-rating-modal-shipping-logo", alt: this.editItem.shipping.name }))
11026
- : h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }), h("div", { class: "s-rating-modal-title" }, " ", salla.lang.get('pages.rating.rate_shipping') + ' ' + this.editItem.shipping.name), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", class: "s-rating-modal-comment", value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType == "product" && this.editItem ? h("section", { class: "s-rating-modal-step", "data-type": "products", ref: currentTab => this.currentTab = currentTab }, h("div", { class: "s-rating-modal-product" }, h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: this.editItem.product.image.url, alt: this.editItem.product.name, class: "s-rating-modal-product-img" })), h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-details-main" }, h("div", null, h("h3", { class: "s-rating-modal-product-title" }, " ", this.editItem.product.name), h("div", { class: "s-rating-modal-stars-product" }, h("salla-rating-stars", { withLabel: true, size: "small", editable: true, value: this.editItem.stars }))), this.allowAttachImages && h("salla-button", { class: `s-comments-item-like-btn mt-0`, loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleUploader(1) }, h("span", null, this.editItemImages.length ? this.editImagesLabel : this.addImagesLabel), h("span", { innerHTML: ImageIcon }))), h("textarea", { value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_product_rate'), name: "content", class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-closed", ref: (el) => (this.contentRefs[1] = el) }, h("salla-file-upload", { name: "images", allowMultiple: true, maxFilesCount: 3, imagePreviewHeight: 117, filePosterHeight: 117, "instant-upload": true, type: "feedback", files: JSON.stringify(this.editItemImages), payloadName: "files[]", id: `file-${this.editItem.product.id}`, title: this.editItem.product.name, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: (e) => {
11027
- this.editItemImages.push(e.detail);
11051
+ : h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }), h("div", { class: "s-rating-modal-title" }, " ", `${salla.lang.get('pages.rating.rate_shipping')} ${this.editItem.shipping.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", class: "s-rating-modal-comment", value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType == "product" && this.editItem ? h("section", { class: "s-rating-modal-step", "data-type": "products", ref: currentTab => this.currentTab = currentTab }, h("div", { class: "s-rating-modal-product" }, h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: this.editItem.product.image.url, alt: this.editItem.product.name, class: "s-rating-modal-product-img" })), h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-details-main" }, h("div", null, h("h3", { class: "s-rating-modal-product-title" }, " ", this.editItem.product.name), h("div", { class: "s-rating-modal-stars-product" }, h("salla-rating-stars", { withLabel: true, size: "small", editable: true, value: this.editItem.stars }))), this.allowAttachImages && h("salla-button", { class: "s-comments-item-like-btn mt-0", loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleUploader(1) }, h("span", null, this.editItemImages.length ? this.editImagesLabel : this.addImagesLabel), h("span", { innerHTML: ImageIcon }))), h("textarea", { value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_product_rate'), name: "content", class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-closed", ref: (el) => (this.contentRefs[1] = el) }, h("salla-file-upload", { name: "images", allowMultiple: true, maxFilesCount: this.MAX_UPLOAD_LIMIT, imagePreviewHeight: 117, filePosterHeight: 117, "instant-upload": true, type: "feedback", files: JSON.stringify(this.editItemImages), payloadName: "files[]", id: `file-${this.editItem.product.id}`, title: this.editItem.product.name, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: (e) => {
11052
+ this.editItemImages = [...this.editItemImages, e.detail];
11028
11053
  this.hiddenInputs[1].value = this.editItemImages.map(img => img.url).join();
11029
11054
  }, onRemoved: (e) => {
11030
11055
  const removedId = e.detail;
@@ -11032,7 +11057,7 @@ const SallaRatingModal = class {
11032
11057
  return;
11033
11058
  this.editItemImages = this.editItemImages.filter(img => img.id !== removedId);
11034
11059
  this.hiddenInputs[1].value = this.editItemImages.map(img => img.url).join();
11035
- }, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: "images", value: this.editItem.images.join(','), ref: (el) => (this.hiddenInputs[1] = el) })))))
11060
+ }, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: "images", value: this.editItem.images.join(','), ref: (el) => (this.hiddenInputs[1] = el) }), this.renderUploadedImagesCount(this.editItem.product.id)))))
11036
11061
  : null, h("div", { class: "s-rating-modal-footer s-rating-modal-footer-end" }, h("salla-button", { "loader-position": 'center', onClick: () => this.editReview() }, this.editReviewLabel)))));
11037
11062
  }
11038
11063
  render() {
@@ -11043,28 +11068,31 @@ const SallaRatingModal = class {
11043
11068
  return h(Host, { class: "s-rating-modal" }, this.getEditModal());
11044
11069
  }
11045
11070
  if (this.defaultMode) {
11046
- return (h(Host, { class: "s-rating-modal" }, h("salla-modal", { class: "s-rating-modal-wrap", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen), isLoading: true, width: "md", ref: modal => this.modal = modal }, h("div", { slot: 'loading' }, h("div", { class: "s-rating-modal-skeleton" }, h("salla-skeleton", { type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { height: '15px', width: '60%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("div", { class: "s-rating-modal-skeleton-stars" }, [...Array(5)].map(() => h("div", { innerHTML: WishListIcon }))), h("salla-skeleton", { height: '100px', width: '100%' }), h("div", { class: "s-rating-modal-skeleton-footer" }, h("salla-skeleton", { height: '40px', width: '30%' })))), !this.hasError && this.order
11071
+ return (h(Host, { class: "s-rating-modal" }, h("salla-modal", { class: "s-rating-modal-wrap", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen), isLoading: true, width: "md", ref: modal => this.modal = modal }, h("div", { slot: 'loading' }, h("div", { class: "s-rating-modal-skeleton" }, h("salla-skeleton", { type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { height: '15px', width: '60%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("div", { class: "s-rating-modal-skeleton-stars" }, [...Array(5)].map((v) => h("div", { key: v, innerHTML: WishListIcon }))), h("salla-skeleton", { height: '100px', width: '100%' }), h("div", { class: "s-rating-modal-skeleton-footer" }, h("salla-skeleton", { height: '40px', width: '30%' })))), !this.hasError && this.order
11047
11072
  ? [h("div", { class: "s-rating-modal-wrapper", ref: el => this.body = el }, this.order?.testimonials_enabled ?
11048
11073
  h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "store" }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))
11049
11074
  : '', this.order.products_enabled
11050
- ? h("section", { class: "s-rating-modal-step s-rating-modal-hidden", "data-type": "products" }, this.order.products.map((item, index) => h("div", { class: "s-rating-modal-product", key: index }, h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: item.product.thumbnail, alt: item.product.name, class: "s-rating-modal-product-img" })), h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-details-main" }, h("div", null, h("h3", { class: "s-rating-modal-product-title" }, " ", item.product.name), h("div", { class: "s-rating-modal-stars-product" }, h("salla-rating-stars", { withLabel: true, size: "small", name: `products[${index}][rating]` }))), this.allowAttachImages && h("salla-button", { class: `s-comments-item-like-btn mt-0`, loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleUploader(index) }, h("span", null, this.addImagesLabel), h("span", { innerHTML: ImageIcon }))), h("input", { type: "hidden", name: `products[${index}][product_id]`, value: item.product.id }), h("textarea", { placeholder: salla.lang.get('pages.rating.write_product_rate'), name: `products[${index}][comment]`, class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-closed", ref: (el) => (this.contentRefs[index] = el) }, h("salla-file-upload", { name: "image", maxFilesCount: 3, imagePreviewHeight: 117, "instant-upload": true, type: "feedback", payloadName: "files[]", id: `file-${item.product.id}`, title: item.product.name, allowMultiple: true, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: (e) => {
11051
- if (!this.productImages[item.product.id]) {
11052
- this.productImages[item.product.id] = [];
11053
- }
11054
- this.productImages[item.product.id].push(e.detail);
11055
- this.hiddenInputs[index].value = this.productImages[item.product.id].map(img => img.url);
11075
+ ? h("section", { class: "s-rating-modal-step s-rating-modal-hidden", "data-type": "products" }, this.order.products.map((item, index) => h("div", { class: "s-rating-modal-product", key: index }, h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: item.product.thumbnail, alt: item.product.name, class: "s-rating-modal-product-img" })), h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-details-main" }, h("div", null, h("h3", { class: "s-rating-modal-product-title" }, " ", item.product.name), h("div", { class: "s-rating-modal-stars-product" }, h("salla-rating-stars", { withLabel: true, size: "small", name: `products[${index}][rating]` }))), this.allowAttachImages && h("salla-button", { class: "s-comments-item-like-btn mt-0", loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleUploader(index) }, h("span", null, this.addImagesLabel), h("span", { innerHTML: ImageIcon }))), h("input", { type: "hidden", name: `products[${index}][product_id]`, value: item.product.id }), h("textarea", { placeholder: salla.lang.get('pages.rating.write_product_rate'), name: `products[${index}][comment]`, class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-closed", ref: (el) => (this.contentRefs[index] = el) }, h("salla-file-upload", { name: "image", maxFilesCount: this.MAX_UPLOAD_LIMIT, imagePreviewHeight: 117, "instant-upload": true, type: "feedback", payloadName: "files[]", id: `file-${item.product.id}`, title: item.product.name, allowMultiple: true, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: (e) => {
11076
+ this.productImages = {
11077
+ ...this.productImages,
11078
+ [item.product.id]: [...(this.productImages[item.product.id] || []), e.detail]
11079
+ };
11080
+ this.hiddenInputs[index].value = this.productImages[item.product.id].map(img => img.url).join(',');
11056
11081
  }, onRemoved: (e) => {
11057
11082
  const removedId = e.detail;
11058
- if (!removedId)
11083
+ if (!removedId || !this.productImages[item.product.id])
11059
11084
  return;
11060
- this.productImages[item.product.id] = this.productImages[item.product.id].filter(img => img.id !== removedId);
11061
- this.hiddenInputs[index].value = this.productImages[item.product.id].map(img => img.url);
11062
- }, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: `products[${index}][images]`, value: JSON.stringify(this.productImages[item.product.id]), ref: (el) => (this.hiddenInputs[index] = el) }))))))
11085
+ this.productImages = {
11086
+ ...this.productImages,
11087
+ [item.product.id]: this.productImages[item.product.id].filter(img => img.id !== removedId)
11088
+ };
11089
+ this.hiddenInputs[index].value = this.productImages[item.product.id].map(img => img.url).join(',');
11090
+ }, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: `products[${index}][images]`, value: (this.productImages[item.product.id] || []).map(img => img.url).join(','), ref: (el) => (this.hiddenInputs[index] = el) }), this.renderUploadedImagesCount(item.product.id))))))
11063
11091
  : '', this.order.shipping_enabled && this.order.shipping?.company
11064
11092
  ? h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "shipping" }, h("input", { type: "hidden", name: "shipping_company_id", value: this.order.shipping.company.id }), this.order.shipping.company.logo
11065
11093
  ? h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.order.shipping.company.logo, class: "s-rating-modal-shipping-logo", alt: this.order.shipping.company.name }))
11066
- : h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }), h("div", { class: "s-rating-modal-title" }, " ", salla.lang.get('pages.rating.rate_shipping') + ' ' + this.order.shipping.company.name), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))
11067
- : '', h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => this.thanksTab = el }, h("span", { class: "s-rating-modal-icon", innerHTML: CheckCircle2 }), h("h3", { class: "s-rating-modal-thanks-title" }, salla.lang.get('pages.rating.thanks')), h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }), h("time", { class: "s-rating-modal-thanks-time", ref: el => this.thanksTime = el }))), this.allowContactSupport && this.showContactWidget && (salla.config.get('store.contacts.whatsapp') || salla.config.get('store.contacts.email')) ? h("div", { class: "s-rating-modal-contact" }, h("p", null, this.contactUsLabel), h("div", { class: "s-rating-modal-contact-icons" }, salla.config.get('store.contacts.whatsapp') && h("span", { onClick: () => this.handleSendWhatsApp(), innerHTML: whatsapp$1 }), salla.config.get('store.contacts.email') && h("span", { onClick: () => this.handleSendEmail(), innerHTML: MailIcon }))) : '', h("div", { class: "s-rating-modal-footer" }, h("button", { ref: el => this.backBtn = el, onClick: () => this.previousTab(), class: "s-rating-modal-btn s-rating-modal-unvisiable" }, salla.lang.get('common.elements.back')), this.stepsCount > 1 ? h("ul", { class: "s-rating-modal-dots" }, [0, 1, 2].slice(0, this.stepsCount).map(() => h("li", { class: 's-rating-modal-bg-gray s-rating-modal-step-dot' }))) : '', h("salla-button", { "loader-position": 'center', ref: el => this.nextBtn = el, onClick: () => this.submit() }, salla.lang.get('common.elements.next')))]
11094
+ : h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }), h("div", { class: "s-rating-modal-title" }, " ", `${salla.lang.get('pages.rating.rate_shipping')} ${this.order.shipping.company.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))
11095
+ : '', h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => this.thanksTab = el }, h("span", { class: "s-rating-modal-icon", innerHTML: CheckCircle2 }), h("h3", { class: "s-rating-modal-thanks-title" }, salla.lang.get('pages.rating.thanks')), h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }), h("time", { class: "s-rating-modal-thanks-time", ref: el => this.thanksTime = el }))), this.allowContactSupport && this.showContactWidget && (salla.config.get('store.contacts.whatsapp') || salla.config.get('store.contacts.email')) ? h("div", { class: "s-rating-modal-contact" }, h("p", null, this.contactUsLabel), h("div", { class: "s-rating-modal-contact-icons" }, salla.config.get('store.contacts.whatsapp') && h("span", { onClick: () => this.handleSendWhatsApp(), innerHTML: whatsapp$1 }), salla.config.get('store.contacts.email') && h("span", { onClick: () => this.handleSendEmail(), innerHTML: MailIcon }))) : '', h("div", { class: "s-rating-modal-footer" }, h("button", { ref: el => this.backBtn = el, onClick: () => this.previousTab(), class: "s-rating-modal-btn s-rating-modal-unvisiable" }, salla.lang.get('common.elements.back')), this.stepsCount > 1 ? h("ul", { class: "s-rating-modal-dots" }, [0, 1, 2].slice(0, this.stepsCount).map((v) => h("li", { key: v, class: 's-rating-modal-bg-gray s-rating-modal-step-dot' }))) : '', h("salla-button", { "loader-position": 'center', ref: el => this.nextBtn = el, onClick: () => this.submit() }, salla.lang.get('common.elements.next')))]
11068
11096
  : h("salla-placeholder", { alignment: "center" }))));
11069
11097
  }
11070
11098
  }
@@ -12509,7 +12537,7 @@ const SallaTelInput = class {
12509
12537
  if (this.TelInput)
12510
12538
  return;
12511
12539
  try {
12512
- const telInputModule = await import('./index-BrA22FUH.js').then(function (n) { return n.i; });
12540
+ const telInputModule = await import('./index-DAIvUtTl.js').then(function (n) { return n.i; });
12513
12541
  this.TelInput = telInputModule.default;
12514
12542
  }
12515
12543
  catch (error) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-CkTB8LrG.js';
5
5
  import { a as anime } from './anime.es-CgtvEd63.js';
6
6
 
7
7
  const sallaAdvertisementCss = ":host{display:block}";
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CkTB8LrG.js';
5
5
 
6
6
  const sallaAppInstallAlertCss = ":host{display:block}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CkTB8LrG.js';
5
5
 
6
6
  const sallaAppsIconsCss = ":host{display:block}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h } from './index-CkTB8LrG.js';
5
5
  import { S as SpecialDiscountIcon, A as ArrowDownIcon } from './special-discount-yRO-ZESF.js';
6
6
  import { G as GiftIcon } from './gift-C0JNGIpa.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CkTB8LrG.js';
5
5
 
6
6
  var DiscountType;
7
7
  (function (DiscountType) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CkTB8LrG.js';
5
5
  import { w as whatsapp } from './whatsapp2-DWksgowB.js';
6
6
  import { M as MailIcon } from './mail-DmgxDvXL.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, c as createEvent, h } from './index-CkTB8LrG.js';
5
5
  import { C as CameraIcon, F as FormFieldTypes } from './interfaces-CBT_Nxny.js';
6
6
 
7
7
  const sallaCustomFieldsCss = ":host{display:block}";
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CkTB8LrG.js';
5
5
  import { H as Helper } from './Helper-Bt5Zv9cl.js';
6
6
  import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
7
7
  import './anime.es-CgtvEd63.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CkTB8LrG.js';
5
5
  import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
6
6
  import { H as Helper } from './Helper-Bt5Zv9cl.js';
7
7
  import './anime.es-CgtvEd63.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CkTB8LrG.js';
5
5
 
6
6
  const sallaInstallmentCss = "salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:flex;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:flex;flex-direction:row-reverse;width:100%;justify-content:space-between;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-CkTB8LrG.js';
5
5
 
6
6
  const sallaLoyaltyPrizeItemCss = "salla-loyalty-prize-item:hover{box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CkTB8LrG.js';
5
5
  import { G as GiftIcon } from './gift-C0JNGIpa.js';
6
6
 
7
7
  const sallaLoyaltyProgramCss = "";
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CkTB8LrG.js';
5
5
 
6
6
  const sallaMetadataCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h } from './index-CkTB8LrG.js';
5
5
 
6
6
  const sallaNotificationsCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-CkTB8LrG.js';
5
5
  import { H as Helper } from './Helper-Bt5Zv9cl.js';
6
6
  import './anime.es-CgtvEd63.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-CkTB8LrG.js';
5
5
 
6
6
  var PageType;
7
7
  (function (PageType) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CkTB8LrG.js';
5
5
 
6
6
  const sallaOrderDetailsMultipleBundleProductCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CkTB8LrG.js';
5
5
 
6
6
  var copyIcon = `<!-- Generated by IcoMoon.io -->
7
7
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, F as Fragment, H as Host } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, F as Fragment, H as Host } from './index-CkTB8LrG.js';
5
5
 
6
6
  const sallaOrderDetailsCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h } from './index-CkTB8LrG.js';
5
5
  import { I as IconVerified } from './check-uTyAzPSy.js';
6
6
 
7
7
  var iconFileArchive = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-09rQwPEf.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CkTB8LrG.js';
5
5
 
6
6
  const sallaOrderTotalsCardCss = ":host{display:block}";
7
7