@everymatrix/prod-mm-verification-report 1.1.40 → 1.1.44

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/component-lib.js CHANGED
@@ -25593,22 +25593,22 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
25593
25593
  this.elementRef = elementRef;
25594
25594
  this.shadowDomStyleInjectorService = shadowDomStyleInjectorService;
25595
25595
  this.dateControl.valueChanges.subscribe((dates) => {
25596
- if (!dates || !dates[0] || !dates[1] && this.requireEndDate) {
25597
- return;
25598
- }
25599
- if (this.manualDateChange) {
25600
- this.currentAlias = TimePeriod.Custom;
25601
- this.manualDateChange = false;
25602
- }
25596
+ const start = Array.isArray(dates) && this.isDateValid(dates[0]);
25597
+ const end = Array.isArray(dates) && this.isDateValid(dates[1]);
25598
+ const parsed = [];
25599
+ if (start)
25600
+ parsed.push(dates[0]);
25601
+ if (start && end)
25602
+ parsed.push(dates[1]);
25603
25603
  const rangeValue = {
25604
25604
  alias: this.currentAlias ?? "custom",
25605
25605
  start: dates?.[0] ?? null,
25606
25606
  end: dates?.[1] ?? null
25607
25607
  };
25608
- this.inputValue = this.formatDateRange(dates ?? []);
25609
- this.onChangeFn(rangeValue);
25608
+ this.inputValue = this.formatDateRange(parsed);
25609
+ this.onChangeFn(parsed.length ? rangeValue : null);
25610
25610
  this.elementRef.nativeElement.dispatchEvent(new CustomEvent("dm-range-date-picker-changed", {
25611
- detail: rangeValue,
25611
+ detail: parsed.length ? rangeValue : null,
25612
25612
  bubbles: true,
25613
25613
  composed: true
25614
25614
  }));
@@ -25656,19 +25656,23 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
25656
25656
  return this.requireEndDate ? endDateRequired(control) : null;
25657
25657
  }
25658
25658
  writeValue(value) {
25659
- if (!value || typeof value !== "object" || !("alias" in value) || value.alias == "custom" && (!value.start || !value.end && this.requireEndDate)) {
25659
+ if (!value || typeof value !== "object" || !("alias" in value) || !value.alias) {
25660
25660
  this.inputValue = "";
25661
- this._initialValue = null;
25662
25661
  this.dateControl.setValue(null, { emitEvent: false });
25663
25662
  return;
25664
25663
  }
25665
- this._initialValue = value;
25666
25664
  if (value.alias !== "custom") {
25667
25665
  this.onListSelect(value.alias);
25668
25666
  } else {
25669
- this.currentAlias = TimePeriod.Custom;
25670
- const parsed = [new Date(value.start), new Date(value.end)];
25671
- this.dateControl.setValue(parsed, { emitEvent: false });
25667
+ const start = this.isDateValid(value.start);
25668
+ const end = this.isDateValid(value.end);
25669
+ const parsed = [];
25670
+ if (start)
25671
+ parsed.push(value.start);
25672
+ if (start && end)
25673
+ parsed.push(value.end);
25674
+ this.currentAlias = parsed.length ? TimePeriod.Custom : null;
25675
+ this.dateControl.setValue(parsed.length ? parsed : null, { emitEvent: false });
25672
25676
  this.inputValue = this.formatDateRange(parsed);
25673
25677
  }
25674
25678
  }
@@ -25679,7 +25683,6 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
25679
25683
  this.onTouchedFn = fn;
25680
25684
  }
25681
25685
  dateSelection() {
25682
- this.manualDateChange = true;
25683
25686
  const range = this.dateControl.value;
25684
25687
  if (!this.showTimePicker && range && Array.isArray(range) && range.length === 2 && range[1] && (0, import_moment.default)(range[1]).isValid()) {
25685
25688
  const endDate = new Date(range[1]);
@@ -25687,22 +25690,22 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
25687
25690
  this.dateControl.setValue([range[0], endDate]);
25688
25691
  }
25689
25692
  this.inputValue = this.formatDateRange(this.dateControl.value);
25693
+ this.currentAlias = TimePeriod.Custom;
25690
25694
  }
25691
25695
  onListSelect(key) {
25692
- this.currentAlias = key;
25696
+ this.currentAlias = null;
25693
25697
  const alias = DATE_HINTS.find((item) => item.dateAlias === key);
25694
25698
  if (alias) {
25699
+ this.currentAlias = key;
25695
25700
  const dates = [alias.interval.start, alias.interval.end];
25696
25701
  this.dateControl.setValue(dates);
25697
- this._initialValue = {
25698
- alias: key,
25699
- start: alias.interval.start,
25700
- end: alias.interval.end
25701
- };
25702
25702
  }
25703
25703
  }
25704
+ isDateValid(date) {
25705
+ return !!date && (0, import_moment.default)(date).isValid();
25706
+ }
25704
25707
  formatDate(date) {
25705
- if (!date || !(0, import_moment.default)(date).isValid()) {
25708
+ if (!this.isDateValid(date)) {
25706
25709
  return "";
25707
25710
  }
25708
25711
  return (0, import_moment.default)(date).format("DD/MM/YYYY");
@@ -25761,7 +25764,6 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
25761
25764
  this.dateControl.markAsTouched();
25762
25765
  this.dateControl.markAsDirty();
25763
25766
  this.inputValue = "";
25764
- this._initialValue = null;
25765
25767
  this.currentAlias = null;
25766
25768
  if (this.control) {
25767
25769
  this.control.reset();
@@ -42164,7 +42166,7 @@ var VerificationService = class _VerificationService {
42164
42166
  });
42165
42167
  }
42166
42168
  getLookups() {
42167
- const url = this.apiHandlerService.getACSBaseUrl("rep_mm_report_params_lookup_bq", "ce");
42169
+ const url = this.apiHandlerService.getACSBaseUrl("rep_mm_report_params_lookup", "ubo");
42168
42170
  const body = {
42169
42171
  p_report_params: {
42170
42172
  p_domains: [
package/main.js CHANGED
@@ -23209,22 +23209,22 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
23209
23209
  this.elementRef = elementRef;
23210
23210
  this.shadowDomStyleInjectorService = shadowDomStyleInjectorService;
23211
23211
  this.dateControl.valueChanges.subscribe((dates) => {
23212
- if (!dates || !dates[0] || !dates[1] && this.requireEndDate) {
23213
- return;
23214
- }
23215
- if (this.manualDateChange) {
23216
- this.currentAlias = TimePeriod.Custom;
23217
- this.manualDateChange = false;
23218
- }
23212
+ const start = Array.isArray(dates) && this.isDateValid(dates[0]);
23213
+ const end = Array.isArray(dates) && this.isDateValid(dates[1]);
23214
+ const parsed = [];
23215
+ if (start)
23216
+ parsed.push(dates[0]);
23217
+ if (start && end)
23218
+ parsed.push(dates[1]);
23219
23219
  const rangeValue = {
23220
23220
  alias: this.currentAlias ?? "custom",
23221
23221
  start: dates?.[0] ?? null,
23222
23222
  end: dates?.[1] ?? null
23223
23223
  };
23224
- this.inputValue = this.formatDateRange(dates ?? []);
23225
- this.onChangeFn(rangeValue);
23224
+ this.inputValue = this.formatDateRange(parsed);
23225
+ this.onChangeFn(parsed.length ? rangeValue : null);
23226
23226
  this.elementRef.nativeElement.dispatchEvent(new CustomEvent("dm-range-date-picker-changed", {
23227
- detail: rangeValue,
23227
+ detail: parsed.length ? rangeValue : null,
23228
23228
  bubbles: true,
23229
23229
  composed: true
23230
23230
  }));
@@ -23272,19 +23272,23 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
23272
23272
  return this.requireEndDate ? endDateRequired(control) : null;
23273
23273
  }
23274
23274
  writeValue(value) {
23275
- if (!value || typeof value !== "object" || !("alias" in value) || value.alias == "custom" && (!value.start || !value.end && this.requireEndDate)) {
23275
+ if (!value || typeof value !== "object" || !("alias" in value) || !value.alias) {
23276
23276
  this.inputValue = "";
23277
- this._initialValue = null;
23278
23277
  this.dateControl.setValue(null, { emitEvent: false });
23279
23278
  return;
23280
23279
  }
23281
- this._initialValue = value;
23282
23280
  if (value.alias !== "custom") {
23283
23281
  this.onListSelect(value.alias);
23284
23282
  } else {
23285
- this.currentAlias = TimePeriod.Custom;
23286
- const parsed = [new Date(value.start), new Date(value.end)];
23287
- this.dateControl.setValue(parsed, { emitEvent: false });
23283
+ const start = this.isDateValid(value.start);
23284
+ const end = this.isDateValid(value.end);
23285
+ const parsed = [];
23286
+ if (start)
23287
+ parsed.push(value.start);
23288
+ if (start && end)
23289
+ parsed.push(value.end);
23290
+ this.currentAlias = parsed.length ? TimePeriod.Custom : null;
23291
+ this.dateControl.setValue(parsed.length ? parsed : null, { emitEvent: false });
23288
23292
  this.inputValue = this.formatDateRange(parsed);
23289
23293
  }
23290
23294
  }
@@ -23295,7 +23299,6 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
23295
23299
  this.onTouchedFn = fn;
23296
23300
  }
23297
23301
  dateSelection() {
23298
- this.manualDateChange = true;
23299
23302
  const range = this.dateControl.value;
23300
23303
  if (!this.showTimePicker && range && Array.isArray(range) && range.length === 2 && range[1] && (0, import_moment.default)(range[1]).isValid()) {
23301
23304
  const endDate = new Date(range[1]);
@@ -23303,22 +23306,22 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
23303
23306
  this.dateControl.setValue([range[0], endDate]);
23304
23307
  }
23305
23308
  this.inputValue = this.formatDateRange(this.dateControl.value);
23309
+ this.currentAlias = TimePeriod.Custom;
23306
23310
  }
23307
23311
  onListSelect(key) {
23308
- this.currentAlias = key;
23312
+ this.currentAlias = null;
23309
23313
  const alias = DATE_HINTS.find((item) => item.dateAlias === key);
23310
23314
  if (alias) {
23315
+ this.currentAlias = key;
23311
23316
  const dates = [alias.interval.start, alias.interval.end];
23312
23317
  this.dateControl.setValue(dates);
23313
- this._initialValue = {
23314
- alias: key,
23315
- start: alias.interval.start,
23316
- end: alias.interval.end
23317
- };
23318
23318
  }
23319
23319
  }
23320
+ isDateValid(date) {
23321
+ return !!date && (0, import_moment.default)(date).isValid();
23322
+ }
23320
23323
  formatDate(date) {
23321
- if (!date || !(0, import_moment.default)(date).isValid()) {
23324
+ if (!this.isDateValid(date)) {
23322
23325
  return "";
23323
23326
  }
23324
23327
  return (0, import_moment.default)(date).format("DD/MM/YYYY");
@@ -23377,7 +23380,6 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
23377
23380
  this.dateControl.markAsTouched();
23378
23381
  this.dateControl.markAsDirty();
23379
23382
  this.inputValue = "";
23380
- this._initialValue = null;
23381
23383
  this.currentAlias = null;
23382
23384
  if (this.control) {
23383
23385
  this.control.reset();
@@ -39780,7 +39782,7 @@ var VerificationService = class _VerificationService {
39780
39782
  });
39781
39783
  }
39782
39784
  getLookups() {
39783
- const url = this.apiHandlerService.getACSBaseUrl("rep_mm_report_params_lookup_bq", "ce");
39785
+ const url = this.apiHandlerService.getACSBaseUrl("rep_mm_report_params_lookup", "ubo");
39784
39786
  const body = {
39785
39787
  p_report_params: {
39786
39788
  p_domains: [