@salla.sa/twilight-components 2.14.576 → 2.14.577
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-pMiRtx1x.js → filepond-iflxa4A5.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DxsZ8Mch.js → filepond-plugin-file-poster-NZ84xlKh.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-B6fa4wXz.js → filepond-plugin-file-validate-size-m8Z_JlZX.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BEggFpci.js → filepond-plugin-file-validate-type-BfF6LYAT.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BDwSySal.js → filepond-plugin-image-edit-DfRJ3iRj.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-HE8n94tY.js → filepond-plugin-image-exif-orientation-BZxYZai-.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C-CaMrlm.js → filepond-plugin-image-preview-BQ7HvH2d.js} +1 -1
- package/dist/cjs/{helpers-Dm4BirHO.js → helpers-DBynEhOO.js} +0 -15
- package/dist/cjs/{index-B3IyDlYG.js → index-CSe-ijAV.js} +2 -2
- package/dist/cjs/{intlTelInput-CeiHZwpn.js → intlTelInput-DHfYz8vv.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +3 -3
- package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +3 -3
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +17 -17
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +179 -187
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +160 -7
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +4 -4
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +2 -2
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +2 -2
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +3 -3
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +3 -3
- package/dist/cjs/salla-hook.cjs.entry.js +2 -2
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +2 -2
- package/dist/cjs/salla-localization-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +15 -15
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +2 -2
- package/dist/cjs/salla-map_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +4 -4
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -6
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +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 +2 -2
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +3 -3
- package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +2 -2
- package/dist/cjs/salla-product-card.cjs.entry.js +6 -6
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +2 -2
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search-product-card.cjs.entry.js +3 -3
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
- package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DBIBI2Jr.js → vanilla-picker-Brk9Mb54.js} +1 -1
- package/dist/collection/assets/svg/mini-map.svg +6 -30
- package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +241 -238
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +175 -146
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.css +154 -92
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +160 -5
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -1
- package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -1
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -1
- package/dist/collection/components/salla-count-down/salla-count-down.js +1 -1
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +2 -2
- package/dist/collection/components/salla-filters/salla-filters.js +1 -1
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
- package/dist/collection/components/salla-gifting/salla-gifting.js +2 -2
- package/dist/collection/components/salla-hook/salla-hook.js +1 -1
- package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
- package/dist/collection/components/salla-loading/salla-loading.js +1 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
- package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.js +1 -1
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-exchange-product-card.js +2 -2
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-hero.js +3 -3
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-point.js +4 -4
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +2 -2
- package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +1 -1
- package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +3 -3
- package/dist/collection/components/salla-loyalty-program/salla-reward-exchange.js +1 -1
- package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
- package/dist/collection/components/salla-map/salla-map.js +3 -3
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +1 -1
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
- package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
- package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
- package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.js +1 -1
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
- package/dist/collection/components/salla-payments/salla-payments.js +2 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
- package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
- package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
- package/dist/collection/components/salla-product-card-embed/salla-product-card-embed.js +1 -1
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-search-product-card/salla-search-product-card.js +2 -2
- package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
- package/dist/components/helpers.js +1 -15
- package/dist/components/index.js +2 -2
- package/dist/components/salla-accordion-head2.js +2 -2
- package/dist/components/salla-bullet-delivery.js +175 -184
- package/dist/components/salla-cart-coupons.js +161 -6
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-color-picker2.js +1 -1
- package/dist/components/salla-comment-form2.js +1 -1
- package/dist/components/salla-conditional-fields2.js +1 -1
- package/dist/components/salla-count-down2.js +1 -1
- package/dist/components/salla-datetime-picker2.js +1 -1
- package/dist/components/salla-delivery-promise.js +1 -1
- package/dist/components/salla-file-upload2.js +2 -2
- package/dist/components/salla-filters-widget2.js +2 -2
- package/dist/components/salla-filters.js +1 -1
- package/dist/components/salla-gifting.js +2 -2
- package/dist/components/salla-hook.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 +1 -1
- package/dist/components/salla-loyalty-exchange-product-card2.js +2 -2
- package/dist/components/salla-loyalty-hero2.js +3 -3
- package/dist/components/salla-loyalty-point2.js +4 -4
- package/dist/components/salla-loyalty-points-history.js +1 -1
- package/dist/components/salla-loyalty-prize-item.js +1 -1
- package/dist/components/salla-loyalty-reward.js +2 -2
- package/dist/components/salla-maintenance-alert.js +1 -1
- package/dist/components/salla-map2.js +3 -3
- package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
- package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
- package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
- package/dist/components/salla-multiple-bundle-product.js +1 -1
- package/dist/components/salla-notification-item2.js +1 -1
- package/dist/components/salla-offer-modal.js +1 -1
- package/dist/components/salla-order-details.js +1 -1
- package/dist/components/salla-order-edit-product-card.js +1 -1
- package/dist/components/salla-order-summary.js +1 -1
- package/dist/components/salla-payments.js +2 -2
- package/dist/components/salla-placeholder2.js +1 -1
- package/dist/components/salla-price-range2.js +2 -2
- 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 +5 -5
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.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-reward-card2.js +1 -1
- package/dist/components/salla-reward-details2.js +3 -3
- package/dist/components/salla-reward-exchange2.js +1 -1
- package/dist/components/salla-search-product-card2.js +2 -2
- package/dist/components/salla-searchable-dropdown2.js +4 -4
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share2.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-wishlist-actions.js +1 -1
- package/dist/esm/{filepond-C6VyLUVF.js → filepond-Qm94dFPs.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BfFqi2TO.js → filepond-plugin-file-poster-CHpnwHYe.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BBqb56CB.js → filepond-plugin-file-validate-size-BwHBxxMg.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-O67G3mL2.js → filepond-plugin-file-validate-type-BD-yTEPO.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CGZyNJxN.js → filepond-plugin-image-edit-DKc0Yw10.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DA7fGQP3.js → filepond-plugin-image-exif-orientation-CepmNFGF.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BijvA1XW.js → filepond-plugin-image-preview-FhnzagMd.js} +1 -1
- package/dist/esm/{helpers-CV6uPJEJ.js → helpers-BJxBnTgv.js} +1 -15
- package/dist/esm/{index-VyEjj_Gx.js → index-BAXTlrSC.js} +2 -2
- package/dist/esm/{intlTelInput-DE-bT5KJ.js → intlTelInput-BJlOPJYY.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +3 -3
- package/dist/esm/salla-accordion_6.entry.js +2 -2
- package/dist/esm/salla-add-product-button_5.entry.js +3 -3
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +17 -17
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +179 -187
- package/dist/esm/salla-cart-coupons.entry.js +160 -7
- package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +4 -4
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +2 -2
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +2 -2
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +3 -3
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +3 -3
- package/dist/esm/salla-hook.entry.js +2 -2
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +2 -2
- package/dist/esm/salla-localization-modal.entry.js +2 -2
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +15 -15
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +3 -3
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +2 -2
- package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +2 -2
- package/dist/esm/salla-map_3.entry.js +4 -4
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +4 -4
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -6
- package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +2 -2
- package/dist/esm/salla-offer-modal.entry.js +2 -2
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +2 -2
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +2 -2
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +2 -2
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +3 -3
- package/dist/esm/salla-placeholder.entry.js +2 -2
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/salla-product-card-embed.entry.js +2 -2
- package/dist/esm/salla-product-card.entry.js +6 -6
- package/dist/esm/salla-product-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.entry.js +2 -2
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search-product-card.entry.js +3 -3
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-social-share.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +2 -2
- package/dist/esm/salla-wishlist-summary.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-BVwvMAEs.js → vanilla-picker-C_cY41gl.js} +1 -1
- package/dist/twilight/{p-f7063e39.entry.js → p-00a727c3.entry.js} +1 -1
- package/dist/twilight/{p-0987a1bf.entry.js → p-0227316e.entry.js} +1 -1
- package/dist/twilight/{p-4bcf0187.entry.js → p-03c959bb.entry.js} +1 -1
- package/dist/twilight/{p-e2d0eb4c.entry.js → p-072ee78f.entry.js} +1 -1
- package/dist/twilight/{p-f291fd6b.entry.js → p-073e1363.entry.js} +1 -1
- package/dist/twilight/{p-cbaa45a4.entry.js → p-0806da7e.entry.js} +1 -1
- package/dist/twilight/{p-c6e6daf9.entry.js → p-08cedab0.entry.js} +1 -1
- package/dist/twilight/{p-f7f35e00.entry.js → p-0bcca7f8.entry.js} +1 -1
- package/dist/twilight/{p-565f021e.entry.js → p-10a68a21.entry.js} +1 -1
- package/dist/twilight/{p-d4466357.entry.js → p-13abf9ca.entry.js} +1 -1
- package/dist/twilight/{p-a4ba6008.entry.js → p-13c35685.entry.js} +1 -1
- package/dist/twilight/{p-63a287b4.entry.js → p-162fa48e.entry.js} +1 -1
- package/dist/twilight/{p-38f82c85.entry.js → p-1762fd86.entry.js} +1 -1
- package/dist/twilight/{p-a2bf4487.entry.js → p-18c41e9a.entry.js} +1 -1
- package/dist/twilight/{p-76843521.entry.js → p-1fbb0b22.entry.js} +1 -1
- package/dist/twilight/{p-d0445027.entry.js → p-1fd6a10e.entry.js} +1 -1
- package/dist/twilight/p-28cdaf6b.entry.js +4 -0
- package/dist/twilight/{p-15fd28e8.entry.js → p-292a0b4a.entry.js} +1 -1
- package/dist/twilight/{p-9eebb417.entry.js → p-2ba4956f.entry.js} +1 -1
- package/dist/twilight/{p-faa90387.entry.js → p-2c543420.entry.js} +1 -1
- package/dist/twilight/{p-d59a53f5.entry.js → p-2e3a56de.entry.js} +1 -1
- package/dist/twilight/p-2e4064eb.entry.js +4 -0
- package/dist/twilight/{p-4abd6abc.entry.js → p-3153f560.entry.js} +1 -1
- package/dist/twilight/{p-55469fd9.entry.js → p-3a3815a2.entry.js} +1 -1
- package/dist/twilight/{p-63af5354.entry.js → p-3cef6be2.entry.js} +1 -1
- package/dist/twilight/{p-bc1251f6.entry.js → p-3dd612a6.entry.js} +1 -1
- package/dist/twilight/{p-95494a3d.entry.js → p-411c1ab0.entry.js} +1 -1
- package/dist/twilight/p-423d852d.entry.js +4 -0
- package/dist/twilight/{p-d5d8230d.entry.js → p-44a6598e.entry.js} +1 -1
- package/dist/twilight/{p-f889b4d2.entry.js → p-51d83216.entry.js} +1 -1
- package/dist/twilight/{p-354f6595.entry.js → p-51fb8841.entry.js} +1 -1
- package/dist/twilight/{p-82186e1c.entry.js → p-56609a91.entry.js} +1 -1
- package/dist/twilight/{p-f265b4ea.entry.js → p-58c1bf51.entry.js} +1 -1
- package/dist/twilight/{p-10da5fab.entry.js → p-59a7ca2e.entry.js} +1 -1
- package/dist/twilight/{p-c032ca19.entry.js → p-5a77257c.entry.js} +1 -1
- package/dist/twilight/{p-c1f9932b.entry.js → p-5c4e2ed3.entry.js} +1 -1
- package/dist/twilight/{p-2438d7e1.entry.js → p-5f464161.entry.js} +1 -1
- package/dist/twilight/{p-58398f44.entry.js → p-637670fa.entry.js} +1 -1
- package/dist/twilight/{p-80cf8042.entry.js → p-6605f258.entry.js} +1 -1
- package/dist/twilight/{p-ca7cd467.entry.js → p-665bc308.entry.js} +1 -1
- package/dist/twilight/{p-55afe19f.entry.js → p-6bfe12d5.entry.js} +1 -1
- package/dist/twilight/{p-b06b0973.entry.js → p-6de608eb.entry.js} +1 -1
- package/dist/twilight/{p-a291f319.entry.js → p-6f9bc285.entry.js} +1 -1
- package/dist/twilight/{p-85d5c0b6.entry.js → p-70451662.entry.js} +1 -1
- package/dist/twilight/{p-9417b38b.entry.js → p-7b0cf8a1.entry.js} +1 -1
- package/dist/twilight/{p-b35956cc.entry.js → p-7d08dcfb.entry.js} +1 -1
- package/dist/twilight/{p-ec378cee.entry.js → p-7d37b650.entry.js} +1 -1
- package/dist/twilight/{p-7d4c9e95.entry.js → p-7f3e110c.entry.js} +1 -1
- package/dist/twilight/{p-ceae3b17.entry.js → p-80302c52.entry.js} +1 -1
- package/dist/twilight/{p-47ddfc87.entry.js → p-806083b4.entry.js} +1 -1
- package/dist/twilight/{p-bb2c9ac9.entry.js → p-84cff600.entry.js} +1 -1
- package/dist/twilight/{p-66be47ec.entry.js → p-884104a3.entry.js} +1 -1
- package/dist/twilight/{p-140bf9e1.entry.js → p-898ce93b.entry.js} +1 -1
- package/dist/twilight/{p-90033ecc.entry.js → p-8a865d37.entry.js} +1 -1
- package/dist/twilight/{p-08bcc8c6.entry.js → p-8c750736.entry.js} +1 -1
- package/dist/twilight/{p-6c4d3288.entry.js → p-8fc2eb01.entry.js} +1 -1
- package/dist/twilight/{p-02df3435.entry.js → p-97fee81d.entry.js} +1 -1
- package/dist/twilight/{p-c95f4657.entry.js → p-9920bbad.entry.js} +1 -1
- package/dist/twilight/{p-237ee8db.entry.js → p-99b9bf66.entry.js} +1 -1
- package/dist/twilight/{p-dcba291c.entry.js → p-9b4a0dd3.entry.js} +1 -1
- package/dist/twilight/{p-b7e14e40.entry.js → p-9e054110.entry.js} +1 -1
- package/dist/twilight/{p-VyEjj_Gx.js → p-BAXTlrSC.js} +1 -1
- package/dist/twilight/p-BJxBnTgv.js +4 -0
- package/dist/twilight/{p-MofCSty6.js → p-BWpg3MwW.js} +1 -1
- package/dist/twilight/{p-CVE_4GIW.js → p-C6WaobtY.js} +1 -1
- package/dist/twilight/p-CvebbG3m.js +9 -0
- package/dist/twilight/{p-k8NfWBBa.js → p-D5lNzFgl.js} +1 -1
- package/dist/twilight/{p-Dht_HSXg.js → p-DGzNHmGp.js} +2 -2
- package/dist/twilight/{p-XWoqFS1d.js → p-DnrvXyI6.js} +1 -1
- package/dist/twilight/{p-BqBflUu5.js → p-DpI1J-G1.js} +1 -1
- package/dist/twilight/{p-DtngMbK9.js → p-SguJQlDo.js} +1 -1
- package/dist/twilight/{p-BZQPZ7Vk.js → p-_f6GlygH.js} +1 -1
- package/dist/twilight/{p-22efe055.entry.js → p-a2d07dba.entry.js} +1 -1
- package/dist/twilight/{p-a5dc1d5e.entry.js → p-a73a785d.entry.js} +1 -1
- package/dist/twilight/{p-b930b2ba.entry.js → p-a79c04a2.entry.js} +1 -1
- package/dist/twilight/{p-9df6ef40.entry.js → p-a9fcdac5.entry.js} +1 -1
- package/dist/twilight/{p-a185519a.entry.js → p-ab3ad37f.entry.js} +1 -1
- package/dist/twilight/{p-12bcfd57.entry.js → p-abc3e5d5.entry.js} +1 -1
- package/dist/twilight/{p-e6803d06.entry.js → p-b356f3f6.entry.js} +1 -1
- package/dist/twilight/{p-c593919c.entry.js → p-b55fb51b.entry.js} +1 -1
- package/dist/twilight/{p-1b2ce7bb.entry.js → p-bb35af04.entry.js} +1 -1
- package/dist/twilight/{p-f12fc91c.entry.js → p-bf845ea7.entry.js} +1 -1
- package/dist/twilight/{p-19c39465.entry.js → p-c2e871ae.entry.js} +1 -1
- package/dist/twilight/{p-9a0ad6b4.entry.js → p-c38fb150.entry.js} +1 -1
- package/dist/twilight/{p-b9e85434.entry.js → p-c63ff8ef.entry.js} +1 -1
- package/dist/twilight/{p-724be00d.entry.js → p-c90600b1.entry.js} +1 -1
- package/dist/twilight/{p-b3a36e11.entry.js → p-cc1b3318.entry.js} +1 -1
- package/dist/twilight/{p-a990b069.entry.js → p-ce1d3ad9.entry.js} +1 -1
- package/dist/twilight/{p-9f485845.entry.js → p-ce80fb8f.entry.js} +1 -1
- package/dist/twilight/{p-88918b1b.entry.js → p-d3556d1f.entry.js} +1 -1
- package/dist/twilight/{p-85a81ddd.entry.js → p-d3cf9f8a.entry.js} +1 -1
- package/dist/twilight/{p-f1d0d4da.entry.js → p-dd18ac5c.entry.js} +1 -1
- package/dist/twilight/p-dda4d231.entry.js +4 -0
- package/dist/twilight/{p-7ef406e5.entry.js → p-e0d834a7.entry.js} +1 -1
- package/dist/twilight/{p-09ab0b69.entry.js → p-e4ff7a77.entry.js} +1 -1
- package/dist/twilight/{p-2d43aaae.entry.js → p-e66856c5.entry.js} +1 -1
- package/dist/twilight/{p-bb83242c.entry.js → p-e7c4d4cc.entry.js} +1 -1
- package/dist/twilight/{p-70577d8b.entry.js → p-e944f02a.entry.js} +1 -1
- package/dist/twilight/{p-915965eb.entry.js → p-e95fd91e.entry.js} +1 -1
- package/dist/twilight/{p-6d46f977.entry.js → p-ea7846fd.entry.js} +1 -1
- package/dist/twilight/{p-29bc507d.entry.js → p-f0ca37fc.entry.js} +1 -1
- package/dist/twilight/{p-2aa87b3c.entry.js → p-f2e13d28.entry.js} +1 -1
- package/dist/twilight/{p-370939c2.entry.js → p-f514b9f5.entry.js} +1 -1
- package/dist/twilight/p-fa6f2b27.entry.js +4 -0
- package/dist/twilight/{p-a8f4fa9e.entry.js → p-faadae59.entry.js} +1 -1
- package/dist/twilight/{p-7f38bccf.entry.js → p-fc500047.entry.js} +1 -1
- package/dist/twilight/p-fdc97278.entry.js +4 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +6 -0
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +25 -12
- package/dist/types/components/salla-cart-coupons/interfaces.d.ts +20 -0
- package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +49 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +5 -5
- package/dist/twilight/p-26105855.entry.js +0 -4
- package/dist/twilight/p-4198d092.entry.js +0 -4
- package/dist/twilight/p-BB5KMFvk.js +0 -9
- package/dist/twilight/p-CV6uPJEJ.js +0 -4
- package/dist/twilight/p-c63be3cf.entry.js +0 -4
- package/dist/twilight/p-d6c4c0f7.entry.js +0 -4
- package/dist/twilight/p-f059fb37.entry.js +0 -4
- package/dist/twilight/p-fe8cb1d6.entry.js +0 -4
|
@@ -17,6 +17,20 @@ export class SallaCartCoupons {
|
|
|
17
17
|
// - Multi-coupon (features::multi_coupon on): holds every applied code,
|
|
18
18
|
// sourced from the cart's `coupons` array so it survives a page refresh.
|
|
19
19
|
this.appliedCoupons = [];
|
|
20
|
+
// CP-3695: the unified list actually rendered — applied coupons and checkout coupons joined
|
|
21
|
+
// on `code`, so a coupon that is both no longer appears twice (once as a chip, once as a card).
|
|
22
|
+
// Derived from appliedCoupons + availableCoupons by buildMergedCoupons(); never fetched.
|
|
23
|
+
this.mergedCoupons = [];
|
|
24
|
+
// CP-3695: card data for the APPLIED coupons, straight off the cart payload
|
|
25
|
+
// (`applied_coupons`). It covers the ones the checkout-coupons endpoint never returns — a
|
|
26
|
+
// manually typed code, or one with show_checkout_coupon = 0 — which would otherwise have no
|
|
27
|
+
// amount, expiry or minimum and could only be drawn as a bare code. Absent on an older
|
|
28
|
+
// backend, in which case those coupons keep falling back to the code-only card.
|
|
29
|
+
this.appliedCouponCards = [];
|
|
30
|
+
// False until the shopper acts on the list. While false, buildMergedCoupons() is free to sort
|
|
31
|
+
// applied-first — that is how the row settles on load and after a reload. Once true the order
|
|
32
|
+
// is held, so tapping a card never shifts its neighbours.
|
|
33
|
+
this.orderLocked = false;
|
|
20
34
|
// Whether the store has multi-coupon enabled. Read ONCE from the store config
|
|
21
35
|
// (Salla.config.get('store.settings.cart.multi_coupon')) — a stable store-level setting,
|
|
22
36
|
// exactly like cart.apply_coupon_enabled — not from the per-cart payload or localStorage.
|
|
@@ -151,6 +165,8 @@ export class SallaCartCoupons {
|
|
|
151
165
|
// No coupons available on error
|
|
152
166
|
this.availableCoupons = [];
|
|
153
167
|
}
|
|
168
|
+
// Half the unified list just arrived — rejoin it against whatever the cart already gave us.
|
|
169
|
+
this.buildMergedCoupons();
|
|
154
170
|
}
|
|
155
171
|
async loadCartTotal() {
|
|
156
172
|
// seedFromStorage() already gave the first paint an instant (possibly stale) total, so a
|
|
@@ -239,6 +255,13 @@ export class SallaCartCoupons {
|
|
|
239
255
|
this.appliedCoupons = Array.isArray(cart?.coupons)
|
|
240
256
|
? cart.coupons.filter(Boolean)
|
|
241
257
|
: (this.currentCoupon ? [this.currentCoupon] : []);
|
|
258
|
+
// The payload sends `applied_coupons` keyed BY CODE, which is the useful shape for a
|
|
259
|
+
// lookup; a plain list is accepted too so neither side depends on the other's choice.
|
|
260
|
+
const cards = cart?.applied_coupons;
|
|
261
|
+
this.appliedCouponCards = Array.isArray(cards)
|
|
262
|
+
? cards.filter(Boolean)
|
|
263
|
+
: (cards && typeof cards === 'object' ? Object.values(cards).filter(Boolean) : []);
|
|
264
|
+
this.buildMergedCoupons();
|
|
242
265
|
return;
|
|
243
266
|
}
|
|
244
267
|
// Single-coupon (flag off): mirror the applied code into the (disabled) input, matching the
|
|
@@ -246,6 +269,75 @@ export class SallaCartCoupons {
|
|
|
246
269
|
// keystroke, so it won't clobber what the user is typing.
|
|
247
270
|
this.couponInputValue = this.currentCoupon;
|
|
248
271
|
this.appliedCoupons = this.currentCoupon ? [this.currentCoupon] : [];
|
|
272
|
+
this.buildMergedCoupons();
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* CP-3695: rebuild the unified list from the two sources we already have in memory.
|
|
276
|
+
*
|
|
277
|
+
* Applied coupons come first, in the order the server sent them — `cart.coupons` is already
|
|
278
|
+
* sorted by source tier in `Cart::getCouponCodes()`, so we preserve it rather than re-sort.
|
|
279
|
+
* Unapplied checkout coupons follow in endpoint order.
|
|
280
|
+
*
|
|
281
|
+
* Pure and cheap: a Map build plus one pass over at most 15 coupons (the endpoint's LIMIT),
|
|
282
|
+
* with no network call of its own — both datasets are already loaded for the old two-list UI.
|
|
283
|
+
*/
|
|
284
|
+
buildMergedCoupons() {
|
|
285
|
+
// Single-coupon (flag off) renders the original disabled-input + red-X UX from
|
|
286
|
+
// currentCoupon and never reads this list. Keep it empty so the flag-off path is untouched.
|
|
287
|
+
if (!this.multiCoupon) {
|
|
288
|
+
this.mergedCoupons = [];
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const applied = this.appliedCoupons.filter(Boolean);
|
|
292
|
+
const appliedSet = new Set(applied);
|
|
293
|
+
// OFFERED is the checkout-coupon list alone — what the shopper can still apply. Liveness
|
|
294
|
+
// and the "what else is there" tail both key off this, never off the metadata map below.
|
|
295
|
+
const offered = new Map(this.availableCoupons.map(coupon => [coupon.code, coupon]));
|
|
296
|
+
// Metadata for drawing a card: the offers, plus the payload's card data for applied coupons
|
|
297
|
+
// that are NOT offers. Deliberately kept separate from `offered` — folding these in would
|
|
298
|
+
// leave a removed coupon sitting in the row as something to apply, which it is not.
|
|
299
|
+
const byCode = new Map(offered);
|
|
300
|
+
this.appliedCouponCards.forEach(coupon => {
|
|
301
|
+
if (coupon?.code && !byCode.has(coupon.code)) {
|
|
302
|
+
byCode.set(coupon.code, coupon);
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
// Live codes: everything still worth a card. An applied code that is not an offer is live
|
|
306
|
+
// only while it IS applied — once removed there is nothing behind it, so its card goes away.
|
|
307
|
+
const isLive = (code) => appliedSet.has(code) || offered.has(code);
|
|
308
|
+
const order = this.orderLocked
|
|
309
|
+
? this.mergeIntoLockedOrder(applied, offered, isLive)
|
|
310
|
+
: [
|
|
311
|
+
...applied,
|
|
312
|
+
...this.availableCoupons.map(coupon => coupon.code).filter(code => !appliedSet.has(code)),
|
|
313
|
+
];
|
|
314
|
+
this.mergedCoupons = order.map(code => ({
|
|
315
|
+
code,
|
|
316
|
+
coupon: byCode.get(code) ?? null,
|
|
317
|
+
applied: appliedSet.has(code),
|
|
318
|
+
}));
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Keep the positions the shopper is looking at, and fold in whatever changed:
|
|
322
|
+
* newly applied codes join at the FRONT (they were typed into the input, so no card the
|
|
323
|
+
* shopper could be reaching for moves), late-loading checkout coupons join at the BACK, and
|
|
324
|
+
* codes that went dead drop out.
|
|
325
|
+
*/
|
|
326
|
+
mergeIntoLockedOrder(applied, byCode, isLive) {
|
|
327
|
+
const held = this.mergedCoupons.map(entry => entry.code).filter(isLive);
|
|
328
|
+
const seen = new Set(held);
|
|
329
|
+
const arrivedApplied = applied.filter(code => !seen.has(code));
|
|
330
|
+
arrivedApplied.forEach(code => seen.add(code));
|
|
331
|
+
const arrivedAvailable = [...byCode.keys()].filter(code => !seen.has(code));
|
|
332
|
+
return [...arrivedApplied, ...held, ...arrivedAvailable];
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Freeze the current card order. Called the moment the shopper acts on the list, so applying
|
|
336
|
+
* or removing recolours a card in place instead of sliding the row out from under them.
|
|
337
|
+
* Reset on every mount, which is where applied-first ordering is (re)established.
|
|
338
|
+
*/
|
|
339
|
+
lockOrder() {
|
|
340
|
+
this.orderLocked = true;
|
|
249
341
|
}
|
|
250
342
|
async handleApplyClick() {
|
|
251
343
|
if (this.isApplying) {
|
|
@@ -256,6 +348,7 @@ export class SallaCartCoupons {
|
|
|
256
348
|
this.showCouponError(salla.lang.get('pages.cart.enter_coupon_code'));
|
|
257
349
|
return;
|
|
258
350
|
}
|
|
351
|
+
this.lockOrder();
|
|
259
352
|
this.isApplying = true;
|
|
260
353
|
this.isHandlingInternalError = true;
|
|
261
354
|
try {
|
|
@@ -317,6 +410,7 @@ export class SallaCartCoupons {
|
|
|
317
410
|
if (this.isApplying) {
|
|
318
411
|
return;
|
|
319
412
|
}
|
|
413
|
+
this.lockOrder();
|
|
320
414
|
this.isApplying = true;
|
|
321
415
|
this.isHandlingInternalError = true;
|
|
322
416
|
try {
|
|
@@ -357,6 +451,7 @@ export class SallaCartCoupons {
|
|
|
357
451
|
return; // Silent return for card clicks when operation is already in progress
|
|
358
452
|
}
|
|
359
453
|
}
|
|
454
|
+
this.lockOrder();
|
|
360
455
|
// Update the input field with the coupon code
|
|
361
456
|
this.couponInputValue = couponCode;
|
|
362
457
|
// Clear any existing errors
|
|
@@ -416,15 +511,64 @@ export class SallaCartCoupons {
|
|
|
416
511
|
}
|
|
417
512
|
return this.cartTotal >= parseFloat(coupon.minimum_amount.amount);
|
|
418
513
|
}
|
|
419
|
-
|
|
514
|
+
/**
|
|
515
|
+
* CP-3695: one card for one entry in the unified list — a checkout coupon, an applied coupon,
|
|
516
|
+
* or both. An applied card is not click-to-apply; only its إلغاء button acts on it.
|
|
517
|
+
*/
|
|
518
|
+
renderCouponCard(entry) {
|
|
519
|
+
const { coupon, applied, code } = entry;
|
|
520
|
+
// An applied code the backend sent without card metadata has nothing to fill a card with.
|
|
521
|
+
if (!coupon) {
|
|
522
|
+
return this.renderMinimalCard(code);
|
|
523
|
+
}
|
|
420
524
|
const isEligible = this.isEligible(coupon);
|
|
525
|
+
const isDisabled = !applied && (!isEligible || this.isApplying);
|
|
421
526
|
// Note: Card notches (ticket-style pseudo-elements) match card background, not page background - this is intentional design
|
|
422
|
-
return (h("div", { class: "s-cart-coupons-slide-one-fourth swiper-slide" }, h("div", { class: `s-cart-coupons-card ${
|
|
527
|
+
return (h("div", { class: "s-cart-coupons-slide-one-fourth swiper-slide" }, h("div", { class: `s-cart-coupons-card ${applied ? 's-cart-coupons-card--applied' : ''} ${isDisabled ? 's-cart-coupons-disabled' : ''}`, onClick: () => !applied && isEligible && !this.isApplying && this.handleCouponClick(coupon) }, h("div", { class: "s-cart-coupons-top-section" }, h("div", { class: "s-cart-coupons-discount-values" }, h("div", { class: "s-cart-coupons-main-amount" }, this.formatMainAmount(coupon)), coupon.free_shipping ? (h("div", { class: "s-cart-coupons-secondary-info" }, "+ ", salla.lang.get('pages.cart.free_shipping'))) : coupon.maximum_amount && (h("div", { class: "s-cart-coupons-secondary-info" }, salla.lang.get('pages.cart.up_to'), " ", h("span", { innerHTML: salla.money(coupon.maximum_amount.amount, coupon.maximum_amount.currency) })))), h("div", { class: "s-cart-coupons-code" }, coupon.code)), h("div", { class: "s-cart-coupons-divider" }), h("div", { class: "s-cart-coupons-bottom-section" }, h("div", { class: "s-cart-coupons-terms" }, coupon.remaining_days !== undefined && coupon.remaining_days !== null && (h("div", { class: `s-cart-coupons-expiry ${coupon.remaining_days <= 3 ? 's-cart-coupons-expiry-warning' : ''}` }, coupon.remaining_days === 0
|
|
423
528
|
? salla.lang.get('pages.cart.expires_today')
|
|
424
|
-
: `${salla.lang.get('pages.cart.expires_after')} ${coupon.remaining_days} ${salla.lang.get('pages.cart.day')}`)), coupon.minimum_amount && parseFloat(coupon.minimum_amount.amount) > 0 && (h("div", { class: "s-cart-coupons-minimum" }, salla.lang.get('pages.cart.minimum'), " ", h("span", { innerHTML: salla.money(coupon.minimum_amount.amount, coupon.minimum_amount.currency) })))), h("div", { class: "s-cart-coupons-action" },
|
|
529
|
+
: `${salla.lang.get('pages.cart.expires_after')} ${coupon.remaining_days} ${salla.lang.get('pages.cart.day')}`)), coupon.minimum_amount && parseFloat(coupon.minimum_amount.amount) > 0 && (h("div", { class: "s-cart-coupons-minimum" }, salla.lang.get('pages.cart.minimum'), " ", h("span", { innerHTML: salla.money(coupon.minimum_amount.amount, coupon.minimum_amount.currency) })))), h("div", { class: "s-cart-coupons-action" }, applied
|
|
530
|
+
? this.renderAppliedAction(code)
|
|
531
|
+
: (isEligible ? salla.lang.get('pages.cart.save_coupon') : salla.lang.get('pages.cart.coupon_not_compatible')))))));
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* The applied footer: a "مُطبق" state label plus the إلغاء control that replaces the old
|
|
535
|
+
* chip's X. stopPropagation keeps the click off the card, which would otherwise re-apply.
|
|
536
|
+
*/
|
|
537
|
+
renderAppliedAction(code) {
|
|
538
|
+
return [
|
|
539
|
+
h("span", { class: "s-cart-coupons-card-applied-label" }, salla.lang.get('pages.cart.coupon_applied')),
|
|
540
|
+
h("button", { type: "button", class: "s-cart-coupons-card-remove", "aria-label": `${salla.lang.get('pages.cart.delete_coupon')} ${code}`, disabled: this.isApplying, onClick: event => {
|
|
541
|
+
event.stopPropagation();
|
|
542
|
+
this.removeCoupon(code);
|
|
543
|
+
} }, salla.lang.get('pages.cart.cancel')),
|
|
544
|
+
];
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Card for an applied code with no metadata (typed by hand, or show_checkout_coupon = 0):
|
|
548
|
+
* the code and the remove control, nothing invented. Always applied — an unapplied code
|
|
549
|
+
* with no offer behind it has nothing to show, so buildMergedCoupons drops it.
|
|
550
|
+
*/
|
|
551
|
+
renderMinimalCard(code) {
|
|
552
|
+
return (h("div", { class: "s-cart-coupons-slide-one-fourth swiper-slide" }, h("div", { class: "s-cart-coupons-card s-cart-coupons-card--applied s-cart-coupons-card--minimal" }, h("div", { class: "s-cart-coupons-top-section" }, h("div", { class: "s-cart-coupons-code s-cart-coupons-code--only" }, code)), h("div", { class: "s-cart-coupons-divider" }), h("div", { class: "s-cart-coupons-bottom-section" }, h("div", { class: "s-cart-coupons-action" }, this.renderAppliedAction(code))))));
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* What the card row renders. Multi-coupon reads the unified list; single-coupon keeps its
|
|
556
|
+
* original behaviour by wrapping the raw checkout coupons as never-applied entries, so that
|
|
557
|
+
* path renders exactly the markup it did before CP-3695.
|
|
558
|
+
*/
|
|
559
|
+
couponRow() {
|
|
560
|
+
if (this.multiCoupon) {
|
|
561
|
+
return this.mergedCoupons;
|
|
562
|
+
}
|
|
563
|
+
return (this.availableCoupons || []).map(coupon => ({
|
|
564
|
+
code: coupon.code,
|
|
565
|
+
coupon,
|
|
566
|
+
applied: false,
|
|
567
|
+
}));
|
|
425
568
|
}
|
|
426
569
|
render() {
|
|
427
|
-
|
|
570
|
+
const couponRow = this.couponRow();
|
|
571
|
+
return (h(Host, { key: 'e756434a2f77235e870891ce7e0b672a69429e49' }, h("div", { key: 'ca86866dc7275c98f72c2bc4c95684826e2a94d0', class: "s-cart-coupons-wrapper" }, h("div", { key: '8c37273ea0e40cad320ac148d82eeea2774ba18d', class: "s-cart-coupons-input-section" }, h("label", { key: '8495bff14cae70f530c648e49cac76bd57ec4429', htmlFor: "coupon-input", class: "s-cart-coupons-coupon-label" }, salla.lang.get('pages.cart.have_coupon')), h("div", { key: '5e6d10ab653561c33e73829f9259fe3037eab8e7', class: "s-cart-coupons-coupon-input-container" }, this.multiCoupon ? [
|
|
428
572
|
// Multi-coupon: input stays active to append more codes; applied coupons render
|
|
429
573
|
// as removable chips below.
|
|
430
574
|
h("input", { type: "text", id: "coupon-input", name: "coupon", class: `form-input ${this.couponError ? 's-coupon-input-error' : ''}`, placeholder: salla.lang.get('pages.cart.coupon_placeholder'), value: this.couponInputValue, disabled: this.isApplying, onInput: this.onInput, onKeyUp: this.onKeyUp, "aria-label": salla.lang.get('pages.cart.apply_coupon'), key: "coupon-input" }),
|
|
@@ -435,7 +579,16 @@ export class SallaCartCoupons {
|
|
|
435
579
|
// a new code can only be entered after removing. Reuses the existing master classes.
|
|
436
580
|
h("input", { type: "text", id: "coupon-input", name: "coupon", class: `form-input ${this.couponError ? 's-coupon-input-error' : ''}`, placeholder: salla.lang.get('pages.cart.coupon_placeholder'), value: this.couponInputValue, disabled: !!this.currentCoupon || this.isApplying, onInput: this.onInput, onKeyUp: this.onKeyUp, "aria-label": salla.lang.get('pages.cart.apply_coupon'), key: "coupon-input" }),
|
|
437
581
|
h("salla-button", { ref: el => this.couponButtonRef = el, class: `s-cart-coupons-coupon-button ${this.currentCoupon ? 's-cart-coupons-coupon-button-remove' : 's-cart-coupons-coupon-button-apply'}`, color: this.currentCoupon ? 'danger' : 'primary', loading: this.isApplying, "loader-position": "center", onClick: () => this.handleCouponButtonClick(), key: "apply-button" }, this.currentCoupon ? (h("i", { class: "sicon-cancel" })) : (h("span", null, salla.lang.get('pages.cart.save_coupon')))),
|
|
438
|
-
]), this.couponError && (h("span", { key: '
|
|
582
|
+
]), this.couponError && (h("span", { key: '5f7ff489d561f440e643c62c0d238a059f94ff2e', class: "s-cart-coupons-coupon-error" }, this.couponError))), couponRow.length > 0 && (h("salla-slider", { type: "carousel", showControls: false, class: "s-cart-coupons-slider",
|
|
583
|
+
/* salla-slider hands its slot children to Swiper, which MOVES them out of the
|
|
584
|
+
`slot="items"` div into its own .swiper-wrapper. Stencil then patches against a
|
|
585
|
+
tree that no longer exists where it expects, so a slide added to a list that
|
|
586
|
+
grew (e.g. applying a coupon the endpoint never returned) is appended to the
|
|
587
|
+
detached parent and never reaches the page — the component's own docs warn
|
|
588
|
+
against dynamic custom components inside it. Keying on the exact code list
|
|
589
|
+
makes Stencil discard and remount the slider whenever the set changes, so
|
|
590
|
+
Swiper re-initialises over the full, correct set of slides. */
|
|
591
|
+
key: couponRow.map(entry => entry.code).join('|') }, h("div", { key: '5b811515254595fcde9a364b113b60d38048e2c0', slot: "items" }, couponRow.map(entry => this.renderCouponCard(entry))))))));
|
|
439
592
|
}
|
|
440
593
|
static get is() { return "salla-cart-coupons"; }
|
|
441
594
|
static get originalStyleUrls() {
|
|
@@ -458,6 +611,8 @@ export class SallaCartCoupons {
|
|
|
458
611
|
"couponError": {},
|
|
459
612
|
"isApplying": {},
|
|
460
613
|
"appliedCoupons": {},
|
|
614
|
+
"mergedCoupons": {},
|
|
615
|
+
"appliedCouponCards": {},
|
|
461
616
|
"multiCoupon": {}
|
|
462
617
|
};
|
|
463
618
|
}
|
|
@@ -118,7 +118,7 @@ export class SallaCartSummary {
|
|
|
118
118
|
return cartUrl;
|
|
119
119
|
}
|
|
120
120
|
render() {
|
|
121
|
-
return (h(Host, { key: '
|
|
121
|
+
return (h(Host, { key: '80544f74203447490842d9ef9519ba3013fe0d02' }, h("a", { key: 'd769586f49b37a079653587d990871cb3ffe6542', class: "s-cart-summary-wrapper", href: this.getCartLink(), onClick: this.handleCheckoutClick }, h("div", { key: 'ad1833c7562138c211def82a365a89216157db20', id: "s-cart-icon" }, h("slot", { key: 'a5d60463eb9f023ffed29586a94d3b5feaf586c8', name: "icon" }, h("i", { key: '64a0c861706a05edc9057b1692d33945306958c0', class: "s-cart-summary-icon", innerHTML: CartIcon }))), h("span", { key: '6781086462fdb3e9910d9d32bd53014345c7148b', class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), h("p", { key: '04dd5019a64ac99153b843ec2cff9103cf247c6a', class: "s-cart-summary-content" }, this.showCartLabel && h("span", { key: '2625556cc87729a72eb9ab455e3274a24c1738fa', class: "s-cart-summary-label" }, this.cartLabel), h("b", { key: '97a1a1911d6e18f9dde89437bd8749553ce8d35c', class: "s-cart-summary-total", innerHTML: salla.money(this.cartSummaryTotal) })))));
|
|
122
122
|
}
|
|
123
123
|
static get is() { return "salla-cart-summary"; }
|
|
124
124
|
static get originalStyleUrls() {
|
|
@@ -198,7 +198,7 @@ export class SallaColorPicker {
|
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
render() {
|
|
201
|
-
return (h(Host, { key: '
|
|
201
|
+
return (h(Host, { key: 'b0ddc9c457300b40e5e64a54aa13e38f46106dd8', class: "s-color-picker-main" }, h("slot", { key: '409622ef888a6fda18a44406b28bdb1a37abced7', name: "widget" }, h("div", { key: '53f2a7135429a3aea05efc69bb66b4dde470b8e0', class: "s-color-picker-widget" }, h("div", { key: '715cdf2d6a310f7d2add7f155a6db932a2e670c8', class: "s-color-picker-widget-canvas", ref: dv => (this.canvas = dv) }), h("span", { key: '95ea57b71b1352c1d3801efcf60475d17157056a', innerHTML: ArrowDown }))), h("input", { key: 'e25c80f98c10d9006d16c28af9d799896a1b5e07', class: "s-hidden", name: this.name, required: this.required, value: this.color, ref: color => (this.colorInput = color) })));
|
|
202
202
|
}
|
|
203
203
|
componentDidLoad() {
|
|
204
204
|
if (this.canvas)
|
|
@@ -38,7 +38,7 @@ export class SallaCommentForm {
|
|
|
38
38
|
.finally(() => this.submitBtn.stop());
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '16f5113a8345c31dce2f8302bcb5a5fba62e91c3' }, !!this.canComment ? h("form", { ref: frm => this.commentForm = frm }, h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
|
|
42
42
|
h("img", { class: "s-comment-form-avatar", src: salla.config.get('user.avatar'), alt: "user avatar" }) : '', h("div", { class: "s-comment-form-content" }, h("textarea", { cols: 30, rows: 5, minlength: "4", maxlength: "500", ref: field => this.commentField = field, placeholder: this.placeholder, class: "s-comment-form-input", required: true }), h("br", null), h("div", { class: "s-comment-form-action" }, h("salla-button", { ref: btn => this.submitBtn = btn, "loader-position": 'center', onClick: () => this.submit() }, this.submitText))))) : ''));
|
|
43
43
|
}
|
|
44
44
|
static get is() { return "salla-comment-form"; }
|
|
@@ -129,7 +129,7 @@ export class SallaConditionalFields {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: '86fa0b22ebc38b3f214e6f9b95fdfca2138a52b6' }, h("slot", { key: '5f128ba45c9c8029ae9c8f6163f7afa277f4f185' })));
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "salla-conditional-fields"; }
|
|
135
135
|
static get elementRef() { return "host"; }
|
|
@@ -229,7 +229,7 @@ export class SallaCountDown {
|
|
|
229
229
|
return this.renderCountDown();
|
|
230
230
|
}
|
|
231
231
|
render() {
|
|
232
|
-
return (h(Host, { key: '
|
|
232
|
+
return (h(Host, { key: 'a16b6dc8c000eea39b990588995b07d6361231b2', class: `s-count-down-wrapper ${this.preOrder && this.isValidDate(this.date) ? 's-count-down-pre-order' : ''} ${this.horizontal ? 's-count-down-horizontal' : ''} ${this.withButton ? 's-count-down-with-button' : ''} ${this.offerEnded ? 's-count-down-ended' : ''}` }, this.renderPrefixText(), this.renderContent(), this.offerEnded && this.renderOfferEnded(), this.renderButton()));
|
|
233
233
|
}
|
|
234
234
|
static get is() { return "salla-count-down"; }
|
|
235
235
|
static get originalStyleUrls() {
|
|
@@ -204,7 +204,7 @@ export class SallaDatetimePicker {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
render() {
|
|
207
|
-
return h("div", { key: '
|
|
207
|
+
return h("div", { key: '64b648c87a1395cc19db863b2ce0cfbabf647561', class: "s-datetime-picker" }, h("input", { key: '87bfdfff27591a2ad83a4edad089420701f11452', type: "datetime", name: this.name, value: this.value, required: this.required, disabled: this.disabled, placeholder: this.placeholder, class: "s-datetime-picker-input", ref: (el) => this.dateInput = el }));
|
|
208
208
|
}
|
|
209
209
|
async componentDidLoad() {
|
|
210
210
|
// Load flatpickr before initializing
|
|
@@ -879,12 +879,12 @@ export class SallaFileUpload {
|
|
|
879
879
|
this.revokeAllPreviewObjectUrls();
|
|
880
880
|
}
|
|
881
881
|
render() {
|
|
882
|
-
return (h(Host, { key: '
|
|
882
|
+
return (h(Host, { key: '851d41cc6012f516488a99f56f9937c14f79bc85', class: {
|
|
883
883
|
"s-file-upload": true,
|
|
884
884
|
"s-file-upload-profile-image": this.profileImage,
|
|
885
885
|
"s-file-upload-multiple": this.allowMultiple,
|
|
886
886
|
"s-file-upload-has-gallery": this.usesGalleryPreview(),
|
|
887
|
-
} }, h("input", { key: '
|
|
887
|
+
} }, h("input", { key: '05902420c0ea6863d8fc010c5a54f40aedeac77b', type: "file", name: this.name, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.getTotalMaxFiles())) : '', h("input", { key: '00b556281810005ea609a7d1cb7d514277453bee', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.getHiddenInputValue(), ref: input => this.hiddenInput = input }), this.renderPreviewGallery()));
|
|
888
888
|
}
|
|
889
889
|
async componentDidLoad() {
|
|
890
890
|
await Salla.onReady();
|
|
@@ -211,7 +211,7 @@ export class SallaFilters {
|
|
|
211
211
|
this.applyFilters();
|
|
212
212
|
}
|
|
213
213
|
render() {
|
|
214
|
-
return h(Host, { key: '
|
|
214
|
+
return h(Host, { key: 'ef7f2cf7241193cb8b2fe24fdb0713d8c92c04c9' }, this.filters?.map(option => h("salla-filters-widget", { option: option, filtersData: this.filtersData, onChanged: ({ detail: { event, option, value } }) => {
|
|
215
215
|
this.handleOptionChange(event, option, value);
|
|
216
216
|
} })));
|
|
217
217
|
}
|
|
@@ -170,12 +170,12 @@ export class SallaFiltersWidget {
|
|
|
170
170
|
return h("span", { class: "s-filters-option-name" }, label);
|
|
171
171
|
}
|
|
172
172
|
render() {
|
|
173
|
-
return (h(Host, { key: '
|
|
173
|
+
return (h(Host, { key: 'd3d9731c163a78609bb1a2f4b01ef6c3db4fc7dc', class: "s-filters-widget-container" }, h("h3", { key: 'bf1c5a033860416035ad7c74f4d9082f4c8de282', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, h("span", { key: '2a94d9a6500b3137900136fd052c731f63b0acae' }, this.option.label), h("span", { key: '69b28fcad8ebc564dbbe907a4eb4044a0ee9d6ad', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { key: 'fa20429b6b3399275eecbcac390d8895c3b01350', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (h("div", { key: '98c869541f0a1d61725048296af6296e603cfa2c', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, h("input", { key: 'f5310cfdad6980e5d991bd03934d5c1a4a014f10', type: "text", class: "s-filters-widget-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder') || 'بحث...', value: this.searchQuery, onInput: (e) => this.searchQuery = e.target.value }))), h("div", { key: '317bb4bcfae88596f8a8737b2454f5f2ecae5b0d', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, h("slot", { key: '8620064a3526e686b95a0c21e39f5b15a8ea3133' }), this.option.type !== FilterOptionTypes.RANGE
|
|
174
174
|
? this.renderFilterOption(this.option)
|
|
175
175
|
: h("salla-price-range", { onChanged: (event) => {
|
|
176
176
|
this.changed.emit(event.detail);
|
|
177
177
|
}, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore && (!this.searchQuery || this.filteredCount > this.initialItemCount) &&
|
|
178
|
-
h("a", { key: '
|
|
178
|
+
h("a", { key: '8c9c93c3579578f1da4fe676d4758c0bbb5b4e21', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
|
|
179
179
|
}
|
|
180
180
|
static get is() { return "salla-filters-widget"; }
|
|
181
181
|
static get originalStyleUrls() {
|
|
@@ -852,7 +852,7 @@ export class SallaGifting {
|
|
|
852
852
|
}
|
|
853
853
|
render() {
|
|
854
854
|
return [
|
|
855
|
-
h("div", { key: '
|
|
855
|
+
h("div", { key: '02f095cd71654941cc3d11f9c9be13e019247992' }, h("salla-list-tile", { key: '5dfefabc5e6fcb2f0193bf11dcd324c517b0e649', class: this.generateClass() }, h("div", { key: '35b5b8cbf54ccbf9368cdc95d2e0505ca317a555', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: '2399e07a06a808b396cf57a5233be97938e7b9b5' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '12f460ce1df5e294e77b25e07d00d85370b2b939', slot: "subtitle" }, h("div", { key: '28fd4125c6f18fb976bc271ffc7c731683757bfb' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '2ccb5745341390a9aeb80c56b4d7bb171cc2940e', slot: "action" }, h("salla-button", { key: '4e74313bd4020ae32a1c2ba30b0133da0aaf410a', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '85ef811160f391d2fc456b13a89120407d6e4c36', name: "widget-btn-content" }, h("div", { key: '6d4d1162f7147488f8ce11d7da1bf7b82bc407b0', class: "s-gifting-widget-action-content" }, h("span", { key: 'e7aa877309bc7346fe56227365ad75c0d7c1a8dc', innerHTML: GiftSharing }), " \u00A0", h("span", { key: '5c7f1a43fa84e8e5ba74a449063fc89576626db2' }, this.sectionBtnText)))))), h("salla-modal", { key: '1de82b1f9a7fc49321eb766b1451eacd2d210480', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: 'f3a97db3aa3a2591a1d391af61efa15ab76f1c8c', slot: "loading" }, h("div", { key: '67fb44c701b3f2771e041b91a2a438a0419ed4dd', class: "s-gifting-skeleton" }, h("div", { key: '70b2841fbafff80879cf2d68550cc9659da140a2', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '8d337e1bfe29aea80e93ed2d1e172fa4fe23e1db', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: 'b8586d28a3dda5abbdbc341830560c157efb566c', class: "s-gifting-modal-title" }, h("div", { key: '956ec550fd7ddeb6b11f174b92d0133408f95165', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: 'f495e7ec761c8499efb7a6e7025bd205dca49f2c', height: '15px', width: '150px' })))), h("div", { key: '28e5ad1386cebcd93a5f9307bd812dca77a66188', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '951dbed5a03ab246d661dfd2a59ae099b468fa89', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'f200d5a5a4a258fb0755b6adb48e25606ab93bb7', height: '230px' }), h("salla-skeleton", { key: '1b4f69321a13d1ddea4ad038bfad22385b3b51ed', height: '10px', width: '150px' }), h("salla-skeleton", { key: '5d9219d3826de28b8e585bada604bff60dfc80f8', height: '30px' }), h("salla-skeleton", { key: 'a248552e288bea2e9839f381ec2d96bdb0e53cdf', height: '40px' })))), h("slot", { key: '3c8f9965766d7ce17fb20b4df72a3e46c273b23a', name: "header" }), !!this.hasError ?
|
|
856
856
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
857
857
|
:
|
|
858
858
|
[
|
|
@@ -875,7 +875,7 @@ export class SallaGifting {
|
|
|
875
875
|
h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-city` }, this.receiverCityFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCity, items: this.displayedCities, selectedItem: this.selectedCity, loading: this.loadingCities, searching: this.searchingCities, disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId), required: true, inputId: `${this.hostId}-city`, searchQuery: this.citySearchQuery, clientSearch: !this.enableCityAjaxSearch, dropUp: true, keepParentScroll: true, onItemSelected: (e) => this.handleCitySelected(e.detail), onSearchInput: (e) => this.handleCitySearch(e.detail), onDropdownClosed: () => this.handleCityDropdownClosed() }), this.errors && this.errors['receiver.city_id'] ?
|
|
876
876
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() && this.cityNoticeText() &&
|
|
877
877
|
h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.cityNoticeText())), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, !this.skipStep1() && h("a", { href: "#!", innerHTML: LeftArrow, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
878
|
-
], h("slot", { key: '
|
|
878
|
+
], h("slot", { key: '688de0af2e48acc0d91d128a321856197861eb16', name: "footer" })))
|
|
879
879
|
];
|
|
880
880
|
}
|
|
881
881
|
static get is() { return "salla-gifting"; }
|
|
@@ -11,7 +11,7 @@ export class SallaHook {
|
|
|
11
11
|
this.host.before(element);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return h(Host, { key: '
|
|
14
|
+
return h(Host, { key: '579b0abf0784c9396f636da50b1fed156e5a0600' });
|
|
15
15
|
}
|
|
16
16
|
async componentDidLoad() {
|
|
17
17
|
// Register this component for hooks system, already on it logic to run componentDidLoad trigger
|
|
@@ -26,7 +26,7 @@ export class SallaListTile {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: '859bfbc8049ae8391ac35db575f9eac29651d45d' }, h("a", { key: '94cfc3500071ef1b45d5120cc0b3f2234978d089', class: this.generateClass(), href: this.href || "#", target: this.target, "aria-label": "List Tile Link" }, h("div", { key: 'dcf0437211174d449ef381f96103e3661a0373ae', class: "s-list-tile-item-icon" }, h("slot", { key: 'e446499ef938c4c6017c57ebf6df800d0324aee0', name: 'icon' })), h("div", { key: '87403147cde0cab458181c36d797f85ee9390d8a', class: "s-list-tile-item-content" }, h("div", { key: 'b585f7f0f23d83cb8b128d7a225d6561430bf81e', class: "s-list-tile-item-title" }, h("slot", { key: '756b1d8edbc9272a4aae4fa1e63c8531ca8851f5', name: 'title' })), h("div", { key: '1ce5eae34219802f67eea914efb1d2300ea7e896', class: "s-list-tile-item-subtitle" }, h("slot", { key: '8bac18580d009d7d910f4e92b798ff3338ce6632', name: "subtitle" }))), h("div", { key: '2477624cd43d6c0292d40395e38a0a4fe6d07be4', class: "s-list-tile-item-action" }, h("slot", { key: 'b51e25e3f127e39289dd4d8949fc72d1b9cbd044', name: 'action' })))));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "salla-list-tile"; }
|
|
32
32
|
static get originalStyleUrls() {
|
|
@@ -22,7 +22,7 @@ export class SallaLoading {
|
|
|
22
22
|
this.bgColor = "#e5e7eb";
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '3bc71183fdd705edff5c1f9cb25a7633898e8146', class: "s-loading-container" }, h("svg", { key: '1af3b702b1e5882c125f1d889337e7636973df68', "aria-hidden": "true", style: { width: `${this.size}px`, height: `${this.size}px`, fill: this.color, color: this.bgColor }, class: "s-loading", viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'b34b2b5ddb7760c52ccaaba9995a73f2aa28522c', d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", fill: "currentColor" }), h("path", { key: '27cf21f3dd2b33e9dbbd73711e9be825a8ec6575', d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", fill: "currentFill" }))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "salla-loading"; }
|
|
28
28
|
static get originalStyleUrls() {
|
|
@@ -244,7 +244,7 @@ export class SallaLocalizationModal {
|
|
|
244
244
|
this.showTrigger
|
|
245
245
|
? h("button", { type: "button", onClick: () => this.open(), class: "s-localization-modal-trigger-btn" }, h("span", null, this.getLanguageName()), h("span", { class: "s-localization-modal-trigger-separator" }, "|"), " ", h("span", { innerHTML: this.getCurrencySymbol() }))
|
|
246
246
|
: '',
|
|
247
|
-
h("salla-modal", { key: '
|
|
247
|
+
h("salla-modal", { key: '1400a13aa9490e0f5f96259bea6bfcf3f98ee829', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { key: 'b31041e8d245ce30f41d4221418856e886200848', slot: 'loading' }, h("div", { key: '5531d672f7c5e8fb8a6b06fa5ae5328f4efcf3fe', class: "s-localization-modal-skeleton" }, h("salla-skeleton", { key: '61b8fa69733a4e970e1f72ef5b09e773781e45ae', width: '25%', height: '15px' }), h("div", { key: '20dd0f3444f0a6e05730266bf964b74f307e9aab', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '5b8b4b760f741e0cd56c07ff341205e9ec7fe4d3', width: '25%', height: '15px' }), h("div", { key: '0a3f5dbfca2d6cd81effef5d873e03c9aef57d0b', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: 'b068f327b3335b3f9154ac20f7f6de95864dde9a', height: '40px', width: '100%' }))), !!this.hasError ?
|
|
248
248
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "description" }, this.errorMessage)) :
|
|
249
249
|
h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
|
|
250
250
|
h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, Salla.lang.get('common.titles.language')), h("div", { class: "s-localization-modal-section-inner" }, this.languages.length < 6 ?
|
|
@@ -7,7 +7,7 @@ export class SallaLoyaltyPrizeItem {
|
|
|
7
7
|
this.prizeItemSelected.emit(this.item);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'b50a0407d3ddec72fef3b7f4ff325c14ee52edfa' }, h("div", { key: 'a6f180164b4bbed6b0a8c534dda70d7ce8a8d0d5', onClick: this.onPrizeItemClick.bind(this) }, h("img", { key: '3314cec7f2adf02d4d7b0623d95aaa87c8c5a4e0', class: "s-loyalty-prize-item-image", src: this.item.image, alt: this.item.name }), h("div", { key: '6a33d5bfcd00e231f9b9a21d8d7b9e8cbb263e7c', class: "s-loyalty-prize-item-title" }, this.item.name), h("div", { key: '333c4b1548e13601edb9405460fde38fde274997', class: "s-loyalty-prize-item-subtitle" }, this.item.description), h("div", { key: 'dbf09413ed15affa54dd0e5bbbb425bdf89d2a42', class: "s-loyalty-prize-item-points" }, this.item.cost_points, " ", salla.lang.get('pages.loyalty_program.point')))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "salla-loyalty-prize-item"; }
|
|
13
13
|
static get originalStyleUrls() {
|
package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.js
CHANGED
|
@@ -79,7 +79,7 @@ export class SallaLoyaltyPointsHistory {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
|
-
return (h(Host, { key: '
|
|
82
|
+
return (h(Host, { key: 'a27eb05e077b79c1865d80baa5960af783757b49' }, h("div", { key: '37cec3096c43766f679e7b7e35d3e99d248dbc70' }, this.isLoadingLoyalty ? (h("salla-loading", null)) : (h("div", null, h("table", { class: "s-loyalty-points-history-table" }, h("tbody", null, h("tr", null, h("td", null, h("div", { class: "s-loyalty-points-history-balance-container" }, h("i", { class: "s-loyalty-points-history-balance-icon sicon-gift" }), h("div", null, h("div", { class: "s-loyalty-points-history-balance-value" }, this.balance, " ", salla.lang.get('pages.loyalty_program.point')), h("div", { class: "s-loyalty-points-history-balance-label" }, salla.lang.get('pages.loyalty_program.your_points')))))))), this.loyaltyPointsArray.length > 0 ? (h("div", null, h("table", { class: "s-loyalty-points-history-table" }, h("thead", { class: "s-loyalty-points-history-table-head" }, h("tr", null, h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('pages.wallet.points')), h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('pages.wallet.date')), h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('pages.wallet.expiry_date')), h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('common.elements.note')), h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('common.elements.status')))), h("tbody", null, this.loyaltyPointsArray.map(point => (h("tr", { class: "s-loyalty-points-history-table-tbody-tr" }, h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('pages.wallet.points'), ":"), h("span", null, point?.type === 'plus' ? '+' : '', point?.amount || '', " ", salla.lang.get('pages.loyalty_program.point')))), h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('pages.wallet.date'), ":"), h("span", null, formatDate(point?.created_at ? Number(point.created_at) * 1000 : undefined)))), h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('pages.wallet.expiry_date'), ":"), h("span", null, formatDate(point?.expires_at ? Number(point.expires_at) * 1000 : undefined)))), h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('common.elements.note'), ":"), h("span", null, translateKey(point?.key)))), h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('common.elements.status'), ":"), h("div", { class: {
|
|
83
83
|
's-loyalty-points-history-table-transaction-status': true,
|
|
84
84
|
's-loyalty-points-history-table-transaction-status-pending': point?.status_key === 'pending',
|
|
85
85
|
's-loyalty-points-history-table-transaction-status-revoked': point?.status_key === 'revoked',
|
package/dist/collection/components/salla-loyalty-program/salla-loyalty-exchange-product-card.js
CHANGED
|
@@ -8,9 +8,9 @@ export class SallaLoyaltyExchangeProductCard {
|
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
10
|
const product = typeof this.product === 'string' ? JSON.parse(this.product) : this.product;
|
|
11
|
-
return (h("div", { key: '
|
|
11
|
+
return (h("div", { key: '8523e4b67448013553d333dc999a6cf74bfaaabe', class: "s-loyalty-exchange-card" }, this.hasCustomCard
|
|
12
12
|
? h("custom-salla-product-card", { product: product, hideAddBtn: true })
|
|
13
|
-
: h("salla-product-card", { "hide-add-btn": true, product: product }), h("div", { key: '
|
|
13
|
+
: h("salla-product-card", { "hide-add-btn": true, product: product }), h("div", { key: '1a3ab033f84662a6e6c24dff0bda9f6994380207', class: "s-loyalty-exchange-card-btn" }, h("salla-button", { key: 'ba2645c3636b2c39a013c3e4df0f8dbbc2bff982', fill: "outline", width: "wide", onClick: () => this.loyaltyProductExchange.emit({ productId: product.id }) }, salla.lang.get('pages.loyalty_program.redeem_reward')))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "salla-loyalty-exchange-product-card"; }
|
|
16
16
|
static get originalStyleUrls() {
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
import { Host, h } from "@stencil/core";
|
|
5
5
|
export class SallaLoyaltyHero {
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '3e4a7654b7bf26354b520f2cd776294747d8a360' }, h("section", { key: 'e9e696da574b93690a5602ef8af7199f7066beae', class: "s-loyalty-program-hero-container" }, h("div", { key: '86ef6bf3c5baf8f2ed4e1f4bbda031ce76d0b8ff', class: "s-loyalty-program-hero-background", style: {
|
|
8
8
|
backgroundImage: `url(${this.image})`,
|
|
9
|
-
} }, this.image ? h("div", { class: "s-loyalty-program-hero-overlay" }) : '', h("div", { key: '
|
|
9
|
+
} }, this.image ? h("div", { class: "s-loyalty-program-hero-overlay" }) : '', h("div", { key: '8e1770b8dfb7d4e243a792ca9591acfc3de95800', class: {
|
|
10
10
|
's-loyalty-program-hero-content': true,
|
|
11
11
|
's-loyalty-program-hero-white': !!this.image,
|
|
12
12
|
's-loyalty-program-hero-gray': !this.image,
|
|
13
|
-
} }, h("div", { key: '
|
|
13
|
+
} }, h("div", { key: '569ef54a6c67d9cf17b1b98bc22d17b8c30b9a56' }, h("h1", { key: '225c7c594cb1942a56a6966ab8289a4dfb7f0d71', class: "s-loyalty-program-hero-title" }, this.name || h("span", { key: 'b5879e2ffbdceece5b74cf49195e243fa12ad7ce', style: { color: 'transparent', backgroundColor: '#666', borderRadius: '12px' } }, "name")), h("p", { key: '4f93ddbab54a688899d7a125a15e925e79604247', class: "s-loyalty-program-hero-description" }, this.description || h("span", { key: 'fcf66d6a7e2ff1b5e19bd82e183f23a87c8d9a8e', style: { color: 'transparent', backgroundColor: '#666', borderRadius: '12px' } }, "description"))), h("slot", { key: '072a07637ed4d10d16298ac39ad5868e2f1285bc', name: "action" }))), h("div", { key: '52afdf232182caab2bd18e8498ab7688cc5b8356', class: "s-loyalty-program-hero-footer" }, h("div", { key: '57bf7ce60ee179abb33eed320f5911e62b468581', class: "s-loyalty-program-hero-slot-container" }, h("slot", { key: 'e78a53828eb424afef9502c66625d35c9b844af7', name: "crosspoint" }))))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "salla-loyalty-hero"; }
|
|
16
16
|
static get originalStyleUrls() {
|