@salla.sa/twilight-components 1.0.92 → 1.0.94
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/loader.cjs.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +4 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +4 -2
- package/dist/cjs/twilight-components.cjs.js +1 -1
- package/dist/collection/components/salla-installment/salla-installment.js +4 -1
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +6 -3
- package/dist/components/salla-installment.js +4 -1
- package/dist/components/salla-login-modal.js +5 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-installment.entry.js +4 -1
- package/dist/esm/salla-login-modal.entry.js +4 -2
- package/dist/esm/twilight-components.js +1 -1
- package/dist/twilight-components/p-04c4dadb.entry.js +4 -0
- package/dist/twilight-components/p-f0a1d8d8.entry.js +4 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +1 -0
- package/package.json +1 -1
- package/dist/twilight-components/p-0fbee559.entry.js +0 -4
- package/dist/twilight-components/p-baf8dbbd.entry.js +0 -4
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -17,7 +17,7 @@ const patchEsm = () => {
|
|
|
17
17
|
const defineCustomElements = (win, options) => {
|
|
18
18
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
19
19
|
return patchEsm().then(() => {
|
|
20
|
-
return index.bootstrapLazy([["salla-add-product-button_6.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[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-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-sizes-table.cjs",[[1,"salla-sizes-table"]]],["salla-verify-modal.cjs",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["salla-add-product-button_6.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[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-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"translationsLoaded":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-sizes-table.cjs",[[1,"salla-sizes-table"]]],["salla-verify-modal.cjs",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -22,6 +22,7 @@ const SallaInstallment = class {
|
|
|
22
22
|
this.currency = salla.config.get('user.currency_code');
|
|
23
23
|
salla.onReady(() => {
|
|
24
24
|
const installment = salla.config.get('store.settings.installments');
|
|
25
|
+
console.log("🚀 ~ file: salla-installment.tsx ~ line 12 ~ SallaInstallment ~ salla.onReady ~ installment", installment);
|
|
25
26
|
this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
|
|
26
27
|
this.tabbyIsActive = installment.indexOf('tabby_installment') != -1;
|
|
27
28
|
this.spotiiIsActive = installment.indexOf('spotii_pay') != -1;
|
|
@@ -75,7 +76,9 @@ const SallaInstallment = class {
|
|
|
75
76
|
currency: this.currency,
|
|
76
77
|
};
|
|
77
78
|
var script = document.createElement('script');
|
|
78
|
-
script.setAttribute('src', 'https://store.test/themes/default/assets/js/price-widget-ar-salla.js');
|
|
79
|
+
// script.setAttribute('src', 'https://store.test/themes/default/assets/js/price-widget-ar-salla.js');
|
|
80
|
+
console.log("🚀 ~ file: salla-installment.tsx ~ line 106 ~ SallaInstallment ~ componentDidLoad ~ ;", salla.url.cdn('js/price-widget-ar-salla.js'));
|
|
81
|
+
script.setAttribute('src', salla.url.cdn('js/price-widget-ar-salla.js'));
|
|
79
82
|
document.head.appendChild(script);
|
|
80
83
|
}
|
|
81
84
|
}
|
|
@@ -40,6 +40,7 @@ const SallaLoginModal = class {
|
|
|
40
40
|
this.lastNameLabel = salla.lang.get('pages.profile.last_name');
|
|
41
41
|
this.firstNameErrorMsg = salla.lang.get('common.errors.field_required', { attribute: this.firstNameLabel });
|
|
42
42
|
this.lastNameErrorMsg = salla.lang.get('common.errors.field_required', { attribute: this.lastNameLabel });
|
|
43
|
+
this.translationsLoaded = false;
|
|
43
44
|
this.typing = (e, submitMethod) => {
|
|
44
45
|
const error = e.target.nextElementSibling;
|
|
45
46
|
e.target.classList.remove('s-has-error');
|
|
@@ -100,6 +101,7 @@ const SallaLoginModal = class {
|
|
|
100
101
|
(_b = this.smsBtn) === null || _b === void 0 ? void 0 : _b.setText(salla.lang.get('blocks.header.enter'));
|
|
101
102
|
(_c = this.emailBtn) === null || _c === void 0 ? void 0 : _c.setText(salla.lang.get('blocks.header.enter'));
|
|
102
103
|
(_d = this.regBtn) === null || _d === void 0 ? void 0 : _d.setText(salla.lang.get('blocks.header.register'));
|
|
104
|
+
this.translationsLoaded = true;
|
|
103
105
|
});
|
|
104
106
|
salla.auth.event.onVerificationFailed(() => {
|
|
105
107
|
//
|
|
@@ -194,13 +196,13 @@ const SallaLoginModal = class {
|
|
|
194
196
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
195
197
|
}
|
|
196
198
|
render() {
|
|
197
|
-
return (index.h("salla-modal", { id: "salla-login", icon: "sicon-user", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" }, index.h("div", { class: "s-login-modal-wrapper" }, this.isEmailAllowed && this.isMobileAllowed ?
|
|
199
|
+
return this.translationsLoaded ? (index.h("salla-modal", { id: "salla-login", icon: "sicon-user", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" }, index.h("div", { class: "s-login-modal-wrapper" }, this.isEmailAllowed && this.isMobileAllowed ?
|
|
198
200
|
index.h("div", { class: "s-login-modal-tab", ref: tab => this.homeTab = tab }, index.h("p", { class: "s-login-modal-sub-title" }, this.loginTypeTitle), index.h("slot", { name: "before-login-type" }), index.h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.mobileTab, evt) }, index.h("i", { class: "s-login-modal-main-btn-icon sicon-phone" }), index.h("span", { class: "s-login-modal-main-btn-text" }, this.smsLabel), index.h("i", { class: "sicon-keyboard_arrow_left arrow" })), index.h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.emailTab, evt) }, index.h("i", { class: "s-login-modal-main-btn-icon sicon-mail" }), index.h("span", { class: "s-login-modal-main-btn-text" }, this.emailLabel), index.h("i", { class: "sicon-keyboard_arrow_left arrow" })), index.h("slot", { name: "after-login-type" }))
|
|
199
201
|
: '', this.isMobileAllowed ?
|
|
200
202
|
index.h("div", { class: "s-login-modal-tab", ref: tab => this.mobileTab = tab }, index.h("slot", { name: "before-login-mobile" }), index.h("label", { class: "s-login-modal-label" }, this.mobileLabel), index.h("salla-tel-input", { ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e, this.loginBySMS) }), index.h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginBySMS(), ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter')), this.isEmailAllowed ?
|
|
201
203
|
index.h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, this.byEmailText) : '', index.h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
|
|
202
204
|
index.h("div", { class: "s-login-modal-tab", ref: tab => this.emailTab = tab }, index.h("slot", { name: "before-login-email" }), index.h("label", { class: "s-login-modal-label" }, this.emailLabel), index.h("input", { type: "email", ref: el => this.loginEmail = el, onKeyDown: e => this.typing(e, this.loginByEmail), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), index.h("span", { class: "s-login-modal-error-message" }), index.h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginByEmail(), ref: b => this.emailBtn = b }, salla.lang.get('blocks.header.enter')), this.isMobileAllowed ?
|
|
203
|
-
index.h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', index.h("slot", { name: "after-login-email" })) : '', index.h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, index.h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), index.h("div", { ref: tab => this.registrationTab = tab }, index.h("slot", { name: "before-registration" }), index.h("div", null, index.h("label", { class: "s-login-modal-label" }, this.firstNameLabel), index.h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }), index.h("span", { class: "s-login-modal-error-message" })), index.h("div", null, index.h("label", { class: "s-login-modal-label" }, this.lastNameLabel), index.h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }), index.h("span", { class: "s-login-modal-error-message" })), index.h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, index.h("label", { class: "s-login-modal-label" }, this.mobileLabel), index.h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })), index.h("div", { ref: el => this.regEmailBlock = el, class: "mb-1.5" }, index.h("label", { class: "s-login-modal-label" }, this.emailLabel), index.h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), index.h("span", { class: "s-login-modal-error-message" })), index.h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), index.h("slot", { name: "after-registration" })))));
|
|
205
|
+
index.h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', index.h("slot", { name: "after-login-email" })) : '', index.h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, index.h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), index.h("div", { ref: tab => this.registrationTab = tab }, index.h("slot", { name: "before-registration" }), index.h("div", null, index.h("label", { class: "s-login-modal-label" }, this.firstNameLabel), index.h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }), index.h("span", { class: "s-login-modal-error-message" })), index.h("div", null, index.h("label", { class: "s-login-modal-label" }, this.lastNameLabel), index.h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }), index.h("span", { class: "s-login-modal-error-message" })), index.h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, index.h("label", { class: "s-login-modal-label" }, this.mobileLabel), index.h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })), index.h("div", { ref: el => this.regEmailBlock = el, class: "mb-1.5" }, index.h("label", { class: "s-login-modal-label" }, this.emailLabel), index.h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), index.h("span", { class: "s-login-modal-error-message" })), index.h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), index.h("slot", { name: "after-registration" }))))) : '';
|
|
204
206
|
}
|
|
205
207
|
get host() { return index.getElement(this); }
|
|
206
208
|
};
|
|
@@ -18,5 +18,5 @@ const patchBrowser = () => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(options => {
|
|
21
|
-
return index.bootstrapLazy([["salla-add-product-button_6.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[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-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-sizes-table.cjs",[[1,"salla-sizes-table"]]],["salla-verify-modal.cjs",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
|
|
21
|
+
return index.bootstrapLazy([["salla-add-product-button_6.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[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-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"translationsLoaded":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-sizes-table.cjs",[[1,"salla-sizes-table"]]],["salla-verify-modal.cjs",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
|
|
22
22
|
});
|
|
@@ -14,6 +14,7 @@ export class SallaInstallment {
|
|
|
14
14
|
this.currency = salla.config.get('user.currency_code');
|
|
15
15
|
salla.onReady(() => {
|
|
16
16
|
const installment = salla.config.get('store.settings.installments');
|
|
17
|
+
console.log("🚀 ~ file: salla-installment.tsx ~ line 12 ~ SallaInstallment ~ salla.onReady ~ installment", installment);
|
|
17
18
|
this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
|
|
18
19
|
this.tabbyIsActive = installment.indexOf('tabby_installment') != -1;
|
|
19
20
|
this.spotiiIsActive = installment.indexOf('spotii_pay') != -1;
|
|
@@ -72,7 +73,9 @@ export class SallaInstallment {
|
|
|
72
73
|
currency: this.currency,
|
|
73
74
|
};
|
|
74
75
|
var script = document.createElement('script');
|
|
75
|
-
script.setAttribute('src', 'https://store.test/themes/default/assets/js/price-widget-ar-salla.js');
|
|
76
|
+
// script.setAttribute('src', 'https://store.test/themes/default/assets/js/price-widget-ar-salla.js');
|
|
77
|
+
console.log("🚀 ~ file: salla-installment.tsx ~ line 106 ~ SallaInstallment ~ componentDidLoad ~ ;", salla.url.cdn('js/price-widget-ar-salla.js'));
|
|
78
|
+
script.setAttribute('src', salla.url.cdn('js/price-widget-ar-salla.js'));
|
|
76
79
|
document.head.appendChild(script);
|
|
77
80
|
}
|
|
78
81
|
}
|
|
@@ -43,6 +43,7 @@ export class SallaLoginModal {
|
|
|
43
43
|
this.lastNameLabel = salla.lang.get('pages.profile.last_name');
|
|
44
44
|
this.firstNameErrorMsg = salla.lang.get('common.errors.field_required', { attribute: this.firstNameLabel });
|
|
45
45
|
this.lastNameErrorMsg = salla.lang.get('common.errors.field_required', { attribute: this.lastNameLabel });
|
|
46
|
+
this.translationsLoaded = false;
|
|
46
47
|
this.typing = (e, submitMethod) => {
|
|
47
48
|
const error = e.target.nextElementSibling;
|
|
48
49
|
e.target.classList.remove('s-has-error');
|
|
@@ -103,6 +104,7 @@ export class SallaLoginModal {
|
|
|
103
104
|
(_b = this.smsBtn) === null || _b === void 0 ? void 0 : _b.setText(salla.lang.get('blocks.header.enter'));
|
|
104
105
|
(_c = this.emailBtn) === null || _c === void 0 ? void 0 : _c.setText(salla.lang.get('blocks.header.enter'));
|
|
105
106
|
(_d = this.regBtn) === null || _d === void 0 ? void 0 : _d.setText(salla.lang.get('blocks.header.register'));
|
|
107
|
+
this.translationsLoaded = true;
|
|
106
108
|
});
|
|
107
109
|
salla.auth.event.onVerificationFailed(() => {
|
|
108
110
|
//
|
|
@@ -197,7 +199,7 @@ export class SallaLoginModal {
|
|
|
197
199
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
198
200
|
}
|
|
199
201
|
render() {
|
|
200
|
-
return (h("salla-modal", { id: "salla-login", icon: "sicon-user", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" },
|
|
202
|
+
return this.translationsLoaded ? (h("salla-modal", { id: "salla-login", icon: "sicon-user", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" },
|
|
201
203
|
h("div", { class: "s-login-modal-wrapper" },
|
|
202
204
|
this.isEmailAllowed && this.isMobileAllowed ?
|
|
203
205
|
h("div", { class: "s-login-modal-tab", ref: tab => this.homeTab = tab },
|
|
@@ -252,7 +254,7 @@ export class SallaLoginModal {
|
|
|
252
254
|
h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }),
|
|
253
255
|
h("span", { class: "s-login-modal-error-message" })),
|
|
254
256
|
h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')),
|
|
255
|
-
h("slot", { name: "after-registration" })))));
|
|
257
|
+
h("slot", { name: "after-registration" }))))) : '';
|
|
256
258
|
}
|
|
257
259
|
static get is() { return "salla-login-modal"; }
|
|
258
260
|
static get originalStyleUrls() { return {
|
|
@@ -331,7 +333,8 @@ export class SallaLoginModal {
|
|
|
331
333
|
"firstNameLabel": {},
|
|
332
334
|
"lastNameLabel": {},
|
|
333
335
|
"firstNameErrorMsg": {},
|
|
334
|
-
"lastNameErrorMsg": {}
|
|
336
|
+
"lastNameErrorMsg": {},
|
|
337
|
+
"translationsLoaded": {}
|
|
335
338
|
}; }
|
|
336
339
|
static get methods() { return {
|
|
337
340
|
"open": {
|
|
@@ -19,6 +19,7 @@ const SallaInstallment$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
19
19
|
this.currency = salla.config.get('user.currency_code');
|
|
20
20
|
salla.onReady(() => {
|
|
21
21
|
const installment = salla.config.get('store.settings.installments');
|
|
22
|
+
console.log("🚀 ~ file: salla-installment.tsx ~ line 12 ~ SallaInstallment ~ salla.onReady ~ installment", installment);
|
|
22
23
|
this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
|
|
23
24
|
this.tabbyIsActive = installment.indexOf('tabby_installment') != -1;
|
|
24
25
|
this.spotiiIsActive = installment.indexOf('spotii_pay') != -1;
|
|
@@ -72,7 +73,9 @@ const SallaInstallment$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
72
73
|
currency: this.currency,
|
|
73
74
|
};
|
|
74
75
|
var script = document.createElement('script');
|
|
75
|
-
script.setAttribute('src', 'https://store.test/themes/default/assets/js/price-widget-ar-salla.js');
|
|
76
|
+
// script.setAttribute('src', 'https://store.test/themes/default/assets/js/price-widget-ar-salla.js');
|
|
77
|
+
console.log("🚀 ~ file: salla-installment.tsx ~ line 106 ~ SallaInstallment ~ componentDidLoad ~ ;", salla.url.cdn('js/price-widget-ar-salla.js'));
|
|
78
|
+
script.setAttribute('src', salla.url.cdn('js/price-widget-ar-salla.js'));
|
|
76
79
|
document.head.appendChild(script);
|
|
77
80
|
}
|
|
78
81
|
}
|
|
@@ -41,6 +41,7 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
41
41
|
this.lastNameLabel = salla.lang.get('pages.profile.last_name');
|
|
42
42
|
this.firstNameErrorMsg = salla.lang.get('common.errors.field_required', { attribute: this.firstNameLabel });
|
|
43
43
|
this.lastNameErrorMsg = salla.lang.get('common.errors.field_required', { attribute: this.lastNameLabel });
|
|
44
|
+
this.translationsLoaded = false;
|
|
44
45
|
this.typing = (e, submitMethod) => {
|
|
45
46
|
const error = e.target.nextElementSibling;
|
|
46
47
|
e.target.classList.remove('s-has-error');
|
|
@@ -101,6 +102,7 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
101
102
|
(_b = this.smsBtn) === null || _b === void 0 ? void 0 : _b.setText(salla.lang.get('blocks.header.enter'));
|
|
102
103
|
(_c = this.emailBtn) === null || _c === void 0 ? void 0 : _c.setText(salla.lang.get('blocks.header.enter'));
|
|
103
104
|
(_d = this.regBtn) === null || _d === void 0 ? void 0 : _d.setText(salla.lang.get('blocks.header.register'));
|
|
105
|
+
this.translationsLoaded = true;
|
|
104
106
|
});
|
|
105
107
|
salla.auth.event.onVerificationFailed(() => {
|
|
106
108
|
//
|
|
@@ -195,13 +197,13 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
195
197
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
196
198
|
}
|
|
197
199
|
render() {
|
|
198
|
-
return (h("salla-modal", { id: "salla-login", icon: "sicon-user", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" }, h("div", { class: "s-login-modal-wrapper" }, this.isEmailAllowed && this.isMobileAllowed ?
|
|
200
|
+
return this.translationsLoaded ? (h("salla-modal", { id: "salla-login", icon: "sicon-user", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" }, h("div", { class: "s-login-modal-wrapper" }, this.isEmailAllowed && this.isMobileAllowed ?
|
|
199
201
|
h("div", { class: "s-login-modal-tab", ref: tab => this.homeTab = tab }, h("p", { class: "s-login-modal-sub-title" }, this.loginTypeTitle), h("slot", { name: "before-login-type" }), h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.mobileTab, evt) }, h("i", { class: "s-login-modal-main-btn-icon sicon-phone" }), h("span", { class: "s-login-modal-main-btn-text" }, this.smsLabel), h("i", { class: "sicon-keyboard_arrow_left arrow" })), h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.emailTab, evt) }, h("i", { class: "s-login-modal-main-btn-icon sicon-mail" }), h("span", { class: "s-login-modal-main-btn-text" }, this.emailLabel), h("i", { class: "sicon-keyboard_arrow_left arrow" })), h("slot", { name: "after-login-type" }))
|
|
200
202
|
: '', this.isMobileAllowed ?
|
|
201
203
|
h("div", { class: "s-login-modal-tab", ref: tab => this.mobileTab = tab }, h("slot", { name: "before-login-mobile" }), h("label", { class: "s-login-modal-label" }, this.mobileLabel), h("salla-tel-input", { ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e, this.loginBySMS) }), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginBySMS(), ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter')), this.isEmailAllowed ?
|
|
202
204
|
h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, this.byEmailText) : '', h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
|
|
203
205
|
h("div", { class: "s-login-modal-tab", ref: tab => this.emailTab = tab }, h("slot", { name: "before-login-email" }), h("label", { class: "s-login-modal-label" }, this.emailLabel), h("input", { type: "email", ref: el => this.loginEmail = el, onKeyDown: e => this.typing(e, this.loginByEmail), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), h("span", { class: "s-login-modal-error-message" }), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginByEmail(), ref: b => this.emailBtn = b }, salla.lang.get('blocks.header.enter')), this.isMobileAllowed ?
|
|
204
|
-
h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', h("slot", { name: "after-login-email" })) : '', h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), h("div", { ref: tab => this.registrationTab = tab }, h("slot", { name: "before-registration" }), h("div", null, h("label", { class: "s-login-modal-label" }, this.firstNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", null, h("label", { class: "s-login-modal-label" }, this.lastNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.mobileLabel), h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })), h("div", { ref: el => this.regEmailBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.emailLabel), h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), h("span", { class: "s-login-modal-error-message" })), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), h("slot", { name: "after-registration" })))));
|
|
206
|
+
h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', h("slot", { name: "after-login-email" })) : '', h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), h("div", { ref: tab => this.registrationTab = tab }, h("slot", { name: "before-registration" }), h("div", null, h("label", { class: "s-login-modal-label" }, this.firstNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", null, h("label", { class: "s-login-modal-label" }, this.lastNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.mobileLabel), h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })), h("div", { ref: el => this.regEmailBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.emailLabel), h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), h("span", { class: "s-login-modal-error-message" })), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), h("slot", { name: "after-registration" }))))) : '';
|
|
205
207
|
}
|
|
206
208
|
get host() { return this; }
|
|
207
209
|
static get style() { return sallaLoginModalCss; }
|
|
@@ -223,6 +225,7 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
223
225
|
"lastNameLabel": [32],
|
|
224
226
|
"firstNameErrorMsg": [32],
|
|
225
227
|
"lastNameErrorMsg": [32],
|
|
228
|
+
"translationsLoaded": [32],
|
|
226
229
|
"open": [64]
|
|
227
230
|
}, [[8, "verified", "onVerified"]]]);
|
|
228
231
|
function defineCustomElement$1() {
|
package/dist/esm/loader.js
CHANGED
|
@@ -13,7 +13,7 @@ const patchEsm = () => {
|
|
|
13
13
|
const defineCustomElements = (win, options) => {
|
|
14
14
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
15
15
|
return patchEsm().then(() => {
|
|
16
|
-
return bootstrapLazy([["salla-add-product-button_6",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[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-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-sizes-table",[[1,"salla-sizes-table"]]],["salla-verify-modal",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["salla-add-product-button_6",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[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-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"translationsLoaded":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-sizes-table",[[1,"salla-sizes-table"]]],["salla-verify-modal",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -18,6 +18,7 @@ const SallaInstallment = class {
|
|
|
18
18
|
this.currency = salla.config.get('user.currency_code');
|
|
19
19
|
salla.onReady(() => {
|
|
20
20
|
const installment = salla.config.get('store.settings.installments');
|
|
21
|
+
console.log("🚀 ~ file: salla-installment.tsx ~ line 12 ~ SallaInstallment ~ salla.onReady ~ installment", installment);
|
|
21
22
|
this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
|
|
22
23
|
this.tabbyIsActive = installment.indexOf('tabby_installment') != -1;
|
|
23
24
|
this.spotiiIsActive = installment.indexOf('spotii_pay') != -1;
|
|
@@ -71,7 +72,9 @@ const SallaInstallment = class {
|
|
|
71
72
|
currency: this.currency,
|
|
72
73
|
};
|
|
73
74
|
var script = document.createElement('script');
|
|
74
|
-
script.setAttribute('src', 'https://store.test/themes/default/assets/js/price-widget-ar-salla.js');
|
|
75
|
+
// script.setAttribute('src', 'https://store.test/themes/default/assets/js/price-widget-ar-salla.js');
|
|
76
|
+
console.log("🚀 ~ file: salla-installment.tsx ~ line 106 ~ SallaInstallment ~ componentDidLoad ~ ;", salla.url.cdn('js/price-widget-ar-salla.js'));
|
|
77
|
+
script.setAttribute('src', salla.url.cdn('js/price-widget-ar-salla.js'));
|
|
75
78
|
document.head.appendChild(script);
|
|
76
79
|
}
|
|
77
80
|
}
|
|
@@ -36,6 +36,7 @@ const SallaLoginModal = class {
|
|
|
36
36
|
this.lastNameLabel = salla.lang.get('pages.profile.last_name');
|
|
37
37
|
this.firstNameErrorMsg = salla.lang.get('common.errors.field_required', { attribute: this.firstNameLabel });
|
|
38
38
|
this.lastNameErrorMsg = salla.lang.get('common.errors.field_required', { attribute: this.lastNameLabel });
|
|
39
|
+
this.translationsLoaded = false;
|
|
39
40
|
this.typing = (e, submitMethod) => {
|
|
40
41
|
const error = e.target.nextElementSibling;
|
|
41
42
|
e.target.classList.remove('s-has-error');
|
|
@@ -96,6 +97,7 @@ const SallaLoginModal = class {
|
|
|
96
97
|
(_b = this.smsBtn) === null || _b === void 0 ? void 0 : _b.setText(salla.lang.get('blocks.header.enter'));
|
|
97
98
|
(_c = this.emailBtn) === null || _c === void 0 ? void 0 : _c.setText(salla.lang.get('blocks.header.enter'));
|
|
98
99
|
(_d = this.regBtn) === null || _d === void 0 ? void 0 : _d.setText(salla.lang.get('blocks.header.register'));
|
|
100
|
+
this.translationsLoaded = true;
|
|
99
101
|
});
|
|
100
102
|
salla.auth.event.onVerificationFailed(() => {
|
|
101
103
|
//
|
|
@@ -190,13 +192,13 @@ const SallaLoginModal = class {
|
|
|
190
192
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
191
193
|
}
|
|
192
194
|
render() {
|
|
193
|
-
return (h("salla-modal", { id: "salla-login", icon: "sicon-user", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" }, h("div", { class: "s-login-modal-wrapper" }, this.isEmailAllowed && this.isMobileAllowed ?
|
|
195
|
+
return this.translationsLoaded ? (h("salla-modal", { id: "salla-login", icon: "sicon-user", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" }, h("div", { class: "s-login-modal-wrapper" }, this.isEmailAllowed && this.isMobileAllowed ?
|
|
194
196
|
h("div", { class: "s-login-modal-tab", ref: tab => this.homeTab = tab }, h("p", { class: "s-login-modal-sub-title" }, this.loginTypeTitle), h("slot", { name: "before-login-type" }), h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.mobileTab, evt) }, h("i", { class: "s-login-modal-main-btn-icon sicon-phone" }), h("span", { class: "s-login-modal-main-btn-text" }, this.smsLabel), h("i", { class: "sicon-keyboard_arrow_left arrow" })), h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.emailTab, evt) }, h("i", { class: "s-login-modal-main-btn-icon sicon-mail" }), h("span", { class: "s-login-modal-main-btn-text" }, this.emailLabel), h("i", { class: "sicon-keyboard_arrow_left arrow" })), h("slot", { name: "after-login-type" }))
|
|
195
197
|
: '', this.isMobileAllowed ?
|
|
196
198
|
h("div", { class: "s-login-modal-tab", ref: tab => this.mobileTab = tab }, h("slot", { name: "before-login-mobile" }), h("label", { class: "s-login-modal-label" }, this.mobileLabel), h("salla-tel-input", { ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e, this.loginBySMS) }), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginBySMS(), ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter')), this.isEmailAllowed ?
|
|
197
199
|
h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, this.byEmailText) : '', h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
|
|
198
200
|
h("div", { class: "s-login-modal-tab", ref: tab => this.emailTab = tab }, h("slot", { name: "before-login-email" }), h("label", { class: "s-login-modal-label" }, this.emailLabel), h("input", { type: "email", ref: el => this.loginEmail = el, onKeyDown: e => this.typing(e, this.loginByEmail), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), h("span", { class: "s-login-modal-error-message" }), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginByEmail(), ref: b => this.emailBtn = b }, salla.lang.get('blocks.header.enter')), this.isMobileAllowed ?
|
|
199
|
-
h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', h("slot", { name: "after-login-email" })) : '', h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), h("div", { ref: tab => this.registrationTab = tab }, h("slot", { name: "before-registration" }), h("div", null, h("label", { class: "s-login-modal-label" }, this.firstNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", null, h("label", { class: "s-login-modal-label" }, this.lastNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.mobileLabel), h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })), h("div", { ref: el => this.regEmailBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.emailLabel), h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), h("span", { class: "s-login-modal-error-message" })), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), h("slot", { name: "after-registration" })))));
|
|
201
|
+
h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', h("slot", { name: "after-login-email" })) : '', h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), h("div", { ref: tab => this.registrationTab = tab }, h("slot", { name: "before-registration" }), h("div", null, h("label", { class: "s-login-modal-label" }, this.firstNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", null, h("label", { class: "s-login-modal-label" }, this.lastNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.mobileLabel), h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })), h("div", { ref: el => this.regEmailBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.emailLabel), h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), h("span", { class: "s-login-modal-error-message" })), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), h("slot", { name: "after-registration" }))))) : '';
|
|
200
202
|
}
|
|
201
203
|
get host() { return getElement(this); }
|
|
202
204
|
};
|
|
@@ -16,5 +16,5 @@ const patchBrowser = () => {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(options => {
|
|
19
|
-
return bootstrapLazy([["salla-add-product-button_6",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[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-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-sizes-table",[[1,"salla-sizes-table"]]],["salla-verify-modal",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["salla-add-product-button_6",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[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-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"translationsLoaded":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-sizes-table",[[1,"salla-sizes-table"]]],["salla-verify-modal",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
|
|
20
20
|
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,h as a,H as o}from"./p-1d0e664c.js";const r=class{constructor(a){t(this,a),this.language=salla.config.get("user.language_code"),this.currency=salla.config.get("user.currency_code"),salla.onReady((()=>{const t=salla.config.get("store.settings.installments");console.log("🚀 ~ file: salla-installment.tsx ~ line 12 ~ SallaInstallment ~ salla.onReady ~ installment",t),this.tamaraIsActive=-1!=t.indexOf("tamara_installment"),this.tabbyIsActive=-1!=t.indexOf("tabby_installment"),this.spotiiIsActive=-1!=t.indexOf("spotii_pay")}))}render(){return a(o,null,this.tamaraIsActive?a("div",{class:"tamara-product-widget","data-price":this.price,"data-currency":this.currency,"data-lang":this.language,"data-payment-type":"installment"}):"",this.tabbyIsActive?a("div",{id:"tabbyPromoWrapper"},a("div",{id:"tabbyPromo"})):"",this.spotiiIsActive?a("div",{class:"spotii-wrapper"},a("div",{class:"spotii-promo"},this.price)):"")}componentDidLoad(){if(this.tamaraIsActive&&((t=document.createElement("script")).setAttribute("src","https://cdn.tamara.co/widget/product-widget.min.js"),document.head.appendChild(t),t.onload=()=>{window.TamaraProductWidget.init({lang:this.language}),setTimeout((()=>{window.TamaraProductWidget.render()}),300)}),this.tabbyIsActive&&((t=document.createElement("script")).setAttribute("src","https://checkout.tabby.ai/tabby-promo.js"),document.head.appendChild(t),t.onload=()=>{new(0,window.TabbyPromo)({selector:"#tabbyPromo",currency:this.currency,price:this.price,lang:this.language}),document.querySelectorAll(".tabby-promo-snippet__logo").forEach((function(t){t.setAttribute("aria-label","Tabby Logo")}))}),this.spotiiIsActive){window.spotiiConfig={targetXPath:[".spotii-wrapper"],renderToPath:[".spotii-promo"],currency:this.currency};var t=document.createElement("script");console.log("🚀 ~ file: salla-installment.tsx ~ line 106 ~ SallaInstallment ~ componentDidLoad ~ ;",salla.url.cdn("js/price-widget-ar-salla.js")),t.setAttribute("src",salla.url.cdn("js/price-widget-ar-salla.js")),document.head.appendChild(t)}}};r.style="#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;padding:15px;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--color-text);font-size:var(--font-sm);line-height:1.25;padding:18px 20px 18px 100px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm);margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px;top:18px;margin:0 !important}.ltr .tamara-product-widget .tamara-logo{right:20px;left:auto}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}";export{r as salla_installment}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as s,h as i,g as l}from"./p-1d0e664c.js";import{H as t}from"./p-9d2ca9c8.js";const a=class{constructor(i){s(this,i),this.isEmailAllowed=salla.config.get("store.settings.auth.email_allowed",!0),this.isMobileAllowed=salla.config.get("store.settings.auth.mobile_allowed",!0),this.isEmailRequired=salla.config.get("store.settings.auth.is_email_required",!1),this.regType="phone",this.title=salla.lang.get("blocks.header.login"),this.loginTypeTitle=salla.lang.get("blocks.header.select_login_way"),this.loginText=salla.lang.get("blocks.header.login"),this.smsLabel=salla.lang.get("blocks.header.sms"),this.mobileLabel=salla.lang.get("common.elements.mobile"),this.emailLabel=salla.lang.get("common.elements.email"),this.enterText=salla.lang.get("blocks.header.enter"),this.bySMSText=salla.lang.get("blocks.header.login_by_sms"),this.byEmailText=salla.lang.get("blocks.header.login_by_email"),this.emailErrorMsg=salla.lang.get("common.elements.email_is_valid"),this.firstNameLabel=salla.lang.get("blocks.header.your_name"),this.lastNameLabel=salla.lang.get("pages.profile.last_name"),this.firstNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:this.firstNameLabel}),this.lastNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:this.lastNameLabel}),this.translationsLoaded=!1,this.typing=(s,i)=>{const l=s.target.nextElementSibling;s.target.classList.remove("s-has-error"),(null==l?void 0:l.classList.contains("s-login-modal-error-message"))&&(l.innerText=""),"Enter"==s.key&&i()},this.loginBySMS=async()=>{const{phone:s,countryCode:i}=await this.loginTelInput.getValues();await this.loginTelInput.isValid()&&this.login(this.smsBtn,{type:"mobile",phone:s,country_code:i})},this.loginByEmail=()=>{t.isValidEmail(this.loginEmail.value)?this.login(this.emailBtn,{type:"email",email:this.loginEmail.value}):this.validateField(this.loginEmail,this.emailErrorMsg)},this.newUser=async()=>{var s;const{phone:i,countryCode:l}="email"==this.regType?await this.regTelInput.getValues():await this.loginTelInput.getValues(),t=this.regEmail.value||(null===(s=this.loginEmail)||void 0===s?void 0:s.value);await this.newUserValidation(),await this.regBtn.load(),await this.regBtn.disable();let a={first_name:this.firstName.value,last_name:this.lastName.value,phone:i||this.loginTelInput.phone,country_code:l,verified_by:this.regType};t&&(a=Object.assign(Object.assign({},a),{email:t})),this.verifyTab.getCode().then((s=>salla.auth.api.register(Object.assign(Object.assign({},a),{code:s})))).then((()=>salla.auth.canRedirect&&window.location.reload())).catch((()=>this.regBtn.stop()&&this.regBtn.enable()))},this.title=this.host.title||salla.lang.get("blocks.header.login"),this.host.removeAttribute("title"),salla.lang.onLoaded((()=>{var s,i,l,t;this.title=salla.lang.get("blocks.header.login"),this.loginTypeTitle=salla.lang.get("blocks.header.select_login_way"),this.loginText=salla.lang.get("blocks.header.login"),this.smsLabel=salla.lang.get("blocks.header.sms"),this.mobileLabel=salla.lang.get("common.elements.mobile"),this.emailLabel=salla.lang.get("common.elements.email"),this.bySMSText=salla.lang.get("blocks.header.login_by_sms"),this.byEmailText=salla.lang.get("blocks.header.login_by_email"),this.emailErrorMsg=salla.lang.get("common.elements.email_is_valid"),this.firstNameLabel=salla.lang.get("blocks.header.your_name"),this.lastNameLabel=salla.lang.get("pages.profile.last_name"),this.firstNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:this.firstNameLabel}),this.lastNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:this.lastNameLabel}),null===(s=this.modal)||void 0===s||s.setTitle(this.title),null===(i=this.smsBtn)||void 0===i||i.setText(salla.lang.get("blocks.header.enter")),null===(l=this.emailBtn)||void 0===l||l.setText(salla.lang.get("blocks.header.enter")),null===(t=this.regBtn)||void 0===t||t.setText(salla.lang.get("blocks.header.register")),this.translationsLoaded=!0})),salla.auth.event.onVerificationFailed((()=>{})),salla.event.on("login::open",(()=>this.open())),salla.event.on("twilight::initiated",(()=>{this.isEmailAllowed=salla.config.get("store.settings.auth.email_allowed",!!this.isEmailAllowed),this.isMobileAllowed=salla.config.get("store.settings.auth.mobile_allowed",!!this.isMobileAllowed),this.isEmailRequired=salla.config.get("store.settings.auth.is_email_required",!!this.isEmailRequired)}))}onVerified(s){var i,l;salla.log("verified",s);let t=(null===(i=s.detail)||void 0===i?void 0:i.data.case)||(null===(l=s.detail)||void 0===l?void 0:l.error.case);if(t){if("new_customer"===t)return this.showTab(this.registrationTab);if(salla.auth.canRedirect())return s.detail.data.redirect_url?window.location.href=s.data.redirect_url:void window.location.reload();salla.log("Will not auto redirect or reload, due to `salla.auth.canRedirect()`")}else salla.log("verified but without case!")}async open(){return this.isEmailAllowed&&this.isMobileAllowed?this.showTab(this.homeTab):this.isEmailAllowed?this.showTab(this.emailTab):this.isMobileAllowed&&this.showTab(this.mobileTab),this.modal.open()}showTab(s,i){var l,a;null==i||i.preventDefault();let e=[this.homeTab,this.mobileTab,this.emailTab,this.verifyTab,this.registrationTab];e.map((i=>t.toggleElementClassIf(i,"visible","s-hidden",(()=>i==s)))),setTimeout((()=>e.map((i=>t.toggleElementClassIf(i,"s-login-modal-active","s-login-modal-unactive",(()=>i==s))))),200),setTimeout((()=>{var i;return null===(i=document.querySelector(".s-login-modal-wrapper"))||void 0===i?void 0:i.setAttribute("style","height:"+(null==s?void 0:s.scrollHeight)+"px")})),[this.mobileTab,this.emailTab].includes(s)&&(this.regType=s===this.mobileTab?"phone":"email");let o=s==this.registrationTab;return null===(l=s.querySelector("input"))||void 0===l||l.focus(),null===(a=this.modal)||void 0===a||a.setTitle(o?salla.lang.get("common.titles.registration"):this.title),o||t.toggleElementClassIf(this.regMobileBlock,"s-hidden","s-show",(()=>"phone"===this.regType)).toggleElementClassIf(this.regEmailBlock,"s-hidden","s-show",(()=>"email"===this.regType)),this}login(s,i){s.load().then((()=>s.disable())).then((()=>salla.auth.api.login(i))).then((()=>this.showTab(this.verifyTab))).then((()=>this.verifyTab.open(i))).finally((()=>s.stop()&&s.enable()))}async newUserValidation(){const s="phone"==this.regType,i=this.regEmail.value||"email"==this.regType&&this.loginEmail.value,l=t.isValidEmail(i),a=this.firstName.value.length>0,e=this.lastName.value.length>0,o=await this.regTelInput.isValid()||s&&await this.loginTelInput.isValid();if(!((i&&l||!i&&!this.isEmailRequired)&&o&&a&&e))throw!l&&this.validateField(this.regEmail,this.emailErrorMsg),!a&&this.validateField(this.firstName,this.firstNameErrorMsg),!e&&this.validateField(this.lastName,this.lastNameErrorMsg),"Please insert required fields"}validateField(s,i){s.classList.add("s-has-error"),s.nextElementSibling.innerText="* "+i}render(){return this.translationsLoaded?i("salla-modal",{id:"salla-login",icon:"sicon-user","modal-title":this.title,ref:s=>this.modal=s,width:"xs"},i("div",{class:"s-login-modal-wrapper"},this.isEmailAllowed&&this.isMobileAllowed?i("div",{class:"s-login-modal-tab",ref:s=>this.homeTab=s},i("p",{class:"s-login-modal-sub-title"},this.loginTypeTitle),i("slot",{name:"before-login-type"}),i("a",{href:"#",class:"s-login-modal-main-btn",onClick:s=>this.showTab(this.mobileTab,s)},i("i",{class:"s-login-modal-main-btn-icon sicon-phone"}),i("span",{class:"s-login-modal-main-btn-text"},this.smsLabel),i("i",{class:"sicon-keyboard_arrow_left arrow"})),i("a",{href:"#",class:"s-login-modal-main-btn",onClick:s=>this.showTab(this.emailTab,s)},i("i",{class:"s-login-modal-main-btn-icon sicon-mail"}),i("span",{class:"s-login-modal-main-btn-text"},this.emailLabel),i("i",{class:"sicon-keyboard_arrow_left arrow"})),i("slot",{name:"after-login-type"})):"",this.isMobileAllowed?i("div",{class:"s-login-modal-tab",ref:s=>this.mobileTab=s},i("slot",{name:"before-login-mobile"}),i("label",{class:"s-login-modal-label"},this.mobileLabel),i("salla-tel-input",{ref:s=>this.loginTelInput=s,onKeyDown:s=>this.typing(s,this.loginBySMS)}),i("salla-button",{"loader-position":"center",width:"wide",onClick:()=>this.loginBySMS(),ref:s=>this.smsBtn=s},salla.lang.get("blocks.header.enter")),this.isEmailAllowed?i("a",{href:"#",onClick:()=>this.showTab(this.emailTab),class:"s-login-modal-link"},this.byEmailText):"",i("slot",{name:"after-login-mobile"})):"",this.isEmailAllowed?i("div",{class:"s-login-modal-tab",ref:s=>this.emailTab=s},i("slot",{name:"before-login-email"}),i("label",{class:"s-login-modal-label"},this.emailLabel),i("input",{type:"email",ref:s=>this.loginEmail=s,onKeyDown:s=>this.typing(s,this.loginByEmail),placeholder:"your@email.com",class:"s-login-modal-input s-ltr"}),i("span",{class:"s-login-modal-error-message"}),i("salla-button",{"loader-position":"center",width:"wide",onClick:()=>this.loginByEmail(),ref:s=>this.emailBtn=s},salla.lang.get("blocks.header.enter")),this.isMobileAllowed?i("a",{href:"#",onClick:()=>this.showTab(this.mobileTab),class:"s-login-modal-link"},this.bySMSText):"",i("slot",{name:"after-login-email"})):"",i("salla-verify-modal",{withoutModal:!0,ref:s=>this.verifyTab=s,autoReload:!1},i("a",{onClick:()=>this.showTab("phone"==this.regType?this.mobileTab:this.emailTab),class:"s-verify-modal-back sicon-arrow-right",slot:"after-footer",href:"#"})),i("div",{ref:s=>this.registrationTab=s},i("slot",{name:"before-registration"}),i("div",null,i("label",{class:"s-login-modal-label"},this.firstNameLabel),i("input",{type:"text",class:"s-login-modal-input",ref:s=>this.firstName=s,onKeyDown:s=>this.typing(s,this.newUser),placeholder:salla.lang.get("pages.profile.first_name")}),i("span",{class:"s-login-modal-error-message"})),i("div",null,i("label",{class:"s-login-modal-label"},this.lastNameLabel),i("input",{type:"text",class:"s-login-modal-input",ref:s=>this.lastName=s,onKeyDown:s=>this.typing(s,this.newUser),placeholder:salla.lang.get("pages.profile.last_name")}),i("span",{class:"s-login-modal-error-message"})),i("div",{ref:s=>this.regMobileBlock=s,class:"mb-1.5"},i("label",{class:"s-login-modal-label"},this.mobileLabel),i("salla-tel-input",{ref:s=>this.regTelInput=s,onKeyDown:s=>this.typing(s,this.newUser)})),i("div",{ref:s=>this.regEmailBlock=s,class:"mb-1.5"},i("label",{class:"s-login-modal-label"},this.emailLabel),i("input",{type:"email",ref:s=>this.regEmail=s,onKeyDown:s=>this.typing(s,this.newUser),placeholder:"your@email.com",class:"s-login-modal-input s-ltr"}),i("span",{class:"s-login-modal-error-message"})),i("salla-button",{"loader-position":"center",width:"wide",onClick:()=>this.newUser(),ref:s=>this.regBtn=s},salla.lang.get("blocks.header.register")),i("slot",{name:"after-registration"})))):""}get host(){return l(this)}};a.style="[dir=ltr] #salla-login .s-login-modal-main-btn .arrow{display:inline-block;transform:scale(-1)}";export{a as salla_login_modal}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,b as a}from"./p-1d0e664c.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-37e0a91d",[[4,"salla-add-product-button",{channels:[513],quantity:[514],donatingAmount:[514,"donating-amount"],productId:[520,"product-id"],productStatus:[513,"product-status"],productType:[513,"product-type"],disabled:[516]}],[0,"salla-search",{inline:[4],oval:[4],height:[2],results:[32],placeholder:[32],noResultsText:[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{channels:[1],productId:[2,"product-id"],isSubscribed:[1028,"is-subscribed"],subTitle:[32],mobileLabel:[32],emailLabel:[32],emailPlaceholder:[32],subscribedMessage:[32],title_:[32],emailErrorMsg:[32],isVisitorSubscribed:[32]}],[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-button",{shape:[513],color:[513],fill:[513],size:[513],width:[513],loading:[516],disabled:[516],loaderPosition:[1,"loader-position"],wide:[4],href:[1],load:[64],stop:[64],setText:[64],disable:[64],enable:[64]}],[4,"salla-modal",{isClosable:[1028,"is-closable"],width:[513],position:[513],visible:[516],isLoading:[1540,"is-loading"],subTitleFirst:[4,"sub-title-first"],noPadding:[4,"no-padding"],subTitle:[1,"sub-title"],icon:[1],iconStyle:[1,"icon-style"],imageIcon:[1,"image-icon"],modalTitle:[32],open:[64],close:[64],setTitle:[64],loading:[64],stopLoading:[64]}]]],["p-
|
|
4
|
+
import{p as e,b as a}from"./p-1d0e664c.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-37e0a91d",[[4,"salla-add-product-button",{channels:[513],quantity:[514],donatingAmount:[514,"donating-amount"],productId:[520,"product-id"],productStatus:[513,"product-status"],productType:[513,"product-type"],disabled:[516]}],[0,"salla-search",{inline:[4],oval:[4],height:[2],results:[32],placeholder:[32],noResultsText:[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[0,"salla-product-availability",{channels:[1],productId:[2,"product-id"],isSubscribed:[1028,"is-subscribed"],subTitle:[32],mobileLabel:[32],emailLabel:[32],emailPlaceholder:[32],subscribedMessage:[32],title_:[32],emailErrorMsg:[32],isVisitorSubscribed:[32]}],[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-button",{shape:[513],color:[513],fill:[513],size:[513],width:[513],loading:[516],disabled:[516],loaderPosition:[1,"loader-position"],wide:[4],href:[1],load:[64],stop:[64],setText:[64],disable:[64],enable:[64]}],[4,"salla-modal",{isClosable:[1028,"is-closable"],width:[513],position:[513],visible:[516],isLoading:[1540,"is-loading"],subTitleFirst:[4,"sub-title-first"],noPadding:[4,"no-padding"],subTitle:[1,"sub-title"],icon:[1],iconStyle:[1,"icon-style"],imageIcon:[1,"image-icon"],modalTitle:[32],open:[64],close:[64],setTitle:[64],loading:[64],stopLoading:[64]}]]],["p-f0a1d8d8",[[4,"salla-login-modal",{isEmailAllowed:[1028,"is-email-allowed"],isMobileAllowed:[1028,"is-mobile-allowed"],isEmailRequired:[1028,"is-email-required"],title:[32],loginTypeTitle:[32],loginText:[32],smsLabel:[32],mobileLabel:[32],emailLabel:[32],enterText:[32],bySMSText:[32],byEmailText:[32],emailErrorMsg:[32],firstNameLabel:[32],lastNameLabel:[32],firstNameErrorMsg:[32],lastNameErrorMsg:[32],translationsLoaded:[32],open:[64]},[[8,"verified","onVerified"]]]]],["p-2384537d",[[0,"salla-rating-modal",{orderId:[2,"order-id"],order:[32],open:[64],close:[64]}]]],["p-210f5278",[[4,"salla-branches",{position:[1],displayAs:[1,"display-as"],browseProductsFrom:[1,"browse-products-from"],branches:[16],current:[1026],open:[32],selected:[32],isOpenedBefore:[32],show:[64],hide:[64]}]]],["p-74df54ad",[[0,"salla-localization-modal",{language:[1537],currency:[1537],languages:[32],currencies:[32],languagesTitle:[32],currenciesTitle:[32],isLoading:[32],open:[64],close:[64],submit:[64]}]]],["p-cf78ba07",[[0,"salla-offer-modal",{offer:[32],offer_name:[32],offer_message:[32],offer_expires_in:[32],remember_my_choice:[32],add_to_cart:[32],out_of_stock:[32],open:[64],showOffer:[64]}]]],["p-d77dd260",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-56065da6",[[4,"salla-infinite-scroll",{nextPage:[1,"next-page"],autoload:[1028],container:[1],item:[1],loadMore:[32],noMore:[32],failedToLoad:[32]}]]],["p-04c4dadb",[[0,"salla-installment",{price:[1],language:[1],currency:[1],tamaraIsActive:[32],tabbyIsActive:[32],spotiiIsActive:[32]}]]],["p-edbb12b2",[[4,"salla-quantity-input",{quantity:[32],decrease:[64],increase:[64],setValue:[64]}]]],["p-d762e16f",[[1,"salla-sizes-table"]]],["p-8264d586",[[4,"salla-verify-modal",{withoutModal:[4,"without-modal"],type:[1025],autoReload:[4,"auto-reload"],title:[32],isProfileVerify:[32],getCode:[64],open:[64]}]]],["p-ecaee6a4",[[0,"salla-rating-stars",{name:[1],size:[1],value:[2]}]]]],e)));
|
|
@@ -56,6 +56,7 @@ export declare class SallaLoginModal {
|
|
|
56
56
|
lastNameLabel: string;
|
|
57
57
|
firstNameErrorMsg: string;
|
|
58
58
|
lastNameErrorMsg: string;
|
|
59
|
+
translationsLoaded: boolean;
|
|
59
60
|
/**
|
|
60
61
|
* @param {CustomEvent|{details:{case:'new_customer'|'authenticated', redirect_url:string|null}}} event
|
|
61
62
|
*/
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,h as o,H as a}from"./p-1d0e664c.js";const r=class{constructor(o){t(this,o),this.language=salla.config.get("user.language_code"),this.currency=salla.config.get("user.currency_code"),salla.onReady((()=>{const t=salla.config.get("store.settings.installments");this.tamaraIsActive=-1!=t.indexOf("tamara_installment"),this.tabbyIsActive=-1!=t.indexOf("tabby_installment"),this.spotiiIsActive=-1!=t.indexOf("spotii_pay")}))}render(){return o(a,null,this.tamaraIsActive?o("div",{class:"tamara-product-widget","data-price":this.price,"data-currency":this.currency,"data-lang":this.language,"data-payment-type":"installment"}):"",this.tabbyIsActive?o("div",{id:"tabbyPromoWrapper"},o("div",{id:"tabbyPromo"})):"",this.spotiiIsActive?o("div",{class:"spotii-wrapper"},o("div",{class:"spotii-promo"},this.price)):"")}componentDidLoad(){var t;this.tamaraIsActive&&((t=document.createElement("script")).setAttribute("src","https://cdn.tamara.co/widget/product-widget.min.js"),document.head.appendChild(t),t.onload=()=>{window.TamaraProductWidget.init({lang:this.language}),setTimeout((()=>{window.TamaraProductWidget.render()}),300)}),this.tabbyIsActive&&((t=document.createElement("script")).setAttribute("src","https://checkout.tabby.ai/tabby-promo.js"),document.head.appendChild(t),t.onload=()=>{new(0,window.TabbyPromo)({selector:"#tabbyPromo",currency:this.currency,price:this.price,lang:this.language}),document.querySelectorAll(".tabby-promo-snippet__logo").forEach((function(t){t.setAttribute("aria-label","Tabby Logo")}))}),this.spotiiIsActive&&(window.spotiiConfig={targetXPath:[".spotii-wrapper"],renderToPath:[".spotii-promo"],currency:this.currency},(t=document.createElement("script")).setAttribute("src","https://store.test/themes/default/assets/js/price-widget-ar-salla.js"),document.head.appendChild(t))}};r.style="#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;padding:15px;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--color-text);font-size:var(--font-sm);line-height:1.25;padding:18px 20px 18px 100px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm);margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px;top:18px;margin:0 !important}.ltr .tamara-product-widget .tamara-logo{right:20px;left:auto}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}";export{r as salla_installment}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{r as s,h as i,g as l}from"./p-1d0e664c.js";import{H as t}from"./p-9d2ca9c8.js";const a=class{constructor(i){s(this,i),this.isEmailAllowed=salla.config.get("store.settings.auth.email_allowed",!0),this.isMobileAllowed=salla.config.get("store.settings.auth.mobile_allowed",!0),this.isEmailRequired=salla.config.get("store.settings.auth.is_email_required",!1),this.regType="phone",this.title=salla.lang.get("blocks.header.login"),this.loginTypeTitle=salla.lang.get("blocks.header.select_login_way"),this.loginText=salla.lang.get("blocks.header.login"),this.smsLabel=salla.lang.get("blocks.header.sms"),this.mobileLabel=salla.lang.get("common.elements.mobile"),this.emailLabel=salla.lang.get("common.elements.email"),this.enterText=salla.lang.get("blocks.header.enter"),this.bySMSText=salla.lang.get("blocks.header.login_by_sms"),this.byEmailText=salla.lang.get("blocks.header.login_by_email"),this.emailErrorMsg=salla.lang.get("common.elements.email_is_valid"),this.firstNameLabel=salla.lang.get("blocks.header.your_name"),this.lastNameLabel=salla.lang.get("pages.profile.last_name"),this.firstNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:this.firstNameLabel}),this.lastNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:this.lastNameLabel}),this.typing=(s,i)=>{const l=s.target.nextElementSibling;s.target.classList.remove("s-has-error"),(null==l?void 0:l.classList.contains("s-login-modal-error-message"))&&(l.innerText=""),"Enter"==s.key&&i()},this.loginBySMS=async()=>{const{phone:s,countryCode:i}=await this.loginTelInput.getValues();await this.loginTelInput.isValid()&&this.login(this.smsBtn,{type:"mobile",phone:s,country_code:i})},this.loginByEmail=()=>{t.isValidEmail(this.loginEmail.value)?this.login(this.emailBtn,{type:"email",email:this.loginEmail.value}):this.validateField(this.loginEmail,this.emailErrorMsg)},this.newUser=async()=>{var s;const{phone:i,countryCode:l}="email"==this.regType?await this.regTelInput.getValues():await this.loginTelInput.getValues(),t=this.regEmail.value||(null===(s=this.loginEmail)||void 0===s?void 0:s.value);await this.newUserValidation(),await this.regBtn.load(),await this.regBtn.disable();let a={first_name:this.firstName.value,last_name:this.lastName.value,phone:i||this.loginTelInput.phone,country_code:l,verified_by:this.regType};t&&(a=Object.assign(Object.assign({},a),{email:t})),this.verifyTab.getCode().then((s=>salla.auth.api.register(Object.assign(Object.assign({},a),{code:s})))).then((()=>salla.auth.canRedirect&&window.location.reload())).catch((()=>this.regBtn.stop()&&this.regBtn.enable()))},this.title=this.host.title||salla.lang.get("blocks.header.login"),this.host.removeAttribute("title"),salla.lang.onLoaded((()=>{var s,i,l,t;this.title=salla.lang.get("blocks.header.login"),this.loginTypeTitle=salla.lang.get("blocks.header.select_login_way"),this.loginText=salla.lang.get("blocks.header.login"),this.smsLabel=salla.lang.get("blocks.header.sms"),this.mobileLabel=salla.lang.get("common.elements.mobile"),this.emailLabel=salla.lang.get("common.elements.email"),this.bySMSText=salla.lang.get("blocks.header.login_by_sms"),this.byEmailText=salla.lang.get("blocks.header.login_by_email"),this.emailErrorMsg=salla.lang.get("common.elements.email_is_valid"),this.firstNameLabel=salla.lang.get("blocks.header.your_name"),this.lastNameLabel=salla.lang.get("pages.profile.last_name"),this.firstNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:this.firstNameLabel}),this.lastNameErrorMsg=salla.lang.get("common.errors.field_required",{attribute:this.lastNameLabel}),null===(s=this.modal)||void 0===s||s.setTitle(this.title),null===(i=this.smsBtn)||void 0===i||i.setText(salla.lang.get("blocks.header.enter")),null===(l=this.emailBtn)||void 0===l||l.setText(salla.lang.get("blocks.header.enter")),null===(t=this.regBtn)||void 0===t||t.setText(salla.lang.get("blocks.header.register"))})),salla.auth.event.onVerificationFailed((()=>{})),salla.event.on("login::open",(()=>this.open())),salla.event.on("twilight::initiated",(()=>{this.isEmailAllowed=salla.config.get("store.settings.auth.email_allowed",!!this.isEmailAllowed),this.isMobileAllowed=salla.config.get("store.settings.auth.mobile_allowed",!!this.isMobileAllowed),this.isEmailRequired=salla.config.get("store.settings.auth.is_email_required",!!this.isEmailRequired)}))}onVerified(s){var i,l;salla.log("verified",s);let t=(null===(i=s.detail)||void 0===i?void 0:i.data.case)||(null===(l=s.detail)||void 0===l?void 0:l.error.case);if(t){if("new_customer"===t)return this.showTab(this.registrationTab);if(salla.auth.canRedirect())return s.detail.data.redirect_url?window.location.href=s.data.redirect_url:void window.location.reload();salla.log("Will not auto redirect or reload, due to `salla.auth.canRedirect()`")}else salla.log("verified but without case!")}async open(){return this.isEmailAllowed&&this.isMobileAllowed?this.showTab(this.homeTab):this.isEmailAllowed?this.showTab(this.emailTab):this.isMobileAllowed&&this.showTab(this.mobileTab),this.modal.open()}showTab(s,i){var l,a;null==i||i.preventDefault();let e=[this.homeTab,this.mobileTab,this.emailTab,this.verifyTab,this.registrationTab];e.map((i=>t.toggleElementClassIf(i,"visible","s-hidden",(()=>i==s)))),setTimeout((()=>e.map((i=>t.toggleElementClassIf(i,"s-login-modal-active","s-login-modal-unactive",(()=>i==s))))),200),setTimeout((()=>{var i;return null===(i=document.querySelector(".s-login-modal-wrapper"))||void 0===i?void 0:i.setAttribute("style","height:"+(null==s?void 0:s.scrollHeight)+"px")})),[this.mobileTab,this.emailTab].includes(s)&&(this.regType=s===this.mobileTab?"phone":"email");let o=s==this.registrationTab;return null===(l=s.querySelector("input"))||void 0===l||l.focus(),null===(a=this.modal)||void 0===a||a.setTitle(o?salla.lang.get("common.titles.registration"):this.title),o||t.toggleElementClassIf(this.regMobileBlock,"s-hidden","s-show",(()=>"phone"===this.regType)).toggleElementClassIf(this.regEmailBlock,"s-hidden","s-show",(()=>"email"===this.regType)),this}login(s,i){s.load().then((()=>s.disable())).then((()=>salla.auth.api.login(i))).then((()=>this.showTab(this.verifyTab))).then((()=>this.verifyTab.open(i))).finally((()=>s.stop()&&s.enable()))}async newUserValidation(){const s="phone"==this.regType,i=this.regEmail.value||"email"==this.regType&&this.loginEmail.value,l=t.isValidEmail(i),a=this.firstName.value.length>0,e=this.lastName.value.length>0,o=await this.regTelInput.isValid()||s&&await this.loginTelInput.isValid();if(!((i&&l||!i&&!this.isEmailRequired)&&o&&a&&e))throw!l&&this.validateField(this.regEmail,this.emailErrorMsg),!a&&this.validateField(this.firstName,this.firstNameErrorMsg),!e&&this.validateField(this.lastName,this.lastNameErrorMsg),"Please insert required fields"}validateField(s,i){s.classList.add("s-has-error"),s.nextElementSibling.innerText="* "+i}render(){return i("salla-modal",{id:"salla-login",icon:"sicon-user","modal-title":this.title,ref:s=>this.modal=s,width:"xs"},i("div",{class:"s-login-modal-wrapper"},this.isEmailAllowed&&this.isMobileAllowed?i("div",{class:"s-login-modal-tab",ref:s=>this.homeTab=s},i("p",{class:"s-login-modal-sub-title"},this.loginTypeTitle),i("slot",{name:"before-login-type"}),i("a",{href:"#",class:"s-login-modal-main-btn",onClick:s=>this.showTab(this.mobileTab,s)},i("i",{class:"s-login-modal-main-btn-icon sicon-phone"}),i("span",{class:"s-login-modal-main-btn-text"},this.smsLabel),i("i",{class:"sicon-keyboard_arrow_left arrow"})),i("a",{href:"#",class:"s-login-modal-main-btn",onClick:s=>this.showTab(this.emailTab,s)},i("i",{class:"s-login-modal-main-btn-icon sicon-mail"}),i("span",{class:"s-login-modal-main-btn-text"},this.emailLabel),i("i",{class:"sicon-keyboard_arrow_left arrow"})),i("slot",{name:"after-login-type"})):"",this.isMobileAllowed?i("div",{class:"s-login-modal-tab",ref:s=>this.mobileTab=s},i("slot",{name:"before-login-mobile"}),i("label",{class:"s-login-modal-label"},this.mobileLabel),i("salla-tel-input",{ref:s=>this.loginTelInput=s,onKeyDown:s=>this.typing(s,this.loginBySMS)}),i("salla-button",{"loader-position":"center",width:"wide",onClick:()=>this.loginBySMS(),ref:s=>this.smsBtn=s},salla.lang.get("blocks.header.enter")),this.isEmailAllowed?i("a",{href:"#",onClick:()=>this.showTab(this.emailTab),class:"s-login-modal-link"},this.byEmailText):"",i("slot",{name:"after-login-mobile"})):"",this.isEmailAllowed?i("div",{class:"s-login-modal-tab",ref:s=>this.emailTab=s},i("slot",{name:"before-login-email"}),i("label",{class:"s-login-modal-label"},this.emailLabel),i("input",{type:"email",ref:s=>this.loginEmail=s,onKeyDown:s=>this.typing(s,this.loginByEmail),placeholder:"your@email.com",class:"s-login-modal-input s-ltr"}),i("span",{class:"s-login-modal-error-message"}),i("salla-button",{"loader-position":"center",width:"wide",onClick:()=>this.loginByEmail(),ref:s=>this.emailBtn=s},salla.lang.get("blocks.header.enter")),this.isMobileAllowed?i("a",{href:"#",onClick:()=>this.showTab(this.mobileTab),class:"s-login-modal-link"},this.bySMSText):"",i("slot",{name:"after-login-email"})):"",i("salla-verify-modal",{withoutModal:!0,ref:s=>this.verifyTab=s,autoReload:!1},i("a",{onClick:()=>this.showTab("phone"==this.regType?this.mobileTab:this.emailTab),class:"s-verify-modal-back sicon-arrow-right",slot:"after-footer",href:"#"})),i("div",{ref:s=>this.registrationTab=s},i("slot",{name:"before-registration"}),i("div",null,i("label",{class:"s-login-modal-label"},this.firstNameLabel),i("input",{type:"text",class:"s-login-modal-input",ref:s=>this.firstName=s,onKeyDown:s=>this.typing(s,this.newUser),placeholder:salla.lang.get("pages.profile.first_name")}),i("span",{class:"s-login-modal-error-message"})),i("div",null,i("label",{class:"s-login-modal-label"},this.lastNameLabel),i("input",{type:"text",class:"s-login-modal-input",ref:s=>this.lastName=s,onKeyDown:s=>this.typing(s,this.newUser),placeholder:salla.lang.get("pages.profile.last_name")}),i("span",{class:"s-login-modal-error-message"})),i("div",{ref:s=>this.regMobileBlock=s,class:"mb-1.5"},i("label",{class:"s-login-modal-label"},this.mobileLabel),i("salla-tel-input",{ref:s=>this.regTelInput=s,onKeyDown:s=>this.typing(s,this.newUser)})),i("div",{ref:s=>this.regEmailBlock=s,class:"mb-1.5"},i("label",{class:"s-login-modal-label"},this.emailLabel),i("input",{type:"email",ref:s=>this.regEmail=s,onKeyDown:s=>this.typing(s,this.newUser),placeholder:"your@email.com",class:"s-login-modal-input s-ltr"}),i("span",{class:"s-login-modal-error-message"})),i("salla-button",{"loader-position":"center",width:"wide",onClick:()=>this.newUser(),ref:s=>this.regBtn=s},salla.lang.get("blocks.header.register")),i("slot",{name:"after-registration"}))))}get host(){return l(this)}};a.style="[dir=ltr] #salla-login .s-login-modal-main-btn .arrow{display:inline-block;transform:scale(-1)}";export{a as salla_login_modal}
|