@salla.sa/twilight-components 1.6.0 → 1.6.1

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/Helper-8ae6a805.js +28 -0
  2. package/dist/cjs/arrow-right-3d137e4c.js +13 -0
  3. package/dist/cjs/cancel-ae668d91.js +13 -0
  4. package/dist/cjs/check-circle2-1aac98d1.js +13 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/mail-2db058ee.js +13 -0
  7. package/dist/cjs/salla-add-product-button_13.cjs.entry.js +2870 -0
  8. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +93 -0
  9. package/dist/cjs/salla-list-tile_2.cjs.entry.js +80 -0
  10. package/dist/cjs/salla-loyalty.cjs.entry.js +229 -0
  11. package/dist/cjs/salla-product-size-guide.cjs.entry.js +52 -0
  12. package/dist/cjs/salla-quantity-input.cjs.entry.js +101 -0
  13. package/dist/cjs/salla-rating-modal.cjs.entry.js +169 -0
  14. package/dist/cjs/salla-social-share.cjs.entry.js +1447 -0
  15. package/dist/cjs/salla-swiper.cjs.entry.js +5023 -0
  16. package/dist/cjs/salla-tab-content_3.cjs.entry.js +159 -0
  17. package/dist/cjs/star2-8288e6e1.js +13 -0
  18. package/dist/cjs/twilight-components.cjs.js +1 -1
  19. package/dist/collection/components/salla-login-modal/salla-login-modal.js +4 -3
  20. package/dist/components/salla-login-modal.js +4 -3
  21. package/dist/esm/Helper-e1d414a5.js +26 -0
  22. package/dist/esm/arrow-right-1c3e04f2.js +11 -0
  23. package/dist/esm/cancel-41a92070.js +11 -0
  24. package/dist/esm/check-circle2-f6e5f685.js +11 -0
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/esm/mail-9d5204c6.js +11 -0
  27. package/dist/esm/salla-add-product-button_13.entry.js +2854 -0
  28. package/dist/esm/salla-infinite-scroll.entry.js +89 -0
  29. package/dist/esm/salla-list-tile_2.entry.js +75 -0
  30. package/dist/esm/salla-loyalty.entry.js +225 -0
  31. package/dist/esm/salla-product-size-guide.entry.js +48 -0
  32. package/dist/esm/salla-quantity-input.entry.js +97 -0
  33. package/dist/esm/salla-rating-modal.entry.js +165 -0
  34. package/dist/esm/salla-social-share.entry.js +1443 -0
  35. package/dist/esm/salla-swiper.entry.js +5019 -0
  36. package/dist/esm/salla-tab-content_3.entry.js +153 -0
  37. package/dist/esm/star2-b134fc74.js +11 -0
  38. package/dist/esm/twilight-components.js +1 -1
  39. package/dist/twilight-components/p-14f0ff17.entry.js +4 -0
  40. package/dist/twilight-components/p-2749c9d3.entry.js +4 -0
  41. package/dist/twilight-components/p-335abbbb.entry.js +4 -0
  42. package/dist/twilight-components/p-4cafb11b.entry.js +4 -0
  43. package/dist/twilight-components/p-5e63e308.entry.js +4 -0
  44. package/dist/twilight-components/p-648e74e5.entry.js +4 -0
  45. package/dist/twilight-components/p-897b2018.js +4 -0
  46. package/dist/twilight-components/p-93708e1e.js +4 -0
  47. package/dist/twilight-components/p-9d236cf4.entry.js +4 -0
  48. package/dist/twilight-components/p-9d2ca9c8.js +4 -0
  49. package/dist/twilight-components/p-af7d5660.js +4 -0
  50. package/dist/twilight-components/p-bdbd2386.entry.js +4 -0
  51. package/dist/twilight-components/p-cac3db69.entry.js +4 -0
  52. package/dist/twilight-components/p-d914a212.js +4 -0
  53. package/dist/twilight-components/p-dace8e6d.js +4 -0
  54. package/dist/twilight-components/p-f9253fda.entry.js +4 -0
  55. package/dist/twilight-components/twilight-components.esm.js +1 -1
  56. package/package.json +2 -2
  57. package/dist/cjs/salla-add-product-button.cjs.entry.js +0 -104
  58. package/dist/cjs/salla-button_24.cjs.entry.js +0 -10087
  59. package/dist/esm/salla-add-product-button.entry.js +0 -100
  60. package/dist/esm/salla-button_24.entry.js +0 -10060
  61. package/dist/twilight-components/p-30b2c5b0.entry.js +0 -4
  62. package/dist/twilight-components/p-76cb2574.entry.js +0 -4
