@salla.sa/twilight-components 1.5.7 → 1.5.9

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 (60) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/salla-add-product-button.cjs.entry.js +15 -0
  3. package/dist/cjs/salla-button_24.cjs.entry.js +76 -9
  4. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  5. package/dist/cjs/salla-scopes.cjs.entry.js +18 -3
  6. package/dist/cjs/twilight-components.cjs.js +1 -1
  7. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +23 -8
  8. package/dist/collection/components/salla-list-tile/salla-list-tile.js +8 -2
  9. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +12 -3
  10. package/dist/collection/components/salla-login-modal/salla-login-modal.js +1 -1
  11. package/dist/collection/components/salla-loyalty/salla-loyalty.js +2 -2
  12. package/dist/collection/components/salla-modal/salla-modal.js +24 -6
  13. package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +11 -5
  14. package/dist/collection/components/salla-scopes/salla-scopes.js +21 -6
  15. package/dist/collection/components/salla-search/salla-search.js +12 -3
  16. package/dist/collection/components/salla-social-share/salla-social-share.js +4 -1
  17. package/dist/collection/components/salla-swiper/salla-swiper.js +17 -25
  18. package/dist/collection/components/salla-tabs/salla-tab-content.js +5 -2
  19. package/dist/collection/components/salla-tabs/salla-tab-header.js +11 -8
  20. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  21. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  22. package/dist/components/salla-add-product-button.js +15 -0
  23. package/dist/components/salla-list-tile2.js +6 -0
  24. package/dist/components/salla-localization-modal.js +9 -0
  25. package/dist/components/salla-login-modal.js +1 -1
  26. package/dist/components/salla-loyalty.js +1 -1
  27. package/dist/components/salla-modal2.js +18 -0
  28. package/dist/components/salla-rating-stars2.js +6 -0
  29. package/dist/components/salla-scopes.js +18 -3
  30. package/dist/components/salla-search.js +9 -0
  31. package/dist/components/salla-social-share.js +3 -0
  32. package/dist/components/salla-swiper2.js +13 -4
  33. package/dist/components/salla-tab-content2.js +3 -0
  34. package/dist/components/salla-tab-header2.js +7 -4
  35. package/dist/components/salla-tabs2.js +1 -1
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/salla-add-product-button.entry.js +15 -0
  38. package/dist/esm/salla-button_24.entry.js +76 -9
  39. package/dist/esm/salla-scopes.entry.js +18 -3
  40. package/dist/esm/twilight-components.js +1 -1
  41. package/dist/twilight-components/p-11d2a470.entry.js +4 -0
  42. package/dist/twilight-components/p-2ae56ddc.entry.js +4 -0
  43. package/dist/twilight-components/twilight-components.esm.js +1 -1
  44. package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +23 -2
  45. package/dist/types/components/salla-list-tile/salla-list-tile.d.ts +6 -0
  46. package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +9 -0
  47. package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +1 -1
  48. package/dist/types/components/salla-modal/salla-modal.d.ts +18 -0
  49. package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +10 -1
  50. package/dist/types/components/salla-scopes/salla-scopes.d.ts +9 -0
  51. package/dist/types/components/salla-search/salla-search.d.ts +9 -0
  52. package/dist/types/components/salla-social-share/salla-social-share.d.ts +3 -0
  53. package/dist/types/components/salla-swiper/salla-swiper.d.ts +12 -1
  54. package/dist/types/components/salla-tabs/salla-tab-content.d.ts +7 -0
  55. package/dist/types/components/salla-tabs/salla-tab-header.d.ts +9 -3
  56. package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -0
  57. package/dist/types/components.d.ts +201 -7
  58. package/package.json +2 -2
  59. package/dist/twilight-components/p-5707f352.entry.js +0 -4
  60. package/dist/twilight-components/p-aa546227.entry.js +0 -4
