cmat 0.0.85 → 0.0.86
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/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-code-editor.mjs +3 -3
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +90 -90
- 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-date-time-display.mjs +3 -3
- package/fesm2022/cmat-components-date-time-display.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-empty-state.mjs +3 -3
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +3 -3
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +3 -3
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +3 -3
- package/fesm2022/cmat-components-form-actions.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-inline-loading.mjs +3 -3
- package/fesm2022/cmat-components-inline-loading.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 +3 -3
- 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-page-header.mjs +3 -3
- package/fesm2022/cmat-components-page-header.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-rich-text-editor.mjs +3 -3
- package/fesm2022/cmat-components-rich-text-editor.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-skeleton.mjs +3 -3
- package/fesm2022/cmat-components-skeleton.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-status-tag.mjs +3 -3
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +3 -3
- package/fesm2022/cmat-components-table-toolbar.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-directives-seamless-auto-scroll.mjs +3 -3
- package/fesm2022/cmat-directives-seamless-auto-scroll.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.mjs +534 -534
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +1 -1
- package/types/cmat-components-custom-formly.d.ts +2 -2
- package/types/cmat-components-fullscreen.d.ts +1 -1
- package/types/cmat-components-highlight.d.ts +1 -1
- package/types/cmat-components-popover.d.ts +2 -2
- package/types/cmat-components-x6-angular-shape.d.ts +2 -2
- package/types/cmat-pipes-find-by-key.d.ts +1 -0
- package/types/cmat.d.ts +9 -9
|
@@ -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, ElementRef, HostBinding, ViewChild, OnDestroy, inject, signal } 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<number>, 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<number>();\r\n\r\n readonly starArray = signal<number[]>([]);\r\n readonly currentValue = signal(0);\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\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: number) => void = () => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onTouchedChange: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this._initializeStarArray();\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if ('stars' in changes) {\r\n this._initializeStarArray();\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(): number {\r\n return this._value;\r\n }\r\n set value(value: number) {\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: number;\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: BooleanInput) {\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 | null): void {\r\n if (value !== null && value !== undefined) {\r\n this.value = value;\r\n this.currentValue.set(value);\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: (value: number) => void): void {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): 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: MouseEvent, 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.set(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: MouseEvent, 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 private _initializeStarArray(): void {\r\n this.starArray.set(Array.from({ length: this.stars }, (_, i) => i));\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>\r\n","/**\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;AAwB9B,IAAA,WAAA,GAAA;AArBO,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,EAAU;AAEzC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAW,EAAE,gFAAC;AAChC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,CAAC,mFAAC;AAExB,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,SAA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EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,OAAO,2EAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAE9B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAV/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,SAAA,EAGZ,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,mBAAqB,EAAE,CAAC,EAAA,aAAA,EAChE,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,YAAY,EAAA,OAAA,EACb,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,2nCAAA,EAAA,MAAA,EAAA,CAAA,waAAA,CAAA,EAAA;;sBAGzC,WAAW;uBAAC,SAAS;;sBACrB;;sBAGA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;sBAErC;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAwCA;;sBAUA;;sBA8BA;;sBAQA;;;AE3HH;;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, ElementRef, HostBinding, ViewChild, OnDestroy, inject, signal } 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<number>, 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<number>();\r\n\r\n readonly starArray = signal<number[]>([]);\r\n readonly currentValue = signal(0);\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\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: number) => void = () => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n onTouchedChange: () => void = () => { };\r\n\r\n ngOnInit(): void {\r\n this._initializeStarArray();\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if ('stars' in changes) {\r\n this._initializeStarArray();\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(): number {\r\n return this._value;\r\n }\r\n set value(value: number) {\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: number;\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: BooleanInput) {\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 | null): void {\r\n if (value !== null && value !== undefined) {\r\n this.value = value;\r\n this.currentValue.set(value);\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: (value: number) => void): void {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): 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: MouseEvent, 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.set(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: MouseEvent, 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 private _initializeStarArray(): void {\r\n this.starArray.set(Array.from({ length: this.stars }, (_, i) => i));\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>\r\n","/**\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;AAwB9B,IAAA,WAAA,GAAA;AArBO,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,EAAU;AAEzC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAW,EAAE,gFAAC;AAChC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,CAAC,mFAAC;AAExB,QAAA,IAAA,CAAA,YAAY,GAAkB,IAAI,OAAO,EAAQ;QAC1D,IAAA,CAAA,OAAO,GAAY,KAAK;QACxB,IAAA,CAAA,OAA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;;AAEG;;;;"}
|
|
@@ -17,10 +17,10 @@ class CmatRichTextEditorComponent {
|
|
|
17
17
|
this.control.setValue(this.value ?? '', { emitEvent: false });
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatRichTextEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: CmatRichTextEditorComponent, isStandalone: true, selector: "cmat-rich-text-editor", inputs: { value: "value", placeholder: "placeholder", readOnly: "readOnly", theme: "theme", minHeight: "minHeight" }, usesOnChanges: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@defer (on viewport) {\r\n <div class=\"rounded-2xl border border-default bg-card shadow-sm\">\r\n <quill-editor class=\"w-full\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readOnly]=\"readOnly\" [theme]=\"theme\" [styles]=\"{ minHeight }\"></quill-editor>\r\n </div>\r\n} @placeholder {\r\n <div class=\"flex items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\" [style.minHeight]=\"minHeight\">\r\n \u5BCC\u6587\u672C\u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('ngx-quill').then(m => m.QuillEditorComponent), i1.NgControlStatus, i1.FormControlDirective]] }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.10", ngImport: i0, type: CmatRichTextEditorComponent, resolveDeferredDeps: () => [import('ngx-quill').then(m => m.QuillEditorComponent)], resolveMetadata: QuillEditorComponent => ({ decorators: [{
|
|
24
24
|
type: Component,
|
|
25
25
|
args: [{ selector: 'cmat-rich-text-editor', changeDetection: ChangeDetectionStrategy.OnPush, imports: [QuillEditorComponent, ReactiveFormsModule], template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@defer (on viewport) {\r\n <div class=\"rounded-2xl border border-default bg-card shadow-sm\">\r\n <quill-editor class=\"w-full\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readOnly]=\"readOnly\" [theme]=\"theme\" [styles]=\"{ minHeight }\"></quill-editor>\r\n </div>\r\n} @placeholder {\r\n <div class=\"flex items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\" [style.minHeight]=\"minHeight\">\r\n \u5BCC\u6587\u672C\u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n", styles: [":host{display:block}\n"] }]
|
|
26
26
|
}], ctorParameters: null, propDecorators: { value: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-components-rich-text-editor.mjs","sources":["../../../projects/cmat/components/rich-text-editor/rich-text-editor.component.ts","../../../projects/cmat/components/rich-text-editor/rich-text-editor.component.html","../../../projects/cmat/components/rich-text-editor/cmat-components-rich-text-editor.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { QuillEditorComponent } from 'ngx-quill';\r\n\r\n@Component({\r\n selector: 'cmat-rich-text-editor',\r\n templateUrl: './rich-text-editor.component.html',\r\n styleUrls: ['./rich-text-editor.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [QuillEditorComponent, ReactiveFormsModule]\r\n})\r\nexport class CmatRichTextEditorComponent implements OnChanges {\r\n \r\n @Input() value :string= '';\r\n\r\n \r\n @Input() placeholder: string = '请输入内容';\r\n\r\n \r\n @Input() readOnly: boolean = false;\r\n\r\n \r\n @Input() theme: string = 'snow';\r\n\r\n \r\n @Input() minHeight: string = '240px';\r\n\r\n \r\n control = new FormControl('');\r\n\r\n \r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['value']) {\r\n this.control.setValue(this.value ?? '', { emitEvent: false });\r\n }\r\n }\r\n}\r\n","<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@defer (on viewport) {\r\n <div class=\"rounded-2xl border border-default bg-card shadow-sm\">\r\n <quill-editor class=\"w-full\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readOnly]=\"readOnly\" [theme]=\"theme\" [styles]=\"{ minHeight }\"></quill-editor>\r\n </div>\r\n} @placeholder {\r\n <div class=\"flex items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\" [style.minHeight]=\"minHeight\">\r\n 富文本编辑器加载中...\r\n </div>\r\n}\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,2BAA2B,CAAA;AAPxC,IAAA,WAAA,GAAA;QASa,IAAA,CAAA,KAAK,GAAU,EAAE;QAGjB,IAAA,CAAA,WAAW,GAAW,OAAO;QAG7B,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,KAAK,GAAW,MAAM;QAGtB,IAAA,CAAA,SAAS,GAAW,OAAO;AAGpC,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC;AAQhC,IAAA;AALG,IAAA,WAAW,CAAC,OAAsB,EAAA;AAC9B,QAAA,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;AAClB,YAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QACjE;IACJ
|
|
1
|
+
{"version":3,"file":"cmat-components-rich-text-editor.mjs","sources":["../../../projects/cmat/components/rich-text-editor/rich-text-editor.component.ts","../../../projects/cmat/components/rich-text-editor/rich-text-editor.component.html","../../../projects/cmat/components/rich-text-editor/cmat-components-rich-text-editor.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { QuillEditorComponent } from 'ngx-quill';\r\n\r\n@Component({\r\n selector: 'cmat-rich-text-editor',\r\n templateUrl: './rich-text-editor.component.html',\r\n styleUrls: ['./rich-text-editor.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [QuillEditorComponent, ReactiveFormsModule]\r\n})\r\nexport class CmatRichTextEditorComponent implements OnChanges {\r\n \r\n @Input() value :string= '';\r\n\r\n \r\n @Input() placeholder: string = '请输入内容';\r\n\r\n \r\n @Input() readOnly: boolean = false;\r\n\r\n \r\n @Input() theme: string = 'snow';\r\n\r\n \r\n @Input() minHeight: string = '240px';\r\n\r\n \r\n control = new FormControl('');\r\n\r\n \r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['value']) {\r\n this.control.setValue(this.value ?? '', { emitEvent: false });\r\n }\r\n }\r\n}\r\n","<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@defer (on viewport) {\r\n <div class=\"rounded-2xl border border-default bg-card shadow-sm\">\r\n <quill-editor class=\"w-full\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readOnly]=\"readOnly\" [theme]=\"theme\" [styles]=\"{ minHeight }\"></quill-editor>\r\n </div>\r\n} @placeholder {\r\n <div class=\"flex items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\" [style.minHeight]=\"minHeight\">\r\n 富文本编辑器加载中...\r\n </div>\r\n}\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,2BAA2B,CAAA;AAPxC,IAAA,WAAA,GAAA;QASa,IAAA,CAAA,KAAK,GAAU,EAAE;QAGjB,IAAA,CAAA,WAAW,GAAW,OAAO;QAG7B,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,KAAK,GAAW,MAAM;QAGtB,IAAA,CAAA,SAAS,GAAW,OAAO;AAGpC,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC;AAQhC,IAAA;AALG,IAAA,WAAW,CAAC,OAAsB,EAAA;AAC9B,QAAA,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;AAClB,YAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QACjE;IACJ;+GAxBS,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,WAAA,EAAA,aAAA,EAAA,QAAA,EAAA,UAAA,EAAA,KAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXxC,4tBAWA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDFoC,mBAAmB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,sBAAA,EAAA,CAAA,MAAA,CAAA,OAAA,WAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,oBAAA,CAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,CAAA,oBAAA,CAAA,CAAA,EAAA,CAAA,CAAA;;iGAE1C,2BAA2B,EAAA,mBAAA,EAAA,MAAA,CAAA,OAAA,WAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,EAAA,eAAA,EAAA,oBAAA,KAAA,EAAA,UAAA,EAAA,CAAA;sBAPvC,SAAS;mCACI,uBAAuB,EAAA,eAAA,EAGhB,uBAAuB,CAAC,MAAM,WACtC,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,4tBAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;0BAInD;;0BAGA;;0BAGA;;0BAGA;;0BAGA;;;AEzBL;;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: "21.2.
|
|
42
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatSelectNoEntriesFoundDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: CmatSelectNoEntriesFoundDirective, isStandalone: true, selector: "[cmatSelectNoEntriesFound]", ngImport: i0 }); }
|
|
43
43
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", 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: "21.2.9", ngImpor
|
|
|
49
49
|
}] });
|
|
50
50
|
|
|
51
51
|
class CmatSelectSearchClearDirective {
|
|
52
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
53
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
52
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatSelectSearchClearDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
53
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: CmatSelectSearchClearDirective, isStandalone: true, selector: "[cmatSelectSearchClear]", ngImport: i0 }); }
|
|
54
54
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatSelectSearchClearDirective, decorators: [{
|
|
56
56
|
type: Directive,
|
|
57
57
|
args: [{
|
|
58
58
|
selector: '[cmatSelectSearchClear]'
|
|
@@ -386,8 +386,8 @@ class CmatSelectSearchComponent {
|
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
390
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatSelectSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
390
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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: [
|
|
391
391
|
{
|
|
392
392
|
provide: NG_VALUE_ACCESSOR,
|
|
393
393
|
useExisting: forwardRef(() => CmatSelectSearchComponent),
|
|
@@ -395,7 +395,7 @@ class CmatSelectSearchComponent {
|
|
|
395
395
|
}
|
|
396
396
|
], 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()) {\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 }\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!important;line-height:47px!important}: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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
397
397
|
}
|
|
398
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatSelectSearchComponent, decorators: [{
|
|
399
399
|
type: Component,
|
|
400
400
|
args: [{ selector: 'cmat-select-search', providers: [
|
|
401
401
|
{
|
|
@@ -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\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\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 { AsyncPipe, NgClass } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n DestroyRef,\r\n ElementRef,\r\n EventEmitter,\r\n forwardRef,\r\n HostBinding,\r\n Input,\r\n OnInit,\r\n Output,\r\n QueryList,\r\n ViewChild,\r\n ViewEncapsulation,\r\n inject,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\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 { combineLatest, Observable, of } from 'rxjs';\r\nimport { delay, filter, map, startWith, switchMap, take, tap } from 'rxjs/operators';\r\nimport { 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, ControlValueAccessor {\r\n\r\n @Input() placeholderLabel:string = '搜索';\r\n\r\n @Input() type: string = 'text';\r\n\r\n @Input() noEntriesFoundLabel: string = '无结果';\r\n\r\n @Input() showNoFoundLabel: boolean = true;\r\n\r\n @Input() clearSearchInput = true;\r\n\r\n @Input() searching: boolean = false;\r\n\r\n @Input() disableInitialFocus: boolean = false;\r\n\r\n @Input() enableClearOnEscapePressed = false;\r\n\r\n @Input() preventHomeEndKeyPropagation: boolean = false;\r\n\r\n @Input() disableScrollToActiveOnOptionsChanged: boolean = false;\r\n\r\n @Input() ariaLabel: string = '下拉搜索';\r\n\r\n \r\n @Input() showToggleAllCheckbox: boolean = false;\r\n\r\n \r\n @Input() toggleAllCheckboxChecked: boolean = false;\r\n\r\n \r\n @Input() toggleAllCheckboxIndeterminate: boolean = false;\r\n\r\n @Input() toggleAllCheckboxTooltipMessage: string = '';\r\n\r\n @Input() toggleAllCheckboxTooltipPosition: 'left' | 'right' | 'above' | 'below' | 'before' | 'after' = 'below';\r\n\r\n @Input() hideClearSearchButton: boolean = false;\r\n\r\n @Input() alwaysRestoreSelectedOptionsMulti: boolean = false;\r\n\r\n \r\n @Output() toggleAll = new EventEmitter<boolean>();\r\n\r\n @ViewChild('searchSelectInput', { read: ElementRef, static: true }) searchSelectInput: ElementRef<HTMLInputElement>;\r\n\r\n @ViewChild('innerSelectSearch', { read: ElementRef, static: true }) innerSelectSearch: ElementRef<HTMLElement>;\r\n @ContentChild(CmatSelectSearchClearDirective, { static: false }) clearIcon: CmatSelectSearchClearDirective;\r\n @ContentChild(CmatSelectNoEntriesFoundDirective) noEntriesFound: CmatSelectNoEntriesFoundDirective;\r\n formControl: FormControl<string | null> = new FormControl<string | null>('');\r\n\r\n protected matSelect = inject<MatSelect>(MatSelect);\r\n protected matFormField = inject<MatFormField | null>(MatFormField, { optional: true }) ?? null;\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 private readonly _destroyRef = inject(DestroyRef);\r\n\r\n private _options$ = signal<QueryList<MatOption> | null>(null);\r\n private _lastExternalInputValue?: string;\r\n\r\n private _optionsList$: Observable<MatOption[] | null> = toObservable(this._options$).pipe(\r\n switchMap((_options: QueryList<MatOption> | null): Observable<MatOption[] | null> => _options ?\r\n _options.changes.pipe(\r\n map((options: QueryList<MatOption>) => 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): number => options ? options.length : 0)\r\n );\r\n\r\n private _previousSelectedValues: unknown[] = [];\r\n \r\n private _activeDescendant?: HTMLElement;\r\n\r\n constructor() {\r\n this._applyDefaultOptions(this._defaultOptions);\r\n }\r\n\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly showNoEntriesFound = signal(false);\r\n\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]): boolean => !!this.noEntriesFoundLabel && !!value\r\n && optionsLength === this._getOptionsLengthOffset()),\r\n tap((showNoEntriesFound): void => this.showNoEntriesFound.set(!!showNoEntriesFound))\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$();\r\n }\r\n public set _options(_options: QueryList<MatOption>) {\r\n this._options$.set(_options);\r\n }\r\n\r\n onTouched: () => void = () => { /* empty */ };\r\n\r\n ngOnInit(): void {\r\n const panelClass = 'cmat-select-search-panel'; 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 as Record<string, boolean>)[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 takeUntilDestroyed(this._destroyRef)\r\n )\r\n .subscribe((opened): void => {\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(takeUntilDestroyed(this._destroyRef))\r\n .subscribe((): void => {\r\n if (this.matSelect._keyManager) {\r\n this.matSelect._keyManager.change.pipe(takeUntilDestroyed(this._destroyRef))\r\n .subscribe((): void => this._adjustScrollTopToFitActiveOptionIntoView());\r\n } else {\r\n console.warn('_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 takeUntilDestroyed(this._destroyRef)\r\n )\r\n .subscribe((): void => {\r\n setTimeout((): void => {\r\n if (this._options) {\r\n const options = this._options.toArray();\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 const firstOptionIsChanged = !this.matSelect.compareWith(previousFirstOption, currentFirstOption);\r\n\r\n if (firstOptionIsChanged\r\n || !keyManager.activeItem\r\n || !options.find((option): boolean => this.matSelect.compareWith(option, keyManager.activeItem))) {\r\n keyManager.setFirstItemActive();\r\n }\r\n setTimeout((): void => {\r\n this.updateInputWidth();\r\n });\r\n\r\n if (!this.disableScrollToActiveOnOptionsChanged) {\r\n this._adjustScrollTopToFitActiveOptionIntoView();\r\n }\r\n }\r\n previousFirstOption = currentFirstOption;\r\n }\r\n });\r\n });\r\n });\r\n this.showNoEntriesFound$.pipe(\r\n takeUntilDestroyed(this._destroyRef)\r\n ).subscribe((showNoEntriesFound): void => {\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 this._viewportRuler.change()\r\n .pipe(takeUntilDestroyed(this._destroyRef))\r\n .subscribe((): void => {\r\n if (this.matSelect.panelOpen) {\r\n this.updateInputWidth();\r\n }\r\n });\r\n\r\n this._initMultipleHandling();\r\n }\r\n\r\n emitSelectAllBooleanToParent(state: boolean): void {\r\n // 通知父组件切换全选状态\r\n this.toggleAll.emit(state);\r\n }\r\n\r\n isToggleAllCheckboxVisible(): boolean {\r\n // 仅在多选模式下显示全选复选框\r\n return this.matSelect.multiple && this.showToggleAllCheckbox;\r\n }\r\n\r\n handleKeydown(event: KeyboardEvent): void {\r\n if (event.key?.length === 1\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 setTimeout((): void => this.focus());\r\n }\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 handleKeyup(event: KeyboardEvent): void {\r\n // 方向键切换时同步当前高亮项\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): boolean => item.id === ariaActiveDescendantId) ?? -1;\r\n if (index >= 0) {\r\n this._unselectActiveDescendant();\r\n this._activeDescendant = this._options?.toArray()[index]._getHostElement();\r\n this._activeDescendant?.setAttribute('aria-selected', 'true');\r\n if (ariaActiveDescendantId) {\r\n this.searchSelectInput.nativeElement.setAttribute('aria-activedescendant', ariaActiveDescendantId);\r\n } else {\r\n this.searchSelectInput.nativeElement.removeAttribute('aria-activedescendant');\r\n }\r\n }\r\n }\r\n }\r\n\r\n writeValue(value: string): void {\r\n // 外部写入时同步输入框值\r\n this._lastExternalInputValue = value;\r\n this.formControl.setValue(value);\r\n }\r\n\r\n onBlur(): void {\r\n // 失焦时清理高亮并触发 touched\r\n this._unselectActiveDescendant();\r\n this.onTouched();\r\n }\r\n\r\n registerOnChange(fn: (value: string | null) => void): void {\r\n this.formControl.valueChanges.pipe(\r\n filter((value): boolean => value !== this._lastExternalInputValue),\r\n tap((): void => this._lastExternalInputValue = undefined),\r\n takeUntilDestroyed(this._destroyRef)\r\n ).subscribe(fn);\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n public focus(): void {\r\n // 聚焦并保持面板滚动位置\r\n if (!this.searchSelectInput || !this.matSelect.panel) {\r\n return;\r\n }\r\n const panel = this.matSelect.panel.nativeElement as HTMLElement;\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 // 重置搜索内容\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 // 根据面板宽度同步搜索输入宽度\r\n if (!this.innerSelectSearch?.nativeElement) {\r\n return;\r\n }\r\n let currentElement: HTMLElement | null = this.innerSelectSearch.nativeElement;\r\n let panelElement: HTMLElement | null = null;\r\n while (currentElement?.parentElement) {\r\n currentElement = currentElement.parentElement;\r\n if (currentElement.classList.contains('mat-select-panel')) {\r\n panelElement = currentElement;\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 // 获取首个选项高度,用于滚动计算\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 // 如果嵌套在 mat-option 内,则偏移一个选项\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 // 清理当前高亮项的 aria 状态\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 // 应用默认配置\r\n if (!defaultOptions) {\r\n return;\r\n }\r\n const options = defaultOptions;\r\n Object.assign(this, options);\r\n }\r\n private _initMultipleHandling(): void {\r\n // 初始化多选场景下的已选值保留逻辑\r\n // 处理多选场景下的已选值保留\r\n if (!this.matSelect.ngControl) {\r\n if (this.matSelect.multiple) {\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 this._previousSelectedValues = this.matSelect.ngControl.value as unknown[];\r\n\r\n this.matSelect.ngControl.valueChanges?.pipe(\r\n takeUntilDestroyed(this._destroyRef)\r\n )\r\n .subscribe((values: unknown): void => {\r\n let restoreSelectedValues = false;\r\n let currentValues: unknown[] = Array.isArray(values) ? values : [];\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 const optionValues = this.matSelect.options.map((option): unknown => option.value);\r\n this._previousSelectedValues.forEach((previousValue): void => {\r\n if (!currentValues.some((v: unknown): boolean => this.matSelect.compareWith(v, previousValue))\r\n && !optionValues.some((v): boolean => this.matSelect.compareWith(v, previousValue))) {\r\n currentValues.push(previousValue);\r\n restoreSelectedValues = true;\r\n }\r\n });\r\n }\r\n }\r\n this._previousSelectedValues = currentValues;\r\n\r\n if (restoreSelectedValues) {\r\n this.matSelect._onChange(currentValues);\r\n }\r\n });\r\n }\r\n\r\n \r\n private _adjustScrollTopToFitActiveOptionIntoView(): void {\r\n // 滚动到当前高亮项附近\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 const indexOfOptionToFitIntoView = (this._matOption ? -1 : 0) + labelCount + activeOptionIndex;\r\n const currentScrollTop = (this.matSelect.panel.nativeElement as HTMLElement).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 as HTMLElement).scrollTop = indexOfOptionToFitIntoView * matOptionHeight;\r\n } else if (indexOfFirstVisibleOption + amountOfVisibleOptions <= indexOfOptionToFitIntoView) {\r\n (this.matSelect.panel.nativeElement as HTMLElement).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()) {\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 {{noEnt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AAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,+BAA+B,CAAC;AACxD,4BAAA,KAAK,EAAE;AACR;qBACF,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,YACrC,kBAAkB,EAAA,OAAA,EACnB,CAAC,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,aAAa;wBACvG,WAAW,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,eAAe,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,kzEAAA,EAAA,MAAA,EAAA,CAAA,0wEAAA,CAAA,EAAA;;sBAIxF;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAGA;;sBAGA;;sBAGA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAGA;;sBAEA,SAAS;uBAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAEjE,SAAS;uBAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBACjE,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,8BAA8B,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;sBAC9D,YAAY;uBAAC,iCAAiC;;sBAgD9C,WAAW;uBAAC,4CAA4C;;;AExJ3D;;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\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\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 { AsyncPipe, NgClass } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n DestroyRef,\r\n ElementRef,\r\n EventEmitter,\r\n forwardRef,\r\n HostBinding,\r\n Input,\r\n OnInit,\r\n Output,\r\n QueryList,\r\n ViewChild,\r\n ViewEncapsulation,\r\n inject,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\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 { combineLatest, Observable, of } from 'rxjs';\r\nimport { delay, filter, map, startWith, switchMap, take, tap } from 'rxjs/operators';\r\nimport { 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, ControlValueAccessor {\r\n\r\n @Input() placeholderLabel:string = '搜索';\r\n\r\n @Input() type: string = 'text';\r\n\r\n @Input() noEntriesFoundLabel: string = '无结果';\r\n\r\n @Input() showNoFoundLabel: boolean = true;\r\n\r\n @Input() clearSearchInput = true;\r\n\r\n @Input() searching: boolean = false;\r\n\r\n @Input() disableInitialFocus: boolean = false;\r\n\r\n @Input() enableClearOnEscapePressed = false;\r\n\r\n @Input() preventHomeEndKeyPropagation: boolean = false;\r\n\r\n @Input() disableScrollToActiveOnOptionsChanged: boolean = false;\r\n\r\n @Input() ariaLabel: string = '下拉搜索';\r\n\r\n \r\n @Input() showToggleAllCheckbox: boolean = false;\r\n\r\n \r\n @Input() toggleAllCheckboxChecked: boolean = false;\r\n\r\n \r\n @Input() toggleAllCheckboxIndeterminate: boolean = false;\r\n\r\n @Input() toggleAllCheckboxTooltipMessage: string = '';\r\n\r\n @Input() toggleAllCheckboxTooltipPosition: 'left' | 'right' | 'above' | 'below' | 'before' | 'after' = 'below';\r\n\r\n @Input() hideClearSearchButton: boolean = false;\r\n\r\n @Input() alwaysRestoreSelectedOptionsMulti: boolean = false;\r\n\r\n \r\n @Output() toggleAll = new EventEmitter<boolean>();\r\n\r\n @ViewChild('searchSelectInput', { read: ElementRef, static: true }) searchSelectInput: ElementRef<HTMLInputElement>;\r\n\r\n @ViewChild('innerSelectSearch', { read: ElementRef, static: true }) innerSelectSearch: ElementRef<HTMLElement>;\r\n @ContentChild(CmatSelectSearchClearDirective, { static: false }) clearIcon: CmatSelectSearchClearDirective;\r\n @ContentChild(CmatSelectNoEntriesFoundDirective) noEntriesFound: CmatSelectNoEntriesFoundDirective;\r\n formControl: FormControl<string | null> = new FormControl<string | null>('');\r\n\r\n protected matSelect = inject<MatSelect>(MatSelect);\r\n protected matFormField = inject<MatFormField | null>(MatFormField, { optional: true }) ?? null;\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 private readonly _destroyRef = inject(DestroyRef);\r\n\r\n private _options$ = signal<QueryList<MatOption> | null>(null);\r\n private _lastExternalInputValue?: string;\r\n\r\n private _optionsList$: Observable<MatOption[] | null> = toObservable(this._options$).pipe(\r\n switchMap((_options: QueryList<MatOption> | null): Observable<MatOption[] | null> => _options ?\r\n _options.changes.pipe(\r\n map((options: QueryList<MatOption>) => 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): number => options ? options.length : 0)\r\n );\r\n\r\n private _previousSelectedValues: unknown[] = [];\r\n \r\n private _activeDescendant?: HTMLElement;\r\n\r\n constructor() {\r\n this._applyDefaultOptions(this._defaultOptions);\r\n }\r\n\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly showNoEntriesFound = signal(false);\r\n\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]): boolean => !!this.noEntriesFoundLabel && !!value\r\n && optionsLength === this._getOptionsLengthOffset()),\r\n tap((showNoEntriesFound): void => this.showNoEntriesFound.set(!!showNoEntriesFound))\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$();\r\n }\r\n public set _options(_options: QueryList<MatOption>) {\r\n this._options$.set(_options);\r\n }\r\n\r\n onTouched: () => void = () => { /* empty */ };\r\n\r\n ngOnInit(): void {\r\n const panelClass = 'cmat-select-search-panel'; 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 as Record<string, boolean>)[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 takeUntilDestroyed(this._destroyRef)\r\n )\r\n .subscribe((opened): void => {\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(takeUntilDestroyed(this._destroyRef))\r\n .subscribe((): void => {\r\n if (this.matSelect._keyManager) {\r\n this.matSelect._keyManager.change.pipe(takeUntilDestroyed(this._destroyRef))\r\n .subscribe((): void => this._adjustScrollTopToFitActiveOptionIntoView());\r\n } else {\r\n console.warn('_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 takeUntilDestroyed(this._destroyRef)\r\n )\r\n .subscribe((): void => {\r\n setTimeout((): void => {\r\n if (this._options) {\r\n const options = this._options.toArray();\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 const firstOptionIsChanged = !this.matSelect.compareWith(previousFirstOption, currentFirstOption);\r\n\r\n if (firstOptionIsChanged\r\n || !keyManager.activeItem\r\n || !options.find((option): boolean => this.matSelect.compareWith(option, keyManager.activeItem))) {\r\n keyManager.setFirstItemActive();\r\n }\r\n setTimeout((): void => {\r\n this.updateInputWidth();\r\n });\r\n\r\n if (!this.disableScrollToActiveOnOptionsChanged) {\r\n this._adjustScrollTopToFitActiveOptionIntoView();\r\n }\r\n }\r\n previousFirstOption = currentFirstOption;\r\n }\r\n });\r\n });\r\n });\r\n this.showNoEntriesFound$.pipe(\r\n takeUntilDestroyed(this._destroyRef)\r\n ).subscribe((showNoEntriesFound): void => {\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 this._viewportRuler.change()\r\n .pipe(takeUntilDestroyed(this._destroyRef))\r\n .subscribe((): void => {\r\n if (this.matSelect.panelOpen) {\r\n this.updateInputWidth();\r\n }\r\n });\r\n\r\n this._initMultipleHandling();\r\n }\r\n\r\n emitSelectAllBooleanToParent(state: boolean): void {\r\n // 通知父组件切换全选状态\r\n this.toggleAll.emit(state);\r\n }\r\n\r\n isToggleAllCheckboxVisible(): boolean {\r\n // 仅在多选模式下显示全选复选框\r\n return this.matSelect.multiple && this.showToggleAllCheckbox;\r\n }\r\n\r\n handleKeydown(event: KeyboardEvent): void {\r\n if (event.key?.length === 1\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 setTimeout((): void => this.focus());\r\n }\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 handleKeyup(event: KeyboardEvent): void {\r\n // 方向键切换时同步当前高亮项\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): boolean => item.id === ariaActiveDescendantId) ?? -1;\r\n if (index >= 0) {\r\n this._unselectActiveDescendant();\r\n this._activeDescendant = this._options?.toArray()[index]._getHostElement();\r\n this._activeDescendant?.setAttribute('aria-selected', 'true');\r\n if (ariaActiveDescendantId) {\r\n this.searchSelectInput.nativeElement.setAttribute('aria-activedescendant', ariaActiveDescendantId);\r\n } else {\r\n this.searchSelectInput.nativeElement.removeAttribute('aria-activedescendant');\r\n }\r\n }\r\n }\r\n }\r\n\r\n writeValue(value: string): void {\r\n // 外部写入时同步输入框值\r\n this._lastExternalInputValue = value;\r\n this.formControl.setValue(value);\r\n }\r\n\r\n onBlur(): void {\r\n // 失焦时清理高亮并触发 touched\r\n this._unselectActiveDescendant();\r\n this.onTouched();\r\n }\r\n\r\n registerOnChange(fn: (value: string | null) => void): void {\r\n this.formControl.valueChanges.pipe(\r\n filter((value): boolean => value !== this._lastExternalInputValue),\r\n tap((): void => this._lastExternalInputValue = undefined),\r\n takeUntilDestroyed(this._destroyRef)\r\n ).subscribe(fn);\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n public focus(): void {\r\n // 聚焦并保持面板滚动位置\r\n if (!this.searchSelectInput || !this.matSelect.panel) {\r\n return;\r\n }\r\n const panel = this.matSelect.panel.nativeElement as HTMLElement;\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 // 重置搜索内容\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 // 根据面板宽度同步搜索输入宽度\r\n if (!this.innerSelectSearch?.nativeElement) {\r\n return;\r\n }\r\n let currentElement: HTMLElement | null = this.innerSelectSearch.nativeElement;\r\n let panelElement: HTMLElement | null = null;\r\n while (currentElement?.parentElement) {\r\n currentElement = currentElement.parentElement;\r\n if (currentElement.classList.contains('mat-select-panel')) {\r\n panelElement = currentElement;\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 // 获取首个选项高度,用于滚动计算\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 // 如果嵌套在 mat-option 内,则偏移一个选项\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 // 清理当前高亮项的 aria 状态\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 // 应用默认配置\r\n if (!defaultOptions) {\r\n return;\r\n }\r\n const options = defaultOptions;\r\n Object.assign(this, options);\r\n }\r\n private _initMultipleHandling(): void {\r\n // 初始化多选场景下的已选值保留逻辑\r\n // 处理多选场景下的已选值保留\r\n if (!this.matSelect.ngControl) {\r\n if (this.matSelect.multiple) {\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 this._previousSelectedValues = this.matSelect.ngControl.value as unknown[];\r\n\r\n this.matSelect.ngControl.valueChanges?.pipe(\r\n takeUntilDestroyed(this._destroyRef)\r\n )\r\n .subscribe((values: unknown): void => {\r\n let restoreSelectedValues = false;\r\n let currentValues: unknown[] = Array.isArray(values) ? values : [];\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 const optionValues = this.matSelect.options.map((option): unknown => option.value);\r\n this._previousSelectedValues.forEach((previousValue): void => {\r\n if (!currentValues.some((v: unknown): boolean => this.matSelect.compareWith(v, previousValue))\r\n && !optionValues.some((v): boolean => this.matSelect.compareWith(v, previousValue))) {\r\n currentValues.push(previousValue);\r\n restoreSelectedValues = true;\r\n }\r\n });\r\n }\r\n }\r\n this._previousSelectedValues = currentValues;\r\n\r\n if (restoreSelectedValues) {\r\n this.matSelect._onChange(currentValues);\r\n }\r\n });\r\n }\r\n\r\n \r\n private _adjustScrollTopToFitActiveOptionIntoView(): void {\r\n // 滚动到当前高亮项附近\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 const indexOfOptionToFitIntoView = (this._matOption ? -1 : 0) + labelCount + activeOptionIndex;\r\n const currentScrollTop = (this.matSelect.panel.nativeElement as HTMLElement).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 as HTMLElement).scrollTop = indexOfOptionToFitIntoView * matOptionHeight;\r\n } else if (indexOfFirstVisibleOption + amountOfVisibleOptions <= indexOfOptionToFitIntoView) {\r\n (this.matSelect.panel.nativeElement as HTMLElement).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()) {\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 }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIO,MAAM,0BAA0B,GAAG;IAC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,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,YACrC,kBAAkB,EAAA,OAAA,EACnB,CAAC,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,aAAa;wBACvG,WAAW,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,eAAe,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,kzEAAA,EAAA,MAAA,EAAA,CAAA,0wEAAA,CAAA,EAAA;;sBAIxF;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAGA;;sBAGA;;sBAGA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAGA;;sBAEA,SAAS;uBAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAEjE,SAAS;uBAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBACjE,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,8BAA8B,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;sBAC9D,YAAY;uBAAC,iCAAiC;;sBAgD9C,WAAW;uBAAC,4CAA4C;;;AExJ3D;;AAEG;;;;"}
|
|
@@ -649,10 +649,10 @@ class CmatSelectTableComponent {
|
|
|
649
649
|
}
|
|
650
650
|
return this._sortData([...value], this.triggerLabelSort.active, this.triggerLabelSort.direction);
|
|
651
651
|
}
|
|
652
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
653
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatSelectTableComponent, isStandalone: true, selector: "cmat-select-table", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", isPhone: "isPhone", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", overallSearchVisible: "overallSearchVisible", resetSortOnOpen: "resetSortOnOpen", resetFiltersOnOpen: "resetFiltersOnOpen", customTriggerLabelFn: "customTriggerLabelFn", triggerLabelSort: "triggerLabelSort", customTriggerLabelTemplate: "customTriggerLabelTemplate", canNull: "canNull", defaultSort: "defaultSort", resetOptionAction: "resetOptionAction", keyParam: "keyParam", compareWith: "compareWith", 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 [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (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 @if(!isPhone){\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 }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\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]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{getCellValue(row, columnKey)}}\r\n </div>\r\n\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 [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\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()}\"\r\n (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 @if(!isPhone){\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 }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\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]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"hasNullRow && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: hasNullRow && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{hasNullRow && row.id === null && $index === 1 ? '\u7A7A' : getCellValue(row, columnKey)}}\r\n </div> \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>\r\n", 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 }); }
|
|
652
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatSelectTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
653
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: CmatSelectTableComponent, isStandalone: true, selector: "cmat-select-table", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", isPhone: "isPhone", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", overallSearchVisible: "overallSearchVisible", resetSortOnOpen: "resetSortOnOpen", resetFiltersOnOpen: "resetFiltersOnOpen", customTriggerLabelFn: "customTriggerLabelFn", triggerLabelSort: "triggerLabelSort", customTriggerLabelTemplate: "customTriggerLabelTemplate", canNull: "canNull", defaultSort: "defaultSort", resetOptionAction: "resetOptionAction", keyParam: "keyParam", compareWith: "compareWith", 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 [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (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 @if(!isPhone){\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 }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\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]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{getCellValue(row, columnKey)}}\r\n </div>\r\n\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 [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\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()}\"\r\n (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 @if(!isPhone){\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 }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\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]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"hasNullRow && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: hasNullRow && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{hasNullRow && row.id === null && $index === 1 ? '\u7A7A' : getCellValue(row, columnKey)}}\r\n </div> \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>\r\n", 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 }); }
|
|
654
654
|
}
|
|
655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatSelectTableComponent, decorators: [{
|
|
656
656
|
type: Component,
|
|
657
657
|
args: [{ selector: 'cmat-select-table', exportAs: 'cmatSelectTable', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent }], imports: [CmatSelectSearchComponent, MatFormFieldModule, MatSelectModule, ReactiveFormsModule, CommonModule,
|
|
658
658
|
MatIconModule, MatTableModule, MatInputModule, MatSortModule, CmatDigitOnlyDirective
|