@salla.sa/twilight-components 2.14.396 → 2.14.398
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--eaDMl7y.js → filepond-D6evTn7d.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Bzu6Vt-X.js → filepond-plugin-file-poster-D0vznOH1.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-Ub_sOKAF.js → filepond-plugin-file-validate-size-97CRY1wF.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-3DherKXx.js → filepond-plugin-file-validate-type-CLx6QUF6.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BdtV1wyD.js → filepond-plugin-image-edit-BeK8pChe.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C5dSiQ0v.js → filepond-plugin-image-exif-orientation-B0jee7fw.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CazMN__p.js → filepond-plugin-image-preview-7GdmfopF.js} +1 -1
- package/dist/cjs/{index-D53_q3EG.js → index-Bxfgg1H6.js} +1 -1
- package/dist/cjs/{index-DjB1fbHm.js → index-s4nApfs8.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_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-bullet-delivery.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-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-map.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 +8 -2
- package/dist/cjs/salla-offer.cjs.entry.js +26 -4
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card.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 +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/cjs/{vanilla-picker-B6SlFf8N.js → vanilla-picker-C_OrMjYl.js} +1 -1
- package/dist/collection/components/salla-offer/salla-offer.js +25 -3
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +7 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-offer-modal.js +7 -1
- package/dist/components/salla-offer.js +25 -3
- package/dist/esm/{filepond-B0f66JOy.js → filepond-BeIH1Ut4.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CMK74s0v.js → filepond-plugin-file-poster-DWt07uFg.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DHAPxF9Y.js → filepond-plugin-file-validate-size-CPvhrS1P.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-2OXNr5nG.js → filepond-plugin-file-validate-type-C-Bc6V2n.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DQo2yk4F.js → filepond-plugin-image-edit-D1WmeuFv.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BoHI8HuD.js → filepond-plugin-image-exif-orientation-C5VnM3kS.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CasnSUaE.js → filepond-plugin-image-preview-BzWoVBdT.js} +1 -1
- package/dist/esm/{index-5Ukk6AXG.js → index-C-E3J9C4.js} +2 -2
- package/dist/esm/{index-CoEnP6re.js → index-D6SiODuz.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_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-bullet-delivery.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-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-map.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 +8 -2
- package/dist/esm/salla-offer.entry.js +26 -4
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card.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 +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/esm/{vanilla-picker-Dsyxt_RC.js → vanilla-picker-my-WfAgm.js} +1 -1
- package/dist/twilight/{p-416c7036.entry.js → p-00c787ee.entry.js} +1 -1
- package/dist/twilight/{p-e10079a8.entry.js → p-016b3c17.entry.js} +1 -1
- package/dist/twilight/{p-c67bb2a5.entry.js → p-021ead4e.entry.js} +1 -1
- package/dist/twilight/{p-78dcf931.entry.js → p-0621b936.entry.js} +1 -1
- package/dist/twilight/{p-a91f49f1.entry.js → p-10abfdfc.entry.js} +1 -1
- package/dist/twilight/{p-80fa5afb.entry.js → p-134a177f.entry.js} +1 -1
- package/dist/twilight/{p-4c05b868.entry.js → p-18325320.entry.js} +1 -1
- package/dist/twilight/{p-63e52e23.entry.js → p-19c66129.entry.js} +1 -1
- package/dist/twilight/{p-77462b4c.entry.js → p-1de5f042.entry.js} +1 -1
- package/dist/twilight/{p-2a2c1934.entry.js → p-1f26a474.entry.js} +1 -1
- package/dist/twilight/{p-016aab09.entry.js → p-2026d692.entry.js} +1 -1
- package/dist/twilight/{p-89f9e09a.entry.js → p-202e852f.entry.js} +1 -1
- package/dist/twilight/{p-7c90baa3.entry.js → p-269e6faf.entry.js} +1 -1
- package/dist/twilight/{p-e7f24388.entry.js → p-27dd1541.entry.js} +1 -1
- package/dist/twilight/{p-e2d02f50.entry.js → p-2a186ed6.entry.js} +1 -1
- package/dist/twilight/{p-cff91454.entry.js → p-2c9c3c11.entry.js} +1 -1
- package/dist/twilight/{p-c17eb48a.entry.js → p-2d943645.entry.js} +1 -1
- package/dist/twilight/{p-6d183e79.entry.js → p-2ec515d6.entry.js} +1 -1
- package/dist/twilight/{p-f8ec12b9.entry.js → p-3497bf2f.entry.js} +1 -1
- package/dist/twilight/{p-49d2f954.entry.js → p-352ecd35.entry.js} +1 -1
- package/dist/twilight/{p-ae06a21d.entry.js → p-353f59b2.entry.js} +1 -1
- package/dist/twilight/{p-0c9809e0.entry.js → p-37fef43a.entry.js} +1 -1
- package/dist/twilight/{p-e0851059.entry.js → p-386275cd.entry.js} +1 -1
- package/dist/twilight/{p-59d15a66.entry.js → p-410fbc40.entry.js} +1 -1
- package/dist/twilight/{p-a639aa86.entry.js → p-4eb1d821.entry.js} +1 -1
- package/dist/twilight/{p-086ca2d0.entry.js → p-522c3cd9.entry.js} +1 -1
- package/dist/twilight/{p-94937926.entry.js → p-52852ef6.entry.js} +1 -1
- package/dist/twilight/{p-6befa92d.entry.js → p-57ec6837.entry.js} +1 -1
- package/dist/twilight/{p-b7c385e4.entry.js → p-5831e292.entry.js} +1 -1
- package/dist/twilight/{p-24515d59.entry.js → p-65102c4f.entry.js} +1 -1
- package/dist/twilight/{p-3658e24b.entry.js → p-6782f748.entry.js} +1 -1
- package/dist/twilight/{p-cec496a9.entry.js → p-7063010f.entry.js} +1 -1
- package/dist/twilight/{p-dfc95a89.entry.js → p-77cb590d.entry.js} +1 -1
- package/dist/twilight/{p-f2923bb7.entry.js → p-7e736f58.entry.js} +1 -1
- package/dist/twilight/{p-a454d0f3.entry.js → p-86246223.entry.js} +1 -1
- package/dist/twilight/{p-e655ab37.entry.js → p-86ba4758.entry.js} +1 -1
- package/dist/twilight/{p-dccd5f21.entry.js → p-87b0a407.entry.js} +1 -1
- package/dist/twilight/{p-6cab5fe3.entry.js → p-8c90f30e.entry.js} +1 -1
- package/dist/twilight/{p-be608838.entry.js → p-8cc72d8f.entry.js} +1 -1
- package/dist/twilight/{p-d69811b1.entry.js → p-9042c1f7.entry.js} +1 -1
- package/dist/twilight/{p-ffab1808.entry.js → p-95f60300.entry.js} +1 -1
- package/dist/twilight/{p-93a47224.entry.js → p-9889e65a.entry.js} +1 -1
- package/dist/twilight/{p-A3tHV2wb.js → p-B1wxFk13.js} +1 -1
- package/dist/twilight/{p-C4e80CBy.js → p-BVl6j5LD.js} +1 -1
- package/dist/twilight/{p-BioPQy2X.js → p-BsrBbPHz.js} +1 -1
- package/dist/twilight/{p-5Ukk6AXG.js → p-C-E3J9C4.js} +1 -1
- package/dist/twilight/{p-K7wyZucF.js → p-DLdNKfUI.js} +1 -1
- package/dist/twilight/{p-B62srIHZ.js → p-DOqzRPJO.js} +1 -1
- package/dist/twilight/{p-BlPAvwSA.js → p-DaqOwAm6.js} +1 -1
- package/dist/twilight/{p-BLMOqwWX.js → p-DzeW_j_u.js} +1 -1
- package/dist/twilight/{p-BgqCVS-Q.js → p-RcZ40OwB.js} +1 -1
- package/dist/twilight/{p-3d468a50.entry.js → p-a204a0e9.entry.js} +1 -1
- package/dist/twilight/{p-ef657fcb.entry.js → p-ad74c855.entry.js} +1 -1
- package/dist/twilight/{p-01a7c6fa.entry.js → p-aecbe626.entry.js} +1 -1
- package/dist/twilight/{p-d0c32e76.entry.js → p-b13f7eec.entry.js} +1 -1
- package/dist/twilight/{p-50190eac.entry.js → p-b2d79753.entry.js} +1 -1
- package/dist/twilight/{p-19296437.entry.js → p-b5ad3e9e.entry.js} +1 -1
- package/dist/twilight/{p-ea1d2cb2.entry.js → p-bb519a59.entry.js} +1 -1
- package/dist/twilight/{p-34191f21.entry.js → p-bb9db712.entry.js} +1 -1
- package/dist/twilight/{p-20de7349.entry.js → p-bd013a67.entry.js} +1 -1
- package/dist/twilight/{p-122ba5b4.entry.js → p-c1d29503.entry.js} +1 -1
- package/dist/twilight/{p-8dedeeac.entry.js → p-c204d69d.entry.js} +1 -1
- package/dist/twilight/{p-dd311ef0.entry.js → p-c339fea6.entry.js} +1 -1
- package/dist/twilight/{p-dfa6ff37.entry.js → p-c9cd8f05.entry.js} +1 -1
- package/dist/twilight/{p-75dc285c.entry.js → p-ca616c27.entry.js} +1 -1
- package/dist/twilight/p-cc90b728.entry.js +4 -0
- package/dist/twilight/{p-86a5cbf5.entry.js → p-cce5e7b1.entry.js} +1 -1
- package/dist/twilight/{p-5ee0ea47.entry.js → p-cf17e7a0.entry.js} +1 -1
- package/dist/twilight/{p-18292248.entry.js → p-d0280d84.entry.js} +1 -1
- package/dist/twilight/{p-927ba1c4.entry.js → p-d202e585.entry.js} +1 -1
- package/dist/twilight/{p-8b27904b.entry.js → p-d5aa8d62.entry.js} +1 -1
- package/dist/twilight/{p-ec4ebce6.entry.js → p-e13007af.entry.js} +1 -1
- package/dist/twilight/{p-d015fcf5.entry.js → p-e529a4a2.entry.js} +1 -1
- package/dist/twilight/{p-fe526213.entry.js → p-e6febfb8.entry.js} +1 -1
- package/dist/twilight/{p-85321251.entry.js → p-eb0184a3.entry.js} +1 -1
- package/dist/twilight/{p-f6a74c33.entry.js → p-ec4ac514.entry.js} +1 -1
- package/dist/twilight/{p-ae2b376f.entry.js → p-ef33d7a7.entry.js} +1 -1
- package/dist/twilight/{p-e74e77b8.entry.js → p-f04c9971.entry.js} +1 -1
- package/dist/twilight/{p-3f82e437.entry.js → p-f1874993.entry.js} +1 -1
- package/dist/twilight/{p-7aae8fcd.entry.js → p-f24aea00.entry.js} +1 -1
- package/dist/twilight/{p-cb0eeb02.entry.js → p-f29d385d.entry.js} +1 -1
- package/dist/twilight/{p-79cb488c.entry.js → p-f3a9ad1a.entry.js} +1 -1
- package/dist/twilight/p-f5340479.entry.js +4 -0
- package/dist/twilight/{p-1cbebced.entry.js → p-f5beb7b4.entry.js} +1 -1
- package/dist/twilight/{p-B0PVo-WB.js → p-oaeiWL7_.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-offer/interfaces.d.ts +6 -1
- package/dist/types/components/salla-offer/salla-offer.d.ts +1 -0
- package/dist/types/components/salla-offer-modal/offer-schema.d.ts +6 -0
- package/package.json +5 -5
- package/dist/twilight/p-2a052235.entry.js +0 -4
- package/dist/twilight/p-bf164ff3.entry.js +0 -4
|
@@ -132,6 +132,9 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
|
|
|
132
132
|
else if (this.offer.get.categories?.length) {
|
|
133
133
|
this.offer_type = 'categories';
|
|
134
134
|
}
|
|
135
|
+
else if (this.offer.get.brands?.length) {
|
|
136
|
+
this.offer_type = 'brands';
|
|
137
|
+
}
|
|
135
138
|
this.modal.setTitle(this.offer_name);
|
|
136
139
|
this.emitPromotionViewed(this.offer);
|
|
137
140
|
}
|
|
@@ -201,6 +204,9 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
|
|
|
201
204
|
.replace(/\{name\}/g, category.name)
|
|
202
205
|
.replace(/\{url\}/g, category.urls.customer) }))));
|
|
203
206
|
}
|
|
207
|
+
else if (this.offer.get.brands?.length) {
|
|
208
|
+
return h("salla-slider", { type: "carousel", class: { "s-offer-modal-slider-centered": this.offer.get.brands?.length <= 2, "s-offer-modal-slider": true }, id: "offer-modal-slider", "controls-outer": true, "show-controls": this.offer.get.brands?.length <= 2 ? 'false' : 'true' }, h("div", { slot: 'items' }, this.offer.get.brands.map((brand) => h("a", { href: brand.url || salla.url.create('brands', brand.id), class: "s-offer-modal-badge s-offer-modal-slider-item s-offer-modal-brand-item" }, h("div", { class: "s-offer-modal-brand-logo" }, h("img", { src: brand.logo, alt: brand.name })), h("span", { class: "s-offer-modal-badge-text" }, brand.name)))));
|
|
209
|
+
}
|
|
204
210
|
}
|
|
205
211
|
//todo:: pass event then use sallaButton from it
|
|
206
212
|
// private addItem() {
|
|
@@ -218,7 +224,7 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
|
|
|
218
224
|
// '</div>';
|
|
219
225
|
// }
|
|
220
226
|
render() {
|
|
221
|
-
return h("salla-modal", { key: '
|
|
227
|
+
return h("salla-modal", { key: '897f81ff7d0b0415075cd0a5d546b1dccb67916f', "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: '3b6909ea6be039e857ec72e1b58e92296fa7112a', slot: 'loading' }, h("div", { key: '297819c01b8aa686ea23aa2a3c7b652329e53831', class: "s-offer-modal-skeleton" }, h("div", { key: '28445bb4ee235498777153083e9538646ac9090a', class: "s-offer-modal-skeleton-header" }, h("salla-skeleton", { key: '1e1b263a489b431cf72fcccd7ce9b104ee1c14b5', type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { key: 'e0741d35d28615f4a24988a1896239ee46a574a7', height: '15px', width: '50%' }), h("salla-skeleton", { key: 'ff6bbd049888bf003fce59045df80df81f65df73', height: '10px', width: '30%' })), h("div", { key: 'ef5a6f218efacf3534828a7612a01ff9fcf13589', 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: '2eda217eeb9c8e1b3019f3cee8790b56ed57e245', class: "s-offer-modal-skeleton-footer" }, h("salla-skeleton", { key: 'eb05f2002be23602919b118d7b8f3c0d355fadec', height: '15px', width: '50%' }), h("salla-skeleton", { key: '7350610c6b4b48b5bb8de0d674555c3001b14909', height: '15px', width: '30%' })))), !this.hasError && this.offer !== null
|
|
222
228
|
? [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 ?
|
|
223
229
|
h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
|
|
224
230
|
: '', 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'))),
|
|
@@ -195,6 +195,9 @@ const SallaOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaOffer extends H
|
|
|
195
195
|
if ((details.apply_to === 'product' || details.apply_to === 'products') && details.targets) {
|
|
196
196
|
details.products = details.targets.map(id => allProducts[id]).filter(Boolean);
|
|
197
197
|
}
|
|
198
|
+
if (details.apply_to === 'brand' && details.targets) {
|
|
199
|
+
details.brands = details.targets;
|
|
200
|
+
}
|
|
198
201
|
if (offer.type === OfferType.BuyXGetY && details.get) {
|
|
199
202
|
const getY = details.get;
|
|
200
203
|
if (getY.source === 'products' && getY.source_value) {
|
|
@@ -315,7 +318,7 @@ const SallaOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaOffer extends H
|
|
|
315
318
|
const products = this.getOfferProducts(offer);
|
|
316
319
|
const hasProducts = products && products.length > 0;
|
|
317
320
|
const isCollapsed = this.collapsedOffers[offer.id] !== false; // Default to collapsed
|
|
318
|
-
return (h("div", { class: "s-offer-drawer-card" }, h("div", { class: "s-offer-card-main", onClick: () => this.emitPromotionClicked(offer, position) }, h("div", { class: "s-offer-card-icon" }, this.getOfferIcon(offer.type)), h("div", { class: "s-offer-card-content" }, h("h3", { class: "s-offer-card-title", title: offer.title }, offer.title), offer.description && h("p", { class: "s-offer-card-description" }, offer.description), offer.type === OfferType.DiscountsTable ? (h("div", { class: "s-offer-card-details" }, this.renderDiscountTableOfferContent(offer))) : (offer.type === OfferType.PercentageOrFixed || offer.type === OfferType.Percentage || offer.type === OfferType.FixedAmount) ? (h("div", { class: "s-offer-card-details" }, this.renderPercentageOrFixedOfferContent(offer), this.renderOfferCategories(offer))) : (h("div", { class: "s-offer-card-details" }, this.renderOfferCategories(offer))))), hasProducts && (h("salla-accordion", { collapsed: isCollapsed, collapsible: true, size: "sm", onClick: (e) => e.stopPropagation(), onAccordionToggle: (e) => this.handleAccordionToggle(offer.id, e.detail.payload.collapsed) }, h("salla-accordion-head", { collapsible: true, collapsed: isCollapsed }, h("div", { slot: "title", class: "s-offer-products-thumbnails" }, h("span", { class: "s-offer-products-title" }, this.products_link_text, h("i", { class: `sicon-keyboard_arrow_${isCollapsed ? 'down' : 'up'} s-offer-products-link-icon` })), h("div", { class: "s-offer-products-thumbnails-stack" }, products.slice(0, 3).map((product, index) => (h("div", { class: "s-offer-product-thumbnail", style: { zIndex: `${index + 1}` } }, h("img", { src: product.thumbnail || product.image?.url || salla.url.cdn('images/s-empty.png'), alt: product.name })))), products.length > 3 && (h("div", { class: "s-offer-products-more-count", style: { zIndex: '7' } }, "+", products.length - 3))))), h("salla-accordion-body", null, h("div", { class: "s-offer-products-content" }, h("salla-products-list", { source: "selected", "source-value": JSON.stringify(products.map(p => p.id)), "product-card-component": this.productCardComponent, "horizontal-cards": true, "compact-cards": true, includes: ["images"] })))))));
|
|
321
|
+
return (h("div", { class: "s-offer-drawer-card" }, h("div", { class: "s-offer-card-main", onClick: () => this.emitPromotionClicked(offer, position) }, h("div", { class: "s-offer-card-icon" }, this.getOfferIcon(offer.type)), h("div", { class: "s-offer-card-content" }, h("h3", { class: "s-offer-card-title", title: offer.title }, offer.title), offer.description && h("p", { class: "s-offer-card-description" }, offer.description), offer.type === OfferType.DiscountsTable ? (h("div", { class: "s-offer-card-details" }, this.renderDiscountTableOfferContent(offer))) : (offer.type === OfferType.PercentageOrFixed || offer.type === OfferType.Percentage || offer.type === OfferType.FixedAmount) ? (h("div", { class: "s-offer-card-details" }, this.renderPercentageOrFixedOfferContent(offer), this.renderOfferCategories(offer), this.renderOfferBrands(offer))) : (h("div", { class: "s-offer-card-details" }, this.renderOfferCategories(offer), this.renderOfferBrands(offer))))), hasProducts && (h("salla-accordion", { collapsed: isCollapsed, collapsible: true, size: "sm", onClick: (e) => e.stopPropagation(), onAccordionToggle: (e) => this.handleAccordionToggle(offer.id, e.detail.payload.collapsed) }, h("salla-accordion-head", { collapsible: true, collapsed: isCollapsed }, h("div", { slot: "title", class: "s-offer-products-thumbnails" }, h("span", { class: "s-offer-products-title" }, this.products_link_text, h("i", { class: `sicon-keyboard_arrow_${isCollapsed ? 'down' : 'up'} s-offer-products-link-icon` })), h("div", { class: "s-offer-products-thumbnails-stack" }, products.slice(0, 3).map((product, index) => (h("div", { class: "s-offer-product-thumbnail", style: { zIndex: `${index + 1}` } }, h("img", { src: product.thumbnail || product.image?.url || salla.url.cdn('images/s-empty.png'), alt: product.name })))), products.length > 3 && (h("div", { class: "s-offer-products-more-count", style: { zIndex: '7' } }, "+", products.length - 3))))), h("salla-accordion-body", null, h("div", { class: "s-offer-products-content" }, h("salla-products-list", { source: "selected", "source-value": JSON.stringify(products.map(p => p.id)), "product-card-component": this.productCardComponent, "horizontal-cards": true, "compact-cards": true, includes: ["images"] })))))));
|
|
319
322
|
}
|
|
320
323
|
renderOfferCard(offer, position = 1) {
|
|
321
324
|
return (h("div", { class: "s-offer-slide-one-fourth swiper-slide", onClick: () => this.emitPromotionClicked(offer, position) }, h("div", { class: "s-offer-card" }, h("div", { class: "s-offer-card-icon" }, this.getOfferIcon(offer.type)), h("div", { class: "s-offer-card-content" }, h("h3", { class: "s-offer-card-title", title: offer.title }, offer.title), offer.description && h("p", { class: "s-offer-card-description" }, offer.description), h("div", { class: "s-offer-card-details" }, offer.type === OfferType.DiscountsTable
|
|
@@ -323,9 +326,13 @@ const SallaOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaOffer extends H
|
|
|
323
326
|
: (offer.type === OfferType.PercentageOrFixed || offer.type === OfferType.Percentage || offer.type === OfferType.FixedAmount)
|
|
324
327
|
? [
|
|
325
328
|
this.renderPercentageOrFixedOfferContent(offer),
|
|
326
|
-
this.renderOfferCategories(offer)
|
|
329
|
+
this.renderOfferCategories(offer),
|
|
330
|
+
this.renderOfferBrands(offer)
|
|
327
331
|
]
|
|
328
|
-
:
|
|
332
|
+
: [
|
|
333
|
+
this.renderOfferCategories(offer),
|
|
334
|
+
this.renderOfferBrands(offer)
|
|
335
|
+
], this.renderProductsLinkForModalCard(offer, false))))));
|
|
329
336
|
}
|
|
330
337
|
getOfferIcon(offerType) {
|
|
331
338
|
const iconMap = {
|
|
@@ -389,6 +396,21 @@ const SallaOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaOffer extends H
|
|
|
389
396
|
this.toggleCategoryExpansion(offer.id);
|
|
390
397
|
} }, isExpanded ? (h("span", null, h("i", { class: "sicon-keyboard_arrow_up" }), ' ', salla.lang.get('common.elements.hide', 'إخفاء'))) : (h("span", null, salla.lang.get('common.elements.show', 'عرض'), " ", `+${categories.length - maxVisible}`, ' ', h("i", { class: "sicon-keyboard_arrow_down" }))))))));
|
|
391
398
|
}
|
|
399
|
+
renderOfferBrands(offer) {
|
|
400
|
+
const details = offer.details;
|
|
401
|
+
const brands = details.brands || [];
|
|
402
|
+
if (!brands.length)
|
|
403
|
+
return null;
|
|
404
|
+
const maxVisible = 3;
|
|
405
|
+
const isExpanded = this.expandedCategories[offer.id];
|
|
406
|
+
const shouldShowMore = brands.length > maxVisible;
|
|
407
|
+
const visibleBrands = isExpanded ? brands : brands.slice(0, maxVisible);
|
|
408
|
+
return (h("div", { class: "s-offer-categories" }, h("div", { class: "s-offer-categories-list" }, visibleBrands.map((brand, index) => (h("a", { key: index, class: "s-offer-category-item", href: brand.url }, brand.name))), shouldShowMore && (h("span", { class: "s-offer-categories-toggle", onClick: (e) => {
|
|
409
|
+
e.preventDefault();
|
|
410
|
+
e.stopPropagation();
|
|
411
|
+
this.toggleCategoryExpansion(offer.id);
|
|
412
|
+
} }, isExpanded ? (h("span", null, h("i", { class: "sicon-keyboard_arrow_up" }), ' ', salla.lang.get('common.elements.hide', 'إخفاء'))) : (h("span", null, salla.lang.get('common.elements.show', 'عرض'), " ", `+${brands.length - maxVisible}`, ' ', h("i", { class: "sicon-keyboard_arrow_down" }))))))));
|
|
413
|
+
}
|
|
392
414
|
/**
|
|
393
415
|
* Toggle category expansion for a specific offer
|
|
394
416
|
*/
|