@salla.sa/twilight-components 2.11.13 → 2.11.15

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.
@@ -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", null, 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 })));
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
  };
@@ -21927,7 +21927,7 @@ const SallaLoginModal = class {
21927
21927
  return (index.h("salla-modal", { class: "s-login-modal", "modal-title": this.title, ref: modal => this.modal = modal, width: "xs" }, index.h("span", { slot: 'icon', class: "s-login-modal-header-icon", innerHTML: UserIcon }), index.h("div", { class: "s-login-modal-wrapper" }, this.isEmailAllowed && this.isMobileAllowed ?
21928
21928
  index.h("div", { class: this.generateTabClasses('home'), "data-name": "home", ref: tab => this.homeTab = tab }, index.h("p", { class: "s-login-modal-sub-title" }, salla.lang.get('blocks.header.select_login_way')), index.h("slot", { name: "before-login-type" }), index.h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.mobileTab, evt) }, index.h("span", { class: "s-login-modal-main-btn-icon", innerHTML: PhoneIcon }), index.h("span", { class: "s-login-modal-main-btn-text" }, salla.lang.get('blocks.header.sms')), index.h("span", { class: "s-login-modal-main-btn-arrow", innerHTML: ArrowRightIcon$1 })), index.h("a", { href: "#", class: "s-login-modal-main-btn", onClick: (evt) => this.showTab(this.emailTab, evt) }, index.h("span", { class: "s-login-modal-main-btn-icon", innerHTML: MailIcon }), index.h("span", { class: "s-login-modal-main-btn-text" }, salla.lang.get('common.elements.email')), index.h("span", { class: "s-login-modal-main-btn-arrow", innerHTML: ArrowRightIcon$1 })), index.h("slot", { name: "after-login-type" }))
21929
21929
  : '', this.isMobileAllowed ?
21930
- index.h("div", { class: this.generateTabClasses('login-phone'), "data-name": "login-phone", ref: tab => this.mobileTab = tab }, index.h("slot", { name: "before-login-mobile" }), index.h("form", { onSubmit: () => this.loginBySMS(event), method: "POST" }, index.h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.mobile')), index.h("salla-tel-input", { tabindex: "0", ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e) }), index.h("salla-button", { type: "submit", "loader-position": 'center', width: "wide", ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter'))), this.isEmailAllowed ?
21930
+ index.h("div", { class: this.generateTabClasses('login-phone'), "data-name": "login-phone", ref: tab => this.mobileTab = tab }, index.h("slot", { name: "before-login-mobile" }), index.h("form", { onSubmit: (event) => this.loginBySMS(event), method: "POST" }, index.h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.mobile')), index.h("salla-tel-input", { tabindex: "0", ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e) }), index.h("salla-button", { class: "s-login-modal-enter-button", type: "submit", "loader-position": 'center', width: "wide", ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter'))), this.isEmailAllowed ?
21931
21931
  index.h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, salla.lang.get('blocks.header.login_by_email')) : '', index.h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
21932
21932
  index.h("div", { class: this.generateTabClasses('login-email'), "data-name": "login-email", ref: tab => this.emailTab = tab }, index.h("slot", { name: "before-login-email" }), index.h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.email')), index.h("form", { onSubmit: () => this.loginByEmail(event), method: "POST" }, index.h("input", { type: "email", ref: el => this.loginEmail = el, onKeyDown: e => this.typing(e), placeholder: "your@email.com", enterkeyhint: "next", class: "s-login-modal-input s-ltr" }), index.h("span", { class: "s-login-modal-error-message" }), index.h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginByEmail(), ref: b => this.emailBtn = b }, salla.lang.get('blocks.header.enter'))), this.isMobileAllowed ?
21933
21933
  index.h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, salla.lang.get('blocks.header.login_by_sms'))
@@ -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 = 'Activity Location';
22627
- this.confirmButtonTitle = 'Confirm';
22628
- this.locateButtonTitle = 'Locate';
22629
- this.locateButtonEdit = 'Edit';
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,10 +22660,12 @@ 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.checkout.confirm_address');
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
  }
22668
+ ;
22671
22669
  formatAddress(address) {
22672
22670
  return address.length > 25 ? address.substring(0, 25) + '...' : address;
22673
22671
  }
