@salla.sa/twilight-components 2.14.360 → 2.14.362
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-CKWDtDUb.js → filepond-P1L22XbE.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-2dCMAXPa.js → filepond-plugin-file-poster-UlbHgXAq.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size--yuQCRag.js → filepond-plugin-file-validate-size-DKXahANU.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-C7v_6KQa.js → filepond-plugin-file-validate-type-DtZZQ1i3.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-8QQicvms.js → filepond-plugin-image-edit-BhtrRTGp.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DbUFlH3z.js → filepond-plugin-image-exif-orientation-B61gl4UN.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-B17N1-uQ.js → filepond-plugin-image-preview-BF6G0R6q.js} +1 -1
- package/dist/cjs/{index-CbYvSkwS.js → index-DgFxXzJ_.js} +1 -1
- package/dist/cjs/{index-Bzd4-c5I.js → index-_cJXmKQz.js} +6 -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 +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-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 +74 -0
- 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 +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 +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 +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 +2 -2
- package/dist/cjs/{vanilla-picker-EDhnbSB7.js → vanilla-picker-CEWOqGx6.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +8 -0
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +190 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-cookies-bar.d.ts +11 -0
- package/dist/components/salla-cookies-bar.js +104 -0
- package/dist/esm/{filepond-BwmKAsaM.js → filepond-T-MBWI7u.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-D3K_NYAK.js → filepond-plugin-file-poster-CbcPfGWQ.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BHku0bcb.js → filepond-plugin-file-validate-size-DSnXG2na.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-hd0JIVJJ.js → filepond-plugin-file-validate-type-BjZ4VftS.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CHiH1S6z.js → filepond-plugin-image-edit-EeitPKAi.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CAwtIStk.js → filepond-plugin-image-exif-orientation-l4wHDhla.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-D-h00XLk.js → filepond-plugin-image-preview-B7W4EgCu.js} +1 -1
- package/dist/esm/{index-DBXeIJIL.js → index-5jnzECfn.js} +6 -2
- package/dist/esm/{index-B08vyG5q.js → index-BX9zVfVp.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 +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-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 +72 -0
- 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 +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 +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 +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 +3 -3
- package/dist/esm/{vanilla-picker-BDL54AFE.js → vanilla-picker-CBK9MCtQ.js} +1 -1
- package/dist/twilight/{p-e54dfcca.entry.js → p-0583f31e.entry.js} +1 -1
- package/dist/twilight/{p-a1bdfa51.entry.js → p-0f4cbe40.entry.js} +1 -1
- package/dist/twilight/{p-dec24992.entry.js → p-100eba71.entry.js} +1 -1
- package/dist/twilight/{p-e26c630a.entry.js → p-10c9aabc.entry.js} +1 -1
- package/dist/twilight/{p-2f23542f.entry.js → p-11406736.entry.js} +1 -1
- package/dist/twilight/{p-c317cd73.entry.js → p-138656d9.entry.js} +1 -1
- package/dist/twilight/{p-7a0cb59a.entry.js → p-17e5c57b.entry.js} +1 -1
- package/dist/twilight/p-1GJKMmw_.js +9 -0
- package/dist/twilight/{p-d118f16a.entry.js → p-1ab963d3.entry.js} +1 -1
- package/dist/twilight/{p-0504c1e5.entry.js → p-1b4ba19a.entry.js} +1 -1
- package/dist/twilight/{p-ee2f009e.entry.js → p-1e910afa.entry.js} +1 -1
- package/dist/twilight/{p-3b6a88fd.entry.js → p-21b15a48.entry.js} +1 -1
- package/dist/twilight/{p-ccf8f40d.entry.js → p-26d00e52.entry.js} +1 -1
- package/dist/twilight/{p-0ea768e8.entry.js → p-2b3f7604.entry.js} +1 -1
- package/dist/twilight/{p-124fc831.entry.js → p-2ce418ff.entry.js} +1 -1
- package/dist/twilight/{p-66ccf6f3.entry.js → p-2fb61d7c.entry.js} +1 -1
- package/dist/twilight/{p-e8966aba.entry.js → p-306852d8.entry.js} +1 -1
- package/dist/twilight/{p-ab19537f.entry.js → p-380016a3.entry.js} +1 -1
- package/dist/twilight/{p-fad5a832.entry.js → p-39375221.entry.js} +1 -1
- package/dist/twilight/{p-060ee1b7.entry.js → p-3d8a09bc.entry.js} +1 -1
- package/dist/twilight/{p-c27015c3.entry.js → p-405ff657.entry.js} +1 -1
- package/dist/twilight/{p-2c64d7d2.entry.js → p-40ee772a.entry.js} +1 -1
- package/dist/twilight/{p-de3c8eb9.entry.js → p-44dbd97b.entry.js} +1 -1
- package/dist/twilight/{p-33d4e8b5.entry.js → p-475287b9.entry.js} +1 -1
- package/dist/twilight/{p-560e818a.entry.js → p-487377bf.entry.js} +1 -1
- package/dist/twilight/{p-d45565e4.entry.js → p-4e539dbf.entry.js} +1 -1
- package/dist/twilight/{p-bfe400e6.entry.js → p-50ab610f.entry.js} +1 -1
- package/dist/twilight/{p-5cb2ebab.entry.js → p-535e3bc6.entry.js} +1 -1
- package/dist/twilight/{p-6d376095.entry.js → p-53b7c8a3.entry.js} +1 -1
- package/dist/twilight/{p-DBXeIJIL.js → p-5jnzECfn.js} +1 -1
- package/dist/twilight/{p-e18b25d3.entry.js → p-601a8e4c.entry.js} +1 -1
- package/dist/twilight/{p-ae72fb84.entry.js → p-6c81c97a.entry.js} +1 -1
- package/dist/twilight/{p-206874a5.entry.js → p-70348f84.entry.js} +1 -1
- package/dist/twilight/{p-84bce41f.entry.js → p-718ffc26.entry.js} +1 -1
- package/dist/twilight/{p-95234b45.entry.js → p-7381c693.entry.js} +1 -1
- package/dist/twilight/{p-7fe01af1.entry.js → p-7e188a99.entry.js} +1 -1
- package/dist/twilight/{p-55b45b9d.entry.js → p-8285b1df.entry.js} +1 -1
- package/dist/twilight/{p-1d4eec43.entry.js → p-8410a6aa.entry.js} +1 -1
- package/dist/twilight/{p-3cc27c43.entry.js → p-8413ebc6.entry.js} +1 -1
- package/dist/twilight/{p-473945c4.entry.js → p-86234c0c.entry.js} +1 -1
- package/dist/twilight/{p-40885946.entry.js → p-87a3036f.entry.js} +1 -1
- package/dist/twilight/{p-45e4adc4.entry.js → p-943489a6.entry.js} +1 -1
- package/dist/twilight/{p-4987ca72.entry.js → p-9a57ab41.entry.js} +1 -1
- package/dist/twilight/{p-9a9874ec.entry.js → p-9a7a8a06.entry.js} +1 -1
- package/dist/twilight/{p-CPmsenDm.js → p-BAqE2_0c.js} +1 -1
- package/dist/twilight/{p-C2CpdoUG.js → p-BN_JlVVa.js} +1 -1
- package/dist/twilight/{p-B0vxgMkD.js → p-BQGFkF4P.js} +1 -1
- package/dist/twilight/{p-cqGzS-xJ.js → p-BUIofLge.js} +1 -1
- package/dist/twilight/{p-VMC9YDvn.js → p-BuQ91SGu.js} +1 -1
- package/dist/twilight/{p-DDHq4PsH.js → p-DMtfKbmo.js} +1 -1
- package/dist/twilight/p-DT5bMBxP.js +9 -0
- package/dist/twilight/{p-CKB6mTwH.js → p-DfWJQgx4.js} +1 -1
- package/dist/twilight/{p-2250e40e.entry.js → p-a3e048eb.entry.js} +1 -1
- package/dist/twilight/{p-fee8967c.entry.js → p-a3fc07e6.entry.js} +1 -1
- package/dist/twilight/{p-6e97b2e1.entry.js → p-b5df9774.entry.js} +1 -1
- package/dist/twilight/{p-40863326.entry.js → p-b79400bc.entry.js} +1 -1
- package/dist/twilight/p-b8defbe8.entry.js +4 -0
- package/dist/twilight/{p-6f5e8a46.entry.js → p-cae6a0b9.entry.js} +1 -1
- package/dist/twilight/{p-8e62c720.entry.js → p-cbb0b94d.entry.js} +1 -1
- package/dist/twilight/{p-3dda1080.entry.js → p-cbd68df1.entry.js} +1 -1
- package/dist/twilight/{p-452165b0.entry.js → p-cf2f1bc4.entry.js} +1 -1
- package/dist/twilight/{p-52544c17.entry.js → p-cff993d0.entry.js} +1 -1
- package/dist/twilight/{p-f701a180.entry.js → p-d2973225.entry.js} +1 -1
- package/dist/twilight/{p-994c77a4.entry.js → p-d6071576.entry.js} +1 -1
- package/dist/twilight/{p-9cf5ede2.entry.js → p-d6ba8963.entry.js} +1 -1
- package/dist/twilight/{p-92fca220.entry.js → p-d807e0a8.entry.js} +1 -1
- package/dist/twilight/{p-edf5b8fe.entry.js → p-ddd680ad.entry.js} +1 -1
- package/dist/twilight/{p-e3ca09cc.entry.js → p-ded370ff.entry.js} +1 -1
- package/dist/twilight/{p-17cbc419.entry.js → p-e043bb34.entry.js} +1 -1
- package/dist/twilight/{p-7e7e3cd0.entry.js → p-eb520a53.entry.js} +1 -1
- package/dist/twilight/{p-96da51a2.entry.js → p-f01c79af.entry.js} +1 -1
- package/dist/twilight/{p-7fe76ff7.entry.js → p-f506e6cc.entry.js} +1 -1
- package/dist/twilight/{p-7c2547c8.entry.js → p-f6455648.entry.js} +1 -1
- package/dist/twilight/{p-09628b84.entry.js → p-f68f731d.entry.js} +1 -1
- package/dist/twilight/{p-1f998706.entry.js → p-f988b21f.entry.js} +1 -1
- package/dist/twilight/{p-49944190.entry.js → p-fb596ee6.entry.js} +1 -1
- package/dist/twilight/{p-3f03d862.entry.js → p-fe4903bf.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +39 -0
- package/dist/types/components.d.ts +47 -0
- package/package.json +5 -5
- package/dist/twilight/p-B77qx5ee.js +0 -9
- package/dist/twilight/p-PAJhz07l.js +0 -9
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaCookiesBar extends Components.SallaCookiesBar, HTMLElement {}
|
|
4
|
+
export const SallaCookiesBar: {
|
|
5
|
+
prototype: SallaCookiesBar;
|
|
6
|
+
new (): SallaCookiesBar;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { d as defineCustomElement$2 } from './salla-button2.js';
|
|
6
|
+
|
|
7
|
+
const sallaCookiesBarCss = ":host{display:block;overflow:visible}.s-cookies-bar{box-shadow:0 0 20px 4px rgba(0, 0, 0, 0.15)}";
|
|
8
|
+
|
|
9
|
+
const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
/**
|
|
14
|
+
* Whether the cookies bar is visible.
|
|
15
|
+
*/
|
|
16
|
+
this.isVisible = true;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the viewport is mobile width (updates on resize).
|
|
19
|
+
*/
|
|
20
|
+
this.isMobile = false;
|
|
21
|
+
this.mobileBreakpoint = 768;
|
|
22
|
+
this.mobileQueryHandler = (e) => (this.isMobile = e.matches);
|
|
23
|
+
/**
|
|
24
|
+
* The message displayed in the cookies bar.
|
|
25
|
+
*/
|
|
26
|
+
this.message = 'We use cookies to improve your experience on our site. By continuing to browse, you agree to our use of cookies.';
|
|
27
|
+
}
|
|
28
|
+
componentWillLoad() {
|
|
29
|
+
if (Salla.storage.get('cookies-consent')) {
|
|
30
|
+
this.isVisible = false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
componentDidLoad() {
|
|
34
|
+
this.mobileQuery = window.matchMedia(`(max-width: ${this.mobileBreakpoint - 1}px)`);
|
|
35
|
+
this.isMobile = this.mobileQuery.matches;
|
|
36
|
+
this.mobileQuery.addEventListener('change', this.mobileQueryHandler);
|
|
37
|
+
}
|
|
38
|
+
disconnectedCallback() {
|
|
39
|
+
this.mobileQuery?.removeEventListener('change', this.mobileQueryHandler);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Accept cookies consent.
|
|
43
|
+
*/
|
|
44
|
+
async accept() {
|
|
45
|
+
this.isVisible = false;
|
|
46
|
+
//We will call event first because we need to compare between old and new data inside session
|
|
47
|
+
Salla.event.emit('salla-cookies-bar::accepted');
|
|
48
|
+
Salla.storage.set('cookies-consent', 'accepted');
|
|
49
|
+
return this.host;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Reject cookies consent.
|
|
53
|
+
*/
|
|
54
|
+
async reject() {
|
|
55
|
+
this.isVisible = false;
|
|
56
|
+
//We will call event first because we need to compare between old and new data inside session
|
|
57
|
+
Salla.event.emit('salla-cookies-bar::rejected');
|
|
58
|
+
Salla.storage.set('cookies-consent', 'rejected');
|
|
59
|
+
return this.host;
|
|
60
|
+
}
|
|
61
|
+
isRtl() {
|
|
62
|
+
return Salla.config.get('theme.is_rtl', true);
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
if (!this.isVisible) {
|
|
66
|
+
return h(Host, null);
|
|
67
|
+
}
|
|
68
|
+
return (h(Host, null, h("div", { dir: this.isRtl() ? 'rtl' : 'ltr', class: "s-cookies-bar fixed bottom-0 inset-x-0 z-50 bg-white p-4" }, h("div", { class: "s-cookies-bar-content flex flex-col justify-center gap-6 max-w-screen-xl mx-auto px-4" }, h("p", { class: "s-cookies-bar-message text-sm font-medium leading-relaxed text-gray-500 m-0" }, this.message || Salla.lang.get('blocks.footer.cookies_message')), h("div", { class: "s-cookies-bar-actions flex flex-row gap-2 shrink-0" }, h("salla-button", { class: "s-cookies-bar-btn--accept", color: "primary", fill: "solid", type: "button", size: this.isMobile ? 'small' : 'medium', onClick: () => this.accept() }, this.acceptLabel || Salla.lang.get('blocks.footer.cookies_accept')), h("salla-button", { class: "s-cookies-bar-btn--reject", fill: "outline", type: "button", size: this.isMobile ? 'small' : 'medium', onClick: () => this.reject() }, this.rejectLabel || Salla.lang.get('blocks.footer.cookies_reject')))))));
|
|
69
|
+
}
|
|
70
|
+
get host() { return this; }
|
|
71
|
+
static get style() { return sallaCookiesBarCss; }
|
|
72
|
+
}, [0, "salla-cookies-bar", {
|
|
73
|
+
"message": [1],
|
|
74
|
+
"acceptLabel": [1, "accept-label"],
|
|
75
|
+
"rejectLabel": [1, "reject-label"],
|
|
76
|
+
"isVisible": [32],
|
|
77
|
+
"isMobile": [32],
|
|
78
|
+
"accept": [64],
|
|
79
|
+
"reject": [64]
|
|
80
|
+
}]);
|
|
81
|
+
function defineCustomElement$1() {
|
|
82
|
+
if (typeof customElements === "undefined") {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const components = ["salla-cookies-bar", "salla-button"];
|
|
86
|
+
components.forEach(tagName => { switch (tagName) {
|
|
87
|
+
case "salla-cookies-bar":
|
|
88
|
+
if (!customElements.get(tagName)) {
|
|
89
|
+
customElements.define(tagName, SallaCookiesBar$1);
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
case "salla-button":
|
|
93
|
+
if (!customElements.get(tagName)) {
|
|
94
|
+
defineCustomElement$2();
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
} });
|
|
98
|
+
}
|
|
99
|
+
defineCustomElement$1();
|
|
100
|
+
|
|
101
|
+
const SallaCookiesBar = SallaCookiesBar$1;
|
|
102
|
+
const defineCustomElement = defineCustomElement$1;
|
|
103
|
+
|
|
104
|
+
export { SallaCookiesBar, defineCustomElement };
|