{"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;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