@@ -0,0 +1,159 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ 'use strict';
5
+
6
+ Object.defineProperty(exports, '__esModule', { value: true });
7
+
8
+ const index = require('./index-0d0167d5.js');
9
+
10
+ const sallaTabContentCss = "";
11
+
12
+ const SallaTabContent = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.isSelected = false;
16
+ }
17
+ /**
18
+ * Expose self for the parent.
19
+ */
20
+ async getChild() {
21
+ return {
22
+ selected: this.selected.bind(this),
23
+ unselect: this.unselect.bind(this),
24
+ name: this.name
25
+ };
26
+ }
27
+ unselect() {
28
+ this.isSelected = false;
29
+ }
30
+ selected() {
31
+ this.isSelected = true;
32
+ }
33
+ render() {
34
+ const classes = {
35
+ 's-tabs-content': true,
36
+ 's-tabs-content-selected': this.isSelected
37
+ };
38
+ return (index.h("div", { class: classes }, index.h("slot", null)));
39
+ }
40
+ };
41
+ SallaTabContent.style = sallaTabContentCss;
42
+
43
+ function generateRandomId() {
44
+ return Math.random().toString(36).slice(2, 10);
45
+ }
46
+
47
+ const sallaTabHeaderCss = "";
48
+
49
+ const SallaTabHeader = class {
50
+ constructor(hostRef) {
51
+ index.registerInstance(this, hostRef);
52
+ this.tabSelected = index.createEvent(this, "tabSelected", 7);
53
+ this.id = generateRandomId();
54
+ /**
55
+ * The class applied to the currently active(selected) tab
56
+ */
57
+ this.activeClass = undefined;
58
+ /**
59
+ * Set the height of the tab bar
60
+ */
61
+ this.height = undefined;
62
+ /**
63
+ * Center tab items in the given flex.
64
+ */
65
+ this.centered = false;
66
+ this.isSelected = false;
67
+ }
68
+ /**
69
+ * Expose self for the parent.
70
+ */
71
+ async getChild() {
72
+ return {
73
+ selected: this.selected.bind(this),
74
+ unselect: this.unselect.bind(this),
75
+ name: this.name,
76
+ id: this.id
77
+ };
78
+ }
79
+ unselect() {
80
+ this.isSelected = false;
81
+ }
82
+ selected() {
83
+ this.isSelected = true;
84
+ }
85
+ onClick() {
86
+ this.getChild().then(child => {
87
+ this.tabSelected.emit(child);
88
+ });
89
+ }
90
+ render() {
91
+ const classes = {
92
+ 's-tabs-header-item': true,
93
+ 's-tabs-bg-normal': true,
94
+ 's-tabs-active': this.isSelected,
95
+ };
96
+ return [
97
+ index.h("div", { class: classes, onClick: this.onClick.bind(this) }, index.h("slot", null)),
98
+ ];
99
+ }
100
+ };
101
+ SallaTabHeader.style = sallaTabHeaderCss;
102
+
103
+ const sallaTabsCss = ".s-tabs-header{-ms-overflow-style:none;scrollbar-width:none;}.s-tabs-header::-webkit-scrollbar{display:none}";
104
+
105
+ const SallaTabs = class {
106
+ constructor(hostRef) {
107
+ index.registerInstance(this, hostRef);
108
+ /**
109
+ * Background color
110
+ */
111
+ this.backgroundColor = undefined;
112
+ /**
113
+ * Align tabs vertically.
114
+ */
115
+ this.vertical = false;
116
+ }
117
+ componentWillLoad() {
118
+ this.createGroup().then(() => {
119
+ const [group] = this.tabGroup;
120
+ this.selectGroup(group);
121
+ });
122
+ }
123
+ onSelectedTab(event) {
124
+ const group = this.tabGroup.find(group => group.header.id === event.detail.id);
125
+ this.selectGroup(group);
126
+ }
127
+ async createGroup() {
128
+ const tabsHeaderEl = Array.from(this.host.querySelectorAll('salla-tab-header'));
129
+ this.tabsHeader = await Promise.all(tabsHeaderEl.map(el => el.getChild()));
130
+ const tabsContentEl = Array.from(this.host.querySelectorAll('salla-tab-content'));
131
+ this.tabsContent = await Promise.all(tabsContentEl.map(el => el.getChild()));
132
+ this.tabGroup = this.tabsHeader.map(header => {
133
+ const content = this.tabsContent.find(content => content.name === header.name);
134
+ return {
135
+ header: header,
136
+ content: content
137
+ };
138
+ });
139
+ }
140
+ selectGroup(group) {
141
+ this.tabGroup.map(g => {
142
+ g.header.unselect();
143
+ g.content.unselect();
144
+ });
145
+ group.header.selected();
146
+ group.content.selected();
147
+ }
148
+ render() {
149
+ return [
150
+ index.h("div", { class: "s-tabs" }, index.h("div", { class: "s-tabs-header" }, index.h("slot", { name: "header" })), index.h("div", { class: "s-tabs-content-wrapper" }, index.h("slot", { name: "content" })))
151
+ ];
152
+ }
153
+ get host() { return index.getElement(this); }
154
+ };
155
+ SallaTabs.style = sallaTabsCss;
156
+
157
+ exports.salla_tab_content = SallaTabContent;
158
+ exports.salla_tab_header = SallaTabHeader;
159
+ exports.salla_tabs = SallaTabs;
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ 'use strict';
5
+
6
+ const Star2 = `<!-- Generated by IcoMoon.io -->
7
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="30" height="32" viewBox="0 0 30 32">
8
+ <title>star2</title>
9
+ <path d="M29.714 11.839c0 0.321-0.232 0.625-0.464 0.857l-6.482 6.321 1.536 8.929c0.018 0.125 0.018 0.232 0.018 0.357 0 0.464-0.214 0.893-0.732 0.893-0.25 0-0.5-0.089-0.714-0.214l-8.018-4.214-8.018 4.214c-0.232 0.125-0.464 0.214-0.714 0.214-0.518 0-0.75-0.429-0.75-0.893 0-0.125 0.018-0.232 0.036-0.357l1.536-8.929-6.5-6.321c-0.214-0.232-0.446-0.536-0.446-0.857 0-0.536 0.554-0.75 1-0.821l8.964-1.304 4.018-8.125c0.161-0.339 0.464-0.732 0.875-0.732s0.714 0.393 0.875 0.732l4.018 8.125 8.964 1.304c0.429 0.071 1 0.286 1 0.821z"></path>
10
+ </svg>
11
+ `;
12
+
13
+ exports.Star2 = Star2;
@@ -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],"translationLoaded":[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"],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"translationLoaded":[32],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[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"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"translationLoaded":[32],"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,"tabSelected","onSelectedTab"]]],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[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"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[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-loyalty.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],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}]]],["salla-product-size-guide.cjs",[[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"open":[64],"close":[64]}]]],["salla-scopes.cjs",[[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"close":[64],"open":[64],"handleSubmit":[64]}]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"translationLoaded":[32],"open":[64],"close":[64]}]]],["salla-social-share.cjs",[[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[16],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"open":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-tab-content_3.cjs",[[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]]]],["salla-add-product-button_13.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"]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"translationLoaded":[32],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}],[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-swiper.cjs",[[4,"salla-swiper",{"loop":[4],"speed":[2],"itemPerView":[8,"item-per-view"],"spaceBetweenItems":[2,"space-between-items"],"currentIndex":[32],"isLastSlideItem":[32],"isFirstSlideItem":[32]}]]],["salla-list-tile_2.cjs",[[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}]]]], options);
22
22
  });
