@salla.sa/twilight-components 2.14.537 → 2.14.539
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/{cancel-B5SbMYEk.js → cancel-De6vslRA.js} +2 -2
- package/dist/cjs/{check-BnVBPQNp.js → check-x3w3-gpj.js} +2 -2
- package/dist/cjs/{filepond-BKilDzmk.js → filepond-CIpOpiw6.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DMIbAyAM.js → filepond-plugin-file-poster-CPV_SZrj.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-NaEK453w.js → filepond-plugin-file-validate-size-C_XGylG1.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-C4fSQyfm.js → filepond-plugin-file-validate-type-CmVS48lk.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-M4p4znH2.js → filepond-plugin-image-edit-KfqhH5F9.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BmZUQ1qY.js → filepond-plugin-image-exif-orientation-BfRIDxO-.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DQeJbx48.js → filepond-plugin-image-preview-DlvO4sHZ.js} +1 -1
- package/dist/cjs/{gift-DbNivqYO.js → gift-CJ-3Yw_x.js} +2 -2
- package/dist/cjs/{gift-sharing-BE0uszUm.js → gift-sharing-CStz46FA.js} +2 -2
- package/dist/cjs/{index-B_5gLFr2.js → index-CMDyFi6Q.js} +112 -66
- package/dist/cjs/{intlTelInput-B5hswC8S.js → intlTelInput-BK34b4sR.js} +1 -1
- package/dist/cjs/{iphone-x-qC21wCLj.js → iphone-x-B683VspR.js} +2 -2
- 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 +10 -10
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +8 -8
- package/dist/cjs/salla-advertisement.cjs.entry.js +2 -2
- package/dist/cjs/salla-alert_2.cjs.entry.js +3 -3
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +2 -2
- package/dist/cjs/salla-apps-icons.cjs.entry.js +2 -2
- package/dist/cjs/salla-badge.cjs.entry.js +2 -2
- package/dist/cjs/salla-basket-gap.cjs.entry.js +2 -2
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +16 -16
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +42 -39
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +4 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-comment-factors.cjs.entry.js +2 -2
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +15 -13
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +2 -2
- package/dist/cjs/salla-contacts.cjs.entry.js +2 -2
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +2 -2
- package/dist/cjs/{salla-count-down_2.cjs.entry.js → salla-count-down.cjs.entry.js} +2 -210
- package/dist/cjs/salla-custom-fields.cjs.entry.js +2 -2
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +4 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +2 -2
- package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +4 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +7 -7
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +2 -2
- package/dist/cjs/salla-list-tile.cjs.entry.js +2 -2
- package/dist/cjs/salla-localization-modal.cjs.entry.js +5 -2
- package/dist/cjs/salla-login-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +980 -0
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +27 -0
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +7 -4
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +4 -4
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +4 -4
- package/dist/cjs/salla-map_2.cjs.entry.js +3 -3
- package/dist/cjs/salla-menu.cjs.entry.js +2 -2
- package/dist/cjs/salla-metadata.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +2 -2
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +172 -0
- package/dist/cjs/salla-offer-modal.cjs.entry.js +6 -7
- package/dist/cjs/salla-offer.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-branch.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-cancel.cjs.entry.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +367 -0
- package/dist/cjs/salla-order-shipments.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-summary.cjs.entry.js +4 -4
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +2 -2
- package/dist/cjs/salla-orders.cjs.entry.js +5 -3
- package/dist/cjs/salla-payments.cjs.entry.js +2 -2
- package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
- package/dist/cjs/salla-price-range.cjs.entry.js +2 -2
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +2 -2
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +2 -2
- package/dist/cjs/salla-products-list.cjs.entry.js +5 -3
- package/dist/cjs/salla-products-slider.cjs.entry.js +167 -0
- package/dist/cjs/salla-quick-order.cjs.entry.js +6 -6
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +2 -2
- package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +2 -2
- package/dist/cjs/salla-scopes.cjs.entry.js +2 -2
- package/dist/cjs/salla-search.cjs.entry.js +2 -2
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-slider.cjs.entry.js +2 -2
- package/dist/cjs/salla-social-share.cjs.entry.js +5 -5
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +2 -2
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +2 -2
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +2 -2
- package/dist/cjs/salla-user-menu.cjs.entry.js +6 -6
- package/dist/cjs/salla-user-profile.cjs.entry.js +2 -2
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +2 -2
- package/dist/cjs/salla-wallet.cjs.entry.js +5 -3
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
- package/dist/cjs/{cart2-B98PSAFN.js → tag-BH5n_Nx3.js} +9 -2
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DcX-oQDe.js → vanilla-picker-DYTpjTDj.js} +1 -1
- package/dist/collection/collection-manifest.json +20 -0
- package/dist/collection/components/salla-accordion/salla-accordion.css +233 -0
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.css +248 -1
- package/dist/collection/components/salla-advertisement/salla-advertisement.css +53 -2
- package/dist/collection/components/salla-alert/salla-alert.css +57 -2
- package/dist/collection/components/salla-app-install-alert/salla-app-install-alert.css +123 -2
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.css +15 -2
- package/dist/collection/components/salla-badge/salla-badge.css +72 -0
- package/dist/collection/components/salla-basket-gap/salla-basket-gap.css +282 -2
- package/dist/collection/components/salla-booking-field/salla-booking-field.css +108 -2
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.css +273 -2
- package/dist/collection/components/salla-bought-together/salla-bought-together.css +139 -2
- package/dist/collection/components/salla-breadcrumb/salla-breadcrumb.css +49 -2
- package/dist/collection/components/salla-bullet-delivery/helpers.js +14 -0
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +1170 -5
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +20 -19
- package/dist/collection/components/salla-button/salla-button.css +681 -2
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.css +344 -2
- package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.css +108 -2
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.css +43 -0
- package/dist/collection/components/salla-cart-summary-card/salla-cart-summary-card.css +308 -0
- package/dist/collection/components/salla-cart-summary-card/salla-cart-summary-card.js +10 -0
- package/dist/collection/components/salla-cashback-banner/salla-cashback-banner.css +39 -0
- package/dist/collection/components/salla-color-picker/salla-color-picker.css +48 -0
- package/dist/collection/components/salla-comment-form/salla-comment-form.css +94 -2
- package/dist/collection/components/salla-comments/salla-comments.css +626 -2
- package/dist/collection/components/salla-comments/salla-comments.js +2 -2
- package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.css +293 -2
- package/dist/collection/components/salla-contacts/salla-contacts.css +105 -2
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +91 -2
- package/dist/collection/components/salla-count-down/salla-count-down.css +395 -2
- package/dist/collection/components/salla-custom-fields/salla-custom-fields.css +86 -2
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.css +88 -2
- package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.css +452 -0
- package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.js +10 -0
- package/dist/collection/components/salla-drawer/salla-drawer.css +403 -0
- package/dist/collection/components/salla-edit-order-button/salla-edit-order-button.css +2 -2
- package/dist/collection/components/salla-file-upload/salla-file-upload.css +277 -2
- package/dist/collection/components/salla-filters/salla-filters.css +199 -2
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.css +169 -2
- package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.css +140 -0
- package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.js +10 -0
- package/dist/collection/components/salla-gifting/salla-gifting.css +593 -2
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.css +107 -2
- package/dist/collection/components/salla-installment/salla-installment.css +8 -2
- package/dist/collection/components/salla-list-tile/salla-list-tile.css +190 -0
- package/dist/collection/components/salla-loading/salla-loading.css +13 -2
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.css +170 -0
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +11 -1
- package/dist/collection/components/salla-login-modal/salla-login-modal.css +8 -2
- package/dist/collection/components/salla-loyalty/salla-loyalty.css +377 -0
- package/dist/collection/components/salla-loyalty-points-banner/salla-loyalty-points-banner.css +36 -0
- package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.css +365 -0
- package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.js +11 -1
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.css +1621 -2
- package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.css +156 -2
- package/dist/collection/components/salla-map/salla-map.css +88 -2
- package/dist/collection/components/salla-menu/salla-menu.css +175 -2
- package/dist/collection/components/salla-metadata/salla-metadata.css +49 -0
- package/dist/collection/components/salla-modal/salla-modal.css +556 -2
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.css +342 -2
- package/dist/collection/components/salla-next-order-coupon/salla-next-order-coupon.css +190 -2
- package/dist/collection/components/salla-notifications/salla-notifications.css +217 -0
- package/dist/collection/components/salla-notifications/salla-notifications.js +2 -2
- package/dist/collection/components/salla-offer/salla-offer.css +961 -2
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.css +514 -2
- package/dist/collection/components/salla-order-branch/salla-order-branch.css +269 -2
- package/dist/collection/components/salla-order-cancel/salla-order-cancel.css +283 -2
- package/dist/collection/components/salla-order-details/salla-order-details.css +319 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit.css +773 -2
- package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.css +50 -2
- package/dist/collection/components/salla-order-shipments/salla-order-shipments.css +110 -2
- package/dist/collection/components/salla-order-summary/salla-order-summary.css +117 -2
- package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.css +116 -2
- package/dist/collection/components/salla-orders/salla-orders.css +367 -2
- package/dist/collection/components/salla-orders/salla-orders.js +2 -2
- package/dist/collection/components/salla-payments/salla-payments.css +40 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.css +121 -0
- package/dist/collection/components/salla-price-range/salla-price-range.css +146 -2
- package/dist/collection/components/salla-product-availability/salla-product-availability.css +188 -2
- package/dist/collection/components/salla-product-card/salla-product-card.css +694 -2
- package/dist/collection/components/salla-product-card-embed/salla-product-card-embed.css +42 -2
- package/dist/collection/components/salla-product-options/salla-product-options.css +749 -0
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.css +105 -2
- package/dist/collection/components/salla-products-list/salla-products-list.css +286 -2
- package/dist/collection/components/salla-products-list/salla-products-list.js +2 -2
- package/dist/collection/components/salla-products-slider/salla-products-slider.css +48 -0
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.css +53 -0
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.css +47 -2
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.css +32 -2
- package/dist/collection/components/salla-quick-order/salla-quick-order.css +233 -1
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +540 -2
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.css +91 -2
- package/dist/collection/components/salla-review-card/salla-review-card.css +213 -1
- package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.css +45 -2
- package/dist/collection/components/salla-reviews/salla-reviews.css +378 -0
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.css +124 -2
- package/dist/collection/components/salla-reviews-summary/salla-reviews-summary.css +118 -2
- package/dist/collection/components/salla-scopes/salla-scopes.css +299 -2
- package/dist/collection/components/salla-search/salla-search.css +298 -2
- package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.css +508 -0
- package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +14 -4
- package/dist/collection/components/salla-skeleton/salla-skeleton.css +31 -2
- package/dist/collection/components/salla-slider/salla-slider.css +749 -2
- package/dist/collection/components/salla-social/salla-social.css +31 -2
- package/dist/collection/components/salla-social-share/salla-social-share.css +56 -2
- package/dist/collection/components/salla-tabs/salla-tabs.css +233 -2
- package/dist/collection/components/salla-tel-input/salla-tel-input.css +82 -2
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.css +305 -2
- package/dist/collection/components/salla-tooltip/salla-tooltip.css +10 -3
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.css +36 -0
- package/dist/collection/components/salla-user-menu/salla-user-menu.css +395 -0
- package/dist/collection/components/salla-user-profile/salla-user-profile.css +79 -2
- package/dist/collection/components/salla-user-settings/salla-user-settings.css +299 -2
- package/dist/collection/components/salla-verify/salla-verify.css +226 -2
- package/dist/collection/components/salla-wallet/salla-wallet.css +333 -2
- package/dist/collection/components/salla-wallet/salla-wallet.js +2 -2
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.css +88 -2
- package/dist/collection/global/app.js +60 -0
- package/dist/collection/global/app.ts +60 -0
- package/dist/collection/global/base-css.js +5 -0
- package/dist/collection/global/base-css.ts +2 -0
- package/dist/collection/plugins/build-base-css.js +43 -0
- package/dist/collection/plugins/css-coverage-check.js +363 -0
- package/dist/collection/plugins/tailwind-per-component.js +146 -0
- package/dist/collection/plugins/watch-utilities.js +22 -0
- package/dist/components/index.js +64 -2
- package/dist/components/salla-accordion2.js +1 -1
- package/dist/components/salla-add-product-button2.js +1 -1
- package/dist/components/salla-advertisement.js +1 -1
- package/dist/components/salla-alert.js +1 -1
- package/dist/components/salla-app-install-alert.js +1 -1
- package/dist/components/salla-apps-icons.js +1 -1
- package/dist/components/salla-badge2.js +1 -1
- package/dist/components/salla-basket-gap.js +1 -1
- package/dist/components/salla-booking-field2.js +1 -1
- package/dist/components/salla-bottom-alert.js +1 -1
- package/dist/components/salla-bought-together.js +1 -1
- package/dist/components/salla-breadcrumb.js +1 -1
- package/dist/components/salla-bullet-delivery.js +34 -34
- package/dist/components/salla-button2.js +1 -1
- package/dist/components/salla-cart-coupons.js +1 -1
- package/dist/components/salla-cart-item-offers.js +1 -1
- package/dist/components/salla-cart-summary-card.js +3 -0
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-cashback-banner.js +1 -1
- package/dist/components/salla-color-picker2.js +1 -1
- package/dist/components/salla-comment-factors2.js +1 -1
- package/dist/components/salla-comment-form2.js +1 -1
- package/dist/components/salla-comment-item2.js +1 -1
- package/dist/components/salla-comments.js +4 -2
- package/dist/components/salla-conditional-offer.js +1 -1
- package/dist/components/salla-contacts.js +1 -1
- package/dist/components/salla-cookies-bar.js +1 -1
- package/dist/components/salla-count-down2.js +1 -1
- package/dist/components/salla-custom-fields.js +1 -1
- package/dist/components/salla-datetime-picker2.js +1 -1
- package/dist/components/salla-delivery-promise.js +3 -0
- package/dist/components/salla-drawer2.js +1 -1
- package/dist/components/salla-edit-order-button.js +1 -1
- package/dist/components/salla-file-upload2.js +1 -1
- package/dist/components/salla-filters-widget2.js +1 -1
- package/dist/components/salla-filters.js +1 -1
- package/dist/components/salla-fulfillment-methods.js +3 -0
- package/dist/components/salla-gifting.js +1 -1
- package/dist/components/salla-infinite-scroll.js +1 -1
- package/dist/components/salla-installment.js +1 -1
- package/dist/components/salla-list-tile2.js +1 -1
- package/dist/components/salla-loading2.js +1 -1
- package/dist/components/salla-localization-modal.js +4 -1
- package/dist/components/salla-login-modal2.js +1 -1
- package/dist/components/salla-loyalty-banner.js +1 -1
- package/dist/components/salla-loyalty-exchange-product-card2.js +1 -1
- package/dist/components/salla-loyalty-hero2.js +1 -1
- package/dist/components/salla-loyalty-panel.js +1 -1
- package/dist/components/salla-loyalty-point2.js +1 -1
- package/dist/components/salla-loyalty-points-banner.js +1 -1
- package/dist/components/salla-loyalty-points-history.js +4 -1
- package/dist/components/salla-loyalty-program.js +1 -1
- package/dist/components/salla-loyalty-reward.js +1 -1
- package/dist/components/salla-loyalty.js +1 -1
- package/dist/components/salla-maintenance-alert.js +1 -1
- package/dist/components/salla-map2.js +1 -1
- package/dist/components/salla-menu.js +1 -1
- package/dist/components/salla-metadata.js +1 -1
- package/dist/components/salla-modal2.js +1 -1
- package/dist/components/salla-multiple-bundle-product.js +1 -1
- package/dist/components/salla-next-order-coupon.js +1 -1
- package/dist/components/salla-notification-item2.js +1 -1
- package/dist/components/salla-notifications.js +4 -2
- package/dist/components/salla-offer-modal.js +1 -1
- package/dist/components/salla-offer.js +1 -1
- package/dist/components/salla-order-branch.js +1 -1
- package/dist/components/salla-order-cancel.js +1 -1
- package/dist/components/salla-order-details.js +1 -1
- package/dist/components/salla-order-edit.js +1 -1
- package/dist/components/salla-order-options-modal2.js +1 -1
- package/dist/components/salla-order-shipments.js +1 -1
- package/dist/components/salla-order-summary.js +1 -1
- package/dist/components/salla-order-totals-card.js +1 -1
- package/dist/components/salla-orders.js +4 -2
- package/dist/components/salla-payments.js +1 -1
- package/dist/components/salla-placeholder2.js +1 -1
- package/dist/components/salla-price-range2.js +1 -1
- package/dist/components/salla-product-availability2.js +1 -1
- package/dist/components/salla-product-card-embed.js +1 -1
- package/dist/components/salla-product-card2.js +1 -1
- package/dist/components/salla-product-options2.js +1 -1
- package/dist/components/salla-product-size-guide.js +1 -1
- package/dist/components/salla-products-list2.js +4 -2
- package/dist/components/salla-products-slider2.js +1 -1
- package/dist/components/salla-progress-bar2.js +1 -1
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.js +1 -1
- package/dist/components/salla-quick-order.js +1 -1
- package/dist/components/salla-rating-modal-v22.js +1 -1
- package/dist/components/salla-rating-modal.js +1 -1
- package/dist/components/salla-rating-stars2.js +1 -1
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-review-factors-tags2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews-summary2.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-reward-action2.js +1 -1
- package/dist/components/salla-reward-card2.js +1 -1
- package/dist/components/salla-reward-details2.js +1 -1
- package/dist/components/salla-reward-exchange2.js +1 -1
- package/dist/components/salla-scopes.js +1 -1
- package/dist/components/salla-search.js +1 -1
- package/dist/components/salla-searchable-dropdown2.js +7 -4
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-slider2.js +1 -1
- package/dist/components/salla-social-share2.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tiered-offer.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-trust-badges.js +1 -1
- package/dist/components/salla-user-menu.js +1 -1
- package/dist/components/salla-user-profile.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-verify.js +1 -1
- package/dist/components/salla-wallet.js +4 -2
- package/dist/components/salla-wishlist-actions.js +1 -1
- package/dist/esm/{cancel-8Tsmrwno.js → cancel-BsLF_HK7.js} +2 -2
- package/dist/esm/{check-BZp0rKEO.js → check-BsXh13x8.js} +2 -2
- package/dist/esm/{filepond-Co-IypIA.js → filepond-DMUE9Fyj.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CoRXw3k-.js → filepond-plugin-file-poster-DBZQTm7s.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CGJ0QOyy.js → filepond-plugin-file-validate-size-CrKxdsNW.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DDAxGYz8.js → filepond-plugin-file-validate-type-DvEJrucY.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BTbI51S8.js → filepond-plugin-image-edit-C6ptCg9o.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-C0VSH5eq.js → filepond-plugin-image-exif-orientation-IcgeTieF.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DZbIdviE.js → filepond-plugin-image-preview-CDMh74os.js} +1 -1
- package/dist/esm/{gift-CXRKXFgT.js → gift-BChI23pG.js} +2 -2
- package/dist/esm/{gift-sharing-0-eTJXSD.js → gift-sharing-DxkgAGoT.js} +2 -2
- package/dist/esm/{index-BICKbbaT.js → index-CjQzkU95.js} +112 -66
- package/dist/esm/{intlTelInput-CcU6kFYO.js → intlTelInput-Dsx2z7pR.js} +1 -1
- package/dist/esm/{iphone-x-CciN5Q_x.js → iphone-x-Z7udRKSZ.js} +2 -2
- 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 +10 -10
- package/dist/esm/salla-add-product-button_5.entry.js +8 -8
- package/dist/esm/salla-advertisement.entry.js +2 -2
- package/dist/esm/salla-alert_2.entry.js +3 -3
- package/dist/esm/salla-app-install-alert.entry.js +2 -2
- package/dist/esm/salla-apps-icons.entry.js +2 -2
- package/dist/esm/salla-badge.entry.js +2 -2
- package/dist/esm/salla-basket-gap.entry.js +2 -2
- package/dist/esm/salla-booking-field_7.entry.js +16 -16
- package/dist/esm/salla-bullet-delivery_2.entry.js +42 -39
- package/dist/esm/salla-cart-coupons.entry.js +2 -2
- package/dist/esm/salla-cart-item-offers_2.entry.js +5 -5
- package/dist/esm/salla-cart-summary-card.entry.js +4 -1
- package/dist/esm/salla-cashback-banner.entry.js +2 -2
- package/dist/esm/salla-comment-factors.entry.js +2 -2
- package/dist/esm/salla-comment-form_8.entry.js +15 -13
- package/dist/esm/salla-conditional-offer.entry.js +2 -2
- package/dist/esm/salla-contacts.entry.js +2 -2
- package/dist/esm/salla-cookies-bar.entry.js +2 -2
- package/dist/esm/{salla-count-down_2.entry.js → salla-count-down.entry.js} +3 -210
- package/dist/esm/salla-custom-fields.entry.js +2 -2
- package/dist/esm/salla-delivery-promise.entry.js +4 -1
- package/dist/esm/salla-edit-order-button.entry.js +2 -2
- package/dist/esm/salla-filters-widget.entry.js +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-fulfillment-methods.entry.js +4 -1
- package/dist/esm/salla-gifting.entry.js +7 -7
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +2 -2
- package/dist/esm/salla-list-tile.entry.js +2 -2
- package/dist/esm/salla-localization-modal.entry.js +5 -2
- package/dist/esm/salla-login-modal.entry.js +2 -2
- package/dist/esm/salla-loyalty-banner_10.entry.js +969 -0
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +25 -0
- package/dist/esm/salla-loyalty-points-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-points-history.entry.js +7 -4
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +4 -4
- package/dist/esm/salla-maintenance-alert.entry.js +4 -4
- package/dist/esm/salla-map_2.entry.js +3 -3
- package/dist/esm/salla-menu.entry.js +2 -2
- package/dist/esm/salla-metadata.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-next-order-coupon.entry.js +2 -2
- package/dist/esm/salla-notification-item_2.entry.js +169 -0
- package/dist/esm/salla-offer-modal.entry.js +6 -7
- package/dist/esm/salla-offer.entry.js +2 -2
- package/dist/esm/salla-order-branch.entry.js +2 -2
- package/dist/esm/salla-order-cancel.entry.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/salla-order-options-modal_2.entry.js +364 -0
- package/dist/esm/salla-order-shipments.entry.js +2 -2
- package/dist/esm/salla-order-summary.entry.js +4 -4
- package/dist/esm/salla-order-totals-card.entry.js +2 -2
- package/dist/esm/salla-orders.entry.js +5 -3
- package/dist/esm/salla-payments.entry.js +2 -2
- package/dist/esm/salla-placeholder.entry.js +2 -2
- package/dist/esm/salla-price-range.entry.js +2 -2
- package/dist/esm/salla-product-card-embed.entry.js +2 -2
- package/dist/esm/salla-product-size-guide.entry.js +2 -2
- package/dist/esm/salla-products-list.entry.js +5 -3
- package/dist/esm/salla-products-slider.entry.js +165 -0
- package/dist/esm/salla-quick-order.entry.js +6 -6
- package/dist/esm/salla-rating-modal-v2.entry.js +2 -2
- package/dist/esm/salla-rating-modal.entry.js +2 -2
- package/dist/esm/salla-review-factors-tags.entry.js +2 -2
- package/dist/esm/salla-scopes.entry.js +2 -2
- package/dist/esm/salla-search.entry.js +2 -2
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-slider.entry.js +2 -2
- package/dist/esm/salla-social-share.entry.js +5 -5
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +2 -2
- package/dist/esm/salla-tiered-offer.entry.js +2 -2
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +2 -2
- package/dist/esm/salla-user-menu.entry.js +6 -6
- package/dist/esm/salla-user-profile.entry.js +2 -2
- package/dist/esm/salla-user-settings.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +2 -2
- package/dist/esm/salla-wallet.entry.js +5 -3
- package/dist/esm/salla-wishlist-actions.entry.js +2 -2
- package/dist/esm/{cart2-D1s2kXqL.js → tag-DRvZV5oe.js} +8 -2
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-ZYaCOUKK.js → vanilla-picker-oYjMgYry.js} +1 -1
- package/dist/twilight/global/app.ts +60 -0
- package/dist/twilight/global/base-css.ts +2 -0
- package/dist/twilight/p-0a1271e1.entry.js +4 -0
- package/dist/twilight/p-1151ebd7.entry.js +4 -0
- package/dist/twilight/p-116e7555.entry.js +4 -0
- package/dist/twilight/{p-a5d54ce0.entry.js → p-1470e96a.entry.js} +1 -1
- package/dist/twilight/p-14c72ffd.entry.js +4 -0
- package/dist/twilight/p-152c657e.entry.js +4 -0
- package/dist/twilight/p-1754903f.entry.js +4 -0
- package/dist/twilight/{p-e24e104a.entry.js → p-187a502c.entry.js} +1 -1
- package/dist/twilight/p-1c31cec0.entry.js +4 -0
- package/dist/twilight/p-1c369bcf.entry.js +4 -0
- package/dist/twilight/{p-eb1bdbee.entry.js → p-1d2804ac.entry.js} +1 -1
- package/dist/twilight/p-1dd1fef0.entry.js +4 -0
- package/dist/twilight/p-1fb46b43.entry.js +4 -0
- package/dist/twilight/p-236f371d.entry.js +4 -0
- package/dist/twilight/{p-54f5ab92.entry.js → p-250d7ab2.entry.js} +1 -1
- package/dist/twilight/{p-45199451.entry.js → p-27a0a4cc.entry.js} +1 -1
- package/dist/twilight/p-298ff716.entry.js +4 -0
- package/dist/twilight/p-2babb4bd.entry.js +4 -0
- package/dist/twilight/p-2c6c0844.entry.js +4 -0
- package/dist/twilight/p-2e112687.entry.js +4 -0
- package/dist/twilight/p-2e43ddf0.entry.js +4 -0
- package/dist/twilight/p-3052178c.entry.js +4 -0
- package/dist/twilight/p-31c36417.entry.js +4 -0
- package/dist/twilight/p-331679d8.entry.js +4 -0
- package/dist/twilight/p-37413a02.entry.js +4 -0
- package/dist/twilight/{p-036f67e4.entry.js → p-3b6b3c54.entry.js} +1 -1
- package/dist/twilight/p-3bc64439.entry.js +4 -0
- package/dist/twilight/p-3bdba697.entry.js +4 -0
- package/dist/twilight/{p-3ff03500.entry.js → p-3c22551b.entry.js} +1 -1
- package/dist/twilight/p-3f26f1c5.entry.js +4 -0
- package/dist/twilight/p-40217fcc.entry.js +4 -0
- package/dist/twilight/p-4058b619.entry.js +4 -0
- package/dist/twilight/{p-b4a173be.entry.js → p-437fe6f1.entry.js} +1 -1
- package/dist/twilight/{p-15f20a28.entry.js → p-44cfb2c2.entry.js} +1 -1
- package/dist/twilight/p-4868c03c.entry.js +4 -0
- package/dist/twilight/p-48db7b95.entry.js +4 -0
- package/dist/twilight/p-49e6fe86.entry.js +4 -0
- package/dist/twilight/p-51a860bc.entry.js +4 -0
- package/dist/twilight/p-54d0db9a.entry.js +4 -0
- package/dist/twilight/p-58184ae2.entry.js +4 -0
- package/dist/twilight/p-5b03dca8.entry.js +4 -0
- package/dist/twilight/{p-149e1143.entry.js → p-5bbf829e.entry.js} +1 -1
- package/dist/twilight/{p-b10e56fd.entry.js → p-5d01f25c.entry.js} +1 -1
- package/dist/twilight/p-5e9fb02d.entry.js +4 -0
- package/dist/twilight/p-664f0936.entry.js +4 -0
- package/dist/twilight/{p-e8d773b2.entry.js → p-665bca88.entry.js} +1 -1
- package/dist/twilight/p-67e88dc4.entry.js +4 -0
- package/dist/twilight/p-68c8772a.entry.js +4 -0
- package/dist/twilight/p-699bea26.entry.js +4 -0
- package/dist/twilight/p-6ed4c9bb.entry.js +4 -0
- package/dist/twilight/p-7c74dc6e.entry.js +4 -0
- package/dist/twilight/{p-3c52b097.entry.js → p-7f73ff43.entry.js} +1 -1
- package/dist/twilight/{p-c1caae26.entry.js → p-80ff5572.entry.js} +1 -1
- package/dist/twilight/{p-b8980a7c.entry.js → p-8230c543.entry.js} +38 -38
- package/dist/twilight/p-82c12191.entry.js +4 -0
- package/dist/twilight/p-84f35767.entry.js +4 -0
- package/dist/twilight/{p-56f180b1.entry.js → p-8ae7bf96.entry.js} +1 -1
- package/dist/twilight/p-8bce41c8.entry.js +4 -0
- package/dist/twilight/{p-3be661be.entry.js → p-8ef3693b.entry.js} +1 -1
- package/dist/twilight/p-8fa84b87.entry.js +4 -0
- package/dist/twilight/p-91b4a1a0.entry.js +4 -0
- package/dist/twilight/{p-710a3ce8.entry.js → p-997c4966.entry.js} +1 -1
- package/dist/twilight/p-9b6db6a7.entry.js +4 -0
- package/dist/twilight/p-9c7fcbb0.entry.js +4 -0
- package/dist/twilight/p-9fa351ab.entry.js +4 -0
- package/dist/twilight/{p-DwA0FvNE.js → p-B9VKgTTF.js} +1 -1
- package/dist/twilight/{p-CXRKXFgT.js → p-BChI23pG.js} +1 -1
- package/dist/twilight/{p-gy7RAvBD.js → p-BiyhYWus.js} +1 -1
- package/dist/twilight/{p-8Tsmrwno.js → p-BsLF_HK7.js} +1 -1
- package/dist/twilight/{p-BZp0rKEO.js → p-BsXh13x8.js} +1 -1
- package/dist/twilight/{p-BqKKpKiZ.js → p-BtymczNp.js} +1 -1
- package/dist/twilight/{p-BBYplmag.js → p-C1wu6qA1.js} +1 -1
- package/dist/twilight/{p-BMmR9fBv.js → p-C6w35AiQ.js} +1 -1
- package/dist/twilight/{p-CnydhXLD.js → p-CGDRqU6i.js} +1 -1
- package/dist/twilight/{p-BICKbbaT.js → p-CjQzkU95.js} +2 -2
- package/dist/twilight/{p-DGAX-mOJ.js → p-CmQyEOxJ.js} +2 -2
- package/dist/twilight/{p-Dbba1-no.js → p-D2uiOzVz.js} +1 -1
- package/dist/twilight/{p-D1s2kXqL.js → p-DRvZV5oe.js} +1 -1
- package/dist/twilight/{p-CH2gmG7u.js → p-DfJdKB52.js} +1 -1
- package/dist/twilight/{p-0-eTJXSD.js → p-DxkgAGoT.js} +1 -1
- package/dist/twilight/{p-CciN5Q_x.js → p-Z7udRKSZ.js} +1 -1
- package/dist/twilight/p-a1494e64.entry.js +4 -0
- package/dist/twilight/p-a3f00389.entry.js +4 -0
- package/dist/twilight/p-a669483e.entry.js +4 -0
- package/dist/twilight/p-a802826b.entry.js +4 -0
- package/dist/twilight/p-ae536a61.entry.js +4 -0
- package/dist/twilight/p-aeb76c46.entry.js +4 -0
- package/dist/twilight/p-b0e86201.entry.js +4 -0
- package/dist/twilight/p-b1812d5c.entry.js +4 -0
- package/dist/twilight/p-b193c991.entry.js +4 -0
- package/dist/twilight/p-b3fe5e44.entry.js +4 -0
- package/dist/twilight/p-b69e98a8.entry.js +4 -0
- package/dist/twilight/{p-2ac47b6b.entry.js → p-bbe79568.entry.js} +1 -1
- package/dist/twilight/{p-99b6543b.entry.js → p-bf183f3a.entry.js} +1 -1
- package/dist/twilight/p-c254b6fa.entry.js +4 -0
- package/dist/twilight/{p-064d4340.entry.js → p-cb179aba.entry.js} +1 -1
- package/dist/twilight/{p-8ea78b6a.entry.js → p-cc2b960c.entry.js} +1 -1
- package/dist/twilight/p-db02986a.entry.js +4 -0
- package/dist/twilight/{p-5d14a4ee.entry.js → p-dd5800dd.entry.js} +1 -1
- package/dist/twilight/p-e020f1c3.entry.js +4 -0
- package/dist/twilight/p-e701a3dc.entry.js +4 -0
- package/dist/twilight/p-f1eebeda.entry.js +4 -0
- package/dist/twilight/p-f4bdf19e.entry.js +4 -0
- package/dist/twilight/p-f7298462.entry.js +4 -0
- package/dist/twilight/{p-24cb77eb.entry.js → p-fa28a89f.entry.js} +1 -1
- package/dist/twilight/p-faaf4423.entry.js +4 -0
- package/dist/twilight/p-fe7990b7.entry.js +4 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/helpers.d.ts +9 -0
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +1 -0
- package/dist/types/components/salla-loyalty-program/interfaces.d.ts +1 -1
- package/dist/types/global/base-css.d.ts +1 -0
- package/package.json +8 -7
- package/dist/cjs/functions-BbsKJYTv.js +0 -102
- package/dist/cjs/percentage-Fs83gq6Q.js +0 -21
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +0 -67
- package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +0 -305
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +0 -255
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +0 -104
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +0 -134
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +0 -54
- package/dist/cjs/salla-notification-item.cjs.entry.js +0 -20
- package/dist/cjs/salla-notifications.cjs.entry.js +0 -157
- package/dist/cjs/salla-product-card_2.cjs.entry.js +0 -319
- package/dist/cjs/shipping-CPYcgyCL.js +0 -13
- package/dist/cjs/tag-D-PcUR33.js +0 -12
- package/dist/cjs/tracked-promise-FYMkib0n.js +0 -31
- package/dist/cjs/user-add-BCGrddZS.js +0 -13
- package/dist/esm/functions-DBwN_PnC.js +0 -95
- package/dist/esm/percentage-Bs6JxDkg.js +0 -18
- package/dist/esm/salla-loyalty-banner.entry.js +0 -65
- package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +0 -299
- package/dist/esm/salla-loyalty-hero_2.entry.js +0 -252
- package/dist/esm/salla-loyalty-panel.entry.js +0 -102
- package/dist/esm/salla-loyalty-program.entry.js +0 -132
- package/dist/esm/salla-loyalty-reward.entry.js +0 -52
- package/dist/esm/salla-notification-item.entry.js +0 -18
- package/dist/esm/salla-notifications.entry.js +0 -155
- package/dist/esm/salla-product-card_2.entry.js +0 -316
- package/dist/esm/shipping-CZRcMGA9.js +0 -11
- package/dist/esm/tag-cgSL_BIo.js +0 -10
- package/dist/esm/tracked-promise-BGUdJ_Y7.js +0 -29
- package/dist/esm/user-add-QpH8MU22.js +0 -11
- package/dist/twilight/p-035e0ede.entry.js +0 -4
- package/dist/twilight/p-0a34505a.entry.js +0 -4
- package/dist/twilight/p-123ea3ce.entry.js +0 -4
- package/dist/twilight/p-169db5a8.entry.js +0 -4
- package/dist/twilight/p-182271b9.entry.js +0 -4
- package/dist/twilight/p-1d6e569d.entry.js +0 -4
- package/dist/twilight/p-21eef21b.entry.js +0 -4
- package/dist/twilight/p-22da89fa.entry.js +0 -4
- package/dist/twilight/p-23e937b6.entry.js +0 -4
- package/dist/twilight/p-2b07007d.entry.js +0 -4
- package/dist/twilight/p-2bf03b63.entry.js +0 -4
- package/dist/twilight/p-2c78a0ef.entry.js +0 -4
- package/dist/twilight/p-30660cd8.entry.js +0 -4
- package/dist/twilight/p-34ed76ac.entry.js +0 -4
- package/dist/twilight/p-3eb13818.entry.js +0 -4
- package/dist/twilight/p-3ff42b07.entry.js +0 -4
- package/dist/twilight/p-44a81e6e.entry.js +0 -4
- package/dist/twilight/p-44b0d992.entry.js +0 -4
- package/dist/twilight/p-45982933.entry.js +0 -4
- package/dist/twilight/p-45b975c2.entry.js +0 -4
- package/dist/twilight/p-492415ef.entry.js +0 -4
- package/dist/twilight/p-4c9e1e69.entry.js +0 -4
- package/dist/twilight/p-4f75de82.entry.js +0 -4
- package/dist/twilight/p-4ffb3087.entry.js +0 -4
- package/dist/twilight/p-598c5098.entry.js +0 -4
- package/dist/twilight/p-5c333767.entry.js +0 -4
- package/dist/twilight/p-5c452062.entry.js +0 -4
- package/dist/twilight/p-60901520.entry.js +0 -4
- package/dist/twilight/p-649e1e03.entry.js +0 -4
- package/dist/twilight/p-670e6462.entry.js +0 -4
- package/dist/twilight/p-6a814b15.entry.js +0 -4
- package/dist/twilight/p-6def828f.entry.js +0 -4
- package/dist/twilight/p-70e3120c.entry.js +0 -4
- package/dist/twilight/p-74d7660d.entry.js +0 -4
- package/dist/twilight/p-7518b9d3.entry.js +0 -4
- package/dist/twilight/p-8638175a.entry.js +0 -4
- package/dist/twilight/p-8ea18b13.entry.js +0 -4
- package/dist/twilight/p-95ef5ed3.entry.js +0 -4
- package/dist/twilight/p-9c98fca1.entry.js +0 -4
- package/dist/twilight/p-9ee5b0f7.entry.js +0 -4
- package/dist/twilight/p-BgfpunEY.js +0 -4
- package/dist/twilight/p-Bs6JxDkg.js +0 -4
- package/dist/twilight/p-CZRcMGA9.js +0 -4
- package/dist/twilight/p-QpH8MU22.js +0 -4
- package/dist/twilight/p-a0a248bd.entry.js +0 -4
- package/dist/twilight/p-a0cf8839.entry.js +0 -4
- package/dist/twilight/p-a665082c.entry.js +0 -4
- package/dist/twilight/p-abe7ac70.entry.js +0 -4
- package/dist/twilight/p-ad38c3e0.entry.js +0 -4
- package/dist/twilight/p-adf1ebf6.entry.js +0 -4
- package/dist/twilight/p-aec408ec.entry.js +0 -4
- package/dist/twilight/p-afa12e38.entry.js +0 -4
- package/dist/twilight/p-b17da4d5.entry.js +0 -4
- package/dist/twilight/p-b5ca8b9f.entry.js +0 -4
- package/dist/twilight/p-b5cc3e95.entry.js +0 -4
- package/dist/twilight/p-b725b869.entry.js +0 -4
- package/dist/twilight/p-bba004e0.entry.js +0 -4
- package/dist/twilight/p-bcef7f80.entry.js +0 -4
- package/dist/twilight/p-bdc23bcf.entry.js +0 -4
- package/dist/twilight/p-bfdb98db.entry.js +0 -4
- package/dist/twilight/p-c139be2a.entry.js +0 -4
- package/dist/twilight/p-c47486be.entry.js +0 -4
- package/dist/twilight/p-c861e9f8.entry.js +0 -4
- package/dist/twilight/p-cc6eb9fd.entry.js +0 -4
- package/dist/twilight/p-cdb0d7fb.entry.js +0 -4
- package/dist/twilight/p-cdc3ac03.entry.js +0 -4
- package/dist/twilight/p-cgSL_BIo.js +0 -4
- package/dist/twilight/p-d6941dc6.entry.js +0 -4
- package/dist/twilight/p-dd6ec724.entry.js +0 -4
- package/dist/twilight/p-ddabd5f2.entry.js +0 -4
- package/dist/twilight/p-e7a1f0c1.entry.js +0 -4
- package/dist/twilight/p-eafff38c.entry.js +0 -4
- package/dist/twilight/p-efccc05e.entry.js +0 -4
- package/dist/twilight/p-faec58b8.entry.js +0 -4
- package/dist/twilight/p-fdbe9913.entry.js +0 -4
- package/dist/twilight/p-fde5aae7.entry.js +0 -4
- package/dist/twilight/p-g9J0grSR.js +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as e,h as i}from"./p-CjQzkU95.js";import{G as s}from"./p-OF8QcbMM.js";const l=class{constructor(i){e(this,i),this.minAge=10,this.isEditable=!0,this.disableAction=!1,this.isLoading=!0,this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"}),salla.lang.onLoaded((()=>{this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"})}))}phoneNumberFieldEventHandler(e){e.detail.number?(this.userData.phone.number=Number.parseInt(e.detail.number),this.userData.phone.country=e.detail.country_code,this.disableAction=!1):this.disableAction=!0}handleFieldChange(e,i,s=!1){i.target.value?(this.userData[e]=i.target.value,this.disableAction=!1):s&&(this.disableAction=!0)}handleEmailInput(e,i){const s=document.getElementById("email-error"),l=i.target.value;if(!l)return this.disableAction=!0,void(s.textContent=this.email_required_trans);/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(l)||(this.disableAction=!0,s.textContent=this.invalid_email_trans),s.textContent="",this.userData[e]=l,this.disableAction=!1}submitForm(e){e.preventDefault(),this.disableAction=!0;const i=Object.assign({},this.userData);i.phone=void 0,i.phone=this.userData.phone.number,i.country_code=this.userData.phone.country,salla.api.profile.update(i).finally((()=>{this.disableAction=!1}))}getBirthDateRestriction(){const e=new Date,i=e.getFullYear()-this.minAge;return e.setFullYear(i),e}fetchData(){return salla.api.profile.info().then((e=>{this.userData=e.data})).finally((()=>{this.isLoading=!1,this.isEditable=!Salla.config.get("store.features").includes("sso-login")}))}renderLoadingSection(){return i("div",{class:"s-user-profile-skeleton-wrapper"},Array.from({length:6},((e,s)=>i("salla-skeleton",{class:"skeleton-item",width:"100%",height:"50px",key:s}))))}componentWillLoad(){Salla.onReady().then((()=>this.fetchData()))}render(){return this.isLoading?this.renderLoadingSection():i("form",{onSubmit:e=>this.submitForm(e)},i("div",{class:"s-user-profile-wrapper"},i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"first-name",class:"s-user-profile-field-label"},this.first_name_trans),i("input",{disabled:!this.isEditable,type:"text",name:"first_name",value:this.userData.first_name,id:"first-name",required:!0,autocomplete:"first_name",class:"form-input",onChange:e=>this.handleFieldChange("first_name",e)})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"last-name",class:"s-user-profile-field-label"},this.last_name_trans),i("input",{disabled:!this.isEditable,type:"text",name:"last_name",value:this.userData.last_name,id:"last-name",required:!0,autocomplete:"last_name",class:"form-input",onChange:e=>this.handleFieldChange("last_name",e)})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"birthday",class:"s-user-profile-field-label"},this.birthday_trans),i("salla-datetime-picker",{disabled:!this.isEditable,dateFormat:"Y-m-d",value:this.userData.birthday,placeholder:this.birthday_placeholder_trans,required:!0,maxDate:this.getBirthDateRestriction(),name:"birthday",onPicked:e=>this.handleFieldChange("birthday",e)})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"gender",class:"s-user-profile-field-label"},this.gender_trans),i("select",{disabled:!this.isEditable,class:"form-input",name:"gender",required:!0,onChange:e=>this.handleFieldChange("gender",e)},i("option",{value:""},this.gender_placeholder_trans),i("option",{value:s.Male,selected:this.userData.gender===s.Male},this.male_trans),i("option",{value:s.Female,selected:this.userData.gender===s.Female},this.female_trans))),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"email",class:"s-user-profile-field-label"},this.email_trans),i("input",{disabled:!this.isEditable,type:"email",name:"email",value:this.userData.email,id:"email",class:"form-input",required:!0,onInput:e=>this.handleEmailInput("email",e)}),i("p",{id:"email-error",class:"s-user-profile-field-error"})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"international-mobile",class:"s-user-profile-field-label"},this.mobile_trans),i("salla-tel-input",{disabled:!this.isEditable,name:"international-mobile","country-code":this.userData.phone.country,phone:`${this.userData.phone.number}`,onPhoneEntered:e=>this.phoneNumberFieldEventHandler(e)}))),i("salla-button",{type:"submit",loading:this.disableAction,disabled:this.disableAction||!this.isEditable,"loader-position":"end",class:"s-user-profile-submit"},this.save_btn_trans))}};l.style="/*!twlt*/:host{display:block}.form-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.form-input:focus{border-color:var(--color-primary);--tw-ring-color:transparent}.form-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.form-input:focus:is(.dark *){border-color:var(--color-primary)}@media (min-width: 640px){.form-input{font-size:0.875rem;line-height:1.25rem}}.s-user-profile-wrapper{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:1.5rem}@media (min-width: 640px){.s-user-profile-wrapper{grid-template-columns:repeat(2, minmax(0, 1fr));gap:2rem}}.s-user-profile-field-label{margin-bottom:0.5rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-user-profile-field-error{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-user-profile-submit{margin-top:1.5rem;width:100%}.s-user-profile-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-user-profile-filepond-placeholder-icon{margin-bottom:0.25rem}.s-user-profile-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-user-profile-skeleton-wrapper{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));grid-template-rows:repeat(3, minmax(0, 1fr));gap:3rem}";export{l as salla_user_profile}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,c as i,h as e,H as s,a as r}from"./p-CjQzkU95.js";import{H as a}from"./p-DOBDDG4K.js";import{F as o}from"./p-DL4h2bc3.js";import"./p-CgtvEd63.js";const n=class{constructor(e){t(this,e),this.changed=i(this,"changed"),this.initialItemCount=10,this.expandedItemCount=15,this.calculatedInitialHeight=0,this.calculatedExpandedHeight=0,this.isOpen=!0,this.isShowMore=!1,this.showMoreLabel="عرض المزيد",this.showLessLabel="عرض أقل",this.page=salla.config.get("page"),this.searchQuery="",this.filteredCount=0}connectedCallback(){this.withLoadMore="price"!=this.option.key&&Array.isArray(this.option.values)&&this.option.values.length>this.initialItemCount,salla.onReady((()=>{this.page=salla.config.get("page")})),salla.lang.onLoaded((()=>{this.showMoreLabel=salla.lang.getWithDefault("common.titles.more",this.showMoreLabel),this.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",this.showLessLabel)}))}componentDidLoad(){const t=this.widgetValues.querySelectorAll(".s-filters-label");if(t.length>0){const i=Math.min(this.initialItemCount,t.length);this.calculatedInitialHeight=35*this.initialItemCount,this.calculatedExpandedHeight=t.length>this.initialItemCount?35*this.expandedItemCount:35*i}this.widgetValues.scrollHeight<this.calculatedInitialHeight&&(this.withLoadMore=!1),this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight=`${this.calculatedInitialHeight}px`),this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}async setWidgetHeight(t=250){this.widgetContent.removeAttribute("style"),setTimeout((()=>{this.widgetContent.style.height=this.widgetContent.scrollHeight+"px"}),t)}async reset(){this.option.type===o.RANGE&&this.priceRange.reset(),Array.from(this.host.querySelectorAll("input")).forEach((t=>t.checked=!1))}async showMore(){this.isShowMore=!this.isShowMore,this.widgetContent.style.height="auto",this.isShowMore||(this.widgetValues.scrollTop=0);const t=this.isShowMore?this.calculatedExpandedHeight:this.calculatedInitialHeight,i=this.searchQuery?this.filteredCount:Array.isArray(this.option.values)?this.option.values.length:0;this.widgetValues.style.maxHeight=`${t}px`,this.widgetValues.style.overflowY=this.isShowMore&&i>this.expandedItemCount?"auto":"hidden",setTimeout((()=>{this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}),400)}async toggleWidget(){this.isOpen=!this.isOpen,a.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(()=>this.isOpen))}renderFilterOption(t){if(![o.VALUES,o.MINIMUM,o.VARIANTS].includes(t.type))return"";const i=t.values.filter((t=>{if(!this.searchQuery)return!0;const i="number"==typeof t?String(t):t?.value||t?.key||"";return String(i).toLowerCase().includes(this.searchQuery.toLowerCase())}));return this.filteredCount=i.length,0===i.length?e("div",{class:"s-filters-widget-empty-state"},salla.lang.get("common.elements.no_options")||"لا توجد نتائج"):i.map((i=>{let s="number"==typeof i?i:i.key||i.value;return e("label",{class:"s-filters-label",htmlFor:`${t.key}-option-${s}`,key:`${t.key}-option-${s}`},e("input",{id:`${t.key}-option-${s}`,name:t.key,type:t.type===o.VALUES?"checkbox":"radio",checked:this.isSelectedOption(t,s),class:t.type===o.VALUES?"s-filters-checkbox":"s-filters-radio",onChange:i=>this.changed.emit({event:i,option:t,value:s})}),this.getOptionLabel(t,i))}))}isSelectedOption(t,i){if(t.type===o.MINIMUM)return this.filtersData[t.key]==i;if(t.type===o.VARIANTS)return this.filtersData[t.type]&&this.filtersData[t.type][t.key]==i;if(t.type===o.RANGE)return this.filtersData[t.key]&&this.filtersData[t.key].min==i.min&&this.filtersData[t.key].max==i.max;if(t.type===o.VALUES){const e=this.filtersData[t.key];return Array.isArray(e)?e.some((t=>Number(t)===Number(i))):null!=e&&Number(e)===Number(i)}return!1}getOptionLabel(t,i){if("rating"==t.key)return e("salla-rating-stars",{size:"small",value:i});let s=i.value||"null";return null!=i.count&&(s+=` (${salla.helpers.number(i.count)})`),e("span",{class:"s-filters-option-name"},s)}render(){return e(s,{key:"831f7655b903634e0eb3abc7338ea3296883cbbf",class:"s-filters-widget-container"},e("h3",{key:"72a31fb2c9adab3df37550e930d5be981aafd8f6",class:"s-filters-widget-title",onClick:()=>this.toggleWidget()},e("span",{key:"7512914e8a7348d146384d67f117c8b06507def0"},this.option.label),e("span",{key:"50d62723255618a2a51512722388ff686c92bdab",class:"s-filters-widget-plusminus "+(this.isOpen?"s-filters-widget-plusminus-active":"")})),e("div",{key:"76792390d33c2051082541e18e9b354b2b63c644",class:"s-filters-widget-content",ref:t=>this.widgetContent=t},Array.isArray(this.option.values)&&this.option.values.length>5&&e("div",{key:"b39462721ff4572b3572c0ed6171c07fa53b57a9",class:"s-filters-widget-search-wrapper",style:{padding:"8px 0",marginBottom:"8px"}},e("input",{key:"759b2ab6b80d0fd0bb03fcd3746414d9e4b80c7d",type:"text",class:"s-filters-widget-search-input",placeholder:salla.lang.get("blocks.header.search_placeholder")||"بحث...",value:this.searchQuery,onInput:t=>this.searchQuery=t.target.value})),e("div",{key:"db918c4a43bebc35c23810dc97736584504d0e47",class:"s-filters-widget-values",ref:t=>this.widgetValues=t},e("slot",{key:"92dc440b79ed0929a39db7a4a96a1981f3b49974"}),this.option.type!==o.RANGE?this.renderFilterOption(this.option):e("salla-price-range",{onChanged:t=>{this.changed.emit(t.detail)},ref:t=>this.priceRange=t,filtersData:this.filtersData,option:this.option})),this.withLoadMore&&(!this.searchQuery||this.filteredCount>this.initialItemCount)&&e("a",{key:"885668e717441581cd1b92494ebc3927cd70daf1",class:"s-filters-widget-more",onClick:()=>this.showMore()},this.isShowMore?this.showLessLabel:this.showMoreLabel)))}get host(){return r(this)}};n.style="/*!twlt*/:host{display:block}.collapse{visibility:collapse}.fixed{position:fixed}.hidden{display:none}.filter{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)}.duration-300{transition-duration:300ms}.s-filters-widget-container{display:block;overflow:hidden;border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;padding-top:1.25rem;padding-bottom:0.5rem}@media (min-width: 768px){.s-filters-widget-container{margin-bottom:1.25rem;padding-bottom:1.25rem;padding-top:1.25rem}}.s-filters-widget-content{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-opened{visibility:visible;opacity:1}.s-filters-widget-closed{visibility:hidden;height:0px !important;padding:0px;opacity:0}.s-filters-widget-title{display:flex;cursor:pointer;align-items:center;justify-content:space-between;font-size:1rem;line-height:1.5rem;font-weight:700}.s-filters-widget-arrow{font-size:1.25rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-arrow svg{height:1.25rem;width:1.25rem}.s-filters-widget-active-arrow{--tw-rotate:90deg;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-filters-widget-values{overflow:hidden;padding-top:1rem;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-more{margin-top:0.5rem;display:block;cursor:pointer;font-size:0.875rem;line-height:1.25rem;color:var(--color-primary)}.s-filters-widget-plusminus{position:relative;height:0.75rem;width:0.75rem;--tw-rotate:90deg;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-filters-widget-plusminus::before{position:absolute;left:0px;top:50%;display:block;height:0.125rem;width:100%;--tw-bg-opacity:1;background-color:rgb(153 153 153 / var(--tw-bg-opacity, 1));transition-property:0.35s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-content:'';content:var(--tw-content)}.s-filters-widget-plusminus::after{position:absolute;left:0px;top:50%;display:block;height:0.125rem;width:100%;--tw-bg-opacity:1;background-color:rgb(153 153 153 / var(--tw-bg-opacity, 1));transition-property:0.35s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-content:'';content:var(--tw-content)}.s-filters-widget-plusminus-active:before{transform:translatey(-50%) rotate(-90deg);opacity:0}.s-filters-widget-plusminus-active:after{transform:translatey(-50%) rotate(0);background-color:var(--color-primary)}.s-filters-widget-plusminus:before{transform:translatey(-50%)}.s-filters-widget-plusminus:after{transform:translatey(-50%) rotate(90deg)}.s-filters-widget-search-input{width:100%;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:0.5rem}.s-filters-widget-search-input:focus{border-color:var(--color-primary);outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-color:var(--color-primary)}.s-filters-widget-empty-state{padding:0.5rem;text-align:center;font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}";export{n as salla_filters_widget}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,c as e,h as i,H as r,a as s}from"./p-CjQzkU95.js";import{F as o}from"./p-DL4h2bc3.js";import{H as a}from"./p-DOBDDG4K.js";import"./p-CgtvEd63.js";const l=class{constructor(i){t(this,i),this.changed=e(this,"changed"),this.isReady=!1,this.isInitialFetch=!0,this.filtersData={},this.appliedOpen=!0,salla.event.on("filters::hidden",(()=>this.host.style.display="none")),salla.lang.onLoaded((()=>{this.apply=salla.lang.get("pages.checkout.apply"),this.reset=salla.lang.get("pages.categories.filters_reset"),this.selectedTitle=salla.lang.getWithDefault("pages.categories.selected_filters","لقد اخترت")})),salla.event.on("filters::fetched",(({filters:t})=>{this.host.style.display="";let e={};this.filters=t.map((t=>{if(t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label,"rating"==t.key){t.type=o.VALUES;let{max:e,min:i}=t.values;t.values=[5,4,3,2,1].filter((t=>t>=i||t<=e))}this.filtersData.variants&&t.type==o.VARIANTS&&(e.variants=this.filtersData.variants),this.filtersData[t.key]&&t.type!==o.VARIANTS&&(e[t.key]=this.filtersData[t.key]);let i=new URLSearchParams(window.location.search),r=!1;for(let t of i.keys())if(t.includes("filters")){r=!0;break}if(this.isInitialFetch&&"product.index"==salla.config.get("page.slug")&&0==Object.keys(e).length&&!r){let t=window.location.href,i=salla.config.get("page.id"),r=-1!==t.indexOf("?")?"&":"?",s=t+r+"filters[category_id]="+i;e.category_id=i,window.history.pushState({path:s},"",s)}return t})),this.isInitialFetch=!1,this.filtersData=e,this.host.childNodes.forEach((async t=>t.setWidgetHeight&&await t.setWidgetHeight()))}))}async componentWillLoad(){try{const t=new URLSearchParams(window.location.search);this.filtersData=await a.extractFiltersFromUrl(t)}catch(t){console.warn("failed to get filters from URL",t.message)}}async getFilters(){return this.filtersData}async applyFilters(){if(!this.isReady)return;let t=Object.keys(this.filtersData).length>0;setTimeout((()=>{if(t){let t=new URL(window.location.href);for(const[e]of t.searchParams.entries())e.startsWith("filters")&&t.searchParams.delete(e);let e=this.encodeFilters(this.filtersData),i=t.search.split("&").filter((t=>!t.includes("filters"))).join("&");t.search=i?t.search.split("&filters")[0]+"&"+e:`?${e}`,window.history.pushState({},"",t.href)}else{let t=new URL(window.location.href);t.searchParams?.delete("filters"),window.history.pushState({},"",t.toString())}salla.event.emit("salla-filters::changed",this.filtersData),this.changed.emit(this.filtersData)}),300)}encodeFilters(t,e="filters"){const i=[];for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const s=t[r],o=e?`${e}[${r}]`:r;Array.isArray(s)?s.forEach((t=>i.push(`${o}[]=${t}`))):i.push("object"==typeof s&&null!==s?this.encodeFilters(s,o):`${o}=${s}`)}return i.join("&")}async resetFilters(){return this.removeFiltersQueryParams(),this.filtersData={},this.host.childNodes.forEach((t=>t.reset&&t.reset())),salla.event.emit("salla-filters::reset"),this.applyFilters()}removeFiltersQueryParams(){const t=new URLSearchParams(window.location.search),e=Array.from(t.keys()).filter((t=>!t.startsWith("filters["))).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(t.get(e))}`)).join("&"),i=e?`${window.location.pathname}?${e}`:window.location.pathname;window.history.pushState({},"",i)}handleOptionChange(t,e,i){e.type===o.RANGE&&(this.filtersData[e.key]=i);let r=t.target.checked;if(e.type===o.VARIANTS)this.filtersData.variants=this.filtersData.variants||{},r&&(this.filtersData.variants[e.key]=i),r||delete this.filtersData.variants[e.key];else if("radio"==t.target.type)r&&(this.filtersData[e.key]=i),r||delete this.filtersData[e.key];else if("checkbox"==t.target.type){const t=this.filtersData[e.key];this.filtersData[e.key]=Array.isArray(t)?t:null!=t?[t]:[],r?this.filtersData[e.key].push(i):this.filtersData[e.key]=this.filtersData[e.key].filter((t=>t!=i)),this.filtersData[e.key].length||delete this.filtersData[e.key]}this.filtersData={...this.filtersData},this.applyFilters()}getAppliedFilters(){const t=[],e=this.filtersData||{};for(const i of Object.keys(e)){if("variants"===i){const r=this.filters?.find((t=>t.type===o.VARIANTS));for(const s of Object.keys(e.variants||{})){const a=e.variants[s],l=r?.values?.find((t=>(t.key||t.value)==a));l&&t.push({key:i,variantKey:s,value:a,type:o.VARIANTS,groupLabel:r?.label,optionLabel:l.value})}continue}const r=this.filters?.find((t=>t.key===i));if(!r)continue;const s=e[i];if(r.type===o.RANGE||s&&"object"==typeof s&&!Array.isArray(s)){t.push({key:i,value:s,type:o.RANGE,groupLabel:r.label,optionLabel:`${s.min} - ${s.max}`});continue}if("category_id"===i&&!Array.isArray(s)&&"product.index"==salla.config.get("page.slug")&&s==salla.config.get("page.id"))continue;const a=Array.isArray(s)?s:[s];for(const e of a){const s=r.values?.find((t=>("number"==typeof t?t:t.key||t.value)==e)),o="rating"===r.key?`${e}`:s&&"number"!=typeof s?s.value:void 0;null!=o&&t.push({key:i,value:e,type:r.type,groupLabel:r.label,optionLabel:o})}}return t}removeFilter(t){if(t.type===o.VARIANTS)this.filtersData.variants&&(delete this.filtersData.variants[t.variantKey],Object.keys(this.filtersData.variants).length||delete this.filtersData.variants);else if(t.type===o.RANGE)delete this.filtersData[t.key];else{const e=this.filtersData[t.key];Array.isArray(e)?(this.filtersData[t.key]=e.filter((e=>e!=t.value)),this.filtersData[t.key].length||delete this.filtersData[t.key]):delete this.filtersData[t.key]}this.filtersData={...this.filtersData},this.applyFilters()}render(){const t=this.getAppliedFilters(),e=salla.lang.getWithDefault("common.elements.delete","Remove");return i(r,{key:"f0493d0e85ebb9e6612a1edc6cd7f45e7473017e"},t.length?i("div",{class:"s-filters-applied s-filters-widget-container"},i("h3",{class:"s-filters-widget-title",onClick:()=>this.appliedOpen=!this.appliedOpen},i("span",null,this.selectedTitle),i("span",{class:"s-filters-widget-plusminus "+(this.appliedOpen?"s-filters-widget-plusminus-active":"")})),i("div",{class:"s-filters-widget-content "+(this.appliedOpen?"s-filters-widget-opened":"s-filters-widget-closed")},i("div",{class:"s-filters-widget-values"},t.map((t=>i("div",{class:"s-filters-label s-filters-applied-item"},i("span",{class:"s-filters-option-name"},t.groupLabel,": ",t.optionLabel),i("button",{type:"button",class:"s-filters-applied-remove","aria-label":`${e} ${t.groupLabel}: ${t.optionLabel}`,onClick:()=>this.removeFilter(t)},i("i",{class:"sicon-cancel","aria-hidden":"true"})))))),i("div",{class:"s-filters-footer"},i("salla-button",{color:"gray",fill:"outline",onClick:()=>this.resetFilters()},this.reset)))):"",this.filters?.map((t=>i("salla-filters-widget",{option:t,filtersData:this.filtersData,onChanged:({detail:{event:t,option:e,value:i}})=>{this.handleOptionChange(t,e,i)}}))))}componentDidLoad(){this.isReady=!0}get host(){return s(this)}};l.style='/*!twlt*/:host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}.s-filters-applied-remove{pointer-events:auto !important;cursor:pointer}.outline{outline-style:solid}.filter{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)}.s-filters-checkbox{height:1.25rem;width:1.25rem;border-radius:6px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));color:var(--color-primary)}.s-filters-checkbox:focus{--tw-ring-color:transparent}.s-filters-radio{position:relative;height:1rem;width:1rem;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important;color:var(--color-primary)}.s-filters-radio:focus{--tw-ring-color:transparent}.s-filters-radio:where([dir="ltr"],[dir="ltr"] *){margin-right:0.75rem}.s-filters-radio:where([dir="rtl"],[dir="rtl"] *){margin-left:0.75rem}.s-filters-radio:checked{border-color:var(--color-primary)}.s-filters-radio:checked::after{position:absolute;left:0.125rem;top:0.125rem;display:block;height:0.625rem;width:0.625rem;border-radius:9999px;background-color:var(--color-primary);--tw-content:\'\';content:var(--tw-content)}.s-filters-radio:checked:hover{border-color:var(--color-primary)}.s-filters-radio:checked:focus{border-color:var(--color-primary)}.s-filters-label{position:relative;margin-bottom:0.75rem;display:flex;cursor:pointer;align-items:center;font-size:0.875rem;line-height:1.25rem;font-weight:500}.s-filters-label:last-child{margin-bottom:0px}.s-filters-option-name{margin-left:0.5rem;margin-right:0.5rem;--tw-text-opacity:1;color:rgb(129 127 127 / var(--tw-text-opacity, 1))}.s-filters-footer{margin-top:1rem;display:flex}.s-filters-footer salla-button{flex:1 1 0%}.s-filters-footer salla-button button{width:100%}.s-filters-applied-item{justify-content:space-between}.s-filters-applied-remove{cursor:pointer;border-width:0px;background-color:transparent;padding:0px;color:inherit}.s-filters-widget-container{display:block;overflow:hidden;border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;padding-top:1.25rem;padding-bottom:0.5rem}@media (min-width: 768px){.s-filters-widget-container{margin-bottom:1.25rem;padding-bottom:1.25rem;padding-top:1.25rem}}.s-filters-widget-content{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-opened{visibility:visible;opacity:1}.s-filters-widget-closed{visibility:hidden;height:0px !important;padding:0px;opacity:0}.s-filters-widget-title{display:flex;cursor:pointer;align-items:center;justify-content:space-between;font-size:1rem;line-height:1.5rem;font-weight:700}.s-filters-widget-values{overflow:hidden;padding-top:1rem;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-plusminus{position:relative;height:0.75rem;width:0.75rem;--tw-rotate:90deg;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-filters-widget-plusminus::before{position:absolute;left:0px;top:50%;display:block;height:0.125rem;width:100%;--tw-bg-opacity:1;background-color:rgb(153 153 153 / var(--tw-bg-opacity, 1));transition-property:0.35s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-content:\'\';content:var(--tw-content)}.s-filters-widget-plusminus::after{position:absolute;left:0px;top:50%;display:block;height:0.125rem;width:100%;--tw-bg-opacity:1;background-color:rgb(153 153 153 / var(--tw-bg-opacity, 1));transition-property:0.35s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-content:\'\';content:var(--tw-content)}.s-filters-widget-plusminus-active:before{transform:translatey(-50%) rotate(-90deg);opacity:0}.s-filters-widget-plusminus-active:after{transform:translatey(-50%) rotate(0);background-color:var(--color-primary)}.s-filters-widget-plusminus:before{transform:translatey(-50%)}.s-filters-widget-plusminus:after{transform:translatey(-50%) rotate(90deg)}';export{l as salla_filters}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as e,h as r}from"./p-CjQzkU95.js";function t(e){var r,a,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(a=t(e[r]))&&(s&&(s+=" "),s+=a);else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}const a=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,s=function(){for(var e,r,a=0,s="";a<arguments.length;)(e=arguments[a++])&&(r=t(e))&&(s&&(s+=" "),s+=r);return s},i=(o="s-badge-base",l={variants:{size:{xs:"s-badge-xs",sm:"s-badge-sm",md:"s-badge-md"},bg:{transparent:"s-badge-transparent",light:"s-badge-light","primary-100":"s-badge-primary-100"},color:{black:"s-badge-black","primary-900":"s-badge-color-primary-900"}}},e=>{var r;if(null==(null==l?void 0:l.variants))return s(o,null==e?void 0:e.class,null==e?void 0:e.className);const{variants:t,defaultVariants:i}=l,n=Object.keys(t).map((r=>{const s=null==e?void 0:e[r],o=null==i?void 0:i[r];if(null===s)return null;const l=a(s)||a(o);return t[r][l]})),d=e&&Object.entries(e).reduce(((e,r)=>{let[t,a]=r;return void 0===a||(e[t]=a),e}),{}),c=null==l||null===(r=l.compoundVariants)||void 0===r?void 0:r.reduce(((e,r)=>{let{class:t,className:a,...s}=r;return Object.entries(s).every((e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...d}[r]):{...i,...d}[r]===t}))?[...e,t,a]:e}),[]);return s(o,n,c,null==e?void 0:e.class,null==e?void 0:e.className)});var o,l;const n=class{constructor(r){e(this,r),this.size="sm",this.color="black",this.bg="light"}render(){return r("div",{key:"54d35eb76a59251edb581786e5e89a83b6f8fbf0",class:i({size:this.size,bg:this.bg,color:this.color})},r("slot",{key:"4641cb434a2c0a6d7c004e3384848a200cb79dff"}))}};n.style='/*!twlt*/.s-badge-base{display:flex;max-width:max-content;align-items:center}.s-badge-base>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-badge-base{white-space:nowrap;border-radius:0.375rem;padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-badge-base:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-badge-xs{font-size:0.75rem;line-height:1rem}.s-badge-xs svg{height:0.75rem;width:0.75rem}.s-badge-sm{font-size:0.875rem;line-height:1.25rem}.s-badge-sm svg{height:1rem;width:1rem}.s-badge-md{font-size:1rem;line-height:1.5rem}.s-badge-md svg{height:1.25rem;width:1.25rem}.s-badge-transparent{background-color:transparent}.s-badge-light{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.s-badge-primary-100{background-color:color-mix(in srgb,var(--color-primary) 20%,white 80%)}.s-badge-color-black{--tw-text-opacity:1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.s-badge-color-primary-900{color:color-mix(in srgb,var(--color-primary) 45%,black 55%)}.s-badge-color-primary-900 svg{fill:currentColor}.s-badge-black{--tw-text-opacity:1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}';export{n as salla_badge}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as e,c as t,h as i}from"./p-CjQzkU95.js";import{C as s}from"./p-C6jIkM-X.js";import{F as r}from"./p-OF8QcbMM.js";const o=class{constructor(i){e(this,i),this.fieldChanged=t(this,"fieldChanged"),this.fileUploaded=t(this,"fileUploaded"),this.isEditable=!0,this.fieldErrors={},this.isSubmitting=!1}get dragAndDropText(){return salla.lang.get("common.uploader.drag_and_drop")}get browseText(){return salla.lang.get("common.uploader.browse")}get saveButtonText(){return salla.lang.get("common.elements.save")}async setFields(e){this.parsedFields=e}async getFieldValues(){return this.parsedFields?.reduce(((e,t)=>(e[`custom_fields[${t.id}]`]=t.value,e)),{})||{}}async validateFields(){if(!this.parsedFields)return!0;const e=this.parsedFields.reduce(((e,t)=>(!t.required||t.value&&""!==t.value||(e[t.id.toString()]=`${t.label} is required`),e)),{});return this.fieldErrors=e,0===Object.keys(e).length}handleFieldChange(e,t){const i=t.target.value;e.value=i,this.clearFieldError(e.id);const s=!(e.required&&!i);s||this.setFieldError(e.id,`${e.label} is required`),this.fieldChanged.emit({fieldId:e.id,value:i,isValid:s})}handleFileUpload(e,t){const{error:i,file:s}=t.detail,r=!i;this.clearFieldError(e.id),r?e.value=s:this.setFieldError(e.id,"File upload failed"),this.fileUploaded.emit({fieldId:e.id,file:s,isValid:r})}clearFieldError(e){this.fieldErrors={...this.fieldErrors},delete this.fieldErrors[e]}setFieldError(e,t){this.fieldErrors={...this.fieldErrors,[e]:t}}renderTextField(e){return i("input",{disabled:!this.isEditable,type:e.type,id:`custom-field-${e.id}`,value:e.value?.toString()||"",onChange:t=>this.handleFieldChange(e,t),name:`${e.id}`,class:"form-input",required:e.required})}renderFileField(e){return i("salla-file-upload",{url:salla.url.api("upload"),id:`custom-field-${e.id}`,name:`${e.id}`,type:"registration",value:e.value,height:"120px",onAdded:t=>this.handleFileUpload(e,t),required:e.required,disabled:!this.isEditable,onUploaded:e=>{e.target.value=e.target.value?.url},allowRemove:!0,onRemoved:t=>{t.preventDefault(),t.stopPropagation(),e.value="",t.target.value=""},payloadName:"files[]",payloadParams:{type:"registration"},"instant-upload":!0},i("div",{class:"s-custom-fields-filepond-placeholder"},i("span",{class:"s-custom-fields-filepond-placeholder-icon"},i("i",{innerHTML:s})),i("p",{class:"s-custom-fields-filepond-placeholder-text"},this.dragAndDropText),i("span",{class:"filepond--label-action"},this.browseText)))}renderField(e){return i("div",{class:"s-custom-fields-field",key:e.id},i("label",{class:"s-custom-fields-field-label",htmlFor:`custom-field-${e.id}`},e.label,e.required&&i("span",{class:"s-custom-fields-required"},"*")),i("div",null,e.type===r.Photo?this.renderFileField(e):this.renderTextField(e),this.fieldErrors[e.id]&&i("p",{class:"s-custom-fields-error"},this.fieldErrors[e.id])))}componentWillLoad(){this.parsedFields=this.parseFields(this.fields)}parseFields(e){return e?"string"==typeof e?JSON.parse(e):Array.isArray(e)?e:[]:[]}async handleSubmit(e){e.preventDefault(),this.isSubmitting=!0;try{const t={},i=e.target.elements;for(let e=0;e<i.length;e++){const s=i[e];s.name&&!s.name.startsWith("hidden")&&s.value&&(t[s.name]=s.value)}await salla.api.profile.updateCustomFields({id:salla.config.get("store.id"),fields:t})}finally{this.isSubmitting=!1}}render(){return this.parsedFields?.length?i("form",{class:"s-custom-fields-wrapper",onSubmit:this.handleSubmit},this.parsedFields.map((e=>this.renderField(e))),i("salla-button",{type:"submit",loading:this.isSubmitting,disabled:this.isSubmitting||!this.isEditable,"loader-position":"end",class:"s-custom-fields-submit-btn"},this.saveButtonText)):null}};o.style="/*!twlt*/:host{display:block}.hidden{display:none}.form-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.form-input:focus{border-color:var(--color-primary);--tw-ring-color:transparent}.form-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.form-input:focus:is(.dark *){border-color:var(--color-primary)}@media (min-width: 640px){.form-input{font-size:0.875rem;line-height:1.25rem}}.s-custom-fields-wrapper{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:1.5rem}@media (min-width: 640px){.s-custom-fields-wrapper{grid-template-columns:repeat(2, minmax(0, 1fr));gap:2rem}}.s-custom-fields-required{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-custom-fields-submit-btn{grid-column:1 / -1;width:100%}.s-custom-fields-field-error{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-custom-fields-field-label{margin-bottom:0.5rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-custom-fields-skeleton-wrapper{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));grid-template-rows:repeat(3, minmax(0, 1fr));gap:3rem}.s-custom-fields-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-custom-fields-filepond-placeholder-icon{margin-bottom:0.25rem}.s-custom-fields-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}";export{o as salla_custom_fields}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as
|
|
4
|
+
import{r as a,h as t,H as l,a as n}from"./p-CjQzkU95.js";const s=class{constructor(t){a(this,t),this.pointsData=null,this.productId=null}async componentWillLoad(){try{if(await salla.onReady(),await salla.lang.onLoaded(),this.productId=this.host.dataset.productId||salla.config.get("page.id"),!this.productId)return;const a=await salla.api.request(`/loyalty/products/${this.productId}/points`).catch((()=>null));this.pointsData=a?.data||null}catch(a){salla?.logger?.warn?.("salla-loyalty-points-banner: init failed",a)}}render(){return this.productId&&this.pointsData?.points?t(l,null,t("div",{class:"s-loyalty-points-banner-container"},t("div",{class:"s-loyalty-points-banner-icon"},t("span",{class:"s-loyalty-points-banner-inner-icon",innerHTML:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8.76604 2.86201C9.31804 2.61001 9.93304 2.41501 10.611 2.27701C11.289 2.13901 12 2.07001 12.744 2.07001C13.572 2.07001 14.364 2.15401 15.12 2.32201C15.84 2.49001 16.356 2.81401 16.668 3.29401C16.932 3.70201 17.064 4.26001 17.064 4.96801V13.032C17.064 13.416 16.95 13.752 16.722 14.04C16.506 14.304 16.227 14.493 15.885 14.607C15.543 14.721 15.204 14.742 14.868 14.67C14.196 14.514 13.488 14.436 12.744 14.436C12.084 14.436 11.442 14.502 10.818 14.634C10.23 14.754 9.70204 14.922 9.23404 15.138C8.68204 15.39 8.06704 15.585 7.38904 15.723C6.71104 15.861 6.00004 15.93 5.25604 15.93C4.42804 15.93 3.63604 15.846 2.88004 15.678C2.18404 15.522 1.68004 15.21 1.36804 14.742C1.08004 14.322 0.936035 13.752 0.936035 13.032V4.96801C0.936035 4.58401 1.05004 4.24801 1.27804 3.96001C1.49404 3.69601 1.77304 3.50701 2.11504 3.39301C2.45704 3.27901 2.79604 3.25801 3.13204 3.33001C3.80404 3.48601 4.51204 3.56401 5.25604 3.56401C5.91604 3.56401 6.55804 3.49801 7.18204 3.36601C7.77004 3.24601 8.29804 3.07801 8.76604 2.86201ZM11.25 9.00001C11.25 8.59201 11.148 8.21701 10.944 7.87501C10.74 7.53301 10.467 7.26001 10.125 7.05601C9.78304 6.85201 9.40804 6.75001 9.00004 6.75001C8.59204 6.75001 8.21704 6.85201 7.87504 7.05601C7.53304 7.26001 7.26004 7.53301 7.05604 7.87501C6.85204 8.21701 6.75004 8.59201 6.75004 9.00001C6.75004 9.40801 6.85204 9.78301 7.05604 10.125C7.26004 10.467 7.53304 10.74 7.87504 10.944C8.21704 11.148 8.59204 11.25 9.00004 11.25C9.40804 11.25 9.78304 11.148 10.125 10.944C10.467 10.74 10.74 10.467 10.944 10.125C11.148 9.78301 11.25 9.40801 11.25 9.00001ZM14.328 7.79401C14.076 7.75801 13.812 7.73401 13.536 7.72201C13.38 7.71001 13.245 7.75501 13.131 7.85701C13.017 7.95901 12.954 8.08801 12.942 8.24401C12.93 8.40001 12.975 8.53501 13.077 8.64901C13.179 8.76301 13.308 8.82601 13.464 8.83801C13.704 8.85001 13.938 8.87401 14.166 8.91001C14.322 8.93401 14.463 8.90101 14.589 8.81101C14.715 8.72101 14.787 8.59801 14.805 8.44201C14.823 8.28601 14.787 8.14501 14.697 8.01901C14.607 7.89301 14.484 7.81801 14.328 7.79401ZM4.53604 9.16201C4.29604 9.15001 4.06204 9.12601 3.83404 9.09001C3.67804 9.06601 3.53704 9.09901 3.41104 9.18901C3.28504 9.27901 3.21304 9.40201 3.19504 9.55801C3.17704 9.71401 3.21304 9.85501 3.30304 9.98101C3.39304 10.107 3.51604 10.182 3.67204 10.206C3.92404 10.242 4.18804 10.266 4.46404 10.278C4.62004 10.29 4.75504 10.245 4.86904 10.143C4.98304 10.041 5.04604 9.91201 5.05804 9.75601C5.07004 9.60001 5.02504 9.46501 4.92304 9.35101C4.82104 9.23701 4.69204 9.17401 4.53604 9.16201Z" fill="white"/>\n</svg>\n'})),t("p",null,t("span",{class:"s-loyalty-points-banner-label"},salla.lang.get("pages.loyalty_program.earn")," "),t("span",{class:"s-loyalty-points-banner-label"},`+${this.pointsData.points}`," "),t("span",{class:"s-loyalty-points-banner-label"},salla.lang.get("pages.loyalty_program.loyalty_point")," "),t("span",{class:"s-loyalty-points-banner-description"},salla.lang.get("pages.loyalty_program.on_order_total_when_purchase"))))):null}get host(){return n(this)}};s.style="/*!twlt*/.s-loyalty-points-banner-container{margin-bottom:0.75rem;display:flex;width:100%;align-items:center;gap:0.5rem;border-radius:0.5rem;background-color:rgb(209 180 76 / var(--tw-bg-opacity, 1));--tw-bg-opacity:0.1;padding-left:0.75rem;padding-right:0.75rem;padding-top:0.5rem;padding-bottom:0.5rem}.s-loyalty-points-banner-icon{display:flex;height:2rem;width:2rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(209 180 76 / var(--tw-bg-opacity, 1))}.s-loyalty-points-banner-label{font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(209 180 76 / var(--tw-text-opacity, 1))}.s-loyalty-points-banner-description{font-size:0.875rem;line-height:1.25rem}";export{s as salla_loyalty_points_banner}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as
|
|
4
|
+
import{r as a,h as t,H as s,a as e}from"./p-CjQzkU95.js";const r=class{constructor(t){a(this,t),this.cashbackData=void 0,this.productId=null,this.handlePriceUpdated=(a,t)=>{if(String(t)!==String(this.productId))return;const s=a?.data?.cashback;void 0!==s&&(this.cashbackData=s)}}async componentWillLoad(){try{if(this.productId=this.host.dataset.productId||salla.config.get("page.id"),this.productId&&salla.event.on("product::price.updated",this.handlePriceUpdated),await salla.onReady(),await salla.lang.onLoaded(),!this.productId)return;const a=await salla.api.request(`/products/${this.productId}/cashback-offer`).catch((()=>null));void 0===this.cashbackData&&(this.cashbackData=a?.data??null)}catch(a){salla?.logger?.warn?.("salla-cashback-banner: init failed",a)}}disconnectedCallback(){salla.event.off("product::price.updated",this.handlePriceUpdated)}getPaymentMethodsText(a=[]){return a.map((a=>String(a||"").trim())).filter(Boolean).map((a=>salla.lang.get(`pages.checkout.${a}`)||a)).join(", ")}getCashbackMessage(){const a=this.cashbackData?.payment_method_restrictions?.included??[];return a.length?salla.lang.get("pages.loyalty_program.cashback_when_buying_product_payment_method",{payment_method:this.getPaymentMethodsText(a)}):salla.lang.get("pages.loyalty_program.cashback_when_buying_product")}render(){const a=this.cashbackData;if(!this.productId||!a||!Number(a.amount))return null;const e=a.amount,r=a.currency,n=this.getCashbackMessage(),i=a.offer_type;return t(s,null,t("div",{class:"s-cashback-banner-container"},t("div",{class:"s-cashback-banner-icon"},t("span",{class:"s-cashback-banner-inner-icon",innerHTML:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_5667_2008)">\n<path d="M9.00003 0.935974C9.37203 0.935974 9.72003 1.06797 10.044 1.33197C10.344 1.57197 10.596 1.90797 10.8 2.33997L12.114 5.00397C12.174 5.09997 12.27 5.19897 12.402 5.30097C12.534 5.40297 12.66 5.46597 12.78 5.48997L15.174 5.88597C15.618 5.95797 15.996 6.10197 16.308 6.31797C16.644 6.54597 16.869 6.83697 16.983 7.19097C17.097 7.54497 17.082 7.91397 16.938 8.29797C16.806 8.64597 16.578 8.98797 16.254 9.32397L14.4 11.196C14.316 11.28 14.247 11.409 14.193 11.583C14.139 11.757 14.13 11.91 14.166 12.042L14.688 14.364C14.808 14.88 14.832 15.342 14.76 15.75C14.676 16.206 14.475 16.551 14.157 16.785C13.839 17.019 13.452 17.106 12.996 17.046C12.588 16.998 12.156 16.836 11.7 16.56L9.45003 15.21C9.34203 15.15 9.19203 15.12 9.00003 15.12C8.80803 15.12 8.65803 15.15 8.55003 15.21L6.30003 16.56C5.84403 16.836 5.41203 16.998 5.00403 17.046C4.54803 17.106 4.16103 17.016 3.84303 16.776C3.52503 16.536 3.32403 16.194 3.24003 15.75C3.16803 15.342 3.19203 14.88 3.31203 14.364L3.83403 12.042C3.85803 11.91 3.84603 11.757 3.79803 11.583C3.75003 11.409 3.68403 11.28 3.60003 11.196L1.74603 9.32397C1.41003 8.98797 1.18203 8.64597 1.06203 8.29797C0.918027 7.91397 0.900027 7.54497 1.00803 7.19097C1.11603 6.83697 1.34403 6.54597 1.69203 6.31797C1.99203 6.10197 2.37003 5.95797 2.82603 5.88597L5.22003 5.48997C5.32803 5.46597 5.45103 5.40297 5.58903 5.30097C5.72703 5.19897 5.82003 5.09997 5.86803 5.00397L7.18203 2.33997C7.39803 1.90797 7.65603 1.57197 7.95603 1.33197C8.28003 1.06797 8.62803 0.935974 9.00003 0.935974Z" fill="white"/>\n</g>\n<defs>\n<clipPath id="clip0_5667_2008">\n<rect width="18" height="18" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n'})),t("p",null,t("span",{class:"s-cashback-banner-label"},salla.lang.get("pages.loyalty_program.earn")," "),t("span",{class:"s-cashback-banner-value"},"percentage"===i?"+":"",e," ",["SAR","ر.س"].includes(r)?t("i",{class:"sicon-sar"}):r," "),t("span",{class:"s-cashback-banner-label"},n))))}get host(){return e(this)}};r.style="/*!twlt*/.filter{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)}.s-cashback-banner-container{margin-bottom:0.75rem;display:flex;width:100%;align-items:center;gap:0.5rem;border-radius:0.5rem;background-color:rgb(46 16 101 / var(--tw-bg-opacity, 1));--tw-bg-opacity:0.1;padding-left:0.75rem;padding-right:0.75rem;padding-top:0.5rem;padding-bottom:0.5rem}.s-cashback-banner-icon{display:flex;height:2rem;width:2rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(46 16 101 / var(--tw-bg-opacity, 1))}.s-cashback-banner-label{font-size:0.875rem;line-height:1.25rem}.s-cashback-banner-value{font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(46 16 101 / var(--tw-text-opacity, 1))}";export{r as salla_cashback_banner}
|