@@ -22692,7 +22690,10 @@ const SallaMap = class {
22692
22690
  center: (this.lat || this.lng) ? {
22693
22691
  lat: this.lat,
22694
22692
  lng: this.lng,
22695
- } : null,
22693
+ } : {
22694
+ lat: this.defaultLat,
22695
+ lng: this.defaultLng,
22696
+ },
22696
22697
  zoom: this.zoom,
22697
22698
  zoomControl: true,
22698
22699
  mapTypeControl: false,
@@ -23473,7 +23474,6 @@ const SallaProductOptions = class {
23473
23474
  //@ts-ignore
23474
23475
  fileOption(option) {
23475
23476
  let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);
23476
- console.log(option.name, types);
23477
23477
  return types.length
23478
23478
  ? this.fileUploader(option, { accept: types.join(',') })
23479
23479
  : 'File types not selected.';
@@ -24894,7 +24894,7 @@ const SallaSwiper = class {
24894
24894
  : '', this.showControls ?
24895
24895
  index.h("div", { class: "s-slider-block__title-nav", dir: "rtl" }, index.h("button", { "aria-label": "Previous Slide", class: "s-slider-prev s-slider-nav-arrow" }, index.h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowRightIcon$1 : ArrowLeftIcon })), index.h("button", { "aria-label": "Next Slide", class: "s-slider-next s-slider-nav-arrow" }, index.h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowLeftIcon : ArrowRightIcon$1 })))
24896
24896
  : ''))
24897
- : '', index.h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el }, index.h("slot", null), index.h("div", { class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, index.h("slot", { name: 'items' })), this.pagination ? index.h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' ? index.h("div", { class: "s-slider-thumbs" }, index.h("div", { class: "swiper s-slider-thumbs-container", ref: el => this.thumbsSliderContainer = el }, index.h("div", { class: "s-slider-swiper-wrapper swiper-wrapper", ref: el => this.thumbsSliderWrapper = el }, index.h("slot", { name: "thumbs" })), this.showThumbsControls ?
24897
+ : '', index.h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : '' }, index.h("slot", null), index.h("div", { class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, index.h("slot", { name: 'items' })), this.pagination ? index.h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' ? index.h("div", { class: "s-slider-thumbs" }, index.h("div", { class: "swiper s-slider-thumbs-container", dir: this.verticalThumbs ? "ltr" : '', ref: el => this.thumbsSliderContainer = el }, index.h("div", { class: "s-slider-swiper-wrapper swiper-wrapper", ref: el => this.thumbsSliderWrapper = el }, index.h("slot", { name: "thumbs" })), this.showThumbsControls ?
24898
24898
  index.h("div", { class: "s-slider-thumbs-nav", dir: "rtl" }, index.h("button", { "aria-label": "Previous Slide", class: "s-slider-thumbs-prev s-slider-nav-arrow" }, index.h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowRightIcon$1 : ArrowLeftIcon })), index.h("button", { "aria-label": "Next Slide", class: "s-slider-thumbs-next s-slider-nav-arrow" }, index.h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowLeftIcon : ArrowRightIcon$1 })))
24899
24899
  : '')) : ''));
24900
24900
  }
