@porscheinformatik/clr-addons 21.11.0 → 21.11.1
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.
|
@@ -14286,8 +14286,20 @@ class ClrStringFilterComponent {
|
|
|
14286
14286
|
this._lowerCaseValue = '';
|
|
14287
14287
|
this.inputChanges = new Subject();
|
|
14288
14288
|
this._changes = new Subject();
|
|
14289
|
+
this.isOpen = false;
|
|
14289
14290
|
filterContainer.setFilter(this);
|
|
14290
14291
|
this.restartDebounce();
|
|
14292
|
+
this.openChangeSubscription = filterContainer.openChange.subscribe((open) => {
|
|
14293
|
+
this.isOpen = open;
|
|
14294
|
+
if (open) {
|
|
14295
|
+
this.focusInput();
|
|
14296
|
+
}
|
|
14297
|
+
});
|
|
14298
|
+
}
|
|
14299
|
+
ngAfterViewInit() {
|
|
14300
|
+
if (this.isOpen) {
|
|
14301
|
+
this.focusInput();
|
|
14302
|
+
}
|
|
14291
14303
|
}
|
|
14292
14304
|
onInput(value) {
|
|
14293
14305
|
this.inputChanges.next(value);
|
|
@@ -14321,6 +14333,15 @@ class ClrStringFilterComponent {
|
|
|
14321
14333
|
}
|
|
14322
14334
|
ngOnDestroy() {
|
|
14323
14335
|
this.debounceSubscription.unsubscribe();
|
|
14336
|
+
this.openChangeSubscription.unsubscribe();
|
|
14337
|
+
}
|
|
14338
|
+
/**
|
|
14339
|
+
* Focuses the filter input. Deferred to a microtask because the popover
|
|
14340
|
+
* content (and therefore the input element) isn't rendered yet when the
|
|
14341
|
+
* `openChange` event fires or during `ngAfterViewInit`.
|
|
14342
|
+
*/
|
|
14343
|
+
focusInput() {
|
|
14344
|
+
Promise.resolve().then(() => this.inputRef?.nativeElement.focus());
|
|
14324
14345
|
}
|
|
14325
14346
|
/**
|
|
14326
14347
|
* (Re)subscribes to the input debounce pipeline, discarding any pending
|
|
@@ -14345,12 +14366,15 @@ class ClrStringFilterComponent {
|
|
|
14345
14366
|
}
|
|
14346
14367
|
}
|
|
14347
14368
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ClrStringFilterComponent, deps: [{ token: i1$2.ClrCommonStringsService }, { token: i1$2.ClrDatagridFilter }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14348
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.23", type: ClrStringFilterComponent, isStandalone: false, selector: "clr-string-filter", inputs: { property: ["clrProperty", "property"], placeholder: ["clrFilterPlaceholder", "placeholder"], value: ["clrFilterValue", "value"] }, outputs: { filterValueChange: "clrFilterValueChange" }, ngImport: i0, template: "<clr-filter-clear-button testId=\"string-filter-clear-button\" (clear)=\"clearFilter()\"></clr-filter-clear-button>\n<clr-input-container class=\"filter-selection\">\n <input\n clrInput\n type=\"text\"\n autocomplete=\"off\"\n name=\"value\"\n [(ngModel)]=\"inputValue\"\n (ngModelChange)=\"onInput($event)\"\n [placeholder]=\"placeholderValue\"\n [attr.aria-label]=\"placeholderValue\"\n data-testid=\"string-filter-input\"\n />\n</clr-input-container>\n", styles: [".filter-selection{margin-top:.5rem}\n"], dependencies: [{ kind: "directive", type: i2$7.ClrInput, selector: "[clrInput]" }, { kind: "component", type: i2$7.ClrInputContainer, selector: "clr-input-container" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClrFilterClearButtonComponent, selector: "clr-filter-clear-button", inputs: ["testId"], outputs: ["clear"] }] }); }
|
|
14369
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.23", type: ClrStringFilterComponent, isStandalone: false, selector: "clr-string-filter", inputs: { property: ["clrProperty", "property"], placeholder: ["clrFilterPlaceholder", "placeholder"], value: ["clrFilterValue", "value"] }, outputs: { filterValueChange: "clrFilterValueChange" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<clr-filter-clear-button testId=\"string-filter-clear-button\" (clear)=\"clearFilter()\"></clr-filter-clear-button>\n<clr-input-container class=\"filter-selection\">\n <input\n #input\n clrInput\n type=\"text\"\n autocomplete=\"off\"\n name=\"value\"\n [(ngModel)]=\"inputValue\"\n (ngModelChange)=\"onInput($event)\"\n [placeholder]=\"placeholderValue\"\n [attr.aria-label]=\"placeholderValue\"\n data-testid=\"string-filter-input\"\n />\n</clr-input-container>\n", styles: [".filter-selection{margin-top:.5rem}\n"], dependencies: [{ kind: "directive", type: i2$7.ClrInput, selector: "[clrInput]" }, { kind: "component", type: i2$7.ClrInputContainer, selector: "clr-input-container" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClrFilterClearButtonComponent, selector: "clr-filter-clear-button", inputs: ["testId"], outputs: ["clear"] }] }); }
|
|
14349
14370
|
}
|
|
14350
14371
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ClrStringFilterComponent, decorators: [{
|
|
14351
14372
|
type: Component,
|
|
14352
|
-
args: [{ selector: 'clr-string-filter', standalone: false, template: "<clr-filter-clear-button testId=\"string-filter-clear-button\" (clear)=\"clearFilter()\"></clr-filter-clear-button>\n<clr-input-container class=\"filter-selection\">\n <input\n clrInput\n type=\"text\"\n autocomplete=\"off\"\n name=\"value\"\n [(ngModel)]=\"inputValue\"\n (ngModelChange)=\"onInput($event)\"\n [placeholder]=\"placeholderValue\"\n [attr.aria-label]=\"placeholderValue\"\n data-testid=\"string-filter-input\"\n />\n</clr-input-container>\n", styles: [".filter-selection{margin-top:.5rem}\n"] }]
|
|
14353
|
-
}], ctorParameters: () => [{ type: i1$2.ClrCommonStringsService }, { type: i1$2.ClrDatagridFilter }], propDecorators: {
|
|
14373
|
+
args: [{ selector: 'clr-string-filter', standalone: false, template: "<clr-filter-clear-button testId=\"string-filter-clear-button\" (clear)=\"clearFilter()\"></clr-filter-clear-button>\n<clr-input-container class=\"filter-selection\">\n <input\n #input\n clrInput\n type=\"text\"\n autocomplete=\"off\"\n name=\"value\"\n [(ngModel)]=\"inputValue\"\n (ngModelChange)=\"onInput($event)\"\n [placeholder]=\"placeholderValue\"\n [attr.aria-label]=\"placeholderValue\"\n data-testid=\"string-filter-input\"\n />\n</clr-input-container>\n", styles: [".filter-selection{margin-top:.5rem}\n"] }]
|
|
14374
|
+
}], ctorParameters: () => [{ type: i1$2.ClrCommonStringsService }, { type: i1$2.ClrDatagridFilter }], propDecorators: { inputRef: [{
|
|
14375
|
+
type: ViewChild,
|
|
14376
|
+
args: ['input', { static: false }]
|
|
14377
|
+
}], property: [{
|
|
14354
14378
|
type: Input,
|
|
14355
14379
|
args: ['clrProperty']
|
|
14356
14380
|
}], placeholder: [{
|
|
@@ -14454,8 +14478,20 @@ class ClrNumericFilterComponent {
|
|
|
14454
14478
|
this.pendingHigh = null;
|
|
14455
14479
|
this.inputChanges = new Subject();
|
|
14456
14480
|
this._changes = new Subject();
|
|
14481
|
+
this.isOpen = false;
|
|
14457
14482
|
filterContainer.setFilter(this);
|
|
14458
14483
|
this.restartDebounce();
|
|
14484
|
+
this.openChangeSubscription = filterContainer.openChange.subscribe((open) => {
|
|
14485
|
+
this.isOpen = open;
|
|
14486
|
+
if (open) {
|
|
14487
|
+
this.focusInput();
|
|
14488
|
+
}
|
|
14489
|
+
});
|
|
14490
|
+
}
|
|
14491
|
+
ngAfterViewInit() {
|
|
14492
|
+
if (this.isOpen) {
|
|
14493
|
+
this.focusInput();
|
|
14494
|
+
}
|
|
14459
14495
|
}
|
|
14460
14496
|
onLowInput(value) {
|
|
14461
14497
|
const normalized = this.normalizeValue(value);
|
|
@@ -14510,6 +14546,15 @@ class ClrNumericFilterComponent {
|
|
|
14510
14546
|
}
|
|
14511
14547
|
ngOnDestroy() {
|
|
14512
14548
|
this.debounceSubscription.unsubscribe();
|
|
14549
|
+
this.openChangeSubscription.unsubscribe();
|
|
14550
|
+
}
|
|
14551
|
+
/**
|
|
14552
|
+
* Focuses the low-value filter input. Deferred to a microtask because the
|
|
14553
|
+
* popover content (and therefore the input element) isn't rendered yet
|
|
14554
|
+
* when the `openChange` event fires or during `ngAfterViewInit`.
|
|
14555
|
+
*/
|
|
14556
|
+
focusInput() {
|
|
14557
|
+
Promise.resolve().then(() => this.lowInputElRef?.nativeElement.focus());
|
|
14513
14558
|
}
|
|
14514
14559
|
/**
|
|
14515
14560
|
* (Re)subscribes to the input debounce pipeline, discarding any pending
|
|
@@ -14542,12 +14587,15 @@ class ClrNumericFilterComponent {
|
|
|
14542
14587
|
return Number.isFinite(numericValue) ? numericValue : null;
|
|
14543
14588
|
}
|
|
14544
14589
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ClrNumericFilterComponent, deps: [{ token: i1$2.ClrCommonStringsService }, { token: i1$2.ClrDatagridFilter }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14545
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.23", type: ClrNumericFilterComponent, isStandalone: false, selector: "clr-numeric-filter", inputs: { property: ["clrProperty", "property"], minPlaceholder: ["clrFilterMinPlaceholder", "minPlaceholder"], maxPlaceholder: ["clrFilterMaxPlaceholder", "maxPlaceholder"], size: ["clrFilterSize", "size"], value: ["clrFilterValue", "value"] }, outputs: { filterValueChange: "clrFilterValueChange" }, ngImport: i0, template: "<clr-filter-clear-button testId=\"numeric-filter-clear-button\" (clear)=\"clearFilter()\"></clr-filter-clear-button>\n<clr-number-input-container class=\"filter-selection\">\n <input\n type=\"number\"\n clrNumberInput\n name=\"low\"\n [(ngModel)]=\"lowInput\"\n (ngModelChange)=\"onLowInput($event)\"\n [placeholder]=\"minPlaceholderValue\"\n [attr.aria-label]=\"minPlaceholderValue\"\n [class]=\"inputSizeClass\"\n data-testid=\"numeric-filter-low-input\"\n />\n</clr-number-input-container>\n<clr-number-input-container class=\"filter-selection\">\n <input\n type=\"number\"\n clrNumberInput\n name=\"high\"\n [(ngModel)]=\"highInput\"\n (ngModelChange)=\"onHighInput($event)\"\n [placeholder]=\"maxPlaceholderValue\"\n [attr.aria-label]=\"maxPlaceholderValue\"\n [class]=\"inputSizeClass\"\n data-testid=\"numeric-filter-high-input\"\n />\n</clr-number-input-container>\n", styles: [".filter-selection{margin-top:.5rem}.filter-input-s{width:10ch!important}.filter-input-m{width:13ch!important}.filter-input-l{width:17ch!important}\n"], dependencies: [{ kind: "directive", type: i2$8.ClrNumberInput, selector: "input[type=\"number\"][clrNumberInput]" }, { kind: "component", type: i2$8.ClrNumberInputContainer, selector: "clr-number-input-container" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClrFilterClearButtonComponent, selector: "clr-filter-clear-button", inputs: ["testId"], outputs: ["clear"] }] }); }
|
|
14590
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.23", type: ClrNumericFilterComponent, isStandalone: false, selector: "clr-numeric-filter", inputs: { property: ["clrProperty", "property"], minPlaceholder: ["clrFilterMinPlaceholder", "minPlaceholder"], maxPlaceholder: ["clrFilterMaxPlaceholder", "maxPlaceholder"], size: ["clrFilterSize", "size"], value: ["clrFilterValue", "value"] }, outputs: { filterValueChange: "clrFilterValueChange" }, viewQueries: [{ propertyName: "lowInputElRef", first: true, predicate: ["lowInputEl"], descendants: true }], ngImport: i0, template: "<clr-filter-clear-button testId=\"numeric-filter-clear-button\" (clear)=\"clearFilter()\"></clr-filter-clear-button>\n<clr-number-input-container class=\"filter-selection\">\n <input\n #lowInputEl\n type=\"number\"\n clrNumberInput\n name=\"low\"\n [(ngModel)]=\"lowInput\"\n (ngModelChange)=\"onLowInput($event)\"\n [placeholder]=\"minPlaceholderValue\"\n [attr.aria-label]=\"minPlaceholderValue\"\n [class]=\"inputSizeClass\"\n data-testid=\"numeric-filter-low-input\"\n />\n</clr-number-input-container>\n<clr-number-input-container class=\"filter-selection\">\n <input\n type=\"number\"\n clrNumberInput\n name=\"high\"\n [(ngModel)]=\"highInput\"\n (ngModelChange)=\"onHighInput($event)\"\n [placeholder]=\"maxPlaceholderValue\"\n [attr.aria-label]=\"maxPlaceholderValue\"\n [class]=\"inputSizeClass\"\n data-testid=\"numeric-filter-high-input\"\n />\n</clr-number-input-container>\n", styles: [".filter-selection{margin-top:.5rem}.filter-input-s{width:10ch!important}.filter-input-m{width:13ch!important}.filter-input-l{width:17ch!important}\n"], dependencies: [{ kind: "directive", type: i2$8.ClrNumberInput, selector: "input[type=\"number\"][clrNumberInput]" }, { kind: "component", type: i2$8.ClrNumberInputContainer, selector: "clr-number-input-container" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClrFilterClearButtonComponent, selector: "clr-filter-clear-button", inputs: ["testId"], outputs: ["clear"] }] }); }
|
|
14546
14591
|
}
|
|
14547
14592
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ClrNumericFilterComponent, decorators: [{
|
|
14548
14593
|
type: Component,
|
|
14549
|
-
args: [{ selector: 'clr-numeric-filter', standalone: false, template: "<clr-filter-clear-button testId=\"numeric-filter-clear-button\" (clear)=\"clearFilter()\"></clr-filter-clear-button>\n<clr-number-input-container class=\"filter-selection\">\n <input\n type=\"number\"\n clrNumberInput\n name=\"low\"\n [(ngModel)]=\"lowInput\"\n (ngModelChange)=\"onLowInput($event)\"\n [placeholder]=\"minPlaceholderValue\"\n [attr.aria-label]=\"minPlaceholderValue\"\n [class]=\"inputSizeClass\"\n data-testid=\"numeric-filter-low-input\"\n />\n</clr-number-input-container>\n<clr-number-input-container class=\"filter-selection\">\n <input\n type=\"number\"\n clrNumberInput\n name=\"high\"\n [(ngModel)]=\"highInput\"\n (ngModelChange)=\"onHighInput($event)\"\n [placeholder]=\"maxPlaceholderValue\"\n [attr.aria-label]=\"maxPlaceholderValue\"\n [class]=\"inputSizeClass\"\n data-testid=\"numeric-filter-high-input\"\n />\n</clr-number-input-container>\n", styles: [".filter-selection{margin-top:.5rem}.filter-input-s{width:10ch!important}.filter-input-m{width:13ch!important}.filter-input-l{width:17ch!important}\n"] }]
|
|
14550
|
-
}], ctorParameters: () => [{ type: i1$2.ClrCommonStringsService }, { type: i1$2.ClrDatagridFilter }], propDecorators: {
|
|
14594
|
+
args: [{ selector: 'clr-numeric-filter', standalone: false, template: "<clr-filter-clear-button testId=\"numeric-filter-clear-button\" (clear)=\"clearFilter()\"></clr-filter-clear-button>\n<clr-number-input-container class=\"filter-selection\">\n <input\n #lowInputEl\n type=\"number\"\n clrNumberInput\n name=\"low\"\n [(ngModel)]=\"lowInput\"\n (ngModelChange)=\"onLowInput($event)\"\n [placeholder]=\"minPlaceholderValue\"\n [attr.aria-label]=\"minPlaceholderValue\"\n [class]=\"inputSizeClass\"\n data-testid=\"numeric-filter-low-input\"\n />\n</clr-number-input-container>\n<clr-number-input-container class=\"filter-selection\">\n <input\n type=\"number\"\n clrNumberInput\n name=\"high\"\n [(ngModel)]=\"highInput\"\n (ngModelChange)=\"onHighInput($event)\"\n [placeholder]=\"maxPlaceholderValue\"\n [attr.aria-label]=\"maxPlaceholderValue\"\n [class]=\"inputSizeClass\"\n data-testid=\"numeric-filter-high-input\"\n />\n</clr-number-input-container>\n", styles: [".filter-selection{margin-top:.5rem}.filter-input-s{width:10ch!important}.filter-input-m{width:13ch!important}.filter-input-l{width:17ch!important}\n"] }]
|
|
14595
|
+
}], ctorParameters: () => [{ type: i1$2.ClrCommonStringsService }, { type: i1$2.ClrDatagridFilter }], propDecorators: { lowInputElRef: [{
|
|
14596
|
+
type: ViewChild,
|
|
14597
|
+
args: ['lowInputEl', { static: false }]
|
|
14598
|
+
}], property: [{
|
|
14551
14599
|
type: Input,
|
|
14552
14600
|
args: ['clrProperty']
|
|
14553
14601
|
}], minPlaceholder: [{
|