@salla.sa/twilight-components 2.14.556 → 2.14.558
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/{esm/cart-DY4LZmNP.js → cjs/cart-DSvlJXCH.js} +4 -2
- package/dist/cjs/{filepond-t0Yy69qV.js → filepond-LS8ytqmE.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DNZM6Czl.js → filepond-plugin-file-poster-DexU9y97.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BPMIodJt.js → filepond-plugin-file-validate-size-BJJ_spY7.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DgYmyGCI.js → filepond-plugin-file-validate-type-BYz_biwv.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-B4itf01h.js → filepond-plugin-image-edit-C3R9xG9P.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-Dj43xu10.js → filepond-plugin-image-exif-orientation-DC7e2K9l.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C6Gm9i9o.js → filepond-plugin-image-preview-DLbo1P7r.js} +1 -1
- package/dist/cjs/{index-DyL5Ypj3.js → index-BkcJlC9S.js} +14 -14
- package/dist/cjs/{intlTelInput-BTUy-aYK.js → intlTelInput-DvZz7cvU.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 +21 -6
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +3 -3
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +3 -3
- 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 +11 -11
- 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 +5 -5
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +3 -3
- 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_3.cjs.entry.js +1 -1
- 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 +48 -13
- 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 +279 -33
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +3 -165
- package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-C_t8j4f7.js → vanilla-picker-COagKVR0.js} +1 -1
- package/dist/collection/components/salla-button/salla-button.js +32 -2
- package/dist/collection/components/salla-modal/salla-modal.css +34 -16
- package/dist/collection/components/salla-modal/salla-modal.js +27 -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-product-card/salla-product-card.css +22 -2
- package/dist/collection/components/salla-product-card/salla-product-card.js +106 -11
- 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-search/interfaces.js +1 -0
- package/dist/collection/components/salla-search/salla-search.css +324 -14
- package/dist/collection/components/salla-search/salla-search.js +179 -32
- package/dist/collection/components/salla-search/utils.js +111 -0
- package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -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/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-button2.js +13 -2
- package/dist/components/salla-modal2.js +9 -3
- package/dist/components/salla-orders.js +294 -48
- package/dist/components/salla-payments.js +75 -1
- package/dist/components/salla-product-card2.js +50 -12
- package/dist/components/salla-rating-modal-v22.js +32 -3
- package/dist/components/salla-rating-modal2.js +2 -1
- package/dist/components/salla-search.js +392 -39
- package/dist/components/salla-searchable-dropdown2.js +4 -4
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share2.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-trust-badges.js +2 -164
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-wishlist-actions.js +1 -1
- package/dist/{cjs/cart-s-x1Fshk.js → esm/cart-gFG8By9O.js} +2 -4
- package/dist/esm/{filepond-Dl-e9LIA.js → filepond-D5Fnwsco.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-B44qzFr7.js → filepond-plugin-file-poster-BfePPO64.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DeewGi6D.js → filepond-plugin-file-validate-size-CVpLCDVB.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DquQHM9K.js → filepond-plugin-file-validate-type-BhzMnQfH.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DPSC2V4u.js → filepond-plugin-image-edit-Bvj3qwXE.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-A-4MC3po.js → filepond-plugin-image-exif-orientation-NlBBLgPL.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-vvc3KNls.js → filepond-plugin-image-preview-CA1k8ex-.js} +1 -1
- package/dist/esm/{index-BJmvvw9H.js → index-B6Lo-Jz2.js} +14 -14
- package/dist/esm/{intlTelInput-DFX9QeWQ.js → intlTelInput-nu7FH85H.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 +21 -6
- package/dist/esm/salla-add-product-button_5.entry.js +3 -3
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +3 -3
- 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 +11 -11
- 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 +5 -5
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +3 -3
- 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_3.entry.js +1 -1
- 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 +48 -13
- 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 +279 -33
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-social-share.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +3 -165
- package/dist/esm/salla-user-menu.entry.js +3 -3
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-Ld2F0WbU.js → vanilla-picker-Dn7Q0By-.js} +1 -1
- package/dist/twilight/{p-f0c19b59.entry.js → p-00f3dc2a.entry.js} +1 -1
- package/dist/twilight/{p-cc3c48b4.entry.js → p-051740db.entry.js} +1 -1
- package/dist/twilight/{p-95b8806a.entry.js → p-05f65278.entry.js} +1 -1
- package/dist/twilight/{p-3ec284fd.entry.js → p-0e9845d3.entry.js} +1 -1
- package/dist/twilight/{p-5391291e.entry.js → p-0ea66288.entry.js} +1 -1
- package/dist/twilight/{p-6b3e668c.entry.js → p-0f9d25c2.entry.js} +1 -1
- package/dist/twilight/{p-f6e44ad6.entry.js → p-100cb969.entry.js} +1 -1
- package/dist/twilight/{p-b654ffbd.entry.js → p-11234d66.entry.js} +1 -1
- package/dist/twilight/{p-54b4dec6.entry.js → p-1546f64d.entry.js} +1 -1
- package/dist/twilight/{p-bd68067a.entry.js → p-191b4fa6.entry.js} +1 -1
- package/dist/twilight/p-19607f60.entry.js +4 -0
- package/dist/twilight/p-1d1bbac7.entry.js +4 -0
- package/dist/twilight/{p-7e7f0849.entry.js → p-1d220636.entry.js} +1 -1
- package/dist/twilight/{p-7d0e8486.entry.js → p-1d9aa36c.entry.js} +1 -1
- package/dist/twilight/{p-1b97e436.entry.js → p-257717f5.entry.js} +1 -1
- package/dist/twilight/{p-ec27e0f4.entry.js → p-289574f0.entry.js} +1 -1
- package/dist/twilight/{p-d4263617.entry.js → p-28aeea5d.entry.js} +1 -1
- package/dist/twilight/{p-4df9ca99.entry.js → p-29a9ff44.entry.js} +1 -1
- package/dist/twilight/{p-1882e5b9.entry.js → p-2cb160a8.entry.js} +1 -1
- package/dist/twilight/{p-d8808de5.entry.js → p-2dc5f115.entry.js} +1 -1
- package/dist/twilight/{p-75e126cc.entry.js → p-2de7945d.entry.js} +1 -1
- package/dist/twilight/{p-a1ce8d6d.entry.js → p-2ebe428c.entry.js} +1 -1
- package/dist/twilight/{p-45b85a45.entry.js → p-31c017ae.entry.js} +1 -1
- package/dist/twilight/{p-8a640353.entry.js → p-344e7a53.entry.js} +1 -1
- package/dist/twilight/{p-4023d48a.entry.js → p-3661b790.entry.js} +1 -1
- package/dist/twilight/{p-55c89592.entry.js → p-3c312812.entry.js} +1 -1
- package/dist/twilight/{p-e209addd.entry.js → p-3f12a3a2.entry.js} +1 -1
- package/dist/twilight/{p-d16a17d2.entry.js → p-400c631e.entry.js} +1 -1
- package/dist/twilight/{p-d9e98286.entry.js → p-44f20e64.entry.js} +1 -1
- package/dist/twilight/{p-5af2868f.entry.js → p-4604590c.entry.js} +1 -1
- package/dist/twilight/{p-5b148ad4.entry.js → p-4c422a3d.entry.js} +1 -1
- package/dist/twilight/{p-d5a486bb.entry.js → p-4f645457.entry.js} +1 -1
- package/dist/twilight/{p-5ab257bf.entry.js → p-529a60e2.entry.js} +1 -1
- package/dist/twilight/{p-f37147c7.entry.js → p-5a2150e8.entry.js} +1 -1
- package/dist/twilight/{p-e0f7a4e1.entry.js → p-5d6db148.entry.js} +1 -1
- package/dist/twilight/{p-4ca525cb.entry.js → p-5d6f9c3e.entry.js} +1 -1
- package/dist/twilight/{p-2f59ef9c.entry.js → p-5dcf8a71.entry.js} +1 -1
- package/dist/twilight/{p-c266feb3.entry.js → p-5f4331f0.entry.js} +1 -1
- package/dist/twilight/{p-91351958.entry.js → p-5ffdb544.entry.js} +1 -1
- package/dist/twilight/{p-c4582e2b.entry.js → p-63b48fb1.entry.js} +1 -1
- package/dist/twilight/{p-291d6f2b.entry.js → p-647a1b63.entry.js} +1 -1
- package/dist/twilight/{p-92992a1e.entry.js → p-6840449d.entry.js} +1 -1
- package/dist/twilight/{p-99af9a68.entry.js → p-747fdf8c.entry.js} +1 -1
- package/dist/twilight/{p-918eb4b7.entry.js → p-7512638e.entry.js} +1 -1
- package/dist/twilight/{p-6d7629ee.entry.js → p-75ba562a.entry.js} +1 -1
- package/dist/twilight/{p-3bba916f.entry.js → p-7639c5a8.entry.js} +1 -1
- package/dist/twilight/{p-e64ad9de.entry.js → p-778f38ce.entry.js} +1 -1
- package/dist/twilight/{p-275b49b7.entry.js → p-785ac87d.entry.js} +1 -1
- package/dist/twilight/{p-90d5e633.entry.js → p-78cba566.entry.js} +1 -1
- package/dist/twilight/{p-e0e614d1.entry.js → p-7a78cbcd.entry.js} +1 -1
- package/dist/twilight/{p-3eb18438.entry.js → p-7b286e8d.entry.js} +1 -1
- package/dist/twilight/{p-2f2956d9.entry.js → p-8284d68b.entry.js} +1 -1
- package/dist/twilight/{p-4af910f1.entry.js → p-86622485.entry.js} +1 -1
- package/dist/twilight/{p-67efee3a.entry.js → p-8ca39b58.entry.js} +1 -1
- package/dist/twilight/{p-12a43d43.entry.js → p-8e10a9a9.entry.js} +1 -1
- package/dist/twilight/{p-dff3411a.entry.js → p-8ee698cc.entry.js} +1 -1
- package/dist/twilight/{p-89a82ff5.entry.js → p-8f11c556.entry.js} +1 -1
- package/dist/twilight/p-91ab3a03.entry.js +4 -0
- package/dist/twilight/{p-Ye-NG0xO.js → p-9L0Aq4PZ.js} +1 -1
- package/dist/twilight/{p-BJmvvw9H.js → p-B6Lo-Jz2.js} +1 -1
- package/dist/twilight/{p-BUfrGdXG.js → p-Ble2-eBI.js} +1 -1
- package/dist/twilight/{p-pCB_h2Xn.js → p-BopTxsQ2.js} +1 -1
- package/dist/twilight/{p-SDB-lCJg.js → p-CMHD60jb.js} +1 -1
- package/dist/twilight/{p-DXzyepGb.js → p-CUuXQJdT.js} +1 -1
- package/dist/twilight/{p-DpFFhlK6.js → p-CvrBhStg.js} +1 -1
- package/dist/twilight/{p-BscSw0sZ.js → p-DexDAAf1.js} +1 -1
- package/dist/twilight/{p-CLEHV1kt.js → p-Dgq6RHqV.js} +1 -1
- package/dist/twilight/{p-VDJLgJLw.js → p-VJGJYEfb.js} +1 -1
- package/dist/twilight/p-a1035984.entry.js +4 -0
- package/dist/twilight/{p-74f730e1.entry.js → p-a50073b5.entry.js} +1 -1
- package/dist/twilight/{p-4fdc296f.entry.js → p-a82db499.entry.js} +1 -1
- package/dist/twilight/{p-99702306.entry.js → p-a8d3ae7e.entry.js} +1 -1
- package/dist/twilight/p-a8d90638.entry.js +4 -0
- package/dist/twilight/{p-bfb82c90.entry.js → p-abce7e02.entry.js} +1 -1
- package/dist/twilight/{p-ba5546ab.entry.js → p-ad12ab8c.entry.js} +1 -1
- package/dist/twilight/{p-427d38a0.entry.js → p-adb31a76.entry.js} +1 -1
- package/dist/twilight/{p-601013e8.entry.js → p-b5a68a1a.entry.js} +1 -1
- package/dist/twilight/{p-fdc36d7c.entry.js → p-b695db2e.entry.js} +1 -1
- package/dist/twilight/{p-e1cca558.entry.js → p-ba941354.entry.js} +1 -1
- package/dist/twilight/{p-fa1900ec.entry.js → p-bb94c4e4.entry.js} +1 -1
- package/dist/twilight/{p-fc0304bf.entry.js → p-bbfaf5ac.entry.js} +1 -1
- package/dist/twilight/{p-2815c25a.entry.js → p-be292e0b.entry.js} +1 -1
- package/dist/twilight/{p-cb892619.entry.js → p-be34bd30.entry.js} +1 -1
- package/dist/twilight/{p-cddd3975.entry.js → p-bf2f2a36.entry.js} +1 -1
- package/dist/twilight/p-bfa7a257.entry.js +4 -0
- package/dist/twilight/{p-17522796.entry.js → p-c39c8112.entry.js} +1 -1
- package/dist/twilight/{p-3a1fd71a.entry.js → p-c56e1aa1.entry.js} +1 -1
- package/dist/twilight/{p-91f9f647.entry.js → p-c8c09f5c.entry.js} +1 -1
- package/dist/twilight/{p-a893e7e3.entry.js → p-c8c34286.entry.js} +1 -1
- package/dist/twilight/{p-88045527.entry.js → p-d41903f9.entry.js} +1 -1
- package/dist/twilight/{p-13011571.entry.js → p-d55b86b5.entry.js} +1 -1
- package/dist/twilight/{p-2fddb802.entry.js → p-d72e0350.entry.js} +1 -1
- package/dist/twilight/{p-95918a1a.entry.js → p-d96bc0c1.entry.js} +1 -1
- package/dist/twilight/{p-62dfd479.entry.js → p-db9f8104.entry.js} +2 -2
- package/dist/twilight/p-dd734bcb.entry.js +4 -0
- package/dist/twilight/p-df9d5f85.entry.js +4 -0
- package/dist/twilight/{p-8d7bfcf6.entry.js → p-e3a45456.entry.js} +1 -1
- package/dist/twilight/{p-6e08f950.entry.js → p-e5169250.entry.js} +1 -1
- package/dist/twilight/{p-a1738bf0.entry.js → p-ea606acc.entry.js} +1 -1
- package/dist/twilight/{p-2ce0c4ca.entry.js → p-effc8ceb.entry.js} +1 -1
- package/dist/twilight/{p-0d3be88f.entry.js → p-f2fb1121.entry.js} +1 -1
- package/dist/twilight/{p-5527801b.entry.js → p-fa7c358f.entry.js} +1 -1
- package/dist/twilight/{p-DY4LZmNP.js → p-gFG8By9O.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-modal/salla-modal.d.ts +5 -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-product-card/salla-product-card.d.ts +18 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +7 -0
- package/dist/types/components/salla-search/interfaces.d.ts +21 -0
- package/dist/types/components/salla-search/salla-search.d.ts +40 -2
- package/dist/types/components/salla-search/utils.d.ts +19 -0
- package/dist/types/components/salla-trust-badges/salla-trust-badges.d.ts +0 -22
- package/dist/types/components.d.ts +50 -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-acc63da6.entry.js +0 -4
- package/dist/twilight/p-bb082b47.entry.js +0 -4
- package/dist/twilight/p-f3eab493.entry.js +0 -4
|
@@ -1,12 +1,69 @@
|
|
|
1
1
|
/*!twlt*/:host {
|
|
2
2
|
display: block;
|
|
3
3
|
}
|
|
4
|
+
|
|
5
|
+
.s-orders-banner {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 0.625rem;
|
|
9
|
+
width: 100%;
|
|
10
|
+
margin-top: 1.5rem;
|
|
11
|
+
margin-bottom: 0.75rem;
|
|
12
|
+
padding: 0.75rem;
|
|
13
|
+
border-radius: 0.5rem;
|
|
14
|
+
background-color: #E6F4EA;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.s-orders-banner-icon {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
width: 1.25rem;
|
|
23
|
+
height: 1.25rem;
|
|
24
|
+
color: #1B7F5C;
|
|
25
|
+
}
|
|
26
|
+
.s-orders-banner-icon svg {
|
|
27
|
+
width: 1.5rem;
|
|
28
|
+
height: 1.5rem;
|
|
29
|
+
fill: currentColor;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.s-orders-banner-text {
|
|
33
|
+
flex: 1;
|
|
34
|
+
margin: 0;
|
|
35
|
+
font-size: 0.875rem;
|
|
36
|
+
line-height: 1.25rem;
|
|
37
|
+
color: #1f2937;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.s-orders-action-cell.s-orders-action-cell {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: flex-end;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.s-orders-leave-review-btn .s-button-text {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 0.375rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.s-orders-action-cell .s-orders-status-rated {
|
|
53
|
+
margin-inline-start: auto;
|
|
54
|
+
}
|
|
4
55
|
.relative {
|
|
5
56
|
position: relative;
|
|
6
57
|
}
|
|
7
58
|
.table {
|
|
8
59
|
display: table;
|
|
9
60
|
}
|
|
61
|
+
.outline {
|
|
62
|
+
outline-style: solid;
|
|
63
|
+
}
|
|
64
|
+
.filter {
|
|
65
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
66
|
+
}
|
|
10
67
|
.s-button-btn {
|
|
11
68
|
position: relative;
|
|
12
69
|
display: inline-flex;
|
|
@@ -68,6 +125,7 @@
|
|
|
68
125
|
width: 1rem;
|
|
69
126
|
}
|
|
70
127
|
@keyframes spin {
|
|
128
|
+
|
|
71
129
|
to {
|
|
72
130
|
content: var(--tw-content);
|
|
73
131
|
transform: rotate(360deg);
|
|
@@ -106,6 +164,7 @@
|
|
|
106
164
|
margin-bottom: calc(0.625rem * var(--tw-space-y-reverse));
|
|
107
165
|
}
|
|
108
166
|
@media (min-width: 768px) {
|
|
167
|
+
|
|
109
168
|
.s-orders-container > :not([hidden]) ~ :not([hidden]) {
|
|
110
169
|
--tw-space-y-reverse: 0;
|
|
111
170
|
margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));
|
|
@@ -120,6 +179,7 @@
|
|
|
120
179
|
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|
|
121
180
|
}
|
|
122
181
|
@media (min-width: 768px) {
|
|
182
|
+
|
|
123
183
|
.s-orders-mobile-title {
|
|
124
184
|
display: none;
|
|
125
185
|
}
|
|
@@ -128,6 +188,7 @@
|
|
|
128
188
|
display: none;
|
|
129
189
|
}
|
|
130
190
|
@media (min-width: 768px) {
|
|
191
|
+
|
|
131
192
|
.s-orders-reference-id {
|
|
132
193
|
display: inline-block;
|
|
133
194
|
}
|
|
@@ -143,6 +204,7 @@
|
|
|
143
204
|
align-items: center;
|
|
144
205
|
}
|
|
145
206
|
@media (min-width: 768px) {
|
|
207
|
+
|
|
146
208
|
.s-orders-copy-to-clipboard-button {
|
|
147
209
|
display: none;
|
|
148
210
|
}
|
|
@@ -162,6 +224,7 @@
|
|
|
162
224
|
margin-right: 0.25rem;
|
|
163
225
|
}
|
|
164
226
|
@media (min-width: 768px) {
|
|
227
|
+
|
|
165
228
|
.s-orders-status-container {
|
|
166
229
|
margin-left: 0px;
|
|
167
230
|
margin-right: 0px;
|
|
@@ -200,6 +263,30 @@
|
|
|
200
263
|
--tw-text-opacity: 1;
|
|
201
264
|
color: rgb(229 231 235 / var(--tw-text-opacity, 1));
|
|
202
265
|
}
|
|
266
|
+
.s-orders-leave-review-btn {
|
|
267
|
+
display: inline-flex;
|
|
268
|
+
flex-shrink: 0;
|
|
269
|
+
align-items: center;
|
|
270
|
+
gap: 0.25rem;
|
|
271
|
+
font-weight: 700;
|
|
272
|
+
color: var(--color-primary);
|
|
273
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
274
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
275
|
+
transition-duration: 300ms;
|
|
276
|
+
}
|
|
277
|
+
.s-orders-leave-review-btn:hover {
|
|
278
|
+
opacity: 0.7;
|
|
279
|
+
}
|
|
280
|
+
.s-orders-leave-review-btn:where([dir="ltr"], [dir="ltr"] *) {
|
|
281
|
+
margin-left: 1rem;
|
|
282
|
+
}
|
|
283
|
+
.s-orders-leave-review-btn:where([dir="rtl"], [dir="rtl"] *) {
|
|
284
|
+
margin-right: 1rem;
|
|
285
|
+
}
|
|
286
|
+
.s-orders-review-star-icon {
|
|
287
|
+
font-size: 1.125rem;
|
|
288
|
+
line-height: 1.75rem;
|
|
289
|
+
}
|
|
203
290
|
.s-orders-no-content {
|
|
204
291
|
display: flex;
|
|
205
292
|
height: 100%;
|
|
@@ -233,17 +320,45 @@
|
|
|
233
320
|
--tw-text-opacity: 1;
|
|
234
321
|
color: rgb(107 114 128 / var(--tw-text-opacity, 1));
|
|
235
322
|
}
|
|
323
|
+
.s-orders-filters {
|
|
324
|
+
margin-bottom: 1rem;
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-wrap: wrap;
|
|
327
|
+
align-items: center;
|
|
328
|
+
gap: 0.5rem;
|
|
329
|
+
}
|
|
330
|
+
.s-orders-list-wrapper {
|
|
331
|
+
position: relative;
|
|
332
|
+
}
|
|
333
|
+
.s-orders-list-loading {
|
|
334
|
+
position: absolute;
|
|
335
|
+
inset: 0px;
|
|
336
|
+
z-index: 10;
|
|
337
|
+
display: flex;
|
|
338
|
+
align-items: center;
|
|
339
|
+
justify-content: center;
|
|
340
|
+
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
|
|
341
|
+
--tw-bg-opacity: 0.1;
|
|
342
|
+
}
|
|
236
343
|
.s-orders-table {
|
|
237
344
|
min-width: 100%;
|
|
238
345
|
border-collapse: separate;
|
|
239
346
|
}
|
|
240
347
|
@media (min-width: 768px) {
|
|
348
|
+
|
|
241
349
|
.s-orders-table {
|
|
242
350
|
margin-bottom: -0.75rem;
|
|
243
351
|
--tw-border-spacing-y: 1.25rem;
|
|
244
352
|
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
|
|
245
353
|
}
|
|
246
354
|
}
|
|
355
|
+
.s-orders-table-fetching {
|
|
356
|
+
pointer-events: none;
|
|
357
|
+
opacity: 0.4;
|
|
358
|
+
transition-property: opacity;
|
|
359
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
360
|
+
transition-duration: 200ms;
|
|
361
|
+
}
|
|
247
362
|
.s-orders-table-head {
|
|
248
363
|
margin-bottom: 1.25rem;
|
|
249
364
|
display: none;
|
|
@@ -251,6 +366,7 @@
|
|
|
251
366
|
background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
|
|
252
367
|
}
|
|
253
368
|
@media (min-width: 768px) {
|
|
369
|
+
|
|
254
370
|
.s-orders-table-head {
|
|
255
371
|
display: table-header-group;
|
|
256
372
|
}
|
|
@@ -296,6 +412,7 @@
|
|
|
296
412
|
transition-duration: 500ms;
|
|
297
413
|
}
|
|
298
414
|
@media (min-width: 768px) {
|
|
415
|
+
|
|
299
416
|
.s-orders-table-tbody-tr {
|
|
300
417
|
display: table-row;
|
|
301
418
|
flex-direction: row;
|
|
@@ -316,17 +433,21 @@
|
|
|
316
433
|
font-weight: 700;
|
|
317
434
|
}
|
|
318
435
|
@media (min-width: 768px) {
|
|
436
|
+
|
|
319
437
|
.s-orders-table-tbody-tr-td {
|
|
320
438
|
height: 5rem;
|
|
321
439
|
width: auto;
|
|
322
440
|
}
|
|
441
|
+
|
|
323
442
|
.s-orders-table-tbody-tr-td:last-child {
|
|
324
443
|
text-align: end;
|
|
325
444
|
}
|
|
445
|
+
|
|
326
446
|
.s-orders-table-tbody-tr-td:first-child:where([dir="ltr"], [dir="ltr"] *) {
|
|
327
447
|
border-top-left-radius: 0.375rem;
|
|
328
448
|
border-bottom-left-radius: 0.375rem;
|
|
329
449
|
}
|
|
450
|
+
|
|
330
451
|
.s-orders-table-tbody-tr-td:first-child:where([dir="rtl"], [dir="rtl"] *) {
|
|
331
452
|
border-top-right-radius: 0.375rem;
|
|
332
453
|
border-bottom-right-radius: 0.375rem;
|
|
@@ -346,6 +467,7 @@
|
|
|
346
467
|
padding-bottom: 0.25rem;
|
|
347
468
|
}
|
|
348
469
|
@media (min-width: 768px) {
|
|
470
|
+
|
|
349
471
|
.s-orders-table-tbody-tr-td-content {
|
|
350
472
|
padding-left: 1.5rem;
|
|
351
473
|
padding-right: 1.5rem;
|
|
@@ -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"; }
|