@salla.sa/twilight-components 2.11.24 → 2.11.25

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.
@@ -20853,6 +20853,7 @@ const SallaFileUpload = class {
20853
20853
  }
20854
20854
  getLabel() {
20855
20855
  if (this.labelIdle) {
20856
+ //some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
20856
20857
  return this.labelIdle
20857
20858
  .replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))
20858
20859
  .replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));
@@ -24814,7 +24815,7 @@ const SallaSwiper = class {
24814
24815
  releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true
24815
24816
  },
24816
24817
  pre_defined_config = Object.assign(Object.assign({}, pre_defined_config), (this.pre_defined_config[this.type] || {}));
24817
- if (this.type == 'thumbs') {
24818
+ if (this.type == 'thumbs' && this.thumbsSliderWrapper) {
24818
24819
  for (const slide of this.thumbsSliderWrapper.children) {
24819
24820
  //todo:: use `s-slider-slide`
24820
24821
  slide.classList.add('swiper-slide');
@@ -186,6 +186,7 @@ export class SallaFileUpload {
186
186
  }
187
187
  getLabel() {
188
188
  if (this.labelIdle) {
189
+ //some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
189
190
  return this.labelIdle
190
191
  .replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))
191
192
  .replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));
@@ -345,7 +345,7 @@ export class SallaSwiper {
345
345
  releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true
346
346
  },
347
347
  pre_defined_config = Object.assign(Object.assign({}, pre_defined_config), (this.pre_defined_config[this.type] || {}));
348
- if (this.type == 'thumbs') {
348
+ if (this.type == 'thumbs' && this.thumbsSliderWrapper) {
349
349
  for (const slide of this.thumbsSliderWrapper.children) {
350
350
  //todo:: use `s-slider-slide`
351
351
  slide.classList.add('swiper-slide');
@@ -15287,6 +15287,7 @@ const SallaFileUpload = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
15287
15287
  }
15288
15288
  getLabel() {
15289
15289
  if (this.labelIdle) {
15290
+ //some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
15290
15291
  return this.labelIdle
15291
15292
  .replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))
15292
15293
  .replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));
@@ -367,7 +367,7 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
367
367
  releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true
368
368
  },
369
369
  pre_defined_config = Object.assign(Object.assign({}, pre_defined_config), (this.pre_defined_config[this.type] || {}));
370
- if (this.type == 'thumbs') {
370
+ if (this.type == 'thumbs' && this.thumbsSliderWrapper) {
371
371
  for (const slide of this.thumbsSliderWrapper.children) {
372
372
  //todo:: use `s-slider-slide`
373
373
  slide.classList.add('swiper-slide');
@@ -20849,6 +20849,7 @@ const SallaFileUpload = class {
20849
20849
  }
20850
20850
  getLabel() {
20851
20851
  if (this.labelIdle) {
20852
+ //some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
20852
20853
  return this.labelIdle
20853
20854
  .replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))
20854
20855
  .replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));
@@ -24810,7 +24811,7 @@ const SallaSwiper = class {
24810
24811
  releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true
24811
24812
  },
24812
24813
  pre_defined_config = Object.assign(Object.assign({}, pre_defined_config), (this.pre_defined_config[this.type] || {}));
24813
- if (this.type == 'thumbs') {
24814
+ if (this.type == 'thumbs' && this.thumbsSliderWrapper) {
24814
24815
  for (const slide of this.thumbsSliderWrapper.children) {
24815
24816
  //todo:: use `s-slider-slide`
24816
24817
  slide.classList.add('swiper-slide');