@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as e,h as i,H as s,a as o}from"./p-
|
|
4
|
+
import{r as t,c as e,h as i,H as s,a as o}from"./p-BmFJLtoi.js";import{L as n}from"./p-BO5AoBAP.js";import{S as a}from"./p-BscTeWDc.js";const r="BulletDeliveryAPI",l=t=>{const e=null==t?Number.NaN:Number(t);return!Number.isNaN(e)&&0!==e};async function h(t,e,i){try{return await t()}catch(t){return console.error(`${r}: ${i}`,t),e}}const c=new Map;function d(t){const e=c.get(t);return!e||Date.now()-e.timestamp>3e5?(c.delete(t),null):e.data}function u(t,e){c.set(t,{data:e,timestamp:Date.now()})}const p=t=>"SA"===String(t).toUpperCase(),m={async getCountries(t=!1,e){const i=e?.trim()?null:"countries_"+(t?1:0);if(i){const t=d(i);if(t)return t}const s=await h((async()=>{const i={for_branch:t?1:0};return t&&(i.for_allocation=1),e?.trim()&&(i.query=e.trim()),((await salla.api.request("shipping/countries",{params:i}))?.data??[]).map((t=>({id:t.id,code:t.code,name:t.name,has_regions:p(t.code)})))}),[],"Error getting countries");return i&&s.length>0&&u(i,s),s},async getRegions(t,e){if(!l(t))return console.warn(`${r}: getRegions called without valid country_id`),[];const i=e?.trim()?null:`regions_${t}`;if(i){const t=d(i);if(t)return t}const s=await h((async()=>{const i={};return e?.trim()&&(i.query=e.trim()),((await salla.api.request(`shipping/countries/${t}/regions`,{params:i}))?.data??[]).map((e=>({id:e.id,name:e.name,code:e.code,country_id:Number(t)})))}),[],"Error fetching regions");return i&&s.length>0&&u(i,s),s},async getCities(t,e,i){if(!l(t))return console.warn(`${r}: getCities called without valid country_id`),[];const s=i?.trim()?null:`cities_${t}_${e||"all"}`;if(s){const t=d(s);if(t)return t}const o=await h((async()=>{const s={for_branch:0,country_id:t};return e&&(s.region_id=e),i?.trim()&&(s.query=i.trim()),((await salla.api.request("shipping/cities",{params:s}))?.data??[]).map((e=>({id:e.id,name:e.name,country_id:t,...null!=e.region_id&&{region_id:e.region_id}})))}),[],"Error fetching cities");return s&&o.length>0&&u(s,o),o},getDistricts:async(t,e)=>l(t)?h((async()=>{const i={for_branch:0,city_id:t};e?.trim()&&(i.query=e.trim());const s=(await salla.api.request("shipping/districts",{params:i}))?.data;return(Array.isArray(s)?s:Array.isArray(s?.districts)?s.districts:[]).map((e=>({id:e.id,name:e.name,name_en:e.name_en,city_id:t})))}),[],"Error fetching districts"):(console.warn(`${r}: getDistricts called without valid city_id`),[]),getSavedAddresses:async()=>h((async()=>{const t=(await salla.api.request("address"))?.data;return Array.isArray(t)?t:[]}),[],"Error fetching user addresses"),async getBranches({query:t,lat:e,lng:i,country_id:s,per_page:o=20}={}){const n=t?.trim()?.length>=2||e||i||!s?null:`branches_${s}`;if(n){const t=d(n);if(t)return t}const a=await h((async()=>{const n={per_page:o};t?.trim().length>=2&&(n.query=t),e&&(n.lat=e),i&&(n.lng=i),s&&(n.country_id=s);const a=await salla.api.request("branches",{params:n});return Array.isArray(a?.data)?a.data:[]}),[],"Error fetching branches");return n&&a.length>0&&u(n,a),a},saveAddressLocation:async t=>h((async()=>{const e=await salla.api.request("address/location",{...t,for_allocation:!0},"post"),i=e?.data??e;return{success:!0,address:"object"==typeof i&&null!=i&&"id"in i?i:void 0}}),{success:!1},"Error saving address/location"),setDeliveryScope:async t=>h((async()=>(await salla.api.withoutNotifier((()=>salla.scope.change({id:t}))),salla.storage.set("scope",{...salla.storage.get("scope")||{},id:t}),!0)),!1,"Error setting delivery scope"),async allocateScope(t){const e=t=>t?.error?.message??t?.message??"Failed to allocate scope";try{const e=await salla.api.withoutNotifier((()=>salla.api.request("scopes/allocation",t,"post")));return{success:!0,data:e?.data??e}}catch(t){console.error(`${r}: Error allocating scope`,t);const i=t;return{success:!1,error:null!=i?.response?.data?e(i.response.data):i?.message??"Unknown error"}}},getAddressToken:async()=>h((async()=>{const t=await salla.api.request("address/autocomplete-token");return t?.data?.token??null}),null,"Error fetching address autocomplete token")};function g(){c.clear()}const b=t=>t*(Math.PI/180);function f(t,e,i,s){const o=b(i-t),n=b(s-e),a=Math.sin(o/2)**2+Math.cos(b(t))*Math.cos(b(i))*Math.sin(n/2)**2;return 12742*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function v(t,e){const[i,s]=String(t).trim().split(":").map(Number);return Number.isNaN(i)||Number.isNaN(s)?t:new Date(2e3,0,1,i,s).toLocaleTimeString(e,{hour:"numeric",minute:"2-digit",hour12:!0})}const y=(t,e,i)=>{if("branch"===t.type){const e=t.branch_details?.city??t.branch_details?.name;return e?`${i} ${e}`.trim():""}if("address"===t.type&&t.address_details){const i=[t.address_details.district?.name,t.address_details.city?.name,t.address_details.country?.name].filter(Boolean).join("، ")||t.address_details.short_address||"";return i?`${e} ${i}`.trim():""}return""},w=t=>null!=t?Number(t):void 0,S=t=>w(t?.address_details?.country?.id),k=t=>t?.country_code??t?.address_details?.country?.code??"",C=t=>w(t?.address_details?.region?.id),x=t=>w(t?.address_details?.city?.id),_=t=>w(t?.address_details?.district?.id),A=t=>t?.branch_details?.id,$=t=>t?.branch_details?.latitude,M=t=>t?.branch_details?.longitude,L=t=>{if(!t||"address"!==t.type||t.address_id)return!1;const e=S(t),i=x(t),s=_(t),o=k(t),n=null!=s&&0!==Number(s),a=Boolean(t.address_details?.district?.name?.trim()),r=!p(o)||n||a;return!!(e&&i&&r)},E=(t,e,i)=>!t||!p(t)||null!=e&&0!==Number(e)&&null!=i&&("number"==typeof i?0!==i:String(i).trim().length>0),z={[GeolocationPositionError.PERMISSION_DENIED]:"Location permission denied",[GeolocationPositionError.POSITION_UNAVAILABLE]:"Location unavailable",[GeolocationPositionError.TIMEOUT]:"Location timeout"},I=globalThis,P=I.ShadowRoot&&(void 0===I.ShadyCSS||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,T=Symbol(),B=new WeakMap;let N=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==T)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(P&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=B.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&B.set(e,t))}return t}toString(){return this.cssText}};const D=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new N(i,t,T)},O=P?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new N("string"==typeof t?t:t+"",void 0,T))(e)})(t):t
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,H as i}from"./p-
|
|
4
|
+
import{r as t,h as s,H as i}from"./p-BmFJLtoi.js";const e=class{constructor(s){t(this,s),this.size="md",this.color="dark",this.digits="auto",this.autoSegments=!1,this.daysLabel=salla.lang.getWithDefault("pages.checkout.day","يوم"),this.hoursLabel=salla.lang.getWithDefault("pages.checkout.hour","ساعة"),this.minutesLabel=salla.lang.getWithDefault("pages.checkout.minute","دقيقة"),this.secondsLabel=salla.lang.getWithDefault("pages.checkout.second","ثانية"),this.endLabel=salla.lang.getWithDefault("pages.checkout.offer_ended","انتهت مدة العرض"),this.invalidDate=salla.lang.getWithDefault("blocks.buy_as_gift.incorrect_date","الرجاء إدخال الموعد بشكل صحيح"),this.offerEnded=!1,this.parseFailed=!1,this.showDays=!0,this.showHours=!0,this.days=this.number(0),this.hours=this.number(0),this.minutes=this.number(0),this.seconds=this.number(0),salla.lang.onLoaded((()=>{this.daysLabel=salla.lang.getWithDefault("pages.checkout.day","يوم"),this.hoursLabel=salla.lang.getWithDefault("pages.checkout.hour","ساعة"),this.minutesLabel=salla.lang.getWithDefault("pages.checkout.minute","دقيقة"),this.invalidDate=salla.lang.getWithDefault("blocks.buy_as_gift.incorrect_date","الرجاء إدخال الموعد بشكل صحيح"),this.secondsLabel=salla.lang.getWithDefault("pages.checkout.second","ثانية"),this.endLabel=salla.lang.getWithDefault("pages.checkout.offer_ended","انتهت مدة العرض")})),this.date&&this.isValidDate(this.date)&&this.startCountDown()}async endCountDown(){clearInterval(this.countInterval),this.offerEnded=!0,this.days=this.number(0),this.hours=this.number(0),this.minutes=this.number(0),this.seconds=this.number(0)}componentWillLoad(){if("string"==typeof this.preOrder)try{this.normalizedPreOrder=JSON.parse(this.preOrder)}catch{this.normalizedPreOrder=void 0}else this.normalizedPreOrder=this.preOrder;this.normalizedPreOrder?.end_date&&(this.date=this.normalizedPreOrder.end_date),this.date&&this.isValidDate(this.date)&&this.startCountDown()}normalizeDate(t){const s=t.match(/^(\d{1,2})-(\d{1,2})-(\d{4}),(\d{1,2}):(\d{2}):(\d{2})\s*(am|pm)$/i);if(s){const[,t,i,e,n,h,o,a]=s;let r=parseInt(n,10);"pm"===a.toLowerCase()&&r<12&&(r+=12),"am"===a.toLowerCase()&&12===r&&(r=0);const l=String(r).padStart(2,"0");return`${e}-${String(t).padStart(2,"0")}-${String(i).padStart(2,"0")} ${l}:${h}:${o}`}const i=t.match(/^(\d{1,2})-(\d{1,2})-(\d{4})$/);if(i){const[,t,s,e]=i;return`${e}-${String(t).padStart(2,"0")}-${String(s).padStart(2,"0")}`}const e=t.match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[ T](\d{1,2}:\d{2}:\d{2}))?$/);if(e){const[,t,s,i,n]=e,h=String(s).padStart(2,"0"),o=String(i).padStart(2,"0");return n?`${t}-${h}-${o} ${n}`:`${t}-${h}-${o}`}return t}isValidDate(t){const s=this.normalizeDate(t);let i,e=s.includes("-"),n=s.split(" ");return i=e?n[0].replace(/-/g,"/"):n[0],!isNaN(Date.parse(i))}number(t){return salla.helpers.number(t,"en"===this.digits)}startCountDown(){const t=this.normalizeDate(this.date),s=t.includes("-"),i=this.endOfDay||1===t.split(" ").length;let e;if(s){const s=i?`${t.split(" ")[0]}T23:59:59+03:00`:`${t.replace(" ","T")}+03:00`;e=new Date(s).getTime()}else{const s=new Date(t);i&&s.setHours(23,59,59,999),e=s.getTime()}if(Number.isNaN(e))return salla.logger.warn(`[salla-count-down] unable to parse date: "${this.date}"`),void(this.parseFailed=!0);const n=()=>{const t=e-Date.now(),s=Math.floor(t/864e5),i=Math.floor(t%864e5/36e5);this.days=this.number(s),this.hours=this.number(i),this.minutes=this.number(Math.floor(t%36e5/6e4)),this.seconds=this.number(Math.floor(t%6e4/1e3)),this.autoSegments&&(this.showDays=s>0,this.showHours=s>0||i>0),t<0&&this.endCountDown()};this.countInterval=setInterval(n,1e3),n()}renderCountDown(){const t=this.boxTheme?`var(--color-${this.boxTheme})`:this.boxColor,i=this.boxed&&t?{backgroundColor:t}:void 0;return s("ul",{class:`s-count-down-list ${this.boxed?"s-count-down-boxed":""} ${this.offerEnded?"s-count-down-ended":""} s-count-down-${this.size} s-count-down-${this.color}`,style:this.listPadding?{paddingLeft:this.listPadding,paddingRight:this.listPadding}:void 0},s("li",{class:"s-count-down-item",style:i},s("div",{class:"s-count-down-item-value"},this.seconds),this.labeled&&s("div",{class:"s-count-down-item-label"},this.secondsLabel)),s("li",{class:"s-count-down-item",style:i},s("div",{class:"s-count-down-item-value"},this.minutes),this.labeled&&s("div",{class:"s-count-down-item-label"},this.minutesLabel)),(!this.autoSegments||this.showHours)&&s("li",{class:"s-count-down-item",style:i},s("div",{class:"s-count-down-item-value"},this.hours),this.labeled&&s("div",{class:"s-count-down-item-label"},this.hoursLabel)),(!this.autoSegments||this.showDays)&&s("li",{class:"s-count-down-item",style:i},s("div",{class:"s-count-down-item-value"},this.days),this.labeled&&s("div",{class:"s-count-down-item-label"},this.daysLabel)))}renderInvalidDate(){return s("div",{class:"s-count-down-text-center"},this.invalidDate)}renderOfferEnded(){return s("div",{class:"s-count-down-end-text"},this.endText?this.endText:this.endLabel)}renderPreOrderToBeAvailableOn(){return this.normalizedPreOrder?.availability_date&&this.isValidDate(this.normalizedPreOrder?.availability_date)?s("div",{class:"s-count-down-info-message"},s("i",{class:"sicon-info"}),s("span",null,salla.lang.getWithDefault("pages.products.expected_to_be","متوقَّع توفُّره بتاريخ:")),s("span",null,new Date(this.normalizedPreOrder?.availability_date).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric"}))):null}renderPreOrderCountDown(){return this.normalizedPreOrder?.activate_countdown?s("div",{class:"s-count-down-pre-order-container"},s("p",{class:"text-sm "},salla.lang.getWithDefault("pages.products.pre_order_ends_in","ينتهي الطلب المسبق خلال:")),this.renderCountDown()):null}renderPreOrder(){return s("div",null,"object"==typeof this.normalizedPreOrder&&this.normalizedPreOrder?.availability_date&&this.renderPreOrderToBeAvailableOn(),this.renderPreOrderCountDown())}renderPrefixText(){return this.prefixText?s("span",{class:"s-count-down-prefix-text"},this.prefixText):null}renderButton(){return this.withButton&&this.buttonText?s("salla-button",{color:"primary",size:"medium",href:this.buttonHref},this.buttonIcon?s("i",{class:this.buttonIcon}):null,s("span",null,this.buttonText)):null}renderContent(){return this.date?!this.isValidDate(this.date)||this.parseFailed?this.renderInvalidDate():this.preOrder?this.renderPreOrder():this.renderCountDown():null}render(){return s(i,{key:"7055acd8fb89549ceff1f1b23f36c2dcf5f8dde0",class:`s-count-down-wrapper ${this.preOrder&&this.isValidDate(this.date)?"s-count-down-pre-order":""} ${this.horizontal?"s-count-down-horizontal":""} ${this.withButton?"s-count-down-with-button":""} ${this.offerEnded?"s-count-down-ended":""}`},this.renderPrefixText(),this.renderContent(),this.offerEnded&&this.renderOfferEnded(),this.renderButton())}};e.style=".s-count-down-horizontal{background-color:rgba(0, 0, 0, 0.06);background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}";export{e as salla_count_down}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as l,a as s}from"./p-
|
|
4
|
+
import{r as a,h as l,a as s}from"./p-BmFJLtoi.js";const e=class{constructor(l){a(this,l),this.languageNames={ar:"العربية",en:"English",sq:"shqip",hy:"հայերէն",bg:"български",zh:"汉语",hr:"hrvatski",cs:"čeština",da:"dansk",nl:"dutch",et:"eesti keel",fi:"suomen kieli",fr:"Français",de:"Deutsch",el:"Ελληνικά",hi:"हिन्दी",hu:"magyar",ind:"bahasa Indonesia",ga:"Gaeilge",it:"Italiano",ja:"日本語",ko:"한국어",lv:"latviešu",mt:"Maltese",fa:"فارسی",pl:"Polish",pt:"português",ro:"română",ru:"русский",sl:"slovenščina",es:"Español",sv:"svenska",tl:"Tagalog (Filipino)",tr:"Türkçe",uk:"украї́нська",ur:"اُردُو",ms:"Bahasa Malaysia"},this.currenciesList={SAR:{en:"Saudi Riyal",ar:"ريال سعودي",symbol:"ر.س"},USD:{en:"US Dollar",ar:"دولار أمريكي",symbol:"$"},EUR:{en:"Euro",ar:"يورو",symbol:"€"},AED:{en:"UAE Dirham",ar:"درهم اماراتي",symbol:"د.إ"},KWD:{en:"Kuwaiti Dinar",ar:"دينار كويتي",symbol:"د.ك"},BHD:{en:"Bahraini Dinar",ar:"دينار بحريني",symbol:"د.ب"},QAR:{en:"Qatari Riyal",ar:"ريال قطري",symbol:"ر.ق"},OMR:{en:"Omani Rial",ar:"ريال عماني",symbol:"ر.ع"},AUD:{en:"Australian Dollar",ar:"دولار استرالي",symbol:"$"},CAD:{en:"Canadian Dollar",ar:"دولار كندي",symbol:"$"},CNY:{en:"Renminbi",ar:"رنمينبي",symbol:"¥"},EGP:{en:"Egyptian Pound",ar:"جنيه مصري",symbol:"ج.م"},GBP:{en:"Pound Sterling",ar:"جنيه استرليني",symbol:"£"},IDR:{en:"Indonesian Rupiah",ar:"روبية إندونيسية",symbol:"Rp"},INR:{en:"Indian Rupee",ar:"روبية هندية",symbol:"₹"},JPY:{en:"Japanese Yen",ar:"ين ياباني",symbol:"¥"},MYR:{en:"Malaysian Ringgit",ar:"رينغيت ماليزي",symbol:"RM"},PKR:{en:"Pakistani Rupee",ar:"روبية باكستانية",symbol:"Rs."},SEK:{en:"Swedish Krona",ar:"كرونة سويدية",symbol:"kr"},SGD:{en:"Singapore Dollar",ar:"دولار سنغافوري",symbol:"$"},TRY:{en:"Turkish Lira",ar:"ليرة تركية",symbol:"₺"},IQD:{en:"Iraqi Dinar",ar:"دينار عراقي",symbol:"د.ع"},LBP:{en:"Lebanese Pound",ar:"ليرة لبنانية",symbol:"ل.ل"},MRO:{en:"Mauritanian Ouguiya",ar:"أوقية موريتانية",symbol:"UM"},SDG:{en:"Sudanese Pound",ar:"جنيه سوداني",symbol:"SDG"},SYP:{en:"Syrian Pound",ar:"ليرة سورية",symbol:"ل.س"},TND:{en:"Tunisian Dinar",ar:"دينار تونسي",symbol:"د.ت"},JOD:{en:"Jordanian Dinar",ar:"دينار أردني",symbol:"JOD"},DZD:{en:"Algerian Dinar",ar:"دينار جزائري",symbol:"دج"},MAD:{en:"Moroccan Dirham",ar:"درهم مغربي",symbol:"د.م."},LYD:{en:"Libyan Dinar",ar:"دينار ليبي",symbol:"LD"},YER:{en:"Yemeni Riyal",ar:"ريال يمني",symbol:"ر.ي"},ILS:{en:"New Shekel",ar:"شيكل جديد",symbol:"₪"}},this.arabicCurrencies=["SAR","AED","KWD","BHD","QAR","OMR","EGP","IQD","LBP","SYP","TND","DZD","MAD","YER"],this.languages=[],this.currencies=[],this.hasError=!1,this.showTrigger=!1,this.languageSlot=this.host.querySelector('[slot="language"]')?.innerHTML||'<label class="s-localization-modal-label" for="lang-{code}"><span>{name}</span></label>',this.currencySlot=this.host.querySelector('[slot="currency"]')?.innerHTML||'<label class="s-localization-modal-label" for="currency-{code}"><span>{name}</span><small class="s-localization-modal-currency">{symbol}</small></label>'}async componentWillLoad(){await Salla.onReady(),await Salla.lang.onLoaded(),Salla.event.on("localization::open",(()=>this.open())),Salla.event.on("currency::open",(()=>this.openUnlessNative())),Salla.event.on("language::open",(()=>this.openUnlessNative())),this.language||(this.language=Salla.config.get("user.language_code")),this.currency||(this.currency=Salla.config.get("user.currency_code")),Salla.api.withoutNotifier((()=>this.getCurrencies())).catch((()=>null))}openUnlessNative(){Salla.config.isMobileApp()||this.open()}async open(){return this.modal.open(),await Salla.api.withoutNotifier((()=>this.getLanguages())).then((()=>this.getCurrencies())).then((()=>{this.languages.length<2&&this.currencies.length<2&&this.modal.close()})).catch((a=>{console.log(a),this.hasError=!0,this.errorMessage=a.response?.data?.error?.message||a.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}getCurrency(a){const l=a||this.currency;if(this.currenciesList[l])return this.currenciesList[l];const s=this.currencies.find((a=>a.code===l));if(s){const a=this.escapeHtml(String(s.name||l));return{en:a,ar:a,symbol:this.escapeHtml(String((s.symbol||"").trim()||l))}}return{en:"Saudi Riyal",ar:"ريال سعودي",symbol:"ر.س"}}getLanguageName(){return this.languageNames[this.language]||this.language||""}getCurrencySymbol(a){return"SAR"===(a=a||this.currency)?'<i class="sicon-sar"></i>':"ar"!==this.language&&this.arabicCurrencies.includes(a)?a:this.getCurrency(a).symbol}getCurrencyName(a){return"ar"===this.language?this.getCurrency(a).ar:this.getCurrency(a).en}escapeHtml(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async getLanguages(){return this.languages.length>1?null:await Salla.config.languages().then((a=>this.languages=a))}async getCurrencies(){return this.currencies.length>1?null:await Salla.config.currencies().then((a=>this.currencies=Object.values(a||{})))}onChangeCurrency(a){this.currency=a.target.value}onChangeLanguage(a){this.language=a.target.value}async submit(){let a;this.btn.load().then((()=>{if(this.currency){if(this.currency!==Salla.config.get("user.currency_code","SAR"))return a=window.location.href,Salla.currency.api.change(this.currency)}else Salla.log("There is no currency!")})).then((()=>{this.language!==Salla.config.get("user.language_code","ar")&&(a=Salla.helpers.addParamToUrl("lang",this.language))})).then((()=>{Salla.cookie.set("s-lang",this.language),Salla.cookie.set("s-curr",this.currency)})).then((()=>this.btn.stop())).then((()=>this.close())).then((()=>{a&&(window.location.href=a.replace(`/${Salla.config.get("user.language_code")}/`,`/${this.language}/`))}))}render(){return[this.showTrigger?l("button",{type:"button",onClick:()=>this.open(),class:"s-localization-modal-trigger-btn"},l("span",null,this.getLanguageName()),l("span",{class:"s-localization-modal-trigger-separator"},"|")," ",l("span",{innerHTML:this.getCurrencySymbol()})):"",l("salla-modal",{key:"f8c4089089cc05dcc26628ca92dff99a1604d5ee",isLoading:!0,class:"s-hidden",ref:a=>this.modal=a,width:"xs"},l("div",{key:"61d4450ea6277a3848512c4a91bbe823dd8d2813",slot:"loading"},l("div",{key:"e2416822d2f660bb75284e17cb0d4408b25073b3",class:"s-localization-modal-skeleton"},l("salla-skeleton",{key:"529ac08f5fdd3442e63d3272e43075d30dc67bb3",width:"25%",height:"15px"}),l("div",{key:"9b87c3ff232922c2bb27f9064afe6e203532e624",class:"s-localization-modal-skeleton-content"},[...Array(4)].map((()=>l("div",{class:"s-localization-modal-skeleton-item"},l("div",{class:"s-localization-modal-skeleton-item-flex"},l("salla-skeleton",{type:"circle",height:"16px",width:"16px"}),l("salla-skeleton",{height:"10px",width:"100px"})),l("salla-skeleton",{height:"15px",width:"20px"}))))),l("salla-skeleton",{key:"ff35e7d5ccdb6fafc599bdaefb5390d3cba7a8a6",width:"25%",height:"15px"}),l("div",{key:"abef2a071f3818fd980023522d118e64466d77e8",class:"s-localization-modal-skeleton-content"},[...Array(4)].map((()=>l("div",{class:"s-localization-modal-skeleton-item"},l("div",{class:"s-localization-modal-skeleton-item-flex"},l("salla-skeleton",{type:"circle",height:"16px",width:"16px"}),l("salla-skeleton",{height:"10px",width:"100px"})),l("salla-skeleton",{height:"15px",width:"20px"}))))),l("salla-skeleton",{key:"15611b13fb120fc02b79c4d341aa8ecd7a4265fc",height:"40px",width:"100%"}))),this.hasError?l("salla-placeholder",{alignment:"center"},l("span",{slot:"description"},this.errorMessage)):l("div",{class:"s-localization-modal-inner"},this.languages.length>1?l("div",{class:"s-localization-modal-section"},l("label",{class:"s-localization-modal-title"},Salla.lang.get("common.titles.language")),l("div",{class:"s-localization-modal-section-inner"},this.languages.length<6?this.languages.map((a=>l("div",{class:"s-localization-modal-item"},l("input",{class:"s-localization-modal-input",type:"radio",checked:this.language==a.iso_code,onChange:()=>this.language=a.iso_code,name:"language",id:"lang-"+a.code.toLowerCase(),value:a.code}),l("div",{class:"s-localization-modal-label-slot",id:"language-slot",innerHTML:this.languageSlot.replace(/\{name\}/g,a.name).replace(/\{code\}/g,a.code).replace(/\{country_code\}/g,a.country_code)})))):l("select",{class:"s-localization-modal-select",name:"language",onChange:a=>this.onChangeLanguage(a)},this.languages.map((a=>l("option",{value:a.code,selected:this.language==a.code},a.name)))))):"",this.currencies.length>1?l("div",{class:"s-localization-modal-section"},l("label",{class:"s-localization-modal-title"},Salla.lang.get("common.titles.currency")),l("div",{class:"s-localization-modal-section-inner"},this.currencies.length<6?this.currencies.map((a=>l("div",{class:"s-localization-modal-item"},l("input",{class:"s-localization-modal-input",type:"radio",name:"currency",checked:this.currency==a.code,onChange:()=>this.currency=a.code,id:"currency-"+a.code,value:a.code}),l("div",{class:"s-localization-modal-label-slot",id:"currency-slot",innerHTML:this.currencySlot.replace(/\{name\}/g,this.getCurrencyName(a.code)).replace(/\{code\}/g,a.code).replace(/\{symbol\}/g,this.getCurrencySymbol(a.code)).replace(/\{country_code\}/g,a.country_code)})))):l("select",{class:"s-localization-modal-select",name:"currency",onChange:a=>this.onChangeCurrency(a)},this.currencies.map((a=>l("option",{value:a.code,selected:this.currency==a.code},a.name)))))):"",l("salla-button",{width:"wide",ref:a=>this.btn=a,onClick:()=>this.submit()},Salla.lang.get("common.elements.ok"))))]}componentDidRender(){this.host.querySelectorAll("#currency-slot").forEach((a=>a.replaceWith(a.firstChild))),this.host.querySelectorAll("#language-slot").forEach((a=>a.replaceWith(a.firstChild)))}get host(){return s(this)}};export{e as salla_localization_modal}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,c as
|
|
4
|
+
import{r as a,c as t,h as e,H as i}from"./p-BmFJLtoi.js";const s=class{constructor(e){a(this,e),this.prizeItemSelected=t(this,"prizeItemSelected")}onPrizeItemClick(){this.prizeItemSelected.emit(this.item)}render(){return e(i,{key:"9b3837b35a38a39bde86ada09bbe7d1a43f669f4"},e("div",{key:"d3c4e77c5dea2060b2dc0f88dba36d08a3234779",onClick:this.onPrizeItemClick.bind(this)},e("img",{key:"1219be8bbc9212da5b0392a6ac35c0c502cb1564",class:"s-loyalty-prize-item-image",src:this.item.image,alt:this.item.name}),e("div",{key:"61ac2fcbcd5ae3038b3a09ee81555f31ebd4c073",class:"s-loyalty-prize-item-title"},this.item.name),e("div",{key:"aa504c58b738528d1545cccd2ca1c2a3f4af0f32",class:"s-loyalty-prize-item-subtitle"},this.item.description),e("div",{key:"01763afbcbfd305186adabd75bd2798306a446f6",class:"s-loyalty-prize-item-points"},this.item.cost_points," ",salla.lang.get("pages.loyalty_program.point"))))}};s.style="salla-loyalty-prize-item:hover{box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";export{s as salla_loyalty_prize_item}
|