@salla.sa/twilight-components 2.14.482 → 2.14.484
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-BHXz3A1Q.js → filepond-CgzJykLb.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-B1el8oDJ.js → filepond-plugin-file-poster-QDPQ7mwB.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-D5kDke66.js → filepond-plugin-file-validate-size-Bad-w2I9.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CUvuoQyP.js → filepond-plugin-file-validate-type-DISG2_qB.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-C5LY3BCc.js → filepond-plugin-image-edit-CVHAGWaB.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DzmSRK6Z.js → filepond-plugin-image-exif-orientation-Dwsj5VyO.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Dy70l4bq.js → filepond-plugin-image-preview-I9g9nrNa.js} +1 -1
- package/dist/cjs/{functions-Cxbc6q17.js → functions-hUb6T9a1.js} +1 -1
- package/dist/cjs/{index-BjphdATw.js → index-BADADy4V.js} +1 -1
- package/dist/cjs/{index-B9uuwC5y.js → index-BKQzclgF.js} +2 -6
- 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 +66 -7
- 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_2.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 +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- 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 +1 -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-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-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_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.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-branch.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-options-modal_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +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-embed.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 +22 -6
- 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 +3 -3
- 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/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/{tracked-promise-DBpdtaXl.js → tracked-promise-czeUB0TX.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-cyq6K0DC.js → vanilla-picker-CuMQuW8m.js} +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/salla-product-options/availability-utils.js +46 -4
- package/dist/collection/components/salla-product-options/salla-product-options.js +39 -2
- package/dist/collection/components/salla-products-list/salla-products-list.js +21 -5
- package/dist/components/index.js +2 -2
- package/dist/components/salla-product-options2.js +66 -6
- package/dist/components/salla-products-list2.js +21 -5
- package/dist/esm/{filepond-DAX5UEU5.js → filepond-BOBokEx5.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CmoCs5ch.js → filepond-plugin-file-poster-D9HYZEnq.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Cx-BnpL2.js → filepond-plugin-file-validate-size-B1BkZh58.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DWn1unek.js → filepond-plugin-file-validate-type-CT0ni0hb.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CB-tZOhi.js → filepond-plugin-image-edit-CvSKiYON.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BoE-WIq-.js → filepond-plugin-image-exif-orientation-Cu1zifQ6.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CqzJUKHP.js → filepond-plugin-image-preview-6m913ljw.js} +1 -1
- package/dist/esm/{functions-hQdz9hf-.js → functions-CioYIS_L.js} +1 -1
- package/dist/esm/{index-DTEQDm6d.js → index-CiFCAiRL.js} +1 -1
- package/dist/esm/{index-BmFJLtoi.js → index-k6XsozPW.js} +2 -6
- 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 +66 -7
- 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_2.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- 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 +1 -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-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-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_2.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item.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-branch.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-options-modal_3.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +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-embed.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +22 -6
- 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 +3 -3
- 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/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/{tracked-promise-BoBzcOVR.js → tracked-promise-CdkA_JjX.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CsxkkcBh.js → vanilla-picker-BZWJ0V9v.js} +1 -1
- package/dist/twilight/p-01a4c68d.entry.js +4 -0
- package/dist/twilight/{p-f83f5f79.entry.js → p-027b0223.entry.js} +1 -1
- package/dist/twilight/{p-25bdb907.entry.js → p-0567c659.entry.js} +1 -1
- package/dist/twilight/{p-3bae4143.entry.js → p-0882266c.entry.js} +1 -1
- package/dist/twilight/{p-1e3bca03.entry.js → p-08fe51be.entry.js} +1 -1
- package/dist/twilight/{p-66eccd4e.entry.js → p-10d25bed.entry.js} +1 -1
- package/dist/twilight/{p-1671c056.entry.js → p-12221625.entry.js} +1 -1
- package/dist/twilight/{p-fb23d620.entry.js → p-1308a7f4.entry.js} +1 -1
- package/dist/twilight/{p-495097b0.entry.js → p-159fb121.entry.js} +1 -1
- package/dist/twilight/{p-ccac7ed0.entry.js → p-1d8eeff8.entry.js} +1 -1
- package/dist/twilight/{p-0d7bbb06.entry.js → p-215f22bf.entry.js} +1 -1
- package/dist/twilight/{p-a9f88f85.entry.js → p-236d6236.entry.js} +1 -1
- package/dist/twilight/{p-e74d8459.entry.js → p-277fa567.entry.js} +1 -1
- package/dist/twilight/{p-23e3eb95.entry.js → p-2b80d6bd.entry.js} +1 -1
- package/dist/twilight/{p-b48ba32a.entry.js → p-338810f6.entry.js} +1 -1
- package/dist/twilight/{p-72d2b19f.entry.js → p-34bb19ed.entry.js} +1 -1
- package/dist/twilight/{p-8c729878.entry.js → p-38831a43.entry.js} +1 -1
- package/dist/twilight/{p-8d2a81b0.entry.js → p-3be35606.entry.js} +1 -1
- package/dist/twilight/{p-Ce6fXRqk.js → p-3nNP8OVW.js} +1 -1
- package/dist/twilight/{p-9e6cb545.entry.js → p-4361f318.entry.js} +1 -1
- package/dist/twilight/{p-6db3f67b.entry.js → p-43caeaa9.entry.js} +1 -1
- package/dist/twilight/p-43e35e87.entry.js +4 -0
- package/dist/twilight/{p-3f249ea4.entry.js → p-48c49122.entry.js} +1 -1
- package/dist/twilight/{p-c4a37061.entry.js → p-4a2522e6.entry.js} +1 -1
- package/dist/twilight/{p-190364a4.entry.js → p-4a466458.entry.js} +1 -1
- package/dist/twilight/{p-0f2a8072.entry.js → p-4ccb7dbf.entry.js} +1 -1
- package/dist/twilight/{p-d243a973.entry.js → p-4cdc5eb0.entry.js} +1 -1
- package/dist/twilight/{p-b2c65720.entry.js → p-54feea36.entry.js} +1 -1
- package/dist/twilight/{p-c13103f9.entry.js → p-5d0017eb.entry.js} +1 -1
- package/dist/twilight/{p-f1e04195.entry.js → p-5e6745be.entry.js} +1 -1
- package/dist/twilight/{p-96467104.entry.js → p-6221c7fd.entry.js} +1 -1
- package/dist/twilight/{p-bb4affa3.entry.js → p-65986434.entry.js} +1 -1
- package/dist/twilight/{p-de6b5801.entry.js → p-65e84413.entry.js} +1 -1
- package/dist/twilight/{p-4e9a9071.entry.js → p-67b9bef4.entry.js} +1 -1
- package/dist/twilight/{p-0209568e.entry.js → p-680ee21a.entry.js} +1 -1
- package/dist/twilight/{p-78a9880e.entry.js → p-69f6aea4.entry.js} +1 -1
- package/dist/twilight/{p-410a4744.entry.js → p-6a520655.entry.js} +1 -1
- package/dist/twilight/{p-6387b132.entry.js → p-6b622cdf.entry.js} +1 -1
- package/dist/twilight/{p-b47719b5.entry.js → p-6b7a391d.entry.js} +1 -1
- package/dist/twilight/{p-739c39e9.entry.js → p-6bcd63ae.entry.js} +1 -1
- package/dist/twilight/{p-e095a7d1.entry.js → p-6e708a89.entry.js} +1 -1
- package/dist/twilight/{p-5622f4cb.entry.js → p-6fce9b27.entry.js} +1 -1
- package/dist/twilight/{p-08c5b2bb.entry.js → p-6fd14051.entry.js} +1 -1
- package/dist/twilight/{p-034745a7.entry.js → p-71371a68.entry.js} +1 -1
- package/dist/twilight/{p-1630fc53.entry.js → p-78b63b85.entry.js} +1 -1
- package/dist/twilight/{p-51126a79.entry.js → p-7b9f7996.entry.js} +1 -1
- package/dist/twilight/{p-29f65d08.entry.js → p-7e16042a.entry.js} +1 -1
- package/dist/twilight/{p-fe6b38a8.entry.js → p-80898e8c.entry.js} +1 -1
- package/dist/twilight/{p-31153a53.entry.js → p-876984e8.entry.js} +1 -1
- package/dist/twilight/{p-6ce3edc6.entry.js → p-894d4262.entry.js} +1 -1
- package/dist/twilight/{p-5ed51ea1.entry.js → p-8fddef9f.entry.js} +1 -1
- package/dist/twilight/{p-180c0ca5.entry.js → p-910ca1ce.entry.js} +1 -1
- package/dist/twilight/{p-7dc07299.entry.js → p-98bd4d1d.entry.js} +1 -1
- package/dist/twilight/{p-78246e72.entry.js → p-98cb2ad9.entry.js} +1 -1
- package/dist/twilight/{p-ec9b118c.entry.js → p-99372423.entry.js} +1 -1
- package/dist/twilight/{p-Bcg-je74.js → p-BjmKgRE2.js} +1 -1
- package/dist/twilight/{p-DGptAQB8.js → p-C6HZIai8.js} +1 -1
- package/dist/twilight/{p-B9arPRZj.js → p-C8JaiU7x.js} +1 -1
- package/dist/twilight/{p-DEKXmzPE.js → p-CYnG82Sr.js} +1 -1
- package/dist/twilight/{p-w8-d2MD6.js → p-DIe-ZaHw.js} +1 -1
- package/dist/twilight/{p-C95Jqawg.js → p-DThnTW1t.js} +1 -1
- package/dist/twilight/{p-DkoUjMC3.js → p-Do0Z2RvW.js} +1 -1
- package/dist/twilight/{p-WuZcMqCu.js → p-Dt7QetEN.js} +1 -1
- package/dist/twilight/{p-BV6J7gVl.js → p-RS-U17dA.js} +1 -1
- package/dist/twilight/{p-7d8b20c8.entry.js → p-a986efd7.entry.js} +1 -1
- package/dist/twilight/{p-4b3f6cd2.entry.js → p-ad24f7b7.entry.js} +1 -1
- package/dist/twilight/{p-dd208824.entry.js → p-ae1ff5a4.entry.js} +1 -1
- package/dist/twilight/{p-069d56cc.entry.js → p-ae40baf7.entry.js} +1 -1
- package/dist/twilight/{p-b5793358.entry.js → p-aefc937f.entry.js} +1 -1
- package/dist/twilight/p-af0f3c54.entry.js +4 -0
- package/dist/twilight/{p-1732f2b2.entry.js → p-afdcb549.entry.js} +1 -1
- package/dist/twilight/{p-e5336dcb.entry.js → p-b3b5f52a.entry.js} +1 -1
- package/dist/twilight/{p-ca0f40dc.entry.js → p-b4e487a3.entry.js} +1 -1
- package/dist/twilight/{p-52562de7.entry.js → p-b4e6ee26.entry.js} +1 -1
- package/dist/twilight/{p-2d92f08a.entry.js → p-b586e687.entry.js} +1 -1
- package/dist/twilight/{p-1f01e02d.entry.js → p-c4dd7259.entry.js} +1 -1
- package/dist/twilight/{p-7cc906fd.entry.js → p-c54b5512.entry.js} +1 -1
- package/dist/twilight/{p-8706b6a0.entry.js → p-ca338609.entry.js} +1 -1
- package/dist/twilight/{p-8a491693.entry.js → p-cd3a81d5.entry.js} +1 -1
- package/dist/twilight/p-df18ce74.entry.js +4 -0
- package/dist/twilight/{p-760bd859.entry.js → p-df2b2d2c.entry.js} +1 -1
- package/dist/twilight/{p-a99b352b.entry.js → p-df9735e4.entry.js} +1 -1
- package/dist/twilight/{p-096a708f.entry.js → p-e00ab427.entry.js} +1 -1
- package/dist/twilight/{p-5e4239e3.entry.js → p-e0eb1171.entry.js} +1 -1
- package/dist/twilight/{p-64980c56.entry.js → p-e2b9a669.entry.js} +1 -1
- package/dist/twilight/{p-def1cf41.entry.js → p-e7c43f45.entry.js} +1 -1
- package/dist/twilight/{p-57636818.entry.js → p-f04e749d.entry.js} +1 -1
- package/dist/twilight/{p-90475264.entry.js → p-f10c4351.entry.js} +1 -1
- package/dist/twilight/{p-08af584f.entry.js → p-f2155a0e.entry.js} +1 -1
- package/dist/twilight/{p-ad59d8f6.entry.js → p-f30850eb.entry.js} +1 -1
- package/dist/twilight/{p-16edb507.entry.js → p-f84a2d1f.entry.js} +1 -1
- package/dist/twilight/{p-88609f65.entry.js → p-f9d747fd.entry.js} +1 -1
- package/dist/twilight/{p-dc6ba997.entry.js → p-faecf830.entry.js} +1 -1
- package/dist/twilight/{p-b88ce9c1.entry.js → p-faedf801.entry.js} +1 -1
- package/dist/twilight/p-fc77d2ae.entry.js +4 -0
- package/dist/twilight/{p-d839d4ec.entry.js → p-fd0d78b0.entry.js} +1 -1
- package/dist/twilight/p-fda44045.entry.js +4 -0
- package/dist/twilight/{p-4a531040.entry.js → p-fe435826.entry.js} +1 -1
- package/dist/twilight/{p-BmFJLtoi.js → p-k6XsozPW.js} +1 -1
- package/dist/twilight/{p-DT96HiMD.js → p-k6hKHe3o.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-product-options/availability-utils.d.ts +8 -1
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +11 -0
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -0
- package/dist/types/components.d.ts +10 -37
- package/package.json +5 -5
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +0 -349
- package/dist/collection/components/salla-cart-summary-card/salla-cart-summary-card.js +0 -401
- package/dist/components/salla-cart-summary-card.d.ts +0 -11
- package/dist/components/salla-cart-summary-card.js +0 -404
- package/dist/esm/salla-cart-summary-card.entry.js +0 -347
- package/dist/twilight/p-04752b3a.entry.js +0 -4
- package/dist/twilight/p-15d93b1d.entry.js +0 -4
- package/dist/twilight/p-3de87ed4.entry.js +0 -4
- package/dist/twilight/p-5c4ee6f0.entry.js +0 -4
- package/dist/twilight/p-6023e80c.entry.js +0 -4
- package/dist/twilight/p-994bf3ae.entry.js +0 -4
- package/dist/twilight/p-f6796ea9.entry.js +0 -4
- package/dist/types/components/salla-cart-summary-card/salla-cart-summary-card.d.ts +0 -67
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
var index = require('./index-B9uuwC5y.js');
|
|
7
|
-
|
|
8
|
-
const SKELETON_ROWS = [
|
|
9
|
-
{ label: '100px', value: '56px' },
|
|
10
|
-
{ label: '72px', value: '64px' },
|
|
11
|
-
{ label: '96px', value: '48px' },
|
|
12
|
-
];
|
|
13
|
-
const SallaCartSummaryCard = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
index.registerInstance(this, hostRef);
|
|
16
|
-
this.validateForms = true;
|
|
17
|
-
this.cartCount = 0;
|
|
18
|
-
this.cartTotal = 0;
|
|
19
|
-
this.cartTotalDiscount = 0;
|
|
20
|
-
this.cartSubTotal = 0;
|
|
21
|
-
this.cartOptionsTotal = 0;
|
|
22
|
-
this.cartShippingCost = 0;
|
|
23
|
-
this.cartTaxAmount = 0;
|
|
24
|
-
this.cartHasShipping = false;
|
|
25
|
-
this.isOpen = false;
|
|
26
|
-
this.isDesktop = false;
|
|
27
|
-
/** True until the first cart payload (API response or cart event) arrives. */
|
|
28
|
-
this.isLoading = true;
|
|
29
|
-
// Original DOM location — needed to restore the host on the mobile→desktop flip.
|
|
30
|
-
this.originalParent = null;
|
|
31
|
-
this.originalNextSibling = null;
|
|
32
|
-
this.bodyObserver = null;
|
|
33
|
-
this.mediaQueryList = null;
|
|
34
|
-
this.submitObserver = null;
|
|
35
|
-
this.isSubmitting = false;
|
|
36
|
-
// Stable handler refs — anonymous functions can't be unbound from listeners.
|
|
37
|
-
this.mqlChangeHandler = (e) => {
|
|
38
|
-
this.isDesktop = e.matches;
|
|
39
|
-
this.applyMode();
|
|
40
|
-
};
|
|
41
|
-
this.cartEventNames = [
|
|
42
|
-
'cart::details.fetched',
|
|
43
|
-
'cart::updated',
|
|
44
|
-
'cart::latest.fetched',
|
|
45
|
-
'cart::coupon.added',
|
|
46
|
-
'cart::coupon.deleted',
|
|
47
|
-
];
|
|
48
|
-
this.cartEventHandler = (payload) => this.applyCartData(this.extractCart(payload));
|
|
49
|
-
this.toggleSheet = () => {
|
|
50
|
-
if (!this.isDesktop)
|
|
51
|
-
this.isOpen = !this.isOpen;
|
|
52
|
-
};
|
|
53
|
-
this.handleSubmit = async (event) => {
|
|
54
|
-
// Re-entrancy guard, set before the async validation so a second tap during
|
|
55
|
-
// that window can't fire a second submit. Covers all user types.
|
|
56
|
-
if (this.isSubmitting) {
|
|
57
|
-
event.preventDefault();
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
this.isSubmitting = true;
|
|
61
|
-
if (this.validateForms && !(await this.validateCartForms())) {
|
|
62
|
-
event.preventDefault();
|
|
63
|
-
salla.notify?.error?.(salla.lang?.get?.('common.messages.required_fields'));
|
|
64
|
-
this.isSubmitting = false; // validation failed → allow retry
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
const btn = this.host.querySelector('#s-cart-summary-card-submit');
|
|
68
|
-
if (typeof salla !== 'undefined' && salla.config?.get?.('user.type') !== 'guest' && btn) {
|
|
69
|
-
btn.load?.();
|
|
70
|
-
// Pin loading across re-renders; auto-clear after 10s so a failed submit
|
|
71
|
-
// doesn't lock the button forever.
|
|
72
|
-
this.submitObserver?.disconnect();
|
|
73
|
-
if (this.submitObserverTimeout)
|
|
74
|
-
clearTimeout(this.submitObserverTimeout);
|
|
75
|
-
this.submitObserver = new MutationObserver(() => {
|
|
76
|
-
if (!btn.hasAttribute('loading'))
|
|
77
|
-
btn.setAttribute('loading', '');
|
|
78
|
-
});
|
|
79
|
-
this.submitObserver.observe(btn, { attributes: true, attributeFilter: ['loading'] });
|
|
80
|
-
this.submitObserverTimeout = window.setTimeout(() => {
|
|
81
|
-
this.submitObserver?.disconnect();
|
|
82
|
-
this.submitObserver = null;
|
|
83
|
-
btn.removeAttribute?.('loading');
|
|
84
|
-
}, 10000);
|
|
85
|
-
}
|
|
86
|
-
salla.cart?.submit?.();
|
|
87
|
-
// Release after submit kicks off: success navigates away, a guest opens the
|
|
88
|
-
// login modal. Short delay blocks the double-tap race without a long lock.
|
|
89
|
-
window.setTimeout(() => { this.isSubmitting = false; }, 1500);
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
// Sync: returning a promise would make Stencil defer first paint. init() runs async.
|
|
93
|
-
componentWillLoad() {
|
|
94
|
-
this.mediaQueryList = window.matchMedia(this.desktopMediaQuery());
|
|
95
|
-
this.isDesktop = this.mediaQueryList.matches;
|
|
96
|
-
if (this.isDesktop)
|
|
97
|
-
this.isOpen = true;
|
|
98
|
-
// isLoading is true by default → first paint is the skeleton.
|
|
99
|
-
this.init();
|
|
100
|
-
}
|
|
101
|
-
// Not awaited by componentWillLoad, so it can't block first paint.
|
|
102
|
-
async init() {
|
|
103
|
-
await salla.onReady();
|
|
104
|
-
await salla.lang.onLoaded();
|
|
105
|
-
this.loadTranslations();
|
|
106
|
-
// 'cart::updated' is in cartEventNames — don't also use onUpdated (it leaks, no off()).
|
|
107
|
-
this.cartEventNames.forEach(name => salla.event.on(name, this.cartEventHandler));
|
|
108
|
-
this.fetchCart();
|
|
109
|
-
}
|
|
110
|
-
loadTranslations() {
|
|
111
|
-
this.summaryLabel = salla.lang.get('pages.cart.summary');
|
|
112
|
-
this.itemsTotalLabel = salla.lang.get('pages.cart.items_total');
|
|
113
|
-
this.itemsTotalNoTaxLabel = salla.lang.get('pages.cart.items_total_without_tax');
|
|
114
|
-
this.optionsTotalLabel = salla.lang.get('pages.cart.order_options_total');
|
|
115
|
-
this.shippingCostLabel = salla.lang.get('pages.cart.shipping_cost');
|
|
116
|
-
this.vatTaxLabel = salla.lang.get('pages.cart.VAT_tax_amount');
|
|
117
|
-
this.savedLabel = salla.lang.get('pages.cart.discount');
|
|
118
|
-
this.discountBadge = salla.lang.get('pages.cart.saved');
|
|
119
|
-
this.finalTotalLabel = salla.lang.get('pages.cart.final_total');
|
|
120
|
-
this.pricesTaxedLabel = salla.lang.get('pages.cart.prices_taxed');
|
|
121
|
-
this.completeOrderLabel = salla.lang.get('pages.cart.complete_order');
|
|
122
|
-
this.openSummaryLabel = salla.lang.get('pages.cart.open_summary');
|
|
123
|
-
this.closeSummaryLabel = salla.lang.get('pages.cart.close_summary');
|
|
124
|
-
this.itemsCountTemplate = salla.lang.get('pages.cart.items_with_count');
|
|
125
|
-
}
|
|
126
|
-
/** Coerces PHP cart values: numbers, strings, and Money/MoneyTaxable objects. */
|
|
127
|
-
num(v) {
|
|
128
|
-
if (v === null || v === undefined)
|
|
129
|
-
return 0;
|
|
130
|
-
if (typeof v === 'number')
|
|
131
|
-
return isFinite(v) ? v : 0;
|
|
132
|
-
if (typeof v === 'string')
|
|
133
|
-
return parseFloat(v) || 0;
|
|
134
|
-
if (typeof v === 'object') {
|
|
135
|
-
if ('amount' in v)
|
|
136
|
-
return this.num(v.amount);
|
|
137
|
-
if ('value' in v)
|
|
138
|
-
return this.num(v.value);
|
|
139
|
-
if ('formatted' in v)
|
|
140
|
-
return this.num(v.formatted);
|
|
141
|
-
}
|
|
142
|
-
return 0;
|
|
143
|
-
}
|
|
144
|
-
// Desktop cutoff — must match the SCSS media queries so JS and CSS never diverge.
|
|
145
|
-
breakpointPx() {
|
|
146
|
-
return 1024;
|
|
147
|
-
}
|
|
148
|
-
desktopMediaQuery() {
|
|
149
|
-
return `(min-width: ${this.breakpointPx()}px)`;
|
|
150
|
-
}
|
|
151
|
-
componentDidLoad() {
|
|
152
|
-
// Capture original location BEFORE the portal relocates the host.
|
|
153
|
-
this.originalParent = this.host.parentElement;
|
|
154
|
-
this.originalNextSibling = this.host.nextSibling;
|
|
155
|
-
// Re-init if componentWillLoad failed to set it (rare hydration/race edge case).
|
|
156
|
-
if (!this.mediaQueryList) {
|
|
157
|
-
this.mediaQueryList = window.matchMedia(this.desktopMediaQuery());
|
|
158
|
-
this.isDesktop = this.mediaQueryList.matches;
|
|
159
|
-
}
|
|
160
|
-
this.applyMode();
|
|
161
|
-
// iOS Safari < 14 lacks addEventListener on MediaQueryList — fall back to addListener.
|
|
162
|
-
if (this.mediaQueryList.addEventListener) {
|
|
163
|
-
this.mediaQueryList.addEventListener('change', this.mqlChangeHandler);
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
this.mediaQueryList.addListener(this.mqlChangeHandler);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
// Mobile: portal host to <body> so position:fixed escapes any transformed
|
|
170
|
-
// ancestor. Desktop: restore to its original DOM location.
|
|
171
|
-
applyMode() {
|
|
172
|
-
if (this.isDesktop) {
|
|
173
|
-
this.isOpen = true;
|
|
174
|
-
this.bodyObserver?.disconnect();
|
|
175
|
-
this.bodyObserver = null;
|
|
176
|
-
if (this.originalParent && this.host.parentElement !== this.originalParent) {
|
|
177
|
-
// Sibling may have been removed while we were portaled — fall back
|
|
178
|
-
// to appendChild instead of letting insertBefore throw.
|
|
179
|
-
const ref = this.originalNextSibling?.parentNode === this.originalParent
|
|
180
|
-
? this.originalNextSibling
|
|
181
|
-
: null;
|
|
182
|
-
this.originalParent.insertBefore(this.host, ref);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
this.pinToBodyEnd();
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
// Re-pin via MutationObserver so a late-mounted footer can't paint over us.
|
|
190
|
-
pinToBodyEnd() {
|
|
191
|
-
if (this.host.parentElement !== document.body || document.body.lastElementChild !== this.host) {
|
|
192
|
-
document.body.appendChild(this.host);
|
|
193
|
-
}
|
|
194
|
-
if (!this.bodyObserver) {
|
|
195
|
-
this.bodyObserver = new MutationObserver(() => {
|
|
196
|
-
if (!this.isDesktop && document.body.lastElementChild !== this.host) {
|
|
197
|
-
document.body.appendChild(this.host);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
this.bodyObserver.observe(document.body, { childList: true });
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
disconnectedCallback() {
|
|
204
|
-
// Fires synchronously on every removal, incl. our own reparenting — defer a
|
|
205
|
-
// microtask and bail if reconnected, else the portal loses its listeners.
|
|
206
|
-
Promise.resolve().then(() => {
|
|
207
|
-
if (this.host.isConnected)
|
|
208
|
-
return;
|
|
209
|
-
this.bodyObserver?.disconnect();
|
|
210
|
-
this.submitObserver?.disconnect();
|
|
211
|
-
if (this.submitObserverTimeout) {
|
|
212
|
-
clearTimeout(this.submitObserverTimeout);
|
|
213
|
-
this.submitObserverTimeout = undefined;
|
|
214
|
-
}
|
|
215
|
-
// Mirror the iOS-Safari-<14 path used in componentDidLoad.
|
|
216
|
-
if (this.mediaQueryList?.removeEventListener) {
|
|
217
|
-
this.mediaQueryList.removeEventListener('change', this.mqlChangeHandler);
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
this.mediaQueryList?.removeListener(this.mqlChangeHandler);
|
|
221
|
-
}
|
|
222
|
-
this.mediaQueryList = null;
|
|
223
|
-
this.cartEventNames.forEach(name => salla.event.off(name, this.cartEventHandler));
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
fetchCart() {
|
|
227
|
-
const cartId = salla.config?.get?.('page.id');
|
|
228
|
-
const result = salla.cart?.api?.details?.(cartId);
|
|
229
|
-
if (result && typeof result.then === 'function') {
|
|
230
|
-
result
|
|
231
|
-
.then((res) => this.applyCartData(this.extractCart(res)))
|
|
232
|
-
// On failure, fall back to the cached summary instead of stranding the skeleton.
|
|
233
|
-
.catch(() => this.applyCachedSummary());
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
236
|
-
this.applyCachedSummary();
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
// Cart API failed → use the SDK's cached summary (localStorage, set on
|
|
240
|
-
// cart::updated). May be stale but beats zeros; events refresh it. Clears the
|
|
241
|
-
// skeleton either way so the CTA always renders.
|
|
242
|
-
applyCachedSummary() {
|
|
243
|
-
const summary = salla.storage?.get?.('cart.summary');
|
|
244
|
-
if (summary && typeof summary === 'object')
|
|
245
|
-
this.applyCartData(summary);
|
|
246
|
-
this.isLoading = false;
|
|
247
|
-
}
|
|
248
|
-
extractCart(payload) {
|
|
249
|
-
if (!payload)
|
|
250
|
-
return null;
|
|
251
|
-
if (payload.data?.cart)
|
|
252
|
-
return payload.data.cart;
|
|
253
|
-
if (payload.cart)
|
|
254
|
-
return payload.cart;
|
|
255
|
-
return payload;
|
|
256
|
-
}
|
|
257
|
-
applyCartData(data) {
|
|
258
|
-
if (!data)
|
|
259
|
-
return;
|
|
260
|
-
// First real payload ends the skeleton.
|
|
261
|
-
this.isLoading = false;
|
|
262
|
-
if (data.count !== undefined)
|
|
263
|
-
this.cartCount = this.num(data.count);
|
|
264
|
-
if (data.total !== undefined)
|
|
265
|
-
this.cartTotal = this.num(data.total);
|
|
266
|
-
// `total_discount` is the live field (untyped); `discount` is the typed fallback.
|
|
267
|
-
const discount = data.total_discount ?? data.discount;
|
|
268
|
-
if (discount !== undefined)
|
|
269
|
-
this.cartTotalDiscount = this.num(discount);
|
|
270
|
-
if (data.sub_total !== undefined)
|
|
271
|
-
this.cartSubTotal = this.num(data.sub_total);
|
|
272
|
-
if (data.options_total !== undefined)
|
|
273
|
-
this.cartOptionsTotal = this.num(data.options_total);
|
|
274
|
-
if (data.tax_amount !== undefined)
|
|
275
|
-
this.cartTaxAmount = this.num(data.tax_amount);
|
|
276
|
-
// Shipping cost (free-shipping aware): prefer `shipping_cost`, else `real_shipping_cost`.
|
|
277
|
-
const hasFreeShipping = !!data.free_shipping_bar?.has_free_shipping;
|
|
278
|
-
if (data.shipping_cost !== undefined)
|
|
279
|
-
this.cartShippingCost = this.num(data.shipping_cost);
|
|
280
|
-
else if (data.real_shipping_cost !== undefined)
|
|
281
|
-
this.cartShippingCost = hasFreeShipping ? 0 : this.num(data.real_shipping_cost);
|
|
282
|
-
// `has_shipping` isn't in the API response — derive row visibility from the cost.
|
|
283
|
-
this.cartHasShipping = this.cartShippingCost > 0 || !!data.has_shipping;
|
|
284
|
-
}
|
|
285
|
-
// Native reportValidity() covers standard fields; custom product options
|
|
286
|
-
// validate via their own async reportValidity() (incl. multi-option required
|
|
287
|
-
// logic), so await that too — else option validation is skipped at checkout.
|
|
288
|
-
async validateCartForms() {
|
|
289
|
-
let isValid = true;
|
|
290
|
-
document
|
|
291
|
-
.querySelectorAll('form[id^="item-"]')
|
|
292
|
-
.forEach(f => {
|
|
293
|
-
if (!f.reportValidity())
|
|
294
|
-
isValid = false;
|
|
295
|
-
});
|
|
296
|
-
const optionEls = Array.from(document.querySelectorAll('form[id^="item-"] salla-product-options'));
|
|
297
|
-
for (const el of optionEls) {
|
|
298
|
-
if (typeof el.reportValidity === 'function' && !(await el.reportValidity()))
|
|
299
|
-
isValid = false;
|
|
300
|
-
}
|
|
301
|
-
return isValid;
|
|
302
|
-
}
|
|
303
|
-
money(value) {
|
|
304
|
-
try {
|
|
305
|
-
if (typeof salla !== 'undefined' && typeof salla.money === 'function') {
|
|
306
|
-
return salla.money(value);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
catch (_) { }
|
|
310
|
-
return String(value ?? 0);
|
|
311
|
-
}
|
|
312
|
-
getItemsLabel() {
|
|
313
|
-
return this.itemsCountTemplate?.replace(':count', String(this.cartCount)) ?? '';
|
|
314
|
-
}
|
|
315
|
-
// Skeleton during the initial fetch
|
|
316
|
-
renderSkeleton() {
|
|
317
|
-
return (index.h(index.Host, { class: {
|
|
318
|
-
's-cart-summary-card': true,
|
|
319
|
-
's-cart-summary-card--loading': true,
|
|
320
|
-
's-cart-summary-card--desktop': this.isDesktop,
|
|
321
|
-
's-cart-summary-card--mobile': !this.isDesktop,
|
|
322
|
-
} }, this.isDesktop && (index.h("div", { class: "s-cart-summary-card-sheet-wrap s-cart-summary-card-sheet-wrap--open" }, index.h("div", { class: "s-cart-summary-card-sheet" }, index.h("header", { class: "s-cart-summary-card-sheet-header" }, index.h("h3", { class: "s-cart-summary-card-sheet-title" }, index.h("salla-skeleton", { width: "140px", height: "16px" }))), SKELETON_ROWS.map(({ label, value }, i) => (index.h("div", { class: "s-cart-summary-card-line", key: i }, index.h("salla-skeleton", { width: label, height: "16px" }), index.h("salla-skeleton", { width: value, height: "16px" }))))))), index.h("div", { class: "s-cart-summary-card-bar" }, index.h("div", { class: "s-cart-summary-card-bar-label" }, index.h("div", { class: "s-cart-summary-card-bar-label-main" }, index.h("salla-skeleton", { width: "90px", height: "16px" }), index.h("salla-skeleton", { width: "48px", height: "12px" }))), index.h("div", { class: "s-cart-summary-card-bar-totals" }, index.h("div", { class: "s-cart-summary-card-bar-totals-row" }, index.h("salla-skeleton", { width: "80px", height: "20px" })))), index.h("div", { class: "s-cart-summary-card-action" }, index.h("salla-skeleton", { width: "100%", height: "44px" }))));
|
|
323
|
-
}
|
|
324
|
-
render() {
|
|
325
|
-
if (this.isLoading)
|
|
326
|
-
return this.renderSkeleton();
|
|
327
|
-
const showSavings = this.cartTotalDiscount > 0;
|
|
328
|
-
const subTotalLabel = this.cartTaxAmount ? this.itemsTotalNoTaxLabel : this.itemsTotalLabel;
|
|
329
|
-
// Inline transform so sheet motion doesn't depend on SCSS load order.
|
|
330
|
-
const sheetStyle = this.isDesktop
|
|
331
|
-
? {}
|
|
332
|
-
: {
|
|
333
|
-
transform: this.isOpen ? 'translateY(0)' : 'translateY(100%)',
|
|
334
|
-
transition: 'transform 0.4s cubic-bezier(0.32, 0.72, 0, 1)',
|
|
335
|
-
};
|
|
336
|
-
return (index.h(index.Host, { class: {
|
|
337
|
-
's-cart-summary-card': true,
|
|
338
|
-
's-cart-summary-card--open': this.isOpen,
|
|
339
|
-
's-cart-summary-card--desktop': this.isDesktop,
|
|
340
|
-
's-cart-summary-card--mobile': !this.isDesktop,
|
|
341
|
-
} }, index.h("div", { class: {
|
|
342
|
-
's-cart-summary-card-sheet-wrap': true,
|
|
343
|
-
's-cart-summary-card-sheet-wrap--open': this.isOpen,
|
|
344
|
-
}, "aria-hidden": this.isOpen ? 'false' : 'true' }, index.h("div", { class: "s-cart-summary-card-sheet", style: sheetStyle }, index.h("header", { class: "s-cart-summary-card-sheet-header" }, index.h("h3", { class: "s-cart-summary-card-sheet-title" }, this.summaryLabel)), index.h("div", { class: "s-cart-summary-card-line" }, index.h("span", null, subTotalLabel), index.h("b", { innerHTML: this.money(this.cartSubTotal) })), this.cartOptionsTotal > 0 && (index.h("div", { class: "s-cart-summary-card-line" }, index.h("span", null, this.optionsTotalLabel), index.h("b", { innerHTML: this.money(this.cartOptionsTotal) }))), this.cartHasShipping && (index.h("div", { class: "s-cart-summary-card-line" }, index.h("span", null, this.shippingCostLabel), index.h("b", { innerHTML: this.money(this.cartShippingCost) }))), this.cartTaxAmount > 0 && (index.h("div", { class: "s-cart-summary-card-line" }, index.h("span", null, this.vatTaxLabel), index.h("b", { innerHTML: this.money(this.cartTaxAmount) }))), showSavings && (index.h("div", { class: "s-cart-summary-card-line s-cart-summary-card-line--discount" }, index.h("span", null, this.savedLabel), index.h("b", null, "\u2212 ", index.h("span", { innerHTML: this.money(this.cartTotalDiscount) })))))), index.h("div", { class: "s-cart-summary-card-bar" }, index.h("div", { class: "s-cart-summary-card-bar-label" }, index.h("div", { class: "s-cart-summary-card-bar-label-main" }, index.h("span", { class: "s-cart-summary-card-bar-label-text" }, this.finalTotalLabel), index.h("span", { class: "s-cart-summary-card-bar-count" }, this.getItemsLabel())), this.cartTaxAmount > 0 && (index.h("div", { class: "s-cart-summary-card-bar-label-sub" }, this.pricesTaxedLabel))), index.h("div", { class: "s-cart-summary-card-bar-totals" }, index.h("div", { class: "s-cart-summary-card-bar-totals-row" }, showSavings && (index.h("s", { class: "s-cart-summary-card-bar-original" }, salla.helpers.number(this.cartTotal + this.cartTotalDiscount))), index.h("b", { class: "s-cart-summary-card-bar-total", innerHTML: this.money(this.cartTotal) }), !this.isDesktop && (index.h("button", { type: "button", class: "s-cart-summary-card-chevron", "aria-label": this.isOpen ? this.closeSummaryLabel : this.openSummaryLabel, "aria-expanded": this.isOpen ? 'true' : 'false', onClick: this.toggleSheet }, index.h("i", { class: "sicon-keyboard_arrow_up s-cart-summary-card-chevron-icon" })))), showSavings && (index.h("div", { class: "s-cart-summary-card-bar-savings-badge" }, index.h("span", { "aria-hidden": "true" }, "\uD83C\uDF89"), index.h("span", null, this.discountBadge, " ", index.h("span", { innerHTML: this.money(this.cartTotalDiscount) })))))), index.h("div", { class: "s-cart-summary-card-action" }, index.h("salla-button", { id: "s-cart-summary-card-submit", width: "wide", "loader-position": "center", onClick: this.handleSubmit }, this.completeOrderLabel))));
|
|
345
|
-
}
|
|
346
|
-
get host() { return index.getElement(this); }
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
exports.salla_cart_summary_card = SallaCartSummaryCard;
|