@salla.sa/twilight-components 2.14.362 → 2.14.364
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-P1L22XbE.js → filepond-C6YjB4Pc.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-UlbHgXAq.js → filepond-plugin-file-poster-CtNn5Jla.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DKXahANU.js → filepond-plugin-file-validate-size-PCygUua9.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DtZZQ1i3.js → filepond-plugin-file-validate-type-MZSqUcaj.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BhtrRTGp.js → filepond-plugin-image-edit-ZmpgJTIn.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-B61gl4UN.js → filepond-plugin-image-exif-orientation-DxPDvRXB.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BF6G0R6q.js → filepond-plugin-image-preview-93G9gp9A.js} +1 -1
- package/dist/cjs/{index-_cJXmKQz.js → index-DrduZhCQ.js} +2 -2
- package/dist/cjs/{index-DgFxXzJ_.js → index-DrtTVEw4.js} +1 -1
- 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 +9 -5
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +25 -8
- 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 +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-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 +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-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 +18 -5
- 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 +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 +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +3 -2
- 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 +8 -3
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- 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-CEWOqGx6.js → vanilla-picker-BKkfVwL1.js} +1 -1
- package/dist/collection/components/salla-breadcrumb/salla-breadcrumb.js +8 -4
- package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js +24 -7
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +17 -4
- package/dist/collection/components/salla-scopes/salla-scopes.js +2 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.css +13 -0
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +26 -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-breadcrumb.js +8 -4
- package/dist/components/salla-conditional-offer.js +32 -9
- package/dist/components/salla-offer-modal.js +17 -4
- package/dist/components/salla-scopes.js +2 -1
- package/dist/components/salla-tooltip2.js +8 -2
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/esm/{filepond-T-MBWI7u.js → filepond-DKDl5gHI.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CbcPfGWQ.js → filepond-plugin-file-poster-D93Cfru7.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DSnXG2na.js → filepond-plugin-file-validate-size-B9y0A-_Z.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BjZ4VftS.js → filepond-plugin-file-validate-type-DJLrAmDa.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-EeitPKAi.js → filepond-plugin-image-edit-5SrR8khF.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-l4wHDhla.js → filepond-plugin-image-exif-orientation-CzhglWtb.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-B7W4EgCu.js → filepond-plugin-image-preview-DBxJhkxb.js} +1 -1
- package/dist/esm/{index-BX9zVfVp.js → index-BrjMW-AZ.js} +1 -1
- package/dist/esm/{index-5jnzECfn.js → index-CgYN55XK.js} +2 -2
- 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 +9 -5
- package/dist/esm/salla-add-product-button_4.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +25 -8
- 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 +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-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 +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +18 -5
- 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 +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 +1 -1
- package/dist/esm/salla-scopes.entry.js +3 -2
- 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 +8 -3
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- 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-CBK9MCtQ.js → vanilla-picker-Btl47fnu.js} +1 -1
- package/dist/twilight/{p-fb596ee6.entry.js → p-034a9829.entry.js} +1 -1
- package/dist/twilight/{p-ded370ff.entry.js → p-048110b6.entry.js} +1 -1
- package/dist/twilight/{p-f6455648.entry.js → p-05233dda.entry.js} +1 -1
- package/dist/twilight/{p-11406736.entry.js → p-08b2c445.entry.js} +1 -1
- package/dist/twilight/{p-2b3f7604.entry.js → p-0d2d4bf1.entry.js} +1 -1
- package/dist/twilight/{p-a3e048eb.entry.js → p-0d88be23.entry.js} +1 -1
- package/dist/twilight/{p-6c81c97a.entry.js → p-10551ac8.entry.js} +1 -1
- package/dist/twilight/p-12b86d33.entry.js +4 -0
- package/dist/twilight/{p-d6071576.entry.js → p-18b2b205.entry.js} +1 -1
- package/dist/twilight/{p-d807e0a8.entry.js → p-1a7eb8b5.entry.js} +1 -1
- package/dist/twilight/{p-380016a3.entry.js → p-1b90e0b0.entry.js} +1 -1
- package/dist/twilight/{p-d6ba8963.entry.js → p-1ec20122.entry.js} +1 -1
- package/dist/twilight/{p-cae6a0b9.entry.js → p-20beefaf.entry.js} +1 -1
- package/dist/twilight/{p-ddd680ad.entry.js → p-22bafc5e.entry.js} +1 -1
- package/dist/twilight/{p-cff993d0.entry.js → p-235eb6bb.entry.js} +1 -1
- package/dist/twilight/{p-eb520a53.entry.js → p-257b5507.entry.js} +1 -1
- package/dist/twilight/{p-39375221.entry.js → p-2594518e.entry.js} +1 -1
- package/dist/twilight/{p-405ff657.entry.js → p-296039d7.entry.js} +1 -1
- package/dist/twilight/{p-f988b21f.entry.js → p-2a461d47.entry.js} +1 -1
- package/dist/twilight/{p-50ab610f.entry.js → p-31ad6ddc.entry.js} +1 -1
- package/dist/twilight/{p-8413ebc6.entry.js → p-31b13945.entry.js} +1 -1
- package/dist/twilight/{p-21b15a48.entry.js → p-3a910561.entry.js} +1 -1
- package/dist/twilight/p-3aab356e.entry.js +4 -0
- package/dist/twilight/{p-1ab963d3.entry.js → p-3aef87fa.entry.js} +1 -1
- package/dist/twilight/{p-138656d9.entry.js → p-45f6a85e.entry.js} +1 -1
- package/dist/twilight/{p-7381c693.entry.js → p-489556db.entry.js} +1 -1
- package/dist/twilight/{p-1b4ba19a.entry.js → p-48ac6a0a.entry.js} +1 -1
- package/dist/twilight/{p-4e539dbf.entry.js → p-4afaba5f.entry.js} +1 -1
- package/dist/twilight/{p-cbb0b94d.entry.js → p-50090848.entry.js} +1 -1
- package/dist/twilight/{p-cbd68df1.entry.js → p-5593e4a3.entry.js} +1 -1
- package/dist/twilight/{p-0583f31e.entry.js → p-57bc544c.entry.js} +1 -1
- package/dist/twilight/{p-718ffc26.entry.js → p-5d42ca23.entry.js} +1 -1
- package/dist/twilight/{p-86234c0c.entry.js → p-72a0eba4.entry.js} +1 -1
- package/dist/twilight/{p-601a8e4c.entry.js → p-737bf5ea.entry.js} +1 -1
- package/dist/twilight/{p-40ee772a.entry.js → p-7b94d098.entry.js} +1 -1
- package/dist/twilight/{p-306852d8.entry.js → p-7cd6ff80.entry.js} +1 -1
- package/dist/twilight/{p-487377bf.entry.js → p-7cf68887.entry.js} +1 -1
- package/dist/twilight/{p-b8defbe8.entry.js → p-80cbf7bc.entry.js} +1 -1
- package/dist/twilight/{p-2ce418ff.entry.js → p-838d98d5.entry.js} +1 -1
- package/dist/twilight/{p-87a3036f.entry.js → p-860f725d.entry.js} +1 -1
- package/dist/twilight/{p-8285b1df.entry.js → p-89ce22bc.entry.js} +1 -1
- package/dist/twilight/{p-9a7a8a06.entry.js → p-924ee352.entry.js} +1 -1
- package/dist/twilight/{p-a3fc07e6.entry.js → p-92c2eb1d.entry.js} +1 -1
- package/dist/twilight/{p-fe4903bf.entry.js → p-98cacd53.entry.js} +1 -1
- package/dist/twilight/{p-3d8a09bc.entry.js → p-9cd55815.entry.js} +1 -1
- package/dist/twilight/{p-f01c79af.entry.js → p-9fe2c98c.entry.js} +1 -1
- package/dist/twilight/{p-DMtfKbmo.js → p-B3GTMJbg.js} +1 -1
- package/dist/twilight/p-BIoGLthd.js +9 -0
- package/dist/twilight/{p-BuQ91SGu.js → p-BPzrIneD.js} +1 -1
- package/dist/twilight/{p-BUIofLge.js → p-BX85PU_v.js} +1 -1
- package/dist/twilight/{p-BN_JlVVa.js → p-CBnUMxpk.js} +1 -1
- package/dist/twilight/p-CK0rWcfw.js +9 -0
- package/dist/twilight/{p-5jnzECfn.js → p-CgYN55XK.js} +2 -2
- package/dist/twilight/{p-DfWJQgx4.js → p-CnDmcHhx.js} +1 -1
- package/dist/twilight/{p-BQGFkF4P.js → p-DOwnqQpN.js} +1 -1
- package/dist/twilight/{p-BAqE2_0c.js → p-Dk3aAnUR.js} +1 -1
- package/dist/twilight/{p-9a57ab41.entry.js → p-a2249582.entry.js} +1 -1
- package/dist/twilight/{p-b5df9774.entry.js → p-a8e65234.entry.js} +1 -1
- package/dist/twilight/{p-0f4cbe40.entry.js → p-b6611b65.entry.js} +1 -1
- package/dist/twilight/{p-f506e6cc.entry.js → p-b701e858.entry.js} +1 -1
- package/dist/twilight/{p-d2973225.entry.js → p-b97da3f0.entry.js} +1 -1
- package/dist/twilight/{p-7e188a99.entry.js → p-c1ee3573.entry.js} +1 -1
- package/dist/twilight/{p-2fb61d7c.entry.js → p-c2f9ea90.entry.js} +1 -1
- package/dist/twilight/{p-943489a6.entry.js → p-c6145ba2.entry.js} +1 -1
- package/dist/twilight/{p-f68f731d.entry.js → p-c72f3795.entry.js} +1 -1
- package/dist/twilight/p-c86e684b.entry.js +4 -0
- package/dist/twilight/{p-475287b9.entry.js → p-cb974a04.entry.js} +1 -1
- package/dist/twilight/{p-535e3bc6.entry.js → p-ce7ec4bc.entry.js} +1 -1
- package/dist/twilight/{p-70348f84.entry.js → p-d018e945.entry.js} +1 -1
- package/dist/twilight/{p-26d00e52.entry.js → p-d5e24adc.entry.js} +1 -1
- package/dist/twilight/p-d7dafe1d.entry.js +4 -0
- package/dist/twilight/{p-e043bb34.entry.js → p-e0d8ec2f.entry.js} +1 -1
- package/dist/twilight/{p-8410a6aa.entry.js → p-e129ac60.entry.js} +1 -1
- package/dist/twilight/{p-10c9aabc.entry.js → p-f477fb8e.entry.js} +1 -1
- package/dist/twilight/{p-17e5c57b.entry.js → p-fbe030f2.entry.js} +1 -1
- package/dist/twilight/{p-100eba71.entry.js → p-fcd32f66.entry.js} +1 -1
- package/dist/twilight/{p-1e910afa.entry.js → p-fd59d4f2.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-conditional-offer/salla-conditional-offer.d.ts +2 -1
- package/dist/types/components/salla-scopes/salla-scopes.d.ts +1 -1
- package/dist/types/components/salla-tooltip/salla-tooltip.d.ts +4 -0
- package/dist/types/components.d.ts +10 -0
- package/package.json +5 -5
- package/dist/twilight/p-1GJKMmw_.js +0 -9
- package/dist/twilight/p-44dbd97b.entry.js +0 -4
- package/dist/twilight/p-53b7c8a3.entry.js +0 -4
- package/dist/twilight/p-DT5bMBxP.js +0 -9
- package/dist/twilight/p-b79400bc.entry.js +0 -4
- package/dist/twilight/p-cf2f1bc4.entry.js +0 -4
|
@@ -34,7 +34,9 @@ const SallaBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class SallaBreadcrumb
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
let sessionBreadcrumbs = this.getSessionBreadcrumbs();
|
|
37
|
-
|
|
37
|
+
let lastSessionItem = sessionBreadcrumbs[sessionBreadcrumbs.length - 1];
|
|
38
|
+
let isParentCompatible = lastSessionItem?.url && page.parent?.url && lastSessionItem.url === page.parent.url;
|
|
39
|
+
if (page.slug === "product.single" && sessionBreadcrumbs && sessionBreadcrumbs.length > 0 && isParentCompatible) {
|
|
38
40
|
sessionBreadcrumbs.push({
|
|
39
41
|
title: page.title,
|
|
40
42
|
url: page.url
|
|
@@ -101,11 +103,13 @@ const SallaBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class SallaBreadcrumb
|
|
|
101
103
|
}
|
|
102
104
|
generateBreadcrumbs(page) {
|
|
103
105
|
let breadcrumbs = [];
|
|
104
|
-
//
|
|
106
|
+
// Same parent-compatibility as main path: only reuse session path when last item matches page.parent
|
|
105
107
|
if (page.slug === 'product.single') {
|
|
106
108
|
const previousPage = this.getSessionBreadcrumbs();
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
const lastSessionItem = previousPage[previousPage.length - 1];
|
|
110
|
+
const isParentCompatible = lastSessionItem?.url && page.parent?.url && lastSessionItem.url === page.parent.url;
|
|
111
|
+
if (previousPage.length > 0 && isParentCompatible) {
|
|
112
|
+
return this.setBreadcrumbsFromArray([...previousPage, { title: page.title, url: page.url }]);
|
|
109
113
|
}
|
|
110
114
|
}
|
|
111
115
|
// Start with the current page
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
-
import { d as defineCustomElement$
|
|
5
|
+
import { d as defineCustomElement$3 } from './salla-skeleton2.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './salla-tooltip2.js';
|
|
6
7
|
|
|
7
8
|
var DiscountType;
|
|
8
9
|
(function (DiscountType) {
|
|
@@ -60,12 +61,19 @@ const SallaConditionalOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaCond
|
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
63
|
getProducts() {
|
|
63
|
-
const freeProductIDs = this.offer.details.discounts.filter(({ type }) => type === DiscountType.FREE_PRODUCT).map(({ value }) => value);
|
|
64
|
+
const freeProductIDs = this.offer.details.discounts.filter(({ type }) => type === DiscountType.FREE_PRODUCT).map(({ value }) => value).filter(Boolean);
|
|
64
65
|
if (freeProductIDs.length > 0) {
|
|
65
|
-
return salla.product.fetch({ source: 'selected', source_value: freeProductIDs }).then((
|
|
66
|
-
data
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
return salla.product.fetch({ source: 'selected', source_value: freeProductIDs }).then((response) => {
|
|
67
|
+
const data = response?.data;
|
|
68
|
+
if (data && Array.isArray(data)) {
|
|
69
|
+
const updatedProducts = { ...this.products };
|
|
70
|
+
data.forEach(({ id, url, image, name, price }) => {
|
|
71
|
+
if (id && name && image?.url && url && price !== undefined) {
|
|
72
|
+
updatedProducts[id] = { url, image, name, price };
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
this.products = updatedProducts;
|
|
76
|
+
}
|
|
69
77
|
});
|
|
70
78
|
}
|
|
71
79
|
}
|
|
@@ -82,11 +90,21 @@ const SallaConditionalOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaCond
|
|
|
82
90
|
};
|
|
83
91
|
return this.offer;
|
|
84
92
|
}
|
|
93
|
+
renderTooltip(discount) {
|
|
94
|
+
const productId = discount.value;
|
|
95
|
+
const productItem = this.products[productId];
|
|
96
|
+
const targetId = `avatar-product-${productId}`;
|
|
97
|
+
if (!productItem) {
|
|
98
|
+
salla.logger.error(`salla-conditional-offer:: there is no product with id (${discount.value})!`);
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
return h("salla-tooltip", { class: 'absolute left-0 -top-2', targetId: targetId, theme: "dark" }, h("div", { class: "flex gap-3 text-start" }, productItem?.image?.url && h("img", { src: productItem.image.url, alt: productItem?.image?.alt || productItem.name || "", class: "w-12 h-12 object-cover rounded-lg flex-shrink-0", loading: "lazy", decoding: "async" }), h("div", { class: "flex-1" }, h("div", { class: "leading-tight mb-1" }, productItem.name), h("div", { class: "text-xs text-gray-300", innerHTML: salla.money(productItem.price) }))));
|
|
102
|
+
}
|
|
85
103
|
getCheckpointContent(discount) {
|
|
86
104
|
if (discount.type === DiscountType.PERCENTAGE)
|
|
87
105
|
return `${discount.value}%`;
|
|
88
106
|
if (discount.type === DiscountType.FIXED)
|
|
89
|
-
return salla.money(discount.value);
|
|
107
|
+
return h("span", { innerHTML: salla.money(discount.value) });
|
|
90
108
|
if (discount.type !== DiscountType.FREE_PRODUCT) {
|
|
91
109
|
salla.logger.error(`salla-conditional-offer:: unexpected type (${discount.type})!`);
|
|
92
110
|
return "";
|
|
@@ -125,7 +143,7 @@ const SallaConditionalOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaCond
|
|
|
125
143
|
const isActive = discount.min_spend <= this.offer.details.current_value;
|
|
126
144
|
return (h("div", { class: "s-conditional-offer-checkpoint-container" }, index > 0 ? [
|
|
127
145
|
h("div", { key: "progress-line", class: "s-conditional-offer-progress-line-container" }, h("div", { class: "s-conditional-offer-progress-line-inactive" }), h("div", { class: "s-conditional-offer-progress-line-active", style: { width: `${progressPercentage}%` } })),
|
|
128
|
-
h("div", { key: "checkpoint", class: `s-conditional-offer-checkpoint ${isActive ? "s-conditional-offer-active-checkpoint" : ""}` }, h("div", { class: `s-conditional-offer-item-avatar-content ${isActive ? "active" : ""}`,
|
|
146
|
+
h("div", { key: "checkpoint", class: `s-conditional-offer-checkpoint ${isActive ? "s-conditional-offer-active-checkpoint" : ""}` }, h("div", { class: `s-conditional-offer-item-avatar-content ${isActive ? "active" : ""}`, id: discount.type === DiscountType.FREE_PRODUCT ? `avatar-product-${discount.value}` : `avatar-${discount.value ?? index}` }, this.products && this.getCheckpointContent(discount)), this.products && discount.type === DiscountType.FREE_PRODUCT && this.renderTooltip(discount), h("div", { class: `s-conditional-offer-checkpoint-label ${isActive ? "active" : ""}`, innerHTML: this.getOfferType(discount) }))
|
|
129
147
|
] :
|
|
130
148
|
h("div", { key: "label", class: { "s-conditional-offer-checkpoint-label": true, "first-checkpoint": index === 0, active: isActive }, innerHTML: this.getOfferType(discount) })));
|
|
131
149
|
}
|
|
@@ -152,7 +170,7 @@ function defineCustomElement$1() {
|
|
|
152
170
|
if (typeof customElements === "undefined") {
|
|
153
171
|
return;
|
|
154
172
|
}
|
|
155
|
-
const components = ["salla-conditional-offer", "salla-skeleton"];
|
|
173
|
+
const components = ["salla-conditional-offer", "salla-skeleton", "salla-tooltip"];
|
|
156
174
|
components.forEach(tagName => { switch (tagName) {
|
|
157
175
|
case "salla-conditional-offer":
|
|
158
176
|
if (!customElements.get(tagName)) {
|
|
@@ -160,6 +178,11 @@ function defineCustomElement$1() {
|
|
|
160
178
|
}
|
|
161
179
|
break;
|
|
162
180
|
case "salla-skeleton":
|
|
181
|
+
if (!customElements.get(tagName)) {
|
|
182
|
+
defineCustomElement$3();
|
|
183
|
+
}
|
|
184
|
+
break;
|
|
185
|
+
case "salla-tooltip":
|
|
163
186
|
if (!customElements.get(tagName)) {
|
|
164
187
|
defineCustomElement$2();
|
|
165
188
|
}
|
|
@@ -93,14 +93,27 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
|
|
|
93
93
|
this.productID = product_id;
|
|
94
94
|
//TODO:: make sure there is only one offer
|
|
95
95
|
this.hasError = false;
|
|
96
|
-
this.modal.
|
|
96
|
+
this.modal.loading(); // Reset loading state for subsequent opens
|
|
97
97
|
return await salla.api.withoutNotifier(() => salla.product.offers(product_id))
|
|
98
|
-
.then(response =>
|
|
98
|
+
.then(response => {
|
|
99
|
+
// Check if there are offers before opening the modal
|
|
100
|
+
if (!response.data || !response.data.length) {
|
|
101
|
+
return; // Don't open modal if no offers
|
|
102
|
+
}
|
|
103
|
+
this.modal.open();
|
|
104
|
+
this.showOffer(response.data[0]);
|
|
105
|
+
})
|
|
99
106
|
.catch(e => {
|
|
100
107
|
this.hasError = true;
|
|
101
108
|
this.errorMessage = e.response?.data?.error?.message || e.response?.data;
|
|
109
|
+
this.modal.open(); // Open modal to show error
|
|
102
110
|
})
|
|
103
|
-
.finally(() =>
|
|
111
|
+
.finally(() => {
|
|
112
|
+
// Only stop loading if modal was opened (either for offers or errors)
|
|
113
|
+
if (this.modal.visible) {
|
|
114
|
+
setTimeout(() => this.modal.stopLoading(), 1000);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
104
117
|
}
|
|
105
118
|
/**
|
|
106
119
|
* Show offer details
|
|
@@ -205,7 +218,7 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
|
|
|
205
218
|
// '</div>';
|
|
206
219
|
// }
|
|
207
220
|
render() {
|
|
208
|
-
return h("salla-modal", { key: '
|
|
221
|
+
return h("salla-modal", { key: '630ede1c6ac0df4aa55bd36597eb846df901d94e', "has-skeleton": true, "sub-title": this.offer_message, ref: modal => this.modal = modal, isLoading: true, class: `s-offer-modal-type-${this.offer_type ? this.offer_type : ''}` }, h("div", { key: 'd467615c5aaefc38cec4e40e4e5a7282466937d3', slot: 'loading' }, h("div", { key: 'ff17d657a94dcfe8d744e1317d8f73cab6063d11', class: "s-offer-modal-skeleton" }, h("div", { key: '81bf28f2785c0beb1ef1d4997ce064983e2211ec', class: "s-offer-modal-skeleton-header" }, h("salla-skeleton", { key: 'acd8aa8be556821b4039d1b5fb6e46ef4155ac67', type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { key: '0c6855f5423a5e5bf1caf54da4f608b95b7d3f08', height: '15px', width: '50%' }), h("salla-skeleton", { key: 'e313bac8052684ede353852821a51befb73f52b7', height: '10px', width: '30%' })), h("div", { key: '4c6a675e9c07e8e2986debd8dbecc346890ce0ca', class: "s-offer-modal-skeleton-items" }, [...Array(3)].map(() => h("div", { class: "s-offer-modal-skeleton-item" }, h("salla-skeleton", { height: '9rem' }), h("div", { class: "s-offer-modal-skeleton-item-title" }, h("salla-skeleton", { height: '15px', width: '100%' })), h("div", { class: "s-offer-modal-skeleton-item-subtitle" }, h("salla-skeleton", { height: '9px', width: '50%' }), h("div", { innerHTML: Cart2 }))))), h("div", { key: '226951e15be9aede559c4d24ba6f6690fac80e13', class: "s-offer-modal-skeleton-footer" }, h("salla-skeleton", { key: '86ae2c54c01b3e58fd31729bc6d263dfa078f7ba', height: '15px', width: '50%' }), h("salla-skeleton", { key: '32f30f4f5bb11405901359267ab6311604f352ed', height: '15px', width: '30%' })))), !this.hasError && this.offer !== null
|
|
209
222
|
? [h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }), this.getOfferContent(), h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
|
|
210
223
|
h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
|
|
211
224
|
: '', h("label", { class: "s-offer-modal-remember-label" }, h("input", { type: "checkbox", onChange: e => this.rememberMe(e), class: "s-offer-modal-remember-input" }), "\u00A0 ", salla.lang.get('common.elements.remember_my_choice'))),
|
|
@@ -174,7 +174,8 @@ const SallaScopees = /*@__PURE__*/ proxyCustomElement(class SallaScopees extends
|
|
|
174
174
|
this.placeholderContent()
|
|
175
175
|
: this.mode === ModeType.DEFAULT ? this.defaultContent() : this.availabilityContent())])));
|
|
176
176
|
}
|
|
177
|
-
componentDidLoad() {
|
|
177
|
+
async componentDidLoad() {
|
|
178
|
+
await Salla.hooks.registerComponent('salla-scopes', this);
|
|
178
179
|
if (!this.isOpenedBefore && this.selection == 'mandatory') {
|
|
179
180
|
this.open();
|
|
180
181
|
}
|
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
5
5
|
|
|
6
|
-
const sallaTooltipCss = ".s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:\"\";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}";
|
|
6
|
+
const sallaTooltipCss = ".s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:\"\";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}.s-tooltip-item--dark{background-color:#555555;color:white;padding:5px 15px;border-radius:8px;font-size:12px;font-weight:normal;max-width:330px;width:max-content}.s-tooltip-item--dark::after{border-color:#555555 transparent transparent transparent}";
|
|
7
7
|
|
|
8
8
|
const SallaTooltip = /*@__PURE__*/ proxyCustomElement(class SallaTooltip extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
10
10
|
super();
|
|
11
11
|
this.__registerHost();
|
|
12
|
+
/**
|
|
13
|
+
* The theme of the tooltip (default, dark)
|
|
14
|
+
*/
|
|
15
|
+
this.theme = 'default';
|
|
12
16
|
this.show = false;
|
|
13
17
|
this.targetElement = null;
|
|
14
18
|
}
|
|
@@ -27,13 +31,15 @@ const SallaTooltip = /*@__PURE__*/ proxyCustomElement(class SallaTooltip extends
|
|
|
27
31
|
this.targetElement = document.getElementById(this.targetId);
|
|
28
32
|
}
|
|
29
33
|
render() {
|
|
30
|
-
|
|
34
|
+
const validTheme = ['default', 'dark'].includes(this.theme) ? this.theme : 'default';
|
|
35
|
+
return (h("div", { key: '2c7bc2a1100ae31bb86f278c31b540f077384376', class: "s-tooltip-container" }, h("div", { key: '8869153f4eea6404d5ba8666e26b6d0c23cd4e76', class: `s-tooltip-item s-tooltip-item--${validTheme}`, style: { display: this.show ? 'block' : 'none' } }, this.text ? h("span", null, this.text) : h("slot", null))));
|
|
31
36
|
}
|
|
32
37
|
get el() { return this; }
|
|
33
38
|
static get style() { return sallaTooltipCss; }
|
|
34
39
|
}, [4, "salla-tooltip", {
|
|
35
40
|
"text": [1],
|
|
36
41
|
"targetId": [1, "target-id"],
|
|
42
|
+
"theme": [1],
|
|
37
43
|
"show": [32]
|
|
38
44
|
}, [[9, "mouseover", "handleMouseOver"], [9, "mouseout", "handleMouseOut"]]]);
|
|
39
45
|
function defineCustomElement() {
|
|
@@ -83,7 +83,7 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
83
83
|
await salla.profile.delete().finally(() => this.confirmationModal.close());
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
86
|
+
return (h(Host, { key: '85b2fe2739f6ac3c55939d3cb9c87fc404413e7f', class: "s-user-settings-wrapper" }, this.canHideName && h("div", { key: 'e46be8b9cb4898c9b676ee67f0750bb654bda953', class: "s-user-settings-section" }, h("salla-list-tile", { key: '48f81d5a9b511c2a8baabab2aab6ad3dcfb98370' }, h("div", { key: '9009c4d612aea7e7a6834b90f38d03d8c95bcc84', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '03f209e6e1e1adbdb130f9b80aed30f0618dd58c', innerHTML: UserCancel })), h("div", { key: 'fb02ca2387806135ac3f074f0a9f30ce4bb325ca', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: '1ddbd1144a59745bf26f4650eb5d050a34d42e8f', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '0ff6163a407a53ff100c8d3235212c167dbb006a', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: '03b817a0bea880c9a2e056d4d8f0fb737dc0e5da', class: "s-toggle" }, h("input", { key: 'fcb56427c6d1ae503abdc768358e9ecfa9139dac', class: "s-toggle-input", checked: this.isHiddenName, onChange: (e) => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: 'ff312279ede50b86446d1305217053942d05a603', class: "s-toggle-switcher" }))))), h("div", { key: '08cf0045a6f96ae7046d9a7c640e53a5b2cec7dc', class: "s-user-settings-section" }, h("salla-list-tile", { key: '1ccbcd93cf4cef91693603b5b05dbc4f3b85dc65' }, h("div", { key: 'bf5270f2d2cae798463ab9516c11321e96c461ff', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '3bc3927296faa253a8b91710049eca3372fb24aa', innerHTML: Bullhorn })), h("div", { key: '60ddca373590545a7fd03498e4ff7306a23b05a9', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: '874e81d5e4727160a85bb3381fdfadcd65e774c0', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: '6d2aacf7a72c4d25163913eccbb0a3e94595ec75', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: 'cf58459624592b34083afe61a0afc29dea03864e', class: "s-toggle" }, h("input", { key: 'b854ce4ca8224c8200623aad0dea4c659d89dee1', class: "s-toggle-input", checked: this.isNotifiable, onChange: (e) => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '785a5765e36056629a23ca53e48715f91c14ee1f', class: "s-toggle-switcher" }))))), h("div", { key: '9f58724a8d748809b39874efaa861643a78076eb', class: "s-user-settings-section s-user-settings-section-deactivate-user" }, h("salla-list-tile", { key: '12a69027f2822b6fa1e8fb641278932fc2206335' }, h("div", { key: '679eec74598612167c77443e5f6977991b333fd7', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '0263f8f31ad3e4ca60f2bb4bae910c143f2d36a8', innerHTML: UserOff })), h("div", { key: '6c0c17dfbcbb48ae3882b07b58fb0d1245a28cdb', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), h("div", { key: '07389c3b86b3d8e821b8b9c33cf43de1ee6527db', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), h("div", { key: 'e98736162d465c0717550eb8231b120acfafc4f6', slot: 'action', class: "s-user-settings-section-action" }, h("salla-button", { key: 'd29c5023b3a35f95c94a06dc87f0e2504b3a6390', fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount))))), h("salla-modal", { key: '6f23ca61fe62de261e7d2f616a4d5bf13fba1577', width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => this.confirmationModal = modal }, h("span", { key: '89073dfc15d4a1349618180c776968012e843556', slot: 'icon', class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), h("div", { key: 'f464a56ab783c4ddd51cc40e4d4dbf2f4ae21be2', class: "s-user-settings-confirmation" }, h("div", { key: 'e9921faaf8718ba51937006360b11d409bde4e05', class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), h("div", { key: '4a71df323e6fa2b86cb85e77af438a51e9c1c5a9', class: "s-user-settings-confirmation-actions" }, h("salla-button", { key: '156249d17bdcc25b7c586af416001ec60e8b0f5b', width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), h("salla-button", { key: 'acbe44c04f77f8ccdcaeb90bfb731de399f88fc7', fill: 'outline', loading: this.buttonLoading, width: "wide", onClick: () => this.deleteAccount() }, this.capitalizeText(this.deactivateAccount)))))));
|
|
87
87
|
}
|
|
88
88
|
static get style() { return sallaUserSettingsCss; }
|
|
89
89
|
}, [0, "salla-user-settings", {
|