@cfstratos/ajsf-material
Version:
Angular JSON Schema Form builder using Angular Material UI
16 lines (14 loc) • 64.5 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@cfstratos/ajsf-core"),require("@angular/material/core"),require("@angular/material/form-field"),require("lodash/cloneDeep"),require("@angular/common"),require("@angular/forms"),require("@angular/flex-layout"),require("@angular/material/autocomplete"),require("@angular/material/button"),require("@angular/material/button-toggle"),require("@angular/material/card"),require("@angular/material/checkbox"),require("@angular/material/chips"),require("@angular/material/datepicker"),require("@angular/material/expansion"),require("@angular/material/icon"),require("@angular/material/input"),require("@angular/material/radio"),require("@angular/material/select"),require("@angular/material/slide-toggle"),require("@angular/material/slider"),require("@angular/material/stepper"),require("@angular/material/tabs"),require("@angular/material/tooltip"),require("@angular/material/menu"),require("@angular/material/toolbar"),require("@angular/flex-layout/core")):"function"==typeof define&&define.amd?define("@ajsf/material",["exports","@angular/core","@cfstratos/ajsf-core","@angular/material/core","@angular/material/form-field","lodash/cloneDeep","@angular/common","@angular/forms","@angular/flex-layout","@angular/material/autocomplete","@angular/material/button","@angular/material/button-toggle","@angular/material/card","@angular/material/checkbox","@angular/material/chips","@angular/material/datepicker","@angular/material/expansion","@angular/material/icon","@angular/material/input","@angular/material/radio","@angular/material/select","@angular/material/slide-toggle","@angular/material/slider","@angular/material/stepper","@angular/material/tabs","@angular/material/tooltip","@angular/material/menu","@angular/material/toolbar","@angular/flex-layout/core"],e):e(((t=t||self).ajsf=t.ajsf||{},t.ajsf.material={}),t.ng.core,t["@cfstratos/ajsf-core"],t.ng.material.core,t.ng.material["form-field"],t["lodash-es"],t.ng.common,t.ng.forms,t.ng["flex-layout"],t.ng.material.autocomplete,t.ng.material.button,t.ng.material["button-toggle"],t.ng.material.card,t.ng.material.checkbox,t.ng.material.chips,t.ng.material.datepicker,t.ng.material.expansion,t.ng.material.icon,t.ng.material.input,t.ng.material.radio,t.ng.material.select,t.ng.material["slide-toggle"],t.ng.material.slider,t.ng.material.stepper,t.ng.material.tabs,t.ng.material.tooltip,t.ng.material.menu,t.ng.material.toolbar,t.ng["flex-layout"].core)}(this,(function(t,e,o,n,i,a,r,l,s,p,d,u,c,m,f,h,y,g,x,b,I,v,L,w,M,N,F,C,O){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var A=function(t,e){return(A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};var T=function(){return(T=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function j(t,e,o,n){var i,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(r=(a<3?i(r):a>3?i(e,o,r):i(e,o))||r);return a>3&&r&&Object.defineProperty(e,o,r),r}function _(t,e){return function(o,n){e(o,n,t)}}function k(t){var e="function"==typeof Symbol&&t[Symbol.iterator],o=0;return e?e.call(t):{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}}}function S(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,i,a=o.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)r.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return r}function D(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(S(arguments[e]));return t}var E=function(){function t(t){this.jsf=t,this.isFlexItem=!1}return t.prototype.removeItem=function(t){this.jsf.removeItem(t)},t.prototype.getFlexAttribute=function(t,e){var o=["flex-grow","flex-shrink","flex-basis"].indexOf(e);return((t.options||{}).flex||"").split(/\s+/)[o]||(t.options||{})[e]||["1","1","auto"][o]},t.prototype.showWidget=function(t){return this.jsf.evaluateCondition(t,this.dataIndex)},t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"dataIndex",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"layout",void 0),j([e.Input()],t.prototype,"isFlexItem",void 0),t=j([e.Component({selector:"flex-layout-root-widget",template:'\n <div *ngFor="let layoutNode of layout; let i = index"\n [class.form-flex-item]="isFlexItem"\n [style.flex-grow]="getFlexAttribute(layoutNode, \'flex-grow\')"\n [style.flex-shrink]="getFlexAttribute(layoutNode, \'flex-shrink\')"\n [style.flex-basis]="getFlexAttribute(layoutNode, \'flex-basis\')"\n [style.align-self]="(layoutNode?.options || {})[\'align-self\']"\n [style.order]="layoutNode?.options?.order"\n [fxFlex]="layoutNode?.options?.fxFlex"\n [fxFlexOrder]="layoutNode?.options?.fxFlexOrder"\n [fxFlexOffset]="layoutNode?.options?.fxFlexOffset"\n [fxFlexAlign]="layoutNode?.options?.fxFlexAlign">\n <select-framework-widget *ngIf="showWidget(layoutNode)"\n [dataIndex]="layoutNode?.arrayItem ? (dataIndex || []).concat(i) : (dataIndex || [])"\n [layoutIndex]="(layoutIndex || []).concat(i)"\n [layoutNode]="layoutNode"></select-framework-widget>\n <div>',changeDetection:e.ChangeDetectionStrategy.Default})],t)}(),V=function(){function t(t){this.jsf=t,this.controlDisabled=!1,this.boundControl=!1,this.expanded=!0,this.containerType="div"}return Object.defineProperty(t.prototype,"sectionTitle",{get:function(){return this.options.notitle?null:this.jsf.setItemTitle(this)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){switch(this.jsf.initializeControl(this),this.options=this.layoutNode.options||{},this.expanded="boolean"==typeof this.options.expanded?this.options.expanded:!this.options.expandable,this.layoutNode.type){case"section":case"array":case"fieldset":case"advancedfieldset":case"authfieldset":case"optionfieldset":case"selectfieldset":this.containerType="fieldset";break;case"card":this.containerType="card";break;case"expansion-panel":this.containerType="expansion-panel";break;default:this.containerType="div"}},t.prototype.toggleExpanded=function(){this.options.expandable&&(this.expanded=!this.expanded)},t.prototype.getFlexAttribute=function(t){var e="flex"===this.layoutNode.type||!!this.options.displayFlex||"flex"===this.options.display;switch(t){case"is-flex":return e;case"display":return e?"flex":"initial";case"flex-direction":case"flex-wrap":var o=["flex-direction","flex-wrap"].indexOf(t);return(this.options["flex-flow"]||"").split(/\s+/)[o]||this.options[t]||["column","nowrap"][o];case"justify-content":case"align-items":case"align-content":return this.options[t];case"layout":return(this.options.fxLayout||"row")+this.options.fxLayoutWrap?" "+this.options.fxLayoutWrap:""}},t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"flex-layout-section-widget",template:'\n <div *ngIf="containerType === \'div\'"\n [class]="options?.htmlClass || \'\'"\n [class.expandable]="options?.expandable && !expanded"\n [class.expanded]="options?.expandable && expanded">\n <label *ngIf="sectionTitle"\n [class]="\'legend \' + (options?.labelHtmlClass || \'\')"\n [innerHTML]="sectionTitle"\n (click)="toggleExpanded()"></label>\n <flex-layout-root-widget *ngIf="expanded"\n [layout]="layoutNode.items"\n [dataIndex]="dataIndex"\n [layoutIndex]="layoutIndex"\n [isFlexItem]="getFlexAttribute(\'is-flex\')"\n [class.form-flex-column]="getFlexAttribute(\'flex-direction\') === \'column\'"\n [class.form-flex-row]="getFlexAttribute(\'flex-direction\') === \'row\'"\n [style.display]="getFlexAttribute(\'display\')"\n [style.flex-direction]="getFlexAttribute(\'flex-direction\')"\n [style.flex-wrap]="getFlexAttribute(\'flex-wrap\')"\n [style.justify-content]="getFlexAttribute(\'justify-content\')"\n [style.align-items]="getFlexAttribute(\'align-items\')"\n [style.align-content]="getFlexAttribute(\'align-content\')"\n [fxLayout]="getFlexAttribute(\'layout\')"\n [fxLayoutGap]="options?.fxLayoutGap"\n [fxLayoutAlign]="options?.fxLayoutAlign"\n [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>\n </div>\n\n <fieldset *ngIf="containerType === \'fieldset\'"\n [class]="options?.htmlClass || \'\'"\n [class.expandable]="options?.expandable && !expanded"\n [class.expanded]="options?.expandable && expanded"\n [disabled]="options?.readonly">\n <legend *ngIf="sectionTitle"\n [class]="\'legend \' + (options?.labelHtmlClass || \'\')"\n [innerHTML]="sectionTitle"\n (click)="toggleExpanded()"></legend>\n <flex-layout-root-widget *ngIf="expanded"\n [layout]="layoutNode.items"\n [dataIndex]="dataIndex"\n [layoutIndex]="layoutIndex"\n [isFlexItem]="getFlexAttribute(\'is-flex\')"\n [class.form-flex-column]="getFlexAttribute(\'flex-direction\') === \'column\'"\n [class.form-flex-row]="getFlexAttribute(\'flex-direction\') === \'row\'"\n [style.display]="getFlexAttribute(\'display\')"\n [style.flex-direction]="getFlexAttribute(\'flex-direction\')"\n [style.flex-wrap]="getFlexAttribute(\'flex-wrap\')"\n [style.justify-content]="getFlexAttribute(\'justify-content\')"\n [style.align-items]="getFlexAttribute(\'align-items\')"\n [style.align-content]="getFlexAttribute(\'align-content\')"\n [fxLayout]="getFlexAttribute(\'layout\')"\n [fxLayoutGap]="options?.fxLayoutGap"\n [fxLayoutAlign]="options?.fxLayoutAlign"\n [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>\n </fieldset>\n\n <mat-card *ngIf="containerType === \'card\'"\n [ngClass]="options?.htmlClass || \'\'"\n [class.expandable]="options?.expandable && !expanded"\n [class.expanded]="options?.expandable && expanded">\n <mat-card-header *ngIf="sectionTitle">\n <legend\n [class]="\'legend \' + (options?.labelHtmlClass || \'\')"\n [innerHTML]="sectionTitle"\n (click)="toggleExpanded()"></legend>\n </mat-card-header>\n <mat-card-content *ngIf="expanded">\n <fieldset [disabled]="options?.readonly">\n <flex-layout-root-widget *ngIf="expanded"\n [layout]="layoutNode.items"\n [dataIndex]="dataIndex"\n [layoutIndex]="layoutIndex"\n [isFlexItem]="getFlexAttribute(\'is-flex\')"\n [class.form-flex-column]="getFlexAttribute(\'flex-direction\') === \'column\'"\n [class.form-flex-row]="getFlexAttribute(\'flex-direction\') === \'row\'"\n [style.display]="getFlexAttribute(\'display\')"\n [style.flex-direction]="getFlexAttribute(\'flex-direction\')"\n [style.flex-wrap]="getFlexAttribute(\'flex-wrap\')"\n [style.justify-content]="getFlexAttribute(\'justify-content\')"\n [style.align-items]="getFlexAttribute(\'align-items\')"\n [style.align-content]="getFlexAttribute(\'align-content\')"\n [fxLayout]="getFlexAttribute(\'layout\')"\n [fxLayoutGap]="options?.fxLayoutGap"\n [fxLayoutAlign]="options?.fxLayoutAlign"\n [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>\n </fieldset>\n </mat-card-content>\n <mat-card-footer>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>\n </mat-card-footer>\n </mat-card>\n\n <mat-expansion-panel *ngIf="containerType === \'expansion-panel\'"\n [expanded]="expanded"\n [hideToggle]="!options?.expandable">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <legend *ngIf="sectionTitle"\n [class]="options?.labelHtmlClass"\n [innerHTML]="sectionTitle"\n (click)="toggleExpanded()"></legend>\n </mat-panel-title>\n </mat-expansion-panel-header>\n <fieldset [disabled]="options?.readonly">\n <flex-layout-root-widget *ngIf="expanded"\n [layout]="layoutNode.items"\n [dataIndex]="dataIndex"\n [layoutIndex]="layoutIndex"\n [isFlexItem]="getFlexAttribute(\'is-flex\')"\n [class.form-flex-column]="getFlexAttribute(\'flex-direction\') === \'column\'"\n [class.form-flex-row]="getFlexAttribute(\'flex-direction\') === \'row\'"\n [style.display]="getFlexAttribute(\'display\')"\n [style.flex-direction]="getFlexAttribute(\'flex-direction\')"\n [style.flex-wrap]="getFlexAttribute(\'flex-wrap\')"\n [style.justify-content]="getFlexAttribute(\'justify-content\')"\n [style.align-items]="getFlexAttribute(\'align-items\')"\n [style.align-content]="getFlexAttribute(\'align-content\')"\n [fxLayout]="getFlexAttribute(\'layout\')"\n [fxLayoutGap]="options?.fxLayoutGap"\n [fxLayoutAlign]="options?.fxLayoutAlign"\n [attr.fxFlexFill]="options?.fxLayoutAlign"></flex-layout-root-widget>\n </fieldset>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>\n </mat-expansion-panel>',styles:["\n fieldset { border: 0; margin: 0; padding: 0; }\n .legend { font-weight: bold; }\n .expandable > .legend:before { content: '▶'; padding-right: .3em; }\n .expanded > .legend:before { content: '▼'; padding-right: .2em; }\n "]})],t)}(),P=function(){function t(t){this.jsf=t}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{}},Object.defineProperty(t.prototype,"showAddButton",{get:function(){return!this.layoutNode.arrayItem||this.layoutIndex[this.layoutIndex.length-1]<this.options.maxItems},enumerable:!0,configurable:!0}),t.prototype.addItem=function(t){t.preventDefault(),this.jsf.addItem(this)},Object.defineProperty(t.prototype,"buttonText",{get:function(){var t={dataIndex:this.dataIndex.slice(0,-1),layoutIndex:this.layoutIndex.slice(0,-1),layoutNode:this.jsf.getParentNode(this)};return t.layoutNode.add||this.jsf.setArrayItemTitle(t,this.layoutNode,this.itemCount)},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-add-reference-widget",template:'\n <section [class]="options?.htmlClass || \'\'" align="end">\n <button mat-raised-button *ngIf="showAddButton"\n [color]="options?.color || \'accent\'"\n [disabled]="options?.readonly"\n (click)="addItem($event)">\n <span *ngIf="options?.icon" [class]="options?.icon"></span>\n <span *ngIf="options?.title" [innerHTML]="buttonText"></span>\n </button>\n </section>',changeDetection:e.ChangeDetectionStrategy.Default})],t)}(),q=function(){function t(t){this.jsf=t,this.controlDisabled=!1,this.boundControl=!1}return t.prototype.ngOnInit=function(){var t=this;this.options=this.layoutNode.options||{},this.jsf.initializeControl(this),o.hasOwn(this.options,"disabled")?this.controlDisabled=this.options.disabled:this.jsf.formOptions.disableInvalidSubmit&&(this.controlDisabled=!this.jsf.isValid,this.jsf.isValidChanges.subscribe((function(e){return t.controlDisabled=!e})))},t.prototype.updateValue=function(t){"function"==typeof this.options.onClick?this.options.onClick(t):this.jsf.updateValue(this,t.target.value)},t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-button-widget",template:'\n <div class="button-row" [class]="options?.htmlClass || \'\'">\n <button mat-raised-button\n [attr.readonly]="options?.readonly ? \'readonly\' : null"\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [color]="options?.color || \'primary\'"\n [disabled]="controlDisabled || options?.readonly"\n [id]="\'control\' + layoutNode?._id"\n [name]="controlName"\n [type]="layoutNode?.type"\n [value]="controlValue"\n (click)="updateValue($event)">\n <mat-icon *ngIf="options?.icon" class="mat-24">{{options?.icon}}</mat-icon>\n <span *ngIf="options?.title" [innerHTML]="options?.title"></span>\n </button>\n </div>',styles:[" button { margin-top: 10px; } "]})],t)}(),H=function(){function t(t){this.jsf=t,this.controlDisabled=!1,this.boundControl=!1,this.radiosList=[],this.vertical=!1}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},this.radiosList=o.buildTitleMap(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.jsf.initializeControl(this)},t.prototype.updateValue=function(t){this.options.showErrors=!0,this.jsf.updateValue(this,t)},t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-button-group-widget",template:'\n <div>\n <div *ngIf="options?.title">\n <label\n [attr.for]="\'control\' + layoutNode?._id"\n [class]="options?.labelHtmlClass || \'\'"\n [style.display]="options?.notitle ? \'none\' : \'\'"\n [innerHTML]="options?.title"></label>\n </div>\n <mat-button-toggle-group\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [attr.readonly]="options?.readonly ? \'readonly\' : null"\n [attr.required]="options?.required"\n [disabled]="controlDisabled || options?.readonly"\n [name]="controlName"\n [value]="controlValue"\n [vertical]="!!options.vertical">\n <mat-button-toggle *ngFor="let radioItem of radiosList"\n [id]="\'control\' + layoutNode?._id + \'/\' + radioItem?.name"\n [value]="radioItem?.value"\n (click)="updateValue(radioItem?.value)">\n <span [innerHTML]="radioItem?.name"></span>\n </mat-button-toggle>\n </mat-button-toggle-group>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>\n </div>',styles:[" mat-error { font-size: 75%; } "]})],t)}(),R=function(){function t(t){this.jsf=t,this.controlDisabled=!1,this.boundControl=!1,this.trueValue=!0,this.falseValue=!1,this.showSlideToggle=!1}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this,!this.options.readonly),null!==this.controlValue&&void 0!==this.controlValue||(this.controlValue=!1,this.jsf.updateValue(this,this.falseValue)),"slide-toggle"!==this.layoutNode.type&&"slide-toggle"!==this.layoutNode.format||(this.showSlideToggle=!0)},t.prototype.updateValue=function(t){this.options.showErrors=!0,this.jsf.updateValue(this,t.checked?this.trueValue:this.falseValue)},Object.defineProperty(t.prototype,"isChecked",{get:function(){return this.jsf.getFormControlValue(this)===this.trueValue},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-checkbox-widget",template:'\n <mat-checkbox *ngIf="boundControl && !showSlideToggle"\n [formControl]="formControl"\n align="left"\n [color]="options?.color || \'primary\'"\n [id]="\'control\' + layoutNode?._id"\n labelPosition="after"\n [name]="controlName"\n (blur)="options.showErrors = true">\n <span *ngIf="options?.title"\n class="checkbox-name"\n [style.display]="options?.notitle ? \'none\' : \'\'"\n [innerHTML]="options?.title"></span>\n </mat-checkbox>\n <mat-checkbox *ngIf="!boundControl && !showSlideToggle"\n align="left"\n [color]="options?.color || \'primary\'"\n [disabled]="controlDisabled || options?.readonly"\n [id]="\'control\' + layoutNode?._id"\n labelPosition="after"\n [name]="controlName"\n [checked]="isChecked"\n (blur)="options.showErrors = true"\n (change)="updateValue($event)">\n <span *ngIf="options?.title"\n class="checkbox-name"\n [style.display]="options?.notitle ? \'none\' : \'\'"\n [innerHTML]="options?.title"></span>\n </mat-checkbox>\n <mat-slide-toggle *ngIf="boundControl && showSlideToggle"\n [formControl]="formControl"\n align="left"\n [color]="options?.color || \'primary\'"\n [id]="\'control\' + layoutNode?._id"\n labelPosition="after"\n [name]="controlName"\n (blur)="options.showErrors = true">\n <span *ngIf="options?.title"\n class="checkbox-name"\n [style.display]="options?.notitle ? \'none\' : \'\'"\n [innerHTML]="options?.title"></span>\n </mat-slide-toggle>\n <mat-slide-toggle *ngIf="!boundControl && showSlideToggle"\n align="left"\n [color]="options?.color || \'primary\'"\n [disabled]="controlDisabled || options?.readonly"\n [id]="\'control\' + layoutNode?._id"\n labelPosition="after"\n [name]="controlName"\n [checked]="isChecked"\n (blur)="options.showErrors = true"\n (change)="updateValue($event)">\n <span *ngIf="options?.title"\n class="checkbox-name"\n [style.display]="options?.notitle ? \'none\' : \'\'"\n [innerHTML]="options?.title"></span>\n </mat-slide-toggle>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>',styles:["\n .checkbox-name { white-space: nowrap; }\n mat-error { font-size: 75%; }\n "]})],t)}(),z=function(){function t(t){this.jsf=t,this.controlDisabled=!1,this.boundControl=!1,this.horizontalList=!1,this.checkboxList=[]}return t.prototype.ngOnInit=function(){var t,e;if(this.options=this.layoutNode.options||{},this.horizontalList="checkboxes-inline"===this.layoutNode.type||"checkboxbuttons"===this.layoutNode.type,this.jsf.initializeControl(this),this.checkboxList=o.buildTitleMap(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.boundControl){var n=this.jsf.getFormControl(this);try{for(var i=k(this.checkboxList),a=i.next();!a.done;a=i.next()){var r=a.value;r.checked=n.value.includes(r.value)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}}},Object.defineProperty(t.prototype,"allChecked",{get:function(){return this.checkboxList.filter((function(t){return t.checked})).length===this.checkboxList.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"someChecked",{get:function(){var t=this.checkboxList.filter((function(t){return t.checked})).length;return t>0&&t<this.checkboxList.length},enumerable:!0,configurable:!0}),t.prototype.updateValue=function(){this.options.showErrors=!0,this.boundControl&&this.jsf.updateArrayCheckboxList(this,this.checkboxList)},t.prototype.updateAllValues=function(t){this.options.showErrors=!0,this.checkboxList.forEach((function(e){return e.checked=t.checked})),this.updateValue()},t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-checkboxes-widget",template:'\n <div>\n <mat-checkbox type="checkbox"\n [checked]="allChecked"\n [color]="options?.color || \'primary\'"\n [disabled]="controlDisabled || options?.readonly"\n [indeterminate]="someChecked"\n [name]="options?.name"\n (blur)="options.showErrors = true"\n (change)="updateAllValues($event)">\n <span class="checkbox-name" [innerHTML]="options?.name"></span>\n </mat-checkbox>\n <label *ngIf="options?.title"\n class="title"\n [class]="options?.labelHtmlClass || \'\'"\n [style.display]="options?.notitle ? \'none\' : \'\'"\n [innerHTML]="options?.title"></label>\n <ul class="checkbox-list" [class.horizontal-list]="horizontalList">\n <li *ngFor="let checkboxItem of checkboxList"\n [class]="options?.htmlClass || \'\'">\n <mat-checkbox type="checkbox"\n [(ngModel)]="checkboxItem.checked"\n [color]="options?.color || \'primary\'"\n [disabled]="controlDisabled || options?.readonly"\n [name]="checkboxItem?.name"\n (blur)="options.showErrors = true"\n (change)="updateValue()">\n <span class="checkbox-name" [innerHTML]="checkboxItem?.name"></span>\n </mat-checkbox>\n </li>\n </ul>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>\n </div>',styles:["\n .title { font-weight: bold; }\n .checkbox-list { list-style-type: none; }\n .horizontal-list > li { display: inline-block; margin-right: 10px; zoom: 1; }\n .checkbox-name { white-space: nowrap; }\n mat-error { font-size: 75%; }\n "]})],t)}(),G=function(){function t(t){this.jsf=t,this.controlDisabled=!1,this.boundControl=!1}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this)},t.prototype.updateValue=function(t){this.jsf.updateValue(this,t.target.value)},t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-chip-list-widget",template:""})],t)}(),B=function(){function t(t,e,o){this.matFormFieldDefaultOptions=t,this.matLabelGlobalOptions=e,this.jsf=o,this.controlDisabled=!1,this.boundControl=!1,this.autoCompleteList=[]}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this,!this.options.readonly),this.controlValue&&this.formControl.setValue(o.dateToString(this.controlValue,this.options)),this.options.notitle||this.options.description||!this.options.placeholder||(this.options.description=this.options.placeholder)},t.prototype.updateValue=function(t){this.options.showErrors=!0,t.value&&this.formControl.setValue(o.dateToString(t.value,this.options))},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[i.MAT_FORM_FIELD_DEFAULT_OPTIONS]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[n.MAT_LABEL_GLOBAL_OPTIONS]},{type:e.Optional}]},{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-datepicker-widget",template:'\n <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || \'standard\'"\n [class]="options?.htmlClass || \'\'"\n [floatLabel]="options?.floatLabel || matLabelGlobalOptions?.float || (options?.notitle ? \'never\' : \'auto\')"\n [hideRequiredMarker]="options?.hideRequired ? \'true\' : \'false\'"\n [style.width]="\'100%\'">\n <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>\n <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"\n [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>\n <input matInput *ngIf="boundControl"\n [formControl]="formControl"\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [attr.list]="\'control\' + layoutNode?._id + \'Autocomplete\'"\n [attr.readonly]="options?.readonly ? \'readonly\' : null"\n [id]="\'control\' + layoutNode?._id"\n [max]="options?.maximum"\n [matDatepicker]="picker"\n [min]="options?.minimum"\n [name]="controlName"\n [placeholder]="options?.title"\n [readonly]="options?.readonly"\n [required]="options?.required"\n [style.width]="\'100%\'"\n (blur)="options.showErrors = true"\n (dateChange)="updateValue($event)"\n (dateInput)="updateValue($event)">\n <input matInput *ngIf="!boundControl"\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [attr.list]="\'control\' + layoutNode?._id + \'Autocomplete\'"\n [attr.readonly]="options?.readonly ? \'readonly\' : null"\n [disabled]="controlDisabled || options?.readonly"\n [id]="\'control\' + layoutNode?._id"\n [max]="options?.maximum"\n [matDatepicker]="picker"\n [min]="options?.minimum"\n [name]="controlName"\n [placeholder]="options?.title"\n [required]="options?.required"\n [style.width]="\'100%\'"\n [readonly]="options?.readonly"\n (blur)="options.showErrors = true"\n (dateChange)="updateValue($event)"\n (dateInput)="updateValue($event)">\n <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"\n [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>\n <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"\n align="end" [innerHTML]="options?.description"></mat-hint>\n <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>\n </mat-form-field>\n <mat-datepicker #picker ></mat-datepicker>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>',styles:["\n mat-error { font-size: 75%; margin-top: -1rem; margin-bottom: 0.5rem; }\n ::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex\n .mat-form-field-infix { width: initial; }\n "]}),_(0,e.Inject(i.MAT_FORM_FIELD_DEFAULT_OPTIONS)),_(0,e.Optional()),_(1,e.Inject(n.MAT_LABEL_GLOBAL_OPTIONS)),_(1,e.Optional())],t)}(),J=function(){function t(t,e){this.changeDetector=t,this.jsf=e,this.frameworkInitialized=!1,this.formControl=null,this.parentArray=null,this.isOrderable=!1,this.dynamicTitle=null}return Object.defineProperty(t.prototype,"showRemoveButton",{get:function(){return!(!this.layoutNode||!this.widgetOptions.removable||this.widgetOptions.readonly||"$ref"===this.layoutNode.type)&&(!!this.layoutNode.recursiveReference||!(!this.layoutNode.arrayItem||!this.parentArray)&&(!(this.parentArray.items.length-1<=this.parentArray.options.minItems)&&("list"===this.layoutNode.arrayItemType||this.layoutIndex[this.layoutIndex.length-1]===this.parentArray.items.length-2)))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.initializeFramework()},t.prototype.ngOnChanges=function(){this.frameworkInitialized||this.initializeFramework(),this.dynamicTitle&&this.updateTitle()},t.prototype.initializeFramework=function(){this.layoutNode?(this.options=a(this.layoutNode.options||{}),this.widgetLayoutNode=T(T({},this.layoutNode),{options:a(this.layoutNode.options||{})}),this.widgetOptions=this.widgetLayoutNode.options,this.formControl=this.jsf.getFormControl(this),o.isDefined(this.widgetOptions.minimum)&&o.isDefined(this.widgetOptions.maximum)&&this.widgetOptions.multipleOf>=1&&(this.layoutNode.type="range"),!["$ref","advancedfieldset","authfieldset","button","card","checkbox","expansion-panel","help","message","msg","section","submit","tabarray","tabs"].includes(this.layoutNode.type)&&/{{.+?}}/.test(this.widgetOptions.title||"")&&(this.dynamicTitle=this.widgetOptions.title,this.updateTitle()),this.layoutNode.arrayItem&&"$ref"!==this.layoutNode.type&&(this.parentArray=this.jsf.getParentNode(this),this.parentArray&&(this.isOrderable="tab"!==this.parentArray.type.slice(0,3)&&"list"===this.layoutNode.arrayItemType&&!this.widgetOptions.readonly&&this.parentArray.options.orderable)),this.frameworkInitialized=!0):this.options={}},t.prototype.updateTitle=function(){this.widgetLayoutNode.options.title=this.jsf.parseText(this.dynamicTitle,this.jsf.getFormControlValue(this),this.jsf.getFormControlGroup(this).value,this.dataIndex[this.dataIndex.length-1])},t.prototype.removeItem=function(){this.jsf.removeItem(this)},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-design-framework",template:'<div\n [class.array-item]="widgetLayoutNode?.arrayItem && widgetLayoutNode?.type !== \'$ref\'"\n [orderable]="isOrderable"\n [dataIndex]="dataIndex"\n [layoutIndex]="layoutIndex"\n [layoutNode]="widgetLayoutNode">\n <svg *ngIf="showRemoveButton"\n xmlns="http://www.w3.org/2000/svg"\n height="18" width="18" viewBox="0 0 24 24"\n class="close-button"\n (click)="removeItem()">\n <path\n d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/>\n </svg>\n <select-widget-widget\n [dataIndex]="dataIndex"\n [layoutIndex]="layoutIndex"\n [layoutNode]="widgetLayoutNode"></select-widget-widget>\n</div>\n<div class="spacer" *ngIf="widgetLayoutNode?.arrayItem && widgetLayoutNode?.type !== \'$ref\'"></div>\n',styles:[".array-item{border-radius:2px;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);padding:6px;position:relative;transition:280ms cubic-bezier(.4,0,.2,1)}.close-button{cursor:pointer;position:absolute;top:6px;right:6px;fill:rgba(0,0,0,.4);visibility:hidden;z-index:500}.close-button:hover{fill:rgba(0,0,0,.8)}.array-item:hover>.close-button{visibility:visible}.spacer{margin:6px 0}[draggable=true]:hover{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);cursor:move;z-index:10}[draggable=true].drag-target-top{box-shadow:0 -2px 0 #000;position:relative;z-index:20}[draggable=true].drag-target-bottom{box-shadow:0 2px 0 #000;position:relative;z-index:20}"]})],t)}(),$=function(){function t(t){this.jsf=t,this.controlDisabled=!1,this.boundControl=!1}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this)},t.prototype.updateValue=function(t){this.jsf.updateValue(this,t.target.value)},t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-file-widget",template:""})],t)}(),U=function(){function t(t,e,o){this.matFormFieldDefaultOptions=t,this.matLabelGlobalOptions=e,this.jsf=o,this.controlDisabled=!1,this.boundControl=!1,this.autoCompleteList=[]}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this),this.options.notitle||this.options.description||!this.options.placeholder||(this.options.description=this.options.placeholder)},t.prototype.updateValue=function(t){this.jsf.updateValue(this,t.target.value)},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[i.MAT_FORM_FIELD_DEFAULT_OPTIONS]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[n.MAT_LABEL_GLOBAL_OPTIONS]},{type:e.Optional}]},{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-input-widget",template:'\n <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || \'standard\'"\n [class]="options?.htmlClass || \'\'"\n [floatLabel]="options?.floatLabel || matLabelGlobalOptions?.float || (options?.notitle ? \'never\' : \'auto\')"\n [hideRequiredMarker]="options?.hideRequired ? \'true\' : \'false\'"\n [style.width]="\'100%\'">\n <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>\n <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"\n [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>\n <input matInput *ngIf="boundControl"\n [formControl]="formControl"\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [attr.list]="\'control\' + layoutNode?._id + \'Autocomplete\'"\n [attr.maxlength]="options?.maxLength"\n [attr.minlength]="options?.minLength"\n [attr.pattern]="options?.pattern"\n [readonly]="options?.readonly ? \'readonly\' : null"\n [id]="\'control\' + layoutNode?._id"\n [name]="controlName"\n [placeholder]="options?.notitle ? options?.placeholder : options?.title"\n [required]="options?.required"\n [style.width]="\'100%\'"\n [type]="layoutNode?.type"\n (blur)="options.showErrors = true">\n <input matInput *ngIf="!boundControl"\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [attr.list]="\'control\' + layoutNode?._id + \'Autocomplete\'"\n [attr.maxlength]="options?.maxLength"\n [attr.minlength]="options?.minLength"\n [attr.pattern]="options?.pattern"\n [disabled]="controlDisabled"\n [id]="\'control\' + layoutNode?._id"\n [name]="controlName"\n [placeholder]="options?.notitle ? options?.placeholder : options?.title"\n [readonly]="options?.readonly ? \'readonly\' : null"\n [required]="options?.required"\n [style.width]="\'100%\'"\n [type]="layoutNode?.type"\n [value]="controlValue"\n (input)="updateValue($event)"\n (blur)="options.showErrors = true">\n <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"\n [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>\n <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"\n align="end" [innerHTML]="options?.description"></mat-hint>\n <mat-autocomplete *ngIf="options?.typeahead?.source">\n <mat-option *ngFor="let word of options?.typeahead?.source"\n [value]="word">{{word}}</mat-option>\n </mat-autocomplete>\n </mat-form-field>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>',styles:["\n mat-error { font-size: 75%; margin-top: -1rem; margin-bottom: 0.5rem; }\n ::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex\n .mat-form-field-infix { width: initial; }\n "]}),_(0,e.Inject(i.MAT_FORM_FIELD_DEFAULT_OPTIONS)),_(0,e.Optional()),_(1,e.Inject(n.MAT_LABEL_GLOBAL_OPTIONS)),_(1,e.Optional())],t)}(),W=function(){function t(t,e,o){this.matFormFieldDefaultOptions=t,this.matLabelGlobalOptions=e,this.jsf=o,this.controlDisabled=!1,this.boundControl=!1,this.allowNegative=!0,this.allowDecimal=!0,this.allowExponents=!1,this.lastValidNumber=""}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this),"integer"===this.layoutNode.dataType&&(this.allowDecimal=!1),this.options.notitle||this.options.description||!this.options.placeholder||(this.options.description=this.options.placeholder)},t.prototype.updateValue=function(t){this.jsf.updateValue(this,t.target.value)},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[i.MAT_FORM_FIELD_DEFAULT_OPTIONS]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[n.MAT_LABEL_GLOBAL_OPTIONS]},{type:e.Optional}]},{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-number-widget",template:'\n <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || \'standard\'"\n [class]="options?.htmlClass || \'\'"\n [floatLabel]="options?.floatLabel || matLabelGlobalOptions?.float || (options?.notitle ? \'never\' : \'auto\')"\n [hideRequiredMarker]="options?.hideRequired ? \'true\' : \'false\'"\n [style.width]="\'100%\'">\n <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>\n <span matPrefix *ngIf="options?.prefix || options?.fieldAddonLeft"\n [innerHTML]="options?.prefix || options?.fieldAddonLeft"></span>\n <input matInput *ngIf="boundControl"\n [formControl]="formControl"\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [attr.max]="options?.maximum"\n [attr.min]="options?.minimum"\n [attr.step]="options?.multipleOf || options?.step || \'any\'"\n [id]="\'control\' + layoutNode?._id"\n [name]="controlName"\n [placeholder]="options?.notitle ? options?.placeholder : options?.title"\n [readonly]="options?.readonly ? \'readonly\' : null"\n [required]="options?.required"\n [style.width]="\'100%\'"\n [type]="\'number\'"\n (blur)="options.showErrors = true">\n <input matInput *ngIf="!boundControl"\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [attr.max]="options?.maximum"\n [attr.min]="options?.minimum"\n [attr.step]="options?.multipleOf || options?.step || \'any\'"\n [disabled]="controlDisabled"\n [id]="\'control\' + layoutNode?._id"\n [name]="controlName"\n [placeholder]="options?.notitle ? options?.placeholder : options?.title"\n [readonly]="options?.readonly ? \'readonly\' : null"\n [required]="options?.required"\n [style.width]="\'100%\'"\n [type]="\'number\'"\n [value]="controlValue"\n (input)="updateValue($event)"\n (blur)="options.showErrors = true">\n <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"\n [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>\n <mat-hint *ngIf="layoutNode?.type === \'range\'" align="start"\n [innerHTML]="controlValue"></mat-hint>\n <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"\n align="end" [innerHTML]="options?.description"></mat-hint>\n </mat-form-field>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>',styles:["\n mat-error { font-size: 75%; margin-top: -1rem; margin-bottom: 0.5rem; }\n ::ng-deep json-schema-form mat-form-field .mat-form-field-wrapper .mat-form-field-flex\n .mat-form-field-infix { width: initial; }\n "]}),_(0,e.Inject(i.MAT_FORM_FIELD_DEFAULT_OPTIONS)),_(0,e.Optional()),_(1,e.Inject(n.MAT_LABEL_GLOBAL_OPTIONS)),_(1,e.Optional())],t)}(),K=function(){function t(t){this.jsf=t,this.controlDisabled=!1,this.boundControl=!1}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this)},t.prototype.updateValue=function(t){this.jsf.updateValue(this,t.target.value)},t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-one-of-widget",template:""})],t)}(),Q=function(){function t(t){this.jsf=t,this.controlDisabled=!1,this.boundControl=!1,this.flexDirection="column",this.radiosList=[]}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},"radios-inline"===this.layoutNode.type&&(this.flexDirection="row"),this.radiosList=o.buildTitleMap(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.jsf.initializeControl(this,!this.options.readonly)},t.prototype.updateValue=function(t){this.options.showErrors=!0,this.jsf.updateValue(this,t)},t.ctorParameters=function(){return[{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-radios-widget",template:'\n <div>\n <div *ngIf="options?.title">\n <label\n [attr.for]="\'control\' + layoutNode?._id"\n [class]="options?.labelHtmlClass || \'\'"\n [style.display]="options?.notitle ? \'none\' : \'\'"\n [innerHTML]="options?.title"></label>\n </div>\n <mat-radio-group *ngIf="boundControl"\n [formControl]="formControl"\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [attr.readonly]="options?.readonly ? \'readonly\' : null"\n [attr.required]="options?.required"\n [style.flex-direction]="flexDirection"\n [name]="controlName"\n (blur)="options.showErrors = true">\n <mat-radio-button *ngFor="let radioItem of radiosList"\n [id]="\'control\' + layoutNode?._id + \'/\' + radioItem?.name"\n [value]="radioItem?.value">\n <span [innerHTML]="radioItem?.name"></span>\n </mat-radio-button>\n </mat-radio-group>\n <mat-radio-group *ngIf="!boundControl"\n [attr.aria-describedby]="\'control\' + layoutNode?._id + \'Status\'"\n [attr.readonly]="options?.readonly ? \'readonly\' : null"\n [attr.required]="options?.required"\n [style.flex-direction]="flexDirection"\n [disabled]="controlDisabled || options?.readonly"\n [name]="controlName"\n [value]="controlValue">\n <mat-radio-button *ngFor="let radioItem of radiosList"\n [id]="\'control\' + layoutNode?._id + \'/\' + radioItem?.name"\n [value]="radioItem?.value"\n (click)="updateValue(radioItem?.value)">\n <span [innerHTML]="radioItem?.name"></span>\n </mat-radio-button>\n </mat-radio-group>\n <mat-error *ngIf="options?.showErrors && options?.errorMessage"\n [innerHTML]="options?.errorMessage"></mat-error>\n </div>',styles:["\n mat-radio-group { display: inline-flex; }\n mat-radio-button { margin: 2px; }\n mat-error { font-size: 75%; }\n "]})],t)}(),X=function(){function t(t,e,n){this.matFormFieldDefaultOptions=t,this.matLabelGlobalOptions=e,this.jsf=n,this.controlDisabled=!1,this.boundControl=!1,this.selectList=[],this.isArray=o.isArray}return t.prototype.ngOnInit=function(){this.options=this.layoutNode.options||{},this.selectList=o.buildTitleMap(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!!this.options.flatList),this.jsf.initializeControl(this,!this.options.readonly),this.options.notitle||this.options.description||!this.options.placeholder||(this.options.description=this.options.placeholder)},t.prototype.updateValue=function(t){this.options.showErrors=!0,this.jsf.updateValue(this,t.value)},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[i.MAT_FORM_FIELD_DEFAULT_OPTIONS]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[n.MAT_LABEL_GLOBAL_OPTIONS]},{type:e.Optional}]},{type:o.JsonSchemaFormService}]},j([e.Input()],t.prototype,"layoutNode",void 0),j([e.Input()],t.prototype,"layoutIndex",void 0),j([e.Input()],t.prototype,"dataIndex",void 0),t=j([e.Component({selector:"material-select-widget",template:'\n <mat-form-field\n [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || \'standard\'"\n [class]="options?.htmlClass || \'\'"\n [floatLabel]="options?.floatLabel || matLabelGlobalOptions?.float || (options?.notitle ? \'never\' : \'auto\')"\n [hideRequiredMarker]="options?.hideRequired ? \'true\' : \'false\'"\n [style.width]="\'100%\'">\n <mat-label *ngIf="!options?.notitle">{{op