@@ -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", null,
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 }))),
@@ -268,10 +268,10 @@ export class SallaLoginModal {
268
268
  this.isMobileAllowed ?
269
269
  h("div", { class: this.generateTabClasses('login-phone'), "data-name": "login-phone", ref: tab => this.mobileTab = tab },
270
270
  h("slot", { name: "before-login-mobile" }),
271
- h("form", { onSubmit: () => this.loginBySMS(event), method: "POST" },
271
+ h("form", { onSubmit: (event) => this.loginBySMS(event), method: "POST" },
272
272
  h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.mobile')),
273
273
  h("salla-tel-input", { tabindex: "0", ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e) }),
274
- h("salla-button", { type: "submit", "loader-position": 'center', width: "wide", ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter'))),
274
+ h("salla-button", { class: "s-login-modal-enter-button", type: "submit", "loader-position": 'center', width: "wide", ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter'))),
275
275
  this.isEmailAllowed ?
276
276
  h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, salla.lang.get('blocks.header.login_by_email')) : '',
277
277
  h("slot", { name: "after-login-mobile" })) : '',
@@ -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 = 'Activity Location';
18
- this.confirmButtonTitle = 'Confirm';
19
- this.locateButtonTitle = 'Locate';
20
- this.locateButtonEdit = 'Edit';
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,10 +51,12 @@ 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.checkout.confirm_address');
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
  }
59
+ ;
62
60
  formatAddress(address) {
63
61
  return address.length > 25 ? address.substring(0, 25) + '...' : address;
64
62
  }
@@ -83,7 +81,10 @@ export class SallaMap {
83
81
  center: (this.lat || this.lng) ? {
84
82
  lat: this.lat,
85
83
  lng: this.lng,
86
- } : null,
84
+ } : {
85
+ lat: this.defaultLat,
86
+ lng: this.defaultLng,
87
+ },
87
88
  zoom: this.zoom,
88
89
  zoomControl: true,
89
90
  mapTypeControl: false,
@@ -376,11 +377,10 @@ export class SallaMap {
376
377
  "optional": false,
377
378
  "docs": {
378
379
  "tags": [],
379
- "text": "Sets google api key value"
380
+ "text": "Sets google api key value, default Merchant key"
380
381
  },
381
382
  "attribute": "api-key",
382
- "reflect": false,
383
- "defaultValue": "null"
383
+ "reflect": false
384
384
  },
385
385
  "modalTitle": {
386
386
  "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.';
@@ -436,13 +436,13 @@ export class SallaSwiper {
436
436
  h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowLeftIcon : ArrowRightIcon })))
437
437
  : ''))
438
438
  : '',
439
- h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el },
439
+ h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : '' },
440
440
  h("slot", null),
441
441
  h("div", { class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el },
442
442
  h("slot", { name: 'items' })),
443
443
  this.pagination ? h("div", { class: "swiper-pagination" }) : ''),
444
444
  this.type == 'thumbs' ? h("div", { class: "s-slider-thumbs" },
445
- h("div", { class: "swiper s-slider-thumbs-container", ref: el => this.thumbsSliderContainer = el },
445
+ h("div", { class: "swiper s-slider-thumbs-container", dir: this.verticalThumbs ? "ltr" : '', ref: el => this.thumbsSliderContainer = el },
446
446
  h("div", { class: "s-slider-swiper-wrapper swiper-wrapper", ref: el => this.thumbsSliderWrapper = el },
447
447
  h("slot", { name: "thumbs" })),
448
448
  this.showThumbsControls ?
@@ -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", null, 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 })));
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; }
@@ -275,7 +275,7 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
275
275
  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 ?
276
276
  h("div", { class: this.generateTabClasses('home'), "data-name": "home", ref: tab => this.homeTab = tab }, h("p", { class: "s-login-modal-sub-title" }, salla.lang.get('blocks.header.select_login_way')), 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" }, salla.lang.get('blocks.header.sms')), 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" }, salla.lang.get('common.elements.email')), h("span", { class: "s-login-modal-main-btn-arrow", innerHTML: KeyboardArrowRightIcon })), h("slot", { name: "after-login-type" }))
277
277
  : '', this.isMobileAllowed ?
278
- h("div", { class: this.generateTabClasses('login-phone'), "data-name": "login-phone", ref: tab => this.mobileTab = tab }, h("slot", { name: "before-login-mobile" }), h("form", { onSubmit: () => this.loginBySMS(event), method: "POST" }, h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.mobile')), h("salla-tel-input", { tabindex: "0", ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e) }), h("salla-button", { type: "submit", "loader-position": 'center', width: "wide", ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter'))), this.isEmailAllowed ?
278
+ h("div", { class: this.generateTabClasses('login-phone'), "data-name": "login-phone", ref: tab => this.mobileTab = tab }, h("slot", { name: "before-login-mobile" }), h("form", { onSubmit: (event) => this.loginBySMS(event), method: "POST" }, h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.mobile')), h("salla-tel-input", { tabindex: "0", ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e) }), h("salla-button", { class: "s-login-modal-enter-button", type: "submit", "loader-position": 'center', width: "wide", ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter'))), this.isEmailAllowed ?
279
279
  h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, salla.lang.get('blocks.header.login_by_email')) : '', h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
