@salla.sa/twilight-components 1.4.21 → 1.5.2

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/loader.cjs.js +1 -1
  2. package/dist/cjs/salla-button_24.cjs.entry.js +287 -242
  3. package/dist/cjs/salla-scopes.cjs.entry.js +156 -0
  4. package/dist/cjs/search-b487cc49.js +13 -0
  5. package/dist/cjs/twilight-components.cjs.js +1 -1
  6. package/dist/collection/assets/{flat.svg → svg/flat.svg} +0 -0
  7. package/dist/collection/assets/svg/tag.svg +0 -1
  8. package/dist/collection/components/salla-login-modal/salla-login-modal.js +12 -6
  9. package/dist/collection/components/salla-loyalty/salla-loyalty.js +1 -1
  10. package/dist/collection/components/salla-modal/salla-modal.js +21 -51
  11. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +39 -32
  12. package/dist/collection/components/salla-product-availability/salla-product-availability.js +4 -2
  13. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +12 -9
  14. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +4 -2
  15. package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +4 -3
  16. package/dist/collection/components/salla-search/salla-search.js +7 -4
  17. package/dist/collection/components/salla-social-share/salla-social-share.js +3 -1
  18. package/dist/collection/components/salla-swiper/salla-swiper.css +0 -23
  19. package/dist/collection/components/salla-swiper/salla-swiper.js +4 -2
  20. package/dist/collection/components/salla-tel-input/salla-tel-input.css +1 -2
  21. package/dist/collection/components/salla-verify/salla-verify.js +4 -1
  22. package/dist/components/arrow-right.js +11 -0
  23. package/dist/components/cancel.js +11 -0
  24. package/dist/components/keyboard_arrow_right.js +11 -0
  25. package/dist/components/mail.js +11 -0
  26. package/dist/components/salla-login-modal.js +20 -3
  27. package/dist/components/salla-loyalty.js +3 -15
  28. package/dist/components/salla-modal2.js +25 -25
  29. package/dist/components/salla-offer-modal.js +25 -3
  30. package/dist/components/salla-product-availability2.js +9 -2
  31. package/dist/components/salla-quantity-input.js +16 -2
  32. package/dist/components/salla-rating-modal.js +10 -3
  33. package/dist/components/salla-rating-stars2.js +4 -3
  34. package/dist/components/salla-scopes.js +1 -7
  35. package/dist/components/salla-search.js +7 -4
  36. package/dist/components/salla-social-share.js +10 -8
  37. package/dist/components/salla-swiper2.js +10 -2
  38. package/dist/components/salla-tel-input2.js +1 -1
  39. package/dist/components/salla-verify2.js +8 -1
  40. package/dist/components/search.js +11 -0
  41. package/dist/components/star2.js +11 -0
  42. package/dist/esm/loader.js +1 -1
  43. package/dist/esm/salla-button_24.entry.js +287 -242
  44. package/dist/esm/salla-scopes.entry.js +152 -0
  45. package/dist/esm/search-19ea3313.js +11 -0
  46. package/dist/esm/twilight-components.js +1 -1
  47. package/dist/twilight-components/p-282f9df8.entry.js +4 -0
  48. package/dist/twilight-components/p-40a01521.entry.js +4 -0
  49. package/dist/twilight-components/p-475ef754.js +4 -0
  50. package/dist/twilight-components/twilight-components.esm.js +1 -1
  51. package/dist/types/components/salla-modal/salla-modal.d.ts +2 -10
  52. package/dist/types/components/salla-search/salla-search.d.ts +1 -1
  53. package/dist/types/components.d.ts +4 -18
  54. package/example/assets/tailwind.css +269 -75
  55. package/package.json +4 -4
  56. package/dist/cjs/Helper-8ae6a805.js +0 -28
  57. package/dist/cjs/salla-quantity-input.cjs.entry.js +0 -87
  58. package/dist/esm/Helper-e1d414a5.js +0 -26
  59. package/dist/esm/salla-quantity-input.entry.js +0 -83
  60. package/dist/twilight-components/p-4c5055cf.entry.js +0 -4
  61. package/dist/twilight-components/p-9d2ca9c8.js +0 -4
  62. package/dist/twilight-components/p-b31f472a.entry.js +0 -4
