UNPKG

@pepperi/lib

Version:

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

733 lines (730 loc) 110 kB
import { EventEmitter, NgZone, ɵɵdirectiveInject, ElementRef, Renderer2, ɵɵdefineComponent, ɵɵcontentQuery, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵviewQuery, ɵɵstyleProp, ɵɵNgOnChangesFeature, ɵɵprojectionDef, ɵɵelement, ɵɵelementStart, ɵɵprojection, ɵɵelementEnd, ɵsetClassMetadata, Component, Input, Output, ViewChild, ContentChild, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule, ɵɵelementContainerStart, ɵɵtext, ɵɵelementContainerEnd, ɵɵnextContext, ɵɵadvance, ɵɵtextInterpolate, ɵɵgetCurrentView, ɵɵlistener, ɵɵrestoreView, ɵɵproperty, ɵɵpureFunction1, ɵɵclassMapInterpolate1, ɵɵpropertyInterpolate, ɵɵtextInterpolate1, ɵɵpipe, ɵɵpipeBind1, ɵɵtemplate, ɵɵpureFunction5, ɵɵelementContainer, ɵɵreference, ɵɵpureFunction2, ɵɵclassMap, ɵɵpureFunction3, ChangeDetectorRef, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵtemplateRefExtractor, ɵɵinject } from '@angular/core'; import { NgIf, NgTemplateOutlet, NgClass, NgForOf, NgStyle, CommonModule } from '@angular/common'; import { MatCommonModule } from '@angular/material/core'; import { MatCheckbox, MatCheckboxModule } from '@angular/material/checkbox'; import { MatRadioButton, MatRadioModule } from '@angular/material/radio'; import { MatIcon, MatIconModule } from '@angular/material/icon'; import { LAYOUT_TYPE, FIELD_TYPE, SCREEN_SIZE, LayoutService, PepperiModule } from '@pepperi/lib'; import { PepperiIconComponent, pepperiIconArrowDown, pepperiIconArrowEither, pepperiIconArrowUp, PepperiIconRegistry, PepperiIconModule } from '@pepperi/lib/icon'; import { PepperiFormComponent, PepperiFormModule } from '@pepperi/lib/form'; import { Tween, Easing } from '@tweenjs/tween.js'; import { delay } from 'rxjs/operators'; import disableScroll from 'disable-scroll'; import * as $ from 'jquery'; import { TranslatePipe } from '@ngx-translate/core'; const _c0 = ["container"]; const _c1 = ["content"]; const _c2 = ["shim"]; const _c3 = ["*"]; class VirtualScrollComponent { constructor(element, renderer, zone) { this.element = element; this.renderer = renderer; this.zone = zone; //@Input() //items: any[] = []; this.totalRows = 0; this.bufferAmount = 0; this.scrollAnimationTime = 1500; this.doNotCheckAngularZone = false; this.refreshHandler = () => { this.refresh(true); }; this.isTable = false; //@Output() //update: EventEmitter<any[]> = new EventEmitter<any[]>(); //viewPortItems: any[]; this.change = new EventEmitter(); this.load = new EventEmitter(); this.start = new EventEmitter(); this.end = new EventEmitter(); this.startupLoop = true; /** Cache of the last scroll height to prevent setting CSS when not needed. */ this.lastScrollHeight = -1; /** Cache of the last top padding to prevent setting CSS when not needed. */ this.lastTopPadding = -1; } set parentScroll(element) { if (this._parentScroll === element) { return; } this._parentScroll = element; this.addParentEventHandlers(this._parentScroll); } get parentScroll() { return this._parentScroll; } ngOnInit() { this.scrollbarWidth = 0; // this.element.nativeElement.offsetWidth - this.element.nativeElement.clientWidth; this.scrollbarHeight = 0; // this.element.nativeElement.offsetHeight - this.element.nativeElement.clientHeight; if (!this.parentScroll) { this.addParentEventHandlers(this.element.nativeElement); } } ngOnDestroy() { this.removeParentEventHandlers(); } ngOnChanges(changes) { this.previousStart = undefined; this.previousEnd = undefined; const totalRows = changes.totalRows || {}; if ((changes.totalRows !== undefined && totalRows.previousValue === undefined) || totalRows.previousValue !== undefined) { this.startupLoop = true; } var ieVer = this.detectIE(); var headerRowHeight = '34px'; // Set padding top for the table view because the header row. //this.renderer.setStyle(this.contentElementRef.nativeElement, 'padding-top', this.isTable ? headerRowHeight : '0'); if (!ieVer || ieVer >= 16) { // not IE and version < 16 this.renderer.setStyle(this.element.nativeElement, 'top', '0'); } else { this.renderer.setStyle(this.element.nativeElement, 'top', headerRowHeight); } //Only for IE browsers /* let ua = navigator.userAgent; if (this.isTable && (ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0 || ua.indexOf('Edge/') >= 0)) { this.renderer.setStyle(this.element.nativeElement, 'top', headerRowHeight); } else { this.renderer.setStyle(this.element.nativeElement, 'top', '0'); }*/ this.refresh(); } detectIE() { var ua = window.navigator.userAgent; // Test values; Uncomment to check result … // IE 10 // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)'; // IE 11 // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'; // Edge 12 (Spartan) // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0'; // Edge 13 // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586'; var msie = ua.indexOf('MSIE '); if (msie > 0) { // IE 10 or older => return version number return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); } var trident = ua.indexOf('Trident/'); if (trident > 0) { // IE 11 => return version number var rv = ua.indexOf('rv:'); return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); } var edge = ua.indexOf('Edge/'); if (edge > 0) { // Edge (IE 12+) => return version number return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); } // other browser return false; } refresh(forceViewportUpdate = false) { this.zone.runOutsideAngular(() => { requestAnimationFrame(() => this.calculateItems(forceViewportUpdate)); }); } scrollInto(index) { let el = this.parentScroll instanceof Window ? document.body : this.parentScroll || this.element.nativeElement; let offsetTop = this.getElementsOffset(); //let index: number = (this.items || []).indexOf(item); if (index < 0 || index >= this.totalRows) return; let d = this.calculateDimensions(); let scrollTop = Math.floor(index / d.itemsPerRow) * d.childHeight - d.childHeight * Math.min(index, this.bufferAmount); let animationRequest; if (this.currentTween !== undefined) { this.currentTween.stop(); } // totally disable animate if (!this.scrollAnimationTime) { el.scrollTop = scrollTop; return; } this.currentTween = new Tween({ scrollTop: el.scrollTop }) .to({ scrollTop }, this.scrollAnimationTime) .easing(Easing.Quadratic.Out) .onUpdate(data => { if (isNaN(data.scrollTop)) { return; } this.renderer.setProperty(el, 'scrollTop', data.scrollTop); this.refresh(true); }) .onStop(() => { cancelAnimationFrame(animationRequest); }) .start(); const animate = (time) => { this.currentTween.update(time); if (this.currentTween._object.scrollTop !== scrollTop) { this.zone.runOutsideAngular(() => { animationRequest = requestAnimationFrame(animate); }); } }; animate(); } addParentEventHandlers(parentScroll) { this.removeParentEventHandlers(); if (parentScroll) { this.zone.runOutsideAngular(() => { this.disposeScrollHandler = this.renderer.listen(parentScroll, 'mousewheel', _.throttle(this.refreshHandler, 20, { leading: false, trailing: true })); this.renderer.listen(parentScroll, 'scroll', _.debounce(this.refreshHandler, 150)); //this.renderer.listen(parentScroll, 'scroll', _.debounce(_.throttle(this.refreshHandler, 150), 50)); if (parentScroll instanceof Window) { this.disposeScrollHandler = this.renderer.listen('window', 'resize', _.debounce(this.refreshHandler, 250)); } }); } } removeParentEventHandlers() { if (this.disposeScrollHandler) { this.disposeScrollHandler(); this.disposeScrollHandler = undefined; } if (this.disposeResizeHandler) { this.disposeResizeHandler(); this.disposeResizeHandler = undefined; } } countItemsPerRow() { let offsetTop; let itemsPerRow; let children = this.contentElementRef.nativeElement.children; for (itemsPerRow = 0; itemsPerRow < children.length; itemsPerRow++) { if (offsetTop != undefined && offsetTop !== children[itemsPerRow].offsetTop) break; offsetTop = children[itemsPerRow].offsetTop; } return itemsPerRow; } getElementsOffset() { let offsetTop = 0; if (this.containerElementRef && this.containerElementRef.nativeElement) { offsetTop += this.containerElementRef.nativeElement.offsetTop; } if (this.parentScroll) { offsetTop += this.element.nativeElement.offsetTop; } return offsetTop; } calculateDimensions() { let el = this.parentScroll instanceof Window ? document.body : this.parentScroll || this.element.nativeElement; let itemCount = this.totalRows; let viewWidth = el.clientWidth - this.scrollbarWidth; let viewHeight = el.clientHeight - this.scrollbarHeight; let contentDimensions; if (this.childWidth == undefined || this.childHeight == undefined) { let content = this.contentElementRef.nativeElement; if (this.containerElementRef && this.containerElementRef.nativeElement) { content = this.containerElementRef.nativeElement; } contentDimensions = content.children[0] ? content.children[0].getBoundingClientRect() : { width: viewWidth, height: viewHeight }; } let childWidth = this.childWidth || contentDimensions.width; let childHeight = this.childHeight || contentDimensions.height; let itemsPerRow = Math.max(1, this.countItemsPerRow()); let itemsPerRowByCalc = Math.max(1, Math.floor(viewWidth / childWidth)); let itemsPerCol = Math.max(1, Math.floor(viewHeight / childHeight)); let elScrollTop = this.parentScroll instanceof Window ? window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 : el.scrollTop; let scrollTop = Math.max(0, elScrollTop); var scrollHeight = childHeight * Math.floor(itemCount / itemsPerRow) + (itemCount % itemsPerRow != 0 ? childHeight : 0); let ua = navigator.userAgent; /*if (this.isTable && (ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0 || ua.indexOf('Edge/') >= 0)) { scrollHeight += 34; }*/ if (itemsPerCol === 1 && Math.floor((scrollTop / scrollHeight) * itemCount) + itemsPerRowByCalc >= itemCount) { itemsPerRow = itemsPerRowByCalc; } if (scrollHeight !== this.lastScrollHeight) { this.renderer.setStyle(this.shimElementRef.nativeElement, 'height', `${scrollHeight}px`); this.lastScrollHeight = scrollHeight; } return { itemCount: itemCount, viewWidth: viewWidth, viewHeight: viewHeight, childWidth: childWidth, childHeight: childHeight, itemsPerRow: itemsPerRow, itemsPerCol: itemsPerCol, itemsPerRowByCalc: itemsPerRowByCalc, scrollHeight }; } calculateItems(forceViewportUpdate = false) { if (!this.doNotCheckAngularZone) { NgZone.assertNotInAngularZone(); } let el = this.parentScroll instanceof Window ? document.body : this.parentScroll || this.element.nativeElement; let d = this.calculateDimensions(); //let items = this.items || []; let offsetTop = this.getElementsOffset(); let elScrollTop = this.parentScroll instanceof Window ? window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 : el.scrollTop; if (elScrollTop > d.scrollHeight) { elScrollTop = d.scrollHeight + offsetTop; } let scrollTop = Math.max(0, elScrollTop - offsetTop); let indexByScrollTop = ((scrollTop / d.scrollHeight) * d.itemCount) / d.itemsPerRow; let end = Math.min(d.itemCount, Math.ceil(indexByScrollTop) * d.itemsPerRow + d.itemsPerRow * (d.itemsPerCol + 1)); let maxStartEnd = end; const modEnd = end % d.itemsPerRow; if (modEnd) { maxStartEnd = end + d.itemsPerRow - modEnd; } let maxStart = Math.max(0, maxStartEnd - d.itemsPerCol * d.itemsPerRow - d.itemsPerRow); let start = Math.min(maxStart, Math.floor(indexByScrollTop) * d.itemsPerRow); let startRow = Math.ceil(start / d.itemsPerRow); const topPadding = this.totalRows === 0 ? 0 : d.childHeight * startRow - d.childHeight * Math.min(startRow, this.bufferAmount); if (topPadding !== this.lastTopPadding) { this.renderer.setStyle(this.contentElementRef.nativeElement, 'transform', `translateY(${topPadding}px)`); this.renderer.setStyle(this.contentElementRef.nativeElement, 'webkitTransform', `translateY(${topPadding}px)`); this.lastTopPadding = topPadding; } let buffer = this.bufferAmount * d.itemsPerRow; start = !isNaN(start) ? start : -1; end = !isNaN(end) ? end : -1; start -= buffer; start = Math.max(0, start); end += buffer; end = Math.min(this.totalRows, end); if (start !== this.previousStart || end !== this.previousEnd || forceViewportUpdate === true) { this.zone.run(() => { // update the scroll list end = end >= 0 ? end : 0; // To prevent from accidentally selecting the entire array with a negative 1 (-1) in the end position. //this.viewPortItems = this.items.slice(start, end); //this.update.emit(this.viewPortItems); // emit 'start' event //if (start !== this.previousStart && this.startupLoop === false) { // this.start.emit({ start, end }); //} // emit 'end' event //if (end !== this.previousEnd && this.startupLoop === false) { // this.end.emit({ start, end }); //} // To know if to add at the start of the list or at the end. let addAtStart = this.previousEnd >= end; this.previousStart = start; this.previousEnd = end; if (this.startupLoop === true) { this.refresh(); } else { let calculatedChildHeight = d.childHeight; this.change.emit({ start, end, addAtStart, calculatedChildHeight }); } }); } else if (this.startupLoop === true) { this.startupLoop = false; // Added to know when the scroll is ready (UI elements are displayed already). this.load.emit(); this.refresh(); } } } VirtualScrollComponent.ɵfac = function VirtualScrollComponent_Factory(t) { return new (t || VirtualScrollComponent)(ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(NgZone)); }; VirtualScrollComponent.ɵcmp = ɵɵdefineComponent({ type: VirtualScrollComponent, selectors: [["virtual-scroll"], ["", "virtualScroll", ""]], contentQueries: function VirtualScrollComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { ɵɵcontentQuery(dirIndex, _c0, true); } if (rf & 2) { var _t; ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.containerElementRef = _t.first); } }, viewQuery: function VirtualScrollComponent_Query(rf, ctx) { if (rf & 1) { ɵɵviewQuery(_c1, true, ElementRef); ɵɵviewQuery(_c2, true, ElementRef); } if (rf & 2) { var _t; ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.contentElementRef = _t.first); ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.shimElementRef = _t.first); } }, hostVars: 2, hostBindings: function VirtualScrollComponent_HostBindings(rf, ctx) { if (rf & 2) { ɵɵstyleProp("overflow-y", ctx.parentScroll ? "hidden" : "auto"); } }, inputs: { totalRows: "totalRows", scrollbarWidth: "scrollbarWidth", scrollbarHeight: "scrollbarHeight", childWidth: "childWidth", childHeight: "childHeight", bufferAmount: "bufferAmount", scrollAnimationTime: "scrollAnimationTime", doNotCheckAngularZone: "doNotCheckAngularZone", parentScroll: "parentScroll", isTable: "isTable" }, outputs: { change: "change", load: "load", start: "start", end: "end" }, exportAs: ["virtualScroll"], features: [ɵɵNgOnChangesFeature], ngContentSelectors: _c3, decls: 5, vars: 0, consts: [[1, "total-padding"], ["shim", ""], [1, "scrollable-content"], ["content", ""]], template: function VirtualScrollComponent_Template(rf, ctx) { if (rf & 1) { ɵɵprojectionDef(); ɵɵelement(0, "div", 0, 1); ɵɵelementStart(2, "div", 2, 3); ɵɵprojection(4); ɵɵelementEnd(); } }, styles: ["[_nghost-%COMP%] {\n overflow: hidden;\n position: relative;\n display: block;\n -webkit-overflow-scrolling: touch;\n }\n .scrollable-content[_ngcontent-%COMP%] {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n // z-index:495;\n }\n .total-padding[_ngcontent-%COMP%] {\n width: 1px;\n opacity: 0;\n }\n\n .rtl[_ngcontent-%COMP%] {\n .scrollable-content {\n left: unset;\n right: 0;\n }\n }"] }); /*@__PURE__*/ (function () { ɵsetClassMetadata(VirtualScrollComponent, [{ type: Component, args: [{ selector: 'virtual-scroll,[virtualScroll]', exportAs: 'virtualScroll', template: ` <div class="total-padding" #shim></div> <div class="scrollable-content" #content> <ng-content></ng-content> </div> `, host: { '[style.overflow-y]': "parentScroll ? 'hidden' : 'auto'" }, styles: [ ` :host { overflow: hidden; position: relative; display: block; -webkit-overflow-scrolling: touch; } .scrollable-content { top: 0; left: 0; width: 100%; height: 100%; position: absolute; // z-index:495; } .total-padding { width: 1px; opacity: 0; } .rtl { .scrollable-content { left: unset; right: 0; } } ` ] }] }], function () { return [{ type: ElementRef }, { type: Renderer2 }, { type: NgZone }]; }, { totalRows: [{ type: Input }], scrollbarWidth: [{ type: Input }], scrollbarHeight: [{ type: Input }], childWidth: [{ type: Input }], childHeight: [{ type: Input }], bufferAmount: [{ type: Input }], scrollAnimationTime: [{ type: Input }], doNotCheckAngularZone: [{ type: Input }], parentScroll: [{ type: Input }], isTable: [{ type: Input }], change: [{ type: Output }], load: [{ type: Output }], start: [{ type: Output }], end: [{ type: Output }], contentElementRef: [{ type: ViewChild, args: ['content', { read: ElementRef }] }], shimElementRef: [{ type: ViewChild, args: ['shim', { read: ElementRef }] }], containerElementRef: [{ type: ContentChild, args: ['container'] }] }); })(); class VirtualScrollModule { } VirtualScrollModule.ɵmod = ɵɵdefineNgModule({ type: VirtualScrollModule }); VirtualScrollModule.ɵinj = ɵɵdefineInjector({ factory: function VirtualScrollModule_Factory(t) { return new (t || VirtualScrollModule)(); } }); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(VirtualScrollModule, { declarations: [VirtualScrollComponent], exports: [VirtualScrollComponent] }); })(); /*@__PURE__*/ (function () { ɵsetClassMetadata(VirtualScrollModule, [{ type: NgModule, args: [{ exports: [VirtualScrollComponent], declarations: [VirtualScrollComponent] }] }], null, null); })(); const _c0$1 = ["noVirtualScrollCont"]; const _c1$1 = ["tableHeader"]; const _c2$1 = ["selectAllCB"]; function PepperiListComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) { ɵɵelementContainerStart(0); ɵɵelementStart(1, "div", 3); ɵɵtext(2); ɵɵelementEnd(); ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r0 = ɵɵnextContext(); ɵɵadvance(2); ɵɵtextInterpolate(ctx_r0.noDataFoundMsg); } } const _c3$1 = function (a0) { return { visibility: a0 }; }; function PepperiListComponent_ng_container_1_div_1_mat_checkbox_3_Template(rf, ctx) { if (rf & 1) { const _r15 = ɵɵgetCurrentView(); ɵɵelementStart(0, "mat-checkbox", 13, 14); ɵɵlistener("change", function PepperiListComponent_ng_container_1_div_1_mat_checkbox_3_Template_mat_checkbox_change_0_listener($event) { ɵɵrestoreView(_r15); const ctx_r14 = ɵɵnextContext(3); return ctx_r14.selectAllItemsForActions($event); }); ɵɵelementEnd(); } if (rf & 2) { const ctx_r11 = ɵɵnextContext(3); ɵɵproperty("ngStyle", ɵɵpureFunction1(4, _c3$1, ctx_r11.selectionTypeForActions == ctx_r11.SELECTION_TYPE_FOR_ACTIONS.Single || ctx_r11.selectionTypeForActions == ctx_r11.SELECTION_TYPE_FOR_ACTIONS.Multi && ctx_r11.hideAllSelectionInMulti ? "hidden" : "visible"))("indeterminate", ctx_r11.isAllSelected ? ctx_r11.unSelectedItems.size > 0 && ctx_r11.unSelectedItems.size < ctx_r11.totalRows : ctx_r11.selectedItems.size > 0 && !ctx_r11.getIsAllSelectedForActions())("disabled", ctx_r11.disabled || ctx_r11.selectionTypeForActions === ctx_r11.SELECTION_TYPE_FOR_ACTIONS.Single)("checked", ctx_r11.getIsAllSelectedForActions()); } } function PepperiListComponent_ng_container_1_div_1_div_5_label_1_Template(rf, ctx) { if (rf & 1) { ɵɵelementStart(0, "label", 20); ɵɵtext(1); ɵɵelementEnd(); } if (rf & 2) { const field_r16 = ɵɵnextContext().$implicit; ɵɵclassMapInterpolate1("header-label body-sm pull-left flip text-align-", field_r16.Layout.XAlignment, ""); ɵɵpropertyInterpolate("id", field_r16.ApiName); ɵɵpropertyInterpolate("title", field_r16.Title); ɵɵadvance(1); ɵɵtextInterpolate1(" ", field_r16.Title, " "); } } function PepperiListComponent_ng_container_1_div_1_div_5_label_2_Template(rf, ctx) { if (rf & 1) { ɵɵelementStart(0, "label", 21); ɵɵtext(1, "\u00A0"); ɵɵelementEnd(); } if (rf & 2) { const field_r16 = ɵɵnextContext().$implicit; ɵɵpropertyInterpolate("id", field_r16.ApiName); } } function PepperiListComponent_ng_container_1_div_1_div_5_div_3_Template(rf, ctx) { if (rf & 1) { const _r25 = ɵɵgetCurrentView(); ɵɵelementStart(0, "div", 22); ɵɵlistener("mousedown", function PepperiListComponent_ng_container_1_div_1_div_5_div_3_Template_div_mousedown_0_listener($event) { ɵɵrestoreView(_r25); const field_r16 = ɵɵnextContext().$implicit; const ctx_r24 = ɵɵnextContext(3); return ctx_r24.onListResizeStart($event, field_r16.ApiName); }); ɵɵelementStart(1, "mat-icon"); ɵɵelement(2, "pep-icon", 23); ɵɵelementEnd(); ɵɵelementEnd(); } } function PepperiListComponent_ng_container_1_div_1_div_5_div_4_mat_icon_1_Template(rf, ctx) { if (rf & 1) { ɵɵelementStart(0, "mat-icon"); ɵɵelement(1, "pep-icon", 26); ɵɵelementEnd(); } } const _c4 = function (a0) { return { "sort-by": a0 }; }; function PepperiListComponent_ng_container_1_div_1_div_5_div_4_mat_icon_2_Template(rf, ctx) { if (rf & 1) { ɵɵelementStart(0, "mat-icon", 27); ɵɵpipe(1, "translate"); ɵɵelement(2, "pep-icon", 28); ɵɵelementEnd(); } if (rf & 2) { const field_r16 = ɵɵnextContext(2).$implicit; const ctx_r28 = ɵɵnextContext(3); ɵɵpropertyInterpolate("title", ɵɵpipeBind1(1, 2, "Asc")); ɵɵproperty("ngClass", ɵɵpureFunction1(4, _c4, field_r16.ApiName === ctx_r28.sortBy && ctx_r28.isAsc)); } } function PepperiListComponent_ng_container_1_div_1_div_5_div_4_mat_icon_3_Template(rf, ctx) { if (rf & 1) { ɵɵelementStart(0, "mat-icon", 27); ɵɵpipe(1, "translate"); ɵɵelement(2, "pep-icon", 29); ɵɵelementEnd(); } if (rf & 2) { const field_r16 = ɵɵnextContext(2).$implicit; const ctx_r29 = ɵɵnextContext(3); ɵɵpropertyInterpolate("title", ɵɵpipeBind1(1, 2, "Desc")); ɵɵproperty("ngClass", ɵɵpureFunction1(4, _c4, field_r16.ApiName === ctx_r29.sortBy && !ctx_r29.isAsc)); } } const _c5 = function (a0) { return { "has-sorting": a0 }; }; function PepperiListComponent_ng_container_1_div_1_div_5_div_4_Template(rf, ctx) { if (rf & 1) { ɵɵelementStart(0, "div", 24); ɵɵtemplate(1, PepperiListComponent_ng_container_1_div_1_div_5_div_4_mat_icon_1_Template, 2, 0, "mat-icon", 0); ɵɵtemplate(2, PepperiListComponent_ng_container_1_div_1_div_5_div_4_mat_icon_2_Template, 3, 6, "mat-icon", 25); ɵɵtemplate(3, PepperiListComponent_ng_container_1_div_1_div_5_div_4_mat_icon_3_Template, 3, 6, "mat-icon", 25); ɵɵelementEnd(); } if (rf & 2) { const field_r16 = ɵɵnextContext().$implicit; const ctx_r21 = ɵɵnextContext(3); ɵɵproperty("ngClass", ɵɵpureFunction1(4, _c5, field_r16.ApiName === ctx_r21.sortBy)); ɵɵadvance(1); ɵɵproperty("ngIf", field_r16.ApiName !== ctx_r21.sortBy); ɵɵadvance(1); ɵɵproperty("ngIf", field_r16.ApiName === ctx_r21.sortBy && !ctx_r21.isAsc); ɵɵadvance(1); ɵɵproperty("ngIf", field_r16.ApiName === ctx_r21.sortBy && ctx_r21.isAsc); } } const _c6 = function (a0) { return { width: a0 }; }; const _c7 = function (a0, a1, a2, a3, a4) { return { "support-sorting": a0, "has-sorting": a1, "is-resizing": a2, "is-first": a3, "is-last": a4 }; }; function PepperiListComponent_ng_container_1_div_1_div_5_Template(rf, ctx) { if (rf & 1) { const _r34 = ɵɵgetCurrentView(); ɵɵelementStart(0, "div", 15); ɵɵlistener("click", function PepperiListComponent_ng_container_1_div_1_div_5_Template_div_click_0_listener($event) { ɵɵrestoreView(_r34); const field_r16 = ctx.$implicit; const ctx_r33 = ɵɵnextContext(3); return ctx_r33.supportSorting ? ctx_r33.onListSortingChange(field_r16.ApiName, ctx_r33.sortBy !== null && ctx_r33.sortBy != field_r16.ApiName ? true : !ctx_r33.isAsc, $event) : false; }); ɵɵtemplate(1, PepperiListComponent_ng_container_1_div_1_div_5_label_1_Template, 2, 6, "label", 16); ɵɵtemplate(2, PepperiListComponent_ng_container_1_div_1_div_5_label_2_Template, 2, 1, "label", 17); ɵɵtemplate(3, PepperiListComponent_ng_container_1_div_1_div_5_div_3_Template, 3, 0, "div", 18); ɵɵtemplate(4, PepperiListComponent_ng_container_1_div_1_div_5_div_4_Template, 4, 6, "div", 19); ɵɵelementEnd(); } if (rf & 2) { const field_r16 = ctx.$implicit; const j_r17 = ctx.index; const ctx_r12 = ɵɵnextContext(3); ɵɵproperty("ngStyle", ɵɵpureFunction1(6, _c6, field_r16.calcTitleColumnWidthString))("ngClass", ɵɵpureFunction5(8, _c7, ctx_r12.supportSorting, field_r16.ApiName === ctx_r12.sortBy, field_r16.ApiName === ctx_r12.pressedColumn, j_r17 === 0 && ctx_r12.selectionTypeForActions !== ctx_r12.SELECTION_TYPE_FOR_ACTIONS.Multi, j_r17 === (ctx_r12.uiControl == null ? null : ctx_r12.uiControl.ControlFields == null ? null : ctx_r12.uiControl.ControlFields.length) - 1)); ɵɵadvance(1); ɵɵproperty("ngIf", field_r16.Title != ""); ɵɵadvance(1); ɵɵproperty("ngIf", field_r16.Title == ""); ɵɵadvance(1); ɵɵproperty("ngIf", ctx_r12.supportResizing); ɵɵadvance(1); ɵɵproperty("ngIf", ctx_r12.supportSorting); } } const _c8 = function (a0) { return { "below-header-and-top-bar": a0 }; }; function PepperiListComponent_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) { const _r36 = ɵɵgetCurrentView(); ɵɵelementStart(0, "div", 8, 9); ɵɵlistener("mouseup", function PepperiListComponent_ng_container_1_div_1_Template_div_mouseup_0_listener($event) { ɵɵrestoreView(_r36); const ctx_r35 = ɵɵnextContext(2); return ctx_r35.onListResizeEnd($event); })("mouseenter", function PepperiListComponent_ng_container_1_div_1_Template_div_mouseenter_0_listener($event) { ɵɵrestoreView(_r36); const ctx_r37 = ɵɵnextContext(2); return ctx_r37.onListHeaderMouseEnter($event); })("mouseleave", function PepperiListComponent_ng_container_1_div_1_Template_div_mouseleave_0_listener($event) { ɵɵrestoreView(_r36); const ctx_r38 = ɵɵnextContext(2); return ctx_r38.onListHeaderMouseLeave($event); })("mousemove", function PepperiListComponent_ng_container_1_div_1_Template_div_mousemove_0_listener($event) { ɵɵrestoreView(_r36); const ctx_r39 = ɵɵnextContext(2); return ctx_r39.onListResize($event); }); ɵɵelementStart(2, "fieldset", 10); ɵɵtemplate(3, PepperiListComponent_ng_container_1_div_1_mat_checkbox_3_Template, 2, 6, "mat-checkbox", 11); ɵɵelementStart(4, "fieldset"); ɵɵtemplate(5, PepperiListComponent_ng_container_1_div_1_div_5_Template, 5, 14, "div", 12); ɵɵelementEnd(); ɵɵelementEnd(); ɵɵelementEnd(); } if (rf & 2) { const ctx_r6 = ɵɵnextContext(2); ɵɵproperty("ngClass", ɵɵpureFunction1(3, _c8, ctx_r6.parentScroll == null)); ɵɵadvance(3); ɵɵproperty("ngIf", ctx_r6.selectionTypeForActions !== ctx_r6.SELECTION_TYPE_FOR_ACTIONS.None); ɵɵadvance(2); ɵɵproperty("ngForOf", ctx_r6.uiControl == null ? null : ctx_r6.uiControl.ControlFields); } } function PepperiListComponent_ng_container_1_virtual_scroll_2_ng_container_1_Template(rf, ctx) { if (rf & 1) { ɵɵelementContainer(0); } } const _c9 = function (a0, a1) { return { "table-body": a0, "cards-body": a1 }; }; function PepperiListComponent_ng_container_1_virtual_scroll_2_Template(rf, ctx) { if (rf & 1) { const _r42 = ɵɵgetCurrentView(); ɵɵelementStart(0, "virtual-scroll", 30); ɵɵlistener("load", function PepperiListComponent_ng_container_1_virtual_scroll_2_Template_virtual_scroll_load_0_listener($event) { ɵɵrestoreView(_r42); const ctx_r41 = ɵɵnextContext(2); return ctx_r41.onListLoad($event); })("change", function PepperiListComponent_ng_container_1_virtual_scroll_2_Template_virtual_scroll_change_0_listener($event) { ɵɵrestoreView(_r42); const ctx_r43 = ɵɵnextContext(2); return ctx_r43.onListChange($event); }); ɵɵtemplate(1, PepperiListComponent_ng_container_1_virtual_scroll_2_ng_container_1_Template, 1, 0, "ng-container", 7); ɵɵelementEnd(); } if (rf & 2) { const ctx_r7 = ɵɵnextContext(2); const _r2 = ɵɵreference(3); ɵɵproperty("totalRows", ctx_r7.totalRows)("isTable", ctx_r7.isTable)("parentScroll", ctx_r7.parentScroll ? ctx_r7.parentScroll : ctx_r7.nativeWindow)("bufferAmount", ctx_r7.isReport ? ctx_r7.isTable ? 20 : 3 : ctx_r7.isTable ? 15 : 3)("ngClass", ɵɵpureFunction2(6, _c9, ctx_r7.isTable, !ctx_r7.isTable)); ɵɵadvance(1); ɵɵproperty("ngTemplateOutlet", _r2); } } function PepperiListComponent_ng_container_1_div_3_ng_container_2_Template(rf, ctx) { if (rf & 1) { ɵɵelementContainer(0); } } function PepperiListComponent_ng_container_1_div_3_Template(rf, ctx) { if (rf & 1) { ɵɵelementStart(0, "div", 31, 32); ɵɵtemplate(2, PepperiListComponent_ng_container_1_div_3_ng_container_2_Template, 1, 0, "ng-container", 7); ɵɵelementEnd(); } if (rf & 2) { const ctx_r8 = ɵɵnextContext(2); const _r2 = ɵɵreference(3); ɵɵproperty("ngClass", ɵɵpureFunction2(2, _c9, ctx_r8.isTable, !ctx_r8.isTable)); ɵɵadvance(2); ɵɵproperty("ngTemplateOutlet", _r2); } } function PepperiListComponent_ng_container_1_ng_container_4_Template(rf, ctx) { if (rf & 1) { ɵɵelementContainer(0); } } function PepperiListComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) { ɵɵelementContainerStart(0); ɵɵtemplate(1, PepperiListComponent_ng_container_1_div_1_Template, 6, 5, "div", 4); ɵɵtemplate(2, PepperiListComponent_ng_container_1_virtual_scroll_2_Template, 2, 9, "virtual-scroll", 5); ɵɵtemplate(3, PepperiListComponent_ng_container_1_div_3_Template, 3, 5, "div", 6); ɵɵtemplate(4, PepperiListComponent_ng_container_1_ng_container_4_Template, 1, 0, "ng-container", 7); ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r1 = ɵɵnextContext(); const _r4 = ɵɵreference(5); ɵɵadvance(1); ɵɵproperty("ngIf", ctx_r1.isTable); ɵɵadvance(1); ɵɵproperty("ngIf", ctx_r1.useVirtualScroll); ɵɵadvance(1); ɵɵproperty("ngIf", !ctx_r1.useVirtualScroll); ɵɵadvance(1); ɵɵproperty("ngTemplateOutlet", _r4); } } function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_mat_checkbox_3_Template(rf, ctx) { if (rf & 1) { const _r55 = ɵɵgetCurrentView(); ɵɵelementStart(0, "mat-checkbox", 39); ɵɵlistener("change", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_mat_checkbox_3_Template_mat_checkbox_change_0_listener($event) { ɵɵrestoreView(_r55); const pepperiObjectInput_r47 = ɵɵnextContext(2).$implicit; const ctx_r54 = ɵɵnextContext(2); return ctx_r54.selectItemForActions($event, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.IsSelectableForActions, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type); }); ɵɵelementEnd(); } if (rf & 2) { const pepperiObjectInput_r47 = ɵɵnextContext(2).$implicit; const ctx_r52 = ɵɵnextContext(2); ɵɵproperty("disabled", ctx_r52.getIsDisabled(pepperiObjectInput_r47))("ngStyle", ɵɵpureFunction1(3, _c3$1, ctx_r52.isTouchDevice || (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID) + ctx_r52.SEPARATOR + (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type) === ctx_r52.hoveredItemId || ctx_r52.isAllSelected || ctx_r52.selectedItems.size > 0 ? "visible" : "hidden"))("checked", ctx_r52.getIsSelectedForActions(pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.IsSelectableForActions, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type)); } } function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_mat_radio_button_4_Template(rf, ctx) { if (rf & 1) { const _r59 = ɵɵgetCurrentView(); ɵɵelementStart(0, "mat-radio-button", 40); ɵɵlistener("change", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_mat_radio_button_4_Template_mat_radio_button_change_0_listener($event) { ɵɵrestoreView(_r59); const pepperiObjectInput_r47 = ɵɵnextContext(2).$implicit; const ctx_r58 = ɵɵnextContext(2); return ctx_r58.selectItemForActions($event, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.IsSelectableForActions, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type); }); ɵɵelementEnd(); } if (rf & 2) { const pepperiObjectInput_r47 = ɵɵnextContext(2).$implicit; const ctx_r53 = ɵɵnextContext(2); ɵɵproperty("disabled", ctx_r53.getIsDisabled(pepperiObjectInput_r47))("checked", ctx_r53.getIsSelectedForActions(pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.IsSelectableForActions, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type)); } } const _c10 = function (a0, a1) { return { selected: a0, highlighted: a1 }; }; const _c11 = function (a0, a1) { return { height: a0, visibility: a1 }; }; const _c12 = function (a0) { return { "background-color": a0 }; }; function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) { const _r63 = ɵɵgetCurrentView(); ɵɵelementContainerStart(0); ɵɵelementStart(1, "div", 34); ɵɵlistener("mouseenter", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_Template_div_mouseenter_1_listener($event) { ɵɵrestoreView(_r63); const pepperiObjectInput_r47 = ɵɵnextContext().$implicit; const ctx_r62 = ɵɵnextContext(2); return ctx_r62.onTableRowMouseEnter($event, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type); })("mouseleave", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_Template_div_mouseleave_1_listener($event) { ɵɵrestoreView(_r63); const pepperiObjectInput_r47 = ɵɵnextContext().$implicit; const ctx_r65 = ɵɵnextContext(2); return ctx_r65.onTableRowMouseLeave($event, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type); }); ɵɵelementStart(2, "fieldset", 35); ɵɵtemplate(3, PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_mat_checkbox_3_Template, 1, 5, "mat-checkbox", 36); ɵɵtemplate(4, PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_mat_radio_button_4_Template, 1, 2, "mat-radio-button", 37); ɵɵelementStart(5, "pep-form", 38); ɵɵlistener("notifyValueChanged", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_Template_pep_form_notifyValueChanged_5_listener($event) { ɵɵrestoreView(_r63); const ctx_r67 = ɵɵnextContext(3); return ctx_r67.onValueChanged($event); })("notifyFieldClicked", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_Template_pep_form_notifyFieldClicked_5_listener($event) { ɵɵrestoreView(_r63); const ctx_r68 = ɵɵnextContext(3); return ctx_r68.onCustomizeFieldClick($event); })("notifyMenuItemClicked", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_Template_pep_form_notifyMenuItemClicked_5_listener($event) { ɵɵrestoreView(_r63); const ctx_r69 = ɵɵnextContext(3); return ctx_r69.onCustomizeFieldMenuClicked($event); })("click", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_1_Template_pep_form_click_5_listener($event) { ɵɵrestoreView(_r63); const pepperiObjectInput_r47 = ɵɵnextContext().$implicit; const ctx_r70 = ɵɵnextContext(2); return ctx_r70.itemClicked($event, pepperiObjectInput_r47); }); ɵɵelementEnd(); ɵɵelementEnd(); ɵɵelementEnd(); ɵɵelementContainerEnd(); } if (rf & 2) { const pepperiObjectInput_r47 = ɵɵnextContext().$implicit; const ctx_r50 = ɵɵnextContext(2); ɵɵadvance(1); ɵɵproperty("ngClass", ɵɵpureFunction2(19, _c10, ctx_r50.isItemSelected(pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type), (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID) + ctx_r50.SEPARATOR + (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type) === ctx_r50.selectedItemId))("ngStyle", ɵɵpureFunction2(22, _c11, ctx_r50.calculatedObjectHeight, ctx_r50.showItems || pepperiObjectInput_r47 ? "visible" : "hidden")); ɵɵadvance(1); ɵɵproperty("ngStyle", ɵɵpureFunction1(25, _c12, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.BackgroundColor)); ɵɵadvance(1); ɵɵproperty("ngIf", ctx_r50.selectionTypeForActions == ctx_r50.SELECTION_TYPE_FOR_ACTIONS.Multi || ctx_r50.selectionTypeForActions == ctx_r50.SELECTION_TYPE_FOR_ACTIONS.SingleAction); ɵɵadvance(1); ɵɵproperty("ngIf", ctx_r50.selectionTypeForActions == ctx_r50.SELECTION_TYPE_FOR_ACTIONS.Single); ɵɵadvance(1); ɵɵproperty("checkForChanges", ctx_r50.checkForChanges)("uiControlHeader", ctx_r50.uiControl)("firstFieldAsLink", ctx_r50.firstFieldAsLink)("pepperiObjectInput", pepperiObjectInput_r47)("canEditObject", !ctx_r50.disabled && (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.IsEditable))("objectId", ctx_r50.objectId)("parentId", ctx_r50.parentId)("searchCode", ctx_r50.searchCode)("lockEvents", ctx_r50.disableSelectionItems)("isReport", ctx_r50.isReport)("layoutType", ctx_r50.LAYOUT_TYPE.PepperiTable)("listType", ctx_r50.listType)("isActive", ((pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID) + ctx_r50.SEPARATOR + (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type) === ctx_r50.selectedItemId || (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID) + ctx_r50.SEPARATOR + (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type) === ctx_r50.hoveredItemId) && !ctx_r50.isTouchDevice)("pageType", ctx_r50.pageType); } } function PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_mat_checkbox_2_Template(rf, ctx) { if (rf & 1) { const _r75 = ɵɵgetCurrentView(); ɵɵelementStart(0, "mat-checkbox", 44); ɵɵlistener("change", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_mat_checkbox_2_Template_mat_checkbox_change_0_listener($event) { ɵɵrestoreView(_r75); const pepperiObjectInput_r47 = ɵɵnextContext(2).$implicit; const ctx_r74 = ɵɵnextContext(2); return ctx_r74.selectItemForActions($event, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.IsSelectableForActions, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type); }); ɵɵelementEnd(); } if (rf & 2) { const pepperiObjectInput_r47 = ɵɵnextContext(2).$implicit; const ctx_r73 = ɵɵnextContext(2); ɵɵproperty("disabled", ctx_r73.getIsDisabled(pepperiObjectInput_r47))("checked", ctx_r73.getIsSelectedForActions(pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.IsSelectableForActions, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type)); } } const _c13 = function (a0, a1, a2) { return { selected: a0, highlighted: a1, cardView: a2 }; }; function PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_Template(rf, ctx) { if (rf & 1) { const _r79 = ɵɵgetCurrentView(); ɵɵelementContainerStart(0); ɵɵelementStart(1, "div", 41); ɵɵlistener("mouseenter", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_Template_div_mouseenter_1_listener($event) { ɵɵrestoreView(_r79); const pepperiObjectInput_r47 = ɵɵnextContext().$implicit; const ctx_r78 = ɵɵnextContext(2); return ctx_r78.onCardMouseEnter($event, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type); })("mouseleave", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_Template_div_mouseleave_1_listener($event) { ɵɵrestoreView(_r79); const pepperiObjectInput_r47 = ɵɵnextContext().$implicit; const ctx_r81 = ɵɵnextContext(2); return ctx_r81.onCardMouseLeave($event, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type); }); ɵɵtemplate(2, PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_mat_checkbox_2_Template, 1, 2, "mat-checkbox", 42); ɵɵelementStart(3, "pep-form", 43); ɵɵlistener("notifyValueChanged", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_Template_pep_form_notifyValueChanged_3_listener($event) { ɵɵrestoreView(_r79); const ctx_r83 = ɵɵnextContext(3); return ctx_r83.onValueChanged($event); })("notifyFieldClicked", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_Template_pep_form_notifyFieldClicked_3_listener($event) { ɵɵrestoreView(_r79); const ctx_r84 = ɵɵnextContext(3); return ctx_r84.onCustomizeFieldClick($event); })("notifyMenuItemClicked", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_Template_pep_form_notifyMenuItemClicked_3_listener($event) { ɵɵrestoreView(_r79); const ctx_r85 = ɵɵnextContext(3); return ctx_r85.onCustomizeFieldMenuClicked($event); })("click", function PepperiListComponent_ng_template_2_ng_container_0_ng_container_2_Template_pep_form_click_3_listener($event) { ɵɵrestoreView(_r79); const pepperiObjectInput_r47 = ɵɵnextContext().$implicit; const ctx_r86 = ɵɵnextContext(2); return ctx_r86.itemClicked($event, pepperiObjectInput_r47); }); ɵɵelementEnd(); ɵɵelementEnd(); ɵɵelementContainerEnd(); } if (rf & 2) { const pepperiObjectInput_r47 = ɵɵnextContext().$implicit; const ctx_r51 = ɵɵnextContext(2); ɵɵadvance(1); ɵɵclassMap(ctx_r51.itemClass); ɵɵproperty("ngClass", ɵɵpureFunction3(19, _c13, ctx_r51.isItemSelected(pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID, pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type), (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID) + ctx_r51.SEPARATOR + (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.Type) === ctx_r51.selectedItemId, ctx_r51.isCardView))("ngStyle", ɵɵpureFunction2(23, _c11, ctx_r51.calculatedObjectHeight, ctx_r51.showItems || pepperiObjectInput_r47 ? "visible" : "hidden")); ɵɵadvance(1); ɵɵproperty("ngIf", ctx_r51.showSelection); ɵɵadvance(1); ɵɵproperty("firstFieldAsLink", ctx_r51.isCardView ? ctx_r51.firstFieldAsLink : false)("checkForChanges", ctx_r51.checkForChanges)("uiControlHeader", ctx_r51.uiControl)("pepperiObjectInput", pepperiObjectInput_r47)("isCardView", ctx_r51.isCardView)("canEditObject", !ctx_r51.disabled && (pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.IsEditable))("objectId", ctx_r51.objectId)("parentId", ctx_r51.parentId)("searchCode", ctx_r51.searchCode)("lockEvents", ctx_r51.disableSelectionItems)("layoutType", ctx_r51.getThumbnailsLayout())("listType", ctx_r51.listType)("isActive", ((pepperiObjectInput_r47 == null ? null : pepperiObjectInput_r47.Data == null ? null : pepperiObjectInput_r47.Data.UID) + ctx_r51.SEPARATOR