@salla.sa/twilight-components 2.11.49 → 2.11.51
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/index-1d2b3370.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-add-product-button.cjs.entry.js +4 -13
- package/dist/cjs/salla-button_36.cjs.entry.js +138 -37
- package/dist/cjs/salla-comment-form.cjs.entry.js +43 -0
- package/dist/cjs/salla-product-options.cjs.entry.js +8 -6
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +4 -13
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +26 -3
- package/dist/collection/components/salla-count-down/salla-count-down.css +0 -0
- package/dist/collection/components/salla-count-down/salla-count-down.js +253 -0
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +4 -1
- package/dist/collection/components/salla-gifting/salla-gifting.js +26 -2
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +4 -3
- package/dist/collection/components/salla-map/salla-map.js +1 -1
- package/dist/collection/components/salla-modal/salla-modal.js +10 -0
- package/dist/collection/components/salla-product-options/salla-product-options.js +25 -7
- package/dist/collection/components/salla-quick-order/salla-quick-order.js +39 -8
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/salla-add-product-button.js +4 -13
- package/dist/components/salla-cart-summary.js +4 -1
- package/dist/components/salla-count-down.d.ts +11 -0
- package/dist/components/salla-count-down.js +122 -0
- package/dist/components/salla-file-upload2.js +3 -0
- package/dist/components/salla-gifting.js +10 -2
- package/dist/components/salla-login-modal.js +4 -3
- package/dist/components/salla-map2.js +1 -1
- package/dist/components/salla-modal2.js +10 -0
- package/dist/components/salla-product-options.js +9 -6
- package/dist/components/salla-quick-order.js +39 -8
- package/dist/components/salla-scopes.js +1 -1
- package/dist/esm/index-f1d446ac.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-add-product-button.entry.js +4 -13
- package/dist/esm/salla-button_36.entry.js +138 -37
- package/dist/esm/salla-comment-form.entry.js +39 -0
- package/dist/esm/salla-product-options.entry.js +8 -6
- package/dist/esm/twilight.js +1 -1
- package/dist/esm-es5/index-f1d446ac.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-add-product-button.entry.js +2 -2
- package/dist/esm-es5/salla-button_36.entry.js +5 -5
- package/dist/esm-es5/salla-comment-form.entry.js +4 -0
- package/dist/esm-es5/salla-product-options.entry.js +2 -2
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/p-02294ce9.system.entry.js +4 -0
- package/dist/twilight/p-0e3e1ff4.entry.js +4 -0
- package/dist/twilight/p-7d966812.entry.js +4 -0
- package/dist/twilight/p-91ed573c.system.entry.js +53 -0
- package/dist/twilight/p-9fda3312.system.js +1 -1
- package/dist/twilight/p-b540cfc6.system.entry.js +4 -0
- package/dist/twilight/p-cdb6aa9e.entry.js +4 -0
- package/dist/twilight/p-d9579b04.system.entry.js +4 -0
- package/dist/twilight/p-fb73867f.entry.js +36 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +0 -1
- package/dist/types/components/salla-cart-summary/salla-cart-summary.d.ts +5 -0
- package/dist/types/components/salla-count-down/salla-count-down.d.ts +53 -0
- package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +3 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +5 -0
- package/dist/types/components/salla-modal/salla-modal.d.ts +1 -0
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +7 -0
- package/dist/types/components/salla-quick-order/salla-quick-order.d.ts +5 -1
- package/dist/types/components.d.ts +99 -0
- package/package.json +3 -3
- package/dist/twilight/p-14fd987d.system.entry.js +0 -53
- package/dist/twilight/p-1bbf7223.entry.js +0 -4
- package/dist/twilight/p-3c98b71d.entry.js +0 -4
- package/dist/twilight/p-85c55961.system.entry.js +0 -4
- package/dist/twilight/p-99cb7643.system.entry.js +0 -4
- package/dist/twilight/p-d2c63efe.entry.js +0 -36
|
@@ -90,6 +90,22 @@ const SallaQuickOrder$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
90
90
|
getBtnColor() {
|
|
91
91
|
return this.quickOrderStyle === 'default' ? 'light' : 'primary';
|
|
92
92
|
}
|
|
93
|
+
getErrorMessage(type, name) {
|
|
94
|
+
return salla.lang.get(`common.errors.${type}`, { attribute: name == 'name' ? this.userNameLabel : this.placeHolderEmail });
|
|
95
|
+
}
|
|
96
|
+
handleInvalidInput(e) {
|
|
97
|
+
let input = e.target;
|
|
98
|
+
let validity = input.validity;
|
|
99
|
+
let errorMessage;
|
|
100
|
+
if (validity.valueMissing) {
|
|
101
|
+
errorMessage = this.getErrorMessage('field_required', input.name);
|
|
102
|
+
console.log(this.getErrorMessage('field_required', input.name));
|
|
103
|
+
}
|
|
104
|
+
else if (validity.typeMismatch) {
|
|
105
|
+
errorMessage = this.getErrorMessage('invalid_value', input.name);
|
|
106
|
+
}
|
|
107
|
+
input.setCustomValidity(errorMessage);
|
|
108
|
+
}
|
|
93
109
|
async setWrapperHeight() {
|
|
94
110
|
let expandable = this.host.querySelector('.s-quick-order-expandable');
|
|
95
111
|
setTimeout(() => {
|
|
@@ -118,13 +134,17 @@ const SallaQuickOrder$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
118
134
|
this.setWrapperHeight();
|
|
119
135
|
return;
|
|
120
136
|
}
|
|
121
|
-
return this.
|
|
137
|
+
return this.submitBtn.load()
|
|
138
|
+
.then(() => this.getPayload())
|
|
122
139
|
.then((payload) => salla.api.cart.createQuickOrder(payload))
|
|
123
140
|
.then(() => {
|
|
124
|
-
|
|
125
|
-
|
|
141
|
+
setTimeout(() => {
|
|
142
|
+
this.submitBtn.stop();
|
|
143
|
+
this.submitSucess = true;
|
|
144
|
+
this.quickOrderSubmited.emit();
|
|
145
|
+
}, 200);
|
|
126
146
|
})
|
|
127
|
-
.catch(error => error && console.error(error));
|
|
147
|
+
.catch(error => error && (console.error(error), this.submitBtn.stop()));
|
|
128
148
|
}
|
|
129
149
|
async getPayload() {
|
|
130
150
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -156,14 +176,14 @@ const SallaQuickOrder$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
156
176
|
return;
|
|
157
177
|
}
|
|
158
178
|
if (this.submitSucess) {
|
|
159
|
-
return (h(Host, { class: "s-quick-order" }, h("div", { class: 's-quick-order-confirm' }, h("i", { innerHTML: CelebrationIcon }), h("span", null, this.thanksMessage))));
|
|
179
|
+
return (h(Host, { class: "s-quick-order" }, h("div", { class: 's-quick-order-confirm', style: { backgroundColor: salla.config.get('theme.color.primary') + '10', borderColor: salla.config.get('theme.color.primary') + '10', color: salla.config.get('theme.color.primary') } }, h("i", { innerHTML: CelebrationIcon }), h("span", null, this.thanksMessage))));
|
|
160
180
|
}
|
|
161
181
|
return (h(Host, { class: `s-quick-order s-quick-order-${this.getDarkOrLight()}` }, h("div", { class: `s-quick-order-container s-quick-order-${this.quickOrderStyle}`, style: { backgroundColor: this.getStyleColor() } }, h("div", { class: "s-quick-order-button-cont" }, h("div", null, h("h3", null, this.quickOrderTitle), h("p", null, this.subTitle)), h("salla-button", { class: this.expanded ? "s-quick-order-btn-close" : "", onClick: (e) => this.submit(e, true), color: this.getBtnColor() }, this.oneClick
|
|
162
182
|
? this.confirmPayButtonTitle : this.expanded ? h("i", { innerHTML: Cancel }) : this.confirmPayButtonTitle)), h("form", { onSubmit: (e) => this.submit(e), class: 's-quick-order-expandable ' + (this.expanded ? 's-quick-order-shown' : '') }, Salla.config.isGuest() &&
|
|
163
183
|
[
|
|
164
|
-
h("div", { class: "s-form-group" }, h("span", { innerHTML: PortraitIcon }), h("input", { type: "text", required: true, class: "s-form-control", placeholder: this.userNameLabel, ref: el => (this.nameInput = el) })),
|
|
165
|
-
h("div", { class: "s-quick-order-flex-input" }, h("div", { class: "s-form-group" }, h("span", { innerHTML: IphoneXIcon }), h("salla-tel-input", { ref: el => (this.phoneInput = el) })), h("div", { class: "s-form-group" }, h("span", { innerHTML: email }), h("input", { type: "email", class: "s-form-control", required: this.isEmailRequired, placeholder: this.placeHolderEmail + ' ' + (this.isEmailRequired ? '' : this.emailOptional), ref: el => (this.emailInput = el) }))),
|
|
166
|
-
], this.isTermsRequired && (h("label", { htmlFor: "terms", class: "s-quick-order-terms" }, h("input", { type: "checkbox", required: true, name: 'terms', id: 'terms', ref: el => (this.termsInput = el), onChange: () => (this.termsChecked = this.termsInput.checked), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", h("div", { innerHTML: this.formatAgreementText(this.agreementText, 150) }, this.agreementText.length > 150 && (h("salla-button", { shape: "link", onClick: () => this.agreementModal.open() }, this.agreementShowText))), " "))), h("salla-button", { type: "submit", color: this.getBtnColor(), width: "wide" }, this.payButtonTitle)), h("salla-modal", { "modal-title": this.agreementModalHead, ref: modal => (this.agreementModal = modal) }, h("article", { innerHTML: this.agreementText })))));
|
|
184
|
+
h("div", { class: "s-form-group" }, h("span", { innerHTML: PortraitIcon }), h("input", { type: "text", required: true, class: "s-form-control", name: 'name', placeholder: this.userNameLabel, ref: el => (this.nameInput = el) })),
|
|
185
|
+
h("div", { class: "s-quick-order-flex-input" }, h("div", { class: "s-form-group" }, h("span", { innerHTML: IphoneXIcon }), h("salla-tel-input", { ref: el => (this.phoneInput = el) })), h("div", { class: "s-form-group" }, h("span", { innerHTML: email }), h("input", { type: "email", class: "s-form-control", name: 'email', required: this.isEmailRequired, placeholder: this.placeHolderEmail + ' ' + (this.isEmailRequired ? '' : this.emailOptional), ref: el => (this.emailInput = el) }))),
|
|
186
|
+
], this.isTermsRequired && (h("label", { htmlFor: "terms", class: "s-quick-order-terms" }, h("input", { type: "checkbox", required: true, name: 'terms', id: 'terms', ref: el => (this.termsInput = el), onChange: () => (this.termsChecked = this.termsInput.checked), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", h("div", { innerHTML: this.formatAgreementText(this.agreementText, 150) }, this.agreementText.length > 150 && (h("salla-button", { shape: "link", onClick: () => this.agreementModal.open() }, this.agreementShowText))), " "))), h("salla-button", { type: "submit", color: this.getBtnColor(), width: "wide", ref: el => (this.submitBtn = el) }, this.payButtonTitle)), h("salla-modal", { "modal-title": this.agreementModalHead, ref: modal => (this.agreementModal = modal) }, h("article", { innerHTML: this.agreementText })))));
|
|
167
187
|
}
|
|
168
188
|
componentWillLoad() {
|
|
169
189
|
return salla.api.withoutNotifier(() => salla.api.cart.getQuickOrderSettings().then(res => {
|
|
@@ -186,6 +206,17 @@ const SallaQuickOrder$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
186
206
|
this.oneClick = !(this.isTermsRequired || this.isEmailRequired) && this.user !== null;
|
|
187
207
|
}));
|
|
188
208
|
}
|
|
209
|
+
componentDidLoad() {
|
|
210
|
+
this.host.querySelectorAll('input').forEach(input => {
|
|
211
|
+
input.addEventListener('invalid', e => {
|
|
212
|
+
this.handleInvalidInput(e);
|
|
213
|
+
});
|
|
214
|
+
input.addEventListener('input', () => {
|
|
215
|
+
input.setCustomValidity('');
|
|
216
|
+
input.reportValidity();
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
}
|
|
189
220
|
get host() { return this; }
|
|
190
221
|
static get style() { return sallaQuickOrderCss; }
|
|
191
222
|
}, [0, "salla-quick-order", {
|
|
@@ -169,7 +169,7 @@ const SallaScopees = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
169
169
|
:
|
|
170
170
|
[h("salla-list-tile", { class: ((_a = this.originalScopesList) === null || _a === void 0 ? void 0 : _a.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" }, !!((_b = this.originalScopesList) === null || _b === void 0 ? void 0 : _b.length) && h("h4", { class: "s-scopes-title" }, this.getFormTitle()), ((_c = this.originalScopesList) === null || _c === void 0 ? void 0 : _c.length) > this.searchDisplayLimit ?
|
|
171
171
|
h("div", { class: "s-scopes-search-wrapper" }, h("div", { class: "s-scopes-search-icon", innerHTML: Search }), h("input", { type: "text", class: "s-scopes-search-input", onInput: e => this.handleSearchFieldTyping(e), enterkeyhint: "search", placeholder: salla.lang.get('blocks.scope.searching_for_a_branch') }))
|
|
172
|
-
: "", this.hasError || ((_d = this.
|
|
172
|
+
: "", this.hasError || ((_d = this.originalScopesList) === null || _d === void 0 ? void 0 : _d.length) < 2 ?
|
|
173
173
|
this.placeholderContent()
|
|
174
174
|
: this.mode === ModeType.DEFAULT ? this.defaultContent() : this.availabilityContent())])));
|
|
175
175
|
}
|
|
@@ -1894,6 +1894,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1894
1894
|
return import(
|
|
1895
1895
|
/* webpackMode: "lazy" */
|
|
1896
1896
|
'./salla-add-product-button.entry.js').then(processMod, consoleError);
|
|
1897
|
+
case 'salla-comment-form':
|
|
1898
|
+
return import(
|
|
1899
|
+
/* webpackMode: "lazy" */
|
|
1900
|
+
'./salla-comment-form.entry.js').then(processMod, consoleError);
|
|
1897
1901
|
case 'salla-installment':
|
|
1898
1902
|
return import(
|
|
1899
1903
|
/* webpackMode: "lazy" */
|
package/dist/esm/loader.js
CHANGED
|
@@ -30,7 +30,7 @@ const defineCustomElements = (win, options) => {
|
|
|
30
30
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
31
31
|
return patchEsm().then(() => {
|
|
32
32
|
globalScripts();
|
|
33
|
-
return bootstrapLazy(JSON.parse("[[\"salla-button_36\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64]}],[4,\"salla-cart-summary\",{\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"animateToCart\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[4,\"salla-quantity-input\",{\"quantity\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[0,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"isRTL\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}]]],[\"salla-product-options\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-add-product-button\",[[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32]}]]],[\"salla-installment\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-select\",[[0,\"salla-select\",{\"label\":[1],\"items\":[16],\"itemText\":[1,\"item-text\"],\"itemValue\":[1,\"item-value\"],\"itemDisabled\":[1,\"item-disabled\"],\"size\":[1],\"value\":[1032],\"autofocus\":[4],\"clearable\":[4],\"clearIcon\":[1,\"clear-icon\"],\"color\":[1],\"flat\":[4],\"disabled\":[4],\"loading\":[4],\"loadingColor\":[1,\"loading-color\"],\"hint\":[1],\"persistHint\":[4,\"persist-hint\"],\"placeholder\":[1],\"multiple\":[4],\"autocomplete\":[4],\"required\":[4],\"chips\":[4],\"shape\":[1],\"returnObject\":[4,\"return-object\"],\"hideDetail\":[4,\"hide-detail\"]}]]],[\"salla-conditional-fields\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]]]"), options);
|
|
33
|
+
return bootstrapLazy(JSON.parse("[[\"salla-button_36\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"widgetSubtitle\":[1,\"widget-subtitle\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64]}],[4,\"salla-cart-summary\",{\"showCartLabel\":[4,\"show-cart-label\"],\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"cartLabel\":[32],\"animateToCart\":[64]}],[0,\"salla-count-down\",{\"date\":[1],\"boxed\":[4],\"size\":[1],\"color\":[1],\"labeled\":[4],\"endText\":[1,\"end-text\"],\"digits\":[1],\"daysLabel\":[32],\"hoursLabel\":[32],\"minutesLabel\":[32],\"secondsLabel\":[32],\"endLabel\":[32],\"invalidDate\":[32],\"offerEnded\":[32],\"countInterval\":[32],\"endCountDown\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[4,\"salla-quantity-input\",{\"quantity\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[0,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"isRTL\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}]]],[\"salla-product-options\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"hasOutOfStockOption\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-add-product-button\",[[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32]}]]],[\"salla-comment-form\",[[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}]]],[\"salla-installment\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-select\",[[0,\"salla-select\",{\"label\":[1],\"items\":[16],\"itemText\":[1,\"item-text\"],\"itemValue\":[1,\"item-value\"],\"itemDisabled\":[1,\"item-disabled\"],\"size\":[1],\"value\":[1032],\"autofocus\":[4],\"clearable\":[4],\"clearIcon\":[1,\"clear-icon\"],\"color\":[1],\"flat\":[4],\"disabled\":[4],\"loading\":[4],\"loadingColor\":[1,\"loading-color\"],\"hint\":[1],\"persistHint\":[4,\"persist-hint\"],\"placeholder\":[1],\"multiple\":[4],\"autocomplete\":[4],\"required\":[4],\"chips\":[4],\"shape\":[1],\"returnObject\":[4,\"return-object\"],\"hideDetail\":[4,\"hide-detail\"]}]]],[\"salla-conditional-fields\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]]]"), options);
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -77,16 +77,6 @@ const SallaAddProductButton = class {
|
|
|
77
77
|
}
|
|
78
78
|
return this.hostAttributes;
|
|
79
79
|
}
|
|
80
|
-
pushSelectedOption(data) {
|
|
81
|
-
const index = this.selectedOptions.findIndex(option => option.option_id === data.option.id);
|
|
82
|
-
if (index > -1) {
|
|
83
|
-
this.selectedOptions[index] = Object.assign(Object.assign({}, data.detail), { option_id: data.option.id });
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
this.selectedOptions.push(Object.assign(Object.assign({}, data.detail), { option_id: data.option.id }));
|
|
87
|
-
}
|
|
88
|
-
this.hasOutOfStockOption = this.selectedOptions.some(option => option.is_out);
|
|
89
|
-
}
|
|
90
80
|
componentWillLoad() {
|
|
91
81
|
this.hasLabel = !!this.host.innerHTML.replace('<!---->', '').trim();
|
|
92
82
|
}
|
|
@@ -102,17 +92,18 @@ const SallaAddProductButton = class {
|
|
|
102
92
|
if ((this.productStatus === 'out-and-notify' && this.channels) || this.hasOutOfStockOption) {
|
|
103
93
|
return h(Host, null, h("salla-product-availability", Object.assign({}, this.getBtnAttributes())));
|
|
104
94
|
}
|
|
105
|
-
return h(Host, null, h("salla-button", Object.assign({ color: this.productStatus === 'sale' ? 'primary' : 'light', fill: this.productStatus === 'sale' ? 'solid' : 'outline', ref: el => this.btn = el, onClick: event => this.addProductToCart(event), disabled: this.productStatus !== 'sale' }, this.getBtnAttributes(), { "loader-position": "center"
|
|
95
|
+
return h(Host, null, h("salla-button", Object.assign({ color: this.productStatus === 'sale' ? 'primary' : 'light', type: "button", fill: this.productStatus === 'sale' ? 'solid' : 'outline', ref: el => this.btn = el, onClick: event => this.addProductToCart(event), disabled: this.productStatus !== 'sale' }, this.getBtnAttributes(), { "loader-position": "center" }), h("slot", null)));
|
|
106
96
|
}
|
|
107
97
|
componentDidLoad() {
|
|
108
98
|
if (!this.notifyOptionsAvailability) {
|
|
109
99
|
return;
|
|
110
100
|
}
|
|
111
|
-
salla.event.on('product-options::change', data => {
|
|
101
|
+
salla.event.on('product-options::change', async (data) => {
|
|
102
|
+
var _a;
|
|
112
103
|
if (!['thumbnail', 'color', 'single-option'].includes(data.option.type)) {
|
|
113
104
|
return;
|
|
114
105
|
}
|
|
115
|
-
this.
|
|
106
|
+
this.hasOutOfStockOption = await ((_a = document.querySelector(`salla-product-options[product-id="${this.productId}"]`)) === null || _a === void 0 ? void 0 : _a.hasOutOfStockOption());
|
|
116
107
|
this.hasLabel = false;
|
|
117
108
|
if (!this.subscribedOptions || this.subscribedOptions === 'null') {
|
|
118
109
|
return;
|
|
@@ -1440,6 +1440,7 @@ const SallaCartSummary = class {
|
|
|
1440
1440
|
registerInstance(this, hostRef);
|
|
1441
1441
|
this.cartSummaryCount = salla.storage.get('cart.summary.count') || 0;
|
|
1442
1442
|
this.cartSummaryTotal = salla.storage.get('cart.summary.total') || 0;
|
|
1443
|
+
this.cartLabel = salla.config.get('user.language_code') === 'ar' ? 'السلة' : 'Cart';
|
|
1443
1444
|
salla.cart.event.onUpdated((response) => {
|
|
1444
1445
|
this.cartSummaryCount = response.count || 0;
|
|
1445
1446
|
this.cartSummaryTotal = response.total || 0;
|
|
@@ -1495,7 +1496,7 @@ const SallaCartSummary = class {
|
|
|
1495
1496
|
}, '-=1700');
|
|
1496
1497
|
}
|
|
1497
1498
|
render() {
|
|
1498
|
-
return (h(Host, null, h("a", { class: "s-cart-summary-wrapper", href: salla.url.get('cart') }, h("div", { id: "s-cart-icon" }, h("slot", { name: "icon" }, h("i", { class: "s-cart-summary-icon", innerHTML: PendingOrdersIcon }))), h("span", { class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), h("b", { class: "s-cart-summary-total" }, salla.money(this.cartSummaryTotal)))));
|
|
1499
|
+
return (h(Host, null, h("a", { class: "s-cart-summary-wrapper", href: salla.url.get('cart') }, h("div", { id: "s-cart-icon" }, h("slot", { name: "icon" }, h("i", { class: "s-cart-summary-icon", innerHTML: PendingOrdersIcon }))), h("span", { class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), h("p", { class: "s-cart-summary-content" }, this.showCartLabel && h("span", { class: "s-cart-summary-label" }, this.cartLabel), h("b", { class: "s-cart-summary-total" }, salla.money(this.cartSummaryTotal))))));
|
|
1499
1500
|
}
|
|
1500
1501
|
get host() { return getElement(this); }
|
|
1501
1502
|
};
|
|
@@ -2663,38 +2664,86 @@ const SallaColorPicker = class {
|
|
|
2663
2664
|
};
|
|
2664
2665
|
SallaColorPicker.style = sallaColorPickerCss;
|
|
2665
2666
|
|
|
2666
|
-
const
|
|
2667
|
+
const sallaCountDownCss = "";
|
|
2667
2668
|
|
|
2668
|
-
const
|
|
2669
|
+
const SallaCountDown = class {
|
|
2669
2670
|
constructor(hostRef) {
|
|
2670
2671
|
registerInstance(this, hostRef);
|
|
2671
|
-
|
|
2672
|
-
|
|
2672
|
+
/**
|
|
2673
|
+
* The size of the count down
|
|
2674
|
+
* */
|
|
2675
|
+
this.size = 'md';
|
|
2676
|
+
/**
|
|
2677
|
+
* The color of the count down
|
|
2678
|
+
* */
|
|
2679
|
+
this.color = 'dark';
|
|
2680
|
+
/**
|
|
2681
|
+
* The digits lang to show in the count down
|
|
2682
|
+
* */
|
|
2683
|
+
this.digits = 'auto';
|
|
2684
|
+
this.daysLabel = '';
|
|
2685
|
+
this.hoursLabel = '';
|
|
2686
|
+
this.minutesLabel = '';
|
|
2687
|
+
this.secondsLabel = '';
|
|
2688
|
+
this.endLabel = '';
|
|
2689
|
+
this.invalidDate = '';
|
|
2690
|
+
this.offerEnded = false;
|
|
2673
2691
|
salla.lang.onLoaded(() => {
|
|
2674
|
-
this.
|
|
2675
|
-
this.
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
this.
|
|
2679
|
-
this.
|
|
2680
|
-
this.type = salla.url.is_page('page-single') ? 'page' : 'product';
|
|
2692
|
+
this.daysLabel = salla.lang.get('pages.checkout.day');
|
|
2693
|
+
this.hoursLabel = salla.lang.get('pages.checkout.hour');
|
|
2694
|
+
this.minutesLabel = salla.lang.get('pages.checkout.minute');
|
|
2695
|
+
this.invalidDate = salla.lang.get('blocks.buy_as_gift.incorrect_date');
|
|
2696
|
+
this.secondsLabel = salla.lang.get('pages.checkout.second');
|
|
2697
|
+
this.endLabel = salla.lang.get('pages.checkout.offer_ended');
|
|
2681
2698
|
});
|
|
2682
2699
|
}
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2700
|
+
/**
|
|
2701
|
+
* End the count down
|
|
2702
|
+
* */
|
|
2703
|
+
async endCountDown() {
|
|
2704
|
+
clearInterval(this.countInterval);
|
|
2705
|
+
this.offerEnded = true;
|
|
2706
|
+
this.daysEl.innerHTML = this.number(0);
|
|
2707
|
+
this.hoursEl.innerHTML = this.number(0);
|
|
2708
|
+
this.minutesEl.innerHTML = this.number(0);
|
|
2709
|
+
this.secondsEl.innerHTML = this.number(0);
|
|
2710
|
+
}
|
|
2711
|
+
isValidDate(date) {
|
|
2712
|
+
return !isNaN(Date.parse(date));
|
|
2713
|
+
}
|
|
2714
|
+
number(digit) {
|
|
2715
|
+
return salla.helpers.number(digit, this.digits === 'en');
|
|
2716
|
+
}
|
|
2717
|
+
startCountDown() {
|
|
2718
|
+
let countDownDate = new Date(this.date);
|
|
2719
|
+
countDownDate.setHours(23, 59, 59, 999);
|
|
2720
|
+
let countDownTime = countDownDate.getTime();
|
|
2721
|
+
this.countInterval = setInterval(() => {
|
|
2722
|
+
let now = new Date().getTime();
|
|
2723
|
+
let distance = countDownTime - now;
|
|
2724
|
+
this.daysEl.innerHTML = this.number(Math.floor(distance / (1000 * 60 * 60 * 24)));
|
|
2725
|
+
this.hoursEl.innerHTML = this.number(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)));
|
|
2726
|
+
this.minutesEl.innerHTML = this.number(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)));
|
|
2727
|
+
this.secondsEl.innerHTML = this.number(Math.floor((distance % (1000 * 60)) / 1000));
|
|
2728
|
+
if (distance < 0) {
|
|
2729
|
+
this.endCountDown();
|
|
2730
|
+
}
|
|
2731
|
+
}, 1000);
|
|
2732
|
+
}
|
|
2733
|
+
componentDidLoad() {
|
|
2734
|
+
if (!this.date) {
|
|
2686
2735
|
return;
|
|
2687
2736
|
}
|
|
2688
|
-
this.
|
|
2689
|
-
.then(() => salla.comment.add({ id: this.itemId, comment: this.commentField.value, type: this.type }))
|
|
2690
|
-
.finally(() => this.submitBtn.stop);
|
|
2737
|
+
this.startCountDown();
|
|
2691
2738
|
}
|
|
2692
2739
|
render() {
|
|
2693
|
-
|
|
2694
|
-
|
|
2740
|
+
if (!this.isValidDate(this.date)) {
|
|
2741
|
+
return h("div", null, this.invalidDate);
|
|
2742
|
+
}
|
|
2743
|
+
return (h(Host, { class: "s-count-down-wrapper" }, h("ul", { class: `s-count-down-list ${this.boxed ? 's-count-down-boxed' : ''} ${this.offerEnded ? 's-count-down-ended' : ''} s-count-down-${this.size} s-count-down-${this.color}` }, h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value", ref: el => this.secondsEl = el }, this.number(0)), this.labeled && h("div", { class: "s-count-down-item-label" }, this.secondsLabel)), h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value", ref: el => this.minutesEl = el }, this.number(0)), this.labeled && h("div", { class: "s-count-down-item-label" }, this.minutesLabel)), h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value", ref: el => this.hoursEl = el }, this.number(0)), this.labeled && h("div", { class: "s-count-down-item-label" }, this.hoursLabel)), h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value", ref: el => this.daysEl = el }, this.number(0)), this.labeled && h("div", { class: "s-count-down-item-label" }, this.daysLabel))), this.offerEnded && h("div", { class: "s-count-down-end-text" }, !!this.endText ? this.endText : this.endLabel)));
|
|
2695
2744
|
}
|
|
2696
2745
|
};
|
|
2697
|
-
|
|
2746
|
+
SallaCountDown.style = sallaCountDownCss;
|
|
2698
2747
|
|
|
2699
2748
|
var HOOKS = [
|
|
2700
2749
|
"onChange",
|
|
@@ -20756,6 +20805,9 @@ const SallaFileUpload = class {
|
|
|
20756
20805
|
fileInput.dispatchEvent(new window.Event('change', { bubbles: true }));
|
|
20757
20806
|
return this.removed.emit(deletedFile);
|
|
20758
20807
|
}
|
|
20808
|
+
/**
|
|
20809
|
+
* Method to set option for filepond
|
|
20810
|
+
* */
|
|
20759
20811
|
async setOption(key, value) {
|
|
20760
20812
|
this.filepond[key] = value;
|
|
20761
20813
|
}
|
|
@@ -20986,6 +21038,13 @@ const SallaGifting = class {
|
|
|
20986
21038
|
this.currentLang = salla.lang.locale;
|
|
20987
21039
|
});
|
|
20988
21040
|
}
|
|
21041
|
+
componentDidLoad() {
|
|
21042
|
+
salla.event.product.onPriceUpdated(() => {
|
|
21043
|
+
const quantityInput = document.querySelector('.s-quantity-input-input');
|
|
21044
|
+
// @ts-ignore
|
|
21045
|
+
this.quantity = quantityInput.value;
|
|
21046
|
+
});
|
|
21047
|
+
}
|
|
20989
21048
|
/**
|
|
20990
21049
|
* Show / Open the gifting modal window
|
|
20991
21050
|
*/
|
|
@@ -21222,7 +21281,7 @@ const SallaGifting = class {
|
|
|
21222
21281
|
let payload = {
|
|
21223
21282
|
text: this.selectedText,
|
|
21224
21283
|
sender_name: this.senderName,
|
|
21225
|
-
quantity:
|
|
21284
|
+
quantity: this.quantity,
|
|
21226
21285
|
deliver_at: this.showCalendar ? this.deliveryDate : null,
|
|
21227
21286
|
image_url: (_a = this.uploadedImage) !== null && _a !== void 0 ? _a : this.selectedImage,
|
|
21228
21287
|
receiver: {
|
|
@@ -21247,7 +21306,7 @@ const SallaGifting = class {
|
|
|
21247
21306
|
render() {
|
|
21248
21307
|
var _a, _b;
|
|
21249
21308
|
return [
|
|
21250
|
-
h("div", null, h("salla-list-tile", { class: "s-gifting-widget" }, h("div", { slot: "title" }, h("h3", null, this.sectionTitle)), h("div", { slot: "subtitle" }, h("div", null, this.sectionSubtitle)), h("div", { slot: "action" }, h("salla-button", { class: "s-gifting-widget-action", color: "gray", onClick: () => this.open() }, h("span", { innerHTML: GiftSharing }), " \u00A0", h("span", null, this.sectionBtnText)))), h("salla-modal", { id: 'salla-gifting-modal', isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { slot: "loading" }, h("div", { class: "s-gifting-skeleton" }, h("div", { class: "s-gifting-modal-header" }, h("salla-skeleton", { type: 'circle', height: '5rem', width: '5rem' }), h("h2", { class: "s-gifting-modal-title" }, h("div", { class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { height: '15px', width: '150px' })))), h("div", { class: "s-gifting-skeleton-content" }, h("salla-skeleton", { height: '10px', width: '150px' }), h("salla-skeleton", { height: '230px' }), h("salla-skeleton", { height: '10px', width: '150px' }), h("salla-skeleton", { height: '30px' }), h("salla-skeleton", { height: '40px' })))), h("slot", { name: "header" }), !!this.hasError ?
|
|
21309
|
+
h("div", null, h("salla-list-tile", { class: "s-gifting-widget" }, h("div", { slot: "title" }, h("h3", null, this.sectionTitle)), h("div", { slot: "subtitle" }, h("div", null, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { slot: "action" }, h("salla-button", { class: "s-gifting-widget-action", color: "gray", onClick: () => this.open() }, h("span", { innerHTML: GiftSharing }), " \u00A0", h("span", null, this.sectionBtnText)))), h("salla-modal", { id: 'salla-gifting-modal', isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { slot: "loading" }, h("div", { class: "s-gifting-skeleton" }, h("div", { class: "s-gifting-modal-header" }, h("salla-skeleton", { type: 'circle', height: '5rem', width: '5rem' }), h("h2", { class: "s-gifting-modal-title" }, h("div", { class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { height: '15px', width: '150px' })))), h("div", { class: "s-gifting-skeleton-content" }, h("salla-skeleton", { height: '10px', width: '150px' }), h("salla-skeleton", { height: '230px' }), h("salla-skeleton", { height: '10px', width: '150px' }), h("salla-skeleton", { height: '30px' }), h("salla-skeleton", { height: '40px' })))), h("slot", { name: "header" }), !!this.hasError ?
|
|
21251
21310
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
21252
21311
|
:
|
|
21253
21312
|
[
|
|
@@ -21769,9 +21828,10 @@ const SallaLoginModal = class {
|
|
|
21769
21828
|
if ([this.mobileTab, this.emailTab].includes(tab)) {
|
|
21770
21829
|
this.regType = tab === this.mobileTab ? 'phone' : 'email';
|
|
21771
21830
|
}
|
|
21772
|
-
|
|
21773
|
-
|
|
21774
|
-
|
|
21831
|
+
const input = tab.querySelector('input[type="tel"], input[type="email"]');
|
|
21832
|
+
input && setTimeout(() => {
|
|
21833
|
+
input.focus();
|
|
21834
|
+
}, 100);
|
|
21775
21835
|
(_a = this.modal) === null || _a === void 0 ? void 0 : _a.setTitle(this.currentTabName === 'registration' ? salla.lang.get('common.titles.registration') : this.title);
|
|
21776
21836
|
return this;
|
|
21777
21837
|
}
|
|
@@ -22732,7 +22792,7 @@ const SallaMap = class {
|
|
|
22732
22792
|
}
|
|
22733
22793
|
// rendering functions
|
|
22734
22794
|
getLocationModal() {
|
|
22735
|
-
return (h("div", null, h("div", { class: "s-map-modal-title" }, this.modalTitle
|
|
22795
|
+
return (h("div", null, h("div", { class: "s-map-modal-title" }, !!this.modalTitle ? this.modalTitle : this.modalActivityTitle), h("div", { class: "s-map-modal-body" }, h("div", { class: "s-map-element", ref: el => (this.mapElement = el) }), this.readonly ? "" :
|
|
22736
22796
|
[
|
|
22737
22797
|
this.searchable && (h("div", { class: "s-map-search-wrapper" }, h("input", { class: "s-map-search-input", ref: el => (this.searchInput = el), placeholder: this.searchPlaceholder }))),
|
|
22738
22798
|
h("salla-button", { class: "s-map-my-location-button", onClick: () => {
|
|
@@ -22855,6 +22915,7 @@ const SallaModal = class {
|
|
|
22855
22915
|
*/
|
|
22856
22916
|
async open() {
|
|
22857
22917
|
this.host.setAttribute('visible', '');
|
|
22918
|
+
this.handleAutoFocus();
|
|
22858
22919
|
return this.host;
|
|
22859
22920
|
}
|
|
22860
22921
|
/**
|
|
@@ -22886,6 +22947,15 @@ const SallaModal = class {
|
|
|
22886
22947
|
this.isLoading = false;
|
|
22887
22948
|
return this.host;
|
|
22888
22949
|
}
|
|
22950
|
+
handleAutoFocus() {
|
|
22951
|
+
const firstFocusableElement = this.host.querySelector('input, textarea, select');
|
|
22952
|
+
if (!firstFocusableElement) {
|
|
22953
|
+
return;
|
|
22954
|
+
}
|
|
22955
|
+
setTimeout(() => {
|
|
22956
|
+
firstFocusableElement.focus();
|
|
22957
|
+
}, 100);
|
|
22958
|
+
}
|
|
22889
22959
|
toggleModal(isOpen) {
|
|
22890
22960
|
const body = this.host.querySelector('.s-modal-body');
|
|
22891
22961
|
Helper$1.toggleElementClassIf(body, 's-modal-entering', 's-modal-leaving', () => isOpen)
|
|
@@ -23530,6 +23600,22 @@ const SallaQuickOrder = class {
|
|
|
23530
23600
|
getBtnColor() {
|
|
23531
23601
|
return this.quickOrderStyle === 'default' ? 'light' : 'primary';
|
|
23532
23602
|
}
|
|
23603
|
+
getErrorMessage(type, name) {
|
|
23604
|
+
return salla.lang.get(`common.errors.${type}`, { attribute: name == 'name' ? this.userNameLabel : this.placeHolderEmail });
|
|
23605
|
+
}
|
|
23606
|
+
handleInvalidInput(e) {
|
|
23607
|
+
let input = e.target;
|
|
23608
|
+
let validity = input.validity;
|
|
23609
|
+
let errorMessage;
|
|
23610
|
+
if (validity.valueMissing) {
|
|
23611
|
+
errorMessage = this.getErrorMessage('field_required', input.name);
|
|
23612
|
+
console.log(this.getErrorMessage('field_required', input.name));
|
|
23613
|
+
}
|
|
23614
|
+
else if (validity.typeMismatch) {
|
|
23615
|
+
errorMessage = this.getErrorMessage('invalid_value', input.name);
|
|
23616
|
+
}
|
|
23617
|
+
input.setCustomValidity(errorMessage);
|
|
23618
|
+
}
|
|
23533
23619
|
async setWrapperHeight() {
|
|
23534
23620
|
let expandable = this.host.querySelector('.s-quick-order-expandable');
|
|
23535
23621
|
setTimeout(() => {
|
|
@@ -23558,13 +23644,17 @@ const SallaQuickOrder = class {
|
|
|
23558
23644
|
this.setWrapperHeight();
|
|
23559
23645
|
return;
|
|
23560
23646
|
}
|
|
23561
|
-
return this.
|
|
23647
|
+
return this.submitBtn.load()
|
|
23648
|
+
.then(() => this.getPayload())
|
|
23562
23649
|
.then((payload) => salla.api.cart.createQuickOrder(payload))
|
|
23563
23650
|
.then(() => {
|
|
23564
|
-
|
|
23565
|
-
|
|
23651
|
+
setTimeout(() => {
|
|
23652
|
+
this.submitBtn.stop();
|
|
23653
|
+
this.submitSucess = true;
|
|
23654
|
+
this.quickOrderSubmited.emit();
|
|
23655
|
+
}, 200);
|
|
23566
23656
|
})
|
|
23567
|
-
.catch(error => error && console.error(error));
|
|
23657
|
+
.catch(error => error && (console.error(error), this.submitBtn.stop()));
|
|
23568
23658
|
}
|
|
23569
23659
|
async getPayload() {
|
|
23570
23660
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -23596,14 +23686,14 @@ const SallaQuickOrder = class {
|
|
|
23596
23686
|
return;
|
|
23597
23687
|
}
|
|
23598
23688
|
if (this.submitSucess) {
|
|
23599
|
-
return (h(Host, { class: "s-quick-order" }, h("div", { class: 's-quick-order-confirm' }, h("i", { innerHTML: CelebrationIcon }), h("span", null, this.thanksMessage))));
|
|
23689
|
+
return (h(Host, { class: "s-quick-order" }, h("div", { class: 's-quick-order-confirm', style: { backgroundColor: salla.config.get('theme.color.primary') + '10', borderColor: salla.config.get('theme.color.primary') + '10', color: salla.config.get('theme.color.primary') } }, h("i", { innerHTML: CelebrationIcon }), h("span", null, this.thanksMessage))));
|
|
23600
23690
|
}
|
|
23601
23691
|
return (h(Host, { class: `s-quick-order s-quick-order-${this.getDarkOrLight()}` }, h("div", { class: `s-quick-order-container s-quick-order-${this.quickOrderStyle}`, style: { backgroundColor: this.getStyleColor() } }, h("div", { class: "s-quick-order-button-cont" }, h("div", null, h("h3", null, this.quickOrderTitle), h("p", null, this.subTitle)), h("salla-button", { class: this.expanded ? "s-quick-order-btn-close" : "", onClick: (e) => this.submit(e, true), color: this.getBtnColor() }, this.oneClick
|
|
23602
23692
|
? this.confirmPayButtonTitle : this.expanded ? h("i", { innerHTML: Cancel }) : this.confirmPayButtonTitle)), h("form", { onSubmit: (e) => this.submit(e), class: 's-quick-order-expandable ' + (this.expanded ? 's-quick-order-shown' : '') }, Salla.config.isGuest() &&
|
|
23603
23693
|
[
|
|
23604
|
-
h("div", { class: "s-form-group" }, h("span", { innerHTML: PortraitIcon }), h("input", { type: "text", required: true, class: "s-form-control", placeholder: this.userNameLabel, ref: el => (this.nameInput = el) })),
|
|
23605
|
-
h("div", { class: "s-quick-order-flex-input" }, h("div", { class: "s-form-group" }, h("span", { innerHTML: IphoneXIcon }), h("salla-tel-input", { ref: el => (this.phoneInput = el) })), h("div", { class: "s-form-group" }, h("span", { innerHTML: MailIcon }), h("input", { type: "email", class: "s-form-control", required: this.isEmailRequired, placeholder: this.placeHolderEmail + ' ' + (this.isEmailRequired ? '' : this.emailOptional), ref: el => (this.emailInput = el) }))),
|
|
23606
|
-
], this.isTermsRequired && (h("label", { htmlFor: "terms", class: "s-quick-order-terms" }, h("input", { type: "checkbox", required: true, name: 'terms', id: 'terms', ref: el => (this.termsInput = el), onChange: () => (this.termsChecked = this.termsInput.checked), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", h("div", { innerHTML: this.formatAgreementText(this.agreementText, 150) }, this.agreementText.length > 150 && (h("salla-button", { shape: "link", onClick: () => this.agreementModal.open() }, this.agreementShowText))), " "))), h("salla-button", { type: "submit", color: this.getBtnColor(), width: "wide" }, this.payButtonTitle)), h("salla-modal", { "modal-title": this.agreementModalHead, ref: modal => (this.agreementModal = modal) }, h("article", { innerHTML: this.agreementText })))));
|
|
23694
|
+
h("div", { class: "s-form-group" }, h("span", { innerHTML: PortraitIcon }), h("input", { type: "text", required: true, class: "s-form-control", name: 'name', placeholder: this.userNameLabel, ref: el => (this.nameInput = el) })),
|
|
23695
|
+
h("div", { class: "s-quick-order-flex-input" }, h("div", { class: "s-form-group" }, h("span", { innerHTML: IphoneXIcon }), h("salla-tel-input", { ref: el => (this.phoneInput = el) })), h("div", { class: "s-form-group" }, h("span", { innerHTML: MailIcon }), h("input", { type: "email", class: "s-form-control", name: 'email', required: this.isEmailRequired, placeholder: this.placeHolderEmail + ' ' + (this.isEmailRequired ? '' : this.emailOptional), ref: el => (this.emailInput = el) }))),
|
|
23696
|
+
], this.isTermsRequired && (h("label", { htmlFor: "terms", class: "s-quick-order-terms" }, h("input", { type: "checkbox", required: true, name: 'terms', id: 'terms', ref: el => (this.termsInput = el), onChange: () => (this.termsChecked = this.termsInput.checked), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", h("div", { innerHTML: this.formatAgreementText(this.agreementText, 150) }, this.agreementText.length > 150 && (h("salla-button", { shape: "link", onClick: () => this.agreementModal.open() }, this.agreementShowText))), " "))), h("salla-button", { type: "submit", color: this.getBtnColor(), width: "wide", ref: el => (this.submitBtn = el) }, this.payButtonTitle)), h("salla-modal", { "modal-title": this.agreementModalHead, ref: modal => (this.agreementModal = modal) }, h("article", { innerHTML: this.agreementText })))));
|
|
23607
23697
|
}
|
|
23608
23698
|
componentWillLoad() {
|
|
23609
23699
|
return salla.api.withoutNotifier(() => salla.api.cart.getQuickOrderSettings().then(res => {
|
|
@@ -23626,6 +23716,17 @@ const SallaQuickOrder = class {
|
|
|
23626
23716
|
this.oneClick = !(this.isTermsRequired || this.isEmailRequired) && this.user !== null;
|
|
23627
23717
|
}));
|
|
23628
23718
|
}
|
|
23719
|
+
componentDidLoad() {
|
|
23720
|
+
this.host.querySelectorAll('input').forEach(input => {
|
|
23721
|
+
input.addEventListener('invalid', e => {
|
|
23722
|
+
this.handleInvalidInput(e);
|
|
23723
|
+
});
|
|
23724
|
+
input.addEventListener('input', () => {
|
|
23725
|
+
input.setCustomValidity('');
|
|
23726
|
+
input.reportValidity();
|
|
23727
|
+
});
|
|
23728
|
+
});
|
|
23729
|
+
}
|
|
23629
23730
|
get host() { return getElement(this); }
|
|
23630
23731
|
};
|
|
23631
23732
|
SallaQuickOrder.style = sallaQuickOrderCss;
|
|
@@ -24051,7 +24152,7 @@ const SallaScopees = class {
|
|
|
24051
24152
|
:
|
|
24052
24153
|
[h("salla-list-tile", { class: ((_a = this.originalScopesList) === null || _a === void 0 ? void 0 : _a.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" }, !!((_b = this.originalScopesList) === null || _b === void 0 ? void 0 : _b.length) && h("h4", { class: "s-scopes-title" }, this.getFormTitle()), ((_c = this.originalScopesList) === null || _c === void 0 ? void 0 : _c.length) > this.searchDisplayLimit ?
|
|
24053
24154
|
h("div", { class: "s-scopes-search-wrapper" }, h("div", { class: "s-scopes-search-icon", innerHTML: Search }), h("input", { type: "text", class: "s-scopes-search-input", onInput: e => this.handleSearchFieldTyping(e), enterkeyhint: "search", placeholder: salla.lang.get('blocks.scope.searching_for_a_branch') }))
|
|
24054
|
-
: "", this.hasError || ((_d = this.
|
|
24155
|
+
: "", this.hasError || ((_d = this.originalScopesList) === null || _d === void 0 ? void 0 : _d.length) < 2 ?
|
|
24055
24156
|
this.placeholderContent()
|
|
24056
24157
|
: this.mode === ModeType.DEFAULT ? this.defaultContent() : this.availabilityContent())])));
|
|
24057
24158
|
}
|
|
@@ -26828,4 +26929,4 @@ const SallaVerify = class {
|
|
|
26828
26929
|
};
|
|
26829
26930
|
SallaVerify.style = sallaVerifyCss;
|
|
26830
26931
|
|
|
26831
|
-
export { SallaButton as salla_button, SallaCartSummary as salla_cart_summary, SallaColorPicker as salla_color_picker,
|
|
26932
|
+
export { SallaButton as salla_button, SallaCartSummary as salla_cart_summary, SallaColorPicker as salla_color_picker, SallaCountDown as salla_count_down, SallaDatetimePicker as salla_datetime_picker, SallaFileUpload as salla_file_upload, SallaGifting as salla_gifting, SallaInfiniteScroll as salla_infinite_scroll, SallaListTile as salla_list_tile, SallaLoading as salla_loading, SallaLocalizationModal as salla_localization_modal, SallaLoginModal as salla_login_modal, SallaLoyalty as salla_loyalty, SallaMap as salla_map, SallaModal as salla_modal, SallaOfferModal as salla_offer_modal, SallaPlaceholder as salla_placeholder, SallaProductAvailability as salla_product_availability, SallaProductSizeGuide as salla_product_size_guide, SallaProgressBar as salla_progress_bar, SallaQuantityInput as salla_quantity_input, SallaQuickOrder as salla_quick_order, SallaRatingModal as salla_rating_modal, SallaRatingStars as salla_rating_stars, SallaScopees as salla_scopes, SallaSearch as salla_search, SallaSkeleton as salla_skeleton, SallaSwiper as salla_slider, SallaSocialShare as salla_social_share, SallaTabContent as salla_tab_content, SallaTabHeader as salla_tab_header, SallaTabs as salla_tabs, SallaTelInput as salla_tel_input, SallaUserMenu as salla_user_menu, SallaUserSettings as salla_user_settings, SallaVerify as salla_verify };
|