@ethlete/cdk 5.0.0-next.36 → 5.0.0-next.38
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 +34 -0
- package/fesm2022/ethlete-cdk.mjs +80 -69
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/generators/migrate-from-cdk/components-classes.js +1117 -0
- package/generators/migrate-from-cdk/report.js +98 -3
- package/generators/migrate-from-cdk/templates.js +4 -5
- package/migration-map.json +46 -62
- package/migrations.json +3 -0
- package/package.json +12 -20
- package/types/ethlete-cdk.d.ts +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @ethlete/cdk
|
|
2
2
|
|
|
3
|
+
## 5.0.0-next.38
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- `et-accordion` no longer closes an accordion opened through `[isOpen]` when `isOpenByDefault` is false.
|
|
12
|
+
- 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.
|
|
13
|
+
- `createFormChangesTracker` and `createNavigationDismissChecker` report a form cleared to `null` as a change.
|
|
14
|
+
- `createFormChangesTracker().hasChanges` no longer reports the inverse, and both it and `createNavigationDismissChecker` now see a change to `''`, `0` or `false`.
|
|
15
|
+
- 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.
|
|
16
|
+
- 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`.
|
|
17
|
+
- `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.
|
|
18
|
+
- `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.
|
|
19
|
+
- Name the hostDirective wrapper case and the injection context of `queryButtonSourceFromV2Query` in the `QueryButton*` migration notes.
|
|
20
|
+
- `et-query-error` shows the default message instead of throwing when an error response carries an empty violation or message list.
|
|
21
|
+
- The `et-query-error` retry button no longer submits a surrounding form.
|
|
22
|
+
- 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.
|
|
23
|
+
- 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.
|
|
24
|
+
- 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.
|
|
25
|
+
- A destroyed sort header removes its screen-reader sort description from the document.
|
|
26
|
+
- 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.
|
|
27
|
+
- `AnimatedLifecycleDirective` gains a read-only `state` signal, and `state$` is now a read-only observable; read `state()` instead of `state$.value`.
|
|
28
|
+
- 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.
|
|
29
|
+
- Mark every migration with a `level`, so `et update` runs only the required ones.
|
|
30
|
+
|
|
31
|
+
## 5.0.0-next.37
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Combobox: pressing the clear button no longer blurs the input first, so a single click clears the value.
|
|
36
|
+
|
|
3
37
|
## 5.0.0-next.36
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/fesm2022/ethlete-cdk.mjs
CHANGED
|
@@ -253,7 +253,8 @@ class AccordionComponent {
|
|
|
253
253
|
const ref = effect(() => {
|
|
254
254
|
const isOpenByDefault = this.isOpenByDefault();
|
|
255
255
|
untracked(() => {
|
|
256
|
-
|
|
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 (
|
|
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
|
|
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 (
|
|
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
|
|
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
|
|
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()
|
|
11881
|
+
if (!canScrollHorizontally || this.visibleElementCount() <= MIN_ITEMS_TO_RENDER) {
|
|
11881
11882
|
return;
|
|
11882
11883
|
}
|
|
11883
11884
|
this.visibleElementCount.update((v) => v - 1);
|
|
@@ -15105,10 +15106,9 @@ class SelectionModel {
|
|
|
15105
15106
|
if (allowMultiple) {
|
|
15106
15107
|
return selection.map((option) => this.execFnOrGetOptionProperty(option, valueBinding));
|
|
15107
15108
|
}
|
|
15108
|
-
|
|
15109
|
-
if (!option)
|
|
15109
|
+
if (!selection.length)
|
|
15110
15110
|
return null;
|
|
15111
|
-
return this.execFnOrGetOptionProperty(
|
|
15111
|
+
return this.execFnOrGetOptionProperty(selection[0], valueBinding);
|
|
15112
15112
|
}));
|
|
15113
15113
|
this.filteredOptions$ = combineLatest([this.options$, this.filter$, this.labelBinding$]).pipe(map(([options, filter]) => this.getFilteredOptions(filter, options)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
15114
15114
|
this._optionsAndSelection$ = combineLatest([this._options$, this._selection$]);
|
|
@@ -15117,10 +15117,9 @@ class SelectionModel {
|
|
|
15117
15117
|
.pipe(tap(() => {
|
|
15118
15118
|
if (this.allowMultiple)
|
|
15119
15119
|
return;
|
|
15120
|
-
|
|
15121
|
-
if (!option)
|
|
15120
|
+
if (!this.selection.length)
|
|
15122
15121
|
return;
|
|
15123
|
-
this.setSelection([
|
|
15122
|
+
this.setSelection([this.selection[0]]);
|
|
15124
15123
|
}), takeUntilDestroyed())
|
|
15125
15124
|
.subscribe();
|
|
15126
15125
|
}
|
|
@@ -15138,7 +15137,7 @@ class SelectionModel {
|
|
|
15138
15137
|
}
|
|
15139
15138
|
else {
|
|
15140
15139
|
const selection = this.getOptionByValue(value);
|
|
15141
|
-
if (selection) {
|
|
15140
|
+
if (selection !== undefined) {
|
|
15142
15141
|
this.setSelection(selection);
|
|
15143
15142
|
}
|
|
15144
15143
|
else {
|
|
@@ -15247,42 +15246,42 @@ class SelectionModel {
|
|
|
15247
15246
|
});
|
|
15248
15247
|
}
|
|
15249
15248
|
getOptionByIndex(index, options = this.getFilteredOptions()) {
|
|
15250
|
-
return options[index]
|
|
15249
|
+
return index >= 0 && index < options.length ? options[index] : null;
|
|
15251
15250
|
}
|
|
15252
15251
|
getOptionByOffset(offset, index, config = { clamp: true }) {
|
|
15253
15252
|
const { loop, clamp, skipDisabled, options = this.getFilteredOptions() } = config;
|
|
15254
|
-
const
|
|
15255
|
-
|
|
15256
|
-
|
|
15257
|
-
|
|
15258
|
-
if (
|
|
15259
|
-
|
|
15260
|
-
|
|
15261
|
-
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15267
|
-
|
|
15268
|
-
|
|
15269
|
-
|
|
15270
|
-
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15274
|
-
|
|
15275
|
-
|
|
15276
|
-
|
|
15277
|
-
|
|
15278
|
-
|
|
15279
|
-
|
|
15280
|
-
|
|
15281
|
-
|
|
15282
|
-
|
|
15283
|
-
|
|
15253
|
+
const length = options.length;
|
|
15254
|
+
if (!length)
|
|
15255
|
+
return null;
|
|
15256
|
+
const resolveIndex = (i) => {
|
|
15257
|
+
if (i >= 0 && i < length)
|
|
15258
|
+
return i;
|
|
15259
|
+
if (loop)
|
|
15260
|
+
return ((i % length) + length) % length;
|
|
15261
|
+
if (clamp)
|
|
15262
|
+
return i < 0 ? 0 : length - 1;
|
|
15263
|
+
return null;
|
|
15264
|
+
};
|
|
15265
|
+
let newIndex = resolveIndex(index + offset);
|
|
15266
|
+
if (!skipDisabled)
|
|
15267
|
+
return newIndex === null ? null : this.getOptionByIndex(newIndex, options);
|
|
15268
|
+
const step = offset < 0 ? -1 : 1;
|
|
15269
|
+
for (let attempt = 0; attempt < length && newIndex !== null; attempt++) {
|
|
15270
|
+
const option = options[newIndex];
|
|
15271
|
+
if (!this.isDisabled(option))
|
|
15272
|
+
return option;
|
|
15273
|
+
const nextIndex = newIndex + step;
|
|
15274
|
+
newIndex = nextIndex >= 0 && nextIndex < length ? nextIndex : loop ? resolveIndex(nextIndex) : null;
|
|
15275
|
+
}
|
|
15276
|
+
if (!clamp || loop)
|
|
15277
|
+
return null;
|
|
15278
|
+
const clampedTarget = resolveIndex(index + offset);
|
|
15279
|
+
for (let i = clampedTarget - step; i >= 0 && i < length; i -= step) {
|
|
15280
|
+
const option = options[i];
|
|
15281
|
+
if (!this.isDisabled(option))
|
|
15282
|
+
return option;
|
|
15284
15283
|
}
|
|
15285
|
-
return
|
|
15284
|
+
return null;
|
|
15286
15285
|
}
|
|
15287
15286
|
getFirstOption(options = this.getFilteredOptions()) {
|
|
15288
15287
|
return this.getOptionByIndex(0, options);
|
|
@@ -15298,7 +15297,7 @@ class SelectionModel {
|
|
|
15298
15297
|
getNonMultipleSelectedOption() {
|
|
15299
15298
|
if (this.allowMultiple)
|
|
15300
15299
|
return null;
|
|
15301
|
-
return this.selection[0]
|
|
15300
|
+
return this.selection.length ? this.selection[0] : null;
|
|
15302
15301
|
}
|
|
15303
15302
|
getNonMultipleSelectedOptionIndex() {
|
|
15304
15303
|
if (this.allowMultiple)
|
|
@@ -16587,7 +16586,7 @@ class ComboboxComponent extends DecoratedInputBase {
|
|
|
16587
16586
|
this.combobox.setBodyComponent(ComboboxBodyComponent);
|
|
16588
16587
|
}
|
|
16589
16588
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ComboboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16590
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: ComboboxComponent, isStandalone: true, selector: "et-combobox", host: { listeners: { "click": "combobox.selectInputAndOpen()" }, classAttribute: "et-combobox et-legacy" }, providers: [provideIcons(CHEVRON_ICON, TIMES_ICON)], usesInheritance: true, hostDirectives: [{ directive: AnimatedOverlayDirective }, { directive: OverlayCloseBlockerDirective }, { directive: InputDirective, inputs: ["placeholder", "placeholder"] }, { directive: ComboboxDirective, inputs: ["options", "options", "initialValue", "initialValue", "filterInternal", "filterInternal", "loading", "loading", "error", "error", "placeholder", "placeholder", "multiple", "multiple", "bindLabel", "bindLabel", "bindValue", "bindValue", "bindDisabled", "bindDisabled", "allowCustomValues", "allowCustomValues", "selectedOptionComponent", "selectedOptionComponent", "optionComponent", "optionComponent", "bodyErrorComponent", "bodyErrorComponent", "bodyLoadingComponent", "bodyLoadingComponent", "bodyEmptyComponent", "bodyEmptyComponent", "bodyMoreItemsHintComponent", "bodyMoreItemsHintComponent", "showBodyMoreItemsHint", "showBodyMoreItemsHint", "bodyEmptyText", "bodyEmptyText", "bodyMoreItemsHintText", "bodyMoreItemsHintText", "optionComponentInputs", "optionComponentInputs", "selectedOptionComponentInputs", "selectedOptionComponentInputs", "bodyErrorComponentInputs", "bodyErrorComponentInputs", "bodyLoadingComponentInputs", "bodyLoadingComponentInputs", "bodyEmptyComponentInputs", "bodyEmptyComponentInputs", "bodyMoreItemsHintComponentInputs", "bodyMoreItemsHintComponentInputs"], outputs: ["filterChange", "filterChange", "optionClick", "optionClick", "userInteraction", "userInteraction"] }], ngImport: i0, template: "<ng-content select=\"[etInputPrefix]\" />\n\n<div>\n @if (combobox.multiple$ | async) {\n <div class=\"et-combobox-selected-options\">\n @for (item of combobox.selectedOptions$ | async; track combobox.trackByOptionKeyFn($index, item)) {\n <div class=\"et-combobox-selected-option\" aria-hidden=\"true\">\n @if (combobox.customSelectedOptionTpl$ | async; as customSelectedOptionTpl) {\n <ng-container *ngTemplateOutlet=\"customSelectedOptionTpl; context: { option: item }\" />\n } @else {\n @if (combobox.selectedOptionComponent(); as comp) {\n <ng-container\n *ngComponentOutlet=\"comp; inputs: combobox.combineSelectedOptionWithComponentInputs(item)\"\n />\n } @else {\n {{ combobox.getOptionLabel(item) | async }}\n }\n }\n\n <button\n [disabled]=\"input.disabled\"\n (click)=\"combobox.removeSelectedOption(item); $event.stopPropagation(); combobox.focus()\"\n class=\"et-combobox-selected-option-remove\"\n tabindex=\"-1\"\n type=\"button\"\n >\n x\n </button>\n </div>\n }\n <div class=\"et-combobox-muliple-input\">\n <ng-container *ngTemplateOutlet=\"inputTpl\" />\n </div>\n </div>\n }\n\n <ng-template #inputTpl>\n <input\n [disabled]=\"input.disabled\"\n [attr.id]=\"input.id\"\n [attr.aria-required]=\"(input.required$ | async) || null\"\n [attr.aria-disabled]=\"(input.disabled$ | async) || null\"\n [attr.aria-invalid]=\"(input.invalid$ | async) || null\"\n [attr.aria-expanded]=\"combobox.isOpen$ | async\"\n [attr.aria-describedby]=\"input.describedBy$ | async\"\n [attr.placeholder]=\"input.placeholder() || null\"\n [attr.aria-activedescendant]=\"combobox.activeOptionId$ | async\"\n [attr.aria-controls]=\"(combobox.selectBodyId$ | async) || null\"\n [attr.aria-owns]=\"(combobox.selectBodyId$ | async) || null\"\n (keydown)=\"combobox._processKeydownEvent($event)\"\n (keyup)=\"combobox._processKeyupEvent()\"\n (click)=\"combobox.open()\"\n (blur)=\"combobox._handleBlurEvent()\"\n (input)=\"combobox._processInputEvent($event)\"\n class=\"et-combobox-wrapper\"\n autocomplete=\"off\"\n aria-haspopup=\"listbox\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n type=\"text\"\n value=\"{{ combobox.currentFilter }}\"\n etNativeInputRef\n />\n </ng-template>\n\n @if ((combobox.multiple$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"inputTpl\" />\n }\n\n @if (\n ((combobox.multiple$ | async) === false && combobox.currentFilter) || (combobox.selectedOptions$ | async)?.length\n ) {\n <button\n [disabled]=\"input.disabled\"\n (click)=\"combobox.clearValue(); $event.stopPropagation(); combobox.focus()\"\n class=\"et-combobox-clear\"\n tabindex=\"-1\"\n type=\"button\"\n >\n <i class=\"et-combobox-clear-icon\" etIcon=\"et-times\"></i>\n </button>\n }\n <i class=\"et-combobox-chevron\" etIcon=\"et-chevron\"></i>\n</div>\n\n<ng-content select=\"[etInputSuffix]\" />\n\n<ng-template>\n <ng-content />\n</ng-template>\n", styles: [".et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-enter-from,.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-leave-to{opacity:0;transform:scaleY(0)}.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-enter-active{transition:transform 125ms var(--ease-out-5),opacity 125ms var(--ease-out-5)}.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-leave-active{transition:transform 50ms var(--ease-in-5),opacity 50ms var(--ease-in-5)}.et-combobox-body.et-with-default-animation[et-floating-placement^=top] .et-combobox-body-container{transform-origin:bottom}.et-combobox-body.et-with-default-animation[et-floating-placement^=bottom] .et-combobox-body-container{transform-origin:top}.et-combobox-body-container{display:block;background-color:#3d3d3d;color:#fff;max-height:min(200px,var(--et-floating-max-height, 200px));overflow:auto}.et-combobox-body{width:100%;display:grid;transform:var(--et-floating-translate);will-change:transform}.et-combobox-option{display:block}:where(.et-combobox-option--active){background-color:#1e1e1e}.et-combobox{display:block;border:1px solid #ccc;padding:15px;position:relative}.et-combobox-chevron{transform:rotate(180deg);display:block;inline-size:15px;block-size:15px;position:absolute;inset-inline-end:15px;inset-block-start:7px}:where(.et-combobox-clear){display:block;inline-size:15px;block-size:15px;position:absolute;inset-inline-end:40px;inset-block-start:7px;background-color:transparent;border:none;color:#fff;padding:0}:where(.et-combobox-clear) .et-times-icon{display:block;inline-size:15px;block-size:15px}\n"], dependencies: [{ kind: "directive", type: NativeInputRefDirective, selector: "input[etNativeInputRef], textarea[etNativeInputRef], select[etNativeInputRef], button[etNativeInputRef]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: IconDirective, selector: "[etIcon]", inputs: ["etIcon", "allowHardcodedColor"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
16589
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: ComboboxComponent, isStandalone: true, selector: "et-combobox", host: { listeners: { "click": "combobox.selectInputAndOpen()" }, classAttribute: "et-combobox et-legacy" }, providers: [provideIcons(CHEVRON_ICON, TIMES_ICON)], usesInheritance: true, hostDirectives: [{ directive: AnimatedOverlayDirective }, { directive: OverlayCloseBlockerDirective }, { directive: InputDirective, inputs: ["placeholder", "placeholder"] }, { directive: ComboboxDirective, inputs: ["options", "options", "initialValue", "initialValue", "filterInternal", "filterInternal", "loading", "loading", "error", "error", "placeholder", "placeholder", "multiple", "multiple", "bindLabel", "bindLabel", "bindValue", "bindValue", "bindDisabled", "bindDisabled", "allowCustomValues", "allowCustomValues", "selectedOptionComponent", "selectedOptionComponent", "optionComponent", "optionComponent", "bodyErrorComponent", "bodyErrorComponent", "bodyLoadingComponent", "bodyLoadingComponent", "bodyEmptyComponent", "bodyEmptyComponent", "bodyMoreItemsHintComponent", "bodyMoreItemsHintComponent", "showBodyMoreItemsHint", "showBodyMoreItemsHint", "bodyEmptyText", "bodyEmptyText", "bodyMoreItemsHintText", "bodyMoreItemsHintText", "optionComponentInputs", "optionComponentInputs", "selectedOptionComponentInputs", "selectedOptionComponentInputs", "bodyErrorComponentInputs", "bodyErrorComponentInputs", "bodyLoadingComponentInputs", "bodyLoadingComponentInputs", "bodyEmptyComponentInputs", "bodyEmptyComponentInputs", "bodyMoreItemsHintComponentInputs", "bodyMoreItemsHintComponentInputs"], outputs: ["filterChange", "filterChange", "optionClick", "optionClick", "userInteraction", "userInteraction"] }], ngImport: i0, template: "<ng-content select=\"[etInputPrefix]\" />\n\n<div>\n @if (combobox.multiple$ | async) {\n <div class=\"et-combobox-selected-options\">\n @for (item of combobox.selectedOptions$ | async; track combobox.trackByOptionKeyFn($index, item)) {\n <div class=\"et-combobox-selected-option\" aria-hidden=\"true\">\n @if (combobox.customSelectedOptionTpl$ | async; as customSelectedOptionTpl) {\n <ng-container *ngTemplateOutlet=\"customSelectedOptionTpl; context: { option: item }\" />\n } @else {\n @if (combobox.selectedOptionComponent(); as comp) {\n <ng-container\n *ngComponentOutlet=\"comp; inputs: combobox.combineSelectedOptionWithComponentInputs(item)\"\n />\n } @else {\n {{ combobox.getOptionLabel(item) | async }}\n }\n }\n\n <button\n [disabled]=\"input.disabled\"\n (click)=\"combobox.removeSelectedOption(item); $event.stopPropagation(); combobox.focus()\"\n class=\"et-combobox-selected-option-remove\"\n tabindex=\"-1\"\n type=\"button\"\n >\n x\n </button>\n </div>\n }\n <div class=\"et-combobox-muliple-input\">\n <ng-container *ngTemplateOutlet=\"inputTpl\" />\n </div>\n </div>\n }\n\n <ng-template #inputTpl>\n <input\n [disabled]=\"input.disabled\"\n [attr.id]=\"input.id\"\n [attr.aria-required]=\"(input.required$ | async) || null\"\n [attr.aria-disabled]=\"(input.disabled$ | async) || null\"\n [attr.aria-invalid]=\"(input.invalid$ | async) || null\"\n [attr.aria-expanded]=\"combobox.isOpen$ | async\"\n [attr.aria-describedby]=\"input.describedBy$ | async\"\n [attr.placeholder]=\"input.placeholder() || null\"\n [attr.aria-activedescendant]=\"combobox.activeOptionId$ | async\"\n [attr.aria-controls]=\"(combobox.selectBodyId$ | async) || null\"\n [attr.aria-owns]=\"(combobox.selectBodyId$ | async) || null\"\n (keydown)=\"combobox._processKeydownEvent($event)\"\n (keyup)=\"combobox._processKeyupEvent()\"\n (click)=\"combobox.open()\"\n (blur)=\"combobox._handleBlurEvent()\"\n (input)=\"combobox._processInputEvent($event)\"\n class=\"et-combobox-wrapper\"\n autocomplete=\"off\"\n aria-haspopup=\"listbox\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n type=\"text\"\n value=\"{{ combobox.currentFilter }}\"\n etNativeInputRef\n />\n </ng-template>\n\n @if ((combobox.multiple$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"inputTpl\" />\n }\n\n @if (\n ((combobox.multiple$ | async) === false && combobox.currentFilter) || (combobox.selectedOptions$ | async)?.length\n ) {\n <button\n [disabled]=\"input.disabled\"\n (click)=\"combobox.clearValue(); $event.stopPropagation(); combobox.focus()\"\n (mousedown)=\"$event.preventDefault()\"\n class=\"et-combobox-clear\"\n tabindex=\"-1\"\n type=\"button\"\n >\n <i class=\"et-combobox-clear-icon\" etIcon=\"et-times\"></i>\n </button>\n }\n <i class=\"et-combobox-chevron\" etIcon=\"et-chevron\"></i>\n</div>\n\n<ng-content select=\"[etInputSuffix]\" />\n\n<ng-template>\n <ng-content />\n</ng-template>\n", styles: [".et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-enter-from,.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-leave-to{opacity:0;transform:scaleY(0)}.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-enter-active{transition:transform 125ms var(--ease-out-5),opacity 125ms var(--ease-out-5)}.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-leave-active{transition:transform 50ms var(--ease-in-5),opacity 50ms var(--ease-in-5)}.et-combobox-body.et-with-default-animation[et-floating-placement^=top] .et-combobox-body-container{transform-origin:bottom}.et-combobox-body.et-with-default-animation[et-floating-placement^=bottom] .et-combobox-body-container{transform-origin:top}.et-combobox-body-container{display:block;background-color:#3d3d3d;color:#fff;max-height:min(200px,var(--et-floating-max-height, 200px));overflow:auto}.et-combobox-body{width:100%;display:grid;transform:var(--et-floating-translate);will-change:transform}.et-combobox-option{display:block}:where(.et-combobox-option--active){background-color:#1e1e1e}.et-combobox{display:block;border:1px solid #ccc;padding:15px;position:relative}.et-combobox-chevron{transform:rotate(180deg);display:block;inline-size:15px;block-size:15px;position:absolute;inset-inline-end:15px;inset-block-start:7px}:where(.et-combobox-clear){display:block;inline-size:15px;block-size:15px;position:absolute;inset-inline-end:40px;inset-block-start:7px;background-color:transparent;border:none;color:#fff;padding:0}:where(.et-combobox-clear) .et-times-icon{display:block;inline-size:15px;block-size:15px}\n"], dependencies: [{ kind: "directive", type: NativeInputRefDirective, selector: "input[etNativeInputRef], textarea[etNativeInputRef], select[etNativeInputRef], button[etNativeInputRef]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: IconDirective, selector: "[etIcon]", inputs: ["etIcon", "allowHardcodedColor"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
16591
16590
|
}
|
|
16592
16591
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ComboboxComponent, decorators: [{
|
|
16593
16592
|
type: Component,
|
|
@@ -16630,7 +16629,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
16630
16629
|
],
|
|
16631
16630
|
outputs: ['filterChange', 'optionClick', 'userInteraction'],
|
|
16632
16631
|
},
|
|
16633
|
-
], providers: [provideIcons(CHEVRON_ICON, TIMES_ICON)], template: "<ng-content select=\"[etInputPrefix]\" />\n\n<div>\n @if (combobox.multiple$ | async) {\n <div class=\"et-combobox-selected-options\">\n @for (item of combobox.selectedOptions$ | async; track combobox.trackByOptionKeyFn($index, item)) {\n <div class=\"et-combobox-selected-option\" aria-hidden=\"true\">\n @if (combobox.customSelectedOptionTpl$ | async; as customSelectedOptionTpl) {\n <ng-container *ngTemplateOutlet=\"customSelectedOptionTpl; context: { option: item }\" />\n } @else {\n @if (combobox.selectedOptionComponent(); as comp) {\n <ng-container\n *ngComponentOutlet=\"comp; inputs: combobox.combineSelectedOptionWithComponentInputs(item)\"\n />\n } @else {\n {{ combobox.getOptionLabel(item) | async }}\n }\n }\n\n <button\n [disabled]=\"input.disabled\"\n (click)=\"combobox.removeSelectedOption(item); $event.stopPropagation(); combobox.focus()\"\n class=\"et-combobox-selected-option-remove\"\n tabindex=\"-1\"\n type=\"button\"\n >\n x\n </button>\n </div>\n }\n <div class=\"et-combobox-muliple-input\">\n <ng-container *ngTemplateOutlet=\"inputTpl\" />\n </div>\n </div>\n }\n\n <ng-template #inputTpl>\n <input\n [disabled]=\"input.disabled\"\n [attr.id]=\"input.id\"\n [attr.aria-required]=\"(input.required$ | async) || null\"\n [attr.aria-disabled]=\"(input.disabled$ | async) || null\"\n [attr.aria-invalid]=\"(input.invalid$ | async) || null\"\n [attr.aria-expanded]=\"combobox.isOpen$ | async\"\n [attr.aria-describedby]=\"input.describedBy$ | async\"\n [attr.placeholder]=\"input.placeholder() || null\"\n [attr.aria-activedescendant]=\"combobox.activeOptionId$ | async\"\n [attr.aria-controls]=\"(combobox.selectBodyId$ | async) || null\"\n [attr.aria-owns]=\"(combobox.selectBodyId$ | async) || null\"\n (keydown)=\"combobox._processKeydownEvent($event)\"\n (keyup)=\"combobox._processKeyupEvent()\"\n (click)=\"combobox.open()\"\n (blur)=\"combobox._handleBlurEvent()\"\n (input)=\"combobox._processInputEvent($event)\"\n class=\"et-combobox-wrapper\"\n autocomplete=\"off\"\n aria-haspopup=\"listbox\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n type=\"text\"\n value=\"{{ combobox.currentFilter }}\"\n etNativeInputRef\n />\n </ng-template>\n\n @if ((combobox.multiple$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"inputTpl\" />\n }\n\n @if (\n ((combobox.multiple$ | async) === false && combobox.currentFilter) || (combobox.selectedOptions$ | async)?.length\n ) {\n <button\n [disabled]=\"input.disabled\"\n (click)=\"combobox.clearValue(); $event.stopPropagation(); combobox.focus()\"\n class=\"et-combobox-clear\"\n tabindex=\"-1\"\n type=\"button\"\n >\n <i class=\"et-combobox-clear-icon\" etIcon=\"et-times\"></i>\n </button>\n }\n <i class=\"et-combobox-chevron\" etIcon=\"et-chevron\"></i>\n</div>\n\n<ng-content select=\"[etInputSuffix]\" />\n\n<ng-template>\n <ng-content />\n</ng-template>\n", styles: [".et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-enter-from,.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-leave-to{opacity:0;transform:scaleY(0)}.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-enter-active{transition:transform 125ms var(--ease-out-5),opacity 125ms var(--ease-out-5)}.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-leave-active{transition:transform 50ms var(--ease-in-5),opacity 50ms var(--ease-in-5)}.et-combobox-body.et-with-default-animation[et-floating-placement^=top] .et-combobox-body-container{transform-origin:bottom}.et-combobox-body.et-with-default-animation[et-floating-placement^=bottom] .et-combobox-body-container{transform-origin:top}.et-combobox-body-container{display:block;background-color:#3d3d3d;color:#fff;max-height:min(200px,var(--et-floating-max-height, 200px));overflow:auto}.et-combobox-body{width:100%;display:grid;transform:var(--et-floating-translate);will-change:transform}.et-combobox-option{display:block}:where(.et-combobox-option--active){background-color:#1e1e1e}.et-combobox{display:block;border:1px solid #ccc;padding:15px;position:relative}.et-combobox-chevron{transform:rotate(180deg);display:block;inline-size:15px;block-size:15px;position:absolute;inset-inline-end:15px;inset-block-start:7px}:where(.et-combobox-clear){display:block;inline-size:15px;block-size:15px;position:absolute;inset-inline-end:40px;inset-block-start:7px;background-color:transparent;border:none;color:#fff;padding:0}:where(.et-combobox-clear) .et-times-icon{display:block;inline-size:15px;block-size:15px}\n"] }]
|
|
16632
|
+
], providers: [provideIcons(CHEVRON_ICON, TIMES_ICON)], template: "<ng-content select=\"[etInputPrefix]\" />\n\n<div>\n @if (combobox.multiple$ | async) {\n <div class=\"et-combobox-selected-options\">\n @for (item of combobox.selectedOptions$ | async; track combobox.trackByOptionKeyFn($index, item)) {\n <div class=\"et-combobox-selected-option\" aria-hidden=\"true\">\n @if (combobox.customSelectedOptionTpl$ | async; as customSelectedOptionTpl) {\n <ng-container *ngTemplateOutlet=\"customSelectedOptionTpl; context: { option: item }\" />\n } @else {\n @if (combobox.selectedOptionComponent(); as comp) {\n <ng-container\n *ngComponentOutlet=\"comp; inputs: combobox.combineSelectedOptionWithComponentInputs(item)\"\n />\n } @else {\n {{ combobox.getOptionLabel(item) | async }}\n }\n }\n\n <button\n [disabled]=\"input.disabled\"\n (click)=\"combobox.removeSelectedOption(item); $event.stopPropagation(); combobox.focus()\"\n class=\"et-combobox-selected-option-remove\"\n tabindex=\"-1\"\n type=\"button\"\n >\n x\n </button>\n </div>\n }\n <div class=\"et-combobox-muliple-input\">\n <ng-container *ngTemplateOutlet=\"inputTpl\" />\n </div>\n </div>\n }\n\n <ng-template #inputTpl>\n <input\n [disabled]=\"input.disabled\"\n [attr.id]=\"input.id\"\n [attr.aria-required]=\"(input.required$ | async) || null\"\n [attr.aria-disabled]=\"(input.disabled$ | async) || null\"\n [attr.aria-invalid]=\"(input.invalid$ | async) || null\"\n [attr.aria-expanded]=\"combobox.isOpen$ | async\"\n [attr.aria-describedby]=\"input.describedBy$ | async\"\n [attr.placeholder]=\"input.placeholder() || null\"\n [attr.aria-activedescendant]=\"combobox.activeOptionId$ | async\"\n [attr.aria-controls]=\"(combobox.selectBodyId$ | async) || null\"\n [attr.aria-owns]=\"(combobox.selectBodyId$ | async) || null\"\n (keydown)=\"combobox._processKeydownEvent($event)\"\n (keyup)=\"combobox._processKeyupEvent()\"\n (click)=\"combobox.open()\"\n (blur)=\"combobox._handleBlurEvent()\"\n (input)=\"combobox._processInputEvent($event)\"\n class=\"et-combobox-wrapper\"\n autocomplete=\"off\"\n aria-haspopup=\"listbox\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n type=\"text\"\n value=\"{{ combobox.currentFilter }}\"\n etNativeInputRef\n />\n </ng-template>\n\n @if ((combobox.multiple$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"inputTpl\" />\n }\n\n @if (\n ((combobox.multiple$ | async) === false && combobox.currentFilter) || (combobox.selectedOptions$ | async)?.length\n ) {\n <button\n [disabled]=\"input.disabled\"\n (click)=\"combobox.clearValue(); $event.stopPropagation(); combobox.focus()\"\n (mousedown)=\"$event.preventDefault()\"\n class=\"et-combobox-clear\"\n tabindex=\"-1\"\n type=\"button\"\n >\n <i class=\"et-combobox-clear-icon\" etIcon=\"et-times\"></i>\n </button>\n }\n <i class=\"et-combobox-chevron\" etIcon=\"et-chevron\"></i>\n</div>\n\n<ng-content select=\"[etInputSuffix]\" />\n\n<ng-template>\n <ng-content />\n</ng-template>\n", styles: [".et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-enter-from,.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-leave-to{opacity:0;transform:scaleY(0)}.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-enter-active{transition:transform 125ms var(--ease-out-5),opacity 125ms var(--ease-out-5)}.et-combobox-body.et-with-default-animation .et-combobox-body-container.et-animation-leave-active{transition:transform 50ms var(--ease-in-5),opacity 50ms var(--ease-in-5)}.et-combobox-body.et-with-default-animation[et-floating-placement^=top] .et-combobox-body-container{transform-origin:bottom}.et-combobox-body.et-with-default-animation[et-floating-placement^=bottom] .et-combobox-body-container{transform-origin:top}.et-combobox-body-container{display:block;background-color:#3d3d3d;color:#fff;max-height:min(200px,var(--et-floating-max-height, 200px));overflow:auto}.et-combobox-body{width:100%;display:grid;transform:var(--et-floating-translate);will-change:transform}.et-combobox-option{display:block}:where(.et-combobox-option--active){background-color:#1e1e1e}.et-combobox{display:block;border:1px solid #ccc;padding:15px;position:relative}.et-combobox-chevron{transform:rotate(180deg);display:block;inline-size:15px;block-size:15px;position:absolute;inset-inline-end:15px;inset-block-start:7px}:where(.et-combobox-clear){display:block;inline-size:15px;block-size:15px;position:absolute;inset-inline-end:40px;inset-block-start:7px;background-color:transparent;border:none;color:#fff;padding:0}:where(.et-combobox-clear) .et-times-icon{display:block;inline-size:15px;block-size:15px}\n"] }]
|
|
16634
16633
|
}], ctorParameters: () => [] });
|
|
16635
16634
|
|
|
16636
16635
|
/**
|
|
@@ -18270,7 +18269,7 @@ class MasonryItemComponent {
|
|
|
18270
18269
|
return this._isPositioned$.getValue();
|
|
18271
18270
|
}
|
|
18272
18271
|
ngAfterViewInit() {
|
|
18273
|
-
if (
|
|
18272
|
+
if (this.key === undefined || this.key === null || this.key === '') {
|
|
18274
18273
|
throw new Error('MasonryItemComponent: @Input() key is required');
|
|
18275
18274
|
}
|
|
18276
18275
|
this._initialDimensions = this.dimensions;
|
|
@@ -18427,7 +18426,7 @@ class MasonryComponent {
|
|
|
18427
18426
|
if (!config?.partial || !state.isInitialized) {
|
|
18428
18427
|
state.preferredColumnWidth = this.columWidth;
|
|
18429
18428
|
state.hostDimensions = this._getHostDimensions();
|
|
18430
|
-
state.columns = Math.floor(state.hostDimensions.width / this.columWidth);
|
|
18429
|
+
state.columns = Math.max(1, Math.floor(state.hostDimensions.width / this.columWidth));
|
|
18431
18430
|
state.gap = this.gap;
|
|
18432
18431
|
state.itemCount = items.length;
|
|
18433
18432
|
state.columnWidth = (state.hostDimensions.width - (state.columns - 1) * state.gap) / state.columns;
|
|
@@ -18814,11 +18813,12 @@ class TooltipDirective {
|
|
|
18814
18813
|
set tooltip(v) {
|
|
18815
18814
|
this._tooltip = v;
|
|
18816
18815
|
this._updateAriaDescription();
|
|
18816
|
+
this._removeListeners();
|
|
18817
18817
|
if (v) {
|
|
18818
18818
|
this._addListeners();
|
|
18819
18819
|
}
|
|
18820
|
-
else {
|
|
18821
|
-
this.
|
|
18820
|
+
else if (this.animatedOverlay.canUnmount()) {
|
|
18821
|
+
this.animatedOverlay.unmount();
|
|
18822
18822
|
}
|
|
18823
18823
|
}
|
|
18824
18824
|
// TODO: Skipped for migration because:
|
|
@@ -19128,7 +19128,9 @@ const paginate = (value) => {
|
|
|
19128
19128
|
}
|
|
19129
19129
|
const { omitFirstLast = false, omitPreviousNext = false, pagesBeforeAfter = 2, firstPage = 1 } = value;
|
|
19130
19130
|
const pages = [];
|
|
19131
|
-
const activePage =
|
|
19131
|
+
const activePage = Number.isFinite(value.currentPage)
|
|
19132
|
+
? clamp(Math.floor(value.currentPage), firstPage, value.totalPageCount)
|
|
19133
|
+
: firstPage;
|
|
19132
19134
|
if (value.totalPageCount === 0) {
|
|
19133
19135
|
return null;
|
|
19134
19136
|
}
|
|
@@ -19159,7 +19161,7 @@ const paginate = (value) => {
|
|
|
19159
19161
|
page: activePage - 1,
|
|
19160
19162
|
current: false,
|
|
19161
19163
|
ariaLabel: `Previous page`,
|
|
19162
|
-
disabled: activePage ===
|
|
19164
|
+
disabled: activePage === firstPage,
|
|
19163
19165
|
type: 'hotLink',
|
|
19164
19166
|
explicitType: 'previous',
|
|
19165
19167
|
url: createUrl(activePage - 1),
|
|
@@ -19358,6 +19360,7 @@ const provideImageConfig = (config = {}) => {
|
|
|
19358
19360
|
useValue: config,
|
|
19359
19361
|
};
|
|
19360
19362
|
};
|
|
19363
|
+
const splitSrcset = (srcset) => srcset.split(/,\s+|(?<=\s[\d.]+[wx]),/);
|
|
19361
19364
|
/**
|
|
19362
19365
|
* @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
19366
|
*/
|
|
@@ -19368,7 +19371,7 @@ const extractFirstImageUrl = (source) => {
|
|
|
19368
19371
|
if (srcString.trimStart().startsWith('data:')) {
|
|
19369
19372
|
return srcString.trim() || null;
|
|
19370
19373
|
}
|
|
19371
|
-
const srcsetParts = srcString
|
|
19374
|
+
const srcsetParts = splitSrcset(srcString).map((part) => part.trim());
|
|
19372
19375
|
if (srcsetParts.length > 0) {
|
|
19373
19376
|
const firstPart = srcsetParts[0];
|
|
19374
19377
|
const url = firstPart?.split(' ')[0] || null;
|
|
@@ -19449,14 +19452,21 @@ class PictureComponent {
|
|
|
19449
19452
|
...(ngDevMode ? [{ debugName: "defaultSrcFallbackUrl" }] : /* istanbul ignore next */ []));
|
|
19450
19453
|
}
|
|
19451
19454
|
_combineWithConfig(src) {
|
|
19452
|
-
|
|
19455
|
+
const baseUrl = this._config?.baseUrl;
|
|
19456
|
+
if (!baseUrl || src.srcset.startsWith('data:')) {
|
|
19453
19457
|
return src;
|
|
19454
19458
|
}
|
|
19455
|
-
const
|
|
19456
|
-
|
|
19457
|
-
|
|
19458
|
-
|
|
19459
|
-
|
|
19459
|
+
const srcset = src.srcset
|
|
19460
|
+
.split(/,\s+|(?<=\s[\d.]+[wx]),/)
|
|
19461
|
+
.map((candidate) => {
|
|
19462
|
+
const url = candidate.trim();
|
|
19463
|
+
if (!url || url.startsWith('http'))
|
|
19464
|
+
return url;
|
|
19465
|
+
const shouldAppendSlash = !baseUrl.endsWith('/') && !url.startsWith('/');
|
|
19466
|
+
return `${baseUrl}${shouldAppendSlash ? '/' : ''}${url}`;
|
|
19467
|
+
})
|
|
19468
|
+
.join(', ');
|
|
19469
|
+
return { ...src, srcset };
|
|
19460
19470
|
}
|
|
19461
19471
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: PictureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19462
19472
|
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 +19638,7 @@ class QueryErrorDirective {
|
|
|
19628
19638
|
else if (typeof detail === 'string') {
|
|
19629
19639
|
errorList.items.push({ message: detail });
|
|
19630
19640
|
}
|
|
19631
|
-
|
|
19641
|
+
if (!errorList.items.length) {
|
|
19632
19642
|
errorList.items.push({ message: defaultErrorMessage });
|
|
19633
19643
|
}
|
|
19634
19644
|
errorList.isList = errorList.items.length > 1;
|
|
@@ -19683,13 +19693,13 @@ class QueryErrorComponent {
|
|
|
19683
19693
|
extractQuery(this.host.query())?.execute({ skipCache: true });
|
|
19684
19694
|
}
|
|
19685
19695
|
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 }); }
|
|
19696
|
+
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
19697
|
}
|
|
19688
19698
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: QueryErrorComponent, decorators: [{
|
|
19689
19699
|
type: Component,
|
|
19690
19700
|
args: [{ selector: 'et-query-error', encapsulation: ViewEncapsulation.None, host: {
|
|
19691
19701
|
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" }]
|
|
19702
|
+
}, 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
19703
|
}] });
|
|
19694
19704
|
|
|
19695
19705
|
/**
|
|
@@ -19855,7 +19865,6 @@ class SortDirective {
|
|
|
19855
19865
|
this.disabled = false;
|
|
19856
19866
|
this.start = 'asc';
|
|
19857
19867
|
this._direction = '';
|
|
19858
|
-
this.disableClear = false;
|
|
19859
19868
|
// eslint-disable-next-line @angular-eslint/no-output-rename
|
|
19860
19869
|
this.sortChange = new EventEmitter();
|
|
19861
19870
|
}
|
|
@@ -20092,7 +20101,6 @@ class SortHeaderComponent {
|
|
|
20092
20101
|
this.disabled = false;
|
|
20093
20102
|
this.arrowPosition = 'after';
|
|
20094
20103
|
this._sortActionDescription = 'Sort';
|
|
20095
|
-
this.disableClear = false;
|
|
20096
20104
|
if (this._sortDefaultOptions?.arrowPosition) {
|
|
20097
20105
|
this.arrowPosition = this._sortDefaultOptions?.arrowPosition;
|
|
20098
20106
|
}
|
|
@@ -20140,6 +20148,9 @@ class SortHeaderComponent {
|
|
|
20140
20148
|
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
20141
20149
|
this._sort?.deregister(this);
|
|
20142
20150
|
this._rerenderSubscription?.unsubscribe();
|
|
20151
|
+
if (this._sortButton) {
|
|
20152
|
+
this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);
|
|
20153
|
+
}
|
|
20143
20154
|
}
|
|
20144
20155
|
_setIndicatorHintVisible(visible) {
|
|
20145
20156
|
if (this._isDisabled && visible) {
|
|
@@ -20845,7 +20856,7 @@ class TableDataSource extends DataSource {
|
|
|
20845
20856
|
}
|
|
20846
20857
|
paginator.length = filteredDataLength;
|
|
20847
20858
|
if (paginator.pageIndex > 0) {
|
|
20848
|
-
const lastPageIndex = Math.ceil(paginator.length / paginator.pageSize) - 1
|
|
20859
|
+
const lastPageIndex = Math.max(Math.ceil(paginator.length / paginator.pageSize) - 1, 0);
|
|
20849
20860
|
const newPageIndex = Math.min(paginator.pageIndex, lastPageIndex);
|
|
20850
20861
|
if (newPageIndex !== paginator.pageIndex) {
|
|
20851
20862
|
paginator.pageIndex = newPageIndex;
|