@pepperi-addons/ngx-lib 0.4.1-yaron.1 → 0.4.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chips/chips.component.d.ts +13 -2
- package/chips/chips.component.theme.scss +22 -8
- package/chips/chips.model.d.ts +1 -0
- package/core/common/directives/div-loader.directive.d.ts +21 -0
- package/core/common/directives/public-api.d.ts +1 -0
- package/core/common/model/wapi.model.d.ts +1 -0
- package/core/common/services/addon.service.d.ts +5 -0
- package/core/common/services/data-convertor.service.d.ts +1 -0
- package/core/common/services/utilities.service.d.ts +8 -6
- package/core/customization/customization.model.d.ts +1 -3
- package/date/date.component.d.ts +3 -2
- package/dialog/dialog.model.d.ts +7 -7
- package/dialog/dialog.module.d.ts +7 -9
- package/esm2020/address/address.component.mjs +3 -3
- package/esm2020/chips/chips.component.mjs +45 -13
- package/esm2020/chips/chips.model.mjs +1 -1
- package/esm2020/chips/chips.service.mjs +2 -1
- package/esm2020/color/color-picker.component.mjs +3 -3
- package/esm2020/core/common/directives/div-loader.directive.mjs +61 -0
- package/esm2020/core/common/directives/public-api.mjs +2 -1
- package/esm2020/core/common/model/wapi.model.mjs +2 -1
- package/esm2020/core/common/services/addon.service.mjs +52 -1
- package/esm2020/core/common/services/data-convertor.service.mjs +4 -1
- package/esm2020/core/common/services/utilities.service.mjs +80 -42
- package/esm2020/core/common/services/validator.service.mjs +3 -3
- package/esm2020/core/customization/customization.model.mjs +5 -3
- package/esm2020/core/http/interceptors/loader.interceptor.mjs +2 -2
- package/esm2020/date/date.component.mjs +28 -11
- package/esm2020/dialog/dialog.component.mjs +1 -1
- package/esm2020/dialog/dialog.model.mjs +4 -4
- package/esm2020/dialog/dialog.module.mjs +1 -9
- package/esm2020/field-title/field-title.component.mjs +2 -2
- package/esm2020/form/field-generator.component.mjs +8 -9
- package/esm2020/form/form.component.mjs +16 -6
- package/esm2020/form/form.module.mjs +4 -1
- package/esm2020/form/internal-field-generator.component.mjs +8 -9
- package/esm2020/form/internal-form.component.mjs +4 -4
- package/esm2020/icon/icon-generated-all.model.mjs +10 -4
- package/esm2020/icon/icon-generated.model.mjs +28 -4
- package/esm2020/link/link.component.mjs +19 -33
- package/esm2020/link/public-api.mjs +2 -1
- package/esm2020/list/list-pager.component.mjs +3 -3
- package/esm2020/list/list.component.mjs +55 -25
- package/esm2020/list/virtual-scroller.mjs +21 -13
- package/esm2020/ngx-lib.module.mjs +7 -3
- package/esm2020/profile-data-views-list/profile-data-views-list.component.mjs +1 -1
- package/esm2020/quantity-selector/quantity-selector-validation.directive.mjs +7 -5
- package/esm2020/quantity-selector/quantity-selector.component.mjs +89 -45
- package/esm2020/query-builder/common/model/type-map.mjs +2 -2
- package/esm2020/query-builder/query-builder-item/query-builder-item.component.mjs +1 -1
- package/esm2020/remote-loader/addon-block-loader.component.mjs +1 -1
- package/esm2020/remote-loader/remote-loader-element.component.mjs +14 -7
- package/esm2020/rich-html-textarea/rich-html-textarea.component.mjs +3 -3
- package/esm2020/select/select.component.mjs +7 -7
- package/esm2020/select-panel/pepperi-addons-ngx-lib-select-panel.mjs +5 -0
- package/esm2020/select-panel/public-api.mjs +7 -0
- package/esm2020/select-panel/select-panel.component.mjs +159 -0
- package/esm2020/select-panel/select-panel.model.mjs +2 -0
- package/esm2020/select-panel/select-panel.module.mjs +70 -0
- package/esm2020/smart-filters/boolean-filter/boolean-filter.component.mjs +3 -3
- package/esm2020/smart-filters/common/model/base-filter-component.mjs +5 -4
- package/esm2020/smart-filters/date-filter/date-filter.component.mjs +3 -3
- package/esm2020/smart-filters/multi-select-filter/multi-select-filter.component.mjs +1 -1
- package/esm2020/smart-filters/number-filter/number-filter.component.mjs +13 -3
- package/esm2020/smart-filters/text-filter/text-filter.component.mjs +4 -3
- package/esm2020/textarea/textarea.component.mjs +9 -3
- package/esm2020/textbox/textbox-validation.directive.mjs +9 -5
- package/esm2020/textbox/textbox.component.mjs +171 -78
- package/fesm2015/pepperi-addons-ngx-lib-address.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-address.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-chips.mjs +46 -13
- package/fesm2015/pepperi-addons-ngx-lib-chips.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-color.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-color.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-date.mjs +27 -10
- package/fesm2015/pepperi-addons-ngx-lib-date.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-dialog.mjs +3 -11
- package/fesm2015/pepperi-addons-ngx-lib-dialog.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-field-title.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-field-title.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs +35 -24
- package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-icon.mjs +37 -7
- package/fesm2015/pepperi-addons-ngx-lib-icon.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-link.mjs +19 -33
- package/fesm2015/pepperi-addons-ngx-lib-link.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-list.mjs +121 -83
- package/fesm2015/pepperi-addons-ngx-lib-list.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +96 -50
- package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +13 -6
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs +2 -2
- package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs +237 -0
- package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-lib-select.mjs +6 -6
- package/fesm2015/pepperi-addons-ngx-lib-select.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +24 -12
- package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs +8 -2
- package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +180 -83
- package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib.mjs +2994 -2831
- package/fesm2015/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-address.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-address.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-chips.mjs +45 -13
- package/fesm2020/pepperi-addons-ngx-lib-chips.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-color.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-color.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-date.mjs +27 -10
- package/fesm2020/pepperi-addons-ngx-lib-date.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-dialog.mjs +3 -11
- package/fesm2020/pepperi-addons-ngx-lib-dialog.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-field-title.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-field-title.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs +35 -24
- package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-icon.mjs +37 -7
- package/fesm2020/pepperi-addons-ngx-lib-icon.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-link.mjs +19 -33
- package/fesm2020/pepperi-addons-ngx-lib-link.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-list.mjs +121 -82
- package/fesm2020/pepperi-addons-ngx-lib-list.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs +96 -50
- package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +13 -6
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs +2 -2
- package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs +236 -0
- package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-lib-select.mjs +6 -6
- package/fesm2020/pepperi-addons-ngx-lib-select.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs +24 -12
- package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs +8 -2
- package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +180 -82
- package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib.mjs +2970 -2816
- package/fesm2020/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/form/field-generator.component.d.ts +1 -3
- package/form/form.component.d.ts +1 -1
- package/form/form.module.d.ts +9 -8
- package/form/internal-field-generator.component.d.ts +1 -3
- package/form/internal-form.component.d.ts +1 -1
- package/icon/icon-generated-all.model.d.ts +6 -0
- package/icon/icon-generated.model.d.ts +25 -1
- package/link/link.component.d.ts +2 -10
- package/link/public-api.d.ts +1 -0
- package/list/list.component.d.ts +6 -3
- package/list/virtual-scroller.d.ts +5 -5
- package/ngx-lib.module.d.ts +10 -9
- package/package.json +9 -1
- package/quantity-selector/quantity-selector-validation.directive.d.ts +3 -2
- package/quantity-selector/quantity-selector.component.d.ts +11 -6
- package/remote-loader/remote-loader-element.component.d.ts +5 -3
- package/select/select.component.d.ts +2 -2
- package/select-panel/index.d.ts +5 -0
- package/select-panel/public-api.d.ts +3 -0
- package/select-panel/select-panel.component.d.ts +51 -0
- package/select-panel/select-panel.component.theme.scss +25 -0
- package/select-panel/select-panel.model.d.ts +5 -0
- package/select-panel/select-panel.module.d.ts +19 -0
- package/smart-filters/common/model/base-filter-component.d.ts +3 -2
- package/src/core/style/base/typography.scss +1 -1
- package/src/core/style/components/checkbox.scss +4 -0
- package/src/core/style/components/radio-button.scss +1 -0
- package/src/core/style/components/textarea.scss +8 -2
- package/textarea/textarea.component.d.ts +3 -1
- package/textbox/textbox-validation.directive.d.ts +3 -2
- package/textbox/textbox.component.d.ts +21 -22
- package/theming-offline.scss +79 -0
- package/theming.scss +4 -31
|
@@ -59,6 +59,7 @@ class VirtualScrollerComponent {
|
|
|
59
59
|
this.ssrViewportHeight = 1080;
|
|
60
60
|
this._items = [];
|
|
61
61
|
this.compareItems = (item1, item2) => item1 === item2;
|
|
62
|
+
// private _lastChildRect: DOMRect = null;
|
|
62
63
|
this.vsChildRectChange = new EventEmitter();
|
|
63
64
|
this.vsUpdate = new EventEmitter();
|
|
64
65
|
this.vsChange = new EventEmitter();
|
|
@@ -128,7 +129,7 @@ class VirtualScrollerComponent {
|
|
|
128
129
|
return this._bufferAmount;
|
|
129
130
|
}
|
|
130
131
|
else {
|
|
131
|
-
return this.enableUnequalChildrenSizes ? 5 :
|
|
132
|
+
return this.enableUnequalChildrenSizes ? 5 : 0;
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
set bufferAmount(value) {
|
|
@@ -249,8 +250,8 @@ class VirtualScrollerComponent {
|
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
252
|
}
|
|
252
|
-
refresh() {
|
|
253
|
-
this.refresh_internal(true);
|
|
253
|
+
refresh(refreshCompletedCallback = undefined) {
|
|
254
|
+
this.refresh_internal(true, refreshCompletedCallback);
|
|
254
255
|
}
|
|
255
256
|
invalidateAllCachedMeasurements() {
|
|
256
257
|
this.wrapGroupDimensions = {
|
|
@@ -387,10 +388,14 @@ class VirtualScrollerComponent {
|
|
|
387
388
|
bottom: result.bottom + marginBottom,
|
|
388
389
|
left: result.left + marginLeft,
|
|
389
390
|
right: result.right + marginRight,
|
|
390
|
-
width: result.width + marginLeft + marginRight,
|
|
391
|
-
height: result.height + marginTop + marginBottom
|
|
391
|
+
width: parseFloat((result.width + marginLeft + marginRight).toFixed(3)),
|
|
392
|
+
height: parseFloat((result.height + marginTop + marginBottom).toFixed(3))
|
|
392
393
|
};
|
|
393
394
|
}
|
|
395
|
+
getContent() {
|
|
396
|
+
const content = (this.containerElementRef && this.containerElementRef.nativeElement) || this.contentElementRef.nativeElement;
|
|
397
|
+
return content;
|
|
398
|
+
}
|
|
394
399
|
checkScrollElementResized() {
|
|
395
400
|
const boundingRect = this.getElementSize(this.getScrollElement());
|
|
396
401
|
let sizeChanged;
|
|
@@ -650,7 +655,7 @@ class VirtualScrollerComponent {
|
|
|
650
655
|
return Math.round(this.horizontal ? this.ssrViewportHeight / this.ssrChildHeight : this.ssrViewportWidth / this.ssrChildWidth);
|
|
651
656
|
}
|
|
652
657
|
const propertyName = this.horizontal ? 'offsetLeft' : 'offsetTop';
|
|
653
|
-
const children =
|
|
658
|
+
const children = this.getContent().children;
|
|
654
659
|
const childrenLength = children ? children.length : 0;
|
|
655
660
|
if (childrenLength === 0) {
|
|
656
661
|
return 1;
|
|
@@ -707,7 +712,7 @@ class VirtualScrollerComponent {
|
|
|
707
712
|
this.calculatedScrollbarWidth = Math.max(Math.min(scrollElement.offsetWidth - scrollElement.clientWidth, maxCalculatedScrollBarSize), this.calculatedScrollbarWidth);
|
|
708
713
|
let viewportWidth = scrollElement.offsetWidth - (this.scrollbarWidth || this.calculatedScrollbarWidth || (this.horizontal ? 0 : maxCalculatedScrollBarSize));
|
|
709
714
|
let viewportHeight = scrollElement.offsetHeight - (this.scrollbarHeight || this.calculatedScrollbarHeight || (this.horizontal ? maxCalculatedScrollBarSize : 0));
|
|
710
|
-
const content =
|
|
715
|
+
const content = this.getContent();
|
|
711
716
|
const itemsPerWrapGroup = this.countItemsPerWrapGroup();
|
|
712
717
|
let wrapGroupsPerPage;
|
|
713
718
|
let defaultChildWidth;
|
|
@@ -736,11 +741,14 @@ class VirtualScrollerComponent {
|
|
|
736
741
|
this.minMeasuredChildWidth = Math.min(this.minMeasuredChildWidth, clientRect.width);
|
|
737
742
|
this.minMeasuredChildHeight = Math.min(this.minMeasuredChildHeight, clientRect.height);
|
|
738
743
|
// Added for getting the child height (for card view, return all the clientRect object).
|
|
739
|
-
if (this._lastChildRect
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
+
// if (this._lastChildRect === null ||
|
|
745
|
+
// (clientRect?.height !== 0 && (
|
|
746
|
+
// Math.round(this._lastChildRect?.height) !== Math.round(clientRect?.height) ||
|
|
747
|
+
// Math.round(this._lastChildRect?.width) !== Math.round(clientRect?.width))
|
|
748
|
+
// )) {
|
|
749
|
+
// this._lastChildRect = clientRect;
|
|
750
|
+
// this.vsChildRectChange.emit(clientRect);
|
|
751
|
+
// }
|
|
744
752
|
}
|
|
745
753
|
defaultChildWidth = this.childWidth || this.minMeasuredChildWidth || viewportWidth;
|
|
746
754
|
defaultChildHeight = this.childHeight || this.minMeasuredChildHeight || viewportHeight;
|
|
@@ -1192,11 +1200,11 @@ class PepListPagerComponent {
|
|
|
1192
1200
|
}
|
|
1193
1201
|
}
|
|
1194
1202
|
PepListPagerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListPagerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.PepLayoutService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1195
|
-
PepListPagerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListPagerComponent, selector: "pep-list-pager", inputs: { disabled: "disabled", pageIndex: "pageIndex", length: "length", pageSize: "pageSize" }, outputs: { pagerChange: "pagerChange" }, ngImport: i0, template: "<div class=\"pager-container body-sm\">\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_PAGE' | translate }}</span>\n <pep-textbox pepAutoWidth class=\"page-index pep-spacing-element\" [key]=\"'pageIndex'\" [type]=\"'int'\"\n [disabled]=\"disabled\" [xAlignment]=\"'center'\" [renderTitle]=\"false\" [renderError]=\"false\" [renderSymbol]=\"false\"\n [value]=\"pageIndex + 1\" [
|
|
1203
|
+
PepListPagerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListPagerComponent, selector: "pep-list-pager", inputs: { disabled: "disabled", pageIndex: "pageIndex", length: "length", pageSize: "pageSize" }, outputs: { pagerChange: "pagerChange" }, ngImport: i0, template: "<div class=\"pager-container body-sm\">\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_PAGE' | translate }}</span>\n <pep-textbox pepAutoWidth class=\"page-index pep-spacing-element\" [key]=\"'pageIndex'\" [type]=\"'int'\"\n [disabled]=\"disabled\" [xAlignment]=\"'center'\" [renderTitle]=\"false\" [renderError]=\"false\" [renderSymbol]=\"false\"\n [value]=\"pageIndex + 1\" [minValue]=\"1\" [maxValue]=\"this.getNumberOfPages()\"\n [maxFieldCharacters]=\"6\" [mandatory]=\"true\" (valueChange)=\"onValueChange($event)\">\n </pep-textbox>\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_OUT_OF' | translate }}</span>\n <span class=\"pep-spacing-element\">{{ getNumberOfPages() }}</span>\n <button mat-button [disabled]=\"disabled || _previousButtonsDisabled()\"\n [ngClass]=\"{ disabled: disabled || _previousButtonsDisabled() }\"\n class=\"pep-button icon-button pep-spacing-element sm weak\" pepRtlDirection pepMenuBlur (click)=\"previousPage()\"\n [title]=\"('LIST.PAGER_PREVIOUS' | translate)\">\n <mat-icon>\n <pep-icon [name]=\"layoutService.isRtl() ? 'arrow_right' : 'arrow_left'\"></pep-icon>\n </mat-icon>\n </button>\n <button mat-button [disabled]=\"disabled || _nextButtonsDisabled()\"\n [ngClass]=\"{ disabled: disabled || _nextButtonsDisabled() }\"\n class=\"pep-button icon-button pep-spacing-element sm weak\" pepRtlDirection pepMenuBlur (click)=\"nextPage()\"\n [title]=\"('LIST.PAGER_NEXT' | translate)\">\n <mat-icon>\n <pep-icon [name]=\"layoutService.isRtl() ? 'arrow_left' : 'arrow_right'\"></pep-icon>\n </mat-icon>\n </button>\n</div>", styles: [".pager-container{display:flex;justify-content:center;align-items:center;height:calc(2rem + calc(var(--pep-spacing-sm, .5rem) * 2));padding:var(--pep-spacing-sm, .5rem)}.pager-container .page-index{min-height:unset;margin-bottom:0}.pager-container .page-index ::ng-deep .mat-form-field-flex{padding:0 .5rem;min-height:2rem}.pager-container .page-index ::ng-deep .mat-form-field-flex .mat-input-element{min-width:1.25rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.PepInputAutoWidthDirective, selector: "[pepAutoWidth]", inputs: ["includePadding"] }, { kind: "directive", type: i1.PepMenuBlurDirective, selector: "[pepMenuBlur]" }, { kind: "directive", type: i1.PepRtlDirectionDirective, selector: "[pepRtlDirection]" }, { kind: "component", type: i5.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i6.PepTextboxComponent, selector: "pep-textbox", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "accessory", "label", "placeholder", "type", "mandatory", "disabled", "readonly", "maxFieldCharacters", "hint", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey", "regex", "regexError", "isInFocus"], outputs: ["valueChange", "keyup"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1196
1204
|
PepListPagerComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListPagerComponent });
|
|
1197
1205
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListPagerComponent, decorators: [{
|
|
1198
1206
|
type: Component,
|
|
1199
|
-
args: [{ selector: 'pep-list-pager', template: "<div class=\"pager-container body-sm\">\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_PAGE' | translate }}</span>\n <pep-textbox pepAutoWidth class=\"page-index pep-spacing-element\" [key]=\"'pageIndex'\" [type]=\"'int'\"\n [disabled]=\"disabled\" [xAlignment]=\"'center'\" [renderTitle]=\"false\" [renderError]=\"false\" [renderSymbol]=\"false\"\n [value]=\"pageIndex + 1\" [
|
|
1207
|
+
args: [{ selector: 'pep-list-pager', template: "<div class=\"pager-container body-sm\">\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_PAGE' | translate }}</span>\n <pep-textbox pepAutoWidth class=\"page-index pep-spacing-element\" [key]=\"'pageIndex'\" [type]=\"'int'\"\n [disabled]=\"disabled\" [xAlignment]=\"'center'\" [renderTitle]=\"false\" [renderError]=\"false\" [renderSymbol]=\"false\"\n [value]=\"pageIndex + 1\" [minValue]=\"1\" [maxValue]=\"this.getNumberOfPages()\"\n [maxFieldCharacters]=\"6\" [mandatory]=\"true\" (valueChange)=\"onValueChange($event)\">\n </pep-textbox>\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_OUT_OF' | translate }}</span>\n <span class=\"pep-spacing-element\">{{ getNumberOfPages() }}</span>\n <button mat-button [disabled]=\"disabled || _previousButtonsDisabled()\"\n [ngClass]=\"{ disabled: disabled || _previousButtonsDisabled() }\"\n class=\"pep-button icon-button pep-spacing-element sm weak\" pepRtlDirection pepMenuBlur (click)=\"previousPage()\"\n [title]=\"('LIST.PAGER_PREVIOUS' | translate)\">\n <mat-icon>\n <pep-icon [name]=\"layoutService.isRtl() ? 'arrow_right' : 'arrow_left'\"></pep-icon>\n </mat-icon>\n </button>\n <button mat-button [disabled]=\"disabled || _nextButtonsDisabled()\"\n [ngClass]=\"{ disabled: disabled || _nextButtonsDisabled() }\"\n class=\"pep-button icon-button pep-spacing-element sm weak\" pepRtlDirection pepMenuBlur (click)=\"nextPage()\"\n [title]=\"('LIST.PAGER_NEXT' | translate)\">\n <mat-icon>\n <pep-icon [name]=\"layoutService.isRtl() ? 'arrow_left' : 'arrow_right'\"></pep-icon>\n </mat-icon>\n </button>\n</div>", styles: [".pager-container{display:flex;justify-content:center;align-items:center;height:calc(2rem + calc(var(--pep-spacing-sm, .5rem) * 2));padding:var(--pep-spacing-sm, .5rem)}.pager-container .page-index{min-height:unset;margin-bottom:0}.pager-container .page-index ::ng-deep .mat-form-field-flex{padding:0 .5rem;min-height:2rem}.pager-container .page-index ::ng-deep .mat-form-field-flex .mat-input-element{min-width:1.25rem}\n"] }]
|
|
1200
1208
|
}, {
|
|
1201
1209
|
type: Injectable
|
|
1202
1210
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.PepLayoutService }]; }, propDecorators: { disabled: [{
|
|
@@ -1211,51 +1219,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1211
1219
|
type: Output
|
|
1212
1220
|
}] } });
|
|
1213
1221
|
|
|
1214
|
-
class IsItemSelectedPipe {
|
|
1215
|
-
constructor() {
|
|
1216
|
-
this.SEPARATOR = ',';
|
|
1217
|
-
}
|
|
1218
|
-
getUniqItemId(itemId, itemType = '') {
|
|
1219
|
-
return itemId + this.SEPARATOR + itemType;
|
|
1220
|
-
}
|
|
1221
|
-
transform(item, selectionTypeForActions, selectedItemId, isAllSelected, selectedItems, unSelectedItems) {
|
|
1222
|
-
let isSelected = false;
|
|
1223
|
-
if (selectionTypeForActions === 'single') {
|
|
1224
|
-
isSelected = selectedItemId === this.getUniqItemId(item?.UID, item?.Type.toString());
|
|
1225
|
-
}
|
|
1226
|
-
// else if (selectionTypeForActions === 'single-action') {
|
|
1227
|
-
// isSelected = (isAllSelected && !unSelectedItems.has(item?.UID)) || selectedItems.has(item?.UID);
|
|
1228
|
-
// }
|
|
1229
|
-
else if (selectionTypeForActions === 'multi') {
|
|
1230
|
-
if (item?.IsSelectableForActions) {
|
|
1231
|
-
isSelected = (isAllSelected && !unSelectedItems.has(item?.UID)) || selectedItems.has(item?.UID);
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
return isSelected;
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
IsItemSelectedPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1238
|
-
IsItemSelectedPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, name: "isItemSelected" });
|
|
1239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, decorators: [{
|
|
1240
|
-
type: Pipe,
|
|
1241
|
-
args: [{
|
|
1242
|
-
name: 'isItemSelected'
|
|
1243
|
-
}]
|
|
1244
|
-
}] });
|
|
1245
|
-
class IsItemDisabledPipe {
|
|
1246
|
-
transform(item, lockItemInnerEvents, printMode) {
|
|
1247
|
-
return (printMode || lockItemInnerEvents || (item && !item.IsSelectableForActions));
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
IsItemDisabledPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1251
|
-
IsItemDisabledPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, name: "isItemDisabled" });
|
|
1252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, decorators: [{
|
|
1253
|
-
type: Pipe,
|
|
1254
|
-
args: [{
|
|
1255
|
-
name: 'isItemDisabled'
|
|
1256
|
-
}]
|
|
1257
|
-
}] });
|
|
1258
|
-
|
|
1259
1222
|
class PepListComponent {
|
|
1260
1223
|
constructor(hostElement, layoutService, sessionService, cd, renderer, zone) {
|
|
1261
1224
|
this.hostElement = hostElement;
|
|
@@ -1286,6 +1249,7 @@ class PepListComponent {
|
|
|
1286
1249
|
this.pageSize = DEFAULT_PAGE_SIZE;
|
|
1287
1250
|
this.pageIndex = 0;
|
|
1288
1251
|
// @Input() startIndex = 0;
|
|
1252
|
+
this.bufferAmount = 0;
|
|
1289
1253
|
this.scrollAnimationTime = 500;
|
|
1290
1254
|
this.scrollDebounceTime = 0;
|
|
1291
1255
|
this.scrollThrottlingTime = 0;
|
|
@@ -1329,6 +1293,7 @@ class PepListComponent {
|
|
|
1329
1293
|
this.sortBy = '';
|
|
1330
1294
|
this.isUserSelected = false;
|
|
1331
1295
|
this.checkForChanges = null;
|
|
1296
|
+
this.calculatedObjectHeight = 'auto';
|
|
1332
1297
|
// this.nativeWindow = window;
|
|
1333
1298
|
this.layoutService.onResize$.subscribe((size) => {
|
|
1334
1299
|
this.screenSize = size;
|
|
@@ -1497,13 +1462,14 @@ class PepListComponent {
|
|
|
1497
1462
|
? PepListComponent.TOP_ITEMS_TABLE
|
|
1498
1463
|
: PepListComponent.TOP_ITEMS_THUMBNAILS;
|
|
1499
1464
|
}
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1465
|
+
disableScroll(disable) {
|
|
1466
|
+
if (disable) {
|
|
1467
|
+
this.renderer.addClass(this.hostElement.nativeElement.parentElement, 'lock-events');
|
|
1468
|
+
}
|
|
1469
|
+
else {
|
|
1470
|
+
this.renderer.removeClass(this.hostElement.nativeElement.parentElement, 'lock-events');
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1507
1473
|
toggleLoadingItemsFropApi(loadingItemsFromApi) {
|
|
1508
1474
|
this._loadingItemsFromApi = loadingItemsFromApi;
|
|
1509
1475
|
// this.disableScroll(loadingItemsFromApi);
|
|
@@ -1625,6 +1591,20 @@ class PepListComponent {
|
|
|
1625
1591
|
this.renderer.setStyle(this.hostElement.nativeElement, 'width', totalCalcColsWidth + selectionCheckBoxWidth + 'px');
|
|
1626
1592
|
}
|
|
1627
1593
|
}
|
|
1594
|
+
calcObjectHeight() {
|
|
1595
|
+
setTimeout(() => {
|
|
1596
|
+
if (this.virtualScroller) {
|
|
1597
|
+
const content = this.virtualScroller.getContent();
|
|
1598
|
+
console.log(`content.children.length: ${content.children.length}`);
|
|
1599
|
+
if (content.children.length > 0) {
|
|
1600
|
+
const rect = this.virtualScroller.getElementSize(content.children[0]);
|
|
1601
|
+
this.calculatedObjectHeight = rect.height + 'px';
|
|
1602
|
+
console.log(`this.calculatedObjectHeight: ${this.calculatedObjectHeight}`);
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
this.disableScroll(false);
|
|
1606
|
+
}, 1000);
|
|
1607
|
+
}
|
|
1628
1608
|
initResizeData() {
|
|
1629
1609
|
this.startX = 0;
|
|
1630
1610
|
this.startWidth = 0;
|
|
@@ -1655,7 +1635,7 @@ class PepListComponent {
|
|
|
1655
1635
|
this._items =
|
|
1656
1636
|
this.totalRows > 0 ? Array(this.totalRows) : [];
|
|
1657
1637
|
this.currentPageItems = [];
|
|
1658
|
-
this.calculatedObjectHeight = '';
|
|
1638
|
+
this.calculatedObjectHeight = 'auto';
|
|
1659
1639
|
}
|
|
1660
1640
|
initVariablesFromSession(items) {
|
|
1661
1641
|
const selectedItemsObject = this.sessionService.getObject(PepListComponent.SELECTED_ITEMS_STATE_KEY);
|
|
@@ -1784,11 +1764,10 @@ class PepListComponent {
|
|
|
1784
1764
|
this.hostElement.nativeElement.updatePage = this.updatePage.bind(this);
|
|
1785
1765
|
this.hostElement.nativeElement.updateItem = this.updateItem.bind(this);
|
|
1786
1766
|
}
|
|
1787
|
-
//
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
// }
|
|
1767
|
+
// For refresh the UI when change the is selectable for action on item.
|
|
1768
|
+
getisItemDisabled(item) {
|
|
1769
|
+
return this.printMode || this.lockItemInnerEvents || (item && !item.IsSelectableForActions);
|
|
1770
|
+
}
|
|
1792
1771
|
getIsAllSelectedForActions() {
|
|
1793
1772
|
let res = false;
|
|
1794
1773
|
if (this.isAllSelected) {
|
|
@@ -1981,6 +1960,7 @@ class PepListComponent {
|
|
|
1981
1960
|
this.totalRows = totalRows;
|
|
1982
1961
|
this.scrollToTop(false);
|
|
1983
1962
|
this.cleanItems();
|
|
1963
|
+
this.disableScroll(true);
|
|
1984
1964
|
if (items) {
|
|
1985
1965
|
if (this.pagerType === 'pages') {
|
|
1986
1966
|
// If page index out of bounds - init to 0.
|
|
@@ -1992,6 +1972,7 @@ class PepListComponent {
|
|
|
1992
1972
|
pageIndex: this.pageIndex,
|
|
1993
1973
|
pageSize: this.pageSize,
|
|
1994
1974
|
});
|
|
1975
|
+
this.disableScroll(false);
|
|
1995
1976
|
}
|
|
1996
1977
|
else {
|
|
1997
1978
|
const numberOfStartItems = this.getNumberOfStartItems();
|
|
@@ -2000,11 +1981,20 @@ class PepListComponent {
|
|
|
2000
1981
|
toIndex: numberOfStartItems,
|
|
2001
1982
|
};
|
|
2002
1983
|
this.updateItems(items, event);
|
|
2003
|
-
this.
|
|
1984
|
+
if (this.virtualScroller) {
|
|
1985
|
+
this.refresh(() => {
|
|
1986
|
+
this.calcObjectHeight();
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
else {
|
|
1990
|
+
this.calcObjectHeight();
|
|
1991
|
+
}
|
|
2004
1992
|
}
|
|
2005
1993
|
}
|
|
2006
1994
|
this.setLayout();
|
|
1995
|
+
// setTimeout(() => {
|
|
2007
1996
|
this.onListLoad();
|
|
1997
|
+
// }, 0);
|
|
2008
1998
|
}
|
|
2009
1999
|
updateItems(items, event = null) {
|
|
2010
2000
|
if (!event) {
|
|
@@ -2116,8 +2106,8 @@ class PepListComponent {
|
|
|
2116
2106
|
getItemDataByID(uid) {
|
|
2117
2107
|
return this.items.find((item) => item?.UID.toString() === uid);
|
|
2118
2108
|
}
|
|
2119
|
-
refresh() {
|
|
2120
|
-
this.virtualScroller?.refresh();
|
|
2109
|
+
refresh(refreshCompletedCallback = undefined) {
|
|
2110
|
+
this.virtualScroller?.refresh(refreshCompletedCallback);
|
|
2121
2111
|
}
|
|
2122
2112
|
// ---------------------------------------------------------------
|
|
2123
2113
|
// Events handlers.
|
|
@@ -2287,11 +2277,13 @@ class PepListComponent {
|
|
|
2287
2277
|
this.listLoad.emit();
|
|
2288
2278
|
}, 0);
|
|
2289
2279
|
}
|
|
2290
|
-
onChildRectChange(event) {
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2280
|
+
// onChildRectChange(event: any) {
|
|
2281
|
+
// // Set the calculatedObjectHeight only if he's not set (this case is only for the initialize when virtual scroll is undefined).
|
|
2282
|
+
// // the other cases is handled in calcObjectHeight function.
|
|
2283
|
+
// if (this.calculatedObjectHeight === 'auto') {
|
|
2284
|
+
// this.calculatedObjectHeight = event?.height + 'px';
|
|
2285
|
+
// }
|
|
2286
|
+
// }
|
|
2295
2287
|
onValueChanged(valueChange) {
|
|
2296
2288
|
if (this.disabled) {
|
|
2297
2289
|
return;
|
|
@@ -2316,12 +2308,12 @@ PepListComponent.SORT_BY_STATE_KEY = 'SortBy';
|
|
|
2316
2308
|
PepListComponent.ASCENDING_STATE_KEY = 'IsAscending';
|
|
2317
2309
|
PepListComponent.MINIMUM_COLUMN_WIDTH = 48;
|
|
2318
2310
|
PepListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListComponent, deps: [{ token: i0.ElementRef }, { token: i1.PepLayoutService }, { token: i1.PepSessionService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2319
|
-
PepListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListComponent, selector: "pep-list", inputs: { noDataFoundMsg: "noDataFoundMsg", selectionTypeForActions: "selectionTypeForActions", showCardSelection: "showCardSelection", hideAllSelectionInMulti: "hideAllSelectionInMulti", cardSize: "cardSize", tableViewType: "tableViewType", viewType: "viewType", firstFieldAsLink: "firstFieldAsLink", supportSorting: "supportSorting", supportResizing: "supportResizing", parentScroll: "parentScroll", disabled: "disabled", lockEvents: "lockEvents", lockItemInnerEvents: "lockItemInnerEvents", printMode: "printMode", isReport: "isReport", zebraStripes: "zebraStripes", totalsRow: "totalsRow", pagerType: "pagerType", pageSize: "pageSize", pageIndex: "pageIndex", scrollAnimationTime: "scrollAnimationTime", scrollDebounceTime: "scrollDebounceTime", scrollThrottlingTime: "scrollThrottlingTime", useAsWebComponent: "useAsWebComponent" }, outputs: { itemClick: "itemClick", fieldClick: "fieldClick", valueChange: "valueChange", sortingChange: "sortingChange", selectedItemsChange: "selectedItemsChange", selectedItemChange: "selectedItemChange", selectAllClick: "selectAllClick", listLoad: "listLoad", loadItems: "loadItems", loadPage: "loadPage", startIndexChange: "startIndexChange" }, host: { listeners: { "window:resize": "onWinResize($event)" } }, viewQueries: [{ propertyName: "virtualScroller", first: true, predicate: VirtualScrollerComponent, descendants: true }, { propertyName: "selectAllCB", first: true, predicate: ["selectAllCB"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"totalRows == 0\">\n <ng-container *ngIf=\"noDataFoundMsg; then noDataMsgInputBlock; else noDataMsgDefaultBlock\"></ng-container>\n <ng-template #noDataMsgInputBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ noDataFoundMsg }}\n </p>\n </div>\n </ng-template>\n <ng-template #noDataMsgDefaultBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ 'LIST.NO_DATA_FOUND' | translate}}\n </p>\n </div>\n <div class=\"no-data-suggestions\">\n <p class=\"suggestions-title title-lg\">\n {{ 'LIST.NO_DATA_FOUND_SUGGESTIONS_TITLE' | translate}}\n </p>\n <ul class=\"suggestions-list body-lg\" [innerHtml]=\"'LIST.NO_DATA_FOUND_SUGGESTIONS_LIST' | translate\"></ul>\n </div>\n </ng-template>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <ng-container *ngTemplateOutlet=\"tableHeader\"></ng-container>\n\n <virtual-scroller #scroller [items]=\"pagerType === 'pages' ? currentPageItems : items\"\n [scrollDebounceTime]=\"scrollDebounceTime\" [scrollThrottlingTime]=\"scrollThrottlingTime\"\n [bufferAmount]=\"printMode ? totalRows : -1\" [parentScroll]=\"parentScroll\" [disable]=\"loadingItemsFromApi\"\n class=\"virtual-scroller\" [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\"\n (vsChange)=\"onVirtualScrollerChange($event)\" (vsChildRectChange)=\"onChildRectChange($event)\">\n <ng-container *ngFor=\"let item of scroller.viewPortItems; let index = index; let isFirst = first;\">\n <ng-container *ngTemplateOutlet=\"listData; context: {item: item, index:index}\"></ng-container>\n </ng-container>\n </virtual-scroller>\n\n <pep-list-pager *ngIf=\"pagerType === 'pages'\" class=\" list-pager\" [disabled]=\"loadingItemsFromApi\"\n [length]=\"totalRows\" [pageSize]=\"pageSize\" [pageIndex]=\"pageIndex\" (pagerChange)=\"onPagerChange($event)\">\n </pep-list-pager>\n\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n</ng-container>\n\n<ng-template #listData let-item=\"item\" let-index=\"index\">\n <ng-container *ngIf=\"isTable\">\n <!-- getIsItemSelected(item) -> item | isItemSelected: selectionTypeForActions : selectedItemId : isAllSelected : selectedItems : unSelectedItems -->\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\" \n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n even: zebraStripes && index % 2 !== 0,\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId}\" [ngStyle]=\"{ visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <mat-checkbox *ngIf=\"selectionTypeForActions == 'multi'\" type=\"checkbox\"\n class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"item | isItemDisabled: lockItemInnerEvents : printMode\" [ngStyle]=\"{\n visibility: !deviceHasMouse ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId || isAllSelected || selectedItems.size > 0 ? 'visible' : 'hidden'\n }\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <mat-radio-button *ngIf=\"selectionTypeForActions == 'single'\" name=\"selection\"\n class=\"pull-left flip row-selection pep-radio-button\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"item | isItemDisabled: lockItemInnerEvents : printMode\"\n [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-radio-button>\n <pep-form [layoutType]=\"'table'\" [checkForChanges]=\"checkForChanges\" [layout]=\"layout\"\n [firstFieldAsLink]=\"firstFieldAsLink\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isReport]=\"isReport\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'line-view': viewType === 'lines',\n 'card-view': viewType === 'cards',\n 'small-card': cardSize === 'sm'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: 'initial', visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <mat-checkbox *ngIf=\"showCardSelection\" class=\"pull-left flip card-selection\"\n [disabled]=\"item | isItemDisabled: lockItemInnerEvents : printMode\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <pep-form [layoutType]=\"'card'\" [firstFieldAsLink]=\"firstFieldAsLink\" [checkForChanges]=\"checkForChanges\"\n [layout]=\"layout\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableHeader>\n <div *ngIf=\"isTable\" class=\"table-header\" (mouseup)=\"onListResizeEnd($event)\"\n (mouseenter)=\"onListHeaderMouseEnter($event)\" (mouseleave)=\"onListHeaderMouseLeave($event)\"\n (mousemove)=\"onListResize($event)\">\n\n <div class=\"table-header-padding-top\"></div>\n <fieldset class=\"table-header-fieldset\">\n <mat-checkbox *ngIf=\"selectionTypeForActions !== 'none'\" #selectAllCB class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n type=\"checkbox\" [ngStyle]=\"{\n visibility:\n selectionTypeForActions == 'single' || \n (selectionTypeForActions == 'multi' && hideAllSelectionInMulti) ? 'hidden' : 'visible'\n }\"\n [indeterminate]=\"isAllSelected ? unSelectedItems.size > 0 && unSelectedItems.size < totalRows : (selectedItems.size > 0 && !getIsAllSelectedForActions())\"\n [disabled]=\"disabled || selectionTypeForActions === 'single'\" [checked]=\"getIsAllSelectedForActions()\"\n (change)=\"selectAllItemsForActions($event)\"></mat-checkbox>\n <fieldset>\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n 'support-sorting': supportSorting,\n 'has-sorting': field.ApiName === sortBy,\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0 && selectionTypeForActions !== 'multi',\n 'is-last': j === layout?.ControlFields?.length - 1\n }\"\n (click)=\"supportSorting ? (onListSortingChange(field.ApiName, sortBy !== null && sortBy != field.ApiName ? true : !isAsc, $event)) : false\">\n\n <label id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n <span *ngIf=\"field.Mandatory\" class=\"mandatory\">\n <pep-icon name=\"system_must\"></pep-icon>\n </span>\n {{ field.Title != '' ? field.Title : ' '}}\n </label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName)\">\n <div class=\"splitter\"></div>\n </div>\n\n <div *ngIf=\"supportSorting\" class=\"sorting-box pull-left flip\"\n [ngClass]=\"{ 'has-sorting': field.ApiName === sortBy }\">\n <mat-icon *ngIf=\"field.ApiName !== sortBy\">\n <pep-icon name=\"arrow_either\" class=\"asc\"></pep-icon>\n </mat-icon>\n <ng-container *ngIf=\"field.ApiName === sortBy\">\n <mat-icon *ngIf=\"!isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && isAsc }\"\n title=\"{{ 'LIST.SORT_ASC' | translate }}\">\n <pep-icon name=\"arrow_up\" class=\"asc\"></pep-icon>\n </mat-icon>\n <mat-icon *ngIf=\"isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && !isAsc }\"\n title=\"{{ 'LIST.SORT_DESC' | translate }}\">\n <pep-icon name=\"arrow_down\" class=\"desc\"></pep-icon>\n </mat-icon>\n </ng-container>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n</ng-template>\n\n<ng-template #tableTotal>\n <div *ngIf=\"isTable && totalsRow?.length > 0 && totalsRow.length <= layout?.ControlFields.length\"\n class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"total-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\">\n <label class=\"total-label body-sm text-align-{{ field.Layout.XAlignment }}\">\n {{ totalsRow[j] }}\n </label>\n </div>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:flex;flex-direction:column}.no-data{margin:var(--pep-spacing-2xl, 2rem) 0}.no-data-suggestions .suggestions-title{margin:var(--pep-spacing-lg, 1rem) 0 var(--pep-spacing-sm, .5rem)}.no-data-suggestions .suggestions-list{margin:0;padding:0;padding-inline-start:var(--pep-spacing-2xl, 2rem)}.virtual-scroller{min-height:5rem;height:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i4$1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i7.PepFormComponent, selector: "pep-form", inputs: ["isInternal", "isReport", "layout", "lockEvents", "canEditObject", "data", "lockFields", "isActive", "layoutType", "objectId", "parentId", "searchCode", "showTitle", "firstFieldAsLink", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "fieldClick", "internalFormFieldClick", "internalFormFieldChange"] }, { kind: "component", type: VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["disable", "executeRefreshOutsideAngularZone", "enableUnequalChildrenSizes", "RTL", "useMarginInsteadOfTranslate", "modifyOverflowStyleOfParentScroll", "stripedTable", "scrollbarWidth", "scrollbarHeight", "childWidth", "childHeight", "ssrChildWidth", "ssrChildHeight", "ssrViewportWidth", "ssrViewportHeight", "bufferAmount", "scrollAnimationTime", "resizeBypassRefreshThreshold", "scrollThrottlingTime", "scrollDebounceTime", "checkResizeInterval", "items", "compareItems", "horizontal", "parentScroll"], outputs: ["vsChildRectChange", "vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "component", type: PepListPagerComponent, selector: "pep-list-pager", inputs: ["disabled", "pageIndex", "length", "pageSize"], outputs: ["pagerChange"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: IsItemDisabledPipe, name: "isItemDisabled" }] });
|
|
2311
|
+
PepListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListComponent, selector: "pep-list", inputs: { noDataFoundMsg: "noDataFoundMsg", selectionTypeForActions: "selectionTypeForActions", showCardSelection: "showCardSelection", hideAllSelectionInMulti: "hideAllSelectionInMulti", cardSize: "cardSize", tableViewType: "tableViewType", viewType: "viewType", firstFieldAsLink: "firstFieldAsLink", supportSorting: "supportSorting", supportResizing: "supportResizing", parentScroll: "parentScroll", disabled: "disabled", lockEvents: "lockEvents", lockItemInnerEvents: "lockItemInnerEvents", printMode: "printMode", isReport: "isReport", zebraStripes: "zebraStripes", totalsRow: "totalsRow", pagerType: "pagerType", pageSize: "pageSize", pageIndex: "pageIndex", bufferAmount: "bufferAmount", scrollAnimationTime: "scrollAnimationTime", scrollDebounceTime: "scrollDebounceTime", scrollThrottlingTime: "scrollThrottlingTime", useAsWebComponent: "useAsWebComponent" }, outputs: { itemClick: "itemClick", fieldClick: "fieldClick", valueChange: "valueChange", sortingChange: "sortingChange", selectedItemsChange: "selectedItemsChange", selectedItemChange: "selectedItemChange", selectAllClick: "selectAllClick", listLoad: "listLoad", loadItems: "loadItems", loadPage: "loadPage", startIndexChange: "startIndexChange" }, host: { listeners: { "window:resize": "onWinResize($event)" } }, viewQueries: [{ propertyName: "virtualScroller", first: true, predicate: VirtualScrollerComponent, descendants: true }, { propertyName: "selectAllCB", first: true, predicate: ["selectAllCB"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"totalRows == 0\">\n <ng-container *ngIf=\"noDataFoundMsg; then noDataMsgInputBlock; else noDataMsgDefaultBlock\"></ng-container>\n <ng-template #noDataMsgInputBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ noDataFoundMsg }}\n </p>\n </div>\n </ng-template>\n <ng-template #noDataMsgDefaultBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ 'LIST.NO_DATA_FOUND' | translate}}\n </p>\n </div>\n <div class=\"no-data-suggestions\">\n <p class=\"suggestions-title title-lg\">\n {{ 'LIST.NO_DATA_FOUND_SUGGESTIONS_TITLE' | translate}}\n </p>\n <ul class=\"suggestions-list body-lg\" [innerHtml]=\"'LIST.NO_DATA_FOUND_SUGGESTIONS_LIST' | translate\"></ul>\n </div>\n </ng-template>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <ng-container *ngTemplateOutlet=\"tableHeader\"></ng-container>\n\n <!-- (vsChildRectChange)=\"onChildRectChange($event)\" -->\n <virtual-scroller #scroller [items]=\"pagerType === 'pages' ? currentPageItems : items\"\n [scrollDebounceTime]=\"scrollDebounceTime\" [scrollThrottlingTime]=\"scrollThrottlingTime\"\n [bufferAmount]=\"printMode ? totalRows : bufferAmount\" [parentScroll]=\"parentScroll\" [disable]=\"loadingItemsFromApi\"\n class=\"virtual-scroller\" [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\"\n (vsChange)=\"onVirtualScrollerChange($event)\" >\n <ng-container *ngFor=\"let item of scroller.viewPortItems; let index = index; let isFirst = first;\">\n <ng-container *ngTemplateOutlet=\"listData; context: {item: item, index:index}\"></ng-container>\n </ng-container>\n </virtual-scroller>\n\n <pep-list-pager *ngIf=\"pagerType === 'pages'\" class=\" list-pager\" [disabled]=\"loadingItemsFromApi\"\n [length]=\"totalRows\" [pageSize]=\"pageSize\" [pageIndex]=\"pageIndex\" (pagerChange)=\"onPagerChange($event)\">\n </pep-list-pager>\n\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n</ng-container>\n\n<ng-template #listData let-item=\"item\" let-index=\"index\">\n <ng-container *ngIf=\"isTable\">\n <!-- getIsItemSelected(item) -> item | isItemSelected: selectionTypeForActions : selectedItemId : isAllSelected : selectedItems : unSelectedItems -->\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\" \n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n even: zebraStripes && index % 2 !== 0,\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId}\" [ngStyle]=\"{ visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <mat-checkbox *ngIf=\"selectionTypeForActions == 'multi'\" type=\"checkbox\"\n class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"getisItemDisabled(item)\" [ngStyle]=\"{\n visibility: !deviceHasMouse ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId || isAllSelected || selectedItems.size > 0 ? 'visible' : 'hidden'\n }\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <mat-radio-button *ngIf=\"selectionTypeForActions == 'single'\" name=\"selection\"\n class=\"pull-left flip row-selection pep-radio-button\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"getisItemDisabled(item)\"\n [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-radio-button>\n <pep-form [layoutType]=\"'table'\" [checkForChanges]=\"checkForChanges\" [layout]=\"layout\"\n [firstFieldAsLink]=\"firstFieldAsLink\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isReport]=\"isReport\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'line-view': viewType === 'lines',\n 'card-view': viewType === 'cards',\n 'small-card': cardSize === 'sm'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <mat-checkbox *ngIf=\"showCardSelection\" class=\"pull-left flip card-selection\"\n [disabled]=\"getisItemDisabled(item)\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <pep-form [layoutType]=\"'card'\" [firstFieldAsLink]=\"firstFieldAsLink\" [checkForChanges]=\"checkForChanges\"\n [layout]=\"layout\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableHeader>\n <div *ngIf=\"isTable\" class=\"table-header\" (mouseup)=\"onListResizeEnd($event)\"\n (mouseenter)=\"onListHeaderMouseEnter($event)\" (mouseleave)=\"onListHeaderMouseLeave($event)\"\n (mousemove)=\"onListResize($event)\">\n\n <div class=\"table-header-padding-top\"></div>\n <fieldset class=\"table-header-fieldset\">\n <mat-checkbox *ngIf=\"selectionTypeForActions !== 'none'\" #selectAllCB class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n type=\"checkbox\" [ngStyle]=\"{\n visibility:\n selectionTypeForActions == 'single' || \n (selectionTypeForActions == 'multi' && hideAllSelectionInMulti) ? 'hidden' : 'visible'\n }\"\n [indeterminate]=\"isAllSelected ? unSelectedItems.size > 0 && unSelectedItems.size < totalRows : (selectedItems.size > 0 && !getIsAllSelectedForActions())\"\n [disabled]=\"disabled || selectionTypeForActions === 'single'\" [checked]=\"getIsAllSelectedForActions()\"\n (change)=\"selectAllItemsForActions($event)\"></mat-checkbox>\n <fieldset>\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n 'support-sorting': supportSorting,\n 'has-sorting': field.ApiName === sortBy,\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0 && selectionTypeForActions !== 'multi',\n 'is-last': j === layout?.ControlFields?.length - 1\n }\"\n (click)=\"supportSorting ? (onListSortingChange(field.ApiName, sortBy !== null && sortBy != field.ApiName ? true : !isAsc, $event)) : false\">\n\n <label id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n <span *ngIf=\"field.Mandatory\" class=\"mandatory\">\n <pep-icon name=\"system_must\"></pep-icon>\n </span>\n {{ field.Title != '' ? field.Title : ' '}}\n </label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName)\">\n <div class=\"splitter\"></div>\n </div>\n\n <div *ngIf=\"supportSorting\" class=\"sorting-box pull-left flip\"\n [ngClass]=\"{ 'has-sorting': field.ApiName === sortBy }\">\n <mat-icon *ngIf=\"field.ApiName !== sortBy\">\n <pep-icon name=\"arrow_either\" class=\"asc\"></pep-icon>\n </mat-icon>\n <ng-container *ngIf=\"field.ApiName === sortBy\">\n <mat-icon *ngIf=\"!isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && isAsc }\"\n title=\"{{ 'LIST.SORT_ASC' | translate }}\">\n <pep-icon name=\"arrow_up\" class=\"asc\"></pep-icon>\n </mat-icon>\n <mat-icon *ngIf=\"isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && !isAsc }\"\n title=\"{{ 'LIST.SORT_DESC' | translate }}\">\n <pep-icon name=\"arrow_down\" class=\"desc\"></pep-icon>\n </mat-icon>\n </ng-container>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n</ng-template>\n\n<ng-template #tableTotal>\n <div *ngIf=\"isTable && totalsRow?.length > 0 && totalsRow.length <= layout?.ControlFields.length\"\n class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"total-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\">\n <label class=\"total-label body-sm text-align-{{ field.Layout.XAlignment }}\">\n {{ totalsRow[j] }}\n </label>\n </div>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:flex;flex-direction:column}.no-data{margin:var(--pep-spacing-2xl, 2rem) 0}.no-data-suggestions .suggestions-title{margin:var(--pep-spacing-lg, 1rem) 0 var(--pep-spacing-sm, .5rem)}.no-data-suggestions .suggestions-list{margin:0;padding:0;padding-inline-start:var(--pep-spacing-2xl, 2rem)}.virtual-scroller{min-height:5rem;height:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i4$1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i7.PepFormComponent, selector: "pep-form", inputs: ["isInternal", "isReport", "layout", "lockEvents", "canEditObject", "data", "lockFields", "isActive", "layoutType", "objectId", "parentId", "searchCode", "showTitle", "firstFieldAsLink", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "fieldClick", "internalFormFieldClick", "internalFormFieldChange"] }, { kind: "component", type: VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["disable", "executeRefreshOutsideAngularZone", "enableUnequalChildrenSizes", "RTL", "useMarginInsteadOfTranslate", "modifyOverflowStyleOfParentScroll", "stripedTable", "scrollbarWidth", "scrollbarHeight", "childWidth", "childHeight", "ssrChildWidth", "ssrChildHeight", "ssrViewportWidth", "ssrViewportHeight", "bufferAmount", "scrollAnimationTime", "resizeBypassRefreshThreshold", "scrollThrottlingTime", "scrollDebounceTime", "checkResizeInterval", "items", "compareItems", "horizontal", "parentScroll"], outputs: ["vsChildRectChange", "vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "component", type: PepListPagerComponent, selector: "pep-list-pager", inputs: ["disabled", "pageIndex", "length", "pageSize"], outputs: ["pagerChange"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
2320
2312
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListComponent, decorators: [{
|
|
2321
2313
|
type: Component,
|
|
2322
2314
|
args: [{ selector: 'pep-list', host: {
|
|
2323
2315
|
'(window:resize)': 'onWinResize($event)',
|
|
2324
|
-
}, template: "<ng-container *ngIf=\"totalRows == 0\">\n <ng-container *ngIf=\"noDataFoundMsg; then noDataMsgInputBlock; else noDataMsgDefaultBlock\"></ng-container>\n <ng-template #noDataMsgInputBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ noDataFoundMsg }}\n </p>\n </div>\n </ng-template>\n <ng-template #noDataMsgDefaultBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ 'LIST.NO_DATA_FOUND' | translate}}\n </p>\n </div>\n <div class=\"no-data-suggestions\">\n <p class=\"suggestions-title title-lg\">\n {{ 'LIST.NO_DATA_FOUND_SUGGESTIONS_TITLE' | translate}}\n </p>\n <ul class=\"suggestions-list body-lg\" [innerHtml]=\"'LIST.NO_DATA_FOUND_SUGGESTIONS_LIST' | translate\"></ul>\n </div>\n </ng-template>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <ng-container *ngTemplateOutlet=\"tableHeader\"></ng-container>\n\n <virtual-scroller #scroller [items]=\"pagerType === 'pages' ? currentPageItems : items\"\n [scrollDebounceTime]=\"scrollDebounceTime\" [scrollThrottlingTime]=\"scrollThrottlingTime\"\n [bufferAmount]=\"printMode ? totalRows : -1\" [parentScroll]=\"parentScroll\" [disable]=\"loadingItemsFromApi\"\n class=\"virtual-scroller\" [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\"\n (vsChange)=\"onVirtualScrollerChange($event)\" (vsChildRectChange)=\"onChildRectChange($event)\">\n <ng-container *ngFor=\"let item of scroller.viewPortItems; let index = index; let isFirst = first;\">\n <ng-container *ngTemplateOutlet=\"listData; context: {item: item, index:index}\"></ng-container>\n </ng-container>\n </virtual-scroller>\n\n <pep-list-pager *ngIf=\"pagerType === 'pages'\" class=\" list-pager\" [disabled]=\"loadingItemsFromApi\"\n [length]=\"totalRows\" [pageSize]=\"pageSize\" [pageIndex]=\"pageIndex\" (pagerChange)=\"onPagerChange($event)\">\n </pep-list-pager>\n\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n</ng-container>\n\n<ng-template #listData let-item=\"item\" let-index=\"index\">\n <ng-container *ngIf=\"isTable\">\n <!-- getIsItemSelected(item) -> item | isItemSelected: selectionTypeForActions : selectedItemId : isAllSelected : selectedItems : unSelectedItems -->\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\" \n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n even: zebraStripes && index % 2 !== 0,\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId}\" [ngStyle]=\"{ visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <mat-checkbox *ngIf=\"selectionTypeForActions == 'multi'\" type=\"checkbox\"\n class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"item | isItemDisabled: lockItemInnerEvents : printMode\" [ngStyle]=\"{\n visibility: !deviceHasMouse ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId || isAllSelected || selectedItems.size > 0 ? 'visible' : 'hidden'\n }\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <mat-radio-button *ngIf=\"selectionTypeForActions == 'single'\" name=\"selection\"\n class=\"pull-left flip row-selection pep-radio-button\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"item | isItemDisabled: lockItemInnerEvents : printMode\"\n [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-radio-button>\n <pep-form [layoutType]=\"'table'\" [checkForChanges]=\"checkForChanges\" [layout]=\"layout\"\n [firstFieldAsLink]=\"firstFieldAsLink\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isReport]=\"isReport\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'line-view': viewType === 'lines',\n 'card-view': viewType === 'cards',\n 'small-card': cardSize === 'sm'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: 'initial', visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <mat-checkbox *ngIf=\"showCardSelection\" class=\"pull-left flip card-selection\"\n [disabled]=\"item | isItemDisabled: lockItemInnerEvents : printMode\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <pep-form [layoutType]=\"'card'\" [firstFieldAsLink]=\"firstFieldAsLink\" [checkForChanges]=\"checkForChanges\"\n [layout]=\"layout\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableHeader>\n <div *ngIf=\"isTable\" class=\"table-header\" (mouseup)=\"onListResizeEnd($event)\"\n (mouseenter)=\"onListHeaderMouseEnter($event)\" (mouseleave)=\"onListHeaderMouseLeave($event)\"\n (mousemove)=\"onListResize($event)\">\n\n <div class=\"table-header-padding-top\"></div>\n <fieldset class=\"table-header-fieldset\">\n <mat-checkbox *ngIf=\"selectionTypeForActions !== 'none'\" #selectAllCB class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n type=\"checkbox\" [ngStyle]=\"{\n visibility:\n selectionTypeForActions == 'single' || \n (selectionTypeForActions == 'multi' && hideAllSelectionInMulti) ? 'hidden' : 'visible'\n }\"\n [indeterminate]=\"isAllSelected ? unSelectedItems.size > 0 && unSelectedItems.size < totalRows : (selectedItems.size > 0 && !getIsAllSelectedForActions())\"\n [disabled]=\"disabled || selectionTypeForActions === 'single'\" [checked]=\"getIsAllSelectedForActions()\"\n (change)=\"selectAllItemsForActions($event)\"></mat-checkbox>\n <fieldset>\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n 'support-sorting': supportSorting,\n 'has-sorting': field.ApiName === sortBy,\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0 && selectionTypeForActions !== 'multi',\n 'is-last': j === layout?.ControlFields?.length - 1\n }\"\n (click)=\"supportSorting ? (onListSortingChange(field.ApiName, sortBy !== null && sortBy != field.ApiName ? true : !isAsc, $event)) : false\">\n\n <label id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n <span *ngIf=\"field.Mandatory\" class=\"mandatory\">\n <pep-icon name=\"system_must\"></pep-icon>\n </span>\n {{ field.Title != '' ? field.Title : ' '}}\n </label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName)\">\n <div class=\"splitter\"></div>\n </div>\n\n <div *ngIf=\"supportSorting\" class=\"sorting-box pull-left flip\"\n [ngClass]=\"{ 'has-sorting': field.ApiName === sortBy }\">\n <mat-icon *ngIf=\"field.ApiName !== sortBy\">\n <pep-icon name=\"arrow_either\" class=\"asc\"></pep-icon>\n </mat-icon>\n <ng-container *ngIf=\"field.ApiName === sortBy\">\n <mat-icon *ngIf=\"!isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && isAsc }\"\n title=\"{{ 'LIST.SORT_ASC' | translate }}\">\n <pep-icon name=\"arrow_up\" class=\"asc\"></pep-icon>\n </mat-icon>\n <mat-icon *ngIf=\"isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && !isAsc }\"\n title=\"{{ 'LIST.SORT_DESC' | translate }}\">\n <pep-icon name=\"arrow_down\" class=\"desc\"></pep-icon>\n </mat-icon>\n </ng-container>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n</ng-template>\n\n<ng-template #tableTotal>\n <div *ngIf=\"isTable && totalsRow?.length > 0 && totalsRow.length <= layout?.ControlFields.length\"\n class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"total-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\">\n <label class=\"total-label body-sm text-align-{{ field.Layout.XAlignment }}\">\n {{ totalsRow[j] }}\n </label>\n </div>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:flex;flex-direction:column}.no-data{margin:var(--pep-spacing-2xl, 2rem) 0}.no-data-suggestions .suggestions-title{margin:var(--pep-spacing-lg, 1rem) 0 var(--pep-spacing-sm, .5rem)}.no-data-suggestions .suggestions-list{margin:0;padding:0;padding-inline-start:var(--pep-spacing-2xl, 2rem)}.virtual-scroller{min-height:5rem;height:inherit}\n"] }]
|
|
2316
|
+
}, template: "<ng-container *ngIf=\"totalRows == 0\">\n <ng-container *ngIf=\"noDataFoundMsg; then noDataMsgInputBlock; else noDataMsgDefaultBlock\"></ng-container>\n <ng-template #noDataMsgInputBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ noDataFoundMsg }}\n </p>\n </div>\n </ng-template>\n <ng-template #noDataMsgDefaultBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ 'LIST.NO_DATA_FOUND' | translate}}\n </p>\n </div>\n <div class=\"no-data-suggestions\">\n <p class=\"suggestions-title title-lg\">\n {{ 'LIST.NO_DATA_FOUND_SUGGESTIONS_TITLE' | translate}}\n </p>\n <ul class=\"suggestions-list body-lg\" [innerHtml]=\"'LIST.NO_DATA_FOUND_SUGGESTIONS_LIST' | translate\"></ul>\n </div>\n </ng-template>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <ng-container *ngTemplateOutlet=\"tableHeader\"></ng-container>\n\n <!-- (vsChildRectChange)=\"onChildRectChange($event)\" -->\n <virtual-scroller #scroller [items]=\"pagerType === 'pages' ? currentPageItems : items\"\n [scrollDebounceTime]=\"scrollDebounceTime\" [scrollThrottlingTime]=\"scrollThrottlingTime\"\n [bufferAmount]=\"printMode ? totalRows : bufferAmount\" [parentScroll]=\"parentScroll\" [disable]=\"loadingItemsFromApi\"\n class=\"virtual-scroller\" [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\"\n (vsChange)=\"onVirtualScrollerChange($event)\" >\n <ng-container *ngFor=\"let item of scroller.viewPortItems; let index = index; let isFirst = first;\">\n <ng-container *ngTemplateOutlet=\"listData; context: {item: item, index:index}\"></ng-container>\n </ng-container>\n </virtual-scroller>\n\n <pep-list-pager *ngIf=\"pagerType === 'pages'\" class=\" list-pager\" [disabled]=\"loadingItemsFromApi\"\n [length]=\"totalRows\" [pageSize]=\"pageSize\" [pageIndex]=\"pageIndex\" (pagerChange)=\"onPagerChange($event)\">\n </pep-list-pager>\n\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n</ng-container>\n\n<ng-template #listData let-item=\"item\" let-index=\"index\">\n <ng-container *ngIf=\"isTable\">\n <!-- getIsItemSelected(item) -> item | isItemSelected: selectionTypeForActions : selectedItemId : isAllSelected : selectedItems : unSelectedItems -->\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\" \n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n even: zebraStripes && index % 2 !== 0,\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId}\" [ngStyle]=\"{ visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <mat-checkbox *ngIf=\"selectionTypeForActions == 'multi'\" type=\"checkbox\"\n class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"getisItemDisabled(item)\" [ngStyle]=\"{\n visibility: !deviceHasMouse ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId || isAllSelected || selectedItems.size > 0 ? 'visible' : 'hidden'\n }\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <mat-radio-button *ngIf=\"selectionTypeForActions == 'single'\" name=\"selection\"\n class=\"pull-left flip row-selection pep-radio-button\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"getisItemDisabled(item)\"\n [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-radio-button>\n <pep-form [layoutType]=\"'table'\" [checkForChanges]=\"checkForChanges\" [layout]=\"layout\"\n [firstFieldAsLink]=\"firstFieldAsLink\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isReport]=\"isReport\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'line-view': viewType === 'lines',\n 'card-view': viewType === 'cards',\n 'small-card': cardSize === 'sm'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <mat-checkbox *ngIf=\"showCardSelection\" class=\"pull-left flip card-selection\"\n [disabled]=\"getisItemDisabled(item)\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <pep-form [layoutType]=\"'card'\" [firstFieldAsLink]=\"firstFieldAsLink\" [checkForChanges]=\"checkForChanges\"\n [layout]=\"layout\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-form>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableHeader>\n <div *ngIf=\"isTable\" class=\"table-header\" (mouseup)=\"onListResizeEnd($event)\"\n (mouseenter)=\"onListHeaderMouseEnter($event)\" (mouseleave)=\"onListHeaderMouseLeave($event)\"\n (mousemove)=\"onListResize($event)\">\n\n <div class=\"table-header-padding-top\"></div>\n <fieldset class=\"table-header-fieldset\">\n <mat-checkbox *ngIf=\"selectionTypeForActions !== 'none'\" #selectAllCB class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n type=\"checkbox\" [ngStyle]=\"{\n visibility:\n selectionTypeForActions == 'single' || \n (selectionTypeForActions == 'multi' && hideAllSelectionInMulti) ? 'hidden' : 'visible'\n }\"\n [indeterminate]=\"isAllSelected ? unSelectedItems.size > 0 && unSelectedItems.size < totalRows : (selectedItems.size > 0 && !getIsAllSelectedForActions())\"\n [disabled]=\"disabled || selectionTypeForActions === 'single'\" [checked]=\"getIsAllSelectedForActions()\"\n (change)=\"selectAllItemsForActions($event)\"></mat-checkbox>\n <fieldset>\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n 'support-sorting': supportSorting,\n 'has-sorting': field.ApiName === sortBy,\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0 && selectionTypeForActions !== 'multi',\n 'is-last': j === layout?.ControlFields?.length - 1\n }\"\n (click)=\"supportSorting ? (onListSortingChange(field.ApiName, sortBy !== null && sortBy != field.ApiName ? true : !isAsc, $event)) : false\">\n\n <label id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n <span *ngIf=\"field.Mandatory\" class=\"mandatory\">\n <pep-icon name=\"system_must\"></pep-icon>\n </span>\n {{ field.Title != '' ? field.Title : ' '}}\n </label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName)\">\n <div class=\"splitter\"></div>\n </div>\n\n <div *ngIf=\"supportSorting\" class=\"sorting-box pull-left flip\"\n [ngClass]=\"{ 'has-sorting': field.ApiName === sortBy }\">\n <mat-icon *ngIf=\"field.ApiName !== sortBy\">\n <pep-icon name=\"arrow_either\" class=\"asc\"></pep-icon>\n </mat-icon>\n <ng-container *ngIf=\"field.ApiName === sortBy\">\n <mat-icon *ngIf=\"!isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && isAsc }\"\n title=\"{{ 'LIST.SORT_ASC' | translate }}\">\n <pep-icon name=\"arrow_up\" class=\"asc\"></pep-icon>\n </mat-icon>\n <mat-icon *ngIf=\"isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && !isAsc }\"\n title=\"{{ 'LIST.SORT_DESC' | translate }}\">\n <pep-icon name=\"arrow_down\" class=\"desc\"></pep-icon>\n </mat-icon>\n </ng-container>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n</ng-template>\n\n<ng-template #tableTotal>\n <div *ngIf=\"isTable && totalsRow?.length > 0 && totalsRow.length <= layout?.ControlFields.length\"\n class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"total-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\">\n <label class=\"total-label body-sm text-align-{{ field.Layout.XAlignment }}\">\n {{ totalsRow[j] }}\n </label>\n </div>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:flex;flex-direction:column}.no-data{margin:var(--pep-spacing-2xl, 2rem) 0}.no-data-suggestions .suggestions-title{margin:var(--pep-spacing-lg, 1rem) 0 var(--pep-spacing-sm, .5rem)}.no-data-suggestions .suggestions-list{margin:0;padding:0;padding-inline-start:var(--pep-spacing-2xl, 2rem)}.virtual-scroller{min-height:5rem;height:inherit}\n"] }]
|
|
2325
2317
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.PepLayoutService }, { type: i1.PepSessionService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { noDataFoundMsg: [{
|
|
2326
2318
|
type: Input
|
|
2327
2319
|
}], selectionTypeForActions: [{
|
|
@@ -2364,6 +2356,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2364
2356
|
type: Input
|
|
2365
2357
|
}], pageIndex: [{
|
|
2366
2358
|
type: Input
|
|
2359
|
+
}], bufferAmount: [{
|
|
2360
|
+
type: Input
|
|
2367
2361
|
}], scrollAnimationTime: [{
|
|
2368
2362
|
type: Input
|
|
2369
2363
|
}], scrollDebounceTime: [{
|
|
@@ -2759,6 +2753,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2759
2753
|
type: Output
|
|
2760
2754
|
}] } });
|
|
2761
2755
|
|
|
2756
|
+
class IsItemSelectedPipe {
|
|
2757
|
+
constructor() {
|
|
2758
|
+
this.SEPARATOR = ',';
|
|
2759
|
+
}
|
|
2760
|
+
getUniqItemId(itemId, itemType = '') {
|
|
2761
|
+
return itemId + this.SEPARATOR + itemType;
|
|
2762
|
+
}
|
|
2763
|
+
transform(item, selectionTypeForActions, selectedItemId, isAllSelected, selectedItems, unSelectedItems) {
|
|
2764
|
+
let isSelected = false;
|
|
2765
|
+
if (selectionTypeForActions === 'single') {
|
|
2766
|
+
isSelected = selectedItemId === this.getUniqItemId(item?.UID, item?.Type.toString());
|
|
2767
|
+
}
|
|
2768
|
+
// else if (selectionTypeForActions === 'single-action') {
|
|
2769
|
+
// isSelected = (isAllSelected && !unSelectedItems.has(item?.UID)) || selectedItems.has(item?.UID);
|
|
2770
|
+
// }
|
|
2771
|
+
else if (selectionTypeForActions === 'multi') {
|
|
2772
|
+
if (item?.IsSelectableForActions) {
|
|
2773
|
+
isSelected = (isAllSelected && !unSelectedItems.has(item?.UID)) || selectedItems.has(item?.UID);
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
return isSelected;
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
IsItemSelectedPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2780
|
+
IsItemSelectedPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, name: "isItemSelected" });
|
|
2781
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, decorators: [{
|
|
2782
|
+
type: Pipe,
|
|
2783
|
+
args: [{
|
|
2784
|
+
name: 'isItemSelected'
|
|
2785
|
+
}]
|
|
2786
|
+
}] });
|
|
2787
|
+
class IsItemDisabledPipe {
|
|
2788
|
+
transform(item, lockItemInnerEvents, printMode) {
|
|
2789
|
+
return (printMode || lockItemInnerEvents || (item && !item.IsSelectableForActions));
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
IsItemDisabledPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2793
|
+
IsItemDisabledPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, name: "isItemDisabled" });
|
|
2794
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, decorators: [{
|
|
2795
|
+
type: Pipe,
|
|
2796
|
+
args: [{
|
|
2797
|
+
name: 'isItemDisabled'
|
|
2798
|
+
}]
|
|
2799
|
+
}] });
|
|
2800
|
+
|
|
2762
2801
|
const listComponents = [
|
|
2763
2802
|
// PepListOldComponent,
|
|
2764
2803
|
PepListComponent,
|