UNPKG

@pepperi/lib

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.1.

15 lines (13 loc) 67.3 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@angular/material/core"),require("@angular/material/grid-list"),require("angular2-signaturepad"),require("@pepperi/lib"),require("@pepperi/lib/dialog"),require("@pepperi/lib/address"),require("@pepperi/lib/attachment"),require("@pepperi/lib/checkbox"),require("@pepperi/lib/date"),require("@pepperi/lib/image"),require("@pepperi/lib/images-filmstrip"),require("@pepperi/lib/internal-button"),require("@pepperi/lib/menu"),require("@pepperi/lib/quantity-selector"),require("@pepperi/lib/rich-html-textarea"),require("@pepperi/lib/select"),require("@pepperi/lib/separator"),require("@pepperi/lib/signature"),require("@pepperi/lib/textarea"),require("@pepperi/lib/textbox"),require("@ngx-translate/core")):"function"==typeof define&&define.amd?define("@pepperi/lib/form",["exports","@angular/core","@angular/common","@angular/forms","@angular/material/core","@angular/material/grid-list","angular2-signaturepad","@pepperi/lib","@pepperi/lib/dialog","@pepperi/lib/address","@pepperi/lib/attachment","@pepperi/lib/checkbox","@pepperi/lib/date","@pepperi/lib/image","@pepperi/lib/images-filmstrip","@pepperi/lib/internal-button","@pepperi/lib/menu","@pepperi/lib/quantity-selector","@pepperi/lib/rich-html-textarea","@pepperi/lib/select","@pepperi/lib/separator","@pepperi/lib/signature","@pepperi/lib/textarea","@pepperi/lib/textbox","@ngx-translate/core"],t):t(((e=e||self).pepperi=e.pepperi||{},e.pepperi.lib=e.pepperi.lib||{},e.pepperi.lib.form={}),e.ng.core,e.ng.common,e.ng.forms,e.ng.material.core,e.ng.material.gridList,e.signaturepad,e.pepperi.lib,e.pepperi.lib.dialog,e.pepperi.lib.address,e.pepperi.lib.attachment,e.pepperi.lib.checkbox,e.pepperi.lib.date,e.pepperi.lib.image,e.pepperi.lib["images-filmstrip"],e.pepperi.lib["internal-button"],e.pepperi.lib.menu,e.pepperi.lib["quantity-selector"],e.pepperi.lib["rich-html-textarea"],e.pepperi.lib.select,e.pepperi.lib.separator,e.pepperi.lib.signature,e.pepperi.lib.textarea,e.pepperi.lib.textbox,e.translate)}(this,(function(e,t,i,n,a,l,r,o,d,p,u,s,c,m,f,y,h,g,C,b,x,v,F,T,w){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */Object.create;function k(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;function I(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-address",17),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("formattedValue",a.field.formattedValue)("label",a.field.label)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("groupFields",a.field.groupFields)("layoutType",a.layoutType)}}function E(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-attachment",18),t.ɵɵlistener("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onClick(e)}))("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("src",a.field.value)("label",a.field.label)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("isActive",a.isActive)("showTitle",a.showTitle)("layoutType",a.layoutType)}}function S(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-checkbox",19),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("value",a.field.value)("label",a.field.label)("type",a.field.type)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("additionalValue",a.field.additionalValue)("showTitle",a.showTitle)("layoutType",a.layoutType)("isActive",a.isActive)}}function A(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-date",20),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("value",a.field.value)("formattedValue",a.field.formattedValue)("label",a.field.label)("type",a.field.type)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("textColor",a.field.textColor)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("minValue",a.field.minValue)("maxValue",a.field.maxValue)("showTitle",a.showTitle)("layoutType",a.layoutType)("isActive",a.isActive)}}function V(e,i){if(1&e&&t.ɵɵelement(0,"pep-images-filmstrip",21),2&e){var n=t.ɵɵnextContext();t.ɵɵproperty("objectId",n.objectId)("form",n.form)("key",n.field.key)("label",n.field.label)("showTitle",n.showTitle)("value",n.field.value)("layoutType",n.layoutType)}}function P(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-image",22),t.ɵɵlistener("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onClick(e)}))("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("objectId",a.objectId)("form",a.form)("key",a.field.key)("src",a.field.formattedValue)("srcLarge",a.field.value)("options",a.field.options)("label",a.field.label)("type",a.field.type)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("indicatorsField",a.field.indicatorsField)("menuField",a.field.menuField)("hasCampaignField",a.field.hasCampaignField)("sizeLimitMB",a.field.sizeLimitMB)("isActive",a.isActive)("layoutType",a.layoutType)}}function D(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-internal-button",23),t.ɵɵlistener("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onClick(e)}))("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("value",a.field.value)("formattedValue",a.field.formattedValue)("label",a.field.label)("referenceObjectInternalType",a.field.referenceObjectInternalType)("type",a.field.type)("disabled",a.field.disabled)("readonly",a.field.readonly)("xAlignment",a.field.xAlignment)("layoutType",a.layoutType)}}function L(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-menu",24),t.ɵɵlistener("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onClick(e)}))("notifyMenuItemClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onMenuItemClicked(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("key",a.field.key)("label",a.field.label)("disabled",a.field.disabled)("xAlignment",a.field.xAlignment)("options",a.field.options)("layoutType",a.layoutType)}}function O(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-quantity-selector",25),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)}))("formValidationChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onFormValidationChanged(e)}))("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onClick(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("value",a.field.value)("formattedValue",a.field.formattedValue)("label",a.field.label)("type",a.field.type)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("textColor",a.field.textColor)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("lastFocusField",a.field.lastFocusField)("alowDecimal",a.field.alowDecimal)("additionalValue",a.field.additionalValue)("notificationInfo",a.field.notificationInfo)("isActive",a.isActive)("layoutType",a.layoutType)("showTitle",a.showTitle)}}function M(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-rich-html-textarea",26),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("value",a.field.value)("label",a.field.label)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("maxFieldCharacters",a.field.maxFieldCharacters)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("showTitle",a.showTitle)("layoutType",a.layoutType)("isActive",a.isActive)}}function Y(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-select",27),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)}))("formValidationChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onFormValidationChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("value",a.field.value)("formattedValue",a.field.formattedValue)("label",a.field.label)("type",a.field.type)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("options",a.field.options)("showTitle",a.showTitle)("layoutType",a.layoutType)("isActive",a.isActive)}}function _(e,i){if(1&e&&t.ɵɵelement(0,"pep-separator",28),2&e){var n=t.ɵɵnextContext();t.ɵɵproperty("form",n.form)("key",n.field.key)("label",n.field.label)("xAlignment",n.field.xAlignment)("layoutType",n.layoutType)}}function j(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-signature",29),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("src",a.field.value)("label",a.field.label)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("isActive",a.isActive)("layoutType",a.layoutType)}}function q(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-textarea",30),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("value",a.field.value)("label",a.field.label)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("maxFieldCharacters",a.field.maxFieldCharacters)("textColor",a.field.textColor)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("lastFocusField",a.field.lastFocusField)("showTitle",a.showTitle)("layoutType",a.layoutType)("isActive",a.isActive)}}function N(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-textbox",31),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onValueChanged(e)}))("formValidationChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onFormValidationChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("form",a.form)("key",a.field.key)("value",a.field.value)("formattedValue",a.field.formattedValue)("label",a.field.label)("placeholder",a.field.placeholder)("type",a.field.type)("required",a.field.required)("disabled",a.field.disabled)("readonly",a.field.readonly)("maxFieldCharacters",a.field.maxFieldCharacters)("textColor",a.field.textColor)("xAlignment",a.field.xAlignment)("rowSpan",a.field.rowSpan)("lastFocusField",a.field.lastFocusField)("showTitle",a.showTitle)("layoutType",a.layoutType)("isActive",a.isActive)}}function H(e,i){1&e&&t.ɵɵelementContainer(0)}var R=function(){function e(){this.hasHeightLimit=!1,this.isActive=!1,this.objectId=null,this.layoutType=o.LAYOUT_TYPE.PepperiForm,this.showTitle=!0,this.checkForChanges=null,this.valueChanged=new t.EventEmitter,this.childChanged=new t.EventEmitter,this.formValidationChanged=new t.EventEmitter,this.elementClicked=new t.EventEmitter,this.notifyMenuItemClicked=new t.EventEmitter,this.notifyChildClicked=new t.EventEmitter}return Object.defineProperty(e.prototype,"isValid",{get:function(){if(this.field.readonly||this.field.disabled)return!0;var e=this.form&&this.form.get(this.field.key);return!!e&&e.valid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isTouched",{get:function(){var e=this.form&&this.form.get(this.field.key);return!!e&&e.touched},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDirty",{get:function(){var e=this.form&&this.form.get(this.field.key);return!!e&&e.dirty},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this.valueChanged&&this.valueChanged.unsubscribe(),this.formValidationChanged&&this.formValidationChanged.unsubscribe(),this.childChanged&&this.childChanged.unsubscribe(),this.elementClicked&&this.elementClicked.unsubscribe(),this.notifyMenuItemClicked&&this.notifyMenuItemClicked.unsubscribe(),this.notifyChildClicked&&this.notifyChildClicked.unsubscribe()},e.prototype.onValueChanged=function(e){this.valueChanged.emit(e)},e.prototype.onChildChanged=function(e){this.childChanged.emit(e)},e.prototype.onFormValidationChanged=function(e){this.formValidationChanged.emit(e)},e.prototype.onClick=function(e){this.elementClicked.emit(e)},e.prototype.onMenuItemClicked=function(e){this.notifyMenuItemClicked.emit(e)},e.prototype.onChildClick=function(e){this.notifyChildClicked.emit(e)},e.prototype.ngOnChanges=function(e){},e}();function B(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-field-generator",10),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onValueChanged(e)}))("notifyChildClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onChildClicked(e)}))("childChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onChildChanged(e)}))("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onClick(e)}))("notifyMenuItemClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onMenuItemClicked(e)}))("formValidationChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onFormValidationChanged(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,l=t.ɵɵnextContext(3);t.ɵɵproperty("form",l.form)("layoutType",l.layoutType)("checkForChanges",l.checkForChanges)("objectId",l.pepperiObjectInput.Data.UID)("hasHeightLimit",!l.matrixIsLast)("field",a)("showTitle",l.showTitle)}}function U(e,i){if(1&e&&(t.ɵɵelementStart(0,"mat-grid-tile",8),t.ɵɵtemplate(1,B,1,7,"pep-field-generator",9),t.ɵɵelementEnd()),2&e){var n=i.$implicit;t.ɵɵproperty("rowspan",n.rowSpan)("colspan",n.colSpan),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","placeholder"!=n.controlType)}}function z(e,i){if(1&e&&(t.ɵɵelementStart(0,"mat-grid-list",6),t.ɵɵtemplate(1,U,2,3,"mat-grid-tile",7),t.ɵɵelementEnd()),2&e){var n=t.ɵɵnextContext(2);t.ɵɵproperty("cols",n.columns)("rowHeight",n.rowHeight+"rem")("gutterSize",n.formGutterSize),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",n.fields)}}function G(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-field-generator",15),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onValueChanged(e)}))("notifyChildClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onChildClicked(e)}))("childChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onChildChanged(e)}))("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onClick(e)}))("notifyMenuItemClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onMenuItemClicked(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,l=t.ɵɵnextContext(3);t.ɵɵproperty("form",l.form)("layoutType",l.layoutType)("isActive",l.isActive)("checkForChanges",l.checkForChanges)("objectId",l.pepperiObjectInput.Data.UID)("hasHeightLimit",!l.matrixIsLast)("field",a)("showTitle",l.showTitle)}}R.ɵfac=function(e){return new(e||R)},R.ɵcmp=t.ɵɵdefineComponent({type:R,selectors:[["pep-field-generator"]],inputs:{field:"field",hasHeightLimit:"hasHeightLimit",isActive:"isActive",objectId:"objectId",form:"form",layoutType:"layoutType",showTitle:"showTitle",checkForChanges:"checkForChanges"},outputs:{valueChanged:"valueChanged",childChanged:"childChanged",formValidationChanged:"formValidationChanged",elementClicked:"elementClicked",notifyMenuItemClicked:"notifyMenuItemClicked",notifyChildClicked:"notifyChildClicked"},features:[t.ɵɵNgOnChangesFeature],decls:17,vars:18,consts:[[3,"ngSwitch","formGroup"],[3,"form","key","formattedValue","label","required","disabled","readonly","xAlignment","rowSpan","groupFields","layoutType","valueChanged",4,"ngSwitchCase"],[3,"form","key","src","label","required","disabled","readonly","xAlignment","rowSpan","isActive","showTitle","layoutType","elementClicked","valueChanged",4,"ngSwitchCase"],[3,"form","key","value","label","type","required","disabled","readonly","xAlignment","rowSpan","additionalValue","showTitle","layoutType","isActive","valueChanged",4,"ngSwitchCase"],[3,"form","key","value","formattedValue","label","type","required","disabled","readonly","textColor","xAlignment","rowSpan","minValue","maxValue","showTitle","layoutType","isActive","valueChanged",4,"ngSwitchCase"],[3,"objectId","form","key","label","showTitle","value","layoutType",4,"ngSwitchCase"],[3,"objectId","form","key","src","srcLarge","options","label","type","required","disabled","readonly","xAlignment","rowSpan","indicatorsField","menuField","hasCampaignField","sizeLimitMB","isActive","layoutType","elementClicked","valueChanged",4,"ngSwitchCase"],[3,"form","key","value","formattedValue","label","referenceObjectInternalType","type","disabled","readonly","xAlignment","layoutType","elementClicked","valueChanged",4,"ngSwitchCase"],[3,"key","label","disabled","xAlignment","options","layoutType","elementClicked","notifyMenuItemClicked",4,"ngSwitchCase"],[3,"form","key","value","formattedValue","label","type","required","disabled","readonly","textColor","xAlignment","rowSpan","lastFocusField","alowDecimal","additionalValue","notificationInfo","isActive","layoutType","showTitle","valueChanged","formValidationChanged","elementClicked",4,"ngSwitchCase"],[3,"form","key","value","label","required","disabled","readonly","maxFieldCharacters","xAlignment","rowSpan","showTitle","layoutType","isActive","valueChanged",4,"ngSwitchCase"],[3,"form","key","value","formattedValue","label","type","required","disabled","readonly","xAlignment","rowSpan","options","showTitle","layoutType","isActive","valueChanged","formValidationChanged",4,"ngSwitchCase"],[3,"form","key","label","xAlignment","layoutType",4,"ngSwitchCase"],[3,"form","key","src","label","required","disabled","readonly","xAlignment","rowSpan","isActive","layoutType","valueChanged",4,"ngSwitchCase"],[3,"form","key","value","label","required","disabled","readonly","maxFieldCharacters","textColor","xAlignment","rowSpan","lastFocusField","showTitle","layoutType","isActive","valueChanged",4,"ngSwitchCase"],[3,"form","key","value","formattedValue","label","placeholder","type","required","disabled","readonly","maxFieldCharacters","textColor","xAlignment","rowSpan","lastFocusField","showTitle","layoutType","isActive","valueChanged","formValidationChanged",4,"ngSwitchCase"],[4,"ngSwitchCase"],[3,"form","key","formattedValue","label","required","disabled","readonly","xAlignment","rowSpan","groupFields","layoutType","valueChanged"],[3,"form","key","src","label","required","disabled","readonly","xAlignment","rowSpan","isActive","showTitle","layoutType","elementClicked","valueChanged"],[3,"form","key","value","label","type","required","disabled","readonly","xAlignment","rowSpan","additionalValue","showTitle","layoutType","isActive","valueChanged"],[3,"form","key","value","formattedValue","label","type","required","disabled","readonly","textColor","xAlignment","rowSpan","minValue","maxValue","showTitle","layoutType","isActive","valueChanged"],[3,"objectId","form","key","label","showTitle","value","layoutType"],[3,"objectId","form","key","src","srcLarge","options","label","type","required","disabled","readonly","xAlignment","rowSpan","indicatorsField","menuField","hasCampaignField","sizeLimitMB","isActive","layoutType","elementClicked","valueChanged"],[3,"form","key","value","formattedValue","label","referenceObjectInternalType","type","disabled","readonly","xAlignment","layoutType","elementClicked","valueChanged"],[3,"key","label","disabled","xAlignment","options","layoutType","elementClicked","notifyMenuItemClicked"],[3,"form","key","value","formattedValue","label","type","required","disabled","readonly","textColor","xAlignment","rowSpan","lastFocusField","alowDecimal","additionalValue","notificationInfo","isActive","layoutType","showTitle","valueChanged","formValidationChanged","elementClicked"],[3,"form","key","value","label","required","disabled","readonly","maxFieldCharacters","xAlignment","rowSpan","showTitle","layoutType","isActive","valueChanged"],[3,"form","key","value","formattedValue","label","type","required","disabled","readonly","xAlignment","rowSpan","options","showTitle","layoutType","isActive","valueChanged","formValidationChanged"],[3,"form","key","label","xAlignment","layoutType"],[3,"form","key","src","label","required","disabled","readonly","xAlignment","rowSpan","isActive","layoutType","valueChanged"],[3,"form","key","value","label","required","disabled","readonly","maxFieldCharacters","textColor","xAlignment","rowSpan","lastFocusField","showTitle","layoutType","isActive","valueChanged"],[3,"form","key","value","formattedValue","label","placeholder","type","required","disabled","readonly","maxFieldCharacters","textColor","xAlignment","rowSpan","lastFocusField","showTitle","layoutType","isActive","valueChanged","formValidationChanged"]],template:function(e,i){1&e&&(t.ɵɵelementContainerStart(0,0),t.ɵɵtemplate(1,I,1,11,"pep-address",1),t.ɵɵtemplate(2,E,1,12,"pep-attachment",2),t.ɵɵtemplate(3,S,1,14,"pep-checkbox",3),t.ɵɵtemplate(4,A,1,17,"pep-date",4),t.ɵɵtemplate(5,V,1,7,"pep-images-filmstrip",5),t.ɵɵtemplate(6,P,1,19,"pep-image",6),t.ɵɵtemplate(7,D,1,11,"pep-internal-button",7),t.ɵɵtemplate(8,L,1,6,"pep-menu",8),t.ɵɵtemplate(9,O,1,19,"pep-quantity-selector",9),t.ɵɵtemplate(10,M,1,13,"pep-rich-html-textarea",10),t.ɵɵtemplate(11,Y,1,15,"pep-select",11),t.ɵɵtemplate(12,_,1,5,"pep-separator",12),t.ɵɵtemplate(13,j,1,11,"pep-signature",13),t.ɵɵtemplate(14,q,1,15,"pep-textarea",14),t.ɵɵtemplate(15,N,1,18,"pep-textbox",15),t.ɵɵtemplate(16,H,1,0,"ng-container",16),t.ɵɵelementContainerEnd()),2&e&&(t.ɵɵproperty("ngSwitch",i.field.controlType)("formGroup",i.form),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","address"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","attachment"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","checkbox"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","date"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","images"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","image"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","button"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","menu"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","qs"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","richhtmltextarea"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","select"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","separator"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","signature"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","textarea"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","textbox"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","placeholder"))},directives:[i.NgSwitch,n.NgControlStatusGroup,n.FormGroupDirective,i.NgSwitchCase,p.PepperiAddressComponent,u.PepperiAttachmentComponent,s.PepperiCheckboxComponent,c.PepperiDateComponent,f.PepperiImagesFilmstripComponent,m.PepperiImageComponent,y.PepperiInternalButtonComponent,h.PepperiMenuComponent,g.PepperiQuantitySelectorComponent,C.PepperiRichHtmlTextareaComponent,b.PepperiSelectComponent,x.PepperiSeparatorComponent,v.PepperiSignatureComponent,F.PepperiTextareaComponent,T.PepperiTextboxComponent],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0});var $=function(e){return{overflow:e}};function Q(e,i){if(1&e&&(t.ɵɵelementStart(0,"mat-grid-tile",13),t.ɵɵtemplate(1,G,1,8,"pep-field-generator",14),t.ɵɵelementEnd()),2&e){var n=i.$implicit;t.ɵɵproperty("rowspan",n.rowSpan)("colspan",n.colSpan)("ngStyle",t.ɵɵpureFunction1(4,$,"qs"==n.type?"unset":"hidden")),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","placeholder"!=n.controlType)}}var W=function(e){return{"lock-events":e}};function X(e,i){if(1&e&&(t.ɵɵelementStart(0,"mat-grid-list",11),t.ɵɵtemplate(1,Q,2,6,"mat-grid-tile",12),t.ɵɵelementEnd()),2&e){var n=t.ɵɵnextContext(2);t.ɵɵproperty("cols",n.columns)("rowHeight",n.rowHeight+"rem")("gutterSize",n.cardGutterSize)("ngClass",t.ɵɵpureFunction1(5,W,n.lockEvents)),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",n.fields)}}function K(e,i){1&e&&t.ɵɵelementContainer(0)}function J(e,i){1&e&&t.ɵɵelementContainer(0)}function Z(e,i){if(1&e&&t.ɵɵtemplate(0,J,1,0,"ng-container",19),2&e){t.ɵɵnextContext(3);var n=t.ɵɵreference(2);t.ɵɵproperty("ngTemplateOutlet",n)}}function ee(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-field-generator",23),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(5).onValueChanged(e)}))("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(5).onClick(e)}))("notifyMenuItemClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(5).onMenuItemClicked(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,l=t.ɵɵnextContext(4);t.ɵɵproperty("checkForChanges",l.checkForChanges)("objectId",l.pepperiObjectInput.Data.UID)("field",a)("form",l.form)("layoutType",l.layoutType)("showTitle",!1)("isActive",l.isActive)}}var te=function(e){return[e]},ie=function(e){return{width:e}};function ne(e,i){if(1&e&&(t.ɵɵelementStart(0,"div",21),t.ɵɵtemplate(1,ee,1,7,"pep-field-generator",22),t.ɵɵelementEnd()),2&e){var n=i.$implicit,a=i.index,l=t.ɵɵnextContext(4);t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(3,te,"text-align-"+n.xAlignment))("ngStyle",t.ɵɵpureFunction1(5,ie,null==l.uiControlHeader||null==l.uiControlHeader.ControlFields[a]?null:l.uiControlHeader.ControlFields[a].calcColumnWidthString)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","placeholder"!=n.controlType)}}function ae(e,i){if(1&e&&t.ɵɵtemplate(0,ne,2,7,"div",20),2&e){var n=t.ɵɵnextContext(3);t.ɵɵproperty("ngForOf",n.fields)}}function le(e,i){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,K,1,0,"ng-container",16),t.ɵɵtemplate(2,Z,1,1,"ng-template",null,17,t.ɵɵtemplateRefExtractor),t.ɵɵtemplate(4,ae,1,1,"ng-template",null,18,t.ɵɵtemplateRefExtractor),t.ɵɵelementContainerEnd()),2&e){var n=t.ɵɵreference(3),a=t.ɵɵreference(5),l=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",l.isReport)("ngIfThen",n)("ngIfElse",a)}}function re(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-field-generator",27),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onValueChanged(e)}))("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(4).onClick(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,l=t.ɵɵnextContext(3);t.ɵɵproperty("checkForChanges",l.checkForChanges)("objectId",l.pepperiObjectInput.Data.UID)("field",a)("form",l.form)("layoutType",l.layoutType)("showTitle",!1)("isActive",l.isActive)}}function oe(e,i){if(1&e&&(t.ɵɵelementStart(0,"div",25),t.ɵɵtemplate(1,re,1,7,"pep-field-generator",26),t.ɵɵelementEnd()),2&e){var n=i.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngIf","placeholder"!=n.controlType)}}function de(e,i){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,oe,2,1,"div",24),t.ɵɵelementContainerEnd()),2&e){var n=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",n.fields)}}var pe=function(e){return{"background-color":e}},ue=function(e,t){return{"material-form":e,cardView:t}};function se(e,i){if(1&e&&(t.ɵɵelementStart(0,"fieldset",2),t.ɵɵtemplate(1,z,2,4,"mat-grid-list",3),t.ɵɵtemplate(2,X,2,7,"mat-grid-list",4),t.ɵɵtemplate(3,le,6,3,"ng-container",5),t.ɵɵtemplate(4,de,2,1,"ng-container",5),t.ɵɵelementEnd()),2&e){var n=t.ɵɵnextContext();t.ɵɵproperty("formGroup",n.form)("disabled",n.isLocked)("ngStyle",t.ɵɵpureFunction1(8,pe,n.layoutType==n.LAYOUT_TYPE.PepperiCard&&(null==n.pepperiObjectInput||null==n.pepperiObjectInput.Data?null:n.pepperiObjectInput.Data.BackgroundColor)))("ngClass",t.ɵɵpureFunction2(10,ue,n.layoutType==n.LAYOUT_TYPE.PepperiForm,1==n.isCardView)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.layoutType==n.LAYOUT_TYPE.PepperiForm),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.layoutType==n.LAYOUT_TYPE.PepperiCard),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.layoutType==n.LAYOUT_TYPE.PepperiTable),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.layoutType==n.LAYOUT_TYPE.Editmodal)}}function ce(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-image",38),t.ɵɵlistener("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onClick(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,l=t.ɵɵnextContext(2);t.ɵɵproperty("objectId",l.objectId)("form",l.form)("key",a.key)("src",a.formattedValue)("srcLarge",a.value)("options",a.options)("label",a.label)("type",a.type)("required",a.required)("disabled",a.disabled)("readonly",a.readonly)("xAlignment",a.xAlignment)("rowSpan",a.rowSpan)("layoutType",l.layoutType)}}function me(e,i){if(1&e&&t.ɵɵelement(0,"pep-signature",39),2&e){var n=t.ɵɵnextContext().$implicit,a=t.ɵɵnextContext(2);t.ɵɵproperty("form",a.form)("key",n.key)("src",n.value)("label",n.label)("required",n.required)("disabled",n.disabled)("readonly",n.readonly)("xAlignment",n.xAlignment)("rowSpan",n.rowSpan)("layoutType",a.layoutType)}}function fe(e,i){if(1&e&&t.ɵɵelement(0,"pep-checkbox",40),2&e){var n=t.ɵɵnextContext().$implicit,a=t.ɵɵnextContext(2);t.ɵɵproperty("form",a.form)("key",n.key)("value",n.value)("label",n.label)("type",n.type)("required",n.required)("disabled",n.disabled)("readonly",n.readonly)("xAlignment",n.xAlignment)("rowSpan",n.rowSpan)("additionalValue",n.additionalValue)("layoutType",a.layoutType)}}function ye(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-internal-button",41),t.ɵɵlistener("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onClick(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,l=t.ɵɵnextContext(2);t.ɵɵproperty("form",l.form)("key",a.key)("value",a.value)("formattedValue",a.formattedValue)("label",a.label)("type",a.type)("disabled",a.disabled)("readonly",a.readonly)("xAlignment",a.xAlignment)("layoutType",l.layoutType)}}function he(e,i){if(1&e&&t.ɵɵelement(0,"pep-textarea",42),2&e){var n=t.ɵɵnextContext().$implicit,a=t.ɵɵnextContext(2);t.ɵɵproperty("form",a.form)("key",n.key)("value",n.value)("label",n.label)("required",n.required)("disabled",n.disabled)("readonly",n.readonly)("maxFieldCharacters",n.maxFieldCharacters)("textColor",n.textColor)("xAlignment",n.xAlignment)("rowSpan",n.rowSpan)("layoutType",a.layoutType)}}function ge(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-quantity-selector",43),t.ɵɵlistener("valueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onValueChanged(e)}))("elementClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onClick(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,l=t.ɵɵnextContext(2);t.ɵɵproperty("id",a.key)("form",l.form)("key",a.key)("value",a.value)("formattedValue",a.formattedValue)("label",a.label)("type",a.type)("required",a.required)("disabled",a.disabled)("readonly",a.readonly)("textColor",a.textColor)("xAlignment",a.xAlignment)("rowSpan",a.rowSpan)("layoutType",l.layoutType)}}function Ce(e,i){1&e&&t.ɵɵelementContainer(0)}function be(e,i){1&e&&t.ɵɵelementContainer(0)}function xe(e,i){if(1&e&&(t.ɵɵelementStart(0,"a",49),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var n=t.ɵɵnextContext(4).$implicit;t.ɵɵpropertyInterpolate("title",n.formattedValue),t.ɵɵpropertyInterpolate("href",n.value,t.ɵɵsanitizeUrl),t.ɵɵproperty("id",n.key),t.ɵɵadvance(1),t.ɵɵtextInterpolate(n.formattedValue)}}function ve(e,i){if(1&e&&t.ɵɵtemplate(0,xe,2,4,"a",48),2&e){var n=t.ɵɵnextContext(3).$implicit;t.ɵɵproperty("ngIf",null!=n.formattedValue)}}var Fe=function(e){return{color:e}};function Te(e,i){if(1&e&&(t.ɵɵelementStart(0,"span",50),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var n=t.ɵɵnextContext(3).$implicit;t.ɵɵpropertyInterpolate("title",n.formattedValue),t.ɵɵproperty("id",n.key)("ngStyle",t.ɵɵpureFunction1(4,Fe,n.textColor)),t.ɵɵadvance(1),t.ɵɵtextInterpolate(n.formattedValue)}}function we(e,i){if(1&e&&(t.ɵɵtemplate(0,be,1,0,"ng-container",16),t.ɵɵtemplate(1,ve,1,1,"ng-template",null,46,t.ɵɵtemplateRefExtractor),t.ɵɵtemplate(3,Te,2,6,"ng-template",null,47,t.ɵɵtemplateRefExtractor)),2&e){var n=t.ɵɵreference(2),a=t.ɵɵreference(4),l=t.ɵɵnextContext(2).$implicit;t.ɵɵproperty("ngIf","attachment"===l.type||"link"===l.type)("ngIfThen",n)("ngIfElse",a)}}function ke(e,i){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1," "),t.ɵɵelementEnd())}function Ie(e,i){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,Ce,1,0,"ng-container",16),t.ɵɵtemplate(2,we,5,3,"ng-template",null,44,t.ɵɵtemplateRefExtractor),t.ɵɵtemplate(4,ke,2,0,"ng-template",null,45,t.ɵɵtemplateRefExtractor),t.ɵɵelementContainerEnd()),2&e){var n=t.ɵɵreference(3),a=t.ɵɵreference(5),l=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngIf",(null==l.formattedValue?null:l.formattedValue.length)>0)("ngIfThen",n)("ngIfElse",a)}}function Ee(e,i){if(1&e&&(t.ɵɵelementStart(0,"div",29),t.ɵɵelementContainerStart(1,30),t.ɵɵtemplate(2,ce,1,14,"pep-image",31),t.ɵɵtemplate(3,me,1,10,"pep-signature",32),t.ɵɵtemplate(4,fe,1,12,"pep-checkbox",33),t.ɵɵtemplate(5,ye,1,10,"pep-internal-button",34),t.ɵɵtemplate(6,he,1,12,"pep-textarea",35),t.ɵɵtemplate(7,ge,1,14,"pep-quantity-selector",36),t.ɵɵtemplate(8,Ie,6,3,"ng-container",37),t.ɵɵelementContainerEnd(),t.ɵɵelementEnd()),2&e){var n=i.$implicit,a=i.index,l=t.ɵɵnextContext(2);t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(9,ie,null==l.uiControlHeader||null==l.uiControlHeader.ControlFields[a]?null:l.uiControlHeader.ControlFields[a].calcColumnWidthString))("ngClass",t.ɵɵpureFunction1(11,te,"text-align-"+n.xAlignment)),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitch",n.controlType),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","image"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","signature"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","checkbox"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","button"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","textarea"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","qs")}}function Se(e,i){if(1&e&&t.ɵɵtemplate(0,Ee,9,13,"div",28),2&e){var n=t.ɵɵnextContext();t.ɵɵproperty("ngForOf",n.fields)}}var Ae=function(e,t,i,n){void 0===n&&(n=""),this.Id=e,this.ApiName=t,this.Value=i,this.ControlType=n||""},Ve=function(e,t,i,n,a,l,r){void 0===r&&(r=null),this.Id=e,this.ApiName=t,this.IdType=i,this.FieldType=l,this.Which=n,this.Value=a,this.OtherData=r},Pe=function(){function e(e,i,n,a,l){this.dialogService=e,this.customizationService=i,this.translate=n,this.fb=a,this.isReport=!1,this.lockEvents=!1,this.canEditObject=!0,this.isActive=!1,this.layoutType=o.LAYOUT_TYPE.PepperiForm,this.listType="",this.objectId="0",this.parentId="0",this.searchCode="0",this.showTitle=!0,this.firstFieldAsLink=!1,this.isCardView=!1,this.checkForChanges=null,this.pageType="",this.notifyValueChanged=new t.EventEmitter,this.formValidationChanged=new t.EventEmitter,this.childClicked=new t.EventEmitter,this.childChanged=new t.EventEmitter,this.notifyFieldClicked=new t.EventEmitter,this.notifyMenuItemClicked=new t.EventEmitter,this.LAYOUT_TYPE=o.LAYOUT_TYPE,this.isLocked=!1,this.matrixIsLast=!1,this.rows=[],this.fields=[],this.columns=1,this.hasMenuFloatingOnOtherField=!1,this.indicatorsDataField=null,this.shouldReloadForm=!1,this.jsonLib=JSON,this.differ=l.find({}).create()}return e.convertAddressFields=function(e,t,i){var n=[];return t.forEach((function(t){var a,l=t.ApiName;t.ApiName.toLowerCase().indexOf("street")>=0?a=new o.PepperiTextboxField({key:t.ApiName,label:t.ApiName,type:"text",placeholder:l,readonly:!i,disabled:!t.Enabled||!i,hidden:!1,required:!1,value:t.Value,formattedValue:t.FormattedValue,row:0,rowSpan:1,col:0,colSpan:2,xAlignment:e.Layout.XAlignment,yAlignment:e.Layout.YAlignment,order:0}):t.ApiName.toLowerCase().indexOf("city")>=0?a=new o.PepperiTextboxField({key:t.ApiName,label:t.ApiName,type:"text",placeholder:l,readonly:!i,disabled:!t.Enabled||!i,hidden:!1,required:!1,value:t.Value,formattedValue:t.FormattedValue,row:0,rowSpan:1,col:2,colSpan:1,xAlignment:e.Layout.XAlignment,yAlignment:e.Layout.YAlignment,order:1}):t.ApiName.toLowerCase().indexOf("state")>=0?a=new o.PepperiSelectField({key:t.ApiName,label:t.ApiName,placeholder:l,options:t.OptionalValues,readonly:!i,disabled:!t.Enabled||!i,hidden:!1,required:!1,value:t.Value,formattedValue:t.FormattedValue,row:1,rowSpan:1,col:0,colSpan:1,xAlignment:e.Layout.XAlignment,yAlignment:e.Layout.YAlignment,order:2}):t.ApiName.toLowerCase().indexOf("zipcode")>=0?a=new o.PepperiTextboxField({key:t.ApiName,label:t.ApiName,type:"text",placeholder:l,readonly:!i,disabled:!t.Enabled||!i,hidden:!1,required:!1,value:t.Value,formattedValue:t.FormattedValue,row:1,rowSpan:1,col:1,colSpan:1,xAlignment:e.Layout.XAlignment,yAlignment:e.Layout.YAlignment,order:3}):t.ApiName.toLowerCase().indexOf("country")>=0&&(a=new o.PepperiSelectField({key:t.ApiName,label:t.ApiName,placeholder:l,options:t.OptionalValues,readonly:!i,disabled:!t.Enabled||!i,hidden:!1,required:!1,value:t.Value,formattedValue:t.FormattedValue,row:2,rowSpan:1,col:2,colSpan:1,xAlignment:e.Layout.XAlignment,yAlignment:e.Layout.YAlignment,order:4})),n.push(a)})),n.sort((function(e,t){return e.order>t.order?1:e.order<t.order?-1:0}))},e.isMatrixField=function(e){return e.indexOf("Matrix")>=0},e.doesFieldHavaFloatingField=function(e,t){var i=!1;return t.Layout.Y>=e.Layout.Y&&t.Layout.Y<e.Layout.Y+e.Layout.Height&&t.Layout.X>=e.Layout.X&&t.Layout.X<e.Layout.X+e.Layout.Width&&(i=!0),i},e.getOptionsForCustomField=function(e,t,i){if(e&&t){var n=e.ReadOnly||!i?"":e.Title;return{key:e.ApiName,label:e.Title,type:"text",accessory:t.Accessory,placeholder:n,readonly:e.ReadOnly||!i,disabled:!t.Enabled||!i,hidden:e.Hidden,required:e.Mandatory,value:t.Value,formattedValue:t.FormattedValue,additionalValue:t.AdditionalValue,row:e.Layout.Y,rowSpan:e.Layout.Height,col:e.Layout.X,colSpan:e.Layout.Width,xAlignment:e.Layout.XAlignment,yAlignment:e.Layout.YAlignment,options:t.OptionalValues,groupFields:void 0,maxFieldCharacters:e.MaxFieldCharacters,minValue:e.MinValue,maxValue:e.MaxValue,textColor:t.TextColor,notificationInfo:t.NotificationInfo}}},e.convertToCustomField=function(t,i,n,a,l,r,d,p,u){var s,c=e.getOptionsForCustomField(t,i,n);if("ObjectMenu"===t.ApiName){if(c.type="menu",1===i.TransactionItemType&&i.OptionalValues.length>0){c.options=[{Key:"EditPackage",Value:"Edit"},{Key:"DeletePackage",Value:"Delete"}].filter((function(e){return e&&i.OptionalValues.includes(e.Key)}))}else c.options=null;s=new o.PepperiMenuField(c)}else if("QuantitySelector"===t.ApiName||"UnitsQuantity"===t.ApiName||0===t.ApiName.indexOf("size_"))i.FieldType===o.FIELD_TYPE.InternalLink?c.type="button":i.FieldType===o.FIELD_TYPE.Package?c.type="packageButton":i.FieldType===o.FIELD_TYPE.NumberRealQuantitySelector||i.FieldType===o.FIELD_TYPE.NumberReal?(c.type="qs",c.alowDecimal=!0):i.FieldType===o.FIELD_TYPE.NumberIntegerQuantitySelector||i.FieldType===o.FIELD_TYPE.NumberInteger?(c.type="qs",c.alowDecimal=!1):i.FieldType===o.FIELD_TYPE.NumberIntegerForMatrix?(c.type="qsForMatrix",c.alowDecimal=!1):i.FieldType===o.FIELD_TYPE.NumberRealForMatrix&&(c.type="qsForMatrix",c.alowDecimal=!0),s=new o.PepperiQuantitySelectorField(c);else switch(i.FieldType===o.FIELD_TYPE.Indicators&&e.isMatrixField(i.ApiName)&&(i.FieldType=o.FIELD_TYPE.InternalPage),i.FieldType){case o.FIELD_TYPE.Address:var m=!t.ReadOnly&&n;c.groupFields=e.convertAddressFields(t,i.GroupFields,m),s=new o.PepperiAddressField(c);break;case o.FIELD_TYPE.Indicators:s=new o.PepperiIndicatorsField(c);break;case o.FIELD_TYPE.InternalPage:e.isMatrixField(t.ApiName)&&(c.rowSpan=t.Layout.Height,c.objectId=d,c.parentId=p,c.searchCode=u,s=new o.PepperiInternalPageField(c));break;case o.FIELD_TYPE.Link:c.type="link",(s=new o.PepperiTextboxField(c)).formattedValue=s.disabled&&""!==s.formattedValue&&""!==s.value?s.formattedValue:s.value;break;case o.FIELD_TYPE.InternalLink:case o.FIELD_TYPE.Button:c.type="button",s=new o.PepperiButtonField(c);break;case o.FIELD_TYPE.Attachment:c.type="attachment",s=new o.PepperiAttachmentField(c);break;case o.FIELD_TYPE.Signature:c.type="signature",s=new o.PepperiSignatureField(c);break;case o.FIELD_TYPE.Image:case o.FIELD_TYPE.ImageURL:c.type="image",c.menuField=a&&this.doesFieldHavaFloatingField(t,a)?a:null,c.hasCampaignField=l&&this.doesFieldHavaFloatingField(t,l)?l:null,c.indicatorsField=r&&this.doesFieldHavaFloatingField(t,r)?r:null,s=new o.PepperiImageField(c);break;case o.FIELD_TYPE.Images:c.type="images",s=new o.PepperiImagesField(c);break;case o.FIELD_TYPE.Email:c.type="email",s=new o.PepperiTextboxField(c);break;case o.FIELD_TYPE.Phone:c.type="phone",s=new o.PepperiTextboxField(c);break;case o.FIELD_TYPE.Duration:c.type="duration",s=new o.PepperiTextboxField(c);break;case o.FIELD_TYPE.Default:case o.FIELD_TYPE.TextBox:case o.FIELD_TYPE.LimitedLengthTextBox:case o.FIELD_TYPE.TextHeader:case o.FIELD_TYPE.CalculatedString:case o.FIELD_TYPE.MapDataString:s=new o.PepperiTextboxField(c);break;case o.FIELD_TYPE.TextArea:s=new o.PepperiTextareaField(c);break;case o.FIELD_TYPE.RichTextHTML:s=new o.PepperiRichHtmlTextareaField(c);break;case o.FIELD_TYPE.Date:case o.FIELD_TYPE.LimitedDate:case o.FIELD_TYPE.CalculatedDate:case o.FIELD_TYPE.DateAndTime:c.type=i.FieldType===o.FIELD_TYPE.DateAndTime?"datetime":"date",s=new o.PepperiDateField(c);break;case o.FIELD_TYPE.NumberInteger:case o.FIELD_TYPE.CalculatedInt:case o.FIELD_TYPE.MapDataInt:c.type="int",s=new o.PepperiTextboxField(c);break;case o.FIELD_TYPE.Percentage:c.type="percentage",s=new o.PepperiTextboxField(c);break;case o.FIELD_TYPE.Currency:c.type="currency",s=new o.PepperiTextboxField(c);break;case o.FIELD_TYPE.NumberReal:case o.FIELD_TYPE.CalculatedReal:case o.FIELD_TYPE.MapDataReal:case o.FIELD_TYPE.Sum:case o.FIELD_TYPE.Totals:c.type="real",s=new o.PepperiTextboxField(c);break;case o.FIELD_TYPE.Boolean:case o.FIELD_TYPE.CalculatedBool:s=new o.PepperiCheckboxField(c);break;case o.FIELD_TYPE.BooleanText:c.type="booleanText",s=new o.PepperiCheckboxField(c);break;case o.FIELD_TYPE.ComboBox:case o.FIELD_TYPE.EmptyComboBox:case o.FIELD_TYPE.MapDataDropDown:s=new o.PepperiSelectField(c);break;case o.FIELD_TYPE.MultiTickBox:case o.FIELD_TYPE.MultiTickBoxToComboBox:case o.FIELD_TYPE.EmptyMultiTickBox:c.type="multi",s=new o.PepperiSelectField(c);break;case o.FIELD_TYPE.GuidReferenceType:c.type="reference",c.referenceObjectType=i.ReferenceObjectType,c.referenceObjectSubType=i.ReferenceObjectSubType,c.referenceObjectInternalType=i.ReferenceObjectInternalType,s=new o.PepperiButtonField(c);break;case o.FIELD_TYPE.ListOfObjects:c.type="listofobjects",s=new o.PepperiButtonField(c);break;case o.FIELD_TYPE.Separator:s=new o.PepperiSeparatorField(c);break;case o.FIELD_TYPE.NumberRealQuantitySelector:case o.FIELD_TYPE.NumberIntegerQuantitySelector:c.type="qs",c.alowDecimal=i.FieldType===o.FIELD_TYPE.NumberRealQuantitySelector,s=new o.PepperiQuantitySelectorField(c);break;case o.FIELD_TYPE.Package:c.type="packageButton",s=new o.PepperiQuantitySelectorField(c)}return s||(c.label=t.ApiName+" is not supported!!!",s=new o.PepperiSeparatorField(c)),s},e.getFieldFormattedValue=function(e){var t=e.formattedValue;return"checkbox"===e.controlType&&(t="true"===t),"button"===e.controlType&&(t="0"===t?"":t),t},e.toControlGroup=function(t,i,a){var l={};return t&&t.length>0&&t.forEach((function(t){if(t.groupFields&&t.groupFields.length>0){var r={};t.groupFields.forEach((function(e){!e.required||t.readonly||t.disabled?r[e.key]=[{value:e.formattedValue||"",disabled:t.readonly||t.disabled||e.disabled},[n.Validators.nullValidator]]:r[e.key]=[{value:e.formattedValue||"",disabled:t.readonly||t.disabled||e.disabled},[n.Validators.required]]})),l[t.key]=i.group(r)}else{var o=a.getValidatorsForField(t.required,t.readonly,t.disabled,t.maxFieldCharacters,t.type,"checkbox"===t.controlType),d=e.getFieldFormattedValue(t);l[t.key]=[{value:d||"",disabled:t.disabled},o]}})),i.group(l)},e.prototype.showFormValidationMessage=function(){var e,t,i=this.fields,n="",a="";try{for(var l=k(i),r=l.next();!r.done;r=l.next()){var o=r.value,p=this.form&&this.form.get(o.key);p&&(o.required&&0==p.value.toString().trim().length?n+="<li><small>"+o.label+"</small></li>":o.disabled||p.valid||(a+="<li><small>"+o.label+"</small></li>"))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}n.length>0&&(n="<div>"+this.translate.instant("ErrorMandatoryFields")+"</div><ul style='padding: 0 20px;'>"+n+"</ul><br/>"),a.length>0&&(a="<div>"+this.translate.instant("ErrorNotValidFields")+"</div><ul style='padding: 0 20px;'>"+a+"</ul>");var u=this.translate.instant("Msg_Notice_Title"),s=new d.DialogData({title:u,content:n+a,contentType:d.DialogDataType.Html});this.dialogService.openDefaultDialog(s)},e.prototype.ngOnInit=function(){var e=this.customizationService.getThemeVariables();this.formGutterSize=16*this.customizationService.getNumberThemeVariable(e,o.CustomizationService.FORM_SPACEING_KEY),this.cardGutterSize=16*this.customizationService.getNumberThemeVariable(e,o.CustomizationService.CARD_SPACEING_KEY)},e.prototype.ngDoCheck=function(){this.differ.diff(this.pepperiObjectInput)&&this.updateForm(!0)},e.prototype.ngOnChanges=function(e){e.pepperiObjectInput&&e.pepperiObjectInput.currentValue&&(!this.shouldReloadForm&&e.pepperiObjectInput.previousValue?(this.pepperiObjectInput=e.pepperiObjectInput.currentValue,this.updateForm()):(this.shouldReloadForm=!1,this.initForm(e))),this.checkForChanges=new Date},e.prototype.ngOnDestroy=function(){this.notifyValueChanged&&this.notifyValueChanged.unsubscribe(),this.formValidationChanged&&this.formValidationChanged.unsubscribe(),this.childClicked&&this.childClicked.unsubscribe(),this.childChanged&&this.childChanged.unsubscribe(),this.notifyFieldClicked&&this.notifyFieldClicked.unsubscribe(),this.notifyMenuItemClicked&&this.notifyMenuItemClicked.unsubscribe()},e.prototype.getUiControlFields=function(){return this.uiControlHeader?this.uiControlHeader.ControlFields:this.pepperiObjectInput.UIControl.ControlFields},e.prototype.initFieldsStructure=function(e,t){var i,n,a,l,r=this.customizationService.getThemeVariables();if(this.layoutType===o.LAYOUT_TYPE.PepperiCard){var d=this.customizationService.getNumberThemeVariable(r,o.CustomizationService.CARD_FIELD_HEIGHT_KEY);this.rowHeight=d}else{var p=this.customizationService.getNumberThemeVariable(r,o.CustomizationService.FORM_FIELD_HEIGHT_KEY),u=this.customizationService.getNumberThemeVariable(r,o.CustomizationService.FORM_FIELD_TITLE_HEIGHT_KEY);this.rowHeight=p+u}if(e.length>0)if(this.layoutType===o.LAYOUT_TYPE.PepperiTable||this.layoutType===o.LAYOUT_TYPE.Editmodal){this.fields=e,this.rows=[];for(var s=0;s<=t;s++)this.rows[s]=[];try{for(var c=k(e),m=c.next();!m.done;m=c.next()){var f=m.value;this.rows[f.row].push(f)}}catch(e){i={error:e}}finally{try{m&&!m.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}}else{var y=new Array(t);for(s=0;s<y.length;s++){y[s]=new Array(this.columns);for(var h=0;h<y[s].length;h++)y[s][h]=!1}try{for(var g=k(e),C=g.next();!C.done;C=g.next()){var b=C.value;if(b.rowSpan>1)for(var x=b.row;x<b.row+b.rowSpan;x++)if(b.colSpan>1)for(var v=b.col;v<b.col+b.colSpan;v++)y.length>x&&y[0].length>v&&(y[x][v]=!0);else y.length>x&&y[0].length>b.col&&(y[x][b.col]=!0);else if(b.colSpan>1)for(v=b.col;v<b.col+b.colSpan;v++)y.length>b.row&&y[0].length>v&&(y[b.row][v]=!0);else y.length>b.row&&y[0].length>b.col&&(y[b.row][b.col]=!0)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=g.return)&&l.call(g)}finally{if(a)throw a.error}}for(s=0;s<y.length;s++)for(h=0;h<y[s].length;h++)y[s][h]||e.push(new o.PepperiPlaceholderField({key:s+"_"+h,label:"",type:"text",placeholder:"",readonly:!1,disabled:!1,hidden:!1,required:!1,value:"",formattedValue:"",row:s,rowSpan:1,col:h,colSpan:1,order:1}));this.fields=e.sort((function(e,t){return e.row>t.row?1:e.row<t.row?-1:e.col>t.col?1:e.col<t.col?-1:0}))}},e.prototype.setForm=function(t){var i,n,a,l,r,o;void 0===t&&(t=!1);var d=!0;if(t)try{for(var p=k(this.fi