@salla.sa/twilight-components 1.0.53 → 1.0.54
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/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-button.cjs.entry.js +43 -27
- package/dist/cjs/{salla-login-modal-54cc2e83.js → salla-login-modal-d0fb6180.js} +5 -5
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +3 -4
- package/dist/cjs/salla-tel-input.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify-modal.cjs.entry.js +6 -6
- package/dist/cjs/twilight-components.cjs.js +1 -1
- package/dist/collection/components/salla-button/salla-button.css +42 -10
- package/dist/collection/components/salla-button/salla-button.js +125 -51
- package/dist/collection/components/salla-login-modal/salla-login-modal.css +5 -1
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +5 -5
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +3 -4
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +2 -2
- package/dist/collection/components/salla-verify-modal/salla-verify-modal.css +4 -0
- package/dist/collection/components/salla-verify-modal/salla-verify-modal.js +5 -5
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-button.entry.js +43 -27
- package/dist/esm/{salla-login-modal-473768a6.js → salla-login-modal-63f03766.js} +5 -5
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +3 -4
- package/dist/esm/salla-tel-input.entry.js +2 -2
- package/dist/esm/salla-verify-modal.entry.js +6 -6
- package/dist/esm/twilight-components.js +1 -1
- package/dist/twilight-components/index.esm.js +1 -1
- package/dist/twilight-components/p-05574321.entry.js +1 -0
- package/dist/twilight-components/p-4da2c2c8.entry.js +1 -0
- package/dist/twilight-components/p-635c08a7.entry.js +1 -0
- package/dist/twilight-components/{p-105af48d.entry.js → p-79ab1ed9.entry.js} +1 -1
- package/dist/twilight-components/{p-10ea748b.js → p-88dce1e4.js} +1 -1
- package/dist/twilight-components/p-a26e2e12.entry.js +1 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-button/salla-button.d.ts +22 -11
- package/dist/types/components.d.ts +40 -16
- package/package.json +1 -1
- package/dist/twilight-components/p-17ebe444.entry.js +0 -1
- package/dist/twilight-components/p-669a9b08.entry.js +0 -1
- package/dist/twilight-components/p-78b10bac.entry.js +0 -1
- package/dist/twilight-components/p-f0f51a3c.entry.js +0 -1
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
import { Component, Element, h, Method, Prop,
|
|
1
|
+
import { Component, Element, h, Method, Prop, Host } from '@stencil/core';
|
|
2
2
|
export class SallaButton {
|
|
3
3
|
constructor() {
|
|
4
|
+
this.hostAttributes = {};
|
|
5
|
+
/**
|
|
6
|
+
* Button Type
|
|
7
|
+
*/
|
|
8
|
+
this.buttonType = 'btn';
|
|
9
|
+
/**
|
|
10
|
+
* Button Color
|
|
11
|
+
*/
|
|
12
|
+
this.color = 'primary';
|
|
4
13
|
/**
|
|
5
|
-
* Button
|
|
14
|
+
* Button Fill
|
|
6
15
|
*/
|
|
7
|
-
this.
|
|
16
|
+
this.fill = 'solid';
|
|
8
17
|
/**
|
|
9
|
-
*
|
|
18
|
+
* Button Size
|
|
10
19
|
*/
|
|
11
|
-
this.
|
|
20
|
+
this.size = 'medium';
|
|
12
21
|
/**
|
|
13
|
-
*
|
|
22
|
+
* Button Width
|
|
14
23
|
*/
|
|
15
|
-
this.
|
|
24
|
+
this.width = 'normal';
|
|
16
25
|
/**
|
|
17
26
|
* Is the button currently loading
|
|
18
27
|
*/
|
|
@@ -29,18 +38,6 @@ export class SallaButton {
|
|
|
29
38
|
* Is the button wide
|
|
30
39
|
*/
|
|
31
40
|
this.wide = false;
|
|
32
|
-
this.hostAttributes = {};
|
|
33
|
-
for (let i = 0; i < this.host.attributes.length; i++) {
|
|
34
|
-
this.hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
|
|
35
|
-
}
|
|
36
|
-
this.hostAttributes.type = this.hostAttributes.type || 'button';
|
|
37
|
-
this.hostAttributes.class +=
|
|
38
|
-
(this.icon ? ' s-button-icon s-button-loader-center' : ' s-button-btn ' + 's-button-loader-' + this.loaderPosition)
|
|
39
|
-
+ (this.wide ? ' s-button-wide ' : '')
|
|
40
|
-
+ (this.disabled ? ' s-button-disabled ' : ' s-button-' + this.btnStyle)
|
|
41
|
-
+ (this.miniIcon ? ' s-button-mini-icon ' : '');
|
|
42
|
-
delete this.hostAttributes['btn-style'];
|
|
43
|
-
delete this.hostAttributes['id'];
|
|
44
41
|
if (this.wide) {
|
|
45
42
|
this.host.classList.add('s-button-wide');
|
|
46
43
|
}
|
|
@@ -76,23 +73,45 @@ export class SallaButton {
|
|
|
76
73
|
*/
|
|
77
74
|
async disable() {
|
|
78
75
|
this.host.setAttribute('disabled', '');
|
|
76
|
+
return this.host;
|
|
79
77
|
}
|
|
80
78
|
/**
|
|
81
79
|
* Remove `disabled` attribute
|
|
82
80
|
*/
|
|
83
81
|
async enable() {
|
|
84
82
|
this.host.removeAttribute('disabled');
|
|
83
|
+
return this.host;
|
|
85
84
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
getBtnAttributes() {
|
|
86
|
+
for (let i = 0; i < this.host.attributes.length; i++) {
|
|
87
|
+
if (!['type', 'color', 'fill', 'size', 'width', 'id',].includes(this.host.attributes[i].name)) {
|
|
88
|
+
this.hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
this.hostAttributes.type = this.hostAttributes.type || 'button';
|
|
92
|
+
this.hostAttributes.class +=
|
|
93
|
+
' s-button-element s-button-' + this.buttonType
|
|
94
|
+
+ ' s-button-' + (this.fill == "none" ? 'fill-none' : this.fill)
|
|
95
|
+
+ (this.size != "medium" ? ' s-button-' + this.size : '')
|
|
96
|
+
+ (this.width != "normal" ? ' s-button-' + this.width : '')
|
|
97
|
+
+ (this.buttonType == "link" ? ' s-button-' + this.color + '-link' : '')
|
|
98
|
+
+ (this.buttonType != "link" && this.fill != 'outline' ? ' s-button-' + this.color : '')
|
|
99
|
+
+ (this.fill == 'outline' ? ' s-button-' + this.color + '-outline' : '')
|
|
100
|
+
+ (this.disabled ? ' s-button-disabled ' : '')
|
|
101
|
+
+ (this.buttonType == 'icon' ? ' s-button-loader-center' : ' s-button-loader-' + this.loaderPosition);
|
|
102
|
+
return this.hostAttributes;
|
|
90
103
|
}
|
|
104
|
+
// @Watch('btnStyle')
|
|
105
|
+
// handleVisible(newKind: string, oldKind: string) {
|
|
106
|
+
// //todo::use united styles
|
|
107
|
+
// this.btn.classList.remove('btn-' + oldKind);
|
|
108
|
+
// this.btn.classList.add('btn-' + newKind);
|
|
109
|
+
// }
|
|
91
110
|
render() {
|
|
92
111
|
return (
|
|
93
112
|
//TODO:: use HOST then fake button behaviours
|
|
94
113
|
h(Host, { class: "s-button-wrap" },
|
|
95
|
-
h("button", Object.assign({
|
|
114
|
+
h("button", Object.assign({}, this.getBtnAttributes(), { disabled: this.disabled }),
|
|
96
115
|
h("span", { class: "s-button-text", ref: el => this.text = el },
|
|
97
116
|
h("slot", null)),
|
|
98
117
|
this.loading ? h("span", { class: "s-button-loader" }) : '')));
|
|
@@ -105,59 +124,95 @@ export class SallaButton {
|
|
|
105
124
|
"$": ["salla-button.css"]
|
|
106
125
|
}; }
|
|
107
126
|
static get properties() { return {
|
|
108
|
-
"
|
|
127
|
+
"buttonType": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"mutable": false,
|
|
130
|
+
"complexType": {
|
|
131
|
+
"original": "'link' | 'icon' | 'btn'",
|
|
132
|
+
"resolved": "\"btn\" | \"icon\" | \"link\"",
|
|
133
|
+
"references": {}
|
|
134
|
+
},
|
|
135
|
+
"required": false,
|
|
136
|
+
"optional": false,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": "Button Type"
|
|
140
|
+
},
|
|
141
|
+
"attribute": "button-type",
|
|
142
|
+
"reflect": true,
|
|
143
|
+
"defaultValue": "'btn'"
|
|
144
|
+
},
|
|
145
|
+
"color": {
|
|
109
146
|
"type": "string",
|
|
110
147
|
"mutable": false,
|
|
111
148
|
"complexType": {
|
|
112
|
-
"original": "'primary' | '
|
|
113
|
-
"resolved": "\"danger\" | \"
|
|
149
|
+
"original": "'primary' | 'success' | 'warning' | 'danger' | 'light' | 'gray' | 'dark'",
|
|
150
|
+
"resolved": "\"danger\" | \"dark\" | \"gray\" | \"light\" | \"primary\" | \"success\" | \"warning\"",
|
|
114
151
|
"references": {}
|
|
115
152
|
},
|
|
116
153
|
"required": false,
|
|
117
154
|
"optional": false,
|
|
118
155
|
"docs": {
|
|
119
156
|
"tags": [],
|
|
120
|
-
"text": "Button
|
|
157
|
+
"text": "Button Color"
|
|
121
158
|
},
|
|
122
|
-
"attribute": "
|
|
159
|
+
"attribute": "color",
|
|
123
160
|
"reflect": true,
|
|
124
161
|
"defaultValue": "'primary'"
|
|
125
162
|
},
|
|
126
|
-
"
|
|
127
|
-
"type": "
|
|
163
|
+
"fill": {
|
|
164
|
+
"type": "string",
|
|
128
165
|
"mutable": false,
|
|
129
166
|
"complexType": {
|
|
130
|
-
"original": "
|
|
131
|
-
"resolved": "
|
|
167
|
+
"original": "'solid' | 'outline' | 'none'",
|
|
168
|
+
"resolved": "\"none\" | \"outline\" | \"solid\"",
|
|
132
169
|
"references": {}
|
|
133
170
|
},
|
|
134
171
|
"required": false,
|
|
135
172
|
"optional": false,
|
|
136
173
|
"docs": {
|
|
137
174
|
"tags": [],
|
|
138
|
-
"text": "
|
|
175
|
+
"text": "Button Fill"
|
|
139
176
|
},
|
|
140
|
-
"attribute": "
|
|
177
|
+
"attribute": "fill",
|
|
141
178
|
"reflect": true,
|
|
142
|
-
"defaultValue": "
|
|
179
|
+
"defaultValue": "'solid'"
|
|
143
180
|
},
|
|
144
|
-
"
|
|
145
|
-
"type": "
|
|
181
|
+
"size": {
|
|
182
|
+
"type": "string",
|
|
146
183
|
"mutable": false,
|
|
147
184
|
"complexType": {
|
|
148
|
-
"original": "
|
|
149
|
-
"resolved": "
|
|
185
|
+
"original": "'small' | 'large' | 'medium'",
|
|
186
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
150
187
|
"references": {}
|
|
151
188
|
},
|
|
152
189
|
"required": false,
|
|
153
190
|
"optional": false,
|
|
154
191
|
"docs": {
|
|
155
192
|
"tags": [],
|
|
156
|
-
"text": "
|
|
193
|
+
"text": "Button Size"
|
|
157
194
|
},
|
|
158
|
-
"attribute": "
|
|
195
|
+
"attribute": "size",
|
|
159
196
|
"reflect": true,
|
|
160
|
-
"defaultValue": "
|
|
197
|
+
"defaultValue": "'medium'"
|
|
198
|
+
},
|
|
199
|
+
"width": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"mutable": false,
|
|
202
|
+
"complexType": {
|
|
203
|
+
"original": "'wide' | 'normal'",
|
|
204
|
+
"resolved": "\"normal\" | \"wide\"",
|
|
205
|
+
"references": {}
|
|
206
|
+
},
|
|
207
|
+
"required": false,
|
|
208
|
+
"optional": false,
|
|
209
|
+
"docs": {
|
|
210
|
+
"tags": [],
|
|
211
|
+
"text": "Button Width"
|
|
212
|
+
},
|
|
213
|
+
"attribute": "width",
|
|
214
|
+
"reflect": true,
|
|
215
|
+
"defaultValue": "'normal'"
|
|
161
216
|
},
|
|
162
217
|
"loading": {
|
|
163
218
|
"type": "boolean",
|
|
@@ -230,6 +285,23 @@ export class SallaButton {
|
|
|
230
285
|
"attribute": "wide",
|
|
231
286
|
"reflect": false,
|
|
232
287
|
"defaultValue": "false"
|
|
288
|
+
},
|
|
289
|
+
"href": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"mutable": false,
|
|
292
|
+
"complexType": {
|
|
293
|
+
"original": "string",
|
|
294
|
+
"resolved": "string",
|
|
295
|
+
"references": {}
|
|
296
|
+
},
|
|
297
|
+
"required": false,
|
|
298
|
+
"optional": false,
|
|
299
|
+
"docs": {
|
|
300
|
+
"tags": [],
|
|
301
|
+
"text": "Button with href as normal link"
|
|
302
|
+
},
|
|
303
|
+
"attribute": "href",
|
|
304
|
+
"reflect": false
|
|
233
305
|
}
|
|
234
306
|
}; }
|
|
235
307
|
static get methods() { return {
|
|
@@ -301,14 +373,17 @@ export class SallaButton {
|
|
|
301
373
|
},
|
|
302
374
|
"disable": {
|
|
303
375
|
"complexType": {
|
|
304
|
-
"signature": "() => Promise<
|
|
376
|
+
"signature": "() => Promise<HTMLElement>",
|
|
305
377
|
"parameters": [],
|
|
306
378
|
"references": {
|
|
307
379
|
"Promise": {
|
|
308
380
|
"location": "global"
|
|
381
|
+
},
|
|
382
|
+
"HTMLElement": {
|
|
383
|
+
"location": "global"
|
|
309
384
|
}
|
|
310
385
|
},
|
|
311
|
-
"return": "Promise<
|
|
386
|
+
"return": "Promise<HTMLElement>"
|
|
312
387
|
},
|
|
313
388
|
"docs": {
|
|
314
389
|
"text": "Add `disabled` attribute",
|
|
@@ -317,14 +392,17 @@ export class SallaButton {
|
|
|
317
392
|
},
|
|
318
393
|
"enable": {
|
|
319
394
|
"complexType": {
|
|
320
|
-
"signature": "() => Promise<
|
|
395
|
+
"signature": "() => Promise<HTMLElement>",
|
|
321
396
|
"parameters": [],
|
|
322
397
|
"references": {
|
|
323
398
|
"Promise": {
|
|
324
399
|
"location": "global"
|
|
400
|
+
},
|
|
401
|
+
"HTMLElement": {
|
|
402
|
+
"location": "global"
|
|
325
403
|
}
|
|
326
404
|
},
|
|
327
|
-
"return": "Promise<
|
|
405
|
+
"return": "Promise<HTMLElement>"
|
|
328
406
|
},
|
|
329
407
|
"docs": {
|
|
330
408
|
"text": "Remove `disabled` attribute",
|
|
@@ -333,8 +411,4 @@ export class SallaButton {
|
|
|
333
411
|
}
|
|
334
412
|
}; }
|
|
335
413
|
static get elementRef() { return "host"; }
|
|
336
|
-
static get watchers() { return [{
|
|
337
|
-
"propName": "btnStyle",
|
|
338
|
-
"methodName": "handleVisible"
|
|
339
|
-
}]; }
|
|
340
414
|
}
|
|
@@ -203,11 +203,11 @@ export class SallaLoginModal {
|
|
|
203
203
|
h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.mobileTab, evt) },
|
|
204
204
|
h("i", { class: "s-login-modal-main-btn-icon sicon-phone" }),
|
|
205
205
|
h("span", { class: "s-login-modal-main-btn-text" }, this.smsLabel),
|
|
206
|
-
h("i", { class: "
|
|
206
|
+
h("i", { class: "sicon-keyboard_arrow_left arrow" })),
|
|
207
207
|
h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.emailTab, evt) },
|
|
208
208
|
h("i", { class: "s-login-modal-main-btn-icon sicon-mail" }),
|
|
209
209
|
h("span", { class: "s-login-modal-main-btn-text" }, this.emailLabel),
|
|
210
|
-
h("i", { class: "
|
|
210
|
+
h("i", { class: "sicon-keyboard_arrow_left arrow" })),
|
|
211
211
|
h("slot", { name: "after-login-type" }))
|
|
212
212
|
: '',
|
|
213
213
|
this.isMobileAllowed ?
|
|
@@ -215,7 +215,7 @@ export class SallaLoginModal {
|
|
|
215
215
|
h("slot", { name: "before-login-mobile" }),
|
|
216
216
|
h("label", { class: "s-login-modal-label" }, this.mobileLabel),
|
|
217
217
|
h("salla-tel-input", { ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e, this.loginBySMS) }),
|
|
218
|
-
h("salla-button", { "loader-position": 'center',
|
|
218
|
+
h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginBySMS(), ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter')),
|
|
219
219
|
this.isEmailAllowed ?
|
|
220
220
|
h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, this.byEmailText) : '',
|
|
221
221
|
h("slot", { name: "after-login-mobile" })) : '',
|
|
@@ -225,7 +225,7 @@ export class SallaLoginModal {
|
|
|
225
225
|
h("label", { class: "s-login-modal-label" }, this.emailLabel),
|
|
226
226
|
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" }),
|
|
227
227
|
h("span", { class: "s-login-modal-error-message" }),
|
|
228
|
-
h("salla-button", { "loader-position": 'center',
|
|
228
|
+
h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginByEmail(), ref: b => this.emailBtn = b }, salla.lang.get('blocks.header.enter')),
|
|
229
229
|
this.isMobileAllowed ?
|
|
230
230
|
h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '',
|
|
231
231
|
h("slot", { name: "after-login-email" })) : '',
|
|
@@ -246,7 +246,7 @@ export class SallaLoginModal {
|
|
|
246
246
|
h("label", { class: "s-login-modal-label" }, this.emailLabel),
|
|
247
247
|
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" }),
|
|
248
248
|
h("span", { class: "s-login-modal-error-message" })),
|
|
249
|
-
h("salla-button", { "loader-position": 'center',
|
|
249
|
+
h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')),
|
|
250
250
|
h("slot", { name: "after-registration" })))));
|
|
251
251
|
}
|
|
252
252
|
static get is() { return "salla-login-modal"; }
|
|
@@ -18,13 +18,12 @@ export class SallaOfferModal {
|
|
|
18
18
|
});
|
|
19
19
|
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>';
|
|
20
20
|
this.productSlot = ((_b = Helper.getElement('[slot="product"]')) === null || _b === void 0 ? void 0 : _b.innerHTML) || this.defaultProductSlot();
|
|
21
|
-
salla.offer.event.onExisted(
|
|
22
|
-
|
|
23
|
-
if (salla.storage.get('remember-offer-' + data.offer.offer_id)) {
|
|
21
|
+
salla.offer.event.onExisted(offer => {
|
|
22
|
+
if (salla.storage.get('remember-offer-' + offer.id)) {
|
|
24
23
|
salla.log('User selected to don\'t show this offer again.');
|
|
25
24
|
return;
|
|
26
25
|
}
|
|
27
|
-
this.show(
|
|
26
|
+
this.show(offer.product_id);
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
/**
|
|
@@ -57,7 +57,7 @@ export class SallaTelInput {
|
|
|
57
57
|
return false;
|
|
58
58
|
}
|
|
59
59
|
initTelInput() {
|
|
60
|
-
salla.helpers.
|
|
60
|
+
salla.helpers.inputDigitsOnly(this.phoneInput);
|
|
61
61
|
this.iti = TelInput(this.phoneInput, {
|
|
62
62
|
initialCountry: this.countryCode || 'sa',
|
|
63
63
|
preferredCountries: ['sa', 'ae', 'kw', 'bh', 'qa', 'iq', 'om', 'ye', 'eg', 'jo', 'sy', 'ps', 'sd', 'lb', 'dz', 'tn', 'ma', 'ly'],
|
|
@@ -75,7 +75,7 @@ export class SallaTelInput {
|
|
|
75
75
|
this.phoneInput.addEventListener('blur', () => this.isValid());
|
|
76
76
|
// on keyup / change flag: reset
|
|
77
77
|
this.phoneInput.addEventListener('input', e => {
|
|
78
|
-
salla.helpers.
|
|
78
|
+
salla.helpers.inputDigitsOnly(e.target);
|
|
79
79
|
this.reset();
|
|
80
80
|
});
|
|
81
81
|
}
|
|
@@ -6,6 +6,7 @@ import Helper from "../../Helpers/Helper";
|
|
|
6
6
|
*/
|
|
7
7
|
export class SallaVerifyModal {
|
|
8
8
|
constructor() {
|
|
9
|
+
// Helper.setHost(this.host);
|
|
9
10
|
this.initiated = false;
|
|
10
11
|
/**
|
|
11
12
|
* Verifying method
|
|
@@ -15,7 +16,6 @@ export class SallaVerifyModal {
|
|
|
15
16
|
* should auto reloading the page after success verification
|
|
16
17
|
*/
|
|
17
18
|
this.autoReload = true;
|
|
18
|
-
Helper.setHost(this.host);
|
|
19
19
|
if (this.withoutModal) {
|
|
20
20
|
this.modal = { show: () => '', hide: () => '' };
|
|
21
21
|
}
|
|
@@ -48,7 +48,7 @@ export class SallaVerifyModal {
|
|
|
48
48
|
this.resendTimer();
|
|
49
49
|
this.otpInputs = this.host.querySelectorAll('.s-verify-modal-input');
|
|
50
50
|
if (!this.initiated) {
|
|
51
|
-
Helper.on('input', '.s-verify-modal-input', e => salla.helpers.
|
|
51
|
+
Helper.on('input', '.s-verify-modal-input', e => salla.helpers.inputDigitsOnly(e.target));
|
|
52
52
|
Helper.onKeyUp('.s-verify-modal-input', event => {
|
|
53
53
|
var _a, _b, _c, _d;
|
|
54
54
|
let key = event.keyCode || event.charCode;
|
|
@@ -63,7 +63,7 @@ export class SallaVerifyModal {
|
|
|
63
63
|
this.toggleOTPSubmit();
|
|
64
64
|
});
|
|
65
65
|
Helper.on('paste', '.s-verify-modal-input', event => {
|
|
66
|
-
let text = event.clipboardData.getData('text')
|
|
66
|
+
let text = salla.helpers.number(event.clipboardData.getData('text')).replace(/[^0-9.]/g, '').replace('..', '.');
|
|
67
67
|
this.otpInputs.forEach((input, i) => input.value = text[i] || '');
|
|
68
68
|
this.toggleOTPSubmit();
|
|
69
69
|
setTimeout(() => this.otpInputs[3].focus(), 100);
|
|
@@ -130,11 +130,11 @@ export class SallaVerifyModal {
|
|
|
130
130
|
.catch(() => this.btn.stop() && this.btn.enable() && this.reset());
|
|
131
131
|
}
|
|
132
132
|
render() {
|
|
133
|
-
return this.withoutModal ? this.myBody() :
|
|
133
|
+
return this.withoutModal ? h(Host, null, this.myBody()) :
|
|
134
134
|
h("salla-modal", { icon: "sicon-android-phone", width: "xs", id: "s-verify-modal", ref: modal => this.modal = modal, title: this.title }, this.myBody());
|
|
135
135
|
}
|
|
136
136
|
myBody() {
|
|
137
|
-
return (h(
|
|
137
|
+
return (h("div", { id: "s-verify-modal" },
|
|
138
138
|
h("div", { class: "s-verify-modal-message", innerHTML: salla.lang.get('pages.profile.verify_message') }),
|
|
139
139
|
h("input", { type: "hidden", name: "code", maxlength: "4", required: true, ref: code => this.code = code }),
|
|
140
140
|
h("div", { class: "s-verify-modal-codes", dir: "ltr" }, [1, 2, 3, 4].map(() => h("input", { type: "text", maxlength: "1", class: "s-verify-modal-input", required: true }))),
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as SallaLoginModal } from './salla-login-modal-
|
|
1
|
+
export { S as SallaLoginModal } from './salla-login-modal-63f03766.js';
|
|
2
2
|
export { S as SallaSearch } from './salla-search-7521be0c.js';
|
|
3
3
|
import './index-8b97d225.js';
|
|
4
4
|
import './Helper-7162a06c.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["salla-button",[[4,"salla-button",{"
|
|
13
|
+
return bootstrapLazy([["salla-button",[[4,"salla-button",{"buttonType":[513,"button-type"],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["salla-modal_2",[[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"title":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal",[[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],"show":[64]},[[0,"verified","onVerified"]]]]],["salla-product-availability",[[4,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}]]],["salla-branches",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}]]],["salla-offer-modal",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"show":[64],"showOffer":[64]}]]],["salla-rating-modal",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-infinite-scroll",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-verify-modal",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}]]],["salla-tel-input",[[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"countryKey":[1025,"country-key"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-8b97d225.js';
|
|
2
2
|
|
|
3
|
-
const sallaButtonCss = "salla-button{pointer-events:none}salla-button[type=submit]{-webkit-appearance:none}.s-button-wrap[loading]{pointer-events:none}.s-button-wrap[loading] .s-button-text{opacity:0}.s-button-wrap .s-button-
|
|
3
|
+
const sallaButtonCss = "salla-button{pointer-events:none}salla-button[type=submit]{-webkit-appearance:none}salla-button[width=wide]{width:100%}.s-button-wrap[loading]{pointer-events:none}.s-button-wrap[loading] .s-button-element{pointer-events:none !important}.s-button-wrap[loading] .s-button-loader-center .s-button-text{opacity:0}.s-button-wrap .s-button-element[loading]{pointer-events:none !important}.s-button-wrap .s-button-element:not(:disabled){pointer-events:auto}.s-button-wrap .s-button-solid .s-button-loader:before{border-color:#fff #fff rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2)}.s-button-wrap .s-button-outline{border:1px solid currentColor}.s-button-wrap .s-button-outline:hover{border-color:transparent}.s-button-wrap .s-button-outline .s-button-loader:before{border-top-color:currentColor;border-left-color:currentColor}.s-button-wrap .s-button-icon.s-button-large{width:56px;height:56px}.s-button-wrap .s-button-icon.s-button-small{width:24px;height:24px}.s-button-wrap .s-button-icon.s-button-small .s-button-loader:before{width:0.85rem;height:0.85rem}.s-button-wrap .s-button-loader-after .s-button-load{flex-direction:row}.s-button-wrap .s-button-loader-start.s-button-element{padding-right:40px}.s-button-wrap .s-button-loader-start .s-button-loader{position:absolute;right:8px}.s-button-wrap .s-button-loader-start .s-button-loader [dir=ltr]{left:8px;right:auto}.s-button-wrap .s-button-loader-end.s-button-element{padding-left:40px}.s-button-wrap .s-button-loader-end .s-button-loader{position:absolute;left:8px}.s-button-wrap .s-button-loader-end .s-button-loader [dir=ltr]{right:8px;left:auto}.s-button-wrap .s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);margin:0 !important}";
|
|
4
4
|
|
|
5
5
|
const SallaButton = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
+
this.hostAttributes = {};
|
|
9
|
+
/**
|
|
10
|
+
* Button Type
|
|
11
|
+
*/
|
|
12
|
+
this.buttonType = 'btn';
|
|
13
|
+
/**
|
|
14
|
+
* Button Color
|
|
15
|
+
*/
|
|
16
|
+
this.color = 'primary';
|
|
8
17
|
/**
|
|
9
|
-
* Button
|
|
18
|
+
* Button Fill
|
|
10
19
|
*/
|
|
11
|
-
this.
|
|
20
|
+
this.fill = 'solid';
|
|
12
21
|
/**
|
|
13
|
-
*
|
|
22
|
+
* Button Size
|
|
14
23
|
*/
|
|
15
|
-
this.
|
|
24
|
+
this.size = 'medium';
|
|
16
25
|
/**
|
|
17
|
-
*
|
|
26
|
+
* Button Width
|
|
18
27
|
*/
|
|
19
|
-
this.
|
|
28
|
+
this.width = 'normal';
|
|
20
29
|
/**
|
|
21
30
|
* Is the button currently loading
|
|
22
31
|
*/
|
|
@@ -33,18 +42,6 @@ const SallaButton = class {
|
|
|
33
42
|
* Is the button wide
|
|
34
43
|
*/
|
|
35
44
|
this.wide = false;
|
|
36
|
-
this.hostAttributes = {};
|
|
37
|
-
for (let i = 0; i < this.host.attributes.length; i++) {
|
|
38
|
-
this.hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
|
|
39
|
-
}
|
|
40
|
-
this.hostAttributes.type = this.hostAttributes.type || 'button';
|
|
41
|
-
this.hostAttributes.class +=
|
|
42
|
-
(this.icon ? ' s-button-icon s-button-loader-center' : ' s-button-btn ' + 's-button-loader-' + this.loaderPosition)
|
|
43
|
-
+ (this.wide ? ' s-button-wide ' : '')
|
|
44
|
-
+ (this.disabled ? ' s-button-disabled ' : ' s-button-' + this.btnStyle)
|
|
45
|
-
+ (this.miniIcon ? ' s-button-mini-icon ' : '');
|
|
46
|
-
delete this.hostAttributes['btn-style'];
|
|
47
|
-
delete this.hostAttributes['id'];
|
|
48
45
|
if (this.wide) {
|
|
49
46
|
this.host.classList.add('s-button-wide');
|
|
50
47
|
}
|
|
@@ -80,27 +77,46 @@ const SallaButton = class {
|
|
|
80
77
|
*/
|
|
81
78
|
async disable() {
|
|
82
79
|
this.host.setAttribute('disabled', '');
|
|
80
|
+
return this.host;
|
|
83
81
|
}
|
|
84
82
|
/**
|
|
85
83
|
* Remove `disabled` attribute
|
|
86
84
|
*/
|
|
87
85
|
async enable() {
|
|
88
86
|
this.host.removeAttribute('disabled');
|
|
87
|
+
return this.host;
|
|
89
88
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
getBtnAttributes() {
|
|
90
|
+
for (let i = 0; i < this.host.attributes.length; i++) {
|
|
91
|
+
if (!['type', 'color', 'fill', 'size', 'width', 'id',].includes(this.host.attributes[i].name)) {
|
|
92
|
+
this.hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
this.hostAttributes.type = this.hostAttributes.type || 'button';
|
|
96
|
+
this.hostAttributes.class +=
|
|
97
|
+
' s-button-element s-button-' + this.buttonType
|
|
98
|
+
+ ' s-button-' + (this.fill == "none" ? 'fill-none' : this.fill)
|
|
99
|
+
+ (this.size != "medium" ? ' s-button-' + this.size : '')
|
|
100
|
+
+ (this.width != "normal" ? ' s-button-' + this.width : '')
|
|
101
|
+
+ (this.buttonType == "link" ? ' s-button-' + this.color + '-link' : '')
|
|
102
|
+
+ (this.buttonType != "link" && this.fill != 'outline' ? ' s-button-' + this.color : '')
|
|
103
|
+
+ (this.fill == 'outline' ? ' s-button-' + this.color + '-outline' : '')
|
|
104
|
+
+ (this.disabled ? ' s-button-disabled ' : '')
|
|
105
|
+
+ (this.buttonType == 'icon' ? ' s-button-loader-center' : ' s-button-loader-' + this.loaderPosition);
|
|
106
|
+
return this.hostAttributes;
|
|
94
107
|
}
|
|
108
|
+
// @Watch('btnStyle')
|
|
109
|
+
// handleVisible(newKind: string, oldKind: string) {
|
|
110
|
+
// //todo::use united styles
|
|
111
|
+
// this.btn.classList.remove('btn-' + oldKind);
|
|
112
|
+
// this.btn.classList.add('btn-' + newKind);
|
|
113
|
+
// }
|
|
95
114
|
render() {
|
|
96
115
|
return (
|
|
97
116
|
//TODO:: use HOST then fake button behaviours
|
|
98
|
-
h(Host, { class: "s-button-wrap" }, h("button", Object.assign({
|
|
117
|
+
h(Host, { class: "s-button-wrap" }, h("button", Object.assign({}, this.getBtnAttributes(), { disabled: this.disabled }), h("span", { class: "s-button-text", ref: el => this.text = el }, h("slot", null)), this.loading ? h("span", { class: "s-button-loader" }) : '')));
|
|
99
118
|
}
|
|
100
119
|
get host() { return getElement(this); }
|
|
101
|
-
static get watchers() { return {
|
|
102
|
-
"btnStyle": ["handleVisible"]
|
|
103
|
-
}; }
|
|
104
120
|
};
|
|
105
121
|
SallaButton.style = sallaButtonCss;
|
|
106
122
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-8b97d225.js';
|
|
2
2
|
import { H as Helper } from './Helper-7162a06c.js';
|
|
3
3
|
|
|
4
|
-
const sallaLoginModalCss = "";
|
|
4
|
+
const sallaLoginModalCss = "[dir=ltr] #salla-login .s-login-modal-main-btn .arrow{display:inline-block;transform:scale(-1)}";
|
|
5
5
|
|
|
6
6
|
const SallaLoginModal = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -188,12 +188,12 @@ const SallaLoginModal = class {
|
|
|
188
188
|
}
|
|
189
189
|
render() {
|
|
190
190
|
return (h("salla-modal", { id: "salla-login", icon: "sicon-user", title: this.title, ref: modal => this.modal = modal, width: "xs" }, h("div", { class: "s-login-modal-wrapper" }, this.isEmailAllowed && this.isMobileAllowed ?
|
|
191
|
-
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("i", { class: "s-login-modal-main-btn-icon sicon-phone" }), h("span", { class: "s-login-modal-main-btn-text" }, this.smsLabel), h("i", { class: "
|
|
191
|
+
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("i", { class: "s-login-modal-main-btn-icon sicon-phone" }), h("span", { class: "s-login-modal-main-btn-text" }, this.smsLabel), h("i", { class: "sicon-keyboard_arrow_left arrow" })), h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.emailTab, evt) }, h("i", { class: "s-login-modal-main-btn-icon sicon-mail" }), h("span", { class: "s-login-modal-main-btn-text" }, this.emailLabel), h("i", { class: "sicon-keyboard_arrow_left arrow" })), h("slot", { name: "after-login-type" }))
|
|
192
192
|
: '', this.isMobileAllowed ?
|
|
193
|
-
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',
|
|
193
|
+
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 ?
|
|
194
194
|
h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, this.byEmailText) : '', h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
|
|
195
|
-
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',
|
|
196
|
-
h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', h("slot", { name: "after-login-email" })) : '', h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), h("div", { ref: tab => this.registrationTab = tab }, h("slot", { name: "before-registration" }), 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("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',
|
|
195
|
+
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 ?
|
|
196
|
+
h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', h("slot", { name: "after-login-email" })) : '', h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), h("div", { ref: tab => this.registrationTab = tab }, h("slot", { name: "before-registration" }), 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("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" })))));
|
|
197
197
|
}
|
|
198
198
|
get host() { return getElement(this); }
|
|
199
199
|
};
|