@ngx-formly/kendo 10.0.1 → 11.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.
@@ -1,34 +1,60 @@
1
- import * as i0 from '@angular/core';
2
- import { ViewChild, Component, NgModule, ViewChildren, Directive } from '@angular/core';
3
- import * as i1 from '@progress/kendo-angular-inputs';
4
- import { FormFieldComponent, FormFieldModule } from '@progress/kendo-angular-inputs';
5
- import * as i3 from '@ngx-formly/core';
6
- import { FieldWrapper, ɵdefineHiddenProp as _defineHiddenProp, FormlyModule, FieldType as FieldType$1 } from '@ngx-formly/core';
7
- import * as i2 from '@progress/kendo-angular-label';
8
- import { LabelModule } from '@progress/kendo-angular-label';
9
- import { CommonModule } from '@angular/common';
10
- import { ReactiveFormsModule, NgControl } from '@angular/forms';
11
-
12
- class FormlyWrapperFormField extends FieldWrapper {
13
- ngOnInit() {
14
- _defineHiddenProp(this.field, '_formField', this.formfield);
15
- _defineHiddenProp(this.formfield, 'formControls', undefined);
16
- this.formfield['showErrorsInitial'] = () => this.showError;
17
- this.formfield['showHintsInitial'] = () => !this.showError;
18
- const disabledElement = this.formfield['disabledElement'].bind(this);
19
- this.formfield['disabledElement'] = () => {
20
- if (this.formfield.controlElementRefs.length === 0) {
21
- return false;
22
- }
23
- return disabledElement();
24
- };
25
- }
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: `
1
+ import * as i0 from "@angular/core";
2
+ import { Component, Directive, NgModule, ViewChild, ViewChildren } from "@angular/core";
3
+ import * as i1 from "@progress/kendo-angular-inputs";
4
+ import { FormFieldComponent, FormFieldModule } from "@progress/kendo-angular-inputs";
5
+ import * as i3 from "@ngx-formly/core";
6
+ import { FieldType as FieldType$1, FieldWrapper, FormlyModule, ɵdefineHiddenProp } from "@ngx-formly/core";
7
+ import * as i2 from "@progress/kendo-angular-label";
8
+ import { LabelModule } from "@progress/kendo-angular-label";
9
+ import { CommonModule } from "@angular/common";
10
+ import { NgControl, ReactiveFormsModule } from "@angular/forms";
11
+ var FormlyWrapperFormField = class FormlyWrapperFormField extends FieldWrapper {
12
+ ngOnInit() {
13
+ ɵdefineHiddenProp(this.field, "_formField", this.formfield);
14
+ ɵdefineHiddenProp(this.formfield, "formControls", void 0);
15
+ this.formfield["showErrorsInitial"] = () => this.showError;
16
+ this.formfield["showHintsInitial"] = () => !this.showError;
17
+ const disabledElement = this.formfield["disabledElement"].bind(this);
18
+ this.formfield["disabledElement"] = () => {
19
+ if (this.formfield.controlElementRefs.length === 0) return false;
20
+ return disabledElement();
21
+ };
22
+ }
23
+ static {
24
+ this.ɵfac = i0.ɵɵngDeclareFactory({
25
+ minVersion: "12.0.0",
26
+ version: "22.2.2",
27
+ ngImport: i0,
28
+ type: FormlyWrapperFormField,
29
+ deps: null,
30
+ target: i0.ɵɵFactoryTarget.Component
31
+ });
32
+ }
33
+ static {
34
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
35
+ minVersion: "17.0.0",
36
+ version: "22.2.2",
37
+ type: FormlyWrapperFormField,
38
+ isStandalone: false,
39
+ selector: "formly-wrapper-kendo-form-field",
40
+ viewQueries: [{
41
+ propertyName: "formfield",
42
+ first: true,
43
+ predicate: FormFieldComponent,
44
+ descendants: true,
45
+ static: true
46
+ }],
47
+ usesInheritance: true,
48
+ ngImport: i0,
49
+ template: `
28
50
  <kendo-formfield [orientation]="props.orientation">
29
51
  @if (props.label && props.hideLabel !== true) {
30
52
  <label [for]="id">
31
- {{ props.label }}
53
+ @if (props.allowHtml) {
54
+ <span [innerHTML]="props.label"></span>
55
+ } @else {
56
+ {{ props.label }}
57
+ }
32
58
  @if (props.required && props.hideRequiredMarker !== true) {
33
59
  <span aria-hidden="true" class="k-required">*</span>
34
60
  }
@@ -38,7 +64,13 @@ class FormlyWrapperFormField extends FieldWrapper {
38
64
  <ng-container #fieldComponent></ng-container>
39
65
 
40
66
  @if (props.description) {
41
- <kendo-formhint>{{ props.description }}</kendo-formhint>
67
+ <kendo-formhint>
68
+ @if (props.allowHtml) {
69
+ <span [innerHTML]="props.description"></span>
70
+ } @else {
71
+ <ng-container>{{ props.description }}</ng-container>
72
+ }
73
+ </kendo-formhint>
42
74
  }
43
75
  @if (showError) {
44
76
  <kendo-formerror>
@@ -46,17 +78,65 @@ class FormlyWrapperFormField extends FieldWrapper {
46
78
  </kendo-formerror>
47
79
  }
48
80
  </kendo-formfield>
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
- }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
52
- type: Component,
53
- args: [{
54
- selector: 'formly-wrapper-kendo-form-field',
55
- template: `
81
+ `,
82
+ isInline: true,
83
+ dependencies: [
84
+ {
85
+ kind: "component",
86
+ type: i1.FormFieldComponent,
87
+ selector: "kendo-formfield",
88
+ inputs: [
89
+ "showHints",
90
+ "orientation",
91
+ "showErrors",
92
+ "colSpan"
93
+ ]
94
+ },
95
+ {
96
+ kind: "component",
97
+ type: i1.HintComponent,
98
+ selector: "kendo-formhint",
99
+ inputs: ["align"]
100
+ },
101
+ {
102
+ kind: "component",
103
+ type: i1.ErrorComponent,
104
+ selector: "kendo-formerror",
105
+ inputs: ["align"]
106
+ },
107
+ {
108
+ kind: "directive",
109
+ type: i2.LabelDirective,
110
+ selector: "label[for]",
111
+ inputs: ["for", "labelClass"]
112
+ },
113
+ {
114
+ kind: "component",
115
+ type: i3.LegacyFormlyValidationMessage,
116
+ selector: "formly-validation-message"
117
+ }
118
+ ]
119
+ });
120
+ }
121
+ };
122
+ i0.ɵɵngDeclareClassMetadata({
123
+ minVersion: "12.0.0",
124
+ version: "22.2.2",
125
+ ngImport: i0,
126
+ type: FormlyWrapperFormField,
127
+ decorators: [{
128
+ type: Component,
129
+ args: [{
130
+ selector: "formly-wrapper-kendo-form-field",
131
+ template: `
56
132
  <kendo-formfield [orientation]="props.orientation">
57
133
  @if (props.label && props.hideLabel !== true) {
58
134
  <label [for]="id">
59
- {{ props.label }}
135
+ @if (props.allowHtml) {
136
+ <span [innerHTML]="props.label"></span>
137
+ } @else {
138
+ {{ props.label }}
139
+ }
60
140
  @if (props.required && props.hideRequiredMarker !== true) {
61
141
  <span aria-hidden="true" class="k-required">*</span>
62
142
  }
@@ -66,7 +146,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
66
146
  <ng-container #fieldComponent></ng-container>
67
147
 
68
148
  @if (props.description) {
69
- <kendo-formhint>{{ props.description }}</kendo-formhint>
149
+ <kendo-formhint>
150
+ @if (props.allowHtml) {
151
+ <span [innerHTML]="props.description"></span>
152
+ } @else {
153
+ <ng-container>{{ props.description }}</ng-container>
154
+ }
155
+ </kendo-formhint>
70
156
  }
71
157
  @if (showError) {
72
158
  <kendo-formerror>
@@ -75,72 +161,126 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
75
161
  }
76
162
  </kendo-formfield>
77
163
  `,
78
- standalone: false,
79
- }]
80
- }], propDecorators: { formfield: [{
81
- type: ViewChild,
82
- args: [FormFieldComponent, { static: true }]
83
- }] } });
84
-
164
+ standalone: false
165
+ }]
166
+ }],
167
+ propDecorators: { formfield: [{
168
+ type: ViewChild,
169
+ args: [FormFieldComponent, { static: true }]
170
+ }] }
171
+ });
85
172
  function withFormlyFormField() {
86
- return {
87
- wrappers: [
88
- {
89
- name: 'form-field',
90
- component: FormlyWrapperFormField,
91
- },
92
- ],
93
- };
173
+ return { wrappers: [{
174
+ name: "form-field",
175
+ component: FormlyWrapperFormField
176
+ }] };
94
177
  }
