@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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-button_24.cjs.entry.js +287 -242
- package/dist/cjs/salla-scopes.cjs.entry.js +156 -0
- package/dist/cjs/search-b487cc49.js +13 -0
- package/dist/cjs/twilight-components.cjs.js +1 -1
- package/dist/collection/assets/{flat.svg → svg/flat.svg} +0 -0
- package/dist/collection/assets/svg/tag.svg +0 -1
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +12 -6
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +1 -1
- package/dist/collection/components/salla-modal/salla-modal.js +21 -51
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +39 -32
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +4 -2
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +12 -9
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +4 -2
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +4 -3
- package/dist/collection/components/salla-search/salla-search.js +7 -4
- package/dist/collection/components/salla-social-share/salla-social-share.js +3 -1
- package/dist/collection/components/salla-swiper/salla-swiper.css +0 -23
- package/dist/collection/components/salla-swiper/salla-swiper.js +4 -2
- package/dist/collection/components/salla-tel-input/salla-tel-input.css +1 -2
- package/dist/collection/components/salla-verify/salla-verify.js +4 -1
- package/dist/components/arrow-right.js +11 -0
- package/dist/components/cancel.js +11 -0
- package/dist/components/keyboard_arrow_right.js +11 -0
- package/dist/components/mail.js +11 -0
- package/dist/components/salla-login-modal.js +20 -3
- package/dist/components/salla-loyalty.js +3 -15
- package/dist/components/salla-modal2.js +25 -25
- package/dist/components/salla-offer-modal.js +25 -3
- package/dist/components/salla-product-availability2.js +9 -2
- package/dist/components/salla-quantity-input.js +16 -2
- package/dist/components/salla-rating-modal.js +10 -3
- package/dist/components/salla-rating-stars2.js +4 -3
- package/dist/components/salla-scopes.js +1 -7
- package/dist/components/salla-search.js +7 -4
- package/dist/components/salla-social-share.js +10 -8
- package/dist/components/salla-swiper2.js +10 -2
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-verify2.js +8 -1
- package/dist/components/search.js +11 -0
- package/dist/components/star2.js +11 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-button_24.entry.js +287 -242
- package/dist/esm/salla-scopes.entry.js +152 -0
- package/dist/esm/search-19ea3313.js +11 -0
- package/dist/esm/twilight-components.js +1 -1
- package/dist/twilight-components/p-282f9df8.entry.js +4 -0
- package/dist/twilight-components/p-40a01521.entry.js +4 -0
- package/dist/twilight-components/p-475ef754.js +4 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-modal/salla-modal.d.ts +2 -10
- package/dist/types/components/salla-search/salla-search.d.ts +1 -1
- package/dist/types/components.d.ts +4 -18
- package/example/assets/tailwind.css +269 -75
- package/package.json +4 -4
- package/dist/cjs/Helper-8ae6a805.js +0 -28
- package/dist/cjs/salla-quantity-input.cjs.entry.js +0 -87
- package/dist/esm/Helper-e1d414a5.js +0 -26
- package/dist/esm/salla-quantity-input.entry.js +0 -83
- package/dist/twilight-components/p-4c5055cf.entry.js +0 -4
- package/dist/twilight-components/p-9d2ca9c8.js +0 -4
- package/dist/twilight-components/p-b31f472a.entry.js +0 -4
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Component, Host, h, Prop, Element } from '@stencil/core';
|
|
5
5
|
import Helper from "../../Helpers/Helper";
|
|
6
|
+
import Star2 from "../../assets/svg/star2.svg";
|
|
6
7
|
export class SallaRatingStars {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.name = 'rating';
|
|
@@ -44,10 +45,10 @@ export class SallaRatingStars {
|
|
|
44
45
|
let stars = [];
|
|
45
46
|
for (let i = 0; i < 5; i++) {
|
|
46
47
|
stars.push(h("span", { class: {
|
|
47
|
-
's-rating-stars-btn-star
|
|
48
|
+
's-rating-stars-btn-star': true,
|
|
48
49
|
['s-rating-stars-' + this.size]: true,
|
|
49
50
|
's-rating-stars-selected': i < n
|
|
50
|
-
} }));
|
|
51
|
+
}, innerHTML: Star2 }));
|
|
51
52
|
}
|
|
52
53
|
return stars;
|
|
53
54
|
}
|
|
@@ -61,7 +62,7 @@ export class SallaRatingStars {
|
|
|
61
62
|
h("div", { class: "s-rating-stars-element", ref: (el) => this.startsElem = el },
|
|
62
63
|
h("input", { type: "hidden", class: "rating_hidden_input", name: this.name, value: "" }),
|
|
63
64
|
[1, 2, 3, 4, 5].map(star => h("button", { class: `s-rating-stars-btn-star s-rating-stars-` + this.size, "data-star": star },
|
|
64
|
-
h("
|
|
65
|
+
h("span", { innerHTML: Star2 }))))));
|
|
65
66
|
}
|
|
66
67
|
componentDidLoad() {
|
|
67
68
|
this.initiateRating();
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Component, Prop, h, State, Element, Watch } from '@stencil/core';
|
|
5
5
|
import Helper from "../../Helpers/Helper";
|
|
6
|
+
import Search from "../../assets/svg/search.svg";
|
|
6
7
|
/**
|
|
7
8
|
* @slot product - Replaces products card in the results, has replaceable props `{name}`, `{price}`, `{regular_price}`, `{image}`.
|
|
8
9
|
*/
|
|
@@ -10,6 +11,7 @@ export class SallaSearch {
|
|
|
10
11
|
constructor() {
|
|
11
12
|
var _a;
|
|
12
13
|
this.inputValue = '';
|
|
14
|
+
this.loading = false;
|
|
13
15
|
this.typing = false;
|
|
14
16
|
this.debounce = setTimeout(() => '', 1000);
|
|
15
17
|
this.inline = false;
|
|
@@ -64,7 +66,7 @@ export class SallaSearch {
|
|
|
64
66
|
search(val) {
|
|
65
67
|
Helper.hideElement(this.noResults);
|
|
66
68
|
//run loading spinner or stop it
|
|
67
|
-
|
|
69
|
+
this.loading = true;
|
|
68
70
|
salla.product.search(val)
|
|
69
71
|
.then(response => this.results = response)
|
|
70
72
|
.catch(err => err !== 'Query is same as previous one!' ? this.results = undefined : null)
|
|
@@ -73,8 +75,8 @@ export class SallaSearch {
|
|
|
73
75
|
afterSearching(isEmpty = true) {
|
|
74
76
|
var _a;
|
|
75
77
|
this.noResults.style.display = isEmpty || ((_a = this.results) === null || _a === void 0 ? void 0 : _a.data.length) > 0 ? 'none' : 'block';
|
|
76
|
-
Helper.toggleElementClassIf(this.container, 's-search-container-open', 's-search-no-results', () => { var _a; return (_a = this.results) === null || _a === void 0 ? void 0 : _a.data.length; })
|
|
77
|
-
|
|
78
|
+
Helper.toggleElementClassIf(this.container, 's-search-container-open', 's-search-no-results', () => { var _a; return (_a = this.results) === null || _a === void 0 ? void 0 : _a.data.length; });
|
|
79
|
+
this.loading = false;
|
|
78
80
|
salla.product.api.previousQuery = ''; //avoid having error 'Query is same as previous one!' after reopen modal;
|
|
79
81
|
this.inputValue.length < 3 ? this.container.classList.remove('s-search-no-results') : '';
|
|
80
82
|
}
|
|
@@ -83,7 +85,7 @@ export class SallaSearch {
|
|
|
83
85
|
const searchContent = h("div", { class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => this.container = container },
|
|
84
86
|
h("input", { type: "text", autocomplete: "off", class: "s-search-input", placeholder: this.placeholder, onInput: e => this.debounceSearch(e), ref: input => this.searchInput = input, style: { height: this.height + 'px', borderRadius: this.oval ? this.height / 2 + 'px' : '' } }),
|
|
85
87
|
h("span", { class: "s-search-icon-wrap" },
|
|
86
|
-
h("
|
|
88
|
+
h("span", { class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"></i>' : Search })),
|
|
87
89
|
h("div", { class: "s-search-results" }, (_a = this.results) === null || _a === void 0 ? void 0 :
|
|
88
90
|
_a.data.map(item => h("a", { href: item.url, class: { "s-search-product": true, 's-search-product-not-available': !item.is_available }, innerHTML: this.productSlot
|
|
89
91
|
.replace(/\{name\}/g, item.name)
|
|
@@ -169,6 +171,7 @@ export class SallaSearch {
|
|
|
169
171
|
"results": {},
|
|
170
172
|
"placeholder": {},
|
|
171
173
|
"noResultsText": {},
|
|
174
|
+
"loading": {},
|
|
172
175
|
"typing": {},
|
|
173
176
|
"debounce": {},
|
|
174
177
|
"search_term": {}
|
|
@@ -9,6 +9,8 @@ import copy_link from '../../assets/svg/link.svg';
|
|
|
9
9
|
import email from '../../assets/svg/mail.svg';
|
|
10
10
|
import whatsapp from '../../assets/svg/whatsapp.svg';
|
|
11
11
|
import { Socials } from './interfaces';
|
|
12
|
+
import Cancel from "../../assets/svg/cancel.svg";
|
|
13
|
+
import ShareAlt from "../../assets/svg/share-alt.svg";
|
|
12
14
|
export class SallaSocialShare {
|
|
13
15
|
constructor() {
|
|
14
16
|
this.opened = false;
|
|
@@ -79,7 +81,7 @@ export class SallaSocialShare {
|
|
|
79
81
|
return (h("div", { class: "s-social-share-wrapper" },
|
|
80
82
|
h("slot", { name: 'widget' },
|
|
81
83
|
h("salla-button", { "aria-label": "Share", onClick: () => this.open(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" },
|
|
82
|
-
h("
|
|
84
|
+
h("span", { innerHTML: this.opened ? Cancel : ShareAlt }))),
|
|
83
85
|
h("ul", { ref: el => this.shareMenu = el, class: "s-social-share-list a2a_kit share" }, this.platforms.map(platform => {
|
|
84
86
|
return (h("li", { ref: el => this.platformItem = el },
|
|
85
87
|
h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
|
|
@@ -174,27 +174,4 @@
|
|
|
174
174
|
|
|
175
175
|
.s-swiper {
|
|
176
176
|
position: relative;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.s-swiper-container {
|
|
180
|
-
padding-top: 5px;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.s-swiper-button-next {
|
|
184
|
-
right: -25px !important;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.s-swiper-button-prev {
|
|
188
|
-
left: -25px !important;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.s-swiper-button-prev,
|
|
192
|
-
.s-swiper-button-next {
|
|
193
|
-
position: absolute;
|
|
194
|
-
top: 50%;
|
|
195
|
-
z-index: 3;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.s-swiper-button-icon {
|
|
199
|
-
color: black !important;
|
|
200
177
|
}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Component, State, Prop, h } from '@stencil/core';
|
|
5
5
|
import Swiper from 'swiper';
|
|
6
|
+
import ArrowRightIcon from "../../assets/svg/arrow-right.svg";
|
|
7
|
+
import ArrowLeftIcon from "../../assets/svg/arrow-left.svg";
|
|
6
8
|
export class SallaSwiper {
|
|
7
9
|
constructor() {
|
|
8
10
|
// slider-options
|
|
@@ -38,10 +40,10 @@ export class SallaSwiper {
|
|
|
38
40
|
return (h("div", { class: "s-swiper", dir: this.direction },
|
|
39
41
|
h("div", { class: "s-swiper-button-prev" },
|
|
40
42
|
h("salla-button", { disabled: (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.isBeginning, shape: "icon", color: "light", onClick: () => this.swiper.slidePrev() },
|
|
41
|
-
h("
|
|
43
|
+
h("span", { class: "s-swiper-button-icon", innerHTML: ArrowLeftIcon }))),
|
|
42
44
|
h("div", { class: "s-swiper-button-next" },
|
|
43
45
|
h("salla-button", { disabled: (_b = this.swiper) === null || _b === void 0 ? void 0 : _b.isEnd, shape: "icon", color: "light", onClick: () => this.swiper.slideNext() },
|
|
44
|
-
h("
|
|
46
|
+
h("span", { class: "s-swiper-button-icon", innerHTML: ArrowRightIcon }))),
|
|
45
47
|
h("div", { class: "swiper" },
|
|
46
48
|
h("div", { class: "swiper-container s-swiper-container", ref: el => this.swiperContainer = el },
|
|
47
49
|
h("div", { class: "swiper-wrapper s-swiper-wrapper", ref: el => this.swiperWrapper = el },
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
1
|
/*
|
|
3
2
|
* Salla Tel Input Component: used to get the telephone input, in login and register steps and also in user profile.
|
|
4
3
|
*/
|
|
@@ -76,7 +75,7 @@
|
|
|
76
75
|
transform: translateY(-50%);
|
|
77
76
|
}
|
|
78
77
|
.iti__arrow:after {
|
|
79
|
-
content: "
|
|
78
|
+
content: "\e96d";
|
|
80
79
|
font-family: sallaicons;
|
|
81
80
|
font-size: 16px;
|
|
82
81
|
color: #999;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Component, Host, Element, Event, h, Method, Prop, State } from '@stencil/core';
|
|
5
5
|
import Helper from "../../Helpers/Helper";
|
|
6
|
+
import AndroidPhoneIcon from '../../assets/svg/android-phone.svg';
|
|
6
7
|
/**
|
|
7
8
|
* @slot footer - Replaces the footer, by default it contains: verify button, resend, and timer
|
|
8
9
|
* @slot after-footer - placeholder position
|
|
@@ -151,7 +152,9 @@ export class SallaVerify {
|
|
|
151
152
|
}
|
|
152
153
|
render() {
|
|
153
154
|
return this.display == 'inline' ? h(Host, null, this.myBody()) :
|
|
154
|
-
h("salla-modal", {
|
|
155
|
+
h("salla-modal", { width: "xs", class: "s-verify", ref: modal => this.modal = modal, "modal-title": this.title },
|
|
156
|
+
h("span", { slot: 'icon', innerHTML: AndroidPhoneIcon }),
|
|
157
|
+
this.myBody());
|
|
155
158
|
}
|
|
156
159
|
myBody() {
|
|
157
160
|
return (h("div", { class: "s-verify-body", ref: body => this.body = body },
|
|
@@ -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 KeyboardArrowRightIcon = `<!-- 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>keyboard_arrow_right</title>
|
|
7
|
+
<path d="M11.438 22.479l6.125-6.125-6.125-6.125 1.875-1.875 8 8-8 8z"></path>
|
|
8
|
+
</svg>
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
export { KeyboardArrowRightIcon as K };
|
|
@@ -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 };
|
|
@@ -3,12 +3,29 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
5
5
|
import { H as Helper } from './Helper.js';
|
|
6
|
+
import { e as email } from './mail.js';
|
|
7
|
+
import { K as KeyboardArrowRightIcon } from './keyboard_arrow_right.js';
|
|
8
|
+
import { A as ArrowRightIcon } from './arrow-right.js';
|
|
6
9
|
import { d as defineCustomElement$6 } from './salla-button2.js';
|
|
7
10
|
import { d as defineCustomElement$5 } from './salla-loading2.js';
|
|
8
11
|
import { d as defineCustomElement$4 } from './salla-modal2.js';
|
|
9
12
|
import { d as defineCustomElement$3 } from './salla-tel-input2.js';
|
|
10
13
|
import { d as defineCustomElement$2 } from './salla-verify2.js';
|
|
11
14
|
|
|
15
|
+
const UserIcon = `<!-- Generated by IcoMoon.io -->
|
|
16
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
17
|
+
<title>user</title>
|
|
18
|
+
<path d="M16 16c4.412 0 8-3.588 8-8s-3.588-8-8-8-8 3.588-8 8 3.588 8 8 8zM16 2.667c2.941 0 5.333 2.392 5.333 5.333s-2.392 5.333-5.333 5.333-5.333-2.392-5.333-5.333 2.392-5.333 5.333-5.333zM16 18.667c-7.476 0-13.333 3.66-13.333 8.333v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-3.019 4.984-5.667 10.667-5.667s10.667 2.648 10.667 5.667v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-4.673-5.857-8.333-13.333-8.333z"></path>
|
|
19
|
+
</svg>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
const PhoneIcon = `<!-- Generated by IcoMoon.io -->
|
|
23
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
24
|
+
<title>phone</title>
|
|
25
|
+
<path d="M30.823 21.713l-3.883-3.883c-1.569-1.568-4.12-1.568-5.689 0l-2.568 2.568c-3.063-1.499-5.583-4.019-7.081-7.083l2.568-2.567c0.759-0.76 1.177-1.771 1.177-2.845s-0.419-2.084-1.179-2.844l-3.881-3.881c-1.52-1.521-4.171-1.521-5.689 0l-1.845 1.847c-2.22 2.219-3.183 5.407-2.573 8.527 1.98 10.144 10.125 18.292 20.269 20.271 0.616 0.121 1.236 0.18 1.849 0.18 2.492 0 4.896-0.972 6.677-2.752l1.847-1.847c1.568-1.571 1.568-4.121 0.001-5.691zM28.936 25.517l-1.845 1.847c-1.592 1.592-3.883 2.283-6.132 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.596-0.397 0.959-0.397s0.703 0.14 0.959 0.397l3.883 3.883c0.256 0.256 0.397 0.596 0.397 0.959s-0.141 0.703-0.397 0.96l-3.22 3.217c-0.383 0.384-0.496 0.959-0.287 1.457 1.813 4.339 5.343 7.868 9.683 9.684 0.497 0.207 1.073 0.095 1.457-0.288l3.22-3.22c0.529-0.529 1.389-0.528 1.917 0l3.881 3.883c0.528 0.529 0.528 1.389 0 1.919z"></path>
|
|
26
|
+
</svg>
|
|
27
|
+
`;
|
|
28
|
+
|
|
12
29
|
const sallaLoginModalCss = "";
|
|
13
30
|
|
|
14
31
|
const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -191,14 +208,14 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
191
208
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
192
209
|
}
|
|
193
210
|
render() {
|
|
194
|
-
return (h("salla-modal", {
|
|
195
|
-
h("div", { class: "s-login-modal-tab", ref: tab => this.homeTab = tab }, h("p", { class: "s-login-modal-sub-title" }, this.loginTypeTitle), h("slot", { name: "before-login-type" }), h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.mobileTab, evt) }, h("
|
|
211
|
+
return (h("salla-modal", { class: "s-login-modal", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" }, h("span", { slot: 'icon', class: "s-login-modal-header-icon", innerHTML: UserIcon }), h("div", { class: "s-login-modal-wrapper" }, this.isEmailAllowed && this.isMobileAllowed ?
|
|
212
|
+
h("div", { class: "s-login-modal-tab", ref: tab => this.homeTab = tab }, h("p", { class: "s-login-modal-sub-title" }, this.loginTypeTitle), h("slot", { name: "before-login-type" }), h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.mobileTab, evt) }, h("span", { class: "s-login-modal-main-btn-icon", innerHTML: PhoneIcon }), h("span", { class: "s-login-modal-main-btn-text" }, this.smsLabel), h("span", { class: "s-login-modal-main-btn-arrow", innerHTML: KeyboardArrowRightIcon })), h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.emailTab, evt) }, h("span", { class: "s-login-modal-main-btn-icon", innerHTML: email }), h("span", { class: "s-login-modal-main-btn-text" }, this.emailLabel), h("span", { class: "s-login-modal-main-btn-arrow", innerHTML: KeyboardArrowRightIcon })), h("slot", { name: "after-login-type" }))
|
|
196
213
|
: '', this.isMobileAllowed ?
|
|
197
214
|
h("div", { class: "s-login-modal-tab", ref: tab => this.mobileTab = tab }, h("slot", { name: "before-login-mobile" }), h("label", { class: "s-login-modal-label" }, this.mobileLabel), h("salla-tel-input", { ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e, this.loginBySMS) }), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginBySMS(), ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter')), this.isEmailAllowed ?
|
|
198
215
|
h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, this.byEmailText) : '', h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
|
|
199
216
|
h("div", { class: "s-login-modal-tab", ref: tab => this.emailTab = tab }, h("slot", { name: "before-login-email" }), h("label", { class: "s-login-modal-label" }, this.emailLabel), h("input", { type: "email", ref: el => this.loginEmail = el, onKeyDown: e => this.typing(e, this.loginByEmail), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), h("span", { class: "s-login-modal-error-message" }), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginByEmail(), ref: b => this.emailBtn = b }, salla.lang.get('blocks.header.enter')), this.isMobileAllowed ?
|
|
200
217
|
h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText)
|
|
201
|
-
: '', h("slot", { name: "after-login-email" })) : '', h("salla-verify", { display: "inline", ref: tab => this.verifyTab = tab, autoReload: false }, h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-back
|
|
218
|
+
: '', h("slot", { name: "after-login-email" })) : '', h("salla-verify", { display: "inline", ref: tab => this.verifyTab = tab, autoReload: false }, h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-back", innerHTML: ArrowRightIcon, slot: "after-footer", href: "#" })), h("div", { ref: tab => this.registrationTab = tab }, h("slot", { name: "before-registration" }), h("div", null, h("label", { class: "s-login-modal-label" }, this.firstNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", null, h("label", { class: "s-login-modal-label" }, this.lastNameLabel), h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }), h("span", { class: "s-login-modal-error-message" })), h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.mobileLabel), h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })), h("div", { ref: el => this.regEmailBlock = el, class: "mb-1.5" }, h("label", { class: "s-login-modal-label" }, this.emailLabel), h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), h("span", { class: "s-login-modal-error-message" })), h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), h("slot", { name: "after-registration" })))));
|
|
202
219
|
}
|
|
203
220
|
get host() { return this; }
|
|
204
221
|
static get style() { return sallaLoginModalCss; }
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
5
|
+
import { S as Star2 } from './star2.js';
|
|
6
|
+
import { C as Cancel } from './cancel.js';
|
|
5
7
|
import { d as defineCustomElement$b } from './salla-button2.js';
|
|
6
8
|
import { d as defineCustomElement$a } from './salla-list-tile2.js';
|
|
7
9
|
import { d as defineCustomElement$9 } from './salla-loading2.js';
|
|
@@ -13,13 +15,6 @@ import { d as defineCustomElement$4 } from './salla-tab-content2.js';
|
|
|
13
15
|
import { d as defineCustomElement$3 } from './salla-tab-header2.js';
|
|
14
16
|
import { d as defineCustomElement$2 } from './salla-tabs2.js';
|
|
15
17
|
|
|
16
|
-
const Star2 = `<!-- Generated by IcoMoon.io -->
|
|
17
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="30" height="32" viewBox="0 0 30 32">
|
|
18
|
-
<title>star2</title>
|
|
19
|
-
<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>
|
|
20
|
-
</svg>
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
18
|
const Star3 = `<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80">
|
|
24
19
|
<title>star3</title>
|
|
25
20
|
<defs>
|
|
@@ -70,13 +65,6 @@ const Star3 = `<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" vi
|
|
|
70
65
|
</svg>
|
|
71
66
|
`;
|
|
72
67
|
|
|
73
|
-
const CancelIcon = `<!-- Generated by IcoMoon.io -->
|
|
74
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
75
|
-
<title>cancel</title>
|
|
76
|
-
<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>
|
|
77
|
-
</svg>
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
68
|
const GiftImg = `<svg xmlns="http://www.w3.org/2000/svg" width="54.079" height="53.191" viewBox="0 0 54.079 53.191"><defs><style>.a{fill:#ee9d0d;}.b{fill:#c7830b;}.c{fill:#ea2b2d;}.d{fill:#cb2527;}.e{fill:#6699ce;}.f{fill:#faa6b2;}.g{fill:#a6deff;}.h{fill:#eeb436;}.i{fill:#f72d2f;}</style></defs><path class="a" d="M40,248H77.3v25.88a2.1,2.1,0,0,1-2.1,2.1H42.1a2.1,2.1,0,0,1-2.1-2.1Z" transform="translate(-38.135 -222.787)"/><path class="b" d="M250.632,248.711v12.755L236.2,248h13.67Z" transform="translate(-211.463 -222.787)"/><path class="b" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="c" d="M226.194,32.048l-.5.185a5.035,5.035,0,0,0-3.072,3.292l-.468,1.585-.759.414a5.035,5.035,0,0,0-2.422,3l8.865,8.271,5.09-5.456.262-6.205a5.191,5.191,0,0,0-7-5.083Z" transform="translate(-196.246 -31.722)"/><path class="c" d="M358.628,175.48l-.15.509a5.034,5.034,0,0,1-3.072,3.292l-1.55.577-.359.785a5.034,5.034,0,0,1-2.822,2.624L341.81,175l5.09-5.455,6.172-.69a5.191,5.191,0,0,1,5.555,6.629Z" transform="translate(-304.761 -152.837)"/><path class="d" d="M168,248h7.461v27.978H168Z" transform="translate(-151.213 -222.787)"/><path class="c" d="M40,336H77.3v7.461H40Z" transform="translate(-38.135 -300.528)"/><path class="d" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="a" d="M2.1,0H40.8a2.1,2.1,0,0,1,2.1,2.1V9.326H0V2.1A2.1,2.1,0,0,1,2.1,0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 18.641, 4.976)"/><path class="d" d="M0,0H9.326V9.326H0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 30.912, 16.424)"/><path class="d" d="M286.857,79.389a.931.931,0,0,1-.74-.365l-.615-.8a12.516,12.516,0,0,1-2.528-9,.933.933,0,0,1,1.855.2,10.66,10.66,0,0,0,2.153,7.667l.615.8a.933.933,0,0,1-.739,1.5Z" transform="translate(-252.718 -64.113)"/><path class="c" d="M185.485,178.151l-.039.014a30.78,30.78,0,0,1-12.034,1.906l-2.381-.1,4.092,3.817-1.181,4,3.728-1.206a30.775,30.775,0,0,0,9.833-5.315l.71-.572Z" transform="translate(-153.891 -161.081)"/><path class="d" d="M363.834,194.779a12.51,12.51,0,0,1-6.93-2.1l-.843-.559a.933.933,0,1,1,1.031-1.554l.842.558a10.659,10.659,0,0,0,7.8,1.618.933.933,0,1,1,.328,1.836A12.663,12.663,0,0,1,363.834,194.779Z" transform="translate(-316.982 -171.914)"/><path class="c" d="M275,202.524l-.012.04a30.776,30.776,0,0,0-1.069,12.137l.265,2.369-4.092-3.817-3.909,1.455.945-3.8a30.776,30.776,0,0,1,4.622-10.177l.521-.748Z" transform="translate(-237.949 -180.364)"/><circle class="e" cx="1.865" cy="1.865" r="1.865" transform="translate(10.259 0.032)"/><circle class="f" cx="1.865" cy="1.865" r="1.865" transform="translate(0 21.482)"/><path class="g" d="M36.663,36.663a.933.933,0,0,1-.885-.638l-.048-.143a2.946,2.946,0,0,0-2.8-2.017.933.933,0,1,1,0-1.865A4.808,4.808,0,0,1,37.5,35.292l.048.143a.933.933,0,0,1-.885,1.228Z" transform="translate(-31.067 -31.968)"/><path class="g" d="M79.493,194.438a.929.929,0,0,1-.506-.15l-.185-.12a2.074,2.074,0,0,0-2.192-.047.933.933,0,0,1-.947-1.607,3.929,3.929,0,0,1,4.153.088l.185.12a.933.933,0,0,1-.508,1.716Z" transform="translate(-69.235 -173.283)"/><path class="h" d="M27.751,85.141l2.88,2.644,3.811-.874-1.624,3.556,2.008,3.354-3.884-.446-2.569,2.946L27.6,92.49,24,90.957l3.4-1.922Z" transform="translate(-24 -78.914)"/><path class="h" d="M82.174,227.375l-.959,3.772,2.564,2.928-3.884.254L77.9,237.673l-1.442-3.615-3.8-.862,2.993-2.488-.353-3.876,3.291,2.078Z" transform="translate(-66.992 -204.086)"/><path class="i" d="M300.471,141.9l-5.455-5.09,5.09-5.456a8.342,8.342,0,0,1,5.455,5.09Z" transform="translate(-263.422 -119.737)"/></svg>`;
|
|
81
69
|
|
|
82
70
|
const sallaLoyaltyCss = "#salla-loyalty-modal .s-swiper-button-prev button,#salla-loyalty-modal .s-swiper-button-next button{box-shadow:#32325d40 0px 6px 12px -2px, #0000004d 0px 3px 7px -3px}";
|
|
@@ -162,7 +150,7 @@ const SallaLoyalty$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
162
150
|
];
|
|
163
151
|
}
|
|
164
152
|
getAfterExchangeUI() {
|
|
165
|
-
return h("slot", { name: 'points-applied-widget' }, h("salla-list-tile", { class: "s-loyalty-after-exchange" }, h("div", { slot: "title", class: "s-loyalty-after-exchange-title" }, this.prizeTitle, " \u00A0 - \u00A0 ", this.prizePoints), h("div", { slot: 'action', class: "s-loyalty-after-exchange-action" }, h("salla-button", { class: "s-loyalty-after-exchange-reset", shape: "icon", fill: 'outline', color: "danger", size: "small", onClick: () => this.resetExchange() }, h("span", { innerHTML:
|
|
153
|
+
return h("slot", { name: 'points-applied-widget' }, h("salla-list-tile", { class: "s-loyalty-after-exchange" }, h("div", { slot: "title", class: "s-loyalty-after-exchange-title" }, this.prizeTitle, " \u00A0 - \u00A0 ", this.prizePoints), h("div", { slot: 'action', class: "s-loyalty-after-exchange-action" }, h("salla-button", { class: "s-loyalty-after-exchange-reset", shape: "icon", fill: 'outline', color: "danger", size: "small", onClick: () => this.resetExchange() }, h("span", { innerHTML: Cancel })))));
|
|
166
154
|
}
|
|
167
155
|
/**
|
|
168
156
|
* Show loyalty modal
|
|
@@ -3,8 +3,23 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { H as Helper } from './Helper.js';
|
|
6
|
+
import { C as Cancel } from './cancel.js';
|
|
6
7
|
import { d as defineCustomElement$1 } from './salla-loading2.js';
|
|
7
8
|
|
|
9
|
+
const AlertEngineIcon = `<!-- Generated by IcoMoon.io -->
|
|
10
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
11
|
+
<title>alert-engine</title>
|
|
12
|
+
<path d="M16 18.673c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM2.667 16c0-3.092 1.083-6.105 3.047-8.484 0.469-0.568 0.389-1.408-0.179-1.877-0.568-0.468-1.408-0.388-1.877 0.179-2.359 2.857-3.657 6.473-3.657 10.183s1.299 7.325 3.657 10.183c0.264 0.319 0.645 0.484 1.029 0.484 0.299 0 0.6-0.1 0.848-0.305 0.568-0.469 0.648-1.309 0.179-1.877-1.964-2.379-3.047-5.392-3.047-8.484zM16 10.667c-0.736 0-1.333 0.597-1.333 1.333v4c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-4c0-0.736-0.597-1.333-1.333-1.333zM16 5.333c-5.881 0-10.667 4.785-10.667 10.667s4.785 10.667 10.667 10.667 10.667-4.785 10.667-10.667-4.785-10.667-10.667-10.667zM16 24c-4.412 0-8-3.588-8-8s3.588-8 8-8 8 3.588 8 8-3.588 8-8 8zM28.343 5.817c-0.469-0.567-1.307-0.647-1.877-0.179-0.568 0.469-0.648 1.309-0.179 1.877 1.964 2.379 3.047 5.392 3.047 8.484s-1.083 6.105-3.047 8.484c-0.469 0.568-0.389 1.408 0.179 1.877 0.249 0.205 0.549 0.305 0.848 0.305 0.384 0 0.765-0.165 1.028-0.484 2.36-2.857 3.659-6.473 3.659-10.183s-1.299-7.325-3.657-10.183z"></path>
|
|
13
|
+
</svg>
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
const CheckCircle2 = `<!-- Generated by IcoMoon.io -->
|
|
17
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
18
|
+
<title>check-circle2</title>
|
|
19
|
+
<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>
|
|
20
|
+
</svg>
|
|
21
|
+
`;
|
|
22
|
+
|
|
8
23
|
const sallaModalCss = "";
|
|
9
24
|
|
|
10
25
|
const SallaModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -35,15 +50,8 @@ const SallaModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
35
50
|
this.subTitleFirst = false; //todo:: choose better name
|
|
36
51
|
this.noPadding = false; //todo:: choose better name
|
|
37
52
|
this.subTitle = '';
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*/
|
|
41
|
-
this.icon = '';
|
|
42
|
-
this.iconStyle = '';
|
|
43
|
-
/**
|
|
44
|
-
* url of an image
|
|
45
|
-
*/
|
|
46
|
-
this.imageIcon = '';
|
|
53
|
+
this.centered = false;
|
|
54
|
+
this.iconStyle = undefined;
|
|
47
55
|
Helper.setHost(this.host);
|
|
48
56
|
salla.event.on('modal::open', target => target == this.host.id && this.open());
|
|
49
57
|
salla.event.on('modal::close', target => target == this.host.id && this.close());
|
|
@@ -117,17 +125,10 @@ const SallaModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
117
125
|
's-modal-icon': true,
|
|
118
126
|
's-modal-bg-error': this.iconStyle == 'error',
|
|
119
127
|
's-modal-bg-success': this.iconStyle == 'success',
|
|
120
|
-
's-modal-bg-normal': this.iconStyle
|
|
128
|
+
's-modal-bg-normal': !this.iconStyle,
|
|
121
129
|
's-modal-bg-primary': this.iconStyle == 'primary'
|
|
122
130
|
};
|
|
123
131
|
}
|
|
124
|
-
iconClasses() {
|
|
125
|
-
return {
|
|
126
|
-
[this.icon]: true,
|
|
127
|
-
'sicon-alert-engine': !this.icon && this.iconStyle == 'error' && !this.imageIcon,
|
|
128
|
-
'sicon-check-circle2': !this.icon && this.iconStyle == 'success' && !this.imageIcon,
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
132
|
getWidth() {
|
|
132
133
|
return this.isLoading ? (this.hasSkeleton ? 'md' : 'xs') : this.width;
|
|
133
134
|
}
|
|
@@ -137,12 +138,12 @@ const SallaModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
137
138
|
if (this.isLoading) {
|
|
138
139
|
return (h(Host, { class: 'salla-modal s-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog" }, h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal() }), h("div", { class: "s-modal-wrapper" }, h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"), h("div", { class: 's-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.getWidth() + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding') }, h("slot", { name: "loading" }, h("salla-loading", null)), h("div", { class: "s-hidden" }, h("slot", null))))));
|
|
139
140
|
}
|
|
140
|
-
return (h(Host, { class: 'salla-modal s-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog" }, h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal() }), h("div", { class: "s-modal-wrapper" }, h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"), h("div", { class: 's-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.getWidth() + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding') }, h("div", { class: { 's-modal-header': true, 's-modal-is-center': this.
|
|
141
|
-
h("button", { class: "s-modal-close", onClick: () => this.closeModal(), type: "button" }, h("span", {
|
|
141
|
+
return (h(Host, { class: 'salla-modal s-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog" }, h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal() }), h("div", { class: "s-modal-wrapper" }, h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"), h("div", { class: 's-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.getWidth() + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding') }, h("div", { class: { 's-modal-header': true, 's-modal-is-center': this.centered } }, this.isClosable ?
|
|
142
|
+
h("button", { class: "s-modal-close", onClick: () => this.closeModal(), type: "button" }, h("span", { innerHTML: Cancel }))
|
|
142
143
|
: '', this.modalTitle || this.subTitle ?
|
|
143
|
-
h("div", { class: "s-modal-header-inner" }, this.iconStyle
|
|
144
|
-
|
|
145
|
-
:
|
|
144
|
+
h("div", { class: "s-modal-header-inner" }, h("slot", { name: 'icon' }, !!this.iconStyle ?
|
|
145
|
+
h("div", { class: this.iconBlockClasses(), innerHTML: this.iconStyle == 'error' ? AlertEngineIcon : CheckCircle2 })
|
|
146
|
+
: ''), h("div", { class: "s-modal-header-content" }, h("div", { class: { 's-modal-title': true, 's-modal-title-below': this.subTitleFirst }, innerHTML: this.modalTitle }), h("p", { class: { 's-modal-sub-title': true }, innerHTML: this.subTitle })))
|
|
146
147
|
: ""), h("slot", null), h("slot", { name: "footer" })))));
|
|
147
148
|
}
|
|
148
149
|
//move the modal as root dom, because we need the model to be outside the forms
|
|
@@ -164,9 +165,8 @@ const SallaModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
164
165
|
"subTitleFirst": [4, "sub-title-first"],
|
|
165
166
|
"noPadding": [4, "no-padding"],
|
|
166
167
|
"subTitle": [1, "sub-title"],
|
|
167
|
-
"
|
|
168
|
+
"centered": [4],
|
|
168
169
|
"iconStyle": [1, "icon-style"],
|
|
169
|
-
"imageIcon": [1, "image-icon"],
|
|
170
170
|
"modalTitle": [32],
|
|
171
171
|
"open": [64],
|
|
172
172
|
"close": [64],
|
|
@@ -194,4 +194,4 @@ function defineCustomElement() {
|
|
|
194
194
|
}
|
|
195
195
|
defineCustomElement();
|
|
196
196
|
|
|
197
|
-
export { SallaModal as S, defineCustomElement as d };
|
|
197
|
+
export { CheckCircle2 as C, SallaModal as S, defineCustomElement as d };
|
|
@@ -3,10 +3,31 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
5
5
|
import { H as Helper } from './Helper.js';
|
|
6
|
+
import { K as KeyboardArrowRightIcon } from './keyboard_arrow_right.js';
|
|
6
7
|
import { d as defineCustomElement$4 } from './salla-button2.js';
|
|
7
8
|
import { d as defineCustomElement$3 } from './salla-loading2.js';
|
|
8
9
|
import { d as defineCustomElement$2 } from './salla-modal2.js';
|
|
9
10
|
|
|
11
|
+
const SpecialDiscountIcon = `<!-- 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>special-discount</title>
|
|
14
|
+
<path d="M20.667 19.333c-0.737 0-1.333 0.596-1.333 1.333v0.013c0 0.737 0.596 1.327 1.333 1.327s1.333-0.603 1.333-1.34-0.596-1.333-1.333-1.333zM11.333 12.673c0.737 0 1.333-0.603 1.333-1.34s-0.596-1.333-1.333-1.333-1.333 0.596-1.333 1.333v0.013c0 0.736 0.596 1.327 1.333 1.327zM30.307 16l0.947-4.244c0.107-0.473-0.055-0.969-0.417-1.291l-3.259-2.876-1.732-3.987c-0.193-0.444-0.612-0.749-1.095-0.796l-4.327-0.417-3.748-2.204c-0.416-0.248-0.933-0.248-1.353 0l-3.744 2.204-4.329 0.417c-0.483 0.047-0.901 0.352-1.095 0.796l-1.732 3.987-3.259 2.877c-0.363 0.321-0.525 0.816-0.417 1.289l0.947 4.244-0.947 4.244c-0.107 0.473 0.055 0.969 0.417 1.291l3.259 2.876 1.732 3.987c0.193 0.444 0.612 0.749 1.095 0.796l4.325 0.416 3.749 2.207c0.208 0.123 0.441 0.184 0.676 0.184s0.468-0.061 0.676-0.185l3.747-2.205 4.328-0.416c0.483-0.045 0.903-0.351 1.095-0.796l1.732-3.985 3.259-2.877c0.363-0.321 0.525-0.816 0.417-1.291zM28.48 20.056l-2.892 2.552c-0.145 0.131-0.261 0.291-0.34 0.469l-1.536 3.536-3.84 0.369c-0.195 0.019-0.381 0.080-0.551 0.179l-3.321 1.959-3.324-1.959c-0.168-0.099-0.356-0.16-0.549-0.179l-3.839-0.369-1.536-3.537c-0.077-0.18-0.195-0.339-0.34-0.469l-2.892-2.551 0.84-3.765c0.043-0.192 0.043-0.389 0-0.581l-0.84-3.765 2.892-2.551c0.145-0.131 0.263-0.289 0.34-0.469l1.536-3.539 3.84-0.369c0.195-0.019 0.381-0.080 0.549-0.179l3.323-1.957 3.325 1.957c0.167 0.099 0.355 0.16 0.548 0.179l3.839 0.369 1.536 3.539c0.077 0.18 0.195 0.339 0.34 0.469l2.892 2.551-0.84 3.765c-0.043 0.192-0.043 0.389 0 0.581zM20.391 9.724l-10.667 10.667c-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.391l10.667-10.667c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0z"></path>
|
|
15
|
+
</svg>
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
const KeyboardArrowLeftIcon = `<!-- Generated by IcoMoon.io -->
|
|
19
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
20
|
+
<title>keyboard_arrow_left</title>
|
|
21
|
+
<path d="M20.563 22.104l-1.875 1.875-8-8 8-8 1.875 1.875-6.125 6.125z"></path>
|
|
22
|
+
</svg>
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
const Tag = `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
26
|
+
<title>tag</title>
|
|
27
|
+
<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>
|
|
28
|
+
</svg>
|
|
29
|
+
`;
|
|
30
|
+
|
|
10
31
|
const sallaOfferModalCss = "";
|
|
11
32
|
|
|
12
33
|
const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -26,7 +47,7 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
26
47
|
this.add_to_cart = salla.lang.get('pages.cart.add_to_cart');
|
|
27
48
|
this.out_of_stock = salla.lang.get('pages.products.out_of_stock');
|
|
28
49
|
});
|
|
29
|
-
this.categorySlot = ((_a = Helper.getElement('[slot="category"]')) === null || _a === void 0 ? void 0 : _a.innerHTML) ||
|
|
50
|
+
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>`;
|
|
30
51
|
this.productSlot = ((_b = Helper.getElement('[slot="product"]')) === null || _b === void 0 ? void 0 : _b.innerHTML) || this.defaultProductSlot();
|
|
31
52
|
salla.product.event.onOfferExisted(offer => {
|
|
32
53
|
if (salla.storage.get('remember-offer-' + offer.id)) {
|
|
@@ -76,9 +97,10 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
76
97
|
}
|
|
77
98
|
render() {
|
|
78
99
|
var _a, _b;
|
|
79
|
-
return h("salla-modal", { "sub-title-first": true,
|
|
100
|
+
return h("salla-modal", { "sub-title-first": true, "sub-title": this.offer_message, ref: modal => this.modal = modal, "is-loading": this.offer === null }, h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }), this.offer !== null
|
|
80
101
|
? [h("div", { class: "s-offer-modal-scrolled-slider-wrap" }, 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
|
|
81
102
|
? 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
|
|
103
|
+
.replace(/\{tagIcon\}/g, Tag)
|
|
82
104
|
.replace(/\{name\}/g, category.name)
|
|
83
105
|
.replace(/\{url\}/g, category.urls.customer) }))
|
|
84
106
|
: (_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
|
|
@@ -87,7 +109,7 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
87
109
|
.replace(/\{image\}/g, product.thumbnail)
|
|
88
110
|
.replace(/\{price\}/g, product.has_special_price
|
|
89
111
|
? salla.money(product.price) + '<span class="s-offer-modal-product-old-price">' + salla.money(product.regular_price) + '</span>'
|
|
90
|
-
: salla.money(product.price)) }, h("div", { class: "s-offer-modal-btn-wrap" }, 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))))), h("div", { class: "s-offer-modal-slider-nav" }, h("button", { class: "s-offer-modal-nav-btn s-offer-modal-prev-btn" }, h("span", { class: "s-offer-modal-nav-btn-icon
|
|
112
|
+
: salla.money(product.price)) }, h("div", { class: "s-offer-modal-btn-wrap" }, 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))))), h("div", { class: "s-offer-modal-slider-nav" }, h("button", { class: "s-offer-modal-nav-btn s-offer-modal-prev-btn" }, h("span", { class: "s-offer-modal-nav-btn-icon", innerHTML: KeyboardArrowLeftIcon })), h("button", { class: "s-offer-modal-nav-btn s-offer-modal-next-btn" }, h("span", { class: "s-offer-modal-nav-btn-icon", innerHTML: KeyboardArrowRightIcon })))), h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
|
|
91
113
|
h("p", { class: "s-offer-modal-expiry" }, this.offer_expires_in, " ", this.offer.formatted_date)
|
|
92
114
|
: '', h("label", { class: "s-offer-modal-remember-label" }, h("input", { type: "checkbox", onChange: e => this.rememberMe(e), class: "s-offer-modal-remember-input" }), "\u00A0 ", this.remember_my_choice)),
|
|
93
115
|
] : '');
|
|
@@ -8,6 +8,13 @@ import { d as defineCustomElement$3 } from './salla-loading2.js';
|
|
|
8
8
|
import { d as defineCustomElement$2 } from './salla-modal2.js';
|
|
9
9
|
import { d as defineCustomElement$1 } from './salla-tel-input2.js';
|
|
10
10
|
|
|
11
|
+
const BellRingIcon = `<!-- 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>bell-ring</title>
|
|
14
|
+
<path d="M2.667 13.333v-4c0-2.592 0.748-5.107 2.161-7.271 0.404-0.616 0.231-1.443-0.387-1.845-0.616-0.401-1.443-0.228-1.845 0.388-1.699 2.599-2.596 5.617-2.596 8.728v4c0 0.736 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333zM25.333 15.647v-6.313c0-5.147-4.188-9.333-9.333-9.333s-9.333 4.187-9.333 9.333v6.312l-5.157 9.027c-0.236 0.413-0.235 0.92 0.004 1.331 0.239 0.412 0.679 0.664 1.153 0.664h8c0 2.941 2.392 5.333 5.333 5.333s5.333-2.392 5.333-5.333h8c0.475 0 0.915-0.252 1.153-0.664 0.239-0.411 0.24-0.917 0.004-1.331zM16 29.333c-1.471 0-2.667-1.196-2.667-2.667h5.333c0 1.472-1.196 2.667-2.667 2.667zM4.965 24l4.193-7.339c0.113-0.2 0.175-0.429 0.175-0.661v-6.667c0-3.676 2.991-6.667 6.667-6.667s6.667 2.991 6.667 6.667v6.667c0 0.232 0.061 0.46 0.176 0.661l4.192 7.339zM29.403 0.603c-0.403-0.616-1.232-0.789-1.845-0.387-0.617 0.403-0.791 1.229-0.387 1.845 1.415 2.165 2.163 4.68 2.163 7.272v4c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-4c0-3.112-0.899-6.132-2.597-8.731z"></path>
|
|
15
|
+
</svg>
|
|
16
|
+
`;
|
|
17
|
+
|
|
11
18
|
const sallaProductAvailabilityCss = "";
|
|
12
19
|
|
|
13
20
|
const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -107,12 +114,12 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
107
114
|
}
|
|
108
115
|
render() {
|
|
109
116
|
return (h(Host, { class: "s-product-availability-wrap" }, this.isSubscribed || this.isVisitorSubscribed
|
|
110
|
-
? h("div", { class: "s-product-availability-subscribed" }, h("
|
|
117
|
+
? h("div", { class: "s-product-availability-subscribed" }, h("span", { innerHTML: BellRingIcon, class: "s-product-availability-subs-icon" }), " ", this.subscribedMessage)
|
|
111
118
|
:
|
|
112
119
|
h("salla-button", { width: "wide", onClick: () => this.isUser ? this.submit() : this.modal.open(), ref: btn => this.inlineBtn = btn }, salla.lang.get('pages.products.notify_availability')), this.isUser || this.isSubscribed || this.isVisitorSubscribed ? '' : this.renderModal()));
|
|
113
120
|
}
|
|
114
121
|
renderModal() {
|
|
115
|
-
return (h("salla-modal", { ref: modal => this.modal = modal, "modal-title": this.title_, subTitle: this.subTitle,
|
|
122
|
+
return (h("salla-modal", { ref: modal => this.modal = modal, "modal-title": this.title_, subTitle: this.subTitle, width: "sm" }, h("span", { slot: 'icon', innerHTML: BellRingIcon }), h("div", { class: "s-product-availability-body" }, this.channels_.includes('email') ? [
|
|
116
123
|
h("label", { class: "s-product-availability-label" }, this.emailLabel),
|
|
117
124
|
h("input", { class: "s-product-availability-input", onKeyDown: e => this.typing(e, this.submit), placeholder: this.emailPlaceholder, ref: el => this.email = el, type: "email" }),
|
|
118
125
|
h("span", { class: "s-product-availability-error-msg" })
|
|
@@ -4,6 +4,20 @@
|
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { H as Helper } from './Helper.js';
|
|
6
6
|
|
|
7
|
+
const Add = `<!-- Generated by IcoMoon.io -->
|
|
8
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
9
|
+
<title>add</title>
|
|
10
|
+
<path d="M26.667 14.667h-9.333v-9.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v9.333h-9.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h9.333v9.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-9.333h9.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>
|
|
11
|
+
</svg>
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const Minus = `<!-- Generated by IcoMoon.io -->
|
|
15
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
16
|
+
<title>minus</title>
|
|
17
|
+
<path d="M26.667 14.667h-21.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h21.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>
|
|
18
|
+
</svg>
|
|
19
|
+
`;
|
|
20
|
+
|
|
7
21
|
const sallaQuantityInputCss = "";
|
|
8
22
|
|
|
9
23
|
const SallaQuantityInput$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -54,7 +68,7 @@ const SallaQuantityInput$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
54
68
|
* @return HTMLSallaQuantityInputElement
|
|
55
69
|
*/
|
|
56
70
|
async increase() {
|
|
57
|
-
return this.setValue(this.quantity + 1);
|
|
71
|
+
return this.setValue(Number(this.quantity) + 1);
|
|
58
72
|
}
|
|
59
73
|
/**
|
|
60
74
|
* set quantity by one.
|
|
@@ -72,7 +86,7 @@ const SallaQuantityInput$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
72
86
|
return this.host;
|
|
73
87
|
}
|
|
74
88
|
render() {
|
|
75
|
-
return (h(Host, { class: "s-quantity-input s-quantity-input-container" }, h("button", { onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button" }, !this.hasIncrementSlot ? h("
|
|
89
|
+
return (h(Host, { class: "s-quantity-input" }, h("div", { class: "s-quantity-input-container" }, h("button", { onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button" }, !this.hasIncrementSlot ? h("span", { innerHTML: Add }) : '', h("slot", { name: "increment-button" })), 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 })), h("button", { class: "s-quantity-input-decrease-button s-quantity-input-button", onClick: () => this.decrease(), type: "button" }, !this.hasDecrementSlot ? h("span", { innerHTML: Minus }) : '', h("slot", { name: "decrement-button" })))));
|
|
76
90
|
}
|
|
77
91
|
get host() { return this; }
|
|
78
92
|
static get watchers() { return {
|