@ngx-formly/material 8.0.0 → 10.0.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 +46 -19
- package/fesm2022/ngx-formly-material-checkbox.mjs +7 -7
- package/fesm2022/ngx-formly-material-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-datepicker.mjs +7 -7
- package/fesm2022/ngx-formly-material-datepicker.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-form-field.mjs +10 -10
- package/fesm2022/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-input.mjs +7 -7
- package/fesm2022/ngx-formly-material-multicheckbox.mjs +7 -7
- package/fesm2022/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-native-select.mjs +7 -7
- package/fesm2022/ngx-formly-material-radio.mjs +7 -7
- package/fesm2022/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-select.mjs +7 -7
- package/fesm2022/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-slider.mjs +8 -11
- package/fesm2022/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-textarea.mjs +7 -7
- package/fesm2022/ngx-formly-material-toggle.mjs +7 -7
- package/fesm2022/ngx-formly-material-toggle.mjs.map +1 -1
- package/fesm2022/ngx-formly-material.mjs +4 -4
- package/package.json +20 -19
- package/types/ngx-formly-material-checkbox.d.ts +52 -0
- package/{datepicker/datepicker.type.d.ts → types/ngx-formly-material-datepicker.d.ts} +25 -8
- package/types/ngx-formly-material-form-field.d.ts +84 -0
- package/types/ngx-formly-material-input.d.ts +31 -0
- package/types/ngx-formly-material-multicheckbox.d.ts +44 -0
- package/types/ngx-formly-material-native-select.d.ts +32 -0
- package/types/ngx-formly-material-radio.d.ts +45 -0
- package/types/ngx-formly-material-select.d.ts +54 -0
- package/types/ngx-formly-material-slider.d.ts +43 -0
- package/types/ngx-formly-material-textarea.d.ts +39 -0
- package/types/ngx-formly-material-toggle.d.ts +41 -0
- package/types/ngx-formly-material.d.ts +20 -0
- package/checkbox/checkbox.config.d.ts +0 -2
- package/checkbox/checkbox.module.d.ts +0 -12
- package/checkbox/checkbox.type.d.ts +0 -36
- package/checkbox/index.d.ts +0 -5
- package/checkbox/public_api.d.ts +0 -3
- package/datepicker/datepicker.config.d.ts +0 -2
- package/datepicker/datepicker.module.d.ts +0 -13
- package/datepicker/index.d.ts +0 -5
- package/datepicker/public_api.d.ts +0 -3
- package/form-field/field.type.d.ts +0 -37
- package/form-field/form-field.config.d.ts +0 -2
- package/form-field/form-field.module.d.ts +0 -11
- package/form-field/form-field.wrapper.d.ts +0 -38
- package/form-field/index.d.ts +0 -5
- package/form-field/public_api.d.ts +0 -4
- package/index.d.ts +0 -5
- package/input/index.d.ts +0 -5
- package/input/input.config.d.ts +0 -2
- package/input/input.module.d.ts +0 -12
- package/input/input.type.d.ts +0 -15
- package/input/public_api.d.ts +0 -3
- package/lib/material.config.d.ts +0 -1
- package/lib/ui-material.d.ts +0 -3
- package/lib/ui-material.module.d.ts +0 -13
- package/multicheckbox/index.d.ts +0 -5
- package/multicheckbox/multicheckbox.config.d.ts +0 -2
- package/multicheckbox/multicheckbox.module.d.ts +0 -13
- package/multicheckbox/multicheckbox.type.d.ts +0 -27
- package/multicheckbox/public_api.d.ts +0 -3
- package/native-select/index.d.ts +0 -5
- package/native-select/native-select.config.d.ts +0 -2
- package/native-select/native-select.module.d.ts +0 -13
- package/native-select/native-select.type.d.ts +0 -15
- package/native-select/public_api.d.ts +0 -3
- package/public_api.d.ts +0 -1
- package/radio/index.d.ts +0 -5
- package/radio/public_api.d.ts +0 -3
- package/radio/radio.config.d.ts +0 -2
- package/radio/radio.module.d.ts +0 -13
- package/radio/radio.type.d.ts +0 -28
- package/select/index.d.ts +0 -5
- package/select/public_api.d.ts +0 -3
- package/select/select.config.d.ts +0 -2
- package/select/select.module.d.ts +0 -14
- package/select/select.type.d.ts +0 -36
- package/slider/index.d.ts +0 -5
- package/slider/public_api.d.ts +0 -3
- package/slider/slider.config.d.ts +0 -2
- package/slider/slider.module.d.ts +0 -13
- package/slider/slider.type.d.ts +0 -26
- package/textarea/index.d.ts +0 -5
- package/textarea/public_api.d.ts +0 -3
- package/textarea/textarea.config.d.ts +0 -2
- package/textarea/textarea.module.d.ts +0 -12
- package/textarea/textarea.type.d.ts +0 -23
- package/toggle/index.d.ts +0 -5
- package/toggle/public_api.d.ts +0 -3
- package/toggle/toggle.config.d.ts +0 -2
- package/toggle/toggle.module.d.ts +0 -12
- package/toggle/toggle.type.d.ts +0 -25
|
@@ -13,8 +13,8 @@ import * as i5 from '@ngx-formly/core/select';
|
|
|
13
13
|
import { FormlySelectModule } from '@ngx-formly/core/select';
|
|
14
14
|
|
|
15
15
|
class FormlyFieldNativeSelect extends FieldType {
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldNativeSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldNativeSelect, isStandalone: false, selector: "formly-field-mat-native-select", usesInheritance: true, ngImport: i0, template: `
|
|
18
18
|
<select
|
|
19
19
|
matNativeControl
|
|
20
20
|
[id]="id"
|
|
@@ -48,7 +48,7 @@ class FormlyFieldNativeSelect extends FieldType {
|
|
|
48
48
|
</select>
|
|
49
49
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", 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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldNativeSelect, decorators: [{
|
|
52
52
|
type: Component,
|
|
53
53
|
args: [{
|
|
54
54
|
selector: 'formly-field-mat-native-select',
|
|
@@ -103,20 +103,20 @@ function withFormlyFieldNativeSelect() {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
class FormlyMatNativeSelectModule {
|
|
106
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
107
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatNativeSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
107
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatNativeSelectModule, declarations: [FormlyFieldNativeSelect], imports: [CommonModule,
|
|
108
108
|
ReactiveFormsModule,
|
|
109
109
|
MatInputModule,
|
|
110
110
|
FormlyMatFormFieldModule,
|
|
111
111
|
FormlySelectModule, i3.FormlyModule] }); }
|
|
112
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
112
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatNativeSelectModule, imports: [CommonModule,
|
|
113
113
|
ReactiveFormsModule,
|
|
114
114
|
MatInputModule,
|
|
115
115
|
FormlyMatFormFieldModule,
|
|
116
116
|
FormlySelectModule,
|
|
117
117
|
FormlyModule.forChild(withFormlyFieldNativeSelect())] }); }
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatNativeSelectModule, decorators: [{
|
|
120
120
|
type: NgModule,
|
|
121
121
|
args: [{
|
|
122
122
|
declarations: [FormlyFieldNativeSelect],
|
|
@@ -40,8 +40,8 @@ class FormlyFieldRadio extends FieldType {
|
|
|
40
40
|
super.ngOnDestroy();
|
|
41
41
|
this.focusObserver && this.focusObserver.unsubscribe();
|
|
42
42
|
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
44
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldRadio, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldRadio, isStandalone: false, selector: "formly-field-mat-radio", viewQueries: [{ propertyName: "radioGroup", first: true, predicate: MatRadioGroup, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
45
45
|
<mat-radio-group
|
|
46
46
|
[formControl]="formControl"
|
|
47
47
|
[formlyAttributes]="field"
|
|
@@ -63,7 +63,7 @@ class FormlyFieldRadio extends FieldType {
|
|
|
63
63
|
</mat-radio-group>
|
|
64
64
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
65
65
|
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldRadio, decorators: [{
|
|
67
67
|
type: Component,
|
|
68
68
|
args: [{
|
|
69
69
|
selector: 'formly-field-mat-radio',
|
|
@@ -109,20 +109,20 @@ function withFormlyFieldRadio() {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
class FormlyMatRadioModule {
|
|
112
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
113
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
113
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatRadioModule, declarations: [FormlyFieldRadio], imports: [CommonModule,
|
|
114
114
|
ReactiveFormsModule,
|
|
115
115
|
MatRadioModule,
|
|
116
116
|
FormlyMatFormFieldModule,
|
|
117
117
|
FormlySelectModule, i3.FormlyModule] }); }
|
|
118
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
118
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatRadioModule, imports: [CommonModule,
|
|
119
119
|
ReactiveFormsModule,
|
|
120
120
|
MatRadioModule,
|
|
121
121
|
FormlyMatFormFieldModule,
|
|
122
122
|
FormlySelectModule,
|
|
123
123
|
FormlyModule.forChild(withFormlyFieldRadio())] }); }
|
|
124
124
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatRadioModule, decorators: [{
|
|
126
126
|
type: NgModule,
|
|
127
127
|
args: [{
|
|
128
128
|
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.config.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, ɵobserve as observe } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatRadioGroup } from '@angular/material/radio';\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 [attr.aria-label]=\"props.label\"\n >\n @for (option of props.options | formlySelectOptions: field | async; track $index; let i = $index) {\n <mat-radio-button\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 }\n </mat-radio-group>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\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 { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldRadio } from './radio.type';\n\nexport function withFormlyFieldRadio(): ConfigOption {\n return {\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\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';\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';\nimport { withFormlyFieldRadio } from './radio.config';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatRadioModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild(withFormlyFieldRadio()),\n ],\n})\nexport class FormlyMatRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe","i1"],"mappings":";;;;;;;;;;;;;;AAuCM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AA1B5E,IAAA,WAAA,GAAA;;AA4BW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,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EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,6BAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAIU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBA1B5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;AAoBT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,UAAU,EAAE,KAAK;AAClB,iBAAA
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-radio.mjs","sources":["../../../../src/ui/material/radio/src/radio.type.ts","../../../../src/ui/material/radio/src/radio.config.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, ɵobserve as observe } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatRadioGroup } from '@angular/material/radio';\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 [attr.aria-label]=\"props.label\"\n >\n @for (option of props.options | formlySelectOptions: field | async; track $index; let i = $index) {\n <mat-radio-button\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 }\n </mat-radio-group>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\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 { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldRadio } from './radio.type';\n\nexport function withFormlyFieldRadio(): ConfigOption {\n return {\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\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';\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';\nimport { withFormlyFieldRadio } from './radio.config';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatRadioModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild(withFormlyFieldRadio()),\n ],\n})\nexport class FormlyMatRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe","i1"],"mappings":";;;;;;;;;;;;;;AAuCM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AA1B5E,IAAA,WAAA,GAAA;;AA4BW,QAAA,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;AAsBF,IAAA;IAnBC,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,aAAa,GAAGA,QAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE,KAAI;YACvE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,CAAC,CAAC,IAAI,YAAY,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;;gBAEpF,UAAU,CAAC,MAAK;oBACd,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK;oBACjG,KAAK,CAAC,KAAK,EAAE;AACf,gBAAA,CAAC,CAAC;YACJ;AACF,QAAA,CAAC,CAAC;IACJ;;AAGS,IAAA,gBAAgB,KAAI;IAEpB,WAAW,GAAA;QAClB,KAAK,CAAC,WAAW,EAAE;QACnB,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aA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", version: "
|
|
70
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
69
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
70
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldSelect, isStandalone: false, selector: "formly-field-mat-select", viewQueries: [{ propertyName: "select", first: true, predicate: MatSelect, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
71
71
|
<ng-template #selectAll let-selectOptions="selectOptions">
|
|
72
72
|
<mat-option (click)="toggleSelectAll(selectOptions)">
|
|
73
73
|
<mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="getSelectAllState(selectOptions)">
|
|
@@ -116,7 +116,7 @@ class FormlyFieldSelect extends FieldType {
|
|
|
116
116
|
</mat-select>
|
|
117
117
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: i4.MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }, { kind: "directive", type: i5.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldSelect, decorators: [{
|
|
120
120
|
type: Component,
|
|
121
121
|
args: [{
|
|
122
122
|
selector: 'formly-field-mat-select',
|
|
@@ -190,14 +190,14 @@ function withFormlyFieldSelect() {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
class FormlyMatSelectModule {
|
|
193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
194
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
193
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
194
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatSelectModule, declarations: [FormlyFieldSelect], imports: [CommonModule,
|
|
195
195
|
ReactiveFormsModule,
|
|
196
196
|
MatSelectModule,
|
|
197
197
|
MatPseudoCheckboxModule,
|
|
198
198
|
FormlyMatFormFieldModule,
|
|
199
199
|
FormlySelectModule, i5.FormlyModule] }); }
|
|
200
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
200
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatSelectModule, imports: [CommonModule,
|
|
201
201
|
ReactiveFormsModule,
|
|
202
202
|
MatSelectModule,
|
|
203
203
|
MatPseudoCheckboxModule,
|
|
@@ -205,7 +205,7 @@ class FormlyMatSelectModule {
|
|
|
205
205
|
FormlySelectModule,
|
|
206
206
|
FormlyModule.forChild(withFormlyFieldSelect())] }); }
|
|
207
207
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatSelectModule, decorators: [{
|
|
209
209
|
type: NgModule,
|
|
210
210
|
args: [{
|
|
211
211
|
declarations: [FormlyFieldSelect],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-select.mjs","sources":["../../../../src/ui/material/select/src/select.type.ts","../../../../src/ui/material/select/src/select.config.ts","../../../../src/ui/material/select/src/select.module.ts","../../../../src/ui/material/select/src/ngx-formly-material-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, ViewChild } from '@angular/core';\nimport { MatSelect, MatSelectChange } from '@angular/material/select';\nimport { FieldTypeConfig, FormlyFieldConfig, ɵobserve as observe } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n multiple?: boolean;\n selectAllOption?: string;\n disableOptionCentering?: boolean;\n typeaheadDebounceInterval?: number;\n compareWith?: (o1: any, o2: any) => boolean;\n panelClass?: string;\n panelWidth?: string | number | null;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-mat-select',\n template: `\n <ng-template #selectAll let-selectOptions=\"selectOptions\">\n <mat-option (click)=\"toggleSelectAll(selectOptions)\">\n <mat-pseudo-checkbox class=\"mat-option-pseudo-checkbox\" [state]=\"getSelectAllState(selectOptions)\">\n </mat-pseudo-checkbox>\n {{ props.selectAllOption }}\n </mat-option>\n </ng-template>\n\n <mat-select\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"props.placeholder\"\n [tabIndex]=\"props.tabindex\"\n [required]=\"required\"\n [compareWith]=\"props.compareWith\"\n [multiple]=\"props.multiple\"\n (selectionChange)=\"change($event)\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [aria-label]=\"_getAriaLabel()\"\n [aria-labelledby]=\"_getAriaLabelledby()\"\n [disableOptionCentering]=\"props.disableOptionCentering\"\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\n [panelClass]=\"props.panelClass\"\n [panelWidth]=\"props.panelWidth\"\n >\n @if (props.options | formlySelectOptions: field | async; as selectOptions) {\n @if (props.multiple && props.selectAllOption) {\n <ng-container [ngTemplateOutlet]=\"selectAll\" [ngTemplateOutletContext]=\"{ selectOptions: selectOptions }\">\n </ng-container>\n }\n @for (item of selectOptions; track $index) {\n @if (item.group) {\n <mat-optgroup [label]=\"item.label\">\n @for (child of item.group; track $index) {\n <mat-option [value]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n <mat-option [value]=\"item.value\" [disabled]=\"item.disabled\">{{ item.label }}</mat-option>\n }\n }\n }\n </mat-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n @ViewChild(MatSelect, { static: true }) set select(select: any) {\n observe(select, ['_parentFormField', '_textField'], ({ currentValue }) => {\n if (currentValue) {\n select._preferredOverlayOrigin = select._parentFormField.getConnectedOverlayOrigin();\n }\n });\n }\n override defaultOptions = {\n props: {\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n private selectAllValue!: { options: any; value: any[] };\n\n getSelectAllState(options: any[]) {\n if (this.empty || this.value.length === 0) {\n return null;\n }\n\n return this.value.length !== this.getSelectAllValue(options).length ? 'indeterminate' : 'checked';\n }\n\n toggleSelectAll(options: any[]) {\n const selectAllValue = this.getSelectAllValue(options);\n this.formControl.markAsDirty();\n this.formControl.setValue(!this.value || this.value.length !== selectAllValue.length ? selectAllValue : []);\n }\n\n change($event: MatSelectChange) {\n this.props.change?.(this.field, $event);\n }\n\n _getAriaLabelledby() {\n if (this.props.attributes?.['aria-labelledby']) {\n return this.props.attributes['aria-labelledby'] as string;\n }\n\n return this.formField?._labelId;\n }\n\n _getAriaLabel() {\n return this.props.attributes?.['aria-label'] as string;\n }\n\n private getSelectAllValue(options: any[]) {\n if (!this.selectAllValue || options !== this.selectAllValue.options) {\n const flatOptions: any[] = [];\n options.forEach((o) => (o.group ? flatOptions.push(...o.group) : flatOptions.push(o)));\n\n this.selectAllValue = {\n options,\n value: flatOptions.filter((o) => !o.disabled).map((o) => o.value),\n };\n }\n\n return this.selectAllValue.value;\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldSelect } from './select.type';\n\nexport function withFormlyFieldSelect(): ConfigOption {\n return {\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n ],\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';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { FormlyFieldSelect } from './select.type';\nimport { MatPseudoCheckboxModule } from '@angular/material/core';\nimport { withFormlyFieldSelect } from './select.config';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSelectModule,\n MatPseudoCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild(withFormlyFieldSelect()),\n ],\n})\nexport class FormlyMatSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe","i1"],"mappings":";;;;;;;;;;;;;;;;AAyEM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AArD9E,IAAA,WAAA,GAAA;;AA6DW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,CAAC,EAAO,EAAE,EAAO,EAAA;oBAC1B,OAAO,EAAE,KAAK,EAAE;gBAClB,CAAC;AACF,aAAA;SACF;AA+CF,IAAA;IA5DC,IAA4C,MAAM,CAAC,MAAW,EAAA;AAC5D,QAAAA,QAAO,CAAC,MAAM,EAAE,CAAC,kBAAkB,EAAE,YAAY,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE,KAAI;YACvE,IAAI,YAAY,EAAE;gBAChB,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC,gBAAgB,CAAC,yBAAyB,EAAE;YACtF;AACF,QAAA,CAAC,CAAC;IACJ;AAWA,IAAA,iBAAiB,CAAC,OAAc,EAAA;AAC9B,QAAA,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACzC,YAAA,OAAO,IAAI;QACb;QAEA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,iBAAiB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AAuB;YAEvB,wBAAwB;YACxB,kBAAkB,EAAAC,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAV9B,YAAY;YACZ,mBAAmB;YACnB,eAAe;YACf,uBAAuB;YAEvB,wBAAwB;YACxB,kBAAkB;AAClB,YAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGrC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,eAAe;wBACf,uBAAuB;wBAEvB,wBAAwB;wBACxB,kBAAkB;AAClB,wBAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;AAC/C,qBAAA;AACF,iBAAA;;;ACzBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-select.mjs","sources":["../../../../src/ui/material/select/src/select.type.ts","../../../../src/ui/material/select/src/select.config.ts","../../../../src/ui/material/select/src/select.module.ts","../../../../src/ui/material/select/src/ngx-formly-material-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, ViewChild } from '@angular/core';\nimport { MatSelect, MatSelectChange } from '@angular/material/select';\nimport { FieldTypeConfig, FormlyFieldConfig, ɵobserve as observe } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n multiple?: boolean;\n selectAllOption?: string;\n disableOptionCentering?: boolean;\n typeaheadDebounceInterval?: number;\n compareWith?: (o1: any, o2: any) => boolean;\n panelClass?: string;\n panelWidth?: string | number | null;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-mat-select',\n template: `\n <ng-template #selectAll let-selectOptions=\"selectOptions\">\n <mat-option (click)=\"toggleSelectAll(selectOptions)\">\n <mat-pseudo-checkbox class=\"mat-option-pseudo-checkbox\" [state]=\"getSelectAllState(selectOptions)\">\n </mat-pseudo-checkbox>\n {{ props.selectAllOption }}\n </mat-option>\n </ng-template>\n\n <mat-select\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"props.placeholder\"\n [tabIndex]=\"props.tabindex\"\n [required]=\"required\"\n [compareWith]=\"props.compareWith\"\n [multiple]=\"props.multiple\"\n (selectionChange)=\"change($event)\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [aria-label]=\"_getAriaLabel()\"\n [aria-labelledby]=\"_getAriaLabelledby()\"\n [disableOptionCentering]=\"props.disableOptionCentering\"\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\n [panelClass]=\"props.panelClass\"\n [panelWidth]=\"props.panelWidth\"\n >\n @if (props.options | formlySelectOptions: field | async; as selectOptions) {\n @if (props.multiple && props.selectAllOption) {\n <ng-container [ngTemplateOutlet]=\"selectAll\" [ngTemplateOutletContext]=\"{ selectOptions: selectOptions }\">\n </ng-container>\n }\n @for (item of selectOptions; track $index) {\n @if (item.group) {\n <mat-optgroup [label]=\"item.label\">\n @for (child of item.group; track $index) {\n <mat-option [value]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n <mat-option [value]=\"item.value\" [disabled]=\"item.disabled\">{{ item.label }}</mat-option>\n }\n }\n }\n </mat-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n @ViewChild(MatSelect, { static: true }) set select(select: any) {\n observe(select, ['_parentFormField', '_textField'], ({ currentValue }) => {\n if (currentValue) {\n select._preferredOverlayOrigin = select._parentFormField.getConnectedOverlayOrigin();\n }\n });\n }\n override defaultOptions = {\n props: {\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n private selectAllValue!: { options: any; value: any[] };\n\n getSelectAllState(options: any[]) {\n if (this.empty || this.value.length === 0) {\n return null;\n }\n\n return this.value.length !== this.getSelectAllValue(options).length ? 'indeterminate' : 'checked';\n }\n\n toggleSelectAll(options: any[]) {\n const selectAllValue = this.getSelectAllValue(options);\n this.formControl.markAsDirty();\n this.formControl.setValue(!this.value || this.value.length !== selectAllValue.length ? selectAllValue : []);\n }\n\n change($event: MatSelectChange) {\n this.props.change?.(this.field, $event);\n }\n\n _getAriaLabelledby() {\n if (this.props.attributes?.['aria-labelledby']) {\n return this.props.attributes['aria-labelledby'] as string;\n }\n\n return this.formField?._labelId;\n }\n\n _getAriaLabel() {\n return this.props.attributes?.['aria-label'] as string;\n }\n\n private getSelectAllValue(options: any[]) {\n if (!this.selectAllValue || options !== this.selectAllValue.options) {\n const flatOptions: any[] = [];\n options.forEach((o) => (o.group ? flatOptions.push(...o.group) : flatOptions.push(o)));\n\n this.selectAllValue = {\n options,\n value: flatOptions.filter((o) => !o.disabled).map((o) => o.value),\n };\n }\n\n return this.selectAllValue.value;\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldSelect } from './select.type';\n\nexport function withFormlyFieldSelect(): ConfigOption {\n return {\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n ],\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';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { FormlyFieldSelect } from './select.type';\nimport { MatPseudoCheckboxModule } from '@angular/material/core';\nimport { withFormlyFieldSelect } from './select.config';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSelectModule,\n MatPseudoCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild(withFormlyFieldSelect()),\n ],\n})\nexport class FormlyMatSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe","i1"],"mappings":";;;;;;;;;;;;;;;;AAyEM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AArD9E,IAAA,WAAA,GAAA;;AA6DW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,CAAC,EAAO,EAAE,EAAO,EAAA;oBAC1B,OAAO,EAAE,KAAK,EAAE;gBAClB,CAAC;AACF,aAAA;SACF;AA+CF,IAAA;IA5DC,IAA4C,MAAM,CAAC,MAAW,EAAA;AAC5D,QAAAA,QAAO,CAAC,MAAM,EAAE,CAAC,kBAAkB,EAAE,YAAY,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE,KAAI;YACvE,IAAI,YAAY,EAAE;gBAChB,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC,gBAAgB,CAAC,yBAAyB,EAAE;YACtF;AACF,QAAA,CAAC,CAAC;IACJ;AAWA,IAAA,iBAAiB,CAAC,OAAc,EAAA;AAC9B,QAAA,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACzC,YAAA,OAAO,IAAI;QACb;QAEA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC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wB;YACxB,kBAAkB,EAAAC,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAV9B,YAAY;YACZ,mBAAmB;YACnB,eAAe;YACf,uBAAuB;YAEvB,wBAAwB;YACxB,kBAAkB;AAClB,YAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGrC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,eAAe;wBACf,uBAAuB;wBAEvB,wBAAwB;wBACxB,kBAAkB;AAClB,wBAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;AAC/C,qBAAA;AACF,iBAAA;;;ACzBD;;AAEG;;;;"}
|
|
@@ -8,7 +8,7 @@ import { MatSliderModule } from '@angular/material/slider';
|
|
|
8
8
|
import * as i3 from '@ngx-formly/core';
|
|
9
9
|
import { FormlyModule } from '@ngx-formly/core';
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
11
|
-
import {
|
|
11
|
+
import { MatRippleModule } from '@angular/material/core';
|
|
12
12
|
|
|
13
13
|
class FormlyFieldSlider extends FieldType {
|
|
14
14
|
constructor() {
|
|
@@ -21,8 +21,8 @@ class FormlyFieldSlider extends FieldType {
|
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldSlider, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: FormlyFieldSlider, isStandalone: false, selector: "formly-field-mat-slider", usesInheritance: true, ngImport: i0, template: `
|
|
26
26
|
<mat-slider
|
|
27
27
|
[id]="id"
|
|
28
28
|
[style.width]="'100%'"
|
|
@@ -43,7 +43,7 @@ class FormlyFieldSlider extends FieldType {
|
|
|
43
43
|
</mat-slider>
|
|
44
44
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i2.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
45
45
|
}
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldSlider, decorators: [{
|
|
47
47
|
type: Component,
|
|
48
48
|
args: [{
|
|
49
49
|
selector: 'formly-field-mat-slider',
|
|
@@ -85,28 +85,25 @@ function withFormlyFieldSlider() {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
class FormlyMatSliderModule {
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
89
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
90
|
-
MatCommonModule,
|
|
88
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
89
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatSliderModule, declarations: [FormlyFieldSlider], imports: [CommonModule,
|
|
91
90
|
MatRippleModule,
|
|
92
91
|
ReactiveFormsModule,
|
|
93
92
|
MatSliderModule,
|
|
94
93
|
FormlyMatFormFieldModule, i3.FormlyModule] }); }
|
|
95
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
96
|
-
MatCommonModule,
|
|
94
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatSliderModule, imports: [CommonModule,
|
|
97
95
|
MatRippleModule,
|
|
98
96
|
ReactiveFormsModule,
|
|
99
97
|
MatSliderModule,
|
|
100
98
|
FormlyMatFormFieldModule,
|
|
101
99
|
FormlyModule.forChild(withFormlyFieldSlider())] }); }
|
|
102
100
|
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatSliderModule, decorators: [{
|
|
104
102
|
type: NgModule,
|
|
105
103
|
args: [{
|
|
106
104
|
declarations: [FormlyFieldSlider],
|
|
107
105
|
imports: [
|
|
108
106
|
CommonModule,
|
|
109
|
-
MatCommonModule,
|
|
110
107
|
MatRippleModule,
|
|
111
108
|
ReactiveFormsModule,
|
|
112
109
|
MatSliderModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-slider.mjs","sources":["../../../../src/ui/material/slider/src/slider.type.ts","../../../../src/ui/material/slider/src/slider.config.ts","../../../../src/ui/material/slider/src/slider.module.ts","../../../../src/ui/material/slider/src/ngx-formly-material-slider.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 SliderProps extends FormlyFieldProps {\n displayWith?: (value: number) => string;\n discrete?: boolean;\n showTickMarks?: boolean;\n\n input?: (field: FormlyFieldConfig<SliderProps>, $event: Event) => void;\n change?: (field: FormlyFieldConfig<SliderProps>, $event: Event) => void;\n}\n\nexport interface FormlySliderFieldConfig extends FormlyFieldConfig<SliderProps> {\n type: 'slider' | Type<FormlyFieldSlider>;\n}\n\n@Component({\n selector: 'formly-field-mat-slider',\n template: `\n <mat-slider\n [id]=\"id\"\n [style.width]=\"'100%'\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [color]=\"props.color\"\n [displayWith]=\"props.displayWith\"\n [max]=\"props.max\"\n [min]=\"props.min\"\n [step]=\"props.step\"\n [discrete]=\"props.discrete\"\n [showTickMarks]=\"props.showTickMarks\"\n [step]=\"props.step\"\n (input)=\"props.input && props.input(field, $event)\"\n (change)=\"props.change && props.change(field, $event)\"\n >\n <input matSliderThumb [formControl]=\"formControl\" [formlyAttributes]=\"field\" />\n </mat-slider>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SliderProps>> {\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n displayWith: (value: number) => `${value}`,\n },\n };\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldSlider } from './slider.type';\n\nexport function withFormlyFieldSlider(): ConfigOption {\n return {\n types: [\n {\n name: 'slider',\n component: FormlyFieldSlider,\n wrappers: ['form-field'],\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';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport {
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-slider.mjs","sources":["../../../../src/ui/material/slider/src/slider.type.ts","../../../../src/ui/material/slider/src/slider.config.ts","../../../../src/ui/material/slider/src/slider.module.ts","../../../../src/ui/material/slider/src/ngx-formly-material-slider.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 SliderProps extends FormlyFieldProps {\n displayWith?: (value: number) => string;\n discrete?: boolean;\n showTickMarks?: boolean;\n\n input?: (field: FormlyFieldConfig<SliderProps>, $event: Event) => void;\n change?: (field: FormlyFieldConfig<SliderProps>, $event: Event) => void;\n}\n\nexport interface FormlySliderFieldConfig extends FormlyFieldConfig<SliderProps> {\n type: 'slider' | Type<FormlyFieldSlider>;\n}\n\n@Component({\n selector: 'formly-field-mat-slider',\n template: `\n <mat-slider\n [id]=\"id\"\n [style.width]=\"'100%'\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [color]=\"props.color\"\n [displayWith]=\"props.displayWith\"\n [max]=\"props.max\"\n [min]=\"props.min\"\n [step]=\"props.step\"\n [discrete]=\"props.discrete\"\n [showTickMarks]=\"props.showTickMarks\"\n [step]=\"props.step\"\n (input)=\"props.input && props.input(field, $event)\"\n (change)=\"props.change && props.change(field, $event)\"\n >\n <input matSliderThumb [formControl]=\"formControl\" [formlyAttributes]=\"field\" />\n </mat-slider>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SliderProps>> {\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n displayWith: (value: number) => `${value}`,\n },\n };\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldSlider } from './slider.type';\n\nexport function withFormlyFieldSlider(): ConfigOption {\n return {\n types: [\n {\n name: 'slider',\n component: FormlyFieldSlider,\n wrappers: ['form-field'],\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';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatRippleModule } from '@angular/material/core';\nimport { FormlyFieldSlider } from './slider.type';\nimport { withFormlyFieldSlider } from './slider.config';\n\n@NgModule({\n declarations: [FormlyFieldSlider],\n imports: [\n CommonModule,\n MatRippleModule,\n ReactiveFormsModule,\n MatSliderModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldSlider()),\n ],\n})\nexport class FormlyMatSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA0CM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAzB9E,IAAA,WAAA,GAAA;;AA0BW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,UAAU,EAAE,QAAiB;g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A,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAR9B,YAAY;YACZ,eAAe;YACf,mBAAmB;YACnB,eAAe;YACf,wBAAwB;AACxB,YAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGrC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAXjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,mBAAmB;wBACnB,eAAe;wBACf,wBAAwB;AACxB,wBAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;AAC/C,qBAAA;AACF,iBAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -20,8 +20,8 @@ class FormlyFieldTextArea extends FieldType {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: FormlyFieldTextArea, isStandalone: false, selector: "formly-field-mat-textarea", providers: [
|
|
25
25
|
// fix for https://github.com/ngx-formly/ngx-formly/issues/1688
|
|
26
26
|
// rely on formControl value instead of elementRef which return empty value in Firefox.
|
|
27
27
|
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },
|
|
@@ -46,7 +46,7 @@ class FormlyFieldTextArea extends FieldType {
|
|
|
46
46
|
></textarea>
|
|
47
47
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", 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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i3.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "directive", type: i4.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
51
|
args: [{
|
|
52
52
|
selector: 'formly-field-mat-textarea',
|
|
@@ -93,18 +93,18 @@ function withFormlyFieldTextArea() {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
class FormlyMatTextAreaModule {
|
|
96
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
97
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatTextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
97
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatTextAreaModule, declarations: [FormlyFieldTextArea], imports: [CommonModule,
|
|
98
98
|
ReactiveFormsModule,
|
|
99
99
|
MatInputModule,
|
|
100
100
|
FormlyMatFormFieldModule, i4.FormlyModule] }); }
|
|
101
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
101
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatTextAreaModule, imports: [CommonModule,
|
|
102
102
|
ReactiveFormsModule,
|
|
103
103
|
MatInputModule,
|
|
104
104
|
FormlyMatFormFieldModule,
|
|
105
105
|
FormlyModule.forChild(withFormlyFieldTextArea())] }); }
|
|
106
106
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatTextAreaModule, decorators: [{
|
|
108
108
|
type: NgModule,
|
|
109
109
|
args: [{
|
|
110
110
|
declarations: [FormlyFieldTextArea],
|
|
@@ -24,8 +24,8 @@ class FormlyFieldToggle extends FieldType {
|
|
|
24
24
|
this.slideToggle.focus();
|
|
25
25
|
super.onContainerClick(event);
|
|
26
26
|
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldToggle, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: FormlyFieldToggle, isStandalone: false, selector: "formly-field-mat-toggle", viewQueries: [{ propertyName: "slideToggle", first: true, predicate: MatSlideToggle, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
29
29
|
<mat-slide-toggle
|
|
30
30
|
[id]="id"
|
|
31
31
|
[name]="field.name"
|
|
@@ -40,7 +40,7 @@ class FormlyFieldToggle extends FieldType {
|
|
|
40
40
|
</mat-slide-toggle>
|
|
41
41
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldToggle, decorators: [{
|
|
44
44
|
type: Component,
|
|
45
45
|
args: [{
|
|
46
46
|
selector: 'formly-field-mat-toggle',
|
|
@@ -79,18 +79,18 @@ function withFormlyFieldToggle() {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
class FormlyMatToggleModule {
|
|
82
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
83
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
82
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
83
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatToggleModule, declarations: [FormlyFieldToggle], imports: [CommonModule,
|
|
84
84
|
ReactiveFormsModule,
|
|
85
85
|
MatSlideToggleModule,
|
|
86
86
|
FormlyMatFormFieldModule, i3.FormlyModule] }); }
|
|
87
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
87
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatToggleModule, imports: [CommonModule,
|
|
88
88
|
ReactiveFormsModule,
|
|
89
89
|
MatSlideToggleModule,
|
|
90
90
|
FormlyMatFormFieldModule,
|
|
91
91
|
FormlyModule.forChild(withFormlyFieldToggle())] }); }
|
|
92
92
|
}
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
|
|
94
94
|
type: NgModule,
|
|
95
95
|
args: [{
|
|
96
96
|
declarations: [FormlyFieldToggle],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-toggle.mjs","sources":["../../../../src/ui/material/toggle/src/toggle.type.ts","../../../../src/ui/material/toggle/src/toggle.config.ts","../../../../src/ui/material/toggle/src/toggle.module.ts","../../../../src/ui/material/toggle/src/ngx-formly-material-toggle.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatSlideToggle } from '@angular/material/slide-toggle';\n\ninterface ToggleProps extends FormlyFieldProps {\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyToggleFieldConfig extends FormlyFieldConfig<ToggleProps> {\n type: 'toggle' | Type<FormlyFieldToggle>;\n}\n\n@Component({\n selector: 'formly-field-mat-toggle',\n template: `\n <mat-slide-toggle\n [id]=\"id\"\n [name]=\"field.name\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [color]=\"props.color\"\n [tabIndex]=\"props.tabindex\"\n [required]=\"required\"\n [labelPosition]=\"props.labelPosition\"\n >\n {{ props.label }}\n </mat-slide-toggle>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldToggle extends FieldType<FieldTypeConfig<ToggleProps>> {\n @ViewChild(MatSlideToggle, { static: true }) slideToggle!: MatSlideToggle;\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n },\n };\n\n override onContainerClick(event: MouseEvent): void {\n this.slideToggle.focus();\n super.onContainerClick(event);\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldToggle } from './toggle.type';\n\nexport function withFormlyFieldToggle(): ConfigOption {\n return {\n types: [\n {\n name: 'toggle',\n component: FormlyFieldToggle,\n wrappers: ['form-field'],\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';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\n\nimport { FormlyFieldToggle } from './toggle.type';\nimport { withFormlyFieldToggle } from './toggle.config';\n\n@NgModule({\n declarations: [FormlyFieldToggle],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSlideToggleModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldToggle()),\n ],\n})\nexport class FormlyMatToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAgCM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAnB9E,IAAA,WAAA,GAAA;;AAqBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,UAAU,EAAE,QAAiB;AAC7B,gBAAA,SAAS,EAAE,IAAI;AAChB,aAAA;SACF;AAMF,IAAA;AAJU,IAAA,gBAAgB,CAAC,KAAiB,EAAA;AACzC,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;AACxB,QAAA,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC;IAC/B;+GAbW,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAjB,iBAAiB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,aAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EACjB,cAAc,EAAA,WAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,E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A,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;AAaT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,UAAU,EAAE,KAAK;AAClB,iBAAA
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-toggle.mjs","sources":["../../../../src/ui/material/toggle/src/toggle.type.ts","../../../../src/ui/material/toggle/src/toggle.config.ts","../../../../src/ui/material/toggle/src/toggle.module.ts","../../../../src/ui/material/toggle/src/ngx-formly-material-toggle.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatSlideToggle } from '@angular/material/slide-toggle';\n\ninterface ToggleProps extends FormlyFieldProps {\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyToggleFieldConfig extends FormlyFieldConfig<ToggleProps> {\n type: 'toggle' | Type<FormlyFieldToggle>;\n}\n\n@Component({\n selector: 'formly-field-mat-toggle',\n template: `\n <mat-slide-toggle\n [id]=\"id\"\n [name]=\"field.name\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [color]=\"props.color\"\n [tabIndex]=\"props.tabindex\"\n [required]=\"required\"\n [labelPosition]=\"props.labelPosition\"\n >\n {{ props.label }}\n </mat-slide-toggle>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldToggle extends FieldType<FieldTypeConfig<ToggleProps>> {\n @ViewChild(MatSlideToggle, { static: true }) slideToggle!: MatSlideToggle;\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n },\n };\n\n override onContainerClick(event: MouseEvent): void {\n this.slideToggle.focus();\n super.onContainerClick(event);\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldToggle } from './toggle.type';\n\nexport function withFormlyFieldToggle(): ConfigOption {\n return {\n types: [\n {\n name: 'toggle',\n component: FormlyFieldToggle,\n wrappers: ['form-field'],\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';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\n\nimport { FormlyFieldToggle } from './toggle.type';\nimport { withFormlyFieldToggle } from './toggle.config';\n\n@NgModule({\n declarations: [FormlyFieldToggle],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSlideToggleModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldToggle()),\n ],\n})\nexport class FormlyMatToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAgCM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAnB9E,IAAA,WAAA,GAAA;;AAqBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,UAAU,EAAE,QAAiB;AAC7B,gBAAA,SAAS,EAAE,IAAI;AAChB,aAAA;SACF;AAMF,IAAA;AAJU,IAAA,gBAAgB,CAAC,KAAiB,EAAA;AACzC,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;AACxB,QAAA,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC;IAC/B;+GAbW,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAjB,iBAAiB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,WAAA,EAAA,CA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GrC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAVjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,oBAAoB;wBACpB,wBAAwB;AACxB,wBAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;AAC/C,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -22,15 +22,15 @@ function withFormlyMaterial() {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
class FormlyMaterialModule {
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
26
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyMaterialModule, imports: [FormlyMatFormFieldModule,
|
|
27
27
|
FormlyMatInputModule,
|
|
28
28
|
FormlyMatTextAreaModule,
|
|
29
29
|
FormlyMatRadioModule,
|
|
30
30
|
FormlyMatCheckboxModule,
|
|
31
31
|
FormlyMatMultiCheckboxModule,
|
|
32
32
|
FormlyMatSelectModule] }); }
|
|
33
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
33
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMaterialModule, imports: [FormlyMatFormFieldModule,
|
|
34
34
|
FormlyMatInputModule,
|
|
35
35
|
FormlyMatTextAreaModule,
|
|
36
36
|
FormlyMatRadioModule,
|
|
@@ -38,7 +38,7 @@ class FormlyMaterialModule {
|
|
|
38
38
|
FormlyMatMultiCheckboxModule,
|
|
39
39
|
FormlyMatSelectModule] }); }
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMaterialModule, decorators: [{
|
|
42
42
|
type: NgModule,
|
|
43
43
|
args: [{
|
|
44
44
|
imports: [
|