@ngx-formly/kendo 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-kendo-checkbox.mjs +7 -7
- package/fesm2022/ngx-formly-kendo-form-field.mjs +11 -11
- package/fesm2022/ngx-formly-kendo-form-field.mjs.map +1 -1
- package/fesm2022/ngx-formly-kendo-input.mjs +21 -9
- package/fesm2022/ngx-formly-kendo-input.mjs.map +1 -1
- package/fesm2022/ngx-formly-kendo-radio.mjs +7 -7
- package/fesm2022/ngx-formly-kendo-select.mjs +70 -28
- package/fesm2022/ngx-formly-kendo-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-kendo-textarea.mjs +7 -7
- package/fesm2022/ngx-formly-kendo.mjs +4 -4
- package/package.json +14 -13
- package/types/ngx-formly-kendo-checkbox.d.ts +36 -0
- package/types/ngx-formly-kendo-form-field.d.ts +39 -0
- package/types/ngx-formly-kendo-input.d.ts +30 -0
- package/types/ngx-formly-kendo-radio.d.ts +33 -0
- package/types/ngx-formly-kendo-select.d.ts +39 -0
- package/types/ngx-formly-kendo-textarea.d.ts +30 -0
- package/types/ngx-formly-kendo.d.ts +18 -0
- package/checkbox/checkbox.config.d.ts +0 -2
- package/checkbox/checkbox.module.d.ts +0 -13
- package/checkbox/checkbox.type.d.ts +0 -19
- package/checkbox/index.d.ts +0 -5
- package/checkbox/public_api.d.ts +0 -3
- package/form-field/field.type.d.ts +0 -8
- package/form-field/form-field.config.d.ts +0 -2
- package/form-field/form-field.module.d.ts +0 -12
- package/form-field/form-field.wrapper.d.ts +0 -15
- 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 -14
- package/input/public_api.d.ts +0 -3
- package/lib/ui-kendo.config.d.ts +0 -1
- package/lib/ui-kendo.d.ts +0 -2
- package/lib/ui-kendo.module.d.ts +0 -12
- 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 -14
- package/radio/radio.type.d.ts +0 -16
- 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 -13
- package/select/select.type.d.ts +0 -16
- 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 -14
package/README.md
CHANGED
|
@@ -25,14 +25,23 @@ Formly is a dynamic (JSON powered) form library for Angular that brings unmatche
|
|
|
25
25
|
- ⚡️ Supports multiple schemas:
|
|
26
26
|
- Formly Schema (core)
|
|
27
27
|
- JSON Schema
|
|
28
|
+
- JSON Schema string defaults are configurable. See [schema defaults](docs/json-schema.md#defaults).
|
|
28
29
|
- 😍 A bunch of themes, out of the box!
|
|
29
30
|
- 💪 Built on top of [Angular Reactive Forms](https://angular.dev/guide/forms/reactive-forms)
|
|
31
|
+
- Nullable JSON Schema numbers preserve `null` when cleared. See [JSON Schema](docs/json-schema.md#nullable-numbers).
|
|
32
|
+
- Forms emit their initial validation status after building, including valid forms. See [form notifications](docs/properties-options.md#initial-validation-status).
|
|
33
|
+
- Subscribe to controls after fields load with the `fieldChange` output. See [form build notifications](docs/properties-options.md#accessing-controls-after-a-build).
|
|
30
34
|
- 📹 [@eggheadio course](https://egghead.io/playlists/configuration-based-reactive-angular-forms-with-ngx-formly-465f) - 20 lessons & 78 minutes
|
|
31
35
|
|
|
32
36
|
## Docs
|
|
33
37
|
|
|
38
|
+
Try the live configuration-to-form example on [formly.dev](https://formly.dev), then explore the guides and UI demos.
|
|
39
|
+
Use the search button or Cmd/Ctrl+K to search guide and migration text, plus UI and example page names.
|
|
40
|
+
|
|
34
41
|
- [Get Started](https://formly.dev/guide)
|
|
42
|
+
- [CSP-safe expressions and optional chaining](docs/expression-properties.md#4-expression-evaluation)
|
|
35
43
|
- [Themes](https://formly.dev/ui)
|
|
44
|
+
- [Ionic select interface options](docs/properties-options.md#ionic-select-interfaces)
|
|
36
45
|
- [Examples](https://formly.dev/examples)
|
|
37
46
|
|
|
38
47
|
## Resources
|
|
@@ -55,25 +64,43 @@ Formly is a dynamic (JSON powered) form library for Angular that brings unmatche
|
|
|
55
64
|
|
|
56
65
|
#### **Which Version to use?**
|
|
57
66
|
|
|
58
|
-
| Angular version | Formly version
|
|
59
|
-
| --------------- |
|
|
60
|
-
| Angular >=
|
|
61
|
-
| Angular >=
|
|
62
|
-
| Angular >=
|
|
63
|
-
| Angular >=
|
|
64
|
-
| Angular >=
|
|
65
|
-
| Angular >=
|
|
66
|
-
| Angular >=
|
|
67
|
-
| Angular >=
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
| Angular version | Formly version | Migration |
|
|
68
|
+
| --------------- | -------------------- | ---------------------------------- |
|
|
69
|
+
| Angular >= 21 | `@ngx-formly/core@10.x` | [Upgrade to v10](UPGRADE-10.0.md) |
|
|
70
|
+
| Angular >= 20 | `@ngx-formly/core@9.x` | [Upgrade to v9](UPGRADE-9.0.md) |
|
|
71
|
+
| Angular >= 19 | `@ngx-formly/core@8.x` | [Upgrade to v8](UPGRADE-8.0.md) |
|
|
72
|
+
| Angular >= 18 | `@ngx-formly/core@7.x` | [Upgrade to v7](UPGRADE-7.0.md) |
|
|
73
|
+
| Angular >= 13 | `@ngx-formly/core@6.x` | [Upgrade to v6](UPGRADE-6.0.md) |
|
|
74
|
+
| Angular >= 7 | `@ngx-formly/core@5.x` | [Upgrade to v5](UPGRADE-5.0.md) |
|
|
75
|
+
| Angular >= 6 | `@ngx-formly/core@4.x` | |
|
|
76
|
+
| Angular >= 5 | `@ngx-formly/core@3.x` | |
|
|
77
|
+
| Angular >= 4 | `@ngx-formly/core@2.x` | [Upgrade to v2](UPGRADE-2.0.md) |
|
|
78
|
+
| Angular >= 2 | `ng-formly@1.x` | |
|
|
79
|
+
|
|
80
|
+
#### Upgrading to v10
|
|
81
|
+
|
|
82
|
+
Formly v10 requires Angular 21 or newer. Upgrade Angular first, then update all
|
|
83
|
+
`@ngx-formly/*` packages used by your application together to v10.
|
|
84
|
+
The Material, PrimeNG, and NG-ZORRO integrations require version 21 or newer of
|
|
85
|
+
their respective UI libraries. Kendo requires version 21.4.1 or newer, and NativeScript
|
|
86
|
+
requires `@nativescript/angular` 21 or newer. Applications staying on Angular 20 should use Formly v9.
|
|
87
|
+
|
|
88
|
+
See the [v10 upgrade guide](UPGRADE-10.0.md) for migration steps.
|
|
89
|
+
|
|
90
|
+
#### Upgrading to v9
|
|
91
|
+
|
|
92
|
+
Formly v9 requires Angular 20 or newer. Upgrade Angular first, then update all
|
|
93
|
+
`@ngx-formly/*` packages used by your application together to v9.
|
|
94
|
+
The Material, PrimeNG, and NG-ZORRO integrations require version 20 or newer of
|
|
95
|
+
their respective UI libraries. Kendo requires version 19.1 or newer, and NativeScript
|
|
96
|
+
requires `@nativescript/angular` 20 or newer. Applications staying on Angular 19 should
|
|
97
|
+
use Formly v8; applications staying on Angular 18 should use Formly v7.
|
|
98
|
+
|
|
99
|
+
PrimeNG datepicker fields no longer accept `monthNavigator`, `yearNavigator`, or
|
|
100
|
+
`yearRange`, which PrimeNG 20 removed. Replace `@primeng/themes` imports with
|
|
101
|
+
`@primeuix/themes` when configuring a PrimeNG theme.
|
|
102
|
+
|
|
103
|
+
See the [v9 upgrade guide](UPGRADE-9.0.md) for migration steps and the [changelog](CHANGELOG.md) for the full list of changes.
|
|
77
104
|
|
|
78
105
|
## Core Team
|
|
79
106
|
|
|
@@ -20,8 +20,8 @@ class FormlyFieldCheckbox 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: "17.0.0", version: "
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldCheckbox, isStandalone: false, selector: "formly-field-kendo-checkbox", usesInheritance: true, ngImport: i0, template: `
|
|
25
25
|
<input type="checkbox" kendoCheckBox [formControl]="formControl" [formlyAttributes]="field" />
|
|
26
26
|
<label [for]="id" class="k-checkbox-label">
|
|
27
27
|
{{ props.label }}
|
|
@@ -31,7 +31,7 @@ class FormlyFieldCheckbox extends FieldType {
|
|
|
31
31
|
</label>
|
|
32
32
|
`, isInline: true, styles: [".k-form formly-field-kendo-checkbox .k-label{display:inherit}\n"], dependencies: [{ kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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: "directive", type: i2.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { kind: "directive", type: i3.LabelDirective, selector: "label[for]", inputs: ["for", "labelClass"] }, { kind: "directive", type: i4.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
33
33
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
|
|
35
35
|
type: Component,
|
|
36
36
|
args: [{ selector: 'formly-field-kendo-checkbox', template: `
|
|
37
37
|
<input type="checkbox" kendoCheckBox [formControl]="formControl" [formlyAttributes]="field" />
|
|
@@ -61,20 +61,20 @@ function withFormlyFieldCheckbox() {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
class FormlyCheckboxModule {
|
|
64
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
65
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
65
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
|
|
66
66
|
ReactiveFormsModule,
|
|
67
67
|
InputsModule,
|
|
68
68
|
LabelModule,
|
|
69
69
|
FormlyFormFieldModule, i4.FormlyModule] }); }
|
|
70
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
70
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyCheckboxModule, imports: [CommonModule,
|
|
71
71
|
ReactiveFormsModule,
|
|
72
72
|
InputsModule,
|
|
73
73
|
LabelModule,
|
|
74
74
|
FormlyFormFieldModule,
|
|
75
75
|
FormlyModule.forChild(withFormlyFieldCheckbox())] }); }
|
|
76
76
|
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyCheckboxModule, decorators: [{
|
|
78
78
|
type: NgModule,
|
|
79
79
|
args: [{
|
|
80
80
|
declarations: [FormlyFieldCheckbox],
|
|
@@ -23,8 +23,8 @@ class FormlyWrapperFormField extends FieldWrapper {
|
|
|
23
23
|
return disabledElement();
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyWrapperFormField, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyWrapperFormField, isStandalone: false, selector: "formly-wrapper-kendo-form-field", viewQueries: [{ propertyName: "formfield", first: true, predicate: FormFieldComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
28
28
|
<kendo-formfield [orientation]="props.orientation">
|
|
29
29
|
@if (props.label && props.hideLabel !== true) {
|
|
30
30
|
<label [for]="id">
|
|
@@ -46,9 +46,9 @@ class FormlyWrapperFormField extends FieldWrapper {
|
|
|
46
46
|
</kendo-formerror>
|
|
47
47
|
}
|
|
48
48
|
</kendo-formfield>
|
|
49
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i1.FormFieldComponent, selector: "kendo-formfield", inputs: ["showHints", "orientation", "showErrors"] }, { kind: "component", type: i1.HintComponent, selector: "kendo-formhint", inputs: ["align"] }, { kind: "component", type: i1.ErrorComponent, selector: "kendo-formerror", inputs: ["align"] }, { kind: "directive", type: i2.LabelDirective, selector: "label[for]", inputs: ["for", "labelClass"] }, { kind: "component", type: i3.LegacyFormlyValidationMessage, selector: "formly-validation-message" }] }); }
|
|
49
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i1.FormFieldComponent, selector: "kendo-formfield", inputs: ["showHints", "orientation", "showErrors", "colSpan"] }, { kind: "component", type: i1.HintComponent, selector: "kendo-formhint", inputs: ["align"] }, { kind: "component", type: i1.ErrorComponent, selector: "kendo-formerror", inputs: ["align"] }, { kind: "directive", type: i2.LabelDirective, selector: "label[for]", inputs: ["for", "labelClass"] }, { kind: "component", type: i3.LegacyFormlyValidationMessage, selector: "formly-validation-message" }] }); }
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
|
|
52
52
|
type: Component,
|
|
53
53
|
args: [{
|
|
54
54
|
selector: 'formly-wrapper-kendo-form-field',
|
|
@@ -94,18 +94,18 @@ function withFormlyFormField() {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
class FormlyFormFieldModule {
|
|
97
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
98
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
97
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
98
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyFormFieldModule, declarations: [FormlyWrapperFormField], imports: [CommonModule,
|
|
99
99
|
ReactiveFormsModule,
|
|
100
100
|
FormFieldModule,
|
|
101
101
|
LabelModule, i3.FormlyModule] }); }
|
|
102
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
102
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFormFieldModule, imports: [CommonModule,
|
|
103
103
|
ReactiveFormsModule,
|
|
104
104
|
FormFieldModule,
|
|
105
105
|
LabelModule,
|
|
106
106
|
FormlyModule.forChild(withFormlyFormField())] }); }
|
|
107
107
|
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFormFieldModule, decorators: [{
|
|
109
109
|
type: NgModule,
|
|
110
110
|
args: [{
|
|
111
111
|
declarations: [FormlyWrapperFormField],
|
|
@@ -128,10 +128,10 @@ class FieldType extends FieldType$1 {
|
|
|
128
128
|
get formField() {
|
|
129
129
|
return this.field?.['_formField'];
|
|
130
130
|
}
|
|
131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
132
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
132
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: FieldType, isStandalone: true, viewQueries: [{ propertyName: "formControls", predicate: NgControl, descendants: true }], usesInheritance: true, ngImport: i0 }); }
|
|
133
133
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FieldType, decorators: [{
|
|
135
135
|
type: Directive
|
|
136
136
|
}], propDecorators: { formControls: [{
|
|
137
137
|
type: ViewChildren,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-kendo-form-field.mjs","sources":["../../../../src/ui/kendo/form-field/src/form-field.wrapper.ts","../../../../src/ui/kendo/form-field/src/form-field.config.ts","../../../../src/ui/kendo/form-field/src/form-field.module.ts","../../../../src/ui/kendo/form-field/src/field.type.ts","../../../../src/ui/kendo/form-field/src/ngx-formly-kendo-form-field.ts"],"sourcesContent":["import { Component, ViewChild, OnInit } from '@angular/core';\nimport { FormFieldComponent, Orientation } from '@progress/kendo-angular-inputs';\nimport {\n ɵdefineHiddenProp as defineHiddenProp,\n FieldWrapper,\n FormlyFieldConfig,\n FormlyFieldProps as CoreFormlyFieldProps,\n} from '@ngx-formly/core';\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n hideRequiredMarker?: boolean;\n hideLabel?: boolean;\n orientation?: Orientation;\n}\n\n@Component({\n selector: 'formly-wrapper-kendo-form-field',\n template: `\n <kendo-formfield [orientation]=\"props.orientation\">\n @if (props.label && props.hideLabel !== true) {\n <label [for]=\"id\">\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\" class=\"k-required\">*</span>\n }\n </label>\n }\n\n <ng-container #fieldComponent></ng-container>\n\n @if (props.description) {\n <kendo-formhint>{{ props.description }}</kendo-formhint>\n }\n @if (showError) {\n <kendo-formerror>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </kendo-formerror>\n }\n </kendo-formfield>\n `,\n standalone: false,\n})\nexport class FormlyWrapperFormField extends FieldWrapper<FormlyFieldConfig<FormlyFieldProps>> implements OnInit {\n @ViewChild(FormFieldComponent, { static: true }) formfield!: FormFieldComponent;\n\n ngOnInit() {\n defineHiddenProp(this.field, '_formField', this.formfield);\n defineHiddenProp(this.formfield, 'formControls', undefined);\n this.formfield['showErrorsInitial'] = () => this.showError;\n this.formfield['showHintsInitial'] = () => !this.showError;\n\n const disabledElement = this.formfield['disabledElement'].bind(this);\n this.formfield['disabledElement'] = () => {\n if (this.formfield.controlElementRefs.length === 0) {\n return false;\n }\n\n return disabledElement();\n };\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 } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\nimport { FormFieldModule } from '@progress/kendo-angular-inputs';\nimport { LabelModule } from '@progress/kendo-angular-label';\nimport { withFormlyFormField } from './form-field.config';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormFieldModule,\n LabelModule,\n\n FormlyModule.forChild(withFormlyFormField()),\n ],\n})\nexport class FormlyFormFieldModule {}\n","import { Directive, ViewChildren, QueryList } from '@angular/core';\nimport { FormlyFieldConfig, FieldType as CoreFieldType } from '@ngx-formly/core';\nimport { NgControl } from '@angular/forms';\nimport { FormFieldComponent } from '@progress/kendo-angular-inputs';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig> extends CoreFieldType<F> {\n @ViewChildren(NgControl) private set formControls(formControls: QueryList<NgControl>) {\n if (this.formField) {\n this.formField['control'] = formControls.first;\n }\n }\n\n private get formField(): FormFieldComponent {\n return (this.field as any)?.['_formField'];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["defineHiddenProp","i1","CoreFieldType"],"mappings":";;;;;;;;;;;AA0CM,MAAO,sBAAuB,SAAQ,YAAiD,CAAA;IAG3F,QAAQ,GAAA;QACNA,iBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;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EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,KAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,6BAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAGU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBA3BlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iCAAiC;AAC3C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;AAsBT,EAAA,CAAA;AACD,oBAAA,UAAU,EAAE,KAAK;AAClB,iBAAA
|
|
1
|
+
{"version":3,"file":"ngx-formly-kendo-form-field.mjs","sources":["../../../../src/ui/kendo/form-field/src/form-field.wrapper.ts","../../../../src/ui/kendo/form-field/src/form-field.config.ts","../../../../src/ui/kendo/form-field/src/form-field.module.ts","../../../../src/ui/kendo/form-field/src/field.type.ts","../../../../src/ui/kendo/form-field/src/ngx-formly-kendo-form-field.ts"],"sourcesContent":["import { Component, ViewChild, OnInit } from '@angular/core';\nimport { FormFieldComponent, Orientation } from '@progress/kendo-angular-inputs';\nimport {\n ɵdefineHiddenProp as defineHiddenProp,\n FieldWrapper,\n FormlyFieldConfig,\n FormlyFieldProps as CoreFormlyFieldProps,\n} from '@ngx-formly/core';\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n hideRequiredMarker?: boolean;\n hideLabel?: boolean;\n orientation?: Orientation;\n}\n\n@Component({\n selector: 'formly-wrapper-kendo-form-field',\n template: `\n <kendo-formfield [orientation]=\"props.orientation\">\n @if (props.label && props.hideLabel !== true) {\n <label [for]=\"id\">\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\" class=\"k-required\">*</span>\n }\n </label>\n }\n\n <ng-container #fieldComponent></ng-container>\n\n @if (props.description) {\n <kendo-formhint>{{ props.description }}</kendo-formhint>\n }\n @if (showError) {\n <kendo-formerror>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </kendo-formerror>\n }\n </kendo-formfield>\n `,\n standalone: false,\n})\nexport class FormlyWrapperFormField extends FieldWrapper<FormlyFieldConfig<FormlyFieldProps>> implements OnInit {\n @ViewChild(FormFieldComponent, { static: true }) formfield!: FormFieldComponent;\n\n ngOnInit() {\n defineHiddenProp(this.field, '_formField', this.formfield);\n defineHiddenProp(this.formfield, 'formControls', undefined);\n this.formfield['showErrorsInitial'] = () => this.showError;\n this.formfield['showHintsInitial'] = () => !this.showError;\n\n const disabledElement = this.formfield['disabledElement'].bind(this);\n this.formfield['disabledElement'] = () => {\n if (this.formfield.controlElementRefs.length === 0) {\n return false;\n }\n\n return disabledElement();\n };\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 } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\nimport { FormFieldModule } from '@progress/kendo-angular-inputs';\nimport { LabelModule } from '@progress/kendo-angular-label';\nimport { withFormlyFormField } from './form-field.config';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormFieldModule,\n LabelModule,\n\n FormlyModule.forChild(withFormlyFormField()),\n ],\n})\nexport class FormlyFormFieldModule {}\n","import { Directive, ViewChildren, QueryList } from '@angular/core';\nimport { FormlyFieldConfig, FieldType as CoreFieldType } from '@ngx-formly/core';\nimport { NgControl } from '@angular/forms';\nimport { FormFieldComponent } from '@progress/kendo-angular-inputs';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig> extends CoreFieldType<F> {\n @ViewChildren(NgControl) private set formControls(formControls: QueryList<NgControl>) {\n if (this.formField) {\n this.formField['control'] = formControls.first;\n }\n }\n\n private get formField(): FormFieldComponent {\n return (this.field as any)?.['_formField'];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["defineHiddenProp","i1","CoreFieldType"],"mappings":";;;;;;;;;;;AA0CM,MAAO,sBAAuB,SAAQ,YAAiD,CAAA;IAG3F,QAAQ,GAAA;QACNA,iBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;QAC1DA,iBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,CAAC;AAC3D,QAAA,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,GAAG,MAAM,IAAI,CAAC,SAAS;AAC1D,QAAA,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS;AAE1D,QAAA,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AACpE,QAAA,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,GAAG,MAAK;YACvC,IAAI,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,MAAM,KAAK,CAAC,EAAE;AAClD,gBAAA,OAAO,KAAK;YACd;YAEA,OAAO,eAAe,EAAE;AAC1B,QAA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BACZ,mBAAmB;wBACnB,eAAe;wBACf,WAAW;AAEX,wBAAA,YAAY,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC;AAC7C,qBAAA;AACF,iBAAA;;;ACbK,MAAgB,SAA2D,SAAQC,WAAgB,CAAA;IACvG,IAAqC,YAAY,CAAC,YAAkC,EAAA;AAClF,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,YAAY,CAAC,KAAK;QAChD;IACF;AAEA,IAAA,IAAY,SAAS,GAAA;AACnB,QAAA,OAAQ,IAAI,CAAC,KAAa,GAAG,YAAY,CAAC;IAC5C;+GAToB,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,+EACf,SAAS,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FADH,SAAS,EAAA,UAAA,EAAA,CAAA;kBAD9B;;sBAEE,YAAY;uBAAC,SAAS;;;ACPzB;;AAEG;;;;"}
|
|
@@ -10,16 +10,22 @@ import { FormlyModule } from '@ngx-formly/core';
|
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
11
11
|
|
|
12
12
|
class FormlyFieldInput extends FieldType {
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
14
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldInput, isStandalone: false, selector: "formly-field-kendo-input", usesInheritance: true, ngImport: i0, template: `
|
|
15
15
|
@if (props.type !== 'number') {
|
|
16
16
|
<input kendoTextBox [type]="props.type || 'text'" [formlyAttributes]="field" [formControl]="formControl" />
|
|
17
17
|
} @else {
|
|
18
|
-
<kendo-numerictextbox
|
|
18
|
+
<kendo-numerictextbox
|
|
19
|
+
[focusableId]="id"
|
|
20
|
+
[id]="id + '-container'"
|
|
21
|
+
[formlyAttributes]="field"
|
|
22
|
+
[formControl]="formControl"
|
|
23
|
+
>
|
|
24
|
+
</kendo-numerictextbox>
|
|
19
25
|
}
|
|
20
26
|
`, 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: "directive", type: i2.TextBoxDirective, selector: "input[kendoTextBox]", inputs: ["value"] }, { kind: "component", type: i2.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21
27
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldInput, decorators: [{
|
|
23
29
|
type: Component,
|
|
24
30
|
args: [{
|
|
25
31
|
selector: 'formly-field-kendo-input',
|
|
@@ -27,7 +33,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
27
33
|
@if (props.type !== 'number') {
|
|
28
34
|
<input kendoTextBox [type]="props.type || 'text'" [formlyAttributes]="field" [formControl]="formControl" />
|
|
29
35
|
} @else {
|
|
30
|
-
<kendo-numerictextbox
|
|
36
|
+
<kendo-numerictextbox
|
|
37
|
+
[focusableId]="id"
|
|
38
|
+
[id]="id + '-container'"
|
|
39
|
+
[formlyAttributes]="field"
|
|
40
|
+
[formControl]="formControl"
|
|
41
|
+
>
|
|
42
|
+
</kendo-numerictextbox>
|
|
31
43
|
}
|
|
32
44
|
`,
|
|
33
45
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -67,18 +79,18 @@ function withFormlyFieldInput() {
|
|
|
67
79
|
}
|
|
68
80
|
|
|
69
81
|
class FormlyInputModule {
|
|
70
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
71
|
-
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: FormlyInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
83
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyInputModule, declarations: [FormlyFieldInput], imports: [CommonModule,
|
|
72
84
|
ReactiveFormsModule,
|
|
73
85
|
FormlyFormFieldModule,
|
|
74
86
|
InputsModule, i3.FormlyModule] }); }
|
|
75
|
-
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: FormlyInputModule, imports: [CommonModule,
|
|
76
88
|
ReactiveFormsModule,
|
|
77
89
|
FormlyFormFieldModule,
|
|
78
90
|
InputsModule,
|
|
79
91
|
FormlyModule.forChild(withFormlyFieldInput())] }); }
|
|
80
92
|
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyInputModule, decorators: [{
|
|
82
94
|
type: NgModule,
|
|
83
95
|
args: [{
|
|
84
96
|
declarations: [FormlyFieldInput],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-kendo-input.mjs","sources":["../../../../src/ui/kendo/input/src/input.type.ts","../../../../src/ui/kendo/input/src/input.config.ts","../../../../src/ui/kendo/input/src/input.module.ts","../../../../src/ui/kendo/input/src/ngx-formly-kendo-input.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/kendo/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-kendo-input',\n template: `\n @if (props.type !== 'number') {\n <input kendoTextBox [type]=\"props.type || 'text'\" [formlyAttributes]=\"field\" [formControl]=\"formControl\" />\n } @else {\n <kendo-numerictextbox [formlyAttributes]=\"field\"
|
|
1
|
+
{"version":3,"file":"ngx-formly-kendo-input.mjs","sources":["../../../../src/ui/kendo/input/src/input.type.ts","../../../../src/ui/kendo/input/src/input.config.ts","../../../../src/ui/kendo/input/src/input.module.ts","../../../../src/ui/kendo/input/src/ngx-formly-kendo-input.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/kendo/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-kendo-input',\n template: `\n @if (props.type !== 'number') {\n <input kendoTextBox [type]=\"props.type || 'text'\" [formlyAttributes]=\"field\" [formControl]=\"formControl\" />\n } @else {\n <kendo-numerictextbox\n [focusableId]=\"id\"\n [id]=\"id + '-container'\"\n [formlyAttributes]=\"field\"\n [formControl]=\"formControl\"\n >\n </kendo-numerictextbox>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig<InputProps>> {}\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';\nimport { FormlyFormFieldModule } from '@ngx-formly/kendo/form-field';\nimport { InputsModule } from '@progress/kendo-angular-inputs';\nimport { FormlyFieldInput } from './input.type';\nimport { withFormlyFieldInput } from './input.config';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyFormFieldModule,\n InputsModule,\n FormlyModule.forChild(withFormlyFieldInput()),\n ],\n})\nexport class FormlyInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AA4BM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;+GAA/D,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAhBjB;;;;;;;;;;;;AAYT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,8MAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EA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AAqB;wBACrB,YAAY;AACZ,wBAAA,YAAY,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC;AAC9C,qBAAA;AACF,iBAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -18,8 +18,8 @@ class FormlyFieldRadio extends FieldType {
|
|
|
18
18
|
get disabledControl() {
|
|
19
19
|
return new UntypedFormControl({ value: this.formControl.value, disabled: true });
|
|
20
20
|
}
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldRadio, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldRadio, isStandalone: false, selector: "formly-field-kendo-radio", usesInheritance: true, ngImport: i0, template: `
|
|
23
23
|
@for (option of props.options | formlySelectOptions: field | async; track option; let i = $index) {
|
|
24
24
|
<input
|
|
25
25
|
type="radio"
|
|
@@ -37,7 +37,7 @@ class FormlyFieldRadio extends FieldType {
|
|
|
37
37
|
}
|
|
38
38
|
`, isInline: true, styles: [".k-form formly-field-kendo-radio .k-label{display:inherit}\n"], 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.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { 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: "directive", type: i2.LabelDirective, selector: "label[for]", inputs: ["for", "labelClass"] }, { kind: "directive", type: i3.RadioButtonDirective, selector: "input[kendoRadioButton]", inputs: ["size"] }, { kind: "directive", type: i4.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
39
39
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldRadio, decorators: [{
|
|
41
41
|
type: Component,
|
|
42
42
|
args: [{ selector: 'formly-field-kendo-radio', template: `
|
|
43
43
|
@for (option of props.options | formlySelectOptions: field | async; track option; let i = $index) {
|
|
@@ -71,14 +71,14 @@ function withFormlyFieldRadio() {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
class FormlyRadioModule {
|
|
74
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
75
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
74
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
75
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyRadioModule, declarations: [FormlyFieldRadio], imports: [CommonModule,
|
|
76
76
|
ReactiveFormsModule,
|
|
77
77
|
LabelModule,
|
|
78
78
|
InputsModule,
|
|
79
79
|
FormlyFormFieldModule,
|
|
80
80
|
FormlySelectModule, i4.FormlyModule] }); }
|
|
81
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
81
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyRadioModule, imports: [CommonModule,
|
|
82
82
|
ReactiveFormsModule,
|
|
83
83
|
LabelModule,
|
|
84
84
|
InputsModule,
|
|
@@ -86,7 +86,7 @@ class FormlyRadioModule {
|
|
|
86
86
|
FormlySelectModule,
|
|
87
87
|
FormlyModule.forChild(withFormlyFieldRadio())] }); }
|
|
88
88
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyRadioModule, decorators: [{
|
|
90
90
|
type: NgModule,
|
|
91
91
|
args: [{
|
|
92
92
|
declarations: [FormlyFieldRadio],
|
|
@@ -13,35 +13,77 @@ import * as i5 from '@ngx-formly/core/select';
|
|
|
13
13
|
import { FormlySelectModule as FormlySelectModule$1 } from '@ngx-formly/core/select';
|
|
14
14
|
|
|
15
15
|
class FormlyFieldSelect extends FieldType {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.itemDisabled = ({ dataItem }) => !!dataItem.disabled;
|
|
19
|
+
}
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldSelect, isStandalone: false, selector: "formly-field-kendo-select", usesInheritance: true, ngImport: i0, template: `
|
|
22
|
+
@if (props.multiple) {
|
|
23
|
+
<kendo-multiselect
|
|
24
|
+
[focusableId]="id"
|
|
25
|
+
[id]="id + '-container'"
|
|
26
|
+
[formControl]="formControl"
|
|
27
|
+
[formlyAttributes]="field"
|
|
28
|
+
[data]="props.options | formlySelectOptions: field | async"
|
|
29
|
+
[placeholder]="props.placeholder"
|
|
30
|
+
textField="label"
|
|
31
|
+
valueField="value"
|
|
32
|
+
[valuePrimitive]="props.primitive ?? true"
|
|
33
|
+
[itemDisabled]="itemDisabled"
|
|
34
|
+
(valueChange)="props.change && props.change(field, $event)"
|
|
35
|
+
/>
|
|
36
|
+
} @else {
|
|
37
|
+
<kendo-dropdownlist
|
|
38
|
+
[id]="id"
|
|
39
|
+
[formControl]="formControl"
|
|
40
|
+
[formlyAttributes]="field"
|
|
41
|
+
[data]="props.options | formlySelectOptions: field | async"
|
|
42
|
+
[textField]="'label'"
|
|
43
|
+
[valueField]="'value'"
|
|
44
|
+
[valuePrimitive]="props.primitive ?? true"
|
|
45
|
+
[defaultItem]="props.placeholder ? { label: props.placeholder, value: null } : undefined"
|
|
46
|
+
[itemDisabled]="itemDisabled"
|
|
47
|
+
(valueChange)="props.change && props.change(field, $event)"
|
|
48
|
+
>
|
|
49
|
+
</kendo-dropdownlist>
|
|
50
|
+
}
|
|
51
|
+
`, isInline: true, dependencies: [{ 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.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "component", type: i2.MultiSelectComponent, selector: "kendo-multiselect", inputs: ["showStickyHeader", "focusableId", "autoClose", "loading", "data", "value", "valueField", "textField", "tabindex", "tabIndex", "size", "rounded", "fillMode", "placeholder", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "disabled", "itemDisabled", "checkboxes", "readonly", "filterable", "virtual", "popupSettings", "listHeight", "valuePrimitive", "clearButton", "tagMapper", "allowCustom", "valueNormalizer", "inputAttributes"], outputs: ["filterChange", "valueChange", "open", "opened", "close", "closed", "focus", "blur", "inputFocus", "inputBlur", "removeTag"], exportAs: ["kendoMultiSelect"] }, { 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 }); }
|
|
29
52
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldSelect, decorators: [{
|
|
31
54
|
type: Component,
|
|
32
55
|
args: [{
|
|
33
56
|
selector: 'formly-field-kendo-select',
|
|
34
57
|
template: `
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
58
|
+
@if (props.multiple) {
|
|
59
|
+
<kendo-multiselect
|
|
60
|
+
[focusableId]="id"
|
|
61
|
+
[id]="id + '-container'"
|
|
62
|
+
[formControl]="formControl"
|
|
63
|
+
[formlyAttributes]="field"
|
|
64
|
+
[data]="props.options | formlySelectOptions: field | async"
|
|
65
|
+
[placeholder]="props.placeholder"
|
|
66
|
+
textField="label"
|
|
67
|
+
valueField="value"
|
|
68
|
+
[valuePrimitive]="props.primitive ?? true"
|
|
69
|
+
[itemDisabled]="itemDisabled"
|
|
70
|
+
(valueChange)="props.change && props.change(field, $event)"
|
|
71
|
+
/>
|
|
72
|
+
} @else {
|
|
73
|
+
<kendo-dropdownlist
|
|
74
|
+
[id]="id"
|
|
75
|
+
[formControl]="formControl"
|
|
76
|
+
[formlyAttributes]="field"
|
|
77
|
+
[data]="props.options | formlySelectOptions: field | async"
|
|
78
|
+
[textField]="'label'"
|
|
79
|
+
[valueField]="'value'"
|
|
80
|
+
[valuePrimitive]="props.primitive ?? true"
|
|
81
|
+
[defaultItem]="props.placeholder ? { label: props.placeholder, value: null } : undefined"
|
|
82
|
+
[itemDisabled]="itemDisabled"
|
|
83
|
+
(valueChange)="props.change && props.change(field, $event)"
|
|
84
|
+
>
|
|
85
|
+
</kendo-dropdownlist>
|
|
86
|
+
}
|
|
45
87
|
`,
|
|
46
88
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
47
89
|
standalone: false,
|
|
@@ -62,20 +104,20 @@ function withFormlyFieldSelect() {
|
|
|
62
104
|
}
|
|
63
105
|
|
|
64
106
|
class FormlySelectModule {
|
|
65
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
66
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
108
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, declarations: [FormlyFieldSelect], imports: [CommonModule,
|
|
67
109
|
ReactiveFormsModule,
|
|
68
110
|
DropDownsModule,
|
|
69
111
|
FormlyFormFieldModule,
|
|
70
112
|
FormlySelectModule$1, i3.FormlyModule] }); }
|
|
71
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
113
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, imports: [CommonModule,
|
|
72
114
|
ReactiveFormsModule,
|
|
73
115
|
DropDownsModule,
|
|
74
116
|
FormlyFormFieldModule,
|
|
75
117
|
FormlySelectModule$1,
|
|
76
118
|
FormlyModule.forChild(withFormlyFieldSelect())] }); }
|
|
77
119
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, decorators: [{
|
|
79
121
|
type: NgModule,
|
|
80
122
|
args: [{
|
|
81
123
|
declarations: [FormlyFieldSelect],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-kendo-select.mjs","sources":["../../../../src/ui/kendo/select/src/select.type.ts","../../../../src/ui/kendo/select/src/select.config.ts","../../../../src/ui/kendo/select/src/select.module.ts","../../../../src/ui/kendo/select/src/ngx-formly-kendo-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/kendo/form-field';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n primitive?: boolean;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-kendo-select',\n template: `\n <kendo-
|
|
1
|
+
{"version":3,"file":"ngx-formly-kendo-select.mjs","sources":["../../../../src/ui/kendo/select/src/select.type.ts","../../../../src/ui/kendo/select/src/select.config.ts","../../../../src/ui/kendo/select/src/select.module.ts","../../../../src/ui/kendo/select/src/ngx-formly-kendo-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/kendo/form-field';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n primitive?: boolean;\n multiple?: boolean;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-kendo-select',\n template: `\n @if (props.multiple) {\n <kendo-multiselect\n [focusableId]=\"id\"\n [id]=\"id + '-container'\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [data]=\"props.options | formlySelectOptions: field | async\"\n [placeholder]=\"props.placeholder\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"props.primitive ?? true\"\n [itemDisabled]=\"itemDisabled\"\n (valueChange)=\"props.change && props.change(field, $event)\"\n />\n } @else {\n <kendo-dropdownlist\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [data]=\"props.options | formlySelectOptions: field | async\"\n [textField]=\"'label'\"\n [valueField]=\"'value'\"\n [valuePrimitive]=\"props.primitive ?? true\"\n [defaultItem]=\"props.placeholder ? { label: props.placeholder, value: null } : undefined\"\n [itemDisabled]=\"itemDisabled\"\n (valueChange)=\"props.change && props.change(field, $event)\"\n >\n </kendo-dropdownlist>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n itemDisabled = ({ dataItem }: { dataItem: { disabled?: boolean } }) => !!dataItem.disabled;\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 { DropDownsModule } from '@progress/kendo-angular-dropdowns';\nimport { FormlySelectModule as FormlyCoreSelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyFormFieldModule } from '@ngx-formly/kendo/form-field';\nimport { FormlyFieldSelect } from './select.type';\nimport { withFormlyFieldSelect } from './select.config';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n DropDownsModule,\n\n FormlyFormFieldModule,\n FormlyCoreSelectModule,\n FormlyModule.forChild(withFormlyFieldSelect()),\n ],\n})\nexport class FormlySelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["FormlyCoreSelectModule","i1"],"mappings":";;;;;;;;;;;;;;AAkDM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AApC9E,IAAA,WAAA,GAAA;;AAqCE,QAAA,IAAA,CAAA,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAwC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ;AAC3F,IAAA;+GAFY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QA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