@salla.sa/twilight-components 2.14.422 → 2.14.423
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-Bj2Lr664.js → filepond-Do86Z81F.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-D6zjqOTW.js → filepond-plugin-file-poster-BltmTwcK.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DW2JtTpK.js → filepond-plugin-file-validate-size-D6qDjnWw.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Cm_dx5vR.js → filepond-plugin-file-validate-type-BTcaw3yC.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CyB1FduP.js → filepond-plugin-image-edit-BfSALTq0.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CxcuYrF1.js → filepond-plugin-image-exif-orientation-YyoN3ZPE.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CXF_Kqyu.js → filepond-plugin-image-preview-DPZhJU-S.js} +1 -1
- package/dist/cjs/{functions-QULFiarR.js → functions-Vqr_tH33.js} +1 -1
- package/dist/cjs/{index-C-KeWKxB.js → index-BKsfuSTK.js} +1 -1
- package/dist/cjs/{index-CSI6rnkc.js → index-B_ubSXmY.js} +12 -8
- 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 +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +3 -9
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +20 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +14 -2
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +126 -0
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +3 -9
- 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 +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-reward-action_4.cjs.entry.js +10 -7
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +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 +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/swap-stroke-CYGxjKIS.js +13 -0
- package/dist/cjs/tag-money-Cuohw_4j.js +13 -0
- package/dist/cjs/{tracked-promise-DTPdQpTt.js → tracked-promise-DfEtIz3d.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-CmTZhXxo.js → vanilla-picker-n2ZBl__a.js} +1 -1
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +40 -0
- package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +7 -4
- package/dist/collection/components/salla-menu/salla-menu.js +35 -2
- package/dist/collection/components/salla-next-order-coupon/interfaces.js +1 -0
- package/dist/collection/components/salla-next-order-coupon/salla-next-order-coupon.css +3 -0
- package/dist/collection/components/salla-next-order-coupon/salla-next-order-coupon.js +142 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-cart-item-offers.js +1 -7
- package/dist/components/salla-cookies-bar.js +21 -1
- package/dist/components/salla-menu.js +16 -2
- package/dist/components/salla-next-order-coupon.d.ts +11 -0
- package/dist/components/salla-next-order-coupon.js +165 -0
- package/dist/components/salla-order-summary.js +1 -7
- package/dist/components/salla-reward-details2.js +7 -4
- package/dist/components/swap-stroke.js +11 -0
- package/dist/components/tag-money.js +11 -0
- package/dist/esm/{filepond-CaO0jWZe.js → filepond-C27NJlHY.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-x8WSmS0o.js → filepond-plugin-file-poster-CbA3Ow5D.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CxlH6WN0.js → filepond-plugin-file-validate-size-DeVDysqG.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-qw3WFgZc.js → filepond-plugin-file-validate-type-Bk2vWN-H.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DuhPVO0a.js → filepond-plugin-image-edit-MZT3Vams.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BffsImgy.js → filepond-plugin-image-exif-orientation-CUi24gW6.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-VZtiw7aM.js → filepond-plugin-image-preview-DNteLpdV.js} +1 -1
- package/dist/esm/{functions-DQPUS1s5.js → functions-WZTrXRSI.js} +1 -1
- package/dist/esm/{index-DcQSprhU.js → index-Z9TEkBrE.js} +12 -8
- package/dist/esm/{index-CDqmBYQb.js → index-xqn3qtN8.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +2 -8
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +20 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +14 -2
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +124 -0
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +2 -8
- 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 +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card_2.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-reward-action_4.entry.js +10 -7
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +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 +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/swap-stroke-DqDX5na4.js +11 -0
- package/dist/esm/tag-money-CJUR4sUM.js +11 -0
- package/dist/esm/{tracked-promise-CjUGdQ4e.js → tracked-promise-9ayPcQ9V.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-71UAczkS.js → vanilla-picker-DU5T_3-T.js} +1 -1
- package/dist/twilight/{p-32a76526.entry.js → p-10311a85.entry.js} +1 -1
- package/dist/twilight/{p-28cd5556.entry.js → p-132d5758.entry.js} +1 -1
- package/dist/twilight/{p-c13164b8.entry.js → p-1357f11f.entry.js} +1 -1
- package/dist/twilight/{p-97a43989.entry.js → p-15b8af3d.entry.js} +1 -1
- package/dist/twilight/{p-452d8cd0.entry.js → p-15d242d1.entry.js} +1 -1
- package/dist/twilight/{p-d188ddc3.entry.js → p-1aa4f79a.entry.js} +1 -1
- package/dist/twilight/{p-8eebefe9.entry.js → p-1daa9a08.entry.js} +1 -1
- package/dist/twilight/{p-8ec0ba5b.entry.js → p-1e6a741d.entry.js} +1 -1
- package/dist/twilight/{p-a2fcbc1a.entry.js → p-1f3d64f3.entry.js} +1 -1
- package/dist/twilight/{p-b3a731c1.entry.js → p-25a9da9c.entry.js} +1 -1
- package/dist/twilight/{p-868e3de6.entry.js → p-268c86dd.entry.js} +1 -1
- package/dist/twilight/{p-c9b8eaa4.entry.js → p-296b7778.entry.js} +1 -1
- package/dist/twilight/{p-e2e790c2.entry.js → p-2e69e2a7.entry.js} +1 -1
- package/dist/twilight/p-3175cab9.entry.js +4 -0
- package/dist/twilight/{p-061c3ad0.entry.js → p-31cdb580.entry.js} +1 -1
- package/dist/twilight/{p-3115fa6f.entry.js → p-321d4374.entry.js} +1 -1
- package/dist/twilight/{p-00031f8b.entry.js → p-38eb6f08.entry.js} +1 -1
- package/dist/twilight/{p-e8a3af2d.entry.js → p-4208c68b.entry.js} +1 -1
- package/dist/twilight/{p-38ce7612.entry.js → p-475bfa77.entry.js} +1 -1
- package/dist/twilight/{p-d65db41e.entry.js → p-51ccd249.entry.js} +1 -1
- package/dist/twilight/p-51eb69d7.entry.js +4 -0
- package/dist/twilight/{p-1cf5f505.entry.js → p-58f17ecc.entry.js} +1 -1
- package/dist/twilight/{p-b3d565bd.entry.js → p-598c73c9.entry.js} +1 -1
- package/dist/twilight/{p-7282ff57.entry.js → p-5bd92466.entry.js} +1 -1
- package/dist/twilight/{p-63d47b05.entry.js → p-612f2099.entry.js} +1 -1
- package/dist/twilight/{p-80865031.entry.js → p-61b6fac2.entry.js} +1 -1
- package/dist/twilight/{p-fa5cfbbb.entry.js → p-647a76d0.entry.js} +1 -1
- package/dist/twilight/p-69d98642.entry.js +4 -0
- package/dist/twilight/{p-f2476ba0.entry.js → p-6ab7c83d.entry.js} +1 -1
- package/dist/twilight/{p-d46ab245.entry.js → p-6d4850df.entry.js} +1 -1
- package/dist/twilight/{p-a147d986.entry.js → p-735e5378.entry.js} +1 -1
- package/dist/twilight/{p-f0f5e269.entry.js → p-74362d6a.entry.js} +1 -1
- package/dist/twilight/{p-0217da98.entry.js → p-75066345.entry.js} +1 -1
- package/dist/twilight/{p-192e2bc3.entry.js → p-75826fc3.entry.js} +1 -1
- package/dist/twilight/{p-6ccbe91b.entry.js → p-776a0bda.entry.js} +1 -1
- package/dist/twilight/{p-8101bf16.entry.js → p-777a765e.entry.js} +1 -1
- package/dist/twilight/{p-5e5ccdab.entry.js → p-79340697.entry.js} +1 -1
- package/dist/twilight/{p-e08d36d6.entry.js → p-79d9b828.entry.js} +1 -1
- package/dist/twilight/{p-a44f888a.entry.js → p-7d2ec078.entry.js} +1 -1
- package/dist/twilight/{p-6c98089b.entry.js → p-7d4c5da3.entry.js} +1 -1
- package/dist/twilight/{p-8ad13a15.entry.js → p-8138fe7c.entry.js} +1 -1
- package/dist/twilight/{p-f161933c.entry.js → p-847d884f.entry.js} +1 -1
- package/dist/twilight/{p-63e1b828.entry.js → p-8631c200.entry.js} +1 -1
- package/dist/twilight/{p-e4f154ee.entry.js → p-872b6790.entry.js} +1 -1
- package/dist/twilight/{p-ea4ded2f.entry.js → p-88c6e6ec.entry.js} +1 -1
- package/dist/twilight/{p-acb769ec.entry.js → p-8b15a7c2.entry.js} +1 -1
- package/dist/twilight/p-93221e58.entry.js +4 -0
- package/dist/twilight/{p-a6282734.entry.js → p-93715135.entry.js} +1 -1
- package/dist/twilight/{p-062ce0be.entry.js → p-9410f28a.entry.js} +1 -1
- package/dist/twilight/{p-4f6bff26.entry.js → p-97033016.entry.js} +1 -1
- package/dist/twilight/{p-50b449bd.entry.js → p-9b64e741.entry.js} +1 -1
- package/dist/twilight/{p-a4c32f61.entry.js → p-9c36f5f1.entry.js} +1 -1
- package/dist/twilight/{p-69b6a7e6.entry.js → p-9d30457e.entry.js} +1 -1
- package/dist/twilight/{p-l-JdSat8.js → p-B7NkulJ-.js} +1 -1
- package/dist/twilight/{p-BTAUEZcN.js → p-BDJ2Ykel.js} +1 -1
- package/dist/twilight/{p-BHk2Uou3.js → p-BlcvrTiO.js} +1 -1
- package/dist/twilight/{p-DeBNbBwy.js → p-BswrPpfs.js} +1 -1
- package/dist/twilight/{p-CT3zVv2d.js → p-C9yU50YT.js} +1 -1
- package/dist/twilight/p-CJUR4sUM.js +4 -0
- package/dist/twilight/{p-Ca8b1Y6p.js → p-CmoDOvZI.js} +1 -1
- package/dist/twilight/{p-BCVUxip0.js → p-CxlEUP15.js} +1 -1
- package/dist/twilight/{p-DgJJBXMW.js → p-DG0XMtHg.js} +1 -1
- package/dist/twilight/p-DqDX5na4.js +4 -0
- package/dist/twilight/{p-CN2sY_Li.js → p-DqwP0D-u.js} +1 -1
- package/dist/twilight/{p-CRRWZbuL.js → p-EhkdtrLx.js} +1 -1
- package/dist/twilight/{p-DcQSprhU.js → p-Z9TEkBrE.js} +1 -1
- package/dist/twilight/{p-Cs04GLEl.js → p-ZJAW9yxk.js} +1 -1
- package/dist/twilight/{p-77d1859e.entry.js → p-a6429df2.entry.js} +1 -1
- package/dist/twilight/p-a9f85080.entry.js +4 -0
- package/dist/twilight/{p-c34b5d8a.entry.js → p-aba22621.entry.js} +1 -1
- package/dist/twilight/{p-957bffb4.entry.js → p-b253d360.entry.js} +1 -1
- package/dist/twilight/{p-9cb39e42.entry.js → p-b5c33519.entry.js} +1 -1
- package/dist/twilight/{p-013cfbf0.entry.js → p-b785d75d.entry.js} +1 -1
- package/dist/twilight/{p-e79d468d.entry.js → p-b7aa5623.entry.js} +1 -1
- package/dist/twilight/{p-14805623.entry.js → p-be58b3a7.entry.js} +1 -1
- package/dist/twilight/{p-ecb69641.entry.js → p-c038e432.entry.js} +1 -1
- package/dist/twilight/{p-9924b574.entry.js → p-c19887c7.entry.js} +1 -1
- package/dist/twilight/{p-9170fe95.entry.js → p-c2dd5774.entry.js} +1 -1
- package/dist/twilight/{p-300dae0b.entry.js → p-c4a80854.entry.js} +1 -1
- package/dist/twilight/{p-b0b2aeda.entry.js → p-c4bb47b0.entry.js} +1 -1
- package/dist/twilight/{p-587d6230.entry.js → p-c763b517.entry.js} +1 -1
- package/dist/twilight/p-c77bcf09.entry.js +4 -0
- package/dist/twilight/{p-deffef72.entry.js → p-c7b15f0a.entry.js} +1 -1
- package/dist/twilight/{p-6d5b28c5.entry.js → p-cb476df4.entry.js} +1 -1
- package/dist/twilight/{p-6587c7d9.entry.js → p-d049f98a.entry.js} +1 -1
- package/dist/twilight/{p-5637acc5.entry.js → p-d0898538.entry.js} +1 -1
- package/dist/twilight/{p-3f01ef83.entry.js → p-d8d62f74.entry.js} +1 -1
- package/dist/twilight/{p-c49b9285.entry.js → p-dc1b4da2.entry.js} +1 -1
- package/dist/twilight/{p-4a8e7f09.entry.js → p-ea0b6753.entry.js} +1 -1
- package/dist/twilight/{p-c2a2158a.entry.js → p-eed5585b.entry.js} +1 -1
- package/dist/twilight/{p-cfac18e6.entry.js → p-ef60225f.entry.js} +1 -1
- package/dist/twilight/{p-e87d2534.entry.js → p-f087988a.entry.js} +1 -1
- package/dist/twilight/{p-503f9bbf.entry.js → p-f423f1cf.entry.js} +1 -1
- package/dist/twilight/{p-f6ed04b2.entry.js → p-f4582cc9.entry.js} +1 -1
- package/dist/twilight/{p-3a3dd27f.entry.js → p-f45efc0c.entry.js} +1 -1
- package/dist/twilight/p-f82d4a36.entry.js +4 -0
- package/dist/twilight/{p-64f577be.entry.js → p-fae2be1f.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +6 -0
- package/dist/types/components/salla-menu/salla-menu.d.ts +6 -0
- package/dist/types/components/salla-next-order-coupon/interfaces.d.ts +11 -0
- package/dist/types/components/salla-next-order-coupon/salla-next-order-coupon.d.ts +24 -0
- package/dist/types/components.d.ts +27 -0
- package/package.json +5 -5
- package/dist/twilight/p-27cc8fc7.entry.js +0 -4
- package/dist/twilight/p-489cca66.entry.js +0 -4
- package/dist/twilight/p-497b058a.entry.js +0 -4
- package/dist/twilight/p-4c759f75.entry.js +0 -4
- package/dist/twilight/p-81f18d48.entry.js +0 -4
- package/dist/twilight/p-f77d4659.entry.js +0 -4
|
@@ -14,6 +14,16 @@ export class SallaCookiesBar {
|
|
|
14
14
|
this.isMobile = false;
|
|
15
15
|
this.mobileBreakpoint = 768;
|
|
16
16
|
this.mobileQueryHandler = (e) => (this.isMobile = e.matches);
|
|
17
|
+
this.cookiesSettingsAnchorClass = 's-cookies-settings-link';
|
|
18
|
+
this.onCookiesSettingsClick = (event) => {
|
|
19
|
+
const target = event.target;
|
|
20
|
+
const link = target?.closest(`a.${this.cookiesSettingsAnchorClass}`);
|
|
21
|
+
if (!link) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
this.open();
|
|
26
|
+
};
|
|
17
27
|
}
|
|
18
28
|
async componentWillLoad() {
|
|
19
29
|
await Salla.onReady();
|
|
@@ -33,9 +43,11 @@ export class SallaCookiesBar {
|
|
|
33
43
|
this.mobileQuery = window.matchMedia(`(max-width: ${this.mobileBreakpoint - 1}px)`);
|
|
34
44
|
this.isMobile = this.mobileQuery.matches;
|
|
35
45
|
this.mobileQuery.addEventListener('change', this.mobileQueryHandler);
|
|
46
|
+
document.addEventListener('click', this.onCookiesSettingsClick);
|
|
36
47
|
}
|
|
37
48
|
disconnectedCallback() {
|
|
38
49
|
this.mobileQuery?.removeEventListener('change', this.mobileQueryHandler);
|
|
50
|
+
document.removeEventListener('click', this.onCookiesSettingsClick);
|
|
39
51
|
}
|
|
40
52
|
/**
|
|
41
53
|
* Accept cookies consent.
|
|
@@ -57,6 +69,13 @@ export class SallaCookiesBar {
|
|
|
57
69
|
Salla.storage.set('cookies-consent', 'rejected');
|
|
58
70
|
return this.host;
|
|
59
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Show cookies settings bar to allow updating consent.
|
|
74
|
+
*/
|
|
75
|
+
async open() {
|
|
76
|
+
this.isVisible = true;
|
|
77
|
+
return this.host;
|
|
78
|
+
}
|
|
60
79
|
isRtl() {
|
|
61
80
|
return Salla.config.get('theme.is_rtl', true);
|
|
62
81
|
}
|
|
@@ -130,6 +149,27 @@ export class SallaCookiesBar {
|
|
|
130
149
|
"text": "Reject cookies consent.",
|
|
131
150
|
"tags": []
|
|
132
151
|
}
|
|
152
|
+
},
|
|
153
|
+
"open": {
|
|
154
|
+
"complexType": {
|
|
155
|
+
"signature": "() => Promise<HTMLElement>",
|
|
156
|
+
"parameters": [],
|
|
157
|
+
"references": {
|
|
158
|
+
"Promise": {
|
|
159
|
+
"location": "global",
|
|
160
|
+
"id": "global::Promise"
|
|
161
|
+
},
|
|
162
|
+
"HTMLElement": {
|
|
163
|
+
"location": "global",
|
|
164
|
+
"id": "global::HTMLElement"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"return": "Promise<HTMLElement>"
|
|
168
|
+
},
|
|
169
|
+
"docs": {
|
|
170
|
+
"text": "Show cookies settings bar to allow updating consent.",
|
|
171
|
+
"tags": []
|
|
172
|
+
}
|
|
133
173
|
}
|
|
134
174
|
};
|
|
135
175
|
}
|
|
@@ -101,7 +101,10 @@ export class SallaRewardDetails {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
getCategoriesJsx(items, title) {
|
|
104
|
-
return !items.length ? '' : h("div", { class: c('reward-details-categories-wrapper') }, h("div", { class: c('reward-details-categories') }, h("h2", { class: c('reward-details-categories-heading') }, title), h("ul", { class: c('reward-details-categories-list') }, items.map((category) =>
|
|
104
|
+
return !items.length ? '' : h("div", { class: c('reward-details-categories-wrapper') }, h("div", { class: c('reward-details-categories') }, h("h2", { class: c('reward-details-categories-heading') }, title), h("ul", { class: c('reward-details-categories-list') }, items.map((category) => {
|
|
105
|
+
console.log("🚀 ~ SallaRewardDetails ~ getCategoriesJsx ~ category:", category);
|
|
106
|
+
return (h("li", null, h("a", { href: category.urls?.customer || category.url || category.lingual_urls?.[0], class: c('reward-details-categories-item') }, h("span", { innerHTML: SITag }), h("span", { class: c('reward-details-categories-item-content') }, category.name))));
|
|
107
|
+
}))));
|
|
105
108
|
}
|
|
106
109
|
getBrandsJsx(items, title) {
|
|
107
110
|
return !items.length ? '' : h("div", { class: c('reward-details-items-brands', 'slider-arrows-edges') }, h("div", null, h("h2", null, title), h("salla-slider", { id: `brands-${items.map(({ id }) => id).join('-')}`, "slider-config": '{"loop":false,"slidesPerView":"auto","spaceBetween":10}' }, h("div", { slot: "items" }, items.map((brand) => (h("a", { href: salla.url.get(brand_path(brand)), class: c('reward-brand-item') }, h("img", { src: brand.logo || salla.url.cdn('images/s-empty.png'), alt: "" }))))))));
|
|
@@ -111,11 +114,11 @@ export class SallaRewardDetails {
|
|
|
111
114
|
}
|
|
112
115
|
render() {
|
|
113
116
|
const termsAndConditions = this.getTermsAndConditions();
|
|
114
|
-
return (h("div", { key: '
|
|
117
|
+
return (h("div", { key: 'ef93a73728cf87285615dfe5dc9345d1a54db64a', class: "s-loyalty-program-reward-modal" }, h("div", { key: '85883b377d8ec2490cde174ea33aa08a64e84b68', class: "s-loyalty-program-points-modal-header" }, h("h1", { key: '2be1018fcdfff3966535a5e4cde4e10b99a690f6', class: "s-loyalty-program-points-modal-info" }, !salla.url.is_page('cart') ? ''
|
|
115
118
|
: h("button", { class: "s-loyalty-program-back-btn", onClick: () => closeModals(() => salla.event.dispatch('modal::open', 'loyalty-rewards-modal')) }, h("span", { class: {
|
|
116
119
|
'sicon-arrow-right': document.documentElement.getAttribute('dir') === 'rtl',
|
|
117
120
|
'sicon-arrow-left': document.documentElement.getAttribute('dir') === 'ltr',
|
|
118
|
-
} })), this.prize.name)), h("div", { key: '
|
|
121
|
+
} })), this.prize.name)), h("div", { key: 'eac6726dde8b8f5562fc4953ffb5c84830d185d4', class: "s-loyalty-program-modal-scrollable-content" }, h("div", { key: 'a0ea8aca31d63016ad4890044a8f9789a4798ee2', class: "s-loyalty-program-reward-details-header" }, h("div", { key: '9ff0ade39430845577a765f897ea50dc07ea498e', class: "s-loyalty-program-aspect-container" }, h("img", { key: '6001c3c5388611f924f22f229d879b48e7f5035e', src: this.prize.image, alt: this.prize.name })), h("salla-badge", { key: '4e69c07ff18b8a652ab852554ecb8a203fc34e16', size: "sm", bg: "light" }, h("span", { key: '854e73b47beeb53bda03ea3a6ac093fbe4098f16', innerHTML: SIGift }), h("span", { key: 'ed3c8592176708a08016560ee0e35f57bfb3bec4', class: "s-loyalty-program-points-badge-points" }, formattedPointsJsx(this.prize.cost_points)))), !termsAndConditions.length ? '' : h("div", { class: "s-loyalty-program-terms-and-conditions" }, h("h1", { class: "s-loyalty-program-terms-and-conditions-heading" }, salla.lang.get('pages.loyalty_program.terms_and_conditions')), h("ul", { class: "s-loyalty-program-terms-and-conditions-list" }, termsAndConditions.map(([title, points]) => (h("li", { class: "s-loyalty-program-terms-and-conditions-item" }, h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, title), h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, points)))))), h("div", { key: 'f9b79897d68a7b9b7f35d36ef3e8bf34a58ae3c3', class: "s-loyalty-program-reward-info-message" }, h("h1", { key: '663d761572fe3961f616fd10cf98409ca31e5002', class: "s-loyalty-program-reward-info-message-heading" }, salla.lang.get('pages.loyalty_program.how_to_benefit_from_this_reward')), h("p", { key: '2756956099b574b793d3a0ea3bcc3de63fc4ab4c', class: "s-loyalty-program-reward-info-message-content" }, this.getItemsMarkersText())), (this.prize.key === 'FREE_SHIPPING' || this.getItemsMarkers('both') === '000000') ? '' : h("div", { class: "s-loyalty-program-reward-details" }, h("salla-tabs", { key: this.refreshKey }, this.getItemsMarkers('included') === '000' ? '' : [
|
|
119
122
|
h("salla-tab-header", { slot: "header", name: "included", style: {
|
|
120
123
|
display: this.getItemsMarkers('excluded') === '000' ? 'none' : 'block',
|
|
121
124
|
} }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: SICheck }), h("span", null, salla.lang.get(`pages.loyalty_program.included`))),
|
|
@@ -125,7 +128,7 @@ export class SallaRewardDetails {
|
|
|
125
128
|
display: this.getItemsMarkers('included') === '000' ? 'none' : 'block',
|
|
126
129
|
} }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: SICancel }), h("span", null, salla.lang.get(`pages.loyalty_program.excluded`))),
|
|
127
130
|
h("salla-tab-content", { slot: "content", name: "excluded" }, h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.excludedCategories, this.prize.excluded_category_ids), salla.lang.get('pages.loyalty_program.excluded_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.excludedBrands, this.prize.excluded_brand_ids), salla.lang.get('pages.loyalty_program.excluded_brands')), this.getProductsJsx(this.getProductIds(this.prize.excluded_product_ids), salla.lang.get('pages.loyalty_program.excluded_products')))),
|
|
128
|
-
]))), h("salla-reward-action", { key: '
|
|
131
|
+
]))), h("salla-reward-action", { key: '6576910c32df5d49f33e9372e2c0a3bd758c8125', onActionClick: e => this.actionClick.emit(e.detail), prize: this.prize })));
|
|
129
132
|
}
|
|
130
133
|
static get is() { return "salla-reward-details"; }
|
|
131
134
|
static get originalStyleUrls() {
|
|
@@ -12,11 +12,19 @@ export class SallaMenu {
|
|
|
12
12
|
* Boolean indicating whether to use React Link elements for menu links.
|
|
13
13
|
*/
|
|
14
14
|
this.useReactLink = false;
|
|
15
|
+
/**
|
|
16
|
+
* When true (footer menu only), appends a link to open cookie preferences.
|
|
17
|
+
* Use as `with-cookie-preferences` in markup.
|
|
18
|
+
*/
|
|
19
|
+
this.withCookiePreferences = false;
|
|
15
20
|
this.menus = [];
|
|
21
|
+
this.cookiePreferencesLabel = '';
|
|
22
|
+
this.displayAllText = '';
|
|
16
23
|
}
|
|
17
24
|
async componentWillLoad() {
|
|
18
25
|
return salla.onReady(() => {
|
|
19
26
|
this.displayAllText = salla.lang.get('blocks.home.display_all');
|
|
27
|
+
this.cookiePreferencesLabel = salla.lang.get('common.cookies.settings');
|
|
20
28
|
if (this.sourceValue && this.source === 'json') {
|
|
21
29
|
this.menus = typeof this.sourceValue === 'string' ? JSON.parse(this.sourceValue) : this.sourceValue || [];
|
|
22
30
|
}
|
|
@@ -105,7 +113,11 @@ export class SallaMenu {
|
|
|
105
113
|
"s-menu-footer-item": !this.topnav,
|
|
106
114
|
"s-menu-topnav-item topnav-link-item right-side": this.topnav
|
|
107
115
|
} }, menu.title);
|
|
108
|
-
})
|
|
116
|
+
}), this.withCookiePreferences ? (h("a", { href: "#cookies-settings", class: {
|
|
117
|
+
"s-menu-footer-item": !this.topnav,
|
|
118
|
+
"s-menu-topnav-item topnav-link-item right-side": this.topnav,
|
|
119
|
+
"s-cookies-settings-link": true,
|
|
120
|
+
} }, this.cookiePreferencesLabel)) : null));
|
|
109
121
|
}
|
|
110
122
|
/**
|
|
111
123
|
* Get the menus
|
|
@@ -242,12 +254,33 @@ export class SallaMenu {
|
|
|
242
254
|
"getter": false,
|
|
243
255
|
"setter": false,
|
|
244
256
|
"reflect": false
|
|
257
|
+
},
|
|
258
|
+
"withCookiePreferences": {
|
|
259
|
+
"type": "boolean",
|
|
260
|
+
"attribute": "with-cookie-preferences",
|
|
261
|
+
"mutable": false,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "boolean",
|
|
264
|
+
"resolved": "boolean",
|
|
265
|
+
"references": {}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": false,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [],
|
|
271
|
+
"text": "When true (footer menu only), appends a link to open cookie preferences.\nUse as `with-cookie-preferences` in markup."
|
|
272
|
+
},
|
|
273
|
+
"getter": false,
|
|
274
|
+
"setter": false,
|
|
275
|
+
"reflect": false,
|
|
276
|
+
"defaultValue": "false"
|
|
245
277
|
}
|
|
246
278
|
};
|
|
247
279
|
}
|
|
248
280
|
static get states() {
|
|
249
281
|
return {
|
|
250
|
-
"menus": {}
|
|
282
|
+
"menus": {},
|
|
283
|
+
"cookiePreferencesLabel": {}
|
|
251
284
|
};
|
|
252
285
|
}
|
|
253
286
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { h } from "@stencil/core";
|
|
5
|
+
import TagMoneyIcon from "../../assets/svg/tag-money.svg";
|
|
6
|
+
import SwapStrokeIcon from "../../assets/svg/swap-stroke.svg";
|
|
7
|
+
export class SallaNextOrderCoupon {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.coupon = null;
|
|
10
|
+
this.isLoading = true;
|
|
11
|
+
this.titlePercentTpl = '';
|
|
12
|
+
this.titleFixedTpl = '';
|
|
13
|
+
this.badgeLabel = '';
|
|
14
|
+
this.minSpendTpl = '';
|
|
15
|
+
this.expiresTpl = '';
|
|
16
|
+
this.shopNowLabel = '';
|
|
17
|
+
this.copyLabel = '';
|
|
18
|
+
this.copiedLabel = '';
|
|
19
|
+
}
|
|
20
|
+
componentWillLoad() {
|
|
21
|
+
Salla.onReady()
|
|
22
|
+
.then(() => Salla.lang.onLoaded())
|
|
23
|
+
.then(() => {
|
|
24
|
+
this.loadTranslations();
|
|
25
|
+
return this.loadCoupon();
|
|
26
|
+
})
|
|
27
|
+
.catch(() => {
|
|
28
|
+
this.isLoading = false;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
loadTranslations() {
|
|
32
|
+
this.titlePercentTpl = Salla.lang.get('pages.thank_you.next_order_coupon.title_percent') || '';
|
|
33
|
+
this.titleFixedTpl = Salla.lang.get('pages.thank_you.next_order_coupon.title_fixed') || '';
|
|
34
|
+
this.badgeLabel = Salla.lang.get('pages.thank_you.next_order_coupon.badge') || '';
|
|
35
|
+
this.minSpendTpl = Salla.lang.get('pages.thank_you.next_order_coupon.min_spend') || '';
|
|
36
|
+
this.expiresTpl = Salla.lang.get('pages.thank_you.next_order_coupon.expires') || '';
|
|
37
|
+
this.shopNowLabel = Salla.lang.get('pages.thank_you.next_order_coupon.shop_now') || '';
|
|
38
|
+
this.copyLabel = Salla.lang.get('common.elements.copy') || '';
|
|
39
|
+
this.copiedLabel = Salla.lang.get('pages.thank_you.next_order_coupon.copied') || '';
|
|
40
|
+
}
|
|
41
|
+
async loadCoupon() {
|
|
42
|
+
try {
|
|
43
|
+
const response = await salla.api.request('coupons', { type: 'thankyou' });
|
|
44
|
+
const raw = response?.data;
|
|
45
|
+
const list = Array.isArray(raw) ? raw : (Array.isArray(raw?.data) ? raw.data : []);
|
|
46
|
+
this.coupon = list[0] ?? null;
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
this.coupon = null;
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
this.isLoading = false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async copyCode() {
|
|
56
|
+
if (!this.coupon)
|
|
57
|
+
return;
|
|
58
|
+
try {
|
|
59
|
+
await navigator.clipboard.writeText(this.coupon.code);
|
|
60
|
+
salla.notify.success(this.copiedLabel);
|
|
61
|
+
salla.event.dispatch('salla::next-order-coupon.code.copied', { code: this.coupon.code });
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// clipboard write failed silently
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
isPercentage() {
|
|
68
|
+
return this.coupon?.type === 'P' || this.coupon?.type === 'percentage';
|
|
69
|
+
}
|
|
70
|
+
formatAmount() {
|
|
71
|
+
if (!this.coupon)
|
|
72
|
+
return '';
|
|
73
|
+
if (this.isPercentage()) {
|
|
74
|
+
return `${salla.helpers.number(this.coupon.amount)}%`;
|
|
75
|
+
}
|
|
76
|
+
const amt = this.coupon.amount;
|
|
77
|
+
if (typeof amt === 'object' && amt.amount) {
|
|
78
|
+
const a = amt;
|
|
79
|
+
return h("span", { innerHTML: salla.money(a.amount, a.currency) });
|
|
80
|
+
}
|
|
81
|
+
return h("span", { innerHTML: salla.money(amt) });
|
|
82
|
+
}
|
|
83
|
+
formatMinSpend() {
|
|
84
|
+
const min = this.coupon?.minimum_amount;
|
|
85
|
+
if (!min)
|
|
86
|
+
return '';
|
|
87
|
+
if (typeof min === 'string') {
|
|
88
|
+
return min.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
89
|
+
}
|
|
90
|
+
return salla.money(min.amount, min.currency);
|
|
91
|
+
}
|
|
92
|
+
formatExpiry() {
|
|
93
|
+
const d = this.coupon?.expiry_date;
|
|
94
|
+
if (!d)
|
|
95
|
+
return '';
|
|
96
|
+
return new Date(d).toLocaleDateString(Salla.lang.locale || 'en-GB');
|
|
97
|
+
}
|
|
98
|
+
renderSkeleton() {
|
|
99
|
+
return (h("div", { class: "s-next-order-coupon-wrapper s-next-order-coupon-skeleton" }, h("div", { class: "s-next-order-coupon-inner" }, h("div", { class: "s-next-order-coupon-info" }, h("salla-skeleton", { type: "normal", width: "48px", height: "48px" }), h("div", { class: "s-next-order-coupon-details" }, h("salla-skeleton", { height: "14px", width: "220px" }), h("salla-skeleton", { height: "12px", width: "140px" }))), h("div", { class: "s-next-order-coupon-actions" }, h("salla-skeleton", { height: "40px", width: "140px" }), h("salla-skeleton", { height: "40px", width: "100px" })))));
|
|
100
|
+
}
|
|
101
|
+
renderTitle() {
|
|
102
|
+
const amount = this.formatAmount();
|
|
103
|
+
const tpl = this.isPercentage() ? this.titlePercentTpl : this.titleFixedTpl;
|
|
104
|
+
const placeholder = this.isPercentage() ? ':amount%' : ':amount';
|
|
105
|
+
const parts = tpl.split(placeholder);
|
|
106
|
+
return (h("p", { class: "s-next-order-coupon-title" }, parts[0], h("span", { class: "s-next-order-coupon-amount" }, amount), parts[1] || ''));
|
|
107
|
+
}
|
|
108
|
+
render() {
|
|
109
|
+
if (this.isLoading)
|
|
110
|
+
return this.renderSkeleton();
|
|
111
|
+
if (!this.coupon)
|
|
112
|
+
return null;
|
|
113
|
+
const minSpend = this.formatMinSpend();
|
|
114
|
+
const expiry = this.formatExpiry();
|
|
115
|
+
return (h("div", { class: "s-next-order-coupon-wrapper" }, h("div", { class: "s-next-order-coupon-inner" }, h("div", { class: "s-next-order-coupon-info" }, h("div", { class: "s-next-order-coupon-icon-wrap" }, h("span", { class: "s-next-order-coupon-icon-bg" }), h("span", { class: "s-next-order-coupon-icon", innerHTML: TagMoneyIcon })), h("div", { class: "s-next-order-coupon-details" }, h("div", { class: "s-next-order-coupon-title-row" }, this.renderTitle(), h("span", { class: "s-next-order-coupon-badge" }, h("span", { class: "s-next-order-coupon-badge-bg" }), h("span", { class: "s-next-order-coupon-badge-text" }, this.badgeLabel))), (minSpend || expiry) && (h("p", { class: "s-next-order-coupon-meta" }, minSpend && (h("span", { innerHTML: this.minSpendTpl.replace(':amount', minSpend) })), expiry && (h("span", null, this.expiresTpl.replace(':date', expiry))))))), h("div", { class: "s-next-order-coupon-actions" }, h("div", { class: "s-next-order-coupon-code-box" }, h("span", { class: "s-next-order-coupon-code-text" }, this.coupon.code), h("salla-button", { shape: "link", class: "s-next-order-coupon-copy-btn", title: this.copyLabel, onClick: () => this.copyCode() }, h("span", { class: "s-next-order-coupon-copy-icon", innerHTML: SwapStrokeIcon }))), h("salla-button", { href: salla.url.get(''), class: "s-next-order-coupon-shop-btn" }, this.shopNowLabel)))));
|
|
116
|
+
}
|
|
117
|
+
static get is() { return "salla-next-order-coupon"; }
|
|
118
|
+
static get originalStyleUrls() {
|
|
119
|
+
return {
|
|
120
|
+
"$": ["salla-next-order-coupon.scss"]
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
static get styleUrls() {
|
|
124
|
+
return {
|
|
125
|
+
"$": ["salla-next-order-coupon.css"]
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
static get states() {
|
|
129
|
+
return {
|
|
130
|
+
"coupon": {},
|
|
131
|
+
"isLoading": {},
|
|
132
|
+
"titlePercentTpl": {},
|
|
133
|
+
"titleFixedTpl": {},
|
|
134
|
+
"badgeLabel": {},
|
|
135
|
+
"minSpendTpl": {},
|
|
136
|
+
"expiresTpl": {},
|
|
137
|
+
"shopNowLabel": {},
|
|
138
|
+
"copyLabel": {},
|
|
139
|
+
"copiedLabel": {}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|