@pepperi/ngx-lib
Version:
Pepperi Angular Components and Services
15 lines (13 loc) • 116 kB
JavaScript
!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("@angular/material/icon"),require("@angular/material/menu"),require("angular2-signaturepad"),require("@pepperi/ngx-lib"),require("@pepperi/ngx-lib/icon"),require("@pepperi/ngx-lib/dialog"),require("@pepperi/ngx-lib/address"),require("@pepperi/ngx-lib/attachment"),require("@pepperi/ngx-lib/checkbox"),require("@pepperi/ngx-lib/date"),require("@pepperi/ngx-lib/image"),require("@pepperi/ngx-lib/images-filmstrip"),require("@pepperi/ngx-lib/internal-button"),require("@pepperi/ngx-lib/menu"),require("@pepperi/ngx-lib/quantity-selector"),require("@pepperi/ngx-lib/rich-html-textarea"),require("@pepperi/ngx-lib/select"),require("@pepperi/ngx-lib/separator"),require("@pepperi/ngx-lib/signature"),require("@pepperi/ngx-lib/textarea"),require("@pepperi/ngx-lib/textbox"),require("@ngx-translate/core"),require("rxjs/operators"),require("jquery"),require("@angular/cdk/bidi"),require("@angular/cdk/scrolling")):"function"==typeof define&&define.amd?define("@pepperi/ngx-lib/form",["exports","@angular/core","@angular/common","@angular/forms","@angular/material/core","@angular/material/grid-list","@angular/material/icon","@angular/material/menu","angular2-signaturepad","@pepperi/ngx-lib","@pepperi/ngx-lib/icon","@pepperi/ngx-lib/dialog","@pepperi/ngx-lib/address","@pepperi/ngx-lib/attachment","@pepperi/ngx-lib/checkbox","@pepperi/ngx-lib/date","@pepperi/ngx-lib/image","@pepperi/ngx-lib/images-filmstrip","@pepperi/ngx-lib/internal-button","@pepperi/ngx-lib/menu","@pepperi/ngx-lib/quantity-selector","@pepperi/ngx-lib/rich-html-textarea","@pepperi/ngx-lib/select","@pepperi/ngx-lib/separator","@pepperi/ngx-lib/signature","@pepperi/ngx-lib/textarea","@pepperi/ngx-lib/textbox","@ngx-translate/core","rxjs/operators","jquery","@angular/cdk/bidi","@angular/cdk/scrolling"],t):t(((e=e||self)["pepperi-addons"]=e["pepperi-addons"]||{},e["pepperi-addons"]["ngx-lib"]=e["pepperi-addons"]["ngx-lib"]||{},e["pepperi-addons"]["ngx-lib"].form={}),e.ng.core,e.ng.common,e.ng.forms,e.ng.material.core,e.ng.material.gridList,e.ng.material.icon,e.ng.material.menu,e.signaturepad,e["pepperi-addons"]["ngx-lib"],e["pepperi-addons"]["ngx-lib"].icon,e["pepperi-addons"]["ngx-lib"].dialog,e["pepperi-addons"]["ngx-lib"].address,e["pepperi-addons"]["ngx-lib"].attachment,e["pepperi-addons"]["ngx-lib"].checkbox,e["pepperi-addons"]["ngx-lib"].date,e["pepperi-addons"]["ngx-lib"].image,e["pepperi-addons"]["ngx-lib"]["images-filmstrip"],e["pepperi-addons"]["ngx-lib"]["internal-button"],e["pepperi-addons"]["ngx-lib"].menu,e["pepperi-addons"]["ngx-lib"]["quantity-selector"],e["pepperi-addons"]["ngx-lib"]["rich-html-textarea"],e["pepperi-addons"]["ngx-lib"].select,e["pepperi-addons"]["ngx-lib"].separator,e["pepperi-addons"]["ngx-lib"].signature,e["pepperi-addons"]["ngx-lib"].textarea,e["pepperi-addons"]["ngx-lib"].textbox,e.translate,e.rxjs.operators,e.jquery,e.ng.cdk.bidi,e.ng.cdk.scrolling)}(this,(function(e,t,i,n,a,l,r,o,d,p,s,c,u,m,h,f,y,g,C,v,x,b,T,w,F,I,S,k,E,A,D,V){"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 P(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 L(e,i){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵelement(1,"pep-icon",3),t.ɵɵelementContainerEnd()),2&e){var n=i.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("fill",n)}}function M(e,i){1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵelement(1,"pep-icon",4),t.ɵɵelementContainerEnd())}var O=function(e){return{"is-inside-table":e}},_=function(){this.controlType="indicators",this.layoutType=p.LAYOUT_TYPE.PepperiTable,this.LAYOUT_TYPE=p.LAYOUT_TYPE};_.ɵfac=function(e){return new(e||_)},_.ɵcmp=t.ɵɵdefineComponent({type:_,selectors:[["pep-indicators"]],inputs:{key:"key",value:"value",layoutType:"layoutType"},decls:3,vars:5,consts:[[1,"indicators-container",3,"ngClass"],[4,"ngFor","ngForOf"],[4,"ngIf"],["name","indicator_dot_placeholder",1,"pull-left","flip",3,"fill"],["name","indicator_dot_placeholder",1,"pull-left","flip"]],template:function(e,i){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵtemplate(1,L,2,1,"ng-container",1),t.ɵɵtemplate(2,M,2,0,"ng-container",2),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(3,O,i.layoutType===i.LAYOUT_TYPE.PepperiTable)),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",null==i.value?null:i.value.split(";")),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","ItemIndicatorsWithoutCampaign"!=i.key&&(null==i.value?null:i.value.split(";").length)<4))},directives:[i.NgClass,i.NgForOf,i.NgIf,s.PepperiIconComponent],styles:["[_nghost-%COMP%]{display:-ms-grid;display:grid;height:inherit}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{-ms-grid-row-align:center;align-self:center}.indicators-container[_ngcontent-%COMP%]{height:2.5rem}.indicators-container[_ngcontent-%COMP%] .svg-icon[_ngcontent-%COMP%]{height:1rem;margin:.05rem;width:1rem}.indicators-container.is-inside-table[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center}"],changeDetection:0});var N=function(){function e(e){this.httpService=e,this.parentId="0",this.additionalApiName="",this.transactionUrl="Service1.svc/v1/OrderCenter/Transaction/"}return e.prototype.getBaseParentUrl=function(){return""+this.transactionUrl+this.objectId+"/ParentLine/"+this.parentId+"/"},e.prototype.getChildren=function(e){var t=JSON.stringify({TransactionUID:this.objectId,SearchCode:this.searchCode,AdditionalApiName:this.additionalApiName,ParentTransactionLineID:this.parentId,ViewType:this.viewType}),i=this.additionalApiName.length>0?this.additionalApiName+"/"+this.viewType:"''/"+this.viewType,n=this.getBaseParentUrl()+"Items/"+i;this.httpService.postWapiApiCall(n,t).subscribe((function(t){e(t)}),(function(e){}),(function(){}))},e.prototype.initDetails=function(e,t,i,n){e&&t&&(this.objectId=e,this.parentId=t,this.searchCode=i,this.httpService.getWapiApiCall(this.getBaseParentUrl()+"ViewTypes").subscribe((function(e){n(e)}),(function(e){}),(function(){})))},e.prototype.changeChildrenViewType=function(e,t){this.viewType=e,this.getChildren(t)},e.prototype.changeAdditionalApiName=function(e,t){this.additionalApiName=e,this.getChildren(t)},e.prototype.childPlusClick=function(e,t,i){var n=JSON.stringify({TransactionUID:this.objectId,SearchCode:this.searchCode,ParentTransactionLineID:this.parentId,TransactionLineUID:e,FieldApiName:t,ViewType:this.viewType});this.httpService.postWapiApiCall(this.getBaseParentUrl()+"IncrementValue",n).subscribe((function(e){i(e)}),(function(e){}),(function(){}))},e.prototype.childMinusClick=function(e,t,i){var n=JSON.stringify({TransactionUID:this.objectId,SearchCode:this.searchCode,ParentTransactionLineID:this.parentId,TransactionLineUID:e,FieldApiName:t,ViewType:this.viewType});this.httpService.postWapiApiCall(this.getBaseParentUrl()+"DecrementValue",n).subscribe((function(e){i(e)}),(function(e){}),(function(){}))},e.prototype.childValueChanged=function(e,t,i,n){var a=JSON.stringify({TransactionUID:this.objectId,SearchCode:this.searchCode,ParentTransactionLineID:this.parentId,TransactionLineUID:e,FieldApiName:t,FieldValue:i,ViewType:this.viewType});this.httpService.postWapiApiCall(this.getBaseParentUrl()+"SetFieldValue",a).subscribe((function(e){n(e)}),(function(e){}),(function(){}))},e}();N.ɵfac=function(e){return new(e||N)(t.ɵɵinject(p.HttpService))},N.ɵprov=t.ɵɵdefineInjectable({token:N,factory:N.ɵfac});var R=["noVirtualScrollCont"],Y=["tableHeader"],j=["selectAllCB"];function q(e,i){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵelementStart(1,"div",3),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementContainerEnd()),2&e){var n=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate(n.noDataFoundMsg)}}function U(e,i){if(1&e&&(t.ɵɵelementStart(0,"label",16),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var n=t.ɵɵnextContext().$implicit;t.ɵɵclassMapInterpolate1("header-label body-sm pull-left flip text-align-",n.Layout.XAlignment,""),t.ɵɵpropertyInterpolate("id",n.ApiName),t.ɵɵpropertyInterpolate("title",n.Title),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",n.Title," ")}}function W(e,i){if(1&e&&(t.ɵɵelementStart(0,"label",17),t.ɵɵtext(1," "),t.ɵɵelementEnd()),2&e){var n=t.ɵɵnextContext().$implicit;t.ɵɵpropertyInterpolate("id",n.ApiName)}}function H(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",18),t.ɵɵlistener("mousedown",(function(e){t.ɵɵrestoreView(n);var i=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(3).onListResizeStart(e,i.ApiName)})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵelement(2,"pep-icon",19),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}var z=function(e){return{width:e}},B=function(e,t,i){return{"is-resizing":e,"is-first":t,"is-last":i}};function G(e,i){if(1&e&&(t.ɵɵelementStart(0,"div",12),t.ɵɵtemplate(1,U,2,6,"label",13),t.ɵɵtemplate(2,W,2,1,"label",14),t.ɵɵtemplate(3,H,3,0,"div",15),t.ɵɵelementEnd()),2&e){var n=i.$implicit,a=i.index,l=t.ɵɵnextContext(3);t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(5,z,n.calcTitleColumnWidthString))("ngClass",t.ɵɵpureFunction3(7,B,n.ApiName===l.pressedColumn,0===a,a===(null==l.uiControl||null==l.uiControl.ControlFields?null:l.uiControl.ControlFields.length)-1)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""!=n.Title),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""==n.Title),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",l.supportResizing)}}var Q=function(e){return{"below-header-and-top-bar":e}};function K(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",8,9),t.ɵɵlistener("mouseup",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(2).onListResizeEnd(e)}))("mouseenter",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(2).onListHeaderMouseEnter(e)}))("mouseleave",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(2).onListHeaderMouseLeave(e)}))("mousemove",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(2).onListResize(e)})),t.ɵɵelementStart(2,"fieldset",10),t.ɵɵelementStart(3,"fieldset"),t.ɵɵtemplate(4,G,4,11,"div",11),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext(2);t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(2,Q,null==a.parentScroll)),t.ɵɵadvance(4),t.ɵɵproperty("ngForOf",null==a.uiControl?null:a.uiControl.ControlFields)}}function X(e,i){1&e&&t.ɵɵelementContainer(0)}function J(e,i){1&e&&t.ɵɵelementContainer(0)}var Z=function(e,t){return{"table-body":e,"cards-body":t}};function ee(e,i){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,K,5,4,"div",4),t.ɵɵelementStart(2,"div",5,6),t.ɵɵtemplate(4,X,1,0,"ng-container",7),t.ɵɵelementEnd(),t.ɵɵtemplate(5,J,1,0,"ng-container",7),t.ɵɵelementContainerEnd()),2&e){var n=t.ɵɵnextContext(),a=t.ɵɵreference(3),l=t.ɵɵreference(5);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.isTable),t.ɵɵadvance(1),t.ɵɵproperty("ngClass",t.ɵɵpureFunction2(4,Z,n.isTable,!n.isTable)),t.ɵɵadvance(2),t.ɵɵproperty("ngTemplateOutlet",a),t.ɵɵadvance(1),t.ɵɵproperty("ngTemplateOutlet",l)}}var te=function(e){return{highlighted:e}},ie=function(e,t){return{height:e,visibility:t}},ne=function(e){return{"background-color":e}};function ae(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementContainerStart(0),t.ɵɵelementStart(1,"div",21),t.ɵɵlistener("mouseenter",(function(e){t.ɵɵrestoreView(n);var i=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).onTableRowMouseEnter(e,null==i||null==i.Data?null:i.Data.UID,null==i||null==i.Data?null:i.Data.Type)}))("mouseleave",(function(e){t.ɵɵrestoreView(n);var i=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).onTableRowMouseLeave(e,null==i||null==i.Data?null:i.Data.UID,null==i||null==i.Data?null:i.Data.Type)})),t.ɵɵelementStart(2,"fieldset",22),t.ɵɵelementStart(3,"pep-form",23),t.ɵɵlistener("notifyValueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onValueChanged(e)}))("notifyFieldClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onCustomizeFieldClick(e)}))("notifyMenuItemClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onCustomizeFieldMenuClicked(e)}))("click",(function(e){t.ɵɵrestoreView(n);var i=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).itemClicked(e,i)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementContainerEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,l=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(16,te,(null==a||null==a.Data?null:a.Data.UID)+l.SEPARATOR+(null==a||null==a.Data?null:a.Data.Type)===l.selectedItemId))("ngStyle",t.ɵɵpureFunction2(18,ie,l.calculatedObjectHeight,l.showItems||a?"visible":"hidden")),t.ɵɵadvance(1),t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(21,ne,null==a||null==a.Data?null:a.Data.BackgroundColor)),t.ɵɵadvance(1),t.ɵɵproperty("checkForChanges",l.checkForChanges)("uiControlHeader",l.uiControl)("firstFieldAsLink",l.firstFieldAsLink)("pepperiObjectInput",a)("canEditObject",!l.disabled&&(null==a?null:a.IsEditable))("objectId",l.objectId)("parentId",l.parentId)("searchCode",l.searchCode)("lockEvents",l.disableSelectionItems)("layoutType",l.LAYOUT_TYPE.PepperiTable)("listType",l.listType)("isActive",((null==a||null==a.Data?null:a.Data.UID)+l.SEPARATOR+(null==a||null==a.Data?null:a.Data.Type)===l.selectedItemId||(null==a||null==a.Data?null:a.Data.UID)+l.SEPARATOR+(null==a||null==a.Data?null:a.Data.Type)===l.hoveredItemId)&&!l.isTouchDevice)("pageType",l.pageType)}}var le,re=function(e,t){return{highlighted:e,cardView:t}};function oe(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementContainerStart(0),t.ɵɵelementStart(1,"div",24),t.ɵɵlistener("mouseenter",(function(e){t.ɵɵrestoreView(n);var i=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).onCardMouseEnter(e,null==i||null==i.Data?null:i.Data.UID,null==i||null==i.Data?null:i.Data.Type)}))("mouseleave",(function(e){t.ɵɵrestoreView(n);var i=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).onCardMouseLeave(e,null==i||null==i.Data?null:i.Data.UID,null==i||null==i.Data?null:i.Data.Type)})),t.ɵɵelementStart(2,"pep-form",25),t.ɵɵlistener("notifyValueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onValueChanged(e)}))("notifyFieldClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onCustomizeFieldClick(e)}))("notifyMenuItemClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext(3).onCustomizeFieldMenuClicked(e)}))("click",(function(e){t.ɵɵrestoreView(n);var i=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).itemClicked(e,i)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementContainerEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,l=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵclassMap(l.itemClass),t.ɵɵproperty("ngClass",t.ɵɵpureFunction2(18,re,(null==a||null==a.Data?null:a.Data.UID)+l.SEPARATOR+(null==a||null==a.Data?null:a.Data.Type)===l.selectedItemId,l.isCardView))("ngStyle",t.ɵɵpureFunction2(21,ie,l.calculatedObjectHeight,l.showItems||a?"visible":"hidden")),t.ɵɵadvance(1),t.ɵɵproperty("firstFieldAsLink",!!l.isCardView&&l.firstFieldAsLink)("checkForChanges",l.checkForChanges)("uiControlHeader",l.uiControl)("pepperiObjectInput",a)("isCardView",l.isCardView)("canEditObject",!l.disabled&&(null==a?null:a.IsEditable))("objectId",l.objectId)("parentId",l.parentId)("searchCode",l.searchCode)("lockEvents",l.disableSelectionItems)("layoutType",l.getThumbnailsLayout())("listType",l.listType)("isActive",((null==a||null==a.Data?null:a.Data.UID)+l.SEPARATOR+(null==a||null==a.Data?null:a.Data.Type)===l.selectedItemId||(null==a||null==a.Data?null:a.Data.UID)+l.SEPARATOR+(null==a||null==a.Data?null:a.Data.Type)===l.hoveredItemId)&&!l.isTouchDevice)("pageType",l.pageType)}}function de(e,i){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,ae,4,23,"ng-container",0),t.ɵɵtemplate(2,oe,3,24,"ng-container",0),t.ɵɵelementContainerEnd()),2&e){var n=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.isTable),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.isTable)}}function pe(e,i){if(1&e&&t.ɵɵtemplate(0,de,3,2,"ng-container",20),2&e){var n=t.ɵɵnextContext();t.ɵɵproperty("ngForOf",n.scrollItems)("ngForTrackBy",n.trackByFunc)}}function se(e,i){if(1&e&&(t.ɵɵelementStart(0,"div",29),t.ɵɵelementStart(1,"label"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var n=i.$implicit,a=i.index,l=t.ɵɵnextContext(3);t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(5,z,n.calcTitleColumnWidthString)),t.ɵɵadvance(1),t.ɵɵclassMapInterpolate1("total-label body-sm text-align-",n.Layout.XAlignment,""),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",l.totalsRow[a]," ")}}function ce(e,i){if(1&e&&(t.ɵɵelementStart(0,"div",27),t.ɵɵelementStart(1,"fieldset",10),t.ɵɵtemplate(2,se,3,7,"div",28),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var n=t.ɵɵnextContext(2);t.ɵɵadvance(2),t.ɵɵproperty("ngForOf",null==n.uiControl?null:n.uiControl.ControlFields)}}function ue(e,i){if(1&e&&t.ɵɵtemplate(0,ce,3,1,"div",26),2&e){var n=t.ɵɵnextContext();t.ɵɵproperty("ngIf",(null==n.totalsRow?null:n.totalsRow.length)>0&&n.totalsRow.length<=(null==n.uiControl?null:n.uiControl.ControlFields.length))}}!function(e){e[e.Card=0]="Card",e[e.Line=1]="Line",e[e.Table=2]="Table"}(le||(le={}));var me=function(){function e(e,i,n,a){var l=this;this.element=e,this.layoutService=i,this.cd=n,this.renderer=a,this.currentListTypeTranslation="",this.noDataFoundMsg="Items not found",this.hideAllSelectionInMulti=!1,this.top=-1,this.listType="",this.objectId="0",this.parentId="0",this.searchCode="0",this.firstFieldAsLink=!1,this.supportResizing=!0,this.parentScroll=null,this.disabled=!1,this.isPrinting=!1,this.disableSelectionItems=!1,this.layoutType=null,this.pageType="",this.totalsRow=[],this.isTouchDevice=!1,this.notifyThumbnailClicked=new t.EventEmitter,this.notifyFieldClicked=new t.EventEmitter,this.notifyMenuItemClicked=new t.EventEmitter,this.notifyValueChanged=new t.EventEmitter,this.notifySelectAllSingleActionClicked=new t.EventEmitter,this.notifySingleActionClicked=new t.EventEmitter,this.notifyListLoad=new t.EventEmitter,this.LAYOUT_TYPE=p.LAYOUT_TYPE,this.uiControl=null,this.totalRows=-1,this.isTable=!1,this.hasColumnWidthOfTypePercentage=!0,this.items=null,this.isCardView=!1,this.itemsCounter=0,this.showItems=!0,this.SEPARATOR=",",this.nativeWindow=null,this.selectedItemId="",this.hoveredItemId="",this.lockEvents=!1,this.containerWidth=0,this.pressedColumn="",this.startX=0,this.startWidth=0,this.tableStartWidth=0,this.isUserSelected=!1,this.checkForChanges=null,this.useVirtualScroll=!0,this.layoutService.onResize$.pipe(E.delay(0)).subscribe((function(e){l.screenSize=e})),this.nativeWindow=window}return e.prototype.ngOnInit=function(){this.containerWidth=0},e.prototype.ngOnChanges=function(e){this.containerWidth<=0&&this.setContainerWidth()},e.prototype.ngOnDestroy=function(){this.notifyValueChanged&&this.notifyValueChanged.unsubscribe(),this.notifyFieldClicked&&this.notifyFieldClicked.unsubscribe(),this.notifyMenuItemClicked&&this.notifyMenuItemClicked.unsubscribe(),this.notifyThumbnailClicked&&this.notifyThumbnailClicked.unsubscribe()},e.prototype.setContainerWidth=function(){var e=window.getComputedStyle(this.element.nativeElement.parentElement),t=parseInt(e.paddingLeft,10)+parseInt(e.paddingRight,10),i=this.element.nativeElement.parentElement.parentElement>0?this.element.nativeElement.parentElement.parentElement:this.element.nativeElement.parentElement,n=t+0+(i.clientHeight<40*(this.totalRows+1)?18:0);this.containerWidth=i.offsetWidth-n},e.prototype.removeTable=function(){this.cleanItems(),this.uiControl=null},e.prototype.toggleItems=function(e){this.showItems=e,this.lockEvents=!e},e.prototype.updateScrollItems=function(e,t,i){void 0===i&&(i=!0),this.scrollItems=this.items.slice(e,t)},e.prototype.getUniqItemId=function(e,t){return void 0===t&&(t=""),e+this.SEPARATOR+t},e.prototype.setLayout=function(){var e=this;0!==this.totalRows&&this.uiControl&&this.uiControl.ControlFields&&0!==this.uiControl.ControlFields.length&&(this.uiControl.ControlFields.forEach((function(t){0===t.ColumnWidth&&(t.ColumnWidth=10),!e.isTable||t.FieldType!==p.FIELD_TYPE.Image&&t.FieldType!==p.FIELD_TYPE.Signature&&t.FieldType!==p.FIELD_TYPE.NumberIntegerQuantitySelector&&t.FieldType!==p.FIELD_TYPE.NumberRealQuantitySelector&&t.FieldType!==p.FIELD_TYPE.NumberIntegerForMatrix&&t.FieldType!==p.FIELD_TYPE.NumberRealForMatrix&&t.FieldType!==p.FIELD_TYPE.Package&&"UnitsQuantity"!==t.ApiName&&"QuantitySelector"!==t.ApiName||(t.Layout.XAlignment=3)})),this.cd.destroyed||this.cd.detectChanges(),this.containerWidth<=0&&this.setContainerWidth(),this.calcColumnsWidth(),this.checkForChanges=(new Date).getTime())},e.prototype.calcColumnsWidth=function(){var e=this.uiControl.ControlFields.length;if(this.isTable&&this.uiControl&&this.uiControl.ControlFields&&(this.hasColumnWidthOfTypePercentage=0===this.uiControl.ControlFields.filter((function(e){return 1===e.ColumnWidthType})).length),!this.hasColumnWidthOfTypePercentage){var t=this.uiControl.ControlFields.map((function(e){return 3.78*e.ColumnWidth})).reduce((function(e,t){return e+t}));window.innerWidth>t&&(this.hasColumnWidthOfTypePercentage=!0)}var i=0;if(this.hasColumnWidthOfTypePercentage){for(var n=this.uiControl.ControlFields.map((function(e){return e.ColumnWidth})).reduce((function(e,t){return e+t})),a=0;a<e;a++){var l=100/n*(r=this.uiControl.ControlFields[a]).ColumnWidth;r.calcColumnWidth=Math.floor(this.containerWidth*l/100),a===e-1?r.calcTitleColumnWidthString=r.calcColumnWidthString="calc(100% - "+i+"px)":(r.calcTitleColumnWidthString=r.calcColumnWidthString=r.calcColumnWidth+"px",i+=r.calcColumnWidth)}this.renderer.setStyle(this.element.nativeElement,"width","inherit")}else{for(a=0;a<e;a++){var r=this.uiControl.ControlFields[a],o=Math.floor(3.78*r.ColumnWidth);a===e-1?(r.calcTitleColumnWidthString=o+"px",r.calcColumnWidthString=o-4+"px"):r.calcTitleColumnWidthString=r.calcColumnWidthString=o+"px",i+=o}this.renderer.setStyle(this.element.nativeElement,"width",i+0+"px")}},e.prototype.initResizeData=function(){this.startX=0,this.startWidth=0,this.tableStartWidth=0,this.pressedColumn=""},e.prototype.onListResizeStart=function(e,t){this.pressedColumn=t,this.startX=e.x,this.startWidth=e.target.closest(".header-column").offsetWidth,this.tableStartWidth=this.noVirtualScrollCont.nativeElement.offsetWidth},e.prototype.onListResize=function(e){if(this.pressedColumn.length>0){var t=this.layoutService.isRtl()?this.startX-e.x:e.x-this.startX;if(this.startWidth+t>=48||t>0){for(var i=this.uiControl.ControlFields.length,n=0,a=0;a<i;a++){var l=this.uiControl.ControlFields[a];a===i-1?this.hasColumnWidthOfTypePercentage?l.calcTitleColumnWidthString=l.calcColumnWidthString="calc(100% - "+n+"px)":l.ApiName===this.pressedColumn&&(l.calcColumnWidth=this.startWidth+t,l.calcTitleColumnWidthString=l.calcColumnWidth+"px",l.calcColumnWidthString=l.calcColumnWidth-4+"px"):l.ApiName===this.pressedColumn&&(l.calcColumnWidth=this.startWidth+t,l.calcTitleColumnWidthString=l.calcColumnWidthString=l.calcColumnWidth+"px"),n+=l.calcColumnWidth}this.renderer.setStyle(this.element.nativeElement,"width",this.tableStartWidth+t+"px")}this.checkForChanges=(new Date).getTime()}},e.prototype.onListResizeEnd=function(e){if(this.pressedColumn.length>0)if(e&&$(e.srcElement).parents(".resizeBox").length>0)this.initResizeData();else{var t=this;setTimeout((function(){t.initResizeData()}),0)}},e.prototype.onListHeaderMouseEnter=function(e){},e.prototype.onListHeaderMouseLeave=function(e){this.onListResizeEnd(e),this.initResizeData()},e.prototype.onListChange=function(e){this.isPrinting||void 0!==e.start&&void 0!==e.end&&(this.calculatedObjectHeight=e.calculatedChildHeight+"px",this.lockEvents||(this.toggleItems(!1),this.updateScrollItems(e.start,e.end,!1),this.toggleItems(!0)))},e.prototype.onListLoad=function(e){this.notifyListLoad.emit(e)},e.prototype.getParentContainer=function(){return this.parentScroll?this.parentScroll:window},e.prototype.onValueChanged=function(e){this.disabled||this.notifyValueChanged.emit(e)},e.prototype.onCustomizeFieldClick=function(e){this.disabled||this.notifyFieldClicked.emit(e)},e.prototype.onCustomizeFieldMenuClicked=function(e){this.disabled||this.notifyMenuItemClicked.emit(e)},e.prototype.getIsDisabled=function(e){return!!this.disableSelectionItems||(null==e?void 0:e.Data)&&!e.Data.IsSelectableForActions},e.prototype.itemClicked=function(e,t){var i=t.Data.UID.toString(),n=t.Data.Type.toString();if(t&&t.Data&&t.Data.IsSelectableForActions&&(this.selectedItemId=this.getUniqItemId(i,n),!0),!this.isTable){if(this.disabled)return;this.notifyThumbnailClicked.emit(t)}},e.prototype.onTableRowMouseEnter=function(e,t,i){if(!this.isTouchDevice){var n=this.getUniqItemId(t,i);this.hoveredItemId=n}},e.prototype.onTableRowMouseLeave=function(e,t,i){this.hoveredItemId=""},e.prototype.onCardMouseEnter=function(e,t,i){if(!this.isTouchDevice){var n=this.getUniqItemId(t,i);this.hoveredItemId=n}},e.prototype.onCardMouseLeave=function(e,t,i){this.hoveredItemId=""},e.prototype.getThumbnailsLayout=function(){return null==this.layoutType?p.LAYOUT_TYPE.PepperiCard:this.layoutType},e.prototype.winResize=function(e){this.containerWidth=0,this.setLayout()},e.prototype.trackByFunc=function(e,t){return t&&t.Data&&t.Data.UID?t.Data.UID:e},e.prototype.cleanItems=function(){this.itemsCounter=0,this.items=this.totalRows>0?Array(this.totalRows):[],this.scrollItems=[],this.calculatedObjectHeight=""},e.prototype.getUIControl=function(){return this.uiControl},e.prototype.initListData=function(e,t,i,n,a){void 0===n&&(n=le.Table),void 0===a&&(a=""),this.isCardView=n===le.Card,this.uiControl=e,this.itemClass=a,this.selectedItemId="",this.isTable=n===le.Table,this.totalRows=t,this.getParentContainer().scrollTo(0,0),this.cleanItems(),this.updateListItems(i,null),this.onListLoad(null),this.setLayout()},e.prototype.updateListItems=function(e,t){this.scrollItems=this.items=e,this.itemsCounter=e.length},e.prototype.updateListItem=function(e){var t=0;(t=this.items.findIndex((function(t){return t&&t.Data&&t.Data.UID===e.UID})))>=0&&t<this.items.length&&(this.items[t].Data=e),(t=this.scrollItems.findIndex((function(t){return t&&t.Data&&t.Data.UID===e.UID})))>=0&&t<this.scrollItems.length&&(this.scrollItems[t].Data=e,this.checkForChanges=(new Date).getTime())},e.prototype.getIsItemEditable=function(e){var t=this.items.filter((function(t){return t.Data.UID.toString()===e}));return t.length>0&&t[0].Data.IsEditable},e.prototype.getItemDataByID=function(e){var t;return null===(t=this.items.find((function(t){return t.Data.UID.toString()===e})))||void 0===t?void 0:t.Data},e}();me.ɵfac=function(e){return new(e||me)(t.ɵɵdirectiveInject(t.ElementRef),t.ɵɵdirectiveInject(p.LayoutService),t.ɵɵdirectiveInject(t.ChangeDetectorRef),t.ɵɵdirectiveInject(t.Renderer2))},me.ɵcmp=t.ɵɵdefineComponent({type:me,selectors:[["pep-internal-list"]],viewQuery:function(e,i){var n;(1&e&&(t.ɵɵviewQuery(R,!0),t.ɵɵviewQuery(Y,!0),t.ɵɵviewQuery(j,!0)),2&e)&&(t.ɵɵqueryRefresh(n=t.ɵɵloadQuery())&&(i.noVirtualScrollCont=n.first),t.ɵɵqueryRefresh(n=t.ɵɵloadQuery())&&(i.tableHeader=n.first),t.ɵɵqueryRefresh(n=t.ɵɵloadQuery())&&(i.selectAllCB=n.first))},hostBindings:function(e,i){1&e&&t.ɵɵlistener("resize",(function(e){return i.winResize(e)}),!1,t.ɵɵresolveWindow)},inputs:{currentListTypeTranslation:"currentListTypeTranslation",noDataFoundMsg:"noDataFoundMsg",hideAllSelectionInMulti:"hideAllSelectionInMulti",top:"top",listType:"listType",objectId:"objectId",parentId:"parentId",searchCode:"searchCode",firstFieldAsLink:"firstFieldAsLink",supportResizing:"supportResizing",parentScroll:"parentScroll",disabled:"disabled",isPrinting:"isPrinting",disableSelectionItems:"disableSelectionItems",layoutType:"layoutType",pageType:"pageType",totalsRow:"totalsRow",isTouchDevice:"isTouchDevice"},outputs:{notifyThumbnailClicked:"notifyThumbnailClicked",notifyFieldClicked:"notifyFieldClicked",notifyMenuItemClicked:"notifyMenuItemClicked",notifyValueChanged:"notifyValueChanged",notifySelectAllSingleActionClicked:"notifySelectAllSingleActionClicked",notifySingleActionClicked:"notifySingleActionClicked",notifyListLoad:"notifyListLoad"},features:[t.ɵɵNgOnChangesFeature],decls:6,vars:2,consts:[[4,"ngIf"],["listData",""],["listTotals",""],[1,"no-data"],["class","table-header",3,"ngClass","mouseup","mouseenter","mouseleave","mousemove",4,"ngIf"],[3,"ngClass"],["noVirtualScrollCont",""],[4,"ngTemplateOutlet"],[1,"table-header",3,"ngClass","mouseup","mouseenter","mouseleave","mousemove"],["tableHeader",""],[1,"table-header-fieldset"],["class","header-column pull-left flip",3,"ngStyle","ngClass",4,"ngFor","ngForOf"],[1,"header-column","pull-left","flip",3,"ngStyle","ngClass"],[3,"id","class","title",4,"ngIf"],["class","header-label body-sm pull-left flip",3,"id",4,"ngIf"],["class","resizeBox pull-right flip",3,"mousedown",4,"ngIf"],[3,"id","title"],[1,"header-label","body-sm","pull-left","flip",3,"id"],[1,"resizeBox","pull-right","flip",3,"mousedown"],["name","arrow-up",1,"asc"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"table-row",3,"ngClass","ngStyle","mouseenter","mouseleave"],[1,"table-row-fieldset",3,"ngStyle"],[3,"checkForChanges","uiControlHeader","firstFieldAsLink","pepperiObjectInput","canEditObject","objectId","parentId","searchCode","lockEvents","layoutType","listType","isActive","pageType","notifyValueChanged","notifyFieldClicked","notifyMenuItemClicked","click"],[1,"pull-left","flip",3,"ngClass","ngStyle","mouseenter","mouseleave"],[3,"firstFieldAsLink","checkForChanges","uiControlHeader","pepperiObjectInput","isCardView","canEditObject","objectId","parentId","searchCode","lockEvents","layoutType","listType","isActive","pageType","notifyValueChanged","notifyFieldClicked","notifyMenuItemClicked","click"],["class","table-total",4,"ngIf"],[1,"table-total"],["class","total-column pull-left flip",3,"ngStyle",4,"ngFor","ngForOf"],[1,"total-column","pull-left","flip",3,"ngStyle"]],template:function(e,i){1&e&&(t.ɵɵtemplate(0,q,3,1,"ng-container",0),t.ɵɵtemplate(1,ee,6,7,"ng-container",0),t.ɵɵtemplate(2,pe,1,2,"ng-template",null,1,t.ɵɵtemplateRefExtractor),t.ɵɵtemplate(4,ue,1,1,"ng-template",null,2,t.ɵɵtemplateRefExtractor)),2&e&&(t.ɵɵproperty("ngIf",0==i.totalRows),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.totalRows>0))},styles:["[_nghost-%COMP%]{height:inherit}.no-data[_ngcontent-%COMP%]{font-size:1.5rem;margin-top:100px;text-align:center}.table-header[_ngcontent-%COMP%]{top:0}.table-header.below-header-and-top-bar[_ngcontent-%COMP%]{top:calc(var(--pep-header-height, 4rem) + var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem))}"]});var he=["orgCont"],fe=["modalCont"],ye=["matrixTemplate"];function ge(e,i){if(1&e&&(t.ɵɵelementStart(0,"span",19),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var n=t.ɵɵnextContext(3);t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",null==n.currentAdditionalApiName?null:n.currentAdditionalApiName.Value," ")}}var Ce=function(e){return{selected:e}};function ve(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",17),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(n);var e=i.$implicit;return t.ɵɵnextContext(3).changeAdditionalApiName(e)})),t.ɵɵelementStart(1,"span"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=i.$implicit,l=t.ɵɵnextContext(3);t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(2,Ce,(null==l.currentAdditionalApiName?null:l.currentAdditionalApiName.Key)==(null==a?null:a.Key))),t.ɵɵadvance(2),t.ɵɵtextInterpolate(a.Value)}}var xe=function(e){return{"pull-left flip":e}};function be(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementContainerStart(0),t.ɵɵelementStart(1,"button",11),t.ɵɵtemplate(2,ge,2,1,"span",12),t.ɵɵelementStart(3,"mat-icon",13),t.ɵɵelement(4,"pep-icon",14),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"mat-menu",15,16),t.ɵɵelementStart(7,"button",17),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(n),t.ɵɵnextContext(2).changeAdditionalApiName(null)})),t.ɵɵelementStart(8,"span"),t.ɵɵtext(9),t.ɵɵpipe(10,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(11,ve,3,4,"button",18),t.ɵɵelementEnd(),t.ɵɵelementContainerEnd()}if(2&e){var a=t.ɵɵreference(6),l=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("matMenuTriggerFor",a),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",l.currentAdditionalApiName),t.ɵɵadvance(1),t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(8,xe,l.currentAdditionalApiName)),t.ɵɵadvance(4),t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(10,Ce,null===l.currentAdditionalApiName)),t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(10,6,"LIST.NONE")),t.ɵɵadvance(2),t.ɵɵproperty("ngForOf",l.additionalApiNames)}}function Te(e,i){1&e&&t.ɵɵelement(0,"pep-icon",26)}function we(e,i){1&e&&t.ɵɵelement(0,"pep-icon",27)}function Fe(e,i){1&e&&t.ɵɵelement(0,"pep-icon",28)}function Ie(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",17),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(n);var e=i.$implicit;return t.ɵɵnextContext(3).changeChildrenViewType(null==e?null:e.Key)})),t.ɵɵelementStart(1,"mat-icon",22),t.ɵɵtemplate(2,Te,1,0,"pep-icon",23),t.ɵɵtemplate(3,we,1,0,"pep-icon",24),t.ɵɵtemplate(4,Fe,1,0,"pep-icon",25),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"span"),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=i.$implicit,l=t.ɵɵnextContext(3);t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(6,Ce,(null==l.currentViewType?null:l.currentViewType.Key)==(null==a?null:a.Key))),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitch",null==a?null:a.Key),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","OrderCenterMatrix"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","OrderCenterFlatMatrixGrid"),t.ɵɵadvance(1),t.ɵɵproperty("ngSwitchCase","OrderCenterFlatMatrixLine"),t.ɵɵadvance(2),t.ɵɵtextInterpolate(null==a?null:a.Value)}}function Se(e,i){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵelementStart(1,"button",11),t.ɵɵelementStart(2,"mat-icon"),t.ɵɵelement(3,"pep-icon",20),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"mat-menu",15,21),t.ɵɵtemplate(6,Ie,7,8,"button",18),t.ɵɵelementEnd(),t.ɵɵelementContainerEnd()),2&e){var n=t.ɵɵreference(5),a=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("matMenuTriggerFor",n),t.ɵɵadvance(5),t.ɵɵproperty("ngForOf",a.childViewTypes)}}function ke(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",6),t.ɵɵelementStart(1,"span",7),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"div",8),t.ɵɵtemplate(4,be,12,12,"ng-container",9),t.ɵɵtemplate(5,Se,7,2,"ng-container",9),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"pep-internal-list",10),t.ɵɵlistener("notifyValueChanged",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onCustomizeObjectChanged(e)}))("notifyFieldClicked",(function(e){return t.ɵɵrestoreView(n),t.ɵɵnextContext().onCustomizeFieldClick(e)})),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵclassMapInterpolate1("matrix-title-container pepperi-border-bottom align-",a.field.xAlignment,""),t.ɵɵpropertyInterpolate("title",a.field.label),t.ɵɵadvance(2),t.ɵɵtextInterpolate(a.field.label),t.ɵɵadvance(2),t.ɵɵproperty("ngIf","OrderCenterMatrix"==(null==a.currentViewType?null:a.currentViewType.Key)&&a.additionalApiNames&&a.additionalApiNames.length>0),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",a.childViewTypes&&a.childViewTypes.length>1),t.ɵɵadvance(1),t.ɵɵproperty("totalsRow",a.totalsRow)}}function Ee(e,i){1&e&&t.ɵɵelement(0,"div",29)}function Ae(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",30),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(n),t.ɵɵnextContext().showMatrixDialog()})),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()}2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"INTERNAL_PAGE.CLICK_TO_ORDER")))}var De=function(e,t){return{"max-width":e,"max-height":t}},Ve=function(){function e(e,i,n,a,l){this.fb=e,this.pepperiInternalPageService=i,this.customizationService=n,this.elementRef=a,this.changeDetectorRef=l,this.controlType="internalPage",this.hasHeightLimit=!1,this.layoutType=p.LAYOUT_TYPE.PepperiForm,this.childChanged=new t.EventEmitter,this.childClicked=new t.EventEmitter,this.childModal={isShown:!1},this.LAYOUT_TYPE=p.LAYOUT_TYPE,this.checkForChanges=null,this.childData=null,this.totalsRow=[],this.additionalApiNames=null,this.currentAdditionalApiName=null,this.focusedQS=!1,this.fieldIdWithFocus="",this.columnWidth=100,this.coverChildTable=!1,this.currentViewType=null,this.sumOfMinColWidth=0,this.totalRowsWidth=0,this.viewWidth="100%",this.viewHeight="auto",this.displayQSbtns=!0,this.selectedApiName="",this.showSort=!1,this.defaultRowSpan=-1}return e.prototype.fillData=function(){var e=this,t=this.matrixTemplate.createEmbeddedView(null);this.childModal.isShown?(this.orgCont.clear(),this.modalCont.clear(),this.modalCont.insert(t)):(this.modalCont.clear(),this.orgCont.clear(),this.orgCont.insert(t)),setTimeout((function(){var t,i,n=[];if(e.childData.Rows)try{for(var a=P(e.childData.Rows),l=a.next();!l.done;l=a.next()){var r=l.value,o=new p.ObjectSingleData(e.uiControl,r);o.IsEditable=!0,n.push(o)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}var d=e.isTableView()?le.Table:le.Line;if(e.customList.initListData(e.uiControl,e.childData.TotalRows,n,d,e.getItemClass()),e.setTotalsRow(),!e.childModal.isShown){var s=e.childData.Rows?e.childData.Rows.length:0,c=e.isMatrixView()||e.isFlatMatrixView()?3:1,u=16*e.customizationService.calculateFormFieldHeight();if(-1===e.defaultRowSpan&&(e.defaultRowSpan=e.field.rowSpan),"OrderCenterFlatMatrixLine"===e.currentViewType.Key){var m=Math.max.apply(Math,e.uiControl.ControlFields.map((function(e){return e.Layout.Y+e.Layout.Height}))),h=s*(16*e.customizationService.calculateCardRowsHeight(m)+16)/u+c;e.field.rowSpan=h}else{var f=16*e.customizationService.calculateTableRowsHeight(c,!1),y=16*e.customizationService.calculateTableRowsHeight(s);e.field.rowSpan=(f+y)/u}var g=e;g.sumOfMinColWidth=0,g.totalRowsWidth=0,e.childData.UIControl.ControlFields.forEach((function(e){g.totalRowsWidth+=e.ColumnWidth,e.minFieldWidth=g.mmToPx(12),g.sumOfMinColWidth+=12})),setTimeout((function(){g.setViewCover(e.childData.Rows)}),0)}}),150),this.changeDetectorRef.markForCheck()},e.prototype.fillChildData=function(e){this.childData=e,this.uiControl=e.UIControl,this.additionalApiNames=e.AdditionalApiNames,this.fillData()},e.prototype.mmToPx=function(e){return Math.floor(e*A("#my1_mm").height())},e.prototype.isMatrixView=function(){return this.currentViewType&&"OrderCenterMatrix"===this.currentViewType.Key},e.prototype.isFlatMatrixView=function(){return this.currentViewType&&"OrderCenterFlatMatrixGrid"===this.currentViewType.Key},e.prototype.isTableView=function(){return this.isMatrixView()||this.isFlatMatrixView()},e.prototype.getItemClass=function(){var e="";return this.isTableView()||(e="line-view"),e},e.prototype.changeChildrenViewType=function(e){var t,i,n=this;this.rows=[],this.uiControl=null;try{for(var a=P(this.childViewTypes),l=a.next();!l.done;l=a.next()){var r=l.value;if(r.Key===e){this.currentViewType=r;break}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}A("body").scrollTop(0),this.currentViewTypeTitle=this.currentViewType.Value,this.pepperiInternalPageService.changeChildrenViewType(this.currentViewType.Key,(function(e){e.Rows&&n.fillChildData(e)}))},e.prototype.setViewCover=function(e){if(e){var t=e.length,i=A("#mainViewCont"),n=i.parents("mat-grid-tile").css("width"),a=i.parents("mat-grid-tile").css("height");this.viewWidth=n?n.toString():"100%",this.viewHeight=this.hasHeightLimit?a.toString():"auto",parseInt(n,10)<this.mmToPx(this.sumOfMinColWidth)||this.hasHeightLimit&&parseInt(a,10)<41*t+72?this.coverChildTable=!0:this.coverChildTable=!1,this.changeDetectorRef.markForCheck()}},e.prototype.showMatrixDialog=function(){},e.prototype.ngOnInit=function(){var e=this;this.pepperiInternalPageService.initDetails(this.field.objectId,this.field.parentId,this.field.searchCode,(function(t){var i,n;if(t.Rows=t.Rows.filter((function(e){return"OrderCenterView1"!==e.Key})),t.Rows&&t.Rows.length>0){t.Default||(t.Default=t.Rows[0].Key),e.childViewTypes=t.Rows,e.currentViewType=t.Rows[0];try{for(var a=P(t.Rows),l=a.next();!l.done;l=a.next()){var r=l.value;r.Value===t.Default&&(e.currentViewType=r)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}e.loadLastAdditionalApiName(),e.changeChildrenViewType(e.currentViewType.Key)}}))},e.prototype.loadLastAdditionalApiName=function(){var t=sessionStorage.getItem(e.CURRENT_ADDITIONAL_API_NAME);if(t&&t.length>0){var i=JSON.parse(t);this.currentAdditionalApiName=i,this.pepperiInternalPageService.additionalApiName=i.Key}},e.prototype.ngOnDestroy=function(){this.childChanged&&this.childChanged.unsubscribe(),this.childClicked&&this.childClicked.unsubscribe(),this.resize&&this.resize.unsubscribe()},e.prototype.changeAdditionalApiName=function(t){var i=this,n=this;this.pepperiInternalPageService.changeAdditionalApiName(t?t.Key:"",(function(e){var t,i;try{for(var a=P(e.Rows),l=a.next();!l.done;l=a.next()){var r=l.value;n.updateChanges(r)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}n.changeDetectorRef.markForCheck()})),sessionStorage.setItem(e.CURRENT_ADDITIONAL_API_NAME,JSON.stringify(t)),setTimeout((function(){i.currentAdditionalApiName=t}),0)},e.prototype.setTotalsRow=function(){var e,t;if(this.totalsRow=[],this.isMatrixView()||this.isFlatMatrixView()){var i=0;if(this.customList.items)for(var n=0;n<this.customList.items[0].Data.Fields.length;n++){var a=this.customList.items[0].Data.Fields[n];if(a.FieldType===p.FIELD_TYPE.NumberIntegerForMatrix||a.FieldType===p.FIELD_TYPE.NumberIntegerQuantitySelector||a.FieldType===p.FIELD_TYPE.NumberRealForMatrix||a.FieldType===p.FIELD_TYPE.NumberRealQuantitySelector||a.FieldType===p.FIELD_TYPE.CalculatedInt||a.FieldType===p.FIELD_TYPE.NumberInteger||a.FieldType===p.FIELD_TYPE.CalculatedReal||a.FieldType===p.FIELD_TYPE.NumberReal){i=0;try{for(var l=(e=void 0,P(this.customList.items)),r=l.next();!r.done;r=l.next()){var o=r.value;if(o.Data.Fields[n]&&o.Data.Fields[n].Value){var d=parseFloat(o.Data.Fields[n].Value);i+=isNaN(d)?0:d}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}this.totalsRow.push(i)}else this.totalsRow.push("")}}},e.prototype.updateChanges=function(e){this.customList.updateListItem(e);for(var t=0;t<this.childData.Rows.length;t++)this.childData.Rows[t].UID===e.UID&&(this.childData.Rows[t]=e)},e.prototype.setValueCallback=function(e,t){1===t.Rows.length&&this.updateChanges(t.Rows[0]),this.setTotalsRow(),this.checkForChanges=new Date,this.childChanged.emit(t),this.changeDetectorRef.markForCheck()},e.prototype.onCustomizeObjectChanged=function(e){var t=!1,i=this.setValueCallback.bind(this);"qs"===e.ControlType&&("+"===e.Value?(t=!0,this.pepperiInternalPageService.childPlusClick(e.Id,e.ApiName,(function(t){i(e.Id,t)}))):"-"===e.Value&&(t=!0,this.pepperiInternalPageService.childMinusClick(e.Id,e.ApiName,(function(t){i(e.Id,t)})))),t||this.pepperiInternalPageService.childValueChanged(e.Id,e.ApiName,e.Value,(function(t){i(e.Id,t)}))},e.prototype.onCustomizeFieldClick=function(e){this.childClicked.emit(e)},e}();function Pe(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-address",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)("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 Le(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-attachment",20),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 Me(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-checkbox",21),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 Oe(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-date",22),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 _e(e,i){if(1&e&&t.ɵɵelement(0,"pep-images-filmstrip",23),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 Ne(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-image",24),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 Re(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-internal-button",25),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 Ye(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-menu",26),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 je(e,i){if(1&e){var n=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"pep-quantity-selector",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)}))("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)("showT