280
280
  h("div", { class: this.generateTabClasses('login-email'), "data-name": "login-email", ref: tab => this.emailTab = tab }, h("slot", { name: "before-login-email" }), h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.email')), h("form", { onSubmit: () => this.loginByEmail(event), method: "POST" }, h("input", { type: "email", ref: el => this.loginEmail = el, onKeyDown: e => this.typing(e), placeholder: "your@email.com", enterkeyhint: "next", 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 ?
281
281
  h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, salla.lang.get('blocks.header.login_by_sms'))
@@ -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 = 'Activity Location';
454
- this.confirmButtonTitle = 'Confirm';
455
- this.locateButtonTitle = 'Locate';
456
- this.locateButtonEdit = 'Edit';
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,10 +487,12 @@ 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.checkout.confirm_address');
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
  }
495
+ ;
498
496
  formatAddress(address) {
499
497
  return address.length > 25 ? address.substring(0, 25) + '...' : address;
500
498
  }
@@ -519,7 +517,10 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
519
517
  center: (this.lat || this.lng) ? {
520
518
  lat: this.lat,
521
519
  lng: this.lng,
522
- } : null,
520
+ } : {
521
+ lat: this.defaultLat,
522
+ lng: this.defaultLng,
523
+ },
523
524
  zoom: this.zoom,
524
525
  zoomControl: true,
525
526
  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.';
@@ -446,7 +446,7 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
446
446
  : '', this.showControls ?
447
447
  h("div", { class: "s-slider-block__title-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? KeyboardArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowLeftIcon : KeyboardArrowRightIcon })))
448
448
  : ''))
449
- : '', h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el }, h("slot", null), h("div", { class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, h("slot", { name: 'items' })), this.pagination ? h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' ? h("div", { class: "s-slider-thumbs" }, h("div", { class: "swiper s-slider-thumbs-container", ref: el => this.thumbsSliderContainer = el }, h("div", { class: "s-slider-swiper-wrapper swiper-wrapper", ref: el => this.thumbsSliderWrapper = el }, h("slot", { name: "thumbs" })), this.showThumbsControls ?
449
+ : '', h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : '' }, h("slot", null), h("div", { class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, h("slot", { name: 'items' })), this.pagination ? h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' ? h("div", { class: "s-slider-thumbs" }, h("div", { class: "swiper s-slider-thumbs-container", dir: this.verticalThumbs ? "ltr" : '', ref: el => this.thumbsSliderContainer = el }, h("div", { class: "s-slider-swiper-wrapper swiper-wrapper", ref: el => this.thumbsSliderWrapper = el }, h("slot", { name: "thumbs" })), this.showThumbsControls ?
450
450
  h("div", { class: "s-slider-thumbs-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-thumbs-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? KeyboardArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-thumbs-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowLeftIcon : KeyboardArrowRightIcon })))
451
451
  : '')) : ''));
452
452
  }
@@ -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", null, 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 })));
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
  };
@@ -21923,7 +21923,7 @@ const SallaLoginModal = class {
21923
21923
  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 ?
21924
21924
  h("div", { class: this.generateTabClasses('home'), "data-name": "home", ref: tab => this.homeTab = tab }, h("p", { class: "s-login-modal-sub-title" }, salla.lang.get('blocks.header.select_login_way')), 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" }, salla.lang.get('blocks.header.sms')), h("span", { class: "s-login-modal-main-btn-arrow", innerHTML: ArrowRightIcon$1 })), 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: MailIcon }), h("span", { class: "s-login-modal-main-btn-text" }, salla.lang.get('common.elements.email')), h("span", { class: "s-login-modal-main-btn-arrow", innerHTML: ArrowRightIcon$1 })), h("slot", { name: "after-login-type" }))
21925
21925
  : '', this.isMobileAllowed ?
21926
- h("div", { class: this.generateTabClasses('login-phone'), "data-name": "login-phone", ref: tab => this.mobileTab = tab }, h("slot", { name: "before-login-mobile" }), h("form", { onSubmit: () => this.loginBySMS(event), method: "POST" }, h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.mobile')), h("salla-tel-input", { tabindex: "0", ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e) }), h("salla-button", { type: "submit", "loader-position": 'center', width: "wide", ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter'))), this.isEmailAllowed ?
21926
+ h("div", { class: this.generateTabClasses('login-phone'), "data-name": "login-phone", ref: tab => this.mobileTab = tab }, h("slot", { name: "before-login-mobile" }), h("form", { onSubmit: (event) => this.loginBySMS(event), method: "POST" }, h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.mobile')), h("salla-tel-input", { tabindex: "0", ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e) }), h("salla-button", { class: "s-login-modal-enter-button", type: "submit", "loader-position": 'center', width: "wide", ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter'))), this.isEmailAllowed ?
21927
21927
  h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, salla.lang.get('blocks.header.login_by_email')) : '', h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
