@salla.sa/twilight-components 2.11.14 → 2.11.16
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/salla-button_37.cjs.entry.js +20 -16
- package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
- package/dist/collection/components/salla-map/salla-map.js +12 -13
- package/dist/collection/components/salla-product-options/salla-product-options.js +0 -1
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +9 -4
- package/dist/components/salla-color-picker2.js +1 -1
- package/dist/components/salla-map2.js +10 -10
- package/dist/components/salla-product-options.js +0 -1
- package/dist/components/salla-user-menu.js +9 -4
- package/dist/esm/salla-button_37.entry.js +20 -16
- package/dist/esm-es5/salla-button_37.entry.js +2 -2
- package/dist/twilight/{p-3b003dea.entry.js → p-81cd0627.entry.js} +2 -2
- package/dist/twilight/p-c71ec183.system.js +1 -1
- package/dist/twilight/{p-4e765a4c.system.entry.js → p-cef45bd3.system.entry.js} +2 -2
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-map/salla-map.d.ts +1 -1
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +2 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +3 -3
|
@@ -2660,7 +2660,7 @@ const SallaColorPicker = class {
|
|
|
2660
2660
|
});
|
|
2661
2661
|
}
|
|
2662
2662
|
render() {
|
|
2663
|
-
return (index.h(index.Host, { class: "s-color-picker-main" }, index.h("slot",
|
|
2663
|
+
return (index.h(index.Host, { class: "s-color-picker-main" }, index.h("slot", { name: "widget" }, index.h("div", { class: "s-color-picker-widget" }, index.h("div", { class: "s-color-picker-widget-canvas", ref: dv => this.canvas = dv }), index.h("span", { innerHTML: ArrowDown }))), index.h("input", { type: "hidden", name: this.name, required: this.required, value: this.color, ref: color => this.colorInput = color })));
|
|
2664
2664
|
}
|
|
2665
2665
|
get host() { return index.getElement(this); }
|
|
2666
2666
|
};
|
|
@@ -22623,10 +22623,10 @@ const SallaMap = class {
|
|
|
22623
22623
|
this.defaultLat = 21.419421; //Mecca 🕋
|
|
22624
22624
|
this.defaultLng = 39.82553; //Mecca 🕋
|
|
22625
22625
|
// state variables
|
|
22626
|
-
this.modalActivityTitle = '
|
|
22627
|
-
this.confirmButtonTitle = '
|
|
22628
|
-
this.locateButtonTitle = '
|
|
22629
|
-
this.locateButtonEdit = '
|
|
22626
|
+
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
22627
|
+
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
22628
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
22629
|
+
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
22630
22630
|
this.searchInputValue = null;
|
|
22631
22631
|
this.geolocationError = false;
|
|
22632
22632
|
/**
|
|
@@ -22645,10 +22645,6 @@ const SallaMap = class {
|
|
|
22645
22645
|
* Sets the search bar visibility.
|
|
22646
22646
|
*/
|
|
22647
22647
|
this.searchable = false;
|
|
22648
|
-
/**
|
|
22649
|
-
* Sets google api key value
|
|
22650
|
-
*/
|
|
22651
|
-
this.apiKey = null;
|
|
22652
22648
|
/**
|
|
22653
22649
|
* Modal Title
|
|
22654
22650
|
*/
|
|
@@ -22664,9 +22660,10 @@ const SallaMap = class {
|
|
|
22664
22660
|
salla.lang.onLoaded(() => {
|
|
22665
22661
|
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
22666
22662
|
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
22667
|
-
this.locateButtonTitle = salla.lang.get('pages.
|
|
22663
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
22668
22664
|
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
22669
22665
|
});
|
|
22666
|
+
this.apiKey = 'AIzaSyBPhPJ4KG13ywvmeAovLRnbi7WzlsdcWKs';
|
|
22670
22667
|
}
|
|
22671
22668
|
formatAddress(address) {
|
|
22672
22669
|
return address.length > 25 ? address.substring(0, 25) + '...' : address;
|
|
@@ -22692,7 +22689,10 @@ const SallaMap = class {
|
|
|
22692
22689
|
center: (this.lat || this.lng) ? {
|
|
22693
22690
|
lat: this.lat,
|
|
22694
22691
|
lng: this.lng,
|
|
22695
|
-
} :
|
|
22692
|
+
} : {
|
|
22693
|
+
lat: this.defaultLat,
|
|
22694
|
+
lng: this.defaultLng,
|
|
22695
|
+
},
|
|
22696
22696
|
zoom: this.zoom,
|
|
22697
22697
|
zoomControl: true,
|
|
22698
22698
|
mapTypeControl: false,
|
|
@@ -23473,7 +23473,6 @@ const SallaProductOptions = class {
|
|
|
23473
23473
|
//@ts-ignore
|
|
23474
23474
|
fileOption(option) {
|
|
23475
23475
|
let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);
|
|
23476
|
-
console.log(option.name, types);
|
|
23477
23476
|
return types.length
|
|
23478
23477
|
? this.fileUploader(option, { accept: types.join(',') })
|
|
23479
23478
|
: 'File types not selected.';
|
|
@@ -26806,16 +26805,21 @@ const SallaUserMenu = class {
|
|
|
26806
26805
|
? index.h("span", { class: "s-user-menu-dropdown-item-badge" }, this.badges[item[0]])
|
|
26807
26806
|
: ""));
|
|
26808
26807
|
}
|
|
26808
|
+
componentShouldUpdate() {
|
|
26809
|
+
if (!this.opened) {
|
|
26810
|
+
window.removeEventListener('click', this.onClickOutside);
|
|
26811
|
+
}
|
|
26812
|
+
}
|
|
26809
26813
|
render() {
|
|
26810
26814
|
//todo:: reduce class names, they are too long
|
|
26811
26815
|
return (index.h(index.Host, null, this.inline ?
|
|
26812
26816
|
index.h("ul", { class: "s-user-menu-inline" }, Object.entries(this.items).map((item, i) => this.getMenuItem(item, i)))
|
|
26813
26817
|
: index.h("div", { class: { 's-user-menu-wrapper': true, 's-user-menu-relative-dropdown': this.relativeDropdown } }, this.getTheHeader(), index.h("div", { class: { 's-user-menu-toggler': true, 'opened': this.opened } }, index.h("div", { class: "s-user-menu-dropdown", onClick: (e) => e.stopPropagation() }, this.showHeader ? index.h("div", { class: "s-user-menu-dropdown-header" }, index.h("img", { src: this.avatar, alt: `${this.first_name} ${this.last_name}` }), index.h("div", { class: "s-user-menu-dropdown-header-content" }, index.h("span", null, this.hello), index.h("p", null, this.first_name, " ", this.last_name)), index.h("button", { class: "s-user-menu-dropdown-header-close", innerHTML: Cancel, onClick: () => this.opened = false })) : '', index.h("ul", { class: "s-user-menu-dropdown-list" }, Object.entries(this.items).map((item, i) => this.getMenuItem(item, i))))))));
|
|
26814
26818
|
}
|
|
26815
|
-
|
|
26816
|
-
|
|
26817
|
-
|
|
26818
|
-
|
|
26819
|
+
componentDidLoad() {
|
|
26820
|
+
var _a;
|
|
26821
|
+
//make sure to load the avatar if it's lazy, we use it in Y
|
|
26822
|
+
(_a = document.lazyLoadInstance) === null || _a === void 0 ? void 0 : _a.update(this.host.querySelectorAll('.lazy'));
|
|
26819
26823
|
}
|
|
26820
26824
|
get host() { return index.getElement(this); }
|
|
26821
26825
|
};
|
|
@@ -147,7 +147,7 @@ export class SallaColorPicker {
|
|
|
147
147
|
}
|
|
148
148
|
render() {
|
|
149
149
|
return (h(Host, { class: "s-color-picker-main" },
|
|
150
|
-
h("slot",
|
|
150
|
+
h("slot", { name: "widget" },
|
|
151
151
|
h("div", { class: "s-color-picker-widget" },
|
|
152
152
|
h("div", { class: "s-color-picker-widget-canvas", ref: dv => this.canvas = dv }),
|
|
153
153
|
h("span", { innerHTML: ArrowDown }))),
|
|
@@ -14,10 +14,10 @@ export class SallaMap {
|
|
|
14
14
|
this.defaultLat = 21.419421; //Mecca 🕋
|
|
15
15
|
this.defaultLng = 39.82553; //Mecca 🕋
|
|
16
16
|
// state variables
|
|
17
|
-
this.modalActivityTitle = '
|
|
18
|
-
this.confirmButtonTitle = '
|
|
19
|
-
this.locateButtonTitle = '
|
|
20
|
-
this.locateButtonEdit = '
|
|
17
|
+
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
18
|
+
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
19
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
20
|
+
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
21
21
|
this.searchInputValue = null;
|
|
22
22
|
this.geolocationError = false;
|
|
23
23
|
/**
|
|
@@ -36,10 +36,6 @@ export class SallaMap {
|
|
|
36
36
|
* Sets the search bar visibility.
|
|
37
37
|
*/
|
|
38
38
|
this.searchable = false;
|
|
39
|
-
/**
|
|
40
|
-
* Sets google api key value
|
|
41
|
-
*/
|
|
42
|
-
this.apiKey = null;
|
|
43
39
|
/**
|
|
44
40
|
* Modal Title
|
|
45
41
|
*/
|
|
@@ -55,9 +51,10 @@ export class SallaMap {
|
|
|
55
51
|
salla.lang.onLoaded(() => {
|
|
56
52
|
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
57
53
|
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
58
|
-
this.locateButtonTitle = salla.lang.get('pages.
|
|
54
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
59
55
|
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
60
56
|
});
|
|
57
|
+
this.apiKey = 'AIzaSyBPhPJ4KG13ywvmeAovLRnbi7WzlsdcWKs';
|
|
61
58
|
}
|
|
62
59
|
formatAddress(address) {
|
|
63
60
|
return address.length > 25 ? address.substring(0, 25) + '...' : address;
|
|
@@ -83,7 +80,10 @@ export class SallaMap {
|
|
|
83
80
|
center: (this.lat || this.lng) ? {
|
|
84
81
|
lat: this.lat,
|
|
85
82
|
lng: this.lng,
|
|
86
|
-
} :
|
|
83
|
+
} : {
|
|
84
|
+
lat: this.defaultLat,
|
|
85
|
+
lng: this.defaultLng,
|
|
86
|
+
},
|
|
87
87
|
zoom: this.zoom,
|
|
88
88
|
zoomControl: true,
|
|
89
89
|
mapTypeControl: false,
|
|
@@ -376,11 +376,10 @@ export class SallaMap {
|
|
|
376
376
|
"optional": false,
|
|
377
377
|
"docs": {
|
|
378
378
|
"tags": [],
|
|
379
|
-
"text": "Sets google api key value"
|
|
379
|
+
"text": "Sets google api key value, default Merchant key"
|
|
380
380
|
},
|
|
381
381
|
"attribute": "api-key",
|
|
382
|
-
"reflect": false
|
|
383
|
-
"defaultValue": "null"
|
|
382
|
+
"reflect": false
|
|
384
383
|
},
|
|
385
384
|
"modalTitle": {
|
|
386
385
|
"type": "string",
|
|
@@ -125,7 +125,6 @@ export class SallaProductOptions {
|
|
|
125
125
|
//@ts-ignore
|
|
126
126
|
fileOption(option) {
|
|
127
127
|
let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);
|
|
128
|
-
console.log(option.name, types);
|
|
129
128
|
return types.length
|
|
130
129
|
? this.fileUploader(option, { accept: types.join(',') })
|
|
131
130
|
: 'File types not selected.';
|
|
@@ -144,6 +144,11 @@ export class SallaUserMenu {
|
|
|
144
144
|
? h("span", { class: "s-user-menu-dropdown-item-badge" }, this.badges[item[0]])
|
|
145
145
|
: ""));
|
|
146
146
|
}
|
|
147
|
+
componentShouldUpdate() {
|
|
148
|
+
if (!this.opened) {
|
|
149
|
+
window.removeEventListener('click', this.onClickOutside);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
147
152
|
render() {
|
|
148
153
|
//todo:: reduce class names, they are too long
|
|
149
154
|
return (h(Host, null, this.inline ?
|
|
@@ -163,10 +168,10 @@ export class SallaUserMenu {
|
|
|
163
168
|
h("button", { class: "s-user-menu-dropdown-header-close", innerHTML: Cancel, onClick: () => this.opened = false })) : '',
|
|
164
169
|
h("ul", { class: "s-user-menu-dropdown-list" }, Object.entries(this.items).map((item, i) => this.getMenuItem(item, i))))))));
|
|
165
170
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
171
|
+
componentDidLoad() {
|
|
172
|
+
var _a;
|
|
173
|
+
//make sure to load the avatar if it's lazy, we use it in Y
|
|
174
|
+
(_a = document.lazyLoadInstance) === null || _a === void 0 ? void 0 : _a.update(this.host.querySelectorAll('.lazy'));
|
|
170
175
|
}
|
|
171
176
|
static get is() { return "salla-user-menu"; }
|
|
172
177
|
static get originalStyleUrls() { return {
|
|
@@ -1154,7 +1154,7 @@ const SallaColorPicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
1156
|
render() {
|
|
1157
|
-
return (h(Host, { class: "s-color-picker-main" }, h("slot",
|
|
1157
|
+
return (h(Host, { class: "s-color-picker-main" }, h("slot", { name: "widget" }, h("div", { class: "s-color-picker-widget" }, h("div", { class: "s-color-picker-widget-canvas", ref: dv => this.canvas = dv }), h("span", { innerHTML: ArrowDown }))), h("input", { type: "hidden", name: this.name, required: this.required, value: this.color, ref: color => this.colorInput = color })));
|
|
1158
1158
|
}
|
|
1159
1159
|
get host() { return this; }
|
|
1160
1160
|
static get style() { return sallaColorPickerCss; }
|
|
@@ -450,10 +450,10 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
450
450
|
this.defaultLat = 21.419421; //Mecca 🕋
|
|
451
451
|
this.defaultLng = 39.82553; //Mecca 🕋
|
|
452
452
|
// state variables
|
|
453
|
-
this.modalActivityTitle = '
|
|
454
|
-
this.confirmButtonTitle = '
|
|
455
|
-
this.locateButtonTitle = '
|
|
456
|
-
this.locateButtonEdit = '
|
|
453
|
+
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
454
|
+
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
455
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
456
|
+
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
457
457
|
this.searchInputValue = null;
|
|
458
458
|
this.geolocationError = false;
|
|
459
459
|
/**
|
|
@@ -472,10 +472,6 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
472
472
|
* Sets the search bar visibility.
|
|
473
473
|
*/
|
|
474
474
|
this.searchable = false;
|
|
475
|
-
/**
|
|
476
|
-
* Sets google api key value
|
|
477
|
-
*/
|
|
478
|
-
this.apiKey = null;
|
|
479
475
|
/**
|
|
480
476
|
* Modal Title
|
|
481
477
|
*/
|
|
@@ -491,9 +487,10 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
491
487
|
salla.lang.onLoaded(() => {
|
|
492
488
|
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
493
489
|
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
494
|
-
this.locateButtonTitle = salla.lang.get('pages.
|
|
490
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
495
491
|
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
496
492
|
});
|
|
493
|
+
this.apiKey = 'AIzaSyBPhPJ4KG13ywvmeAovLRnbi7WzlsdcWKs';
|
|
497
494
|
}
|
|
498
495
|
formatAddress(address) {
|
|
499
496
|
return address.length > 25 ? address.substring(0, 25) + '...' : address;
|
|
@@ -519,7 +516,10 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
519
516
|
center: (this.lat || this.lng) ? {
|
|
520
517
|
lat: this.lat,
|
|
521
518
|
lng: this.lng,
|
|
522
|
-
} :
|
|
519
|
+
} : {
|
|
520
|
+
lat: this.defaultLat,
|
|
521
|
+
lng: this.defaultLng,
|
|
522
|
+
},
|
|
523
523
|
zoom: this.zoom,
|
|
524
524
|
zoomControl: true,
|
|
525
525
|
mapTypeControl: false,
|
|
@@ -174,7 +174,6 @@ const SallaProductOptions$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
174
174
|
//@ts-ignore
|
|
175
175
|
fileOption(option) {
|
|
176
176
|
let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);
|
|
177
|
-
console.log(option.name, types);
|
|
178
177
|
return types.length
|
|
179
178
|
? this.fileUploader(option, { accept: types.join(',') })
|
|
180
179
|
: 'File types not selected.';
|
|
@@ -159,16 +159,21 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
159
159
|
? h("span", { class: "s-user-menu-dropdown-item-badge" }, this.badges[item[0]])
|
|
160
160
|
: ""));
|
|
161
161
|
}
|
|
162
|
+
componentShouldUpdate() {
|
|
163
|
+
if (!this.opened) {
|
|
164
|
+
window.removeEventListener('click', this.onClickOutside);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
162
167
|
render() {
|
|
163
168
|
//todo:: reduce class names, they are too long
|
|
164
169
|
return (h(Host, null, this.inline ?
|
|
165
170
|
h("ul", { class: "s-user-menu-inline" }, Object.entries(this.items).map((item, i) => this.getMenuItem(item, i)))
|
|
166
171
|
: h("div", { class: { 's-user-menu-wrapper': true, 's-user-menu-relative-dropdown': this.relativeDropdown } }, this.getTheHeader(), h("div", { class: { 's-user-menu-toggler': true, 'opened': this.opened } }, h("div", { class: "s-user-menu-dropdown", onClick: (e) => e.stopPropagation() }, this.showHeader ? h("div", { class: "s-user-menu-dropdown-header" }, h("img", { src: this.avatar, alt: `${this.first_name} ${this.last_name}` }), h("div", { class: "s-user-menu-dropdown-header-content" }, h("span", null, this.hello), h("p", null, this.first_name, " ", this.last_name)), h("button", { class: "s-user-menu-dropdown-header-close", innerHTML: Cancel, onClick: () => this.opened = false })) : '', h("ul", { class: "s-user-menu-dropdown-list" }, Object.entries(this.items).map((item, i) => this.getMenuItem(item, i))))))));
|
|
167
172
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
componentDidLoad() {
|
|
174
|
+
var _a;
|
|
175
|
+
//make sure to load the avatar if it's lazy, we use it in Y
|
|
176
|
+
(_a = document.lazyLoadInstance) === null || _a === void 0 ? void 0 : _a.update(this.host.querySelectorAll('.lazy'));
|
|
172
177
|
}
|
|
173
178
|
get host() { return this; }
|
|
174
179
|
static get style() { return sallaUserMenuCss; }
|
|
@@ -2656,7 +2656,7 @@ const SallaColorPicker = class {
|
|
|
2656
2656
|
});
|
|
2657
2657
|
}
|
|
2658
2658
|
render() {
|
|
2659
|
-
return (h(Host, { class: "s-color-picker-main" }, h("slot",
|
|
2659
|
+
return (h(Host, { class: "s-color-picker-main" }, h("slot", { name: "widget" }, h("div", { class: "s-color-picker-widget" }, h("div", { class: "s-color-picker-widget-canvas", ref: dv => this.canvas = dv }), h("span", { innerHTML: ArrowDown }))), h("input", { type: "hidden", name: this.name, required: this.required, value: this.color, ref: color => this.colorInput = color })));
|
|
2660
2660
|
}
|
|
2661
2661
|
get host() { return getElement(this); }
|
|
2662
2662
|
};
|
|
@@ -22619,10 +22619,10 @@ const SallaMap = class {
|
|
|
22619
22619
|
this.defaultLat = 21.419421; //Mecca 🕋
|
|
22620
22620
|
this.defaultLng = 39.82553; //Mecca 🕋
|
|
22621
22621
|
// state variables
|
|
22622
|
-
this.modalActivityTitle = '
|
|
22623
|
-
this.confirmButtonTitle = '
|
|
22624
|
-
this.locateButtonTitle = '
|
|
22625
|
-
this.locateButtonEdit = '
|
|
22622
|
+
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
22623
|
+
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
22624
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
22625
|
+
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
22626
22626
|
this.searchInputValue = null;
|
|
22627
22627
|
this.geolocationError = false;
|
|
22628
22628
|
/**
|
|
@@ -22641,10 +22641,6 @@ const SallaMap = class {
|
|
|
22641
22641
|
* Sets the search bar visibility.
|
|
22642
22642
|
*/
|
|
22643
22643
|
this.searchable = false;
|
|
22644
|
-
/**
|
|
22645
|
-
* Sets google api key value
|
|
22646
|
-
*/
|
|
22647
|
-
this.apiKey = null;
|
|
22648
22644
|
/**
|
|
22649
22645
|
* Modal Title
|
|
22650
22646
|
*/
|
|
@@ -22660,9 +22656,10 @@ const SallaMap = class {
|
|
|
22660
22656
|
salla.lang.onLoaded(() => {
|
|
22661
22657
|
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
22662
22658
|
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
22663
|
-
this.locateButtonTitle = salla.lang.get('pages.
|
|
22659
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
22664
22660
|
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
22665
22661
|
});
|
|
22662
|
+
this.apiKey = 'AIzaSyBPhPJ4KG13ywvmeAovLRnbi7WzlsdcWKs';
|
|
22666
22663
|
}
|
|
22667
22664
|
formatAddress(address) {
|
|
22668
22665
|
return address.length > 25 ? address.substring(0, 25) + '...' : address;
|
|
@@ -22688,7 +22685,10 @@ const SallaMap = class {
|
|
|
22688
22685
|
center: (this.lat || this.lng) ? {
|
|
22689
22686
|
lat: this.lat,
|
|
22690
22687
|
lng: this.lng,
|
|
22691
|
-
} :
|
|
22688
|
+
} : {
|
|
22689
|
+
lat: this.defaultLat,
|
|
22690
|
+
lng: this.defaultLng,
|
|
22691
|
+
},
|
|
22692
22692
|
zoom: this.zoom,
|
|
22693
22693
|
zoomControl: true,
|
|
22694
22694
|
mapTypeControl: false,
|
|
@@ -23469,7 +23469,6 @@ const SallaProductOptions = class {
|
|
|
23469
23469
|
//@ts-ignore
|
|
23470
23470
|
fileOption(option) {
|
|
23471
23471
|
let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);
|
|
23472
|
-
console.log(option.name, types);
|
|
23473
23472
|
return types.length
|
|
23474
23473
|
? this.fileUploader(option, { accept: types.join(',') })
|
|
23475
23474
|
: 'File types not selected.';
|
|
@@ -26802,16 +26801,21 @@ const SallaUserMenu = class {
|
|
|
26802
26801
|
? h("span", { class: "s-user-menu-dropdown-item-badge" }, this.badges[item[0]])
|
|
26803
26802
|
: ""));
|
|
26804
26803
|
}
|
|
26804
|
+
componentShouldUpdate() {
|
|
26805
|
+
if (!this.opened) {
|
|
26806
|
+
window.removeEventListener('click', this.onClickOutside);
|
|
26807
|
+
}
|
|
26808
|
+
}
|
|
26805
26809
|
render() {
|
|
26806
26810
|
//todo:: reduce class names, they are too long
|
|
26807
26811
|
return (h(Host, null, this.inline ?
|
|
26808
26812
|
h("ul", { class: "s-user-menu-inline" }, Object.entries(this.items).map((item, i) => this.getMenuItem(item, i)))
|
|
26809
26813
|
: h("div", { class: { 's-user-menu-wrapper': true, 's-user-menu-relative-dropdown': this.relativeDropdown } }, this.getTheHeader(), h("div", { class: { 's-user-menu-toggler': true, 'opened': this.opened } }, h("div", { class: "s-user-menu-dropdown", onClick: (e) => e.stopPropagation() }, this.showHeader ? h("div", { class: "s-user-menu-dropdown-header" }, h("img", { src: this.avatar, alt: `${this.first_name} ${this.last_name}` }), h("div", { class: "s-user-menu-dropdown-header-content" }, h("span", null, this.hello), h("p", null, this.first_name, " ", this.last_name)), h("button", { class: "s-user-menu-dropdown-header-close", innerHTML: Cancel, onClick: () => this.opened = false })) : '', h("ul", { class: "s-user-menu-dropdown-list" }, Object.entries(this.items).map((item, i) => this.getMenuItem(item, i))))))));
|
|
26810
26814
|
}
|
|
26811
|
-
|
|
26812
|
-
|
|
26813
|
-
|
|
26814
|
-
|
|
26815
|
+
componentDidLoad() {
|
|
26816
|
+
var _a;
|
|
26817
|
+
//make sure to load the avatar if it's lazy, we use it in Y
|
|
26818
|
+
(_a = document.lazyLoadInstance) === null || _a === void 0 ? void 0 : _a.update(this.host.querySelectorAll('.lazy'));
|
|
26815
26819
|
}
|
|
26816
26820
|
get host() { return getElement(this); }
|
|
26817
26821
|
};
|