@salla.sa/twilight-components 1.0.44 → 1.0.46

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.
Files changed (62) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/salla-branches.cjs.entry.js +1 -1
  4. package/dist/cjs/salla-button_7.cjs.entry.js +29 -24
  5. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +6 -3
  6. package/dist/cjs/salla-offer.cjs.entry.js +2 -2
  7. package/dist/cjs/salla-product-availability.cjs.entry.js +4 -1
  8. package/dist/cjs/salla-rating.cjs.entry.js +2 -2
  9. package/dist/cjs/{salla-search-ccb22487.js → salla-search-a6577399.js} +3 -3
  10. package/dist/cjs/twilight-components.cjs.js +1 -1
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/collection/components/salla-branches/salla-branches.css +4 -3
  13. package/dist/collection/components/salla-button/salla-button.css +13 -3
  14. package/dist/collection/components/salla-button/salla-button.js +9 -9
  15. package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.css +13 -0
  16. package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +9 -3
  17. package/dist/collection/components/salla-localization/salla-localization.css +13 -0
  18. package/dist/collection/components/salla-localization/salla-localization.js +49 -3
  19. package/dist/collection/components/salla-login/salla-login.css +4 -3
  20. package/dist/collection/components/salla-login/salla-login.js +2 -2
  21. package/dist/collection/components/salla-modal/salla-modal.css +13 -0
  22. package/dist/collection/components/salla-modal/salla-modal.js +1 -1
  23. package/dist/collection/components/salla-offer/salla-offer.css +8 -6
  24. package/dist/collection/components/salla-offer/salla-offer.js +1 -1
  25. package/dist/collection/components/salla-product-availability/salla-product-availability.css +14 -0
  26. package/dist/collection/components/salla-product-availability/salla-product-availability.js +7 -1
  27. package/dist/collection/components/salla-rating/salla-rating.css +14 -5
  28. package/dist/collection/components/salla-rating/salla-rating.js +2 -2
  29. package/dist/collection/components/salla-search/salla-search.css +9 -1
  30. package/dist/collection/components/salla-tel-input/salla-tel-input.css +13 -0
  31. package/dist/collection/components/salla-tel-input/salla-tel-input.js +8 -2
  32. package/dist/collection/components/salla-verify-modal/salla-verify-modal.css +16 -0
  33. package/dist/collection/components/{salla-verify/salla-verify.js → salla-verify-modal/salla-verify-modal.js} +23 -18
  34. package/dist/esm/index.js +1 -1
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/esm/salla-branches.entry.js +1 -1
  37. package/dist/esm/salla-button_7.entry.js +29 -24
  38. package/dist/esm/salla-infinite-scroll.entry.js +6 -3
  39. package/dist/esm/salla-offer.entry.js +2 -2
  40. package/dist/esm/salla-product-availability.entry.js +4 -1
  41. package/dist/esm/salla-rating.entry.js +2 -2
  42. package/dist/esm/{salla-search-76576226.js → salla-search-28f5f581.js} +3 -3
  43. package/dist/esm/twilight-components.js +1 -1
  44. package/dist/twilight-components/index.esm.js +1 -1
  45. package/dist/twilight-components/p-152b7287.entry.js +1 -0
  46. package/dist/twilight-components/{p-05ae4493.js → p-a62625b9.js} +1 -1
  47. package/dist/twilight-components/p-ae6a20b3.entry.js +1 -0
  48. package/dist/twilight-components/{p-91c688dc.entry.js → p-b584e892.entry.js} +1 -1
  49. package/dist/twilight-components/{p-2fefc616.entry.js → p-c0a7b5a2.entry.js} +1 -1
  50. package/dist/twilight-components/{p-34cec109.entry.js → p-e6c67b55.entry.js} +1 -1
  51. package/dist/twilight-components/p-f89bc866.entry.js +1 -0
  52. package/dist/twilight-components/twilight-components.esm.js +1 -1
  53. package/dist/types/components/salla-button/salla-button.d.ts +1 -1
  54. package/dist/types/components/salla-localization/salla-localization.d.ts +2 -2
  55. package/dist/types/components/{salla-verify/salla-verify.d.ts → salla-verify-modal/salla-verify-modal.d.ts} +1 -1
  56. package/dist/types/components.d.ts +15 -11
  57. package/example/dist/tailwind.css +274 -171
  58. package/example/index.html +1 -1
  59. package/package.json +1 -1
  60. package/dist/twilight-components/p-4d860705.entry.js +0 -1
  61. package/dist/twilight-components/p-b127c46b.entry.js +0 -1
  62. package/dist/twilight-components/p-d866b13e.entry.js +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const sallaSearch = require('./salla-search-ccb22487.js');
