ngx-wapp-components 3.0.40-alpha.9 → 3.1.0

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.
@@ -982,8 +982,8 @@ var NotificationsEventEnum;
982
982
  var PeriodSelectEnum;
983
983
  (function (PeriodSelectEnum) {
984
984
  PeriodSelectEnum[PeriodSelectEnum["Last24Hours"] = 1] = "Last24Hours";
985
- PeriodSelectEnum[PeriodSelectEnum["Custom"] = 2] = "Custom";
986
- PeriodSelectEnum[PeriodSelectEnum["Last3Months"] = 3] = "Last3Months";
985
+ PeriodSelectEnum[PeriodSelectEnum["Last3Months"] = 2] = "Last3Months";
986
+ PeriodSelectEnum[PeriodSelectEnum["Custom"] = 3] = "Custom";
987
987
  })(PeriodSelectEnum || (PeriodSelectEnum = {}));
988
988
  var CustomColor;
989
989
  (function (CustomColor) {
@@ -4115,6 +4115,7 @@ class WTreeFieldComponent {
4115
4115
  if (!productSectionList)
4116
4116
  return [];
4117
4117
  return productSectionList.map((product) => ({
4118
+ key: `${product[this.getFieldId()]}`,
4118
4119
  label: product.name,
4119
4120
  data: product[this.getFieldId()],
4120
4121
  children: this.itemsToTreeNodeMap(product[this.getEntityInverseParent()])
@@ -4343,7 +4344,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
4343
4344
  args: ['translationsOptions']
4344
4345
  }] } });
4345
4346
 
4346
- const ticketsPeriodSelectType$1 = 'ticketsPeriodSelectType';
4347
4347
  class WPeriodSelectFieldComponent {
4348
4348
  constructor(wLocalStorage, wSessionStorage) {
4349
4349
  this.wLocalStorage = wLocalStorage;
@@ -4360,12 +4360,12 @@ class WPeriodSelectFieldComponent {
4360
4360
  }
4361
4361
  initPeriodCategorySelect() {
4362
4362
  const key24H = PeriodSelectEnum[PeriodSelectEnum.Last24Hours].toLowerCase();
4363
- const keyCustom = PeriodSelectEnum[PeriodSelectEnum.Custom].toLowerCase();
4364
4363
  const key3M = PeriodSelectEnum[PeriodSelectEnum.Last3Months].toLowerCase();
4364
+ const keyCustom = PeriodSelectEnum[PeriodSelectEnum.Custom].toLowerCase();
4365
4365
  this.translationsMap = {
4366
4366
  [PeriodSelectEnum.Last24Hours]: this.translationsObject?.translatedSelectOptions[key24H] || 'Últimas 24 horas',
4367
- [PeriodSelectEnum.Custom]: this.translationsObject?.translatedSelectOptions[keyCustom] || 'Personalizado',
4368
4367
  [PeriodSelectEnum.Last3Months]: this.translationsObject?.translatedSelectOptions[key3M] || 'Últimos 3 meses',
4368
+ [PeriodSelectEnum.Custom]: this.translationsObject?.translatedSelectOptions[keyCustom] || 'Personalizado',
4369
4369
  };
4370
4370
  this.periodCategories = Object.entries(this.translationsMap).map(([key, value]) => ({
4371
4371
  value: Number(key),
@@ -4409,12 +4409,12 @@ class WPeriodSelectFieldComponent {
4409
4409
  this.toDateValue = now;
4410
4410
  }
4411
4411
  else {
4412
- const startYesterday = new Date(now);
4413
- startYesterday.setDate(now.getDate() - 1);
4412
+ const startYesterday = new Date();
4413
+ startYesterday.setDate(new Date().getDate() - 1);
4414
4414
  startYesterday.setHours(0, 0, 0, 0);
4415
4415
  this.fromDateValue = startYesterday;
4416
- const endYesterday = new Date(now);
4417
- endYesterday.setDate(now.getDate() - 1);
4416
+ const endYesterday = new Date();
4417
+ endYesterday.setDate(new Date().getDate() - 1);
4418
4418
  endYesterday.setHours(23, 59, 59, 999);
4419
4419
  this.toDateValue = endYesterday;
4420
4420
  }
@@ -5883,7 +5883,7 @@ class WFilterPanelComponent {
5883
5883
  this.advancedQueryConfig.fields = this.translateFields(this.advancedQueryConfig.fields);
5884
5884
  let rules = Object.keys(this.basicQueryConfig.fields)
5885
5885
  .filter(fieldKey => {
5886
- if (this.filterId == 'tickets' &&
5886
+ if ((this.filterId == 'tickets' || this.filterId == 'last-3-months-tickets') &&
5887
5887
  Object.keys(this.basicQueryConfig.fields).includes('periodSelect')) {
5888
5888
  return fieldKey !== 'todevicedate' && fieldKey !== 'fromdevicedate';
5889
5889
  }
@@ -6193,7 +6193,7 @@ class WFilterPanelComponent {
6193
6193
  return this.fieldsToKeepLocalDate.length == 0 ? false : this.fieldsToKeepLocalDate.includes(field);
6194
6194
  }
6195
6195
  disableFilterButton() {
6196
- if (this.filterId == 'tickets') {
6196
+ if (this.filterId == 'tickets' || this.filterId == 'last-3-months-tickets') {
6197
6197
  return this.periodSelectComponent ? !this.periodSelectComponent.isValid() : false;
6198
6198
  }
6199
6199
  else {