@@ -151,7 +151,7 @@ export class SallaLoginModal {
151
151
  return this.modal.open();
152
152
  }
153
153
  showTab(tab, evt) {
154
- var _a, _b;
154
+ var _a;
155
155
  evt === null || evt === void 0 ? void 0 : evt.preventDefault();
156
156
  let tabs = [this.homeTab, this.mobileTab, this.emailTab, this.verifyTab, this.registrationTab];
157
157
  tabs.map(el => Helper.toggleElementClassIf(el, 'visible', 's-hidden', () => el == tab));
@@ -163,8 +163,9 @@ export class SallaLoginModal {
163
163
  this.regType = tab === this.mobileTab ? 'phone' : 'email';
164
164
  }
165
165
  let isRegistrationTab = tab == this.registrationTab;
166
- (_a = tab.querySelector('input')) === null || _a === void 0 ? void 0 : _a.focus(); // focus the first input in tab
167
- (_b = this.modal) === null || _b === void 0 ? void 0 : _b.setTitle(isRegistrationTab ? salla.lang.get('common.titles.registration') : this.title);
166
+ // focus the first input in tab
167
+ // tab.querySelector('input')?.focus();
168
+ (_a = this.modal) === null || _a === void 0 ? void 0 : _a.setTitle(isRegistrationTab ? salla.lang.get('common.titles.registration') : this.title);
168
169
  if (!isRegistrationTab) {
169
170
  Helper.toggleElementClassIf(this.regMobileBlock, 's-hidden', 's-show', () => this.regType === 'phone')
170
171
  .toggleElementClassIf(this.regEmailBlock, 's-hidden', 's-show', () => this.regType === 'email');
@@ -162,7 +162,7 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
162
162
  return this.modal.open();
163
163
  }
164
164
  showTab(tab, evt) {
165
- var _a, _b;
165
+ var _a;
166
166
  evt === null || evt === void 0 ? void 0 : evt.preventDefault();
167
167
  let tabs = [this.homeTab, this.mobileTab, this.emailTab, this.verifyTab, this.registrationTab];
168
168
  tabs.map(el => Helper.toggleElementClassIf(el, 'visible', 's-hidden', () => el == tab));
@@ -174,8 +174,9 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
174
174
  this.regType = tab === this.mobileTab ? 'phone' : 'email';
175
175
  }
176
176
  let isRegistrationTab = tab == this.registrationTab;
177
- (_a = tab.querySelector('input')) === null || _a === void 0 ? void 0 : _a.focus(); // focus the first input in tab
178
- (_b = this.modal) === null || _b === void 0 ? void 0 : _b.setTitle(isRegistrationTab ? salla.lang.get('common.titles.registration') : this.title);
177
+ // focus the first input in tab
178
+ // tab.querySelector('input')?.focus();
179
+ (_a = this.modal) === null || _a === void 0 ? void 0 : _a.setTitle(isRegistrationTab ? salla.lang.get('common.titles.registration') : this.title);
179
180
  if (!isRegistrationTab) {
180
181
  Helper.toggleElementClassIf(this.regMobileBlock, 's-hidden', 's-show', () => this.regType === 'phone')
181
182
  .toggleElementClassIf(this.regEmailBlock, 's-hidden', 's-show', () => this.regType === 'email');
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ //TODO::check why there are too much listeners for languages::translations.loaded
5
+ salla.event.setMaxListeners(20);
6
+ class Helper extends salla.AppHelpers {
7
+ setHost(host) {
8
+ this.host = host;
9
+ }
10
+ getElement(selector) {
11
+ return this.host.querySelector(selector);
12
+ }
13
+ getAttribute(selector, attribute) {
14
+ var _a;
15
+ return (_a = this.getElement(selector)) === null || _a === void 0 ? void 0 : _a.getAttribute(attribute);
16
+ }
17
+ val(selector) {
18
+ return this.getAttribute(selector, 'value');
19
+ }
20
+ isUser() {
21
+ return salla.config.get('user.type') === 'user';
22
+ }
23
+ }
24
+ const Helper$1 = new Helper;
25
+
26
+ export { Helper$1 as H };
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ const ArrowRightIcon = `<!-- Generated by IcoMoon.io -->
5
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
6
+ <title>arrow-right</title>
7
+ <path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>
8
+ </svg>
9
+ `;
10
+
11
+ export { ArrowRightIcon as A };
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ const Cancel = `<!-- Generated by IcoMoon.io -->
5
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
6
+ <title>cancel</title>
7
+ <path d="M17.885 16l7.057-7.057c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-7.057 7.057-7.057-7.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l7.057 7.057-7.057 7.057c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l7.057-7.057 7.057 7.057c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z"></path>
8
+ </svg>
9
+ `;
10
+
11
+ export { Cancel as C };
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ const CheckCircle2 = `<!-- Generated by IcoMoon.io -->
5
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
6
+ <title>check-circle2</title>
7
+ <path d="M29.333 14.133c-0.8 0-1.333 0.533-1.333 1.333v1.2c0 6.667-5.333 12-12 12 0 0 0 0 0 0-6.667 0-12-5.333-12-12s5.333-12 12-12c0 0 0 0 0 0 1.733 0 3.333 0.4 4.933 1.067 0.667 0.267 1.467 0 1.733-0.667s0-1.467-0.667-1.733c-1.867-0.8-3.867-1.333-6-1.333 0 0 0 0 0 0-8.133 0-14.667 6.533-14.667 14.667s6.533 14.667 14.667 14.667c0 0 0 0 0 0 8.133 0 14.667-6.533 14.667-14.667v-1.2c0-0.8-0.533-1.333-1.333-1.333zM12.933 14.4c-0.533-0.533-1.333-0.533-1.867 0s-0.533 1.333 0 1.867l4 4c0.267 0.267 0.533 0.4 0.933 0.4s0.667-0.133 0.933-0.4l13.333-13.333c0.533-0.533 0.533-1.333 0-1.867s-1.333-0.533-1.867 0l-12.4 12.4-3.067-3.067z"></path>
8
+ </svg>
9
+ `;
10
+
11
+ export { CheckCircle2 as C };
@@ -13,7 +13,7 @@ const patchEsm = () => {
13
13
  const defineCustomElements = (win, options) => {
14
14
  if (typeof window === 'undefined') return Promise.resolve();
15
15
  return patchEsm().then(() => {
16
- return bootstrapLazy([["salla-button_24",[[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],"translationLoaded":[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"],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"translationLoaded":[32],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[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"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"translationLoaded":[32],"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,"tabSelected","onSelectedTab"]]],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[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",[[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"close":[64],"open":[64],"handleSubmit":[64]}]]],["salla-add-product-button",[[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",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-installment",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]]], options);
16
+ return bootstrapLazy([["salla-loyalty",[[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],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}]]],["salla-product-size-guide",[[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"open":[64],"close":[64]}]]],["salla-scopes",[[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"close":[64],"open":[64],"handleSubmit":[64]}]]],["salla-rating-modal",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"translationLoaded":[32],"open":[64],"close":[64]}]]],["salla-social-share",[[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[16],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"open":[64]}]]],["salla-conditional-fields",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-tab-content_3",[[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]]]],["salla-add-product-button_13",[[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"]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"translationLoaded":[32],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}],[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-swiper",[[4,"salla-swiper",{"loop":[4],"speed":[2],"itemPerView":[8,"item-per-view"],"spaceBetweenItems":[2,"space-between-items"],"currentIndex":[32],"isLastSlideItem":[32],"isFirstSlideItem":[32]}]]],["salla-list-tile_2",[[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}]]]], options);
17
17
  });
18
18
  };
19
19
 
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ const email = `<!-- Generated by IcoMoon.io -->
5
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
6
+ <title>mail</title>
7
+ <path d="M28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-12.685l10.54 4.865c0.888 0.409 1.84 0.613 2.793 0.613s1.907-0.204 2.793-0.615l10.54-4.864zM29.333 9.711l-11.657 5.38c-1.065 0.492-2.288 0.492-3.353 0l-11.656-5.38v-3.044c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z"></path>
8
+ </svg>
9
+ `;
10
+
11
+ export { email as e };