21928
21928
  h("div", { class: this.generateTabClasses('login-email'), "data-name": "login-email", ref: tab => this.emailTab = tab }, h("slot", { name: "before-login-email" }), h("label", { class: "s-login-modal-label" }, salla.lang.get('common.elements.email')), h("form", { onSubmit: () => this.loginByEmail(event), method: "POST" }, h("input", { type: "email", ref: el => this.loginEmail = el, onKeyDown: e => this.typing(e), placeholder: "your@email.com", enterkeyhint: "next", 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 ?
21929
21929
  h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, salla.lang.get('blocks.header.login_by_sms'))
@@ -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 = 'Activity Location';
22623
- this.confirmButtonTitle = 'Confirm';
22624
- this.locateButtonTitle = 'Locate';
22625
- this.locateButtonEdit = 'Edit';
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,10 +22656,12 @@ 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.checkout.confirm_address');
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
  }
22664
+ ;
22667
22665
  formatAddress(address) {
22668
22666
  return address.length > 25 ? address.substring(0, 25) + '...' : address;
22669
22667
  }
@@ -22688,7 +22686,10 @@ const SallaMap = class {
22688
22686
  center: (this.lat || this.lng) ? {
22689
22687
  lat: this.lat,
22690
22688
  lng: this.lng,
22691
- } : null,
22689
+ } : {
22690
+ lat: this.defaultLat,
22691
+ lng: this.defaultLng,
22692
+ },
22692
22693
  zoom: this.zoom,
22693
22694
  zoomControl: true,
22694
22695
  mapTypeControl: false,
@@ -23469,7 +23470,6 @@ const SallaProductOptions = class {
23469
23470
  //@ts-ignore
23470
23471
  fileOption(option) {
23471
23472
  let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);
23472
- console.log(option.name, types);
23473
23473
  return types.length
23474
23474
  ? this.fileUploader(option, { accept: types.join(',') })
23475
23475
  : 'File types not selected.';
@@ -24890,7 +24890,7 @@ const SallaSwiper = class {
24890
24890
  : '', this.showControls ?
24891
24891
  h("div", { class: "s-slider-block__title-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowRightIcon$1 : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowLeftIcon : ArrowRightIcon$1 })))
24892
24892
  : ''))
24893
- : '', h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el }, h("slot", null), h("div", { class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, h("slot", { name: 'items' })), this.pagination ? h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' ? h("div", { class: "s-slider-thumbs" }, h("div", { class: "swiper s-slider-thumbs-container", ref: el => this.thumbsSliderContainer = el }, h("div", { class: "s-slider-swiper-wrapper swiper-wrapper", ref: el => this.thumbsSliderWrapper = el }, h("slot", { name: "thumbs" })), this.showThumbsControls ?
24893
+ : '', h("div", { class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : '' }, h("slot", null), h("div", { class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, h("slot", { name: 'items' })), this.pagination ? h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' ? h("div", { class: "s-slider-thumbs" }, h("div", { class: "swiper s-slider-thumbs-container", dir: this.verticalThumbs ? "ltr" : '', ref: el => this.thumbsSliderContainer = el }, h("div", { class: "s-slider-swiper-wrapper swiper-wrapper", ref: el => this.thumbsSliderWrapper = el }, h("slot", { name: "thumbs" })), this.showThumbsControls ?
24894
24894
  h("div", { class: "s-slider-thumbs-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-thumbs-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowRightIcon$1 : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-thumbs-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.isRTL ? ArrowLeftIcon : ArrowRightIcon$1 })))
24895
24895
  : '')) : ''));
24896
24896
  }