@salla.sa/twilight-components 2.14.353 → 2.14.355
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/bell-ring-BfKPinNo.js +13 -0
- package/dist/cjs/{interfaces-CX9-6aLf.js → camera-DytepEoK.js} +0 -11
- package/dist/cjs/cancel-De6vslRA.js +13 -0
- package/dist/cjs/cart-s-x1Fshk.js +13 -0
- package/dist/cjs/check-circle2-BDvlT4_n.js +13 -0
- package/dist/cjs/{check-CLRvuniI.js → check-x3w3-gpj.js} +2 -2
- package/dist/cjs/{filepond-7SxqaoXb.js → filepond-D0WqQOsJ.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DwIv84hN.js → filepond-plugin-file-poster-ZuSz5Sia.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-NUNnIo4Q.js → filepond-plugin-file-validate-size-C3-G9fQU.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CXI-hfww.js → filepond-plugin-file-validate-type-pC6E-hQQ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-fBeBGIBb.js → filepond-plugin-image-edit-B6RJ-sf_.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BmLTdQ6d.js → filepond-plugin-image-exif-orientation-BAKA7TOr.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CssKRM6n.js → filepond-plugin-image-preview-C_5JV3u4.js} +1 -1
- package/dist/{esm/gift-C0JNGIpa.js → cjs/gift-CJ-3Yw_x.js} +4 -2
- package/dist/cjs/image-BoZ6Hums.js +13 -0
- package/dist/cjs/{index-B9TEdQDE.js → index-DdedaQQE.js} +1 -1
- package/dist/cjs/{index-B5soIVRX.js → index-DgOViweO.js} +136 -12
- package/dist/cjs/interfaces-CRqrf5RX.js +15 -0
- package/dist/cjs/keyboard_arrow_down-DHJ3FFZq.js +13 -0
- package/dist/cjs/keyboard_arrow_right-BayM_Il2.js +21 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/minus-CCryh1qf.js +21 -0
- package/dist/cjs/salla-accordion-body_3.cjs.entry.js +775 -0
- package/dist/cjs/salla-accordion_6.cjs.entry.js +768 -0
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +2389 -0
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +194 -0
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +2 -2
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +1565 -0
- package/dist/cjs/{salla-cart-item-offers.cjs.entry.js → salla-cart-item-offers_2.cjs.entry.js} +104 -5
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1661 -0
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-count-down_2.cjs.entry.js +302 -0
- package/dist/cjs/salla-custom-fields.cjs.entry.js +4 -3
- 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-gifting.cjs.entry.js +488 -0
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +91 -0
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +34 -0
- package/dist/cjs/salla-localization-modal.cjs.entry.js +137 -0
- package/dist/cjs/salla-login-modal.cjs.entry.js +320 -0
- 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.cjs.entry.js +211 -0
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +40 -0
- package/dist/cjs/salla-menu.cjs.entry.js +139 -0
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +220 -0
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +598 -0
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +69 -0
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +206 -0
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +3 -3
- 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 +6 -18
- package/dist/cjs/salla-placeholder.cjs.entry.js +51 -0
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +66 -0
- package/dist/cjs/salla-products-list.cjs.entry.js +762 -0
- package/dist/cjs/salla-products-slider.cjs.entry.js +115 -0
- package/dist/cjs/salla-progress-bar.cjs.entry.js +73 -0
- package/dist/cjs/salla-quick-order.cjs.entry.js +239 -0
- package/dist/cjs/salla-rating-modal.cjs.entry.js +453 -0
- package/dist/cjs/salla-scopes.cjs.entry.js +180 -0
- package/dist/cjs/salla-search.cjs.entry.js +153 -0
- package/dist/cjs/salla-skeleton.cjs.entry.js +36 -0
- package/dist/cjs/salla-slider.cjs.entry.js +10428 -0
- package/dist/cjs/salla-social-share.cjs.entry.js +165 -0
- package/dist/cjs/salla-social.cjs.entry.js +4 -4
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +157 -0
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +275 -0
- package/dist/cjs/salla-user-profile.cjs.entry.js +145 -0
- package/dist/cjs/salla-user-settings.cjs.entry.js +88 -0
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/search-c7Aa7lM9.js +13 -0
- package/dist/cjs/{special-discount-OVG_9Kf9.js → special-discount-DC2oXurL.js} +0 -8
- package/dist/cjs/star-DGcH7Yso.js +13 -0
- package/dist/cjs/star2-R146a27p.js +13 -0
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-C6fk8_TR.js → vanilla-picker-Cd4v7i9t.js} +1 -1
- package/dist/cjs/{whatsapp2-D7Sbg8Ey.js → whatsapp2-BdMd5Gx1.js} +2 -2
- package/dist/collection/collection-manifest.json +56 -2
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +1 -1
- package/dist/collection/components/salla-payments/salla-payments.js +5 -17
- package/dist/collection/components/salla-product-options/salla-product-options.js +36 -3
- package/dist/collection/components/salla-products-slider/salla-products-slider.js +32 -1
- package/dist/collection/components/salla-slider/salla-slider.js +89 -29
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-apps-icons.js +1 -1
- package/dist/components/salla-payments.js +5 -17
- package/dist/components/salla-product-options2.js +19 -2
- package/dist/components/salla-products-slider2.js +2 -1
- package/dist/components/salla-slider2.js +69 -28
- package/dist/components/salla-social-share.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/esm/bell-ring-D3mWkc-3.js +11 -0
- package/dist/esm/{interfaces-CBT_Nxny.js → camera-C6jIkM-X.js} +1 -12
- package/dist/esm/cancel-BsLF_HK7.js +11 -0
- package/dist/esm/cart-DY4LZmNP.js +11 -0
- package/dist/esm/{check-uTyAzPSy.js → check-BsXh13x8.js} +2 -2
- package/dist/esm/check-circle2-BV4kqbdL.js +11 -0
- package/dist/esm/{filepond-Cuqyleyy.js → filepond-YrJ-JCRn.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-C6Wara8q.js → filepond-plugin-file-poster-UWiXxhAl.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-D-M3KSxo.js → filepond-plugin-file-validate-size-CuFnfvIq.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DzAl1VI8.js → filepond-plugin-file-validate-type-BgYsHZEQ.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-flutfc9I.js → filepond-plugin-image-edit-BQtZWl9D.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-B2UkG6iE.js → filepond-plugin-image-exif-orientation-Dp7a5KRi.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-B4u8N2nE.js → filepond-plugin-image-preview-DvWrR7vg.js} +1 -1
- package/dist/{cjs/gift-BPDUPIY_.js → esm/gift-BChI23pG.js} +2 -4
- package/dist/esm/image-C-tzSDxw.js +11 -0
- package/dist/esm/{index-xWIb6INF.js → index-DwU5NnFF.js} +1 -1
- package/dist/esm/{index-6mr785rH.js → index-PHxPq4LJ.js} +137 -13
- package/dist/esm/interfaces-OF8QcbMM.js +15 -0
- package/dist/esm/keyboard_arrow_down-DCZbpt2a.js +11 -0
- package/dist/esm/keyboard_arrow_right-Vqpj4CWE.js +18 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/minus-DfeagqF1.js +18 -0
- package/dist/esm/salla-accordion-body_3.entry.js +771 -0
- package/dist/esm/salla-accordion_6.entry.js +761 -0
- package/dist/esm/salla-add-product-button_4.entry.js +2384 -0
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +191 -0
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +2 -2
- package/dist/esm/salla-booking-field_7.entry.js +1539 -0
- package/dist/esm/{salla-cart-item-offers.entry.js → salla-cart-item-offers_2.entry.js} +104 -6
- package/dist/esm/salla-comment-form_8.entry.js +1652 -0
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-count-down_2.entry.js +299 -0
- package/dist/esm/salla-custom-fields.entry.js +3 -2
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +486 -0
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +89 -0
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +32 -0
- package/dist/esm/salla-localization-modal.entry.js +135 -0
- package/dist/esm/salla-login-modal.entry.js +318 -0
- 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.entry.js +209 -0
- package/dist/esm/salla-maintenance-alert.entry.js +38 -0
- package/dist/esm/salla-menu.entry.js +137 -0
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +217 -0
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +595 -0
- package/dist/esm/salla-multiple-bundle-product.entry.js +67 -0
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +204 -0
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +3 -3
- 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 +6 -18
- package/dist/esm/salla-placeholder.entry.js +49 -0
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +64 -0
- package/dist/esm/salla-products-list.entry.js +760 -0
- package/dist/esm/salla-products-slider.entry.js +113 -0
- package/dist/esm/salla-progress-bar.entry.js +71 -0
- package/dist/esm/salla-quick-order.entry.js +237 -0
- package/dist/esm/salla-rating-modal.entry.js +451 -0
- package/dist/esm/salla-scopes.entry.js +178 -0
- package/dist/esm/salla-search.entry.js +151 -0
- package/dist/esm/salla-skeleton.entry.js +34 -0
- package/dist/esm/salla-slider.entry.js +10426 -0
- package/dist/esm/salla-social-share.entry.js +163 -0
- package/dist/esm/salla-social.entry.js +3 -3
- package/dist/esm/salla-tab-content_3.entry.js +153 -0
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +273 -0
- package/dist/esm/salla-user-profile.entry.js +143 -0
- package/dist/esm/salla-user-settings.entry.js +86 -0
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/search-BscTeWDc.js +11 -0
- package/dist/esm/{special-discount-yRO-ZESF.js → special-discount-Ctkfc4K-.js} +1 -8
- package/dist/esm/star-ZT7ehBBk.js +11 -0
- package/dist/esm/star2-D4oPi1Ov.js +11 -0
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-B4PKRAhm.js → vanilla-picker-fpTcpsmb.js} +1 -1
- package/dist/esm/{whatsapp2-DWksgowB.js → whatsapp2-CgR-T_ZS.js} +2 -2
- package/dist/twilight/p-009d1b75.entry.js +4 -0
- package/dist/twilight/{p-16b8d78c.entry.js → p-04e21492.entry.js} +1 -1
- package/dist/twilight/{p-ac6fc286.entry.js → p-0cc07ad0.entry.js} +1 -1
- package/dist/twilight/p-0f45b27f.entry.js +4 -0
- package/dist/twilight/p-112b4c91.entry.js +4 -0
- package/dist/twilight/p-14749ab0.entry.js +4 -0
- package/dist/twilight/{p-0c87ef6c.entry.js → p-1c66e567.entry.js} +1 -1
- package/dist/twilight/p-1e405d4e.entry.js +4 -0
- package/dist/twilight/{p-33ea3141.entry.js → p-1eb76272.entry.js} +1 -1
- package/dist/twilight/p-2322e6fc.entry.js +4 -0
- package/dist/twilight/{p-7e39343d.entry.js → p-2626b358.entry.js} +1 -1
- package/dist/twilight/{p-18ebec2c.entry.js → p-29e92637.entry.js} +1 -1
- package/dist/twilight/p-2ca5a8af.entry.js +4 -0
- package/dist/twilight/{p-4253fc44.entry.js → p-2cb04fa6.entry.js} +1 -1
- package/dist/twilight/{p-19e07b9e.entry.js → p-2e97a6cd.entry.js} +1 -1
- package/dist/twilight/{p-zHj-W7EE.js → p-2tEKDOI-.js} +1 -1
- package/dist/twilight/p-30b58124.entry.js +4 -0
- package/dist/twilight/{p-8c7b7712.entry.js → p-333171ce.entry.js} +1 -1
- package/dist/twilight/p-33cd8edb.entry.js +4 -0
- package/dist/twilight/p-3774fa61.entry.js +4 -0
- package/dist/twilight/{p-5067322a.entry.js → p-37aa131b.entry.js} +1 -1
- package/dist/twilight/{p-dde21f4b.entry.js → p-3c76e2d4.entry.js} +1 -1
- package/dist/twilight/{p-2d209f96.entry.js → p-3cbbd625.entry.js} +1 -1
- package/dist/twilight/{p-6f5d02c6.entry.js → p-3db132b8.entry.js} +1 -1
- package/dist/twilight/p-3eff2372.entry.js +4 -0
- package/dist/twilight/p-428fe4e6.entry.js +4 -0
- package/dist/twilight/p-475a61f8.entry.js +4 -0
- package/dist/twilight/{p-BijadG7g.js → p-4D4VVK4U.js} +1 -1
- package/dist/twilight/p-4c31b81f.entry.js +4 -0
- package/dist/twilight/{p-c096e336.entry.js → p-52ffcaba.entry.js} +1 -1
- package/dist/twilight/p-534be529.entry.js +4 -0
- package/dist/twilight/p-59697c9b.entry.js +4 -0
- package/dist/twilight/p-5c5aba15.entry.js +4 -0
- package/dist/twilight/p-666bea2d.entry.js +4 -0
- package/dist/twilight/p-6a934903.entry.js +4 -0
- package/dist/twilight/{p-6f576591.entry.js → p-6e89154f.entry.js} +1 -1
- package/dist/twilight/p-6f69cfa5.entry.js +4 -0
- package/dist/twilight/{p-d4aaeef4.entry.js → p-76ce3ec0.entry.js} +1 -1
- package/dist/twilight/p-781f1219.entry.js +4 -0
- package/dist/twilight/p-78e33f77.entry.js +4 -0
- package/dist/twilight/p-79aa2c2f.entry.js +4 -0
- package/dist/twilight/p-7a2bd261.entry.js +4 -0
- package/dist/twilight/p-7a769233.entry.js +4 -0
- package/dist/twilight/{p-6472200c.entry.js → p-7eef10c9.entry.js} +1 -1
- package/dist/twilight/{p-2a26c1d6.entry.js → p-8606c783.entry.js} +1 -1
- package/dist/twilight/p-8719301a.entry.js +4 -0
- package/dist/twilight/p-8ad78dfa.entry.js +4 -0
- package/dist/twilight/{p-300624bb.entry.js → p-9bea43d6.entry.js} +1 -1
- package/dist/twilight/{p-8b018d82.entry.js → p-9c01357f.entry.js} +1 -1
- package/dist/twilight/{p-C0JNGIpa.js → p-BChI23pG.js} +1 -1
- package/dist/twilight/{p-Cuxsz9f-.js → p-BPRHuBhm.js} +1 -1
- package/dist/twilight/{p-B2SkkGH8.js → p-BRh_eoK1.js} +1 -1
- package/dist/twilight/p-BV4kqbdL.js +4 -0
- package/dist/twilight/{p-tFBCbVoG.js → p-BitILwJ_.js} +1 -1
- package/dist/twilight/p-BsLF_HK7.js +4 -0
- package/dist/twilight/{p-uTyAzPSy.js → p-BsXh13x8.js} +1 -1
- package/dist/twilight/p-BscTeWDc.js +4 -0
- package/dist/twilight/{p-ChfiVIJv.js → p-Bx_UY06u.js} +1 -1
- package/dist/twilight/p-C-tzSDxw.js +4 -0
- package/dist/twilight/{p-Bp_xKTyn.js → p-C6S8Hr36.js} +1 -1
- package/dist/twilight/p-C6jIkM-X.js +4 -0
- package/dist/twilight/p-CO-PeZ27.js +4 -0
- package/dist/twilight/{p-DWksgowB.js → p-CgR-T_ZS.js} +1 -1
- package/dist/twilight/p-Ctkfc4K-.js +4 -0
- package/dist/twilight/p-D3mWkc-3.js +4 -0
- package/dist/twilight/p-D4oPi1Ov.js +4 -0
- package/dist/twilight/p-DCZbpt2a.js +4 -0
- package/dist/twilight/p-DY4LZmNP.js +4 -0
- package/dist/twilight/p-DfeagqF1.js +4 -0
- package/dist/twilight/{p-DnELO4MH.js → p-DtkaGJwR.js} +1 -1
- package/dist/twilight/p-OF8QcbMM.js +4 -0
- package/dist/twilight/{p-6mr785rH.js → p-PHxPq4LJ.js} +2 -2
- package/dist/twilight/p-Vqpj4CWE.js +4 -0
- package/dist/twilight/p-ZT7ehBBk.js +4 -0
- package/dist/twilight/p-a5bb66a3.entry.js +4 -0
- package/dist/twilight/p-ad9c9773.entry.js +4 -0
- package/dist/twilight/p-b502e876.entry.js +4 -0
- package/dist/twilight/{p-e909d28b.entry.js → p-b8d8175a.entry.js} +1 -1
- package/dist/twilight/p-ba5fc67a.entry.js +4 -0
- package/dist/twilight/p-c3750eaa.entry.js +4 -0
- package/dist/twilight/p-d7037864.entry.js +4 -0
- package/dist/twilight/p-d9880694.entry.js +4 -0
- package/dist/twilight/p-db0b3ed2.entry.js +4 -0
- package/dist/twilight/{p-81702ecb.entry.js → p-dbb4ede5.entry.js} +1 -1
- package/dist/twilight/{p-28900b2e.entry.js → p-e017e403.entry.js} +1 -1
- package/dist/twilight/p-e31177e7.entry.js +4 -0
- package/dist/twilight/p-e5b90edd.entry.js +4 -0
- package/dist/twilight/{p-b60db6c8.entry.js → p-ec3f15ee.entry.js} +1 -1
- package/dist/twilight/p-edc41bbc.entry.js +4 -0
- package/dist/twilight/p-f2c23e42.entry.js +4 -0
- package/dist/twilight/p-f34f5a30.entry.js +4 -0
- package/dist/twilight/{p-4bc98557.entry.js → p-f578dea7.entry.js} +1 -1
- package/dist/twilight/{p-9946fa76.entry.js → p-ffbd5949.entry.js} +1 -1
- package/dist/twilight/{p-C_h1JDCU.js → p-fq0HEcD_.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-payments/salla-payments.d.ts +0 -2
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +8 -1
- package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +8 -0
- package/dist/types/components/salla-slider/salla-slider.d.ts +20 -2
- package/dist/types/components.d.ts +26 -0
- package/package.json +5 -5
- package/dist/cjs/salla-accordion_62.cjs.entry.js +0 -22470
- package/dist/cjs/salla-review-card.cjs.entry.js +0 -183
- package/dist/cjs/salla-reviews-page.cjs.entry.js +0 -695
- package/dist/cjs/salla-reviews.cjs.entry.js +0 -106
- package/dist/esm/salla-accordion_62.entry.js +0 -22389
- package/dist/esm/salla-review-card.entry.js +0 -181
- package/dist/esm/salla-reviews-page.entry.js +0 -693
- package/dist/esm/salla-reviews.entry.js +0 -104
- package/dist/twilight/p-12e49031.entry.js +0 -4
- package/dist/twilight/p-5bf05092.entry.js +0 -4
- package/dist/twilight/p-67830f2a.entry.js +0 -4
- package/dist/twilight/p-751dddd4.entry.js +0 -4
- package/dist/twilight/p-9b22a7eb.entry.js +0 -4
- package/dist/twilight/p-CBT_Nxny.js +0 -4
- package/dist/twilight/p-Dz7o69vX.js +0 -4
- package/dist/twilight/p-a515a8cc.entry.js +0 -4
- package/dist/twilight/p-c4821f8b.entry.js +0 -4
- package/dist/twilight/p-de807340.entry.js +0 -4
- package/dist/twilight/p-fa585081.entry.js +0 -4
- package/dist/twilight/p-yRO-ZESF.js +0 -4
- package/dist/cjs/{twitter-pOrUNjXi.js → facebook-DbXua6B9.js} +2 -2
- package/dist/esm/{twitter-Dz7o69vX.js → facebook-CO-PeZ27.js} +2 -2
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var index = require('./index-DgOViweO.js');
|
|
7
|
+
var keyboard_arrow_down = require('./keyboard_arrow_down-DHJ3FFZq.js');
|
|
8
|
+
var bellRing = require('./bell-ring-BfKPinNo.js');
|
|
9
|
+
var cart = require('./cart-s-x1Fshk.js');
|
|
10
|
+
var star = require('./star-DGcH7Yso.js');
|
|
11
|
+
var cancel = require('./cancel-De6vslRA.js');
|
|
12
|
+
var star2 = require('./star2-R146a27p.js');
|
|
13
|
+
var gift = require('./gift-CJ-3Yw_x.js');
|
|
14
|
+
|
|
15
|
+
var OrderIcon = `<!-- Generated by IcoMoon.io -->
|
|
16
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
17
|
+
<title>box-bankers</title>
|
|
18
|
+
<path d="M28 1.333h-24c-2.205 0-4 1.795-4 4v5.333c0 0.736 0.597 1.333 1.333 1.333v14.667c0 2.205 1.795 4 4 4h21.333c2.205 0 4-1.795 4-4v-14.667c0.736 0 1.333-0.597 1.333-1.333v-5.333c0-2.205-1.795-4-4-4zM28 26.667c0 0.735-0.599 1.333-1.333 1.333h-21.333c-0.735 0-1.333-0.599-1.333-1.333v-14.667h5.333v2.667c0 1.471 1.196 2.667 2.667 2.667h8c1.471 0 2.667-1.196 2.667-2.667v-2.667h5.333zM12 14.667v-2.667h8v2.667zM29.333 9.333h-26.667v-4c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z"></path>
|
|
19
|
+
</svg>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
var UserCircle = `<!-- Generated by IcoMoon.io -->
|
|
23
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
24
|
+
<title>user-circle</title>
|
|
25
|
+
<path d="M16 22.964c-4.525 0-8.447 1.713-9.993 4.365-0.371 0.636-0.156 1.452 0.48 1.823s1.453 0.156 1.823-0.48c0.855-1.465 3.624-3.041 7.689-3.041s6.835 1.576 7.689 3.041c0.249 0.424 0.696 0.661 1.155 0.661 0.228 0 0.459-0.059 0.669-0.181 0.637-0.371 0.852-1.187 0.48-1.823-1.545-2.652-5.467-4.365-9.992-4.365zM22.667 13.631c0-3.676-2.991-6.667-6.667-6.667s-6.667 2.991-6.667 6.667 2.991 6.667 6.667 6.667 6.667-2.992 6.667-6.667zM12 13.631c0-2.205 1.795-4 4-4s4 1.795 4 4-1.795 4-4 4-4-1.795-4-4zM16 0.297c-8.823 0-16 7.177-16 16 0 2.941 0.821 5.831 2.373 8.357 0.252 0.411 0.689 0.636 1.137 0.636 0.239 0 0.479-0.064 0.696-0.197 0.628-0.385 0.824-1.207 0.439-1.833-1.295-2.108-1.979-4.516-1.979-6.963 0-7.352 5.981-13.333 13.333-13.333s13.333 5.981 13.333 13.333c0 2.448-0.684 4.856-1.979 6.961-0.385 0.628-0.189 1.448 0.437 1.835 0.627 0.384 1.448 0.189 1.835-0.437 1.553-2.527 2.373-5.416 2.373-8.359 0-8.823-7.177-16-16-16z"></path>
|
|
26
|
+
</svg>
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
var LogoutIcon = `<!-- Generated by IcoMoon.io -->
|
|
30
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
31
|
+
<title>send-out</title>
|
|
32
|
+
<path d="M16 26.667h-9.333c-0.736 0-1.333-0.597-1.333-1.333v-18.667c0-0.736 0.597-1.333 1.333-1.333h9.333c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-9.333c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h9.333c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM29.231 15.491c-0.068-0.164-0.167-0.312-0.289-0.436l-5.332-5.332c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l3.057 3.059h-12.781c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h12.781l-3.057 3.057c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l5.332-5.332c0.124-0.123 0.221-0.271 0.289-0.435 0.135-0.325 0.135-0.693 0-1.019z"></path>
|
|
33
|
+
</svg>
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
var WalletIcon = `<!-- Generated by IcoMoon.io -->
|
|
37
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
38
|
+
<title>wallet</title>
|
|
39
|
+
<path d="M28 6.667h-24c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333h24c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-24c-2.204 0-3.999 1.793-4 3.997v18.669c0 3.676 2.991 6.667 6.667 6.667h21.333c2.205 0 4-1.795 4-4v-16c0-2.205-1.795-4-4-4zM29.333 26.667c0 0.736-0.597 1.333-1.333 1.333h-21.333c-2.205 0-4-1.795-4-4v-14.895c0.416 0.147 0.865 0.228 1.333 0.228h24c0.736 0 1.333 0.597 1.333 1.333zM22.667 14.667c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM22.667 20c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333 1.333 0.597 1.333 1.333-0.597 1.333-1.333 1.333z"></path>
|
|
40
|
+
</svg>
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
var SettingstIcon = `<!-- Generated by IcoMoon.io -->
|
|
44
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
45
|
+
<title>settings</title>
|
|
46
|
+
<path d="M29.717 19.037l-1.817-1.499c0.067-0.512 0.1-1.028 0.1-1.539s-0.033-1.027-0.1-1.54l1.817-1.499c1.177-0.969 1.479-2.633 0.716-3.956l-1.159-2.009c-0.761-1.324-2.349-1.895-3.784-1.359l-2.212 0.829c-0.817-0.627-1.704-1.139-2.649-1.535l-0.388-2.332c-0.251-1.507-1.54-2.6-3.067-2.6h-2.319c-1.525 0-2.815 1.093-3.065 2.6l-0.388 2.332c-0.945 0.396-1.833 0.909-2.649 1.535l-2.212-0.829c-1.428-0.533-3.021 0.036-3.783 1.359l-1.16 2.011c-0.763 1.323-0.46 2.985 0.716 3.955l1.817 1.499c-0.067 0.513-0.1 1.029-0.1 1.54s0.033 1.027 0.1 1.539l-1.819 1.5c-1.176 0.971-1.476 2.635-0.715 3.955l1.159 2.011c0.763 1.324 2.356 1.899 3.784 1.36l2.212-0.831c0.816 0.625 1.703 1.139 2.649 1.535l0.388 2.332c0.251 1.507 1.54 2.6 3.067 2.6h2.319c1.527 0 2.816-1.093 3.065-2.6l0.389-2.332c0.947-0.396 1.833-0.909 2.649-1.535l2.212 0.831c1.432 0.539 3.023-0.035 3.783-1.36l1.16-2.011c0.76-1.32 0.459-2.984-0.717-3.956zM28.123 21.663l-1.16 2.011c-0.108 0.188-0.336 0.267-0.536 0.193l-2.931-1.1c-0.459-0.173-0.979-0.079-1.349 0.248-0.923 0.811-1.979 1.423-3.139 1.819-0.464 0.157-0.804 0.559-0.885 1.043l-0.515 3.087c-0.033 0.215-0.216 0.371-0.433 0.371h-2.319c-0.217 0-0.4-0.156-0.436-0.371l-0.513-3.087c-0.080-0.484-0.42-0.884-0.885-1.043-1.16-0.396-2.216-1.008-3.139-1.819-0.248-0.217-0.561-0.332-0.88-0.332-0.157 0-0.316 0.028-0.469 0.084l-2.931 1.1c-0.199 0.079-0.428-0.004-0.537-0.193l-1.159-2.011c-0.109-0.191-0.067-0.428 0.101-0.568l2.409-1.985c0.379-0.312 0.555-0.807 0.46-1.288-0.119-0.605-0.179-1.219-0.179-1.821 0-0.604 0.060-1.217 0.181-1.823 0.095-0.481-0.081-0.976-0.46-1.288l-2.409-1.985c-0.168-0.139-0.211-0.376-0.101-0.567l1.16-2.011c0.107-0.188 0.332-0.268 0.536-0.193l2.931 1.1c0.459 0.172 0.979 0.079 1.348-0.247 0.924-0.812 1.98-1.424 3.139-1.817 0.465-0.159 0.805-0.559 0.885-1.044l0.513-3.088c0.036-0.215 0.219-0.371 0.436-0.371h2.319c0.217 0 0.4 0.156 0.436 0.371l0.515 3.088c0.081 0.484 0.42 0.885 0.885 1.044 1.157 0.393 2.213 1.005 3.139 1.817 0.371 0.325 0.889 0.42 1.349 0.247l2.929-1.099c0.203-0.076 0.428 0.005 0.537 0.193l1.159 2.009c0.109 0.191 0.067 0.428-0.101 0.567l-2.409 1.985c-0.379 0.312-0.555 0.807-0.46 1.288 0.119 0.605 0.179 1.219 0.179 1.823 0 0.603-0.060 1.216-0.181 1.821-0.095 0.48 0.081 0.975 0.46 1.288l2.408 1.984c0.169 0.141 0.212 0.379 0.103 0.569zM16.016 10.667c-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333 5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM16.016 18.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>
|
|
47
|
+
</svg>
|
|
48
|
+
`;
|
|
49
|
+
|
|
50
|
+
const sallaUserMenuCss = "";
|
|
51
|
+
|
|
52
|
+
const SallaUserMenu = class {
|
|
53
|
+
constructor(hostRef) {
|
|
54
|
+
index.registerInstance(this, hostRef);
|
|
55
|
+
this.accountLoading = false;
|
|
56
|
+
this.opened = false;
|
|
57
|
+
this.notifications = salla.lang.get('common.titles.notifications');
|
|
58
|
+
this.orders = salla.lang.get('common.titles.orders');
|
|
59
|
+
this.pending_orders = salla.lang.get('common.titles.pending_orders');
|
|
60
|
+
this.wishlist = salla.lang.get('common.titles.wishlist');
|
|
61
|
+
this.profile = salla.lang.get('common.titles.profile');
|
|
62
|
+
this.rating = salla.lang.get('common.titles.rating');
|
|
63
|
+
this.wallet = salla.lang.get('common.titles.wallet');
|
|
64
|
+
this.settings = salla.lang.get('common.titles.settings');
|
|
65
|
+
this.loyalty_program = salla.lang.get('pages.loyalty_program.loyalty_points');
|
|
66
|
+
this.logout = salla.lang.get('blocks.header.logout');
|
|
67
|
+
this.hello = salla.lang.get('pages.checkout.hello');
|
|
68
|
+
this.first_name = salla.storage.get('user.first_name') || '';
|
|
69
|
+
this.last_name = salla.storage.get('user.last_name') || '';
|
|
70
|
+
this.avatar = salla.storage.get('user.avatar') || salla.url.cdn('images/avatar.png', 40, 40);
|
|
71
|
+
this.badges = {
|
|
72
|
+
notifications: salla.helpers.number(salla.storage.get('user.notifications') || 0),
|
|
73
|
+
pending_orders: salla.helpers.number(salla.storage.get('user.pending_orders') || 0),
|
|
74
|
+
};
|
|
75
|
+
this.sallaAccountEnabled = false;
|
|
76
|
+
this.hasBadges = Number(salla.storage.get('user.pending_orders')) > 0 ||
|
|
77
|
+
Number(salla.storage.get('user.notifications')) > 0;
|
|
78
|
+
/**
|
|
79
|
+
* To display only the list without the dropdown functionality
|
|
80
|
+
*/
|
|
81
|
+
this.inline = false;
|
|
82
|
+
/**
|
|
83
|
+
* To display the trigger as an avatar only
|
|
84
|
+
*/
|
|
85
|
+
this.avatarOnly = false;
|
|
86
|
+
/**
|
|
87
|
+
* To display the dropdown header in mobile sheet
|
|
88
|
+
*/
|
|
89
|
+
this.showHeader = false;
|
|
90
|
+
/**
|
|
91
|
+
* To Make the dropdown menu relative to parent element or not
|
|
92
|
+
*/
|
|
93
|
+
this.relativeDropdown = false;
|
|
94
|
+
this.onClickOutside = () => {
|
|
95
|
+
this.opened = false;
|
|
96
|
+
};
|
|
97
|
+
this.OrderUpdate = 0;
|
|
98
|
+
this.items = {
|
|
99
|
+
notifications: bellRing.BellRing,
|
|
100
|
+
orders: OrderIcon,
|
|
101
|
+
pending_orders: cart.PendingOrdersIcon,
|
|
102
|
+
wishlist: star.WishListIcon,
|
|
103
|
+
wallet: WalletIcon,
|
|
104
|
+
loyalty_program: gift.loyaltyProgramIcon,
|
|
105
|
+
profile: UserCircle
|
|
106
|
+
};
|
|
107
|
+
// salla.auth.event.onLoggedIn(() => {
|
|
108
|
+
// this.is_loggedIn = true
|
|
109
|
+
// })
|
|
110
|
+
salla.lang.onLoaded(() => {
|
|
111
|
+
this.notifications = salla.lang.get('common.titles.notifications');
|
|
112
|
+
this.orders = salla.lang.get('common.titles.orders');
|
|
113
|
+
this.pending_orders = salla.lang.get('common.titles.pending_orders');
|
|
114
|
+
this.wishlist = salla.lang.get('common.titles.wishlist');
|
|
115
|
+
this.profile = salla.lang.get('common.titles.profile');
|
|
116
|
+
this.hello = salla.lang.get('pages.checkout.hello');
|
|
117
|
+
this.rating = salla.lang.get('common.titles.rating');
|
|
118
|
+
this.wallet = salla.lang.get('common.titles.wallet');
|
|
119
|
+
this.settings = salla.lang.get('common.titles.settings');
|
|
120
|
+
this.loyalty_program = salla.lang.get('pages.loyalty_program.loyalty_points');
|
|
121
|
+
this.logout = salla.lang.get('blocks.header.logout');
|
|
122
|
+
});
|
|
123
|
+
Salla.onReady(() => {
|
|
124
|
+
if (salla.config.isGuest()) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
this.is_loggedIn = true;
|
|
128
|
+
/**
|
|
129
|
+
* Get Fresh Notifications In These Cases:
|
|
130
|
+
* - is notification page, if user already changed the status of his orders (to reset notification badge)
|
|
131
|
+
* - is pending orders page, if user already changed the status of his orders (to reset orders badge)
|
|
132
|
+
* - is profile page, in case user changed his name or avatar, we need to update it
|
|
133
|
+
* - half hour is passed from the last user data fetched
|
|
134
|
+
*
|
|
135
|
+
* //todo:: update the data in the storage in customer pages
|
|
136
|
+
* //todo:: cover two requests in customer pages
|
|
137
|
+
* //todo:: make sure to run this only after token is set
|
|
138
|
+
*/
|
|
139
|
+
const shouldFetchProfile = !this.inline &&
|
|
140
|
+
(salla.url.is_page('customer.notifications') ||
|
|
141
|
+
salla.url.is_page('customer.orders.index.pending') ||
|
|
142
|
+
salla.url.is_page('customer.profile') ||
|
|
143
|
+
(Date.now() - (salla.storage.get('user.fetched_at') || 0)) / 1000 / 60 > 30);
|
|
144
|
+
if (shouldFetchProfile) {
|
|
145
|
+
this.fetchFreshProfile();
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
salla.event.on('profile::info.fetched', res => {
|
|
149
|
+
this.updateProfileState(res);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
async componentWillLoad() {
|
|
155
|
+
await salla.onReady();
|
|
156
|
+
await salla.lang.onLoaded();
|
|
157
|
+
Salla.event.on('api::token.injected', (token) => this.profileUrl = this.buildProfileUrl(token));
|
|
158
|
+
this.sallaAccountEnabled = Salla.config.get('store.features')?.includes('salla-account');
|
|
159
|
+
this.items = this.sallaAccountEnabled ? { ...this.items, settings: SettingstIcon } : this.items;
|
|
160
|
+
//we need it only in theme-y
|
|
161
|
+
if (this.host.hasAttribute('with-rating')) {
|
|
162
|
+
this.items.rating = star2.Star;
|
|
163
|
+
}
|
|
164
|
+
//we need it to be the last item
|
|
165
|
+
this.items.logout = LogoutIcon;
|
|
166
|
+
let token = Salla.storage.get('token');
|
|
167
|
+
if (!token) {
|
|
168
|
+
token = '';
|
|
169
|
+
}
|
|
170
|
+
this.profileUrl = this.buildProfileUrl(token);
|
|
171
|
+
const trigger = this.host.querySelector('[slot="trigger"]');
|
|
172
|
+
this.triggerSlot =
|
|
173
|
+
'<div class="s-user-menu-trigger"><div class="s-user-menu-avatar-wrap"><img class="s-user-menu-trigger-avatar" src="{avatar}" alt="{first_name}{last_name}" /></div><div class="s-user-menu-trigger-content"><span class="s-user-menu-trigger-hello">{hello}</span><p class="s-user-menu-trigger-name">{first_name} {last_name}</p></div> <i class="s-user-menu-trigger-icon">{icon}</i></div>';
|
|
174
|
+
if (!trigger) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
this.triggerSlot = trigger.innerHTML;
|
|
178
|
+
trigger.innerHTML = this.replaceParams(trigger.innerHTML);
|
|
179
|
+
}
|
|
180
|
+
fetchFreshProfile() {
|
|
181
|
+
//don't request fetchFreshProfile unless token is injected into the api
|
|
182
|
+
if (!salla.api.token) {
|
|
183
|
+
salla.log('trying to fetchFreshProfile before injected the token!!');
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
salla.profile.api.info().then(res => {
|
|
187
|
+
this.updateProfileState(res);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
updateProfileState(res) {
|
|
191
|
+
this.badges = {
|
|
192
|
+
notifications: salla.helpers.number(res.data.notifications || 0),
|
|
193
|
+
pending_orders: salla.helpers.number(res.data.pending_orders || 0),
|
|
194
|
+
};
|
|
195
|
+
this.hasBadges = Number(res.data.pending_orders) > 0 || Number(res.data.notifications) > 0;
|
|
196
|
+
this.first_name = res.data.first_name;
|
|
197
|
+
this.last_name = res.data.last_name;
|
|
198
|
+
this.avatar = res.data.avatar || salla.url.cdn('images/avatar.png', 40, 40);
|
|
199
|
+
}
|
|
200
|
+
async open(e) {
|
|
201
|
+
this.opened = !this.opened;
|
|
202
|
+
e.stopPropagation();
|
|
203
|
+
if (this.opened) {
|
|
204
|
+
window.addEventListener('click', this.onClickOutside);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
menuItemClicked(event, itemKey) {
|
|
208
|
+
if (itemKey !== 'logout') {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
event.preventDefault();
|
|
212
|
+
salla.auth.logout('sall-user-menu');
|
|
213
|
+
}
|
|
214
|
+
replaceParams(body) {
|
|
215
|
+
return body
|
|
216
|
+
.replace(/\{hello\}/g, this.hello)
|
|
217
|
+
.replace(/\{first_name\}/g, this.first_name)
|
|
218
|
+
.replace(/\{last_name\}/g, this.last_name)
|
|
219
|
+
.replace(/\{avatar\}/g, this.avatar)
|
|
220
|
+
.replace(/\{icon\}/g, keyboard_arrow_down.ArrowDown);
|
|
221
|
+
}
|
|
222
|
+
getTheHeader() {
|
|
223
|
+
return (index.h("div", { class: {
|
|
224
|
+
's-user-menu-trigger-slot': true,
|
|
225
|
+
's-user-menu-red-dot': this.hasBadges,
|
|
226
|
+
's-user-menu-trigger-avatar-only': this.avatarOnly,
|
|
227
|
+
}, id: "trigger-slot", onClick: e => this.open(e), onKeyUp: e => this.open(e), innerHTML: this.replaceParams(this.triggerSlot) }));
|
|
228
|
+
}
|
|
229
|
+
getItemAnchorLinkAttrs(itemKey) {
|
|
230
|
+
if (itemKey === 'profile' && this.profileUrl && this.sallaAccountEnabled) {
|
|
231
|
+
return { href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' };
|
|
232
|
+
}
|
|
233
|
+
// Fix loyalty program URL mapping from master
|
|
234
|
+
const urlKey = itemKey === 'loyalty_program' ? 'loyalty' : itemKey;
|
|
235
|
+
return { href: Salla.url.get(urlKey) };
|
|
236
|
+
}
|
|
237
|
+
getMenuItem([itemKey, itemValue], i) {
|
|
238
|
+
//todo:: enhancement support slot here
|
|
239
|
+
if (itemKey === 'wallet' && !window.can_access_wallet)
|
|
240
|
+
return;
|
|
241
|
+
if (itemKey === 'loyalty_program' && !Salla.config.get('store.features').includes('loyalty-system'))
|
|
242
|
+
return;
|
|
243
|
+
return (index.h("li", { class: {
|
|
244
|
+
's-user-menu-dropdown-item': true,
|
|
245
|
+
's-user-menu-dropdown-item-logout': i + 1 === Object.entries(this.items).length,
|
|
246
|
+
} }, index.h("a", { ...this.getItemAnchorLinkAttrs(itemKey), class: "s-user-menu-dropdown-item-link", onClick: event => this.menuItemClicked(event, itemKey) }, index.h("i", { class: "s-user-menu-dropdown-item-prefix", innerHTML: itemValue }), index.h("span", { class: "s-user-menu-dropdown-item-title" }, this[itemKey]), !['٠', '0', undefined].includes(this.badges[itemKey]) ? (index.h("span", { class: "s-user-menu-dropdown-item-badge" }, this.badges[itemKey])) : (''))));
|
|
247
|
+
}
|
|
248
|
+
componentShouldUpdate() {
|
|
249
|
+
if (!this.opened) {
|
|
250
|
+
window.removeEventListener('click', this.onClickOutside);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
render() {
|
|
254
|
+
if (!this.is_loggedIn) {
|
|
255
|
+
return (index.h(index.Host, null, index.h("slot", { name: "login-btn" }, index.h("button", { type: "button", class: "s-user-menu-login-btn", onClick: () => salla.event.dispatch('login::open'), innerHTML: UserCircle }))));
|
|
256
|
+
}
|
|
257
|
+
if (this.inline) {
|
|
258
|
+
return (index.h(index.Host, null, index.h("ul", { class: "s-user-menu-inline" }, Object.entries(this.items).map((item, i) => this.getMenuItem(item, i)))));
|
|
259
|
+
}
|
|
260
|
+
return (index.h(index.Host, null, index.h("div", { class: {
|
|
261
|
+
's-user-menu-wrapper': true,
|
|
262
|
+
's-user-menu-relative-dropdown': this.relativeDropdown,
|
|
263
|
+
} }, this.getTheHeader(), index.h("div", { class: { 's-user-menu-toggler': true, opened: this.opened } }, index.h("div", { class: "s-user-menu-dropdown", onClick: e => e.stopPropagation(), onKeyUp: e => e.stopPropagation() }, this.showHeader ? (index.h("div", { class: "s-user-menu-dropdown-header" }, index.h("img", { src: this.avatar, alt: `${this.first_name} ${this.last_name}` }), index.h("div", { class: "s-user-menu-dropdown-header-content" }, index.h("span", null, this.hello), index.h("p", null, this.first_name, " ", this.last_name)), index.h("button", { type: 'button', class: "s-user-menu-dropdown-header-close", innerHTML: cancel.Cancel, onClick: () => { this.opened = false; } }))) : (''), index.h("ul", { class: "s-user-menu-dropdown-list" }, Object.entries(this.items).map((item, i) => this.getMenuItem(item, i))))))));
|
|
264
|
+
}
|
|
265
|
+
componentDidLoad() {
|
|
266
|
+
document.lazyLoadInstance?.update(this.host.querySelectorAll('.lazy'));
|
|
267
|
+
}
|
|
268
|
+
buildProfileUrl(token) {
|
|
269
|
+
return `${Salla.config.get('account.url', 'https://accounts.salla.com')}/${salla.config.get('user.language_code')}/user?store=${Salla.config.get('store.id')}&info=${encodeURIComponent(token)}`;
|
|
270
|
+
}
|
|
271
|
+
get host() { return index.getElement(this); }
|
|
272
|
+
};
|
|
273
|
+
SallaUserMenu.style = sallaUserMenuCss;
|
|
274
|
+
|
|
275
|
+
exports.salla_user_menu = SallaUserMenu;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var index = require('./index-DgOViweO.js');
|
|
7
|
+
var interfaces = require('./interfaces-CRqrf5RX.js');
|
|
8
|
+
|
|
9
|
+
const sallaUserProfileCss = ":host{display:block}";
|
|
10
|
+
|
|
11
|
+
const SallaUserProfile = class {
|
|
12
|
+
// Constructor
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
/**
|
|
16
|
+
* The minimum allowed age for a user. Users with a birthdate indicating an age less than this value will be considered invalid.
|
|
17
|
+
* Defaults to 10.
|
|
18
|
+
*/
|
|
19
|
+
this.minAge = 10;
|
|
20
|
+
this.isEditable = true;
|
|
21
|
+
this.disableAction = false;
|
|
22
|
+
this.isLoading = true;
|
|
23
|
+
// Translated Strings State
|
|
24
|
+
this.first_name_trans = salla.lang.get('pages.profile.first_name');
|
|
25
|
+
this.last_name_trans = salla.lang.get('pages.profile.last_name');
|
|
26
|
+
this.birthday_trans = salla.lang.get('pages.profile.birthday');
|
|
27
|
+
this.birthday_placeholder_trans = salla.lang.get('pages.profile.birthday_placeholder');
|
|
28
|
+
this.gender_trans = salla.lang.get('pages.profile.gender');
|
|
29
|
+
this.gender_placeholder_trans = salla.lang.get('pages.profile.gender_placeholder');
|
|
30
|
+
this.male_trans = salla.lang.get('pages.profile.male');
|
|
31
|
+
this.female_trans = salla.lang.get('pages.profile.female');
|
|
32
|
+
this.email_trans = salla.lang.get('common.elements.email');
|
|
33
|
+
this.mobile_trans = salla.lang.get('common.elements.mobile');
|
|
34
|
+
this.save_btn_trans = salla.lang.get('common.elements.save');
|
|
35
|
+
this.drag_and_drop_trans = salla.lang.get('common.uploader.drag_and_drop');
|
|
36
|
+
this.browse_trans = salla.lang.get('common.uploader.browse');
|
|
37
|
+
this.email_required_trans = salla.lang.get('pages.checkout.email_required');
|
|
38
|
+
this.invalid_email_trans = salla.lang.get('pages.error.invalid_value', {
|
|
39
|
+
attribute: 'email',
|
|
40
|
+
});
|
|
41
|
+
// Localization setup when the language is loaded
|
|
42
|
+
salla.lang.onLoaded(() => {
|
|
43
|
+
// Assigning translated strings to state properties
|
|
44
|
+
// These translations are fetched from the localization object
|
|
45
|
+
this.first_name_trans = salla.lang.get('pages.profile.first_name');
|
|
46
|
+
this.last_name_trans = salla.lang.get('pages.profile.last_name');
|
|
47
|
+
this.birthday_trans = salla.lang.get('pages.profile.birthday');
|
|
48
|
+
this.birthday_placeholder_trans = salla.lang.get('pages.profile.birthday_placeholder');
|
|
49
|
+
this.gender_trans = salla.lang.get('pages.profile.gender');
|
|
50
|
+
this.gender_placeholder_trans = salla.lang.get('pages.profile.gender_placeholder');
|
|
51
|
+
this.male_trans = salla.lang.get('pages.profile.male');
|
|
52
|
+
this.female_trans = salla.lang.get('pages.profile.female');
|
|
53
|
+
this.email_trans = salla.lang.get('common.elements.email');
|
|
54
|
+
this.mobile_trans = salla.lang.get('common.elements.mobile');
|
|
55
|
+
this.save_btn_trans = salla.lang.get('common.elements.save');
|
|
56
|
+
this.drag_and_drop_trans = salla.lang.get('common.uploader.drag_and_drop');
|
|
57
|
+
this.browse_trans = salla.lang.get('common.uploader.browse');
|
|
58
|
+
this.email_required_trans = salla.lang.get('pages.checkout.email_required');
|
|
59
|
+
this.invalid_email_trans = salla.lang.get('pages.error.invalid_value', {
|
|
60
|
+
attribute: 'email',
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
// Event handler for phone number field changes
|
|
65
|
+
phoneNumberFieldEventHandler(data) {
|
|
66
|
+
if (!data.detail.number) {
|
|
67
|
+
this.disableAction = true;
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.userData.phone.number = Number.parseInt(data.detail.number);
|
|
71
|
+
this.userData.phone.country = data.detail.country_code;
|
|
72
|
+
this.disableAction = false;
|
|
73
|
+
}
|
|
74
|
+
// Event handler for generic field changes
|
|
75
|
+
handleFieldChange(key, event, required = false) {
|
|
76
|
+
if (event.target.value) {
|
|
77
|
+
this.userData[key] = event.target.value;
|
|
78
|
+
this.disableAction = false;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
if (required) {
|
|
82
|
+
this.disableAction = true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// Event handler for email input changes
|
|
87
|
+
handleEmailInput(key, event) {
|
|
88
|
+
const emailErrorDisplaySection = document.getElementById('email-error');
|
|
89
|
+
const email = event.target.value;
|
|
90
|
+
if (!email) {
|
|
91
|
+
this.disableAction = true;
|
|
92
|
+
emailErrorDisplaySection.textContent = this.email_required_trans;
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const emailPattern = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i;
|
|
96
|
+
if (!emailPattern.test(email)) {
|
|
97
|
+
this.disableAction = true;
|
|
98
|
+
emailErrorDisplaySection.textContent = this.invalid_email_trans;
|
|
99
|
+
}
|
|
100
|
+
emailErrorDisplaySection.textContent = '';
|
|
101
|
+
this.userData[key] = email;
|
|
102
|
+
this.disableAction = false;
|
|
103
|
+
}
|
|
104
|
+
// Submit form method
|
|
105
|
+
submitForm(event) {
|
|
106
|
+
event.preventDefault();
|
|
107
|
+
this.disableAction = true;
|
|
108
|
+
const payload = Object.assign({}, this.userData);
|
|
109
|
+
payload.phone = undefined;
|
|
110
|
+
//@ts-ignore
|
|
111
|
+
payload.phone = this.userData.phone.number;
|
|
112
|
+
payload.country_code = this.userData.phone.country;
|
|
113
|
+
salla.api.profile.update(payload).finally(() => { this.disableAction = false; });
|
|
114
|
+
}
|
|
115
|
+
getBirthDateRestriction() {
|
|
116
|
+
const now = new Date();
|
|
117
|
+
const pastYear = now.getFullYear() - this.minAge;
|
|
118
|
+
now.setFullYear(pastYear);
|
|
119
|
+
return now;
|
|
120
|
+
}
|
|
121
|
+
fetchData() {
|
|
122
|
+
return salla.api.profile
|
|
123
|
+
.info()
|
|
124
|
+
.then(resp => { this.userData = resp.data; })
|
|
125
|
+
.finally(() => {
|
|
126
|
+
this.isLoading = false;
|
|
127
|
+
this.isEditable = !Salla.config.get('store.features').includes('sso-login');
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
renderLoadingSection() {
|
|
131
|
+
return (index.h("div", { class: "s-user-profile-skeleton-wrapper" }, Array.from({ length: 6 }, (_, i) => (index.h("salla-skeleton", { class: "skeleton-item", width: "100%", height: "50px", key: i })))));
|
|
132
|
+
}
|
|
133
|
+
componentWillLoad() {
|
|
134
|
+
Salla.onReady().then(() => this.fetchData());
|
|
135
|
+
}
|
|
136
|
+
render() {
|
|
137
|
+
if (this.isLoading) {
|
|
138
|
+
return this.renderLoadingSection();
|
|
139
|
+
}
|
|
140
|
+
return (index.h("form", { onSubmit: event => this.submitForm(event) }, index.h("div", { class: "s-user-profile-wrapper" }, index.h("div", { class: "s-user-profile-field" }, index.h("label", { htmlFor: "first-name", class: "s-user-profile-field-label" }, this.first_name_trans), index.h("input", { disabled: !this.isEditable, type: "text", name: "first_name", value: this.userData.first_name, id: "first-name", required: true, autocomplete: "first_name", class: "form-input", onChange: event => this.handleFieldChange('first_name', event) })), index.h("div", { class: "s-user-profile-field" }, index.h("label", { htmlFor: "last-name", class: "s-user-profile-field-label" }, this.last_name_trans), index.h("input", { disabled: !this.isEditable, type: "text", name: "last_name", value: this.userData.last_name, id: "last-name", required: true, autocomplete: "last_name", class: "form-input", onChange: event => this.handleFieldChange('last_name', event) })), index.h("div", { class: "s-user-profile-field" }, index.h("label", { htmlFor: "birthday", class: "s-user-profile-field-label" }, this.birthday_trans), index.h("salla-datetime-picker", { disabled: !this.isEditable, dateFormat: "Y-m-d", value: this.userData.birthday, placeholder: this.birthday_placeholder_trans, required: true, maxDate: this.getBirthDateRestriction(), name: "birthday", onPicked: event => this.handleFieldChange('birthday', event) })), index.h("div", { class: "s-user-profile-field" }, index.h("label", { htmlFor: "gender", class: "s-user-profile-field-label" }, this.gender_trans), index.h("select", { disabled: !this.isEditable, class: "form-input", name: "gender", required: true, onChange: event => this.handleFieldChange('gender', event) }, index.h("option", { value: "" }, this.gender_placeholder_trans), index.h("option", { value: interfaces.Genders.Male, selected: this.userData.gender === interfaces.Genders.Male }, this.male_trans), index.h("option", { value: interfaces.Genders.Female, selected: this.userData.gender === interfaces.Genders.Female }, this.female_trans))), index.h("div", { class: "s-user-profile-field" }, index.h("label", { htmlFor: "email", class: "s-user-profile-field-label" }, this.email_trans), index.h("input", { disabled: !this.isEditable, type: "email", name: "email", value: this.userData.email, id: "email", class: "form-input", required: true, onInput: event => this.handleEmailInput('email', event) }), index.h("p", { id: "email-error", class: "s-user-profile-field-error" })), index.h("div", { class: "s-user-profile-field" }, index.h("label", { htmlFor: "international-mobile", class: "s-user-profile-field-label" }, this.mobile_trans), index.h("salla-tel-input", { disabled: !this.isEditable, name: "international-mobile", "country-code": this.userData.phone.country, phone: `${this.userData.phone.number}`, onPhoneEntered: data => this.phoneNumberFieldEventHandler(data) }))), index.h("salla-button", { type: "submit", loading: this.disableAction, disabled: this.disableAction || !this.isEditable, "loader-position": "end", class: "s-user-profile-submit" }, this.save_btn_trans)));
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
SallaUserProfile.style = sallaUserProfileCss;
|
|
144
|
+
|
|
145
|
+
exports.salla_user_profile = SallaUserProfile;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var index = require('./index-DgOViweO.js');
|
|
7
|
+
|
|
8
|
+
var Bullhorn = `<!-- Generated by IcoMoon.io -->
|
|
9
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
10
|
+
<title>bullhorn</title>
|
|
11
|
+
<path d="M30.129 0.264c-0.339-0.252-0.776-0.328-1.179-0.208l-24.951 7.485v-0.216c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v14.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-0.112l3.448 1.207-0.595 1.704c-0.321 1.019-0.227 2.103 0.267 3.051s1.327 1.647 2.345 1.968l6.359 2.004c0.399 0.127 0.804 0.187 1.201 0.187 1.699 0 3.277-1.091 3.812-2.785l0.423-1.295 7.633 2.672c0.143 0.049 0.292 0.075 0.44 0.075 0.273 0 0.543-0.084 0.772-0.247 0.352-0.249 0.561-0.655 0.561-1.087v-28c0-0.421-0.199-0.819-0.537-1.069zM18.297 28.4c-0.221 0.701-0.973 1.089-1.673 0.871l-6.357-2.004c-0.34-0.108-0.617-0.34-0.781-0.656s-0.196-0.676-0.101-0.977l0.581-1.665 8.777 3.072zM28 27.453l-24-8.4v-8.728l24-7.2z"></path>
|
|
12
|
+
</svg>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
var UserOff = `<!-- Generated by IcoMoon.io -->
|
|
16
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
17
|
+
<title>user-off</title>
|
|
18
|
+
<path d="M10.837 19.309c-4.963 1.284-8.171 4.303-8.171 7.691v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-2.101 2.48-4.155 6.172-5.109 0.713-0.184 1.141-0.912 0.957-1.625-0.184-0.711-0.908-1.137-1.625-0.956zM12.859 3.715c0.933-0.685 2.020-1.048 3.141-1.048 2.941 0 5.333 2.392 5.333 5.333 0 1.121-0.363 2.208-1.048 3.141-0.436 0.593-0.308 1.428 0.284 1.864 0.239 0.175 0.515 0.259 0.788 0.259 0.411 0 0.815-0.188 1.076-0.544 1.025-1.393 1.567-3.025 1.567-4.72 0-4.412-3.588-8-8-8-1.695 0-3.327 0.541-4.721 1.567-0.592 0.435-0.72 1.269-0.284 1.864 0.436 0.593 1.269 0.721 1.864 0.284zM31.609 29.724l-29.333-29.333c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l29.333 29.333c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z"></path>
|
|
19
|
+
</svg>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
var UserCancel = `<!-- Generated by IcoMoon.io -->
|
|
23
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
24
|
+
<title>user-cancel</title>
|
|
25
|
+
<path d="M29.885 16l1.724-1.724c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-1.724 1.724-1.724-1.724c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l1.724 1.724-1.724 1.724c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l1.724-1.724 1.724 1.724c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885zM10.667 16c4.043 0 7.333-3.289 7.333-7.333s-3.291-7.333-7.333-7.333-7.333 3.289-7.333 7.333 3.291 7.333 7.333 7.333zM10.667 4c2.573 0 4.667 2.093 4.667 4.667s-2.093 4.667-4.667 4.667-4.667-2.093-4.667-4.667 2.093-4.667 4.667-4.667zM10.667 18.667c-5.881 0-10.667 3.813-10.667 8.5v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-3.217 3.588-5.833 8-5.833s8 2.616 8 5.833v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-4.687-4.785-8.5-10.667-8.5z"></path>
|
|
26
|
+
</svg>
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
const sallaUserSettingsCss = "";
|
|
30
|
+
|
|
31
|
+
const SallaUserSettings = class {
|
|
32
|
+
constructor(hostRef) {
|
|
33
|
+
index.registerInstance(this, hostRef);
|
|
34
|
+
// Texts
|
|
35
|
+
this.deactivateAccount = salla.lang.get('pages.profile.deactivate_account');
|
|
36
|
+
this.promotionalMsgs = salla.lang.get('pages.profile.promotional_messages');
|
|
37
|
+
this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
|
|
38
|
+
this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
|
|
39
|
+
this.deactivateDesc = salla.lang.get('pages.profile.deactivate_account_description');
|
|
40
|
+
this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
|
|
41
|
+
this.sorryForLeavingText = salla.lang.get('pages.profile.warning_for_deactivate');
|
|
42
|
+
this.warningText = salla.lang.get('pages.profile.sorry_for_leaving');
|
|
43
|
+
this.keepAccount = salla.lang.get('pages.profile.keep_account');
|
|
44
|
+
this.buttonLoading = false;
|
|
45
|
+
this.canHideName = salla.config.get('store.settings.rating.can_customer_hide_name');
|
|
46
|
+
salla.onReady(() => {
|
|
47
|
+
this.isHiddenName = salla.config.get('user.is_hidden_name');
|
|
48
|
+
this.isNotifiable = salla.config.get('user.is_notifiable');
|
|
49
|
+
this.canHideName = salla.config.get('store.settings.rating.can_customer_hide_name');
|
|
50
|
+
if (!this.isNotifiable || !this.isHiddenName) {
|
|
51
|
+
salla.event.on('profile::info.fetched', res => {
|
|
52
|
+
this.isHiddenName = res.data.is_hidden_name;
|
|
53
|
+
this.isNotifiable = res.data.is_notifiable;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
salla.lang.onLoaded(() => {
|
|
58
|
+
this.deactivateAccount = salla.lang.get('pages.profile.deactivate_account');
|
|
59
|
+
this.promotionalMsgs = salla.lang.get('pages.profile.promotional_messages');
|
|
60
|
+
this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
|
|
61
|
+
this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
|
|
62
|
+
this.deactivateDesc = salla.lang.get('pages.profile.deactivate_account_description');
|
|
63
|
+
this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
|
|
64
|
+
this.warningText = salla.lang.get('pages.profile.warning_for_deactivate');
|
|
65
|
+
this.sorryForLeavingText = salla.lang.get('pages.profile.sorry_for_leaving');
|
|
66
|
+
this.keepAccount = salla.lang.get('pages.profile.keep_account');
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
toggleSetting(setting, event) {
|
|
70
|
+
salla.profile.updateSettings({ name: setting, value: event.target.checked });
|
|
71
|
+
}
|
|
72
|
+
capitalizeText(str) {
|
|
73
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
74
|
+
}
|
|
75
|
+
openDeactivateModal() {
|
|
76
|
+
this.confirmationModal.setTitle(this.capitalizeText(this.deactivateAccount));
|
|
77
|
+
this.confirmationModal.open();
|
|
78
|
+
}
|
|
79
|
+
async deleteAccount() {
|
|
80
|
+
await salla.profile.delete().finally(() => this.confirmationModal.close());
|
|
81
|
+
}
|
|
82
|
+
render() {
|
|
83
|
+
return (index.h(index.Host, { key: '1a6622794c68aa483d9a2526d7c9568619145168', class: "s-user-settings-wrapper" }, this.canHideName && index.h("div", { key: '4188aabfd44edb57365f5a2d1c0910f5ec3cd447', class: "s-user-settings-section" }, index.h("salla-list-tile", { key: '9f9ccbb08d666a13bf19895349a17f84fbdd3fc1' }, index.h("div", { key: '85426ad3140db951064c29c988badc23447a238d', slot: "icon", class: "s-user-settings-section-icon" }, index.h("span", { key: 'd1a386387320cf907e4645240cace32ac27a1e5b', innerHTML: UserCancel })), index.h("div", { key: '1310d3547da0c2dd23e254eaf1b22f1b54956ef2', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), index.h("div", { key: '639ef8121549e9c119def1c8012b42647249df2c', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), index.h("div", { key: 'aa8d60ad8c61d682e2114471e6168609bb4e9cb0', slot: 'action', class: "s-user-settings-section-action" }, index.h("label", { key: '9d8d52ec4bdfb2032649ae37823070ea0902cb9d', class: "s-toggle" }, index.h("input", { key: 'f263da0f32ee2682bf442253980fe68da933cb06', class: "s-toggle-input", checked: this.isHiddenName, onChange: (e) => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), index.h("div", { key: '058e908fcb2a61a239ff5ae67adaa290553feb0a', class: "s-toggle-switcher" }))))), index.h("div", { key: '2e314b366093f06ebc8e583c17d3f2f2125cd2e7', class: "s-user-settings-section" }, index.h("salla-list-tile", { key: '5e2fb8520042ccbd4301b20046369f65fb292a49' }, index.h("div", { key: '25918c6b5402504a0683f2f6931b58e3663ba4eb', slot: "icon", class: "s-user-settings-section-icon" }, index.h("span", { key: '0d24d9ecb8f7d48d1dba9eaebaad8093210f0a57', innerHTML: Bullhorn })), index.h("div", { key: 'e212afc7b1ad19e0c4976e5686bc51a847e94d61', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), index.h("div", { key: '3f4f72fe869f7cd6f4b4df870e6af8bd1cc32088', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), index.h("div", { key: '6929527d156f6da1f9ca61be60b756621b7fb321', slot: 'action', class: "s-user-settings-section-action" }, index.h("label", { key: '1f3f3c77b25f602f3a4f461da321df2bcee2a956', class: "s-toggle" }, index.h("input", { key: 'afd4616efa19cdf04e32fd785af72a6c96ef980c', class: "s-toggle-input", checked: this.isNotifiable, onChange: (e) => this.toggleSetting('is_notifiable', e), type: "checkbox" }), index.h("div", { key: 'ef55c0480c58c3a77b4c28980c34b89197e2c84c', class: "s-toggle-switcher" }))))), index.h("div", { key: '7fc42b2d9ee0c58fd210b6704f96de07cf58c703', class: "s-user-settings-section s-user-settings-section-deactivate-user" }, index.h("salla-list-tile", { key: '35bc4e485e78f57cce3fa9d324578997bf5b5346' }, index.h("div", { key: 'd2643402a5f414beb388622d96352600a58e7788', slot: "icon", class: "s-user-settings-section-icon" }, index.h("span", { key: '90a634d2ff464a26f7a09df39cf0cce6f7a1ce87', innerHTML: UserOff })), index.h("div", { key: '3376df9d4baee75e502df2b8265328910f692708', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), index.h("div", { key: '1452beb1f275f905b7a1ecb7e76a4223700f7d03', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), index.h("div", { key: '28bc808fbd51274f587abee141f67242100aea03', slot: 'action', class: "s-user-settings-section-action" }, index.h("salla-button", { key: 'c54e8db52d35e9ab62e2616a0dfb3a10417fcb80', fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount))))), index.h("salla-modal", { key: 'a1d52fd66ed991f8411ca17b16e37d21893a2f06', width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => this.confirmationModal = modal }, index.h("span", { key: '9119095941bd2a579b27c18db025238ca652bd6b', slot: 'icon', class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), index.h("div", { key: '3194c2236470a7da32bc065218162da80ea7713c', class: "s-user-settings-confirmation" }, index.h("div", { key: '718f43edf4e6a22ed23e0edaccee07fd3fa46e13', class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), index.h("div", { key: 'a87fcd03f6d97afc26f8410faacfcbbbc81cd8bb', class: "s-user-settings-confirmation-actions" }, index.h("salla-button", { key: '366186ea98a351d1f0a1f6b3dc2eeddc18e46a33', width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), index.h("salla-button", { key: 'f42dc54f7903f3e48ab8c3ac8af0d57039753cf6', fill: 'outline', loading: this.buttonLoading, width: "wide", onClick: () => this.deleteAccount() }, this.capitalizeText(this.deactivateAccount)))))));
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
SallaUserSettings.style = sallaUserSettingsCss;
|
|
87
|
+
|
|
88
|
+
exports.salla_user_settings = SallaUserSettings;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DgOViweO.js');
|
|
7
7
|
|
|
8
8
|
const sallaWalletCss = ".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";
|
|
9
9
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var Search = `<!-- Generated by IcoMoon.io -->
|
|
7
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
8
|
+
<title>search</title>
|
|
9
|
+
<path d="M30.276 28.391l-7.576-7.576c1.644-2.053 2.633-4.652 2.633-7.481 0-6.616-5.384-12-12-12s-12 5.384-12 12 5.384 12 12 12c2.829 0 5.428-0.989 7.481-2.633l7.576 7.576c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885zM13.333 22.667c-5.147 0-9.333-4.187-9.333-9.333s4.187-9.333 9.333-9.333 9.333 4.187 9.333 9.333-4.187 9.333-9.333 9.333z"></path>
|
|
10
|
+
</svg>
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
exports.Search = Search;
|
|
@@ -3,13 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var ArrowDownIcon = `<!-- Generated by IcoMoon.io -->
|
|
7
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
8
|
-
<title>keyboard_arrow_down</title>
|
|
9
|
-
<path d="M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z"></path>
|
|
10
|
-
</svg>
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
6
|
var SpecialDiscountIcon = `<!-- Generated by IcoMoon.io -->
|
|
14
7
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
15
8
|
<title>special-discount</title>
|
|
@@ -17,5 +10,4 @@ var SpecialDiscountIcon = `<!-- Generated by IcoMoon.io -->
|
|
|
17
10
|
</svg>
|
|
18
11
|
`;
|
|
19
12
|
|
|
20
|
-
exports.ArrowDownIcon = ArrowDownIcon;
|
|
21
13
|
exports.SpecialDiscountIcon = SpecialDiscountIcon;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var WishListIcon = `<!-- Generated by IcoMoon.io -->
|
|
7
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
8
|
+
<title>star</title>
|
|
9
|
+
<path d="M31.819 12.077c-0.367-0.883-1.209-1.411-2.259-1.411h-8.437l-2.681-8.871c-0.347-1.075-1.329-1.796-2.443-1.796s-2.096 0.721-2.447 1.805l-2.788 8.861h-8.275c-1.076 0-1.939 0.533-2.308 1.427-0.375 0.904-0.159 2.012 0.525 2.693 0.044 0.044 0.092 0.085 0.141 0.124l6.811 5.101-2.773 8.567c-0.344 1.063 0.019 2.228 0.899 2.899 0.459 0.351 1.001 0.527 1.544 0.527 0.528 0 1.056-0.165 1.511-0.499l7.159-5.267 7.161 5.268c0.896 0.659 2.168 0.645 3.051-0.028 0.884-0.671 1.245-1.836 0.901-2.9l-2.773-8.567 6.811-5.101c0.051-0.037 0.099-0.080 0.143-0.124 0.687-0.687 0.904-1.8 0.528-2.709zM21.976 18.448c-0.456 0.343-0.644 0.936-0.469 1.477l3.044 9.293-7.763-5.711c-0.235-0.173-0.513-0.259-0.791-0.259s-0.556 0.085-0.791 0.259l-7.713 5.676 2.997-9.257c0.175-0.541-0.013-1.136-0.469-1.477l-6.829-5.116h8.551c0.583 0 1.097-0.377 1.272-0.933l2.981-9.479 2.861 9.465c0.169 0.561 0.688 0.947 1.276 0.947h8.672z"></path>
|
|
10
|
+
</svg>
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
exports.WishListIcon = WishListIcon;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var Star = `<!-- Generated by IcoMoon.io -->
|
|
7
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="30" height="32" viewBox="0 0 30 32">
|
|
8
|
+
<title>star2</title>
|
|
9
|
+
<path d="M29.714 11.839c0 0.321-0.232 0.625-0.464 0.857l-6.482 6.321 1.536 8.929c0.018 0.125 0.018 0.232 0.018 0.357 0 0.464-0.214 0.893-0.732 0.893-0.25 0-0.5-0.089-0.714-0.214l-8.018-4.214-8.018 4.214c-0.232 0.125-0.464 0.214-0.714 0.214-0.518 0-0.75-0.429-0.75-0.893 0-0.125 0.018-0.232 0.036-0.357l1.536-8.929-6.5-6.321c-0.214-0.232-0.446-0.536-0.446-0.857 0-0.536 0.554-0.75 1-0.821l8.964-1.304 4.018-8.125c0.161-0.339 0.464-0.732 0.875-0.732s0.714 0.393 0.875 0.732l4.018 8.125 8.964 1.304c0.429 0.071 1 0.286 1 0.821z"></path>
|
|
10
|
+
</svg>
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
exports.Star = Star;
|