@ngx-formly/material 10.0.1 → 11.1.0-rc.0
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 +107 -177
- package/fesm2022/ngx-formly-material-checkbox.mjs +234 -127
- package/fesm2022/ngx-formly-material-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-datepicker.mjs +264 -118
- package/fesm2022/ngx-formly-material-datepicker.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-form-field.mjs +440 -226
- package/fesm2022/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-input.mjs +199 -89
- package/fesm2022/ngx-formly-material-input.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-multicheckbox.mjs +203 -106
- package/fesm2022/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-native-select.mjs +204 -73
- package/fesm2022/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-radio.mjs +247 -104
- package/fesm2022/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-select.mjs +318 -133
- package/fesm2022/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-slider.mjs +195 -85
- package/fesm2022/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-textarea.mjs +203 -86
- package/fesm2022/ngx-formly-material-textarea.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-toggle.mjs +208 -86
- package/fesm2022/ngx-formly-material-toggle.mjs.map +1 -1
- package/fesm2022/ngx-formly-material.mjs +84 -62
- package/fesm2022/ngx-formly-material.mjs.map +1 -1
- package/package.json +3 -3
- package/types/ngx-formly-material-checkbox.d.ts +41 -46
- package/types/ngx-formly-material-datepicker.d.ts +62 -67
- package/types/ngx-formly-material-form-field.d.ts +71 -77
- package/types/ngx-formly-material-input.d.ts +22 -28
- package/types/ngx-formly-material-multicheckbox.d.ts +33 -38
- package/types/ngx-formly-material-native-select.d.ts +23 -29
- package/types/ngx-formly-material-radio.d.ts +34 -39
- package/types/ngx-formly-material-select.d.ts +45 -48
- package/types/ngx-formly-material-slider.d.ts +32 -37
- package/types/ngx-formly-material-textarea.d.ts +28 -33
- package/types/ngx-formly-material-toggle.d.ts +30 -35
- package/types/ngx-formly-material.d.ts +16 -19
|
@@ -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.config.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 @if (props.label && props.hideLabel !== true) {\n <mat-label>\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\" class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\">*</span>\n }\n </mat-label>\n }\n\n @if (props.textPrefix) {\n <ng-container\n matTextPrefix\n [ngTemplateOutlet]=\"props.textPrefix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.prefix) {\n <ng-container\n matPrefix\n [ngTemplateOutlet]=\"props.prefix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.textSuffix) {\n <ng-container\n matTextSuffix\n [ngTemplateOutlet]=\"props.textSuffix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.suffix) {\n <ng-container\n matSuffix\n [ngTemplateOutlet]=\"props.suffix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n <mat-error>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </mat-error>\n\n @if (props.description || props.hintStart; as hint) {\n <mat-hint>\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hint }\">\n </ng-container>\n </mat-hint>\n }\n\n @if (props.hintEnd; as hintEnd) {\n <mat-hint align=\"end\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hintEnd }\">\n </ng-container>\n </mat-hint>\n }\n </mat-form-field>\n\n <ng-template #stringOrTemplate let-content=\"content\">\n @if (!content.createEmbeddedView) {\n <ng-container>{{ content }}</ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n }\n </ng-template>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class FormlyWrapperFormField\n extends FieldWrapper<MatFormlyFieldConfig>\n implements OnInit, OnDestroy, AfterViewInit\n{\n @ViewChild(MatFormField, { static: true }) formField!: MatFormField;\n\n constructor(\n private renderer: Renderer2,\n private elementRef: ElementRef,\n private focusMonitor: FocusMonitor,\n ) {\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 { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\nexport function withFormlyFormField(): ConfigOption {\n return {\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\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';\nimport { withFormlyFormField } from './form-field.config';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, FormlyModule.forChild(withFormlyFormField())],\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 _focused = 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 const focused = !!this.field.focus && !this.disabled;\n if (focused !== this._focused) {\n this._focused = focused;\n this.stateChanges.next();\n }\n return focused;\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":";;;;;;;;;;;;AA8HM,MAAO,sBACX,SAAQ,YAAkC,CAAA;AAK1C,IAAA,WAAA,CACU,QAAmB,EACnB,UAAsB,EACtB,YAA0B,EAA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iB,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC;AACjE,YAAA,OAAO,CAAC,iBAAiB,GAAG,CAAC,GAAa,KAAI;gBAC5C,UAAU,CAAC,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAC1C,YAAA,CAAC;QACH;IACF;+GArIoB,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,gcAyBf,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;;sBAKE,SAAS;uBAAC,WAAW;;sBAKrB,SAAS;uBAAC,eAAe;;sBAKzB,SAAS;uBAAC,WAAW;;sBAKrB,SAAS;uBAAC,eAAe;;sBAMzB,YAAY;uBAAC,mBAAmB;;;ACjCnC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-form-field.mjs","names":[],"sources":["../../../../src/ui/material/form-field/src/form-field.wrapper.ts","../../../../src/ui/material/form-field/src/form-field.config.ts","../../../../src/ui/material/form-field/src/form-field.module.ts","../../../../src/ui/material/form-field/src/field.type.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 ?? (field.validation?.showAllErrors ? 'dynamic' : undefined)\"\n [color]=\"props.color ?? 'primary'\"\n >\n <ng-container #fieldComponent></ng-container>\n @if (props.label && props.hideLabel !== true) {\n <mat-label>\n @if (props.allowHtml) {\n <span [innerHTML]=\"props.label\"></span>\n } @else {\n {{ props.label }}\n }\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\" class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\">*</span>\n }\n </mat-label>\n }\n\n @if (props.textPrefix) {\n <ng-container\n matTextPrefix\n [ngTemplateOutlet]=\"props.textPrefix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.prefix) {\n <ng-container\n matPrefix\n [ngTemplateOutlet]=\"props.prefix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.textSuffix) {\n <ng-container\n matTextSuffix\n [ngTemplateOutlet]=\"props.textSuffix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.suffix) {\n <ng-container\n matSuffix\n [ngTemplateOutlet]=\"props.suffix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n <mat-error>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </mat-error>\n\n @if (props.description || props.hintStart; as hint) {\n <mat-hint>\n <ng-container\n [ngTemplateOutlet]=\"stringOrTemplate\"\n [ngTemplateOutletContext]=\"{ content: hint, allowHtml: props.allowHtml && !!props.description }\"\n >\n </ng-container>\n </mat-hint>\n }\n\n @if (props.hintEnd; as hintEnd) {\n <mat-hint align=\"end\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hintEnd }\">\n </ng-container>\n </mat-hint>\n }\n </mat-form-field>\n\n <ng-template #stringOrTemplate let-content=\"content\" let-allowHtml=\"allowHtml\">\n @if (!content.createEmbeddedView) {\n @if (allowHtml) {\n <span [innerHTML]=\"content\"></span>\n } @else {\n <ng-container>{{ content }}</ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n }\n </ng-template>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class FormlyWrapperFormField\n extends FieldWrapper<MatFormlyFieldConfig>\n implements OnInit, OnDestroy, AfterViewInit\n{\n @ViewChild(MatFormField, { static: true }) formField!: MatFormField;\n\n constructor(\n private renderer: Renderer2,\n private elementRef: ElementRef,\n private focusMonitor: FocusMonitor,\n ) {\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 { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\nexport function withFormlyFormField(): ConfigOption {\n return {\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\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';\nimport { withFormlyFormField } from './form-field.config';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, FormlyModule.forChild(withFormlyFormField())],\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 _focused = 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 const focused = !!this.field.focus && !this.disabled;\n if (focused !== this._focused) {\n this._focused = focused;\n this.stateChanges.next();\n }\n return focused;\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"],"mappings":";;;;;;;;;;;AAyIA,IAAa,yBAAb,MAAa,+BACH,aAAkC;CAK1C,YACU,UACA,YACA,cAA0B;EAElC,MAAK;EAJG,KAAA,WAAA;EACA,KAAA,aAAA;EACA,KAAA,eAAA;CAGV;CAEA,WAAQ;EACN,kBAAiB,KAAK,OAAO,cAAc,KAAK,SAAS;EACzD,KAAK,aAAa,QAAQ,KAAK,YAAY,IAAI,CAAC,CAAC,WAAW,WAAU;GACpE,IAAI,CAAC,UAAU,KAAK,MAAM,OACxB,KAAK,MAAM,QAAQ;EAEvB,CAAC;CACH;CAEA,kBAAe;EAEb,IAAI,KAAK,UAAU,eAAe,aAAa,KAAK,MAAM,uBAAuB,MAAM;GACrF,MAAM,mBAAmB,KAAK,UAAU,YAAY,cAAc,cAAc,2BAA2B;GAC3G,oBAAoB,KAAK,SAAS,YAAY,iBAAiB,YAAY,gBAAgB;EAC7F;CACF;CAEA,cAAW;EACT,OAAO,KAAK,MAAM;EAClB,KAAK,aAAa,eAAe,KAAK,UAAU;CAClD;CAlCW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA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;GAAA,UAAA;GAAA,MAAA;GAAS,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAT;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAS,cAAA;GAAA,aAAA;IAAA;KAAA,cAAA;KAAA,OAAA;KAAA,WAAA,CAAA,WAAA;KAAA,aAAA;IAAA;IAAA;KAAA,cAAA;KAAA,OAAA;KAAA,WAAA,CAAA,eAAA;KAAA,aAAA;IAAA;IAAA;KAAA,cAAA;KAAA,OAAA;KAAA,WAAA,CAAA,WAAA;KAAA,aAAA;IAAA;IAAA;KAAA,cAAA;KAAA,OAAA;KAAA,WAAA,CAAA,eAAA;KAAA,aAAA;IAAA;IAAA;KAAA,cAAA;KAAA,WAyBf;KAAmB,aAAA;IAAA;GAAA;GAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAzBb,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA,EAD9B,MAAA,UAAA,CAAA;;;GAKE,MAAA;GAAU,MAAA,CAAA,WAAW;;;GAKrB,MAAA;GAAU,MAAA,CAAA,eAAe;;;GAKzB,MAAA;GAAU,MAAA,CAAA,WAAW;;;GAKrB,MAAA;GAAU,MAAA,CAAA,eAAe;;;GAMzB,MAAA;GAAa,MAAA,CAAA,mBAAmB"}
|
|
@@ -1,20 +1,37 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { ChangeDetectionStrategy, Component, NgModule } from
|
|
3
|
-
import { FieldType, FormlyMatFormFieldModule } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import { ReactiveFormsModule } from
|
|
6
|
-
import * as i2 from
|
|
7
|
-
import { MatInputModule } from
|
|
8
|
-
import * as i3 from
|
|
9
|
-
import { FormlyModule } from
|
|
10
|
-
import { CommonModule } from
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, NgModule } from "@angular/core";
|
|
3
|
+
import { FieldType, FormlyMatFormFieldModule } from "@ngx-formly/material/form-field";
|
|
4
|
+
import * as i1 from "@angular/forms";
|
|
5
|
+
import { ReactiveFormsModule } from "@angular/forms";
|
|
6
|
+
import * as i2 from "@angular/material/input";
|
|
7
|
+
import { MatInputModule } from "@angular/material/input";
|
|
8
|
+
import * as i3 from "@ngx-formly/core";
|
|
9
|
+
import { FormlyModule } from "@ngx-formly/core";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
var FormlyFieldInput = class FormlyFieldInput extends FieldType {
|
|
12
|
+
get type() {
|
|
13
|
+
return this.props.type || "text";
|
|
14
|
+
}
|
|
15
|
+
static {
|
|
16
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
17
|
+
minVersion: "12.0.0",
|
|
18
|
+
version: "22.2.2",
|
|
19
|
+
ngImport: i0,
|
|
20
|
+
type: FormlyFieldInput,
|
|
21
|
+
deps: null,
|
|
22
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
static {
|
|
26
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
27
|
+
minVersion: "17.0.0",
|
|
28
|
+
version: "22.2.2",
|
|
29
|
+
type: FormlyFieldInput,
|
|
30
|
+
isStandalone: false,
|
|
31
|
+
selector: "formly-field-mat-input",
|
|
32
|
+
usesInheritance: true,
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
template: `
|
|
18
35
|
@if (type !== 'number') {
|
|
19
36
|
<input
|
|
20
37
|
matInput
|
|
@@ -44,13 +61,81 @@ class FormlyFieldInput extends FieldType {
|
|
|
44
61
|
[placeholder]="props.placeholder"
|
|
45
62
|
/>
|
|
46
63
|
}
|
|
47
|
-
`,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
`,
|
|
65
|
+
isInline: true,
|
|
66
|
+
dependencies: [
|
|
67
|
+
{
|
|
68
|
+
kind: "directive",
|
|
69
|
+
type: i1.DefaultValueAccessor,
|
|
70
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
kind: "directive",
|
|
74
|
+
type: i1.NumberValueAccessor,
|
|
75
|
+
selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
kind: "directive",
|
|
79
|
+
type: i1.NgControlStatus,
|
|
80
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
kind: "directive",
|
|
84
|
+
type: i1.RequiredValidator,
|
|
85
|
+
selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
|
|
86
|
+
inputs: ["required"]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
kind: "directive",
|
|
90
|
+
type: i1.FormControlDirective,
|
|
91
|
+
selector: "[formControl]",
|
|
92
|
+
inputs: [
|
|
93
|
+
"formControl",
|
|
94
|
+
"disabled",
|
|
95
|
+
"ngModel"
|
|
96
|
+
],
|
|
97
|
+
outputs: ["ngModelChange"],
|
|
98
|
+
exportAs: ["ngForm"]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
kind: "directive",
|
|
102
|
+
type: i2.MatInput,
|
|
103
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
104
|
+
inputs: [
|
|
105
|
+
"disabled",
|
|
106
|
+
"id",
|
|
107
|
+
"placeholder",
|
|
108
|
+
"name",
|
|
109
|
+
"required",
|
|
110
|
+
"type",
|
|
111
|
+
"errorStateMatcher",
|
|
112
|
+
"aria-describedby",
|
|
113
|
+
"value",
|
|
114
|
+
"readonly",
|
|
115
|
+
"disabledInteractive"
|
|
116
|
+
],
|
|
117
|
+
exportAs: ["matInput"]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
kind: "directive",
|
|
121
|
+
type: i3.LegacyFormlyAttributes,
|
|
122
|
+
selector: "[formlyAttributes]"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
130
|
+
minVersion: "12.0.0",
|
|
131
|
+
version: "22.2.2",
|
|
132
|
+
ngImport: i0,
|
|
133
|
+
type: FormlyFieldInput,
|
|
134
|
+
decorators: [{
|
|
135
|
+
type: Component,
|
|
136
|
+
args: [{
|
|
137
|
+
selector: "formly-field-mat-input",
|
|
138
|
+
template: `
|
|
54
139
|
@if (type !== 'number') {
|
|
55
140
|
<input
|
|
56
141
|
matInput
|
|
@@ -81,71 +166,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
81
166
|
/>
|
|
82
167
|
}
|
|
83
168
|
`,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
169
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
170
|
+
standalone: false
|
|
171
|
+
}]
|
|
172
|
+
}]
|
|
173
|
+
});
|
|
89
174
|
function withFormlyFieldInput() {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
props: {
|
|
112
|
-
type: 'number',
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
};
|
|
175
|
+
return { types: [
|
|
176
|
+
{
|
|
177
|
+
name: "input",
|
|
178
|
+
component: FormlyFieldInput,
|
|
179
|
+
wrappers: ["form-field"]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: "string",
|
|
183
|
+
extends: "input"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: "number",
|
|
187
|
+
extends: "input",
|
|
188
|
+
defaultOptions: { props: { type: "number" } }
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "integer",
|
|
192
|
+
extends: "input",
|
|
193
|
+
defaultOptions: { props: { type: "number" } }
|
|
194
|
+
}
|
|
195
|
+
] };
|
|
118
196
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
197
|
+
var FormlyMatInputModule = class FormlyMatInputModule {
|
|
198
|
+
static {
|
|
199
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
200
|
+
minVersion: "12.0.0",
|
|
201
|
+
version: "22.2.2",
|
|
202
|
+
ngImport: i0,
|
|
203
|
+
type: FormlyMatInputModule,
|
|
204
|
+
deps: [],
|
|
205
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
static {
|
|
209
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
210
|
+
minVersion: "14.0.0",
|
|
211
|
+
version: "22.2.2",
|
|
212
|
+
ngImport: i0,
|
|
213
|
+
type: FormlyMatInputModule,
|
|
214
|
+
declarations: [FormlyFieldInput],
|
|
215
|
+
imports: [
|
|
216
|
+
CommonModule,
|
|
217
|
+
ReactiveFormsModule,
|
|
218
|
+
MatInputModule,
|
|
219
|
+
FormlyMatFormFieldModule,
|
|
220
|
+
i3.FormlyModule
|
|
221
|
+
]
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
static {
|
|
225
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
226
|
+
minVersion: "12.0.0",
|
|
227
|
+
version: "22.2.2",
|
|
228
|
+
ngImport: i0,
|
|
229
|
+
type: FormlyMatInputModule,
|
|
230
|
+
imports: [
|
|
231
|
+
CommonModule,
|
|
232
|
+
ReactiveFormsModule,
|
|
233
|
+
MatInputModule,
|
|
234
|
+
FormlyMatFormFieldModule,
|
|
235
|
+
FormlyModule.forChild(withFormlyFieldInput())
|
|
236
|
+
]
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
241
|
+
minVersion: "12.0.0",
|
|
242
|
+
version: "22.2.2",
|
|
243
|
+
ngImport: i0,
|
|
244
|
+
type: FormlyMatInputModule,
|
|
245
|
+
decorators: [{
|
|
246
|
+
type: NgModule,
|
|
247
|
+
args: [{
|
|
248
|
+
declarations: [FormlyFieldInput],
|
|
249
|
+
imports: [
|
|
250
|
+
CommonModule,
|
|
251
|
+
ReactiveFormsModule,
|
|
252
|
+
MatInputModule,
|
|
253
|
+
FormlyMatFormFieldModule,
|
|
254
|
+
FormlyModule.forChild(withFormlyFieldInput())
|
|
255
|
+
]
|
|
256
|
+
}]
|
|
257
|
+
}]
|
|
258
|
+
});
|
|
150
259
|
export { FormlyFieldInput, FormlyMatInputModule, withFormlyFieldInput };
|
|
151
|
-
|
|
260
|
+
|
|
261
|
+
//# sourceMappingURL=ngx-formly-material-input.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-input.mjs","sources":["../../../../src/ui/material/input/src/input.type.ts","../../../../src/ui/material/input/src/input.config.ts","../../../../src/ui/material/input/src/input.module.ts"
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-input.mjs","names":[],"sources":["../../../../src/ui/material/input/src/input.type.ts","../../../../src/ui/material/input/src/input.config.ts","../../../../src/ui/material/input/src/input.module.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\n\ninterface InputProps extends FormlyFieldProps {}\n\nexport interface FormlyInputFieldConfig extends FormlyFieldConfig<InputProps> {\n type: 'input' | Type<FormlyFieldInput>;\n}\n\n@Component({\n selector: 'formly-field-mat-input',\n template: `\n @if (type !== 'number') {\n <input\n matInput\n [id]=\"id\"\n [name]=\"field.name\"\n [type]=\"type || 'text'\"\n [readonly]=\"props.readonly\"\n [required]=\"required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [placeholder]=\"props.placeholder\"\n />\n } @else {\n <input\n matInput\n [id]=\"id\"\n [name]=\"field.name\"\n type=\"number\"\n [readonly]=\"props.readonly\"\n [required]=\"required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [placeholder]=\"props.placeholder\"\n />\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig<InputProps>> {\n get type() {\n return this.props.type || 'text';\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldInput } from './input.type';\n\nexport function withFormlyFieldInput(): ConfigOption {\n return {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n { name: 'string', extends: 'input' },\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { FormlyFieldInput } from './input.type';\nimport { withFormlyFieldInput } from './input.config';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldInput()),\n ],\n})\nexport class FormlyMatInputModule {}\n"],"mappings":";;;;;;;;;;AA8CA,IAAa,mBAAb,MAAa,yBAAyB,UAAsC;CAC1E,IAAI,OAAI;EACN,OAAO,KAAK,MAAM,QAAQ;CAC5B;CAHW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAgB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAhB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAgB,cAAA;GAAA,UAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,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