@salla.sa/twilight-components 2.14.599 → 2.14.601
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-Dk1cJoJp.js → filepond-D8C4FvMF.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Bg4PCTUm.js → filepond-plugin-file-poster-Bha1u8_P.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DmqmRxXK.js → filepond-plugin-file-validate-size-BrGHDbNv.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BKd2QnuC.js → filepond-plugin-file-validate-type-D1ZhZw29.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BIPbEbnk.js → filepond-plugin-image-edit-CpMtbo-c.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-eQvkwjqa.js → filepond-plugin-image-exif-orientation-C106fw_6.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Ba8K6ft0.js → filepond-plugin-image-preview-B2u9bre9.js} +1 -1
- package/dist/cjs/{index-Bm1Ew-5K.js → index-CIcdvW25.js} +7 -7
- package/dist/cjs/{intlTelInput-MWwwr9Td.js → intlTelInput-C_vfjTaa.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +4 -4
- package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +50 -19
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +22 -13
- package/dist/cjs/salla-badge.cjs.entry.js +2 -2
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.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 +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +60 -29
- 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-gift-card-redeem_2.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_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- 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.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.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_2.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-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +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.cjs.entry.js +5 -5
- package/dist/cjs/salla-order-shipments.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 +49 -7
- 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-card.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-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +12 -2
- package/dist/cjs/salla-skeleton.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 +24 -8
- package/dist/cjs/salla-tiered-offer.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/salla-wishlist-summary.cjs.entry.js +1 -1
- package/dist/cjs/ssr-helpers-BjD2_F8m.js +48 -0
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-BpuzEJnJ.js → vanilla-picker-9cRfp20y.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/salla-accordion/salla-accordion-body.js +1 -1
- package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
- package/dist/collection/components/salla-accordion/salla-accordion.js +1 -1
- package/dist/collection/components/salla-alert/salla-alert.js +1 -1
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.css +3 -0
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +108 -32
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.types.js +1 -0
- package/dist/collection/components/salla-badge/salla-badge.js +1 -1
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +21 -6
- package/dist/collection/components/salla-contacts/salla-contacts.js +114 -37
- package/dist/collection/components/salla-contacts/salla-contacts.types.js +1 -0
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
- package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.js +4 -4
- package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +76 -7
- package/dist/collection/components/salla-search/salla-search.js +11 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +9 -2
- package/dist/collection/components/salla-tabs/salla-tabs.js +36 -8
- package/dist/collection/utils/ssr-helpers.js +105 -0
- package/dist/components/index.js +7 -7
- package/dist/components/salla-accordion-body2.js +1 -1
- package/dist/components/salla-accordion-head2.js +2 -2
- package/dist/components/salla-accordion2.js +1 -1
- package/dist/components/salla-alert.js +1 -1
- package/dist/components/salla-apps-icons.js +53 -20
- package/dist/components/salla-badge2.js +1 -1
- package/dist/components/salla-booking-field2.js +12 -3
- package/dist/components/salla-contacts.js +62 -30
- package/dist/components/salla-order-options-modal2.js +4 -4
- package/dist/components/salla-order-totals-card.js +50 -6
- package/dist/components/salla-search.js +11 -1
- package/dist/components/salla-tab-content2.js +8 -1
- package/dist/components/salla-tabs2.js +17 -7
- package/dist/components/ssr-helpers.js +46 -0
- package/dist/docs.json +255 -34
- package/dist/esm/{filepond-3PnWp9w_.js → filepond-CdHKzx8o.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DmoyhYlz.js → filepond-plugin-file-poster-Dv1xmT8j.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CFkn2RRt.js → filepond-plugin-file-validate-size-yC6pu05S.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-pyAPn10a.js → filepond-plugin-file-validate-type-6BfFanp-.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-B5Rfgqvi.js → filepond-plugin-image-edit-DXVicFoW.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DK15iBED.js → filepond-plugin-image-exif-orientation-lh9c78ZN.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BIW0XW_M.js → filepond-plugin-image-preview--nSwXCrA.js} +1 -1
- package/dist/esm/{index-CwwxD-7C.js → index-8Kr0yg20.js} +7 -7
- package/dist/esm/{intlTelInput-DYJOvh3V.js → intlTelInput-l4GKBLuF.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +4 -4
- package/dist/esm/salla-accordion_6.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +50 -19
- package/dist/esm/salla-attachment-view_9.entry.js +22 -13
- package/dist/esm/salla-badge.entry.js +2 -2
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.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 +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +60 -29
- 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-gift-card-redeem_2.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_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- 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.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.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_2.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-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +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.entry.js +5 -5
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +49 -7
- 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-card.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-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search-product-card.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +12 -2
- package/dist/esm/salla-skeleton.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 +24 -8
- package/dist/esm/salla-tiered-offer.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/salla-wishlist-summary.entry.js +1 -1
- package/dist/esm/ssr-helpers-BJN-DTdN.js +46 -0
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-BzVn0xEV.js → vanilla-picker-Cz2XdDMP.js} +1 -1
- package/dist/twilight/{p-3243ab6e.entry.js → p-00654af3.entry.js} +1 -1
- package/dist/twilight/{p-c84e619a.entry.js → p-048ee93a.entry.js} +1 -1
- package/dist/twilight/{p-0889368b.entry.js → p-052fb212.entry.js} +1 -1
- package/dist/twilight/{p-b7dfb1f1.entry.js → p-06b45154.entry.js} +1 -1
- package/dist/twilight/{p-7f653481.entry.js → p-0e98fddd.entry.js} +1 -1
- package/dist/twilight/{p-62c985bc.entry.js → p-0fdbd8cc.entry.js} +1 -1
- package/dist/twilight/{p-0b0c9ecb.entry.js → p-11695661.entry.js} +1 -1
- package/dist/twilight/{p-6fa1498b.entry.js → p-126d5595.entry.js} +1 -1
- package/dist/twilight/{p-62373e96.entry.js → p-16479b90.entry.js} +1 -1
- package/dist/twilight/{p-f5693509.entry.js → p-16dcf15c.entry.js} +1 -1
- package/dist/twilight/{p-f310c72e.entry.js → p-1db334c5.entry.js} +1 -1
- package/dist/twilight/{p-b7c815f7.entry.js → p-1e0df65d.entry.js} +1 -1
- package/dist/twilight/p-2173c0f0.entry.js +4 -0
- package/dist/twilight/p-23073b8a.entry.js +4 -0
- package/dist/twilight/{p-c892e962.entry.js → p-254c863e.entry.js} +1 -1
- package/dist/twilight/{p-651db82c.entry.js → p-25f15ab6.entry.js} +1 -1
- package/dist/twilight/{p-96154a67.entry.js → p-270e4b2d.entry.js} +1 -1
- package/dist/twilight/{p-afd47a18.entry.js → p-28c75dcf.entry.js} +1 -1
- package/dist/twilight/{p-e248f0d0.entry.js → p-2a160737.entry.js} +1 -1
- package/dist/twilight/{p-cce07c4c.entry.js → p-2a28633d.entry.js} +1 -1
- package/dist/twilight/{p-e4ed760b.entry.js → p-2bf57ca7.entry.js} +1 -1
- package/dist/twilight/p-3118f527.entry.js +4 -0
- package/dist/twilight/{p-07817ae8.entry.js → p-3130e363.entry.js} +1 -1
- package/dist/twilight/{p-ee2a5db7.entry.js → p-3179c72b.entry.js} +1 -1
- package/dist/twilight/{p-6d47b269.entry.js → p-3392ced8.entry.js} +1 -1
- package/dist/twilight/{p-0ba03206.entry.js → p-34b6c381.entry.js} +1 -1
- package/dist/twilight/{p-DFj0n9Nh.js → p-3RAlOumf.js} +1 -1
- package/dist/twilight/{p-83e1c586.entry.js → p-3ad77173.entry.js} +1 -1
- package/dist/twilight/{p-f4d52f9b.entry.js → p-3c89325e.entry.js} +1 -1
- package/dist/twilight/p-3cd513b2.entry.js +4 -0
- package/dist/twilight/{p-18e75544.entry.js → p-476e3d1b.entry.js} +1 -1
- package/dist/twilight/{p-f5026adf.entry.js → p-490493cc.entry.js} +1 -1
- package/dist/twilight/{p-bcbb4a03.entry.js → p-4b559931.entry.js} +1 -1
- package/dist/twilight/{p-0253bf71.entry.js → p-4cfca9e1.entry.js} +1 -1
- package/dist/twilight/{p-d01c4ba8.entry.js → p-5076dfe4.entry.js} +1 -1
- package/dist/twilight/{p-1fd1c0a3.entry.js → p-5500cb85.entry.js} +1 -1
- package/dist/twilight/{p-e1fb95cb.entry.js → p-5b0259d8.entry.js} +1 -1
- package/dist/twilight/{p-f51e9549.entry.js → p-5bfe0a12.entry.js} +1 -1
- package/dist/twilight/{p-6e7433f2.entry.js → p-5de3e4c3.entry.js} +1 -1
- package/dist/twilight/{p-ac8a7743.entry.js → p-5f176cff.entry.js} +1 -1
- package/dist/twilight/{p-8e91da09.entry.js → p-60a16078.entry.js} +1 -1
- package/dist/twilight/{p-76ca3445.entry.js → p-62081545.entry.js} +1 -1
- package/dist/twilight/{p-f1d5ebf4.entry.js → p-64ce7d04.entry.js} +1 -1
- package/dist/twilight/{p-c4f92bae.entry.js → p-654d7158.entry.js} +1 -1
- package/dist/twilight/{p-f580d024.entry.js → p-66739790.entry.js} +1 -1
- package/dist/twilight/{p-659e00b7.entry.js → p-68bab651.entry.js} +1 -1
- package/dist/twilight/{p-d8cf239a.entry.js → p-6b9e0168.entry.js} +1 -1
- package/dist/twilight/{p-114e4228.entry.js → p-6d629a37.entry.js} +1 -1
- package/dist/twilight/{p-c98d1097.entry.js → p-6f64aca2.entry.js} +1 -1
- package/dist/twilight/{p-c282869e.entry.js → p-70e1cddf.entry.js} +1 -1
- package/dist/twilight/{p-bc5b70e9.entry.js → p-722a1d49.entry.js} +1 -1
- package/dist/twilight/p-72f1eb9d.entry.js +4 -0
- package/dist/twilight/{p-2213f6eb.entry.js → p-73be3e2b.entry.js} +1 -1
- package/dist/twilight/{p-6b2f6957.entry.js → p-78fce485.entry.js} +1 -1
- package/dist/twilight/{p-62dc337d.entry.js → p-7a7efc1e.entry.js} +1 -1
- package/dist/twilight/{p-1b25ea2a.entry.js → p-80986ebf.entry.js} +1 -1
- package/dist/twilight/{p-2b5242cb.entry.js → p-8456fc2b.entry.js} +1 -1
- package/dist/twilight/{p-4ebee06a.entry.js → p-845d6d9f.entry.js} +1 -1
- package/dist/twilight/p-8Kr0yg20.js +5 -0
- package/dist/twilight/{p-fe7751a8.entry.js → p-8bb54ab1.entry.js} +1 -1
- package/dist/twilight/{p-10418cc0.entry.js → p-8bd722e2.entry.js} +1 -1
- package/dist/twilight/{p-8aa29666.entry.js → p-942a9370.entry.js} +1 -1
- package/dist/twilight/p-96028c8b.entry.js +4 -0
- package/dist/twilight/{p-46c8b068.entry.js → p-96b9ba64.entry.js} +1 -1
- package/dist/twilight/{p-db1e0bc6.entry.js → p-98de4c11.entry.js} +1 -1
- package/dist/twilight/{p-c7a491ef.entry.js → p-9a30c09e.entry.js} +1 -1
- package/dist/twilight/{p-20f98a45.entry.js → p-9bc1676b.entry.js} +1 -1
- package/dist/twilight/{p-CYeysHdt.js → p-B-WH3lv4.js} +1 -1
- package/dist/twilight/p-BJN-DTdN.js +4 -0
- package/dist/twilight/{p-DzBc32wK.js → p-BNVpOSmh.js} +1 -1
- package/dist/twilight/{p-DHXSZjVo.js → p-B_znruWg.js} +1 -1
- package/dist/twilight/{p-CntnRJCa.js → p-BwJOl2G2.js} +1 -1
- package/dist/twilight/{p-Bb9AkvT4.js → p-CSgEn8iE.js} +1 -1
- package/dist/twilight/{p-FcjN5vEx.js → p-C_-Bd9R8.js} +1 -1
- package/dist/twilight/{p-CaabLwI1.js → p-DCZHPueO.js} +1 -1
- package/dist/twilight/{p-B8yyit_i.js → p-DdILhElb.js} +1 -1
- package/dist/twilight/{p-aaac2388.entry.js → p-a3630cbf.entry.js} +1 -1
- package/dist/twilight/{p-509b04c7.entry.js → p-a98f0462.entry.js} +1 -1
- package/dist/twilight/{p-b2ff66ed.entry.js → p-ac719286.entry.js} +1 -1
- package/dist/twilight/{p-55399fed.entry.js → p-b68679eb.entry.js} +1 -1
- package/dist/twilight/{p-f38d6c1b.entry.js → p-b7ed8e39.entry.js} +1 -1
- package/dist/twilight/{p-79ce9e95.entry.js → p-b85d3a54.entry.js} +1 -1
- package/dist/twilight/{p-6d61d93c.entry.js → p-b8e56642.entry.js} +1 -1
- package/dist/twilight/{p-14b1b664.entry.js → p-c0d00e89.entry.js} +1 -1
- package/dist/twilight/p-c1039294.entry.js +4 -0
- package/dist/twilight/{p-0bff8609.entry.js → p-c6c496ec.entry.js} +1 -1
- package/dist/twilight/{p-89bba634.entry.js → p-ca838de0.entry.js} +1 -1
- package/dist/twilight/{p-067ad44c.entry.js → p-cf742415.entry.js} +1 -1
- package/dist/twilight/{p-dc090987.entry.js → p-d062becf.entry.js} +1 -1
- package/dist/twilight/p-d7cb0405.entry.js +4 -0
- package/dist/twilight/{p-925ba8ce.entry.js → p-d9360a47.entry.js} +1 -1
- package/dist/twilight/{p-7148dbad.entry.js → p-db5d3d60.entry.js} +1 -1
- package/dist/twilight/{p-93d284c4.entry.js → p-dc226d90.entry.js} +1 -1
- package/dist/twilight/{p-1c191c15.entry.js → p-df6a4f43.entry.js} +1 -1
- package/dist/twilight/{p-8d99e9d1.entry.js → p-e12337ab.entry.js} +1 -1
- package/dist/twilight/{p-2db00d46.entry.js → p-e54b95a6.entry.js} +1 -1
- package/dist/twilight/{p-261aff22.entry.js → p-e5f0a5f3.entry.js} +1 -1
- package/dist/twilight/{p-4ca3b245.entry.js → p-e62dd507.entry.js} +1 -1
- package/dist/twilight/{p-25fb1508.entry.js → p-e7ac6421.entry.js} +1 -1
- package/dist/twilight/{p-dda47e56.entry.js → p-e93bcc6e.entry.js} +1 -1
- package/dist/twilight/{p-d6886b07.entry.js → p-eb91b45a.entry.js} +1 -1
- package/dist/twilight/{p-a6594c68.entry.js → p-f1eca4da.entry.js} +1 -1
- package/dist/twilight/{p-56c77026.entry.js → p-f6b40c3f.entry.js} +1 -1
- package/dist/twilight/{p-065f2937.entry.js → p-f6dc6e8a.entry.js} +1 -1
- package/dist/twilight/{p-49bba37d.entry.js → p-fd4786e4.entry.js} +1 -1
- package/dist/twilight/{p-84912a5a.entry.js → p-ff64dad1.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-apps-icons/salla-apps-icons.d.ts +26 -13
- package/dist/types/components/salla-apps-icons/salla-apps-icons.types.d.ts +4 -0
- package/dist/types/components/salla-booking-field/salla-booking-field.d.ts +5 -1
- package/dist/types/components/salla-contacts/salla-contacts.d.ts +26 -14
- package/dist/types/components/salla-contacts/salla-contacts.types.d.ts +7 -0
- package/dist/types/components/salla-order-totals-card/interfaces.d.ts +27 -0
- package/dist/types/components/salla-order-totals-card/salla-order-totals-card.d.ts +12 -4
- package/dist/types/components/salla-search/salla-search.d.ts +3 -1
- package/dist/types/components/salla-tabs/salla-tab-content.d.ts +3 -2
- package/dist/types/components/salla-tabs/salla-tabs.d.ts +8 -3
- package/dist/types/components.d.ts +90 -22
- package/dist/types/utils/ssr-helpers.d.ts +73 -0
- package/package.json +5 -5
- package/dist/twilight/p-1f561241.entry.js +0 -4
- package/dist/twilight/p-27df0290.entry.js +0 -4
- package/dist/twilight/p-2f04343f.entry.js +0 -4
- package/dist/twilight/p-3de0b3ae.entry.js +0 -4
- package/dist/twilight/p-89fddf1e.entry.js +0 -4
- package/dist/twilight/p-CwwxD-7C.js +0 -5
- package/dist/twilight/p-a743a10a.entry.js +0 -4
- package/dist/twilight/p-f345a77d.entry.js +0 -4
- package/dist/twilight/p-f8b428cb.entry.js +0 -4
|
@@ -2,44 +2,75 @@
|
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
4
|
import { Host, h } from "@stencil/core";
|
|
5
|
+
import { isSallaSdkAvailable } from "../../utils/ssr-helpers";
|
|
5
6
|
/**
|
|
6
7
|
* @slot app - Replaces app item, has replaceable props `{icon}`, `{name}`.
|
|
7
8
|
*/
|
|
8
9
|
export class SallaAppsIcons {
|
|
9
10
|
constructor() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Flag to hide the title.
|
|
13
|
+
*/
|
|
14
|
+
this.hideTitle = false;
|
|
15
|
+
/**
|
|
16
|
+
* Display icons vertically instead of horizontally.
|
|
17
|
+
*/
|
|
18
|
+
this.vertical = false;
|
|
19
|
+
this.sdkApps = null;
|
|
20
|
+
}
|
|
21
|
+
getDefaultSlot() {
|
|
22
|
+
return `<img alt="{name}" src="{icon}" width="135" height="40" decoding="async" loading="lazy" />`;
|
|
15
23
|
}
|
|
16
24
|
connectedCallback() {
|
|
17
|
-
|
|
18
|
-
this.
|
|
25
|
+
if (isSallaSdkAvailable()) {
|
|
26
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
27
|
+
if (!this.appsTitle || this.appsTitle === this.langTitle) {
|
|
28
|
+
this.appsTitle = this.langTitle = salla.lang.get('blocks.footer.download_apps');
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
// capture once: componentDidRender removes the slot element, so a reconnect could no longer read it
|
|
33
|
+
if (!this.appSlot) {
|
|
34
|
+
const slotElement = this.slotTemplate ? null : this.host.querySelector('[slot="app"]');
|
|
35
|
+
this.appSlot = slotElement ? slotElement.innerHTML : (this.slotTemplate || this.getDefaultSlot());
|
|
36
|
+
}
|
|
37
|
+
if (!isSallaSdkAvailable())
|
|
38
|
+
return;
|
|
39
|
+
// load the store's apps even when `apps` is passed, so clearing the prop falls back to them
|
|
40
|
+
salla.onReady(() => {
|
|
41
|
+
this.sdkApps = salla.config.get('store.apps');
|
|
19
42
|
});
|
|
20
43
|
}
|
|
21
44
|
disconnectedCallback() {
|
|
22
45
|
this.langUnsubscribe?.();
|
|
23
46
|
}
|
|
24
47
|
getAppsArray() {
|
|
25
|
-
|
|
26
|
-
|
|
48
|
+
const apps = this.apps || this.sdkApps;
|
|
49
|
+
if (!apps) {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
return Object.entries(apps)
|
|
53
|
+
.filter(([, value]) => value && typeof value === 'string')
|
|
54
|
+
.map(([name, value]) => ({ name, value: value }));
|
|
27
55
|
}
|
|
28
|
-
|
|
29
|
-
|
|
56
|
+
getCdnUrl(iconName) {
|
|
57
|
+
if (isSallaSdkAvailable()) {
|
|
58
|
+
return salla.url.cdn(`images/${iconName}.png`);
|
|
59
|
+
}
|
|
60
|
+
return `https://cdn.salla.net/images/${iconName}.png`;
|
|
61
|
+
}
|
|
62
|
+
componentDidRender() {
|
|
63
|
+
this.host.querySelector('[slot="app"]')?.remove();
|
|
30
64
|
}
|
|
31
65
|
render() {
|
|
32
66
|
const appsArray = this.getAppsArray();
|
|
33
|
-
if (
|
|
67
|
+
if (appsArray.length === 0) {
|
|
34
68
|
return;
|
|
35
69
|
}
|
|
36
|
-
return (h(Host, { class: "s-apps-icons" }, !this.hideTitle && h("h3", null, this.appsTitle), h("div", { class: { "s-apps-icons-list": true, "vertical": this.vertical } }, appsArray.map((app
|
|
37
|
-
.replace(/\{icon\}/g,
|
|
70
|
+
return (h(Host, { class: "s-apps-icons" }, !this.hideTitle && this.appsTitle && h("h3", null, this.appsTitle), h("div", { class: { "s-apps-icons-list": true, "vertical": this.vertical } }, appsArray.map((app) => (h("a", { key: app.name, href: app.value, rel: "noreferrer", target: "_blank", class: "s-apps-icons-item", innerHTML: this.appSlot
|
|
71
|
+
.replace(/\{icon\}/g, this.getCdnUrl(app.name))
|
|
38
72
|
.replace(/\{name\}/g, app.name) }))))));
|
|
39
73
|
}
|
|
40
|
-
componentDidRender() {
|
|
41
|
-
this.host.querySelector('[slot="app"]')?.remove();
|
|
42
|
-
}
|
|
43
74
|
static get is() { return "salla-apps-icons"; }
|
|
44
75
|
static get originalStyleUrls() {
|
|
45
76
|
return {
|
|
@@ -53,44 +84,69 @@ export class SallaAppsIcons {
|
|
|
53
84
|
}
|
|
54
85
|
static get properties() {
|
|
55
86
|
return {
|
|
56
|
-
"
|
|
57
|
-
"type": "
|
|
58
|
-
"attribute": "
|
|
87
|
+
"apps": {
|
|
88
|
+
"type": "unknown",
|
|
89
|
+
"attribute": "apps",
|
|
59
90
|
"mutable": false,
|
|
60
91
|
"complexType": {
|
|
61
|
-
"original": "
|
|
62
|
-
"resolved": "
|
|
63
|
-
"references": {
|
|
92
|
+
"original": "AppsIconsConfig",
|
|
93
|
+
"resolved": "AppsIconsConfig",
|
|
94
|
+
"references": {
|
|
95
|
+
"AppsIconsConfig": {
|
|
96
|
+
"location": "import",
|
|
97
|
+
"path": "./salla-apps-icons.types",
|
|
98
|
+
"id": "src/components/salla-apps-icons/salla-apps-icons.types.ts::AppsIconsConfig"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
64
101
|
},
|
|
65
102
|
"required": false,
|
|
66
|
-
"optional":
|
|
103
|
+
"optional": true,
|
|
67
104
|
"docs": {
|
|
68
105
|
"tags": [],
|
|
69
|
-
"text": "
|
|
106
|
+
"text": "Apps URLs in object format {appstore, googleplay}.\nWhen not provided, uses SDK config 'store.apps'."
|
|
70
107
|
},
|
|
71
108
|
"getter": false,
|
|
72
|
-
"setter": false
|
|
73
|
-
"reflect": false
|
|
109
|
+
"setter": false
|
|
74
110
|
},
|
|
75
111
|
"appsTitle": {
|
|
76
112
|
"type": "string",
|
|
77
113
|
"attribute": "apps-title",
|
|
78
|
-
"mutable":
|
|
114
|
+
"mutable": true,
|
|
79
115
|
"complexType": {
|
|
80
116
|
"original": "string",
|
|
81
117
|
"resolved": "string",
|
|
82
118
|
"references": {}
|
|
83
119
|
},
|
|
84
120
|
"required": false,
|
|
85
|
-
"optional":
|
|
121
|
+
"optional": true,
|
|
86
122
|
"docs": {
|
|
87
123
|
"tags": [],
|
|
88
|
-
"text": "The title to display."
|
|
124
|
+
"text": "The title to display above icons.\nWhen not provided, uses SDK lang 'blocks.footer.download_apps'."
|
|
89
125
|
},
|
|
90
126
|
"getter": false,
|
|
91
127
|
"setter": false,
|
|
92
128
|
"reflect": false
|
|
93
129
|
},
|
|
130
|
+
"hideTitle": {
|
|
131
|
+
"type": "boolean",
|
|
132
|
+
"attribute": "hide-title",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "boolean",
|
|
136
|
+
"resolved": "boolean",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": false,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": "Flag to hide the title."
|
|
144
|
+
},
|
|
145
|
+
"getter": false,
|
|
146
|
+
"setter": false,
|
|
147
|
+
"reflect": false,
|
|
148
|
+
"defaultValue": "false"
|
|
149
|
+
},
|
|
94
150
|
"vertical": {
|
|
95
151
|
"type": "boolean",
|
|
96
152
|
"attribute": "vertical",
|
|
@@ -104,7 +160,27 @@ export class SallaAppsIcons {
|
|
|
104
160
|
"optional": false,
|
|
105
161
|
"docs": {
|
|
106
162
|
"tags": [],
|
|
107
|
-
"text": "Display
|
|
163
|
+
"text": "Display icons vertically instead of horizontally."
|
|
164
|
+
},
|
|
165
|
+
"getter": false,
|
|
166
|
+
"setter": false,
|
|
167
|
+
"reflect": false,
|
|
168
|
+
"defaultValue": "false"
|
|
169
|
+
},
|
|
170
|
+
"slotTemplate": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"attribute": "slot-template",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "string",
|
|
176
|
+
"resolved": "string",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": true,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "Custom slot template HTML with placeholders {icon}, {name}.\nUsed for SSR. Client-side can use slot=\"app\" instead."
|
|
108
184
|
},
|
|
109
185
|
"getter": false,
|
|
110
186
|
"setter": false,
|
|
@@ -114,7 +190,7 @@ export class SallaAppsIcons {
|
|
|
114
190
|
}
|
|
115
191
|
static get states() {
|
|
116
192
|
return {
|
|
117
|
-
"
|
|
193
|
+
"sdkApps": {}
|
|
118
194
|
};
|
|
119
195
|
}
|
|
120
196
|
static get elementRef() { return "host"; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -37,7 +37,7 @@ export class SallaBadge {
|
|
|
37
37
|
this.bg = 'light';
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return (h("div", { key: '
|
|
40
|
+
return (h("div", { key: '7a78bf8120879a06ce40d6e63d7fcd8444fff727', class: badge({ size: this.size, bg: this.bg, color: this.color }) }, h("slot", { key: '1ea89bc586b06a0e498d972d5efc5eaaffaf5a63' })));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "salla-badge"; }
|
|
43
43
|
static get originalStyleUrls() {
|
|
@@ -19,7 +19,6 @@ export class SallaBookingField {
|
|
|
19
19
|
Salla.event.on('booking::open', (data) => this.handleBookingOpen(data));
|
|
20
20
|
}
|
|
21
21
|
connectedCallback() {
|
|
22
|
-
// Load translations
|
|
23
22
|
this.langUnsubscribe = salla.lang.subscribe(() => this.setTranslations());
|
|
24
23
|
}
|
|
25
24
|
disconnectedCallback() {
|
|
@@ -69,6 +68,11 @@ export class SallaBookingField {
|
|
|
69
68
|
handleBookingOpen(data) {
|
|
70
69
|
if (data.id !== this.productId)
|
|
71
70
|
return;
|
|
71
|
+
// Opt-in native override: inside the SPA webview the bridge forwards this same event to native
|
|
72
|
+
// as `mobile::booking.open` { url, id }, and the native shell owns the booking screen — skip the
|
|
73
|
+
// web iframe modal so both don't show. On web / apps without the flag, the modal opens as usual.
|
|
74
|
+
if (salla.mobile?.isSpaWebview?.())
|
|
75
|
+
return;
|
|
72
76
|
this.bookingUrl = salla.url.addParamToUrl('product_id', data.id, data.url);
|
|
73
77
|
this.iframeReady = true;
|
|
74
78
|
setTimeout(() => {
|
|
@@ -98,7 +102,12 @@ export class SallaBookingField {
|
|
|
98
102
|
window.addEventListener('booking::open-after-reload', (event) => this.openBookingModal(event, true));
|
|
99
103
|
this.emitAfterReloadEvent();
|
|
100
104
|
window.addEventListener('message', this.handleMessageEvent.bind(this));
|
|
101
|
-
this.reservationsInput.addEventListener('invalid', e =>
|
|
105
|
+
this.reservationsInput.addEventListener('invalid', e => {
|
|
106
|
+
this.invalidInput.emit({
|
|
107
|
+
target: e.target,
|
|
108
|
+
validity: e.target.validity
|
|
109
|
+
});
|
|
110
|
+
});
|
|
102
111
|
this.reservationsInput.addEventListener('input', () => {
|
|
103
112
|
this.reservationsInput.setCustomValidity('');
|
|
104
113
|
this.reservationsInput.reportValidity();
|
|
@@ -154,7 +163,7 @@ export class SallaBookingField {
|
|
|
154
163
|
return (h("span", { class: "s-booking-field-reservations-time" }, h("i", { class: "s-booking-field-reservations-icon", innerHTML: TimeIcon }), h("span", null, reservation.from_timestamp, " - ", reservation.to_timestamp)));
|
|
155
164
|
}
|
|
156
165
|
render() {
|
|
157
|
-
return (h(Host, { key: '
|
|
166
|
+
return (h(Host, { key: '867baeadef44a292fb91610fa37543b13f106791' }, h("div", { key: '3a6b64b5ca81a71665954d48059c3f7991b074d5', class: "s-booking-field-main" }, this.option.required || this.reservations.length > 0 ? h("div", { class: "s-booking-field-price" }, h("span", { innerHTML: salla.money(this.option.price) })) : '', h("salla-button", { key: 'a274a931a7c2f3817774196c2150cf6b36365028', class: "s-booking-field-book-now", size: "small", loaderPosition: "center", fill: "outline", onClick: event => this.openBookingModal(event, false) }, h("span", { key: '52da7cac22d69527c92844bc907610593521c115', class: "s-booking-field-book-now-content" }, h("span", { key: '9aaece05a99d335158b5bbc110cbf4e7febba06d', innerHTML: BookingTime }), this.reservations.length ? this.editLabel : this.bookNowLabel))), this.reservations.length > 0 && (h("div", { key: '320151bc171976c0f2962fa30fa7efb923830cd0', class: "s-booking-field-reservations" }, this.reservations.map((reservation, index) => (h("div", { key: index, class: "s-booking-field-reservations-item" }, this.renderReservationDate(reservation), this.renderReservationTime(reservation)))))), h("input", { key: 'ecea033a152115533a80ec2ae33b415c11b19c42', class: "s-hidden", name: this.option.name, required: this.option.required, value: JSON.stringify(this.reservations) === '[]' ? '' : JSON.stringify(this.reservations), ref: reservations => this.reservationsInput = reservations }), this.iframeReady && this.bookingModal()));
|
|
158
167
|
}
|
|
159
168
|
static get is() { return "salla-booking-field"; }
|
|
160
169
|
static get originalStyleUrls() {
|
|
@@ -238,9 +247,15 @@ export class SallaBookingField {
|
|
|
238
247
|
"text": "Event emitted when the input is invalid."
|
|
239
248
|
},
|
|
240
249
|
"complexType": {
|
|
241
|
-
"original": "
|
|
242
|
-
"resolved": "
|
|
243
|
-
"references": {
|
|
250
|
+
"original": "SallaBookingFieldInvalidInputEvent",
|
|
251
|
+
"resolved": "SallaBookingFieldInvalidInputEvent",
|
|
252
|
+
"references": {
|
|
253
|
+
"SallaBookingFieldInvalidInputEvent": {
|
|
254
|
+
"location": "local",
|
|
255
|
+
"path": "/home/runner/_work/twilight/twilight/packages/twilight-components/src/components/salla-booking-field/salla-booking-field.tsx",
|
|
256
|
+
"id": "src/components/salla-booking-field/salla-booking-field.tsx::SallaBookingFieldInvalidInputEvent"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
244
259
|
}
|
|
245
260
|
}];
|
|
246
261
|
}
|
|
@@ -2,74 +2,109 @@
|
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
4
|
import { Host, h } from "@stencil/core";
|
|
5
|
+
import { isSallaSdkAvailable } from "../../utils/ssr-helpers";
|
|
5
6
|
import mobile from "../../assets/svg/iphone.svg";
|
|
6
7
|
import whatsapp from "../../assets/svg/whatsapp2.svg";
|
|
7
8
|
import phone from "../../assets/svg/phone.svg";
|
|
8
9
|
import telegram from "../../assets/svg/paper-plane-o.svg";
|
|
9
10
|
import email from "../../assets/svg/mail.svg";
|
|
10
11
|
/**
|
|
11
|
-
* @slot contact - Replaces contact item, has replaceable props `{icon}`, `{value}`.
|
|
12
|
+
* @slot contact - Replaces contact item, has replaceable props `{icon}`, `{value}`, `{link}`.
|
|
12
13
|
*/
|
|
13
14
|
export class SallaContacts {
|
|
14
15
|
constructor() {
|
|
15
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Flag to toggle title visibility.
|
|
18
|
+
*/
|
|
19
|
+
this.hideTitle = false;
|
|
20
|
+
/**
|
|
21
|
+
* Conditional flag to check whether the content is header or not.
|
|
22
|
+
*/
|
|
23
|
+
this.isHeader = false;
|
|
24
|
+
/**
|
|
25
|
+
* Flag to toggle list of contents whether vertical or horizontal.
|
|
26
|
+
*/
|
|
27
|
+
this.horizontal = false;
|
|
28
|
+
/**
|
|
29
|
+
* Flag condition to show icon only or icon with label.
|
|
30
|
+
*/
|
|
31
|
+
this.iconsOnly = false;
|
|
32
|
+
this.sdkContacts = null;
|
|
16
33
|
this.iconsList = { mobile, whatsapp, phone, telegram, email };
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
34
|
+
}
|
|
35
|
+
getDefaultSlot() {
|
|
36
|
+
const valueMarkup = this.iconsOnly ? '' : "<span class='unicode'>{value}</span>";
|
|
37
|
+
return '<a href="{link}" class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>' + valueMarkup + '</a>';
|
|
21
38
|
}
|
|
22
39
|
connectedCallback() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.contactsTitle
|
|
26
|
-
|
|
40
|
+
if (isSallaSdkAvailable()) {
|
|
41
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
42
|
+
if (!this.contactsTitle || this.contactsTitle === this.langTitle) {
|
|
43
|
+
this.contactsTitle = this.langTitle = salla.lang.get('blocks.footer.social');
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
// capture once: componentDidRender removes the slot element, so a reconnect could no longer read it
|
|
48
|
+
if (!this.contactSlot) {
|
|
49
|
+
const slotElement = this.slotTemplate ? null : this.host.querySelector('[slot="contact"]');
|
|
50
|
+
this.contactSlot = slotElement ? slotElement.innerHTML : (this.slotTemplate || this.getDefaultSlot());
|
|
51
|
+
}
|
|
52
|
+
if (!isSallaSdkAvailable())
|
|
53
|
+
return;
|
|
54
|
+
// load the store's contacts even when `contacts` is passed, so clearing the prop falls back to them
|
|
55
|
+
salla.onReady(() => {
|
|
56
|
+
this.sdkContacts = salla.config.get('store.contacts');
|
|
27
57
|
});
|
|
28
58
|
}
|
|
29
59
|
disconnectedCallback() {
|
|
30
60
|
this.langUnsubscribe?.();
|
|
31
61
|
}
|
|
62
|
+
getContactsData() {
|
|
63
|
+
return this.contacts || this.sdkContacts || {};
|
|
64
|
+
}
|
|
32
65
|
getContactsArray() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
.
|
|
66
|
+
const contactsData = this.getContactsData();
|
|
67
|
+
return Object.entries(contactsData)
|
|
68
|
+
.filter(([, value]) => value && value !== '')
|
|
69
|
+
.map(([type, value]) => ({ type, value: value }));
|
|
36
70
|
}
|
|
37
|
-
getContactLink(type) {
|
|
38
|
-
const contactValue = this.contacts[type];
|
|
71
|
+
getContactLink(type, contactValue) {
|
|
39
72
|
switch (type) {
|
|
40
73
|
case 'phone':
|
|
41
74
|
case 'mobile':
|
|
42
75
|
return `tel:${contactValue}`;
|
|
43
76
|
case 'whatsapp':
|
|
44
|
-
const whatsAppNumber =
|
|
45
|
-
return whatsAppNumber ? `https://wa.me/${whatsAppNumber}` :
|
|
77
|
+
const whatsAppNumber = contactValue.toString().replace(/[^\d]/g, '');
|
|
78
|
+
return whatsAppNumber ? `https://wa.me/${whatsAppNumber}` :
|
|
79
|
+
(isSallaSdkAvailable() ? salla.url.get('whatsapp/send') : '');
|
|
46
80
|
case 'email':
|
|
47
81
|
return `mailto:${contactValue}`;
|
|
48
82
|
case 'telegram':
|
|
49
|
-
// Check if the contact is already a full URL
|
|
50
83
|
return contactValue.startsWith('https://t.me/') ? contactValue : `https://t.me/${contactValue}`;
|
|
51
84
|
default:
|
|
52
85
|
return contactValue;
|
|
53
86
|
}
|
|
54
87
|
}
|
|
55
88
|
getContactIcon(type) {
|
|
56
|
-
return this.iconsList[type];
|
|
89
|
+
return this.iconsList[type] || '';
|
|
57
90
|
}
|
|
58
|
-
|
|
59
|
-
|
|
91
|
+
componentDidRender() {
|
|
92
|
+
this.host.querySelector('[slot="contact"]')?.remove();
|
|
60
93
|
}
|
|
61
94
|
render() {
|
|
62
95
|
const contactsArray = this.getContactsArray();
|
|
63
|
-
if (!contactsArray || contactsArray.length
|
|
96
|
+
if (!contactsArray || contactsArray.length === 0) {
|
|
64
97
|
return;
|
|
65
98
|
}
|
|
66
99
|
if (this.isHeader) {
|
|
67
|
-
return (h(Host, { class: "s-contacts s-contacts-header" }, contactsArray
|
|
100
|
+
return (h(Host, { class: "s-contacts s-contacts-header" }, contactsArray
|
|
101
|
+
.filter(contact => contact.type === 'phone' || contact.type === 'email')
|
|
102
|
+
.map((contact, index) => (h("a", { href: this.getContactLink(contact.type, contact.value), key: index, class: "s-contacts-topnav-link" }, contact.type === 'email' ? (contact.value) : ([
|
|
68
103
|
h("span", null, this.contactsTitle, ": "),
|
|
69
104
|
h("span", { class: "unicode" }, contact.value)
|
|
70
105
|
]))))));
|
|
71
106
|
}
|
|
72
|
-
return (h(Host, { class: "s-contacts" }, !this.hideTitle && h("h3", { class: "s-contacts-title" }, this.contactsTitle), h("div", { class: {
|
|
107
|
+
return (h(Host, { class: "s-contacts" }, !this.hideTitle && this.contactsTitle && h("h3", { class: "s-contacts-title" }, this.contactsTitle), h("div", { class: {
|
|
73
108
|
's-contacts-list': true,
|
|
74
109
|
's-contacts-list-horizontal': this.horizontal,
|
|
75
110
|
's-contacts-list-vertical': !this.horizontal,
|
|
@@ -77,11 +112,7 @@ export class SallaContacts {
|
|
|
77
112
|
} }, contactsArray.map((contact, index) => (h("div", { key: index, id: "contact-slot", innerHTML: this.contactSlot
|
|
78
113
|
.replace(/\{icon\}/g, this.getContactIcon(contact.type))
|
|
79
114
|
.replace(/\{value\}/g, contact.value.toString())
|
|
80
|
-
.replace(/\{link\}/g, this.getContactLink(contact.type)) }))))));
|
|
81
|
-
}
|
|
82
|
-
componentDidRender() {
|
|
83
|
-
// this.host.querySelectorAll('#contact-slot').forEach(el => el.replaceWith(el.firstChild));
|
|
84
|
-
this.host.querySelector('[slot="contact"]')?.remove();
|
|
115
|
+
.replace(/\{link\}/g, this.getContactLink(contact.type, contact.value)) }))))));
|
|
85
116
|
}
|
|
86
117
|
static get is() { return "salla-contacts"; }
|
|
87
118
|
static get originalStyleUrls() {
|
|
@@ -96,6 +127,30 @@ export class SallaContacts {
|
|
|
96
127
|
}
|
|
97
128
|
static get properties() {
|
|
98
129
|
return {
|
|
130
|
+
"contacts": {
|
|
131
|
+
"type": "unknown",
|
|
132
|
+
"attribute": "contacts",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "ContactsConfig",
|
|
136
|
+
"resolved": "ContactsConfig",
|
|
137
|
+
"references": {
|
|
138
|
+
"ContactsConfig": {
|
|
139
|
+
"location": "import",
|
|
140
|
+
"path": "./salla-contacts.types",
|
|
141
|
+
"id": "src/components/salla-contacts/salla-contacts.types.ts::ContactsConfig"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": true,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [],
|
|
149
|
+
"text": "Contact information in object format {whatsapp, mobile, phone, email, telegram}.\nWhen not provided, uses SDK config 'store.contacts'."
|
|
150
|
+
},
|
|
151
|
+
"getter": false,
|
|
152
|
+
"setter": false
|
|
153
|
+
},
|
|
99
154
|
"contactsTitle": {
|
|
100
155
|
"type": "string",
|
|
101
156
|
"attribute": "contacts-title",
|
|
@@ -106,10 +161,10 @@ export class SallaContacts {
|
|
|
106
161
|
"references": {}
|
|
107
162
|
},
|
|
108
163
|
"required": false,
|
|
109
|
-
"optional":
|
|
164
|
+
"optional": true,
|
|
110
165
|
"docs": {
|
|
111
166
|
"tags": [],
|
|
112
|
-
"text": "Section title for social block of footer."
|
|
167
|
+
"text": "Section title for social block of footer.\nWhen not provided, uses SDK lang 'blocks.footer.social'."
|
|
113
168
|
},
|
|
114
169
|
"getter": false,
|
|
115
170
|
"setter": false,
|
|
@@ -132,7 +187,8 @@ export class SallaContacts {
|
|
|
132
187
|
},
|
|
133
188
|
"getter": false,
|
|
134
189
|
"setter": false,
|
|
135
|
-
"reflect": false
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"defaultValue": "false"
|
|
136
192
|
},
|
|
137
193
|
"isHeader": {
|
|
138
194
|
"type": "boolean",
|
|
@@ -151,7 +207,8 @@ export class SallaContacts {
|
|
|
151
207
|
},
|
|
152
208
|
"getter": false,
|
|
153
209
|
"setter": false,
|
|
154
|
-
"reflect": false
|
|
210
|
+
"reflect": false,
|
|
211
|
+
"defaultValue": "false"
|
|
155
212
|
},
|
|
156
213
|
"horizontal": {
|
|
157
214
|
"type": "boolean",
|
|
@@ -170,7 +227,8 @@ export class SallaContacts {
|
|
|
170
227
|
},
|
|
171
228
|
"getter": false,
|
|
172
229
|
"setter": false,
|
|
173
|
-
"reflect": false
|
|
230
|
+
"reflect": false,
|
|
231
|
+
"defaultValue": "false"
|
|
174
232
|
},
|
|
175
233
|
"iconsOnly": {
|
|
176
234
|
"type": "boolean",
|
|
@@ -185,7 +243,27 @@ export class SallaContacts {
|
|
|
185
243
|
"optional": false,
|
|
186
244
|
"docs": {
|
|
187
245
|
"tags": [],
|
|
188
|
-
"text": "Flag condition to show icon only or icon with label"
|
|
246
|
+
"text": "Flag condition to show icon only or icon with label."
|
|
247
|
+
},
|
|
248
|
+
"getter": false,
|
|
249
|
+
"setter": false,
|
|
250
|
+
"reflect": false,
|
|
251
|
+
"defaultValue": "false"
|
|
252
|
+
},
|
|
253
|
+
"slotTemplate": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"attribute": "slot-template",
|
|
256
|
+
"mutable": false,
|
|
257
|
+
"complexType": {
|
|
258
|
+
"original": "string",
|
|
259
|
+
"resolved": "string",
|
|
260
|
+
"references": {}
|
|
261
|
+
},
|
|
262
|
+
"required": false,
|
|
263
|
+
"optional": true,
|
|
264
|
+
"docs": {
|
|
265
|
+
"tags": [],
|
|
266
|
+
"text": "Custom slot template HTML with placeholders {icon}, {value}, {link}.\nUsed for SSR. Client-side can use slot=\"contact\" instead."
|
|
189
267
|
},
|
|
190
268
|
"getter": false,
|
|
191
269
|
"setter": false,
|
|
@@ -195,8 +273,7 @@ export class SallaContacts {
|
|
|
195
273
|
}
|
|
196
274
|
static get states() {
|
|
197
275
|
return {
|
|
198
|
-
"
|
|
199
|
-
"iconsList": {}
|
|
276
|
+
"sdkContacts": {}
|
|
200
277
|
};
|
|
201
278
|
}
|
|
202
279
|
static get elementRef() { return "host"; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -879,7 +879,7 @@ export class SallaDatetimePicker {
|
|
|
879
879
|
"mutable": false,
|
|
880
880
|
"complexType": {
|
|
881
881
|
"original": "LocaleKey",
|
|
882
|
-
"resolved": "\"at\" | \"hr\" | \"th\" | \"tr\" | \"id\" | \"is\" | \"default\" | \"no\" | \"cy\" | \"es\" | \"mn\" | \"ms\" | \"ar\" | \"az\" | \"be\" | \"bg\" | \"bn\" | \"bs\" | \"ca\" | \"cat\" | \"ckb\" | \"cs\" | \"da\" | \"de\" | \"
|
|
882
|
+
"resolved": "\"at\" | \"hr\" | \"th\" | \"tr\" | \"id\" | \"is\" | \"default\" | \"no\" | \"cy\" | \"es\" | \"mn\" | \"ms\" | \"ar\" | \"en\" | \"az\" | \"be\" | \"bg\" | \"bn\" | \"bs\" | \"ca\" | \"cat\" | \"ckb\" | \"cs\" | \"da\" | \"de\" | \"eo\" | \"et\" | \"fa\" | \"fi\" | \"fo\" | \"fr\" | \"gr\" | \"he\" | \"hi\" | \"hu\" | \"hy\" | \"it\" | \"ja\" | \"ka\" | \"ko\" | \"km\" | \"kz\" | \"lt\" | \"lv\" | \"mk\" | \"my\" | \"nl\" | \"nn\" | \"pa\" | \"pl\" | \"pt\" | \"ro\" | \"ru\" | \"si\" | \"sk\" | \"sl\" | \"sq\" | \"sr\" | \"sv\" | \"uk\" | \"vn\" | \"zh\" | \"uz\" | \"uz_latn\" | \"zh_tw\"",
|
|
883
883
|
"references": {
|
|
884
884
|
"LocaleKey": {
|
|
885
885
|
"location": "import",
|
|
@@ -391,18 +391,18 @@ export class SallaOrderOptionsModal {
|
|
|
391
391
|
// header-inner container; the empty title div is hidden via .s-oom-wizard-modal CSS.
|
|
392
392
|
// In single-step mode the header shows the relevant title text directly.
|
|
393
393
|
const modalTitle = this._isWizard ? ' ' : (isStep1 ? this.freeProductTitle : this.title);
|
|
394
|
-
return (h("salla-modal", { key: '
|
|
394
|
+
return (h("salla-modal", { key: '42c7d7d765d42b6fc25ec86eb824dc2bf7a0b1bd', ref: el => (this.modal = el), class: `s-order-options-modal-host${this._isWizard ? ' s-oom-wizard-modal' : ''}`, width: "md", "modal-title": modalTitle, onModalVisibilityChanged: (e) => {
|
|
395
395
|
if (!e.detail)
|
|
396
396
|
this.handleClose();
|
|
397
|
-
} }, this._isWizard && (h("div", { key: '
|
|
397
|
+
} }, this._isWizard && (h("div", { key: '6e8e57a4f8d49d06cd70ae00b01d47b9ad66448e', slot: "icon", class: "s-oom-steps" }, stepLabels.map((label, index) => [
|
|
398
398
|
index > 0 && h("div", { class: "s-oom-connector" }),
|
|
399
399
|
h("div", { class: `s-oom-step ${index === current ? 'active' : (index < current ? 'done' : '')}` }, h("span", { class: "s-oom-step-num" }, index + 1), h("span", { class: "s-oom-step-label" }, label)),
|
|
400
|
-
]))), h("div", { key: '
|
|
400
|
+
]))), h("div", { key: '748c8bdd31860f1f2b512940ea0e4aea27737e88', class: "s-order-options-modal-body" }, isStep1 && this.freeProduct && (h("div", { key: '85cd3903f2ba210b973eef66750ecee5a6d77a4b', class: "s-oom-free-product-card" }, this.freeProduct.thumbnail && (h("img", { key: '809cf47e06f640c438373823cb90801097274653', class: "s-oom-free-product-thumb", src: this.freeProduct.thumbnail, alt: this.freeProduct.name })), h("div", { key: 'bd7abf27cdb0256b9a00ae085be07b8e655ea33a', class: "s-oom-free-product-info" }, h("span", { key: '0324efe7d547a168eb51c4a398aef6cc097f1867', class: "s-oom-free-product-name" }, this.freeProduct.name), h("div", { key: '9eb2ab65e83e294796b910d77a2d1f7207824dad', class: "s-oom-free-product-tags" }, h("span", { key: '921d3487595380b3accc074655c445060595e6bc', class: "s-oom-free-badge" }, this.t('common.elements.free', 'مجاني')), this.freeProduct.offer_name && (h("span", { key: '0bf1142a8078b8faf67af0d623ab41fcbeba2414', class: "s-oom-free-offer-name" }, this.freeProduct.offer_name)))))), h("p", { key: '372fe80cd605b6b5b9d9fd1976f40878f67a1830', class: "s-order-options-modal-subtitle" }, isStep1 ? this.freeProductSubtitle : this.subtitle), h("div", { key: '179205569c7cadf8326fb202936a08775bc62b4c', class: "s-order-options-modal-fields" }, this.orderOptions.length > 0 && (h("salla-product-options", { key: this.sessionId, ref: el => {
|
|
401
401
|
if (!el)
|
|
402
402
|
return;
|
|
403
403
|
this.optionsRefs.set(uniqueKey, el);
|
|
404
404
|
el.seedSelectedOptions?.();
|
|
405
|
-
}, "product-id": productIdAttr, "unique-key": uniqueKey, options: JSON.stringify(this.orderOptions), "hide-out-label": "1", "no-padding": true })))), h("div", { key: '
|
|
405
|
+
}, "product-id": productIdAttr, "unique-key": uniqueKey, options: JSON.stringify(this.orderOptions), "hide-out-label": "1", "no-padding": true })))), h("div", { key: '4abd512d2592800f2797897ee1cff61f3276ad2c', slot: "footer", class: "s-order-options-modal-footer" }, showApplePay ? (h("div", { class: "s-order-options-modal-apple-pay-wrap" }, h("div", { class: "s-order-options-modal-apple-pay-total" }, h("span", { class: "s-order-options-modal-apple-pay-label" }, this.totalLabel), h("span", { class: "s-order-options-modal-apple-pay-amount", innerHTML: totalHtml })), h("apple-pay-button", { locale: salla?.config?.get?.('user.language_code') || 'ar', buttonstyle: "black", type: "buy", class: "s-order-options-modal-apple-pay", onClick: () => this.handleSubmit() }))) : (h("salla-button", { type: "button", color: "primary", fill: "solid", width: "wide", loading: this.isSubmitting, onClick: () => this.handleSubmit() }, h("span", { class: "s-order-options-modal-cta-content" }, h("span", { class: "s-order-options-modal-cta-text" }, isStep1 ? this.freeProductContinueLabel : this.submitLabel), isStep1
|
|
406
406
|
? h("i", { class: {
|
|
407
407
|
's-oom-cta-arrow': true,
|
|
408
408
|
// "Forward" is left in RTL and right in LTR; hardcoding arrow-left made
|