@@ -0,0 +1,156 @@
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
+ const search = require('./search-b487cc49.js');
10
+
11
+ const StoreAlt = `<!-- Generated by IcoMoon.io -->
12
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
13
+ <title>store-alt</title>
14
+ <path d="M6.667 24h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.86 10.071l-4-8c-0.227-0.452-0.688-0.737-1.193-0.737h-21.333c-0.505 0-0.967 0.285-1.193 0.737l-4 8c-0.092 0.184-0.14 0.389-0.14 0.596v18.667c0 0.737 0.597 1.333 1.333 1.333h29.333c0.736 0 1.333-0.596 1.333-1.333v-18.667c0-0.207-0.048-0.412-0.14-0.596zM6.157 4h19.685l3.333 6.667h-26.352zM24 28h-5.333v-9.333h5.333zM29.333 28h-2.667v-10.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333v10.667h-13.333v-14.667h26.667zM6.667 18.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333z"></path>
15
+ </svg>
16
+ `;
17
+
18
+ var ModeType;
19
+ (function (ModeType) {
20
+ ModeType["DEFAULT"] = "default";
21
+ ModeType["AVAILABILITY"] = "availability";
22
+ })(ModeType || (ModeType = {}));
23
+
24
+ const sallaScopesCss = ".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}";
25
+
26
+ const SallaScopees = class {
27
+ constructor(hostRef) {
28
+ index.registerInstance(this, hostRef);
29
+ this.mode = ModeType.DEFAULT;
30
+ this.scopes = [];
31
+ this.originalScopesList = [];
32
+ this.isOpenedBefore = salla.storage.get("branch-choosed-before");
33
+ /**
34
+ * Optionally open the modal or enforce the pop-up to the viewer
35
+ */
36
+ this.selection = 'optional';
37
+ /**
38
+ * Dictates when to show the search field
39
+ */
40
+ this.searchDisplayLimit = 6;
41
+ this.getFormTitle = () => {
42
+ var _a;
43
+ if (((_a = this.originalScopesList) === null || _a === void 0 ? void 0 : _a.length) < 2)
44
+ return "";
45
+ return this.mode === ModeType.DEFAULT ?
46
+ this.shoppingFromAnotherBranch :
47
+ this.searchForAvailabilityInOtherBranch;
48
+ };
49
+ salla.event.on('scopes::open', ({ mode = null, product_id = null }) => {
50
+ this.open(mode, product_id);
51
+ });
52
+ salla.lang.onLoaded(() => {
53
+ this.branchNotFound = salla.lang.get("blocks.scope.branch_looking_for_not_found");
54
+ this.ourServiceIsNotFound = salla.lang.get("blocks.scope.our_services_not_available_in_this_branch");
55
+ this.searchForAvailabilityInOtherBranch = salla.lang.get('blocks.scope.search_for_availability_in_other_branches');
56
+ this.shoppingFromAnotherBranch = salla.lang.get("blocks.scope.shopping_from_another_branch");
57
+ this.nowBrowsingFrom = salla.lang.get('blocks.scope.you_are_browse_store_from');
58
+ this.confirmButton = salla.lang.get('common.elements.confirm');
59
+ this.scopeSearchPlaceholder = salla.lang.get('blocks.scope.searching_for_a_branch');
60
+ });
61
+ }
62
+ async close() {
63
+ var _a;
64
+ return await ((_a = this.modal) === null || _a === void 0 ? void 0 : _a.close());
65
+ }
66
+ async open(mode = ModeType.DEFAULT, product_id = null) {
67
+ this.setScopeValues([]);
68
+ if (typeof mode !== 'undefined' && [ModeType.AVAILABILITY, ModeType.DEFAULT].includes(mode)) {
69
+ this.mode = mode;
70
+ }
71
+ else {
72
+ this.mode = ModeType.DEFAULT;
73
+ }
74
+ this.modal.loading();
75
+ this.modal.open();
76
+ return await (mode == ModeType.AVAILABILITY ? salla.scope.getProductAvailability(product_id) : salla.scope.get())
77
+ .then((resp) => {
78
+ if (mode == ModeType.AVAILABILITY) {
79
+ this.setScopeValues(resp.data);
80
+ }
81
+ else {
82
+ this.setScopeValues(resp.data.scopes);
83
+ }
84
+ }).catch(e => console.log(e))
85
+ .finally(() => {
86
+ this.modal.stopLoading();
87
+ });
88
+ }
89
+ async handleSubmit() {
90
+ let payload = { 'scope_id': this.current_scope.id };
91
+ this.changeBtn.load();
92
+ return await salla.scope.change(payload)
93
+ .then(() => {
94
+ 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;
97
+ }).catch(e => console.log(e))
98
+ .finally(() => {
99
+ this.changeBtn.stop();
100
+ });
101
+ }
102
+ setScopeValues(value) {
103
+ this.scopes = value;
104
+ this.originalScopesList = value;
105
+ if (value.length == 1) {
106
+ this.current_scope = value[0];
107
+ this.selected_scope = value[0];
108
+ }
109
+ else {
110
+ this.current_scope = value.find(scope => scope.selected);
111
+ this.selected_scope = value.find(scope => scope.selected);
112
+ }
113
+ }
114
+ handleSearchFieldTyping(e) {
115
+ let value = e.target.value.toLocaleLowerCase();
116
+ if (!!value) {
117
+ this.scopes = this.originalScopesList.filter(scope => scope.name.toLowerCase().includes(value));
118
+ }
119
+ else {
120
+ this.scopes = this.originalScopesList;
121
+ }
122
+ }
123
+ handleScopeSelection(event) {
124
+ this.current_scope = this.scopes.find(scope => scope.id == event.target.value);
125
+ }
126
+ placeholderContent() {
127
+ return index.h("salla-placeholder", { alignment: "center", class: "s-scopes-placeholder" }, index.h("span", { slot: "title" }, this.branchNotFound), index.h("span", { slot: "description" }, this.ourServiceIsNotFound));
128
+ }
129
+ defaultContent() {
130
+ return [index.h("div", { class: "s-scopes-container s-scrollbar" }, this.scopes.map((scope) => index.h("div", { class: "s-scopes-input-wrap", "data-selection": this.selection }, index.h("input", { id: `${this.selection} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }), index.h("label", { htmlFor: `${this.selection} + '_scope_' + ${scope.id}`, class: "s-scopes-label s-scopes-clickable" }, index.h("span", null, scope.name))))), this.footerContent()];
131
+ }
132
+ availabilityContent() {
133
+ return index.h("div", { class: "s-scopes-container" }, this.scopes.map((scope) => {
134
+ var _a, _b, _c, _d, _e, _f;
135
+ return index.h("div", { class: "s-scopes-input-wrap", "data-selection": this.selection }, index.h("h2", { class: { "s-scopes-label": true, "s-scopes-clickable": this.mode === ModeType.DEFAULT } }, index.h("span", null, scope.name)), index.h("h2", { style: { 'color': (_b = (_a = scope) === null || _a === void 0 ? void 0 : _a.availability) === null || _b === void 0 ? void 0 : _b.color }, class: `s-scopes-${(_d = (_c = scope) === null || _c === void 0 ? void 0 : _c.availability) === null || _d === void 0 ? void 0 : _d.key}` }, (_f = (_e = scope) === null || _e === void 0 ? void 0 : _e.availability) === null || _f === void 0 ? void 0 : _f.label));
136
+ }));
137
+ }
138
+ footerContent() {
139
+ return index.h("div", { class: "s-scopes-footer" }, index.h("slot", { name: "footer" }, index.h("salla-button", { ref: btn => this.changeBtn = btn, disabled: !this.current_scope, onClick: () => this.handleSubmit(), class: "s-scopes-submit", "loader-position": "center", width: "wide" }, this.confirmButton)));
140
+ }
141
+ render() {
142
+ return (index.h(index.Host, null, index.h("salla-modal", { ref: modal => this.modal = modal, isClosable: !!(this.isOpenedBefore || (this.selection == 'optional')), class: "s-scopes-modal", isLoading: true, "has-skeleton": true }, index.h("div", { slot: "loading" }, index.h("div", { class: "s-scopes-skeleton" }, index.h("salla-list-tile", { class: "s-scopes-header" }, index.h("div", { slot: "icon", class: "s-scopes-header-icon" }, index.h("salla-skeleton", { type: "circle" })), index.h("div", { slot: "title", class: "s-scopes-header-title mb-5" }, index.h("salla-skeleton", { height: '15px', width: '50%' })), index.h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, index.h("salla-skeleton", { height: '10px' }), index.h("salla-skeleton", { height: '10px', width: '75%' }))), index.h("div", { class: "s-scopes-skeleton-search" }, index.h("salla-skeleton", { height: '10px', width: '50%' }), index.h("salla-skeleton", { height: '30px', width: '100%' })), index.h("div", { class: "s-scopes-skeleton-scopes" }, index.h("salla-skeleton", { height: '10px', width: '30%' }), index.h("salla-skeleton", { height: '10px', width: '25%' }), index.h("salla-skeleton", { height: '10px', width: '30%' }), index.h("salla-skeleton", { height: '10px', width: '25%' }), index.h("salla-skeleton", { height: '10px', width: '30%' }), index.h("salla-skeleton", { height: '10px', width: '25%' }), index.h("salla-skeleton", { height: '10px', width: '30%' }), index.h("salla-skeleton", { height: '10px', width: '25%' })), index.h("div", { class: "s-scopes-skeleton-btn" }, index.h("salla-skeleton", { height: '40px', width: '100%' })))), index.h("salla-list-tile", { class: this.originalScopesList.length ? "s-scopes-header block" : "s-hidden" }, index.h("div", { slot: "icon", class: "s-scopes-header-icon", innerHTML: StoreAlt }), index.h("div", { slot: "title", class: "s-scopes-header-title" }, this.nowBrowsingFrom), index.h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, !!this.selected_scope ? this.selected_scope.name : "")), index.h("div", { class: "s-scopes-wrap" }, !!this.originalScopesList.length && index.h("h4", { class: "s-scopes-title" }, this.getFormTitle()), this.originalScopesList.length > this.searchDisplayLimit ?
143
+ index.h("div", { class: "s-scopes-search-wrapper" }, index.h("div", { class: "s-scopes-search-icon", innerHTML: search.Search }), index.h("input", { type: "text", class: "s-scopes-search-input", onInput: e => this.handleSearchFieldTyping(e), placeholder: this.scopeSearchPlaceholder }))
144
+ : "", this.scopes.length < 2 ?
145
+ this.placeholderContent()
146
+ : this.mode === ModeType.DEFAULT ? this.defaultContent() : this.availabilityContent()))));
147
+ }
148
+ componentDidLoad() {
149
+ if (!this.isOpenedBefore && this.selection == 'mandatory') {
150
+ this.open();
151
+ }
152
+ }
153
+ };
154
+ SallaScopees.style = sallaScopesCss;
155
+
156
+ exports.salla_scopes = SallaScopees;
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ 'use strict';
5
+
6
+ const Search = `<!-- Generated by IcoMoon.io -->
7
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
8
+ <title>search</title>
9
+ <path d="M30.276 28.391l-7.576-7.576c1.644-2.053 2.633-4.652 2.633-7.481 0-6.616-5.384-12-12-12s-12 5.384-12 12 5.384 12 12 12c2.829 0 5.428-0.989 7.481-2.633l7.576 7.576c0.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.885zM13.333 22.667c-5.147 0-9.333-4.187-9.333-9.333s4.187-9.333 9.333-9.333 9.333 4.187 9.333 9.333-4.187 9.333-9.333 9.333z"></path>
10
+ </svg>
11
+ `;
12
+
13
+ exports.Search = Search;
@@ -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-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]}],[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],"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]}],[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"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"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-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]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]]], 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);
22
22
  });
@@ -1,4 +1,3 @@
1
- <!-- Generated by IcoMoon.io -->
2
1
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3
2
  <title>tag</title>
4
3
  <path d="M28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>
@@ -3,6 +3,11 @@
3
3
  */
4
4
  import { Component, Element, h, Listen, Method, Prop, State } from '@stencil/core';
5
5
  import Helper from "../../Helpers/Helper";
6
+ import UserIcon from "../../assets/svg/user.svg";
7
+ import PhoneIcon from "../../assets/svg/phone.svg";
8
+ import EmailIcon from "../../assets/svg/mail.svg";
9
+ import KeyboardArrowRightIcon from "../../assets/svg/keyboard_arrow_right.svg";
10
+ import ArrowRightIcon from "../../assets/svg/arrow-right.svg";
6
11
  /**
7
12
  * @slot footer - The footer of modal
8
13
  * @slot before-login-type - placeholder position
@@ -192,20 +197,21 @@ export class SallaLoginModal {
192
197
  field.nextElementSibling['innerText'] = '* ' + errorMsg;
193
198
  }
194
199
  render() {
195
- return (h("salla-modal", { id: "salla-login", icon: "sicon-user", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" },
200
+ return (h("salla-modal", { class: "s-login-modal", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" },
201
+ h("span", { slot: 'icon', class: "s-login-modal-header-icon", innerHTML: UserIcon }),
196
202
  h("div", { class: "s-login-modal-wrapper" },
197
203
  this.isEmailAllowed && this.isMobileAllowed ?
198
204
  h("div", { class: "s-login-modal-tab", ref: tab => this.homeTab = tab },
199
205
  h("p", { class: "s-login-modal-sub-title" }, this.loginTypeTitle),
200
206
  h("slot", { name: "before-login-type" }),
201
207
  h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.mobileTab, evt) },
202
- h("i", { class: "s-login-modal-main-btn-icon sicon-phone" }),
208
+ h("span", { class: "s-login-modal-main-btn-icon", innerHTML: PhoneIcon }),
203
209
  h("span", { class: "s-login-modal-main-btn-text" }, this.smsLabel),
204
- h("i", { class: "sicon-keyboard_arrow_left arrow" })),
210
+ h("span", { class: "s-login-modal-main-btn-arrow", innerHTML: KeyboardArrowRightIcon })),
205
211
  h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.emailTab, evt) },
206
- h("i", { class: "s-login-modal-main-btn-icon sicon-mail" }),
212
+ h("span", { class: "s-login-modal-main-btn-icon", innerHTML: EmailIcon }),
207
213
  h("span", { class: "s-login-modal-main-btn-text" }, this.emailLabel),
208
- h("i", { class: "sicon-keyboard_arrow_left arrow" })),
214
+ h("span", { class: "s-login-modal-main-btn-arrow", innerHTML: KeyboardArrowRightIcon })),
209
215
  h("slot", { name: "after-login-type" }))
210
216
  : '',
211
217
  this.isMobileAllowed ?
@@ -229,7 +235,7 @@ export class SallaLoginModal {
229
235
  : '',
230
236
  h("slot", { name: "after-login-email" })) : '',
231
237
  h("salla-verify", { display: "inline", ref: tab => this.verifyTab = tab, autoReload: false },
232
- h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-back sicon-arrow-right", slot: "after-footer", href: "#" })),
238
+ h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-back", innerHTML: ArrowRightIcon, slot: "after-footer", href: "#" })),
233
239
  h("div", { ref: tab => this.registrationTab = tab },
234
240
  h("slot", { name: "before-registration" }),
235
241
  h("div", null,
@@ -5,7 +5,7 @@ import { Component, h, Method, Prop, State } from '@stencil/core';
5
5
  import Star2 from '../../assets/svg/star2.svg';
6
6
  import Star3 from '../../assets/svg/star3.svg';
7
7
  import CancelIcon from '../../assets/svg/cancel.svg';
8
- import GiftImg from '../../assets/flat.svg';
8
+ import GiftImg from '../../assets/svg/flat.svg';
9
9
  export class SallaLoyalty {
10
10
  constructor() {
11
11
  this.loyaltyProgram = undefined;
@@ -3,6 +3,9 @@
3
3
  */
4
4
  import { Component, Element, h, Host, Method, Prop, State, Watch } from '@stencil/core';
5
5
  import Helper from "../../Helpers/Helper";
6
+ import CancelIcon from '../../assets/svg/cancel.svg';
7
+ import AlertEngineIcon from '../../assets/svg/alert-engine.svg';
8
+ import CheckCircleIcon from '../../assets/svg/check-circle2.svg';
6
9
  /**
7
10
  * @slot footer - The footer of modal
8
11
  */
@@ -32,15 +35,8 @@ export class SallaModal {
32
35
  this.subTitleFirst = false; //todo:: choose better name
33
36
  this.noPadding = false; //todo:: choose better name
34
37
  this.subTitle = '';
35
- /**
36
- * Icon css class, default for types `error` is `sicon-alert-engine`, `success` is `sicon-check-circle2`
37
- */
38
- this.icon = '';
39
- this.iconStyle = '';
40
- /**
41
- * url of an image
42
- */
43
- this.imageIcon = '';
38
+ this.centered = false;
39
+ this.iconStyle = undefined;
44
40
  Helper.setHost(this.host);
45
41
  salla.event.on('modal::open', target => target == this.host.id && this.open());
46
42
  salla.event.on('modal::close', target => target == this.host.id && this.close());
@@ -114,17 +110,10 @@ export class SallaModal {
114
110
  's-modal-icon': true,
115
111
  's-modal-bg-error': this.iconStyle == 'error',
116
112
  's-modal-bg-success': this.iconStyle == 'success',
117
- 's-modal-bg-normal': this.iconStyle != 'error' && this.iconStyle != 'success',
113
+ 's-modal-bg-normal': !this.iconStyle,
118
114
  's-modal-bg-primary': this.iconStyle == 'primary'
119
115
  };
120
116
  }
121
- iconClasses() {
122
- return {
123
- [this.icon]: true,
124
- 'sicon-alert-engine': !this.icon && this.iconStyle == 'error' && !this.imageIcon,
125
- 'sicon-check-circle2': !this.icon && this.iconStyle == 'success' && !this.imageIcon,
126
- };
127
- }
128
117
  getWidth() {
129
118
  return this.isLoading ? (this.hasSkeleton ? 'md' : 'xs') : this.width;
130
119
  }
@@ -147,17 +136,16 @@ export class SallaModal {
147
136
  h("div", { class: "s-modal-wrapper" },
148
137
  h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"),
149
138
  h("div", { class: 's-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.getWidth() + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding') },
150
- h("div", { class: { 's-modal-header': true, 's-modal-is-center': this.icon != '' || this.imageIcon != '' } },
139
+ h("div", { class: { 's-modal-header': true, 's-modal-is-center': this.centered } },
151
140
  this.isClosable ?
152
141
  h("button", { class: "s-modal-close", onClick: () => this.closeModal(), type: "button" },
153
- h("span", { class: "sicon-cancel" }))
142
+ h("span", { innerHTML: CancelIcon }))
154
143
  : '',
155
144
  this.modalTitle || this.subTitle ?
156
145
  h("div", { class: "s-modal-header-inner" },
157
- this.iconStyle || this.icon
158
- ? h("div", { class: this.iconBlockClasses() },
159
- h("i", { class: this.iconClasses() }))
160
- : this.imageIcon ? h("img", { class: "s-modal-header-img", src: this.imageIcon }) : '',
146
+ h("slot", { name: 'icon' }, !!this.iconStyle ?
147
+ h("div", { class: this.iconBlockClasses(), innerHTML: this.iconStyle == 'error' ? AlertEngineIcon : CheckCircleIcon })
148
+ : ''),
161
149
  h("div", { class: "s-modal-header-content" },
162
150
  h("div", { class: { 's-modal-title': true, 's-modal-title-below': this.subTitleFirst }, innerHTML: this.modalTitle }),
163
151
  h("p", { class: { 's-modal-sub-title': true }, innerHTML: this.subTitle })))
@@ -339,30 +327,30 @@ export class SallaModal {
339
327
  "reflect": false,
340
328
  "defaultValue": "''"
341
329
  },
342
- "icon": {
343
- "type": "string",
330
+ "centered": {
331
+ "type": "boolean",
344
332
  "mutable": false,
345
333
  "complexType": {
346
- "original": "string",
347
- "resolved": "string",
334
+ "original": "boolean",
335
+ "resolved": "boolean",
348
336
  "references": {}
349
337
  },
350
338
  "required": false,
351
339
  "optional": false,
352
340
  "docs": {
353
341
  "tags": [],
354
- "text": "Icon css class, default for types `error` is `sicon-alert-engine`, `success` is `sicon-check-circle2`"
342
+ "text": ""
355
343
  },
356
- "attribute": "icon",
344
+ "attribute": "centered",
357
345
  "reflect": false,
358
- "defaultValue": "''"
346
+ "defaultValue": "false"
359
347
  },
360
348
  "iconStyle": {
361
349
  "type": "string",
362
350
  "mutable": false,
363
351
  "complexType": {
364
- "original": "string",
365
- "resolved": "string",
352
+ "original": "'error' | 'success' | 'primary' | 'normal'",
353
+ "resolved": "\"error\" | \"normal\" | \"primary\" | \"success\"",
366
354
  "references": {}
367
355
  },
368
356
  "required": false,
@@ -373,25 +361,7 @@ export class SallaModal {
373
361
  },
374
362
  "attribute": "icon-style",
375
363
  "reflect": false,
376
- "defaultValue": "''"
377
- },
378
- "imageIcon": {
379
- "type": "string",
380
- "mutable": false,
381
- "complexType": {
382
- "original": "string",
383
- "resolved": "string",
384
- "references": {}
385
- },
386
- "required": false,
387
- "optional": false,
388
- "docs": {
389
- "tags": [],
390
- "text": "url of an image"
391
- },
392
- "attribute": "image-icon",
393
- "reflect": false,
394
- "defaultValue": "''"
364
+ "defaultValue": "undefined"
395
365
  }
396
366
  }; }
397
367
  static get states() { return {
@@ -3,6 +3,10 @@
3
3
  */
4
4
  import { Component, h, Element, Method, State } from '@stencil/core';
5
5
  import Helper from "../../Helpers/Helper";
6
+ import SpecialDiscountIcon from '../../assets/svg/special-discount.svg';
7
+ import KeyboardArrowRightIcon from "../../assets/svg/keyboard_arrow_right.svg";
8
+ import KeyboardArrowLeftIcon from "../../assets/svg/keyboard_arrow_left.svg";
9
+ import Tag from "../../assets/svg/tag.svg";
6
10
  /**
7
11
  * @slot header - The top of the popup, has replaceable props `{name}`, `{message}`.
8
12
  * @slot product - Replaces product card, has replaceable props `{name}`, `{url}`, `{image}`, `{price}`.
@@ -23,7 +27,7 @@ export class SallaOfferModal {
23
27
  this.add_to_cart = salla.lang.get('pages.cart.add_to_cart');
24
28
  this.out_of_stock = salla.lang.get('pages.products.out_of_stock');
25
29
  });
26
- this.categorySlot = ((_a = Helper.getElement('[slot="category"]')) === null || _a === void 0 ? void 0 : _a.innerHTML) || '<i class="s-offer-modal-badge-icon sicon-tag"></i><span class="s-offer-modal-badge-text">{name}</span>';
30
+ this.categorySlot = ((_a = Helper.getElement('[slot="category"]')) === null || _a === void 0 ? void 0 : _a.innerHTML) || `<span class="s-offer-modal-badge-icon">{tagIcon}</span><span class="s-offer-modal-badge-text">{name}</span>`;
27
31
  this.productSlot = ((_b = Helper.getElement('[slot="product"]')) === null || _b === void 0 ? void 0 : _b.innerHTML) || this.defaultProductSlot();
28
32
  salla.product.event.onOfferExisted(offer => {
29
33
  if (salla.storage.get('remember-offer-' + offer.id)) {
@@ -73,37 +77,40 @@ export class SallaOfferModal {
73
77
  }
74
78
  render() {
75
79
  var _a, _b;
76
- return h("salla-modal", { "sub-title-first": true, icon: "sicon-special-discount", "sub-title": this.offer_message, ref: modal => this.modal = modal, "is-loading": this.offer === null }, this.offer !== null
77
- ? [h("div", { class: "s-offer-modal-scrolled-slider-wrap" },
78
- h("div", { class: "s-offer-modal-body s-offer-modal-scrolled-slider" }, ((_a = this.offer.get.categories) === null || _a === void 0 ? void 0 : _a.length) > 0
79
- ? this.offer.get.categories.map(category => h("a", { href: category.urls.customer, class: "s-offer-modal-badge s-offer-modal-slider-item", innerHTML: this.categorySlot
80
- .replace(/\{name\}/g, category.name)
81
- .replace(/\{url\}/g, category.urls.customer) }))
82
- : (_b = this.offer.get.products) === null || _b === void 0 ? void 0 : _b.map(product => h("div", { class: { "s-offer-modal-product": true, "s-offer-modal-slider-item": true, "s-offer-modal-not-available": !product.is_available }, id: 'product_' + product.id, innerHTML: this.productSlot
83
- .replace(/\{name\}/g, product.name)
84
- .replace(/\{url\}/g, product.url)
85
- .replace(/\{image\}/g, product.thumbnail)
86
- .replace(/\{price\}/g, product.has_special_price
87
- ? salla.money(product.price) + '<span class="s-offer-modal-product-old-price">' + salla.money(product.regular_price) + '</span>'
88
- : salla.money(product.price)) },
89
- h("div", { class: "s-offer-modal-btn-wrap" },
90
- h("salla-button", { width: "wide", fill: 'outline', "data-id": product.id, disabled: !product.is_available, "loader-position": "center", onClick: this.addItem }, product.is_available ? this.add_to_cart : this.out_of_stock))))),
91
- h("div", { class: "s-offer-modal-slider-nav" },
92
- h("button", { class: "s-offer-modal-nav-btn s-offer-modal-prev-btn" },
93
- h("span", { class: "s-offer-modal-nav-btn-icon sicon-keyboard_arrow_left" })),
94
- h("button", { class: "s-offer-modal-nav-btn s-offer-modal-next-btn" },
95
- h("span", { class: "s-offer-modal-nav-btn-icon sicon-keyboard_arrow_right" })))), h("div", { class: "s-offer-modal-footer", slot: "footer" },
96
- this.offer.formatted_date ?
97
- h("p", { class: "s-offer-modal-expiry" },
98
- this.offer_expires_in,
99
- " ",
100
- this.offer.formatted_date)
101
- : '',
102
- h("label", { class: "s-offer-modal-remember-label" },
103
- h("input", { type: "checkbox", onChange: e => this.rememberMe(e), class: "s-offer-modal-remember-input" }),
104
- "\u00A0 ",
105
- this.remember_my_choice)),
106
- ] : '');
80
+ return h("salla-modal", { "sub-title-first": true, "sub-title": this.offer_message, ref: modal => this.modal = modal, "is-loading": this.offer === null },
81
+ h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }),
82
+ this.offer !== null
83
+ ? [h("div", { class: "s-offer-modal-scrolled-slider-wrap" },
84
+ h("div", { class: "s-offer-modal-body s-offer-modal-scrolled-slider" }, ((_a = this.offer.get.categories) === null || _a === void 0 ? void 0 : _a.length) > 0
85
+ ? this.offer.get.categories.map(category => h("a", { href: category.urls.customer, class: "s-offer-modal-badge s-offer-modal-slider-item", innerHTML: this.categorySlot
86
+ .replace(/\{tagIcon\}/g, Tag)
87
+ .replace(/\{name\}/g, category.name)
88
+ .replace(/\{url\}/g, category.urls.customer) }))
89
+ : (_b = this.offer.get.products) === null || _b === void 0 ? void 0 : _b.map(product => h("div", { class: { "s-offer-modal-product": true, "s-offer-modal-slider-item": true, "s-offer-modal-not-available": !product.is_available }, id: 'product_' + product.id, innerHTML: this.productSlot
90
+ .replace(/\{name\}/g, product.name)
91
+ .replace(/\{url\}/g, product.url)
92
+ .replace(/\{image\}/g, product.thumbnail)
93
+ .replace(/\{price\}/g, product.has_special_price
94
+ ? salla.money(product.price) + '<span class="s-offer-modal-product-old-price">' + salla.money(product.regular_price) + '</span>'
95
+ : salla.money(product.price)) },
96
+ h("div", { class: "s-offer-modal-btn-wrap" },
97
+ h("salla-button", { width: "wide", fill: 'outline', "data-id": product.id, disabled: !product.is_available, "loader-position": "center", onClick: this.addItem }, product.is_available ? this.add_to_cart : this.out_of_stock))))),
98
+ h("div", { class: "s-offer-modal-slider-nav" },
99
+ h("button", { class: "s-offer-modal-nav-btn s-offer-modal-prev-btn" },
100
+ h("span", { class: "s-offer-modal-nav-btn-icon", innerHTML: KeyboardArrowLeftIcon })),
101
+ h("button", { class: "s-offer-modal-nav-btn s-offer-modal-next-btn" },
102
+ h("span", { class: "s-offer-modal-nav-btn-icon", innerHTML: KeyboardArrowRightIcon })))), h("div", { class: "s-offer-modal-footer", slot: "footer" },
103
+ this.offer.formatted_date ?
104
+ h("p", { class: "s-offer-modal-expiry" },
105
+ this.offer_expires_in,
106
+ " ",
107
+ this.offer.formatted_date)
108
+ : '',
109
+ h("label", { class: "s-offer-modal-remember-label" },
110
+ h("input", { type: "checkbox", onChange: e => this.rememberMe(e), class: "s-offer-modal-remember-input" }),
111
+ "\u00A0 ",
112
+ this.remember_my_choice)),
113
+ ] : '');
107
114
  }
108
115
  componentDidRender() {
109
116
  // Sooo mini Slider
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';
5
5
  import Helper from '../../Helpers/Helper';
6
+ import BellRingIcon from '../../assets/svg/bell-ring.svg';
6
7
  export class SallaProductAvailability {
7
8
  constructor() {
8
9
  this.isUser = Helper.isUser();
@@ -100,7 +101,7 @@ export class SallaProductAvailability {
100
101
  return (h(Host, { class: "s-product-availability-wrap" },
101
102
  this.isSubscribed || this.isVisitorSubscribed
102
103
  ? h("div", { class: "s-product-availability-subscribed" },
103
- h("i", { class: "sicon-bell-ring s-product-availability-subs-icon" }),
104
+ h("span", { innerHTML: BellRingIcon, class: "s-product-availability-subs-icon" }),
104
105
  " ",
105
106
  this.subscribedMessage)
106
107
  :
@@ -108,7 +109,8 @@ export class SallaProductAvailability {
108
109
  this.isUser || this.isSubscribed || this.isVisitorSubscribed ? '' : this.renderModal()));
109
110
  }
110
111
  renderModal() {
111
- return (h("salla-modal", { ref: modal => this.modal = modal, "modal-title": this.title_, subTitle: this.subTitle, icon: "sicon-bell-ring", width: "sm" },
112
+ return (h("salla-modal", { ref: modal => this.modal = modal, "modal-title": this.title_, subTitle: this.subTitle, width: "sm" },
113
+ h("span", { slot: 'icon', innerHTML: BellRingIcon }),
112
114
  h("div", { class: "s-product-availability-body" },
113
115
  this.channels_.includes('email') ? [
114
116
  h("label", { class: "s-product-availability-label" }, this.emailLabel),
@@ -3,6 +3,8 @@
3
3
  */
4
4
  import { Component, Element, Host, State, Watch, h, Method } from '@stencil/core';
5
5
  import Helper from "../../Helpers/Helper";
6
+ import Add from "../../assets/svg/add.svg";
7
+ import Minus from "../../assets/svg/minus.svg";
6
8
  export class SallaQuantityInput {
7
9
  constructor() {
8
10
  this.hostAttributes = {};
@@ -49,7 +51,7 @@ export class SallaQuantityInput {
49
51
  * @return HTMLSallaQuantityInputElement
50
52
  */
51
53
  async increase() {
52
- return this.setValue(this.quantity + 1);
54
+ return this.setValue(Number(this.quantity) + 1);
53
55
  }
54
56
  /**
55
57
  * set quantity by one.
@@ -67,14 +69,15 @@ export class SallaQuantityInput {
67
69
  return this.host;
68
70
  }
69
71
  render() {
70
- return (h(Host, { class: "s-quantity-input s-quantity-input-container" },
71
- h("button", { onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button" },
72
- !this.hasIncrementSlot ? h("i", { class: "sicon-add" }) : '',
73
- h("slot", { name: "increment-button" })),
74
- h("input", Object.assign({ class: "s-quantity-input-input" }, this.getInputAttributes(), { ref: (el) => this.textInput = el, onInput: (event) => this.setValue(event.target.value), min: "1", value: this.quantity })),
75
- h("button", { class: "s-quantity-input-decrease-button s-quantity-input-button", onClick: () => this.decrease(), type: "button" },
76
- !this.hasDecrementSlot ? h("i", { class: "sicon-minus" }) : '',
77
- h("slot", { name: "decrement-button" }))));
72
+ return (h(Host, { class: "s-quantity-input" },
73
+ h("div", { class: "s-quantity-input-container" },
74
+ h("button", { onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button" },
75
+ !this.hasIncrementSlot ? h("span", { innerHTML: Add }) : '',
76
+ h("slot", { name: "increment-button" })),
77
+ h("input", Object.assign({ class: "s-quantity-input-input" }, this.getInputAttributes(), { ref: (el) => this.textInput = el, onInput: (event) => this.setValue(event.target.value), min: "1", value: this.quantity })),
78
+ h("button", { class: "s-quantity-input-decrease-button s-quantity-input-button", onClick: () => this.decrease(), type: "button" },
79
+ !this.hasDecrementSlot ? h("span", { innerHTML: Minus }) : '',
80
+ h("slot", { name: "decrement-button" })))));
78
81
  }
79
82
  static get is() { return "salla-quantity-input"; }
80
83
  static get originalStyleUrls() { return {
@@ -3,6 +3,8 @@
3
3
  */
4
4
  import { Component, h, Method, Element, Host, State, Prop } from '@stencil/core';
5
5
  import Helper from "../../Helpers/Helper";
6
+ import ShippingFast from "../../assets/svg/shipping-fast.svg";
7
+ import CheckCircle2 from "../../assets/svg/check-circle2.svg";
6
8
  export class SallaRatingModal {
7
9
  constructor() {
8
10
  this.stepsCount = 0;
@@ -180,7 +182,7 @@ export class SallaRatingModal {
180
182
  this.order.shipping.company.logo
181
183
  ? h("div", { class: "s-rating-modal-rounded-icon" },
182
184
  h("img", { src: this.order.shipping.company.logo, class: "s-rating-modal-shipping-logo", alt: this.order.shipping.company.name }))
183
- : h("span", { class: "s-rating-modal-icon sicon-shipping-fast" }),
185
+ : h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }),
184
186
  h("div", { class: "s-rating-modal-title" },
185
187
  " ",
186
188
  this.rate_shipping + ' ' + this.order.shipping.company.name),
@@ -190,7 +192,7 @@ export class SallaRatingModal {
190
192
  h("small", { class: "s-rating-modal-validation-msg" }))
191
193
  : '',
192
194
  h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => this.thanksTab = el },
193
- h("span", { class: "s-rating-modal-icon sicon-check-circle2" }),
195
+ h("span", { class: "s-rating-modal-icon", innerHTML: CheckCircle2 }),
194
196
  h("h3", { class: "s-rating-modal-thanks-title" }, this.thanks),
195
197
  h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }),
196
198
  h("time", { class: "s-rating-modal-thanks-time", ref: el => this.thanksTime = el }))), h("div", { class: "s-rating-modal-footer" },