@ngx-formly/material 6.0.4 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/esm2020/checkbox/checkbox.module.mjs +4 -4
- package/esm2020/checkbox/checkbox.type.mjs +3 -3
- package/esm2020/datepicker/datepicker.module.mjs +4 -4
- package/esm2020/datepicker/datepicker.type.mjs +3 -3
- package/esm2020/form-field/field.type.mjs +24 -5
- package/esm2020/form-field/form-field.module.mjs +7 -6
- package/esm2020/form-field/form-field.wrapper.mjs +34 -16
- package/esm2020/input/input.module.mjs +4 -4
- package/esm2020/input/input.type.mjs +3 -3
- package/esm2020/lib/ui-material.module.mjs +4 -4
- package/esm2020/multicheckbox/multicheckbox.module.mjs +4 -4
- package/esm2020/multicheckbox/multicheckbox.type.mjs +6 -6
- package/esm2020/native-select/native-select.module.mjs +4 -4
- package/esm2020/native-select/native-select.type.mjs +6 -6
- package/esm2020/radio/radio.module.mjs +4 -4
- package/esm2020/radio/radio.type.mjs +6 -6
- package/esm2020/select/select.module.mjs +4 -4
- package/esm2020/select/select.type.mjs +20 -8
- package/esm2020/slider/public_api.mjs +7 -3
- package/esm2020/slider/slider-input.mjs +442 -0
- package/esm2020/slider/slider-interface.mjs +15 -0
- package/esm2020/slider/slider-mdc.type.mjs +94 -0
- package/esm2020/slider/slider.module.mjs +20 -8
- package/esm2020/slider/slider.type.mjs +17 -9
- package/esm2020/textarea/textarea.module.mjs +4 -4
- package/esm2020/textarea/textarea.type.mjs +3 -3
- package/esm2020/toggle/toggle.module.mjs +4 -4
- package/esm2020/toggle/toggle.type.mjs +3 -3
- package/fesm2015/ngx-formly-material-checkbox.mjs +7 -7
- package/fesm2015/ngx-formly-material-datepicker.mjs +7 -7
- package/fesm2015/ngx-formly-material-form-field.mjs +63 -25
- package/fesm2015/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-input.mjs +7 -7
- package/fesm2015/ngx-formly-material-multicheckbox.mjs +9 -9
- package/fesm2015/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-native-select.mjs +9 -9
- package/fesm2015/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-radio.mjs +9 -9
- package/fesm2015/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-select.mjs +23 -13
- package/fesm2015/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-slider.mjs +581 -20
- package/fesm2015/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-textarea.mjs +7 -7
- package/fesm2015/ngx-formly-material-toggle.mjs +7 -7
- package/fesm2015/ngx-formly-material.mjs +4 -4
- package/fesm2020/ngx-formly-material-checkbox.mjs +7 -7
- package/fesm2020/ngx-formly-material-datepicker.mjs +7 -7
- package/fesm2020/ngx-formly-material-form-field.mjs +62 -24
- package/fesm2020/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-input.mjs +7 -7
- package/fesm2020/ngx-formly-material-multicheckbox.mjs +9 -9
- package/fesm2020/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-native-select.mjs +9 -9
- package/fesm2020/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-radio.mjs +9 -9
- package/fesm2020/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-select.mjs +23 -13
- package/fesm2020/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-slider.mjs +576 -20
- package/fesm2020/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-textarea.mjs +7 -7
- package/fesm2020/ngx-formly-material-toggle.mjs +7 -7
- package/fesm2020/ngx-formly-material.mjs +4 -4
- package/form-field/field.type.d.ts +2 -0
- package/form-field/form-field.wrapper.d.ts +3 -0
- package/package.json +2 -2
- package/select/select.type.d.ts +1 -0
- package/slider/public_api.d.ts +4 -2
- package/slider/slider-input.d.ts +178 -0
- package/slider/slider-interface.d.ts +133 -0
- package/slider/slider-mdc.type.d.ts +10 -0
- package/slider/slider.module.d.ts +9 -6
- package/slider/slider.type.d.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-form-field.mjs","sources":["../../../../src/ui/material/form-field/src/form-field.wrapper.ts","../../../../src/ui/material/form-field/src/form-field.module.ts","../../../../src/ui/material/form-field/src/field.type.ts","../../../../src/ui/material/form-field/src/ngx-formly-material-form-field.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n OnInit,\n OnDestroy,\n Renderer2,\n AfterViewInit,\n ElementRef,\n ViewEncapsulation,\n TemplateRef,\n} from '@angular/core';\nimport {\n ɵdefineHiddenProp as defineHiddenProp,\n FormlyFieldConfig,\n FormlyFieldProps as CoreFormlyFieldProps,\n FieldWrapper,\n} from '@ngx-formly/core';\nimport { MatFormField } from '@angular/material/form-field';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';\nimport { ThemePalette } from '@angular/material/core';\n\ninterface MatFormlyFieldConfig extends FormlyFieldConfig<FormlyFieldProps> {\n _formField?: FormlyWrapperFormField;\n}\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n prefix?: TemplateRef<any>;\n suffix?: TemplateRef<any>;\n hideLabel?: boolean;\n hideRequiredMarker?: boolean;\n hideFieldUnderline?: boolean;\n floatLabel?: FloatLabelType;\n appearance?: MatFormFieldAppearance;\n color?: ThemePalette;\n hintStart?: TemplateRef<any> | string;\n hintEnd?: TemplateRef<any> | string;\n}\n\n@Component({\n selector: 'formly-wrapper-mat-form-field',\n template: `\n <!-- fix https://github.com/angular/material2/pull/7083 by setting width to 100% -->\n <mat-form-field\n [hideRequiredMarker]=\"true\"\n [floatLabel]=\"props.floatLabel\"\n [appearance]=\"props.appearance\"\n [color]=\"props.color\"\n >\n <ng-container #fieldComponent></ng-container>\n <mat-label *ngIf=\"props.label && props.hideLabel !== true\">\n {{ props.label }}\n <span\n *ngIf=\"props.required && props.hideRequiredMarker !== true\"\n aria-hidden=\"true\"\n class=\"mat-form-field-required-marker\"\n >*</span\n >\n </mat-label>\n\n <ng-container matPrefix *ngIf=\"props.prefix\">\n <ng-container [ngTemplateOutlet]=\"props.prefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-container>\n\n <ng-container matSuffix *ngIf=\"props.suffix\">\n <ng-container [ngTemplateOutlet]=\"props.suffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-container>\n\n <mat-error>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </mat-error>\n\n <mat-hint *ngIf=\"props.description || props.hintStart as hint\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hint }\">\n </ng-container>\n </mat-hint>\n\n <mat-hint *ngIf=\"props.hintEnd as hintEnd\" align=\"end\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hintEnd }\">\n </ng-container>\n </mat-hint>\n </mat-form-field>\n\n <ng-template #stringOrTemplate let-content=\"content\">\n <ng-container *ngIf=\"!content.createEmbeddedView; else template\">{{ content }}</ng-container>\n <ng-template #template>\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-template>\n </ng-template>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormlyWrapperFormField\n extends FieldWrapper<MatFormlyFieldConfig>\n implements OnInit, OnDestroy, AfterViewInit\n{\n @ViewChild(MatFormField, { static: true }) formField!: MatFormField;\n\n constructor(private renderer: Renderer2, private elementRef: ElementRef, private focusMonitor: FocusMonitor) {\n super();\n }\n\n ngOnInit() {\n defineHiddenProp(this.field, '_formField', this.formField);\n this.focusMonitor.monitor(this.elementRef, true).subscribe((origin) => {\n if (!origin && this.field.focus) {\n this.field.focus = false;\n }\n });\n }\n\n ngAfterViewInit() {\n // temporary fix for https://github.com/angular/material2/issues/7891\n if (this.formField.appearance !== 'outline' && this.props.hideFieldUnderline === true) {\n const underlineElement = this.formField._elementRef.nativeElement.querySelector('.mat-form-field-underline');\n underlineElement && this.renderer.removeChild(underlineElement.parentNode, underlineElement);\n }\n }\n\n ngOnDestroy() {\n delete this.field._formField;\n this.focusMonitor.stopMonitoring(this.elementRef);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\n }),\n ],\n})\nexport class FormlyMatFormFieldModule {}\n","import { OnDestroy, TemplateRef, ViewChild, Type, Directive, ViewChildren, QueryList } from '@angular/core';\nimport { FieldType as CoreFieldType, FormlyFieldConfig, ɵobserve as observe } from '@ngx-formly/core';\nimport { Subject } from 'rxjs';\nimport { MatFormField, MatFormFieldControl } from '@angular/material/form-field';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { FormlyFieldProps } from './form-field.wrapper';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig<FormlyFieldProps>>\n extends CoreFieldType<F>\n implements OnDestroy, MatFormFieldControl<any>\n{\n @ViewChild('matPrefix') set matPrefix(prefix: TemplateRef<any>) {\n if (prefix) {\n this.props.prefix = prefix;\n }\n }\n @ViewChild('matSuffix') set matSuffix(suffix: TemplateRef<any>) {\n if (suffix) {\n this.props.suffix = suffix;\n }\n }\n\n @ViewChildren(MatFormFieldControl) set _controls(controls: QueryList<MatFormFieldControl<any>>) {\n this.attachControl(controls.length === 1 ? controls.first : this);\n }\n\n errorStateMatcher: ErrorStateMatcher = { isErrorState: () => this.field && this.showError };\n stateChanges = new Subject<void>();\n _errorState = false;\n\n ngOnDestroy() {\n delete (this.formField as any)?._control;\n this.stateChanges.complete();\n }\n\n setDescribedByIds(_ids: string[]): void {}\n onContainerClick(_event: MouseEvent): void {\n this.field.focus = true;\n this.stateChanges.next();\n }\n\n get errorState() {\n const showError = this.options!.showError!(this);\n if (showError !== this._errorState) {\n this._errorState = showError;\n this.stateChanges.next();\n }\n\n return showError;\n }\n\n get controlType() {\n if (this.props.type) {\n return this.props.type;\n }\n\n const type = this.field.type!;\n return type instanceof Type ? type.prototype.constructor.name : type;\n }\n get focused() {\n return !!this.field.focus && !this.disabled;\n }\n get disabled() {\n return !!this.props.disabled;\n }\n get required() {\n return !!this.props.required;\n }\n get placeholder() {\n return this.props.placeholder || '';\n }\n get shouldPlaceholderFloat() {\n return this.shouldLabelFloat;\n }\n get value() {\n return this.formControl?.value;\n }\n set value(value) {\n this.formControl?.patchValue(value);\n }\n get ngControl() {\n return this.formControl as any;\n }\n get empty() {\n return this.value == null || this.value === '';\n }\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n get formField(): MatFormField {\n return (this.field as any)?.['_formField'];\n }\n\n private attachControl(control: MatFormFieldControl<any>) {\n if (this.formField && control !== this.formField._control) {\n this.formField._control = control;\n\n // temporary fix for https://github.com/angular/material2/issues/6728\n const ngControl = control?.ngControl as any;\n if (ngControl?.valueAccessor?.hasOwnProperty('_formField')) {\n ngControl.valueAccessor['_formField'] = this.formField;\n }\n\n ['prefix', 'suffix'].forEach((type) =>\n observe<TemplateRef<any>>(\n this.field,\n ['props', type],\n ({ currentValue }) =>\n currentValue &&\n Promise.resolve().then(() => {\n this.options.detectChanges!(this.field);\n }),\n ),\n );\n\n // https://github.com/angular/components/issues/16209\n const setDescribedByIds = control.setDescribedByIds.bind(control);\n control.setDescribedByIds = (ids: string[]) => {\n setTimeout(() => setDescribedByIds(ids));\n };\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["defineHiddenProp","i1","CoreFieldType","observe"],"mappings":";;;;;;;;;;;;AA6FM,MAAO,sBACX,SAAQ,YAAkC,CAAA;AAK1C,IAAA,WAAA,CAAoB,QAAmB,EAAU,UAAsB,EAAU,YAA0B,EAAA;AACzG,QAAA,KAAK,EAAE,CAAC;AADU,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AAAU,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;AAAU,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;KAE1G;IAED,QAAQ,GAAA;QACNA,iBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;AAC3D,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,KAAI;YACpE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;AAC/B,gBAAA,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;AAC1B,aAAA;AACH,SAAC,CAAC,CAAC;KACJ;IAED,eAAe,GAAA;;AAEb,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB,KAAK,IAAI,EAAE;AACrF,YAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAAC;AAC7G,YAAA,gBAAgB,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;AAC9F,SAA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,CAAC,EAAE,YAAY,EAAE,KACf,YAAY;AACZ,gBAAA,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,MAAK;oBAC1B,IAAI,CAAC,OAAO,CAAC,aAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACzC,CAAC,CACL,CACF,CAAC;;YAGF,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClE,YAAA,OAAO,CAAC,iBAAiB,GAAG,CAAC,GAAa,KAAI;gBAC5C,UAAU,CAAC,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3C,aAAC,CAAC;AACH,SAAA;KACF;;uGAlHmB,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,SAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,0OAef,mBAAmB,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAfb,SAAS,EAAA,UAAA,EAAA,CAAA;kBAD9B,SAAS;8BAKoB,SAAS,EAAA,CAAA;sBAApC,SAAS;uBAAC,WAAW,CAAA;gBAKM,SAAS,EAAA,CAAA;sBAApC,SAAS;uBAAC,WAAW,CAAA;gBAMiB,SAAS,EAAA,CAAA;sBAA/C,YAAY;uBAAC,mBAAmB,CAAA;;;ACvBnC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-form-field.mjs","sources":["../../../../src/ui/material/form-field/src/form-field.wrapper.ts","../../../../src/ui/material/form-field/src/form-field.module.ts","../../../../src/ui/material/form-field/src/field.type.ts","../../../../src/ui/material/form-field/src/ngx-formly-material-form-field.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n OnInit,\n OnDestroy,\n Renderer2,\n AfterViewInit,\n ElementRef,\n ViewEncapsulation,\n TemplateRef,\n} from '@angular/core';\nimport {\n ɵdefineHiddenProp as defineHiddenProp,\n FormlyFieldConfig,\n FormlyFieldProps as CoreFormlyFieldProps,\n FieldWrapper,\n} from '@ngx-formly/core';\nimport { MatFormField } from '@angular/material/form-field';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';\nimport { ThemePalette } from '@angular/material/core';\n\ninterface MatFormlyFieldConfig extends FormlyFieldConfig<FormlyFieldProps> {\n _formField?: FormlyWrapperFormField;\n}\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n prefix?: TemplateRef<any>;\n suffix?: TemplateRef<any>;\n textPrefix?: TemplateRef<any>;\n textSuffix?: TemplateRef<any>;\n hideLabel?: boolean;\n hideRequiredMarker?: boolean;\n hideFieldUnderline?: boolean;\n floatLabel?: FloatLabelType;\n appearance?: MatFormFieldAppearance;\n subscriptSizing?: 'fixed' | 'dynamic';\n color?: ThemePalette;\n hintStart?: TemplateRef<any> | string;\n hintEnd?: TemplateRef<any> | string;\n}\n\n@Component({\n selector: 'formly-wrapper-mat-form-field',\n template: `\n <!-- fix https://github.com/angular/material2/pull/7083 by setting width to 100% -->\n <mat-form-field\n [hideRequiredMarker]=\"true\"\n [floatLabel]=\"props.floatLabel\"\n [appearance]=\"props.appearance\"\n [subscriptSizing]=\"props.subscriptSizing\"\n [color]=\"props.color ?? 'primary'\"\n >\n <ng-container #fieldComponent></ng-container>\n <mat-label *ngIf=\"props.label && props.hideLabel !== true\">\n {{ props.label }}\n <span\n *ngIf=\"props.required && props.hideRequiredMarker !== true\"\n aria-hidden=\"true\"\n class=\"mat-form-field-required-marker\"\n >*</span\n >\n </mat-label>\n\n <ng-containe matTextPrefix *ngIf=\"props.textPrefix\">\n <ng-container [ngTemplateOutlet]=\"props.textPrefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-containe>\n\n <ng-containe matPrefix *ngIf=\"props.prefix\">\n <ng-container [ngTemplateOutlet]=\"props.prefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-containe>\n\n <ng-containe matTextSuffix *ngIf=\"props.textSuffix\">\n <ng-container [ngTemplateOutlet]=\"props.textSuffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-containe>\n\n <ng-containe matSuffix *ngIf=\"props.suffix\">\n <ng-container [ngTemplateOutlet]=\"props.suffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-containe>\n\n <mat-error>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </mat-error>\n\n <mat-hint *ngIf=\"props.description || props.hintStart as hint\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hint }\">\n </ng-container>\n </mat-hint>\n\n <mat-hint *ngIf=\"props.hintEnd as hintEnd\" align=\"end\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hintEnd }\">\n </ng-container>\n </mat-hint>\n </mat-form-field>\n\n <ng-template #stringOrTemplate let-content=\"content\">\n <ng-container *ngIf=\"!content.createEmbeddedView; else template\">{{ content }}</ng-container>\n <ng-template #template>\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-template>\n </ng-template>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormlyWrapperFormField\n extends FieldWrapper<MatFormlyFieldConfig>\n implements OnInit, OnDestroy, AfterViewInit\n{\n @ViewChild(MatFormField, { static: true }) formField!: MatFormField;\n\n constructor(private renderer: Renderer2, private elementRef: ElementRef, private focusMonitor: FocusMonitor) {\n super();\n }\n\n ngOnInit() {\n defineHiddenProp(this.field, '_formField', this.formField);\n this.focusMonitor.monitor(this.elementRef, true).subscribe((origin) => {\n if (!origin && this.field.focus) {\n this.field.focus = false;\n }\n });\n }\n\n ngAfterViewInit() {\n // temporary fix for https://github.com/angular/material2/issues/7891\n if (this.formField.appearance !== 'outline' && this.props.hideFieldUnderline === true) {\n const underlineElement = this.formField._elementRef.nativeElement.querySelector('.mat-form-field-underline');\n underlineElement && this.renderer.removeChild(underlineElement.parentNode, underlineElement);\n }\n }\n\n ngOnDestroy() {\n delete this.field._formField;\n this.focusMonitor.stopMonitoring(this.elementRef);\n }\n}\n","import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\n }),\n ],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class FormlyMatFormFieldModule {}\n","import { OnDestroy, TemplateRef, ViewChild, Type, Directive, ViewChildren, QueryList } from '@angular/core';\nimport { FieldType as CoreFieldType, FormlyFieldConfig, ɵobserve as observe } from '@ngx-formly/core';\nimport { Subject } from 'rxjs';\nimport { MatFormField, MatFormFieldControl } from '@angular/material/form-field';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { FormlyFieldProps } from './form-field.wrapper';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig<FormlyFieldProps>>\n extends CoreFieldType<F>\n implements OnDestroy, MatFormFieldControl<any>\n{\n @ViewChild('matPrefix') set matPrefix(prefix: TemplateRef<any>) {\n if (prefix) {\n this.props.prefix = prefix;\n }\n }\n @ViewChild('matTextPrefix') set matTextPrefix(textPrefix: TemplateRef<any>) {\n if (textPrefix) {\n this.props.textPrefix = textPrefix;\n }\n }\n @ViewChild('matSuffix') set matSuffix(suffix: TemplateRef<any>) {\n if (suffix) {\n this.props.suffix = suffix;\n }\n }\n @ViewChild('matTextSuffix') set matTextSuffix(textSuffix: TemplateRef<any>) {\n if (textSuffix) {\n this.props.textSuffix = textSuffix;\n }\n }\n\n @ViewChildren(MatFormFieldControl) set _controls(controls: QueryList<MatFormFieldControl<any>>) {\n this.attachControl(controls.length === 1 ? controls.first : this);\n }\n\n errorStateMatcher: ErrorStateMatcher = { isErrorState: () => this.field && this.showError };\n stateChanges = new Subject<void>();\n _errorState = false;\n\n ngOnDestroy() {\n delete (this.formField as any)?._control;\n this.stateChanges.complete();\n }\n\n setDescribedByIds(_ids: string[]): void {}\n onContainerClick(_event: MouseEvent): void {\n this.field.focus = true;\n this.stateChanges.next();\n }\n\n get errorState() {\n const showError = this.options!.showError!(this);\n if (showError !== this._errorState) {\n this._errorState = showError;\n this.stateChanges.next();\n }\n\n return showError;\n }\n\n get controlType() {\n if (this.props.type) {\n return this.props.type;\n }\n\n const type = this.field.type!;\n return type instanceof Type ? type.prototype.constructor.name : type;\n }\n get focused() {\n return !!this.field.focus && !this.disabled;\n }\n get disabled() {\n return !!this.props.disabled;\n }\n get required() {\n return !!this.props.required;\n }\n get placeholder() {\n return this.props.placeholder || '';\n }\n get shouldPlaceholderFloat() {\n return this.shouldLabelFloat;\n }\n get value() {\n return this.formControl?.value;\n }\n set value(value) {\n this.formControl?.patchValue(value);\n }\n get ngControl() {\n return this.formControl as any;\n }\n get empty() {\n return this.value == null || this.value === '';\n }\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n get formField(): MatFormField {\n return (this.field as any)?.['_formField'];\n }\n\n private attachControl(control: MatFormFieldControl<any>) {\n if (this.formField && control !== this.formField._control) {\n this.formField._control = control;\n\n // temporary fix for https://github.com/angular/material2/issues/6728\n const ngControl = control?.ngControl as any;\n if (ngControl?.valueAccessor?.hasOwnProperty('_formField')) {\n ngControl.valueAccessor['_formField'] = this.formField;\n }\n if (ngControl?.valueAccessor?.hasOwnProperty('_parentFormField')) {\n ngControl.valueAccessor['_parentFormField'] = this.formField;\n }\n\n ['prefix', 'suffix', 'textPrefix', 'textSuffix'].forEach((type) =>\n observe<TemplateRef<any>>(\n this.field,\n ['props', type],\n ({ currentValue }) =>\n currentValue &&\n Promise.resolve().then(() => {\n this.options.detectChanges!(this.field);\n }),\n ),\n );\n\n // https://github.com/angular/components/issues/16209\n const setDescribedByIds = control.setDescribedByIds.bind(control);\n control.setDescribedByIds = (ids: string[]) => {\n setTimeout(() => setDescribedByIds(ids));\n };\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["defineHiddenProp","i1","CoreFieldType","observe"],"mappings":";;;;;;;;;;;;AAyGM,MAAO,sBACX,SAAQ,YAAkC,CAAA;AAK1C,IAAA,WAAA,CAAoB,QAAmB,EAAU,UAAsB,EAAU,YAA0B,EAAA;AACzG,QAAA,KAAK,EAAE,CAAC;AADU,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AAAU,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;AAAU,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;KAE1G;IAED,QAAQ,GAAA;QACNA,iBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;AAC3D,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,KAAI;YACpE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;AAC/B,gBAAA,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;AAC1B,aAAA;AACH,SAAC,CAAC,CAAC;KACJ;IAED,eAAe,GAAA;;AAEb,QAAA,IAAI,IA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;;YAGF,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClE,YAAA,OAAO,CAAC,iBAAiB,GAAG,CAAC,GAAa,KAAI;gBAC5C,UAAU,CAAC,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3C,aAAC,CAAC;AACH,SAAA;KACF;;uGA/HmB,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,SAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,4aAyBf,mBAAmB,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAzBb,SAAS,EAAA,UAAA,EAAA,CAAA;kBAD9B,SAAS;8BAKoB,SAAS,EAAA,CAAA;sBAApC,SAAS;uBAAC,WAAW,CAAA;gBAKU,aAAa,EAAA,CAAA;sBAA5C,SAAS;uBAAC,eAAe,CAAA;gBAKE,SAAS,EAAA,CAAA;sBAApC,SAAS;uBAAC,WAAW,CAAA;gBAKU,aAAa,EAAA,CAAA;sBAA5C,SAAS;uBAAC,eAAe,CAAA;gBAMa,SAAS,EAAA,CAAA;sBAA/C,YAAY;uBAAC,mBAAmB,CAAA;;;ACjCnC;;AAEG;;;;"}
|
|
@@ -15,8 +15,8 @@ class FormlyFieldInput extends FieldType {
|
|
|
15
15
|
return this.props.type || 'text';
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
FormlyFieldInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
19
|
-
FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.
|
|
18
|
+
FormlyFieldInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormlyFieldInput, selector: "formly-field-mat-input", usesInheritance: true, ngImport: i0, template: `
|
|
20
20
|
<input
|
|
21
21
|
*ngIf="type !== 'number'; else numberTmp"
|
|
22
22
|
matInput
|
|
@@ -45,7 +45,7 @@ FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
45
45
|
/>
|
|
46
46
|
</ng-template>
|
|
47
47
|
`, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { 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]" }, { type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldInput, decorators: [{
|
|
49
49
|
type: Component,
|
|
50
50
|
args: [{
|
|
51
51
|
selector: 'formly-field-mat-input',
|
|
@@ -84,12 +84,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
84
84
|
|
|
85
85
|
class FormlyMatInputModule {
|
|
86
86
|
}
|
|
87
|
-
FormlyMatInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
88
|
-
FormlyMatInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
|
87
|
+
FormlyMatInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
88
|
+
FormlyMatInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatInputModule, declarations: [FormlyFieldInput], imports: [CommonModule,
|
|
89
89
|
ReactiveFormsModule,
|
|
90
90
|
MatInputModule,
|
|
91
91
|
FormlyMatFormFieldModule, i4.FormlyModule] });
|
|
92
|
-
FormlyMatInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.
|
|
92
|
+
FormlyMatInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatInputModule, imports: [[
|
|
93
93
|
CommonModule,
|
|
94
94
|
ReactiveFormsModule,
|
|
95
95
|
MatInputModule,
|
|
@@ -123,7 +123,7 @@ FormlyMatInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
123
123
|
],
|
|
124
124
|
}),
|
|
125
125
|
]] });
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatInputModule, decorators: [{
|
|
127
127
|
type: NgModule,
|
|
128
128
|
args: [{
|
|
129
129
|
declarations: [FormlyFieldInput],
|
|
@@ -41,9 +41,9 @@ class FormlyFieldMultiCheckbox extends FieldType {
|
|
|
41
41
|
return value && (this.props.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
FormlyFieldMultiCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
45
|
-
FormlyFieldMultiCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.
|
|
46
|
-
<ng-container *ngFor="let option of props.options | formlySelectOptions: field | async; let i = index">
|
|
44
|
+
FormlyFieldMultiCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldMultiCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
FormlyFieldMultiCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormlyFieldMultiCheckbox, selector: "formly-field-mat-multicheckbox", host: { properties: { "id": "id" } }, viewQueries: [{ propertyName: "checkboxes", predicate: MatCheckbox, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
46
|
+
<ng-container *ngFor="let option of props.options | formlySelectOptions : field | async; let i = index">
|
|
47
47
|
<mat-checkbox
|
|
48
48
|
[id]="id + '_' + i"
|
|
49
49
|
[formlyAttributes]="field"
|
|
@@ -58,12 +58,12 @@ FormlyFieldMultiCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
58
58
|
</mat-checkbox>
|
|
59
59
|
</ng-container>
|
|
60
60
|
`, isInline: true, components: [{ type: i1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], pipes: { "async": i2.AsyncPipe, "formlySelectOptions": i4.FormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldMultiCheckbox, decorators: [{
|
|
62
62
|
type: Component,
|
|
63
63
|
args: [{
|
|
64
64
|
selector: 'formly-field-mat-multicheckbox',
|
|
65
65
|
template: `
|
|
66
|
-
<ng-container *ngFor="let option of props.options | formlySelectOptions: field | async; let i = index">
|
|
66
|
+
<ng-container *ngFor="let option of props.options | formlySelectOptions : field | async; let i = index">
|
|
67
67
|
<mat-checkbox
|
|
68
68
|
[id]="id + '_' + i"
|
|
69
69
|
[formlyAttributes]="field"
|
|
@@ -90,13 +90,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
90
90
|
|
|
91
91
|
class FormlyMatMultiCheckboxModule {
|
|
92
92
|
}
|
|
93
|
-
FormlyMatMultiCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
94
|
-
FormlyMatMultiCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
|
93
|
+
FormlyMatMultiCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatMultiCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
94
|
+
FormlyMatMultiCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatMultiCheckboxModule, declarations: [FormlyFieldMultiCheckbox], imports: [CommonModule,
|
|
95
95
|
ReactiveFormsModule,
|
|
96
96
|
MatCheckboxModule,
|
|
97
97
|
FormlyMatFormFieldModule,
|
|
98
98
|
FormlySelectModule, i3.FormlyModule] });
|
|
99
|
-
FormlyMatMultiCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.
|
|
99
|
+
FormlyMatMultiCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatMultiCheckboxModule, imports: [[
|
|
100
100
|
CommonModule,
|
|
101
101
|
ReactiveFormsModule,
|
|
102
102
|
MatCheckboxModule,
|
|
@@ -112,7 +112,7 @@ FormlyMatMultiCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.
|
|
|
112
112
|
],
|
|
113
113
|
}),
|
|
114
114
|
]] });
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatMultiCheckboxModule, decorators: [{
|
|
116
116
|
type: NgModule,
|
|
117
117
|
args: [{
|
|
118
118
|
declarations: [FormlyFieldMultiCheckbox],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-multicheckbox.mjs","sources":["../../../../src/ui/material/multicheckbox/src/multicheckbox.type.ts","../../../../src/ui/material/multicheckbox/src/multicheckbox.module.ts","../../../../src/ui/material/multicheckbox/src/ngx-formly-material-multicheckbox.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChildren, QueryList, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\n\ninterface MultiCheckboxProps extends FormlyFieldProps {\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyMultiCheckboxFieldConfig extends FormlyFieldConfig<MultiCheckboxProps> {\n type: 'multicheckbox' | Type<FormlyFieldMultiCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-mat-multicheckbox',\n template: `\n <ng-container *ngFor=\"let option of props.options | formlySelectOptions: field | async; let i = index\">\n <mat-checkbox\n [id]=\"id + '_' + i\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [color]=\"props.color\"\n [labelPosition]=\"props.labelPosition\"\n [checked]=\"isChecked(option)\"\n [disabled]=\"formControl.disabled || option.disabled\"\n (change)=\"onChange(option.value, $event.checked)\"\n >\n {{ option.label }}\n </mat-checkbox>\n </ng-container>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[id]': 'id',\n },\n})\nexport class FormlyFieldMultiCheckbox extends FieldType<FieldTypeConfig<MultiCheckboxProps>> {\n @ViewChildren(MatCheckbox) checkboxes!: QueryList<MatCheckbox>;\n\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n color: 'accent' as const, // workaround for https://github.com/angular/components/issues/18465\n },\n };\n\n onChange(value: any, checked: boolean) {\n this.formControl.markAsDirty();\n if (this.props.type === 'array') {\n this.formControl.patchValue(\n checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter((o) => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n // TODO: find a solution to prevent scroll on focus\n override onContainerClick() {}\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (this.props.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { FormlyFieldMultiCheckbox } from './multicheckbox.type';\n\n@NgModule({\n declarations: [FormlyFieldMultiCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatMultiCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAoCM,MAAO,wBAAyB,SAAQ,SAA8C,CAAA;AAvB5F,IAAA,WAAA,GAAA;;QA0BW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,UAAU,EAAE,QAAiB;gBAC7B,KAAK,EAAE,QAAiB;AACzB,aAAA;SACF,CAAC;KAwBH;IAtBC,QAAQ,CAAC,KAAU,EAAE,OAAgB,EAAA;AACnC,QAAA,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;AAC/B,QAAA,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;AAC/B,YAAA,IAAI,CAAC,WAAW,CAAC,UAAU,CACzB,OAAO;AACL,kBAAE,CAAC,IAAI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AAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-multicheckbox.mjs","sources":["../../../../src/ui/material/multicheckbox/src/multicheckbox.type.ts","../../../../src/ui/material/multicheckbox/src/multicheckbox.module.ts","../../../../src/ui/material/multicheckbox/src/ngx-formly-material-multicheckbox.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChildren, QueryList, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\n\ninterface MultiCheckboxProps extends FormlyFieldProps {\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyMultiCheckboxFieldConfig extends FormlyFieldConfig<MultiCheckboxProps> {\n type: 'multicheckbox' | Type<FormlyFieldMultiCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-mat-multicheckbox',\n template: `\n <ng-container *ngFor=\"let option of props.options | formlySelectOptions : field | async; let i = index\">\n <mat-checkbox\n [id]=\"id + '_' + i\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [color]=\"props.color\"\n [labelPosition]=\"props.labelPosition\"\n [checked]=\"isChecked(option)\"\n [disabled]=\"formControl.disabled || option.disabled\"\n (change)=\"onChange(option.value, $event.checked)\"\n >\n {{ option.label }}\n </mat-checkbox>\n </ng-container>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[id]': 'id',\n },\n})\nexport class FormlyFieldMultiCheckbox extends FieldType<FieldTypeConfig<MultiCheckboxProps>> {\n @ViewChildren(MatCheckbox) checkboxes!: QueryList<MatCheckbox>;\n\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n color: 'accent' as const, // workaround for https://github.com/angular/components/issues/18465\n },\n };\n\n onChange(value: any, checked: boolean) {\n this.formControl.markAsDirty();\n if (this.props.type === 'array') {\n this.formControl.patchValue(\n checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter((o) => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n // TODO: find a solution to prevent scroll on focus\n override onContainerClick() {}\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (this.props.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { FormlyFieldMultiCheckbox } from './multicheckbox.type';\n\n@NgModule({\n declarations: [FormlyFieldMultiCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatMultiCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAoCM,MAAO,wBAAyB,SAAQ,SAA8C,CAAA;AAvB5F,IAAA,WAAA,GAAA;;QA0BW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,UAAU,EAAE,QAAiB;gBAC7B,KAAK,EAAE,QAAiB;AACzB,aAAA;SACF,CAAC;KAwBH;IAtBC,QAAQ,CAAC,KAAU,EAAE,OAAgB,EAAA;AACnC,QAAA,IAAI,C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ACxB,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,eAAe;AACrB,oCAAA,SAAS,EAAE,wBAAwB;oCACnC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
@@ -14,8 +14,8 @@ import { MatInputModule } from '@angular/material/input';
|
|
|
14
14
|
|
|
15
15
|
class FormlyFieldNativeSelect extends FieldType {
|
|
16
16
|
}
|
|
17
|
-
FormlyFieldNativeSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
18
|
-
FormlyFieldNativeSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.
|
|
17
|
+
FormlyFieldNativeSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldNativeSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
FormlyFieldNativeSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormlyFieldNativeSelect, selector: "formly-field-mat-native-select", usesInheritance: true, ngImport: i0, template: `
|
|
19
19
|
<select
|
|
20
20
|
matNativeControl
|
|
21
21
|
[id]="id"
|
|
@@ -26,7 +26,7 @@ FormlyFieldNativeSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
26
26
|
[formlyAttributes]="field"
|
|
27
27
|
>
|
|
28
28
|
<option *ngIf="props.placeholder" [ngValue]="undefined">{{ props.placeholder }}</option>
|
|
29
|
-
<ng-container *ngIf="props.options | formlySelectOptions: field | async as opts">
|
|
29
|
+
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
30
30
|
<ng-container *ngFor="let opt of opts">
|
|
31
31
|
<option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
|
|
32
32
|
{{ opt.label }}
|
|
@@ -42,7 +42,7 @@ FormlyFieldNativeSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
42
42
|
</ng-container>
|
|
43
43
|
</select>
|
|
44
44
|
`, isInline: true, directives: [{ 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"], exportAs: ["matInput"] }, { type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe, "formlySelectOptions": i5.FormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldNativeSelect, decorators: [{
|
|
46
46
|
type: Component,
|
|
47
47
|
args: [{
|
|
48
48
|
selector: 'formly-field-mat-native-select',
|
|
@@ -57,7 +57,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
57
57
|
[formlyAttributes]="field"
|
|
58
58
|
>
|
|
59
59
|
<option *ngIf="props.placeholder" [ngValue]="undefined">{{ props.placeholder }}</option>
|
|
60
|
-
<ng-container *ngIf="props.options | formlySelectOptions: field | async as opts">
|
|
60
|
+
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
61
61
|
<ng-container *ngFor="let opt of opts">
|
|
62
62
|
<option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
|
|
63
63
|
{{ opt.label }}
|
|
@@ -79,13 +79,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
79
79
|
|
|
80
80
|
class FormlyMatNativeSelectModule {
|
|
81
81
|
}
|
|
82
|
-
FormlyMatNativeSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
83
|
-
FormlyMatNativeSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
|
82
|
+
FormlyMatNativeSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatNativeSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
83
|
+
FormlyMatNativeSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatNativeSelectModule, declarations: [FormlyFieldNativeSelect], imports: [CommonModule,
|
|
84
84
|
ReactiveFormsModule,
|
|
85
85
|
MatInputModule,
|
|
86
86
|
FormlyMatFormFieldModule,
|
|
87
87
|
FormlySelectModule, i3.FormlyModule] });
|
|
88
|
-
FormlyMatNativeSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.
|
|
88
|
+
FormlyMatNativeSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatNativeSelectModule, imports: [[
|
|
89
89
|
CommonModule,
|
|
90
90
|
ReactiveFormsModule,
|
|
91
91
|
MatInputModule,
|
|
@@ -101,7 +101,7 @@ FormlyMatNativeSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0
|
|
|
101
101
|
],
|
|
102
102
|
}),
|
|
103
103
|
]] });
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatNativeSelectModule, decorators: [{
|
|
105
105
|
type: NgModule,
|
|
106
106
|
args: [{
|
|
107
107
|
declarations: [FormlyFieldNativeSelect],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-native-select.mjs","sources":["../../../../src/ui/material/native-select/src/native-select.type.ts","../../../../src/ui/material/native-select/src/native-select.module.ts","../../../../src/ui/material/native-select/src/ngx-formly-material-native-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\n\ninterface NativeSelectProps extends FormlyFieldProps, FormlyFieldSelectProps {}\n\nexport interface FormlyNativeSelectFieldConfig extends FormlyFieldConfig<NativeSelectProps> {\n type: 'native-select' | Type<FormlyFieldNativeSelect>;\n}\n\n@Component({\n selector: 'formly-field-mat-native-select',\n template: `\n <select\n matNativeControl\n [id]=\"id\"\n [readonly]=\"props.readonly\"\n [required]=\"required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n >\n <option *ngIf=\"props.placeholder\" [ngValue]=\"undefined\">{{ props.placeholder }}</option>\n <ng-container *ngIf=\"props.options | formlySelectOptions: field | async as opts\">\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group; else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">\n {{ opt.label }}\n </option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-container>\n </select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldNativeSelect extends FieldType<FieldTypeConfig<NativeSelectProps>> {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { FormlyFieldNativeSelect } from './native-select.type';\n\n@NgModule({\n declarations: [FormlyFieldNativeSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'native-select',\n component: FormlyFieldNativeSelect,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatNativeSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA0CM,MAAO,uBAAwB,SAAQ,SAA6C,CAAA;;qHAA7E,uBAAuB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA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A,kBAAkB,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAYT,2BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,EAlB7B,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,mBAAmB;YACnB,cAAc;YAEd,wBAAwB;YACxB,kBAAkB;YAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,eAAe;AACrB,wBAAA,SAAS,EAAE,uBAAuB;wBAClC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC;SACH,CAAA,EAAA,CAAA,CAAA;4FAEU,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBApBvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;AACvC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBAEd,wBAAwB;wBACxB,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,eAAe;AACrB,oCAAA,SAAS,EAAE,uBAAuB;oCAClC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-native-select.mjs","sources":["../../../../src/ui/material/native-select/src/native-select.type.ts","../../../../src/ui/material/native-select/src/native-select.module.ts","../../../../src/ui/material/native-select/src/ngx-formly-material-native-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\n\ninterface NativeSelectProps extends FormlyFieldProps, FormlyFieldSelectProps {}\n\nexport interface FormlyNativeSelectFieldConfig extends FormlyFieldConfig<NativeSelectProps> {\n type: 'native-select' | Type<FormlyFieldNativeSelect>;\n}\n\n@Component({\n selector: 'formly-field-mat-native-select',\n template: `\n <select\n matNativeControl\n [id]=\"id\"\n [readonly]=\"props.readonly\"\n [required]=\"required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n >\n <option *ngIf=\"props.placeholder\" [ngValue]=\"undefined\">{{ props.placeholder }}</option>\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group; else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">\n {{ opt.label }}\n </option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-container>\n </select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldNativeSelect extends FieldType<FieldTypeConfig<NativeSelectProps>> {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { FormlyFieldNativeSelect } from './native-select.type';\n\n@NgModule({\n declarations: [FormlyFieldNativeSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'native-select',\n component: FormlyFieldNativeSelect,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatNativeSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AA0CM,MAAO,uBAAwB,SAAQ,SAA6C,CAAA;;qHAA7E,uBAAuB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,uBAAuB,EA7BxB,QAAA,EAAA,gCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,yHAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,IAAA,EAAA,aAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,0BAAA,EAAA,QAAA,EAAA,6GAAA,EAAA,MAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,wIAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,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oCAClC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
@@ -41,8 +41,8 @@ class FormlyFieldRadio extends FieldType {
|
|
|
41
41
|
this.focusObserver && this.focusObserver.unsubscribe();
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
FormlyFieldRadio.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
45
|
-
FormlyFieldRadio.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.
|
|
44
|
+
FormlyFieldRadio.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldRadio, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
FormlyFieldRadio.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormlyFieldRadio, selector: "formly-field-mat-radio", viewQueries: [{ propertyName: "radioGroup", first: true, predicate: MatRadioGroup, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
46
46
|
<mat-radio-group
|
|
47
47
|
[formControl]="formControl"
|
|
48
48
|
[formlyAttributes]="field"
|
|
@@ -50,7 +50,7 @@ FormlyFieldRadio.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
50
50
|
[tabindex]="props.tabindex"
|
|
51
51
|
>
|
|
52
52
|
<mat-radio-button
|
|
53
|
-
*ngFor="let option of props.options | formlySelectOptions: field | async; let i = index"
|
|
53
|
+
*ngFor="let option of props.options | formlySelectOptions : field | async; let i = index"
|
|
54
54
|
[id]="id + '_' + i"
|
|
55
55
|
[color]="props.color"
|
|
56
56
|
[labelPosition]="props.labelPosition"
|
|
@@ -61,7 +61,7 @@ FormlyFieldRadio.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
61
61
|
</mat-radio-button>
|
|
62
62
|
</mat-radio-group>
|
|
63
63
|
`, isInline: true, components: [{ type: i1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }], directives: [{ type: i1.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe, "formlySelectOptions": i5.FormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldRadio, decorators: [{
|
|
65
65
|
type: Component,
|
|
66
66
|
args: [{
|
|
67
67
|
selector: 'formly-field-mat-radio',
|
|
@@ -73,7 +73,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
73
73
|
[tabindex]="props.tabindex"
|
|
74
74
|
>
|
|
75
75
|
<mat-radio-button
|
|
76
|
-
*ngFor="let option of props.options | formlySelectOptions: field | async; let i = index"
|
|
76
|
+
*ngFor="let option of props.options | formlySelectOptions : field | async; let i = index"
|
|
77
77
|
[id]="id + '_' + i"
|
|
78
78
|
[color]="props.color"
|
|
79
79
|
[labelPosition]="props.labelPosition"
|
|
@@ -93,13 +93,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
93
93
|
|
|
94
94
|
class FormlyMatRadioModule {
|
|
95
95
|
}
|
|
96
|
-
FormlyMatRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
97
|
-
FormlyMatRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
|
96
|
+
FormlyMatRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
97
|
+
FormlyMatRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatRadioModule, declarations: [FormlyFieldRadio], imports: [CommonModule,
|
|
98
98
|
ReactiveFormsModule,
|
|
99
99
|
MatRadioModule,
|
|
100
100
|
FormlyMatFormFieldModule,
|
|
101
101
|
FormlySelectModule, i3.FormlyModule] });
|
|
102
|
-
FormlyMatRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.
|
|
102
|
+
FormlyMatRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatRadioModule, imports: [[
|
|
103
103
|
CommonModule,
|
|
104
104
|
ReactiveFormsModule,
|
|
105
105
|
MatRadioModule,
|
|
@@ -115,7 +115,7 @@ FormlyMatRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
115
115
|
],
|
|
116
116
|
}),
|
|
117
117
|
]] });
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatRadioModule, decorators: [{
|
|
119
119
|
type: NgModule,
|
|
120
120
|
args: [{
|
|
121
121
|
declarations: [FormlyFieldRadio],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-radio.mjs","sources":["../../../../src/ui/material/radio/src/radio.type.ts","../../../../src/ui/material/radio/src/radio.module.ts","../../../../src/ui/material/radio/src/ngx-formly-material-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, AfterViewInit, OnDestroy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatRadioGroup } from '@angular/material/radio';\nimport { ɵobserve as observe } from '@ngx-formly/core';\n\ninterface RadioProps extends FormlyFieldProps {\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyRadioFieldConfig extends FormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-mat-radio',\n template: `\n <mat-radio-group\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [required]=\"required\"\n [tabindex]=\"props.tabindex\"\n >\n <mat-radio-button\n *ngFor=\"let option of props.options | formlySelectOptions: field | async; let i = index\"\n [id]=\"id + '_' + i\"\n [color]=\"props.color\"\n [labelPosition]=\"props.labelPosition\"\n [disabled]=\"option.disabled\"\n [value]=\"option.value\"\n >\n {{ option.label }}\n </mat-radio-button>\n </mat-radio-group>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> implements AfterViewInit, OnDestroy {\n @ViewChild(MatRadioGroup, { static: true }) radioGroup!: MatRadioGroup;\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n tabindex: -1,\n },\n };\n\n private focusObserver!: ReturnType<typeof observe>;\n ngAfterViewInit() {\n this.focusObserver = observe(this.field, ['focus'], ({ currentValue }) => {\n if (this.props.tabindex === -1 && currentValue && this.radioGroup._radios.length > 0) {\n // https://github.com/ngx-formly/ngx-formly/issues/2498\n setTimeout(() => {\n const radio = this.radioGroup.selected ? this.radioGroup.selected : this.radioGroup._radios.first;\n radio.focus();\n });\n }\n });\n }\n\n // TODO: find a solution to prevent scroll on focus\n override onContainerClick() {}\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.focusObserver && this.focusObserver.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatRadioModule } from '@angular/material/radio';\n\nimport { FormlyFieldRadio } from './radio.type';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatRadioModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe","i1"],"mappings":";;;;;;;;;;;;;;AAqCM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAvB5E,IAAA,WAAA,GAAA;;QAyBW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,UAAU,EAAE,QAAiB;gBAC7B,QAAQ,EAAE,CAAC,CAAC;AACb,aAAA;SACF,CAAC;KAsBH;IAnBC,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,aAAa,GAAGA,QAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO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A,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-radio.mjs","sources":["../../../../src/ui/material/radio/src/radio.type.ts","../../../../src/ui/material/radio/src/radio.module.ts","../../../../src/ui/material/radio/src/ngx-formly-material-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, AfterViewInit, OnDestroy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatRadioGroup } from '@angular/material/radio';\nimport { ɵobserve as observe } from '@ngx-formly/core';\n\ninterface RadioProps extends FormlyFieldProps {\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyRadioFieldConfig extends FormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-mat-radio',\n template: `\n <mat-radio-group\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [required]=\"required\"\n [tabindex]=\"props.tabindex\"\n >\n <mat-radio-button\n *ngFor=\"let option of props.options | formlySelectOptions : field | async; let i = index\"\n [id]=\"id + '_' + i\"\n [color]=\"props.color\"\n [labelPosition]=\"props.labelPosition\"\n [disabled]=\"option.disabled\"\n [value]=\"option.value\"\n >\n {{ option.label }}\n </mat-radio-button>\n </mat-radio-group>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> implements AfterViewInit, OnDestroy {\n @ViewChild(MatRadioGroup, { static: true }) radioGroup!: MatRadioGroup;\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n tabindex: -1,\n },\n };\n\n private focusObserver!: ReturnType<typeof observe>;\n ngAfterViewInit() {\n this.focusObserver = observe(this.field, ['focus'], ({ currentValue }) => {\n if (this.props.tabindex === -1 && currentValue && this.radioGroup._radios.length > 0) {\n // https://github.com/ngx-formly/ngx-formly/issues/2498\n setTimeout(() => {\n const radio = this.radioGroup.selected ? this.radioGroup.selected : this.radioGroup._radios.first;\n radio.focus();\n });\n }\n });\n }\n\n // TODO: find a solution to prevent scroll on focus\n override onContainerClick() {}\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.focusObserver && this.focusObserver.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatRadioModule } from '@angular/material/radio';\n\nimport { FormlyFieldRadio } from './radio.type';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatRadioModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe","i1"],"mappings":";;;;;;;;;;;;;;AAqCM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAvB5E,IAAA,WAAA,GAAA;;QAyBW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,UAAU,EAAE,QAAiB;gBAC7B,QAAQ,EAAE,CAAC,CAAC;AACb,aAAA;SACF,CAAC;KAsBH;IAnBC,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,aAAa,GAAGA,QAAO,CAAC,IAAI,CAAC,KAAK,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,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i3 from '@angular/forms';
|
|
6
6
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import * as i4 from '@ngx-formly/core';
|
|
8
|
-
import { FormlyModule } from '@ngx-formly/core';
|
|
8
|
+
import { ɵobserve, FormlyModule } from '@ngx-formly/core';
|
|
9
9
|
import * as i6 from '@ngx-formly/core/select';
|
|
10
10
|
import { FormlySelectModule } from '@ngx-formly/core/select';
|
|
11
11
|
import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
12
12
|
import * as i2 from '@angular/material/select';
|
|
13
|
-
import { MatSelectModule } from '@angular/material/select';
|
|
13
|
+
import { MatSelect, MatSelectModule } from '@angular/material/select';
|
|
14
14
|
import * as i1 from '@angular/material/core';
|
|
15
15
|
import { MatPseudoCheckboxModule } from '@angular/material/core';
|
|
16
16
|
|
|
@@ -25,6 +25,13 @@ class FormlyFieldSelect extends FieldType {
|
|
|
25
25
|
},
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
+
set select(select) {
|
|
29
|
+
ɵobserve(select, ['_parentFormField', '_textField'], ({ currentValue }) => {
|
|
30
|
+
if (currentValue) {
|
|
31
|
+
select._preferredOverlayOrigin = select._parentFormField.getConnectedOverlayOrigin();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
28
35
|
getSelectAllState(options) {
|
|
29
36
|
if (this.empty || this.value.length === 0) {
|
|
30
37
|
return null;
|
|
@@ -63,8 +70,8 @@ class FormlyFieldSelect extends FieldType {
|
|
|
63
70
|
return this.selectAllValue.value;
|
|
64
71
|
}
|
|
65
72
|
}
|
|
66
|
-
FormlyFieldSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
67
|
-
FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.
|
|
73
|
+
FormlyFieldSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
74
|
+
FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormlyFieldSelect, selector: "formly-field-mat-select", viewQueries: [{ propertyName: "select", first: true, predicate: MatSelect, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
68
75
|
<ng-template #selectAll let-selectOptions="selectOptions">
|
|
69
76
|
<mat-option (click)="toggleSelectAll(selectOptions)">
|
|
70
77
|
<mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="getSelectAllState(selectOptions)">
|
|
@@ -89,7 +96,7 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
89
96
|
[disableOptionCentering]="props.disableOptionCentering"
|
|
90
97
|
[typeaheadDebounceInterval]="props.typeaheadDebounceInterval"
|
|
91
98
|
>
|
|
92
|
-
<ng-container *ngIf="props.options | formlySelectOptions: field | async as selectOptions">
|
|
99
|
+
<ng-container *ngIf="props.options | formlySelectOptions : field | async as selectOptions">
|
|
93
100
|
<ng-container
|
|
94
101
|
*ngIf="props.multiple && props.selectAllOption"
|
|
95
102
|
[ngTemplateOutlet]="selectAll"
|
|
@@ -107,7 +114,7 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
107
114
|
</ng-container>
|
|
108
115
|
</mat-select>
|
|
109
116
|
`, isInline: true, components: [{ type: i1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i1.MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled"] }, { type: i2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i1.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }], directives: [{ type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i5.AsyncPipe, "formlySelectOptions": i6.FormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyFieldSelect, decorators: [{
|
|
111
118
|
type: Component,
|
|
112
119
|
args: [{
|
|
113
120
|
selector: 'formly-field-mat-select',
|
|
@@ -136,7 +143,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
136
143
|
[disableOptionCentering]="props.disableOptionCentering"
|
|
137
144
|
[typeaheadDebounceInterval]="props.typeaheadDebounceInterval"
|
|
138
145
|
>
|
|
139
|
-
<ng-container *ngIf="props.options | formlySelectOptions: field | async as selectOptions">
|
|
146
|
+
<ng-container *ngIf="props.options | formlySelectOptions : field | async as selectOptions">
|
|
140
147
|
<ng-container
|
|
141
148
|
*ngIf="props.multiple && props.selectAllOption"
|
|
142
149
|
[ngTemplateOutlet]="selectAll"
|
|
@@ -156,18 +163,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
156
163
|
`,
|
|
157
164
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
158
165
|
}]
|
|
159
|
-
}]
|
|
166
|
+
}], propDecorators: { select: [{
|
|
167
|
+
type: ViewChild,
|
|
168
|
+
args: [MatSelect, { static: true }]
|
|
169
|
+
}] } });
|
|
160
170
|
|
|
161
171
|
class FormlyMatSelectModule {
|
|
162
172
|
}
|
|
163
|
-
FormlyMatSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.
|
|
164
|
-
FormlyMatSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.
|
|
173
|
+
FormlyMatSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
174
|
+
FormlyMatSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatSelectModule, declarations: [FormlyFieldSelect], imports: [CommonModule,
|
|
165
175
|
ReactiveFormsModule,
|
|
166
176
|
MatSelectModule,
|
|
167
177
|
MatPseudoCheckboxModule,
|
|
168
178
|
FormlyMatFormFieldModule,
|
|
169
179
|
FormlySelectModule, i4.FormlyModule] });
|
|
170
|
-
FormlyMatSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.
|
|
180
|
+
FormlyMatSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatSelectModule, imports: [[
|
|
171
181
|
CommonModule,
|
|
172
182
|
ReactiveFormsModule,
|
|
173
183
|
MatSelectModule,
|
|
@@ -185,7 +195,7 @@ FormlyMatSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
|
|
|
185
195
|
],
|
|
186
196
|
}),
|
|
187
197
|
]] });
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormlyMatSelectModule, decorators: [{
|
|
189
199
|
type: NgModule,
|
|
190
200
|
args: [{
|
|
191
201
|
declarations: [FormlyFieldSelect],
|