@ethlete/cdk 5.0.0-next.37 → 5.0.0-next.39

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/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @ethlete/cdk
2
2
 
3
+ ## 5.0.0-next.39
4
+
5
+ ### Patch Changes
6
+
7
+ - Keep a form control's value in `et-combobox` while async options load and when the loaded options do not contain it, instead of overwriting it with `null`.
8
+
9
+ ## 5.0.0-next.38
10
+
11
+ ### Minor Changes
12
+
13
+ - Peer dependencies are ranges (`^22.1.0` for Angular, `^7.8.0` for RxJS, ...) instead of the workspace's exact versions. The test-only `vite` and `@analogjs/vite-plugin-angular` peers are gone. `migrate-from-cdk` lists app stylesheet `.et-*` selectors that no `@ethlete/components` class matches.
14
+
15
+ ### Patch Changes
16
+
17
+ - `et-accordion` no longer closes an accordion opened through `[isOpen]` when `isOpenByDefault` is false.
18
+ - Fix `et-breadcrumb` collapsing endlessly with few items, masonry `0` keys and narrow layouts, `et-picture` srcset base URLs, and tooltips staying open when `etTooltip` turns null.
19
+ - `createFormChangesTracker` and `createNavigationDismissChecker` report a form cleared to `null` as a change.
20
+ - `createFormChangesTracker().hasChanges` no longer reports the inverse, and both it and `createNavigationDismissChecker` now see a change to `''`, `0` or `false`.
21
+ - The `migrate-from-cdk` task file lists cdk form controls still bound through `formControl`, `formControlName` or `[formGroup]`, grouped by control, as needing signal forms first.
22
+ - Correct the migration map rows for `DATE_TIME_INPUT_FORMAT_TOKEN`, `provideDateTimeFormat`, the `DEFAULT_DATE_*` formats and `QueryButtonDirective`, and the documented defaults of `delayFocusTrap` and the toggletip `offset`.
23
+ - `paginate` handles a `NaN` or fractional `currentPage` and disables "previous" on a non-1 `firstPage`, and `TableDataSource` no longer sets the paginator to page `-1` when a filter matches nothing.
24
+ - `et-picture` keeps a srcset URL that contains a comma (such as a Cloudinary transform) intact when it applies the base URL or picks the fallback image.
25
+ - Name the hostDirective wrapper case and the injection context of `queryButtonSourceFromV2Query` in the `QueryButton*` migration notes.
26
+ - `et-query-error` shows the default message instead of throwing when an error response carries an empty violation or message list.
27
+ - The `et-query-error` retry button no longer submits a surrounding form.
28
+ - Page Up and Page Down in a cdk select or combobox move to the nearest enabled option when the first or last option is disabled.
29
+ - Keep a falsy option such as `0` or `''` selectable in the combobox, and stop `SelectionModel.getOptionByOffset` from overflowing the stack when it loops, gets no options, or meets only disabled options.
30
+ - A sort header without its own `disableClear` now falls back to `etSortDisableClear` and the `SORT_DEFAULT_OPTIONS` token instead of always allowing the cleared state.
31
+ - A destroyed sort header removes its screen-reader sort description from the document.
32
+ - Add `etQueryButton`, which shows a query's loading state and progress on any button, and `queryButtonSourceFromV2Query` for legacy queries; the cdk migration map now points the cdk query button at it.
33
+ - `AnimatedLifecycleDirective` gains a read-only `state` signal, and `state$` is now a read-only observable; read `state()` instead of `state$.value`.
34
+ - Breaking: spinner and progress bar are determinate while `value` is bound, replacing `determinate` and `indeterminate` (`et update` migrates templates); the progress bar takes `color`, and `LOADER_IMPORTS` is exported.
35
+ - Mark every migration with a `level`, so `et update` runs only the required ones.
36
+
3
37
  ## 5.0.0-next.37
4
38
 
5
39
  ### Patch Changes
