cmat 0.0.45 → 0.0.47
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/components/masonry/index.d.ts +1 -0
- package/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +3 -3
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +12 -12
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +9 -9
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +3 -3
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +88 -88
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +3 -3
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +6 -6
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +3 -3
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +6 -6
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +3 -3
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +3 -3
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +3 -3
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +7 -4
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +3 -3
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +42 -42
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +39 -39
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +3 -3
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +9 -9
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +12 -12
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +9 -9
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +9 -9
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +3 -3
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +3 -3
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +3 -3
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +9 -9
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +3 -3
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +3 -3
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +9 -9
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +12 -12
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +9 -9
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +18 -18
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +6 -6
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +9 -9
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +21 -21
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +9 -9
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +6 -6
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-services-alert.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +6 -6
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +3 -3
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +3 -3
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +3 -3
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +3 -3
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat-version.mjs.map +1 -1
- package/package.json +24 -24
- package/styles/components/bundle.scss +7 -7
- package/styles/overrides/angular-material.scss +3 -3
- package/styles/overrides/fullcalendar.scss +7 -7
- package/styles/themes.scss +4 -4
|
@@ -159,10 +159,10 @@ class CmatRatingComponent {
|
|
|
159
159
|
this.value = this.currentValue;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
163
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatRatingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
163
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: CmatRatingComponent, isStandalone: true, selector: "cmat-rating", inputs: { id: "id", stars: "stars", readonly: "readonly", hover: "hover", half: "half", color: "color", showMode: "showMode", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatRatingComponent }], viewQueries: [{ propertyName: "_ratingElementRef", first: true, predicate: ["rating"], descendants: true }], exportAs: ["cmatRating"], usesOnChanges: true, ngImport: i0, template: "<div #rating class=\"flex\" [class.cmat-rating-readonly]=\"readonly||disabled\" [ngClass]=\"{'flex-col':showMode==='vertical','flex-row':showMode==='horizontal'}\"\r\n (focus)=\"onFocus()\" (mouseleave)=\"onMouseleave()\">\r\n @for (star of starArray; track $index; let i = $index) {\r\n <div class=\"cmat-rating-item\">\r\n @if (half) {\r\n <div role=\"presentation\" class=\"cmat-rating-half\" [ngStyle]=\"{'opacity': isIn(i)?1:0}\" (focus)=\"onFocus()\"\r\n (mouseover)=\"onMouseover($event, i, true)\" (click)=\"onClick($event, i, true)\">\r\n <mat-icon [ngClass]=\"{'text-current': !color}\" [color]=\"color\"\r\n [svgIcon]=\"'mat_outline:'+((!value || i >= value)?'star_border':'star')\">\r\n </mat-icon>\r\n </div>\r\n }\r\n <div role=\"presentation\" (mouseover)=\"onMouseover($event, i)\" (click)=\"onClick($event, i)\" (focus)=\"onFocus()\">\r\n <mat-icon [color]=\"color\" [ngClass]=\"{'text-current': !color}\"\r\n [svgIcon]=\"'mat_outline:'+((half && isIn(i)) || (!value || i >= value)?'star_border':'star')\">\r\n </mat-icon>\r\n </div>\r\n </div>\r\n }\r\n</div>", styles: ["cmat-rating{display:flex;align-items:center}cmat-rating .cmat-rating-item{position:relative;cursor:pointer;line-height:0}cmat-rating .cmat-rating-item div{display:inline-block;font-size:1rem;padding:0 .1rem}cmat-rating .cmat-rating-item .cmat-rating-half{position:absolute;top:0;left:0;width:45%;z-index:10;opacity:0;overflow:hidden;padding-right:0}cmat-rating .cmat-rating-readonly .cmat-rating-item{cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
164
164
|
}
|
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatRatingComponent, decorators: [{
|
|
166
166
|
type: Component,
|
|
167
167
|
args: [{ selector: 'cmat-rating', providers: [{ provide: MatFormFieldControl, useExisting: CmatRatingComponent }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatRating', imports: [MatIconModule, NgStyle, NgClass], template: "<div #rating class=\"flex\" [class.cmat-rating-readonly]=\"readonly||disabled\" [ngClass]=\"{'flex-col':showMode==='vertical','flex-row':showMode==='horizontal'}\"\r\n (focus)=\"onFocus()\" (mouseleave)=\"onMouseleave()\">\r\n @for (star of starArray; track $index; let i = $index) {\r\n <div class=\"cmat-rating-item\">\r\n @if (half) {\r\n <div role=\"presentation\" class=\"cmat-rating-half\" [ngStyle]=\"{'opacity': isIn(i)?1:0}\" (focus)=\"onFocus()\"\r\n (mouseover)=\"onMouseover($event, i, true)\" (click)=\"onClick($event, i, true)\">\r\n <mat-icon [ngClass]=\"{'text-current': !color}\" [color]=\"color\"\r\n [svgIcon]=\"'mat_outline:'+((!value || i >= value)?'star_border':'star')\">\r\n </mat-icon>\r\n </div>\r\n }\r\n <div role=\"presentation\" (mouseover)=\"onMouseover($event, i)\" (click)=\"onClick($event, i)\" (focus)=\"onFocus()\">\r\n <mat-icon [color]=\"color\" [ngClass]=\"{'text-current': !color}\"\r\n [svgIcon]=\"'mat_outline:'+((half && isIn(i)) || (!value || i >= value)?'star_border':'star')\">\r\n </mat-icon>\r\n </div>\r\n </div>\r\n }\r\n</div>", styles: ["cmat-rating{display:flex;align-items:center}cmat-rating .cmat-rating-item{position:relative;cursor:pointer;line-height:0}cmat-rating .cmat-rating-item div{display:inline-block;font-size:1rem;padding:0 .1rem}cmat-rating .cmat-rating-item .cmat-rating-half{position:absolute;top:0;left:0;width:45%;z-index:10;opacity:0;overflow:hidden;padding-right:0}cmat-rating .cmat-rating-readonly .cmat-rating-item{cursor:not-allowed}\n"] }]
|
|
168
168
|
}], ctorParameters: () => [], propDecorators: { id: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-components-rating.mjs","sources":["../../../projects/cmat/components/rating/rating.component.ts","../../../projects/cmat/components/rating/rating.component.html","../../../projects/cmat/components/rating/cmat-components-rating.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/member-ordering */\r\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\r\nimport { NgClass, NgStyle } from '@angular/common';\r\nimport { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ViewEncapsulation, OnChanges, SimpleChanges, OnInit, ChangeDetectorRef, ElementRef, HostBinding, ViewChild, OnDestroy, inject } from '@angular/core';\r\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { isNil } from 'lodash-es';\r\nimport { Subject } from 'rxjs';\r\n\r\nlet NEXT_ID = 0;\r\n\r\n@Component({\r\n selector: 'cmat-rating',\r\n templateUrl: './rating.component.html',\r\n styleUrls: ['./rating.component.scss'],\r\n providers: [{ provide: MatFormFieldControl, useExisting: CmatRatingComponent }],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatRating',\r\n imports: [MatIconModule, NgStyle, NgClass]\r\n})\r\nexport class CmatRatingComponent implements MatFormFieldControl<any>, ControlValueAccessor, OnInit, OnChanges, OnDestroy {\r\n @HostBinding('attr.id')\r\n @Input()\r\n public id = `cmat-chip-input-${NEXT_ID++}`;\r\n\r\n @ViewChild('rating', { static: false }) private _ratingElementRef: ElementRef<HTMLDivElement>;\r\n\r\n @Input() stars: number = 5;\r\n @Input() readonly: boolean = false;\r\n @Input() hover: boolean;\r\n @Input() half: boolean;\r\n @Input() color?: string;\r\n @Input() showMode?: 'horizontal' | 'vertical' = 'horizontal';\r\n @Output() valueChange = new EventEmitter<any>();\r\n\r\n starArray: number[];\r\n currentValue: number;\r\n\r\n readonly stateChanges: Subject<void> = new Subject<void>();\r\n focused: boolean = false;\r\n touched: boolean = false;\r\n controlType: string = 'cmat-rating';\r\n ngControl = inject(NgControl, { optional: true, self: true })!;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n constructor() {\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onModelChange: (value: any) => void = () => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onTouchedChange: () => any = () => { };\r\n\r\n ngOnInit(): void {\r\n this.starArray = [];\r\n for (let i = 0; i < this.stars; i++) {\r\n this.starArray.push(i);\r\n }\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if ('stars' in changes) {\r\n this.starArray = [];\r\n for (let i = 0; i < this.stars; i++) {\r\n this.starArray.push(i);\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateChanges.complete();\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onFocus(): void {\r\n\r\n }\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string = '';\r\n\r\n @Input()\r\n get value(): any {\r\n return this._value;\r\n }\r\n set value(value: any) {\r\n if (value !== this.value) {\r\n this._value = value;\r\n\r\n this.stateChanges.next();\r\n\r\n this.onModelChange(value);\r\n }\r\n }\r\n protected _value: any;\r\n\r\n get empty(): boolean {\r\n return !this._value;\r\n }\r\n\r\n get errorState(): boolean {\r\n if (this.ngControl == null)\r\n return false;\r\n\r\n return (this.touched && this.ngControl?.invalid) ?? false;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n @Input()\r\n get required(): boolean { return this._required; }\r\n set required(value: any) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n protected _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean {\r\n if (!isNil(this.ngControl?.disabled)) {\r\n return this.ngControl.disabled;\r\n }\r\n return this.readonly;\r\n }\r\n set disabled(value: BooleanInput) {\r\n this.readonly = coerceBooleanProperty(value);\r\n\r\n if (this.focused) {\r\n this.focused = false;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n writeValue(value: number): void {\r\n if (value) {\r\n this.value = value;\r\n this.currentValue = value;\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouchedChange = fn;\r\n }\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n if (ids.length) {\r\n this._ratingElementRef?.nativeElement.setAttribute('aria-describedby', ids.join(' '));\r\n } else {\r\n this._ratingElementRef?.nativeElement.removeAttribute('aria-describedby');\r\n }\r\n }\r\n\r\n onContainerClick(): void {\r\n if (!this.focused) {\r\n this._ratingElementRef.nativeElement.focus();\r\n }\r\n }\r\n\r\n isIn(value: number): boolean {\r\n const ex = this.value - value;\r\n return ex > 0 && ex < 1;\r\n }\r\n\r\n onClick(event: any, value: number, half?: boolean): void {\r\n event.stopPropagation();\r\n if (!this.readonly) {\r\n this.value = value + 1;\r\n if (half && this.half) {\r\n this.value -= 0.5;\r\n }\r\n this.currentValue = this.value;\r\n this.valueChange.emit(this.currentValue);\r\n this.onModelChange(this.currentValue);\r\n }\r\n }\r\n\r\n onMouseover(event: any, value: number, half?: boolean): void {\r\n event.stopPropagation();\r\n if (this.hover && !this.readonly) {\r\n this.value = value + 1;\r\n if (half && this.half) {\r\n this.value -= 0.5;\r\n }\r\n }\r\n }\r\n\r\n onMouseleave(): void {\r\n if (this.value !== this.currentValue) {\r\n this.value = this.currentValue;\r\n }\r\n }\r\n}\r\n\r\n","<div #rating class=\"flex\" [class.cmat-rating-readonly]=\"readonly||disabled\" [ngClass]=\"{'flex-col':showMode==='vertical','flex-row':showMode==='horizontal'}\"\r\n (focus)=\"onFocus()\" (mouseleave)=\"onMouseleave()\">\r\n @for (star of starArray; track $index; let i = $index) {\r\n <div class=\"cmat-rating-item\">\r\n @if (half) {\r\n <div role=\"presentation\" class=\"cmat-rating-half\" [ngStyle]=\"{'opacity': isIn(i)?1:0}\" (focus)=\"onFocus()\"\r\n (mouseover)=\"onMouseover($event, i, true)\" (click)=\"onClick($event, i, true)\">\r\n <mat-icon [ngClass]=\"{'text-current': !color}\" [color]=\"color\"\r\n [svgIcon]=\"'mat_outline:'+((!value || i >= value)?'star_border':'star')\">\r\n </mat-icon>\r\n </div>\r\n }\r\n <div role=\"presentation\" (mouseover)=\"onMouseover($event, i)\" (click)=\"onClick($event, i)\" (focus)=\"onFocus()\">\r\n <mat-icon [color]=\"color\" [ngClass]=\"{'text-current': !color}\"\r\n [svgIcon]=\"'mat_outline:'+((half && isIn(i)) || (!value || i >= value)?'star_border':'star')\">\r\n </mat-icon>\r\n </div>\r\n </div>\r\n }\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AAUA,IAAI,OAAO,GAAG,CAAC;MAYF,mBAAmB,CAAA;AAyB9B,IAAA,WAAA,GAAA;AAtBO,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,gBAAA,EAAmB,OAAO,EAAE,EAAE;QAIjC,IAAA,CAAA,KAAK,GAAW,CAAC;QACjB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAIzB,IAAA,CAAA,QAAQ,GAA+B,YAAY;AAClD,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAO;AAKtC,QAAA,IAAA,CAAA,YAAY,GAAkB,IAAI,OAAO,EAAQ;QAC1D,IAAA,CAAA,OAAO,GAAY,KAAK;QACxB,IAAA,CAAA,OAAO,GAAY,KAAK;QACxB,IAAA,CAAA,WAAW,GAAW,aAAa;AACnC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAE;AACtD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;;AAStD,QAAA,IAAA,CAAA,aAAa,GAAyB,MAAK,GAAI;;AAE/C,QAAA,IAAA,CAAA,eAAe,GAAc,M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AElIH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cmat-components-rating.mjs","sources":["../../../projects/cmat/components/rating/rating.component.ts","../../../projects/cmat/components/rating/rating.component.html","../../../projects/cmat/components/rating/cmat-components-rating.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/member-ordering */\r\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\r\nimport { NgClass, NgStyle } from '@angular/common';\r\nimport { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ViewEncapsulation, OnChanges, SimpleChanges, OnInit, ChangeDetectorRef, ElementRef, HostBinding, ViewChild, OnDestroy, inject } from '@angular/core';\r\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { isNil } from 'lodash-es';\r\nimport { Subject } from 'rxjs';\r\n\r\nlet NEXT_ID = 0;\r\n\r\n@Component({\r\n selector: 'cmat-rating',\r\n templateUrl: './rating.component.html',\r\n styleUrls: ['./rating.component.scss'],\r\n providers: [{ provide: MatFormFieldControl, useExisting: CmatRatingComponent }],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatRating',\r\n imports: [MatIconModule, NgStyle, NgClass]\r\n})\r\nexport class CmatRatingComponent implements MatFormFieldControl<any>, ControlValueAccessor, OnInit, OnChanges, OnDestroy {\r\n @HostBinding('attr.id')\r\n @Input()\r\n public id = `cmat-chip-input-${NEXT_ID++}`;\r\n\r\n @ViewChild('rating', { static: false }) private _ratingElementRef: ElementRef<HTMLDivElement>;\r\n\r\n @Input() stars: number = 5;\r\n @Input() readonly: boolean = false;\r\n @Input() hover: boolean;\r\n @Input() half: boolean;\r\n @Input() color?: string;\r\n @Input() showMode?: 'horizontal' | 'vertical' = 'horizontal';\r\n @Output() valueChange = new EventEmitter<any>();\r\n\r\n starArray: number[];\r\n currentValue: number;\r\n\r\n readonly stateChanges: Subject<void> = new Subject<void>();\r\n focused: boolean = false;\r\n touched: boolean = false;\r\n controlType: string = 'cmat-rating';\r\n ngControl = inject(NgControl, { optional: true, self: true })!;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n constructor() {\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onModelChange: (value: any) => void = () => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onTouchedChange: () => any = () => { };\r\n\r\n ngOnInit(): void {\r\n this.starArray = [];\r\n for (let i = 0; i < this.stars; i++) {\r\n this.starArray.push(i);\r\n }\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if ('stars' in changes) {\r\n this.starArray = [];\r\n for (let i = 0; i < this.stars; i++) {\r\n this.starArray.push(i);\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateChanges.complete();\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onFocus(): void {\r\n\r\n }\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string = '';\r\n\r\n @Input()\r\n get value(): any {\r\n return this._value;\r\n }\r\n set value(value: any) {\r\n if (value !== this.value) {\r\n this._value = value;\r\n\r\n this.stateChanges.next();\r\n\r\n this.onModelChange(value);\r\n }\r\n }\r\n protected _value: any;\r\n\r\n get empty(): boolean {\r\n return !this._value;\r\n }\r\n\r\n get errorState(): boolean {\r\n if (this.ngControl == null)\r\n return false;\r\n\r\n return (this.touched && this.ngControl?.invalid) ?? false;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n @Input()\r\n get required(): boolean { return this._required; }\r\n set required(value: any) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n protected _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean {\r\n if (!isNil(this.ngControl?.disabled)) {\r\n return this.ngControl.disabled;\r\n }\r\n return this.readonly;\r\n }\r\n set disabled(value: BooleanInput) {\r\n this.readonly = coerceBooleanProperty(value);\r\n\r\n if (this.focused) {\r\n this.focused = false;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n writeValue(value: number): void {\r\n if (value) {\r\n this.value = value;\r\n this.currentValue = value;\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouchedChange = fn;\r\n }\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n if (ids.length) {\r\n this._ratingElementRef?.nativeElement.setAttribute('aria-describedby', ids.join(' '));\r\n } else {\r\n this._ratingElementRef?.nativeElement.removeAttribute('aria-describedby');\r\n }\r\n }\r\n\r\n onContainerClick(): void {\r\n if (!this.focused) {\r\n this._ratingElementRef.nativeElement.focus();\r\n }\r\n }\r\n\r\n isIn(value: number): boolean {\r\n const ex = this.value - value;\r\n return ex > 0 && ex < 1;\r\n }\r\n\r\n onClick(event: any, value: number, half?: boolean): void {\r\n event.stopPropagation();\r\n if (!this.readonly) {\r\n this.value = value + 1;\r\n if (half && this.half) {\r\n this.value -= 0.5;\r\n }\r\n this.currentValue = this.value;\r\n this.valueChange.emit(this.currentValue);\r\n this.onModelChange(this.currentValue);\r\n }\r\n }\r\n\r\n onMouseover(event: any, value: number, half?: boolean): void {\r\n event.stopPropagation();\r\n if (this.hover && !this.readonly) {\r\n this.value = value + 1;\r\n if (half && this.half) {\r\n this.value -= 0.5;\r\n }\r\n }\r\n }\r\n\r\n onMouseleave(): void {\r\n if (this.value !== this.currentValue) {\r\n this.value = this.currentValue;\r\n }\r\n }\r\n}\r\n\r\n","<div #rating class=\"flex\" [class.cmat-rating-readonly]=\"readonly||disabled\" [ngClass]=\"{'flex-col':showMode==='vertical','flex-row':showMode==='horizontal'}\"\r\n (focus)=\"onFocus()\" (mouseleave)=\"onMouseleave()\">\r\n @for (star of starArray; track $index; let i = $index) {\r\n <div class=\"cmat-rating-item\">\r\n @if (half) {\r\n <div role=\"presentation\" class=\"cmat-rating-half\" [ngStyle]=\"{'opacity': isIn(i)?1:0}\" (focus)=\"onFocus()\"\r\n (mouseover)=\"onMouseover($event, i, true)\" (click)=\"onClick($event, i, true)\">\r\n <mat-icon [ngClass]=\"{'text-current': !color}\" [color]=\"color\"\r\n [svgIcon]=\"'mat_outline:'+((!value || i >= value)?'star_border':'star')\">\r\n </mat-icon>\r\n </div>\r\n }\r\n <div role=\"presentation\" (mouseover)=\"onMouseover($event, i)\" (click)=\"onClick($event, i)\" (focus)=\"onFocus()\">\r\n <mat-icon [color]=\"color\" [ngClass]=\"{'text-current': !color}\"\r\n [svgIcon]=\"'mat_outline:'+((half && isIn(i)) || (!value || i >= value)?'star_border':'star')\">\r\n </mat-icon>\r\n </div>\r\n </div>\r\n }\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AAUA,IAAI,OAAO,GAAG,CAAC;MAYF,mBAAmB,CAAA;AAyB9B,IAAA,WAAA,GAAA;AAtBO,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,gBAAA,EAAmB,OAAO,EAAE,EAAE;QAIjC,IAAA,CAAA,KAAK,GAAW,CAAC;QACjB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAIzB,IAAA,CAAA,QAAQ,GAA+B,YAAY;AAClD,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAO;AAKtC,QAAA,IAAA,CAAA,YAAY,GAAkB,IAAI,OAAO,EAAQ;QAC1D,IAAA,CAAA,OAAO,GAAY,KAAK;QACxB,IAAA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FR,WAAW;uBAAC,SAAS;;sBACrB;gBAG+C,iBAAiB,EAAA,CAAA;sBAAhE,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBAE7B,KAAK,EAAA,CAAA;sBAAb;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBAgDG,WAAW,EAAA,CAAA;sBADd;gBAWG,KAAK,EAAA,CAAA;sBADR;gBA+BG,QAAQ,EAAA,CAAA;sBADX;gBASG,QAAQ,EAAA,CAAA;sBADX;;;AElIH;;AAEG;;;;"}
|
|
@@ -38,10 +38,10 @@ const configurableDefaultOptions = [
|
|
|
38
38
|
const MAT_SELECTSEARCH_DEFAULT_OPTIONS = new InjectionToken('mat-selectsearch-default-options');
|
|
39
39
|
|
|
40
40
|
class CmatSelectNoEntriesFoundDirective {
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
42
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatSelectNoEntriesFoundDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: CmatSelectNoEntriesFoundDirective, isStandalone: true, selector: "[cmatSelectNoEntriesFound]", ngImport: i0 }); }
|
|
43
43
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatSelectNoEntriesFoundDirective, decorators: [{
|
|
45
45
|
type: Directive,
|
|
46
46
|
args: [{
|
|
47
47
|
selector: '[cmatSelectNoEntriesFound]'
|
|
@@ -49,10 +49,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
49
49
|
}] });
|
|
50
50
|
|
|
51
51
|
class CmatSelectSearchClearDirective {
|
|
52
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
53
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
52
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatSelectSearchClearDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
53
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: CmatSelectSearchClearDirective, isStandalone: true, selector: "[cmatSelectSearchClear]", ngImport: i0 }); }
|
|
54
54
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatSelectSearchClearDirective, decorators: [{
|
|
56
56
|
type: Directive,
|
|
57
57
|
args: [{
|
|
58
58
|
selector: '[cmatSelectSearchClear]'
|
|
@@ -423,8 +423,8 @@ class CmatSelectSearchComponent {
|
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
427
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
426
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatSelectSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
427
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: CmatSelectSearchComponent, isStandalone: true, selector: "cmat-select-search", inputs: { placeholderLabel: "placeholderLabel", type: "type", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", clearSearchInput: "clearSearchInput", searching: "searching", disableInitialFocus: "disableInitialFocus", enableClearOnEscapePressed: "enableClearOnEscapePressed", preventHomeEndKeyPropagation: "preventHomeEndKeyPropagation", disableScrollToActiveOnOptionsChanged: "disableScrollToActiveOnOptionsChanged", ariaLabel: "ariaLabel", showToggleAllCheckbox: "showToggleAllCheckbox", toggleAllCheckboxChecked: "toggleAllCheckboxChecked", toggleAllCheckboxIndeterminate: "toggleAllCheckboxIndeterminate", toggleAllCheckboxTooltipMessage: "toggleAllCheckboxTooltipMessage", toggleAllCheckboxTooltipPosition: "toggleAllCheckboxTooltipPosition", hideClearSearchButton: "hideClearSearchButton", alwaysRestoreSelectedOptionsMulti: "alwaysRestoreSelectedOptionsMulti" }, outputs: { toggleAll: "toggleAll" }, host: { properties: { "class.cmat-select-search-inside-mat-option": "this.isInsideMatOption" } }, providers: [
|
|
428
428
|
{
|
|
429
429
|
provide: NG_VALUE_ACCESSOR,
|
|
430
430
|
useExisting: forwardRef(() => CmatSelectSearchComponent),
|
|
@@ -432,7 +432,7 @@ class CmatSelectSearchComponent {
|
|
|
432
432
|
}
|
|
433
433
|
], queries: [{ propertyName: "clearIcon", first: true, predicate: CmatSelectSearchClearDirective, descendants: true }, { propertyName: "noEntriesFound", first: true, predicate: CmatSelectNoEntriesFoundDirective, descendants: true }], viewQueries: [{ propertyName: "searchSelectInput", first: true, predicate: ["searchSelectInput"], descendants: true, read: ElementRef, static: true }, { propertyName: "innerSelectSearch", first: true, predicate: ["innerSelectSearch"], descendants: true, read: ElementRef, static: true }], exportAs: ["cmatSelectSearch"], ngImport: i0, template: "<input matInput class=\"cmat-select-search-input cmat-select-search-hidden\" />\r\n\r\n<div #innerSelectSearch class=\"cmat-select-search-inner mat-typography mat-tab-header\"\r\n [ngClass]=\"{'cmat-select-search-inner-multiple': matSelect.multiple, 'cmat-select-search-inner-toggle-all': isToggleAllCheckboxVisible() }\">\r\n\r\n @if (isToggleAllCheckboxVisible()) {\r\n <mat-checkbox class=\"cmat-select-search-toggle-all-checkbox -mr-4\"\r\n matTooltipClass=\"cmat-select-search-toggle-all-tooltip\" [color]=\"matFormField?.color\"\r\n [checked]=\"toggleAllCheckboxChecked\" [indeterminate]=\"toggleAllCheckboxIndeterminate\"\r\n [matTooltip]=\"toggleAllCheckboxTooltipMessage\" [matTooltipPosition]=\"toggleAllCheckboxTooltipPosition\"\r\n (change)=\"emitSelectAllBooleanToParent($event.checked)\">\r\n </mat-checkbox>\r\n }\r\n <span matPrefix class=\"flex flex-col justify-center pl-2\">\r\n <mat-icon class=\"cmat-select-search-icon\" color=\"primary\" svgIcon=\"heroicons_outline:magnifying-glass\"></mat-icon>\r\n </span>\r\n <input #searchSelectInput matInput class=\"cmat-select-search-input cmat-input-element\" autocomplete=\"off\"\r\n [type]=\"type\" [formControl]=\"formControl\" [placeholder]=\"placeholderLabel\" [attr.aria-label]=\"ariaLabel\"\r\n (keydown)=\"handleKeydown($event)\" (keyup)=\"handleKeyup($event)\" (blur)=\"onBlur()\" />\r\n @if (searching) {\r\n <mat-spinner class=\"cmat-select-search-spinner\" diameter=\"16\"></mat-spinner>\r\n }\r\n\r\n @if (!hideClearSearchButton && value && !searching) {\r\n <button type=\"button\" matIconButton aria-label=\"Clear\"\r\n class=\"cmat-select-search-clear\" (click)=\"reset(true)\">\r\n @if (clearIcon) {\r\n <ng-content select=\"[cmatSelectSearchClear]\"></ng-content>\r\n } @else {\r\n <mat-icon svgIcon=\"mat_outline:close\"></mat-icon>\r\n }\r\n </button>\r\n }\r\n\r\n <ng-content select=\".cmat-select-search-custom-header-content\"></ng-content>\r\n </div>\r\n\r\n @if (showNoEntriesFound$ | async) {\r\n <div class=\"cmat-select-search-no-entries-found\">\r\n @if (noEntriesFound) {\r\n <ng-content select=\"[cmatSelectNoEntriesFound]\"></ng-content>\r\n } @else {\r\n {{noEntriesFoundLabel}}\r\n }\r\n </div>\r\n }", styles: ["cmat-select-search .cmat-select-search-hidden{visibility:hidden}cmat-select-search .cmat-select-search-inner{position:absolute;top:0;left:0;width:100%;z-index:100;font-size:inherit;box-shadow:none;display:flex;border-bottom-width:1px;border-bottom-style:solid}cmat-select-search .cmat-select-search-inner.cmat-select-search-inner-multiple.cmat-select-search-inner-toggle-all{display:flex;align-items:center}cmat-select-search .cmat-select-search-inner .cmat-input-element{flex-basis:auto;vertical-align:middle!important}cmat-select-search .cmat-select-search-input{box-sizing:border-box;width:100%;border:none;font-family:inherit;font-size:inherit;color:currentColor;outline:none;background:none;padding:0 44px 0 16px;height:47px;line-height:47px}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-input{padding-right:16px;padding-left:44px}cmat-select-search .cmat-select-search-no-entries-found{padding-top:8px}cmat-select-search .cmat-select-search-clear{position:absolute;right:4px;top:5px}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-clear{right:auto;left:4px}cmat-select-search .cmat-select-search-spinner{position:absolute;right:16px;top:calc(50% - 8px)}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-spinner{right:auto;left:16px}cmat-select-search .cmat-select-search-toggle-all-checkbox{padding-left:5px;padding-bottom:2px}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-toggle-all-checkbox{padding-left:0;padding-right:5px}cmat-select-search .cmat-select-search-toggle-all-checkbox .mdc-checkbox{opacity:1!important}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search{position:sticky;top:0;z-index:1;opacity:1;pointer-events:all;background:var(--mat-select-panel-background-color)}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search .mat-icon{margin-right:0;margin-left:0}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search mat-pseudo-checkbox{display:none}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search .mdc-list-item__primary-text{opacity:1}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search.cmat-select-search-no-entries-found{height:96px}.cmat-select-search-panel{transform:none!important;overflow-x:hidden;position:relative;padding:0!important}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
434
434
|
}
|
|
435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatSelectSearchComponent, decorators: [{
|
|
436
436
|
type: Component,
|
|
437
437
|
args: [{ selector: 'cmat-select-search', providers: [
|
|
438
438
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-components-select-search.mjs","sources":["../../../projects/cmat/components/select-search/default-options.ts","../../../projects/cmat/components/select-search/select-no-entries-found.directive.ts","../../../projects/cmat/components/select-search/select-search-clear.directive.ts","../../../projects/cmat/components/select-search/select-search.component.ts","../../../projects/cmat/components/select-search/select-search.component.html","../../../projects/cmat/components/select-search/cmat-components-select-search.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nimport { CmatSelectSearchComponent } from './select-search.component';\r\n\r\n/** List of inputs of CmatSelectSearchComponent that can be configured with a global default. */\r\nexport const configurableDefaultOptions = [\r\n 'ariaLabel',\r\n 'clearSearchInput',\r\n 'disableInitialFocus',\r\n 'disableScrollToActiveOnOptionsChanged',\r\n 'enableClearOnEscapePressed',\r\n 'hideClearSearchButton',\r\n 'noEntriesFoundLabel',\r\n 'placeholderLabel',\r\n 'preventHomeEndKeyPropagation',\r\n 'searching',\r\n] as const;\r\n\r\nexport type ConfigurableDefaultOptions = typeof configurableDefaultOptions[number];\r\n\r\nexport const MAT_SELECTSEARCH_DEFAULT_OPTIONS = new InjectionToken<MatSelectSearchOptions>('mat-selectsearch-default-options');\r\n\r\n/** Global configurable options for MatSelectSearch. */\r\nexport type MatSelectSearchOptions = Readonly<Partial<Pick<CmatSelectSearchComponent, ConfigurableDefaultOptions>>>;\r\n","import { Directive } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatSelectNoEntriesFound]'\r\n})\r\nexport class CmatSelectNoEntriesFoundDirective { }\r\n","import { Directive } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatSelectSearchClear]'\r\n})\r\nexport class CmatSelectSearchClearDirective { }\r\n","import { ViewportRuler } from '@angular/cdk/scrolling';\r\nimport { NgClass, AsyncPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, Input, OnDestroy, OnInit, QueryList, ViewChild, ContentChild, HostBinding, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatOption, _countGroupLabelsBeforeOption } from '@angular/material/core';\r\nimport { MatFormField, MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatSelect } from '@angular/material/select';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { BehaviorSubject, combineLatest, Observable, of, Subject } from 'rxjs';\r\nimport { delay, filter, map, startWith, switchMap, take, takeUntil, tap } from 'rxjs/operators';\r\nimport { configurableDefaultOptions, MatSelectSearchOptions, MAT_SELECTSEARCH_DEFAULT_OPTIONS } from './default-options';\r\nimport { CmatSelectNoEntriesFoundDirective } from './select-no-entries-found.directive';\r\nimport { CmatSelectSearchClearDirective } from './select-search-clear.directive';\r\n\r\nconst SELECT_PANEL_MAX_HEIGHT = 256;\r\n\r\n@Component({\r\n selector: 'cmat-select-search',\r\n templateUrl: './select-search.component.html',\r\n styleUrls: ['./select-search.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatSelectSearchComponent),\r\n multi: true\r\n }\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatSelectSearch',\r\n imports: [MatInputModule, NgClass, MatCheckboxModule, MatTooltipModule, MatFormFieldModule, MatIconModule,\r\n FormsModule, ReactiveFormsModule, MatProgressSpinnerModule, MatButtonModule, AsyncPipe]\r\n})\r\nexport class CmatSelectSearchComponent implements OnInit, OnDestroy, ControlValueAccessor {\r\n\r\n @Input() placeholderLabel = '查询';\r\n\r\n @Input() type = 'text';\r\n\r\n @Input() noEntriesFoundLabel = '无结果';\r\n\r\n @Input() showNoFoundLabel = true;\r\n\r\n @Input() clearSearchInput = true;\r\n\r\n @Input() searching = false;\r\n\r\n @Input() disableInitialFocus = false;\r\n\r\n @Input() enableClearOnEscapePressed = false;\r\n\r\n @Input() preventHomeEndKeyPropagation = false;\r\n\r\n @Input() disableScrollToActiveOnOptionsChanged = false;\r\n\r\n @Input() ariaLabel = '下拉查询';\r\n\r\n /** Whether to show Select All Checkbox (for mat-select[multi=true]) */\r\n @Input() showToggleAllCheckbox = false;\r\n\r\n /** select all checkbox checked state */\r\n @Input() toggleAllCheckboxChecked = false;\r\n\r\n /** select all checkbox indeterminate state */\r\n @Input() toggleAllCheckboxIndeterminate = false;\r\n\r\n @Input() toggleAllCheckboxTooltipMessage = '';\r\n\r\n @Input() toggleAllCheckboxTooltipPosition: 'left' | 'right' | 'above' | 'below' | 'before' | 'after' = 'below';\r\n\r\n @Input() hideClearSearchButton = false;\r\n\r\n @Input() alwaysRestoreSelectedOptionsMulti = false;\r\n\r\n /** Output emitter to send to parent component with the toggle all boolean */\r\n @Output() toggleAll = new EventEmitter<boolean>();\r\n\r\n @ViewChild('searchSelectInput', { read: ElementRef, static: true }) searchSelectInput: ElementRef;\r\n\r\n @ViewChild('innerSelectSearch', { read: ElementRef, static: true }) innerSelectSearch: ElementRef;\r\n @ContentChild(CmatSelectSearchClearDirective, { static: false }) clearIcon: CmatSelectSearchClearDirective;\r\n @ContentChild(CmatSelectNoEntriesFoundDirective) noEntriesFound: CmatSelectNoEntriesFoundDirective;\r\n formControl: FormControl = new FormControl('');\r\n\r\n protected matSelect = inject<MatSelect>(MatSelect);\r\n protected matFormField = inject<MatFormField | null>(MatFormField, { optional: true }) ?? null;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _viewportRuler = inject(ViewportRuler);\r\n private _matOption = inject<MatOption | null>(MatOption, { optional: true }) ?? null;\r\n private _defaultOptions = inject<MatSelectSearchOptions>(MAT_SELECTSEARCH_DEFAULT_OPTIONS, { optional: true });\r\n\r\n private _options$: BehaviorSubject<QueryList<MatOption> | null> = new BehaviorSubject<QueryList<MatOption> | null>(null);\r\n private _lastExternalInputValue?: string;\r\n\r\n private _optionsList$: Observable<MatOption[] | null> = this._options$.pipe(\r\n switchMap(_options => _options ?\r\n _options.changes.pipe(\r\n map(options => options.toArray()),\r\n startWith<MatOption[]>(_options.toArray()),\r\n ) : of(null)\r\n )\r\n );\r\n\r\n private _optionsLength$: Observable<number> = this._optionsList$.pipe(\r\n map(options => options ? options.length : 0)\r\n );\r\n\r\n private _previousSelectedValues: any[];\r\n private _onDestroy = new Subject<void>();\r\n /** Reference to active descendant for ARIA Support. */\r\n private _activeDescendant?: HTMLElement;\r\n\r\n constructor() {\r\n this._applyDefaultOptions(this._defaultOptions);\r\n }\r\n\r\n /** whether to show the no entries found message */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n showNoEntriesFound$: Observable<boolean> = combineLatest([\r\n this.formControl.valueChanges,\r\n this._optionsLength$\r\n ]).pipe(\r\n map(([value, optionsLength]) => this.noEntriesFoundLabel && value\r\n && optionsLength === this._getOptionsLengthOffset())\r\n );\r\n\r\n @HostBinding('class.cmat-select-search-inside-mat-option')\r\n get isInsideMatOption(): boolean {\r\n return !!this._matOption;\r\n }\r\n\r\n get value(): string {\r\n return this.formControl.value;\r\n }\r\n\r\n public get _options(): QueryList<MatOption> | null {\r\n return this._options$.getValue();\r\n }\r\n public set _options(_options: QueryList<MatOption>) {\r\n this._options$.next(_options);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onTouched: () => any = () => { };\r\n\r\n ngOnInit(): void {\r\n const panelClass = 'cmat-select-search-panel';\r\n if (this.matSelect.panelClass) {\r\n if (Array.isArray(this.matSelect.panelClass)) {\r\n (this.matSelect.panelClass as string[]).push(panelClass);\r\n } else if (typeof this.matSelect.panelClass === 'string') {\r\n this.matSelect.panelClass = [this.matSelect.panelClass, panelClass];\r\n } else if (typeof this.matSelect.panelClass === 'object') {\r\n this.matSelect.panelClass.entries[panelClass] = true;\r\n }\r\n } else {\r\n this.matSelect.panelClass = panelClass;\r\n }\r\n\r\n if (this._matOption) {\r\n this._matOption.disabled = true;\r\n this._matOption._getHostElement().classList.add('contains-cmat-select-search');\r\n this._matOption._getHostElement().setAttribute('aria-hidden', 'true');\r\n } else {\r\n console.error('<cmat-select-search> must be placed inside a <mat-option> element');\r\n }\r\n\r\n\r\n this.matSelect.openedChange\r\n .pipe(\r\n delay(1),\r\n takeUntil(this._onDestroy)\r\n )\r\n .subscribe((opened) => {\r\n if (opened) {\r\n this.updateInputWidth();\r\n if (!this.disableInitialFocus) {\r\n this.focus();\r\n }\r\n } else {\r\n if (this.clearSearchInput) {\r\n this.reset();\r\n }\r\n }\r\n });\r\n\r\n this.matSelect.openedChange\r\n .pipe(take(1))\r\n .pipe(takeUntil(this._onDestroy))\r\n .subscribe(() => {\r\n if (this.matSelect._keyManager) {\r\n this.matSelect._keyManager.change.pipe(takeUntil(this._onDestroy))\r\n .subscribe(() => this._adjustScrollTopToFitActiveOptionIntoView());\r\n } else {\r\n console.log('_keyManager was not initialized.');\r\n }\r\n\r\n this._options = this.matSelect.options;\r\n let previousFirstOption = this._options.toArray()[this._getOptionsLengthOffset()];\r\n\r\n this._options.changes\r\n .pipe(\r\n takeUntil(this._onDestroy)\r\n )\r\n .subscribe(() => {\r\n // avoid \"expression has been changed\" error\r\n setTimeout(() => {\r\n if (this._options) {\r\n // Convert the QueryList to an array\r\n const options = this._options.toArray();\r\n\r\n // The true first item is offset by 1\r\n const currentFirstOption = options[this._getOptionsLengthOffset()];\r\n\r\n const keyManager = this.matSelect._keyManager;\r\n if (keyManager && this.matSelect.panelOpen) {\r\n\r\n // set first item active and input width\r\n\r\n // Check to see if the first option in these changes is different from the previous.\r\n const firstOptionIsChanged = !this.matSelect.compareWith(previousFirstOption, currentFirstOption);\r\n\r\n if (firstOptionIsChanged\r\n || !keyManager.activeItem\r\n || !options.find(option => this.matSelect.compareWith(option, keyManager.activeItem))) {\r\n keyManager.setFirstItemActive();\r\n }\r\n\r\n // wait for panel width changes\r\n setTimeout(() => {\r\n this.updateInputWidth();\r\n });\r\n\r\n if (!this.disableScrollToActiveOnOptionsChanged) {\r\n this._adjustScrollTopToFitActiveOptionIntoView();\r\n }\r\n }\r\n\r\n // Update our reference\r\n previousFirstOption = currentFirstOption;\r\n }\r\n });\r\n });\r\n });\r\n\r\n // add or remove css class depending on whether to show the no entries found message\r\n // note: this is hacky\r\n this.showNoEntriesFound$.pipe(\r\n takeUntil(this._onDestroy)\r\n ).subscribe((showNoEntriesFound) => {\r\n // set no entries found class on mat option\r\n if (this._matOption) {\r\n if (showNoEntriesFound) {\r\n this._matOption._getHostElement().classList.add('cmat-select-search-no-entries-found');\r\n } else {\r\n this._matOption._getHostElement().classList.remove('cmat-select-search-no-entries-found');\r\n }\r\n }\r\n });\r\n\r\n // resize the input width when the viewport is resized, i.e. the trigger width could potentially be resized\r\n this._viewportRuler.change()\r\n .pipe(takeUntil(this._onDestroy))\r\n .subscribe(() => {\r\n if (this.matSelect.panelOpen) {\r\n this.updateInputWidth();\r\n }\r\n });\r\n\r\n this._initMultipleHandling();\r\n\r\n this._optionsList$.pipe(\r\n takeUntil(this._onDestroy)\r\n ).subscribe(() => {\r\n // update view when available options change\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n }\r\n\r\n emitSelectAllBooleanToParent(state: boolean): void {\r\n this.toggleAll.emit(state);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._onDestroy.next(void 0);\r\n this._onDestroy.complete();\r\n }\r\n\r\n isToggleAllCheckboxVisible(): boolean {\r\n return this.matSelect.multiple && this.showToggleAllCheckbox;\r\n }\r\n\r\n handleKeydown(event: KeyboardEvent): void {\r\n if ((event.key && event.key.length === 1) ||\r\n (event.code === 'KeyA') || (event.code === 'KeyB') || (event.code === 'KeyC') || (event.code === 'KeyD') || (event.code === 'KeyE') || (event.code === 'KeyF')\r\n || (event.code === 'KeyG') || (event.code === 'KeyH') || (event.code === 'KeyI') || (event.code === 'KeyJ') || (event.code === 'KeyK') || (event.code === 'KeyL')\r\n || (event.code === 'KeyM') || (event.code === 'KeyN') || (event.code === 'KeyO') || (event.code === 'KeyP') || (event.code === 'KeyQ') || (event.code === 'KeyR')\r\n || (event.code === 'KeyS') || (event.code === 'KeyT') || (event.code === 'KeyU') || (event.code === 'KeyV') || (event.code === 'KeyW')\r\n || (event.code === 'KeyX') || (event.code === 'KeyY') || (event.code === 'KeyZ') || (event.code === 'Digit0') || (event.code === 'Digit1')\r\n || (event.code === 'Digit2') || (event.code === 'Digit3') || (event.code === 'Digit4') || (event.code === 'Digit5') || (event.code === 'Digit6')\r\n || (event.code === 'Digit7') || (event.code === 'Digit8') || (event.code === 'Digit9')\r\n || (event.code === 'Space')\r\n || (this.preventHomeEndKeyPropagation && (event.code === 'Home' || event.code === 'End'))\r\n ) {\r\n event.stopPropagation();\r\n }\r\n\r\n if (this.matSelect.multiple && event.key && event.code === 'Enter') {\r\n // Regain focus after multiselect, so we can further type\r\n setTimeout(() => this.focus());\r\n }\r\n\r\n // Special case if click Escape, if input is empty, close the dropdown, if not, empty out the search field\r\n if (this.enableClearOnEscapePressed === true && event.code === 'Escape' && this.value) {\r\n this.reset(true);\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n /**\r\n * Handles the key up event with MatSelect.\r\n * Allows e.g. the announcing of the currently activeDescendant by screen readers.\r\n */\r\n handleKeyup(event: KeyboardEvent): void {\r\n if (event.code === 'ArrowUp' || event.code === 'ArrowDown') {\r\n const ariaActiveDescendantId = this.matSelect._getAriaActiveDescendant();\r\n const index = this._options?.toArray().findIndex(item => item.id === ariaActiveDescendantId);\r\n if (index && index !== -1) {\r\n this._unselectActiveDescendant();\r\n this._activeDescendant = this._options?.toArray()[index]._getHostElement();\r\n this._activeDescendant?.setAttribute('aria-selected', 'true');\r\n this.searchSelectInput.nativeElement.setAttribute('aria-activedescendant', ariaActiveDescendantId);\r\n }\r\n }\r\n }\r\n\r\n writeValue(value: string): void {\r\n this._lastExternalInputValue = value;\r\n this.formControl.setValue(value);\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n onBlur(): void {\r\n this._unselectActiveDescendant();\r\n this.onTouched();\r\n }\r\n\r\n registerOnChange(fn: (value: string) => void): void {\r\n this.formControl.valueChanges.pipe(\r\n filter(value => value !== this._lastExternalInputValue),\r\n tap(() => this._lastExternalInputValue = undefined),\r\n takeUntil(this._onDestroy)\r\n ).subscribe(fn);\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n public focus(): void {\r\n if (!this.searchSelectInput || !this.matSelect.panel) {\r\n return;\r\n }\r\n const panel = this.matSelect.panel.nativeElement;\r\n const scrollTop = panel.scrollTop;\r\n\r\n this.searchSelectInput.nativeElement.focus();\r\n\r\n panel.scrollTop = scrollTop;\r\n }\r\n\r\n public reset(focus?: boolean): void {\r\n this.formControl.setValue('');\r\n if (focus) {\r\n this.focus();\r\n }\r\n }\r\n\r\n public updateInputWidth(): void {\r\n if (!this.innerSelectSearch?.nativeElement) {\r\n return;\r\n }\r\n const element: HTMLElement = this.innerSelectSearch.nativeElement;\r\n let panelElement: HTMLElement | void = void 0;\r\n while (element === element.parentElement) {\r\n if (element.classList.contains('mat-select-panel')) {\r\n panelElement = element;\r\n break;\r\n }\r\n }\r\n if (panelElement) {\r\n this.innerSelectSearch.nativeElement.style.width = panelElement.clientWidth + 'px';\r\n }\r\n }\r\n\r\n private _getMatOptionHeight(): number {\r\n if (this.matSelect.options.length > 0) {\r\n return this.matSelect.options.first._getHostElement().getBoundingClientRect().height;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n private _getOptionsLengthOffset(): number {\r\n if (this._matOption) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n private _unselectActiveDescendant(): void {\r\n this._activeDescendant?.removeAttribute('aria-selected');\r\n this.searchSelectInput.nativeElement.removeAttribute('aria-activedescendant');\r\n }\r\n private _applyDefaultOptions(defaultOptions?: MatSelectSearchOptions|null): void {\r\n if (!defaultOptions) {\r\n return;\r\n }\r\n for (const key of configurableDefaultOptions) {\r\n if (Object.prototype.hasOwnProperty.call(defaultOptions, key)) {\r\n (this[key] as any) = defaultOptions[key];\r\n }\r\n }\r\n }\r\n /*\r\n * Initializes handling <mat-select [multiple]=\"true\">\r\n * Note: to improve this code, mat-select should be extended to allow disabling resetting the selection while filtering.\r\n */\r\n private _initMultipleHandling(): void {\r\n if (!this.matSelect.ngControl) {\r\n if (this.matSelect.multiple) {\r\n // note: the access to matSelect.ngControl (instead of matSelect.value / matSelect.valueChanges)\r\n // is necessary to properly work in multi-selection mode.\r\n console.error('the mat-select containing cmat-select-search must have a ngModel or formControl directive when multiple=true');\r\n }\r\n return;\r\n }\r\n // if <mat-select [multiple]=\"true\">\r\n // store previously selected values and restore them when they are deselected\r\n // because the option is not available while we are currently filtering\r\n this._previousSelectedValues = this.matSelect.ngControl.value;\r\n\r\n this.matSelect.ngControl.valueChanges?.pipe(takeUntil(this._onDestroy))\r\n .subscribe((values) => {\r\n let restoreSelectedValues = false;\r\n if (this.matSelect.multiple) {\r\n if ((this.alwaysRestoreSelectedOptionsMulti || (this.formControl.value?.length))\r\n && this._previousSelectedValues && Array.isArray(this._previousSelectedValues)) {\r\n if (!values || !Array.isArray(values)) {\r\n values = [];\r\n }\r\n const optionValues = this.matSelect.options.map(option => option.value);\r\n this._previousSelectedValues.forEach((previousValue) => {\r\n if (!values.some((v: any) => this.matSelect.compareWith(v, previousValue))\r\n && !optionValues.some(v => this.matSelect.compareWith(v, previousValue))) {\r\n // if a value that was selected before is deselected and not found in the options, it was deselected\r\n // due to the filtering, so we restore it.\r\n values.push(previousValue);\r\n restoreSelectedValues = true;\r\n }\r\n });\r\n }\r\n }\r\n this._previousSelectedValues = values;\r\n\r\n if (restoreSelectedValues) {\r\n this.matSelect._onChange(values);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Scrolls the currently active option into the view if it is not yet visible.\r\n */\r\n private _adjustScrollTopToFitActiveOptionIntoView(): void {\r\n if (this.matSelect.panel && this.matSelect.options.length > 0) {\r\n const matOptionHeight = this._getMatOptionHeight();\r\n const activeOptionIndex = this.matSelect._keyManager.activeItemIndex ?? 0;\r\n const labelCount = _countGroupLabelsBeforeOption(activeOptionIndex, this.matSelect.options, this.matSelect.optionGroups);\r\n // If the component is in a MatOption, the activeItemIndex will be offset by one.\r\n const indexOfOptionToFitIntoView = (this._matOption ? -1 : 0) + labelCount + activeOptionIndex;\r\n const currentScrollTop = this.matSelect.panel.nativeElement.scrollTop;\r\n\r\n const searchInputHeight = this.innerSelectSearch.nativeElement.offsetHeight;\r\n const amountOfVisibleOptions = Math.floor((SELECT_PANEL_MAX_HEIGHT - searchInputHeight) / matOptionHeight);\r\n\r\n const indexOfFirstVisibleOption = Math.round((currentScrollTop + searchInputHeight) / matOptionHeight) - 1;\r\n\r\n if (indexOfFirstVisibleOption >= indexOfOptionToFitIntoView) {\r\n this.matSelect.panel.nativeElement.scrollTop = indexOfOptionToFitIntoView * matOptionHeight;\r\n } else if (indexOfFirstVisibleOption + amountOfVisibleOptions <= indexOfOptionToFitIntoView) {\r\n this.matSelect.panel.nativeElement.scrollTop = (indexOfOptionToFitIntoView + 1) * matOptionHeight\r\n - (SELECT_PANEL_MAX_HEIGHT - searchInputHeight);\r\n }\r\n }\r\n }\r\n}\r\n","<input matInput class=\"cmat-select-search-input cmat-select-search-hidden\" />\r\n\r\n<div #innerSelectSearch class=\"cmat-select-search-inner mat-typography mat-tab-header\"\r\n [ngClass]=\"{'cmat-select-search-inner-multiple': matSelect.multiple, 'cmat-select-search-inner-toggle-all': isToggleAllCheckboxVisible() }\">\r\n\r\n @if (isToggleAllCheckboxVisible()) {\r\n <mat-checkbox class=\"cmat-select-search-toggle-all-checkbox -mr-4\"\r\n matTooltipClass=\"cmat-select-search-toggle-all-tooltip\" [color]=\"matFormField?.color\"\r\n [checked]=\"toggleAllCheckboxChecked\" [indeterminate]=\"toggleAllCheckboxIndeterminate\"\r\n [matTooltip]=\"toggleAllCheckboxTooltipMessage\" [matTooltipPosition]=\"toggleAllCheckboxTooltipPosition\"\r\n (change)=\"emitSelectAllBooleanToParent($event.checked)\">\r\n </mat-checkbox>\r\n }\r\n <span matPrefix class=\"flex flex-col justify-center pl-2\">\r\n <mat-icon class=\"cmat-select-search-icon\" color=\"primary\" svgIcon=\"heroicons_outline:magnifying-glass\"></mat-icon>\r\n </span>\r\n <input #searchSelectInput matInput class=\"cmat-select-search-input cmat-input-element\" autocomplete=\"off\"\r\n [type]=\"type\" [formControl]=\"formControl\" [placeholder]=\"placeholderLabel\" [attr.aria-label]=\"ariaLabel\"\r\n (keydown)=\"handleKeydown($event)\" (keyup)=\"handleKeyup($event)\" (blur)=\"onBlur()\" />\r\n @if (searching) {\r\n <mat-spinner class=\"cmat-select-search-spinner\" diameter=\"16\"></mat-spinner>\r\n }\r\n\r\n @if (!hideClearSearchButton && value && !searching) {\r\n <button type=\"button\" matIconButton aria-label=\"Clear\"\r\n class=\"cmat-select-search-clear\" (click)=\"reset(true)\">\r\n @if (clearIcon) {\r\n <ng-content select=\"[cmatSelectSearchClear]\"></ng-content>\r\n } @else {\r\n <mat-icon svgIcon=\"mat_outline:close\"></mat-icon>\r\n }\r\n </button>\r\n }\r\n\r\n <ng-content select=\".cmat-select-search-custom-header-content\"></ng-content>\r\n </div>\r\n\r\n @if (showNoEntriesFound$ | async) {\r\n <div class=\"cmat-select-search-no-entries-found\">\r\n @if (noEntriesFound) {\r\n <ng-content select=\"[cmatSelectNoEntriesFound]\"></ng-content>\r\n } @else {\r\n {{noEntriesFoundLabel}}\r\n }\r\n </div>\r\n }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACO,MAAM,0BAA0B,GAAG;IACxC,WAAW;IACX,kBAAkB;IAClB,qBAAqB;IACrB,uCAAuC;IACvC,4BAA4B;IAC5B,uBAAuB;IACvB,qBAAqB;IACrB,kBAAkB;IAClB,8BAA8B;IAC9B,WAAW;;MAKA,gCAAgC,GAAG,IAAI,cAAc,CAAyB,kCAAkC;;MCdhH,iCAAiC,CAAA;8GAAjC,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjC,iCAAiC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;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cmat-components-select-search.mjs","sources":["../../../projects/cmat/components/select-search/default-options.ts","../../../projects/cmat/components/select-search/select-no-entries-found.directive.ts","../../../projects/cmat/components/select-search/select-search-clear.directive.ts","../../../projects/cmat/components/select-search/select-search.component.ts","../../../projects/cmat/components/select-search/select-search.component.html","../../../projects/cmat/components/select-search/cmat-components-select-search.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nimport { CmatSelectSearchComponent } from './select-search.component';\r\n\r\n/** List of inputs of CmatSelectSearchComponent that can be configured with a global default. */\r\nexport const configurableDefaultOptions = [\r\n 'ariaLabel',\r\n 'clearSearchInput',\r\n 'disableInitialFocus',\r\n 'disableScrollToActiveOnOptionsChanged',\r\n 'enableClearOnEscapePressed',\r\n 'hideClearSearchButton',\r\n 'noEntriesFoundLabel',\r\n 'placeholderLabel',\r\n 'preventHomeEndKeyPropagation',\r\n 'searching',\r\n] as const;\r\n\r\nexport type ConfigurableDefaultOptions = typeof configurableDefaultOptions[number];\r\n\r\nexport const MAT_SELECTSEARCH_DEFAULT_OPTIONS = new InjectionToken<MatSelectSearchOptions>('mat-selectsearch-default-options');\r\n\r\n/** Global configurable options for MatSelectSearch. */\r\nexport type MatSelectSearchOptions = Readonly<Partial<Pick<CmatSelectSearchComponent, ConfigurableDefaultOptions>>>;\r\n","import { Directive } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatSelectNoEntriesFound]'\r\n})\r\nexport class CmatSelectNoEntriesFoundDirective { }\r\n","import { Directive } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatSelectSearchClear]'\r\n})\r\nexport class CmatSelectSearchClearDirective { }\r\n","import { ViewportRuler } from '@angular/cdk/scrolling';\r\nimport { NgClass, AsyncPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, Input, OnDestroy, OnInit, QueryList, ViewChild, ContentChild, HostBinding, Output, ViewEncapsulation, inject } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatOption, _countGroupLabelsBeforeOption } from '@angular/material/core';\r\nimport { MatFormField, MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatSelect } from '@angular/material/select';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { BehaviorSubject, combineLatest, Observable, of, Subject } from 'rxjs';\r\nimport { delay, filter, map, startWith, switchMap, take, takeUntil, tap } from 'rxjs/operators';\r\nimport { configurableDefaultOptions, MatSelectSearchOptions, MAT_SELECTSEARCH_DEFAULT_OPTIONS } from './default-options';\r\nimport { CmatSelectNoEntriesFoundDirective } from './select-no-entries-found.directive';\r\nimport { CmatSelectSearchClearDirective } from './select-search-clear.directive';\r\n\r\nconst SELECT_PANEL_MAX_HEIGHT = 256;\r\n\r\n@Component({\r\n selector: 'cmat-select-search',\r\n templateUrl: './select-search.component.html',\r\n styleUrls: ['./select-search.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatSelectSearchComponent),\r\n multi: true\r\n }\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatSelectSearch',\r\n imports: [MatInputModule, NgClass, MatCheckboxModule, MatTooltipModule, MatFormFieldModule, MatIconModule,\r\n FormsModule, ReactiveFormsModule, MatProgressSpinnerModule, MatButtonModule, AsyncPipe]\r\n})\r\nexport class CmatSelectSearchComponent implements OnInit, OnDestroy, ControlValueAccessor {\r\n\r\n @Input() placeholderLabel = '查询';\r\n\r\n @Input() type = 'text';\r\n\r\n @Input() noEntriesFoundLabel = '无结果';\r\n\r\n @Input() showNoFoundLabel = true;\r\n\r\n @Input() clearSearchInput = true;\r\n\r\n @Input() searching = false;\r\n\r\n @Input() disableInitialFocus = false;\r\n\r\n @Input() enableClearOnEscapePressed = false;\r\n\r\n @Input() preventHomeEndKeyPropagation = false;\r\n\r\n @Input() disableScrollToActiveOnOptionsChanged = false;\r\n\r\n @Input() ariaLabel = '下拉查询';\r\n\r\n /** Whether to show Select All Checkbox (for mat-select[multi=true]) */\r\n @Input() showToggleAllCheckbox = false;\r\n\r\n /** select all checkbox checked state */\r\n @Input() toggleAllCheckboxChecked = false;\r\n\r\n /** select all checkbox indeterminate state */\r\n @Input() toggleAllCheckboxIndeterminate = false;\r\n\r\n @Input() toggleAllCheckboxTooltipMessage = '';\r\n\r\n @Input() toggleAllCheckboxTooltipPosition: 'left' | 'right' | 'above' | 'below' | 'before' | 'after' = 'below';\r\n\r\n @Input() hideClearSearchButton = false;\r\n\r\n @Input() alwaysRestoreSelectedOptionsMulti = false;\r\n\r\n /** Output emitter to send to parent component with the toggle all boolean */\r\n @Output() toggleAll = new EventEmitter<boolean>();\r\n\r\n @ViewChild('searchSelectInput', { read: ElementRef, static: true }) searchSelectInput: ElementRef;\r\n\r\n @ViewChild('innerSelectSearch', { read: ElementRef, static: true }) innerSelectSearch: ElementRef;\r\n @ContentChild(CmatSelectSearchClearDirective, { static: false }) clearIcon: CmatSelectSearchClearDirective;\r\n @ContentChild(CmatSelectNoEntriesFoundDirective) noEntriesFound: CmatSelectNoEntriesFoundDirective;\r\n formControl: FormControl = new FormControl('');\r\n\r\n protected matSelect = inject<MatSelect>(MatSelect);\r\n protected matFormField = inject<MatFormField | null>(MatFormField, { optional: true }) ?? null;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _viewportRuler = inject(ViewportRuler);\r\n private _matOption = inject<MatOption | null>(MatOption, { optional: true }) ?? null;\r\n private _defaultOptions = inject<MatSelectSearchOptions>(MAT_SELECTSEARCH_DEFAULT_OPTIONS, { optional: true });\r\n\r\n private _options$: BehaviorSubject<QueryList<MatOption> | null> = new BehaviorSubject<QueryList<MatOption> | null>(null);\r\n private _lastExternalInputValue?: string;\r\n\r\n private _optionsList$: Observable<MatOption[] | null> = this._options$.pipe(\r\n switchMap(_options => _options ?\r\n _options.changes.pipe(\r\n map(options => options.toArray()),\r\n startWith<MatOption[]>(_options.toArray()),\r\n ) : of(null)\r\n )\r\n );\r\n\r\n private _optionsLength$: Observable<number> = this._optionsList$.pipe(\r\n map(options => options ? options.length : 0)\r\n );\r\n\r\n private _previousSelectedValues: any[];\r\n private _onDestroy = new Subject<void>();\r\n /** Reference to active descendant for ARIA Support. */\r\n private _activeDescendant?: HTMLElement;\r\n\r\n constructor() {\r\n this._applyDefaultOptions(this._defaultOptions);\r\n }\r\n\r\n /** whether to show the no entries found message */\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n showNoEntriesFound$: Observable<boolean> = combineLatest([\r\n this.formControl.valueChanges,\r\n this._optionsLength$\r\n ]).pipe(\r\n map(([value, optionsLength]) => this.noEntriesFoundLabel && value\r\n && optionsLength === this._getOptionsLengthOffset())\r\n );\r\n\r\n @HostBinding('class.cmat-select-search-inside-mat-option')\r\n get isInsideMatOption(): boolean {\r\n return !!this._matOption;\r\n }\r\n\r\n get value(): string {\r\n return this.formControl.value;\r\n }\r\n\r\n public get _options(): QueryList<MatOption> | null {\r\n return this._options$.getValue();\r\n }\r\n public set _options(_options: QueryList<MatOption>) {\r\n this._options$.next(_options);\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onTouched: () => any = () => { };\r\n\r\n ngOnInit(): void {\r\n const panelClass = 'cmat-select-search-panel';\r\n if (this.matSelect.panelClass) {\r\n if (Array.isArray(this.matSelect.panelClass)) {\r\n (this.matSelect.panelClass as string[]).push(panelClass);\r\n } else if (typeof this.matSelect.panelClass === 'string') {\r\n this.matSelect.panelClass = [this.matSelect.panelClass, panelClass];\r\n } else if (typeof this.matSelect.panelClass === 'object') {\r\n this.matSelect.panelClass.entries[panelClass] = true;\r\n }\r\n } else {\r\n this.matSelect.panelClass = panelClass;\r\n }\r\n\r\n if (this._matOption) {\r\n this._matOption.disabled = true;\r\n this._matOption._getHostElement().classList.add('contains-cmat-select-search');\r\n this._matOption._getHostElement().setAttribute('aria-hidden', 'true');\r\n } else {\r\n console.error('<cmat-select-search> must be placed inside a <mat-option> element');\r\n }\r\n\r\n\r\n this.matSelect.openedChange\r\n .pipe(\r\n delay(1),\r\n takeUntil(this._onDestroy)\r\n )\r\n .subscribe((opened) => {\r\n if (opened) {\r\n this.updateInputWidth();\r\n if (!this.disableInitialFocus) {\r\n this.focus();\r\n }\r\n } else {\r\n if (this.clearSearchInput) {\r\n this.reset();\r\n }\r\n }\r\n });\r\n\r\n this.matSelect.openedChange\r\n .pipe(take(1))\r\n .pipe(takeUntil(this._onDestroy))\r\n .subscribe(() => {\r\n if (this.matSelect._keyManager) {\r\n this.matSelect._keyManager.change.pipe(takeUntil(this._onDestroy))\r\n .subscribe(() => this._adjustScrollTopToFitActiveOptionIntoView());\r\n } else {\r\n console.log('_keyManager was not initialized.');\r\n }\r\n\r\n this._options = this.matSelect.options;\r\n let previousFirstOption = this._options.toArray()[this._getOptionsLengthOffset()];\r\n\r\n this._options.changes\r\n .pipe(\r\n takeUntil(this._onDestroy)\r\n )\r\n .subscribe(() => {\r\n // avoid \"expression has been changed\" error\r\n setTimeout(() => {\r\n if (this._options) {\r\n // Convert the QueryList to an array\r\n const options = this._options.toArray();\r\n\r\n // The true first item is offset by 1\r\n const currentFirstOption = options[this._getOptionsLengthOffset()];\r\n\r\n const keyManager = this.matSelect._keyManager;\r\n if (keyManager && this.matSelect.panelOpen) {\r\n\r\n // set first item active and input width\r\n\r\n // Check to see if the first option in these changes is different from the previous.\r\n const firstOptionIsChanged = !this.matSelect.compareWith(previousFirstOption, currentFirstOption);\r\n\r\n if (firstOptionIsChanged\r\n || !keyManager.activeItem\r\n || !options.find(option => this.matSelect.compareWith(option, keyManager.activeItem))) {\r\n keyManager.setFirstItemActive();\r\n }\r\n\r\n // wait for panel width changes\r\n setTimeout(() => {\r\n this.updateInputWidth();\r\n });\r\n\r\n if (!this.disableScrollToActiveOnOptionsChanged) {\r\n this._adjustScrollTopToFitActiveOptionIntoView();\r\n }\r\n }\r\n\r\n // Update our reference\r\n previousFirstOption = currentFirstOption;\r\n }\r\n });\r\n });\r\n });\r\n\r\n // add or remove css class depending on whether to show the no entries found message\r\n // note: this is hacky\r\n this.showNoEntriesFound$.pipe(\r\n takeUntil(this._onDestroy)\r\n ).subscribe((showNoEntriesFound) => {\r\n // set no entries found class on mat option\r\n if (this._matOption) {\r\n if (showNoEntriesFound) {\r\n this._matOption._getHostElement().classList.add('cmat-select-search-no-entries-found');\r\n } else {\r\n this._matOption._getHostElement().classList.remove('cmat-select-search-no-entries-found');\r\n }\r\n }\r\n });\r\n\r\n // resize the input width when the viewport is resized, i.e. the trigger width could potentially be resized\r\n this._viewportRuler.change()\r\n .pipe(takeUntil(this._onDestroy))\r\n .subscribe(() => {\r\n if (this.matSelect.panelOpen) {\r\n this.updateInputWidth();\r\n }\r\n });\r\n\r\n this._initMultipleHandling();\r\n\r\n this._optionsList$.pipe(\r\n takeUntil(this._onDestroy)\r\n ).subscribe(() => {\r\n // update view when available options change\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n }\r\n\r\n emitSelectAllBooleanToParent(state: boolean): void {\r\n this.toggleAll.emit(state);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._onDestroy.next(void 0);\r\n this._onDestroy.complete();\r\n }\r\n\r\n isToggleAllCheckboxVisible(): boolean {\r\n return this.matSelect.multiple && this.showToggleAllCheckbox;\r\n }\r\n\r\n handleKeydown(event: KeyboardEvent): void {\r\n if ((event.key && event.key.length === 1) ||\r\n (event.code === 'KeyA') || (event.code === 'KeyB') || (event.code === 'KeyC') || (event.code === 'KeyD') || (event.code === 'KeyE') || (event.code === 'KeyF')\r\n || (event.code === 'KeyG') || (event.code === 'KeyH') || (event.code === 'KeyI') || (event.code === 'KeyJ') || (event.code === 'KeyK') || (event.code === 'KeyL')\r\n || (event.code === 'KeyM') || (event.code === 'KeyN') || (event.code === 'KeyO') || (event.code === 'KeyP') || (event.code === 'KeyQ') || (event.code === 'KeyR')\r\n || (event.code === 'KeyS') || (event.code === 'KeyT') || (event.code === 'KeyU') || (event.code === 'KeyV') || (event.code === 'KeyW')\r\n || (event.code === 'KeyX') || (event.code === 'KeyY') || (event.code === 'KeyZ') || (event.code === 'Digit0') || (event.code === 'Digit1')\r\n || (event.code === 'Digit2') || (event.code === 'Digit3') || (event.code === 'Digit4') || (event.code === 'Digit5') || (event.code === 'Digit6')\r\n || (event.code === 'Digit7') || (event.code === 'Digit8') || (event.code === 'Digit9')\r\n || (event.code === 'Space')\r\n || (this.preventHomeEndKeyPropagation && (event.code === 'Home' || event.code === 'End'))\r\n ) {\r\n event.stopPropagation();\r\n }\r\n\r\n if (this.matSelect.multiple && event.key && event.code === 'Enter') {\r\n // Regain focus after multiselect, so we can further type\r\n setTimeout(() => this.focus());\r\n }\r\n\r\n // Special case if click Escape, if input is empty, close the dropdown, if not, empty out the search field\r\n if (this.enableClearOnEscapePressed === true && event.code === 'Escape' && this.value) {\r\n this.reset(true);\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n /**\r\n * Handles the key up event with MatSelect.\r\n * Allows e.g. the announcing of the currently activeDescendant by screen readers.\r\n */\r\n handleKeyup(event: KeyboardEvent): void {\r\n if (event.code === 'ArrowUp' || event.code === 'ArrowDown') {\r\n const ariaActiveDescendantId = this.matSelect._getAriaActiveDescendant();\r\n const index = this._options?.toArray().findIndex(item => item.id === ariaActiveDescendantId);\r\n if (index && index !== -1) {\r\n this._unselectActiveDescendant();\r\n this._activeDescendant = this._options?.toArray()[index]._getHostElement();\r\n this._activeDescendant?.setAttribute('aria-selected', 'true');\r\n this.searchSelectInput.nativeElement.setAttribute('aria-activedescendant', ariaActiveDescendantId);\r\n }\r\n }\r\n }\r\n\r\n writeValue(value: string): void {\r\n this._lastExternalInputValue = value;\r\n this.formControl.setValue(value);\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n onBlur(): void {\r\n this._unselectActiveDescendant();\r\n this.onTouched();\r\n }\r\n\r\n registerOnChange(fn: (value: string) => void): void {\r\n this.formControl.valueChanges.pipe(\r\n filter(value => value !== this._lastExternalInputValue),\r\n tap(() => this._lastExternalInputValue = undefined),\r\n takeUntil(this._onDestroy)\r\n ).subscribe(fn);\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n public focus(): void {\r\n if (!this.searchSelectInput || !this.matSelect.panel) {\r\n return;\r\n }\r\n const panel = this.matSelect.panel.nativeElement;\r\n const scrollTop = panel.scrollTop;\r\n\r\n this.searchSelectInput.nativeElement.focus();\r\n\r\n panel.scrollTop = scrollTop;\r\n }\r\n\r\n public reset(focus?: boolean): void {\r\n this.formControl.setValue('');\r\n if (focus) {\r\n this.focus();\r\n }\r\n }\r\n\r\n public updateInputWidth(): void {\r\n if (!this.innerSelectSearch?.nativeElement) {\r\n return;\r\n }\r\n const element: HTMLElement = this.innerSelectSearch.nativeElement;\r\n let panelElement: HTMLElement | void = void 0;\r\n while (element === element.parentElement) {\r\n if (element.classList.contains('mat-select-panel')) {\r\n panelElement = element;\r\n break;\r\n }\r\n }\r\n if (panelElement) {\r\n this.innerSelectSearch.nativeElement.style.width = panelElement.clientWidth + 'px';\r\n }\r\n }\r\n\r\n private _getMatOptionHeight(): number {\r\n if (this.matSelect.options.length > 0) {\r\n return this.matSelect.options.first._getHostElement().getBoundingClientRect().height;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n private _getOptionsLengthOffset(): number {\r\n if (this._matOption) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n private _unselectActiveDescendant(): void {\r\n this._activeDescendant?.removeAttribute('aria-selected');\r\n this.searchSelectInput.nativeElement.removeAttribute('aria-activedescendant');\r\n }\r\n private _applyDefaultOptions(defaultOptions?: MatSelectSearchOptions|null): void {\r\n if (!defaultOptions) {\r\n return;\r\n }\r\n for (const key of configurableDefaultOptions) {\r\n if (Object.prototype.hasOwnProperty.call(defaultOptions, key)) {\r\n (this[key] as any) = defaultOptions[key];\r\n }\r\n }\r\n }\r\n /*\r\n * Initializes handling <mat-select [multiple]=\"true\">\r\n * Note: to improve this code, mat-select should be extended to allow disabling resetting the selection while filtering.\r\n */\r\n private _initMultipleHandling(): void {\r\n if (!this.matSelect.ngControl) {\r\n if (this.matSelect.multiple) {\r\n // note: the access to matSelect.ngControl (instead of matSelect.value / matSelect.valueChanges)\r\n // is necessary to properly work in multi-selection mode.\r\n console.error('the mat-select containing cmat-select-search must have a ngModel or formControl directive when multiple=true');\r\n }\r\n return;\r\n }\r\n // if <mat-select [multiple]=\"true\">\r\n // store previously selected values and restore them when they are deselected\r\n // because the option is not available while we are currently filtering\r\n this._previousSelectedValues = this.matSelect.ngControl.value;\r\n\r\n this.matSelect.ngControl.valueChanges?.pipe(takeUntil(this._onDestroy))\r\n .subscribe((values) => {\r\n let restoreSelectedValues = false;\r\n if (this.matSelect.multiple) {\r\n if ((this.alwaysRestoreSelectedOptionsMulti || (this.formControl.value?.length))\r\n && this._previousSelectedValues && Array.isArray(this._previousSelectedValues)) {\r\n if (!values || !Array.isArray(values)) {\r\n values = [];\r\n }\r\n const optionValues = this.matSelect.options.map(option => option.value);\r\n this._previousSelectedValues.forEach((previousValue) => {\r\n if (!values.some((v: any) => this.matSelect.compareWith(v, previousValue))\r\n && !optionValues.some(v => this.matSelect.compareWith(v, previousValue))) {\r\n // if a value that was selected before is deselected and not found in the options, it was deselected\r\n // due to the filtering, so we restore it.\r\n values.push(previousValue);\r\n restoreSelectedValues = true;\r\n }\r\n });\r\n }\r\n }\r\n this._previousSelectedValues = values;\r\n\r\n if (restoreSelectedValues) {\r\n this.matSelect._onChange(values);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Scrolls the currently active option into the view if it is not yet visible.\r\n */\r\n private _adjustScrollTopToFitActiveOptionIntoView(): void {\r\n if (this.matSelect.panel && this.matSelect.options.length > 0) {\r\n const matOptionHeight = this._getMatOptionHeight();\r\n const activeOptionIndex = this.matSelect._keyManager.activeItemIndex ?? 0;\r\n const labelCount = _countGroupLabelsBeforeOption(activeOptionIndex, this.matSelect.options, this.matSelect.optionGroups);\r\n // If the component is in a MatOption, the activeItemIndex will be offset by one.\r\n const indexOfOptionToFitIntoView = (this._matOption ? -1 : 0) + labelCount + activeOptionIndex;\r\n const currentScrollTop = this.matSelect.panel.nativeElement.scrollTop;\r\n\r\n const searchInputHeight = this.innerSelectSearch.nativeElement.offsetHeight;\r\n const amountOfVisibleOptions = Math.floor((SELECT_PANEL_MAX_HEIGHT - searchInputHeight) / matOptionHeight);\r\n\r\n const indexOfFirstVisibleOption = Math.round((currentScrollTop + searchInputHeight) / matOptionHeight) - 1;\r\n\r\n if (indexOfFirstVisibleOption >= indexOfOptionToFitIntoView) {\r\n this.matSelect.panel.nativeElement.scrollTop = indexOfOptionToFitIntoView * matOptionHeight;\r\n } else if (indexOfFirstVisibleOption + amountOfVisibleOptions <= indexOfOptionToFitIntoView) {\r\n this.matSelect.panel.nativeElement.scrollTop = (indexOfOptionToFitIntoView + 1) * matOptionHeight\r\n - (SELECT_PANEL_MAX_HEIGHT - searchInputHeight);\r\n }\r\n }\r\n }\r\n}\r\n","<input matInput class=\"cmat-select-search-input cmat-select-search-hidden\" />\r\n\r\n<div #innerSelectSearch class=\"cmat-select-search-inner mat-typography mat-tab-header\"\r\n [ngClass]=\"{'cmat-select-search-inner-multiple': matSelect.multiple, 'cmat-select-search-inner-toggle-all': isToggleAllCheckboxVisible() }\">\r\n\r\n @if (isToggleAllCheckboxVisible()) {\r\n <mat-checkbox class=\"cmat-select-search-toggle-all-checkbox -mr-4\"\r\n matTooltipClass=\"cmat-select-search-toggle-all-tooltip\" [color]=\"matFormField?.color\"\r\n [checked]=\"toggleAllCheckboxChecked\" [indeterminate]=\"toggleAllCheckboxIndeterminate\"\r\n [matTooltip]=\"toggleAllCheckboxTooltipMessage\" [matTooltipPosition]=\"toggleAllCheckboxTooltipPosition\"\r\n (change)=\"emitSelectAllBooleanToParent($event.checked)\">\r\n </mat-checkbox>\r\n }\r\n <span matPrefix class=\"flex flex-col justify-center pl-2\">\r\n <mat-icon class=\"cmat-select-search-icon\" color=\"primary\" svgIcon=\"heroicons_outline:magnifying-glass\"></mat-icon>\r\n </span>\r\n <input #searchSelectInput matInput class=\"cmat-select-search-input cmat-input-element\" autocomplete=\"off\"\r\n [type]=\"type\" [formControl]=\"formControl\" [placeholder]=\"placeholderLabel\" [attr.aria-label]=\"ariaLabel\"\r\n (keydown)=\"handleKeydown($event)\" (keyup)=\"handleKeyup($event)\" (blur)=\"onBlur()\" />\r\n @if (searching) {\r\n <mat-spinner class=\"cmat-select-search-spinner\" diameter=\"16\"></mat-spinner>\r\n }\r\n\r\n @if (!hideClearSearchButton && value && !searching) {\r\n <button type=\"button\" matIconButton aria-label=\"Clear\"\r\n class=\"cmat-select-search-clear\" (click)=\"reset(true)\">\r\n @if (clearIcon) {\r\n <ng-content select=\"[cmatSelectSearchClear]\"></ng-content>\r\n } @else {\r\n <mat-icon svgIcon=\"mat_outline:close\"></mat-icon>\r\n }\r\n </button>\r\n }\r\n\r\n <ng-content select=\".cmat-select-search-custom-header-content\"></ng-content>\r\n </div>\r\n\r\n @if (showNoEntriesFound$ | async) {\r\n <div class=\"cmat-select-search-no-entries-found\">\r\n @if (noEntriesFound) {\r\n <ng-content select=\"[cmatSelectNoEntriesFound]\"></ng-content>\r\n } @else {\r\n {{noEntriesFoundLabel}}\r\n }\r\n </div>\r\n }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACO,MAAM,0BAA0B,GAAG;IACxC,W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8B,EAAA,CAAA;sBAAtC;gBAEQ,+BAA+B,EAAA,CAAA;sBAAvC;gBAEQ,gCAAgC,EAAA,CAAA;sBAAxC;gBAEQ,qBAAqB,EAAA,CAAA;sBAA7B;gBAEQ,iCAAiC,EAAA,CAAA;sBAAzC;gBAGS,SAAS,EAAA,CAAA;sBAAlB;gBAEmE,iBAAiB,EAAA,CAAA;sBAApF,SAAS;uBAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;gBAEE,iBAAiB,EAAA,CAAA;sBAApF,SAAS;uBAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;gBACD,SAAS,EAAA,CAAA;sBAAzE,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,8BAA8B,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBACd,cAAc,EAAA,CAAA;sBAA9D,YAAY;uBAAC,iCAAiC;gBA8C3C,iBAAiB,EAAA,CAAA;sBADpB,WAAW;uBAAC,4CAA4C;;;AEnI3D;;AAEG;;;;"}
|
|
@@ -573,10 +573,10 @@ class CmatSelectTableComponent {
|
|
|
573
573
|
this.resetOptionAction();
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
577
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: CmatSelectTableComponent, isStandalone: true, selector: "cmat-select-table", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", overallSearchVisible: "overallSearchVisible", resetSortOnOpen: "resetSortOnOpen", resetFiltersOnOpen: "resetFiltersOnOpen", customTriggerLabelFn: "customTriggerLabelFn", triggerLabelSort: "triggerLabelSort", customTriggerLabelTemplate: "customTriggerLabelTemplate", canNull: "canNull", defaultSort: "defaultSort", resetOptionAction: "resetOptionAction", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { closed: "closed" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent }], viewQueries: [{ propertyName: "_matSelectSearch", first: true, predicate: CmatSelectSearchComponent, descendants: true }, { propertyName: "_sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "_table", first: true, predicate: MatTable, descendants: true }, { propertyName: "matSelect", first: true, predicate: ["componentSelect"], descendants: true }, { propertyName: "_matOptions", predicate: MatOption, descendants: true }], exportAs: ["cmatSelectTable"], usesOnChanges: true, ngImport: i0, template: "@if(multiple){\r\n<mat-select #componentSelect multiple disableRipple\r\n panelClass=\"cmat-select-search-table-panel overflow-hidden\"\r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareObjects\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState}\" (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource\">\r\n @for (columnKey of tableColumns; track $index) {\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{selection: true, hidden: !multiple}\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{selection: true, hidden: !multiple}\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!tableColumnsMap.get(columnKey)?.sortable\">\r\n @if(!tableColumnsMap.get(columnKey)?.sortable){\r\n <div>{{tableColumnsMap.get(columnKey)?.name}}</div>\r\n }@else {\r\n @switch (tableColumnsMap.get(columnKey)?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"{column: tableColumnsMap.get(columnKey)}\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"{column: tableColumnsMap.get(columnKey)}\"></ng-container>\r\n }\r\n @default {\r\n <div>{{tableColumnsMap.get(columnKey)?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n {{row[columnKey]}}\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns; sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns;\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}@else {\r\n<mat-select #componentSelect disableRipple\r\n panelClass=\"cmat-select-search-table-panel overflow-hidden\"\r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareObjects\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState}\" (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource\">\r\n @for (columnKey of tableColumns; track $index) {\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if(row.id===null){\r\n <mat-option></mat-option>\r\n }@else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n } \r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!tableColumnsMap.get(columnKey)?.sortable\">\r\n @if(!tableColumnsMap.get(columnKey)?.sortable){\r\n <div>{{tableColumnsMap.get(columnKey)?.name}}</div>\r\n }@else {\r\n @switch (tableColumnsMap.get(columnKey)?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"{column: tableColumnsMap.get(columnKey)}\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"{column: tableColumnsMap.get(columnKey)}\"></ng-container>\r\n }\r\n @default {\r\n <div>{{tableColumnsMap.get(columnKey)?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"addNullRow() && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: addNullRow() && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n {{addNullRow() && row.id === null && $index === 1 ? '\u7A7A' : row[columnKey]}}\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns; sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns;\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\"\r\n [placeholder]=\"column.name\" (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"], dependencies: [{ kind: "component", type: CmatSelectSearchComponent, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i8.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
576
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatSelectTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
577
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: CmatSelectTableComponent, isStandalone: true, selector: "cmat-select-table", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", overallSearchVisible: "overallSearchVisible", resetSortOnOpen: "resetSortOnOpen", resetFiltersOnOpen: "resetFiltersOnOpen", customTriggerLabelFn: "customTriggerLabelFn", triggerLabelSort: "triggerLabelSort", customTriggerLabelTemplate: "customTriggerLabelTemplate", canNull: "canNull", defaultSort: "defaultSort", resetOptionAction: "resetOptionAction", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { closed: "closed" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent }], viewQueries: [{ propertyName: "_matSelectSearch", first: true, predicate: CmatSelectSearchComponent, descendants: true }, { propertyName: "_sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "_table", first: true, predicate: MatTable, descendants: true }, { propertyName: "matSelect", first: true, predicate: ["componentSelect"], descendants: true }, { propertyName: "_matOptions", predicate: MatOption, descendants: true }], exportAs: ["cmatSelectTable"], usesOnChanges: true, ngImport: i0, template: "@if(multiple){\r\n<mat-select #componentSelect multiple disableRipple\r\n panelClass=\"cmat-select-search-table-panel overflow-hidden\"\r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareObjects\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState}\" (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource\">\r\n @for (columnKey of tableColumns; track $index) {\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{selection: true, hidden: !multiple}\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{selection: true, hidden: !multiple}\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!tableColumnsMap.get(columnKey)?.sortable\">\r\n @if(!tableColumnsMap.get(columnKey)?.sortable){\r\n <div>{{tableColumnsMap.get(columnKey)?.name}}</div>\r\n }@else {\r\n @switch (tableColumnsMap.get(columnKey)?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"{column: tableColumnsMap.get(columnKey)}\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"{column: tableColumnsMap.get(columnKey)}\"></ng-container>\r\n }\r\n @default {\r\n <div>{{tableColumnsMap.get(columnKey)?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n {{row[columnKey]}}\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns; sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns;\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}@else {\r\n<mat-select #componentSelect disableRipple\r\n panelClass=\"cmat-select-search-table-panel overflow-hidden\"\r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareObjects\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState}\" (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource\">\r\n @for (columnKey of tableColumns; track $index) {\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if(row.id===null){\r\n <mat-option></mat-option>\r\n }@else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n } \r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!tableColumnsMap.get(columnKey)?.sortable\">\r\n @if(!tableColumnsMap.get(columnKey)?.sortable){\r\n <div>{{tableColumnsMap.get(columnKey)?.name}}</div>\r\n }@else {\r\n @switch (tableColumnsMap.get(columnKey)?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"{column: tableColumnsMap.get(columnKey)}\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"{column: tableColumnsMap.get(columnKey)}\"></ng-container>\r\n }\r\n @default {\r\n <div>{{tableColumnsMap.get(columnKey)?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"addNullRow() && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: addNullRow() && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n {{addNullRow() && row.id === null && $index === 1 ? '\u7A7A' : row[columnKey]}}\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns; sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns;\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\"\r\n [placeholder]=\"column.name\" (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"], dependencies: [{ kind: "component", type: CmatSelectSearchComponent, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i8.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
578
578
|
}
|
|
579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CmatSelectTableComponent, decorators: [{
|
|
580
580
|
type: Component,
|
|
581
581
|
args: [{ selector: 'cmat-select-table', exportAs: 'cmatSelectTable', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent }], imports: [CmatSelectSearchComponent, MatFormFieldModule, MatSelectModule, ReactiveFormsModule, CommonModule,
|
|
582
582
|
MatIconModule, MatTableModule, MatInputModule, MatSortModule, CmatDigitOnlyDirective
|