95
-
96
- class FormlyFormFieldModule {
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
- ReactiveFormsModule,
100
- FormFieldModule,
101
- LabelModule, i3.FormlyModule] }); }
102
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFormFieldModule, imports: [CommonModule,
103
- ReactiveFormsModule,
104
- FormFieldModule,
105
- LabelModule,
106
- FormlyModule.forChild(withFormlyFormField())] }); }
107
- }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFormFieldModule, decorators: [{
109
- type: NgModule,
110
- args: [{
111
- declarations: [FormlyWrapperFormField],
112
- imports: [
113
- CommonModule,
114
- ReactiveFormsModule,
115
- FormFieldModule,
116
- LabelModule,
117
- FormlyModule.forChild(withFormlyFormField()),
118
- ],
119
- }]
120
- }] });
121
-
122
- class FieldType extends FieldType$1 {
123
- set formControls(formControls) {
124
- if (this.formField) {
125
- this.formField['control'] = formControls.first;
126
- }
127
- }
128
- get formField() {
129
- return this.field?.['_formField'];
130
- }
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
- }
134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FieldType, decorators: [{
135
- type: Directive
136
- }], propDecorators: { formControls: [{
137
- type: ViewChildren,
138
- args: [NgControl]
139
- }] } });
140
-
141
- /**
142
- * Generated bundle index. Do not edit.
143
- */
144
-
178
+ var FormlyFormFieldModule = class FormlyFormFieldModule {
179
+ static {
180
+ this.ɵfac = i0.ɵɵngDeclareFactory({
181
+ minVersion: "12.0.0",
182
+ version: "22.2.2",
183
+ ngImport: i0,
184
+ type: FormlyFormFieldModule,
185
+ deps: [],
186
+ target: i0.ɵɵFactoryTarget.NgModule
187
+ });
188
+ }
189
+ static {
190
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
191
+ minVersion: "14.0.0",
192
+ version: "22.2.2",
193
+ ngImport: i0,
194
+ type: FormlyFormFieldModule,
195
+ declarations: [FormlyWrapperFormField],
196
+ imports: [
197
+ CommonModule,
198
+ ReactiveFormsModule,
199
+ FormFieldModule,
200
+ LabelModule,
201
+ i3.FormlyModule
202
+ ]
203
+ });
204
+ }
205
+ static {
206
+ this.ɵinj = i0.ɵɵngDeclareInjector({
207
+ minVersion: "12.0.0",
208
+ version: "22.2.2",
209
+ ngImport: i0,
210
+ type: FormlyFormFieldModule,
211
+ imports: [
212
+ CommonModule,
213
+ ReactiveFormsModule,
214
+ FormFieldModule,
215
+ LabelModule,
216
+ FormlyModule.forChild(withFormlyFormField())
217
+ ]
218
+ });
219
+ }
220
+ };
221
+ i0.ɵɵngDeclareClassMetadata({
222
+ minVersion: "12.0.0",
223
+ version: "22.2.2",
224
+ ngImport: i0,
225
+ type: FormlyFormFieldModule,
226
+ decorators: [{
227
+ type: NgModule,
228
+ args: [{
229
+ declarations: [FormlyWrapperFormField],
230
+ imports: [
231
+ CommonModule,
232
+ ReactiveFormsModule,
233
+ FormFieldModule,
234
+ LabelModule,
235
+ FormlyModule.forChild(withFormlyFormField())
236
+ ]
237
+ }]
238
+ }]
239
+ });
240
+ var FieldType = class FieldType extends FieldType$1 {
241
+ set formControls(formControls) {
242
+ if (this.formField) this.formField["control"] = formControls.first;
243
+ }
244
+ get formField() {
245
+ return this.field?.["_formField"];
246
+ }
247
+ static {
248
+ this.ɵfac = i0.ɵɵngDeclareFactory({
249
+ minVersion: "12.0.0",
250
+ version: "22.2.2",
251
+ ngImport: i0,
252
+ type: FieldType,
253
+ deps: null,
254
+ target: i0.ɵɵFactoryTarget.Directive
255
+ });
256
+ }
257
+ static {
258
+ this.ɵdir = i0.ɵɵngDeclareDirective({
259
+ minVersion: "14.0.0",
260
+ version: "22.2.2",
261
+ type: FieldType,
262
+ isStandalone: true,
263
+ viewQueries: [{
264
+ propertyName: "formControls",
265
+ predicate: NgControl,
266
+ descendants: true
267
+ }],
268
+ usesInheritance: true,
269
+ ngImport: i0
270
+ });
271
+ }
272
+ };
273
+ i0.ɵɵngDeclareClassMetadata({
274
+ minVersion: "12.0.0",
275
+ version: "22.2.2",
276
+ ngImport: i0,
277
+ type: FieldType,
278
+ decorators: [{ type: Directive }],
279
+ propDecorators: { formControls: [{
280
+ type: ViewChildren,
281
+ args: [NgControl]
282
+ }] }
283
+ });
145
284
  export { FieldType, FormlyFormFieldModule, withFormlyFormField };
146
- //# sourceMappingURL=ngx-formly-kendo-form-field.mjs.map
285
+
286
+ //# sourceMappingURL=ngx-formly-kendo-form-field.mjs.map
@@ -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;QAC1DA,iBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,CAAC;AAC3D,QAAA,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,GAAG,MAAM,IA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EE,YAAY;uBAAC,SAAS;;;ACPzB;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-kendo-form-field.mjs","names":[],"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"],"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 @if (props.allowHtml) {\n <span [innerHTML]=\"props.label\"></span>\n } @else {\n {{ props.label }}\n }\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\" class=\"k-required\">*</span>\n }\n </label>\n }\n\n <ng-container #fieldComponent></ng-container>\n\n @if (props.description) {\n <kendo-formhint>\n @if (props.allowHtml) {\n <span [innerHTML]=\"props.description\"></span>\n } @else {\n <ng-container>{{ props.description }}</ng-container>\n }\n </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"],"mappings":";;;;;;;;;;AAoDA,IAAa,yBAAb,MAAa,+BAA+B,aAAiD;CAG3F,WAAQ;EACN,kBAAiB,KAAK,OAAO,cAAc,KAAK,SAAS;EACzD,kBAAiB,KAAK,WAAW,gBAAgB,MAAS;E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