@@ -253,7 +253,8 @@ class AccordionComponent {
253
253
  const ref = effect(() => {
254
254
  const isOpenByDefault = this.isOpenByDefault();
255
255
  untracked(() => {
256
- this.isOpen.set(isOpenByDefault);
256
+ if (isOpenByDefault)
257
+ this.isOpen.set(true);
257
258
  ref.destroy();
258
259
  });
259
260
  }, /* @ts-ignore */
@@ -5922,9 +5923,9 @@ const createFormChangesTracker = (config) => {
5922
5923
  const currentFormValue = controlValueSignal(form);
5923
5924
  const hasChanges = computed(() => {
5924
5925
  const formValue = currentFormValue();
5925
- if (!formValue)
5926
+ if (formValue === undefined)
5926
5927
  return false;
5927
- return compareFn ? compareFn(formValue, defaultFormValue()) : equal(formValue, defaultFormValue());
5928
+ return !(compareFn ? compareFn(formValue, defaultFormValue()) : equal(formValue, defaultFormValue()));
5928
5929
  }, /* @ts-ignore */
5929
5930
  ...(ngDevMode ? [{ debugName: "hasChanges" }] : /* istanbul ignore next */ []));
5930
5931
  const defaultFormValue = signal(config.defaultValue ?? form.getRawValue(), /* @ts-ignore */
@@ -6308,7 +6309,7 @@ class OverlayRef {
6308
6309
  if (this._isClosing) {
6309
6310
  return;
6310
6311
  }
6311
- const currentState = this._containerInstance.animatedLifecycle.state$.value;
6312
+ const currentState = this._containerInstance.animatedLifecycle.state();
6312
6313
  if (currentState === 'leaving' || currentState === 'left') {
6313
6314
  return;
6314
6315
  }
@@ -6521,7 +6522,7 @@ const createNavigationDismissChecker = (config) => {
6521
6522
  const currentFormValue = controlValueSignal(form);
6522
6523
  const hasChanges = computed(() => {
6523
6524
  const formValue = currentFormValue();
6524
- if (!formValue)
6525
+ if (formValue === undefined)
6525
6526
  return false;
6526
6527
  return !(compareFn ? compareFn(formValue, defaultFormValue()) : equal(formValue, defaultFormValue()));
6527
6528
  }, /* @ts-ignore */
@@ -7331,7 +7332,7 @@ const startFullscreenLeaveAnimation = (context, state, deps, applyTransformOrigi
7331
7332
  };
7332
7333
  }
7333
7334
  else {
7334
- const cloneState = cloneComponentRef.instance.animatedLifecycle.state$.value;
7335
+ const cloneState = cloneComponentRef.instance.animatedLifecycle.state();
7335
7336
  if (cloneState === 'init') {
7336
7337
  destroyClone(cloneComponentRef, deps.appRef);
7337
7338
  if (isOriginHidden) {
@@ -7413,7 +7414,7 @@ const cleanupFullscreenAnimation = (state, deps) => {
7413
7414
  restoreOrigin();
7414
7415
  return;
7415
7416
  }
7416
- const cloneState = cloneRef.instance.animatedLifecycle.state$.value;
7417
+ const cloneState = cloneRef.instance.animatedLifecycle.state();
7417
7418
  if (cloneState === 'left') {
7418
7419
  destroyClone(cloneRef, appRef);
7419
7420
  restoreOrigin();
@@ -11877,7 +11878,7 @@ class BreadcrumbComponent {
11877
11878
  ...(ngDevMode ? [{ debugName: "itemsToRender" }] : /* istanbul ignore next */ []));
11878
11879
  effect(() => {
11879
11880
  const canScrollHorizontally = this.scrollState().canScrollHorizontally;
11880
- if (!canScrollHorizontally || this.visibleElementCount() === MIN_ITEMS_TO_RENDER) {
11881
+ if (!canScrollHorizontally || this.visibleElementCount() <= MIN_ITEMS_TO_RENDER) {
11881
11882
  return;
11882
11883
  }
11883
11884
  this.visibleElementCount.update((v) => v - 1);
@@ -15041,6 +15042,9 @@ class ActiveSelectionModel {
15041
15042
  }
15042
15043
 
15043
15044
  class SelectionModel {
15045
+ get isSyncingSelectionFromValue() {
15046
+ return this._isSyncingSelectionFromValue;
15047
+ }
15044
15048
  get selection$() {
15045
15049
  return this._selection$.asObservable();
15046
15050
  }
@@ -15092,6 +15096,7 @@ class SelectionModel {
15092
15096
  constructor() {
15093
15097
  this._destroy$ = createDestroy();
15094
15098
  this._lastSelectionSetSubscription = null;
15099
+ this._isSyncingSelectionFromValue = false;
15095
15100
  this._selection$ = new BehaviorSubject([]);
15096
15101
  this._options$ = new BehaviorSubject([]);
15097
15102
  this.optionsSignal = toSignal(this.options$);
@@ -15105,10 +15110,9 @@ class SelectionModel {
15105
15110
  if (allowMultiple) {
15106
15111
  return selection.map((option) => this.execFnOrGetOptionProperty(option, valueBinding));
15107
15112
  }
15108
- const [option] = selection;
15109
- if (!option)
15113
+ if (!selection.length)
15110
15114
  return null;
15111
- return this.execFnOrGetOptionProperty(option, valueBinding);
15115
+ return this.execFnOrGetOptionProperty(selection[0], valueBinding);
15112
15116
  }));
15113
15117
  this.filteredOptions$ = combineLatest([this.options$, this.filter$, this.labelBinding$]).pipe(map(([options, filter]) => this.getFilteredOptions(filter, options)), shareReplay({ bufferSize: 1, refCount: true }));
15114
15118
  this._optionsAndSelection$ = combineLatest([this._options$, this._selection$]);
@@ -15117,10 +15121,9 @@ class SelectionModel {
15117
15121
  .pipe(tap(() => {
15118
15122
  if (this.allowMultiple)
15119
15123
  return;
15120
- const [option] = this.selection;
15121
- if (!option)
15124
+ if (!this.selection.length)
15122
15125
  return;
15123
- this.setSelection([option]);
15126
+ this.setSelection([this.selection[0]]);
15124
15127
  }), takeUntilDestroyed())
15125
15128
  .subscribe();
15126
15129
  }
@@ -15138,19 +15141,22 @@ class SelectionModel {
15138
15141
  }
15139
15142
  else {
15140
15143
  const selection = this.getOptionByValue(value);
15141
- if (selection) {
15142
- this.setSelection(selection);
15143
- }
15144
- else {
15145
- this.clearSelectedOptions();
15146
- }
15144
+ this.setSelection(selection !== undefined ? selection : []);
15147
15145
  }
15148
15146
  }
15147
+ /**
15148
+ * Applies `value` once options are available. Until then, and while applying it, `isSyncingSelectionFromValue` is `true`.
15149
+ * Any user selection change cancels a pending sync.
15150
+ */
15149
15151
  setSelectionFromValue$(value) {
15150
- this._lastSelectionSetSubscription?.unsubscribe();
15152
+ this._cancelPendingSelectionFromValue();
15153
+ this._isSyncingSelectionFromValue = true;
15151
15154
  this._lastSelectionSetSubscription = this.options$
15152
- .pipe(takeUntil(this._destroy$), filter((o) => !!o.length), tap(() => this.setSelectionFromValue(value)), take(1))
15153
- .subscribe();
15155
+ .pipe(takeUntil(this._destroy$), filter((o) => !!o.length), take(1))
15156
+ .subscribe(() => {
15157
+ this.setSelectionFromValue(value);
15158
+ this._isSyncingSelectionFromValue = false;
15159
+ });
15154
15160
  }
15155
15161
  setValueBinding(fnOrPropertyPath) {
15156
15162
  this._valueBinding$.next(fnOrPropertyPath);
@@ -15247,42 +15253,42 @@ class SelectionModel {
15247
15253
  });
15248
15254
  }
15249
15255
  getOptionByIndex(index, options = this.getFilteredOptions()) {
15250
- return options[index] || null;
15256
+ return index >= 0 && index < options.length ? options[index] : null;
15251
15257
  }
15252
15258
  getOptionByOffset(offset, index, config = { clamp: true }) {
15253
15259
  const { loop, clamp, skipDisabled, options = this.getFilteredOptions() } = config;
15254
- const newIndex = index + offset;
15255
- const remainingOffset = newIndex * -1;
15256
- let optionResult;
15257
- if (newIndex < 0) {
15258
- if (loop) {
15259
- optionResult = this.getOptionByOffset(remainingOffset, options.length - 1, config);
15260
- }
15261
- else if (clamp) {
15262
- optionResult = this.getFirstOption();
15263
- }
15264
- else {
15265
- optionResult = null;
15266
- }
15267
- }
15268
- else if (newIndex >= options.length) {
15269
- if (loop) {
15270
- optionResult = this.getOptionByOffset(remainingOffset, 0, config);
15271
- }
15272
- else if (clamp) {
15273
- optionResult = this.getLastOption();
15274
- }
15275
- else {
15276
- optionResult = null;
15277
- }
15278
- }
15279
- else {
15280
- optionResult = this.getOptionByIndex(newIndex);
15281
- }
15282
- if (optionResult && skipDisabled && this.isDisabled(optionResult)) {
15283
- return this.getOptionByOffset(offset, newIndex, config);
15260
+ const length = options.length;
15261
+ if (!length)
15262
+ return null;
15263
+ const resolveIndex = (i) => {
15264
+ if (i >= 0 && i < length)
15265
+ return i;
15266
+ if (loop)
15267
+ return ((i % length) + length) % length;
15268
+ if (clamp)
15269
+ return i < 0 ? 0 : length - 1;
15270
+ return null;
15271
+ };
15272
+ let newIndex = resolveIndex(index + offset);
15273
+ if (!skipDisabled)
15274
+ return newIndex === null ? null : this.getOptionByIndex(newIndex, options);
15275
+ const step = offset < 0 ? -1 : 1;
15276
+ for (let attempt = 0; attempt < length && newIndex !== null; attempt++) {
15277
+ const option = options[newIndex];
15278
+ if (!this.isDisabled(option))
15279
+ return option;
15280
+ const nextIndex = newIndex + step;
15281
+ newIndex = nextIndex >= 0 && nextIndex < length ? nextIndex : loop ? resolveIndex(nextIndex) : null;
15282
+ }
15283
+ if (!clamp || loop)
15284
+ return null;
15285
+ const clampedTarget = resolveIndex(index + offset);
15286
+ for (let i = clampedTarget - step; i >= 0 && i < length; i -= step) {
15287
+ const option = options[i];
15288
+ if (!this.isDisabled(option))
15289
+ return option;
15284
15290
  }
15285
- return optionResult;
15291
+ return null;
15286
15292
  }
15287
15293
  getFirstOption(options = this.getFilteredOptions()) {
15288
15294
  return this.getOptionByIndex(0, options);
@@ -15298,7 +15304,7 @@ class SelectionModel {
15298
15304
  getNonMultipleSelectedOption() {
15299
15305
  if (this.allowMultiple)
15300
15306
  return null;
15301
- return this.selection[0] || null;
15307
+ return this.selection.length ? this.selection[0] : null;
15302
15308
  }
15303
15309
  getNonMultipleSelectedOptionIndex() {
15304
15310
  if (this.allowMultiple)
@@ -15366,6 +15372,7 @@ class SelectionModel {
15366
15372
  });
15367
15373
  }
15368
15374
  addSelectedOption(option) {
15375
+ this._cancelPendingSelectionFromValue();
15369
15376
  if (this.allowMultiple) {
15370
15377
  if (this.isSelected(option))
15371
15378
  return;
@@ -15376,6 +15383,7 @@ class SelectionModel {
15376
15383
  }
15377
15384
  }
15378
15385
  removeSelectedOption(option) {
15386
+ this._cancelPendingSelectionFromValue();
15379
15387
  const optionKey = this.execFnOrGetOptionProperty(option, this.keyBinding);
15380
15388
  if (!this.isSelected(option))
15381
15389
  return;
@@ -15385,6 +15393,7 @@ class SelectionModel {
15385
15393
  }));
15386
15394
  }
15387
15395
  clearSelectedOptions() {
15396
+ this._cancelPendingSelectionFromValue();
15388
15397
  this._selection$.next([]);
15389
15398
  }
15390
15399
  toggleSelectedOption(option) {
@@ -15397,6 +15406,7 @@ class SelectionModel {
15397
15406
  }
15398
15407
  // FIXME: Toggle should respect disabled binding if it exists
15399
15408
  toggleAllSelectedOptions() {
15409
+ this._cancelPendingSelectionFromValue();
15400
15410
  const filteredOptions = this.getFilteredOptions();
15401
15411
  const unselectedOptions = filteredOptions.filter((option) => !this.isSelected(option));
15402
15412
  if (unselectedOptions.length) {
@@ -15408,6 +15418,11 @@ class SelectionModel {
15408
15418
  this._selection$.next(selection);
15409
15419
  }
15410
15420
  }
15421
+ _cancelPendingSelectionFromValue() {
15422
+ this._lastSelectionSetSubscription?.unsubscribe();
15423
+ this._lastSelectionSetSubscription = null;
15424
+ this._isSyncingSelectionFromValue = false;
15425
+ }
15411
15426
  }
15412
15427
 
15413
15428
  /**
@@ -15895,6 +15910,7 @@ class ComboboxDirective {
15895
15910
  this._comboboxConfig = inject(COMBOBOX_CONFIG_TOKEN, { optional: true });
15896
15911
  this.colorProvider = inject(COLOR_PROVIDER, { optional: true });
15897
15912
  this._initialValue$ = new BehaviorSubject(null);
15913
+ this._hasReceivedSelectionValue = false;
15898
15914
  this._filterInternal$ = new BehaviorSubject(false);
15899
15915
  this._loading$ = new BehaviorSubject(false);
15900
15916
  this.loading$ = this._loading$.asObservable();
@@ -16003,9 +16019,15 @@ class ComboboxDirective {
16003
16019
  this._debugValidateOptionAndInitialValueSchema();
16004
16020
  }
16005
16021
  this._selectionModel.setSelectionFromValue$(this._input.value);
16022
+ const hasInitialControlValue = this._input.value !== null && this._input.value !== undefined;
16006
16023
  this._selectionModel.value$
16007
16024
  .pipe(takeUntil(this._destroy$), tap((value) => {
16008
- this._input._updateValue(value);
16025
+ const isInitialEmission = !this._hasReceivedSelectionValue;
16026
+ this._hasReceivedSelectionValue = true;
16027
+ const keepsControlValue = this._selectionModel.isSyncingSelectionFromValue || (isInitialEmission && hasInitialControlValue);
16028
+ if (!keepsControlValue) {
16029
+ this._input._updateValue(value);
16030
+ }
16009
16031
  this._setFilterFromInputValue();
16010
16032
  }))
16011
16033
  .subscribe();
@@ -18270,7 +18292,7 @@ class MasonryItemComponent {
18270
18292
  return this._isPositioned$.getValue();
18271
18293
  }
18272
18294
  ngAfterViewInit() {
18273
- if (!this.key) {
18295
+ if (this.key === undefined || this.key === null || this.key === '') {
18274
18296
  throw new Error('MasonryItemComponent: @Input() key is required');
18275
18297
  }
18276
18298
  this._initialDimensions = this.dimensions;
@@ -18427,7 +18449,7 @@ class MasonryComponent {
18427
18449
  if (!config?.partial || !state.isInitialized) {
18428
18450
  state.preferredColumnWidth = this.columWidth;
18429
18451
  state.hostDimensions = this._getHostDimensions();
18430
- state.columns = Math.floor(state.hostDimensions.width / this.columWidth);
18452
+ state.columns = Math.max(1, Math.floor(state.hostDimensions.width / this.columWidth));
18431
18453
  state.gap = this.gap;
18432
18454
  state.itemCount = items.length;
18433
18455
  state.columnWidth = (state.hostDimensions.width - (state.columns - 1) * state.gap) / state.columns;
@@ -18814,11 +18836,12 @@ class TooltipDirective {
18814
18836
  set tooltip(v) {
18815
18837
  this._tooltip = v;
18816
18838
  this._updateAriaDescription();
18839
+ this._removeListeners();
18817
18840
  if (v) {
18818
18841
  this._addListeners();
18819
18842
  }
18820
- else {
18821
- this._removeListeners();
18843
+ else if (this.animatedOverlay.canUnmount()) {
18844
+ this.animatedOverlay.unmount();
18822
18845
  }
18823
18846
  }
18824
18847
  // TODO: Skipped for migration because:
@@ -19128,7 +19151,9 @@ const paginate = (value) => {
19128
19151
  }
19129
19152
  const { omitFirstLast = false, omitPreviousNext = false, pagesBeforeAfter = 2, firstPage = 1 } = value;
19130
19153
  const pages = [];
19131
- const activePage = clamp(value.currentPage, firstPage, value.totalPageCount);
19154
+ const activePage = Number.isFinite(value.currentPage)
19155
+ ? clamp(Math.floor(value.currentPage), firstPage, value.totalPageCount)
19156
+ : firstPage;
19132
19157
  if (value.totalPageCount === 0) {
19133
19158
  return null;
19134
19159
  }
@@ -19159,7 +19184,7 @@ const paginate = (value) => {
19159
19184
  page: activePage - 1,
19160
19185
  current: false,
19161
19186
  ariaLabel: `Previous page`,
19162
- disabled: activePage === 1,
19187
+ disabled: activePage === firstPage,
19163
19188
  type: 'hotLink',
19164
19189
  explicitType: 'previous',
19165
19190
  url: createUrl(activePage - 1),
@@ -19358,6 +19383,7 @@ const provideImageConfig = (config = {}) => {
19358
19383
  useValue: config,
19359
19384
  };
19360
19385
  };
19386
+ const splitSrcset = (srcset) => srcset.split(/,\s+|(?<=\s[\d.]+[wx]),/);
19361
19387
  /**
19362
19388
  * @deprecated `@ethlete/cdk` is in maintenance mode. Use the `@ethlete/components` equivalent instead - see https://ethlete-sdk-docs.web.app/cdk/migration, and run `nx g @ethlete/cdk:migrate-from-cdk` to rewrite the mechanical parts. Intent to remove in v6.
19363
19389
  */
@@ -19368,7 +19394,7 @@ const extractFirstImageUrl = (source) => {
19368
19394
  if (srcString.trimStart().startsWith('data:')) {
19369
19395
  return srcString.trim() || null;
19370
19396
  }
19371
- const srcsetParts = srcString.split(',').map((part) => part.trim());
19397
+ const srcsetParts = splitSrcset(srcString).map((part) => part.trim());
19372
19398
  if (srcsetParts.length > 0) {
19373
19399
  const firstPart = srcsetParts[0];
19374
19400
  const url = firstPart?.split(' ')[0] || null;
@@ -19449,14 +19475,21 @@ class PictureComponent {
19449
19475
  ...(ngDevMode ? [{ debugName: "defaultSrcFallbackUrl" }] : /* istanbul ignore next */ []));
19450
19476
  }
19451
19477
  _combineWithConfig(src) {
19452
- if (!this._config?.baseUrl || src.srcset.startsWith('http') || src.srcset.startsWith('data:')) {
19478
+ const baseUrl = this._config?.baseUrl;
19479
+ if (!baseUrl || src.srcset.startsWith('data:')) {
19453
19480
  return src;
19454
19481
  }
19455
- const shouldAppendSlash = !this._config.baseUrl.endsWith('/') && !src.srcset.startsWith('/');
19456
- return {
19457
- ...src,
19458
- srcset: `${this._config.baseUrl}${shouldAppendSlash ? '/' : ''}${src.srcset}`,
19459
- };
19482
+ const srcset = src.srcset
19483
+ .split(/,\s+|(?<=\s[\d.]+[wx]),/)
19484
+ .map((candidate) => {
19485
+ const url = candidate.trim();
19486
+ if (!url || url.startsWith('http'))
19487
+ return url;
19488
+ const shouldAppendSlash = !baseUrl.endsWith('/') && !url.startsWith('/');
19489
+ return `${baseUrl}${shouldAppendSlash ? '/' : ''}${url}`;
19490
+ })
19491
+ .join(', ');
19492
+ return { ...src, srcset };
19460
19493
  }
19461
19494
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PictureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19462
19495
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: PictureComponent, isStandalone: true, selector: "et-picture", inputs: { sources: { classPropertyName: "sources", publicName: "sources", isSignal: true, isRequired: false, transformFunction: null }, hasPriority: { classPropertyName: "hasPriority", publicName: "hasPriority", isSignal: true, isRequired: false, transformFunction: null }, imgClass: { classPropertyName: "imgClass", publicName: "imgClass", isSignal: true, isRequired: false, transformFunction: null }, figureClass: { classPropertyName: "figureClass", publicName: "figureClass", isSignal: true, isRequired: false, transformFunction: null }, figcaptionClass: { classPropertyName: "figcaptionClass", publicName: "figcaptionClass", isSignal: true, isRequired: false, transformFunction: null }, pictureClass: { classPropertyName: "pictureClass", publicName: "pictureClass", isSignal: true, isRequired: false, transformFunction: null }, defaultSrc: { classPropertyName: "defaultSrc", publicName: "defaultSrc", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, figcaption: { classPropertyName: "figcaption", publicName: "figcaption", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, sizes: { classPropertyName: "sizes", publicName: "sizes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { imgLoaded: "imgLoaded", imgError: "imgError" }, host: { classAttribute: "et-picture et-legacy" }, viewQueries: [{ propertyName: "img", first: true, predicate: ["img"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure [ngClass]=\"figureClass()\" class=\"et-picture-figure\">\n <picture [ngClass]=\"pictureClass()\" class=\"et-picture-picture\">\n @for (source of sourcesWithConfig(); track source.srcset) {\n <source\n [type]=\"source.type\"\n [attr.srcset]=\"source.srcset\"\n [attr.sizes]=\"(source.sizes ?? sizes()) || null\"\n [attr.media]=\"source.media || null\"\n />\n }\n\n @if (defaultSourceWithConfig(); as source) {\n <img\n #img\n [attr.loading]=\"hasPriority() ? 'eager' : 'lazy'\"\n [attr.fetchpriority]=\"hasPriority() ? 'high' : 'auto'\"\n [ngClass]=\"imgClass()\"\n [attr.srcset]=\"source.srcset\"\n [src]=\"defaultSrcFallbackUrl()\"\n [attr.type]=\"source.type\"\n [attr.alt]=\"alt()\"\n [attr.width]=\"width()\"\n [attr.height]=\"height()\"\n [attr.sizes]=\"source.sizes ?? sizes()\"\n class=\"et-picture-img\"\n />\n }\n </picture>\n\n @if (figcaption()) {\n <figcaption [ngClass]=\"figcaptionClass()\" class=\"et-picture-figcaption\">\n {{ figcaption() }}\n </figcaption>\n }\n</figure>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
@@ -19628,7 +19661,7 @@ class QueryErrorDirective {
19628
19661
  else if (typeof detail === 'string') {
19629
19662
  errorList.items.push({ message: detail });
19630
19663
  }
19631
- else {
19664
+ if (!errorList.items.length) {
19632
19665
  errorList.items.push({ message: defaultErrorMessage });
19633
19666
  }
19634
19667
  errorList.isList = errorList.items.length > 1;
@@ -19683,13 +19716,13 @@ class QueryErrorComponent {
19683
19716
  extractQuery(this.host.query())?.execute({ skipCache: true });
19684
19717
  }
19685
19718
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: QueryErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19686
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: QueryErrorComponent, isStandalone: true, selector: "et-query-error", host: { classAttribute: "et-query-error-host et-legacy" }, hostDirectives: [{ directive: QueryErrorDirective, inputs: ["error", "error", "query", "query", "language", "language"] }], ngImport: i0, template: "<div\n [ngClass]=\"{ 'et-query-error--can-be-retried': canBeRetried(), 'et-query-error--is-list': isList() }\"\n class=\"et-query-error\"\n>\n @if (errorList(); as errorList) {\n <h3 class=\"et-query-error-title\">{{ errorList.title }}</h3>\n\n @if (!errorList.isList) {\n <p class=\"et-query-error-message\">{{ errorList.items[0]!.message }}</p>\n }\n\n @if (errorList.isList) {\n <ul class=\"et-query-error-list\">\n @for (item of errorList.items; track trackByFn($index, item)) {\n <li class=\"et-query-error-list-item\">\n {{ item.message }}\n </li>\n }\n </ul>\n }\n\n @if (errorList.canBeRetried) {\n <button (click)=\"retry()\" class=\"et-query-error-retry-button\">\n {{ host.language() === 'en' ? 'Retry' : 'Erneut versuchen' }}\n </button>\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
19719
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: QueryErrorComponent, isStandalone: true, selector: "et-query-error", host: { classAttribute: "et-query-error-host et-legacy" }, hostDirectives: [{ directive: QueryErrorDirective, inputs: ["error", "error", "query", "query", "language", "language"] }], ngImport: i0, template: "<div\n [ngClass]=\"{ 'et-query-error--can-be-retried': canBeRetried(), 'et-query-error--is-list': isList() }\"\n class=\"et-query-error\"\n>\n @if (errorList(); as errorList) {\n <h3 class=\"et-query-error-title\">{{ errorList.title }}</h3>\n\n @if (!errorList.isList) {\n <p class=\"et-query-error-message\">{{ errorList.items[0]!.message }}</p>\n }\n\n @if (errorList.isList) {\n <ul class=\"et-query-error-list\">\n @for (item of errorList.items; track trackByFn($index, item)) {\n <li class=\"et-query-error-list-item\">\n {{ item.message }}\n </li>\n }\n </ul>\n }\n\n @if (errorList.canBeRetried) {\n <button (click)=\"retry()\" class=\"et-query-error-retry-button\" type=\"button\">\n {{ host.language() === 'en' ? 'Retry' : 'Erneut versuchen' }}\n </button>\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
19687
19720
  }
19688
19721
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: QueryErrorComponent, decorators: [{
19689
19722
  type: Component,
19690
19723
  args: [{ selector: 'et-query-error', encapsulation: ViewEncapsulation.None, host: {
19691
19724
  class: 'et-query-error-host et-legacy',
19692
- }, imports: [NgClass], hostDirectives: [{ directive: QueryErrorDirective, inputs: ['error', 'query', 'language'] }], template: "<div\n [ngClass]=\"{ 'et-query-error--can-be-retried': canBeRetried(), 'et-query-error--is-list': isList() }\"\n class=\"et-query-error\"\n>\n @if (errorList(); as errorList) {\n <h3 class=\"et-query-error-title\">{{ errorList.title }}</h3>\n\n @if (!errorList.isList) {\n <p class=\"et-query-error-message\">{{ errorList.items[0]!.message }}</p>\n }\n\n @if (errorList.isList) {\n <ul class=\"et-query-error-list\">\n @for (item of errorList.items; track trackByFn($index, item)) {\n <li class=\"et-query-error-list-item\">\n {{ item.message }}\n </li>\n }\n </ul>\n }\n\n @if (errorList.canBeRetried) {\n <button (click)=\"retry()\" class=\"et-query-error-retry-button\">\n {{ host.language() === 'en' ? 'Retry' : 'Erneut versuchen' }}\n </button>\n }\n }\n</div>\n" }]
19725
+ }, imports: [NgClass], hostDirectives: [{ directive: QueryErrorDirective, inputs: ['error', 'query', 'language'] }], template: "<div\n [ngClass]=\"{ 'et-query-error--can-be-retried': canBeRetried(), 'et-query-error--is-list': isList() }\"\n class=\"et-query-error\"\n>\n @if (errorList(); as errorList) {\n <h3 class=\"et-query-error-title\">{{ errorList.title }}</h3>\n\n @if (!errorList.isList) {\n <p class=\"et-query-error-message\">{{ errorList.items[0]!.message }}</p>\n }\n\n @if (errorList.isList) {\n <ul class=\"et-query-error-list\">\n @for (item of errorList.items; track trackByFn($index, item)) {\n <li class=\"et-query-error-list-item\">\n {{ item.message }}\n </li>\n }\n </ul>\n }\n\n @if (errorList.canBeRetried) {\n <button (click)=\"retry()\" class=\"et-query-error-retry-button\" type=\"button\">\n {{ host.language() === 'en' ? 'Retry' : 'Erneut versuchen' }}\n </button>\n }\n }\n</div>\n" }]
19693
19726
  }] });
19694
19727
 
19695
19728
  /**
@@ -19855,7 +19888,6 @@ class SortDirective {
19855
19888
  this.disabled = false;
19856
19889
  this.start = 'asc';
19857
19890
  this._direction = '';
19858
- this.disableClear = false;
19859
19891
  // eslint-disable-next-line @angular-eslint/no-output-rename
19860
19892
  this.sortChange = new EventEmitter();
19861
19893
  }
@@ -20092,7 +20124,6 @@ class SortHeaderComponent {
20092
20124
  this.disabled = false;
20093
20125
  this.arrowPosition = 'after';
20094
20126
  this._sortActionDescription = 'Sort';
20095
- this.disableClear = false;
20096
20127
  if (this._sortDefaultOptions?.arrowPosition) {
20097
20128
  this.arrowPosition = this._sortDefaultOptions?.arrowPosition;
20098
20129
  }
@@ -20140,6 +20171,9 @@ class SortHeaderComponent {
20140
20171
  this._focusMonitor.stopMonitoring(this._elementRef);
20141
20172
  this._sort?.deregister(this);
20142
20173
  this._rerenderSubscription?.unsubscribe();
20174
+ if (this._sortButton) {
20175
+ this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);
20176
+ }
20143
20177
  }
20144
20178
  _setIndicatorHintVisible(visible) {
20145
20179
  if (this._isDisabled && visible) {
@@ -20845,7 +20879,7 @@ class TableDataSource extends DataSource {
20845
20879
  }
20846
20880
  paginator.length = filteredDataLength;
20847
20881
  if (paginator.pageIndex > 0) {
20848
- const lastPageIndex = Math.ceil(paginator.length / paginator.pageSize) - 1 || 0;
20882
+ const lastPageIndex = Math.max(Math.ceil(paginator.length / paginator.pageSize) - 1, 0);
20849
20883
  const newPageIndex = Math.min(paginator.pageIndex, lastPageIndex);
20850
20884
  if (newPageIndex !== paginator.pageIndex) {
20851
20885
  paginator.pageIndex = newPageIndex;