5
+ const sallaSearch = require('./salla-search-a6577399.js');
6
6
  require('./index-0b5b5867.js');
7
7
  require('./Helper-98cc9f18.js');
8
8
 
@@ -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",{"language":[1537],"currency":[1540],"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,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-0b5b5867.js');
6
6
 
7
- const sallaBranchesCss = ":host{display:block}";
7
+ const sallaBranchesCss = "";
8
8
 
9
9
  const SallaBranches = class {
10
10
  constructor(hostRef) {
@@ -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-ccb22487.js');
7
+ const sallaSearch = require('./salla-search-a6577399.js');
8
8
 
9
- const sallaButtonCss = ":host{display:block}";
9
+ const sallaButtonCss = "";
10
10
 
11
11
  const SallaButton = class {
12
12
  constructor(hostRef) {
@@ -26,7 +26,7 @@ const SallaButton = class {
26
26
  /**
27
27
  * If there is need to change loader position, pass the position
28
28
  */
29
- this.loaderPosition = 'before';
29
+ this.loaderPosition = 'after';
30
30
  /**
31
31
  * Is the button wide
32
32
  */
@@ -39,8 +39,8 @@ const SallaButton = class {
39
39
  this.hostAttributes.class += ' s-button-btn btn--has-loading'
40
40
  + ' s-button-' + this.btnStyle
41
41
  + (this.wide ? ' s-button-wide ' : '')
42
- + ' loader-' + this.loaderPosition //todo:: it looks there is no need for this class🤔
43
- + (this.loaderPosition == 'before' ? ' s-button-loader-after' : '');
42
+ + ' s-button-btn-loader-' + this.loaderPosition //todo:: it looks there is no need for this class🤔
43
+ + (this.loaderPosition == 'after' ? ' s-button-loader-after' : '');
44
44
  delete this.hostAttributes['btn-style'];
45
45
  delete this.hostAttributes['id'];
46
46
  delete this.hostAttributes['data-on-click'];
@@ -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-host-tag" }, 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: {
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': true, 's-button-hide': this.loaderPosition == 'center' && this.loading }, 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,15 +114,17 @@ 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);
120
122
  var _a, _b;
121
- this.language = salla.config.get('user.language_code');
122
- this.currency = salla.config.get('user.currency_code');
123
123
  this.languages = [];
124
124
  this.currencies = [];
125
125
  this.isLoading = true;
126
+ this.language = salla.config.get('user.language_code');
127
+ this.currency = salla.config.get('user.currency_code');
126
128
  Helper.Helper.setHost(this.host);
127
129
  salla.event.on('localization::show', () => this.show());
128
130
  salla.event.on('languages::translations.loaded', () => {
@@ -159,9 +161,11 @@ const SallaLocalization = class {
159
161
  return this.modal.hide();
160
162
  }
161
163
  async getLanguages() {
164
+ this.language = this.language || salla.config.get('user.language_code');
162
165
  return this.languages.length > 1 ? null : await salla.config.languages().then(data => this.languages = data);
163
166
  }
164
167
  async getCurrencies() {
168
+ this.currency = this.currency || salla.config.get('user.currency_code');
165
169
  return this.currencies.length > 1 ? null : await salla.config.currencies().then(data => this.currencies = data);
166
170
  }
167
171
  onChangeCurrency(event) {
@@ -207,6 +211,7 @@ const SallaLocalization = class {
207
211
  }
208
212
  get host() { return index.getElement(this); }
209
213
  };
214
+ SallaLocalization.style = sallaLocalizationCss;
210
215
 
211
216
  const sallaModalCss = "";
212
217
 
@@ -336,7 +341,7 @@ const SallaModal = class {
336
341
  //todo:: pref for each modal
337
342
  render() {
338
343
  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 ?
344
+ 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
345
  index.h("div", { class: "s-modal-loader-wrap" }, index.h("span", { class: "s-modal-loader" }))
341
346
  :
342
347
  [
@@ -1731,6 +1736,8 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
1731
1736
  */
1732
1737
  var intlTelInput = intlTelInput$1;
1733
1738
 
1739
+ const sallaTelInputCss = "";
1740
+
1734
1741
  const SallaTelInput = class {
1735
1742
  constructor(hostRef) {
1736
1743
  index.registerInstance(this, hostRef);
@@ -1819,15 +1826,18 @@ const SallaTelInput = class {
1819
1826
  }
1820
1827
  ;
1821
1828
  render() {
1822
- return (index.h(index.Host, null, 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" })));
1829
+ 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
1830
  }
1824
1831
  componentDidLoad() {
1825
1832
  this.initTelInput();
1826
1833
  }
1827
1834
  get host() { return index.getElement(this); }
1828
1835
  };
1836
+ SallaTelInput.style = sallaTelInputCss;
1837
+
1838
+ const sallaVerifyModalCss = "salla-verify-modal{display:block}";
1829
1839
 
1830
- const SallaVerify = class {
1840
+ const SallaVerifyModal = class {
1831
1841
  constructor(hostRef) {
1832
1842
  index.registerInstance(this, hostRef);
1833
1843
  this.verified = index.createEvent(this, "verified", 7);
@@ -1871,10 +1881,10 @@ const SallaVerify = class {
1871
1881
  var _a;
1872
1882
  this.data = data;
1873
1883
  this.resendTimer();
1874
- this.otpInputs = this.host.querySelectorAll('.s-verify-input');
1884
+ this.otpInputs = this.host.querySelectorAll('.s-verify-modal-input');
1875
1885
  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 => {
1886
+ Helper.Helper.on('input', '.s-verify-modal-input', e => salla.helpers.digitsOnly(e.target));
1887
+ Helper.Helper.onKeyUp('.s-verify-modal-input', event => {
1878
1888
  var _a, _b, _c, _d;
1879
1889
  let key = event.keyCode || event.charCode;
1880
1890
  if (event.target.value) {
@@ -1887,7 +1897,7 @@ const SallaVerify = class {
1887
1897
  }
1888
1898
  this.toggleOTPSubmit();
1889
1899
  });
1890
- Helper.Helper.on('paste', '.s-verify-input', event => {
1900
+ Helper.Helper.on('paste', '.s-verify-modal-input', event => {
1891
1901
  let text = event.clipboardData.getData('text').toArabicDigits().replace(/[^0-9.]/g, '').replace('..', '.');
1892
1902
  this.otpInputs.forEach((input, i) => input.value = text[i] || '');
1893
1903
  this.toggleOTPSubmit();
@@ -1956,19 +1966,14 @@ const SallaVerify = class {
1956
1966
  }
1957
1967
  render() {
1958
1968
  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());
1969
+ 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
1970
  }
1961
1971
  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
- ];
1972
+ 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
1973
  }
1970
1974
  get host() { return index.getElement(this); }
1971
1975
  };
1976
+ SallaVerifyModal.style = sallaVerifyModalCss;
1972
1977
 
1973
1978
  exports.salla_login = sallaSearch.SallaLogin;
1974
1979
  exports.salla_search = sallaSearch.SallaSearch;
@@ -1976,4 +1981,4 @@ exports.salla_button = SallaButton;
1976
1981
  exports.salla_localization = SallaLocalization;
1977
1982
  exports.salla_modal = SallaModal;
1978
1983
  exports.salla_tel_input = SallaTelInput;
1979
- exports.salla_verify = SallaVerify;
1984
+ 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, null, this.isSubscribed || this.isVisitorSubscribed
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 = ":host{display:block}.unicode{unicode-bidi:plaintext}";
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, null, index.h("salla-modal", { isLoading: true, width: "md", ref: modal => this.modal = modal }, this.order
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
@@ -3,7 +3,7 @@
3
3
  const index = require('./index-0b5b5867.js');
4
4
  const Helper = require('./Helper-98cc9f18.js');
5
5
 
6
- const sallaLoginCss = "salla-verify{display:block}";
6
+ const sallaLoginCss = "";
7
7
 
8
8
  const SallaLogin = class {
9
9
  constructor(hostRef) {
@@ -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", { "without-modal": 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" })))));
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-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("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:1rem}";
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",{"language":[1537],"currency":[1540],"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",
@@ -7,6 +7,7 @@
7
7
  /**
8
8
  * Delivered variables
9
9
  */
10
- :host {
11
- display: block;
12
- }
10
+ /*
11
+ * Salla Branches Component: Store branches & warehouses popup modal
12
+ * You can use these classes to target the elements in the component.
13
+ */
@@ -1,3 +1,13 @@
1
- :host {
2
- display: block;
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
+ */
@@ -17,7 +17,7 @@ export class SallaButton {
17
17
  /**
18
18
  * If there is need to change loader position, pass the position
19
19
  */
20
- this.loaderPosition = 'before';
20
+ this.loaderPosition = 'after';
21
21
  /**
22
22
  * Is the button wide
23
23
  */
@@ -30,8 +30,8 @@ export class SallaButton {
30
30
  this.hostAttributes.class += ' s-button-btn btn--has-loading'
31
31
  + ' s-button-' + this.btnStyle
32
32
  + (this.wide ? ' s-button-wide ' : '')
33
- + ' loader-' + this.loaderPosition //todo:: it looks there is no need for this class🤔
34
- + (this.loaderPosition == 'before' ? ' s-button-loader-after' : '');
33
+ + ' s-button-btn-loader-' + this.loaderPosition //todo:: it looks there is no need for this class🤔
34
+ + (this.loaderPosition == 'after' ? ' s-button-loader-after' : '');
35
35
  delete this.hostAttributes['btn-style'];
36
36
  delete this.hostAttributes['id'];
37
37
  delete this.hostAttributes['data-on-click'];
@@ -89,9 +89,9 @@ export class SallaButton {
89
89
  render() {
90
90
  return (
91
91
  //TODO:: use HOST then fake button behaviours
92
- h(Host, { class: "s-button-host-tag" },
92
+ h(Host, { class: "s-button-wrap" },
93
93
  h("button", Object.assign({ ref: btn => this.btn = btn, disabled: this.disabled }, this.hostAttributes),
94
- h("span", { class: "s-button-text", ref: el => this.text = el },
94
+ h("span", { class: { 's-button-text': true, 's-button-hide': this.loaderPosition == 'center' && this.loading }, ref: el => this.text = el },
95
95
  h("slot", null)),
96
96
  this.loading ? h("span", { class: {
97
97
  //todo::use united styles
@@ -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.css"]
106
+ "$": ["salla-button.scss"]
107
107
  }; }
108
108
  static get styleUrls() { return {
109
109
  "$": ["salla-button.css"]
@@ -167,8 +167,8 @@ export class SallaButton {
167
167
  "type": "string",
168
168
  "mutable": false,
169
169
  "complexType": {
170
- "original": "'start' | 'end' | 'center' | 'before'",
171
- "resolved": "\"before\" | \"center\" | \"end\" | \"start\"",
170
+ "original": "'start' | 'end' | 'center' | 'after'",
171
+ "resolved": "\"after\" | \"center\" | \"end\" | \"start\"",
172
172
  "references": {}
173
173
  },
174
174
  "required": false,
@@ -179,7 +179,7 @@ export class SallaButton {
179
179
  },
180
180
  "attribute": "loader-position",
181
181
  "reflect": false,
182
- "defaultValue": "'before'"
182
+ "defaultValue": "'after'"
183
183
  },
184
184
  "wide": {
185
185
  "type": "boolean",
@@ -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",
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Initial Variables
3
+ */
4
+ /**
5
+ * Functions
6
+ */
7
+ /**
8
+ * Delivered variables
9
+ */
10
+ /*
11
+ * Salla Localization Component: Languages & Currencies popup modal
12
+ * You can use these classes to target the elements in the component.
13
+ */
@@ -1,4 +1,4 @@
1
- import { Component, Element, h, Method, State } from '@stencil/core';
1
+ import { Component, Element, h, Method, Prop, State } from '@stencil/core';
2
2
  import Helper from "../../Helpers/Helper";
3
3
  /**
4
4
  * @slot header - The top of the modal.
@@ -9,11 +9,11 @@ import Helper from "../../Helpers/Helper";
9
9
  export class SallaLocalization {
10
10
  constructor() {
11
11
  var _a, _b;
12
- this.language = salla.config.get('user.language_code');
13
- this.currency = salla.config.get('user.currency_code');
14
12
  this.languages = [];
15
13
  this.currencies = [];
16
14
  this.isLoading = true;
15
+ this.language = salla.config.get('user.language_code');
16
+ this.currency = salla.config.get('user.currency_code');
17
17
  Helper.setHost(this.host);
18
18
  salla.event.on('localization::show', () => this.show());
19
19
  salla.event.on('languages::translations.loaded', () => {
@@ -50,9 +50,11 @@ export class SallaLocalization {
50
50
  return this.modal.hide();
51
51
  }
52
52
  async getLanguages() {
53
+ this.language = this.language || salla.config.get('user.language_code');
53
54
  return this.languages.length > 1 ? null : await salla.config.languages().then(data => this.languages = data);
54
55
  }
55
56
  async getCurrencies() {
57
+ this.currency = this.currency || salla.config.get('user.currency_code');
56
58
  return this.currencies.length > 1 ? null : await salla.config.currencies().then(data => this.currencies = data);
57
59
  }
58
60
  onChangeCurrency(event) {
@@ -108,6 +110,50 @@ export class SallaLocalization {
108
110
  this.host.querySelectorAll('#language-slot').forEach(el => el.replaceWith(el.firstChild));
109
111
  }
110
112
  static get is() { return "salla-localization"; }
113
+ static get originalStyleUrls() { return {
114
+ "$": ["salla-localization.scss"]
115
+ }; }
116
+ static get styleUrls() { return {
117
+ "$": ["salla-localization.css"]
118
+ }; }
119
+ static get properties() { return {
120
+ "language": {
121
+ "type": "string",
122
+ "mutable": true,
123
+ "complexType": {
124
+ "original": "string",
125
+ "resolved": "string",
126
+ "references": {}
127
+ },
128
+ "required": false,
129
+ "optional": false,
130
+ "docs": {
131
+ "tags": [],
132
+ "text": ""
133
+ },
134
+ "attribute": "language",
135
+ "reflect": true,
136
+ "defaultValue": "salla.config.get('user.language_code')"
137
+ },
138
+ "currency": {
139
+ "type": "boolean",
140
+ "mutable": true,
141
+ "complexType": {
142
+ "original": "boolean",
143
+ "resolved": "boolean",
144
+ "references": {}
145
+ },
146
+ "required": false,
147
+ "optional": false,
148
+ "docs": {
149
+ "tags": [],
150
+ "text": ""
151
+ },
152
+ "attribute": "currency",
153
+ "reflect": true,
154
+ "defaultValue": "salla.config.get('user.currency_code')"
155
+ }
156
+ }; }
111
157
  static get states() { return {
112
158
  "languages": {},
113
159
  "currencies": {},
@@ -7,6 +7,7 @@
7
7
  /**
8
8
  * Delivered variables
9
9
  */
10
- salla-verify {
11
- display: block;
12
- }
10
+ /*
11
+ * Salla Login Component: login popup modal
12
+ * You can use these classes to target the elements in the component.
13
+ */