@@ -17,7 +17,7 @@ const patchEsm = () => {
17
17
  const defineCustomElements = (win, options) => {
18
18
  if (typeof window === 'undefined') return Promise.resolve();
19
19
  return patchEsm().then(() => {
20
- return index.bootstrapLazy([["salla-button_24.cjs",[[4,"salla-loyalty",{"prizePoints":[8,"prize-points"],"customerPoints":[2,"customer-points"],"prizeTitle":[1,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"points":[32],"exchange_points":[32],"are_you_sure_to_exchange":[32],"for":[32],"cancel":[32],"confirm":[32],"cart_total_point_summary":[32],"cart_point_exchange_now":[32],"login_button":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[16],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"open":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[0,"salla-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]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-swiper",{"loop":[4],"speed":[2],"itemPerView":[8,"item-per-view"],"spaceBetweenItems":[2,"space-between-items"],"direction":[1],"currentIndex":[32],"isLastSlideItem":[32],"isFirstSlideItem":[32]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"onSelect","onSelectedTab"]]],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"default_title":[32],"default_description":[32]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}]]],["salla-scopes.cjs",[[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"branchNotFound":[32],"ourServiceIsNotFound":[32],"searchForAvailabilityInOtherBranch":[32],"shoppingFromAnotherBranch":[32],"nowBrowsingFrom":[32],"confirmButton":[32],"scopeSearchPlaceholder":[32],"selected_scope":[32],"isOpenedBefore":[32],"close":[64],"open":[64],"handleSubmit":[64]}]]],["salla-add-product-button.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]]], options);
20
+ return index.bootstrapLazy([["salla-button_24.cjs",[[4,"salla-loyalty",{"prizePoints":[8,"prize-points"],"customerPoints":[2,"customer-points"],"prizeTitle":[1,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"points":[32],"exchange_points":[32],"are_you_sure_to_exchange":[32],"for":[32],"cancel":[32],"confirm":[32],"cart_total_point_summary":[32],"cart_point_exchange_now":[32],"login_button":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[16],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"open":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[0,"salla-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]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-swiper",{"loop":[4],"speed":[2],"itemPerView":[8,"item-per-view"],"spaceBetweenItems":[2,"space-between-items"],"currentIndex":[32],"isLastSlideItem":[32],"isFirstSlideItem":[32]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"onTabSelected","onSelectedTab"]]],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"default_title":[32],"default_description":[32]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}]]],["salla-scopes.cjs",[[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"branchNotFound":[32],"ourServiceIsNotFound":[32],"searchForAvailabilityInOtherBranch":[32],"shoppingFromAnotherBranch":[32],"nowBrowsingFrom":[32],"confirmButton":[32],"scopeSearchPlaceholder":[32],"selected_scope":[32],"isOpenedBefore":[32],"close":[64],"open":[64],"handleSubmit":[64]}]]],["salla-add-product-button.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]]], options);
21
21
  });
22
22
  };
23
23
 
@@ -16,10 +16,25 @@ const SallaAddProductButton = class {
16
16
  this.failed = index.createEvent(this, "failed", 7);
17
17
  this.hostAttributes = {};
18
18
  this.hasLabel = false;
19
+ /**
20
+ * Channels.
21
+ */
19
22
  this.channels = null;
23
+ /**
24
+ * Product Quantity
25
+ */
20
26
  this.quantity = 0;
27
+ /**
28
+ * Donating amount.
29
+ */
21
30
  this.donatingAmount = 0;
31
+ /**
32
+ * Product Status.Defaults to `sale`
33
+ */
22
34
  this.productStatus = 'sale';
35
+ /**
36
+ * Product type. Defaults to `product`
37
+ */
23
38
  this.productType = 'product';
24
39
  }
25
40
  getLabel() {
@@ -226,7 +226,13 @@ const sallaListTileCss = "";
226
226
  const SallaListTile = class {
227
227
  constructor(hostRef) {
228
228
  index$1.registerInstance(this, hostRef);
229
+ /**
230
+ * Designates the component as anchor and applies the `href` attribute.
231
+ */
229
232
  this.href = undefined;
233
+ /**
234
+ * Designates the target attribute. This should only be applied when using the `href` prop.
235
+ */
230
236
  this.target = "_self";
231
237
  }
232
238
  generateClass() {
@@ -278,7 +284,13 @@ const SallaLocalizationModal = class {
278
284
  this.languages = [];
279
285
  this.currencies = [];
280
286
  this.isLoading = true;
287
+ /**
288
+ * Current language (existing or newly selected)
289
+ */
281
290
  this.language = salla.config.get('user.language_code');
291
+ /**
292
+ * Current currency (existing or newly selected)
293
+ */
282
294
  this.currency = salla.config.get('user.currency_code');
283
295
  Helper$1.setHost(this.host);
284
296
  salla.event.on('localization::open', () => this.open());
@@ -329,6 +341,9 @@ const SallaLocalizationModal = class {
329
341
  onChangeLanguage(event) {
330
342
  this.language = event.target.value;
331
343
  }
344
+ /**
345
+ * Change currency and language to the selected ones.
346
+ */
332
347
  async submit() {
333
348
  let url;
334
349
  this.btn.load()
@@ -522,7 +537,7 @@ const SallaLoginModal = class {
522
537
  return;
523
538
  }
524
539
  if (event.detail.data.redirect_url) {
525
- return window.location.href = event.data.redirect_url;
540
+ return window.location.href = event.detail.data.redirect_url;
526
541
  }
527
542
  window.location.reload();
528
543
  }
@@ -808,7 +823,7 @@ const SallaLoyalty = class {
808
823
  .catch(e => console.log(e));
809
824
  }
810
825
  /**
811
- *
826
+ * Exchange loyalty points with the selected prize item
812
827
  * @param {number} loyalty_prize_id
813
828
  *
814
829
  */
@@ -868,6 +883,9 @@ const sallaModalCss = "";
868
883
  const SallaModal = class {
869
884
  constructor(hostRef) {
870
885
  index$1.registerInstance(this, hostRef);
886
+ /**
887
+ * Sets the modal to be closable. Defaults to `true`
888
+ */
871
889
  this.isClosable = true; //todo::rename unclude. Suggestion => persistent
872
890
  /**
873
891
  * The size of the modal
@@ -889,10 +907,25 @@ const SallaModal = class {
889
907
  * Show loading in the middle
890
908
  */
891
909
  this.isLoading = false;
910
+ /**
911
+ * Show subtitle before the title or not, defaults to `false` (after the title)
912
+ */
892
913
  this.subTitleFirst = false; //todo:: choose better name
914
+ /**
915
+ * Avoid padding in the modal body or not, defaults to `false`
916
+ */
893
917
  this.noPadding = false; //todo:: choose better name
918
+ /**
919
+ * Set modal sub title.
920
+ */
894
921
  this.subTitle = '';
922
+ /**
923
+ * Align modal content to center, defaults to `false`
924
+ */
895
925
  this.centered = false;
926
+ /**
927
+ * Set the style of the header icon.
928
+ */
896
929
  this.iconStyle = undefined;
897
930
  Helper$1.setHost(this.host);
898
931
  salla.event.on('modal::open', target => target == this.host.id && this.open());
@@ -1631,7 +1664,13 @@ const sallaRatingStarsCss = "";
1631
1664
  const SallaRatingStars = class {
1632
1665
  constructor(hostRef) {
1633
1666
  index$1.registerInstance(this, hostRef);
1667
+ /**
1668
+ * Sets input name.
1669
+ */
1634
1670
  this.name = 'rating';
1671
+ /**
1672
+ * Sets the height and width of the component. Defaults to medium.
1673
+ */
1635
1674
  this.size = 'medium';
1636
1675
  }
1637
1676
  initiateRating() {
@@ -1701,8 +1740,17 @@ const SallaSearch = class {
1701
1740
  this.loading = false;
1702
1741
  this.typing = false;
1703
1742
  this.debounce = setTimeout(() => '', 1000);
1743
+ /**
1744
+ * Set the component display without modal window. Defaults to `false`
1745
+ */
1704
1746
  this.inline = false;
1747
+ /**
1748
+ * Adds a border radius to the input. Half of the height.
1749
+ */
1705
1750
  this.oval = false;
1751
+ /**
1752
+ * Sets the height of the input
1753
+ */
1706
1754
  this.height = 60;
1707
1755
  Helper$1.setHost(this.host);
1708
1756
  this.productSlot = ((_a = Helper$1.getElement('[slot="product"]')) === null || _a === void 0 ? void 0 : _a.innerHTML) || this.getDefaultProductSlot();
@@ -3215,6 +3263,9 @@ const SallaSocialShare = class {
3215
3263
  window.a2a_config.locale = salla.lang.locale;
3216
3264
  });
3217
3265
  }
3266
+ /**
3267
+ * Activate or open the share menu.
3268
+ */
3218
3269
  async open() {
3219
3270
  this.opened = !this.opened;
3220
3271
  if (this.opened) {
@@ -8226,12 +8277,22 @@ const sallaSwiperCss = "@font-face{font-family:\"swiper-icons\";src:url(\"data:a
8226
8277
  const SallaSwiper = class {
8227
8278
  constructor(hostRef) {
8228
8279
  index$1.registerInstance(this, hostRef);
8229
- // slider-options
8280
+ /**
8281
+ * Set to true to enable continuous loop mode. Defaults to false.
8282
+ */
8230
8283
  this.loop = false;
8284
+ /**
8285
+ * Duration of transition between slides (in ms). Defaults to 300ms.
8286
+ */
8231
8287
  this.speed = 300;
8288
+ /**
8289
+ * Number of slides per view (slides visible at the same time on slider's container).
8290
+ */
8232
8291
  this.itemPerView = "auto";
8292
+ /**
8293
+ * Distance between slide items in px. Defaults to 8px
8294
+ */
8233
8295
  this.spaceBetweenItems = 8;
8234
- this.direction = 'ltr';
8235
8296
  // States
8236
8297
  this.currentIndex = undefined;
8237
8298
  this.isLastSlideItem = false;
@@ -8256,7 +8317,7 @@ const SallaSwiper = class {
8256
8317
  }
8257
8318
  render() {
8258
8319
  var _a, _b;
8259
- return (index$1.h("div", { class: "s-swiper", dir: this.direction }, index$1.h("div", { class: "s-swiper-button-prev" }, index$1.h("salla-button", { disabled: (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.isBeginning, shape: "icon", color: "light", onClick: () => this.swiper.slidePrev() }, index$1.h("span", { class: "s-swiper-button-icon", innerHTML: ArrowLeftIcon }))), index$1.h("div", { class: "s-swiper-button-next" }, index$1.h("salla-button", { disabled: (_b = this.swiper) === null || _b === void 0 ? void 0 : _b.isEnd, shape: "icon", color: "light", onClick: () => this.swiper.slideNext() }, index$1.h("span", { class: "s-swiper-button-icon", innerHTML: ArrowRightIcon }))), index$1.h("div", { class: "swiper" }, index$1.h("div", { class: "swiper-container s-swiper-container", ref: el => this.swiperContainer = el }, index$1.h("div", { class: "swiper-wrapper s-swiper-wrapper", ref: el => this.swiperWrapper = el }, index$1.h("slot", null))))));
8320
+ return (index$1.h("div", { class: "s-swiper" }, index$1.h("div", { class: "s-swiper-button-prev" }, index$1.h("salla-button", { disabled: (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.isBeginning, shape: "icon", color: "light", onClick: () => this.swiper.slidePrev() }, index$1.h("span", { class: "s-swiper-button-icon", innerHTML: ArrowLeftIcon }))), index$1.h("div", { class: "s-swiper-button-next" }, index$1.h("salla-button", { disabled: (_b = this.swiper) === null || _b === void 0 ? void 0 : _b.isEnd, shape: "icon", color: "light", onClick: () => this.swiper.slideNext() }, index$1.h("span", { class: "s-swiper-button-icon", innerHTML: ArrowRightIcon }))), index$1.h("div", { class: "swiper" }, index$1.h("div", { class: "swiper-container s-swiper-container", ref: el => this.swiperContainer = el }, index$1.h("div", { class: "swiper-wrapper s-swiper-wrapper", ref: el => this.swiperWrapper = el }, index$1.h("slot", null))))));
8260
8321
  }
8261
8322
  };
8262
8323
  SallaSwiper.style = sallaSwiperCss;
@@ -8268,6 +8329,9 @@ const SallaTabContent = class {
8268
8329
  index$1.registerInstance(this, hostRef);
8269
8330
  this.isSelected = false;
8270
8331
  }
8332
+ /**
8333
+ * Expose self for the parent.
8334
+ */
8271
8335
  async getChild() {
8272
8336
  return {
8273
8337
  select: this.select.bind(this),
@@ -8300,7 +8364,7 @@ const sallaTabHeaderCss = "";
8300
8364
  const SallaTabHeader = class {
8301
8365
  constructor(hostRef) {
8302
8366
  index$1.registerInstance(this, hostRef);
8303
- this.onSelect = index$1.createEvent(this, "onSelect", 7);
8367
+ this.tabSelected = index$1.createEvent(this, "tabSelected", 7);
8304
8368
  this.id = generateRandomId();
8305
8369
  /**
8306
8370
  * The class applied to the currently active(selected) tab
@@ -8316,9 +8380,12 @@ const SallaTabHeader = class {
8316
8380
  this.centered = false;
8317
8381
  this.isSelected = false;
8318
8382
  }
8383
+ /**
8384
+ * Expose self for the parent.
8385
+ */
8319
8386
  async getChild() {
8320
8387
  return {
8321
- select: this.select.bind(this),
8388
+ select: this.selected.bind(this),
8322
8389
  unselect: this.unselect.bind(this),
8323
8390
  name: this.name,
8324
8391
  id: this.id
@@ -8327,12 +8394,12 @@ const SallaTabHeader = class {
8327
8394
  unselect() {
8328
8395
  this.isSelected = false;
8329
8396
  }
8330
- select() {
8397
+ selected() {
8331
8398
  this.isSelected = true;
8332
8399
  }
8333
8400
  onClick() {
8334
8401
  this.getChild().then(child => {
8335
- this.onSelect.emit(child);
8402
+ this.tabSelected.emit(child);
8336
8403
  });
8337
8404
  }
8338
8405
  render() {
@@ -22,7 +22,7 @@ const SallaInstallment = class {
22
22
  * Currency code
23
23
  */
24
24
  this.currency = salla.config.get('user.currency_code');
25
- document.addEventListener('twilight::ready', () => {
25
+ salla.onReady(() => {
26
26
  const installment = salla.config.get('store.settings.installments');
27
27
  if (installment) {
28
28
  this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
@@ -59,10 +59,16 @@ const SallaScopees = class {
59
59
  this.scopeSearchPlaceholder = salla.lang.get('blocks.scope.searching_for_a_branch');
60
60
  });
61
61
  }
62
+ /**
63
+ * Closes the scope modal.
64
+ */
62
65
  async close() {
63
66
  var _a;
64
67
  return await ((_a = this.modal) === null || _a === void 0 ? void 0 : _a.close());
65
68
  }
69
+ /**
70
+ * Opens the scope modal.
71
+ */
66
72
  async open(mode = ModeType.DEFAULT, product_id = null) {
67
73
  this.setScopeValues([]);
68
74
  if (typeof mode !== 'undefined' && [ModeType.AVAILABILITY, ModeType.DEFAULT].includes(mode)) {
@@ -86,14 +92,23 @@ const SallaScopees = class {
86
92
  this.modal.stopLoading();
87
93
  });
88
94
  }
95
+ /**
96
+ * Submit form to change exsiting scope.
97
+ */
89
98
  async handleSubmit() {
90
- let payload = { 'scope_id': this.current_scope.id };
99
+ let payload = { 'id': this.current_scope.id };
91
100
  this.changeBtn.load();
92
101
  return await salla.scope.change(payload)
93
102
  .then(() => {
94
103
  salla.storage.set("branch-choosed-before", true);
95
- salla.storage.set("scope", this.current_scope.id);
96
- window.location.search += "&scope=" + this.current_scope.id;
104
+ salla.storage.set("scope", {
105
+ 'type': this.current_scope.type,
106
+ 'id': this.current_scope.id
107
+ });
108
+ if (window.location.search.includes("?")) {
109
+ window.location.search += "&";
110
+ }
111
+ window.location.search += "scope=" + this.current_scope.id;
97
112
  }).catch(e => console.log(e))
98
113
  .finally(() => {
99
114
  this.changeBtn.stop();
@@ -18,5 +18,5 @@ const patchBrowser = () => {
18
18
  };
19
19
 
20
20
  patchBrowser().then(options => {
21
- return index.bootstrapLazy([["salla-button_24.cjs",[[4,"salla-loyalty",{"prizePoints":[8,"prize-points"],"customerPoints":[2,"customer-points"],"prizeTitle":[1,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"points":[32],"exchange_points":[32],"are_you_sure_to_exchange":[32],"for":[32],"cancel":[32],"confirm":[32],"cart_total_point_summary":[32],"cart_point_exchange_now":[32],"login_button":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[16],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"open":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[0,"salla-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]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-swiper",{"loop":[4],"speed":[2],"itemPerView":[8,"item-per-view"],"spaceBetweenItems":[2,"space-between-items"],"direction":[1],"currentIndex":[32],"isLastSlideItem":[32],"isFirstSlideItem":[32]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"onSelect","onSelectedTab"]]],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"default_title":[32],"default_description":[32]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}]]],["salla-scopes.cjs",[[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"branchNotFound":[32],"ourServiceIsNotFound":[32],"searchForAvailabilityInOtherBranch":[32],"shoppingFromAnotherBranch":[32],"nowBrowsingFrom":[32],"confirmButton":[32],"scopeSearchPlaceholder":[32],"selected_scope":[32],"isOpenedBefore":[32],"close":[64],"open":[64],"handleSubmit":[64]}]]],["salla-add-product-button.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]]], options);
21
+ return index.bootstrapLazy([["salla-button_24.cjs",[[4,"salla-loyalty",{"prizePoints":[8,"prize-points"],"customerPoints":[2,"customer-points"],"prizeTitle":[1,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"points":[32],"exchange_points":[32],"are_you_sure_to_exchange":[32],"for":[32],"cancel":[32],"confirm":[32],"cart_total_point_summary":[32],"cart_point_exchange_now":[32],"login_button":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[16],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"open":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[0,"salla-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]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-swiper",{"loop":[4],"speed":[2],"itemPerView":[8,"item-per-view"],"spaceBetweenItems":[2,"space-between-items"],"currentIndex":[32],"isLastSlideItem":[32],"isFirstSlideItem":[32]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"onTabSelected","onSelectedTab"]]],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"default_title":[32],"default_description":[32]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}]]],["salla-scopes.cjs",[[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"branchNotFound":[32],"ourServiceIsNotFound":[32],"searchForAvailabilityInOtherBranch":[32],"shoppingFromAnotherBranch":[32],"nowBrowsingFrom":[32],"confirmButton":[32],"scopeSearchPlaceholder":[32],"selected_scope":[32],"isOpenedBefore":[32],"close":[64],"open":[64],"handleSubmit":[64]}]]],["salla-add-product-button.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]]], options);
22
22
  });
@@ -6,10 +6,25 @@ export class SallaAddProductButton {
6
6
  constructor() {
7
7
  this.hostAttributes = {};
8
8
  this.hasLabel = false;
9
+ /**
10
+ * Channels.
11
+ */
9
12
  this.channels = null;
13
+ /**
14
+ * Product Quantity
15
+ */
10
16
  this.quantity = 0;
17
+ /**
18
+ * Donating amount.
19
+ */
11
20
  this.donatingAmount = 0;
21
+ /**
22
+ * Product Status.Defaults to `sale`
23
+ */
12
24
  this.productStatus = 'sale';
25
+ /**
26
+ * Product type. Defaults to `product`
27
+ */
13
28
  this.productType = 'product';
14
29
  }
15
30
  getLabel() {
@@ -88,7 +103,7 @@ export class SallaAddProductButton {
88
103
  "optional": false,
89
104
  "docs": {
90
105
  "tags": [],
91
- "text": ""
106
+ "text": "Channels."
92
107
  },
93
108
  "attribute": "channels",
94
109
  "reflect": true,
@@ -106,7 +121,7 @@ export class SallaAddProductButton {
106
121
  "optional": false,
107
122
  "docs": {
108
123
  "tags": [],
109
- "text": ""
124
+ "text": "Product Quantity"
110
125
  },
111
126
  "attribute": "quantity",
112
127
  "reflect": true,
@@ -124,7 +139,7 @@ export class SallaAddProductButton {
124
139
  "optional": false,
125
140
  "docs": {
126
141
  "tags": [],
127
- "text": ""
142
+ "text": "Donating amount."
128
143
  },
129
144
  "attribute": "donating-amount",
130
145
  "reflect": true,
@@ -142,7 +157,7 @@ export class SallaAddProductButton {
142
157
  "optional": false,
143
158
  "docs": {
144
159
  "tags": [],
145
- "text": ""
160
+ "text": "Product id"
146
161
  },
147
162
  "attribute": "product-id",
148
163
  "reflect": true
@@ -159,7 +174,7 @@ export class SallaAddProductButton {
159
174
  "optional": false,
160
175
  "docs": {
161
176
  "tags": [],
162
- "text": ""
177
+ "text": "Product Status.Defaults to `sale`"
163
178
  },
164
179
  "attribute": "product-status",
165
180
  "reflect": true,
@@ -177,7 +192,7 @@ export class SallaAddProductButton {
177
192
  "optional": false,
178
193
  "docs": {
179
194
  "tags": [],
180
- "text": ""
195
+ "text": "Product type. Defaults to `product`"
181
196
  },
182
197
  "attribute": "product-type",
183
198
  "reflect": true,
@@ -192,7 +207,7 @@ export class SallaAddProductButton {
192
207
  "composed": true,
193
208
  "docs": {
194
209
  "tags": [],
195
- "text": ""
210
+ "text": "Custome DOM event emitter when product gets added to cart successfully."
196
211
  },
197
212
  "complexType": {
198
213
  "original": "any",
@@ -207,7 +222,7 @@ export class SallaAddProductButton {
207
222
  "composed": true,
208
223
  "docs": {
209
224
  "tags": [],
210
- "text": ""
225
+ "text": "Custome DOM event emitter when product addition to cart fails."
211
226
  },
212
227
  "complexType": {
213
228
  "original": "any",
@@ -4,7 +4,13 @@
4
4
  import { Component, Host, h, Prop } from '@stencil/core';
5
5
  export class SallaListTile {
6
6
  constructor() {
7
+ /**
8
+ * Designates the component as anchor and applies the `href` attribute.
9
+ */
7
10
  this.href = undefined;
11
+ /**
12
+ * Designates the target attribute. This should only be applied when using the `href` prop.
13
+ */
8
14
  this.target = "_self";
9
15
  }
10
16
  generateClass() {
@@ -46,7 +52,7 @@ export class SallaListTile {
46
52
  "optional": false,
47
53
  "docs": {
48
54
  "tags": [],
49
- "text": ""
55
+ "text": "Designates the component as anchor and applies the `href` attribute."
50
56
  },
51
57
  "attribute": "href",
52
58
  "reflect": false,
@@ -64,7 +70,7 @@ export class SallaListTile {
64
70
  "optional": false,
65
71
  "docs": {
66
72
  "tags": [],
67
- "text": ""
73
+ "text": "Designates the target attribute. This should only be applied when using the `href` prop."
68
74
  },
69
75
  "attribute": "target",
70
76
  "reflect": false,
@@ -15,7 +15,13 @@ export class SallaLocalizationModal {
15
15
  this.languages = [];
16
16
  this.currencies = [];
17
17
  this.isLoading = true;
18
+ /**
19
+ * Current language (existing or newly selected)
20
+ */
18
21
  this.language = salla.config.get('user.language_code');
22
+ /**
23
+ * Current currency (existing or newly selected)
24
+ */
19
25
  this.currency = salla.config.get('user.currency_code');
20
26
  Helper.setHost(this.host);
21
27
  salla.event.on('localization::open', () => this.open());
@@ -66,6 +72,9 @@ export class SallaLocalizationModal {
66
72
  onChangeLanguage(event) {
67
73
  this.language = event.target.value;
68
74
  }
75
+ /**
76
+ * Change currency and language to the selected ones.
77
+ */
69
78
  async submit() {
70
79
  let url;
71
80
  this.btn.load()
@@ -158,7 +167,7 @@ export class SallaLocalizationModal {
158
167
  "optional": false,
159
168
  "docs": {
160
169
  "tags": [],
161
- "text": ""
170
+ "text": "Current language (existing or newly selected)"
162
171
  },
163
172
  "attribute": "language",
164
173
  "reflect": true,
@@ -176,7 +185,7 @@ export class SallaLocalizationModal {
176
185
  "optional": false,
177
186
  "docs": {
178
187
  "tags": [],
179
- "text": ""
188
+ "text": "Current currency (existing or newly selected)"
180
189
  },
181
190
  "attribute": "currency",
182
191
  "reflect": true,
@@ -238,7 +247,7 @@ export class SallaLocalizationModal {
238
247
  "return": "Promise<void>"
239
248
  },
240
249
  "docs": {
241
- "text": "",
250
+ "text": "Change currency and language to the selected ones.",
242
251
  "tags": []
243
252
  }
244
253
  }
@@ -125,7 +125,7 @@ export class SallaLoginModal {
125
125
  return;
126
126
  }
127
127
  if (event.detail.data.redirect_url) {
128
- return window.location.href = event.data.redirect_url;
128
+ return window.location.href = event.detail.data.redirect_url;
129
129
  }
130
130
  window.location.reload();
131
131
  }
@@ -167,7 +167,7 @@ export class SallaLoyalty {
167
167
  .catch(e => console.log(e));
168
168
  }
169
169
  /**
170
- *
170
+ * Exchange loyalty points with the selected prize item
171
171
  * @param {number} loyalty_prize_id
172
172
  *
173
173
  */
@@ -452,7 +452,7 @@ export class SallaLoyalty {
452
452
  "return": "Promise<any>"
453
453
  },
454
454
  "docs": {
455
- "text": "",
455
+ "text": "Exchange loyalty points with the selected prize item",
456
456
  "tags": [{
457
457
  "name": "param",
458
458
  "text": "loyalty_prize_id"