@salla.sa/twilight-components 2.14.556 → 2.14.557
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-t0Yy69qV.js → filepond-B0WltAUU.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DNZM6Czl.js → filepond-plugin-file-poster-CY6apY0i.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BPMIodJt.js → filepond-plugin-file-validate-size-D4ROC-Be.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DgYmyGCI.js → filepond-plugin-file-validate-type-6lBH-fIm.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-B4itf01h.js → filepond-plugin-image-edit-zEOX3Sjw.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-Dj43xu10.js → filepond-plugin-image-exif-orientation-y0OgGNND.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C6Gm9i9o.js → filepond-plugin-image-preview-C-amHd3H.js} +1 -1
- package/dist/cjs/{index-DyL5Ypj3.js → index-CyKUnNvM.js} +18 -14
- package/dist/cjs/{intlTelInput-BTUy-aYK.js → intlTelInput-CTwMzcpE.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +13 -3
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_2.cjs.entry.js +835 -0
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +224 -46
- package/dist/cjs/salla-payments.cjs.entry.js +76 -2
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +33 -4
- package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -2
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/{salla-map_3.cjs.entry.js → salla-slider.cjs.entry.js} +1 -829
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +3 -165
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-C_t8j4f7.js → vanilla-picker-B_r1mvJW.js} +1 -1
- package/dist/collection/components/salla-button/salla-button.js +32 -2
- package/dist/collection/components/salla-orders/salla-orders.css +122 -0
- package/dist/collection/components/salla-orders/salla-orders.js +231 -45
- package/dist/collection/components/salla-payments/salla-payments.css +3 -0
- package/dist/collection/components/salla-payments/salla-payments.js +74 -0
- package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +32 -3
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +2 -1
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.css +1 -16
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +1 -163
- package/dist/components/index.js +2 -2
- package/dist/components/salla-button2.js +13 -2
- package/dist/components/salla-orders.js +294 -48
- package/dist/components/salla-payments.js +75 -1
- package/dist/components/salla-rating-modal-v22.js +32 -3
- package/dist/components/salla-rating-modal2.js +2 -1
- package/dist/components/salla-trust-badges.js +2 -164
- package/dist/esm/{filepond-Dl-e9LIA.js → filepond-B9wUqRiS.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-B44qzFr7.js → filepond-plugin-file-poster-Cms0jrkz.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DeewGi6D.js → filepond-plugin-file-validate-size-B2gy-nn6.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DquQHM9K.js → filepond-plugin-file-validate-type-D_AqfbaS.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DPSC2V4u.js → filepond-plugin-image-edit-ChS3tv_T.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-A-4MC3po.js → filepond-plugin-image-exif-orientation-iLQFxzEc.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-vvc3KNls.js → filepond-plugin-image-preview-Dm1gYrYZ.js} +1 -1
- package/dist/esm/{index-BJmvvw9H.js → index-BLzx0e6P.js} +18 -14
- package/dist/esm/{intlTelInput-DFX9QeWQ.js → intlTelInput-BTOzA2B4.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +13 -3
- package/dist/esm/salla-add-product-button_5.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +10 -10
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down_2.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_2.entry.js +832 -0
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +224 -46
- package/dist/esm/salla-payments.entry.js +76 -2
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +33 -4
- package/dist/esm/salla-rating-modal.entry.js +3 -2
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/{salla-map_3.entry.js → salla-slider.entry.js} +2 -828
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +3 -165
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-Ld2F0WbU.js → vanilla-picker-CbIzx8P3.js} +1 -1
- package/dist/twilight/{p-d8808de5.entry.js → p-0416a2a8.entry.js} +1 -1
- package/dist/twilight/{p-8d7bfcf6.entry.js → p-05490b44.entry.js} +1 -1
- package/dist/twilight/{p-bb082b47.entry.js → p-05b66ce1.entry.js} +1 -1
- package/dist/twilight/{p-91351958.entry.js → p-06c1c936.entry.js} +1 -1
- package/dist/twilight/{p-5b148ad4.entry.js → p-07b67ef6.entry.js} +1 -1
- package/dist/twilight/{p-bfb82c90.entry.js → p-0c80fbcf.entry.js} +1 -1
- package/dist/twilight/{p-4fdc296f.entry.js → p-1420e962.entry.js} +1 -1
- package/dist/twilight/p-18d0c69f.entry.js +4 -0
- package/dist/twilight/{p-2f59ef9c.entry.js → p-1bfb9675.entry.js} +1 -1
- package/dist/twilight/{p-5527801b.entry.js → p-210095ee.entry.js} +1 -1
- package/dist/twilight/{p-45b85a45.entry.js → p-2a5b180a.entry.js} +1 -1
- package/dist/twilight/p-2b7ca018.entry.js +4 -0
- package/dist/twilight/{p-6e08f950.entry.js → p-2bd06384.entry.js} +1 -1
- package/dist/twilight/{p-95918a1a.entry.js → p-2c0870cb.entry.js} +1 -1
- package/dist/twilight/{p-fc0304bf.entry.js → p-33e0d7b8.entry.js} +1 -1
- package/dist/twilight/{p-90d5e633.entry.js → p-34f2d378.entry.js} +1 -1
- package/dist/twilight/{p-54b4dec6.entry.js → p-365745de.entry.js} +1 -1
- package/dist/twilight/{p-3bba916f.entry.js → p-3a97face.entry.js} +1 -1
- package/dist/twilight/{p-6b3e668c.entry.js → p-3b4b1f29.entry.js} +1 -1
- package/dist/twilight/{p-fa1900ec.entry.js → p-3ba22519.entry.js} +1 -1
- package/dist/twilight/{p-2fddb802.entry.js → p-3cc1a9b8.entry.js} +1 -1
- package/dist/twilight/{p-fdc36d7c.entry.js → p-407a73f4.entry.js} +1 -1
- package/dist/twilight/p-45706908.entry.js +4 -0
- package/dist/twilight/{p-5391291e.entry.js → p-46ba098a.entry.js} +1 -1
- package/dist/twilight/{p-55c89592.entry.js → p-47597499.entry.js} +1 -1
- package/dist/twilight/{p-ec27e0f4.entry.js → p-4cabeff6.entry.js} +1 -1
- package/dist/twilight/{p-1b97e436.entry.js → p-53285f66.entry.js} +1 -1
- package/dist/twilight/{p-f3eab493.entry.js → p-56b2f8d7.entry.js} +1 -1
- package/dist/twilight/{p-95b8806a.entry.js → p-595bfef8.entry.js} +1 -1
- package/dist/twilight/{p-4023d48a.entry.js → p-59ccfd64.entry.js} +1 -1
- package/dist/twilight/{p-99af9a68.entry.js → p-5bb8c263.entry.js} +1 -1
- package/dist/twilight/p-5cbd36fb.entry.js +4 -0
- package/dist/twilight/{p-88045527.entry.js → p-5cc80969.entry.js} +1 -1
- package/dist/twilight/{p-cddd3975.entry.js → p-5f6c10d6.entry.js} +1 -1
- package/dist/twilight/{p-74f730e1.entry.js → p-61b6c754.entry.js} +1 -1
- package/dist/twilight/{p-67efee3a.entry.js → p-67caf54b.entry.js} +1 -1
- package/dist/twilight/{p-f6e44ad6.entry.js → p-6866b3d6.entry.js} +1 -1
- package/dist/twilight/{p-4af910f1.entry.js → p-6af36173.entry.js} +1 -1
- package/dist/twilight/{p-e64ad9de.entry.js → p-6d8b0678.entry.js} +1 -1
- package/dist/twilight/{p-4df9ca99.entry.js → p-6ea62f2b.entry.js} +1 -1
- package/dist/twilight/{p-5af2868f.entry.js → p-738ec366.entry.js} +1 -1
- package/dist/twilight/{p-1882e5b9.entry.js → p-7767f3a7.entry.js} +1 -1
- package/dist/twilight/{p-ba5546ab.entry.js → p-7a19cb93.entry.js} +1 -1
- package/dist/twilight/{p-275b49b7.entry.js → p-7c859f0c.entry.js} +1 -1
- package/dist/twilight/{p-cc3c48b4.entry.js → p-7d86bc77.entry.js} +1 -1
- package/dist/twilight/{p-918eb4b7.entry.js → p-7f077279.entry.js} +1 -1
- package/dist/twilight/{p-e209addd.entry.js → p-7ffa452c.entry.js} +1 -1
- package/dist/twilight/{p-2815c25a.entry.js → p-809a0076.entry.js} +1 -1
- package/dist/twilight/{p-62dfd479.entry.js → p-81f8537a.entry.js} +1 -1
- package/dist/twilight/{p-5ab257bf.entry.js → p-86cd2898.entry.js} +1 -1
- package/dist/twilight/{p-0d3be88f.entry.js → p-894fdcdd.entry.js} +1 -1
- package/dist/twilight/p-8a7bb785.entry.js +4 -0
- package/dist/twilight/{p-2ce0c4ca.entry.js → p-8b81811b.entry.js} +1 -1
- package/dist/twilight/{p-75e126cc.entry.js → p-8d8c84d8.entry.js} +1 -1
- package/dist/twilight/{p-d16a17d2.entry.js → p-8e2f52b2.entry.js} +1 -1
- package/dist/twilight/{p-7e7f0849.entry.js → p-932e3bff.entry.js} +1 -1
- package/dist/twilight/{p-b654ffbd.entry.js → p-96a13e17.entry.js} +1 -1
- package/dist/twilight/{p-3eb18438.entry.js → p-96ded4cf.entry.js} +1 -1
- package/dist/twilight/{p-dff3411a.entry.js → p-98e83214.entry.js} +1 -1
- package/dist/twilight/{p-3a1fd71a.entry.js → p-99a757ac.entry.js} +1 -1
- package/dist/twilight/{p-601013e8.entry.js → p-9ddcdf20.entry.js} +1 -1
- package/dist/twilight/{p-a1ce8d6d.entry.js → p-9ef91e6b.entry.js} +1 -1
- package/dist/twilight/{p-BUfrGdXG.js → p-BBCmWsAH.js} +1 -1
- package/dist/twilight/{p-BJmvvw9H.js → p-BLzx0e6P.js} +1 -1
- package/dist/twilight/{p-DpFFhlK6.js → p-BQGQ9tVS.js} +1 -1
- package/dist/twilight/{p-pCB_h2Xn.js → p-BTjFfROl.js} +1 -1
- package/dist/twilight/{p-SDB-lCJg.js → p-Bi7BjntU.js} +1 -1
- package/dist/twilight/{p-VDJLgJLw.js → p-BqaOIJsE.js} +1 -1
- package/dist/twilight/{p-BscSw0sZ.js → p-CBW4kczX.js} +1 -1
- package/dist/twilight/{p-CLEHV1kt.js → p-C_G6bYCk.js} +1 -1
- package/dist/twilight/{p-a893e7e3.entry.js → p-a0c97ac9.entry.js} +1 -1
- package/dist/twilight/{p-d9e98286.entry.js → p-a4175383.entry.js} +1 -1
- package/dist/twilight/{p-a1738bf0.entry.js → p-a4b7ee47.entry.js} +1 -1
- package/dist/twilight/{p-12a43d43.entry.js → p-a51931ba.entry.js} +1 -1
- package/dist/twilight/{p-89a82ff5.entry.js → p-a7801576.entry.js} +1 -1
- package/dist/twilight/p-a8b41edc.entry.js +4 -0
- package/dist/twilight/{p-2f2956d9.entry.js → p-ada5f9db.entry.js} +1 -1
- package/dist/twilight/{p-cb892619.entry.js → p-b36ca739.entry.js} +1 -1
- package/dist/twilight/{p-c266feb3.entry.js → p-bba884dc.entry.js} +1 -1
- package/dist/twilight/p-bc0bc63f.entry.js +4 -0
- package/dist/twilight/{p-17522796.entry.js → p-be424137.entry.js} +1 -1
- package/dist/twilight/{p-bd68067a.entry.js → p-c0fc7756.entry.js} +1 -1
- package/dist/twilight/{p-d5a486bb.entry.js → p-c428c44b.entry.js} +1 -1
- package/dist/twilight/{p-13011571.entry.js → p-c4f963ea.entry.js} +1 -1
- package/dist/twilight/{p-99702306.entry.js → p-c69e0669.entry.js} +1 -1
- package/dist/twilight/{p-3ec284fd.entry.js → p-c9d10c9f.entry.js} +1 -1
- package/dist/twilight/{p-92992a1e.entry.js → p-cb7bc39f.entry.js} +1 -1
- package/dist/twilight/{p-f37147c7.entry.js → p-cd86c231.entry.js} +1 -1
- package/dist/twilight/{p-f0c19b59.entry.js → p-d1ba8e6e.entry.js} +1 -1
- package/dist/twilight/{p-91f9f647.entry.js → p-d84a11b8.entry.js} +1 -1
- package/dist/twilight/{p-e0f7a4e1.entry.js → p-de3b3e41.entry.js} +1 -1
- package/dist/twilight/{p-7d0e8486.entry.js → p-eb10186c.entry.js} +1 -1
- package/dist/twilight/{p-291d6f2b.entry.js → p-eb9fca37.entry.js} +1 -1
- package/dist/twilight/{p-e0e614d1.entry.js → p-ed3fc3bb.entry.js} +1 -1
- package/dist/twilight/p-ee463cf9.entry.js +4 -0
- package/dist/twilight/{p-d4263617.entry.js → p-f276a319.entry.js} +1 -1
- package/dist/twilight/{p-6d7629ee.entry.js → p-f602c556.entry.js} +1 -1
- package/dist/twilight/{p-e1cca558.entry.js → p-f87ba34e.entry.js} +1 -1
- package/dist/twilight/{p-4ca525cb.entry.js → p-fa459971.entry.js} +1 -1
- package/dist/twilight/{p-c4582e2b.entry.js → p-fa7966bd.entry.js} +1 -1
- package/dist/twilight/{p-427d38a0.entry.js → p-fad4aa22.entry.js} +1 -1
- package/dist/twilight/{p-Ye-NG0xO.js → p-iB9dUe00.js} +1 -1
- package/dist/twilight/{p-DXzyepGb.js → p-oVUukCva.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-button/salla-button.d.ts +6 -0
- package/dist/types/components/salla-orders/interface.d.ts +1 -0
- package/dist/types/components/salla-orders/salla-orders.d.ts +29 -2
- package/dist/types/components/salla-payments/salla-payments.d.ts +4 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +7 -0
- package/dist/types/components/salla-trust-badges/salla-trust-badges.d.ts +0 -22
- package/dist/types/components.d.ts +10 -0
- package/package.json +5 -5
- package/dist/twilight/p-08fa9f0b.entry.js +0 -4
- package/dist/twilight/p-1066a05c.entry.js +0 -4
- package/dist/twilight/p-11afb8be.entry.js +0 -4
- package/dist/twilight/p-164cb0d8.entry.js +0 -4
- package/dist/twilight/p-5ecc99df.entry.js +0 -4
- package/dist/twilight/p-8a640353.entry.js +0 -4
- package/dist/twilight/p-acc63da6.entry.js +0 -4
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
import Helper from "../../Helpers/Helper";
|
|
6
|
+
const FEEDBACK_STATUS_WAITING = 'waiting';
|
|
7
|
+
const LANG_DEFAULTS = {
|
|
8
|
+
'pages.orders.filter_all': { ar: 'الكل', en: 'All' },
|
|
9
|
+
'pages.orders.filter_awaiting_review': { ar: 'بانتظار تقييمك', en: 'Awaiting your review' },
|
|
10
|
+
'pages.orders.leave_review': { ar: 'أضف تقييمك', en: 'Add review' },
|
|
11
|
+
'pages.orders.no_unrated_orders': { ar: 'لا توجد طلبات غير مقيَّمة', en: 'No unrated orders' },
|
|
12
|
+
'pages.orders.review_banner': {
|
|
13
|
+
ar: 'لديك طلبات بانتظار تقييمك. شارك رأيك وساعدنا على تحسين تجربتك.',
|
|
14
|
+
en: 'You have orders awaiting your review. Share your feedback and help us improve your experience.',
|
|
15
|
+
},
|
|
16
|
+
'pages.orders.review_banner_with_points': {
|
|
17
|
+
ar: 'لديك طلبات بانتظار تقييمك. قيِّمها واحصل على ما يصل إلى {{points}} نقطة ولاء.',
|
|
18
|
+
en: 'You have orders awaiting your review. Rate them and earn up to {{points}} loyalty points.',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
6
21
|
export class SallaOrder {
|
|
7
22
|
constructor() {
|
|
8
23
|
this.orderNumberText = salla.lang.get('pages.thank_you.order_id');
|
|
@@ -12,7 +27,16 @@ export class SallaOrder {
|
|
|
12
27
|
this.noOrderText = salla.lang.get('pages.orders.non_orders');
|
|
13
28
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
14
29
|
this.languageCode = salla.lang.locale;
|
|
30
|
+
this.filterAllText = salla.lang.getWithDefault('pages.orders.filter_all', 'الكل');
|
|
31
|
+
this.filterAwaitingReviewText = salla.lang.getWithDefault('pages.orders.filter_awaiting_review', 'بانتظار تقييمك');
|
|
32
|
+
this.leaveReviewText = salla.lang.getWithDefault('pages.orders.leave_review', 'شارك تقييمك');
|
|
33
|
+
this.noUnratedOrdersText = salla.lang.getWithDefault('pages.orders.no_unrated_orders', 'لا توجد طلبات غير مقيَّمة');
|
|
15
34
|
this.orders = [];
|
|
35
|
+
this.activeFilter = 'all';
|
|
36
|
+
this.pendingReviewCount = 0;
|
|
37
|
+
this.emptyFilterResult = false;
|
|
38
|
+
this.isFetching = false;
|
|
39
|
+
this.reviewPoints = 0;
|
|
16
40
|
salla.lang.onLoaded(() => {
|
|
17
41
|
this.languageCode = salla.lang.locale;
|
|
18
42
|
this.orderNumberText = salla.lang.get('pages.thank_you.order_id');
|
|
@@ -31,6 +55,67 @@ export class SallaOrder {
|
|
|
31
55
|
this.btnLoader.style.display = isLoading ? 'inherit' : 'none';
|
|
32
56
|
}
|
|
33
57
|
}
|
|
58
|
+
refreshReviewLabels() {
|
|
59
|
+
this.filterAllText = salla.lang.getWithDefault('pages.orders.filter_all', 'الكل');
|
|
60
|
+
this.filterAwaitingReviewText = salla.lang.getWithDefault('pages.orders.filter_awaiting_review', 'بانتظار تقييمك');
|
|
61
|
+
this.leaveReviewText = salla.lang.getWithDefault('pages.orders.leave_review', 'شارك تقييمك');
|
|
62
|
+
this.noUnratedOrdersText = salla.lang.getWithDefault('pages.orders.no_unrated_orders', 'لا توجد طلبات غير مقيَّمة');
|
|
63
|
+
}
|
|
64
|
+
setupLoyalty() {
|
|
65
|
+
// ? Flags
|
|
66
|
+
const can_rate_product = !!salla.config.get('store.settings.rating.can_rate_product');
|
|
67
|
+
const can_rate_shipping = !!salla.config.get('store.settings.rating.can_rate_shipping');
|
|
68
|
+
const can_rate_store = !!salla.config.get('store.settings.rating.can_rate_store');
|
|
69
|
+
const allow_media = !!salla.config.get('store.settings.rating.allow_attach_images') ||
|
|
70
|
+
!!salla.config.get('store.settings.rating.allow_attach_videos');
|
|
71
|
+
// ? Values
|
|
72
|
+
const rating_product_points = Number(salla.config.get('store.settings.rating.rating_product_points')) || 0;
|
|
73
|
+
const rating_product_with_image_points = Number(salla.config.get('store.settings.rating.rating_product_with_image_points')) || 0;
|
|
74
|
+
const rating_shipping_company_points = Number(salla.config.get('store.settings.rating.rating_shipping_company_points')) || 0;
|
|
75
|
+
const rating_store_points = Number(salla.config.get('store.settings.rating.rating_store_points')) || 0;
|
|
76
|
+
// ? Calculate All:
|
|
77
|
+
this.reviewPoints = 0;
|
|
78
|
+
if (can_rate_product) {
|
|
79
|
+
this.reviewPoints += rating_product_points;
|
|
80
|
+
}
|
|
81
|
+
if (can_rate_shipping) {
|
|
82
|
+
this.reviewPoints += rating_shipping_company_points;
|
|
83
|
+
}
|
|
84
|
+
if (can_rate_store) {
|
|
85
|
+
this.reviewPoints += rating_store_points;
|
|
86
|
+
}
|
|
87
|
+
if (allow_media) {
|
|
88
|
+
this.reviewPoints += rating_product_with_image_points;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
formatNumber(value) {
|
|
92
|
+
return salla.helpers?.number ? salla.helpers.number(value) : String(value);
|
|
93
|
+
}
|
|
94
|
+
getBannerText() {
|
|
95
|
+
const showPoints = this.reviewPoints > 0;
|
|
96
|
+
const key = `pages.orders.review_banner${showPoints ? '_with_points' : ''}`;
|
|
97
|
+
const fallback = LANG_DEFAULTS[key]?.ar || '';
|
|
98
|
+
let text = salla.lang.getWithDefault(key, fallback);
|
|
99
|
+
if (showPoints) {
|
|
100
|
+
text = text.replace('{{points}}', this.formatNumber(this.reviewPoints));
|
|
101
|
+
}
|
|
102
|
+
return text;
|
|
103
|
+
}
|
|
104
|
+
isEligibleForReview(order) {
|
|
105
|
+
return !order.is_rated && order.can_rate !== false;
|
|
106
|
+
}
|
|
107
|
+
async openReviewModal(orderId) {
|
|
108
|
+
if (!this.ratingModal || !orderId)
|
|
109
|
+
return;
|
|
110
|
+
await this.ratingModal.setOrder(orderId);
|
|
111
|
+
await this.ratingModal.open();
|
|
112
|
+
}
|
|
113
|
+
switchFilter(filter) {
|
|
114
|
+
if (this.isFetching || this.activeFilter === filter)
|
|
115
|
+
return;
|
|
116
|
+
this.activeFilter = filter;
|
|
117
|
+
this.fetchOrders(filter);
|
|
118
|
+
}
|
|
34
119
|
initiateInfiniteScroll() {
|
|
35
120
|
if (!this.hasInfiniteScroll) {
|
|
36
121
|
return;
|
|
@@ -58,7 +143,7 @@ export class SallaOrder {
|
|
|
58
143
|
let items = this.host.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');
|
|
59
144
|
Helper.animateItems(items);
|
|
60
145
|
});
|
|
61
|
-
this.infiniteScroll?.on('error',
|
|
146
|
+
this.infiniteScroll?.on('error', e => {
|
|
62
147
|
salla.logger.error('Error loading more comments:', e);
|
|
63
148
|
});
|
|
64
149
|
}
|
|
@@ -69,31 +154,73 @@ export class SallaOrder {
|
|
|
69
154
|
handleResponse(orderList) {
|
|
70
155
|
return orderList.map(order => this.getSingleOrderItem(order));
|
|
71
156
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Count of eligible, unrated orders. Kept in sync with the active tab's
|
|
159
|
+
* response when it's the "waiting" tab, otherwise fetched separately so the
|
|
160
|
+
* banner/tab count is accurate on the "All" tab too.
|
|
161
|
+
*/
|
|
162
|
+
async loadPendingReviewCount() {
|
|
163
|
+
try {
|
|
164
|
+
const resp = await salla.order.api.fetch({
|
|
165
|
+
...this.params,
|
|
166
|
+
types: [''],
|
|
167
|
+
feedback_status: FEEDBACK_STATUS_WAITING,
|
|
168
|
+
per_page: 1,
|
|
169
|
+
});
|
|
170
|
+
this.pendingReviewCount = resp.pagination?.count ?? 0;
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
this.pendingReviewCount = 0;
|
|
174
|
+
salla.logger.error(error);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
async fetchOrders(filter) {
|
|
178
|
+
if (this.isFetching)
|
|
179
|
+
return;
|
|
180
|
+
this.isFetching = true;
|
|
181
|
+
const feedbackStatus = filter === 'waiting' ? FEEDBACK_STATUS_WAITING : null;
|
|
182
|
+
try {
|
|
183
|
+
const resp = await salla.order.api.fetch({
|
|
184
|
+
...this.params,
|
|
185
|
+
types: [''],
|
|
186
|
+
feedback_status: feedbackStatus,
|
|
187
|
+
});
|
|
75
188
|
this.orders = resp.data;
|
|
76
189
|
this.hasInfiniteScroll = !!resp.pagination?.links.next;
|
|
77
190
|
this.pagination = resp.pagination;
|
|
78
|
-
this.total = resp.pagination?.
|
|
191
|
+
this.total = resp.pagination?.count;
|
|
79
192
|
this.nextPage = resp.pagination?.links?.next || null;
|
|
193
|
+
if (filter === 'waiting') {
|
|
194
|
+
this.pendingReviewCount = resp.pagination?.count ?? 0;
|
|
195
|
+
}
|
|
80
196
|
if (!this.orders.length) {
|
|
81
|
-
this.
|
|
82
|
-
|
|
197
|
+
this.loading(false);
|
|
198
|
+
this.emptyFilterResult = filter === 'waiting';
|
|
199
|
+
this.showPlaceholder = filter !== 'waiting';
|
|
200
|
+
return;
|
|
83
201
|
}
|
|
202
|
+
this.showPlaceholder = false;
|
|
203
|
+
this.emptyFilterResult = false;
|
|
84
204
|
setTimeout(() => {
|
|
85
|
-
this.
|
|
86
|
-
|
|
87
|
-
|
|
205
|
+
if (!this.wrapper)
|
|
206
|
+
return;
|
|
207
|
+
this.wrapper.innerHTML = '';
|
|
208
|
+
this.handleResponse(resp.data).forEach(row => this.wrapper.append(row));
|
|
209
|
+
this.infiniteScroll?.destroy?.();
|
|
210
|
+
this.infiniteScroll = null;
|
|
88
211
|
this.initiateInfiniteScroll();
|
|
89
212
|
let items = this.wrapper.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');
|
|
90
213
|
Helper.animateItems(items);
|
|
91
214
|
}, 100);
|
|
92
|
-
}
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
93
217
|
this.showPlaceholder = true;
|
|
94
218
|
this.loading(false);
|
|
95
219
|
salla.logger.error(error);
|
|
96
|
-
}
|
|
220
|
+
}
|
|
221
|
+
finally {
|
|
222
|
+
this.isFetching = false;
|
|
223
|
+
}
|
|
97
224
|
}
|
|
98
225
|
getSingleOrderItem(order) {
|
|
99
226
|
const tr = document.createElement('tr');
|
|
@@ -125,7 +252,7 @@ export class SallaOrder {
|
|
|
125
252
|
sallaButton.setAttribute('color', 'dark');
|
|
126
253
|
sallaButton.setAttribute('shape', 'link');
|
|
127
254
|
sallaButton.dataset.content = order.reference_id.toString();
|
|
128
|
-
sallaButton.addEventListener('click',
|
|
255
|
+
sallaButton.addEventListener('click', event => {
|
|
129
256
|
Helper.copyToClipboard(event);
|
|
130
257
|
Helper.toggleElementClassIf(sallaButton, 'copied', 'code-to-copy', () => true);
|
|
131
258
|
setTimeout(() => {
|
|
@@ -152,6 +279,29 @@ export class SallaOrder {
|
|
|
152
279
|
div1.appendChild(div2);
|
|
153
280
|
td1.appendChild(div1);
|
|
154
281
|
tr.appendChild(td1);
|
|
282
|
+
const tdStatus = document.createElement('td');
|
|
283
|
+
tdStatus.classList.add('s-orders-table-tbody-tr-td');
|
|
284
|
+
const divStatus = document.createElement('div');
|
|
285
|
+
divStatus.classList.add('s-orders-table-tbody-tr-td-content');
|
|
286
|
+
const spanStatusLabel = document.createElement('span');
|
|
287
|
+
spanStatusLabel.classList.add('s-orders-mobile-title');
|
|
288
|
+
spanStatusLabel.textContent = this.orderStatusText + ':';
|
|
289
|
+
const statusSpan = document.createElement('span');
|
|
290
|
+
statusSpan.classList.add('s-orders-status-container');
|
|
291
|
+
statusSpan.style.color = order.status.color;
|
|
292
|
+
const statusIcon = document.createElement('i');
|
|
293
|
+
statusIcon.classList.add(order.status.icon);
|
|
294
|
+
const statusName = document.createElement('span');
|
|
295
|
+
statusName.textContent = order.status.name;
|
|
296
|
+
statusSpan.appendChild(statusIcon);
|
|
297
|
+
statusSpan.appendChild(statusName);
|
|
298
|
+
divStatus.appendChild(spanStatusLabel);
|
|
299
|
+
divStatus.appendChild(statusSpan);
|
|
300
|
+
const anchorStatus = document.createElement('a');
|
|
301
|
+
anchorStatus.href = order.url;
|
|
302
|
+
divStatus.appendChild(anchorStatus);
|
|
303
|
+
tdStatus.appendChild(divStatus);
|
|
304
|
+
tr.appendChild(tdStatus);
|
|
155
305
|
const td2 = document.createElement('td');
|
|
156
306
|
td2.classList.add('s-orders-table-tbody-tr-td');
|
|
157
307
|
const div3 = document.createElement('div');
|
|
@@ -184,44 +334,72 @@ export class SallaOrder {
|
|
|
184
334
|
div5.appendChild(anchor3);
|
|
185
335
|
td3.appendChild(div5);
|
|
186
336
|
tr.appendChild(td3);
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
337
|
+
const tdAction = document.createElement('td');
|
|
338
|
+
tdAction.classList.add('s-orders-table-tbody-tr-td');
|
|
339
|
+
const divAction = document.createElement('div');
|
|
340
|
+
divAction.classList.add('s-orders-table-tbody-tr-td-content', 's-orders-action-cell');
|
|
341
|
+
if (order.is_rated) {
|
|
342
|
+
const starIcon = document.createElement('i');
|
|
343
|
+
// starIcon.classList.add(
|
|
344
|
+
// 'sicon-star2',
|
|
345
|
+
// 'relative',
|
|
346
|
+
// 's-orders-status-rated',
|
|
347
|
+
// 's-orders-rated-text',
|
|
348
|
+
// );
|
|
349
|
+
divAction.appendChild(starIcon);
|
|
350
|
+
}
|
|
351
|
+
else if (this.isEligibleForReview(order)) {
|
|
352
|
+
const reviewBtn = document.createElement('salla-button');
|
|
353
|
+
reviewBtn.classList.add('relative', 's-orders-leave-review-btn');
|
|
354
|
+
reviewBtn.setAttribute('color', 'primary');
|
|
355
|
+
reviewBtn.setAttribute('fill', 'outline');
|
|
356
|
+
reviewBtn.setAttribute('size', 'small');
|
|
357
|
+
const reviewIcon = document.createElement('i');
|
|
358
|
+
reviewIcon.classList.add('sicon-star-o', 's-orders-review-star-icon');
|
|
359
|
+
const reviewLabel = document.createElement('span');
|
|
360
|
+
reviewLabel.textContent = this.leaveReviewText;
|
|
361
|
+
if (isRTL) {
|
|
362
|
+
reviewBtn.appendChild(reviewIcon);
|
|
363
|
+
reviewBtn.appendChild(reviewLabel);
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
reviewBtn.appendChild(reviewLabel);
|
|
367
|
+
reviewBtn.appendChild(reviewIcon);
|
|
368
|
+
}
|
|
369
|
+
reviewBtn.addEventListener('click', event => {
|
|
370
|
+
event.preventDefault();
|
|
371
|
+
event.stopPropagation();
|
|
372
|
+
this.openReviewModal(order.id);
|
|
373
|
+
});
|
|
374
|
+
divAction.appendChild(reviewBtn);
|
|
375
|
+
}
|
|
376
|
+
tdAction.appendChild(divAction);
|
|
377
|
+
tr.appendChild(tdAction);
|
|
213
378
|
return tr;
|
|
214
379
|
}
|
|
380
|
+
renderFilters() {
|
|
381
|
+
return (h("div", { class: "s-orders-filters" }, h("salla-button", { size: "small", color: this.activeFilter === 'all' ? 'primary' : 'light', fill: "outline", onClick: () => this.switchFilter('all'), enableLoader: false }, this.filterAllText), h("salla-button", { size: "small", color: this.activeFilter === 'waiting' ? 'primary' : 'light', fill: "outline", onClick: () => this.switchFilter('waiting'), enableLoader: false }, this.filterAwaitingReviewText)));
|
|
382
|
+
}
|
|
383
|
+
renderBanner() {
|
|
384
|
+
if (!this.pendingReviewCount)
|
|
385
|
+
return null;
|
|
386
|
+
return (h("div", { class: "s-orders-banner" }, h("span", { class: "s-orders-banner-icon" }, h("svg", { width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M10 0C13.6819 0 16.6667 2.98477 16.6667 6.66664C16.6667 9.37047 15.057 11.6984 12.7437 12.7444C11.6978 15.0575 9.3701 16.6666 6.66668 16.6666C2.98477 16.6666 0 13.6819 0 9.99998C0 7.29656 1.60918 4.96894 3.92195 3.92276C4.96827 1.60964 7.29618 0 10 0ZM6.66668 5C3.90524 5 1.66667 7.23856 1.66667 9.99998C1.66667 12.7614 3.90524 15 6.66668 15C9.4281 15 11.6667 12.7614 11.6667 9.99998C11.6667 7.23856 9.4281 5 6.66668 5ZM7.50002 5.83333V6.66664H9.16668V8.33331H5.83333C5.60322 8.33331 5.41667 8.51989 5.41667 8.74998C5.41667 8.95456 5.56407 9.12464 5.75844 9.15998L5.83333 9.16664H7.50002C8.6506 9.16664 9.58335 10.0994 9.58335 11.25C9.58335 12.4006 8.6506 13.3333 7.50002 13.3333V14.1666H5.83333V13.3333H4.16667V11.6666H7.50002C7.7301 11.6666 7.91668 11.4801 7.91668 11.25C7.91668 11.0455 7.76927 10.8753 7.57493 10.8401L7.50002 10.8333H5.83333C4.68274 10.8333 3.75 9.90056 3.75 8.74998C3.75 7.59939 4.68274 6.66664 5.83333 6.66664V5.83333H7.50002ZM10 1.66667C8.51377 1.66667 7.17893 2.31513 6.26313 3.34457C6.39704 3.33736 6.53138 3.33333 6.66668 3.33333C10.3486 3.33333 13.3333 6.3181 13.3333 9.99998C13.3333 10.1356 13.3293 10.2702 13.3213 10.4037C14.3513 9.48814 15 8.15314 15 6.66664C15 3.90524 12.7614 1.66667 10 1.66667Z", fill: "#008C56" }))), h("p", { class: "s-orders-banner-text" }, this.getBannerText())));
|
|
387
|
+
}
|
|
215
388
|
render() {
|
|
216
389
|
if (this.showPlaceholder) {
|
|
217
|
-
return h("div", { class: "s-orders-no-content" }, h("i", { class: "sicon-packed-box icon" }), h("p", null, this.noOrderText));
|
|
390
|
+
return (h("div", { class: "s-orders-no-content" }, h("i", { class: "sicon-packed-box icon" }), h("p", null, this.noOrderText)));
|
|
218
391
|
}
|
|
219
|
-
return h("div", { class: "s-orders-wrapper" }, h("
|
|
392
|
+
return (h("div", { class: "s-orders-wrapper" }, this.renderBanner(), this.renderFilters(), h("div", { class: "s-orders-list-wrapper" }, this.isFetching && (h("div", { class: "s-orders-list-loading" }, h("salla-loading", { size: 32, width: 3 }))), this.emptyFilterResult ? (h("div", { class: "s-orders-no-content" }, h("i", { class: "sicon-packed-box icon" }), h("p", null, this.noUnratedOrdersText))) : (h("table", { class: { 's-orders-table': true, 's-orders-table-fetching': this.isFetching } }, h("thead", { class: "s-orders-table-head" }, h("tr", { class: "s-orders-table-head-tr" }, h("th", { class: "s-orders-table-head-tr-th", scope: "col" }, this.orderNumberText), h("th", { class: "s-orders-table-head-tr-th", scope: "col" }, this.orderStatusText), h("th", { class: "s-orders-table-head-tr-th", scope: "col" }, this.totalOrderText), h("th", { class: "s-orders-table-head-tr-th", scope: "col" }, this.orderDateText), h("th", { class: "s-orders-table-head-tr-th", scope: "col" }))), h("tbody", { class: "s-orders-table-tbody", ref: el => (this.wrapper = el) })))), this.nextPage && !this.emptyFilterResult && (h("div", { class: "s-infinite-scroll-wrapper", ref: status => (this.status = status) }, h("button", { onClick: () => this.loadMore(), class: "s-infinite-scroll-btn s-button-btn s-button-primary" }, h("span", { class: "s-button-text s-infinite-scroll-btn-text" }, this.loadMoreText ?? this.load_more_text_trans), h("span", { class: "s-button-loader s-button-loader-center s-infinite-scroll-btn-loader", ref: btnLoader => (this.btnLoader = btnLoader), style: { display: 'none' } })))), h("salla-rating-modal", { ref: el => (this.ratingModal = el) })));
|
|
220
393
|
}
|
|
221
394
|
componentWillLoad() {
|
|
222
|
-
|
|
223
|
-
.
|
|
224
|
-
|
|
395
|
+
salla.lang.onLoaded(() => {
|
|
396
|
+
salla.lang.addBulk(LANG_DEFAULTS);
|
|
397
|
+
this.refreshReviewLabels();
|
|
398
|
+
});
|
|
399
|
+
return salla.onReady().then(() => {
|
|
400
|
+
this.setupLoyalty();
|
|
401
|
+
return Promise.all([this.fetchOrders('all'), this.loadPendingReviewCount()]);
|
|
402
|
+
});
|
|
225
403
|
}
|
|
226
404
|
static get is() { return "salla-orders"; }
|
|
227
405
|
static get originalStyleUrls() {
|
|
@@ -290,12 +468,20 @@ export class SallaOrder {
|
|
|
290
468
|
"noOrderText": {},
|
|
291
469
|
"load_more_text_trans": {},
|
|
292
470
|
"languageCode": {},
|
|
471
|
+
"filterAllText": {},
|
|
472
|
+
"filterAwaitingReviewText": {},
|
|
473
|
+
"leaveReviewText": {},
|
|
474
|
+
"noUnratedOrdersText": {},
|
|
293
475
|
"orders": {},
|
|
294
476
|
"pagination": {},
|
|
295
477
|
"hasInfiniteScroll": {},
|
|
296
478
|
"total": {},
|
|
297
479
|
"nextPage": {},
|
|
298
|
-
"showPlaceholder": {}
|
|
480
|
+
"showPlaceholder": {},
|
|
481
|
+
"activeFilter": {},
|
|
482
|
+
"pendingReviewCount": {},
|
|
483
|
+
"emptyFilterResult": {},
|
|
484
|
+
"isFetching": {}
|
|
299
485
|
};
|
|
300
486
|
}
|
|
301
487
|
static get elementRef() { return "host"; }
|
|
@@ -51,6 +51,79 @@ export class SallaPayments {
|
|
|
51
51
|
.replace(/\{image\}/g, salla.url.cdn(`images/sbc.png`, 58, 58))
|
|
52
52
|
.replace(/\{link\}/g, `https://eauthenticate.saudibusiness.gov.sa/certificate-details/${sbcId}`) }))));
|
|
53
53
|
}
|
|
54
|
+
componentDidLoad() {
|
|
55
|
+
this.auditTrustBadge();
|
|
56
|
+
}
|
|
57
|
+
/** Reports KSA stores whose commercial-register / freelance badge is gone or hidden. */
|
|
58
|
+
auditTrustBadge() {
|
|
59
|
+
if (SallaPayments.audited || typeof IntersectionObserver === 'undefined')
|
|
60
|
+
return;
|
|
61
|
+
// Only the footer copy anchors the check; the drawer and product page ones say nothing.
|
|
62
|
+
if (!this.host.closest('footer'))
|
|
63
|
+
return;
|
|
64
|
+
if (salla.config.get('store.store_country') !== 'SA')
|
|
65
|
+
return;
|
|
66
|
+
if (salla.config.get('page.slug') !== 'index')
|
|
67
|
+
return;
|
|
68
|
+
if (!salla.config.get('store.settings.commercial_number')
|
|
69
|
+
&& !salla.config.get('store.settings.freelance_number'))
|
|
70
|
+
return;
|
|
71
|
+
const isShown = (el) => {
|
|
72
|
+
const check = el.checkVisibility;
|
|
73
|
+
if (typeof check !== 'function')
|
|
74
|
+
return true;
|
|
75
|
+
const options = { contentVisibilityAuto: true, visibilityProperty: true };
|
|
76
|
+
if (!check.call(el, options))
|
|
77
|
+
return false;
|
|
78
|
+
if (check.call(el, { ...options, opacityProperty: true }))
|
|
79
|
+
return true;
|
|
80
|
+
// Faded out but off screen: a scroll animation not run yet, not a hide.
|
|
81
|
+
const rect = el.getBoundingClientRect();
|
|
82
|
+
return !(rect.bottom > 0 && rect.right > 0
|
|
83
|
+
&& rect.top < window.innerHeight && rect.left < window.innerWidth);
|
|
84
|
+
};
|
|
85
|
+
const verdict = () => {
|
|
86
|
+
const badges = Array.from(document.querySelectorAll('salla-trust-badges'));
|
|
87
|
+
if (!badges.length)
|
|
88
|
+
return 'absent';
|
|
89
|
+
// Un-hydrated: Stencil keeps the host hidden, not the merchant.
|
|
90
|
+
if (badges.some(el => !el.classList.contains('hydrated')))
|
|
91
|
+
return null;
|
|
92
|
+
return badges.some(isShown) ? null : 'hidden';
|
|
93
|
+
};
|
|
94
|
+
const observer = new IntersectionObserver(entries => {
|
|
95
|
+
if (SallaPayments.audited || !entries.some(entry => entry.isIntersecting))
|
|
96
|
+
return;
|
|
97
|
+
SallaPayments.audited = true;
|
|
98
|
+
observer.disconnect();
|
|
99
|
+
// Settle first, so a footer still running its entrance animation is not read as a hide.
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
if (!verdict())
|
|
102
|
+
return;
|
|
103
|
+
// Second look, so a late animation is not read as a hide.
|
|
104
|
+
setTimeout(async () => {
|
|
105
|
+
const cause = verdict();
|
|
106
|
+
if (!cause || salla.storage.getWithTTL('salla::tb-audit'))
|
|
107
|
+
return;
|
|
108
|
+
try {
|
|
109
|
+
await salla.analytics?.log('salla::trust-badges.hidden', {
|
|
110
|
+
store_id: salla.config.get('store.id'),
|
|
111
|
+
store_username: salla.config.get('store.username'),
|
|
112
|
+
theme_id: salla.config.get('theme.name'),
|
|
113
|
+
page_slug: salla.config.get('page.slug'),
|
|
114
|
+
cause,
|
|
115
|
+
});
|
|
116
|
+
// Marker lands after delivery, so a dropped request retries next visit.
|
|
117
|
+
salla.storage.setWithTTL('salla::tb-audit', true, 24 * 60);
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
salla.logger.error('salla-payments:: failed to report a hidden trust badge', error);
|
|
121
|
+
}
|
|
122
|
+
}, 2000);
|
|
123
|
+
}, 4000);
|
|
124
|
+
}, { threshold: 0.5 });
|
|
125
|
+
observer.observe(this.host);
|
|
126
|
+
}
|
|
54
127
|
componentDidRender() {
|
|
55
128
|
//todo:: double check about the following workaround to reduce the dom length, it looks unusal
|
|
56
129
|
this.host.querySelectorAll('#payment-slot').forEach(el => el.replaceWith(el.firstChild));
|
|
@@ -98,3 +171,4 @@ export class SallaPayments {
|
|
|
98
171
|
}
|
|
99
172
|
/** Slugs whose mini logo lives on the new assets CDN; add one when its logo is re-uploaded there. */
|
|
100
173
|
SallaPayments.NEW_CDN_LOGOS = ['tabby_installment', 'emkan_installment'];
|
|
174
|
+
SallaPayments.audited = false;
|
|
@@ -49,6 +49,7 @@ export class SallaRatingModalV2 {
|
|
|
49
49
|
this.confirmDeleteBtn = salla.lang.get('common.elements.confirm_delete');
|
|
50
50
|
this.updatedSuccessfullyLabel = salla.lang.get('pages.rating.review_updated_successfully');
|
|
51
51
|
this.deletedSuccessfullyLabel = salla.lang.get('pages.rating.review_deleted_successfully');
|
|
52
|
+
this.nothingToRateLabel = salla.lang.get('pages.rating.nothing_to_rate');
|
|
52
53
|
this.contactUsLabel = salla.lang.get('blocks.footer.social');
|
|
53
54
|
this.requiredFactorsLabel = salla.lang.get('pages.rating.rate_required_factors');
|
|
54
55
|
this.rateTheFollowingLabel = salla.lang.get('pages.rating.rate_the_following_factors');
|
|
@@ -270,6 +271,23 @@ export class SallaRatingModalV2 {
|
|
|
270
271
|
return this.getOrderProducts(order).filter(item => !this.hasRatingFeedback(item?.feedback) &&
|
|
271
272
|
(!this.productId || String(item.product.id) === String(this.productId)));
|
|
272
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* True when the order never had anything ratable to begin with (as opposed to
|
|
276
|
+
* everything already being rated). Distinguishes a genuinely broken/empty
|
|
277
|
+
* order-feedback response from the legitimate "all done, thank you" state.
|
|
278
|
+
*/
|
|
279
|
+
hasNothingToRate(order = this.order) {
|
|
280
|
+
if (!order) {
|
|
281
|
+
return true;
|
|
282
|
+
}
|
|
283
|
+
const testimonialsEverPossible = order.testimonials_enabled !== false &&
|
|
284
|
+
(order.testimonials_enabled === true || !!order.allowed_ratings?.testimonials_enabled);
|
|
285
|
+
const shippingEverPossible = !!order.shipping?.company &&
|
|
286
|
+
order.shipping_enabled !== false &&
|
|
287
|
+
(order.shipping_enabled === true || !!order.allowed_ratings?.shipping_enabled);
|
|
288
|
+
const productsEverPossible = order.products_enabled !== false && this.getOrderProducts(order).length > 0;
|
|
289
|
+
return !testimonialsEverPossible && !shippingEverPossible && !productsEverPossible;
|
|
290
|
+
}
|
|
273
291
|
getStepsCount(order = this.order) {
|
|
274
292
|
if (!order) {
|
|
275
293
|
return 0;
|
|
@@ -349,15 +367,16 @@ export class SallaRatingModalV2 {
|
|
|
349
367
|
this.defaultMode = true;
|
|
350
368
|
this.currentIndex = 0;
|
|
351
369
|
this.submitted = [];
|
|
370
|
+
const requestedOrderId = this.getRatingOrderId();
|
|
352
371
|
return new Promise(resolve => {
|
|
353
372
|
setTimeout(() => {
|
|
354
373
|
this.modal
|
|
355
374
|
?.open()
|
|
356
|
-
.then(() => this.order ||
|
|
375
|
+
.then(() => (this.order && this.order.id === requestedOrderId) ||
|
|
357
376
|
(this.isUnverifiedReview()
|
|
358
377
|
? this.loadUnverifiedProductOrder()
|
|
359
378
|
: salla.api
|
|
360
|
-
.withoutNotifier(() => salla.rating.api.order(
|
|
379
|
+
.withoutNotifier(() => salla.rating.api.order(requestedOrderId))
|
|
361
380
|
.then(async (res) => {
|
|
362
381
|
this.order = res.data;
|
|
363
382
|
this.productReviewFactors = await this.fetchAllProductReviewFactors(res.data);
|
|
@@ -503,6 +522,11 @@ export class SallaRatingModalV2 {
|
|
|
503
522
|
this.steps = this.modal?.querySelectorAll('.s-rating-modal-step');
|
|
504
523
|
this.dots = this.modal?.querySelectorAll('.s-rating-modal-step-dot');
|
|
505
524
|
if (this.stepsCount === 0) {
|
|
525
|
+
if (this.hasNothingToRate()) {
|
|
526
|
+
this.hasError = true;
|
|
527
|
+
this.errorMessage = this.nothingToRateLabel;
|
|
528
|
+
return;
|
|
529
|
+
}
|
|
506
530
|
this.showThankYou();
|
|
507
531
|
return;
|
|
508
532
|
}
|
|
@@ -1321,7 +1345,7 @@ export class SallaRatingModalV2 {
|
|
|
1321
1345
|
if (el)
|
|
1322
1346
|
this.nextBtn = el;
|
|
1323
1347
|
}, onClick: () => this.submit() }, salla.lang.get('common.elements.next'))),
|
|
1324
|
-
]) : (h("salla-placeholder", { alignment: "center" })))));
|
|
1348
|
+
]) : (h("div", { class: "s-rating-modal-wrapper" }, h("salla-placeholder", { alignment: "center" }, this.errorMessage ? (h("span", { slot: "description" }, this.errorMessage)) : null))))));
|
|
1325
1349
|
}
|
|
1326
1350
|
}
|
|
1327
1351
|
async componentWillLoad() {
|
|
@@ -1405,6 +1429,10 @@ export class SallaRatingModalV2 {
|
|
|
1405
1429
|
ar: 'شاركنا صورة مع تقييمك للطلب واكسب :points نقطة ولاء',
|
|
1406
1430
|
en: 'Share a photo with your order review and earn :points loyalty points',
|
|
1407
1431
|
},
|
|
1432
|
+
'pages.rating.nothing_to_rate': {
|
|
1433
|
+
ar: 'لا يوجد شيء متاح للتقييم في هذا الطلب حاليًا.',
|
|
1434
|
+
en: 'There is nothing available to rate for this order right now.',
|
|
1435
|
+
},
|
|
1408
1436
|
});
|
|
1409
1437
|
this.contactUsLabel = salla.lang.get('blocks.footer.social');
|
|
1410
1438
|
this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
|
|
@@ -1417,6 +1445,7 @@ export class SallaRatingModalV2 {
|
|
|
1417
1445
|
this.cancelLabel = salla.lang.get('common.elements.cancel');
|
|
1418
1446
|
this.updatedSuccessfullyLabel = salla.lang.get('pages.rating.review_updated_successfully');
|
|
1419
1447
|
this.deletedSuccessfullyLabel = salla.lang.get('pages.rating.review_deleted_successfully');
|
|
1448
|
+
this.nothingToRateLabel = salla.lang.get('pages.rating.nothing_to_rate');
|
|
1420
1449
|
this.confirmDeleteBtn = salla.lang.get('common.elements.confirm_delete');
|
|
1421
1450
|
this.requiredFactorsLabel = salla.lang.get('pages.rating.rate_required_factors');
|
|
1422
1451
|
this.rateTheFollowingLabel = salla.lang.get('pages.rating.rate_the_following_factors');
|
|
@@ -167,9 +167,10 @@ export class SallaRatingModal {
|
|
|
167
167
|
return this.getV2Ref()?.open();
|
|
168
168
|
}
|
|
169
169
|
this.defaultMode = true;
|
|
170
|
+
const requestedOrderId = this.orderId ? this.orderId : salla.config.get('page.id');
|
|
170
171
|
return new Promise((resolve) => {
|
|
171
172
|
setTimeout(() => {
|
|
172
|
-
this.modal.open().then(() => this.order || salla.api.withoutNotifier(() => salla.rating.api.order(
|
|
173
|
+
this.modal.open().then(() => (this.order && this.order.id === requestedOrderId) || salla.api.withoutNotifier(() => salla.rating.api.order(requestedOrderId)).then(res => this.order = res.data))
|
|
173
174
|
.then(() => this.readyUpLoyaltyPoints())
|
|
174
175
|
.then(() => this.modal.setTitle(`${salla.lang.get('pages.rating.rate_order')} <span class="unicode">(#${this.order.id})</span>`))
|
|
175
176
|
.then(() => {
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
/*!twlt*/.
|
|
2
|
-
visibility: visible
|
|
3
|
-
}
|
|
4
|
-
.collapse {
|
|
5
|
-
visibility: collapse
|
|
6
|
-
}
|
|
7
|
-
.static {
|
|
8
|
-
position: static
|
|
9
|
-
}
|
|
10
|
-
.flex {
|
|
11
|
-
display: flex
|
|
12
|
-
}
|
|
13
|
-
.hidden {
|
|
14
|
-
display: none
|
|
15
|
-
}
|
|
16
|
-
.s-trust-badges-wrapper {
|
|
1
|
+
/*!twlt*/.s-trust-badges-wrapper {
|
|
17
2
|
display: flex;
|
|
18
3
|
align-items: center
|
|
19
4
|
}
|