@salla.sa/twilight-components 2.14.380 → 2.14.381
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-OhCwnn9l.js → filepond-CsqfBzs3.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BjJJ863B.js → filepond-plugin-file-poster-BWhvanmU.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-D5nJzX3z.js → filepond-plugin-file-validate-size-noIyy5Yp.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-D13Iiqqr.js → filepond-plugin-file-validate-type-N76Wh7ZL.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-ClQqTYlQ.js → filepond-plugin-image-edit-BkgUR4kG.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BTOdKQOQ.js → filepond-plugin-image-exif-orientation-DLFISFCC.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Dsci6Rtb.js → filepond-plugin-image-preview-CtTDfIQp.js} +1 -1
- package/dist/cjs/{index-DH1vX5Bt.js → index-B-K6ToCR.js} +1 -1
- package/dist/cjs/{index-CHRvLWS8.js → index-Bxxuur88.js} +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +4 -2
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +5 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +8 -2
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +2 -2
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +5 -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-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +6 -2
- 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 +144 -43
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +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-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 +6 -4
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +10 -6
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-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 +2 -2
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-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-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +5 -3
- package/dist/cjs/salla-scopes.cjs.entry.js +5 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +4 -4
- 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/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-BZ7Tbldp.js → vanilla-picker-DDwsUdkB.js} +1 -1
- package/dist/collection/components/salla-accordion/salla-accordion.js +5 -3
- package/dist/collection/components/salla-advertisement/salla-advertisement.js +4 -0
- package/dist/collection/components/salla-app-install-alert/salla-app-install-alert.js +7 -1
- package/dist/collection/components/salla-custom-fields/salla-custom-fields.js +12 -8
- package/dist/collection/components/salla-hook/salla-hook.js +12 -5
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +165 -47
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +3 -2
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +4 -3
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +12 -9
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +7 -6
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +2 -2
- package/dist/collection/components/salla-order-details/salla-order-details.js +2 -2
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +4 -2
- package/dist/collection/components/salla-review-card/salla-review-card.js +2 -2
- package/dist/collection/components/salla-scopes/salla-scopes.js +4 -0
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +7 -7
- package/dist/components/index.js +2 -2
- package/dist/components/salla-accordion2.js +3 -1
- package/dist/components/salla-advertisement.js +4 -0
- package/dist/components/salla-app-install-alert.js +7 -1
- package/dist/components/salla-custom-fields.js +4 -0
- package/dist/components/salla-hook.js +5 -1
- package/dist/components/salla-localization-modal.js +144 -43
- package/dist/components/salla-multiple-bundle-product-cart2.js +2 -1
- package/dist/components/salla-multiple-bundle-product-details2.js +3 -2
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +7 -4
- package/dist/components/salla-multiple-bundle-product-slider2.js +2 -1
- package/dist/components/salla-multiple-bundle-product.js +1 -1
- package/dist/components/salla-order-details.js +1 -1
- package/dist/components/salla-rating-modal.js +4 -2
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-scopes.js +4 -0
- package/dist/components/salla-user-menu.js +4 -4
- package/dist/esm/{filepond-BgLkbAlS.js → filepond-Dw5LLI9G.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-s4m5zTQ5.js → filepond-plugin-file-poster-BQve1M8B.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-EfVTIVeK.js → filepond-plugin-file-validate-size-Mq0exUD8.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Chg0gvtx.js → filepond-plugin-file-validate-type-BjZfWuzA.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DvIjoDsi.js → filepond-plugin-image-edit-B_Mw4seW.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-kE8T9OkA.js → filepond-plugin-image-exif-orientation-D1rHHcpP.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BJAUCA1P.js → filepond-plugin-image-preview-CSOxFeXE.js} +1 -1
- package/dist/esm/{index-eEimxoFN.js → index-BpoZBzEy.js} +2 -2
- package/dist/esm/{index-BAJAa57P.js → index-COcTESat.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_3.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +4 -2
- package/dist/esm/salla-add-product-button_4.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +5 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +8 -2
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +2 -2
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down_2.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +5 -1
- 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 +1 -1
- package/dist/esm/salla-hook.entry.js +6 -2
- 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 +144 -43
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.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-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 +6 -4
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +10 -6
- package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-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 +2 -2
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-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-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +5 -3
- package/dist/esm/salla-scopes.entry.js +5 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +4 -4
- 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/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CQfoqkgB.js → vanilla-picker-COFfA4w_.js} +1 -1
- package/dist/twilight/{p-6d33240d.entry.js → p-0413c734.entry.js} +1 -1
- package/dist/twilight/p-04b8ab10.entry.js +4 -0
- package/dist/twilight/{p-8a40fabd.entry.js → p-15a594fa.entry.js} +1 -1
- package/dist/twilight/{p-424d54df.entry.js → p-15fd3093.entry.js} +1 -1
- package/dist/twilight/{p-309b6cfe.entry.js → p-17b7160b.entry.js} +1 -1
- package/dist/twilight/{p-f3b11c5e.entry.js → p-2199d718.entry.js} +1 -1
- package/dist/twilight/{p-f65b1cc4.entry.js → p-24377f25.entry.js} +1 -1
- package/dist/twilight/{p-38577abd.entry.js → p-264fbff6.entry.js} +1 -1
- package/dist/twilight/{p-52404ae1.entry.js → p-3041a8c3.entry.js} +1 -1
- package/dist/twilight/{p-4b8f5897.entry.js → p-30e99651.entry.js} +1 -1
- package/dist/twilight/{p-f7811b2e.entry.js → p-39581e5c.entry.js} +1 -1
- package/dist/twilight/{p-80956964.entry.js → p-3f181a96.entry.js} +1 -1
- package/dist/twilight/{p-b318a0ba.entry.js → p-4463abd4.entry.js} +1 -1
- package/dist/twilight/{p-8cdc7360.entry.js → p-4919e5a9.entry.js} +1 -1
- package/dist/twilight/{p-1b414a65.entry.js → p-4ffae40f.entry.js} +1 -1
- package/dist/twilight/{p-CNaIwBPC.js → p-4jF7OEOD.js} +1 -1
- package/dist/twilight/{p-0edc4cd6.entry.js → p-538189c6.entry.js} +1 -1
- package/dist/twilight/{p-a8be9bd2.entry.js → p-53c9c271.entry.js} +1 -1
- package/dist/twilight/{p-d9ea5bc0.entry.js → p-5507971f.entry.js} +1 -1
- package/dist/twilight/{p-4429147a.entry.js → p-5e99999b.entry.js} +1 -1
- package/dist/twilight/{p-8c083d22.entry.js → p-6004b9f6.entry.js} +1 -1
- package/dist/twilight/{p-4b18c6b6.entry.js → p-645926ff.entry.js} +1 -1
- package/dist/twilight/{p-4937d0bd.entry.js → p-64a71c5b.entry.js} +1 -1
- package/dist/twilight/{p-c3015089.entry.js → p-64e748a7.entry.js} +1 -1
- package/dist/twilight/{p-914fe9d5.entry.js → p-6a92b5dd.entry.js} +1 -1
- package/dist/twilight/{p-e3685dec.entry.js → p-6af10c58.entry.js} +1 -1
- package/dist/twilight/{p-e137375c.entry.js → p-7131d69f.entry.js} +1 -1
- package/dist/twilight/{p-14e34d12.entry.js → p-73ab234b.entry.js} +1 -1
- package/dist/twilight/{p-1062e8b0.entry.js → p-83f3ec31.entry.js} +1 -1
- package/dist/twilight/{p-6fca74f4.entry.js → p-84c228b3.entry.js} +1 -1
- package/dist/twilight/p-87995ef8.entry.js +4 -0
- package/dist/twilight/{p-0eb5078d.entry.js → p-8edc0ff0.entry.js} +1 -1
- package/dist/twilight/{p-8a50b0ec.entry.js → p-97fb05e9.entry.js} +1 -1
- package/dist/twilight/{p-e1091287.entry.js → p-984f5fdb.entry.js} +1 -1
- package/dist/twilight/{p-f9e74b2d.entry.js → p-98cb7b70.entry.js} +1 -1
- package/dist/twilight/{p-50b948f1.entry.js → p-9aea4727.entry.js} +1 -1
- package/dist/twilight/{p-73a0f916.entry.js → p-9f184cae.entry.js} +1 -1
- package/dist/twilight/{p-C0SN1Hu2.js → p-BEN319Se.js} +1 -1
- package/dist/twilight/{p-BA4uXDey.js → p-B_eS27OO.js} +1 -1
- package/dist/twilight/{p-eEimxoFN.js → p-BpoZBzEy.js} +1 -1
- package/dist/twilight/{p-_Nybob4I.js → p-CLHtpy_k.js} +1 -1
- package/dist/twilight/{p-DA2DReRj.js → p-ChWnmXKQ.js} +1 -1
- package/dist/twilight/{p-CBclGOrf.js → p-OV5ZDGcP.js} +1 -1
- package/dist/twilight/{p-0d0e9cc5.entry.js → p-a1bf8ad3.entry.js} +1 -1
- package/dist/twilight/{p-d1d96039.entry.js → p-a3ec6623.entry.js} +1 -1
- package/dist/twilight/{p-a5f45964.entry.js → p-ab35c8be.entry.js} +1 -1
- package/dist/twilight/p-acd0216d.entry.js +4 -0
- package/dist/twilight/{p-34f54667.entry.js → p-b01d274c.entry.js} +1 -1
- package/dist/twilight/{p-dd194e28.entry.js → p-b070f96a.entry.js} +1 -1
- package/dist/twilight/p-b2979968.entry.js +4 -0
- package/dist/twilight/{p-174f26e3.entry.js → p-bdefc2f2.entry.js} +1 -1
- package/dist/twilight/{p-6a0d5bf0.entry.js → p-c0540583.entry.js} +1 -1
- package/dist/twilight/{p-3e3ef749.entry.js → p-c1a34acb.entry.js} +1 -1
- package/dist/twilight/{p-1cc348bd.entry.js → p-c5b6f255.entry.js} +1 -1
- package/dist/twilight/{p-ba843446.entry.js → p-c5b8fb5f.entry.js} +1 -1
- package/dist/twilight/{p-537ea6c4.entry.js → p-c614db39.entry.js} +1 -1
- package/dist/twilight/{p-ca322deb.entry.js → p-c69cfce4.entry.js} +1 -1
- package/dist/twilight/{p-eb426d96.entry.js → p-c74dd641.entry.js} +1 -1
- package/dist/twilight/{p-2553c102.entry.js → p-ca62b40b.entry.js} +1 -1
- package/dist/twilight/{p-c4a32c32.entry.js → p-ca995389.entry.js} +1 -1
- package/dist/twilight/{p-8948444e.entry.js → p-d9e33667.entry.js} +1 -1
- package/dist/twilight/{p-b8c8437b.entry.js → p-dd01d95c.entry.js} +1 -1
- package/dist/twilight/{p-1cc494ac.entry.js → p-dff43324.entry.js} +1 -1
- package/dist/twilight/{p-1f256c22.entry.js → p-e35623f2.entry.js} +1 -1
- package/dist/twilight/{p-90a2dde9.entry.js → p-e4d4516c.entry.js} +1 -1
- package/dist/twilight/{p-2ca7ed43.entry.js → p-e66f7d14.entry.js} +1 -1
- package/dist/twilight/{p-s1UoXHVX.js → p-eWBd8uwT.js} +1 -1
- package/dist/twilight/{p-d595175e.entry.js → p-ed12b178.entry.js} +1 -1
- package/dist/twilight/{p-4a09432e.entry.js → p-efd9618b.entry.js} +1 -1
- package/dist/twilight/{p-642dbfd9.entry.js → p-f158ba7c.entry.js} +1 -1
- package/dist/twilight/{p-d042041b.entry.js → p-f2b27a5e.entry.js} +1 -1
- package/dist/twilight/{p-7f2a4dc0.entry.js → p-f60ec106.entry.js} +1 -1
- package/dist/twilight/{p-62713df9.entry.js → p-f625565a.entry.js} +1 -1
- package/dist/twilight/{p-2169fb7d.entry.js → p-f78b23ea.entry.js} +1 -1
- package/dist/twilight/{p-0af1c84b.entry.js → p-f7bf59b9.entry.js} +1 -1
- package/dist/twilight/{p-645edb0f.entry.js → p-fdad85d2.entry.js} +1 -1
- package/dist/twilight/{p-CeE1UK0j.js → p-rPMW4kOC.js} +1 -1
- package/dist/twilight/{p-C1cZE4BE.js → p-tNbreaQ2.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-accordion/salla-accordion.d.ts +2 -0
- package/dist/types/components/salla-app-install-alert/salla-app-install-alert.d.ts +1 -0
- package/dist/types/components/salla-custom-fields/salla-custom-fields.d.ts +8 -0
- package/dist/types/components/salla-hook/salla-hook.d.ts +5 -0
- package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +14 -3
- package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.d.ts +1 -0
- package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.d.ts +1 -0
- package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.d.ts +5 -0
- package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.d.ts +5 -0
- package/dist/types/components/salla-multiple-bundle-product/salla-multiple-bundle-product.d.ts +1 -0
- package/dist/types/components/salla-order-details/salla-order-details.d.ts +1 -0
- package/dist/types/components/salla-review-card/salla-review-card.d.ts +1 -0
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +2 -2
- package/dist/types/components.d.ts +120 -14
- package/package.json +5 -5
- package/dist/twilight/p-7ae2abce.entry.js +0 -4
- package/dist/twilight/p-c5b3b222.entry.js +0 -4
- package/dist/twilight/p-f1c55b22.entry.js +0 -4
- package/dist/twilight/p-f820bb24.entry.js +0 -4
|
@@ -6,6 +6,7 @@ import CameraIcon from "../../assets/svg/camera.svg";
|
|
|
6
6
|
import { FormFieldTypes, } from "../salla-user-profile/interfaces";
|
|
7
7
|
export class SallaCustomFields {
|
|
8
8
|
constructor() {
|
|
9
|
+
/** Whether the fields can be edited by the user. */
|
|
9
10
|
this.isEditable = true;
|
|
10
11
|
this.fieldErrors = {};
|
|
11
12
|
this.isSubmitting = false;
|
|
@@ -19,15 +20,18 @@ export class SallaCustomFields {
|
|
|
19
20
|
get saveButtonText() {
|
|
20
21
|
return salla.lang.get("common.elements.save");
|
|
21
22
|
}
|
|
23
|
+
/** Update the displayed fields programmatically. */
|
|
22
24
|
async setFields(fields) {
|
|
23
25
|
this.parsedFields = fields;
|
|
24
26
|
}
|
|
27
|
+
/** Gets the current values of all fields, formatted for submission. */
|
|
25
28
|
async getFieldValues() {
|
|
26
29
|
return this.parsedFields?.reduce((values, field) => {
|
|
27
30
|
values[`custom_fields[${field.id}]`] = field.value;
|
|
28
31
|
return values;
|
|
29
32
|
}, {}) || {};
|
|
30
33
|
}
|
|
34
|
+
/** Validates all required fields and updates the error state. Returns true if valid. */
|
|
31
35
|
async validateFields() {
|
|
32
36
|
if (!this.parsedFields)
|
|
33
37
|
return true;
|
|
@@ -154,7 +158,7 @@ export class SallaCustomFields {
|
|
|
154
158
|
"optional": false,
|
|
155
159
|
"docs": {
|
|
156
160
|
"tags": [],
|
|
157
|
-
"text": ""
|
|
161
|
+
"text": "The list of custom fields to render. Can be a JSON string or an array of objects."
|
|
158
162
|
},
|
|
159
163
|
"getter": false,
|
|
160
164
|
"setter": false,
|
|
@@ -173,7 +177,7 @@ export class SallaCustomFields {
|
|
|
173
177
|
"optional": false,
|
|
174
178
|
"docs": {
|
|
175
179
|
"tags": [],
|
|
176
|
-
"text": ""
|
|
180
|
+
"text": "Whether the fields can be edited by the user."
|
|
177
181
|
},
|
|
178
182
|
"getter": false,
|
|
179
183
|
"setter": false,
|
|
@@ -193,7 +197,7 @@ export class SallaCustomFields {
|
|
|
193
197
|
"optional": false,
|
|
194
198
|
"docs": {
|
|
195
199
|
"tags": [],
|
|
196
|
-
"text": ""
|
|
200
|
+
"text": "The URL to send file uploads to."
|
|
197
201
|
},
|
|
198
202
|
"getter": false,
|
|
199
203
|
"setter": false,
|
|
@@ -217,7 +221,7 @@ export class SallaCustomFields {
|
|
|
217
221
|
"composed": true,
|
|
218
222
|
"docs": {
|
|
219
223
|
"tags": [],
|
|
220
|
-
"text": ""
|
|
224
|
+
"text": "Emitted when a field's value changes."
|
|
221
225
|
},
|
|
222
226
|
"complexType": {
|
|
223
227
|
"original": "{\n fieldId: string | number;\n value: unknown;\n isValid: boolean;\n }",
|
|
@@ -232,7 +236,7 @@ export class SallaCustomFields {
|
|
|
232
236
|
"composed": true,
|
|
233
237
|
"docs": {
|
|
234
238
|
"tags": [],
|
|
235
|
-
"text": ""
|
|
239
|
+
"text": "Emitted when a file is successfully uploaded or encounters an error."
|
|
236
240
|
},
|
|
237
241
|
"complexType": {
|
|
238
242
|
"original": "{\n fieldId: string | number;\n file: File;\n isValid: boolean;\n }",
|
|
@@ -270,7 +274,7 @@ export class SallaCustomFields {
|
|
|
270
274
|
"return": "Promise<void>"
|
|
271
275
|
},
|
|
272
276
|
"docs": {
|
|
273
|
-
"text": "",
|
|
277
|
+
"text": "Update the displayed fields programmatically.",
|
|
274
278
|
"tags": []
|
|
275
279
|
}
|
|
276
280
|
},
|
|
@@ -287,7 +291,7 @@ export class SallaCustomFields {
|
|
|
287
291
|
"return": "Promise<{ [key: string]: unknown; }>"
|
|
288
292
|
},
|
|
289
293
|
"docs": {
|
|
290
|
-
"text": "",
|
|
294
|
+
"text": "Gets the current values of all fields, formatted for submission.",
|
|
291
295
|
"tags": []
|
|
292
296
|
}
|
|
293
297
|
},
|
|
@@ -304,7 +308,7 @@ export class SallaCustomFields {
|
|
|
304
308
|
"return": "Promise<boolean>"
|
|
305
309
|
},
|
|
306
310
|
"docs": {
|
|
307
|
-
"text": "",
|
|
311
|
+
"text": "Validates all required fields and updates the error state. Returns true if valid.",
|
|
308
312
|
"tags": []
|
|
309
313
|
}
|
|
310
314
|
}
|
|
@@ -3,11 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Host, h } from "@stencil/core";
|
|
5
5
|
export class SallaHook {
|
|
6
|
+
/**
|
|
7
|
+
* Mounts a given HTML element into the hook position.
|
|
8
|
+
* @param element The element to inject.
|
|
9
|
+
*/
|
|
6
10
|
async mount(element) {
|
|
7
11
|
this.host.before(element);
|
|
8
12
|
}
|
|
9
13
|
render() {
|
|
10
|
-
return h(Host, { key: '
|
|
14
|
+
return h(Host, { key: 'a887790b6c3fa466e88b0b1c90fda502f3aca812' });
|
|
11
15
|
}
|
|
12
16
|
async componentDidLoad() {
|
|
13
17
|
// Register this component for hooks system, already on it logic to run componentDidLoad trigger
|
|
@@ -31,7 +35,7 @@ export class SallaHook {
|
|
|
31
35
|
"optional": false,
|
|
32
36
|
"docs": {
|
|
33
37
|
"tags": [],
|
|
34
|
-
"text": ""
|
|
38
|
+
"text": "The unique name to identify the hook position."
|
|
35
39
|
},
|
|
36
40
|
"getter": false,
|
|
37
41
|
"setter": false,
|
|
@@ -47,7 +51,7 @@ export class SallaHook {
|
|
|
47
51
|
"parameters": [{
|
|
48
52
|
"name": "element",
|
|
49
53
|
"type": "HTMLElement",
|
|
50
|
-
"docs": ""
|
|
54
|
+
"docs": "The element to inject."
|
|
51
55
|
}],
|
|
52
56
|
"references": {
|
|
53
57
|
"Promise": {
|
|
@@ -62,8 +66,11 @@ export class SallaHook {
|
|
|
62
66
|
"return": "Promise<void>"
|
|
63
67
|
},
|
|
64
68
|
"docs": {
|
|
65
|
-
"text": "",
|
|
66
|
-
"tags": [
|
|
69
|
+
"text": "Mounts a given HTML element into the hook position.",
|
|
70
|
+
"tags": [{
|
|
71
|
+
"name": "param",
|
|
72
|
+
"text": "element The element to inject."
|
|
73
|
+
}]
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
76
|
};
|
|
@@ -6,26 +6,93 @@ import { h } from "@stencil/core";
|
|
|
6
6
|
* @slot header - The top of the modal.
|
|
7
7
|
* @slot footer - Replaces the bottom button.
|
|
8
8
|
* @slot language - Replaces language label, has replaceable props `{name}`, `{code}`, `{country_code}`.
|
|
9
|
-
* @slot currency - Replaces currency label, has replaceable props `{name}`, `{code}`, `{country_code}`.
|
|
9
|
+
* @slot currency - Replaces currency label, has replaceable props `{name}`, `{code}`, `{symbol}`, `{country_code}`.
|
|
10
10
|
*/
|
|
11
11
|
export class SallaLocalizationModal {
|
|
12
12
|
constructor() {
|
|
13
|
-
this.
|
|
13
|
+
this.languageNames = {
|
|
14
|
+
"ar": "العربية",
|
|
15
|
+
"en": "English",
|
|
16
|
+
"sq": "shqip",
|
|
17
|
+
"hy": "հայերէն",
|
|
18
|
+
"bg": "български",
|
|
19
|
+
"zh": "汉语",
|
|
20
|
+
"hr": "hrvatski",
|
|
21
|
+
"cs": "čeština",
|
|
22
|
+
"da": "dansk",
|
|
23
|
+
"nl": "dutch",
|
|
24
|
+
"et": "eesti keel",
|
|
25
|
+
"fi": "suomen kieli",
|
|
26
|
+
"fr": "Français",
|
|
27
|
+
"de": "Deutsch",
|
|
28
|
+
"el": "Ελληνικά",
|
|
29
|
+
"hi": "हिन्दी",
|
|
30
|
+
"hu": "magyar",
|
|
31
|
+
//we know it's `id` as ISO 639-1 but we are using `ind` as ISO 639-2 on our system as key to avoid conflicts with `id` attribute
|
|
32
|
+
"ind": "bahasa Indonesia",
|
|
33
|
+
"ga": "Gaeilge",
|
|
34
|
+
"it": "Italiano",
|
|
35
|
+
"ja": "日本語",
|
|
36
|
+
"ko": "한국어",
|
|
37
|
+
"lv": "latviešu",
|
|
38
|
+
"mt": "Maltese",
|
|
39
|
+
"fa": "فارسی",
|
|
40
|
+
"pl": "Polish",
|
|
41
|
+
"pt": "português",
|
|
42
|
+
"ro": "română",
|
|
43
|
+
"ru": "русский",
|
|
44
|
+
"sl": "slovenščina",
|
|
45
|
+
"es": "Español",
|
|
46
|
+
"sv": "svenska",
|
|
47
|
+
"tl": "Tagalog (Filipino)",
|
|
48
|
+
"tr": "Türkçe",
|
|
49
|
+
"uk": "украї́нська",
|
|
50
|
+
"ur": "اُردُو",
|
|
51
|
+
"ms": "Bahasa Malaysia",
|
|
52
|
+
};
|
|
53
|
+
this.currenciesList = {
|
|
54
|
+
SAR: { en: "Saudi Riyal", ar: "ريال سعودي", symbol: "ر.س" },
|
|
55
|
+
USD: { en: "US Dollar", ar: "دولار أمريكي", symbol: "$" },
|
|
56
|
+
EUR: { en: "Euro", ar: "يورو", symbol: "€" },
|
|
57
|
+
AED: { en: "UAE Dirham", ar: "درهم اماراتي", symbol: "د.إ" },
|
|
58
|
+
KWD: { en: "Kuwaiti Dinar", ar: "دينار كويتي", symbol: "د.ك" },
|
|
59
|
+
BHD: { en: "Bahraini Dinar", ar: "دينار بحريني", symbol: "د.ب" },
|
|
60
|
+
QAR: { en: "Qatari Riyal", ar: "ريال قطري", symbol: "ر.ق" },
|
|
61
|
+
OMR: { en: "Omani Rial", ar: "ريال عماني", symbol: "ر.ع" },
|
|
62
|
+
AUD: { en: "Australian Dollar", ar: "دولار استرالي", symbol: "$" },
|
|
63
|
+
CAD: { en: "Canadian Dollar", ar: "دولار كندي", symbol: "$" },
|
|
64
|
+
CNY: { en: "Renminbi", ar: "رنمينبي", symbol: "¥" },
|
|
65
|
+
EGP: { en: "Egyptian Pound", ar: "جنيه مصري", symbol: "ج.م" },
|
|
66
|
+
GBP: { en: "Pound Sterling", ar: "جنيه استرليني", symbol: "£" },
|
|
67
|
+
IDR: { en: "Indonesian Rupiah", ar: "روبية إندونيسية", symbol: "Rp" },
|
|
68
|
+
INR: { en: "Indian Rupee", ar: "روبية هندية", symbol: "₹" },
|
|
69
|
+
JPY: { en: "Japanese Yen", ar: "ين ياباني", symbol: "¥" },
|
|
70
|
+
MYR: { en: "Malaysian Ringgit", ar: "رينغيت ماليزي", symbol: "RM" },
|
|
71
|
+
PKR: { en: "Pakistani Rupee", ar: "روبية باكستانية", symbol: "Rs." },
|
|
72
|
+
SEK: { en: "Swedish Krona", ar: "كرونة سويدية", symbol: "kr" },
|
|
73
|
+
SGD: { en: "Singapore Dollar", ar: "دولار سنغافوري", symbol: "$" },
|
|
74
|
+
TRY: { en: "Turkish Lira", ar: "ليرة تركية", symbol: "₺" },
|
|
75
|
+
IQD: { en: "Iraqi Dinar", ar: "دينار عراقي", symbol: "د.ع" },
|
|
76
|
+
LBP: { en: "Lebanese Pound", ar: "ليرة لبنانية", symbol: "ل.ل" },
|
|
77
|
+
MRO: { en: "Mauritanian Ouguiya", ar: "أوقية موريتانية", symbol: "UM" },
|
|
78
|
+
SDG: { en: "Sudanese Pound", ar: "جنيه سوداني", symbol: "SDG" },
|
|
79
|
+
SYP: { en: "Syrian Pound", ar: "ليرة سورية", symbol: "ل.س" },
|
|
80
|
+
TND: { en: "Tunisian Dinar", ar: "دينار تونسي", symbol: "د.ت" },
|
|
81
|
+
JOD: { en: "Jordanian Dinar", ar: "دينار أردني", symbol: "JOD" },
|
|
82
|
+
DZD: { en: "Algerian Dinar", ar: "دينار جزائري", symbol: "دج" },
|
|
83
|
+
MAD: { en: "Moroccan Dirham", ar: "درهم مغربي", symbol: "د.م." },
|
|
84
|
+
LYD: { en: "Libyan Dinar", ar: "دينار ليبي", symbol: "LD" },
|
|
85
|
+
YER: { en: "Yemeni Riyal", ar: "ريال يمني", symbol: "ر.ي" }
|
|
86
|
+
};
|
|
87
|
+
//here we will used the currency code instead of the symbol when current language is not arabic
|
|
88
|
+
this.arabicCurrencies = ["SAR", "AED", "KWD", "BHD", "QAR", "OMR", "EGP", "IQD", "LBP", "SYP", "TND", "DZD", "MAD", "YER"];
|
|
14
89
|
this.languages = [];
|
|
15
90
|
this.currencies = [];
|
|
16
91
|
this.hasError = false;
|
|
17
92
|
/**
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
this.language = salla.config.get('user.language_code');
|
|
21
|
-
/**
|
|
22
|
-
* Current currency (existing or newly selected)
|
|
93
|
+
* To show the trigger button or not
|
|
23
94
|
*/
|
|
24
|
-
this.
|
|
25
|
-
salla.event.on('localization::open', () => this.open());
|
|
26
|
-
salla.lang.onLoaded(() => {
|
|
27
|
-
this.translationLoaded = true;
|
|
28
|
-
});
|
|
95
|
+
this.showTrigger = false;
|
|
29
96
|
/**
|
|
30
97
|
* letting developer to insert his own slot like:
|
|
31
98
|
* <salla-localization>
|
|
@@ -36,14 +103,25 @@ export class SallaLocalizationModal {
|
|
|
36
103
|
* we made a workaround to pass language & currency attributes, then replace names in rendering
|
|
37
104
|
*/
|
|
38
105
|
this.languageSlot = this.host.querySelector('[slot="language"]')?.innerHTML || '<label class="s-localization-modal-label" for="lang-{code}"><span>{name}</span></label>';
|
|
39
|
-
this.currencySlot = this.host.querySelector('[slot="currency"]')?.innerHTML || '<label class="s-localization-modal-label" for="currency-{code}"><span>{name}</span><small class="s-localization-modal-currency">{
|
|
106
|
+
this.currencySlot = this.host.querySelector('[slot="currency"]')?.innerHTML || '<label class="s-localization-modal-label" for="currency-{code}"><span>{name}</span><small class="s-localization-modal-currency">{symbol}</small></label>';
|
|
107
|
+
}
|
|
108
|
+
async componentWillLoad() {
|
|
109
|
+
await Salla.onReady();
|
|
110
|
+
await Salla.lang.onLoaded();
|
|
111
|
+
Salla.event.on('localization::open', () => this.open());
|
|
112
|
+
if (!this.language) {
|
|
113
|
+
this.language = Salla.config.get('user.language_code');
|
|
114
|
+
}
|
|
115
|
+
if (!this.currency) {
|
|
116
|
+
this.currency = Salla.config.get('user.currency_code');
|
|
117
|
+
}
|
|
40
118
|
}
|
|
41
119
|
/**
|
|
42
120
|
* open the component
|
|
43
121
|
*/
|
|
44
122
|
async open() {
|
|
45
123
|
this.modal.open();
|
|
46
|
-
return await
|
|
124
|
+
return await Salla.api.withoutNotifier(() => this.getLanguages())
|
|
47
125
|
.then(() => this.getCurrencies())
|
|
48
126
|
.then(() => {
|
|
49
127
|
if (this.languages.length < 2 && this.currencies.length < 2) {
|
|
@@ -63,13 +141,30 @@ export class SallaLocalizationModal {
|
|
|
63
141
|
async close() {
|
|
64
142
|
return this.modal.close();
|
|
65
143
|
}
|
|
144
|
+
getCurrency(currencyCode) {
|
|
145
|
+
return this.currenciesList[currencyCode || this.currency] || { en: "Saudi Riyal", ar: "ريال سعودي", symbol: "ر.س" };
|
|
146
|
+
}
|
|
147
|
+
getLanguageName() {
|
|
148
|
+
return this.languageNames[this.language] || this.language || '';
|
|
149
|
+
}
|
|
150
|
+
getCurrencySymbol(currencyCode) {
|
|
151
|
+
currencyCode = currencyCode || this.currency;
|
|
152
|
+
if (currencyCode === 'SAR') {
|
|
153
|
+
return '<i class="sicon-sar"></i>';
|
|
154
|
+
}
|
|
155
|
+
if (this.language === 'ar' || !this.arabicCurrencies.includes(currencyCode)) {
|
|
156
|
+
return this.getCurrency(currencyCode).symbol;
|
|
157
|
+
}
|
|
158
|
+
return currencyCode;
|
|
159
|
+
}
|
|
160
|
+
getCurrencyName(currencyCode) {
|
|
161
|
+
return this.language === 'ar' ? this.getCurrency(currencyCode).ar : this.getCurrency(currencyCode).en;
|
|
162
|
+
}
|
|
66
163
|
async getLanguages() {
|
|
67
|
-
this.
|
|
68
|
-
return this.languages.length > 1 ? null : await salla.config.languages().then(data => this.languages = data);
|
|
164
|
+
return this.languages.length > 1 ? null : await Salla.config.languages().then(data => this.languages = data);
|
|
69
165
|
}
|
|
70
166
|
async getCurrencies() {
|
|
71
|
-
this.
|
|
72
|
-
return this.currencies.length > 1 ? null : await salla.config.currencies().then(data => this.currencies = Object.values(data || {}));
|
|
167
|
+
return this.currencies.length > 1 ? null : await Salla.config.currencies().then(data => this.currencies = Object.values(data || {}));
|
|
73
168
|
}
|
|
74
169
|
onChangeCurrency(event) {
|
|
75
170
|
this.currency = event.target.value;
|
|
@@ -85,50 +180,56 @@ export class SallaLocalizationModal {
|
|
|
85
180
|
this.btn.load()
|
|
86
181
|
.then(() => {
|
|
87
182
|
if (!this.currency) {
|
|
88
|
-
|
|
183
|
+
Salla.log('There is no currency!');
|
|
89
184
|
return;
|
|
90
185
|
}
|
|
91
|
-
if (this.currency ===
|
|
186
|
+
if (this.currency === Salla.config.get('user.currency_code', 'SAR')) {
|
|
92
187
|
return;
|
|
93
188
|
}
|
|
94
189
|
url = window.location.href;
|
|
95
|
-
return
|
|
190
|
+
return Salla.currency.api.change(this.currency);
|
|
96
191
|
})
|
|
97
192
|
.then(() => {
|
|
98
|
-
if (this.language !==
|
|
99
|
-
url =
|
|
193
|
+
if (this.language !== Salla.config.get('user.language_code', 'ar')) {
|
|
194
|
+
url = Salla.helpers.addParamToUrl('lang', this.language);
|
|
100
195
|
}
|
|
101
196
|
})
|
|
102
197
|
.then(() => {
|
|
103
|
-
|
|
104
|
-
|
|
198
|
+
Salla.cookie.set('s-lang', this.language);
|
|
199
|
+
Salla.cookie.set('s-curr', this.currency);
|
|
105
200
|
})
|
|
106
201
|
.then(() => this.btn.stop())
|
|
107
202
|
.then(() => this.close())
|
|
108
203
|
.then(() => {
|
|
109
204
|
if (url) {
|
|
110
|
-
window.location.href = url.replace(`/${
|
|
205
|
+
window.location.href = url.replace(`/${Salla.config.get('user.language_code')}/`, `/${this.language}/`);
|
|
111
206
|
}
|
|
112
207
|
});
|
|
113
208
|
}
|
|
114
209
|
render() {
|
|
115
|
-
return
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
210
|
+
return [
|
|
211
|
+
this.showTrigger
|
|
212
|
+
? h("button", { type: "button", onClick: () => this.open(), class: "s-localization-modal-trigger-btn" }, h("span", null, this.getLanguageName()), h("span", { class: "s-localization-modal-trigger-separator" }, "|"), " ", h("span", { innerHTML: this.getCurrencySymbol() }))
|
|
213
|
+
: '',
|
|
214
|
+
h("salla-modal", { key: 'ae9553ab14e30b7e9b6466d1e959e469e544ca5b', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { key: '84bf38810a3d1c99ee084951ef596cc33a18e4f7', slot: 'loading' }, h("div", { key: '5e808b2a7774bc1f1e1fe25cb880c45a3b97f1aa', class: "s-localization-modal-skeleton" }, h("salla-skeleton", { key: 'c0000d5f4f5fb663f059822fe1a4f24a78a9dd65', width: '25%', height: '15px' }), h("div", { key: '45164d658a0ee5e8825422af35605bfd83e383ff', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '1e63980f25677892f731e6ad30eda08b8a3852e0', width: '25%', height: '15px' }), h("div", { key: 'b1263061b94885e99d540f90054244fb41fd0a68', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '6dfbe5d71475640cd41dfe3d01e9277f2b2b80c5', height: '40px', width: '100%' }))), !!this.hasError ?
|
|
215
|
+
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "description" }, this.errorMessage)) :
|
|
216
|
+
h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
|
|
217
|
+
h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, Salla.lang.get('common.titles.language')), h("div", { class: "s-localization-modal-section-inner" }, this.languages.length < 6 ?
|
|
218
|
+
this.languages.map(lang => h("div", { class: "s-localization-modal-item" }, h("input", { class: "s-localization-modal-input", type: "radio", checked: this.language == lang.iso_code, onChange: () => this.language = lang.iso_code, name: "language", id: 'lang-' + lang.code.toLowerCase(), value: lang.code }), h("div", { class: "s-localization-modal-label-slot", id: "language-slot", innerHTML: this.languageSlot
|
|
219
|
+
.replace(/\{name\}/g, lang.name)
|
|
220
|
+
.replace(/\{code\}/g, lang.code)
|
|
221
|
+
.replace(/\{country_code\}/g, lang.country_code) }))) :
|
|
222
|
+
h("select", { class: "s-localization-modal-select", name: "language", onChange: e => this.onChangeLanguage(e) }, this.languages.map(lang => h("option", { value: lang.code, selected: this.language == lang.code }, lang.name)))))
|
|
223
|
+
: '', this.currencies.length > 1 ?
|
|
224
|
+
h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, Salla.lang.get('common.titles.currency')), h("div", { class: "s-localization-modal-section-inner" }, this.currencies.length < 6 ?
|
|
225
|
+
this.currencies.map(currency => h("div", { class: "s-localization-modal-item" }, h("input", { class: "s-localization-modal-input", type: "radio", name: "currency", checked: this.currency == currency.code, onChange: () => this.currency = currency.code, id: 'currency-' + currency.code, value: currency.code }), h("div", { class: "s-localization-modal-label-slot", id: "currency-slot", innerHTML: this.currencySlot
|
|
226
|
+
.replace(/\{name\}/g, this.getCurrencyName(currency.code))
|
|
227
|
+
.replace(/\{code\}/g, currency.code)
|
|
228
|
+
.replace(/\{symbol\}/g, this.getCurrencySymbol(currency.code))
|
|
229
|
+
.replace(/\{country_code\}/g, currency.country_code) }))) :
|
|
230
|
+
h("select", { class: "s-localization-modal-select", name: "currency", onChange: e => this.onChangeCurrency(e) }, this.currencies.map(currency => h("option", { value: currency.code, selected: this.currency == currency.code }, currency.name)))))
|
|
231
|
+
: '', h("salla-button", { width: "wide", ref: btn => this.btn = btn, onClick: () => this.submit() }, Salla.lang.get('common.elements.ok'))))
|
|
232
|
+
];
|
|
132
233
|
}
|
|
133
234
|
/**
|
|
134
235
|
* to reduce dom levels we will move slot data into the parent dom
|
|
@@ -157,8 +258,7 @@ export class SallaLocalizationModal {
|
|
|
157
258
|
},
|
|
158
259
|
"getter": false,
|
|
159
260
|
"setter": false,
|
|
160
|
-
"reflect": true
|
|
161
|
-
"defaultValue": "salla.config.get('user.language_code')"
|
|
261
|
+
"reflect": true
|
|
162
262
|
},
|
|
163
263
|
"currency": {
|
|
164
264
|
"type": "string",
|
|
@@ -177,14 +277,32 @@ export class SallaLocalizationModal {
|
|
|
177
277
|
},
|
|
178
278
|
"getter": false,
|
|
179
279
|
"setter": false,
|
|
280
|
+
"reflect": true
|
|
281
|
+
},
|
|
282
|
+
"showTrigger": {
|
|
283
|
+
"type": "boolean",
|
|
284
|
+
"attribute": "show-trigger",
|
|
285
|
+
"mutable": true,
|
|
286
|
+
"complexType": {
|
|
287
|
+
"original": "boolean",
|
|
288
|
+
"resolved": "boolean",
|
|
289
|
+
"references": {}
|
|
290
|
+
},
|
|
291
|
+
"required": false,
|
|
292
|
+
"optional": false,
|
|
293
|
+
"docs": {
|
|
294
|
+
"tags": [],
|
|
295
|
+
"text": "To show the trigger button or not"
|
|
296
|
+
},
|
|
297
|
+
"getter": false,
|
|
298
|
+
"setter": false,
|
|
180
299
|
"reflect": true,
|
|
181
|
-
"defaultValue": "
|
|
300
|
+
"defaultValue": "false"
|
|
182
301
|
}
|
|
183
302
|
};
|
|
184
303
|
}
|
|
185
304
|
static get states() {
|
|
186
305
|
return {
|
|
187
|
-
"translationLoaded": {},
|
|
188
306
|
"languages": {},
|
|
189
307
|
"currencies": {},
|
|
190
308
|
"hasError": {},
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { Host, h } from "@stencil/core";
|
|
5
5
|
export class SallaMultipleBundleProductCart {
|
|
6
6
|
constructor() {
|
|
7
|
+
/** The list of sections belonging to a bundle product. */
|
|
7
8
|
this.sections = [];
|
|
8
9
|
this.itemNumber = '';
|
|
9
10
|
}
|
|
@@ -29,7 +30,7 @@ export class SallaMultipleBundleProductCart {
|
|
|
29
30
|
return (h("div", { slot: "html", class: "s-multiple-bundle-product-cart-header-wrapper" }, h("div", { class: `s-multiple-bundle-product-cart-header ${hasOptions ? '' : 's-multiple-bundle-product-cart-header-no-options'}` }, h("div", { class: "s-multiple-bundle-product-cart-header-content" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-image-wrapper" }, h("img", { src: product?.image?.url, alt: product?.image?.alt || product?.name, class: "s-multiple-bundle-product-cart-header-image" })), h("div", { class: "s-multiple-bundle-product-cart-header-content-details" }, h("h2", { class: "s-multiple-bundle-product-cart-header-content-details-title" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-content-details-title-link" }, product?.name)), h("div", { class: "s-multiple-bundle-product-cart-header-content-details-price" }, h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-regular" }, h("span", { innerHTML: product?.price ? salla.money(product?.price) : '' })), product?.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-sale" }, h("span", { innerHTML: salla.money(product?.sale_price) })))), product?.quantity_in_group > 0 && product?.quantity !== 0 && (h("p", { class: "s-multiple-bundle-product-cart-header-content-details-quantity" }, h("span", null, salla.lang.get('pages.products.number_of_pieces')), h("span", null, product?.quantity_in_group))))), !hasOptions && (h("div", { class: "s-multiple-bundle-product-cart-header-remove-button" }, this.renderRemoveButton(sectionId, product, false))))));
|
|
30
31
|
}
|
|
31
32
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: '92c0fba176ee0d769f866a0ed50a1b27d43e9717', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '3184473ec9399f29fa225287d6adeea109b097ec', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, sectionIndex) => {
|
|
33
34
|
return section.products.map(product => {
|
|
34
35
|
const bundleContext = {
|
|
35
36
|
sectionId: section.id,
|
|
@@ -72,7 +73,7 @@ export class SallaMultipleBundleProductCart {
|
|
|
72
73
|
"optional": false,
|
|
73
74
|
"docs": {
|
|
74
75
|
"tags": [],
|
|
75
|
-
"text": ""
|
|
76
|
+
"text": "The list of sections belonging to a bundle product."
|
|
76
77
|
},
|
|
77
78
|
"getter": false,
|
|
78
79
|
"setter": false,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { Host, h, Fragment } from "@stencil/core";
|
|
5
5
|
export class SallaMultipleBundleProductDetails {
|
|
6
6
|
constructor() {
|
|
7
|
+
/** The list of sections belonging to a bundle product. */
|
|
7
8
|
this.sections = [];
|
|
8
9
|
// store selected product IDs per section (can be string or number)
|
|
9
10
|
this.selectedProducts = {};
|
|
@@ -156,10 +157,10 @@ export class SallaMultipleBundleProductDetails {
|
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
159
|
render() {
|
|
159
|
-
return (h(Host, { key: '
|
|
160
|
+
return (h(Host, { key: '9d632fa75f2dd987a03a8d8c417e520503b4b71d', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '05517aff0eae9141a8f1f7fa0d72044fbbd46af9', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index) => {
|
|
160
161
|
const selectedCount = this.selectedProducts[section.id]?.size || 0;
|
|
161
162
|
return (h("salla-accordion", { key: section.id, collapsed: index === 0 ? false : true }, h("salla-accordion-head", null, this.renderAccordionHeader(section, selectedCount)), h("salla-accordion-body", null, h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index, selectedProducts: this.selectedProducts, onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
|
|
162
|
-
})), h("salla-multiple-bundle-product-options-modal", { key: '
|
|
163
|
+
})), h("salla-multiple-bundle-product-options-modal", { key: 'ac01f882d3e8268b41032857816ba9481918f484' })));
|
|
163
164
|
}
|
|
164
165
|
static get is() { return "salla-multiple-bundle-product-details"; }
|
|
165
166
|
static get originalStyleUrls() {
|
|
@@ -193,7 +194,7 @@ export class SallaMultipleBundleProductDetails {
|
|
|
193
194
|
"optional": false,
|
|
194
195
|
"docs": {
|
|
195
196
|
"tags": [],
|
|
196
|
-
"text": ""
|
|
197
|
+
"text": "The list of sections belonging to a bundle product."
|
|
197
198
|
},
|
|
198
199
|
"getter": false,
|
|
199
200
|
"setter": false,
|
|
@@ -32,6 +32,7 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
32
32
|
this.validationErrors = [];
|
|
33
33
|
this.hasUnsavedChanges = false;
|
|
34
34
|
}
|
|
35
|
+
/** Opens the modal manually. */
|
|
35
36
|
async open() {
|
|
36
37
|
if (!this.modal) {
|
|
37
38
|
requestAnimationFrame(() => this.open());
|
|
@@ -56,11 +57,13 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
56
57
|
this.isLoading = false;
|
|
57
58
|
}, 300);
|
|
58
59
|
}
|
|
60
|
+
/** Closes the modal manually. */
|
|
59
61
|
async close() {
|
|
60
62
|
if (this.modal) {
|
|
61
63
|
this.modal.close();
|
|
62
64
|
}
|
|
63
65
|
}
|
|
66
|
+
/** Refreshes the internal options tracking state manually. */
|
|
64
67
|
async refreshOptionsState() {
|
|
65
68
|
// Force re-render by updating the component state
|
|
66
69
|
this.selectedOptions = { ...this.selectedOptions };
|
|
@@ -455,7 +458,7 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
455
458
|
const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
|
|
456
459
|
const resetToken = this.optionsResetTokens[cacheKey] || 0;
|
|
457
460
|
const isDisabled = this.isLoading || optionsWithSelectedState.some(opt => opt.details.some(d => d.is_selected && d.is_out === true));
|
|
458
|
-
return (h(Host, { key: '
|
|
461
|
+
return (h(Host, { key: '357005ce9302183eeeec3238ebde74b99c5f7d88' }, h("salla-modal", { key: '95e4f37061229e8359a269b031942d507a43ea25', isLoading: this.isLoading, ref: el => (this.modal = el), width: "md", centered: false, id: `s-multiple-bundle-product-options-modal-options-${productId}`, class: "s-multiple-bundle-product-options-modal-wrapper" }, h("div", { key: 'b1525824f938c5af85a9ca043d2acf86e8773e6a', slot: "loading" }, h("salla-skeleton", { key: '7e71698646e7ec119afbed2fca9dab79c4fe2991', height: "100%", width: "100%" })), this.product?.images && this.product?.images.length > 0 && (h("salla-slider", { key: 'cd9042d00b0a237afd8dfe7ad4ed7032e298eb39', id: `details-slider-${this.product?.id}`, type: "thumbs", loop: false, "auto-height": true, "listen-to-thumbnails-option": true, showThumbsControls: false, controlsOuter: false, showControls: false, class: "s-multiple-bundle-product-options-modal-slider", verticalThumbs: true, thumbsConfig: {
|
|
459
462
|
centeredSlides: true,
|
|
460
463
|
centeredSlidesBounds: true,
|
|
461
464
|
slidesPerView: Math.min(5, Math.max(1, this.product?.images.length)),
|
|
@@ -463,13 +466,13 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
463
466
|
watchSlidesProgress: true,
|
|
464
467
|
direction: 'vertical',
|
|
465
468
|
spaceBetween: 10,
|
|
466
|
-
} }, h("div", { key: '
|
|
469
|
+
} }, h("div", { key: '81773392ee6167f0daf780637e15bef9b7b2f2c7', slot: "items" }, this.product?.images &&
|
|
467
470
|
this.product?.images.map((image, index) => (h("div", { key: index, class: "swiper-slide" }, h("img", { src: image.url, alt: image.alt || `${this.product?.name} - Image ${index + 1}`, loading: "lazy", onError: e => {
|
|
468
471
|
e.target.style.display = 'none';
|
|
469
|
-
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '
|
|
472
|
+
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '2942ab32e0e28e6213b2a1d177e36c84136beaef', slot: "thumbs" }, this.product?.images &&
|
|
470
473
|
this.product?.images.map((image, index) => (h("div", { key: index, "data-caption": `${this.product?.name} - Image ${index + 1}` }, h("img", { src: image.url, loading: "eager", class: "s-multiple-bundle-product-options-modal-slider-thumb", title: `${this.product?.name} - ${index + 1}`, alt: image.alt || `${this.product?.name} - ${index + 1}`, onError: e => {
|
|
471
474
|
e.target.style.display = 'none';
|
|
472
|
-
} })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: '
|
|
475
|
+
} })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: 'e3658d39d7462e1ba8c2099625d9a659541f6b2a', slot: "footer" }, h("div", { key: '8e03e9230c55b9ac6143e37629946e66daf47835', class: "s-multiple-bundle-product-options-modal-footer" }, h("salla-button", { key: 'feca5790f828f7b29de3cba4e3a54d772a7a94c5', onClick: e => this.onSave(e), loading: this.isLoading, disabled: isDisabled }, this.isLoading
|
|
473
476
|
? salla.lang.get('common.elements.saving')
|
|
474
477
|
: salla.lang.get('common.elements.save')))))));
|
|
475
478
|
}
|
|
@@ -507,7 +510,7 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
507
510
|
"composed": true,
|
|
508
511
|
"docs": {
|
|
509
512
|
"tags": [],
|
|
510
|
-
"text": ""
|
|
513
|
+
"text": "Emitted when product options are successfully saved."
|
|
511
514
|
},
|
|
512
515
|
"complexType": {
|
|
513
516
|
"original": "{\n productId: number;\n selectedOptions: SelectedOption[];\n sectionId?: string | number | null;\n productIndex?: number | null;\n }",
|
|
@@ -528,7 +531,7 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
528
531
|
"composed": true,
|
|
529
532
|
"docs": {
|
|
530
533
|
"tags": [],
|
|
531
|
-
"text": ""
|
|
534
|
+
"text": "Emitted when a product is selected or modified via the modal."
|
|
532
535
|
},
|
|
533
536
|
"complexType": {
|
|
534
537
|
"original": "{\n productId: number;\n sectionId: string | number;\n product?: BundleProduct;\n fromModal?: boolean;\n }",
|
|
@@ -558,7 +561,7 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
558
561
|
"return": "Promise<void>"
|
|
559
562
|
},
|
|
560
563
|
"docs": {
|
|
561
|
-
"text": "",
|
|
564
|
+
"text": "Opens the modal manually.",
|
|
562
565
|
"tags": []
|
|
563
566
|
}
|
|
564
567
|
},
|
|
@@ -575,7 +578,7 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
575
578
|
"return": "Promise<void>"
|
|
576
579
|
},
|
|
577
580
|
"docs": {
|
|
578
|
-
"text": "",
|
|
581
|
+
"text": "Closes the modal manually.",
|
|
579
582
|
"tags": []
|
|
580
583
|
}
|
|
581
584
|
},
|
|
@@ -592,7 +595,7 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
592
595
|
"return": "Promise<void>"
|
|
593
596
|
},
|
|
594
597
|
"docs": {
|
|
595
|
-
"text": "",
|
|
598
|
+
"text": "Refreshes the internal options tracking state manually.",
|
|
596
599
|
"tags": []
|
|
597
600
|
}
|
|
598
601
|
}
|