{"version":3,"file":"ngx-formly-bootstrap-form-field.mjs","sources":["../../../../src/ui/bootstrap/form-field/src/form-field.wrapper.ts","../../../../src/ui/bootstrap/form-field/src/form-field.module.ts","../../../../src/ui/bootstrap/form-field/src/field.type.ts","../../../../src/ui/bootstrap/form-field/src/ngx-formly-bootstrap-form-field.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { FieldWrapper, FormlyFieldConfig, FormlyFieldProps as CoreFormlyFieldProps } from '@ngx-formly/core';\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n  hideLabel?: boolean;\n  hideRequiredMarker?: boolean;\n  labelPosition?: 'floating';\n}\n\n@Component({\n  selector: 'formly-wrapper-form-field',\n  template: `\n    <ng-template #labelTemplate>\n      <label *ngIf=\"props.label && props.hideLabel !== true\" [attr.for]=\"id\" class=\"form-label\">\n        {{ props.label }}\n        <span *ngIf=\"props.required && props.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n      </label>\n    </ng-template>\n\n    <div class=\"mb-3\" [class.form-floating]=\"props.labelPosition === 'floating'\" [class.has-error]=\"showError\">\n      <ng-container *ngIf=\"props.labelPosition !== 'floating'\">\n        <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n      </ng-container>\n\n      <ng-template #fieldComponent></ng-template>\n\n      <ng-container *ngIf=\"props.labelPosition === 'floating'\">\n        <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n      </ng-container>\n\n      <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n        <formly-validation-message\n          id=\"{{ id }}-formly-validation-error\"\n          [field]=\"field\"\n          role=\"alert\"\n        ></formly-validation-message>\n      </div>\n\n      <small *ngIf=\"props.description\" class=\"form-text text-muted\">{{ props.description }}</small>\n    </div>\n  `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper<FormlyFieldConfig<FormlyFieldProps>> {}\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';\n\n@NgModule({\n  declarations: [FormlyWrapperFormField],\n  imports: [\n    CommonModule,\n    ReactiveFormsModule,\n\n    FormlyModule.forChild({\n      wrappers: [\n        {\n          name: 'form-field',\n          component: FormlyWrapperFormField,\n        },\n      ],\n    }),\n  ],\n})\nexport class FormlyBootstrapFormFieldModule {}\n","import { Directive, Optional, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';\nimport { FieldType as CoreFieldType, FormlyFieldConfig } from '@ngx-formly/core';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig> extends CoreFieldType<F> {\n  @ViewChild('fieldTypeTemplate', { static: true }) set content(templateRef: TemplateRef<any>) {\n    if (templateRef && this.hostContainerRef) {\n      this.hostContainerRef.createEmbeddedView(templateRef);\n    }\n  }\n\n  constructor(@Optional() private hostContainerRef?: ViewContainerRef) {\n    super();\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["CoreFieldType"],"mappings":";;;;;;;;AA0CM,MAAO,sBAAuB,SAAQ,YAAiD,CAAA;;oHAAhF,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,EA/BvB,QAAA,EAAA,2BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,wBAAA,EAAA,QA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