@salla.sa/twilight-components 2.14.480 → 2.14.482
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-kIwfFiY4.js → filepond-BHXz3A1Q.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CbAmZLgn.js → filepond-plugin-file-poster-B1el8oDJ.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-iH_0ezqS.js → filepond-plugin-file-validate-size-D5kDke66.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-B2YOvyGf.js → filepond-plugin-file-validate-type-CUvuoQyP.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-C5N-16uI.js → filepond-plugin-image-edit-C5LY3BCc.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-aEzbNMDw.js → filepond-plugin-image-exif-orientation-DzmSRK6Z.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-RLbA7gqX.js → filepond-plugin-image-preview-Dy70l4bq.js} +1 -1
- package/dist/cjs/{functions-BVKjPPbN.js → functions-Cxbc6q17.js} +1 -1
- package/dist/cjs/{index-RKu7wZSM.js → index-B9uuwC5y.js} +6 -2
- package/dist/cjs/{index-DjrWrGKt.js → index-BjphdATw.js} +1 -1
- 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_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-cart-summary-card.cjs.entry.js +349 -0
- 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 +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 +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-B8pdpxb2.js → tracked-promise-DBpdtaXl.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-B6Vd66w8.js → vanilla-picker-cyq6K0DC.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-cart-summary-card/salla-cart-summary-card.js +401 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-cart-summary-card.d.ts +11 -0
- package/dist/components/salla-cart-summary-card.js +404 -0
- package/dist/esm/{filepond-BUxO340w.js → filepond-DAX5UEU5.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DPDWNTQe.js → filepond-plugin-file-poster-CmoCs5ch.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DrF6W6HS.js → filepond-plugin-file-validate-size-Cx-BnpL2.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-ByNgdCcv.js → filepond-plugin-file-validate-type-DWn1unek.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-D6lcie1e.js → filepond-plugin-image-edit-CB-tZOhi.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CEGVilMd.js → filepond-plugin-image-exif-orientation-BoE-WIq-.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BInmqvtQ.js → filepond-plugin-image-preview-CqzJUKHP.js} +1 -1
- package/dist/esm/{functions-CwbqVd0b.js → functions-hQdz9hf-.js} +1 -1
- package/dist/esm/{index-BqFb60iF.js → index-BmFJLtoi.js} +6 -2
- package/dist/esm/{index-BrHfsf3-.js → index-DTEQDm6d.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_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-cart-summary-card.entry.js +347 -0
- 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 +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 +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-DXr0erHx.js → tracked-promise-BoBzcOVR.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-5UIlzk8V.js → vanilla-picker-CsxkkcBh.js} +1 -1
- package/dist/twilight/{p-0c77267c.entry.js → p-0209568e.entry.js} +1 -1
- package/dist/twilight/{p-f4531bfe.entry.js → p-034745a7.entry.js} +1 -1
- package/dist/twilight/p-04752b3a.entry.js +4 -0
- package/dist/twilight/{p-57d40198.entry.js → p-069d56cc.entry.js} +1 -1
- package/dist/twilight/{p-43474ee2.entry.js → p-08af584f.entry.js} +1 -1
- package/dist/twilight/{p-91dc3de7.entry.js → p-08c5b2bb.entry.js} +1 -1
- package/dist/twilight/{p-778a42dc.entry.js → p-096a708f.entry.js} +1 -1
- package/dist/twilight/{p-b4301ee3.entry.js → p-0d7bbb06.entry.js} +1 -1
- package/dist/twilight/{p-cd3e9b52.entry.js → p-0f2a8072.entry.js} +1 -1
- package/dist/twilight/{p-3d68c74d.entry.js → p-15d93b1d.entry.js} +1 -1
- package/dist/twilight/{p-dfd88e06.entry.js → p-1630fc53.entry.js} +1 -1
- package/dist/twilight/{p-0fd430cd.entry.js → p-1671c056.entry.js} +1 -1
- package/dist/twilight/{p-9f5105fc.entry.js → p-16edb507.entry.js} +1 -1
- package/dist/twilight/{p-1a719573.entry.js → p-1732f2b2.entry.js} +1 -1
- package/dist/twilight/{p-46b9277f.entry.js → p-180c0ca5.entry.js} +1 -1
- package/dist/twilight/{p-a0855c31.entry.js → p-190364a4.entry.js} +1 -1
- package/dist/twilight/{p-e7c12354.entry.js → p-1e3bca03.entry.js} +1 -1
- package/dist/twilight/{p-d0bb3653.entry.js → p-1f01e02d.entry.js} +1 -1
- package/dist/twilight/{p-09373418.entry.js → p-23e3eb95.entry.js} +1 -1
- package/dist/twilight/{p-d66338e0.entry.js → p-25bdb907.entry.js} +1 -1
- package/dist/twilight/{p-cd40e650.entry.js → p-29f65d08.entry.js} +1 -1
- package/dist/twilight/{p-29b491ae.entry.js → p-2d92f08a.entry.js} +1 -1
- package/dist/twilight/{p-3e263ad6.entry.js → p-31153a53.entry.js} +1 -1
- package/dist/twilight/{p-81fc08bc.entry.js → p-3bae4143.entry.js} +1 -1
- package/dist/twilight/{p-7b8f78d8.entry.js → p-3de87ed4.entry.js} +1 -1
- package/dist/twilight/{p-2a8797f7.entry.js → p-3f249ea4.entry.js} +1 -1
- package/dist/twilight/{p-8b366181.entry.js → p-410a4744.entry.js} +1 -1
- package/dist/twilight/{p-f9142099.entry.js → p-495097b0.entry.js} +1 -1
- package/dist/twilight/{p-9dc040ac.entry.js → p-4a531040.entry.js} +1 -1
- package/dist/twilight/{p-ea9159eb.entry.js → p-4b3f6cd2.entry.js} +1 -1
- package/dist/twilight/{p-ff1c723f.entry.js → p-4e9a9071.entry.js} +1 -1
- package/dist/twilight/{p-92b0481d.entry.js → p-51126a79.entry.js} +1 -1
- package/dist/twilight/{p-1c834218.entry.js → p-52562de7.entry.js} +1 -1
- package/dist/twilight/{p-7c95a27d.entry.js → p-5622f4cb.entry.js} +1 -1
- package/dist/twilight/{p-daed6c53.entry.js → p-57636818.entry.js} +1 -1
- package/dist/twilight/{p-fc337ff0.entry.js → p-5c4ee6f0.entry.js} +1 -1
- package/dist/twilight/{p-96d7b307.entry.js → p-5e4239e3.entry.js} +1 -1
- package/dist/twilight/{p-026f2d7b.entry.js → p-5ed51ea1.entry.js} +1 -1
- package/dist/twilight/p-6023e80c.entry.js +4 -0
- package/dist/twilight/{p-431fac85.entry.js → p-6387b132.entry.js} +1 -1
- package/dist/twilight/{p-07ab0bf0.entry.js → p-64980c56.entry.js} +1 -1
- package/dist/twilight/{p-fd9754f2.entry.js → p-66eccd4e.entry.js} +1 -1
- package/dist/twilight/{p-fd4989e9.entry.js → p-6ce3edc6.entry.js} +1 -1
- package/dist/twilight/{p-dec1388b.entry.js → p-6db3f67b.entry.js} +1 -1
- package/dist/twilight/{p-ac45f19d.entry.js → p-72d2b19f.entry.js} +1 -1
- package/dist/twilight/{p-e23d218e.entry.js → p-739c39e9.entry.js} +1 -1
- package/dist/twilight/{p-53ce66a7.entry.js → p-760bd859.entry.js} +1 -1
- package/dist/twilight/{p-ee0e575e.entry.js → p-78246e72.entry.js} +1 -1
- package/dist/twilight/{p-e839d889.entry.js → p-78a9880e.entry.js} +1 -1
- package/dist/twilight/{p-63f568ad.entry.js → p-7cc906fd.entry.js} +1 -1
- package/dist/twilight/{p-fe86430c.entry.js → p-7d8b20c8.entry.js} +1 -1
- package/dist/twilight/{p-3fc7dfa2.entry.js → p-7dc07299.entry.js} +1 -1
- package/dist/twilight/{p-b3f07535.entry.js → p-8706b6a0.entry.js} +1 -1
- package/dist/twilight/{p-328689cc.entry.js → p-88609f65.entry.js} +1 -1
- package/dist/twilight/{p-ec1fc331.entry.js → p-8a491693.entry.js} +1 -1
- package/dist/twilight/{p-c45ce221.entry.js → p-8c729878.entry.js} +1 -1
- package/dist/twilight/{p-d9b7a9d1.entry.js → p-8d2a81b0.entry.js} +1 -1
- package/dist/twilight/{p-a0ba26aa.entry.js → p-90475264.entry.js} +1 -1
- package/dist/twilight/{p-76196f47.entry.js → p-96467104.entry.js} +1 -1
- package/dist/twilight/{p-fbd4f619.entry.js → p-994bf3ae.entry.js} +1 -1
- package/dist/twilight/{p-0b9b72c0.entry.js → p-9e6cb545.entry.js} +1 -1
- package/dist/twilight/{p-BbiGVDjx.js → p-B9arPRZj.js} +1 -1
- package/dist/twilight/{p-CsHEfbM_.js → p-BV6J7gVl.js} +1 -1
- package/dist/twilight/{p-DYL8LNIs.js → p-Bcg-je74.js} +1 -1
- package/dist/twilight/{p-BqFb60iF.js → p-BmFJLtoi.js} +1 -1
- package/dist/twilight/{p-BRP9wXBV.js → p-C95Jqawg.js} +1 -1
- package/dist/twilight/{p-tJElNMug.js → p-Ce6fXRqk.js} +1 -1
- package/dist/twilight/{p-BnXdxK21.js → p-DEKXmzPE.js} +1 -1
- package/dist/twilight/p-DGptAQB8.js +4 -0
- package/dist/twilight/{p-DsKnWz05.js → p-DT96HiMD.js} +1 -1
- package/dist/twilight/{p-Bw6Lg6Nq.js → p-DkoUjMC3.js} +1 -1
- package/dist/twilight/{p-DsHyM0bg.js → p-WuZcMqCu.js} +1 -1
- package/dist/twilight/{p-5083bfcd.entry.js → p-a99b352b.entry.js} +1 -1
- package/dist/twilight/{p-dbd2a0de.entry.js → p-a9f88f85.entry.js} +1 -1
- package/dist/twilight/{p-7cec181e.entry.js → p-ad59d8f6.entry.js} +1 -1
- package/dist/twilight/{p-3592fb4b.entry.js → p-b2c65720.entry.js} +1 -1
- package/dist/twilight/{p-5a57d395.entry.js → p-b47719b5.entry.js} +1 -1
- package/dist/twilight/{p-3889f710.entry.js → p-b48ba32a.entry.js} +1 -1
- package/dist/twilight/{p-013dfb33.entry.js → p-b5793358.entry.js} +1 -1
- package/dist/twilight/{p-b8812978.entry.js → p-b88ce9c1.entry.js} +1 -1
- package/dist/twilight/{p-67e934a3.entry.js → p-bb4affa3.entry.js} +1 -1
- package/dist/twilight/{p-d652aaf4.entry.js → p-c13103f9.entry.js} +1 -1
- package/dist/twilight/{p-23fb752f.entry.js → p-c4a37061.entry.js} +1 -1
- package/dist/twilight/{p-f5d7430f.entry.js → p-ca0f40dc.entry.js} +1 -1
- package/dist/twilight/{p-2d5469e5.entry.js → p-ccac7ed0.entry.js} +1 -1
- package/dist/twilight/{p-f13103c6.entry.js → p-d243a973.entry.js} +1 -1
- package/dist/twilight/{p-767822b5.entry.js → p-d839d4ec.entry.js} +1 -1
- package/dist/twilight/{p-248d1538.entry.js → p-dc6ba997.entry.js} +1 -1
- package/dist/twilight/{p-12eef889.entry.js → p-dd208824.entry.js} +1 -1
- package/dist/twilight/{p-315593b0.entry.js → p-de6b5801.entry.js} +1 -1
- package/dist/twilight/{p-6c4ab4ae.entry.js → p-def1cf41.entry.js} +1 -1
- package/dist/twilight/{p-1f7b2325.entry.js → p-e095a7d1.entry.js} +1 -1
- package/dist/twilight/{p-334df31d.entry.js → p-e5336dcb.entry.js} +1 -1
- package/dist/twilight/{p-95643680.entry.js → p-e74d8459.entry.js} +1 -1
- package/dist/twilight/{p-97f56b3e.entry.js → p-ec9b118c.entry.js} +1 -1
- package/dist/twilight/{p-2dbbfde8.entry.js → p-f1e04195.entry.js} +1 -1
- package/dist/twilight/{p-61e9018a.entry.js → p-f6796ea9.entry.js} +1 -1
- package/dist/twilight/{p-c5662aa2.entry.js → p-f83f5f79.entry.js} +1 -1
- package/dist/twilight/{p-0f975c51.entry.js → p-fb23d620.entry.js} +1 -1
- package/dist/twilight/{p-535aff1f.entry.js → p-fe6b38a8.entry.js} +1 -1
- package/dist/twilight/{p-Kk0reIVI.js → p-w8-d2MD6.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cart-summary-card/salla-cart-summary-card.d.ts +67 -0
- package/dist/types/components.d.ts +37 -0
- package/package.json +5 -5
- package/dist/twilight/p-2e5bb4f4.entry.js +0 -4
- package/dist/twilight/p-DlEXuybu.js +0 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaCartSummaryCard extends Components.SallaCartSummaryCard, HTMLElement {}
|
|
4
|
+
export const SallaCartSummaryCard: {
|
|
5
|
+
prototype: SallaCartSummaryCard;
|
|
6
|
+
new (): SallaCartSummaryCard;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { d as defineCustomElement$3 } from './salla-button2.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './salla-skeleton2.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$1 = /*@__PURE__*/ proxyCustomElement(class SallaCartSummaryCard extends HTMLElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this.__registerHost();
|
|
17
|
+
this.validateForms = true;
|
|
18
|
+
this.cartCount = 0;
|
|
19
|
+
this.cartTotal = 0;
|
|
20
|
+
this.cartTotalDiscount = 0;
|
|
21
|
+
this.cartSubTotal = 0;
|
|
22
|
+
this.cartOptionsTotal = 0;
|
|
23
|
+
this.cartShippingCost = 0;
|
|
24
|
+
this.cartTaxAmount = 0;
|
|
25
|
+
this.cartHasShipping = false;
|
|
26
|
+
this.isOpen = false;
|
|
27
|
+
this.isDesktop = false;
|
|
28
|
+
/** True until the first cart payload (API response or cart event) arrives. */
|
|
29
|
+
this.isLoading = true;
|
|
30
|
+
// Original DOM location — needed to restore the host on the mobile→desktop flip.
|
|
31
|
+
this.originalParent = null;
|
|
32
|
+
this.originalNextSibling = null;
|
|
33
|
+
this.bodyObserver = null;
|
|
34
|
+
this.mediaQueryList = null;
|
|
35
|
+
this.submitObserver = null;
|
|
36
|
+
this.isSubmitting = false;
|
|
37
|
+
// Stable handler refs — anonymous functions can't be unbound from listeners.
|
|
38
|
+
this.mqlChangeHandler = (e) => {
|
|
39
|
+
this.isDesktop = e.matches;
|
|
40
|
+
this.applyMode();
|
|
41
|
+
};
|
|
42
|
+
this.cartEventNames = [
|
|
43
|
+
'cart::details.fetched',
|
|
44
|
+
'cart::updated',
|
|
45
|
+
'cart::latest.fetched',
|
|
46
|
+
'cart::coupon.added',
|
|
47
|
+
'cart::coupon.deleted',
|
|
48
|
+
];
|
|
49
|
+
this.cartEventHandler = (payload) => this.applyCartData(this.extractCart(payload));
|
|
50
|
+
this.toggleSheet = () => {
|
|
51
|
+
if (!this.isDesktop)
|
|
52
|
+
this.isOpen = !this.isOpen;
|
|
53
|
+
};
|
|
54
|
+
this.handleSubmit = async (event) => {
|
|
55
|
+
// Re-entrancy guard, set before the async validation so a second tap during
|
|
56
|
+
// that window can't fire a second submit. Covers all user types.
|
|
57
|
+
if (this.isSubmitting) {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
this.isSubmitting = true;
|
|
62
|
+
if (this.validateForms && !(await this.validateCartForms())) {
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
salla.notify?.error?.(salla.lang?.get?.('common.messages.required_fields'));
|
|
65
|
+
this.isSubmitting = false; // validation failed → allow retry
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const btn = this.host.querySelector('#s-cart-summary-card-submit');
|
|
69
|
+
if (typeof salla !== 'undefined' && salla.config?.get?.('user.type') !== 'guest' && btn) {
|
|
70
|
+
btn.load?.();
|
|
71
|
+
// Pin loading across re-renders; auto-clear after 10s so a failed submit
|
|
72
|
+
// doesn't lock the button forever.
|
|
73
|
+
this.submitObserver?.disconnect();
|
|
74
|
+
if (this.submitObserverTimeout)
|
|
75
|
+
clearTimeout(this.submitObserverTimeout);
|
|
76
|
+
this.submitObserver = new MutationObserver(() => {
|
|
77
|
+
if (!btn.hasAttribute('loading'))
|
|
78
|
+
btn.setAttribute('loading', '');
|
|
79
|
+
});
|
|
80
|
+
this.submitObserver.observe(btn, { attributes: true, attributeFilter: ['loading'] });
|
|
81
|
+
this.submitObserverTimeout = window.setTimeout(() => {
|
|
82
|
+
this.submitObserver?.disconnect();
|
|
83
|
+
this.submitObserver = null;
|
|
84
|
+
btn.removeAttribute?.('loading');
|
|
85
|
+
}, 10000);
|
|
86
|
+
}
|
|
87
|
+
salla.cart?.submit?.();
|
|
88
|
+
// Release after submit kicks off: success navigates away, a guest opens the
|
|
89
|
+
// login modal. Short delay blocks the double-tap race without a long lock.
|
|
90
|
+
window.setTimeout(() => { this.isSubmitting = false; }, 1500);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
// Sync: returning a promise would make Stencil defer first paint. init() runs async.
|
|
94
|
+
componentWillLoad() {
|
|
95
|
+
this.mediaQueryList = window.matchMedia(this.desktopMediaQuery());
|
|
96
|
+
this.isDesktop = this.mediaQueryList.matches;
|
|
97
|
+
if (this.isDesktop)
|
|
98
|
+
this.isOpen = true;
|
|
99
|
+
// isLoading is true by default → first paint is the skeleton.
|
|
100
|
+
this.init();
|
|
101
|
+
}
|
|
102
|
+
// Not awaited by componentWillLoad, so it can't block first paint.
|
|
103
|
+
async init() {
|
|
104
|
+
await salla.onReady();
|
|
105
|
+
await salla.lang.onLoaded();
|
|
106
|
+
this.loadTranslations();
|
|
107
|
+
// 'cart::updated' is in cartEventNames — don't also use onUpdated (it leaks, no off()).
|
|
108
|
+
this.cartEventNames.forEach(name => salla.event.on(name, this.cartEventHandler));
|
|
109
|
+
this.fetchCart();
|
|
110
|
+
}
|
|
111
|
+
loadTranslations() {
|
|
112
|
+
this.summaryLabel = salla.lang.get('pages.cart.summary');
|
|
113
|
+
this.itemsTotalLabel = salla.lang.get('pages.cart.items_total');
|
|
114
|
+
this.itemsTotalNoTaxLabel = salla.lang.get('pages.cart.items_total_without_tax');
|
|
115
|
+
this.optionsTotalLabel = salla.lang.get('pages.cart.order_options_total');
|
|
116
|
+
this.shippingCostLabel = salla.lang.get('pages.cart.shipping_cost');
|
|
117
|
+
this.vatTaxLabel = salla.lang.get('pages.cart.VAT_tax_amount');
|
|
118
|
+
this.savedLabel = salla.lang.get('pages.cart.discount');
|
|
119
|
+
this.discountBadge = salla.lang.get('pages.cart.saved');
|
|
120
|
+
this.finalTotalLabel = salla.lang.get('pages.cart.final_total');
|
|
121
|
+
this.pricesTaxedLabel = salla.lang.get('pages.cart.prices_taxed');
|
|
122
|
+
this.completeOrderLabel = salla.lang.get('pages.cart.complete_order');
|
|
123
|
+
this.openSummaryLabel = salla.lang.get('pages.cart.open_summary');
|
|
124
|
+
this.closeSummaryLabel = salla.lang.get('pages.cart.close_summary');
|
|
125
|
+
this.itemsCountTemplate = salla.lang.get('pages.cart.items_with_count');
|
|
126
|
+
}
|
|
127
|
+
/** Coerces PHP cart values: numbers, strings, and Money/MoneyTaxable objects. */
|
|
128
|
+
num(v) {
|
|
129
|
+
if (v === null || v === undefined)
|
|
130
|
+
return 0;
|
|
131
|
+
if (typeof v === 'number')
|
|
132
|
+
return isFinite(v) ? v : 0;
|
|
133
|
+
if (typeof v === 'string')
|
|
134
|
+
return parseFloat(v) || 0;
|
|
135
|
+
if (typeof v === 'object') {
|
|
136
|
+
if ('amount' in v)
|
|
137
|
+
return this.num(v.amount);
|
|
138
|
+
if ('value' in v)
|
|
139
|
+
return this.num(v.value);
|
|
140
|
+
if ('formatted' in v)
|
|
141
|
+
return this.num(v.formatted);
|
|
142
|
+
}
|
|
143
|
+
return 0;
|
|
144
|
+
}
|
|
145
|
+
// Desktop cutoff — must match the SCSS media queries so JS and CSS never diverge.
|
|
146
|
+
breakpointPx() {
|
|
147
|
+
return 1024;
|
|
148
|
+
}
|
|
149
|
+
desktopMediaQuery() {
|
|
150
|
+
return `(min-width: ${this.breakpointPx()}px)`;
|
|
151
|
+
}
|
|
152
|
+
componentDidLoad() {
|
|
153
|
+
// Capture original location BEFORE the portal relocates the host.
|
|
154
|
+
this.originalParent = this.host.parentElement;
|
|
155
|
+
this.originalNextSibling = this.host.nextSibling;
|
|
156
|
+
// Re-init if componentWillLoad failed to set it (rare hydration/race edge case).
|
|
157
|
+
if (!this.mediaQueryList) {
|
|
158
|
+
this.mediaQueryList = window.matchMedia(this.desktopMediaQuery());
|
|
159
|
+
this.isDesktop = this.mediaQueryList.matches;
|
|
160
|
+
}
|
|
161
|
+
this.applyMode();
|
|
162
|
+
// iOS Safari < 14 lacks addEventListener on MediaQueryList — fall back to addListener.
|
|
163
|
+
if (this.mediaQueryList.addEventListener) {
|
|
164
|
+
this.mediaQueryList.addEventListener('change', this.mqlChangeHandler);
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
this.mediaQueryList.addListener(this.mqlChangeHandler);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
// Mobile: portal host to <body> so position:fixed escapes any transformed
|
|
171
|
+
// ancestor. Desktop: restore to its original DOM location.
|
|
172
|
+
applyMode() {
|
|
173
|
+
if (this.isDesktop) {
|
|
174
|
+
this.isOpen = true;
|
|
175
|
+
this.bodyObserver?.disconnect();
|
|
176
|
+
this.bodyObserver = null;
|
|
177
|
+
if (this.originalParent && this.host.parentElement !== this.originalParent) {
|
|
178
|
+
// Sibling may have been removed while we were portaled — fall back
|
|
179
|
+
// to appendChild instead of letting insertBefore throw.
|
|
180
|
+
const ref = this.originalNextSibling?.parentNode === this.originalParent
|
|
181
|
+
? this.originalNextSibling
|
|
182
|
+
: null;
|
|
183
|
+
this.originalParent.insertBefore(this.host, ref);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
this.pinToBodyEnd();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
// Re-pin via MutationObserver so a late-mounted footer can't paint over us.
|
|
191
|
+
pinToBodyEnd() {
|
|
192
|
+
if (this.host.parentElement !== document.body || document.body.lastElementChild !== this.host) {
|
|
193
|
+
document.body.appendChild(this.host);
|
|
194
|
+
}
|
|
195
|
+
if (!this.bodyObserver) {
|
|
196
|
+
this.bodyObserver = new MutationObserver(() => {
|
|
197
|
+
if (!this.isDesktop && document.body.lastElementChild !== this.host) {
|
|
198
|
+
document.body.appendChild(this.host);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
this.bodyObserver.observe(document.body, { childList: true });
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
disconnectedCallback() {
|
|
205
|
+
// Fires synchronously on every removal, incl. our own reparenting — defer a
|
|
206
|
+
// microtask and bail if reconnected, else the portal loses its listeners.
|
|
207
|
+
Promise.resolve().then(() => {
|
|
208
|
+
if (this.host.isConnected)
|
|
209
|
+
return;
|
|
210
|
+
this.bodyObserver?.disconnect();
|
|
211
|
+
this.submitObserver?.disconnect();
|
|
212
|
+
if (this.submitObserverTimeout) {
|
|
213
|
+
clearTimeout(this.submitObserverTimeout);
|
|
214
|
+
this.submitObserverTimeout = undefined;
|
|
215
|
+
}
|
|
216
|
+
// Mirror the iOS-Safari-<14 path used in componentDidLoad.
|
|
217
|
+
if (this.mediaQueryList?.removeEventListener) {
|
|
218
|
+
this.mediaQueryList.removeEventListener('change', this.mqlChangeHandler);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
this.mediaQueryList?.removeListener(this.mqlChangeHandler);
|
|
222
|
+
}
|
|
223
|
+
this.mediaQueryList = null;
|
|
224
|
+
this.cartEventNames.forEach(name => salla.event.off(name, this.cartEventHandler));
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
fetchCart() {
|
|
228
|
+
const cartId = salla.config?.get?.('page.id');
|
|
229
|
+
const result = salla.cart?.api?.details?.(cartId);
|
|
230
|
+
if (result && typeof result.then === 'function') {
|
|
231
|
+
result
|
|
232
|
+
.then((res) => this.applyCartData(this.extractCart(res)))
|
|
233
|
+
// On failure, fall back to the cached summary instead of stranding the skeleton.
|
|
234
|
+
.catch(() => this.applyCachedSummary());
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
this.applyCachedSummary();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
// Cart API failed → use the SDK's cached summary (localStorage, set on
|
|
241
|
+
// cart::updated). May be stale but beats zeros; events refresh it. Clears the
|
|
242
|
+
// skeleton either way so the CTA always renders.
|
|
243
|
+
applyCachedSummary() {
|
|
244
|
+
const summary = salla.storage?.get?.('cart.summary');
|
|
245
|
+
if (summary && typeof summary === 'object')
|
|
246
|
+
this.applyCartData(summary);
|
|
247
|
+
this.isLoading = false;
|
|
248
|
+
}
|
|
249
|
+
extractCart(payload) {
|
|
250
|
+
if (!payload)
|
|
251
|
+
return null;
|
|
252
|
+
if (payload.data?.cart)
|
|
253
|
+
return payload.data.cart;
|
|
254
|
+
if (payload.cart)
|
|
255
|
+
return payload.cart;
|
|
256
|
+
return payload;
|
|
257
|
+
}
|
|
258
|
+
applyCartData(data) {
|
|
259
|
+
if (!data)
|
|
260
|
+
return;
|
|
261
|
+
// First real payload ends the skeleton.
|
|
262
|
+
this.isLoading = false;
|
|
263
|
+
if (data.count !== undefined)
|
|
264
|
+
this.cartCount = this.num(data.count);
|
|
265
|
+
if (data.total !== undefined)
|
|
266
|
+
this.cartTotal = this.num(data.total);
|
|
267
|
+
// `total_discount` is the live field (untyped); `discount` is the typed fallback.
|
|
268
|
+
const discount = data.total_discount ?? data.discount;
|
|
269
|
+
if (discount !== undefined)
|
|
270
|
+
this.cartTotalDiscount = this.num(discount);
|
|
271
|
+
if (data.sub_total !== undefined)
|
|
272
|
+
this.cartSubTotal = this.num(data.sub_total);
|
|
273
|
+
if (data.options_total !== undefined)
|
|
274
|
+
this.cartOptionsTotal = this.num(data.options_total);
|
|
275
|
+
if (data.tax_amount !== undefined)
|
|
276
|
+
this.cartTaxAmount = this.num(data.tax_amount);
|
|
277
|
+
// Shipping cost (free-shipping aware): prefer `shipping_cost`, else `real_shipping_cost`.
|
|
278
|
+
const hasFreeShipping = !!data.free_shipping_bar?.has_free_shipping;
|
|
279
|
+
if (data.shipping_cost !== undefined)
|
|
280
|
+
this.cartShippingCost = this.num(data.shipping_cost);
|
|
281
|
+
else if (data.real_shipping_cost !== undefined)
|
|
282
|
+
this.cartShippingCost = hasFreeShipping ? 0 : this.num(data.real_shipping_cost);
|
|
283
|
+
// `has_shipping` isn't in the API response — derive row visibility from the cost.
|
|
284
|
+
this.cartHasShipping = this.cartShippingCost > 0 || !!data.has_shipping;
|
|
285
|
+
}
|
|
286
|
+
// Native reportValidity() covers standard fields; custom product options
|
|
287
|
+
// validate via their own async reportValidity() (incl. multi-option required
|
|
288
|
+
// logic), so await that too — else option validation is skipped at checkout.
|
|
289
|
+
async validateCartForms() {
|
|
290
|
+
let isValid = true;
|
|
291
|
+
document
|
|
292
|
+
.querySelectorAll('form[id^="item-"]')
|
|
293
|
+
.forEach(f => {
|
|
294
|
+
if (!f.reportValidity())
|
|
295
|
+
isValid = false;
|
|
296
|
+
});
|
|
297
|
+
const optionEls = Array.from(document.querySelectorAll('form[id^="item-"] salla-product-options'));
|
|
298
|
+
for (const el of optionEls) {
|
|
299
|
+
if (typeof el.reportValidity === 'function' && !(await el.reportValidity()))
|
|
300
|
+
isValid = false;
|
|
301
|
+
}
|
|
302
|
+
return isValid;
|
|
303
|
+
}
|
|
304
|
+
money(value) {
|
|
305
|
+
try {
|
|
306
|
+
if (typeof salla !== 'undefined' && typeof salla.money === 'function') {
|
|
307
|
+
return salla.money(value);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
catch (_) { }
|
|
311
|
+
return String(value ?? 0);
|
|
312
|
+
}
|
|
313
|
+
getItemsLabel() {
|
|
314
|
+
return this.itemsCountTemplate?.replace(':count', String(this.cartCount)) ?? '';
|
|
315
|
+
}
|
|
316
|
+
// Skeleton during the initial fetch
|
|
317
|
+
renderSkeleton() {
|
|
318
|
+
return (h(Host, { class: {
|
|
319
|
+
's-cart-summary-card': true,
|
|
320
|
+
's-cart-summary-card--loading': true,
|
|
321
|
+
's-cart-summary-card--desktop': this.isDesktop,
|
|
322
|
+
's-cart-summary-card--mobile': !this.isDesktop,
|
|
323
|
+
} }, this.isDesktop && (h("div", { class: "s-cart-summary-card-sheet-wrap s-cart-summary-card-sheet-wrap--open" }, h("div", { class: "s-cart-summary-card-sheet" }, h("header", { class: "s-cart-summary-card-sheet-header" }, h("h3", { class: "s-cart-summary-card-sheet-title" }, h("salla-skeleton", { width: "140px", height: "16px" }))), SKELETON_ROWS.map(({ label, value }, i) => (h("div", { class: "s-cart-summary-card-line", key: i }, h("salla-skeleton", { width: label, height: "16px" }), h("salla-skeleton", { width: value, height: "16px" }))))))), h("div", { class: "s-cart-summary-card-bar" }, h("div", { class: "s-cart-summary-card-bar-label" }, h("div", { class: "s-cart-summary-card-bar-label-main" }, h("salla-skeleton", { width: "90px", height: "16px" }), h("salla-skeleton", { width: "48px", height: "12px" }))), h("div", { class: "s-cart-summary-card-bar-totals" }, h("div", { class: "s-cart-summary-card-bar-totals-row" }, h("salla-skeleton", { width: "80px", height: "20px" })))), h("div", { class: "s-cart-summary-card-action" }, h("salla-skeleton", { width: "100%", height: "44px" }))));
|
|
324
|
+
}
|
|
325
|
+
render() {
|
|
326
|
+
if (this.isLoading)
|
|
327
|
+
return this.renderSkeleton();
|
|
328
|
+
const showSavings = this.cartTotalDiscount > 0;
|
|
329
|
+
const subTotalLabel = this.cartTaxAmount ? this.itemsTotalNoTaxLabel : this.itemsTotalLabel;
|
|
330
|
+
// Inline transform so sheet motion doesn't depend on SCSS load order.
|
|
331
|
+
const sheetStyle = this.isDesktop
|
|
332
|
+
? {}
|
|
333
|
+
: {
|
|
334
|
+
transform: this.isOpen ? 'translateY(0)' : 'translateY(100%)',
|
|
335
|
+
transition: 'transform 0.4s cubic-bezier(0.32, 0.72, 0, 1)',
|
|
336
|
+
};
|
|
337
|
+
return (h(Host, { class: {
|
|
338
|
+
's-cart-summary-card': true,
|
|
339
|
+
's-cart-summary-card--open': this.isOpen,
|
|
340
|
+
's-cart-summary-card--desktop': this.isDesktop,
|
|
341
|
+
's-cart-summary-card--mobile': !this.isDesktop,
|
|
342
|
+
} }, h("div", { class: {
|
|
343
|
+
's-cart-summary-card-sheet-wrap': true,
|
|
344
|
+
's-cart-summary-card-sheet-wrap--open': this.isOpen,
|
|
345
|
+
}, "aria-hidden": this.isOpen ? 'false' : 'true' }, h("div", { class: "s-cart-summary-card-sheet", style: sheetStyle }, h("header", { class: "s-cart-summary-card-sheet-header" }, h("h3", { class: "s-cart-summary-card-sheet-title" }, this.summaryLabel)), h("div", { class: "s-cart-summary-card-line" }, h("span", null, subTotalLabel), h("b", { innerHTML: this.money(this.cartSubTotal) })), this.cartOptionsTotal > 0 && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.optionsTotalLabel), h("b", { innerHTML: this.money(this.cartOptionsTotal) }))), this.cartHasShipping && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.shippingCostLabel), h("b", { innerHTML: this.money(this.cartShippingCost) }))), this.cartTaxAmount > 0 && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.vatTaxLabel), h("b", { innerHTML: this.money(this.cartTaxAmount) }))), showSavings && (h("div", { class: "s-cart-summary-card-line s-cart-summary-card-line--discount" }, h("span", null, this.savedLabel), h("b", null, "\u2212 ", h("span", { innerHTML: this.money(this.cartTotalDiscount) })))))), h("div", { class: "s-cart-summary-card-bar" }, h("div", { class: "s-cart-summary-card-bar-label" }, h("div", { class: "s-cart-summary-card-bar-label-main" }, h("span", { class: "s-cart-summary-card-bar-label-text" }, this.finalTotalLabel), h("span", { class: "s-cart-summary-card-bar-count" }, this.getItemsLabel())), this.cartTaxAmount > 0 && (h("div", { class: "s-cart-summary-card-bar-label-sub" }, this.pricesTaxedLabel))), h("div", { class: "s-cart-summary-card-bar-totals" }, h("div", { class: "s-cart-summary-card-bar-totals-row" }, showSavings && (h("s", { class: "s-cart-summary-card-bar-original" }, salla.helpers.number(this.cartTotal + this.cartTotalDiscount))), h("b", { class: "s-cart-summary-card-bar-total", innerHTML: this.money(this.cartTotal) }), !this.isDesktop && (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 }, h("i", { class: "sicon-keyboard_arrow_up s-cart-summary-card-chevron-icon" })))), showSavings && (h("div", { class: "s-cart-summary-card-bar-savings-badge" }, h("span", { "aria-hidden": "true" }, "\uD83C\uDF89"), h("span", null, this.discountBadge, " ", h("span", { innerHTML: this.money(this.cartTotalDiscount) })))))), h("div", { class: "s-cart-summary-card-action" }, h("salla-button", { id: "s-cart-summary-card-submit", width: "wide", "loader-position": "center", onClick: this.handleSubmit }, this.completeOrderLabel))));
|
|
346
|
+
}
|
|
347
|
+
get host() { return this; }
|
|
348
|
+
}, [0, "salla-cart-summary-card", {
|
|
349
|
+
"validateForms": [4, "validate-forms"],
|
|
350
|
+
"cartCount": [32],
|
|
351
|
+
"cartTotal": [32],
|
|
352
|
+
"cartTotalDiscount": [32],
|
|
353
|
+
"cartSubTotal": [32],
|
|
354
|
+
"cartOptionsTotal": [32],
|
|
355
|
+
"cartShippingCost": [32],
|
|
356
|
+
"cartTaxAmount": [32],
|
|
357
|
+
"cartHasShipping": [32],
|
|
358
|
+
"isOpen": [32],
|
|
359
|
+
"isDesktop": [32],
|
|
360
|
+
"isLoading": [32],
|
|
361
|
+
"summaryLabel": [32],
|
|
362
|
+
"itemsTotalLabel": [32],
|
|
363
|
+
"itemsTotalNoTaxLabel": [32],
|
|
364
|
+
"optionsTotalLabel": [32],
|
|
365
|
+
"shippingCostLabel": [32],
|
|
366
|
+
"vatTaxLabel": [32],
|
|
367
|
+
"savedLabel": [32],
|
|
368
|
+
"discountBadge": [32],
|
|
369
|
+
"finalTotalLabel": [32],
|
|
370
|
+
"pricesTaxedLabel": [32],
|
|
371
|
+
"completeOrderLabel": [32],
|
|
372
|
+
"openSummaryLabel": [32],
|
|
373
|
+
"closeSummaryLabel": [32],
|
|
374
|
+
"itemsCountTemplate": [32]
|
|
375
|
+
}]);
|
|
376
|
+
function defineCustomElement$1() {
|
|
377
|
+
if (typeof customElements === "undefined") {
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
const components = ["salla-cart-summary-card", "salla-button", "salla-skeleton"];
|
|
381
|
+
components.forEach(tagName => { switch (tagName) {
|
|
382
|
+
case "salla-cart-summary-card":
|
|
383
|
+
if (!customElements.get(tagName)) {
|
|
384
|
+
customElements.define(tagName, SallaCartSummaryCard$1);
|
|
385
|
+
}
|
|
386
|
+
break;
|
|
387
|
+
case "salla-button":
|
|
388
|
+
if (!customElements.get(tagName)) {
|
|
389
|
+
defineCustomElement$3();
|
|
390
|
+
}
|
|
391
|
+
break;
|
|
392
|
+
case "salla-skeleton":
|
|
393
|
+
if (!customElements.get(tagName)) {
|
|
394
|
+
defineCustomElement$2();
|
|
395
|
+
}
|
|
396
|
+
break;
|
|
397
|
+
} });
|
|
398
|
+
}
|
|
399
|
+
defineCustomElement$1();
|
|
400
|
+
|
|
401
|
+
const SallaCartSummaryCard = SallaCartSummaryCard$1;
|
|
402
|
+
const defineCustomElement = defineCustomElement$1;
|
|
403
|
+
|
|
404
|
+
export { SallaCartSummaryCard, defineCustomElement };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { h } from './index-
|
|
4
|
+
import { h } from './index-BmFJLtoi.js';
|
|
5
5
|
|
|
6
6
|
function nearestLowerMultiple(number, multipleOf = window.matchMedia('(min-width: 768px)').matches ? 3 : 2) {
|
|
7
7
|
return number < multipleOf ? number : number - (number % multipleOf);
|