@salla.sa/twilight-components 2.14.537 → 2.14.538
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-CtSUl5Ct.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DMIbAyAM.js → filepond-plugin-file-poster-MbB20g2i.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-NaEK453w.js → filepond-plugin-file-validate-size-Djvu0kmc.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-C4fSQyfm.js → filepond-plugin-file-validate-type-D7LBD397.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-M4p4znH2.js → filepond-plugin-image-edit-CD_ps_ik.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BmZUQ1qY.js → filepond-plugin-image-exif-orientation-6yimvoyt.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DQeJbx48.js → filepond-plugin-image-preview-B9Co2A29.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-CS4z8Mi_.js} +112 -66
- package/dist/cjs/{intlTelInput-B5hswC8S.js → intlTelInput-C2d0ZWHY.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 +21 -36
- 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-CU_KPkZ1.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/salla-bullet-delivery.css +1170 -5
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +13 -16
- 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 +13 -31
- 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-DPHK5C54.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CoRXw3k-.js → filepond-plugin-file-poster-d3QMLqXZ.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CGJ0QOyy.js → filepond-plugin-file-validate-size-ddyhZs41.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DDAxGYz8.js → filepond-plugin-file-validate-type-CJvnicil.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BTbI51S8.js → filepond-plugin-image-edit-CkhsRCAn.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-C0VSH5eq.js → filepond-plugin-image-exif-orientation-DuQyWmiv.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DZbIdviE.js → filepond-plugin-image-preview-D7QjrK0d.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-B8_UK_fg.js} +112 -66
- package/dist/esm/{intlTelInput-CcU6kFYO.js → intlTelInput-B9yY2tRj.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 +21 -36
- 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-BSz2-wvu.js} +1 -1
- package/dist/twilight/global/app.ts +60 -0
- package/dist/twilight/global/base-css.ts +2 -0
- package/dist/twilight/p-00ce360c.entry.js +4 -0
- package/dist/twilight/p-02bbd257.entry.js +4 -0
- package/dist/twilight/p-05055aa6.entry.js +4 -0
- package/dist/twilight/{p-54f5ab92.entry.js → p-054f3d0b.entry.js} +1 -1
- package/dist/twilight/{p-BBYplmag.js → p-0_ExyxPG.js} +1 -1
- package/dist/twilight/p-0b2c0f48.entry.js +4 -0
- package/dist/twilight/p-0dca6c20.entry.js +4 -0
- package/dist/twilight/{p-e8d773b2.entry.js → p-0ea80795.entry.js} +1 -1
- package/dist/twilight/{p-3be661be.entry.js → p-0f23ae67.entry.js} +1 -1
- package/dist/twilight/p-15edaa75.entry.js +4 -0
- package/dist/twilight/p-16d9d755.entry.js +4 -0
- package/dist/twilight/p-1a7af76b.entry.js +4 -0
- package/dist/twilight/{p-eb1bdbee.entry.js → p-1dfa3b27.entry.js} +1 -1
- package/dist/twilight/p-249fb9a3.entry.js +4 -0
- package/dist/twilight/p-25d06ec0.entry.js +4 -0
- package/dist/twilight/p-2b70199f.entry.js +4 -0
- package/dist/twilight/p-2f3d4e4e.entry.js +4 -0
- package/dist/twilight/p-306890a8.entry.js +4 -0
- package/dist/twilight/p-314aaef4.entry.js +4 -0
- package/dist/twilight/p-361ceb35.entry.js +4 -0
- package/dist/twilight/p-37bf885e.entry.js +4 -0
- package/dist/twilight/{p-99b6543b.entry.js → p-3a1c360f.entry.js} +1 -1
- package/dist/twilight/p-3aaa53c0.entry.js +4 -0
- package/dist/twilight/p-3b5cc06e.entry.js +4 -0
- package/dist/twilight/p-3c98087c.entry.js +4 -0
- package/dist/twilight/p-3d511460.entry.js +4 -0
- package/dist/twilight/p-3eb3acd1.entry.js +4 -0
- package/dist/twilight/p-4207c1a3.entry.js +4 -0
- package/dist/twilight/{p-15f20a28.entry.js → p-45413551.entry.js} +1 -1
- package/dist/twilight/{p-5d14a4ee.entry.js → p-45cae5c6.entry.js} +1 -1
- package/dist/twilight/p-4e76cc16.entry.js +4 -0
- package/dist/twilight/{p-a5d54ce0.entry.js → p-50a22b2c.entry.js} +1 -1
- package/dist/twilight/p-526a826c.entry.js +4 -0
- package/dist/twilight/{p-149e1143.entry.js → p-563eb741.entry.js} +1 -1
- package/dist/twilight/p-5684d0f8.entry.js +4 -0
- package/dist/twilight/p-5690d7cd.entry.js +4 -0
- package/dist/twilight/{p-b8980a7c.entry.js → p-56d5e4c7.entry.js} +38 -38
- package/dist/twilight/{p-24cb77eb.entry.js → p-5a473895.entry.js} +1 -1
- package/dist/twilight/p-5a893b7d.entry.js +4 -0
- package/dist/twilight/p-5b78ff50.entry.js +4 -0
- package/dist/twilight/p-5bf27714.entry.js +4 -0
- package/dist/twilight/p-63cae95d.entry.js +4 -0
- package/dist/twilight/p-68f2e246.entry.js +4 -0
- package/dist/twilight/p-69c3b48c.entry.js +4 -0
- package/dist/twilight/p-6dde9e14.entry.js +4 -0
- package/dist/twilight/p-73cd41fa.entry.js +4 -0
- package/dist/twilight/{p-036f67e4.entry.js → p-7591fcad.entry.js} +1 -1
- package/dist/twilight/p-78b7cb89.entry.js +4 -0
- package/dist/twilight/p-78c4d093.entry.js +4 -0
- package/dist/twilight/{p-2ac47b6b.entry.js → p-837ebad8.entry.js} +1 -1
- package/dist/twilight/p-84a2bf28.entry.js +4 -0
- package/dist/twilight/p-85345231.entry.js +4 -0
- package/dist/twilight/{p-c1caae26.entry.js → p-86a361e4.entry.js} +1 -1
- package/dist/twilight/{p-e24e104a.entry.js → p-8bf0cc70.entry.js} +1 -1
- package/dist/twilight/p-933a4956.entry.js +4 -0
- package/dist/twilight/p-9830acfc.entry.js +4 -0
- package/dist/twilight/{p-710a3ce8.entry.js → p-99b70539.entry.js} +1 -1
- package/dist/twilight/p-9be6697f.entry.js +4 -0
- package/dist/twilight/p-9dfaa3ed.entry.js +4 -0
- package/dist/twilight/{p-BICKbbaT.js → p-B8_UK_fg.js} +2 -2
- package/dist/twilight/{p-CnydhXLD.js → p-BCXr9HaJ.js} +2 -2
- package/dist/twilight/{p-CXRKXFgT.js → p-BChI23pG.js} +1 -1
- package/dist/twilight/{p-DGAX-mOJ.js → p-BWIa_6im.js} +2 -2
- 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-gy7RAvBD.js → p-C6ayRPtn.js} +1 -1
- package/dist/twilight/{p-BqKKpKiZ.js → p-D6fzhuhC.js} +1 -1
- package/dist/twilight/{p-CH2gmG7u.js → p-DDGtN95g.js} +1 -1
- package/dist/twilight/{p-Dbba1-no.js → p-DIjxGw7w.js} +1 -1
- package/dist/twilight/{p-D1s2kXqL.js → p-DRvZV5oe.js} +1 -1
- package/dist/twilight/{p-DwA0FvNE.js → p-DaamyJSZ.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-a337f80b.entry.js +4 -0
- package/dist/twilight/p-a667842e.entry.js +4 -0
- package/dist/twilight/{p-3c52b097.entry.js → p-a741ac5e.entry.js} +1 -1
- package/dist/twilight/p-a768e51b.entry.js +4 -0
- package/dist/twilight/{p-8ea78b6a.entry.js → p-ae05ee76.entry.js} +1 -1
- package/dist/twilight/p-af34df62.entry.js +4 -0
- package/dist/twilight/p-b078ccc9.entry.js +4 -0
- package/dist/twilight/p-b3e8b4d9.entry.js +4 -0
- package/dist/twilight/p-b4418299.entry.js +4 -0
- package/dist/twilight/p-bf58de87.entry.js +4 -0
- package/dist/twilight/p-c22173bf.entry.js +4 -0
- package/dist/twilight/{p-b10e56fd.entry.js → p-c3c48232.entry.js} +1 -1
- package/dist/twilight/{p-064d4340.entry.js → p-c4362957.entry.js} +1 -1
- package/dist/twilight/p-cd1d84e9.entry.js +4 -0
- package/dist/twilight/p-cde03bb7.entry.js +4 -0
- package/dist/twilight/{p-3ff03500.entry.js → p-d176de00.entry.js} +1 -1
- package/dist/twilight/p-d1e84f6b.entry.js +4 -0
- package/dist/twilight/p-d3eebc36.entry.js +4 -0
- package/dist/twilight/p-d5f63b95.entry.js +4 -0
- package/dist/twilight/p-d7392ff8.entry.js +4 -0
- package/dist/twilight/p-d9e7120d.entry.js +4 -0
- package/dist/twilight/{p-45199451.entry.js → p-da4b3ba6.entry.js} +1 -1
- package/dist/twilight/p-da7ae476.entry.js +4 -0
- package/dist/twilight/p-dbe69b54.entry.js +4 -0
- package/dist/twilight/p-dd24b858.entry.js +4 -0
- package/dist/twilight/p-e0e7454d.entry.js +4 -0
- package/dist/twilight/p-e491102e.entry.js +4 -0
- package/dist/twilight/p-eb6ef0b8.entry.js +4 -0
- package/dist/twilight/p-ed5031aa.entry.js +4 -0
- package/dist/twilight/{p-b4a173be.entry.js → p-f2bbeed7.entry.js} +1 -1
- package/dist/twilight/{p-56f180b1.entry.js → p-f663b4a4.entry.js} +1 -1
- package/dist/twilight/p-fb97a82d.entry.js +4 -0
- package/dist/twilight/p-fdbdc8f3.entry.js +4 -0
- package/dist/twilight/{p-BMmR9fBv.js → p-nuG4txey.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- 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
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
var index = require('./index-B_5gLFr2.js');
|
|
7
|
-
var star2 = require('./star2-R146a27p.js');
|
|
8
|
-
var Helper = require('./Helper-6RI07gZo.js');
|
|
9
|
-
require('./anime.es-BqW8JHZi.js');
|
|
10
|
-
|
|
11
|
-
var Heart = `<!-- Generated by IcoMoon.io -->
|
|
12
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
13
|
-
<title>heart</title>
|
|
14
|
-
<path d="M23.333 2.267c-3.547 0-5.779 1.605-7.333 3.061-1.555-1.456-3.787-3.061-7.333-3.061-5.955 0-8.667 5.045-8.667 9.733 0 8.503 10.147 14.735 15.513 16.841 0.156 0.061 0.321 0.092 0.487 0.092s0.331-0.031 0.487-0.092c5.367-2.107 15.513-8.339 15.513-16.841 0-4.688-2.712-9.733-8.667-9.733zM16 26.161c-5.537-2.309-13.333-7.799-13.333-14.161 0-3.517 1.856-7.067 6-7.067 2.983 0 4.656 1.451 6.384 3.203 0.5 0.508 1.399 0.508 1.899 0 1.728-1.752 3.401-3.203 6.384-3.203 4.144 0 6 3.549 6 7.067 0 6.363-7.796 11.852-13.333 14.161z"></path>
|
|
15
|
-
</svg>
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
const sallaProductCardCss = ".s-product-card-image::before{font-family:\"sallaicons\";content:\"\\ec1f\" !important}.s-product-card-content-pie-svg circle{transition:stroke-dashoffset 1s linear;-webkit-transition:stroke-dashoffset 1s linear;-moz-transition:stroke-dashoffset 1s linear;-ms-transition:stroke-dashoffset 1s linear;-o-transition:stroke-dashoffset 1s linear;stroke:#E8EDF2;stroke-width:2px;stroke-linecap:round;fill:none}.s-product-card-content-pie-svg-bar{stroke:var(--color-primary) !important;stroke-dasharray:100 100;stroke-dashoffset:100}";
|
|
19
|
-
|
|
20
|
-
const SallaProductCard = class {
|
|
21
|
-
constructor(hostRef) {
|
|
22
|
-
index.registerInstance(this, hostRef);
|
|
23
|
-
// Store configs
|
|
24
|
-
salla.onReady(() => {
|
|
25
|
-
this.fitImageHeight = salla.config.get('store.settings.product.fit_type');
|
|
26
|
-
salla.wishlist.event.onAdded((_res, id) => this.toggleFavoriteIcon(true, id));
|
|
27
|
-
salla.wishlist.event.onRemoved((_res, id) => this.toggleFavoriteIcon(false, id));
|
|
28
|
-
this.placeholder = salla.url.asset(salla.config.get('theme.settings.placeholder'));
|
|
29
|
-
});
|
|
30
|
-
// Language
|
|
31
|
-
salla.lang.onLoaded(() => {
|
|
32
|
-
this.remained = salla.lang.get('pages.products.remained');
|
|
33
|
-
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
34
|
-
this.startingPrice = salla.lang.get('pages.products.starting_price');
|
|
35
|
-
this.addToCart = salla.lang.get('pages.cart.add_to_cart');
|
|
36
|
-
this.outOfStock = salla.lang.get('pages.products.out_of_stock');
|
|
37
|
-
});
|
|
38
|
-
// Parse product data
|
|
39
|
-
if (!this.product) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
try {
|
|
43
|
-
this.productData = typeof this.product == 'object' ? this.product : JSON.parse(this.product);
|
|
44
|
-
}
|
|
45
|
-
catch (e) {
|
|
46
|
-
salla.log('Bad json passed via product prop');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
// Private Methods
|
|
50
|
-
initCircleBar() {
|
|
51
|
-
let qty = this.productData.quantity, total = this.productData.quantity > 100 ? this.productData.quantity * 2 : 100, roundPercent = (qty / total) * 100, bar = this.pie.querySelector('.s-product-card-content-pie-svg-bar'), strokeDashOffsetValue = 100 - roundPercent;
|
|
52
|
-
bar.style.strokeDashoffset = strokeDashOffsetValue;
|
|
53
|
-
}
|
|
54
|
-
toggleFavoriteIcon(isAdded = true, id = null) {
|
|
55
|
-
if (id && id !== this.productData.id) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
this.wishlistBtn?.classList.toggle('s-product-card-wishlist-added', isAdded);
|
|
59
|
-
}
|
|
60
|
-
isInWishlist() {
|
|
61
|
-
return salla.storage.get('salla::wishlist', []).includes(this.productData?.id);
|
|
62
|
-
}
|
|
63
|
-
async handleWishlistClick() {
|
|
64
|
-
const wasInWishlist = this.isInWishlist();
|
|
65
|
-
this.toggleFavoriteIcon(!wasInWishlist);
|
|
66
|
-
try {
|
|
67
|
-
await salla.wishlist.toggle(this.productData.id);
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
this.toggleFavoriteIcon(wasInWishlist);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
formatDate(date) {
|
|
74
|
-
let d = new Date(date);
|
|
75
|
-
return `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`;
|
|
76
|
-
}
|
|
77
|
-
getProductBadge() {
|
|
78
|
-
if (this.productData.promotion_title) {
|
|
79
|
-
return index.h("div", { class: "s-product-card-promotion-title" }, this.productData.promotion_title);
|
|
80
|
-
}
|
|
81
|
-
if (this.showQuantity && this.productData?.quantity) {
|
|
82
|
-
return index.h("div", { class: "s-product-card-quantity" }, this.remained, " ", salla.helpers.number(this.productData?.quantity));
|
|
83
|
-
}
|
|
84
|
-
if (this.showQuantity && this.productData?.is_out_of_stock) {
|
|
85
|
-
return index.h("div", { class: "s-product-card-out-badge" }, this.outOfStock);
|
|
86
|
-
}
|
|
87
|
-
return '';
|
|
88
|
-
}
|
|
89
|
-
getPriceFormat(price) {
|
|
90
|
-
if (!price || price == 0) {
|
|
91
|
-
return salla.config.get('store.settings.product.show_price_as_dash') ? '-' : '';
|
|
92
|
-
}
|
|
93
|
-
return salla.money(price);
|
|
94
|
-
}
|
|
95
|
-
getProductPrice() {
|
|
96
|
-
if (this.productData.is_on_sale) {
|
|
97
|
-
return index.h("div", { class: "s-product-card-sale-price" }, index.h("h4", { innerHTML: this.getPriceFormat(this.productData.sale_price) }), index.h("span", { innerHTML: this.getPriceFormat(this.productData?.regular_price) }));
|
|
98
|
-
}
|
|
99
|
-
if (this.productData.starting_price) {
|
|
100
|
-
return index.h("div", { class: "s-product-card-starting-price" }, index.h("p", null, this.startingPrice), index.h("h4", { innerHTML: this.getPriceFormat(this.productData?.starting_price) }));
|
|
101
|
-
}
|
|
102
|
-
return index.h("h4", { class: "s-product-card-price", innerHTML: this.getPriceFormat(this.productData?.price) });
|
|
103
|
-
}
|
|
104
|
-
render() {
|
|
105
|
-
const classes = {
|
|
106
|
-
's-product-card-entry': true,
|
|
107
|
-
's-product-card-vertical': !this.horizontal && !this.fullImage && !this.minimal,
|
|
108
|
-
's-product-card-horizontal': this.horizontal && !this.fullImage && !this.minimal,
|
|
109
|
-
's-product-card-fit-height': this.fitImageHeight && !this.isSpecial && !this.fullImage && !this.minimal,
|
|
110
|
-
's-product-card-special': this.isSpecial,
|
|
111
|
-
's-product-card-full-image': this.fullImage,
|
|
112
|
-
's-product-card-minimal': this.minimal,
|
|
113
|
-
's-product-card-compact': this.compact,
|
|
114
|
-
's-product-card-donation': this.productData?.donation,
|
|
115
|
-
's-product-card-shadow': this.shadowOnHover,
|
|
116
|
-
's-product-card-out-of-stock': this.productData?.is_out_of_stock,
|
|
117
|
-
};
|
|
118
|
-
const hrefProp = this.productData?.url ? { href: this.productData.url, title: `Learn more about ${this.productData?.name}` } : {};
|
|
119
|
-
return (index.h(index.Host, { key: 'c5a6d2bc2fcf23da1a41ab8b19b2e981fb111e30', id: `product-${this.productData?.id}`, class: classes }, index.h("div", { key: 'e8d5105e4dbe367c612d62ef1dd6c95d04f440b0', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, index.h("a", { key: '8714997fcb48ef0eaabdf0a52cb775514e53db56', ...hrefProp }, index.h("img", { key: 'eebd3c1dde0894037a7723c46e2f07f6a5aef939', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
|
|
120
|
-
? 'contain'
|
|
121
|
-
: this.fitImageHeight
|
|
122
|
-
? this.fitImageHeight
|
|
123
|
-
: 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && index.h("a", { key: '72e240315320e976dcad8d3f027711b9c1d7bcf1', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
|
|
124
|
-
index.h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, index.h("span", { innerHTML: Heart })) : ''), index.h("div", { key: '2f0186ffc102488824cd7c346f4e07439474fc26', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
|
|
125
|
-
index.h("div", { class: "s-product-card-content-pie", ref: pie => this.pie = pie }, index.h("span", null, index.h("b", null, salla.helpers.number(this.productData?.quantity)), this.remained), index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -1 36 34", class: "s-product-card-content-pie-svg" }, index.h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-base" }), index.h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-bar" })))
|
|
126
|
-
: '', index.h("div", { key: 'd50ea0726d25bf3b551050e906fc615bc682e694', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, index.h("h3", { key: 'e4f39676d661a01d1aa6352cac7be6e764fa8687', class: "s-product-card-content-title" }, index.h("a", { key: '0aacc2e00a0db730d1e803da34336085082df75d', ...hrefProp }, this.productData?.name)), this.productData?.subtitle && !this.minimal ?
|
|
127
|
-
index.h("p", { class: "s-product-card-content-subtitle" }, this.productData?.subtitle)
|
|
128
|
-
: ''), this.productData?.donation && !this.minimal && !this.fullImage ?
|
|
129
|
-
[index.h("salla-progress-bar", { donation: this.productData?.donation }), index.h("div", { class: "s-product-card-donation-input" }, this.productData?.donation?.can_donate ?
|
|
130
|
-
[index.h("label", { htmlFor: "donation-amount" }, this.donationAmount, " ", index.h("span", null, "*")), index.h("input", { type: "text", onInput: e => {
|
|
131
|
-
salla.helpers.inputDigitsOnly(e.target);
|
|
132
|
-
this.addBtn.donatingAmount = e.target.value;
|
|
133
|
-
}, id: "donation-amount", name: "donating_amount", class: "s-form-control", placeholder: this.donationAmount })]
|
|
134
|
-
: '')]
|
|
135
|
-
: '', index.h("div", { key: '445a1e16fee6ebb6ab5012aca324d3845991d13e', class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice(), this.productData?.rating?.stars && !this.minimal ?
|
|
136
|
-
index.h("div", { class: "s-product-card-rating" }, index.h("span", { innerHTML: star2.Star }), index.h("span", null, this.productData.rating.stars))
|
|
137
|
-
: ''), this.isSpecial && this.productData.discount_ends
|
|
138
|
-
? index.h("salla-count-down", { date: this.formatDate(this.productData.discount_ends), "end-of-day": true, boxed: true, labeled: true })
|
|
139
|
-
: '', !this.hideAddBtn && !this.compact ?
|
|
140
|
-
index.h("div", { class: "s-product-card-content-footer" }, index.h("salla-add-product-button", { fill: "outline", width: "wide", ref: el => this.addBtn = el, "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type }, index.h("slot", { name: "add-to-cart-label" }, this.productData.add_to_cart_label)), this.horizontal || this.fullImage ?
|
|
141
|
-
index.h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, ref: el => this.wishlistBtn = el, "aria-label": "Add or remove to wishlist", class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick(), "data-id": "{{ product.id }}" }, index.h("span", { class: "text-xl", innerHTML: Heart }))
|
|
142
|
-
: '')
|
|
143
|
-
: ''), !this.hideAddBtn && this.compact ?
|
|
144
|
-
index.h("div", { class: "s-product-card-content-footer" }, index.h("salla-add-product-button", { ref: el => this.addBtn = el, "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type, class: "s-add-product-button-compact" }, index.h("slot", { name: "add-to-cart-label" }, this.productData.add_to_cart_label)))
|
|
145
|
-
: ''));
|
|
146
|
-
}
|
|
147
|
-
componentDidLoad() {
|
|
148
|
-
document.lazyLoadInstance?.update(this.host.querySelectorAll('.lazy'));
|
|
149
|
-
if (this.productData?.quantity && this.isSpecial) {
|
|
150
|
-
this.initCircleBar();
|
|
151
|
-
}
|
|
152
|
-
if (!salla.config.isGuest() && salla.storage.get('salla::wishlist', []).includes(this.productData?.id)) {
|
|
153
|
-
this.toggleFavoriteIcon();
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
static get assetsDirs() { return ["assets"]; }
|
|
157
|
-
get host() { return index.getElement(this); }
|
|
158
|
-
};
|
|
159
|
-
SallaProductCard.style = sallaProductCardCss;
|
|
160
|
-
|
|
161
|
-
const sallaProductsSliderCss = "";
|
|
162
|
-
|
|
163
|
-
const SallaProductsSlider = class {
|
|
164
|
-
constructor(hostRef) {
|
|
165
|
-
index.registerInstance(this, hostRef);
|
|
166
|
-
/**
|
|
167
|
-
* Custom Card Component for the Salla Products Slider.
|
|
168
|
-
*
|
|
169
|
-
* This component allows you to customize the appearance of individual product cards within a Salla Products Slider.
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* <salla-products-slider product-card-component="my-custom-card-style1" ...
|
|
173
|
-
* <salla-products-slider product-card-component="my-custom-card-style2" ...
|
|
174
|
-
*/
|
|
175
|
-
this.productCardComponent = 'custom-salla-product-card';
|
|
176
|
-
this.apiUrl = '';
|
|
177
|
-
this.onWishlistStorageSynced = () => Helper.Helper.syncWishlistIcons(this.host, `${this.productCardComponent}, salla-product-card`);
|
|
178
|
-
}
|
|
179
|
-
componentWillLoad() {
|
|
180
|
-
return salla.onReady()
|
|
181
|
-
.then(async () => {
|
|
182
|
-
//TODO:: check why `this.includes` not working!!
|
|
183
|
-
this.includes = Helper.Helper.parseJson(this.includes || this.host.getAttribute('includes'));
|
|
184
|
-
if (!Array.isArray(this.includes)) {
|
|
185
|
-
this.includes = null;
|
|
186
|
-
}
|
|
187
|
-
Helper.Helper.setIncludes(this.includes);
|
|
188
|
-
this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());
|
|
189
|
-
if (!this.sourceValueIsValid) {
|
|
190
|
-
salla.logger.warn(`source-value prop is required for source [${this.getSource()}]`);
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
this.hasCustomComponent = !!customElements.get(this.productCardComponent);
|
|
194
|
-
if (this.source === 'json') {
|
|
195
|
-
this.productsData = await this.applyBeforeAppendItems(this.getSourceValue());
|
|
196
|
-
this.isReady = true;
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled'))) {
|
|
200
|
-
this.isReady = false;
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
if (this.getSource() === 'related' &&
|
|
204
|
-
salla.config.get('store.settings.product.related_products_enabled') &&
|
|
205
|
-
salla.config.get('store.settings.product.product-recommendation-type') === 'random' &&
|
|
206
|
-
salla.config.get('store.features')?.includes('ai-driven-personalized-product')) {
|
|
207
|
-
this.sourceValue = await salla.recommendations.similarProducts(this.sourceValue, { limit: this.limit || 12 }).extractProductIds();
|
|
208
|
-
this.source = 'selected';
|
|
209
|
-
}
|
|
210
|
-
return salla.api.withoutNotifier(() => salla.product.api.fetch({
|
|
211
|
-
source: Helper.Helper.getApiSource(this.getSource()),
|
|
212
|
-
source_value: this.getSourceValue(),
|
|
213
|
-
limit: this.limit
|
|
214
|
-
}))
|
|
215
|
-
.then(response => Helper.Helper.injectExtraFieldsToResponse(response))
|
|
216
|
-
.then(async (response) => {
|
|
217
|
-
this.productsData = await this.applyBeforeAppendItems(response.data);
|
|
218
|
-
this.isReady = true;
|
|
219
|
-
response.source = this.getSource();
|
|
220
|
-
response.sourceValue = this.getSourceValue();
|
|
221
|
-
salla.event.emit('salla-products-slider::products.fetched', this.productsData);
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
componentDidRender() {
|
|
226
|
-
let processedCount = 0;
|
|
227
|
-
const intervalId = setInterval(() => {
|
|
228
|
-
this.host.querySelectorAll('[loading="lazy"]')?.forEach(img => img.removeAttribute('loading'));
|
|
229
|
-
processedCount++;
|
|
230
|
-
if (processedCount >= 10) {
|
|
231
|
-
clearInterval(intervalId);
|
|
232
|
-
}
|
|
233
|
-
}, 1000);
|
|
234
|
-
}
|
|
235
|
-
connectedCallback() {
|
|
236
|
-
salla.event.on('wishlist::storage.synced', this.onWishlistStorageSynced);
|
|
237
|
-
}
|
|
238
|
-
disconnectedCallback() {
|
|
239
|
-
salla.event.off('wishlist::storage.synced', this.onWishlistStorageSynced);
|
|
240
|
-
}
|
|
241
|
-
async componentDidLoad() {
|
|
242
|
-
await Salla.hooks.registerComponent('salla-products-slider', this);
|
|
243
|
-
}
|
|
244
|
-
onReadyChanged(isReady) {
|
|
245
|
-
if (!isReady)
|
|
246
|
-
return;
|
|
247
|
-
void salla.wishlist.api.syncStorageFromServer();
|
|
248
|
-
}
|
|
249
|
-
isSourceWithoutValue() {
|
|
250
|
-
return ['offers', 'latest', 'sales', 'top-rated'].includes(this.getSource());
|
|
251
|
-
}
|
|
252
|
-
getItemHTML(product) {
|
|
253
|
-
//as a request they don't want to let the user to open the product details
|
|
254
|
-
//todo:: find a better way to handle this request
|
|
255
|
-
const isLandingPage = this.getSource() === 'landing-page';
|
|
256
|
-
isLandingPage && (product.url = '');
|
|
257
|
-
const handleClick = isLandingPage ? undefined : () => {
|
|
258
|
-
Helper.Helper.saveProductSource(this.getSource());
|
|
259
|
-
Helper.Helper.saveProductPosition(product.position);
|
|
260
|
-
};
|
|
261
|
-
if (this.hasCustomComponent && this.productCardComponent.toLowerCase() == 'custom-salla-product-card') {
|
|
262
|
-
return index.h("div", { class: "s-products-slider-card", onClick: handleClick }, index.h("custom-salla-product-card", { product: product, source: this.getSource(), "source-value": this.getSourceValue() }));
|
|
263
|
-
}
|
|
264
|
-
if (this.hasCustomComponent) {
|
|
265
|
-
const customElem = document.createElement(this.productCardComponent);
|
|
266
|
-
customElem.setAttribute('product', JSON.stringify(product));
|
|
267
|
-
customElem.setAttribute('source', this.getSource());
|
|
268
|
-
customElem.setAttribute('source-value', this.getSourceValue());
|
|
269
|
-
return index.h("div", { class: "s-products-slider-card", onClick: handleClick, innerHTML: customElem.outerHTML });
|
|
270
|
-
}
|
|
271
|
-
return index.h("div", { class: "s-products-slider-card", onClick: handleClick }, index.h("salla-product-card", { "show-quantity": isLandingPage, "hide-add-btn": isLandingPage, "shadow-on-hover": true, product: product }));
|
|
272
|
-
}
|
|
273
|
-
canRender() {
|
|
274
|
-
return this.sourceValueIsValid && this.isReady;
|
|
275
|
-
}
|
|
276
|
-
getSource() {
|
|
277
|
-
return Helper.Helper.getProductsSource(this.source);
|
|
278
|
-
}
|
|
279
|
-
getSourceValue() {
|
|
280
|
-
return Helper.Helper.getProductsSourceValue(this.source, this.sourceValue);
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Allows bundles to modify or replace products before they are rendered.
|
|
284
|
-
*
|
|
285
|
-
* @example
|
|
286
|
-
* salla.hooks.registerHook(
|
|
287
|
-
* 'salla-products-slider',
|
|
288
|
-
* 'beforeAppendItems',
|
|
289
|
-
* async (ctx) => {
|
|
290
|
-
* ctx.items = ctx.items.filter((item) => item.is_available);
|
|
291
|
-
* },
|
|
292
|
-
* );
|
|
293
|
-
*/
|
|
294
|
-
async applyBeforeAppendItems(items) {
|
|
295
|
-
const originalItems = Array.isArray(items) ? items : [];
|
|
296
|
-
const ctx = { component: this, items: originalItems };
|
|
297
|
-
try {
|
|
298
|
-
await salla.hooks.call('salla-products-slider', 'beforeAppendItems', ctx);
|
|
299
|
-
return Array.isArray(ctx.items) ? ctx.items : originalItems;
|
|
300
|
-
}
|
|
301
|
-
catch {
|
|
302
|
-
return originalItems;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
render() {
|
|
306
|
-
if (!this.canRender()) {
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
return (index.h(index.Host, { class: "s-products-slider-wrapper" }, index.h("salla-slider", { class: "s-products-slider-slider", id: this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`, ...(this.sliderProps || {}), "auto-play": this.autoplay, type: "carousel", "block-title": this.blockTitle, "block-subTitle": this.subTitle, "display-all-url": this.displayAllUrl, sliderConfig: this.sliderConfig ? this.sliderConfig : null }, index.h("div", { slot: "items" }, this.productsData?.map(product => this.getItemHTML(product))))));
|
|
310
|
-
}
|
|
311
|
-
get host() { return index.getElement(this); }
|
|
312
|
-
static get watchers() { return {
|
|
313
|
-
"isReady": ["onReadyChanged"]
|
|
314
|
-
}; }
|
|
315
|
-
};
|
|
316
|
-
SallaProductsSlider.style = sallaProductsSliderCss;
|
|
317
|
-
|
|
318
|
-
exports.salla_product_card = SallaProductCard;
|
|
319
|
-
exports.salla_products_slider = SallaProductsSlider;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
var SIShipping = `<!-- Generated by IcoMoon.io -->
|
|
7
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
8
|
-
<title>shipping</title>
|
|
9
|
-
<path d="M31.124 13.104l-3.148-3.935c-1.273-1.591-3.171-2.503-5.207-2.503h-1.436c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v17.333c0 0.737 0.596 1.333 1.333 1.333h2.856c0.596 2.295 2.665 4 5.144 4 2.941 0 5.333-2.392 5.333-5.333s-2.392-5.333-5.333-5.333c-2.479 0-4.548 1.705-5.144 4h-1.523v-16c0-0.735 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.599 1.333 1.333v1.333c0 0.248 0.087 0.468 0.204 0.667-0.117 0.199-0.204 0.419-0.204 0.667v5.333c0 0.736 0.596 1.333 1.333 1.333h9.333v6.667h-1.333c-0.063 0-0.117 0.028-0.179 0.036-0.583-2.313-2.663-4.036-5.155-4.036-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c2.492 0 4.572-1.723 5.155-4.036 0.061 0.008 0.116 0.036 0.179 0.036h2.667c0.737 0 1.333-0.596 1.333-1.333v-8.397c0-0.907-0.311-1.795-0.876-2.499zM9.333 21.333c1.471 0 2.667 1.196 2.667 2.667s-1.196 2.667-2.667 2.667-2.667-1.196-2.667-2.667 1.196-2.667 2.667-2.667zM21.333 13.333v-4h1.436c1.221 0 2.361 0.548 3.124 1.501l1.999 2.499zM22.667 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>
|
|
10
|
-
</svg>
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
exports.SIShipping = SIShipping;
|
package/dist/cjs/tag-D-PcUR33.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
var SITag = `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
7
|
-
<title>tag</title>
|
|
8
|
-
<path d="M28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>
|
|
9
|
-
</svg>
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
exports.SITag = SITag;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
var index = require('./index-B_5gLFr2.js');
|
|
7
|
-
|
|
8
|
-
function TrackedPromise(fn, options = {}) {
|
|
9
|
-
options = Object.assign({ initialData: undefined, initialStatus: 'idle' }, options);
|
|
10
|
-
return (target, propertyKey) => {
|
|
11
|
-
const trackedPromise = Object.assign(function (...args) {
|
|
12
|
-
const update = (newState) => {
|
|
13
|
-
Object.assign(this[propertyKey], newState);
|
|
14
|
-
index.forceUpdate(this);
|
|
15
|
-
};
|
|
16
|
-
update({ status: 'pending', error: undefined });
|
|
17
|
-
return fn.call(this, ...args).then((data) => {
|
|
18
|
-
update({ status: 'success', data, error: undefined });
|
|
19
|
-
return data;
|
|
20
|
-
}, (error) => {
|
|
21
|
-
update({ status: 'error', error });
|
|
22
|
-
return Promise.reject(error);
|
|
23
|
-
});
|
|
24
|
-
}, { status: options.initialStatus, data: options.initialData, error: undefined });
|
|
25
|
-
Object.defineProperty(target, propertyKey, {
|
|
26
|
-
value: trackedPromise,
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
exports.TrackedPromise = TrackedPromise;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
var SIUserAdd = `<!-- Generated by IcoMoon.io -->
|
|
7
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
8
|
-
<title>user-add</title>
|
|
9
|
-
<path d="M10.667 16c4.044 0 7.333-3.289 7.333-7.333s-3.289-7.333-7.333-7.333-7.333 3.289-7.333 7.333 3.289 7.333 7.333 7.333zM10.667 4c2.573 0 4.667 2.093 4.667 4.667s-2.093 4.667-4.667 4.667-4.667-2.093-4.667-4.667 2.093-4.667 4.667-4.667zM30.667 14.667h-2.667v-2.667c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v2.667h-2.667c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333zM10.667 18.667c-5.881 0-10.667 3.813-10.667 8.5v2.167c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-3.217 3.588-5.833 8-5.833s8 2.616 8 5.833v2.167c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-4.687-4.785-8.5-10.667-8.5z"></path>
|
|
10
|
-
</svg>
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
exports.SIUserAdd = SIUserAdd;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import { h } from './index-BICKbbaT.js';
|
|
5
|
-
|
|
6
|
-
function nearestLowerMultiple(number, multipleOf = window.matchMedia('(min-width: 768px)').matches ? 3 : 2) {
|
|
7
|
-
return number < multipleOf ? number : number - (number % multipleOf);
|
|
8
|
-
}
|
|
9
|
-
function closeModals(cb = null) {
|
|
10
|
-
for (const element of document.querySelectorAll('salla-modal')) {
|
|
11
|
-
element.close();
|
|
12
|
-
}
|
|
13
|
-
cb && requestAnimationFrame(cb);
|
|
14
|
-
}
|
|
15
|
-
function normalizeLoyaltyData(data) {
|
|
16
|
-
const groups = (data.prizes || []).map((group) => {
|
|
17
|
-
return {
|
|
18
|
-
...group,
|
|
19
|
-
items: (group.items || []).map((item) => ({ ...item, group_title: group.title, group_type: group.type })),
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
const all = {
|
|
23
|
-
type: 'all',
|
|
24
|
-
title: salla.lang.get('pages.loyalty_program.all'),
|
|
25
|
-
items: groups.reduce((acc, group) => acc.concat(group.items), []),
|
|
26
|
-
};
|
|
27
|
-
groups.unshift(all);
|
|
28
|
-
return {
|
|
29
|
-
...data,
|
|
30
|
-
prizes: groups,
|
|
31
|
-
prizes_count: all.items.length,
|
|
32
|
-
points: data.points ?? [],
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function brand_path(brand) {
|
|
36
|
-
return [brand.name.replace(/\s/g, '-'), `brand-${brand.id}`].join('/');
|
|
37
|
-
}
|
|
38
|
-
function isUnitOrder(point) {
|
|
39
|
-
for (const condition of point.conditions) {
|
|
40
|
-
if (condition.key.endsWith('_FOR_UNIT') || condition.key.endsWith('_FOR_UNIT_BY_CATEGORIES')) {
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function isRangePoints(point) {
|
|
46
|
-
for (const condition of point.conditions) {
|
|
47
|
-
if (condition.key.endsWith('_BY_CATEGORIES') && point.conditions.length > 1) {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function getPoints(point) {
|
|
53
|
-
if (isRangePoints(point)) {
|
|
54
|
-
return point.conditions.sort((a, b) => a.points - b.points)[0].points;
|
|
55
|
-
}
|
|
56
|
-
return point.points;
|
|
57
|
-
}
|
|
58
|
-
function formattedPointsJsx(value, isUnit = false, isRange = false) {
|
|
59
|
-
if (typeof value === 'number') {
|
|
60
|
-
if (isUnit) {
|
|
61
|
-
return h("span", null,
|
|
62
|
-
isRange ? salla.lang.get('pages.loyalty_program.start_from') : '',
|
|
63
|
-
" 1 ",
|
|
64
|
-
salla.config.currency().symbol,
|
|
65
|
-
" = ",
|
|
66
|
-
value,
|
|
67
|
-
" ",
|
|
68
|
-
salla.lang.get('pages.loyalty_program.point'));
|
|
69
|
-
}
|
|
70
|
-
return h("span", null,
|
|
71
|
-
isRange ? salla.lang.get('pages.loyalty_program.start_from') : '',
|
|
72
|
-
" ",
|
|
73
|
-
value,
|
|
74
|
-
" ",
|
|
75
|
-
salla.lang.get('pages.loyalty_program.point'));
|
|
76
|
-
}
|
|
77
|
-
if (isUnitOrder(value)) {
|
|
78
|
-
return h("span", null,
|
|
79
|
-
isRangePoints(value) ? salla.lang.get('pages.loyalty_program.start_from') : '',
|
|
80
|
-
" 1 ",
|
|
81
|
-
salla.config.currency().symbol,
|
|
82
|
-
" = ",
|
|
83
|
-
getPoints(value),
|
|
84
|
-
" ",
|
|
85
|
-
salla.lang.get('pages.loyalty_program.point'));
|
|
86
|
-
}
|
|
87
|
-
return h("span", null,
|
|
88
|
-
isRangePoints(value) ? salla.lang.get('pages.loyalty_program.start_from') : '',
|
|
89
|
-
" ",
|
|
90
|
-
getPoints(value),
|
|
91
|
-
" ",
|
|
92
|
-
salla.lang.get('pages.loyalty_program.point'));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export { nearestLowerMultiple as a, brand_path as b, closeModals as c, formattedPointsJsx as f, isUnitOrder as i, normalizeLoyaltyData as n };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
var SILayoutGrid = `<!-- Generated by IcoMoon.io -->
|
|
5
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
6
|
-
<title>layout-grid</title>
|
|
7
|
-
<path d="M10.667 17.333h-5.333c-2.205 0-4 1.795-4 4v5.333c0 2.205 1.795 4 4 4h5.333c2.205 0 4-1.795 4-4v-5.333c0-2.205-1.795-4-4-4zM12 26.667c0 0.736-0.597 1.333-1.333 1.333h-5.333c-0.736 0-1.333-0.597-1.333-1.333v-5.333c0-0.736 0.597-1.333 1.333-1.333h5.333c0.736 0 1.333 0.597 1.333 1.333zM26.667 1.333h-5.333c-2.205 0-4 1.795-4 4v5.333c0 2.205 1.795 4 4 4h5.333c2.205 0 4-1.795 4-4v-5.333c0-2.205-1.795-4-4-4zM28 10.667c0 0.735-0.597 1.333-1.333 1.333h-5.333c-0.736 0-1.333-0.599-1.333-1.333v-5.333c0-0.735 0.597-1.333 1.333-1.333h5.333c0.736 0 1.333 0.599 1.333 1.333zM10.667 1.333h-5.333c-2.205 0-4 1.795-4 4v5.333c0 2.205 1.795 4 4 4h5.333c2.205 0 4-1.795 4-4v-5.333c0-2.205-1.795-4-4-4zM12 10.667c0 0.735-0.597 1.333-1.333 1.333h-5.333c-0.736 0-1.333-0.599-1.333-1.333v-5.333c0-0.735 0.597-1.333 1.333-1.333h5.333c0.736 0 1.333 0.599 1.333 1.333zM26.667 17.333h-5.333c-2.205 0-4 1.795-4 4v5.333c0 2.205 1.795 4 4 4h5.333c2.205 0 4-1.795 4-4v-5.333c0-2.205-1.795-4-4-4zM28 26.667c0 0.736-0.597 1.333-1.333 1.333h-5.333c-0.736 0-1.333-0.597-1.333-1.333v-5.333c0-0.736 0.597-1.333 1.333-1.333h5.333c0.736 0 1.333 0.597 1.333 1.333z"></path>
|
|
8
|
-
</svg>
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
var SIPercentage = `<!-- Generated by IcoMoon.io -->
|
|
12
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
13
|
-
<title>percentage</title>
|
|
14
|
-
<path d="M9 14.333c3.308 0 6-2.692 6-6s-2.692-6-6-6-6 2.692-6 6 2.692 6 6 6zM9 5c1.837 0 3.333 1.495 3.333 3.333s-1.496 3.333-3.333 3.333-3.333-1.495-3.333-3.333 1.496-3.333 3.333-3.333zM29.276 2.724c-0.521-0.521-1.364-0.521-1.885 0l-24.667 24.667c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l24.667-24.667c0.521-0.521 0.521-1.364 0-1.885zM23.667 17c-3.308 0-6 2.692-6 6s2.692 6 6 6 6-2.692 6-6-2.692-6-6-6zM23.667 26.333c-1.837 0-3.333-1.495-3.333-3.333s1.496-3.333 3.333-3.333 3.333 1.495 3.333 3.333-1.496 3.333-3.333 3.333z"></path>
|
|
15
|
-
</svg>
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
export { SIPercentage as S, SILayoutGrid as a };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-BICKbbaT.js';
|
|
5
|
-
import { S as SIGift } from './gift-CXRKXFgT.js';
|
|
6
|
-
import { T as TrackedPromise } from './tracked-promise-BGUdJ_Y7.js';
|
|
7
|
-
|
|
8
|
-
const sallaLoyaltyProgramCss = "@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";
|
|
9
|
-
|
|
10
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
11
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
13
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
14
|
-
else
|
|
15
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
16
|
-
if (d = decorators[i])
|
|
17
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
20
|
-
const SallaLoyaltyBanner = class {
|
|
21
|
-
constructor(hostRef) {
|
|
22
|
-
registerInstance(this, hostRef);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Get product ID from data attribute or fallback to page.id
|
|
26
|
-
*/
|
|
27
|
-
get productId() {
|
|
28
|
-
return this.host.dataset.productId || salla.config.get('page.id');
|
|
29
|
-
}
|
|
30
|
-
componentWillLoad() {
|
|
31
|
-
return salla.onReady()
|
|
32
|
-
.then(() => salla.lang.onLoaded())
|
|
33
|
-
.then(() => this.prize())
|
|
34
|
-
.catch(error => salla.logger.error(error));
|
|
35
|
-
}
|
|
36
|
-
handleClick() {
|
|
37
|
-
if (salla.config.isGuest()) {
|
|
38
|
-
salla.event.dispatch('login::open');
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
this.exchangeModal.open();
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
if (this.prize.status !== 'success' || !this.productId) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
return (h("div", { class: "s-loyalty-program-banner-container" }, h("div", null, h("p", { class: "s-loyalty-program-banner-container-banner-title" }, salla.lang.get('pages.loyalty_program.want_to_redeem_free_product')), h("p", { class: "s-loyalty-program-banner-container-banner-subtitle" }, salla.lang.get('pages.loyalty_program.exchange_points_for_free_product', { points: this.prize.data.cost_points }))), h("button", { onClick: () => this.handleClick() }, h("span", { innerHTML: SIGift }), h("span", null, salla.lang.get('pages.loyalty_program.exchange_points'))), h("salla-modal", { ref: modal => this.exchangeModal = modal, width: "sm" }, !this.prize.data ? '' : h("salla-reward-exchange", { productId: Number(this.productId), prize: this.prize.data }))));
|
|
48
|
-
}
|
|
49
|
-
get host() { return getElement(this); }
|
|
50
|
-
};
|
|
51
|
-
__decorate([
|
|
52
|
-
TrackedPromise(async function () {
|
|
53
|
-
if (!(salla.config.get('store.features') || []).includes('loyalty-system')) {
|
|
54
|
-
return Promise.reject('Loyalty system is not enabled for merchant');
|
|
55
|
-
}
|
|
56
|
-
const { loyalty_prize } = await salla.product.api.getDetails(this.productId);
|
|
57
|
-
if (!loyalty_prize) {
|
|
58
|
-
return Promise.reject('no loyalty prize for this product');
|
|
59
|
-
}
|
|
60
|
-
return loyalty_prize;
|
|
61
|
-
})
|
|
62
|
-
], SallaLoyaltyBanner.prototype, "prize", void 0);
|
|
63
|
-
SallaLoyaltyBanner.style = sallaLoyaltyProgramCss;
|
|
64
|
-
|
|
65
|
-
export { SallaLoyaltyBanner as salla_loyalty_banner };
|