@salla.sa/twilight-components 2.14.272 → 2.14.274
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-EG2Mf8a1.js → filepond-L1nMkdqn.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DjNsnxTw.js → filepond-plugin-file-poster-BYZl5BE2.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BlM1btNO.js → filepond-plugin-file-validate-size-DSrSXg4-.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DhymSoh9.js → filepond-plugin-file-validate-type-CgnsyE2V.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BQfvfpQ1.js → filepond-plugin-image-edit-lODj8ghv.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DOi06s13.js → filepond-plugin-image-exif-orientation-uQ5EYlsy.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Rfix7Xbt.js → filepond-plugin-image-preview-Cm1OgAvZ.js} +1 -1
- package/dist/cjs/{index-DS7mXxWq.js → index-BEeccvkl.js} +136 -26
- package/dist/cjs/{index-vIV5iX-W.js → index-D0NII6ks.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/{salla-add-product-button_51.cjs.entry.js → salla-accordion_62.cjs.entry.js} +2104 -120
- package/dist/cjs/salla-advertisement.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-cart-item-offers.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-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.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-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-notifications.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-accordion_4.cjs.entry.js → salla-order-details-options.cjs.entry.js} +1 -100
- package/dist/cjs/salla-order-details.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +3 -3
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/salla-review-card.cjs.entry.js +2 -2
- package/dist/cjs/salla-reviews-page.cjs.entry.js +2 -2
- package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +3 -4
- package/dist/collection/collection-manifest.json +5 -0
- package/dist/collection/components/salla-accordion/salla-accordion-head.js +8 -2
- package/dist/collection/components/salla-comments/salla-comments.js +20 -1
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +33 -5
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.css +0 -0
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +89 -0
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.css +0 -0
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +195 -0
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.css +3 -0
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +595 -0
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.css +0 -0
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +174 -0
- package/dist/collection/components/salla-multiple-bundle-product/interfaces.js +1 -0
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.css +3 -0
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +132 -0
- package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
- package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
- package/dist/collection/components/salla-payments/salla-payments.js +2 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
- package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
- package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
- package/dist/collection/components/salla-product-options/salla-product-options.js +105 -22
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/collection/components/salla-search/salla-search.js +3 -3
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-slider/salla-slider.js +2 -2
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-accordion-head2.js +2 -2
- package/dist/components/salla-comments.js +20 -1
- package/dist/components/salla-conditional-fields2.js +28 -6
- package/dist/components/salla-multiple-bundle-product-cart.d.ts +11 -0
- package/dist/components/salla-multiple-bundle-product-cart.js +9 -0
- package/dist/components/salla-multiple-bundle-product-cart2.js +153 -0
- package/dist/components/salla-multiple-bundle-product-details.d.ts +11 -0
- package/dist/components/salla-multiple-bundle-product-details.js +9 -0
- package/dist/components/salla-multiple-bundle-product-details2.js +283 -0
- package/dist/components/salla-multiple-bundle-product-options-modal.d.ts +11 -0
- package/dist/components/salla-multiple-bundle-product-options-modal.js +9 -0
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +585 -0
- package/dist/components/salla-multiple-bundle-product-slider.d.ts +11 -0
- package/dist/components/salla-multiple-bundle-product-slider.js +9 -0
- package/dist/components/salla-multiple-bundle-product-slider2.js +81 -0
- package/dist/components/salla-multiple-bundle-product.d.ts +11 -0
- package/dist/components/salla-multiple-bundle-product.js +210 -0
- package/dist/components/salla-notification-item2.js +1 -1
- package/dist/components/salla-offer-modal.js +1 -1
- package/dist/components/salla-order-details.js +1 -1
- package/dist/components/salla-order-summary.js +1 -1
- package/dist/components/salla-payments.js +2 -2
- package/dist/components/salla-placeholder2.js +1 -1
- package/dist/components/salla-price-range2.js +2 -2
- package/dist/components/salla-product-availability2.js +1 -1
- package/dist/components/salla-product-card2.js +5 -5
- package/dist/components/salla-product-options.js +1 -810
- package/dist/{esm/salla-product-options.entry.js → components/salla-product-options2.js} +197 -30
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-quantity-input.js +1 -1
- package/dist/components/salla-quick-buy2.js +1 -1
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-scopes.js +1 -1
- package/dist/components/salla-search.js +3 -3
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-slider2.js +2 -2
- package/dist/components/salla-social-share.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/esm/{filepond-DbR8YXoW.js → filepond-JStnJXdo.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DEj3O3wZ.js → filepond-plugin-file-poster-13kSl6pa.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DYnIp5yF.js → filepond-plugin-file-validate-size-DGYz9wX6.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Cx_PD8SU.js → filepond-plugin-file-validate-type-7M_EeTPs.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BwmXRkmP.js → filepond-plugin-image-edit-C5N0Q0IF.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BtsMS4U-.js → filepond-plugin-image-exif-orientation-BvYJ1LVk.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DQ0c3hIt.js → filepond-plugin-image-preview-P4HnGsSt.js} +1 -1
- package/dist/esm/{index-D5PGwR59.js → index-Bdj1TBK9.js} +136 -26
- package/dist/esm/{index-xiIpq8fU.js → index-CqLymITv.js} +1 -1
- package/dist/esm/loader.js +3 -4
- package/dist/esm/{salla-add-product-button_51.entry.js → salla-accordion_62.entry.js} +2084 -111
- package/dist/esm/salla-advertisement.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-cart-item-offers.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-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-installment.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-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +2 -2
- package/dist/esm/salla-notifications.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-accordion_4.entry.js → salla-order-details-options.entry.js} +2 -98
- package/dist/esm/salla-order-details.entry.js +2 -2
- package/dist/esm/salla-order-summary.entry.js +2 -2
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +3 -3
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/salla-review-card.entry.js +2 -2
- package/dist/esm/salla-reviews-page.entry.js +2 -2
- package/dist/esm/salla-reviews.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.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 -4
- package/dist/twilight/{p-56fa3b9c.entry.js → p-0f8534fd.entry.js} +1 -1
- package/dist/twilight/{p-3f412ab2.entry.js → p-1be88437.entry.js} +1 -1
- package/dist/twilight/{p-10856491.entry.js → p-1d81f143.entry.js} +1 -1
- package/dist/twilight/{p-4611a11b.entry.js → p-282f4f69.entry.js} +1 -1
- package/dist/twilight/{p-9e3f55be.entry.js → p-34e10e96.entry.js} +1 -1
- package/dist/twilight/{p-c15928d5.entry.js → p-3a4137eb.entry.js} +1 -1
- package/dist/twilight/{p-0ffafdea.entry.js → p-456d49c3.entry.js} +1 -1
- package/dist/twilight/{p-a61e2b8e.entry.js → p-4d05539c.entry.js} +1 -1
- package/dist/twilight/{p-e3b0a71f.entry.js → p-550d2b59.entry.js} +1 -1
- package/dist/twilight/{p-de200512.entry.js → p-57629f65.entry.js} +1 -1
- package/dist/twilight/p-5971eca7.entry.js +4 -0
- package/dist/twilight/p-723d7b1b.entry.js +4 -0
- package/dist/twilight/{p-92848d53.entry.js → p-78e6e403.entry.js} +1 -1
- package/dist/twilight/{p-2613f6dc.entry.js → p-895bd462.entry.js} +1 -1
- package/dist/twilight/p-9760fa21.entry.js +4 -0
- package/dist/twilight/{p-C4wd-bXb.js → p-AhRhML1e.js} +1 -1
- package/dist/twilight/{p-Bvez5luh.js → p-BP3jjHyr.js} +1 -1
- package/dist/twilight/{p-D5PGwR59.js → p-Bdj1TBK9.js} +2 -2
- package/dist/twilight/{p-BsHa_73h.js → p-Btn8p1Mk.js} +1 -1
- package/dist/twilight/{p-D0ZZ4jO5.js → p-CDM6fsL2.js} +2 -2
- package/dist/twilight/{p-CH8-uKSN.js → p-Ccp_rmSW.js} +1 -1
- package/dist/twilight/{p-DV_VEuIe.js → p-D6-aDTP4.js} +1 -1
- package/dist/twilight/{p-D5p2t_CX.js → p-DD6CdbcU.js} +1 -1
- package/dist/twilight/{p-DEUne75O.js → p-DYhkBiMu.js} +1 -1
- package/dist/twilight/p-a1e9d695.entry.js +4 -0
- package/dist/twilight/{p-eaad31d1.entry.js → p-a5681537.entry.js} +1 -1
- package/dist/twilight/{p-e95284d7.entry.js → p-a8d01888.entry.js} +1 -1
- package/dist/twilight/p-b254a752.entry.js +4 -0
- package/dist/twilight/{p-eae51196.entry.js → p-bd7a0c4f.entry.js} +1 -1
- package/dist/twilight/{p-7df916fc.entry.js → p-bf90a8c8.entry.js} +1 -1
- package/dist/twilight/p-c293f9c1.entry.js +11 -0
- package/dist/twilight/{p-b94ebbd9.entry.js → p-c9ad0ad1.entry.js} +1 -1
- package/dist/twilight/p-cc93a79e.entry.js +4 -0
- package/dist/twilight/{p-2bf21126.entry.js → p-e825aae4.entry.js} +1 -1
- package/dist/twilight/{p-8ba8efe1.entry.js → p-e99645f0.entry.js} +1 -1
- package/dist/twilight/{p-f3c29342.entry.js → p-f232e683.entry.js} +1 -1
- package/dist/twilight/{p-65b1fcea.entry.js → p-f7784dda.entry.js} +1 -1
- package/dist/twilight/{p-280c1f64.entry.js → p-f85916d5.entry.js} +1 -1
- package/dist/twilight/{p-bcab2639.entry.js → p-f96be282.entry.js} +1 -1
- package/dist/twilight/{p-b40d5871.entry.js → p-faee9d58.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-accordion/salla-accordion-head.d.ts +6 -0
- package/dist/types/components/salla-conditional-fields/salla-conditional-fields.d.ts +2 -0
- package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.d.ts +10 -0
- package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.d.ts +20 -0
- package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.d.ts +46 -0
- package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.d.ts +22 -0
- package/dist/types/components/salla-multiple-bundle-product/interfaces.d.ts +101 -0
- package/dist/types/components/salla-multiple-bundle-product/salla-multiple-bundle-product.d.ts +42 -0
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +21 -1
- package/dist/types/components.d.ts +298 -2
- package/package.json +5 -5
- package/dist/cjs/app-globals-OVEmNa5W.js +0 -38
- package/dist/cjs/camera-DytepEoK.js +0 -13
- package/dist/cjs/minus-CCryh1qf.js +0 -21
- package/dist/cjs/salla-booking-field_2.cjs.entry.js +0 -280
- package/dist/cjs/salla-product-options.cjs.entry.js +0 -715
- package/dist/esm/app-globals-BKgAyoNJ.js +0 -36
- package/dist/esm/camera-C6jIkM-X.js +0 -11
- package/dist/esm/minus-DfeagqF1.js +0 -18
- package/dist/esm/salla-booking-field_2.entry.js +0 -277
- package/dist/twilight/p-19c38b4a.entry.js +0 -11
- package/dist/twilight/p-8272b58f.entry.js +0 -4
- package/dist/twilight/p-989fcbb4.entry.js +0 -4
- package/dist/twilight/p-9f47b72b.entry.js +0 -4
- package/dist/twilight/p-C6jIkM-X.js +0 -4
- package/dist/twilight/p-DfeagqF1.js +0 -4
- package/dist/twilight/p-KHt1Smzh.js +0 -4
- package/dist/twilight/p-b8d41065.entry.js +0 -4
- package/dist/twilight/p-dd9695d6.entry.js +0 -4
- package/dist/twilight/p-e2ebb686.entry.js +0 -4
- package/dist/twilight/p-e30f7c20.entry.js +0 -4
- package/dist/twilight/p-fcb3e719.entry.js +0 -4
|
@@ -120,9 +120,21 @@ export class SallaProductOptions {
|
|
|
120
120
|
async getSelectedOptionsData() {
|
|
121
121
|
const selectedOptions = {};
|
|
122
122
|
const formData = this.host.getElementSallaData();
|
|
123
|
+
// Check if bundleContext is defined as a prop on the component before accessing it
|
|
124
|
+
const contextData = (typeof this.bundleContext !== 'undefined') ? this.bundleContext : null;
|
|
123
125
|
formData.forEach((value, key) => {
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
+
if (contextData) {
|
|
127
|
+
// Handle bundle naming convention: bundle[sectionId][index][options][optionId]
|
|
128
|
+
if (key.startsWith('bundle[') && key.includes('[options][')) {
|
|
129
|
+
const optionId = key.split('[options][')[1].replace(']', '');
|
|
130
|
+
selectedOptions[optionId] = value;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
// Handle standard naming convention: options[optionId]
|
|
135
|
+
if (key.startsWith('options[')) {
|
|
136
|
+
selectedOptions[key.replace('options[', '').replace(']', '')] = value;
|
|
137
|
+
}
|
|
126
138
|
}
|
|
127
139
|
});
|
|
128
140
|
return selectedOptions;
|
|
@@ -298,6 +310,10 @@ export class SallaProductOptions {
|
|
|
298
310
|
if (option.type === DisplayType.SINGLE_OPTION) {
|
|
299
311
|
return this.singleOption(option);
|
|
300
312
|
}
|
|
313
|
+
// Handle radio type as single option for bundle products
|
|
314
|
+
if (option.type === DisplayType.RADIO) {
|
|
315
|
+
return this.radioOption(option);
|
|
316
|
+
}
|
|
301
317
|
if (option.type === DisplayType.DIGITAL_CARD_VALUE) {
|
|
302
318
|
return this.digitalCardValuesOption(option);
|
|
303
319
|
}
|
|
@@ -409,10 +425,47 @@ export class SallaProductOptions {
|
|
|
409
425
|
}
|
|
410
426
|
return (h(Host, { class: "s-product-options-wrapper" }, h("salla-conditional-fields", null, this.optionsData.map((option) => h("div", { key: option.id, class: `s-product-options-option-container${option.visibility_condition || this.hideDigitalCardsOptions(option) ? ' hidden' : ''}`, "data-option-id": option.id, ...this.getOptionShownWhen(option) }, option.name === 'splitter' ?
|
|
411
427
|
this.splitterOption()
|
|
412
|
-
: h("div", { class: { "s-product-options-option": true, "s-product-options-option-booking": option.type === DisplayType.BOOKING && salla.url.is_page("cart") }, "data-option-type": option.type, "data-option-required": `${option.required}` }, h("label", { htmlFor:
|
|
428
|
+
: h("div", { class: { "s-product-options-option": true, "s-product-options-option-booking": option.type === DisplayType.BOOKING && salla.url.is_page("cart") }, "data-option-type": option.type, "data-option-required": `${option.required}` }, h("label", { htmlFor: this.generateInputName(option.id), class: `s-product-options-option-label ${this.hideLabel(option) ? 's-product-options-option-label-hidden' : ''}` }, h("b", null, option.name, option.required && h("span", null, " * "), " "), h("small", null, option.placeholder)), h("div", { class: `s-product-options-option-content ${this.hideLabel(option) || (option.type === DisplayType.BOOKING && salla.url.is_page("cart")) ? 's-product-options-option-content-full-width' : ''}` }, this.getDisplayForType(option))))))));
|
|
413
429
|
}
|
|
414
430
|
generateUniqueKey(defaultValue) {
|
|
415
|
-
|
|
431
|
+
const contextData = this.bundleContext;
|
|
432
|
+
let baseKey = this.uniqueKey ? `${defaultValue}-${this.uniqueKey}` : defaultValue;
|
|
433
|
+
if (contextData) {
|
|
434
|
+
try {
|
|
435
|
+
// Handle both string and object types
|
|
436
|
+
const context = typeof contextData === 'string'
|
|
437
|
+
? JSON.parse(contextData)
|
|
438
|
+
: contextData;
|
|
439
|
+
const { sectionId, productId } = context;
|
|
440
|
+
baseKey = `${baseKey}-bundle-${sectionId}-${productId}`;
|
|
441
|
+
}
|
|
442
|
+
catch (e) {
|
|
443
|
+
// If parsing fails, just use the base key
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return baseKey;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Generate the correct input name based on bundle context
|
|
450
|
+
* @param optionId - The option ID
|
|
451
|
+
* @returns The formatted input name
|
|
452
|
+
*/
|
|
453
|
+
generateInputName(optionId) {
|
|
454
|
+
const contextData = this.bundleContext;
|
|
455
|
+
if (contextData) {
|
|
456
|
+
try {
|
|
457
|
+
// Handle both string and object types
|
|
458
|
+
const context = typeof contextData === 'string'
|
|
459
|
+
? JSON.parse(contextData)
|
|
460
|
+
: contextData;
|
|
461
|
+
const { sectionId, productId } = context;
|
|
462
|
+
return `bundle[${sectionId}][${productId}][options][${optionId}]`;
|
|
463
|
+
}
|
|
464
|
+
catch (e) {
|
|
465
|
+
return `options[${optionId}]`;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
return `options[${optionId}]`;
|
|
416
469
|
}
|
|
417
470
|
fillSelectedOptions() {
|
|
418
471
|
this.selectedOptions = this.optionsData.reduce((acc, opt) => {
|
|
@@ -472,7 +525,7 @@ export class SallaProductOptions {
|
|
|
472
525
|
this.getExpireDonationMessage(option));
|
|
473
526
|
}
|
|
474
527
|
fileUploader(option, additions = null) {
|
|
475
|
-
return h("salla-file-upload", { ...(additions || {}), "payload-name": "file", value: option.value, "instant-upload": true, name:
|
|
528
|
+
return h("salla-file-upload", { ...(additions || {}), "payload-name": "file", value: option.value, "instant-upload": true, name: this.generateInputName(option.id), required: !option.visibility_condition && option.required, height: "120px", onAdded: (e) => this.changedHandler(e, option), url: salla.cart.api.getUploadImageEndpoint(), "form-data": { cart_item_id: this.productId, product_id: this.productId }, onInvalidInput: (e) => this.invalidHandler(e, option), class: { "s-product-options-image-input": true, required: option.required } }, h("div", { class: "s-product-options-filepond-placeholder" }, h("span", { class: "s-product-options-filepond-placeholder-icon", innerHTML: additions.accept?.split(',').every(type => type.includes('image'))
|
|
476
529
|
? CameraIcon
|
|
477
530
|
: FileIcon }), h("p", { class: "s-product-options-filepond-placeholder-text" }, salla.lang.get('common.uploader.drag_and_drop')), h("span", { class: "filepond--label-action" }, salla.lang.get('common.uploader.browse'))));
|
|
478
531
|
}
|
|
@@ -490,7 +543,7 @@ export class SallaProductOptions {
|
|
|
490
543
|
// TODO: (ONLY FOR TESTING!) find a better way to make it testable, e.g. wrap it with a unique class like textOption
|
|
491
544
|
//@ts-ignore
|
|
492
545
|
numberOption(option) {
|
|
493
|
-
return h("input", { type: "text", value: option.value, class: "s-form-control", required: !option.visibility_condition && option.required, name:
|
|
546
|
+
return h("input", { type: "text", value: option.value, class: "s-form-control", required: !option.visibility_condition && option.required, name: this.generateInputName(option.id), placeholder: option.placeholder, onBlur: e => this.changedHandler(e, option), onInvalid: (e) => this.invalidHandler(e, option), onInput: e => salla.helpers.inputDigitsOnly(e.target) });
|
|
494
547
|
}
|
|
495
548
|
//@ts-ignore
|
|
496
549
|
splitterOption() {
|
|
@@ -498,36 +551,36 @@ export class SallaProductOptions {
|
|
|
498
551
|
}
|
|
499
552
|
//@ts-ignore
|
|
500
553
|
textOption(option) {
|
|
501
|
-
return h("div", { class: "s-product-options-text" }, h("input", { type: "text", value: option.value, maxLength: option?.length, class: 's-form-control', required: !option.visibility_condition && option.required, name:
|
|
554
|
+
return h("div", { class: "s-product-options-text" }, h("input", { type: "text", value: option.value, maxLength: option?.length, class: 's-form-control', required: !option.visibility_condition && option.required, name: this.generateInputName(option.id), placeholder: option.placeholder, onInvalid: (e) => this.invalidHandler(e, option), onChange: e => this.changedHandler(e, option), onInput: e => this.changedHandler(e, option) }));
|
|
502
555
|
}
|
|
503
556
|
//@ts-ignore
|
|
504
557
|
textareaOption(option) {
|
|
505
558
|
//todo::remove mt-1 class, and if it's okay to remove the tag itself will be great
|
|
506
|
-
return h("div", { class: "s-product-options-textarea" }, h("div", { class: "mt-1" }, h("textarea", { rows: 4, value: option.value, maxLength: option?.length, class: "s-form-control", required: !option.visibility_condition && option.required, id:
|
|
559
|
+
return h("div", { class: "s-product-options-textarea" }, h("div", { class: "mt-1" }, h("textarea", { rows: 4, value: option.value, maxLength: option?.length, class: "s-form-control", required: !option.visibility_condition && option.required, id: this.generateUniqueKey(option.id.toString()), name: this.generateInputName(option.id), placeholder: option.placeholder, onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option), onInput: (e) => this.changedHandler(e, option) })));
|
|
507
560
|
}
|
|
508
561
|
//@ts-ignore
|
|
509
562
|
mapOption(option) {
|
|
510
|
-
return h("salla-map", { zoom: 15, lat: this.getLatLng(option.value, 'lat'), lng: this.getLatLng(option.value, 'lng'), name:
|
|
563
|
+
return h("salla-map", { zoom: 15, lat: this.getLatLng(option.value, 'lat'), lng: this.getLatLng(option.value, 'lng'), name: this.generateInputName(option.id), searchable: true, required: option.required, onInvalidInput: (e) => this.invalidHandler(e, option), onSelected: e => this.changedHandler(e, option) });
|
|
511
564
|
}
|
|
512
565
|
colorPickerOption(option) {
|
|
513
|
-
return h("salla-color-picker", { onSubmitted: e => this.changedHandler(e, option), name:
|
|
566
|
+
return h("salla-color-picker", { onSubmitted: e => this.changedHandler(e, option), name: this.generateInputName(option.id), required: !option.visibility_condition && option.required, onInvalidInput: (e) => this.invalidHandler(e, option), color: option.value });
|
|
514
567
|
}
|
|
515
568
|
/**
|
|
516
569
|
* ============= Date Time options =============
|
|
517
570
|
*/
|
|
518
571
|
//@ts-ignore
|
|
519
572
|
timeOption(option) {
|
|
520
|
-
return h("salla-datetime-picker", { noCalendar: true, enableTime: true, dateFormat: "h:i K", value: option.value, placeholder: option.name, required: !option.visibility_condition && option.required, name:
|
|
573
|
+
return h("salla-datetime-picker", { noCalendar: true, enableTime: true, dateFormat: "h:i K", value: option.value, placeholder: option.name, required: !option.visibility_condition && option.required, name: this.generateInputName(option.id), class: "s-product-options-time-element", onInvalidInput: (e) => this.invalidHandler(e, option), onPicked: e => this.changedHandler(e, option) });
|
|
521
574
|
}
|
|
522
575
|
//@ts-ignore
|
|
523
576
|
dateOption(option) {
|
|
524
577
|
//todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23
|
|
525
|
-
return h("div", { class: "s-product-options-date-element" }, h("salla-datetime-picker", { value: option.value, placeholder: option.name, required: !option.visibility_condition && option.required, minDate: new Date(), name:
|
|
578
|
+
return h("div", { class: "s-product-options-date-element" }, h("salla-datetime-picker", { value: option.value, placeholder: option.name, required: !option.visibility_condition && option.required, minDate: new Date(), name: this.generateInputName(option.id), onInvalidInput: (e) => this.invalidHandler(e, option), onPicked: e => this.changedHandler(e, option) }));
|
|
526
579
|
}
|
|
527
580
|
//@ts-ignore
|
|
528
581
|
datetimeOption(option) {
|
|
529
582
|
//todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23
|
|
530
|
-
return h("div", { class: "s-product-options-datetime-element" }, h("salla-datetime-picker", { enableTime: true, value: option.value, dateFormat: "Y-m-d G:i:K", placeholder: option.name, required: !option.visibility_condition && option.required, name:
|
|
583
|
+
return h("div", { class: "s-product-options-datetime-element" }, h("salla-datetime-picker", { enableTime: true, value: option.value, dateFormat: "Y-m-d G:i:K", placeholder: option.name, required: !option.visibility_condition && option.required, name: this.generateInputName(option.id), maxDate: option.to_date_time, minDate: option.from_date_time, onInvalidInput: (e) => this.invalidHandler(e, option), onPicked: e => this.changedHandler(e, option) }));
|
|
531
584
|
}
|
|
532
585
|
/**
|
|
533
586
|
* ============= Advanced options =============
|
|
@@ -589,7 +642,8 @@ export class SallaProductOptions {
|
|
|
589
642
|
* @returns HTMLElement[] - An array of labeled input elements.
|
|
590
643
|
*/
|
|
591
644
|
renderOptionDetails(type, option, isRequired, buttonStyle = false) {
|
|
592
|
-
const
|
|
645
|
+
const baseName = this.generateInputName(option.id);
|
|
646
|
+
const name = type === 'radio' ? baseName : `${baseName}[]`;
|
|
593
647
|
return option?.details.map((detail) => this.renderInput(type, detail, option, isRequired, name, buttonStyle));
|
|
594
648
|
}
|
|
595
649
|
/**
|
|
@@ -598,7 +652,7 @@ export class SallaProductOptions {
|
|
|
598
652
|
* @returns HTMLElement - A select dropdown element with all option details.
|
|
599
653
|
*/
|
|
600
654
|
renderSelect(option) {
|
|
601
|
-
return (h("div", null, h("select", { name:
|
|
655
|
+
return (h("div", null, h("select", { name: this.generateInputName(option.id), required: !option.visibility_condition && option.required, class: "s-form-control", onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }, h("option", { value: "" }, option.placeholder), option?.details.map((detail) => (h("option", { key: detail.id, value: detail.id, disabled: this.canDisabled && this.isOptionDetailOut(detail), selected: detail.is_selected }, this.getOptionDetailName(detail)))))));
|
|
602
656
|
}
|
|
603
657
|
/**
|
|
604
658
|
* Renders a grid-based layout for option inputs (radio or checkbox).
|
|
@@ -639,14 +693,24 @@ export class SallaProductOptions {
|
|
|
639
693
|
required: option.required,
|
|
640
694
|
} }, this.renderOptionDetails('checkbox', option, isRequired)));
|
|
641
695
|
}
|
|
696
|
+
/**
|
|
697
|
+
* Renders a radio option selection (used for bundle products).
|
|
698
|
+
* This is essentially the same as single option but with explicit radio handling.
|
|
699
|
+
* @param option - The parent option object.
|
|
700
|
+
* @returns HTMLElement - The rendered radio option element.
|
|
701
|
+
*/
|
|
702
|
+
radioOption(option) {
|
|
703
|
+
// Radio options behave the same as single options
|
|
704
|
+
return this.singleOption(option);
|
|
705
|
+
}
|
|
642
706
|
//@ts-ignore
|
|
643
707
|
colorOption(option) {
|
|
644
|
-
return (h("fieldset", { class: "s-product-options-colors-wrapper" }, option?.details.map((detail) => (h("div", { class: "s-product-options-colors-item", key: detail.id }, h("input", { type: "radio", value: detail.id, required: !option.visibility_condition && option.required, checked: detail.is_selected, name:
|
|
708
|
+
return (h("fieldset", { class: "s-product-options-colors-wrapper" }, option?.details.map((detail) => (h("div", { class: "s-product-options-colors-item", key: detail.id }, h("input", { type: "radio", value: detail.id, required: !option.visibility_condition && option.required, checked: detail.is_selected, name: this.generateInputName(option.id), disabled: this.canDisabled && this.isOptionDetailOut(detail), id: this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`), onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }), h("label", { htmlFor: this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`) }, h("span", { style: { backgroundColor: detail.color } }), h("div", { innerHTML: this.getOptionDetailName(detail, true, option.type) })))))));
|
|
645
709
|
}
|
|
646
710
|
//@ts-ignore
|
|
647
711
|
thumbnailOption(option) {
|
|
648
712
|
return h("div", { class: "s-product-options-thumbnails-wrapper" }, option.details.map((detail) => {
|
|
649
|
-
return h("div", { key: detail.id }, h("input", { type: "radio", value: detail.id, "data-itemid": detail.id, required: !option.visibility_condition && option.required, checked: detail.is_selected, name:
|
|
713
|
+
return h("div", { key: detail.id }, h("input", { type: "radio", value: detail.id, "data-itemid": detail.id, required: !option.visibility_condition && option.required, checked: detail.is_selected, name: this.generateInputName(option.id), "data-img-id": detail.option_value, disabled: this.canDisabled && this.isOptionDetailOut(detail), id: this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`), onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }), h("label", { htmlFor: this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`), "data-img-id": detail.option_value, class: "go-to-slide" }, h("img", { "data-src": detail.image, src: detail.image, title: detail.name, alt: detail.name }), h("span", { innerHTML: CheckCircleIcon, class: "s-product-options-thumbnails-icon" }), this.isOptionDetailOut(detail) ?
|
|
650
714
|
[
|
|
651
715
|
h("small", { key: detail.id, class: "s-product-options-thumbnails-stock-badge" }, this.outOfStockText),
|
|
652
716
|
this.canDisabled ? h("div", { key: detail.id, class: "s-product-options-thumbnails-badge-overlay" }) : '',
|
|
@@ -658,13 +722,13 @@ export class SallaProductOptions {
|
|
|
658
722
|
digitalCardValuesOption(option) {
|
|
659
723
|
return h("div", { class: "s-product-options-digital-card-wrapper" }, this.availableDigitalCardValues.length > 0 ? this.availableDigitalCardValues.map((detail) => {
|
|
660
724
|
const id = String(detail.id);
|
|
661
|
-
return h("label", { htmlFor: this.generateUniqueKey(id.toString()), key: id, class: "s-product-options-digital-card-option" }, h("input", { type: "radio", "data-code-value": true, class: "s-form-control s-product-options-digital-card-input", value: detail.id, name:
|
|
725
|
+
return h("label", { htmlFor: this.generateUniqueKey(id.toString()), key: id, class: "s-product-options-digital-card-option" }, h("input", { type: "radio", "data-code-value": true, class: "s-form-control s-product-options-digital-card-input", value: detail.id, name: this.generateInputName(option.id), id: this.generateUniqueKey(id.toString()), required: !option.visibility_condition && option.required, onInvalid: (e) => this.invalidHandler(e, option), ...(!this.ignoreDefaultCardValue ? { defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id } : {}) }), h("span", null, detail.name, " ", salla.config?.currency()?.symbol));
|
|
662
726
|
})
|
|
663
727
|
: h("div", { class: "s-product-options-digital-card-out-of-stock" }));
|
|
664
728
|
}
|
|
665
729
|
countryOption(option) {
|
|
666
730
|
return h("div", { class: "s-product-options-digital-card-wrapper" }, option.details.map((detail) => {
|
|
667
|
-
return h("label", { htmlFor: this.generateUniqueKey(detail.id.toString()), key: detail.id, class: { "s-product-options-digital-card-option": true, "s-product-options-digital-card-option-stock-out": detail.is_out } }, h("input", { id: this.generateUniqueKey(detail.id.toString()), type: "radio", class: "s-form-control s-product-options-digital-card-input", value: detail.id, name:
|
|
731
|
+
return h("label", { htmlFor: this.generateUniqueKey(detail.id.toString()), key: detail.id, class: { "s-product-options-digital-card-option": true, "s-product-options-digital-card-option-stock-out": detail.is_out } }, h("input", { id: this.generateUniqueKey(detail.id.toString()), type: "radio", class: "s-form-control s-product-options-digital-card-input", value: detail.id, name: this.generateInputName(option.id), disabled: detail.is_out, required: !option.visibility_condition && option.required, onInvalid: (e) => this.invalidHandler(e, option), onChange: e => this.changedHandler(e, option), onClick: () => { this.disableCardValue = false; }, ...(salla.url.is_page("cart") ? { defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id } : {}) }), h("img", { loading: 'lazy', alt: detail.code, height: 24, width: 24, class: "s-product-options-country-flag", src: `https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/${String(detail.code).toLocaleLowerCase()}.svg` }), h("span", null, detail.name));
|
|
668
732
|
}));
|
|
669
733
|
}
|
|
670
734
|
static get is() { return "salla-product-options"; }
|
|
@@ -681,12 +745,12 @@ export class SallaProductOptions {
|
|
|
681
745
|
static get properties() {
|
|
682
746
|
return {
|
|
683
747
|
"productId": {
|
|
684
|
-
"type": "
|
|
748
|
+
"type": "any",
|
|
685
749
|
"attribute": "product-id",
|
|
686
750
|
"mutable": false,
|
|
687
751
|
"complexType": {
|
|
688
|
-
"original": "number",
|
|
689
|
-
"resolved": "number",
|
|
752
|
+
"original": "number | string",
|
|
753
|
+
"resolved": "number | string",
|
|
690
754
|
"references": {}
|
|
691
755
|
},
|
|
692
756
|
"required": false,
|
|
@@ -757,6 +821,25 @@ export class SallaProductOptions {
|
|
|
757
821
|
"setter": false,
|
|
758
822
|
"reflect": false
|
|
759
823
|
},
|
|
824
|
+
"bundleContext": {
|
|
825
|
+
"type": "string",
|
|
826
|
+
"attribute": "bundle-context",
|
|
827
|
+
"mutable": false,
|
|
828
|
+
"complexType": {
|
|
829
|
+
"original": "string | object",
|
|
830
|
+
"resolved": "object | string",
|
|
831
|
+
"references": {}
|
|
832
|
+
},
|
|
833
|
+
"required": false,
|
|
834
|
+
"optional": true,
|
|
835
|
+
"docs": {
|
|
836
|
+
"tags": [],
|
|
837
|
+
"text": "Bundle context information for bundle products.\nWhen provided, the component will use bundle naming convention for form inputs.\nExpected format: { sectionId: string|number, sectionIndex: number, productId: string|number }\nCan be passed as a string (JSON) or object"
|
|
838
|
+
},
|
|
839
|
+
"getter": false,
|
|
840
|
+
"setter": false,
|
|
841
|
+
"reflect": false
|
|
842
|
+
},
|
|
760
843
|
"config": {
|
|
761
844
|
"type": "string",
|
|
762
845
|
"attribute": "config",
|
|
@@ -45,11 +45,11 @@ export class SallaProductSizeGuide {
|
|
|
45
45
|
return h("salla-placeholder", { alignment: "center", iconSize: "xl" }, h("div", { slot: "title" }, this.placeholder_title), h("div", { slot: "description" }, this.placeholder_description));
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h("salla-modal", { key: '
|
|
48
|
+
return (h("salla-modal", { key: 'f80606d8b6e1e950c87209ca4e195c92f70dc341', class: "s-product-size-guide-wrapper", id: 'salla-product-size-guide-modal', isLoading: true, "has-skeleton": true, width: "md", ref: modal => this.modal = modal }, h("span", { key: '245688c24b70279566b0f7c51c7bf924ca5196c0', slot: 'icon', class: "s-product-size-guide-header-icon", innerHTML: PencilRuler }), h("div", { key: '9dc9b4aa8dea0599dbc78f5821e36bc4c600c6aa', slot: "loading" }, h("div", { key: 'fca84d9c2c5fa20ac446270c1c68c4ccda16dd77', class: "s-product-size-guide-skeleton" }, h("salla-skeleton", { key: '0f036371c9b42314beb4e2c1f308a99e2b068ab8', height: '15px', width: '25%' }), h("div", { key: 'a9059b864fddf26b6e15869cab013e793966907e', class: "s-product-size-guide-skeleton-header" }, h("salla-skeleton", { key: '34e188b1ff7e0b5e24df84d1b14df2b2255fc9eb', height: '40px' }), h("salla-skeleton", { key: '38653491fd73cf4d66cb87658b8121f88130e52e', height: '40px' }), h("salla-skeleton", { key: 'a8c3b3cc039fbbb8796c611f4485d889c94e632a', height: '40px' }), h("salla-skeleton", { key: '2de2d63a1a56a58f7f1bef92c46843683528ee1a', height: '40px' })), h("div", { key: 'cf0b08cb85830fcec4dd82140c89b6d009e1bc74', class: "s-product-size-guide-skeleton-content" }, h("salla-skeleton", { key: '402ed4292bb79e839316440ed985b1caed102602', height: '15px', width: '25%' }), h("salla-skeleton", { key: '88f0019d79ea72ef7748a5c04b7a8364c1160b92', height: '10px', width: '75%' }), h("salla-skeleton", { key: '10d7879c306d7185092c9e9aa0d407d2bb57519e', height: '10px', width: '50%' }), h("salla-skeleton", { key: '7b2d00c4c8000083b79d93466ed07828d61b6fbd', height: '10px', width: '75%' }), h("salla-skeleton", { key: '5d33b9848d9bccf34bb5f4a93ad99889fe1ee69f', height: '10px', width: '100%' }), h("salla-skeleton", { key: '6e49c074a8611a819814d17829466b983a419196', height: '10px', width: '25%' }), h("salla-skeleton", { key: '0fb70ed844efeda0d3c2ba348e14d1469a7b279b', height: '10px', width: '60%' }), h("salla-skeleton", { key: '5e55cb90aba76662377efccfef4a84fe0f64c341', height: '10px', width: '45%' }), h("salla-skeleton", { key: '058b96e3db12454ddfced543d6ecbdf0c38ac3dd', height: '10px', width: '30%' })))), h("slot", { key: 'e9eef25bce60cbb1dd48b3d8bc1ebda2305acda0', name: "header" }), !this.hasError && !!this.guides ?
|
|
49
49
|
[
|
|
50
50
|
h("salla-tabs", null, this.guides.map((guide) => h("salla-tab-header", { slot: "header", name: guide.name }, h("span", null, guide.name))), this.guides.map((guide) => h("salla-tab-content", { slot: "content", name: guide.name }, h("div", { innerHTML: guide.description }))))
|
|
51
51
|
]
|
|
52
|
-
: this.showPlaceholder(), h("slot", { key: '
|
|
52
|
+
: this.showPlaceholder(), h("slot", { key: '6b8bebc72d4a7baea765b1e5a6d4a81862206f94', name: "footer" })));
|
|
53
53
|
}
|
|
54
54
|
static get is() { return "salla-product-size-guide"; }
|
|
55
55
|
static get originalStyleUrls() {
|
|
@@ -80,7 +80,7 @@ export class SallaQuantityInput {
|
|
|
80
80
|
return this.host;
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '5627ef48310739dc0a112c9c214f78bae9b71bca', class: "s-quantity-input" }, h("div", { key: '50040d9cd5bbf38d06d6a13f17a1b4d756f5285d', class: "s-quantity-input-container" }, h("button", { key: '334c465e2ac46c3b88e3f89ae3b0754dc3741f69', onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button" }, !this.hasIncrementSlot ? h("span", { innerHTML: Add }) : '', h("slot", { key: '9f41e975e7c47f4cbc3e97dd3f8591b633d9da29', name: "increment-button" })), h("input", { key: '6f5bfdeb1804cf98a13f12b966e5fa6582e39557', class: "s-quantity-input-input", ...this.getInputAttributes(), ref: (el) => this.textInput = el, onInput: (event) => this.setValue(event.target.value), min: "1", value: this.quantity }), h("button", { key: '583f5edb96bc5a368851eadb5940d79b7afed3be', class: "s-quantity-input-decrease-button s-quantity-input-button", onClick: () => this.decrease(), type: "button" }, !this.hasDecrementSlot ? h("span", { innerHTML: Minus }) : '', h("slot", { key: '8726d4d616dd6f4fd1348312d3a9c24bf9268146', name: "decrement-button" })))));
|
|
84
84
|
}
|
|
85
85
|
static get is() { return "salla-quantity-input"; }
|
|
86
86
|
static get originalStyleUrls() {
|
|
@@ -184,7 +184,7 @@ export class SallaQuickBuy {
|
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
render() {
|
|
187
|
-
return h(Host, { key: '
|
|
187
|
+
return h(Host, { key: '46c3a8b699f4390166d027a0eb2d34451a1dd6f1' }, this.quickBuyButton());
|
|
188
188
|
}
|
|
189
189
|
quickBuyButton() {
|
|
190
190
|
return h("apple-pay-button", { locale: salla.config.get('user.language_code'), onClick: () => this.quickBuyHandler(), "data-quick-purchase": "applepay", class: "s-quick-buy-apple-pay", "data-is-applepay": "1", buttonstyle: "black", type: this.type });
|
|
@@ -158,7 +158,7 @@ export class SallaReviewCard {
|
|
|
158
158
|
return (h("a", { href: this.review?.product?.url, class: "s-review-card-product-container" }, h("img", { alt: product.image?.alt || "Product", src: product.image?.url, class: "s-review-card-product-image", width: 60, height: 60, loading: "lazy", decoding: "async", draggable: false }), h("div", { class: "s-review-card-product-details" }, h("p", { class: "s-review-card-product-details-name" }, product.name), this.showPurchaseCount ? h("p", { class: "s-review-card-product-details-purchase-count" }, h("span", { innerHTML: IconFire2 }), this.purchasedCount) : null)));
|
|
159
159
|
}
|
|
160
160
|
render() {
|
|
161
|
-
return h("div", { key: '
|
|
161
|
+
return h("div", { key: 'ff1711d73446e0b98e8e0888d1491687f942ff68', class: "s-review-card-container" }, this.renderSlider(), this.renderSingleImage(), renderDivider(), h("div", { key: '490953d92b6e4437f3d4ffbbabc45babf2289224', class: "s-review-card-content" }, this.renderHeader(), h("p", { key: '8960b58c5eab8a89834d5d73f6d941d03898224a', class: "s-review-card-review-content", innerHTML: this.review?.content }), renderDivider(), this.renderProductInfo()));
|
|
162
162
|
}
|
|
163
163
|
static get is() { return "salla-review-card"; }
|
|
164
164
|
static get originalStyleUrls() {
|
|
@@ -85,7 +85,7 @@ export class SallaReviews {
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
render() {
|
|
88
|
-
return (h("div", { key: '
|
|
88
|
+
return (h("div", { key: '636e5db1fe5a6441a3a779c26e383fec4cba4908', class: "s-reviews-container" }, h("div", { key: '5b2a8c72c8544cf152f811c67c23ed8e07a9af58', class: "s-reviews-header-wrapper" }, h("h1", { key: '786e8cfb33ae5b602de1f889d40307abe3dce582', class: "s-reviews-header" }, this.testimonialText), !!this.displayAllLink ? (h("a", { href: this.displayAllURL, class: "s-reviews-display-all" }, this.displayAllLinkText, h("span", { class: "s-reviews-display-all-icon", innerHTML: IconArrowLeft }))) : null), h("salla-slider", { key: 'f950c968c0b076b365b450a13ffabad4e3e9a4da', centered: true, "slides-per-view": 1, type: "testimonials", class: "s-reviews-testimonials-slider", "controls-outer": true, "auto-play": true, id: `testimonials-${this.source}-slider` }, h("div", { key: 'ca057f133699b406673b2e3dc476c14dc0dd9f79', slot: "items" }, this.reviews.map((item, index) => (h("div", { key: index, class: "s-reviews-swiper-slide" }, h("div", { class: "s-reviews-testimonial" }, h("div", { class: "s-reviews-testimonial__inner" }, h("div", { class: "s-reviews-testimonial__avatar" }, h("img", { src: 'images/s-empty.png', "data-src": item.avatar, alt: item.name ? item.name : 'testimonial-' + index, class: "lazy" })), h("div", { class: "s-reviews-testimonial__text" }, h("p", { innerHTML: item.content }), h("div", { class: "s-reviews-testimonial__name_wrapper" }, h("div", { class: "s-reviews-testimonial__info" }, item.name && h("h2", null, `${item.name}`)), h("div", { class: "s-reviews-testimonial__rating" }, h("salla-rating-stars", { size: "small", value: item.stars })))), h("span", { class: "s-reviews-testimonial__icon", innerHTML: IconQuoteOpen }))))))))));
|
|
89
89
|
}
|
|
90
90
|
static get is() { return "salla-reviews"; }
|
|
91
91
|
static get originalStyleUrls() {
|
|
@@ -142,7 +142,7 @@ export class SallaReviewsPage {
|
|
|
142
142
|
return options.map(option => (h("option", { key: option.value, value: option.value, selected: option.value === this.sort }, option.label)));
|
|
143
143
|
}
|
|
144
144
|
render() {
|
|
145
|
-
return (h("host", { key: '
|
|
145
|
+
return (h("host", { key: '31750df2834dcfce2f87fe3f18e10e7337aa512d' }, h("div", { key: '5757fa951f0ea25b9bc42f67d06b59f8175a73d8', class: "s-reviews-page-header-wrapper" }, h("h2", { key: 'd8db2aaae4061163e8f719512ae7dd76330dfcf7', class: "s-reviews-page-title" }, this.langTitlesReviews, h("span", { key: '057ffec21309286aca0e5a4bba4e41a9322f775f', class: "s-reviews-page-count" }, "(", this.langRatingReviews, ")")), h("div", { key: 'a85ed89e04fe8004d86927689df954d995e4ad84', class: "s-reviews-page-filter-wrapper" }, h("label", { key: '7eff22ea70a463ea95655c8accf7113cf1a35fad', class: "s-reviews-page-filter-label", htmlFor: "testimonials-filter" }, this.langSorting), h("select", { key: '8895a03ea1c404895386b6d73c21fe35fc4dc811', onChange: (e) => this.handleSorting(e), disabled: !this.reviews.length, class: "s-reviews-page-filter" }, this.renderSortingOptions()))), this.reviews.length ? h("main", { class: "s-reviews-page-grid", ref: el => {
|
|
146
146
|
this.wrapper = el;
|
|
147
147
|
} }, this.reviews.map(review => (h("salla-review-card", { key: review.id, review: review }))))
|
|
148
148
|
: h("div", { class: "s-products-list-placeholder" }, h("span", { innerHTML: ShoppingBag }), h("p", null, this.placeholderText)), this.pagination?.links?.next && this.reviews.length ? (h("div", { class: "s-reviews-page-load-more-container" }, h("salla-button", { class: "s-reviews-page-load-more-btn", loading: this.isLoading, onClick: () => this.infiniteScroll?.loadNextPage(), onKeyUp: () => this.infiniteScroll?.loadNextPage() }, this.langLoadMore))) : null));
|
|
@@ -146,7 +146,7 @@ export class SallaScopees {
|
|
|
146
146
|
return salla.onReady();
|
|
147
147
|
}
|
|
148
148
|
render() {
|
|
149
|
-
return (h(Host, { key: '
|
|
149
|
+
return (h(Host, { key: '42ac0a93262d5a6bdd602b97fa636b70c2269635' }, h("salla-modal", { key: '632eca8b8faa74fd990bc5c024befa11d461568f', ref: modal => this.modal = modal, isClosable: !!(this.isOpenedBefore || (this.selection == 'optional')), class: "s-scopes-modal", isLoading: this.loading, "has-skeleton": true }, this.loading ?
|
|
150
150
|
h("div", { slot: "loading" }, h("div", { class: "s-scopes-skeleton" }, h("salla-list-tile", { class: "s-scopes-header" }, h("div", { slot: "icon", class: "s-scopes-header-icon" }, h("salla-skeleton", { type: "circle" })), h("div", { slot: "title", class: "s-scopes-header-title mb-5" }, h("salla-skeleton", { height: '15px', width: '50%' })), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, h("salla-skeleton", { height: '10px' }), h("salla-skeleton", { height: '10px', width: '75%' }))), h("div", { class: "s-scopes-skeleton-search" }, h("salla-skeleton", { height: '10px', width: '50%' }), h("salla-skeleton", { height: '30px', width: '100%' })), h("div", { class: "s-scopes-skeleton-scopes" }, h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' })), h("div", { class: "s-scopes-skeleton-btn" }, h("salla-skeleton", { height: '40px', width: '100%' }))))
|
|
151
151
|
:
|
|
152
152
|
[h("salla-list-tile", { class: this.originalScopesList?.length ? "s-scopes-header block" : "s-hidden" }, h("div", { slot: "icon", class: "s-scopes-header-icon", innerHTML: StoreAlt }), h("div", { slot: "title", class: "s-scopes-header-title" }, salla.lang.get('blocks.scope.you_are_browse_store_from')), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, !!this.selected_scope ? this.selected_scope.name : "")), h("div", { class: "s-scopes-wrap" }, !!this.originalScopesList?.length && h("h4", { class: "s-scopes-title" }, this.getFormTitle()), this.originalScopesList?.length > this.searchDisplayLimit ?
|
|
@@ -121,12 +121,12 @@ export class SallaSearch {
|
|
|
121
121
|
this.inputValue.length < 3 ? this.container.classList.remove('s-search-no-results') : '';
|
|
122
122
|
}
|
|
123
123
|
render() {
|
|
124
|
-
const searchContent = h("div", { key: '
|
|
125
|
-
h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search })) : null), h("div", { key: '
|
|
124
|
+
const searchContent = h("div", { key: 'fe1ad73a7d7cdc9bfacb43e5c8f1b2d2c5983f9e', class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => this.container = container }, h("div", { key: 'df9c5af32950d9fc1ec30f46054630244fd2e2c1', class: "s-search-input-wrapper" }, h("span", { key: 'f4c1788bcd50992364e52388e425cc19c0906ec5', class: "s-search-icon-wrap" }, h("span", { key: 'a46da8c6f02e4970c903dc73d3d4a4e107a543f4', class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"/>' : Search })), h("input", { key: 'af5fff2641e6416f06c51c01e19e007c6ff43e32', type: "search", enterkeyhint: "search", autocomplete: "off", class: "s-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder'), onInput: (e) => this.limitWordsAndSearch(e), onKeyDown: e => this.handleKeyDown(e), ref: input => this.searchInput = input, style: { height: this.height + 'px', borderRadius: this.oval ? this.height / 2 + 'px' : '' } }), this.showAction ?
|
|
125
|
+
h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search })) : null), h("div", { key: 'e742cf41fdf23b37a46324df3bac24abc2c9bf03', class: "s-search-results" }, this.results?.data.map((product) => h("a", { href: product.url + '?from=search-bar', class: { "s-search-product": true, 's-search-product-not-available': !product.is_available }, innerHTML: this.productSlot
|
|
126
126
|
.replace(/\{name\}/g, product.name)
|
|
127
127
|
.replace(/\{price\}/g, product.price ? salla.money(product.price) : '')
|
|
128
128
|
.replace(/\{regular_price\}/g, product.is_on_sale && product.regular_price ? salla.money(product.regular_price) : '')
|
|
129
|
-
.replace(/\{image\}/g, product.image.url) })), h("p", { key: '
|
|
129
|
+
.replace(/\{image\}/g, product.image.url) })), h("p", { key: 'bea643f12fa014f6df1dee41a1a8ee8c41022458', ref: el => this.noResults = el, class: "s-search-no-results-placeholder" }, salla.lang.get('common.elements.no_options'))));
|
|
130
130
|
return (this.inline ?
|
|
131
131
|
h("div", { class: "s-search-modal" }, searchContent)
|
|
132
132
|
:
|
|
@@ -22,7 +22,7 @@ export class SallaSkeleton {
|
|
|
22
22
|
's-skeleton-item': true,
|
|
23
23
|
's-skeleton-item-circular': this.type == 'circle',
|
|
24
24
|
};
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: 'df1344797b9cbe42331625a2a1f432e07d6bd9ef', class: "s-skeleton-wrapper", style: { width: this.width, height: this.height } }, h("div", { key: 'b56611551bb2b2bcb02b46240e30f88e2ea7aea5', class: classes }, "\u00A0")));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "salla-skeleton"; }
|
|
28
28
|
static get originalStyleUrls() {
|
|
@@ -507,7 +507,7 @@ export class SallaSlider {
|
|
|
507
507
|
classes += this.verticalThumbs ? ' s-slider-vertical ' : ' s-slider-horizontal ';
|
|
508
508
|
classes += this.arrowsCentered ? ' s-slider-v-centered ' : '';
|
|
509
509
|
classes += this.gridThumbs ? ' s-slider-with-grid-thumbs ' : '';
|
|
510
|
-
return (h(Host, { key: '
|
|
510
|
+
return (h(Host, { key: '85e91dde02b7f32655d0ac10e5abb7f9e49d7157', class: 's-slider-wrapper ' + classes }, this.blockTitle || this.showControls ?
|
|
511
511
|
h("div", { class: "s-slider-block__title" }, this.blockTitle ?
|
|
512
512
|
h("div", { class: "s-slider-block__title-right" }, h("h2", null, this.blockTitle), this.blockSubtitle ? h("p", { innerHTML: this.blockSubtitle }) : '')
|
|
513
513
|
: '', h("div", { class: "s-slider-block__title-left" }, this.displayAllUrl ?
|
|
@@ -515,7 +515,7 @@ export class SallaSlider {
|
|
|
515
515
|
: '', this.showControls ?
|
|
516
516
|
h("div", { class: "s-slider-block__title-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon })))
|
|
517
517
|
: ''))
|
|
518
|
-
: '', h("div", { key: '
|
|
518
|
+
: '', h("div", { key: '8842ac56011138fd8456257bff568919c9ce8867', class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : this.direction }, h("slot", { key: '17fb40e69031d4c329df9d00fb75443d0ff9ba0c' }), h("div", { key: 'b8f42b180a271b4a873d99024251705e9d76adde', class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, h("slot", { key: '82ef4871810000d0b65a24518c6613a6484a2ee9', name: 'items' })), this.pagination ? h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' && this.hasThumbSlot ? h("div", { class: "s-slider-thumbs" }, h("div", { class: "swiper s-slider-thumbs-container", dir: this.getThumbsDirection(), ref: el => this.thumbsSliderContainer = el }, h("div", { class: { "s-slider-swiper-wrapper swiper-wrapper": true, "s-slider-grid-thumbs": this.gridThumbs }, ref: el => this.thumbsSliderWrapper = el }, h("slot", { name: "thumbs" })), this.showThumbsControls ?
|
|
519
519
|
h("div", { class: "s-slider-thumbs-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-thumbs-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-thumbs-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon })))
|
|
520
520
|
: null))
|
|
521
521
|
: null));
|
|
@@ -31,7 +31,7 @@ export class SallaSocial {
|
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
const linksArray = this.getLinksArray();
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '385311677990c9c48c682c399a742c5544dcaf43' }, h("ul", { key: '0aa7264032d08d165fa8e701324f4928539596dd', class: "s-social-list" }, linksArray.map((link) => (h("li", { class: "s-social-link" }, h("div", { id: "social-slot", innerHTML: this.socialSlot
|
|
35
35
|
.replace(/\{icon\}/g, this.iconsList[link.type])
|
|
36
36
|
.replace(/\{type\}/g, link.type)
|
|
37
37
|
.replace(/\{link\}/g, link.value.toString()) })))))));
|
|
@@ -119,7 +119,7 @@ export class SallaSocialShare {
|
|
|
119
119
|
window.a2a?.init('page');
|
|
120
120
|
}
|
|
121
121
|
render() {
|
|
122
|
-
return (h("div", { key: '
|
|
122
|
+
return (h("div", { key: 'e104cbf1051f36e7d1055a96b8d42e0f38b70f21', class: "s-social-share-wrapper" }, h("slot", { key: '8519676943448a6b87b1b3df8dd74b78de72aeb9', name: 'widget' }, h("salla-button", { key: '0be8b0bf52f046f6818b530430ce1e636fcd36c2', "aria-label": "Share", onClick: () => this.open(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: 'e637247fec7fd1a0235a410ca3e28fb4e7eff7f3', innerHTML: this.opened ? Cancel : ShareAlt }))), h("ul", { key: '8a378bac1865b26744ad31e6bf7218174b24bdd6', ref: el => this.shareMenu = el, class: "s-social-share-list a2a_kit share", "data-a2a-url": this.url ? this.url : window.location.href, "data-a2a-title": this.urlName ? this.urlName : document.title }, this.platforms.split(',').map(platform => {
|
|
123
123
|
return (h("li", null, h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
|
|
124
124
|
if (icon.name === platform) {
|
|
125
125
|
return h("span", { class: "s-social-share-icon", innerHTML: icon.icon });
|
|
@@ -30,7 +30,7 @@ export class SallaTabContent {
|
|
|
30
30
|
's-tabs-content': true,
|
|
31
31
|
's-tabs-content-selected': this.isSelected
|
|
32
32
|
};
|
|
33
|
-
return (h("div", { key: '
|
|
33
|
+
return (h("div", { key: '571a30d15d890516a1382ed25239df46de519a12', class: classes }, h("slot", { key: '4ceb77d0d6fb15f28e1bb51ec842b7a658ccc160' })));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "salla-tab-content"; }
|
|
36
36
|
static get originalStyleUrls() {
|
|
@@ -52,7 +52,7 @@ export class SallaTabHeader {
|
|
|
52
52
|
's-tabs-active': this.isSelected,
|
|
53
53
|
};
|
|
54
54
|
return [
|
|
55
|
-
h("div", { key: '
|
|
55
|
+
h("div", { key: '01eec3d799fd24f75ee29e65447e166057aed846', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: '200d5e89d7bf9cf232c997fa14c0384be65001c1' })),
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "salla-tab-header"; }
|
|
@@ -50,7 +50,7 @@ export class SallaTabs {
|
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
52
|
return [
|
|
53
|
-
h("div", { key: '
|
|
53
|
+
h("div", { key: '11dca6efd64c797274f2b71aa10426fbdf08d351', class: "s-tabs" }, h("div", { key: '9afd9c6a09728218cddc084c77f417d0249bdfd9', class: "s-tabs-header" }, h("slot", { key: 'eef1f2faed6b440c592e51f6d1205e140584b070', name: "header" })), h("div", { key: 'adb5bd9c1af2ba78c173eb3fbd5c73c0513ccca5', class: "s-tabs-content-wrapper" }, h("slot", { key: 'db9eaa79d095ef71fb1df1ab96ddbb925ec59b40', name: "content" })))
|
|
54
54
|
];
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "salla-tabs"; }
|
|
@@ -123,7 +123,7 @@ export class SallaTelInput {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: '8dae2336c70ca8da12846544c99eff5150ee3197', class: "s-tel-input" }, h("input", { key: '6512ba297a7f1e85f3e6b1a6ba7634c16e57116c', type: "tel", disabled: this.disabled, name: this.name, value: this.phone, onChange: (event) => this.handleCountryInput(event), ref: el => this.phoneInput = el, enterkeyhint: "next", autocomplete: "tel", class: "s-tel-input-control tel-input s-ltr" }), h("span", { key: '92def9152e10e06c390e8333048095dcc7613867', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), h("input", { key: '0a77d8be70d5f9a1e8ac75e444537f0f45fa76d0', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
|
|
127
127
|
}
|
|
128
128
|
componentDidLoad() {
|
|
129
129
|
this.initTelInput();
|
|
@@ -22,7 +22,7 @@ export class SallaTooltip {
|
|
|
22
22
|
this.targetElement = document.getElementById(this.targetId);
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h("div", { key: '
|
|
25
|
+
return (h("div", { key: '6ecf6b1fc6569ac532656d7222563527c40211fc', class: "s-tooltip-container" }, h("slot", { key: 'c15ba1a0feeca5c7aeb1ef96e1f132b39ef91196' }), this.show && h("div", { key: '49a4d1f4767234eb1ec35c653fc2b4ae6b1e9e8d', class: "s-tooltip-item" }, this.text)));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "salla-tooltip"; }
|
|
28
28
|
static get originalStyleUrls() {
|
|
@@ -56,7 +56,7 @@ export class SallaUserSettings {
|
|
|
56
56
|
await salla.profile.delete().finally(() => this.confirmationModal.close());
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
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)))))));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "salla-user-settings"; }
|
|
62
62
|
static get originalStyleUrls() {
|