@forgeroute/ui 0.4.48 → 0.4.49

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.
@@ -11764,6 +11764,8 @@ var DataTableComponent = class DataTableComponent {
11764
11764
  }))];
11765
11765
  }, ...ngDevMode ? [{ debugName: "_effectiveTabs" }] : /* istanbul ignore next */ []);
11766
11766
  this._error = signal(null, ...ngDevMode ? [{ debugName: "_error" }] : /* istanbul ignore next */ []);
11767
+ this._loadFailed = signal(false, ...ngDevMode ? [{ debugName: "_loadFailed" }] : /* istanbul ignore next */ []);
11768
+ this.loadFailed = this._loadFailed.asReadonly();
11767
11769
  this._search = signal("", ...ngDevMode ? [{ debugName: "_search" }] : /* istanbul ignore next */ []);
11768
11770
  this._searchParam = computed(() => this._search().toLowerCase(), ...ngDevMode ? [{ debugName: "_searchParam" }] : /* istanbul ignore next */ []);
11769
11771
  this._page = signal(1, ...ngDevMode ? [{ debugName: "_page" }] : /* istanbul ignore next */ []);
@@ -12039,10 +12041,12 @@ var DataTableComponent = class DataTableComponent {
12039
12041
  for (const [key, vals] of Object.entries(cf)) if (vals.length > 0) params = params.set(key, encodeFilterValues(vals));
12040
12042
  return this.http.get(`${this.config.baseUrl}${this.endpoint()}`, { params }).pipe(catchError(() => {
12041
12043
  this._error.set("Something went wrong. Please try again.");
12044
+ this._loadFailed.set(true);
12042
12045
  return of(null);
12043
12046
  }));
12044
12047
  }), takeUntilDestroyed(this.destroyRef)).subscribe((response) => {
12045
12048
  if (response !== null) {
12049
+ this._loadFailed.set(false);
12046
12050
  const items = Array.isArray(response) ? response : response?.content ?? [];
12047
12051
  this._items.set(items);
12048
12052
  if (this._failedImages().size > 0) this._failedImages.set(/* @__PURE__ */ new Set());
@@ -33225,7 +33229,7 @@ var DateRangePickerComponent = class DateRangePickerComponent {
33225
33229
  this.popoverDismissed = linkedSignal({
33226
33230
  ...ngDevMode ? { debugName: "popoverDismissed" } : /* istanbul ignore next */ {},
33227
33231
  source: this.selectedPreset,
33228
- computation: () => false
33232
+ computation: (_, previous) => previous === void 0
33229
33233
  });
33230
33234
  this.popoverVisible = computed(() => this.showPresets() && this.selectedPreset() === "custom" && !this.popoverDismissed(), ...ngDevMode ? [{ debugName: "popoverVisible" }] : /* istanbul ignore next */ []);
33231
33235
  this.popTop = signal(0, ...ngDevMode ? [{ debugName: "popTop" }] : /* istanbul ignore next */ []);
@@ -33269,13 +33273,20 @@ var DateRangePickerComponent = class DateRangePickerComponent {
33269
33273
  this.popRight.set(Math.max(16, Math.round(document.documentElement.clientWidth - r.right)));
33270
33274
  }
33271
33275
  onDocumentClick(e) {
33272
- if (this.popoverVisible() && !this.host.nativeElement.contains(e.target)) this.popoverDismissed.set(true);
33276
+ if (this.popoverVisible() && !this.host.nativeElement.contains(e.target)) this.dismissWithoutApply();
33273
33277
  }
33274
33278
  onEscape(e) {
33275
33279
  if (!this.popoverVisible()) return;
33276
33280
  e.stopPropagation();
33281
+ this.dismissWithoutApply();
33282
+ }
33283
+ dismissWithoutApply() {
33284
+ this.selectedPreset.set(this.activePreset());
33277
33285
  this.popoverDismissed.set(true);
33278
33286
  }
33287
+ onPillsClick(e) {
33288
+ if ((e.target?.closest?.("[role=\"tab\"]"))?.getAttribute("aria-selected") === "true" && this.selectedPreset() === "custom" && this.popoverDismissed()) this.popoverDismissed.set(false);
33289
+ }
33279
33290
  selectPreset(key) {
33280
33291
  this.selectedPreset.set(key);
33281
33292
  this.popoverDismissed.set(false);
@@ -33347,7 +33358,7 @@ var DateRangePickerComponent = class DateRangePickerComponent {
33347
33358
  template: `
33348
33359
  <div class="date-range-picker">
33349
33360
  @if (showPresets()) {
33350
- <div class="pills" #pills>
33361
+ <div class="pills" #pills (click)="onPillsClick($event)">
33351
33362
  <ui-pill-tabs [tabs]="presetTabs()" [activeKey]="selectedPreset()" [ariaLabel]="ariaLabel()" [noWrap]="true" (tabChange)="selectPreset($any($event))" />
33352
33363
  </div>
33353
33364
  @if (popoverVisible()) {
@@ -33493,7 +33504,7 @@ i0.ɵɵngDeclareClassMetadata({
33493
33504
  template: `
33494
33505
  <div class="date-range-picker">
33495
33506
  @if (showPresets()) {
33496
- <div class="pills" #pills>
33507
+ <div class="pills" #pills (click)="onPillsClick($event)">
33497
33508
  <ui-pill-tabs [tabs]="presetTabs()" [activeKey]="selectedPreset()" [ariaLabel]="ariaLabel()" [noWrap]="true" (tabChange)="selectPreset($any($event))" />
33498
33509
  </div>
33499
33510
  @if (popoverVisible()) {