@salla.sa/twilight-components 1.0.43 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-branches.cjs.entry.js +1 -1
- package/dist/cjs/salla-button_7.cjs.entry.js +22 -19
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +6 -3
- package/dist/cjs/salla-offer.cjs.entry.js +2 -2
- package/dist/cjs/salla-product-availability.cjs.entry.js +4 -1
- package/dist/cjs/salla-rating.cjs.entry.js +2 -2
- package/dist/cjs/{salla-search-ccb22487.js → salla-search-6f5cbe1d.js} +2 -2
- package/dist/cjs/twilight-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/salla-branches/salla-branches.css +4 -3
- package/dist/collection/components/salla-button/salla-button.css +13 -3
- package/dist/collection/components/salla-button/salla-button.js +2 -2
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.css +13 -0
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +9 -3
- package/dist/collection/components/salla-localization/salla-localization.css +13 -0
- package/dist/collection/components/salla-localization/salla-localization.js +6 -0
- package/dist/collection/components/salla-login/salla-login.css +4 -0
- package/dist/collection/components/salla-login/salla-login.js +1 -1
- package/dist/collection/components/salla-modal/salla-modal.css +13 -0
- package/dist/collection/components/salla-modal/salla-modal.js +1 -1
- package/dist/collection/components/salla-offer/salla-offer.css +8 -6
- package/dist/collection/components/salla-offer/salla-offer.js +1 -1
- package/dist/collection/components/salla-product-availability/salla-product-availability.css +14 -0
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +7 -1
- package/dist/collection/components/salla-rating/salla-rating.css +14 -5
- package/dist/collection/components/salla-rating/salla-rating.js +2 -2
- package/dist/collection/components/salla-search/salla-search.css +9 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.css +13 -0
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +8 -2
- package/dist/collection/components/salla-verify-modal/salla-verify-modal.css +13 -0
- package/dist/collection/components/{salla-verify/salla-verify.js → salla-verify-modal/salla-verify-modal.js} +23 -18
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-branches.entry.js +1 -1
- package/dist/esm/salla-button_7.entry.js +22 -19
- package/dist/esm/salla-infinite-scroll.entry.js +6 -3
- package/dist/esm/salla-offer.entry.js +2 -2
- package/dist/esm/salla-product-availability.entry.js +4 -1
- package/dist/esm/salla-rating.entry.js +2 -2
- package/dist/esm/{salla-search-76576226.js → salla-search-20950451.js} +2 -2
- package/dist/esm/twilight-components.js +1 -1
- package/dist/twilight-components/index.esm.js +1 -1
- package/dist/twilight-components/p-026df146.entry.js +1 -0
- package/dist/twilight-components/p-152b7287.entry.js +1 -0
- package/dist/twilight-components/{p-05ae4493.js → p-212c18bc.js} +1 -1
- package/dist/twilight-components/{p-91c688dc.entry.js → p-b584e892.entry.js} +1 -1
- package/dist/twilight-components/{p-2fefc616.entry.js → p-c0a7b5a2.entry.js} +1 -1
- package/dist/twilight-components/{p-34cec109.entry.js → p-e6c67b55.entry.js} +1 -1
- package/dist/twilight-components/p-f89bc866.entry.js +1 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/{salla-verify/salla-verify.d.ts → salla-verify-modal/salla-verify-modal.d.ts} +1 -1
- package/dist/types/components.d.ts +9 -9
- package/package.json +1 -1
- package/dist/twilight-components/p-4d860705.entry.js +0 -1
- package/dist/twilight-components/p-b127c46b.entry.js +0 -1
- package/dist/twilight-components/p-d866b13e.entry.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["salla-button_7.cjs",[[4,"salla-login",{"isEmailAllowed":[4,"is-email-allowed"],"isMobileAllowed":[4,"is-mobile-allowed"],"isEmailRequired":[4,"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],"show":[64]},[[0,"verified","onVerified"]]],[0,"salla-localization",{"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}],[0,"salla-search",{"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-verify",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}],[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"countryKey":[1025,"country-key"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-button",{"btnStyle":[513,"btn-style"],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"error":[4],"success":[4],"primary":[4],"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],"imageIcon":[1,"image-icon"],"title":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-product-availability.cjs",[[4,"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]}]]],["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-offer.cjs",[[0,"salla-offer",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"show":[64],"showOffer":[64]}]]],["salla-rating.cjs",[[0,"salla-rating",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["salla-button_7.cjs",[[4,"salla-login",{"isEmailAllowed":[4,"is-email-allowed"],"isMobileAllowed":[4,"is-mobile-allowed"],"isEmailRequired":[4,"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],"show":[64]},[[0,"verified","onVerified"]]],[0,"salla-localization",{"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}],[0,"salla-search",{"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}],[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"countryKey":[1025,"country-key"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-button",{"btnStyle":[513,"btn-style"],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"error":[4],"success":[4],"primary":[4],"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],"imageIcon":[1,"image-icon"],"title":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-product-availability.cjs",[[4,"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]}]]],["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-offer.cjs",[[0,"salla-offer",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"show":[64],"showOffer":[64]}]]],["salla-rating.cjs",[[0,"salla-rating",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0b5b5867.js');
|
|
6
6
|
const Helper = require('./Helper-98cc9f18.js');
|
|
7
|
-
const sallaSearch = require('./salla-search-
|
|
7
|
+
const sallaSearch = require('./salla-search-6f5cbe1d.js');
|
|
8
8
|
|
|
9
|
-
const sallaButtonCss = "
|
|
9
|
+
const sallaButtonCss = "";
|
|
10
10
|
|
|
11
11
|
const SallaButton = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -98,7 +98,7 @@ const SallaButton = class {
|
|
|
98
98
|
render() {
|
|
99
99
|
return (
|
|
100
100
|
//TODO:: use HOST then fake button behaviours
|
|
101
|
-
index.h(index.Host, { class: "s-button-
|
|
101
|
+
index.h(index.Host, { class: "s-button-wrap" }, index.h("button", Object.assign({ ref: btn => this.btn = btn, disabled: this.disabled }, this.hostAttributes), index.h("span", { class: "s-button-text", ref: el => this.text = el }, index.h("slot", null)), this.loading ? index.h("span", { class: {
|
|
102
102
|
//todo::use united styles
|
|
103
103
|
's-button-loader': true,
|
|
104
104
|
's-button-loader-start': this.loaderPosition === 'start',
|
|
@@ -114,6 +114,8 @@ const SallaButton = class {
|
|
|
114
114
|
};
|
|
115
115
|
SallaButton.style = sallaButtonCss;
|
|
116
116
|
|
|
117
|
+
const sallaLocalizationCss = "";
|
|
118
|
+
|
|
117
119
|
const SallaLocalization = class {
|
|
118
120
|
constructor(hostRef) {
|
|
119
121
|
index.registerInstance(this, hostRef);
|
|
@@ -207,6 +209,7 @@ const SallaLocalization = class {
|
|
|
207
209
|
}
|
|
208
210
|
get host() { return index.getElement(this); }
|
|
209
211
|
};
|
|
212
|
+
SallaLocalization.style = sallaLocalizationCss;
|
|
210
213
|
|
|
211
214
|
const sallaModalCss = "";
|
|
212
215
|
|
|
@@ -336,7 +339,7 @@ const SallaModal = class {
|
|
|
336
339
|
//todo:: pref for each modal
|
|
337
340
|
render() {
|
|
338
341
|
this.host.id = this.host.id || 'salla-modal';
|
|
339
|
-
return (index.h(index.Host, { class: 's-modal-container s-hidden', "aria-modal": "true", role: "dialog" }, index.h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal() }), index.h("div", { class: "s-modal-wrapper" }, index.h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"), index.h("div", { class: 's-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.width + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding') }, this.isLoading ?
|
|
342
|
+
return (index.h(index.Host, { class: 'salla-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog" }, index.h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal() }), index.h("div", { class: "s-modal-wrapper" }, index.h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"), index.h("div", { class: 's-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.width + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding') }, this.isLoading ?
|
|
340
343
|
index.h("div", { class: "s-modal-loader-wrap" }, index.h("span", { class: "s-modal-loader" }))
|
|
341
344
|
:
|
|
342
345
|
[
|
|
@@ -1731,6 +1734,8 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
|
|
|
1731
1734
|
*/
|
|
1732
1735
|
var intlTelInput = intlTelInput$1;
|
|
1733
1736
|
|
|
1737
|
+
const sallaTelInputCss = "";
|
|
1738
|
+
|
|
1734
1739
|
const SallaTelInput = class {
|
|
1735
1740
|
constructor(hostRef) {
|
|
1736
1741
|
index.registerInstance(this, hostRef);
|
|
@@ -1819,15 +1824,18 @@ const SallaTelInput = class {
|
|
|
1819
1824
|
}
|
|
1820
1825
|
;
|
|
1821
1826
|
render() {
|
|
1822
|
-
return (index.h(index.Host,
|
|
1827
|
+
return (index.h(index.Host, { id: "s-tel-input" }, index.h("input", { type: "tel", name: "mobile", value: this.mobile, ref: el => this.phoneInput = el, class: "s-tel-input-control tel-input s-ltr" }), index.h("span", { class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), index.h("input", { type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" }), index.h("input", { type: "hidden", name: "country_key", value: this.countryKey, ref: el => this.countryKeyInput = el, class: "country_key" })));
|
|
1823
1828
|
}
|
|
1824
1829
|
componentDidLoad() {
|
|
1825
1830
|
this.initTelInput();
|
|
1826
1831
|
}
|
|
1827
1832
|
get host() { return index.getElement(this); }
|
|
1828
1833
|
};
|
|
1834
|
+
SallaTelInput.style = sallaTelInputCss;
|
|
1835
|
+
|
|
1836
|
+
const sallaVerifyModalCss = "";
|
|
1829
1837
|
|
|
1830
|
-
const
|
|
1838
|
+
const SallaVerifyModal = class {
|
|
1831
1839
|
constructor(hostRef) {
|
|
1832
1840
|
index.registerInstance(this, hostRef);
|
|
1833
1841
|
this.verified = index.createEvent(this, "verified", 7);
|
|
@@ -1871,10 +1879,10 @@ const SallaVerify = class {
|
|
|
1871
1879
|
var _a;
|
|
1872
1880
|
this.data = data;
|
|
1873
1881
|
this.resendTimer();
|
|
1874
|
-
this.otpInputs = this.host.querySelectorAll('.s-verify-input');
|
|
1882
|
+
this.otpInputs = this.host.querySelectorAll('.s-verify-modal-input');
|
|
1875
1883
|
if (!this.initiated) {
|
|
1876
|
-
Helper.Helper.on('input', '.s-verify-input', e => salla.helpers.digitsOnly(e.target));
|
|
1877
|
-
Helper.Helper.onKeyUp('.s-verify-input', event => {
|
|
1884
|
+
Helper.Helper.on('input', '.s-verify-modal-input', e => salla.helpers.digitsOnly(e.target));
|
|
1885
|
+
Helper.Helper.onKeyUp('.s-verify-modal-input', event => {
|
|
1878
1886
|
var _a, _b, _c, _d;
|
|
1879
1887
|
let key = event.keyCode || event.charCode;
|
|
1880
1888
|
if (event.target.value) {
|
|
@@ -1887,7 +1895,7 @@ const SallaVerify = class {
|
|
|
1887
1895
|
}
|
|
1888
1896
|
this.toggleOTPSubmit();
|
|
1889
1897
|
});
|
|
1890
|
-
Helper.Helper.on('paste', '.s-verify-input', event => {
|
|
1898
|
+
Helper.Helper.on('paste', '.s-verify-modal-input', event => {
|
|
1891
1899
|
let text = event.clipboardData.getData('text').toArabicDigits().replace(/[^0-9.]/g, '').replace('..', '.');
|
|
1892
1900
|
this.otpInputs.forEach((input, i) => input.value = text[i] || '');
|
|
1893
1901
|
this.toggleOTPSubmit();
|
|
@@ -1956,19 +1964,14 @@ const SallaVerify = class {
|
|
|
1956
1964
|
}
|
|
1957
1965
|
render() {
|
|
1958
1966
|
return this.withoutModal ? this.myBody() :
|
|
1959
|
-
index.h("salla-modal", { icon: "sicon-android-phone", width: "xs", id: "s-verify", ref: modal => this.modal = modal, title: this.title }, this.myBody());
|
|
1967
|
+
index.h("salla-modal", { icon: "sicon-android-phone", width: "xs", id: "s-verify-modal", ref: modal => this.modal = modal, title: this.title }, this.myBody());
|
|
1960
1968
|
}
|
|
1961
1969
|
myBody() {
|
|
1962
|
-
return [
|
|
1963
|
-
index.h("div", { class: "s-verify-message", innerHTML: salla.lang.get('pages.profile.verify_message') }),
|
|
1964
|
-
index.h("input", { type: "hidden", name: "code", maxlength: "4", required: true, ref: code => this.code = code }),
|
|
1965
|
-
index.h("div", { class: "s-verify-codes", dir: "ltr" }, [1, 2, 3, 4].map(() => index.h("input", { type: "text", maxlength: "1", class: "s-verify-input", required: true }))),
|
|
1966
|
-
index.h("div", { slot: "footer", class: "s-verify-footer" }, index.h("salla-button", { class: "s-verify-submit", "loader-position": 'center', disabled: true, onClick: () => this.submit(), ref: b => this.btn = b }, salla.lang.get('pages.profile.verify')), index.h("p", { class: "s-verify-resend-message", ref: el => this.resendMessage = el }, salla.lang.get('blocks.header.resend_after'), index.h("b", { class: "s-verify-timer", ref: el => this.timer = el })), index.h("a", { href: "#", class: "s-verify-resend", onClick: () => this.resendCode(), ref: el => this.resend = el }, salla.lang.get('blocks.comments.submit'))),
|
|
1967
|
-
index.h("slot", { name: "after-footer" })
|
|
1968
|
-
];
|
|
1970
|
+
return (index.h(index.Host, { id: "s-verify-modal" }, index.h("div", { class: "s-verify-modal-message", innerHTML: salla.lang.get('pages.profile.verify_message') }), index.h("input", { type: "hidden", name: "code", maxlength: "4", required: true, ref: code => this.code = code }), index.h("div", { class: "s-verify-modal-codes", dir: "ltr" }, [1, 2, 3, 4].map(() => index.h("input", { type: "text", maxlength: "1", class: "s-verify-modal-input", required: true }))), index.h("div", { slot: "footer", class: "s-verify-modal-footer" }, index.h("salla-button", { class: "s-verify-modal-submit", "loader-position": 'center', disabled: true, onClick: () => this.submit(), ref: b => this.btn = b }, salla.lang.get('pages.profile.verify')), index.h("p", { class: "s-verify-modal-resend-message", ref: el => this.resendMessage = el }, salla.lang.get('blocks.header.resend_after'), index.h("b", { class: "s-verify-modal-timer", ref: el => this.timer = el })), index.h("a", { href: "#", class: "s-verify-modal-resend", onClick: () => this.resendCode(), ref: el => this.resend = el }, salla.lang.get('blocks.comments.submit'))), index.h("slot", { name: "after-footer" })));
|
|
1969
1971
|
}
|
|
1970
1972
|
get host() { return index.getElement(this); }
|
|
1971
1973
|
};
|
|
1974
|
+
SallaVerifyModal.style = sallaVerifyModalCss;
|
|
1972
1975
|
|
|
1973
1976
|
exports.salla_login = sallaSearch.SallaLogin;
|
|
1974
1977
|
exports.salla_search = sallaSearch.SallaSearch;
|
|
@@ -1976,4 +1979,4 @@ exports.salla_button = SallaButton;
|
|
|
1976
1979
|
exports.salla_localization = SallaLocalization;
|
|
1977
1980
|
exports.salla_modal = SallaModal;
|
|
1978
1981
|
exports.salla_tel_input = SallaTelInput;
|
|
1979
|
-
exports.
|
|
1982
|
+
exports.salla_verify_modal = SallaVerifyModal;
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-0b5b5867.js');
|
|
6
6
|
const Helper = require('./Helper-98cc9f18.js');
|
|
7
7
|
|
|
8
|
+
const sallaInfiniteScrollCss = "";
|
|
9
|
+
|
|
8
10
|
const SallaInfiniteScroll = class {
|
|
9
11
|
constructor(hostRef) {
|
|
10
12
|
index.registerInstance(this, hostRef);
|
|
@@ -31,9 +33,9 @@ const SallaInfiniteScroll = class {
|
|
|
31
33
|
<p class="s-infinite-scroll-last infinite-scroll-last"></p>
|
|
32
34
|
<p class="s-infinite-scroll-error infinite-scroll-error"></p>
|
|
33
35
|
</div>
|
|
34
|
-
<a href="${this.nextPage}" class="s-button-btn btn--has-loading s-button-primary">
|
|
35
|
-
<span class="s-button-text">${salla.lang.get('common.elements.load_more')}</span>
|
|
36
|
-
<span class="s-button-loader s-button-loader-center" style="display: none"></span>
|
|
36
|
+
<a href="${this.nextPage}" class="s-infinite-scroll-btn s-button-btn btn--has-loading s-button-primary">
|
|
37
|
+
<span class="s-button-text s-infinite-scroll-btn-text">${salla.lang.get('common.elements.load_more')}</span>
|
|
38
|
+
<span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" style="display: none"></span>
|
|
37
39
|
</a>`;
|
|
38
40
|
this.btnLoader = this.status.querySelector('.s-button-loader');
|
|
39
41
|
salla.event.on('languages::translations.loaded', () => {
|
|
@@ -86,5 +88,6 @@ const SallaInfiniteScroll = class {
|
|
|
86
88
|
}
|
|
87
89
|
get host() { return index.getElement(this); }
|
|
88
90
|
};
|
|
91
|
+
SallaInfiniteScroll.style = sallaInfiniteScrollCss;
|
|
89
92
|
|
|
90
93
|
exports.salla_infinite_scroll = SallaInfiniteScroll;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-0b5b5867.js');
|
|
6
6
|
const Helper = require('./Helper-98cc9f18.js');
|
|
7
7
|
|
|
8
|
-
const sallaOfferCss = ".s-offer-body{-webkit-overflow-scrolling:touch}.s-offer-body::-webkit-scrollbar{display:none}.s-offer-next-btn{background:linear-gradient(90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%)}.s-offer-prev-btn{background:linear-gradient(-90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%)}";
|
|
8
|
+
const sallaOfferCss = "#salla-offer-modal .s-offer-body{-webkit-overflow-scrolling:touch}#salla-offer-modal .s-offer-body::-webkit-scrollbar{display:none}#salla-offer-modal .s-offer-next-btn{background:linear-gradient(90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%)}#salla-offer-modal .s-offer-prev-btn{background:linear-gradient(-90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%)}";
|
|
9
9
|
|
|
10
10
|
const SallaOffer = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -68,7 +68,7 @@ const SallaOffer = class {
|
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
70
|
var _a, _b;
|
|
71
|
-
return index.h("salla-modal", { "sub-title-first": true, icon: "sicon-special-discount", title: "\u0639\u0631\u0648\u0636 \u0631\u0627\u0626\u0639\u0629 \u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631\u0643\u060C \u0645\u0627\u0630\u0627 \u0646\u062A\u0646\u0638\u0631!", "sub-title": this.offer_message, ref: modal => this.modal = modal, "is-loading": this.offer === null }, this.offer !== null
|
|
71
|
+
return index.h("salla-modal", { id: "salla-offer-modal", "sub-title-first": true, icon: "sicon-special-discount", title: "\u0639\u0631\u0648\u0636 \u0631\u0627\u0626\u0639\u0629 \u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631\u0643\u060C \u0645\u0627\u0630\u0627 \u0646\u062A\u0646\u0638\u0631!", "sub-title": this.offer_message, ref: modal => this.modal = modal, "is-loading": this.offer === null }, this.offer !== null
|
|
72
72
|
? [index.h("div", { class: "s-offer-scrolled-slider-wrap" }, index.h("div", { class: "s-offer-body s-offer-scrolled-slider" }, ((_a = this.offer.get.categories) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
73
73
|
? this.offer.get.categories.map(category => index.h("a", { href: category.urls.customer, class: "s-offer-badge s-offer-slider-item", innerHTML: this.categorySlot
|
|
74
74
|
.replace(/\{name\}/g, category.name)
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-0b5b5867.js');
|
|
6
6
|
const Helper = require('./Helper-98cc9f18.js');
|
|
7
7
|
|
|
8
|
+
const sallaProductAvailabilityCss = "";
|
|
9
|
+
|
|
8
10
|
const SallaProductAvailability = class {
|
|
9
11
|
constructor(hostRef) {
|
|
10
12
|
index.registerInstance(this, hostRef);
|
|
@@ -89,7 +91,7 @@ const SallaProductAvailability = class {
|
|
|
89
91
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
90
92
|
}
|
|
91
93
|
render() {
|
|
92
|
-
return (index.h(index.Host,
|
|
94
|
+
return (index.h(index.Host, { id: "s-product-availability" }, this.isSubscribed || this.isVisitorSubscribed
|
|
93
95
|
? index.h("div", { class: "s-product-availability-subscribed" }, index.h("i", { class: "sicon-bell-ring s-product-availability-subs-icon" }), " ", this.subscribedMessage)
|
|
94
96
|
: index.h("slot", null, index.h("salla-button", { onClick: () => this.isUser ? this.submit() : this.modal.show(), wide: true, ref: btn => this.inlineBtn = btn }, salla.lang.get('pages.products.notify_availability'))), this.isUser || this.isSubscribed || this.isVisitorSubscribed ? '' : this.renderModal()));
|
|
95
97
|
}
|
|
@@ -108,5 +110,6 @@ const SallaProductAvailability = class {
|
|
|
108
110
|
"channels": ["channelsWatcher"]
|
|
109
111
|
}; }
|
|
110
112
|
};
|
|
113
|
+
SallaProductAvailability.style = sallaProductAvailabilityCss;
|
|
111
114
|
|
|
112
115
|
exports.salla_product_availability = SallaProductAvailability;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-0b5b5867.js');
|
|
6
6
|
const Helper = require('./Helper-98cc9f18.js');
|
|
7
7
|
|
|
8
|
-
const sallaRatingCss = "
|
|
8
|
+
const sallaRatingCss = "#s-rating .unicode{unicode-bidi:plaintext}";
|
|
9
9
|
|
|
10
10
|
const SallaRating = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -202,7 +202,7 @@ const SallaRating = class {
|
|
|
202
202
|
}
|
|
203
203
|
// render
|
|
204
204
|
render() {
|
|
205
|
-
return (index.h(index.Host,
|
|
205
|
+
return (index.h(index.Host, { id: "s-rating" }, index.h("salla-modal", { isLoading: true, width: "md", ref: modal => this.modal = modal }, this.order
|
|
206
206
|
? [index.h("div", { class: "s-rating-wrapper", ref: el => this.body = el }, this.order.testimonials_enabled ?
|
|
207
207
|
index.h("div", { class: "rating-outer-form s-rating-step-wrap s-rating-step s-rating-hidden", "data-type": "store" }, index.h("div", { class: "s-rating-rounded-icon" }, index.h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-store-logo" })), index.h("h2", { class: "s-rating-title" }, this.rate_the_store), index.h("div", { class: "s-rating-stars-company" }, " ", this.renderRatingStars('large')), index.h("textarea", { id: "storeReview", name: "comment", class: "s-rating-comment", placeholder: this.write_store_rate }), index.h("small", { class: "s-rating-validation-msg" }))
|
|
208
208
|
: '', this.order.products_enabled
|
|
@@ -181,13 +181,13 @@ const SallaLogin = class {
|
|
|
181
181
|
index.h("div", { class: "s-login-tab", ref: tab => this.mobileTab = tab }, index.h("slot", { name: "before-login-mobile" }), index.h("label", { class: "s-login-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', wide: true, onClick: () => this.loginBySMS(), ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter')), this.isEmailAllowed ?
|
|
182
182
|
index.h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-link" }, this.byEmailText) : '', index.h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
|
|
183
183
|
index.h("div", { class: "s-login-tab", ref: tab => this.emailTab = tab }, index.h("slot", { name: "before-login-email" }), index.h("label", { class: "s-login-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-input s-ltr" }), index.h("span", { class: "s-login-error-message" }), index.h("salla-button", { "loader-position": 'center', wide: true, onClick: () => this.loginByEmail(), ref: b => this.emailBtn = b }, salla.lang.get('blocks.header.enter')), this.isMobileAllowed ?
|
|
184
|
-
index.h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-link" }, this.bySMSText) : '', index.h("slot", { name: "after-login-email" })) : '', index.h("salla-verify", {
|
|
184
|
+
index.h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-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-back sicon-arrow-right", slot: "after-footer", href: "#" })), index.h("div", { ref: tab => this.registrationTab = tab }, index.h("slot", { name: "before-registration" }), index.h("label", { class: "s-login-label" }, this.firstNameLabel), index.h("input", { type: "text", class: "s-login-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-error-message" }), index.h("label", { class: "s-login-label" }, this.lastNameLabel), index.h("input", { type: "text", class: "s-login-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-error-message" }), index.h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, index.h("label", { class: "s-login-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-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-input s-ltr" }), index.h("span", { class: "s-login-error-message" })), index.h("salla-button", { "loader-position": 'center', wide: true, onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), index.h("slot", { name: "after-registration" })))));
|
|
185
185
|
}
|
|
186
186
|
get host() { return index.getElement(this); }
|
|
187
187
|
};
|
|
188
188
|
SallaLogin.style = sallaLoginCss;
|
|
189
189
|
|
|
190
|
-
const sallaSearchCss = "#s-search-modal .s-modal-wrapper{align-items:flex-start;padding:0}#s-search-modal .s-modal-spacer{display:inline}#s-search-modal .s-modal-body{padding:0;max-width:90%;margin-top:3.2rem;border-radius:0.5rem}#s-search-modal .s-modal-close{top:
|
|
190
|
+
const sallaSearchCss = "#s-search-modal .s-modal-wrapper{align-items:flex-start;padding:0}#s-search-modal .s-modal-spacer{display:inline}#s-search-modal .s-modal-body{padding:0;max-width:90%;margin-top:3.2rem;border-radius:0.5rem}#s-search-modal .s-modal-close{top:50%;transform:translateY(-50%)}";
|
|
191
191
|
|
|
192
192
|
const SallaSearch = class {
|
|
193
193
|
constructor(hostRef) {
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["salla-button_7.cjs",[[4,"salla-login",{"isEmailAllowed":[4,"is-email-allowed"],"isMobileAllowed":[4,"is-mobile-allowed"],"isEmailRequired":[4,"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],"show":[64]},[[0,"verified","onVerified"]]],[0,"salla-localization",{"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}],[0,"salla-search",{"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-verify",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}],[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"countryKey":[1025,"country-key"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-button",{"btnStyle":[513,"btn-style"],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"error":[4],"success":[4],"primary":[4],"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],"imageIcon":[1,"image-icon"],"title":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-product-availability.cjs",[[4,"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]}]]],["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-offer.cjs",[[0,"salla-offer",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"show":[64],"showOffer":[64]}]]],["salla-rating.cjs",[[0,"salla-rating",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["salla-button_7.cjs",[[4,"salla-login",{"isEmailAllowed":[4,"is-email-allowed"],"isMobileAllowed":[4,"is-mobile-allowed"],"isEmailRequired":[4,"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],"show":[64]},[[0,"verified","onVerified"]]],[0,"salla-localization",{"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}],[0,"salla-search",{"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}],[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"countryKey":[1025,"country-key"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-button",{"btnStyle":[513,"btn-style"],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"error":[4],"success":[4],"primary":[4],"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],"imageIcon":[1,"image-icon"],"title":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-product-availability.cjs",[[4,"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]}]]],["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-offer.cjs",[[0,"salla-offer",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"show":[64],"showOffer":[64]}]]],["salla-rating.cjs",[[0,"salla-rating",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"./components/salla-product-availability/salla-product-availability.js",
|
|
12
12
|
"./components/salla-rating/salla-rating.js",
|
|
13
13
|
"./components/salla-tel-input/salla-tel-input.js",
|
|
14
|
-
"./components/salla-verify/salla-verify.js"
|
|
14
|
+
"./components/salla-verify-modal/salla-verify-modal.js"
|
|
15
15
|
],
|
|
16
16
|
"compiler": {
|
|
17
17
|
"name": "@stencil/core",
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Initial Variables
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Functions
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Delivered variables
|
|
9
|
+
*/
|
|
10
|
+
/*
|
|
11
|
+
* Salla Button Component: has many sizes, styles and loading state.
|
|
12
|
+
* You can use these classes to target the elements in the component.
|
|
13
|
+
*/
|
|
@@ -89,7 +89,7 @@ export class SallaButton {
|
|
|
89
89
|
render() {
|
|
90
90
|
return (
|
|
91
91
|
//TODO:: use HOST then fake button behaviours
|
|
92
|
-
h(Host, { class: "s-button-
|
|
92
|
+
h(Host, { class: "s-button-wrap" },
|
|
93
93
|
h("button", Object.assign({ ref: btn => this.btn = btn, disabled: this.disabled }, this.hostAttributes),
|
|
94
94
|
h("span", { class: "s-button-text", ref: el => this.text = el },
|
|
95
95
|
h("slot", null)),
|
|
@@ -103,7 +103,7 @@ export class SallaButton {
|
|
|
103
103
|
}
|
|
104
104
|
static get is() { return "salla-button"; }
|
|
105
105
|
static get originalStyleUrls() { return {
|
|
106
|
-
"$": ["salla-button.
|
|
106
|
+
"$": ["salla-button.scss"]
|
|
107
107
|
}; }
|
|
108
108
|
static get styleUrls() { return {
|
|
109
109
|
"$": ["salla-button.css"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initial Variables
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Functions
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Delivered variables
|
|
9
|
+
*/
|
|
10
|
+
/*
|
|
11
|
+
* Salla Infinite Scroll Component: used in latest-products page, comments, brands, orders and so on..
|
|
12
|
+
* You can use these classes to target the elements in the component.
|
|
13
|
+
*/
|
|
@@ -27,9 +27,9 @@ export class SallaInfiniteScroll {
|
|
|
27
27
|
<p class="s-infinite-scroll-last infinite-scroll-last"></p>
|
|
28
28
|
<p class="s-infinite-scroll-error infinite-scroll-error"></p>
|
|
29
29
|
</div>
|
|
30
|
-
<a href="${this.nextPage}" class="s-button-btn btn--has-loading s-button-primary">
|
|
31
|
-
<span class="s-button-text">${salla.lang.get('common.elements.load_more')}</span>
|
|
32
|
-
<span class="s-button-loader s-button-loader-center" style="display: none"></span>
|
|
30
|
+
<a href="${this.nextPage}" class="s-infinite-scroll-btn s-button-btn btn--has-loading s-button-primary">
|
|
31
|
+
<span class="s-button-text s-infinite-scroll-btn-text">${salla.lang.get('common.elements.load_more')}</span>
|
|
32
|
+
<span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" style="display: none"></span>
|
|
33
33
|
</a>`;
|
|
34
34
|
this.btnLoader = this.status.querySelector('.s-button-loader');
|
|
35
35
|
salla.event.on('languages::translations.loaded', () => {
|
|
@@ -82,6 +82,12 @@ export class SallaInfiniteScroll {
|
|
|
82
82
|
.on('error', () => this.loading(false));
|
|
83
83
|
}
|
|
84
84
|
static get is() { return "salla-infinite-scroll"; }
|
|
85
|
+
static get originalStyleUrls() { return {
|
|
86
|
+
"$": ["salla-infinite-scroll.scss"]
|
|
87
|
+
}; }
|
|
88
|
+
static get styleUrls() { return {
|
|
89
|
+
"$": ["salla-infinite-scroll.css"]
|
|
90
|
+
}; }
|
|
85
91
|
static get properties() { return {
|
|
86
92
|
"nextPage": {
|
|
87
93
|
"type": "string",
|
|
@@ -108,6 +108,12 @@ export class SallaLocalization {
|
|
|
108
108
|
this.host.querySelectorAll('#language-slot').forEach(el => el.replaceWith(el.firstChild));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "salla-localization"; }
|
|
111
|
+
static get originalStyleUrls() { return {
|
|
112
|
+
"$": ["salla-localization.scss"]
|
|
113
|
+
}; }
|
|
114
|
+
static get styleUrls() { return {
|
|
115
|
+
"$": ["salla-localization.css"]
|
|
116
|
+
}; }
|
|
111
117
|
static get states() { return {
|
|
112
118
|
"languages": {},
|
|
113
119
|
"currencies": {},
|
|
@@ -215,7 +215,7 @@ export class SallaLogin {
|
|
|
215
215
|
this.isMobileAllowed ?
|
|
216
216
|
h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-link" }, this.bySMSText) : '',
|
|
217
217
|
h("slot", { name: "after-login-email" })) : '',
|
|
218
|
-
h("salla-verify", {
|
|
218
|
+
h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false },
|
|
219
219
|
h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-back sicon-arrow-right", slot: "after-footer", href: "#" })),
|
|
220
220
|
h("div", { ref: tab => this.registrationTab = tab },
|
|
221
221
|
h("slot", { name: "before-registration" }),
|
|
@@ -126,7 +126,7 @@ export class SallaModal {
|
|
|
126
126
|
//todo:: pref for each modal
|
|
127
127
|
render() {
|
|
128
128
|
this.host.id = this.host.id || 'salla-modal';
|
|
129
|
-
return (h(Host, { class: 's-modal-container s-hidden', "aria-modal": "true", role: "dialog" },
|
|
129
|
+
return (h(Host, { class: 'salla-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog" },
|
|
130
130
|
h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal() }),
|
|
131
131
|
h("div", { class: "s-modal-wrapper" },
|
|
132
132
|
h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"),
|
|
@@ -7,17 +7,19 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Delivered variables
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
/*
|
|
11
|
+
* Salla Offer Modal Component: popup modal to display the offers
|
|
12
|
+
* You can use these classes to target the elements in the component.
|
|
13
|
+
*/
|
|
14
|
+
#salla-offer-modal .s-offer-body {
|
|
11
15
|
-webkit-overflow-scrolling: touch;
|
|
12
16
|
}
|
|
13
|
-
.s-offer-body::-webkit-scrollbar {
|
|
17
|
+
#salla-offer-modal .s-offer-body::-webkit-scrollbar {
|
|
14
18
|
display: none;
|
|
15
19
|
}
|
|
16
|
-
|
|
17
|
-
.s-offer-next-btn {
|
|
20
|
+
#salla-offer-modal .s-offer-next-btn {
|
|
18
21
|
background: linear-gradient(90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%);
|
|
19
22
|
}
|
|
20
|
-
|
|
21
|
-
.s-offer-prev-btn {
|
|
23
|
+
#salla-offer-modal .s-offer-prev-btn {
|
|
22
24
|
background: linear-gradient(-90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%);
|
|
23
25
|
}
|
|
@@ -65,7 +65,7 @@ export class SallaOffer {
|
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
67
|
var _a, _b;
|
|
68
|
-
return h("salla-modal", { "sub-title-first": true, icon: "sicon-special-discount", title: "\u0639\u0631\u0648\u0636 \u0631\u0627\u0626\u0639\u0629 \u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631\u0643\u060C \u0645\u0627\u0630\u0627 \u0646\u062A\u0646\u0638\u0631!", "sub-title": this.offer_message, ref: modal => this.modal = modal, "is-loading": this.offer === null }, this.offer !== null
|
|
68
|
+
return h("salla-modal", { id: "salla-offer-modal", "sub-title-first": true, icon: "sicon-special-discount", title: "\u0639\u0631\u0648\u0636 \u0631\u0627\u0626\u0639\u0629 \u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631\u0643\u060C \u0645\u0627\u0630\u0627 \u0646\u062A\u0646\u0638\u0631!", "sub-title": this.offer_message, ref: modal => this.modal = modal, "is-loading": this.offer === null }, this.offer !== null
|
|
69
69
|
? [h("div", { class: "s-offer-scrolled-slider-wrap" },
|
|
70
70
|
h("div", { class: "s-offer-body s-offer-scrolled-slider" }, ((_a = this.offer.get.categories) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
71
71
|
? this.offer.get.categories.map(category => h("a", { href: category.urls.customer, class: "s-offer-badge s-offer-slider-item", innerHTML: this.categorySlot
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initial Variables
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Functions
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Delivered variables
|
|
9
|
+
*/
|
|
10
|
+
/*
|
|
11
|
+
* Salla Product Availability Component: popup modal to notify user if the product is available,
|
|
12
|
+
* used in the product single page if the product isn't available.
|
|
13
|
+
* You can use these classes to target the elements in the component.
|
|
14
|
+
*/
|
|
@@ -83,7 +83,7 @@ export class SallaProductAvailability {
|
|
|
83
83
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (h(Host,
|
|
86
|
+
return (h(Host, { id: "s-product-availability" },
|
|
87
87
|
this.isSubscribed || this.isVisitorSubscribed
|
|
88
88
|
? h("div", { class: "s-product-availability-subscribed" },
|
|
89
89
|
h("i", { class: "sicon-bell-ring s-product-availability-subs-icon" }),
|
|
@@ -110,6 +110,12 @@ export class SallaProductAvailability {
|
|
|
110
110
|
h("salla-button", { "loader-position": 'center', wide: true, ref: btn => this.btn = btn, onClick: () => this.submit() }, salla.lang.get('common.elements.submit')))));
|
|
111
111
|
}
|
|
112
112
|
static get is() { return "salla-product-availability"; }
|
|
113
|
+
static get originalStyleUrls() { return {
|
|
114
|
+
"$": ["salla-product-availability.scss"]
|
|
115
|
+
}; }
|
|
116
|
+
static get styleUrls() { return {
|
|
117
|
+
"$": ["salla-product-availability.css"]
|
|
118
|
+
}; }
|
|
113
119
|
static get properties() { return {
|
|
114
120
|
"channels": {
|
|
115
121
|
"type": "string",
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Initial Variables
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Functions
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Delivered variables
|
|
9
|
+
*/
|
|
10
|
+
/*
|
|
11
|
+
* Salla Rating Component: Order rating modal, used in the order single page
|
|
12
|
+
* You can use these classes to target the elements in the component.
|
|
13
|
+
*/
|
|
14
|
+
#s-rating .unicode {
|
|
6
15
|
unicode-bidi: plaintext;
|
|
7
16
|
}
|