@libs-ui/components-table 0.2.356-27 → 0.2.356-28
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/esm2022/table.component.mjs +320 -292
- package/esm2022/templates/templates.component.mjs +9 -7
- package/fesm2022/libs-ui-components-table.mjs +327 -297
- package/fesm2022/libs-ui-components-table.mjs.map +1 -1
- package/package.json +28 -28
- package/table.component.d.ts +74 -58
- package/templates/templates.component.d.ts +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NgStyle, NgClass, AsyncPipe, NgComponentOutlet, NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import { HttpParams } from '@angular/common/http';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Pipe, input, ChangeDetectionStrategy, Component, computed,
|
|
4
|
+
import { Pipe, signal, input, ChangeDetectionStrategy, Component, computed, output, viewChild, inject, DestroyRef, ChangeDetectorRef, effect, untracked } from '@angular/core';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import * as i2 from '@iharbeck/ngx-virtual-scroller';
|
|
7
7
|
import { VirtualScrollerModule } from '@iharbeck/ngx-virtual-scroller';
|
|
@@ -23,6 +23,7 @@ import { get, convertObjectToSignal, viewDataNumberByLanguage, cloneDeep, delete
|
|
|
23
23
|
import * as i1 from '@ngx-translate/core';
|
|
24
24
|
import { TranslateModule } from '@ngx-translate/core';
|
|
25
25
|
import { fromEvent, of, timer, lastValueFrom } from 'rxjs';
|
|
26
|
+
import { auditTime } from 'rxjs/operators';
|
|
26
27
|
import { LibsUiComponentsAvatarComponent } from '@libs-ui/components-avatar';
|
|
27
28
|
import { LibsUiComponentsBadgeComponent } from '@libs-ui/components-badge';
|
|
28
29
|
import { LibsUiComponentsButtonsStatusComponent } from '@libs-ui/components-buttons-status';
|
|
@@ -131,8 +132,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
131
132
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
132
133
|
class LibsUiComponentsTableTemplatesComponent {
|
|
133
134
|
lockClick;
|
|
135
|
+
lockClickTimeoutId;
|
|
134
136
|
functionControls = new Map();
|
|
135
|
-
isImageError;
|
|
137
|
+
isImageError = signal(undefined);
|
|
136
138
|
isHover = input();
|
|
137
139
|
configs = input();
|
|
138
140
|
templateCssWrapper = input();
|
|
@@ -182,7 +184,7 @@ class LibsUiComponentsTableTemplatesComponent {
|
|
|
182
184
|
}
|
|
183
185
|
async handlerImageError(event) {
|
|
184
186
|
event.stopPropagation();
|
|
185
|
-
this.isImageError
|
|
187
|
+
this.isImageError.set(true);
|
|
186
188
|
}
|
|
187
189
|
async handlerFunctionControl(event, index) {
|
|
188
190
|
this.functionControls.set(index, event);
|
|
@@ -198,16 +200,17 @@ class LibsUiComponentsTableTemplatesComponent {
|
|
|
198
200
|
console.error(error);
|
|
199
201
|
}
|
|
200
202
|
finally {
|
|
201
|
-
setTimeout(() => {
|
|
203
|
+
this.lockClickTimeoutId = setTimeout(() => {
|
|
202
204
|
this.lockClick = false;
|
|
203
205
|
}, 250);
|
|
204
206
|
}
|
|
205
207
|
}
|
|
206
208
|
ngOnDestroy() {
|
|
209
|
+
clearTimeout(this.lockClickTimeoutId);
|
|
207
210
|
this.functionControls.clear();
|
|
208
211
|
}
|
|
209
212
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsTableTemplatesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
210
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsTableTemplatesComponent, isStandalone: true, selector: "libs_ui-components-table-templates", inputs: { isHover: { classPropertyName: "isHover", publicName: "isHover", isSignal: true, isRequired: false, transformFunction: null }, configs: { classPropertyName: "configs", publicName: "configs", isSignal: true, isRequired: false, transformFunction: null }, templateCssWrapper: { classPropertyName: "templateCssWrapper", publicName: "templateCssWrapper", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"libs-ui-table-template {{ templateCssWrapper() || '' }}\">\n @for (config of configs; track config) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track fieldConfig; let index = $index) {\n @let constHtmlNgStyle = fieldConfig.getNgStyle ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgStyle : item() | async) : fieldConfig.ngStyle || {};\n @let constHtmlNgClass = fieldConfig.getNgClass ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgClass : item() | async) : fieldConfig.ngClass || {};\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case ('tooltip') {\n @if (fieldConfig.tooltip || {}; as tooltip) {\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [isAddContentToParentDocument]=\"tooltip.isAddContentToParentDocument || false\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"\n (fieldConfig.getTooltipConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getTooltipConfig : item() | async)\n : (tooltip.config | LibsUiPipesCloneObjectPipe)\n ) | translate\n \"\n [innerHTML]=\"\n (fieldConfig.field ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true) : tooltip.dataView) | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate\n \"\n (outEvent)=\"handlerItemClick($event, fieldConfig)\"></span>\n }\n }\n @case ('image') {\n @if (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getImageSrc : item() : isImageError | async; as linkImage) {\n @if (linkImage !== ' ') {\n <img\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n }\n }\n\n @case ('avatar') {\n @let constHtmlAvatarConfig =\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getAvatarConfig : item() : undefined : { valueIsEmpty: undefined } | async;\n @if (constHtmlAvatarConfig) {\n <libs_ui-components-avatar\n [typeShape]=\"constHtmlAvatarConfig.typeShape || 'circle'\"\n [classInclude]=\"constHtmlAvatarConfig.classInclude\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [size]=\"constHtmlAvatarConfig.size || 32\"\n [linkAvatar]=\"constHtmlAvatarConfig.linkAvatar\"\n [linkAvatarError]=\"constHtmlAvatarConfig.linkAvatarError\"\n [idGenColor]=\"constHtmlAvatarConfig.idGenColor\"\n [getLastTextAfterSpace]=\"constHtmlAvatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"constHtmlAvatarConfig.textAvatar\" />\n }\n }\n\n @case ('buttons') {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of fieldConfig.buttons || (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getButtonsByItem : item() | async); track button) {\n <libs_ui-components-buttons-button\n [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"\n (button().disable ?? fieldConfig.getDisable) ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async) : false\n \"\n [label]=\"button().label || ' '\"\n [classIconLeft]=\"button().classIconLeft || ''\"\n [classIconRight]=\"button().classIconRight || ''\"\n [popover]=\"button().popover || {}\"\n [classInclude]=\"button().classInclude || ''\"\n [ignorePointerEvent]=\"button().ignorePointerEvent\"\n [iconOnlyType]=\"button().iconOnlyType\"\n (outClick)=\"clickButtonAction(button())\" />\n }\n </div>\n }\n }\n\n @case ('button-status') {\n <libs_ui-components-buttons-status\n [config]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n\n @case ('switch') {\n <libs_ui-components-switch\n [active]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getActiveValueSwitch : item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisableValueSwitch : item() | async) : false\"\n (outSwitch)=\"handlerSwitch($event, fieldConfig)\" />\n }\n\n @case (fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup' ? fieldConfig.instance : '') {\n @if ((item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async) !== ' ') {\n @let constHtmlDisableDropdown =\n (fieldConfig.dropdownConfig?.disable ?? fieldConfig.getDisable)\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async)\n : false;\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: fieldConfig.dropdownConfig?.ignoreArrow || false,\n maxHeight: fieldConfig.dropdownConfig?.maxHeight || 2048,\n paddingLeftItem: fieldConfig.dropdownConfig?.paddingLeftItem ?? true,\n classInclude: fieldConfig.dropdownConfig?.classIncludePopup || 'w-[250px]',\n position: fieldConfig.dropdownConfig?.position || {\n mode: 'center',\n distance: 0,\n },\n }\"\n [zIndex]=\"fieldConfig.dropdownConfig?.zIndex\"\n [listConfig]=\"\n fieldConfig.dropdownConfig?.getListConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.dropdownConfig?.getListConfig : item() | async)\n : fieldConfig.dropdownConfig?.listConfig\n \"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\n [disable]=\"constHtmlDisableDropdown\"\n (outFunctionsControl)=\"handlerFunctionControl($event, index)\"\n (outSelectKey)=\"handlerSelectItemDropdown(fieldConfig, index, $event)\"\n (outSelectMultiKey)=\"handlerSelectItemsDropdown(fieldConfig, index, $event)\">\n @if (fieldConfig.instance === 'other-action-show-popup') {\n <div [innerHtml]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate\"></div>\n }\n @if (fieldConfig.instance === 'badge') {\n @let constHtmlDataBadge = item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async;\n @if (constHtmlDataBadge > 0) {\n <libs_ui-components-badge\n [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"constHtmlDataBadge\"\n [maxCount]=\"99\" />\n }\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button\n [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? constHtmlDisableDropdown\"\n [label]=\"fieldConfig?.dropdownConfig?.button()?.label || ' '\"\n [classIconLeft]=\"fieldConfig?.dropdownConfig?.button()?.classIconLeft || 'libs-ui-icon-more-vertical rotate-[90deg] mr-0'\"\n [classIconRight]=\"fieldConfig?.dropdownConfig?.button()?.classIconRight || ''\"\n [popover]=\"fieldConfig?.dropdownConfig?.button()?.popover || {}\"\n [classInclude]=\"fieldConfig?.dropdownConfig?.button()?.classInclude || ''\"\n [ignoreStopPropagationEvent]=\"true\" />\n }\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case ('line-clamp') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp\n [ignoreShowButtonCollapseExpand]=\"lineClampConfig.ignoreShowButtonCollapseExpand ?? true\"\n [showTooltip]=\"lineClampConfig.showTooltip ?? true\"\n [maxHeight]=\"lineClampConfig.maxHeight || 36\"\n [maxWidthTooltip]=\"lineClampConfig.maxWidthTooltip || 200\"\n [maxHeightTooltip]=\"lineClampConfig.maxHeightTooltip || 100\"\n [ngClassObject]=\"lineClampConfig.ngClassObject ?? { 'libs-ui-line-clamp-content libs-ui-font-h5r': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n </div>\n }\n\n @case ('shape-style') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n @default {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div\n class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\"\n [style.height.px]=\"rowRef.clientHeight\">\n <div\n #rowRef\n class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates\n class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDataComponentOutlet : item() : fieldConfig.field : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n }\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .libs-ui-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsTableTemplatesComponent, selector: "libs_ui-components-table-templates", inputs: ["isHover", "configs", "templateCssWrapper", "item"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: LibsUiPipesGetValueOfObjectPipe, name: "LibsUiPipesGetValueOfObjectPipe" }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "classImageInclude", "zIndexPreviewImage", "clickPreviewImage", "idGenColor", "getLastTextAfterSpace", "textAvatar", "textAvatarClassInclude", "containerTextAvatarClassInclude"], outputs: ["outAvatarError", "outEventPreviewImage"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiPipesSecurityTrustPipe, name: "LibsUiPipesSecurityTrustPipe" }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsStatusComponent, selector: "libs_ui-components-buttons-status", inputs: ["config"] }, { kind: "component", type: LibsUiComponentsSwitchComponent, selector: "libs_ui-components-switch", inputs: ["size", "disable", "active"], outputs: ["activeChange", "outSwitch"] }, { kind: "pipe", type: LibsUiPipesCloneObjectPipe, name: "LibsUiPipesCloneObjectPipe" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsLineClampComponent, selector: "libs_ui-components-line_clamp", inputs: ["content", "lengthLimitDisplay", "maxHeight", "ignoreShowButtonCollapseExpand", "ignoreShowButtonCollapse", "showTooltip", "timeHidePopoverOnMouseout", "maxWidthTooltip", "maxHeightTooltip", "zIndexPopover", "isInnerText", "classClassLabelButtonCollapseExpand", "classClassIncludeButtonCollapseExpand", "ignoreStopPropagationTooltipEvent", "ngClassObject", "hasBackgroundGradient", "labelButtonViewMore", "labelButtonCollapse", "directionTooltip", "useXssFilter", "defaultIsCollapse"], outputs: ["outDisplayLineClamp", "outAction", "outClick", "outFunctionControl"] }, { kind: "component", type: LibsUiComponentsDropdownComponent, selector: "libs_ui-components-dropdown", inputs: ["useXssFilter", "popoverElementRefCustom", "classInclude", "ignoreStopPropagationEvent", "flagMouse", "flagMouseContent", "popoverCustomConfig", "isNgContent", "zIndex", "convertItemSelected", "getPopoverItemSelected", "httpRequestDetailItemById", "lengthKeys", "textDisplayWhenNoSelect", "textDisplayWhenMultiSelect", "classIncludeTextDisplayWhenNoSelect", "fieldLabel", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "dropdownTemplateRefNotSearchNoData", "fieldGetImage", "imageSize", "typeShape", "fieldGetIcon", "fieldGetTextAvatar", "fieldGetColorAvatar", "classAvatarInclude", "getLastTextAfterSpace", "linkImageError", "showError", "showBorderError", "disable", "readonly", "labelConfig", "disableLabel", "listSearchConfig", "isSearchOnline", "listHiddenInputSearch", "listSearchPadding", "listKeySearch", "listDividerClassInclude", "listConfig", "listButtonsOther", "listHasButtonUnSelectOption", "listClickExactly", "listBackgroundCustom", "listMaxItemShow", "listKeySelected", "listMultiKeySelected", "listKeysDisable", "listKeysHidden", "validRequired", "validMaxItemSelected", "changeValidUndefinedResetError", "allowSelectItemMultiple", "focusInputSearch", "onlyEmitDataWhenReset", "resetKeyWhenSelectAllKey", "listConfigHasDivider", "classIncludeIcon", "classIncludeContent", "listIgnoreClassDisableDefaultWhenUseKeysDisableItem", "tabKeyActive", "tabsConfig", "ignoreBorderBottom"], outputs: ["flagMouseChange", "flagMouseContentChange", "lengthKeysChange", "showBorderErrorChange", "listKeySelectedChange", "listMultiKeySelectedChange", "tabKeyActiveChange", "outSelectKey", "outSelectMultiKey", "outFunctionsControl", "outValidEvent", "outChangStageFlagMouse", "outDataChange", "outClickButtonOther", "outShowList", "outChangeTabKeyActive"] }, { kind: "component", type: LibsUiComponentsBadgeComponent, selector: "libs_ui-components-badge", inputs: ["popoverConfig", "active", "count", "mode", "maxCount", "ignoreMarginDefault", "classCircle", "ignoreStopPropagationEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
213
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsTableTemplatesComponent, isStandalone: true, selector: "libs_ui-components-table-templates", inputs: { isHover: { classPropertyName: "isHover", publicName: "isHover", isSignal: true, isRequired: false, transformFunction: null }, configs: { classPropertyName: "configs", publicName: "configs", isSignal: true, isRequired: false, transformFunction: null }, templateCssWrapper: { classPropertyName: "templateCssWrapper", publicName: "templateCssWrapper", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"libs-ui-table-template {{ templateCssWrapper() || '' }}\">\n @for (config of configs; track config) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track fieldConfig; let index = $index) {\n @let constHtmlNgStyle = fieldConfig.getNgStyle ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgStyle : item() | async) : fieldConfig.ngStyle || {};\n @let constHtmlNgClass = fieldConfig.getNgClass ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgClass : item() | async) : fieldConfig.ngClass || {};\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case ('tooltip') {\n @if (fieldConfig.tooltip || {}; as tooltip) {\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [isAddContentToParentDocument]=\"tooltip.isAddContentToParentDocument || false\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"\n (fieldConfig.getTooltipConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getTooltipConfig : item() | async)\n : (tooltip.config | LibsUiPipesCloneObjectPipe)\n ) | translate\n \"\n [innerHTML]=\"\n (fieldConfig.field ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true) : tooltip.dataView) | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate\n \"\n (outEvent)=\"handlerItemClick($event, fieldConfig)\"></span>\n }\n }\n @case ('image') {\n @if (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getImageSrc : item() : isImageError() | async; as linkImage) {\n @if (linkImage !== ' ') {\n <img\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n }\n }\n\n @case ('avatar') {\n @let constHtmlAvatarConfig =\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getAvatarConfig : item() : undefined : { valueIsEmpty: undefined } | async;\n @if (constHtmlAvatarConfig) {\n <libs_ui-components-avatar\n [typeShape]=\"constHtmlAvatarConfig.typeShape || 'circle'\"\n [classInclude]=\"constHtmlAvatarConfig.classInclude\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [size]=\"constHtmlAvatarConfig.size || 32\"\n [linkAvatar]=\"constHtmlAvatarConfig.linkAvatar\"\n [linkAvatarError]=\"constHtmlAvatarConfig.linkAvatarError\"\n [idGenColor]=\"constHtmlAvatarConfig.idGenColor\"\n [getLastTextAfterSpace]=\"constHtmlAvatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"constHtmlAvatarConfig.textAvatar\" />\n }\n }\n\n @case ('buttons') {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of fieldConfig.buttons || (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getButtonsByItem : item() | async); track button) {\n <libs_ui-components-buttons-button\n [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"\n (button().disable ?? fieldConfig.getDisable) ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async) : false\n \"\n [label]=\"button().label || ' '\"\n [classIconLeft]=\"button().classIconLeft || ''\"\n [classIconRight]=\"button().classIconRight || ''\"\n [popover]=\"button().popover || {}\"\n [classInclude]=\"button().classInclude || ''\"\n [ignorePointerEvent]=\"button().ignorePointerEvent\"\n [iconOnlyType]=\"button().iconOnlyType\"\n (outClick)=\"clickButtonAction(button())\" />\n }\n </div>\n }\n }\n\n @case ('button-status') {\n <libs_ui-components-buttons-status\n [config]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n\n @case ('switch') {\n <libs_ui-components-switch\n [active]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getActiveValueSwitch : item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisableValueSwitch : item() | async) : false\"\n (outSwitch)=\"handlerSwitch($event, fieldConfig)\" />\n }\n\n @case (fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup' ? fieldConfig.instance : '') {\n @if ((item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async) !== ' ') {\n @let constHtmlDisableDropdown =\n (fieldConfig.dropdownConfig?.disable ?? fieldConfig.getDisable)\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async)\n : false;\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: fieldConfig.dropdownConfig?.ignoreArrow || false,\n maxHeight: fieldConfig.dropdownConfig?.maxHeight || 2048,\n paddingLeftItem: fieldConfig.dropdownConfig?.paddingLeftItem ?? true,\n classInclude: fieldConfig.dropdownConfig?.classIncludePopup || 'w-[250px]',\n position: fieldConfig.dropdownConfig?.position || {\n mode: 'center',\n distance: 0,\n },\n }\"\n [zIndex]=\"fieldConfig.dropdownConfig?.zIndex\"\n [listConfig]=\"\n fieldConfig.dropdownConfig?.getListConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.dropdownConfig?.getListConfig : item() | async)\n : fieldConfig.dropdownConfig?.listConfig\n \"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\n [disable]=\"constHtmlDisableDropdown\"\n (outFunctionsControl)=\"handlerFunctionControl($event, index)\"\n (outSelectKey)=\"handlerSelectItemDropdown(fieldConfig, index, $event)\"\n (outSelectMultiKey)=\"handlerSelectItemsDropdown(fieldConfig, index, $event)\">\n @if (fieldConfig.instance === 'other-action-show-popup') {\n <div [innerHtml]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate\"></div>\n }\n @if (fieldConfig.instance === 'badge') {\n @let constHtmlDataBadge = item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async;\n @if (constHtmlDataBadge > 0) {\n <libs_ui-components-badge\n [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"constHtmlDataBadge\"\n [maxCount]=\"99\" />\n }\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button\n [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? constHtmlDisableDropdown\"\n [label]=\"fieldConfig?.dropdownConfig?.button()?.label || ' '\"\n [classIconLeft]=\"fieldConfig?.dropdownConfig?.button()?.classIconLeft || 'libs-ui-icon-more-vertical rotate-[90deg] mr-0'\"\n [classIconRight]=\"fieldConfig?.dropdownConfig?.button()?.classIconRight || ''\"\n [popover]=\"fieldConfig?.dropdownConfig?.button()?.popover || {}\"\n [classInclude]=\"fieldConfig?.dropdownConfig?.button()?.classInclude || ''\"\n [ignoreStopPropagationEvent]=\"true\" />\n }\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case ('line-clamp') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp\n [ignoreShowButtonCollapseExpand]=\"lineClampConfig.ignoreShowButtonCollapseExpand ?? true\"\n [showTooltip]=\"lineClampConfig.showTooltip ?? true\"\n [maxHeight]=\"lineClampConfig.maxHeight || 36\"\n [maxWidthTooltip]=\"lineClampConfig.maxWidthTooltip || 200\"\n [maxHeightTooltip]=\"lineClampConfig.maxHeightTooltip || 100\"\n [ngClassObject]=\"lineClampConfig.ngClassObject ?? { 'libs-ui-line-clamp-content libs-ui-font-h5r': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n </div>\n }\n\n @case ('shape-style') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n @default {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div\n class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\"\n [style.height.px]=\"rowRef.clientHeight\">\n <div\n #rowRef\n class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates\n class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDataComponentOutlet : item() : fieldConfig.field : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n }\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .libs-ui-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsTableTemplatesComponent, selector: "libs_ui-components-table-templates", inputs: ["isHover", "configs", "templateCssWrapper", "item"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: LibsUiPipesGetValueOfObjectPipe, name: "LibsUiPipesGetValueOfObjectPipe" }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "classImageInclude", "zIndexPreviewImage", "clickPreviewImage", "idGenColor", "getLastTextAfterSpace", "textAvatar", "textAvatarClassInclude", "containerTextAvatarClassInclude"], outputs: ["outAvatarError", "outEventPreviewImage"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiPipesSecurityTrustPipe, name: "LibsUiPipesSecurityTrustPipe" }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsStatusComponent, selector: "libs_ui-components-buttons-status", inputs: ["config"] }, { kind: "component", type: LibsUiComponentsSwitchComponent, selector: "libs_ui-components-switch", inputs: ["size", "disable", "active"], outputs: ["activeChange", "outSwitch"] }, { kind: "pipe", type: LibsUiPipesCloneObjectPipe, name: "LibsUiPipesCloneObjectPipe" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsLineClampComponent, selector: "libs_ui-components-line_clamp", inputs: ["content", "lengthLimitDisplay", "maxHeight", "ignoreShowButtonCollapseExpand", "ignoreShowButtonCollapse", "showTooltip", "timeHidePopoverOnMouseout", "maxWidthTooltip", "maxHeightTooltip", "zIndexPopover", "isInnerText", "classClassLabelButtonCollapseExpand", "classClassIncludeButtonCollapseExpand", "ignoreStopPropagationTooltipEvent", "ngClassObject", "hasBackgroundGradient", "labelButtonViewMore", "labelButtonCollapse", "directionTooltip", "useXssFilter", "defaultIsCollapse"], outputs: ["outDisplayLineClamp", "outAction", "outClick", "outFunctionControl"] }, { kind: "component", type: LibsUiComponentsDropdownComponent, selector: "libs_ui-components-dropdown", inputs: ["useXssFilter", "popoverElementRefCustom", "classInclude", "ignoreStopPropagationEvent", "flagMouse", "flagMouseContent", "popoverCustomConfig", "isNgContent", "zIndex", "convertItemSelected", "getPopoverItemSelected", "httpRequestDetailItemById", "lengthKeys", "textDisplayWhenNoSelect", "textDisplayWhenMultiSelect", "classIncludeTextDisplayWhenNoSelect", "fieldLabel", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "dropdownTemplateRefNotSearchNoData", "fieldGetImage", "imageSize", "typeShape", "fieldGetIcon", "fieldGetTextAvatar", "fieldGetColorAvatar", "classAvatarInclude", "getLastTextAfterSpace", "linkImageError", "showError", "showBorderError", "disable", "readonly", "labelConfig", "disableLabel", "listSearchConfig", "isSearchOnline", "listHiddenInputSearch", "listSearchPadding", "listKeySearch", "listDividerClassInclude", "listConfig", "listButtonsOther", "listHasButtonUnSelectOption", "listClickExactly", "listBackgroundCustom", "listMaxItemShow", "listKeySelected", "listMultiKeySelected", "listKeysDisable", "listKeysHidden", "validRequired", "validMaxItemSelected", "changeValidUndefinedResetError", "allowSelectItemMultiple", "focusInputSearch", "onlyEmitDataWhenReset", "resetKeyWhenSelectAllKey", "listConfigHasDivider", "classIncludeIcon", "classIncludeContent", "listIgnoreClassDisableDefaultWhenUseKeysDisableItem", "tabKeyActive", "tabsConfig", "ignoreBorderBottom"], outputs: ["flagMouseChange", "flagMouseContentChange", "lengthKeysChange", "showBorderErrorChange", "listKeySelectedChange", "listMultiKeySelectedChange", "tabKeyActiveChange", "outSelectKey", "outSelectMultiKey", "outFunctionsControl", "outValidEvent", "outChangStageFlagMouse", "outDataChange", "outClickButtonOther", "outShowList", "outChangeTabKeyActive"] }, { kind: "component", type: LibsUiComponentsBadgeComponent, selector: "libs_ui-components-badge", inputs: ["popoverConfig", "active", "count", "mode", "maxCount", "ignoreMarginDefault", "classCircle", "ignoreStopPropagationEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
211
214
|
}
|
|
212
215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsTableTemplatesComponent, decorators: [{
|
|
213
216
|
type: Component,
|
|
@@ -229,56 +232,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
229
232
|
LibsUiComponentsLineClampComponent,
|
|
230
233
|
LibsUiComponentsDropdownComponent,
|
|
231
234
|
LibsUiComponentsBadgeComponent,
|
|
232
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"libs-ui-table-template {{ templateCssWrapper() || '' }}\">\n @for (config of configs; track config) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track fieldConfig; let index = $index) {\n @let constHtmlNgStyle = fieldConfig.getNgStyle ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgStyle : item() | async) : fieldConfig.ngStyle || {};\n @let constHtmlNgClass = fieldConfig.getNgClass ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgClass : item() | async) : fieldConfig.ngClass || {};\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case ('tooltip') {\n @if (fieldConfig.tooltip || {}; as tooltip) {\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [isAddContentToParentDocument]=\"tooltip.isAddContentToParentDocument || false\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"\n (fieldConfig.getTooltipConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getTooltipConfig : item() | async)\n : (tooltip.config | LibsUiPipesCloneObjectPipe)\n ) | translate\n \"\n [innerHTML]=\"\n (fieldConfig.field ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true) : tooltip.dataView) | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate\n \"\n (outEvent)=\"handlerItemClick($event, fieldConfig)\"></span>\n }\n }\n @case ('image') {\n @if (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getImageSrc : item() : isImageError | async; as linkImage) {\n @if (linkImage !== ' ') {\n <img\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n }\n }\n\n @case ('avatar') {\n @let constHtmlAvatarConfig =\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getAvatarConfig : item() : undefined : { valueIsEmpty: undefined } | async;\n @if (constHtmlAvatarConfig) {\n <libs_ui-components-avatar\n [typeShape]=\"constHtmlAvatarConfig.typeShape || 'circle'\"\n [classInclude]=\"constHtmlAvatarConfig.classInclude\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [size]=\"constHtmlAvatarConfig.size || 32\"\n [linkAvatar]=\"constHtmlAvatarConfig.linkAvatar\"\n [linkAvatarError]=\"constHtmlAvatarConfig.linkAvatarError\"\n [idGenColor]=\"constHtmlAvatarConfig.idGenColor\"\n [getLastTextAfterSpace]=\"constHtmlAvatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"constHtmlAvatarConfig.textAvatar\" />\n }\n }\n\n @case ('buttons') {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of fieldConfig.buttons || (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getButtonsByItem : item() | async); track button) {\n <libs_ui-components-buttons-button\n [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"\n (button().disable ?? fieldConfig.getDisable) ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async) : false\n \"\n [label]=\"button().label || ' '\"\n [classIconLeft]=\"button().classIconLeft || ''\"\n [classIconRight]=\"button().classIconRight || ''\"\n [popover]=\"button().popover || {}\"\n [classInclude]=\"button().classInclude || ''\"\n [ignorePointerEvent]=\"button().ignorePointerEvent\"\n [iconOnlyType]=\"button().iconOnlyType\"\n (outClick)=\"clickButtonAction(button())\" />\n }\n </div>\n }\n }\n\n @case ('button-status') {\n <libs_ui-components-buttons-status\n [config]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n\n @case ('switch') {\n <libs_ui-components-switch\n [active]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getActiveValueSwitch : item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisableValueSwitch : item() | async) : false\"\n (outSwitch)=\"handlerSwitch($event, fieldConfig)\" />\n }\n\n @case (fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup' ? fieldConfig.instance : '') {\n @if ((item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async) !== ' ') {\n @let constHtmlDisableDropdown =\n (fieldConfig.dropdownConfig?.disable ?? fieldConfig.getDisable)\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async)\n : false;\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: fieldConfig.dropdownConfig?.ignoreArrow || false,\n maxHeight: fieldConfig.dropdownConfig?.maxHeight || 2048,\n paddingLeftItem: fieldConfig.dropdownConfig?.paddingLeftItem ?? true,\n classInclude: fieldConfig.dropdownConfig?.classIncludePopup || 'w-[250px]',\n position: fieldConfig.dropdownConfig?.position || {\n mode: 'center',\n distance: 0,\n },\n }\"\n [zIndex]=\"fieldConfig.dropdownConfig?.zIndex\"\n [listConfig]=\"\n fieldConfig.dropdownConfig?.getListConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.dropdownConfig?.getListConfig : item() | async)\n : fieldConfig.dropdownConfig?.listConfig\n \"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\n [disable]=\"constHtmlDisableDropdown\"\n (outFunctionsControl)=\"handlerFunctionControl($event, index)\"\n (outSelectKey)=\"handlerSelectItemDropdown(fieldConfig, index, $event)\"\n (outSelectMultiKey)=\"handlerSelectItemsDropdown(fieldConfig, index, $event)\">\n @if (fieldConfig.instance === 'other-action-show-popup') {\n <div [innerHtml]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate\"></div>\n }\n @if (fieldConfig.instance === 'badge') {\n @let constHtmlDataBadge = item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async;\n @if (constHtmlDataBadge > 0) {\n <libs_ui-components-badge\n [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"constHtmlDataBadge\"\n [maxCount]=\"99\" />\n }\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button\n [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? constHtmlDisableDropdown\"\n [label]=\"fieldConfig?.dropdownConfig?.button()?.label || ' '\"\n [classIconLeft]=\"fieldConfig?.dropdownConfig?.button()?.classIconLeft || 'libs-ui-icon-more-vertical rotate-[90deg] mr-0'\"\n [classIconRight]=\"fieldConfig?.dropdownConfig?.button()?.classIconRight || ''\"\n [popover]=\"fieldConfig?.dropdownConfig?.button()?.popover || {}\"\n [classInclude]=\"fieldConfig?.dropdownConfig?.button()?.classInclude || ''\"\n [ignoreStopPropagationEvent]=\"true\" />\n }\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case ('line-clamp') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp\n [ignoreShowButtonCollapseExpand]=\"lineClampConfig.ignoreShowButtonCollapseExpand ?? true\"\n [showTooltip]=\"lineClampConfig.showTooltip ?? true\"\n [maxHeight]=\"lineClampConfig.maxHeight || 36\"\n [maxWidthTooltip]=\"lineClampConfig.maxWidthTooltip || 200\"\n [maxHeightTooltip]=\"lineClampConfig.maxHeightTooltip || 100\"\n [ngClassObject]=\"lineClampConfig.ngClassObject ?? { 'libs-ui-line-clamp-content libs-ui-font-h5r': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n </div>\n }\n\n @case ('shape-style') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n @default {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div\n class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\"\n [style.height.px]=\"rowRef.clientHeight\">\n <div\n #rowRef\n class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates\n class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDataComponentOutlet : item() : fieldConfig.field : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n }\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .libs-ui-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}\n"] }]
|
|
235
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"libs-ui-table-template {{ templateCssWrapper() || '' }}\">\n @for (config of configs; track config) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track fieldConfig; let index = $index) {\n @let constHtmlNgStyle = fieldConfig.getNgStyle ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgStyle : item() | async) : fieldConfig.ngStyle || {};\n @let constHtmlNgClass = fieldConfig.getNgClass ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgClass : item() | async) : fieldConfig.ngClass || {};\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case ('tooltip') {\n @if (fieldConfig.tooltip || {}; as tooltip) {\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [isAddContentToParentDocument]=\"tooltip.isAddContentToParentDocument || false\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"\n (fieldConfig.getTooltipConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getTooltipConfig : item() | async)\n : (tooltip.config | LibsUiPipesCloneObjectPipe)\n ) | translate\n \"\n [innerHTML]=\"\n (fieldConfig.field ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true) : tooltip.dataView) | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate\n \"\n (outEvent)=\"handlerItemClick($event, fieldConfig)\"></span>\n }\n }\n @case ('image') {\n @if (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getImageSrc : item() : isImageError() | async; as linkImage) {\n @if (linkImage !== ' ') {\n <img\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n }\n }\n\n @case ('avatar') {\n @let constHtmlAvatarConfig =\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getAvatarConfig : item() : undefined : { valueIsEmpty: undefined } | async;\n @if (constHtmlAvatarConfig) {\n <libs_ui-components-avatar\n [typeShape]=\"constHtmlAvatarConfig.typeShape || 'circle'\"\n [classInclude]=\"constHtmlAvatarConfig.classInclude\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [size]=\"constHtmlAvatarConfig.size || 32\"\n [linkAvatar]=\"constHtmlAvatarConfig.linkAvatar\"\n [linkAvatarError]=\"constHtmlAvatarConfig.linkAvatarError\"\n [idGenColor]=\"constHtmlAvatarConfig.idGenColor\"\n [getLastTextAfterSpace]=\"constHtmlAvatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"constHtmlAvatarConfig.textAvatar\" />\n }\n }\n\n @case ('buttons') {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of fieldConfig.buttons || (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getButtonsByItem : item() | async); track button) {\n <libs_ui-components-buttons-button\n [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"\n (button().disable ?? fieldConfig.getDisable) ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async) : false\n \"\n [label]=\"button().label || ' '\"\n [classIconLeft]=\"button().classIconLeft || ''\"\n [classIconRight]=\"button().classIconRight || ''\"\n [popover]=\"button().popover || {}\"\n [classInclude]=\"button().classInclude || ''\"\n [ignorePointerEvent]=\"button().ignorePointerEvent\"\n [iconOnlyType]=\"button().iconOnlyType\"\n (outClick)=\"clickButtonAction(button())\" />\n }\n </div>\n }\n }\n\n @case ('button-status') {\n <libs_ui-components-buttons-status\n [config]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n\n @case ('switch') {\n <libs_ui-components-switch\n [active]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getActiveValueSwitch : item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisableValueSwitch : item() | async) : false\"\n (outSwitch)=\"handlerSwitch($event, fieldConfig)\" />\n }\n\n @case (fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup' ? fieldConfig.instance : '') {\n @if ((item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async) !== ' ') {\n @let constHtmlDisableDropdown =\n (fieldConfig.dropdownConfig?.disable ?? fieldConfig.getDisable)\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async)\n : false;\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: fieldConfig.dropdownConfig?.ignoreArrow || false,\n maxHeight: fieldConfig.dropdownConfig?.maxHeight || 2048,\n paddingLeftItem: fieldConfig.dropdownConfig?.paddingLeftItem ?? true,\n classInclude: fieldConfig.dropdownConfig?.classIncludePopup || 'w-[250px]',\n position: fieldConfig.dropdownConfig?.position || {\n mode: 'center',\n distance: 0,\n },\n }\"\n [zIndex]=\"fieldConfig.dropdownConfig?.zIndex\"\n [listConfig]=\"\n fieldConfig.dropdownConfig?.getListConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.dropdownConfig?.getListConfig : item() | async)\n : fieldConfig.dropdownConfig?.listConfig\n \"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\n [disable]=\"constHtmlDisableDropdown\"\n (outFunctionsControl)=\"handlerFunctionControl($event, index)\"\n (outSelectKey)=\"handlerSelectItemDropdown(fieldConfig, index, $event)\"\n (outSelectMultiKey)=\"handlerSelectItemsDropdown(fieldConfig, index, $event)\">\n @if (fieldConfig.instance === 'other-action-show-popup') {\n <div [innerHtml]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate\"></div>\n }\n @if (fieldConfig.instance === 'badge') {\n @let constHtmlDataBadge = item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async;\n @if (constHtmlDataBadge > 0) {\n <libs_ui-components-badge\n [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"constHtmlDataBadge\"\n [maxCount]=\"99\" />\n }\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button\n [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? constHtmlDisableDropdown\"\n [label]=\"fieldConfig?.dropdownConfig?.button()?.label || ' '\"\n [classIconLeft]=\"fieldConfig?.dropdownConfig?.button()?.classIconLeft || 'libs-ui-icon-more-vertical rotate-[90deg] mr-0'\"\n [classIconRight]=\"fieldConfig?.dropdownConfig?.button()?.classIconRight || ''\"\n [popover]=\"fieldConfig?.dropdownConfig?.button()?.popover || {}\"\n [classInclude]=\"fieldConfig?.dropdownConfig?.button()?.classInclude || ''\"\n [ignoreStopPropagationEvent]=\"true\" />\n }\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case ('line-clamp') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp\n [ignoreShowButtonCollapseExpand]=\"lineClampConfig.ignoreShowButtonCollapseExpand ?? true\"\n [showTooltip]=\"lineClampConfig.showTooltip ?? true\"\n [maxHeight]=\"lineClampConfig.maxHeight || 36\"\n [maxWidthTooltip]=\"lineClampConfig.maxWidthTooltip || 200\"\n [maxHeightTooltip]=\"lineClampConfig.maxHeightTooltip || 100\"\n [ngClassObject]=\"lineClampConfig.ngClassObject ?? { 'libs-ui-line-clamp-content libs-ui-font-h5r': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n </div>\n }\n\n @case ('shape-style') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n @default {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div\n class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\"\n [style.height.px]=\"rowRef.clientHeight\">\n <div\n #rowRef\n class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates\n class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDataComponentOutlet : item() : fieldConfig.field : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n }\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .libs-ui-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}\n"] }]
|
|
233
236
|
}] });
|
|
234
237
|
|
|
235
238
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
236
239
|
class LibsUiComponentsTableComponent {
|
|
237
|
-
/**
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
keysSelected = signal([]);
|
|
241
|
-
loading = signal(false);
|
|
242
|
-
stores = signal([]);
|
|
243
|
-
items = signal([]);
|
|
244
|
-
itemFooter = signal(undefined);
|
|
240
|
+
/** GROUP 1 — private non-signal */
|
|
241
|
+
functionControlSelectMoreItem;
|
|
242
|
+
/** GROUP 2 — protected non-signal */
|
|
245
243
|
itemOfIndexHover;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}),
|
|
260
|
-
httpRequestData: signal({
|
|
261
|
-
objectInstance: returnListObject(this.configSelectMoreItem()?.listOption),
|
|
262
|
-
functionName: 'list',
|
|
263
|
-
argumentsValue: [],
|
|
264
|
-
}),
|
|
265
|
-
};
|
|
244
|
+
/** GROUP 3 — private signal */
|
|
245
|
+
moreItemPopoverConfig = signal({ zIndex: 1200 });
|
|
246
|
+
// CONVENTION-EXCEPT: any — IListConfigItemText không được export, WritableSignal<any> tương thích
|
|
247
|
+
moreItemTextConfig = signal({
|
|
248
|
+
fieldKey: 'key',
|
|
249
|
+
ignoreIconSelected: true,
|
|
250
|
+
getValue: undefined,
|
|
251
|
+
configLabelPopover: this.moreItemPopoverConfig,
|
|
252
|
+
});
|
|
253
|
+
moreItemHttpData = signal({
|
|
254
|
+
objectInstance: returnListObject(undefined),
|
|
255
|
+
functionName: 'list',
|
|
256
|
+
argumentsValue: [],
|
|
266
257
|
});
|
|
267
|
-
itemsHightLight = signal([]);
|
|
268
|
-
hasItemHightLight = computed(() => this.itemsHightLight().length > 0);
|
|
269
|
-
headerRightViewPort = signal([]);
|
|
270
|
-
paddingLeftHeaderRight = signal(0);
|
|
271
|
-
footerRightViewPort = signal([]);
|
|
272
258
|
hasScroll = signal(false);
|
|
273
259
|
instanceSort = signal(undefined);
|
|
274
|
-
hasActionButtonDropdownContent = signal(false);
|
|
275
260
|
pagingStore = signal(undefined);
|
|
276
261
|
loadedLastItem = signal(false);
|
|
277
262
|
storeParamsCallApi = signal({});
|
|
278
263
|
timeoutLeaveItem = signal(undefined);
|
|
279
|
-
functionControlSelectMoreItem;
|
|
280
264
|
mouseEnterHeader = signal(false);
|
|
281
|
-
|
|
265
|
+
stores = signal([]);
|
|
266
|
+
totalItemInBackend = signal(0);
|
|
267
|
+
/** GROUP 4 — protected signal */
|
|
268
|
+
keysSelected = signal([]);
|
|
269
|
+
loading = signal(false);
|
|
270
|
+
items = signal([]);
|
|
271
|
+
itemFooter = signal(undefined);
|
|
272
|
+
keySearch = signal('');
|
|
273
|
+
itemsHightLight = signal([]);
|
|
274
|
+
headerRightViewPort = signal([]);
|
|
275
|
+
paddingLeftHeaderRight = signal(0);
|
|
276
|
+
footerRightViewPort = signal([]);
|
|
277
|
+
/** GROUP 5 — input() */
|
|
282
278
|
optimizeTableRenderByOnViewport = input();
|
|
283
279
|
timeHighlighNewItem = input(2000, { transform: (val) => val ?? 2000 });
|
|
284
280
|
headerLeft = input([], { transform: (val) => val ?? [] });
|
|
@@ -331,30 +327,61 @@ class LibsUiComponentsTableComponent {
|
|
|
331
327
|
autoEmitKeysSelectedWithItems = input();
|
|
332
328
|
functionGetWidthItem = input(); // bắt buộc truyền vào khi useScrollMeasureColumn = true
|
|
333
329
|
useScrollMeasureColumn = input();
|
|
334
|
-
/**
|
|
330
|
+
/** GROUP 6 — protected computed */
|
|
331
|
+
classHeaderContainer = computed(() => `libs-ui-table-header-container w-full absolute flex shrink-0 ${this.ignoreClassBgHeader() ? '' : 'bg-white'} overflow-x-hidden z-[1] items-center ${this.classHeaderContainerInclude() || ''}`);
|
|
332
|
+
classHeaderLeftContainer = computed(() => `h-full flex sticky top-0 left-0 z-[1] ${this.ignoreClassBgHeader() ? '' : 'bg-white'} ${this.classHeaderLeftInclude() || ''}`);
|
|
333
|
+
totalItemDisplay = computed(() => viewDataNumberByLanguage(this.totalItem() ?? this.totalItemInBackend(), false));
|
|
334
|
+
listConfigMoreItem = computed(() => ({
|
|
335
|
+
type: 'text',
|
|
336
|
+
configTemplateText: this.moreItemTextConfig,
|
|
337
|
+
httpRequestData: this.moreItemHttpData,
|
|
338
|
+
}));
|
|
339
|
+
hasItemHightLight = computed(() => this.itemsHightLight().length > 0);
|
|
340
|
+
classLabelBarNoSelectItemCss = computed(() => this.classLabelBarNoSelectItem() ?? 'px-[12px] py-[5px]');
|
|
341
|
+
paginationConfig = computed(() => ({
|
|
342
|
+
modeDisplayTotalPageAndGotoPage: this.paginationSetting()?.modeDisplayTotalPageAndGotoPage ?? 'bottom',
|
|
343
|
+
classDisplayTotalPageAndGotoPage: this.paginationSetting()?.classDisplayTotalPageAndGotoPage ?? '',
|
|
344
|
+
classIncludeItem: this.paginationSetting()?.classIncludeItem ?? '',
|
|
345
|
+
classIncludeContainer: this.paginationSetting()?.classIncludeContainer ?? '!items-end',
|
|
346
|
+
disable: (this.paginationSetting()?.disable ?? false) || this.loading() || !this.items().length,
|
|
347
|
+
numberPageDisplay: this.paginationSetting()?.numberPageDisplay ?? 5,
|
|
348
|
+
showTotalPage: this.paginationSetting()?.showTotalPage ?? false,
|
|
349
|
+
showInputGotoPage: this.paginationSetting()?.showInputGotoPage ?? false,
|
|
350
|
+
}));
|
|
351
|
+
pagingTotalItems = computed(() => this.pagingStore()?.total_items ?? (this.pagingStore()?.total_pages ?? 0) * (this.pagingStore()?.per_page ?? 0));
|
|
352
|
+
pagingPerPage = computed(() => this.pagingStore()?.per_page ?? 0);
|
|
353
|
+
pagingCurrentPage = computed(() => this.pagingStore()?.page ?? 0);
|
|
354
|
+
noDataText = computed(() => this.noDataConfig().textNoData ?? 'i18n_no_data_yet');
|
|
355
|
+
noDataSearchText = computed(() => this.noDataConfig().textSearchNoData ?? 'i18n_no_result');
|
|
356
|
+
/** GROUP 7 — output() */
|
|
335
357
|
outLoadMore = output();
|
|
336
358
|
outScrollIsGone = output();
|
|
337
359
|
outLoading = output();
|
|
338
|
-
outClickButtonAction = output();
|
|
339
360
|
outSort = output();
|
|
340
361
|
outClickBarButton = output();
|
|
341
|
-
outHoverButtonAction = output();
|
|
342
362
|
outKeysSelected = output();
|
|
343
363
|
outFunctionsControl = output();
|
|
344
364
|
outLoadDataComplete = output();
|
|
345
365
|
outTotalItem = output();
|
|
346
366
|
outLoadDataError = output();
|
|
347
|
-
/**
|
|
367
|
+
/** GROUP 8 — viewChild() (private) */
|
|
348
368
|
headerElementRef = viewChild('headerElementRef');
|
|
349
369
|
footerElementRef = viewChild('footerElementRef');
|
|
350
370
|
footerLeftElementRef = viewChild('footerLeftElementRef');
|
|
351
371
|
bodyElementRef = viewChild('bodyElementRef');
|
|
352
372
|
bodyComponentRef = viewChild('bodyComponentRef');
|
|
353
|
-
/**
|
|
373
|
+
/** GROUP 9 — inject() (private readonly) */
|
|
354
374
|
httpRequestService = inject(LibsUiHttpRequestService);
|
|
355
375
|
destroyRef = inject(DestroyRef);
|
|
356
376
|
cdr = inject(ChangeDetectorRef);
|
|
357
377
|
constructor() {
|
|
378
|
+
effect(() => {
|
|
379
|
+
const config = this.configSelectMoreItem();
|
|
380
|
+
untracked(() => {
|
|
381
|
+
this.moreItemTextConfig.update((c) => ({ ...c, getValue: config?.getValue }));
|
|
382
|
+
this.moreItemHttpData.update((c) => ({ ...c, objectInstance: returnListObject(config?.listOption) }));
|
|
383
|
+
});
|
|
384
|
+
});
|
|
358
385
|
effect(() => {
|
|
359
386
|
if (this.defaultKeysSelected()?.length) {
|
|
360
387
|
untracked(() => {
|
|
@@ -395,9 +422,9 @@ class LibsUiComponentsTableComponent {
|
|
|
395
422
|
ngOnInit() {
|
|
396
423
|
this.outFunctionsControl.emit(this.FunctionsControl);
|
|
397
424
|
fromEvent(window, 'resize')
|
|
398
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
425
|
+
.pipe(auditTime(100), takeUntilDestroyed(this.destroyRef))
|
|
399
426
|
.subscribe(() => {
|
|
400
|
-
this.cdr.
|
|
427
|
+
this.cdr.markForCheck();
|
|
401
428
|
});
|
|
402
429
|
}
|
|
403
430
|
get FunctionsControl() {
|
|
@@ -423,9 +450,231 @@ class LibsUiComponentsTableComponent {
|
|
|
423
450
|
hightLightItem: this.hightLightItem.bind(this),
|
|
424
451
|
};
|
|
425
452
|
}
|
|
453
|
+
handlerChangeAllChecked() {
|
|
454
|
+
this.keysSelected.set([]);
|
|
455
|
+
this.emitKeysSelected();
|
|
456
|
+
}
|
|
457
|
+
async handlerChangeCheckedAllItems(event) {
|
|
458
|
+
if (!event.checked) {
|
|
459
|
+
this.keysSelected.set([]);
|
|
460
|
+
this.emitKeysSelected();
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
const items = this.items();
|
|
464
|
+
const cancelFlags = await Promise.all(items.map((item) => this.checkCancelConditionCheckedItem(item)));
|
|
465
|
+
this.keysSelected.set(items.filter((_, index) => !cancelFlags[index]).map((item) => `${get(item, this.fieldKey())}`));
|
|
466
|
+
this.emitKeysSelected();
|
|
467
|
+
}
|
|
468
|
+
handlerChangeItemChecked(event, item) {
|
|
469
|
+
const key = get(item, this.fieldKey());
|
|
470
|
+
const keys = new Set(this.keysSelected());
|
|
471
|
+
keys.add(key);
|
|
472
|
+
if (!event.checked) {
|
|
473
|
+
keys.delete(key);
|
|
474
|
+
}
|
|
475
|
+
this.keysSelected.set(Array.from(keys));
|
|
476
|
+
this.emitKeysSelected();
|
|
477
|
+
}
|
|
478
|
+
async handlerChangeSort(sort) {
|
|
479
|
+
const scrollLeft = this.headerElementRef()?.nativeElement.scrollLeft || 0;
|
|
480
|
+
if (this.instanceSort && this.instanceSort()?.fieldSort !== sort.fieldSort) {
|
|
481
|
+
this.instanceSort()?.reset();
|
|
482
|
+
}
|
|
483
|
+
this.instanceSort.set(sort);
|
|
484
|
+
if (this.sortLocal()) {
|
|
485
|
+
this.handlerSortLocal(sort, scrollLeft);
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
this.storeParamsCallApi.update((data) => ({ ...data, instanceSort: this.instanceSort() }));
|
|
489
|
+
this.outSort.emit({
|
|
490
|
+
sort: sort,
|
|
491
|
+
onSortSuccess: () => this.onSortSuccess(scrollLeft),
|
|
492
|
+
});
|
|
493
|
+
try {
|
|
494
|
+
await this.callApiByService(true);
|
|
495
|
+
this.onSortSuccess(scrollLeft);
|
|
496
|
+
}
|
|
497
|
+
catch (error) {
|
|
498
|
+
console.log(error);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
handlerFunctionControlMoreSelectItem(functionControl) {
|
|
502
|
+
this.functionControlSelectMoreItem = functionControl;
|
|
503
|
+
}
|
|
504
|
+
handlerSelectedMoreItem(event) {
|
|
505
|
+
if (!event || !event.key || !this.configSelectMoreItem()) {
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
this.functionControlSelectMoreItem?.reset();
|
|
509
|
+
const perPage = Number(event.key).valueOf();
|
|
510
|
+
const currentPerPage = Number(this.setPerPageSelectMoreItem(perPage)).valueOf();
|
|
511
|
+
const isPagingNumber = this.configSelectMoreItem()?.pagingNumber;
|
|
512
|
+
if (currentPerPage > perPage || this.items.length >= perPage) {
|
|
513
|
+
if (!isPagingNumber) {
|
|
514
|
+
this.setPerPageSelectMoreItem(currentPerPage);
|
|
515
|
+
}
|
|
516
|
+
this.keysSelected.set(this.items()
|
|
517
|
+
.slice(0, perPage)
|
|
518
|
+
.map((item) => `${get(item, this.fieldKey())}`));
|
|
519
|
+
this.emitKeysSelected(true);
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
this.callApiByService(true, true);
|
|
523
|
+
const completeSub = this.outLoadDataComplete.subscribe(() => {
|
|
524
|
+
completeSub.unsubscribe();
|
|
525
|
+
errorSub.unsubscribe();
|
|
526
|
+
if (!isPagingNumber) {
|
|
527
|
+
this.setPerPageSelectMoreItem(currentPerPage);
|
|
528
|
+
}
|
|
529
|
+
this.keysSelected.set(this.items()
|
|
530
|
+
.slice(0, perPage)
|
|
531
|
+
.map((item) => `${get(item, this.fieldKey())}`));
|
|
532
|
+
this.emitKeysSelected(true);
|
|
533
|
+
});
|
|
534
|
+
const errorSub = this.outLoadDataError.subscribe(() => {
|
|
535
|
+
errorSub.unsubscribe();
|
|
536
|
+
completeSub.unsubscribe();
|
|
537
|
+
this.setPerPageSelectMoreItem(currentPerPage);
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
handlerBarButtonClick(button) {
|
|
541
|
+
const items = [];
|
|
542
|
+
this.keysSelected().forEach((key) => {
|
|
543
|
+
const item = this.items().find((item) => `${get(item, this.fieldKey())}` === `${key}`);
|
|
544
|
+
if (item) {
|
|
545
|
+
items.push(item);
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
return this.outClickBarButton.emit({
|
|
549
|
+
button,
|
|
550
|
+
items,
|
|
551
|
+
keys: this.keysSelected(),
|
|
552
|
+
hiddenBarButtons: () => {
|
|
553
|
+
return;
|
|
554
|
+
},
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
setIndexHover(e, item) {
|
|
558
|
+
e.stopPropagation();
|
|
559
|
+
if (!this.items().length) {
|
|
560
|
+
this.resetIndexHover();
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
this.itemOfIndexHover = item;
|
|
564
|
+
}
|
|
565
|
+
resetIndexHoverWhenMouseLeave(e) {
|
|
566
|
+
e?.stopPropagation();
|
|
567
|
+
const currentIndexItemHover = this.itemOfIndexHover;
|
|
568
|
+
clearTimeout(this.timeoutLeaveItem());
|
|
569
|
+
this.timeoutLeaveItem.set(setTimeout(() => {
|
|
570
|
+
if (this.itemOfIndexHover && this.itemOfIndexHover !== currentIndexItemHover) {
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
this.resetIndexHover(e);
|
|
574
|
+
}));
|
|
575
|
+
}
|
|
576
|
+
resetIndexHover(e) {
|
|
577
|
+
e?.stopPropagation();
|
|
578
|
+
this.itemOfIndexHover = undefined;
|
|
579
|
+
}
|
|
580
|
+
handlerMouseLeaveContainer(event) {
|
|
581
|
+
event.stopPropagation();
|
|
582
|
+
this.resetIndexHover(event);
|
|
583
|
+
}
|
|
584
|
+
handlerMouseEnterHeader(event) {
|
|
585
|
+
event.stopPropagation();
|
|
586
|
+
this.mouseEnterHeader.set(true);
|
|
587
|
+
this.resetIndexHover(event);
|
|
588
|
+
}
|
|
589
|
+
handlerMouseLeaveHeader(event) {
|
|
590
|
+
event.stopPropagation();
|
|
591
|
+
this.mouseEnterHeader.set(false);
|
|
592
|
+
this.resetIndexHover(event);
|
|
593
|
+
}
|
|
594
|
+
handlerMouseEnterFooter(event) {
|
|
595
|
+
event.stopPropagation();
|
|
596
|
+
this.resetIndexHover(event);
|
|
597
|
+
if (this.classFooterInclude()) {
|
|
598
|
+
this.footerElementRef()?.nativeElement?.classList.remove('bg-[#f8f9fa]');
|
|
599
|
+
this.footerLeftElementRef()?.nativeElement?.classList.remove('bg-[#f8f9fa]');
|
|
600
|
+
this.footerElementRef()?.nativeElement?.classList.add(this.classFooterInclude());
|
|
601
|
+
this.footerLeftElementRef()?.nativeElement?.classList.add(this.classFooterInclude());
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
handlerMouseLeaveFooter(event) {
|
|
605
|
+
event.stopPropagation();
|
|
606
|
+
if (this.classFooterInclude()) {
|
|
607
|
+
this.footerElementRef()?.nativeElement?.classList.remove(this.classFooterInclude());
|
|
608
|
+
this.footerLeftElementRef()?.nativeElement?.classList.remove(this.classFooterInclude());
|
|
609
|
+
this.footerElementRef()?.nativeElement?.classList.add('bg-[#f8f9fa]');
|
|
610
|
+
this.footerLeftElementRef()?.nativeElement?.classList.add('bg-[#f8f9fa]');
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
handlerScrollHeader(e) {
|
|
614
|
+
e.stopPropagation();
|
|
615
|
+
if (!this.mouseEnterHeader()) {
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
const scrollLeft = e.target.scrollLeft;
|
|
619
|
+
const bodyEl = this.bodyElementRef()?.nativeElement;
|
|
620
|
+
if (bodyEl) {
|
|
621
|
+
bodyEl.scrollLeft = scrollLeft;
|
|
622
|
+
}
|
|
623
|
+
const footerEl = this.footerElementRef()?.nativeElement;
|
|
624
|
+
if (footerEl) {
|
|
625
|
+
footerEl.scrollLeft = scrollLeft;
|
|
626
|
+
}
|
|
627
|
+
this.resetIndexHover(e);
|
|
628
|
+
}
|
|
629
|
+
handlerScrollBody(e) {
|
|
630
|
+
e.stopPropagation();
|
|
631
|
+
if (this.mouseEnterHeader()) {
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
const scrollLeft = e.target.scrollLeft;
|
|
635
|
+
const headerEl = this.headerElementRef()?.nativeElement;
|
|
636
|
+
if (headerEl) {
|
|
637
|
+
headerEl.scrollLeft = scrollLeft;
|
|
638
|
+
}
|
|
639
|
+
const footerEl = this.footerElementRef()?.nativeElement;
|
|
640
|
+
if (footerEl) {
|
|
641
|
+
footerEl.scrollLeft = scrollLeft;
|
|
642
|
+
}
|
|
643
|
+
this.resetIndexHover(e);
|
|
644
|
+
}
|
|
645
|
+
handlerScrollBottom(e) {
|
|
646
|
+
e.stopPropagation();
|
|
647
|
+
if (this.loading() || this.activityLoadData() !== 'scroll-infinity') {
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
this.outLoadMore.emit({ loadMoreSuccess: this.loadMoreSuccess.bind(this) });
|
|
651
|
+
this.callApiByService(false);
|
|
652
|
+
}
|
|
653
|
+
handlerChangePage(page) {
|
|
654
|
+
this.pagingStore.update((data) => ({ ...(data || {}), page }));
|
|
655
|
+
this.callApiByService(true);
|
|
656
|
+
}
|
|
657
|
+
// CONVENTION-EXCEPT: any — Sử dụng any array để map ngược generic properties linh động
|
|
658
|
+
handlerOutViewPortItemHeaderRight(event) {
|
|
659
|
+
this.headerRightViewPort.set(event);
|
|
660
|
+
}
|
|
661
|
+
handlerOutPaddingLeftHeaderRight(event) {
|
|
662
|
+
this.paddingLeftHeaderRight.set(event);
|
|
663
|
+
}
|
|
664
|
+
// CONVENTION-EXCEPT: any — Map array signal linh hoạt cho generic
|
|
665
|
+
handlerOutViewPortItemFooterRight(event) {
|
|
666
|
+
this.footerRightViewPort.set(event);
|
|
667
|
+
}
|
|
426
668
|
getIndexRow = (data) => {
|
|
427
669
|
return of(this.items().findIndex((item) => item === data.value) + 1);
|
|
428
670
|
};
|
|
671
|
+
fakeResponseApi() {
|
|
672
|
+
this.loadedLastItem.set(false);
|
|
673
|
+
if (this.activityLoadData() === 'scroll-infinity') {
|
|
674
|
+
this.pagingStore.set({});
|
|
675
|
+
}
|
|
676
|
+
return this.httpRequestService.fakeResponsePagingApi();
|
|
677
|
+
}
|
|
429
678
|
getScrollContainer() {
|
|
430
679
|
return this.bodyComponentRef();
|
|
431
680
|
}
|
|
@@ -488,13 +737,6 @@ class LibsUiComponentsTableComponent {
|
|
|
488
737
|
this.outLoading.emit(this.loading());
|
|
489
738
|
}
|
|
490
739
|
}
|
|
491
|
-
fakeResponseApi() {
|
|
492
|
-
this.loadedLastItem.set(false);
|
|
493
|
-
if (this.activityLoadData() === 'scroll-infinity') {
|
|
494
|
-
this.pagingStore.set({});
|
|
495
|
-
}
|
|
496
|
-
return this.httpRequestService.fakeResponsePagingApi();
|
|
497
|
-
}
|
|
498
740
|
async callApiByServiceFooter() {
|
|
499
741
|
if (!this.httpRequestDataFooter() || !this.showFooter()) {
|
|
500
742
|
return;
|
|
@@ -508,19 +750,25 @@ class LibsUiComponentsTableComponent {
|
|
|
508
750
|
if (!items() || !items().length) {
|
|
509
751
|
return;
|
|
510
752
|
}
|
|
753
|
+
const existingKeys = new Set(this.items().map((item) => `${get(item, this.fieldKey())}`));
|
|
511
754
|
const itemsAdd = [];
|
|
512
755
|
items().forEach((item) => {
|
|
513
|
-
|
|
756
|
+
const key = `${get(item, this.fieldKey())}`;
|
|
757
|
+
if (!existingKeys.has(key)) {
|
|
758
|
+
existingKeys.add(key);
|
|
514
759
|
itemsAdd.push(item);
|
|
515
|
-
if (addFirst) {
|
|
516
|
-
this.items.update((data) => [item, ...data]);
|
|
517
|
-
this.stores.update((data) => [item, ...data]);
|
|
518
|
-
return;
|
|
519
|
-
}
|
|
520
|
-
this.items.update((data) => [...data, item]);
|
|
521
|
-
this.stores.update((data) => [...data, item]);
|
|
522
760
|
}
|
|
523
761
|
});
|
|
762
|
+
if (itemsAdd.length) {
|
|
763
|
+
if (addFirst) {
|
|
764
|
+
this.items.update((data) => [...itemsAdd, ...data]);
|
|
765
|
+
this.stores.update((data) => [...itemsAdd, ...data]);
|
|
766
|
+
}
|
|
767
|
+
else {
|
|
768
|
+
this.items.update((data) => [...data, ...itemsAdd]);
|
|
769
|
+
this.stores.update((data) => [...data, ...itemsAdd]);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
524
772
|
if (autoCountNewItem && itemsAdd.length) {
|
|
525
773
|
this.totalItemInBackend.update((value) => value + itemsAdd.length);
|
|
526
774
|
}
|
|
@@ -539,9 +787,6 @@ class LibsUiComponentsTableComponent {
|
|
|
539
787
|
await this.callApiByServiceFooter();
|
|
540
788
|
}
|
|
541
789
|
}
|
|
542
|
-
checkExistItem(itemNew) {
|
|
543
|
-
return this.items().find((item) => `${get(item, this.fieldKey())}` === `${get(itemNew, this.fieldKey())}`) ? true : false;
|
|
544
|
-
}
|
|
545
790
|
async removeItems(keys, ignoreReCallFooter, autoCountNewItem) {
|
|
546
791
|
this.resetIndexHover();
|
|
547
792
|
if (!this.items().length) {
|
|
@@ -596,21 +841,6 @@ class LibsUiComponentsTableComponent {
|
|
|
596
841
|
this.loading.set(false);
|
|
597
842
|
this.outLoading.emit(this.loading());
|
|
598
843
|
}
|
|
599
|
-
handlerChangeAllChecked() {
|
|
600
|
-
this.keysSelected.set([]);
|
|
601
|
-
this.emitKeysSelected();
|
|
602
|
-
}
|
|
603
|
-
handlerChangeCheckedAllItems(event) {
|
|
604
|
-
if (event.checked) {
|
|
605
|
-
this.keysSelected.set(this.items()
|
|
606
|
-
.filter(async (item) => !(await this.checkCancelConditionCheckedItem(item)))
|
|
607
|
-
.map((item) => `${get(item, this.fieldKey())}`));
|
|
608
|
-
this.emitKeysSelected();
|
|
609
|
-
return;
|
|
610
|
-
}
|
|
611
|
-
this.keysSelected.set([]);
|
|
612
|
-
this.emitKeysSelected();
|
|
613
|
-
}
|
|
614
844
|
async checkCancelConditionCheckedItem(item) {
|
|
615
845
|
let isCancelCheck = false;
|
|
616
846
|
if (!isCancelCheck && this.headerLeft().length && this.headerLeft()[0].checkConditionCheckBoxHidden) {
|
|
@@ -621,39 +851,6 @@ class LibsUiComponentsTableComponent {
|
|
|
621
851
|
}
|
|
622
852
|
return isCancelCheck;
|
|
623
853
|
}
|
|
624
|
-
handlerChangeItemChecked(event, item) {
|
|
625
|
-
const key = get(item, this.fieldKey());
|
|
626
|
-
const keys = new Set(this.keysSelected());
|
|
627
|
-
keys.add(key);
|
|
628
|
-
if (!event.checked) {
|
|
629
|
-
keys.delete(key);
|
|
630
|
-
}
|
|
631
|
-
this.keysSelected.set(Array.from(keys));
|
|
632
|
-
this.emitKeysSelected();
|
|
633
|
-
}
|
|
634
|
-
async handlerChangeSort(sort) {
|
|
635
|
-
const scrollLeft = this.headerElementRef()?.nativeElement.scrollLeft || 0;
|
|
636
|
-
if (this.instanceSort && this.instanceSort()?.fieldSort !== sort.fieldSort) {
|
|
637
|
-
this.instanceSort()?.reset();
|
|
638
|
-
}
|
|
639
|
-
this.instanceSort.set(sort);
|
|
640
|
-
if (this.sortLocal()) {
|
|
641
|
-
this.handlerSortLocal(sort, scrollLeft);
|
|
642
|
-
return;
|
|
643
|
-
}
|
|
644
|
-
this.storeParamsCallApi.update((data) => ({ ...data, instanceSort: this.instanceSort() }));
|
|
645
|
-
this.outSort.emit({
|
|
646
|
-
sort: sort,
|
|
647
|
-
onSortSuccess: () => this.onSortSuccess(scrollLeft),
|
|
648
|
-
});
|
|
649
|
-
try {
|
|
650
|
-
await this.callApiByService(true);
|
|
651
|
-
this.onSortSuccess(scrollLeft);
|
|
652
|
-
}
|
|
653
|
-
catch (error) {
|
|
654
|
-
console.log(error);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
854
|
handlerSortLocal(sort, scrollLeft) {
|
|
658
855
|
if (this.filterOrSortLocal() && this.stores().length) {
|
|
659
856
|
this.items.set(this.filterOrSortLocal()?.(signal([...this.stores()]), { ...this.storeParamsCallApi(), instanceSort: sort }) || []);
|
|
@@ -677,42 +874,6 @@ class LibsUiComponentsTableComponent {
|
|
|
677
874
|
});
|
|
678
875
|
this.onSortSuccess(scrollLeft);
|
|
679
876
|
}
|
|
680
|
-
handlerFunctionControlMoreSelectItem(functionControl) {
|
|
681
|
-
this.functionControlSelectMoreItem = functionControl;
|
|
682
|
-
}
|
|
683
|
-
handlerSelectedMoreItem(event) {
|
|
684
|
-
if (!event || !event.key || !this.configSelectMoreItem()) {
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
687
|
-
this.functionControlSelectMoreItem?.reset();
|
|
688
|
-
const perPage = Number(event.key).valueOf();
|
|
689
|
-
const currentPerPage = Number(this.setPerPageSelectMoreItem(perPage)).valueOf();
|
|
690
|
-
const isPagingNumber = this.configSelectMoreItem()?.pagingNumber;
|
|
691
|
-
if (currentPerPage > perPage || this.items.length >= perPage) {
|
|
692
|
-
if (!isPagingNumber) {
|
|
693
|
-
this.setPerPageSelectMoreItem(currentPerPage);
|
|
694
|
-
}
|
|
695
|
-
this.keysSelected.set(this.items()
|
|
696
|
-
.slice(0, perPage)
|
|
697
|
-
.map((item) => `${get(item, this.fieldKey())}`));
|
|
698
|
-
this.emitKeysSelected(true);
|
|
699
|
-
return;
|
|
700
|
-
}
|
|
701
|
-
this.callApiByService(true, true);
|
|
702
|
-
const sub = this.outLoadDataComplete.subscribe(() => {
|
|
703
|
-
sub.unsubscribe();
|
|
704
|
-
if (!isPagingNumber) {
|
|
705
|
-
this.setPerPageSelectMoreItem(currentPerPage);
|
|
706
|
-
}
|
|
707
|
-
this.keysSelected.set(this.items()
|
|
708
|
-
.slice(0, perPage)
|
|
709
|
-
.map((item) => `${get(item, this.fieldKey())}`));
|
|
710
|
-
this.emitKeysSelected(true);
|
|
711
|
-
});
|
|
712
|
-
this.outLoadDataError.subscribe(() => {
|
|
713
|
-
this.setPerPageSelectMoreItem(currentPerPage);
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
877
|
setPerPageSelectMoreItem(perPage) {
|
|
717
878
|
const argumentsValue = this.httpRequestData()?.argumentsValue;
|
|
718
879
|
if (!argumentsValue || !this.configSelectMoreItem()) {
|
|
@@ -740,139 +901,19 @@ class LibsUiComponentsTableComponent {
|
|
|
740
901
|
this.loading.set(false);
|
|
741
902
|
this.outLoading.emit(this.loading());
|
|
742
903
|
}
|
|
743
|
-
handlerButtonClick(type, buttonDropdownData, button) {
|
|
744
|
-
// buttonOrigin chỉ sử dụng khi dùng buttonActions có button-dropdown
|
|
745
|
-
if (type === 'button') {
|
|
746
|
-
return this.outClickButtonAction.emit({ item: this.itemOfIndexHover, button: button });
|
|
747
|
-
}
|
|
748
|
-
this.outClickButtonAction.emit({ item: this.itemOfIndexHover, button, buttonDropdownData });
|
|
749
|
-
}
|
|
750
|
-
handlerBarButtonClick(button) {
|
|
751
|
-
const items = [];
|
|
752
|
-
this.keysSelected().forEach((key) => {
|
|
753
|
-
const item = this.items().find((item) => `${get(item, this.fieldKey())}` === `${key}`);
|
|
754
|
-
if (item) {
|
|
755
|
-
items.push(item);
|
|
756
|
-
}
|
|
757
|
-
});
|
|
758
|
-
return this.outClickBarButton.emit({
|
|
759
|
-
button,
|
|
760
|
-
items,
|
|
761
|
-
keys: this.keysSelected(),
|
|
762
|
-
hiddenBarButtons: () => {
|
|
763
|
-
return;
|
|
764
|
-
},
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
handlerButtonDropdownEvent(eventName) {
|
|
768
|
-
this.hasActionButtonDropdownContent.set(true);
|
|
769
|
-
if (eventName === 'remove' || eventName === 'mouseleave-content') {
|
|
770
|
-
this.hasActionButtonDropdownContent.set(false);
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
setIndexHover(e, item) {
|
|
774
|
-
e.stopPropagation();
|
|
775
|
-
if (!this.items().length) {
|
|
776
|
-
this.resetIndexHover();
|
|
777
|
-
return;
|
|
778
|
-
}
|
|
779
|
-
this.itemOfIndexHover = item;
|
|
780
|
-
}
|
|
781
|
-
resetIndexHoverWhenMouseLeave(e) {
|
|
782
|
-
e?.stopPropagation();
|
|
783
|
-
const currentIndexItemHover = this.itemOfIndexHover;
|
|
784
|
-
clearTimeout(this.timeoutLeaveItem());
|
|
785
|
-
this.timeoutLeaveItem.set(setTimeout(() => {
|
|
786
|
-
if (this.itemOfIndexHover && this.itemOfIndexHover !== currentIndexItemHover) {
|
|
787
|
-
return;
|
|
788
|
-
}
|
|
789
|
-
this.resetIndexHover(e);
|
|
790
|
-
}));
|
|
791
|
-
}
|
|
792
|
-
resetIndexHover(e) {
|
|
793
|
-
e?.stopPropagation();
|
|
794
|
-
if (this.hasActionButtonDropdownContent()) {
|
|
795
|
-
return;
|
|
796
|
-
}
|
|
797
|
-
this.itemOfIndexHover = undefined;
|
|
798
|
-
}
|
|
799
|
-
handlerMouseLeaveContainer(event) {
|
|
800
|
-
event.stopPropagation();
|
|
801
|
-
this.resetIndexHover(event);
|
|
802
|
-
}
|
|
803
|
-
handlerMouseEnterHeader(event) {
|
|
804
|
-
event.stopPropagation();
|
|
805
|
-
this.mouseEnterHeader.set(true);
|
|
806
|
-
this.resetIndexHover(event);
|
|
807
|
-
}
|
|
808
|
-
handlerMouseLeaveHeader(event) {
|
|
809
|
-
event.stopPropagation();
|
|
810
|
-
this.mouseEnterHeader.set(false);
|
|
811
|
-
this.resetIndexHover(event);
|
|
812
|
-
}
|
|
813
|
-
handlerMouseEnterFooter(event) {
|
|
814
|
-
event.stopPropagation();
|
|
815
|
-
this.resetIndexHover(event);
|
|
816
|
-
if (this.classFooterInclude()) {
|
|
817
|
-
this.footerElementRef()?.nativeElement?.classList.remove('bg-[#f8f9fa]');
|
|
818
|
-
this.footerLeftElementRef()?.nativeElement?.classList.remove('bg-[#f8f9fa]');
|
|
819
|
-
this.footerElementRef()?.nativeElement?.classList.add(this.classFooterInclude());
|
|
820
|
-
this.footerLeftElementRef()?.nativeElement?.classList.add(this.classFooterInclude());
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
handlerMouseLeaveFooter(event) {
|
|
824
|
-
event.stopPropagation();
|
|
825
|
-
if (this.classFooterInclude()) {
|
|
826
|
-
this.footerElementRef()?.nativeElement?.classList.remove(this.classFooterInclude());
|
|
827
|
-
this.footerLeftElementRef()?.nativeElement?.classList.remove(this.classFooterInclude());
|
|
828
|
-
this.footerElementRef()?.nativeElement?.classList.add('bg-[#f8f9fa]');
|
|
829
|
-
this.footerLeftElementRef()?.nativeElement?.classList.add('bg-[#f8f9fa]');
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
handlerScrollHeader(e) {
|
|
833
|
-
e.stopPropagation();
|
|
834
|
-
if (!this.mouseEnterHeader()) {
|
|
835
|
-
return;
|
|
836
|
-
}
|
|
837
|
-
this.bodyElementRef().nativeElement.scrollLeft = e.target.scrollLeft;
|
|
838
|
-
if (this.footerElementRef()) {
|
|
839
|
-
this.footerElementRef().nativeElement.scrollLeft = e.target.scrollLeft;
|
|
840
|
-
}
|
|
841
|
-
this.resetIndexHover(e);
|
|
842
|
-
}
|
|
843
|
-
handlerScrollBody(e) {
|
|
844
|
-
e.stopPropagation();
|
|
845
|
-
if (this.mouseEnterHeader()) {
|
|
846
|
-
return;
|
|
847
|
-
}
|
|
848
|
-
this.headerElementRef().nativeElement.scrollLeft = e.target.scrollLeft;
|
|
849
|
-
if (this.footerElementRef()) {
|
|
850
|
-
this.footerElementRef().nativeElement.scrollLeft = e.target.scrollLeft;
|
|
851
|
-
}
|
|
852
|
-
this.resetIndexHover(e);
|
|
853
|
-
}
|
|
854
|
-
handlerScrollBottom(e) {
|
|
855
|
-
e.stopPropagation();
|
|
856
|
-
if (this.loading() || this.activityLoadData() !== 'scroll-infinity') {
|
|
857
|
-
return;
|
|
858
|
-
}
|
|
859
|
-
this.outLoadMore.emit({ loadMoreSuccess: this.loadMoreSuccess.bind(this) });
|
|
860
|
-
this.callApiByService(false);
|
|
861
|
-
}
|
|
862
|
-
handlerChangePage(page) {
|
|
863
|
-
this.pagingStore.update((data) => ({ ...(data || {}), page }));
|
|
864
|
-
this.callApiByService(true);
|
|
865
|
-
}
|
|
866
904
|
resetScroll(scrollPositionLeft, scrollPositionTop) {
|
|
867
|
-
|
|
868
|
-
|
|
905
|
+
const headerEl = this.headerElementRef()?.nativeElement;
|
|
906
|
+
if (headerEl) {
|
|
907
|
+
headerEl.scrollLeft = scrollPositionLeft || 0;
|
|
869
908
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
909
|
+
const bodyEl = this.bodyElement;
|
|
910
|
+
if (bodyEl) {
|
|
911
|
+
bodyEl.scrollTop = scrollPositionTop || 0;
|
|
912
|
+
bodyEl.scrollLeft = scrollPositionLeft || 0;
|
|
873
913
|
}
|
|
874
|
-
|
|
875
|
-
|
|
914
|
+
const footerEl = this.footerElementRef()?.nativeElement;
|
|
915
|
+
if (footerEl) {
|
|
916
|
+
footerEl.scrollLeft = scrollPositionLeft || 0;
|
|
876
917
|
}
|
|
877
918
|
}
|
|
878
919
|
reset(clearSort) {
|
|
@@ -894,8 +935,8 @@ class LibsUiComponentsTableComponent {
|
|
|
894
935
|
timer(500)
|
|
895
936
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
896
937
|
.subscribe(() => {
|
|
897
|
-
if (this.
|
|
898
|
-
this.hasScroll.set(this.
|
|
938
|
+
if (this.bodyElement) {
|
|
939
|
+
this.hasScroll.set(this.bodyElement.scrollHeight > this.bodyElement.offsetHeight);
|
|
899
940
|
}
|
|
900
941
|
if (hasScroll && !this.hasScroll()) {
|
|
901
942
|
this.outScrollIsGone.emit({});
|
|
@@ -907,7 +948,7 @@ class LibsUiComponentsTableComponent {
|
|
|
907
948
|
});
|
|
908
949
|
});
|
|
909
950
|
}
|
|
910
|
-
get
|
|
951
|
+
get bodyElement() {
|
|
911
952
|
return this.bodyElementRef()?.nativeElement;
|
|
912
953
|
}
|
|
913
954
|
async hightLightItem(items) {
|
|
@@ -933,22 +974,11 @@ class LibsUiComponentsTableComponent {
|
|
|
933
974
|
}
|
|
934
975
|
this.outKeysSelected.emit({ keys: this.keysSelected() });
|
|
935
976
|
}
|
|
936
|
-
// CONVENTION-EXCEPT: any — Sử dụng any array để map ngược generic properties linh động
|
|
937
|
-
handlerOutViewPortItemHeaderRight(event) {
|
|
938
|
-
this.headerRightViewPort.set(event);
|
|
939
|
-
}
|
|
940
|
-
handlerOutPaddingLeftHeaderRight(event) {
|
|
941
|
-
this.paddingLeftHeaderRight.set(event);
|
|
942
|
-
}
|
|
943
|
-
// CONVENTION-EXCEPT: any — Map array signal linh hoạt cho generic
|
|
944
|
-
handlerOutViewPortItemFooterRight(event) {
|
|
945
|
-
this.footerRightViewPort.set(event);
|
|
946
|
-
}
|
|
947
977
|
ngOnDestroy() {
|
|
948
978
|
clearTimeout(this.timeoutLeaveItem());
|
|
949
979
|
}
|
|
950
980
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
951
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsTableComponent, isStandalone: true, selector: "libs_ui-components-table", inputs: { optimizeTableRenderByOnViewport: { classPropertyName: "optimizeTableRenderByOnViewport", publicName: "optimizeTableRenderByOnViewport", isSignal: true, isRequired: false, transformFunction: null }, timeHighlighNewItem: { classPropertyName: "timeHighlighNewItem", publicName: "timeHighlighNewItem", isSignal: true, isRequired: false, transformFunction: null }, headerLeft: { classPropertyName: "headerLeft", publicName: "headerLeft", isSignal: true, isRequired: false, transformFunction: null }, headerRight: { classPropertyName: "headerRight", publicName: "headerRight", isSignal: true, isRequired: false, transformFunction: null }, ignoreCalculatorWidthHeader: { classPropertyName: "ignoreCalculatorWidthHeader", publicName: "ignoreCalculatorWidthHeader", isSignal: true, isRequired: false, transformFunction: null }, configTemplateItemCollapseExpand: { classPropertyName: "configTemplateItemCollapseExpand", publicName: "configTemplateItemCollapseExpand", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, ignoreBorderFooter: { classPropertyName: "ignoreBorderFooter", publicName: "ignoreBorderFooter", isSignal: true, isRequired: false, transformFunction: null }, customPositionFooter: { classPropertyName: "customPositionFooter", publicName: "customPositionFooter", isSignal: true, isRequired: false, transformFunction: null }, footerLeft: { classPropertyName: "footerLeft", publicName: "footerLeft", isSignal: true, isRequired: false, transformFunction: null }, footerRight: { classPropertyName: "footerRight", publicName: "footerRight", isSignal: true, isRequired: false, transformFunction: null }, disableCheckbox: { classPropertyName: "disableCheckbox", publicName: "disableCheckbox", isSignal: true, isRequired: false, transformFunction: null }, enableUnequalChildrenSizes: { classPropertyName: "enableUnequalChildrenSizes", publicName: "enableUnequalChildrenSizes", isSignal: true, isRequired: false, transformFunction: null }, bufferAmount: { classPropertyName: "bufferAmount", publicName: "bufferAmount", isSignal: true, isRequired: false, transformFunction: null }, totalItem: { classPropertyName: "totalItem", publicName: "totalItem", isSignal: true, isRequired: false, transformFunction: null }, isDashBorder: { classPropertyName: "isDashBorder", publicName: "isDashBorder", isSignal: true, isRequired: false, transformFunction: null }, classHeaderContainerInclude: { classPropertyName: "classHeaderContainerInclude", publicName: "classHeaderContainerInclude", isSignal: true, isRequired: false, transformFunction: null }, classHeaderLeftInclude: { classPropertyName: "classHeaderLeftInclude", publicName: "classHeaderLeftInclude", isSignal: true, isRequired: false, transformFunction: null }, classBodyInclude: { classPropertyName: "classBodyInclude", publicName: "classBodyInclude", isSignal: true, isRequired: false, transformFunction: null }, classFooterInclude: { classPropertyName: "classFooterInclude", publicName: "classFooterInclude", isSignal: true, isRequired: false, transformFunction: null }, classTableContainerInclude: { classPropertyName: "classTableContainerInclude", publicName: "classTableContainerInclude", isSignal: true, isRequired: false, transformFunction: null }, classBarInclude: { classPropertyName: "classBarInclude", publicName: "classBarInclude", isSignal: true, isRequired: false, transformFunction: null }, fieldKey: { classPropertyName: "fieldKey", publicName: "fieldKey", isSignal: true, isRequired: false, transformFunction: null }, defaultKeysSelected: { classPropertyName: "defaultKeysSelected", publicName: "defaultKeysSelected", isSignal: true, isRequired: false, transformFunction: null }, labelBarNoSelectItem: { classPropertyName: "labelBarNoSelectItem", publicName: "labelBarNoSelectItem", isSignal: true, isRequired: false, transformFunction: null }, labelBarButtons: { classPropertyName: "labelBarButtons", publicName: "labelBarButtons", isSignal: true, isRequired: false, transformFunction: null }, classLabelBarButtons: { classPropertyName: "classLabelBarButtons", publicName: "classLabelBarButtons", isSignal: true, isRequired: false, transformFunction: null }, barButtons: { classPropertyName: "barButtons", publicName: "barButtons", isSignal: true, isRequired: false, transformFunction: null }, sortLocal: { classPropertyName: "sortLocal", publicName: "sortLocal", isSignal: true, isRequired: false, transformFunction: null }, filterOrSortLocal: { classPropertyName: "filterOrSortLocal", publicName: "filterOrSortLocal", isSignal: true, isRequired: false, transformFunction: null }, httpRequestData: { classPropertyName: "httpRequestData", publicName: "httpRequestData", isSignal: true, isRequired: false, transformFunction: null }, httpRequestDataFooter: { classPropertyName: "httpRequestDataFooter", publicName: "httpRequestDataFooter", isSignal: true, isRequired: false, transformFunction: null }, newData: { classPropertyName: "newData", publicName: "newData", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, ignoreBar: { classPropertyName: "ignoreBar", publicName: "ignoreBar", isSignal: true, isRequired: false, transformFunction: null }, classLabelBarNoSelectItem: { classPropertyName: "classLabelBarNoSelectItem", publicName: "classLabelBarNoSelectItem", isSignal: true, isRequired: false, transformFunction: null }, ignoreClassBgHeader: { classPropertyName: "ignoreClassBgHeader", publicName: "ignoreClassBgHeader", isSignal: true, isRequired: false, transformFunction: null }, noDataConfig: { classPropertyName: "noDataConfig", publicName: "noDataConfig", isSignal: true, isRequired: false, transformFunction: null }, showScrollTablePinnedIfNoData: { classPropertyName: "showScrollTablePinnedIfNoData", publicName: "showScrollTablePinnedIfNoData", isSignal: true, isRequired: false, transformFunction: null }, ignoreBorderItemLast: { classPropertyName: "ignoreBorderItemLast", publicName: "ignoreBorderItemLast", isSignal: true, isRequired: false, transformFunction: null }, isHiddenHeaderWhenNodata: { classPropertyName: "isHiddenHeaderWhenNodata", publicName: "isHiddenHeaderWhenNodata", isSignal: true, isRequired: false, transformFunction: null }, maxItemSelected: { classPropertyName: "maxItemSelected", publicName: "maxItemSelected", isSignal: true, isRequired: false, transformFunction: null }, configSelectMoreItem: { classPropertyName: "configSelectMoreItem", publicName: "configSelectMoreItem", isSignal: true, isRequired: false, transformFunction: null }, onlyShowNoResult: { classPropertyName: "onlyShowNoResult", publicName: "onlyShowNoResult", isSignal: true, isRequired: false, transformFunction: null }, ignoreBorderItem: { classPropertyName: "ignoreBorderItem", publicName: "ignoreBorderItem", isSignal: true, isRequired: false, transformFunction: null }, activityLoadData: { classPropertyName: "activityLoadData", publicName: "activityLoadData", isSignal: true, isRequired: false, transformFunction: null }, paginationSetting: { classPropertyName: "paginationSetting", publicName: "paginationSetting", isSignal: true, isRequired: false, transformFunction: null }, templateNoData: { classPropertyName: "templateNoData", publicName: "templateNoData", isSignal: true, isRequired: false, transformFunction: null }, templateNoResult: { classPropertyName: "templateNoResult", publicName: "templateNoResult", isSignal: true, isRequired: false, transformFunction: null }, autoEmitKeysSelectedWithItems: { classPropertyName: "autoEmitKeysSelectedWithItems", publicName: "autoEmitKeysSelectedWithItems", isSignal: true, isRequired: false, transformFunction: null }, functionGetWidthItem: { classPropertyName: "functionGetWidthItem", publicName: "functionGetWidthItem", isSignal: true, isRequired: false, transformFunction: null }, useScrollMeasureColumn: { classPropertyName: "useScrollMeasureColumn", publicName: "useScrollMeasureColumn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outLoadMore: "outLoadMore", outScrollIsGone: "outScrollIsGone", outLoading: "outLoading", outClickButtonAction: "outClickButtonAction", outSort: "outSort", outClickBarButton: "outClickBarButton", outHoverButtonAction: "outHoverButtonAction", outKeysSelected: "outKeysSelected", outFunctionsControl: "outFunctionsControl", outLoadDataComplete: "outLoadDataComplete", outTotalItem: "outTotalItem", outLoadDataError: "outLoadDataError" }, viewQueries: [{ propertyName: "headerElementRef", first: true, predicate: ["headerElementRef"], descendants: true, isSignal: true }, { propertyName: "footerElementRef", first: true, predicate: ["footerElementRef"], descendants: true, isSignal: true }, { propertyName: "footerLeftElementRef", first: true, predicate: ["footerLeftElementRef"], descendants: true, isSignal: true }, { propertyName: "bodyElementRef", first: true, predicate: ["bodyElementRef"], descendants: true, isSignal: true }, { propertyName: "bodyComponentRef", first: true, predicate: ["bodyComponentRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col w-full h-full\">\n @if (!ignoreBar()) {\n <div\n class=\"flex items-center relative z-[1] bottom-0 left-0 w-full bg-white libs-ui-table-shadow-bottom {{ classBarInclude() }}\"\n [class.px-[16px]]=\"keysSelected().length || labelBarNoSelectItem()\"\n [class.py-[6px]]=\"keysSelected().length || labelBarNoSelectItem()\"\n (mouseenter)=\"resetIndexHover($event)\">\n <ng-content select=\"div.libs-ui-table-bar-left\"></ng-content>\n @if (!keysSelected().length && labelBarNoSelectItem()) {\n <div\n class=\"{{ classLabelBarNoSelectItem() ?? 'px-[12px] py-[5px]' }}\"\n [innerHtml]=\"labelBarNoSelectItem() | translate: { value: totalItemDisplay() }\"></div>\n }\n @if (keysSelected().length) {\n <div class=\"flex items-center pl-[12px]\">\n <div class=\"flex items-center h-full mt-[-2px]\">\n <libs_ui-components-checkbox-single\n [checked]=\"true\"\n [disable]=\"loading() || disableCheckbox()\"\n (outChange)=\"handlerChangeAllChecked()\" />\n </div>\n <div class=\"libs-ui-font-h5m text-[#071631] mr-[8px] {{ classLabelBarButtons() }}\">\n {{ labelBarButtons() | translate: { value: keysSelected().length } }}\n </div>\n @if (configSelectMoreItem()) {\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: true,\n maxHeight: 2048,\n classInclude: '!w-[121px]',\n position: {\n mode: 'start',\n distance: 0,\n },\n }\"\n [listConfig]=\"listConfigMoreItem()\"\n [listHiddenInputSearch]=\"true\"\n [listMaxItemShow]=\"5\"\n class=\"!w-[16px] h-[16px] mr-[8px]\"\n (outSelectKey)=\"handlerSelectedMoreItem($event)\"\n (outFunctionsControl)=\"handlerFunctionControlMoreSelectItem($event)\">\n <libs_ui-components-buttons-button\n [type]=\"'button-link-primary'\"\n [classInclude]=\"'!p-0 m-0'\"\n [classIconLeft]=\"'before:!text-[16px] libs-ui-icon-move-right rotate-90 mr-[6px]'\"\n [popover]=\"{ config: { content: 'i18n_more_select' } }\"\n [ignoreStopPropagationEvent]=\"true\" />\n </libs_ui-components-dropdown>\n }\n <div class=\"h-[16px] libs-ui-border-left-general ml-[16px]\"></div>\n @if (barButtons()?.length) {\n @for (button of barButtons(); track button) {\n @let constHtmlLabel = button.label || ' ';\n <libs_ui-components-buttons-button\n [type]=\"button.type || 'button-link-primary'\"\n [classIconLeft]=\"button.classIconLeft || ''\"\n [classInclude]=\"button.classInclude || ''\"\n [label]=\"constHtmlLabel | translate\"\n (outClick)=\"handlerBarButtonClick(button)\" />\n }\n }\n </div>\n }\n <ng-content select=\"div.libs-ui-table-bar-right\"></ng-content>\n </div>\n }\n\n <div\n #tableContainerElementRef\n class=\"libs-ui-table flex flex-col w-full h-full relative {{ classTableContainerInclude() }}\"\n [class.px-[16px]]=\"!ignoreBar()\"\n (mouseleave)=\"handlerMouseLeaveContainer($event)\">\n <div\n class=\"relative w-full shrink-0\"\n [style.height.px]=\"headerElementRef.offsetHeight\"\n [class.!hidden]=\"!items().length && isHiddenHeaderWhenNodata()\">\n <div\n #headerElementRef\n LibsUiComponentsScrollOverlayDirective\n [options]=\"{ scrollbarWidth: 0 }\"\n [class.libs-ui-border-bottom-dashed-general]=\"!hasItemHightLight() && isDashBorder()\"\n [class.libs-ui-border-bottom-general]=\"!hasItemHightLight() && !isDashBorder()\"\n [class]=\"classHeaderContainer()\"\n (outScroll)=\"handlerScrollHeader($event)\"\n (mouseenter)=\"handlerMouseEnterHeader($event)\"\n (mouseleave)=\"handlerMouseLeaveHeader($event)\">\n @if (headerLeft().length) {\n <div [class]=\"classHeaderLeftContainer()\">\n @for (header of headerLeft(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: true }\" />\n }\n </div>\n }\n @if (headerRight().length) {\n @let constHtmlFunctionGetWidthItem = functionGetWidthItem();\n @if (useScrollMeasureColumn() && constHtmlFunctionGetWidthItem) {\n <div\n class=\"flex w-full h-full relative\"\n LibsUiScrollMeasureItemDirectionHorizontalDirective\n [elementScroll]=\"headerElementRef\"\n [items]=\"headerRight()\"\n [functionGetWidthItem]=\"constHtmlFunctionGetWidthItem\"\n (outViewPortItem)=\"handlerOutViewPortItemHeaderRight($event)\"\n (outPaddingLeft)=\"handlerOutPaddingLeftHeaderRight($event)\">\n @for (header of headerRightViewPort(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: false }\" />\n }\n </div>\n } @else {\n @for (header of headerRight(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: false }\" />\n }\n }\n }\n </div>\n </div>\n @if (showFooter() && itemFooter() && customPositionFooter() === 'top') {\n <ng-container *ngTemplateOutlet=\"templateFooterRef\" />\n }\n <div class=\"relative flex flex-col w-full h-full overflow-x-hidden bg-white {{ classBodyInclude() || '' }}\">\n <div\n #bodyElementRef\n class=\"flex h-full w-full relative\"\n LibsUiComponentsScrollOverlayDirective\n (outScroll)=\"handlerScrollBody($event)\"\n (outScrollBottom)=\"handlerScrollBottom($event)\">\n @if (items().length) {\n <virtual-scroller\n #bodyComponentRef\n [items]=\"items()\"\n [enableUnequalChildrenSizes]=\"enableUnequalChildrenSizes()\"\n class=\"h-full\"\n [style.width.px]=\"headerElementRef.scrollWidth > (bodyElementRef ? bodyElementRef.scrollWidth : 0) ? headerElementRef.scrollWidth : undefined\"\n [parentScroll]=\"bodyElementRef\"\n [bufferAmount]=\"bufferAmount()\">\n @for (data of bodyComponentRef.viewPortItems; track data()) {\n @let constHtmlIsHightLightItem = data | LibsUiTableCheckItemHightLightPipe: itemsHightLight();\n <div\n #elementHover\n class=\"flex\"\n [class.bg-[#f3fcfc]]=\"constHtmlIsHightLightItem\"\n [class.libs-ui-border-top-1px-36d3d3]=\"constHtmlIsHightLightItem && $first && !ignoreBorderItem()\"\n [class.libs-ui-border-bottom-1px-36d3d3]=\"constHtmlIsHightLightItem && !ignoreBorderItem()\"\n [ngClass]=\"\n constHtmlIsHightLightItem || ($last && ignoreBorderItemLast())\n ? 'libs-ui-border-radius-bottom-left-4px libs-ui-border-radius-bottom-right-4px'\n : ignoreBorderItem()\n ? ''\n : isDashBorder()\n ? 'libs-ui-border-bottom-dashed-general'\n : 'libs-ui-border-bottom-general'\n \"\n [style.width.px]=\"headerElementRef.scrollWidth\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !constHtmlIsHightLightItem\"\n (mouseenter)=\"setIndexHover($event, data)\"\n (mouseleave)=\"resetIndexHoverWhenMouseLeave($event)\">\n @if (headerLeft().length || headerRight().length) {\n <div class=\"flex flex-col w-full\">\n <div class=\"flex w-full\">\n @if (headerLeft().length) {\n <div\n class=\"flex sticky top-0 left-0 z-[1]\"\n [class.bg-white]=\"!constHtmlIsHightLightItem\"\n [class.bg-[#f3fcfc]]=\"constHtmlIsHightLightItem\">\n @for (header of headerLeft(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px] {{ header.ignoreBorderRight ? '' : 'libs-ui-border-right-general' }}\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !constHtmlIsHightLightItem\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerLeft || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n </div>\n }\n @if (headerRight().length) {\n @if (useScrollMeasureColumn()) {\n <div\n class=\"flex w-full min-w-0\"\n [style.padding-left.px]=\"paddingLeftHeaderRight()\">\n @for (header of headerRightViewPort(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n </div>\n } @else {\n @for (header of headerRight(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n }\n }\n </div>\n @if (configTemplateItemCollapseExpand() && data().specificExpand && data()[configTemplateItemCollapseExpand()?.fieldGetDataExpand || 'specificDataExpand']) {\n <div [class]=\"configTemplateItemCollapseExpand()?.cssWrapper || 'flex w-full'\">\n @for (dataExpand of data()[configTemplateItemCollapseExpand()?.fieldGetDataExpand || 'specificDataExpand'](); track $index) {\n @if (configTemplateItemCollapseExpand()?.colTemplateConfig) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"dataExpand\"\n [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"dataExpand\"\n [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\n }\n }\n } @empty {\n <div class=\"relative h-[100px]\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n </virtual-scroller>\n } @else if (!loading()) {\n <div class=\"sticky left-0 top-0 z-[1] h-[calc(100%-10px)] w-full\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n @if (showScrollTablePinnedIfNoData()) {\n <div\n class=\"absolute h-[1px] bg-transparent top-0 left-0 z-[1]\"\n [style.width.px]=\"headerElementRef.scrollWidth\"></div>\n }\n }\n </div>\n\n @if (showFooter() && itemFooter() && customPositionFooter() === 'bottom') {\n <ng-container *ngTemplateOutlet=\"templateFooterRef\" />\n }\n\n @if (loading()) {\n <div class=\"absolute w-full h-full z-[2] flex items-center content-center\">\n <libs_ui-components-spinner />\n </div>\n }\n </div>\n\n @if (activityLoadData() === 'click-pagination') {\n <div class=\"flex w-full mt-[12px]\">\n <libs_ui-components-pagination\n [modeDisplayTotalPageAndGotoPage]=\"paginationSetting()?.modeDisplayTotalPageAndGotoPage || 'bottom'\"\n [classDisplayTotalPageAndGotoPage]=\"paginationSetting()?.classDisplayTotalPageAndGotoPage || ''\"\n [classIncludeItem]=\"paginationSetting()?.classIncludeItem || ''\"\n [classIncludeContainer]=\"paginationSetting()?.classIncludeContainer || '!items-end'\"\n [disable]=\"paginationSetting()?.disable || loading() || !items().length\"\n [numberPageDisplay]=\"paginationSetting()?.numberPageDisplay || 5\"\n [showTotalPage]=\"paginationSetting()?.showTotalPage || false\"\n [showInputGotoPage]=\"paginationSetting()?.showInputGotoPage || false\"\n [totalItems]=\"pagingStore()?.total_items || (pagingStore()?.total_pages || 0) * (pagingStore()?.per_page || 0)\"\n [perPage]=\"pagingStore()?.per_page || 0\"\n [currentPage]=\"pagingStore()?.page || 0\"\n (outPageSelect)=\"handlerChangePage($event)\" />\n </div>\n }\n </div>\n</div>\n\n<ng-template\n #templateHeaderRef\n let-header=\"headerItem\"\n let-isHeaderLeft=\"isHeaderLeft\">\n <div\n [class]=\"'relative flex ' + (header.paddingLeftRightHeaderContainer ?? ' px-[12px] ') + (isHeaderLeft && !header.ignoreBorderRight ? ' libs-ui-border-right-general ' : ' ') + ' libs-ui-table-header-col '\"\n [class.flex-col]=\"header.rowsConfig\"\n [class.py-[8px]]=\"!header.ignorePyDefault\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: (isHeaderLeft ? ignoreCalculatorWidthHeader()?.headerLeft || false : ignoreCalculatorWidthHeader()?.headerRight || false) : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n @if (!header.rowsConfig) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef; context: { headerItem: header, isColRender: false, isHeaderLeft: isHeaderLeft }\" />\n }\n @if (header.rowsConfig; as rowsConfig) {\n @for (row of rowsConfig.rows; track row) {\n <div [class]=\"row.classRow\">\n @for (col of row.cols; track col) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef; context: { headerItem: col, isColRender: true, isHeaderLeft: isHeaderLeft }\" />\n }\n </div>\n }\n }\n </div>\n</ng-template>\n\n<ng-template\n #templateHeaderContentRef\n let-header=\"headerItem\"\n let-isColRender=\"isColRender\"\n let-isHeaderLeft=\"isHeaderLeft\">\n <div\n #itemHeaderRef\n class=\"flex libs-ui-font-h6m min-h-[18px] text-[#6a7383] max-w-full\"\n [class.items-center]=\"header.contentHeaderAlignCenter ?? true\"\n [class.justify-end]=\"header.contentHeaderJustifyContentEnd\"\n [class.w-full]=\"header.isShowIndexOnRow\"\n [ngStyle]=\"\n isColRender\n ? (header | LibsUiTableCalculatorColumnPipe: (isHeaderLeft ? ignoreCalculatorWidthHeader()?.headerLeft || false : ignoreCalculatorWidthHeader()?.headerRight || false) : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n : {}\n \"\n [ngClass]=\"isColRender ? header.ngClass || {} : {}\">\n @if (header.hasCheckbox) {\n @if (header.hasCheckboxAll) {\n <div\n class=\"flex h-full {{ header.checkboxAllClassInclude || 'mr-[16px]' }}\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single\n [key]=\"'all'\"\n [stillOtherOptions]=\"!!keysSelected().length && keysSelected().length !== items().length\"\n [checked]=\"!!keysSelected().length && keysSelected().length === items().length\"\n [disable]=\"loading()\"\n [classInclude]=\"header.checkboxClassInclude\"\n (outChange)=\"handlerChangeCheckedAllItems($event)\" />\n </div>\n } @else {\n <div class=\"flex h-full ml-[24px] {{ header.checkboxClassInclude }}\"></div>\n }\n }\n @for (tooltip of header.tooltipsLeft; track tooltip) {\n <div class=\"mr-[4px]\">\n @let constHtmlTooltip = tooltip.dataView || ' ';\n <libs_ui-components-popover\n [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"\n tooltip.config || {\n content: constHtmlTooltip | translate,\n position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12,\n },\n },\n }\n \"\n [innerHTML]=\"tooltip.dataView\" />\n </div>\n }\n\n @if (header.isShowIndexOnRow) {\n <div class=\"flex w-full h-full items-center justify-center {{ header.classIncludeIndexOnRow || '' }}\">\n {{ header.label ?? '#' }}\n </div>\n } @else {\n @if (header.label | LibsUiPipesCallFunctionInTemplatePipe: header.parseValue : header | async | translate; as labelHeaderColumn) {\n <libs_ui-components-popover\n [type]=\"header?.labelConfig?.type || 'text'\"\n [mode]=\"header?.labelConfig?.mode || 'hover'\"\n [classInclude]=\"header?.labelConfig?.classInclude || ''\"\n [ignoreShowPopover]=\"header?.labelConfig?.ignoreShowTooltip || false\"\n [config]=\"header.labelConfig?.config || { content: labelHeaderColumn }\"\n [innerHTML]=\"labelHeaderColumn\" />\n }\n }\n\n @for (tooltip of header.tooltipsRight; track tooltip) {\n <div class=\"ml-[4px]\">\n @let constHtmlTooltip = tooltip.dataView || ' ';\n <libs_ui-components-popover\n [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"\n tooltip.config || {\n content: constHtmlTooltip | translate,\n position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12,\n },\n },\n }\n \"\n [innerHTML]=\"tooltip.dataView\" />\n </div>\n }\n\n @if (header.hasSort && header.orderby) {\n <div class=\"ml-[4px]\">\n <libs_ui-components-buttons-sort-arrow\n [disable]=\"loading() || !items().length\"\n [fieldSort]=\"header.orderby\"\n [ignorePopoverContent]=\"header.sortIgnoreTooltipContent ?? true\"\n [popoverContentAsc]=\"header.sortTooltipContentAsc\"\n [popoverContentDesc]=\"header.sortTooltipContentDesc\"\n [defaultMode]=\"header.defaultMode\"\n [zIndex]=\"header.zIndexTooltipSort\"\n (outChange)=\"handlerChangeSort($event)\" />\n </div>\n }\n </div>\n @if (header.labelDescription) {\n <div class=\"flex\">\n <libs_ui-components-popover\n [type]=\"'text'\"\n [classInclude]=\"header.labelDescription.classInclude || ''\"\n [config]=\"{ content: header.labelDescription.content | translate }\"\n [innerHTML]=\"header.labelDescription.content | translate\" />\n </div>\n }\n</ng-template>\n\n<ng-template\n #templateBodyRef\n let-header=\"header\"\n let-data=\"data\"\n let-constHtmlIsHightLightItem=\"constHtmlIsHightLightItem\">\n <div class=\"flex w-full h-full\">\n @if (header.hasCheckbox) {\n <div\n class=\"flex h-full\"\n [class.invisible]=\"header.checkConditionCheckBoxHidden && (data() | LibsUiPipesCallFunctionInTemplatePipe: header.checkConditionCheckBoxHidden : data() | async)\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single\n [key]=\"data()[fieldKey()]\"\n [classInclude]=\"header.checkboxClassInclude\"\n [checked]=\"data()[fieldKey()] | LibsUiPipesCheckSelectedByKeyPipe: keysSelected() : keysSelected().length\"\n [disable]=\"loading() || disableCheckbox() || !!(maxItemSelected() && !(data()[fieldKey()] | LibsUiPipesCheckSelectedByKeyPipe: keysSelected() : keysSelected().length) && keysSelected().length >= maxItemSelected())\"\n (outChange)=\"handlerChangeItemChecked($event, data())\" />\n </div>\n }\n\n @if (header.isShowIndexOnRow; as config) {\n <div class=\"w-full flex items-center justify-center libs-ui-font-h4r{{ config.classIncludeIndexOnRow || '' }}\">\n <div\n LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{}\"\n [innerHTML]=\"data | LibsUiPipesCallFunctionInTemplatePipe: getIndexRow | async\"></div>\n </div>\n }\n\n @if (header.colTemplateConfig) {\n @let constHtmlIsHover = itemOfIndexHover === data && !constHtmlIsHightLightItem;\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [isHover]=\"constHtmlIsHover\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"header.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [isHover]=\"constHtmlIsHover\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n }\n }\n </div>\n</ng-template>\n\n<ng-template #templateFooterRef>\n @if (!isHiddenHeaderWhenNodata() || (isHiddenHeaderWhenNodata() && items().length)) {\n <div\n #footerElementRef\n class=\"flex w-full bg-[#f8f9fa] overflow-x-hidden z-[1] {{ ignoreBorderFooter() ? '' : customPositionFooter() === 'top' ? 'libs-ui-border-bottom-general' : 'libs-ui-table-shadow-top libs-ui-border-top-general' }} min-h-[35px]\"\n (mouseenter)=\"handlerMouseEnterFooter($event)\"\n (mouseleave)=\"handlerMouseLeaveFooter($event)\">\n @if (footerLeft()) {\n <div\n #footerLeftElementRef\n class=\"flex sticky top-0 left-0 z-[1] bg-[#f8f9fa]\">\n @for (footer of footerLeft(); track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px] {{ footer.ignoreBorderRight ? '' : 'libs-ui-border-right-general' }}\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerLeft || false : headerElementRef.clientWidth : footerLeft() : footerRight()) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n </div>\n }\n @if (footerRight(); as footerRightList) {\n @let constHtmlFunctionGetWidthItemFooter = functionGetWidthItem();\n @if (useScrollMeasureColumn() && constHtmlFunctionGetWidthItemFooter) {\n <div\n class=\"flex h-full w-full relative\"\n LibsUiScrollMeasureItemDirectionHorizontalDirective\n [elementScroll]=\"footerElementRef\"\n [items]=\"footerRightList\"\n [functionGetWidthItem]=\"constHtmlFunctionGetWidthItemFooter\"\n (outViewPortItem)=\"handlerOutViewPortItemFooterRight($event)\">\n @for (footer of footerRightViewPort(); track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : footerLeft() : footerRightList) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n </div>\n } @else {\n @for (footer of footerRightList; track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : footerLeft() : footerRightList) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n }\n }\n </div>\n }\n</ng-template>\n\n<ng-template #templateNodataRef>\n @if (keySearch() || onlyShowNoResult()) {\n @if (templateNoResult(); as templateNoResult) {\n <ng-container *ngTemplateOutlet=\"templateNoResult\" />\n } @else {\n <div class=\"flex items-center justify-center w-full h-full absolute left-0 top-0 z-[1]\">\n <div class=\"flex flex-col items-center justify-center w-full h-full shrink-0\">\n <ng-container *ngComponentOutlet=\"'no-result' | LibsUiIconsGetIconComponentPipe | async; inputs: { size: 64 }\" />\n @let constHtmlTextSearchNoData = noDataConfig().textSearchNoData || 'i18n_no_result';\n <div\n class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"noDataConfig().ngStyle || {}\"\n [ngClass]=\"noDataConfig().ngClass || {}\"\n [innerHtml]=\"constHtmlTextSearchNoData | translate\"></div>\n </div>\n </div>\n }\n } @else {\n @if (templateNoData(); as templateNoData) {\n <ng-container *ngTemplateOutlet=\"templateNoData\" />\n } @else {\n <div class=\"flex items-center justify-center w-full h-full absolute left-0 top-0 z-[1]\">\n <div class=\"flex flex-col items-center justify-center w-full h-full shrink-0\">\n <ng-container *ngComponentOutlet=\"'no-data' | LibsUiIconsGetIconComponentPipe | async; inputs: { size: 64 }\" />\n @let constHtmlTextNoData = noDataConfig().textNoData || 'i18n_no_data_yet';\n <div\n class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"noDataConfig().ngStyle || {}\"\n [ngClass]=\"noDataConfig().ngClass || {}\"\n [innerHtml]=\"constHtmlTextNoData | translate\"></div>\n </div>\n </div>\n }\n }\n</ng-template>\n", styles: [".libs-ui-table-header-container{height:33px;flex-shrink:0}.libs-ui-table-header-col{height:100%;width:100%;align-items:center}.libs-ui-table-no-data-config-text{margin-top:16px;font-size:12px;color:#9ca2ad;font-family:var(--libs-ui-font-family-name, \"Arial\");font-weight:400}.libs-ui-table-no-data-config-icon{margin-bottom:12px}.libs-ui-table-no-data-config-icon:before{font-size:84px;color:#c1c1c1}.libs-ui-table-shadow-bottom{box-shadow:0 1px 1px #00143305,0 4px 8px #0014330a}@media only screen and (min-width: 1921px){.libs-ui-border-bottom-general{border-bottom:solid 2px #e6e8ed!important}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: LibsUiComponentsTableTemplatesComponent, selector: "libs_ui-components-table-templates", inputs: ["isHover", "configs", "templateCssWrapper", "item"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i2.VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["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: ["vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "pipe", type: LibsUiPipesConvertObjectToSignalPipe, name: "LibsUiPipesConvertObjectToSignalPipe" }, { kind: "component", type: LibsUiComponentsDropdownComponent, selector: "libs_ui-components-dropdown", inputs: ["useXssFilter", "popoverElementRefCustom", "classInclude", "ignoreStopPropagationEvent", "flagMouse", "flagMouseContent", "popoverCustomConfig", "isNgContent", "zIndex", "convertItemSelected", "getPopoverItemSelected", "httpRequestDetailItemById", "lengthKeys", "textDisplayWhenNoSelect", "textDisplayWhenMultiSelect", "classIncludeTextDisplayWhenNoSelect", "fieldLabel", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "dropdownTemplateRefNotSearchNoData", "fieldGetImage", "imageSize", "typeShape", "fieldGetIcon", "fieldGetTextAvatar", "fieldGetColorAvatar", "classAvatarInclude", "getLastTextAfterSpace", "linkImageError", "showError", "showBorderError", "disable", "readonly", "labelConfig", "disableLabel", "listSearchConfig", "isSearchOnline", "listHiddenInputSearch", "listSearchPadding", "listKeySearch", "listDividerClassInclude", "listConfig", "listButtonsOther", "listHasButtonUnSelectOption", "listClickExactly", "listBackgroundCustom", "listMaxItemShow", "listKeySelected", "listMultiKeySelected", "listKeysDisable", "listKeysHidden", "validRequired", "validMaxItemSelected", "changeValidUndefinedResetError", "allowSelectItemMultiple", "focusInputSearch", "onlyEmitDataWhenReset", "resetKeyWhenSelectAllKey", "listConfigHasDivider", "classIncludeIcon", "classIncludeContent", "listIgnoreClassDisableDefaultWhenUseKeysDisableItem", "tabKeyActive", "tabsConfig", "ignoreBorderBottom"], outputs: ["flagMouseChange", "flagMouseContentChange", "lengthKeysChange", "showBorderErrorChange", "listKeySelectedChange", "listMultiKeySelectedChange", "tabKeyActiveChange", "outSelectKey", "outSelectMultiKey", "outFunctionsControl", "outValidEvent", "outChangStageFlagMouse", "outDataChange", "outClickButtonOther", "outShowList", "outChangeTabKeyActive"] }, { kind: "component", type: LibsUiComponentsButtonsSortArrowComponent, selector: "libs_ui-components-buttons-sort-arrow", inputs: ["size", "mode", "fieldSort", "disable", "ignorePopoverContent", "popoverContentAsc", "popoverContentDesc", "defaultMode", "zIndex"], outputs: ["modeChange", "outChange"] }, { kind: "component", type: LibsUiComponentsPaginationComponent, selector: "libs_ui-components-pagination", inputs: ["showTotalPage", "showInputGotoPage", "modeDisplayTotalPageAndGotoPage", "classDisplayTotalPageAndGotoPage", "classIncludeContainer", "classIncludeItem", "disable", "numberPageDisplay", "totalItems", "perPage", "currentPage"], outputs: ["currentPageChange", "outPageSelect"] }, { kind: "component", type: LibsUiComponentsCheckboxSingleComponent, selector: "libs_ui-components-checkbox-single", inputs: ["key", "checked", "label", "classLabelInclude", "ignoreShowPopoverLabel", "typeLabelPopover", "popover", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "classInclude", "clickExactly", "disable", "disableLabel", "ignoreCheckbox", "zIndexLabel", "stillOtherOptions", "error", "showBorderError", "description", "iconImageClass", "classIconInclude", "modeBorder", "dataComponentOutlet", "componentOutlet"], outputs: ["checkedChange", "linkImageChange", "outChange", "outEventPopover", "outClickLabel", "outChangStageFlagMousePopover"] }, { kind: "pipe", type: LibsUiTableCalculatorColumnPipe, name: "LibsUiTableCalculatorColumnPipe" }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "ignoreInit", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY", "elementScroll"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiIconsGetIconComponentPipe, name: "LibsUiIconsGetIconComponentPipe" }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiPipesCheckSelectedByKeyPipe, name: "LibsUiPipesCheckSelectedByKeyPipe" }, { kind: "pipe", type: LibsUiTableCheckItemHightLightPipe, name: "LibsUiTableCheckItemHightLightPipe" }, { kind: "directive", type: LibsUiScrollMeasureItemDirectionHorizontalDirective, selector: "[LibsUiScrollMeasureItemDirectionHorizontalDirective]", inputs: ["elementScroll", "functionGetWidthItem", "items"], outputs: ["outViewPortItem", "outFunctionControl", "outDivVirtual", "outPaddingLeft"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [LibsUiComponentsTableTemplatesComponent], () => [LibsUiComponentsTableTemplatesComponent], () => [LibsUiComponentsTableTemplatesComponent,
|
|
981
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsTableComponent, isStandalone: true, selector: "libs_ui-components-table", inputs: { optimizeTableRenderByOnViewport: { classPropertyName: "optimizeTableRenderByOnViewport", publicName: "optimizeTableRenderByOnViewport", isSignal: true, isRequired: false, transformFunction: null }, timeHighlighNewItem: { classPropertyName: "timeHighlighNewItem", publicName: "timeHighlighNewItem", isSignal: true, isRequired: false, transformFunction: null }, headerLeft: { classPropertyName: "headerLeft", publicName: "headerLeft", isSignal: true, isRequired: false, transformFunction: null }, headerRight: { classPropertyName: "headerRight", publicName: "headerRight", isSignal: true, isRequired: false, transformFunction: null }, ignoreCalculatorWidthHeader: { classPropertyName: "ignoreCalculatorWidthHeader", publicName: "ignoreCalculatorWidthHeader", isSignal: true, isRequired: false, transformFunction: null }, configTemplateItemCollapseExpand: { classPropertyName: "configTemplateItemCollapseExpand", publicName: "configTemplateItemCollapseExpand", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, ignoreBorderFooter: { classPropertyName: "ignoreBorderFooter", publicName: "ignoreBorderFooter", isSignal: true, isRequired: false, transformFunction: null }, customPositionFooter: { classPropertyName: "customPositionFooter", publicName: "customPositionFooter", isSignal: true, isRequired: false, transformFunction: null }, footerLeft: { classPropertyName: "footerLeft", publicName: "footerLeft", isSignal: true, isRequired: false, transformFunction: null }, footerRight: { classPropertyName: "footerRight", publicName: "footerRight", isSignal: true, isRequired: false, transformFunction: null }, disableCheckbox: { classPropertyName: "disableCheckbox", publicName: "disableCheckbox", isSignal: true, isRequired: false, transformFunction: null }, enableUnequalChildrenSizes: { classPropertyName: "enableUnequalChildrenSizes", publicName: "enableUnequalChildrenSizes", isSignal: true, isRequired: false, transformFunction: null }, bufferAmount: { classPropertyName: "bufferAmount", publicName: "bufferAmount", isSignal: true, isRequired: false, transformFunction: null }, totalItem: { classPropertyName: "totalItem", publicName: "totalItem", isSignal: true, isRequired: false, transformFunction: null }, isDashBorder: { classPropertyName: "isDashBorder", publicName: "isDashBorder", isSignal: true, isRequired: false, transformFunction: null }, classHeaderContainerInclude: { classPropertyName: "classHeaderContainerInclude", publicName: "classHeaderContainerInclude", isSignal: true, isRequired: false, transformFunction: null }, classHeaderLeftInclude: { classPropertyName: "classHeaderLeftInclude", publicName: "classHeaderLeftInclude", isSignal: true, isRequired: false, transformFunction: null }, classBodyInclude: { classPropertyName: "classBodyInclude", publicName: "classBodyInclude", isSignal: true, isRequired: false, transformFunction: null }, classFooterInclude: { classPropertyName: "classFooterInclude", publicName: "classFooterInclude", isSignal: true, isRequired: false, transformFunction: null }, classTableContainerInclude: { classPropertyName: "classTableContainerInclude", publicName: "classTableContainerInclude", isSignal: true, isRequired: false, transformFunction: null }, classBarInclude: { classPropertyName: "classBarInclude", publicName: "classBarInclude", isSignal: true, isRequired: false, transformFunction: null }, fieldKey: { classPropertyName: "fieldKey", publicName: "fieldKey", isSignal: true, isRequired: false, transformFunction: null }, defaultKeysSelected: { classPropertyName: "defaultKeysSelected", publicName: "defaultKeysSelected", isSignal: true, isRequired: false, transformFunction: null }, labelBarNoSelectItem: { classPropertyName: "labelBarNoSelectItem", publicName: "labelBarNoSelectItem", isSignal: true, isRequired: false, transformFunction: null }, labelBarButtons: { classPropertyName: "labelBarButtons", publicName: "labelBarButtons", isSignal: true, isRequired: false, transformFunction: null }, classLabelBarButtons: { classPropertyName: "classLabelBarButtons", publicName: "classLabelBarButtons", isSignal: true, isRequired: false, transformFunction: null }, barButtons: { classPropertyName: "barButtons", publicName: "barButtons", isSignal: true, isRequired: false, transformFunction: null }, sortLocal: { classPropertyName: "sortLocal", publicName: "sortLocal", isSignal: true, isRequired: false, transformFunction: null }, filterOrSortLocal: { classPropertyName: "filterOrSortLocal", publicName: "filterOrSortLocal", isSignal: true, isRequired: false, transformFunction: null }, httpRequestData: { classPropertyName: "httpRequestData", publicName: "httpRequestData", isSignal: true, isRequired: false, transformFunction: null }, httpRequestDataFooter: { classPropertyName: "httpRequestDataFooter", publicName: "httpRequestDataFooter", isSignal: true, isRequired: false, transformFunction: null }, newData: { classPropertyName: "newData", publicName: "newData", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, ignoreBar: { classPropertyName: "ignoreBar", publicName: "ignoreBar", isSignal: true, isRequired: false, transformFunction: null }, classLabelBarNoSelectItem: { classPropertyName: "classLabelBarNoSelectItem", publicName: "classLabelBarNoSelectItem", isSignal: true, isRequired: false, transformFunction: null }, ignoreClassBgHeader: { classPropertyName: "ignoreClassBgHeader", publicName: "ignoreClassBgHeader", isSignal: true, isRequired: false, transformFunction: null }, noDataConfig: { classPropertyName: "noDataConfig", publicName: "noDataConfig", isSignal: true, isRequired: false, transformFunction: null }, showScrollTablePinnedIfNoData: { classPropertyName: "showScrollTablePinnedIfNoData", publicName: "showScrollTablePinnedIfNoData", isSignal: true, isRequired: false, transformFunction: null }, ignoreBorderItemLast: { classPropertyName: "ignoreBorderItemLast", publicName: "ignoreBorderItemLast", isSignal: true, isRequired: false, transformFunction: null }, isHiddenHeaderWhenNodata: { classPropertyName: "isHiddenHeaderWhenNodata", publicName: "isHiddenHeaderWhenNodata", isSignal: true, isRequired: false, transformFunction: null }, maxItemSelected: { classPropertyName: "maxItemSelected", publicName: "maxItemSelected", isSignal: true, isRequired: false, transformFunction: null }, configSelectMoreItem: { classPropertyName: "configSelectMoreItem", publicName: "configSelectMoreItem", isSignal: true, isRequired: false, transformFunction: null }, onlyShowNoResult: { classPropertyName: "onlyShowNoResult", publicName: "onlyShowNoResult", isSignal: true, isRequired: false, transformFunction: null }, ignoreBorderItem: { classPropertyName: "ignoreBorderItem", publicName: "ignoreBorderItem", isSignal: true, isRequired: false, transformFunction: null }, activityLoadData: { classPropertyName: "activityLoadData", publicName: "activityLoadData", isSignal: true, isRequired: false, transformFunction: null }, paginationSetting: { classPropertyName: "paginationSetting", publicName: "paginationSetting", isSignal: true, isRequired: false, transformFunction: null }, templateNoData: { classPropertyName: "templateNoData", publicName: "templateNoData", isSignal: true, isRequired: false, transformFunction: null }, templateNoResult: { classPropertyName: "templateNoResult", publicName: "templateNoResult", isSignal: true, isRequired: false, transformFunction: null }, autoEmitKeysSelectedWithItems: { classPropertyName: "autoEmitKeysSelectedWithItems", publicName: "autoEmitKeysSelectedWithItems", isSignal: true, isRequired: false, transformFunction: null }, functionGetWidthItem: { classPropertyName: "functionGetWidthItem", publicName: "functionGetWidthItem", isSignal: true, isRequired: false, transformFunction: null }, useScrollMeasureColumn: { classPropertyName: "useScrollMeasureColumn", publicName: "useScrollMeasureColumn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outLoadMore: "outLoadMore", outScrollIsGone: "outScrollIsGone", outLoading: "outLoading", outSort: "outSort", outClickBarButton: "outClickBarButton", outKeysSelected: "outKeysSelected", outFunctionsControl: "outFunctionsControl", outLoadDataComplete: "outLoadDataComplete", outTotalItem: "outTotalItem", outLoadDataError: "outLoadDataError" }, viewQueries: [{ propertyName: "headerElementRef", first: true, predicate: ["headerElementRef"], descendants: true, isSignal: true }, { propertyName: "footerElementRef", first: true, predicate: ["footerElementRef"], descendants: true, isSignal: true }, { propertyName: "footerLeftElementRef", first: true, predicate: ["footerLeftElementRef"], descendants: true, isSignal: true }, { propertyName: "bodyElementRef", first: true, predicate: ["bodyElementRef"], descendants: true, isSignal: true }, { propertyName: "bodyComponentRef", first: true, predicate: ["bodyComponentRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col w-full h-full\">\n @if (!ignoreBar()) {\n <div\n class=\"flex items-center relative z-[1] bottom-0 left-0 w-full bg-white libs-ui-table-shadow-bottom {{ classBarInclude() }}\"\n [class.px-[16px]]=\"keysSelected().length || labelBarNoSelectItem()\"\n [class.py-[6px]]=\"keysSelected().length || labelBarNoSelectItem()\"\n (mouseenter)=\"resetIndexHover($event)\">\n <ng-content select=\"div.libs-ui-table-bar-left\"></ng-content>\n @if (!keysSelected().length && labelBarNoSelectItem()) {\n <div\n class=\"{{ classLabelBarNoSelectItemCss() }}\"\n [innerHtml]=\"labelBarNoSelectItem() | translate: { value: totalItemDisplay() }\"></div>\n }\n @if (keysSelected().length) {\n <div class=\"flex items-center pl-[12px]\">\n <div class=\"flex items-center h-full mt-[-2px]\">\n <libs_ui-components-checkbox-single\n [checked]=\"true\"\n [disable]=\"loading() || disableCheckbox()\"\n (outChange)=\"handlerChangeAllChecked()\" />\n </div>\n <div class=\"libs-ui-font-h5m text-[#071631] mr-[8px] {{ classLabelBarButtons() }}\">\n {{ labelBarButtons() | translate: { value: keysSelected().length } }}\n </div>\n @if (configSelectMoreItem()) {\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: true,\n maxHeight: 2048,\n classInclude: '!w-[121px]',\n position: {\n mode: 'start',\n distance: 0,\n },\n }\"\n [listConfig]=\"listConfigMoreItem()\"\n [listHiddenInputSearch]=\"true\"\n [listMaxItemShow]=\"5\"\n class=\"!w-[16px] h-[16px] mr-[8px]\"\n (outSelectKey)=\"handlerSelectedMoreItem($event)\"\n (outFunctionsControl)=\"handlerFunctionControlMoreSelectItem($event)\">\n <libs_ui-components-buttons-button\n [type]=\"'button-link-primary'\"\n [classInclude]=\"'!p-0 m-0'\"\n [classIconLeft]=\"'before:!text-[16px] libs-ui-icon-move-right rotate-90 mr-[6px]'\"\n [popover]=\"{ config: { content: 'i18n_more_select' } }\"\n [ignoreStopPropagationEvent]=\"true\" />\n </libs_ui-components-dropdown>\n }\n <div class=\"h-[16px] libs-ui-border-left-general ml-[16px]\"></div>\n @if (barButtons()?.length) {\n @for (button of barButtons(); track button) {\n @let constHtmlLabel = button.label || ' ';\n <libs_ui-components-buttons-button\n [type]=\"button.type || 'button-link-primary'\"\n [classIconLeft]=\"button.classIconLeft || ''\"\n [classInclude]=\"button.classInclude || ''\"\n [label]=\"constHtmlLabel | translate\"\n (outClick)=\"handlerBarButtonClick(button)\" />\n }\n }\n </div>\n }\n <ng-content select=\"div.libs-ui-table-bar-right\"></ng-content>\n </div>\n }\n\n <div\n #tableContainerElementRef\n class=\"libs-ui-table flex flex-col w-full h-full relative {{ classTableContainerInclude() }}\"\n [class.px-[16px]]=\"!ignoreBar()\"\n (mouseleave)=\"handlerMouseLeaveContainer($event)\">\n <div\n class=\"relative w-full shrink-0\"\n [style.height.px]=\"headerElementRef.offsetHeight\"\n [class.!hidden]=\"!items().length && isHiddenHeaderWhenNodata()\">\n <div\n #headerElementRef\n LibsUiComponentsScrollOverlayDirective\n [options]=\"{ scrollbarWidth: 0 }\"\n [class.libs-ui-border-bottom-dashed-general]=\"!hasItemHightLight() && isDashBorder()\"\n [class.libs-ui-border-bottom-general]=\"!hasItemHightLight() && !isDashBorder()\"\n [class]=\"classHeaderContainer()\"\n (outScroll)=\"handlerScrollHeader($event)\"\n (mouseenter)=\"handlerMouseEnterHeader($event)\"\n (mouseleave)=\"handlerMouseLeaveHeader($event)\">\n @if (headerLeft().length) {\n <div [class]=\"classHeaderLeftContainer()\">\n @for (header of headerLeft(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: true }\" />\n }\n </div>\n }\n @if (headerRight().length) {\n @let constHtmlFunctionGetWidthItem = functionGetWidthItem();\n @if (useScrollMeasureColumn() && constHtmlFunctionGetWidthItem) {\n <div\n class=\"flex w-full h-full relative\"\n LibsUiScrollMeasureItemDirectionHorizontalDirective\n [elementScroll]=\"headerElementRef\"\n [items]=\"headerRight()\"\n [functionGetWidthItem]=\"constHtmlFunctionGetWidthItem\"\n (outViewPortItem)=\"handlerOutViewPortItemHeaderRight($event)\"\n (outPaddingLeft)=\"handlerOutPaddingLeftHeaderRight($event)\">\n @for (header of headerRightViewPort(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: false }\" />\n }\n </div>\n } @else {\n @for (header of headerRight(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: false }\" />\n }\n }\n }\n </div>\n </div>\n @if (showFooter() && itemFooter() && customPositionFooter() === 'top') {\n <ng-container *ngTemplateOutlet=\"templateFooterRef\" />\n }\n <div class=\"relative flex flex-col w-full h-full overflow-x-hidden bg-white {{ classBodyInclude() || '' }}\">\n <div\n #bodyElementRef\n class=\"flex h-full w-full relative\"\n LibsUiComponentsScrollOverlayDirective\n (outScroll)=\"handlerScrollBody($event)\"\n (outScrollBottom)=\"handlerScrollBottom($event)\">\n @if (items().length) {\n <virtual-scroller\n #bodyComponentRef\n [items]=\"items()\"\n [enableUnequalChildrenSizes]=\"enableUnequalChildrenSizes()\"\n class=\"h-full\"\n [style.width.px]=\"headerElementRef.scrollWidth > (bodyElementRef ? bodyElementRef.scrollWidth : 0) ? headerElementRef.scrollWidth : undefined\"\n [parentScroll]=\"bodyElementRef\"\n [bufferAmount]=\"bufferAmount()\">\n @for (data of bodyComponentRef.viewPortItems; track data()) {\n @let constHtmlIsHightLightItem = data | LibsUiTableCheckItemHightLightPipe: itemsHightLight();\n <div\n #elementHover\n class=\"flex\"\n [class.bg-[#f3fcfc]]=\"constHtmlIsHightLightItem\"\n [class.libs-ui-border-top-1px-36d3d3]=\"constHtmlIsHightLightItem && $first && !ignoreBorderItem()\"\n [class.libs-ui-border-bottom-1px-36d3d3]=\"constHtmlIsHightLightItem && !ignoreBorderItem()\"\n [ngClass]=\"\n constHtmlIsHightLightItem || ($last && ignoreBorderItemLast())\n ? 'libs-ui-border-radius-bottom-left-4px libs-ui-border-radius-bottom-right-4px'\n : ignoreBorderItem()\n ? ''\n : isDashBorder()\n ? 'libs-ui-border-bottom-dashed-general'\n : 'libs-ui-border-bottom-general'\n \"\n [style.width.px]=\"headerElementRef.scrollWidth\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !constHtmlIsHightLightItem\"\n (mouseenter)=\"setIndexHover($event, data)\"\n (mouseleave)=\"resetIndexHoverWhenMouseLeave($event)\">\n @if (headerLeft().length || headerRight().length) {\n <div class=\"flex flex-col w-full\">\n <div class=\"flex w-full\">\n @if (headerLeft().length) {\n <div\n class=\"flex sticky top-0 left-0 z-[1]\"\n [class.bg-white]=\"!constHtmlIsHightLightItem\"\n [class.bg-[#f3fcfc]]=\"constHtmlIsHightLightItem\">\n @for (header of headerLeft(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px] {{ header.ignoreBorderRight ? '' : 'libs-ui-border-right-general' }}\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !constHtmlIsHightLightItem\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerLeft || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n </div>\n }\n @if (headerRight().length) {\n @if (useScrollMeasureColumn()) {\n <div\n class=\"flex w-full min-w-0\"\n [style.padding-left.px]=\"paddingLeftHeaderRight()\">\n @for (header of headerRightViewPort(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n </div>\n } @else {\n @for (header of headerRight(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n }\n }\n </div>\n @if (configTemplateItemCollapseExpand() && data().specificExpand && data()[configTemplateItemCollapseExpand()?.fieldGetDataExpand || 'specificDataExpand']) {\n <div [class]=\"configTemplateItemCollapseExpand()?.cssWrapper || 'flex w-full'\">\n @for (dataExpand of data()[configTemplateItemCollapseExpand()?.fieldGetDataExpand || 'specificDataExpand'](); track dataExpand) {\n @if (configTemplateItemCollapseExpand()?.colTemplateConfig) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"dataExpand\"\n [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"dataExpand\"\n [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\n }\n }\n } @empty {\n <div class=\"relative h-[100px]\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n </virtual-scroller>\n } @else if (!loading()) {\n <div class=\"sticky left-0 top-0 z-[1] h-[calc(100%-10px)] w-full\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n @if (showScrollTablePinnedIfNoData()) {\n <div\n class=\"absolute h-[1px] bg-transparent top-0 left-0 z-[1]\"\n [style.width.px]=\"headerElementRef.scrollWidth\"></div>\n }\n }\n </div>\n\n @if (showFooter() && itemFooter() && customPositionFooter() === 'bottom') {\n <ng-container *ngTemplateOutlet=\"templateFooterRef\" />\n }\n\n @if (loading()) {\n <div class=\"absolute w-full h-full z-[2] flex items-center content-center\">\n <libs_ui-components-spinner />\n </div>\n }\n </div>\n\n @if (activityLoadData() === 'click-pagination') {\n <div class=\"flex w-full mt-[12px]\">\n <libs_ui-components-pagination\n [modeDisplayTotalPageAndGotoPage]=\"paginationConfig().modeDisplayTotalPageAndGotoPage\"\n [classDisplayTotalPageAndGotoPage]=\"paginationConfig().classDisplayTotalPageAndGotoPage\"\n [classIncludeItem]=\"paginationConfig().classIncludeItem\"\n [classIncludeContainer]=\"paginationConfig().classIncludeContainer\"\n [disable]=\"paginationConfig().disable\"\n [numberPageDisplay]=\"paginationConfig().numberPageDisplay\"\n [showTotalPage]=\"paginationConfig().showTotalPage\"\n [showInputGotoPage]=\"paginationConfig().showInputGotoPage\"\n [totalItems]=\"pagingTotalItems()\"\n [perPage]=\"pagingPerPage()\"\n [currentPage]=\"pagingCurrentPage()\"\n (outPageSelect)=\"handlerChangePage($event)\" />\n </div>\n }\n </div>\n</div>\n\n<ng-template\n #templateHeaderRef\n let-header=\"headerItem\"\n let-isHeaderLeft=\"isHeaderLeft\">\n <div\n [class]=\"'relative flex ' + (header.paddingLeftRightHeaderContainer ?? ' px-[12px] ') + (isHeaderLeft && !header.ignoreBorderRight ? ' libs-ui-border-right-general ' : ' ') + ' libs-ui-table-header-col '\"\n [class.flex-col]=\"header.rowsConfig\"\n [class.py-[8px]]=\"!header.ignorePyDefault\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: (isHeaderLeft ? ignoreCalculatorWidthHeader()?.headerLeft || false : ignoreCalculatorWidthHeader()?.headerRight || false) : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n @if (!header.rowsConfig) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef; context: { headerItem: header, isColRender: false, isHeaderLeft: isHeaderLeft }\" />\n }\n @if (header.rowsConfig; as rowsConfig) {\n @for (row of rowsConfig.rows; track row) {\n <div [class]=\"row.classRow\">\n @for (col of row.cols; track col) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef; context: { headerItem: col, isColRender: true, isHeaderLeft: isHeaderLeft }\" />\n }\n </div>\n }\n }\n </div>\n</ng-template>\n\n<ng-template\n #templateHeaderContentRef\n let-header=\"headerItem\"\n let-isColRender=\"isColRender\"\n let-isHeaderLeft=\"isHeaderLeft\">\n <div\n #itemHeaderRef\n class=\"flex libs-ui-font-h6m min-h-[18px] text-[#6a7383] max-w-full\"\n [class.items-center]=\"header.contentHeaderAlignCenter ?? true\"\n [class.justify-end]=\"header.contentHeaderJustifyContentEnd\"\n [class.w-full]=\"header.isShowIndexOnRow\"\n [ngStyle]=\"\n isColRender\n ? (header | LibsUiTableCalculatorColumnPipe: (isHeaderLeft ? ignoreCalculatorWidthHeader()?.headerLeft || false : ignoreCalculatorWidthHeader()?.headerRight || false) : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n : {}\n \"\n [ngClass]=\"isColRender ? header.ngClass || {} : {}\">\n @if (header.hasCheckbox) {\n @if (header.hasCheckboxAll) {\n <div\n class=\"flex h-full {{ header.checkboxAllClassInclude || 'mr-[16px]' }}\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single\n [key]=\"'all'\"\n [stillOtherOptions]=\"!!keysSelected().length && keysSelected().length !== items().length\"\n [checked]=\"!!keysSelected().length && keysSelected().length === items().length\"\n [disable]=\"loading()\"\n [classInclude]=\"header.checkboxClassInclude\"\n (outChange)=\"handlerChangeCheckedAllItems($event)\" />\n </div>\n } @else {\n <div class=\"flex h-full ml-[24px] {{ header.checkboxClassInclude }}\"></div>\n }\n }\n @for (tooltip of header.tooltipsLeft; track tooltip) {\n <div class=\"mr-[4px]\">\n @let constHtmlTooltip = tooltip.dataView || ' ';\n <libs_ui-components-popover\n [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"\n tooltip.config || {\n content: constHtmlTooltip | translate,\n position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12,\n },\n },\n }\n \"\n [innerHTML]=\"tooltip.dataView\" />\n </div>\n }\n\n @if (header.isShowIndexOnRow) {\n <div class=\"flex w-full h-full items-center justify-center {{ header.classIncludeIndexOnRow || '' }}\">\n {{ header.label ?? '#' }}\n </div>\n } @else {\n @if (header.label | LibsUiPipesCallFunctionInTemplatePipe: header.parseValue : header | async | translate; as labelHeaderColumn) {\n <libs_ui-components-popover\n [type]=\"header?.labelConfig?.type || 'text'\"\n [mode]=\"header?.labelConfig?.mode || 'hover'\"\n [classInclude]=\"header?.labelConfig?.classInclude || ''\"\n [ignoreShowPopover]=\"header?.labelConfig?.ignoreShowTooltip || false\"\n [config]=\"header.labelConfig?.config || { content: labelHeaderColumn }\"\n [innerHTML]=\"labelHeaderColumn\" />\n }\n }\n\n @for (tooltip of header.tooltipsRight; track tooltip) {\n <div class=\"ml-[4px]\">\n @let constHtmlTooltip = tooltip.dataView || ' ';\n <libs_ui-components-popover\n [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"\n tooltip.config || {\n content: constHtmlTooltip | translate,\n position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12,\n },\n },\n }\n \"\n [innerHTML]=\"tooltip.dataView\" />\n </div>\n }\n\n @if (header.hasSort && header.orderby) {\n <div class=\"ml-[4px]\">\n <libs_ui-components-buttons-sort-arrow\n [disable]=\"loading() || !items().length\"\n [fieldSort]=\"header.orderby\"\n [ignorePopoverContent]=\"header.sortIgnoreTooltipContent ?? true\"\n [popoverContentAsc]=\"header.sortTooltipContentAsc\"\n [popoverContentDesc]=\"header.sortTooltipContentDesc\"\n [defaultMode]=\"header.defaultMode\"\n [zIndex]=\"header.zIndexTooltipSort\"\n (outChange)=\"handlerChangeSort($event)\" />\n </div>\n }\n </div>\n @if (header.labelDescription) {\n <div class=\"flex\">\n <libs_ui-components-popover\n [type]=\"'text'\"\n [classInclude]=\"header.labelDescription.classInclude || ''\"\n [config]=\"{ content: header.labelDescription.content | translate }\"\n [innerHTML]=\"header.labelDescription.content | translate\" />\n </div>\n }\n</ng-template>\n\n<ng-template\n #templateBodyRef\n let-header=\"header\"\n let-data=\"data\"\n let-constHtmlIsHightLightItem=\"constHtmlIsHightLightItem\">\n <div class=\"flex w-full h-full\">\n @if (header.hasCheckbox) {\n <div\n class=\"flex h-full\"\n [class.invisible]=\"header.checkConditionCheckBoxHidden && (data() | LibsUiPipesCallFunctionInTemplatePipe: header.checkConditionCheckBoxHidden : data() | async)\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single\n [key]=\"data()[fieldKey()]\"\n [classInclude]=\"header.checkboxClassInclude\"\n [checked]=\"data()[fieldKey()] | LibsUiPipesCheckSelectedByKeyPipe: keysSelected() : keysSelected().length\"\n [disable]=\"loading() || disableCheckbox() || !!(maxItemSelected() && !(data()[fieldKey()] | LibsUiPipesCheckSelectedByKeyPipe: keysSelected() : keysSelected().length) && keysSelected().length >= maxItemSelected())\"\n (outChange)=\"handlerChangeItemChecked($event, data())\" />\n </div>\n }\n\n @if (header.isShowIndexOnRow; as config) {\n <div class=\"w-full flex items-center justify-center libs-ui-font-h4r{{ config.classIncludeIndexOnRow || '' }}\">\n <div\n LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{}\"\n [innerHTML]=\"data | LibsUiPipesCallFunctionInTemplatePipe: getIndexRow | async\"></div>\n </div>\n }\n\n @if (header.colTemplateConfig) {\n @let constHtmlIsHover = itemOfIndexHover === data && !constHtmlIsHightLightItem;\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [isHover]=\"constHtmlIsHover\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"header.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [isHover]=\"constHtmlIsHover\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n }\n }\n </div>\n</ng-template>\n\n<ng-template #templateFooterRef>\n @if (!isHiddenHeaderWhenNodata() || (isHiddenHeaderWhenNodata() && items().length)) {\n <div\n #footerElementRef\n class=\"flex w-full bg-[#f8f9fa] overflow-x-hidden z-[1] {{ ignoreBorderFooter() ? '' : customPositionFooter() === 'top' ? 'libs-ui-border-bottom-general' : 'libs-ui-table-shadow-top libs-ui-border-top-general' }} min-h-[35px]\"\n (mouseenter)=\"handlerMouseEnterFooter($event)\"\n (mouseleave)=\"handlerMouseLeaveFooter($event)\">\n @if (footerLeft()) {\n <div\n #footerLeftElementRef\n class=\"flex sticky top-0 left-0 z-[1] bg-[#f8f9fa]\">\n @for (footer of footerLeft(); track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px] {{ footer.ignoreBorderRight ? '' : 'libs-ui-border-right-general' }}\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerLeft || false : headerElementRef.clientWidth : footerLeft() : footerRight()) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n </div>\n }\n @if (footerRight(); as footerRightList) {\n @let constHtmlFunctionGetWidthItemFooter = functionGetWidthItem();\n @if (useScrollMeasureColumn() && constHtmlFunctionGetWidthItemFooter) {\n <div\n class=\"flex h-full w-full relative\"\n LibsUiScrollMeasureItemDirectionHorizontalDirective\n [elementScroll]=\"footerElementRef\"\n [items]=\"footerRightList\"\n [functionGetWidthItem]=\"constHtmlFunctionGetWidthItemFooter\"\n (outViewPortItem)=\"handlerOutViewPortItemFooterRight($event)\">\n @for (footer of footerRightViewPort(); track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : footerLeft() : footerRightList) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n </div>\n } @else {\n @for (footer of footerRightList; track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : footerLeft() : footerRightList) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n }\n }\n </div>\n }\n</ng-template>\n\n<ng-template #templateNodataRef>\n @if (keySearch() || onlyShowNoResult()) {\n @if (templateNoResult(); as templateNoResult) {\n <ng-container *ngTemplateOutlet=\"templateNoResult\" />\n } @else {\n <div class=\"flex items-center justify-center w-full h-full absolute left-0 top-0 z-[1]\">\n <div class=\"flex flex-col items-center justify-center w-full h-full shrink-0\">\n <ng-container *ngComponentOutlet=\"'no-result' | LibsUiIconsGetIconComponentPipe | async; inputs: { size: 64 }\" />\n <div\n class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"noDataConfig().ngStyle\"\n [ngClass]=\"noDataConfig().ngClass\"\n [innerHtml]=\"noDataSearchText() | translate\"></div>\n </div>\n </div>\n }\n } @else {\n @if (templateNoData(); as templateNoData) {\n <ng-container *ngTemplateOutlet=\"templateNoData\" />\n } @else {\n <div class=\"flex items-center justify-center w-full h-full absolute left-0 top-0 z-[1]\">\n <div class=\"flex flex-col items-center justify-center w-full h-full shrink-0\">\n <ng-container *ngComponentOutlet=\"'no-data' | LibsUiIconsGetIconComponentPipe | async; inputs: { size: 64 }\" />\n <div\n class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"noDataConfig().ngStyle\"\n [ngClass]=\"noDataConfig().ngClass\"\n [innerHtml]=\"noDataText() | translate\"></div>\n </div>\n </div>\n }\n }\n</ng-template>\n", styles: [".libs-ui-table-header-container{height:33px;flex-shrink:0}.libs-ui-table-header-col{height:100%;width:100%;align-items:center}.libs-ui-table-no-data-config-text{margin-top:16px;font-size:12px;color:#9ca2ad;font-family:var(--libs-ui-font-family-name, \"Arial\");font-weight:400}.libs-ui-table-no-data-config-icon{margin-bottom:12px}.libs-ui-table-no-data-config-icon:before{font-size:84px;color:#c1c1c1}.libs-ui-table-shadow-bottom{box-shadow:0 1px 1px #00143305,0 4px 8px #0014330a}@media only screen and (min-width: 1921px){.libs-ui-border-bottom-general{border-bottom:solid 2px #e6e8ed!important}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: LibsUiComponentsTableTemplatesComponent, selector: "libs_ui-components-table-templates", inputs: ["isHover", "configs", "templateCssWrapper", "item"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i2.VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["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: ["vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "pipe", type: LibsUiPipesConvertObjectToSignalPipe, name: "LibsUiPipesConvertObjectToSignalPipe" }, { kind: "component", type: LibsUiComponentsDropdownComponent, selector: "libs_ui-components-dropdown", inputs: ["useXssFilter", "popoverElementRefCustom", "classInclude", "ignoreStopPropagationEvent", "flagMouse", "flagMouseContent", "popoverCustomConfig", "isNgContent", "zIndex", "convertItemSelected", "getPopoverItemSelected", "httpRequestDetailItemById", "lengthKeys", "textDisplayWhenNoSelect", "textDisplayWhenMultiSelect", "classIncludeTextDisplayWhenNoSelect", "fieldLabel", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "dropdownTemplateRefNotSearchNoData", "fieldGetImage", "imageSize", "typeShape", "fieldGetIcon", "fieldGetTextAvatar", "fieldGetColorAvatar", "classAvatarInclude", "getLastTextAfterSpace", "linkImageError", "showError", "showBorderError", "disable", "readonly", "labelConfig", "disableLabel", "listSearchConfig", "isSearchOnline", "listHiddenInputSearch", "listSearchPadding", "listKeySearch", "listDividerClassInclude", "listConfig", "listButtonsOther", "listHasButtonUnSelectOption", "listClickExactly", "listBackgroundCustom", "listMaxItemShow", "listKeySelected", "listMultiKeySelected", "listKeysDisable", "listKeysHidden", "validRequired", "validMaxItemSelected", "changeValidUndefinedResetError", "allowSelectItemMultiple", "focusInputSearch", "onlyEmitDataWhenReset", "resetKeyWhenSelectAllKey", "listConfigHasDivider", "classIncludeIcon", "classIncludeContent", "listIgnoreClassDisableDefaultWhenUseKeysDisableItem", "tabKeyActive", "tabsConfig", "ignoreBorderBottom"], outputs: ["flagMouseChange", "flagMouseContentChange", "lengthKeysChange", "showBorderErrorChange", "listKeySelectedChange", "listMultiKeySelectedChange", "tabKeyActiveChange", "outSelectKey", "outSelectMultiKey", "outFunctionsControl", "outValidEvent", "outChangStageFlagMouse", "outDataChange", "outClickButtonOther", "outShowList", "outChangeTabKeyActive"] }, { kind: "component", type: LibsUiComponentsButtonsSortArrowComponent, selector: "libs_ui-components-buttons-sort-arrow", inputs: ["size", "mode", "fieldSort", "disable", "ignorePopoverContent", "popoverContentAsc", "popoverContentDesc", "defaultMode", "zIndex"], outputs: ["modeChange", "outChange"] }, { kind: "component", type: LibsUiComponentsPaginationComponent, selector: "libs_ui-components-pagination", inputs: ["showTotalPage", "showInputGotoPage", "modeDisplayTotalPageAndGotoPage", "classDisplayTotalPageAndGotoPage", "classIncludeContainer", "classIncludeItem", "disable", "numberPageDisplay", "totalItems", "perPage", "currentPage"], outputs: ["currentPageChange", "outPageSelect"] }, { kind: "component", type: LibsUiComponentsCheckboxSingleComponent, selector: "libs_ui-components-checkbox-single", inputs: ["key", "checked", "label", "classLabelInclude", "ignoreShowPopoverLabel", "typeLabelPopover", "popover", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "classInclude", "clickExactly", "disable", "disableLabel", "ignoreCheckbox", "zIndexLabel", "stillOtherOptions", "error", "showBorderError", "description", "iconImageClass", "classIconInclude", "modeBorder", "dataComponentOutlet", "componentOutlet"], outputs: ["checkedChange", "linkImageChange", "outChange", "outEventPopover", "outClickLabel", "outChangStageFlagMousePopover"] }, { kind: "pipe", type: LibsUiTableCalculatorColumnPipe, name: "LibsUiTableCalculatorColumnPipe" }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "ignoreInit", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY", "elementScroll"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiIconsGetIconComponentPipe, name: "LibsUiIconsGetIconComponentPipe" }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiPipesCheckSelectedByKeyPipe, name: "LibsUiPipesCheckSelectedByKeyPipe" }, { kind: "pipe", type: LibsUiTableCheckItemHightLightPipe, name: "LibsUiTableCheckItemHightLightPipe" }, { kind: "directive", type: LibsUiScrollMeasureItemDirectionHorizontalDirective, selector: "[LibsUiScrollMeasureItemDirectionHorizontalDirective]", inputs: ["elementScroll", "functionGetWidthItem", "items"], outputs: ["outViewPortItem", "outFunctionControl", "outDivVirtual", "outPaddingLeft"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [LibsUiComponentsTableTemplatesComponent], () => [LibsUiComponentsTableTemplatesComponent], () => [LibsUiComponentsTableTemplatesComponent,
|
|
952
982
|
LibsUiPipesConvertObjectToSignalPipe], () => [LibsUiComponentsTableTemplatesComponent,
|
|
953
983
|
LibsUiPipesConvertObjectToSignalPipe], () => [LibsUiComponentsTableTemplatesComponent,
|
|
954
984
|
LibsUiPipesConvertObjectToSignalPipe]] });
|
|
@@ -979,7 +1009,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
979
1009
|
LibsUiPipesCheckSelectedByKeyPipe,
|
|
980
1010
|
LibsUiTableCheckItemHightLightPipe,
|
|
981
1011
|
LibsUiScrollMeasureItemDirectionHorizontalDirective,
|
|
982
|
-
], template: "<div class=\"flex flex-col w-full h-full\">\n @if (!ignoreBar()) {\n <div\n class=\"flex items-center relative z-[1] bottom-0 left-0 w-full bg-white libs-ui-table-shadow-bottom {{ classBarInclude() }}\"\n [class.px-[16px]]=\"keysSelected().length || labelBarNoSelectItem()\"\n [class.py-[6px]]=\"keysSelected().length || labelBarNoSelectItem()\"\n (mouseenter)=\"resetIndexHover($event)\">\n <ng-content select=\"div.libs-ui-table-bar-left\"></ng-content>\n @if (!keysSelected().length && labelBarNoSelectItem()) {\n <div\n class=\"{{ classLabelBarNoSelectItem() ?? 'px-[12px] py-[5px]' }}\"\n [innerHtml]=\"labelBarNoSelectItem() | translate: { value: totalItemDisplay() }\"></div>\n }\n @if (keysSelected().length) {\n <div class=\"flex items-center pl-[12px]\">\n <div class=\"flex items-center h-full mt-[-2px]\">\n <libs_ui-components-checkbox-single\n [checked]=\"true\"\n [disable]=\"loading() || disableCheckbox()\"\n (outChange)=\"handlerChangeAllChecked()\" />\n </div>\n <div class=\"libs-ui-font-h5m text-[#071631] mr-[8px] {{ classLabelBarButtons() }}\">\n {{ labelBarButtons() | translate: { value: keysSelected().length } }}\n </div>\n @if (configSelectMoreItem()) {\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: true,\n maxHeight: 2048,\n classInclude: '!w-[121px]',\n position: {\n mode: 'start',\n distance: 0,\n },\n }\"\n [listConfig]=\"listConfigMoreItem()\"\n [listHiddenInputSearch]=\"true\"\n [listMaxItemShow]=\"5\"\n class=\"!w-[16px] h-[16px] mr-[8px]\"\n (outSelectKey)=\"handlerSelectedMoreItem($event)\"\n (outFunctionsControl)=\"handlerFunctionControlMoreSelectItem($event)\">\n <libs_ui-components-buttons-button\n [type]=\"'button-link-primary'\"\n [classInclude]=\"'!p-0 m-0'\"\n [classIconLeft]=\"'before:!text-[16px] libs-ui-icon-move-right rotate-90 mr-[6px]'\"\n [popover]=\"{ config: { content: 'i18n_more_select' } }\"\n [ignoreStopPropagationEvent]=\"true\" />\n </libs_ui-components-dropdown>\n }\n <div class=\"h-[16px] libs-ui-border-left-general ml-[16px]\"></div>\n @if (barButtons()?.length) {\n @for (button of barButtons(); track button) {\n @let constHtmlLabel = button.label || ' ';\n <libs_ui-components-buttons-button\n [type]=\"button.type || 'button-link-primary'\"\n [classIconLeft]=\"button.classIconLeft || ''\"\n [classInclude]=\"button.classInclude || ''\"\n [label]=\"constHtmlLabel | translate\"\n (outClick)=\"handlerBarButtonClick(button)\" />\n }\n }\n </div>\n }\n <ng-content select=\"div.libs-ui-table-bar-right\"></ng-content>\n </div>\n }\n\n <div\n #tableContainerElementRef\n class=\"libs-ui-table flex flex-col w-full h-full relative {{ classTableContainerInclude() }}\"\n [class.px-[16px]]=\"!ignoreBar()\"\n (mouseleave)=\"handlerMouseLeaveContainer($event)\">\n <div\n class=\"relative w-full shrink-0\"\n [style.height.px]=\"headerElementRef.offsetHeight\"\n [class.!hidden]=\"!items().length && isHiddenHeaderWhenNodata()\">\n <div\n #headerElementRef\n LibsUiComponentsScrollOverlayDirective\n [options]=\"{ scrollbarWidth: 0 }\"\n [class.libs-ui-border-bottom-dashed-general]=\"!hasItemHightLight() && isDashBorder()\"\n [class.libs-ui-border-bottom-general]=\"!hasItemHightLight() && !isDashBorder()\"\n [class]=\"classHeaderContainer()\"\n (outScroll)=\"handlerScrollHeader($event)\"\n (mouseenter)=\"handlerMouseEnterHeader($event)\"\n (mouseleave)=\"handlerMouseLeaveHeader($event)\">\n @if (headerLeft().length) {\n <div [class]=\"classHeaderLeftContainer()\">\n @for (header of headerLeft(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: true }\" />\n }\n </div>\n }\n @if (headerRight().length) {\n @let constHtmlFunctionGetWidthItem = functionGetWidthItem();\n @if (useScrollMeasureColumn() && constHtmlFunctionGetWidthItem) {\n <div\n class=\"flex w-full h-full relative\"\n LibsUiScrollMeasureItemDirectionHorizontalDirective\n [elementScroll]=\"headerElementRef\"\n [items]=\"headerRight()\"\n [functionGetWidthItem]=\"constHtmlFunctionGetWidthItem\"\n (outViewPortItem)=\"handlerOutViewPortItemHeaderRight($event)\"\n (outPaddingLeft)=\"handlerOutPaddingLeftHeaderRight($event)\">\n @for (header of headerRightViewPort(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: false }\" />\n }\n </div>\n } @else {\n @for (header of headerRight(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: false }\" />\n }\n }\n }\n </div>\n </div>\n @if (showFooter() && itemFooter() && customPositionFooter() === 'top') {\n <ng-container *ngTemplateOutlet=\"templateFooterRef\" />\n }\n <div class=\"relative flex flex-col w-full h-full overflow-x-hidden bg-white {{ classBodyInclude() || '' }}\">\n <div\n #bodyElementRef\n class=\"flex h-full w-full relative\"\n LibsUiComponentsScrollOverlayDirective\n (outScroll)=\"handlerScrollBody($event)\"\n (outScrollBottom)=\"handlerScrollBottom($event)\">\n @if (items().length) {\n <virtual-scroller\n #bodyComponentRef\n [items]=\"items()\"\n [enableUnequalChildrenSizes]=\"enableUnequalChildrenSizes()\"\n class=\"h-full\"\n [style.width.px]=\"headerElementRef.scrollWidth > (bodyElementRef ? bodyElementRef.scrollWidth : 0) ? headerElementRef.scrollWidth : undefined\"\n [parentScroll]=\"bodyElementRef\"\n [bufferAmount]=\"bufferAmount()\">\n @for (data of bodyComponentRef.viewPortItems; track data()) {\n @let constHtmlIsHightLightItem = data | LibsUiTableCheckItemHightLightPipe: itemsHightLight();\n <div\n #elementHover\n class=\"flex\"\n [class.bg-[#f3fcfc]]=\"constHtmlIsHightLightItem\"\n [class.libs-ui-border-top-1px-36d3d3]=\"constHtmlIsHightLightItem && $first && !ignoreBorderItem()\"\n [class.libs-ui-border-bottom-1px-36d3d3]=\"constHtmlIsHightLightItem && !ignoreBorderItem()\"\n [ngClass]=\"\n constHtmlIsHightLightItem || ($last && ignoreBorderItemLast())\n ? 'libs-ui-border-radius-bottom-left-4px libs-ui-border-radius-bottom-right-4px'\n : ignoreBorderItem()\n ? ''\n : isDashBorder()\n ? 'libs-ui-border-bottom-dashed-general'\n : 'libs-ui-border-bottom-general'\n \"\n [style.width.px]=\"headerElementRef.scrollWidth\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !constHtmlIsHightLightItem\"\n (mouseenter)=\"setIndexHover($event, data)\"\n (mouseleave)=\"resetIndexHoverWhenMouseLeave($event)\">\n @if (headerLeft().length || headerRight().length) {\n <div class=\"flex flex-col w-full\">\n <div class=\"flex w-full\">\n @if (headerLeft().length) {\n <div\n class=\"flex sticky top-0 left-0 z-[1]\"\n [class.bg-white]=\"!constHtmlIsHightLightItem\"\n [class.bg-[#f3fcfc]]=\"constHtmlIsHightLightItem\">\n @for (header of headerLeft(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px] {{ header.ignoreBorderRight ? '' : 'libs-ui-border-right-general' }}\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !constHtmlIsHightLightItem\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerLeft || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n </div>\n }\n @if (headerRight().length) {\n @if (useScrollMeasureColumn()) {\n <div\n class=\"flex w-full min-w-0\"\n [style.padding-left.px]=\"paddingLeftHeaderRight()\">\n @for (header of headerRightViewPort(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n </div>\n } @else {\n @for (header of headerRight(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n }\n }\n </div>\n @if (configTemplateItemCollapseExpand() && data().specificExpand && data()[configTemplateItemCollapseExpand()?.fieldGetDataExpand || 'specificDataExpand']) {\n <div [class]=\"configTemplateItemCollapseExpand()?.cssWrapper || 'flex w-full'\">\n @for (dataExpand of data()[configTemplateItemCollapseExpand()?.fieldGetDataExpand || 'specificDataExpand'](); track $index) {\n @if (configTemplateItemCollapseExpand()?.colTemplateConfig) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"dataExpand\"\n [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"dataExpand\"\n [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\n }\n }\n } @empty {\n <div class=\"relative h-[100px]\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n </virtual-scroller>\n } @else if (!loading()) {\n <div class=\"sticky left-0 top-0 z-[1] h-[calc(100%-10px)] w-full\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n @if (showScrollTablePinnedIfNoData()) {\n <div\n class=\"absolute h-[1px] bg-transparent top-0 left-0 z-[1]\"\n [style.width.px]=\"headerElementRef.scrollWidth\"></div>\n }\n }\n </div>\n\n @if (showFooter() && itemFooter() && customPositionFooter() === 'bottom') {\n <ng-container *ngTemplateOutlet=\"templateFooterRef\" />\n }\n\n @if (loading()) {\n <div class=\"absolute w-full h-full z-[2] flex items-center content-center\">\n <libs_ui-components-spinner />\n </div>\n }\n </div>\n\n @if (activityLoadData() === 'click-pagination') {\n <div class=\"flex w-full mt-[12px]\">\n <libs_ui-components-pagination\n [modeDisplayTotalPageAndGotoPage]=\"paginationSetting()?.modeDisplayTotalPageAndGotoPage || 'bottom'\"\n [classDisplayTotalPageAndGotoPage]=\"paginationSetting()?.classDisplayTotalPageAndGotoPage || ''\"\n [classIncludeItem]=\"paginationSetting()?.classIncludeItem || ''\"\n [classIncludeContainer]=\"paginationSetting()?.classIncludeContainer || '!items-end'\"\n [disable]=\"paginationSetting()?.disable || loading() || !items().length\"\n [numberPageDisplay]=\"paginationSetting()?.numberPageDisplay || 5\"\n [showTotalPage]=\"paginationSetting()?.showTotalPage || false\"\n [showInputGotoPage]=\"paginationSetting()?.showInputGotoPage || false\"\n [totalItems]=\"pagingStore()?.total_items || (pagingStore()?.total_pages || 0) * (pagingStore()?.per_page || 0)\"\n [perPage]=\"pagingStore()?.per_page || 0\"\n [currentPage]=\"pagingStore()?.page || 0\"\n (outPageSelect)=\"handlerChangePage($event)\" />\n </div>\n }\n </div>\n</div>\n\n<ng-template\n #templateHeaderRef\n let-header=\"headerItem\"\n let-isHeaderLeft=\"isHeaderLeft\">\n <div\n [class]=\"'relative flex ' + (header.paddingLeftRightHeaderContainer ?? ' px-[12px] ') + (isHeaderLeft && !header.ignoreBorderRight ? ' libs-ui-border-right-general ' : ' ') + ' libs-ui-table-header-col '\"\n [class.flex-col]=\"header.rowsConfig\"\n [class.py-[8px]]=\"!header.ignorePyDefault\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: (isHeaderLeft ? ignoreCalculatorWidthHeader()?.headerLeft || false : ignoreCalculatorWidthHeader()?.headerRight || false) : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n @if (!header.rowsConfig) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef; context: { headerItem: header, isColRender: false, isHeaderLeft: isHeaderLeft }\" />\n }\n @if (header.rowsConfig; as rowsConfig) {\n @for (row of rowsConfig.rows; track row) {\n <div [class]=\"row.classRow\">\n @for (col of row.cols; track col) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef; context: { headerItem: col, isColRender: true, isHeaderLeft: isHeaderLeft }\" />\n }\n </div>\n }\n }\n </div>\n</ng-template>\n\n<ng-template\n #templateHeaderContentRef\n let-header=\"headerItem\"\n let-isColRender=\"isColRender\"\n let-isHeaderLeft=\"isHeaderLeft\">\n <div\n #itemHeaderRef\n class=\"flex libs-ui-font-h6m min-h-[18px] text-[#6a7383] max-w-full\"\n [class.items-center]=\"header.contentHeaderAlignCenter ?? true\"\n [class.justify-end]=\"header.contentHeaderJustifyContentEnd\"\n [class.w-full]=\"header.isShowIndexOnRow\"\n [ngStyle]=\"\n isColRender\n ? (header | LibsUiTableCalculatorColumnPipe: (isHeaderLeft ? ignoreCalculatorWidthHeader()?.headerLeft || false : ignoreCalculatorWidthHeader()?.headerRight || false) : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shirk': '0', padding: '8px' } : {})\n : {}\n \"\n [ngClass]=\"isColRender ? header.ngClass || {} : {}\">\n @if (header.hasCheckbox) {\n @if (header.hasCheckboxAll) {\n <div\n class=\"flex h-full {{ header.checkboxAllClassInclude || 'mr-[16px]' }}\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single\n [key]=\"'all'\"\n [stillOtherOptions]=\"!!keysSelected().length && keysSelected().length !== items().length\"\n [checked]=\"!!keysSelected().length && keysSelected().length === items().length\"\n [disable]=\"loading()\"\n [classInclude]=\"header.checkboxClassInclude\"\n (outChange)=\"handlerChangeCheckedAllItems($event)\" />\n </div>\n } @else {\n <div class=\"flex h-full ml-[24px] {{ header.checkboxClassInclude }}\"></div>\n }\n }\n @for (tooltip of header.tooltipsLeft; track tooltip) {\n <div class=\"mr-[4px]\">\n @let constHtmlTooltip = tooltip.dataView || ' ';\n <libs_ui-components-popover\n [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"\n tooltip.config || {\n content: constHtmlTooltip | translate,\n position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12,\n },\n },\n }\n \"\n [innerHTML]=\"tooltip.dataView\" />\n </div>\n }\n\n @if (header.isShowIndexOnRow) {\n <div class=\"flex w-full h-full items-center justify-center {{ header.classIncludeIndexOnRow || '' }}\">\n {{ header.label ?? '#' }}\n </div>\n } @else {\n @if (header.label | LibsUiPipesCallFunctionInTemplatePipe: header.parseValue : header | async | translate; as labelHeaderColumn) {\n <libs_ui-components-popover\n [type]=\"header?.labelConfig?.type || 'text'\"\n [mode]=\"header?.labelConfig?.mode || 'hover'\"\n [classInclude]=\"header?.labelConfig?.classInclude || ''\"\n [ignoreShowPopover]=\"header?.labelConfig?.ignoreShowTooltip || false\"\n [config]=\"header.labelConfig?.config || { content: labelHeaderColumn }\"\n [innerHTML]=\"labelHeaderColumn\" />\n }\n }\n\n @for (tooltip of header.tooltipsRight; track tooltip) {\n <div class=\"ml-[4px]\">\n @let constHtmlTooltip = tooltip.dataView || ' ';\n <libs_ui-components-popover\n [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"\n tooltip.config || {\n content: constHtmlTooltip | translate,\n position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12,\n },\n },\n }\n \"\n [innerHTML]=\"tooltip.dataView\" />\n </div>\n }\n\n @if (header.hasSort && header.orderby) {\n <div class=\"ml-[4px]\">\n <libs_ui-components-buttons-sort-arrow\n [disable]=\"loading() || !items().length\"\n [fieldSort]=\"header.orderby\"\n [ignorePopoverContent]=\"header.sortIgnoreTooltipContent ?? true\"\n [popoverContentAsc]=\"header.sortTooltipContentAsc\"\n [popoverContentDesc]=\"header.sortTooltipContentDesc\"\n [defaultMode]=\"header.defaultMode\"\n [zIndex]=\"header.zIndexTooltipSort\"\n (outChange)=\"handlerChangeSort($event)\" />\n </div>\n }\n </div>\n @if (header.labelDescription) {\n <div class=\"flex\">\n <libs_ui-components-popover\n [type]=\"'text'\"\n [classInclude]=\"header.labelDescription.classInclude || ''\"\n [config]=\"{ content: header.labelDescription.content | translate }\"\n [innerHTML]=\"header.labelDescription.content | translate\" />\n </div>\n }\n</ng-template>\n\n<ng-template\n #templateBodyRef\n let-header=\"header\"\n let-data=\"data\"\n let-constHtmlIsHightLightItem=\"constHtmlIsHightLightItem\">\n <div class=\"flex w-full h-full\">\n @if (header.hasCheckbox) {\n <div\n class=\"flex h-full\"\n [class.invisible]=\"header.checkConditionCheckBoxHidden && (data() | LibsUiPipesCallFunctionInTemplatePipe: header.checkConditionCheckBoxHidden : data() | async)\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single\n [key]=\"data()[fieldKey()]\"\n [classInclude]=\"header.checkboxClassInclude\"\n [checked]=\"data()[fieldKey()] | LibsUiPipesCheckSelectedByKeyPipe: keysSelected() : keysSelected().length\"\n [disable]=\"loading() || disableCheckbox() || !!(maxItemSelected() && !(data()[fieldKey()] | LibsUiPipesCheckSelectedByKeyPipe: keysSelected() : keysSelected().length) && keysSelected().length >= maxItemSelected())\"\n (outChange)=\"handlerChangeItemChecked($event, data())\" />\n </div>\n }\n\n @if (header.isShowIndexOnRow; as config) {\n <div class=\"w-full flex items-center justify-center libs-ui-font-h4r{{ config.classIncludeIndexOnRow || '' }}\">\n <div\n LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{}\"\n [innerHTML]=\"data | LibsUiPipesCallFunctionInTemplatePipe: getIndexRow | async\"></div>\n </div>\n }\n\n @if (header.colTemplateConfig) {\n @let constHtmlIsHover = itemOfIndexHover === data && !constHtmlIsHightLightItem;\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [isHover]=\"constHtmlIsHover\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"header.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [isHover]=\"constHtmlIsHover\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n }\n }\n </div>\n</ng-template>\n\n<ng-template #templateFooterRef>\n @if (!isHiddenHeaderWhenNodata() || (isHiddenHeaderWhenNodata() && items().length)) {\n <div\n #footerElementRef\n class=\"flex w-full bg-[#f8f9fa] overflow-x-hidden z-[1] {{ ignoreBorderFooter() ? '' : customPositionFooter() === 'top' ? 'libs-ui-border-bottom-general' : 'libs-ui-table-shadow-top libs-ui-border-top-general' }} min-h-[35px]\"\n (mouseenter)=\"handlerMouseEnterFooter($event)\"\n (mouseleave)=\"handlerMouseLeaveFooter($event)\">\n @if (footerLeft()) {\n <div\n #footerLeftElementRef\n class=\"flex sticky top-0 left-0 z-[1] bg-[#f8f9fa]\">\n @for (footer of footerLeft(); track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px] {{ footer.ignoreBorderRight ? '' : 'libs-ui-border-right-general' }}\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerLeft || false : headerElementRef.clientWidth : footerLeft() : footerRight()) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n </div>\n }\n @if (footerRight(); as footerRightList) {\n @let constHtmlFunctionGetWidthItemFooter = functionGetWidthItem();\n @if (useScrollMeasureColumn() && constHtmlFunctionGetWidthItemFooter) {\n <div\n class=\"flex h-full w-full relative\"\n LibsUiScrollMeasureItemDirectionHorizontalDirective\n [elementScroll]=\"footerElementRef\"\n [items]=\"footerRightList\"\n [functionGetWidthItem]=\"constHtmlFunctionGetWidthItemFooter\"\n (outViewPortItem)=\"handlerOutViewPortItemFooterRight($event)\">\n @for (footer of footerRightViewPort(); track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : footerLeft() : footerRightList) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n </div>\n } @else {\n @for (footer of footerRightList; track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : footerLeft() : footerRightList) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n }\n }\n </div>\n }\n</ng-template>\n\n<ng-template #templateNodataRef>\n @if (keySearch() || onlyShowNoResult()) {\n @if (templateNoResult(); as templateNoResult) {\n <ng-container *ngTemplateOutlet=\"templateNoResult\" />\n } @else {\n <div class=\"flex items-center justify-center w-full h-full absolute left-0 top-0 z-[1]\">\n <div class=\"flex flex-col items-center justify-center w-full h-full shrink-0\">\n <ng-container *ngComponentOutlet=\"'no-result' | LibsUiIconsGetIconComponentPipe | async; inputs: { size: 64 }\" />\n @let constHtmlTextSearchNoData = noDataConfig().textSearchNoData || 'i18n_no_result';\n <div\n class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"noDataConfig().ngStyle || {}\"\n [ngClass]=\"noDataConfig().ngClass || {}\"\n [innerHtml]=\"constHtmlTextSearchNoData | translate\"></div>\n </div>\n </div>\n }\n } @else {\n @if (templateNoData(); as templateNoData) {\n <ng-container *ngTemplateOutlet=\"templateNoData\" />\n } @else {\n <div class=\"flex items-center justify-center w-full h-full absolute left-0 top-0 z-[1]\">\n <div class=\"flex flex-col items-center justify-center w-full h-full shrink-0\">\n <ng-container *ngComponentOutlet=\"'no-data' | LibsUiIconsGetIconComponentPipe | async; inputs: { size: 64 }\" />\n @let constHtmlTextNoData = noDataConfig().textNoData || 'i18n_no_data_yet';\n <div\n class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"noDataConfig().ngStyle || {}\"\n [ngClass]=\"noDataConfig().ngClass || {}\"\n [innerHtml]=\"constHtmlTextNoData | translate\"></div>\n </div>\n </div>\n }\n }\n</ng-template>\n", styles: [".libs-ui-table-header-container{height:33px;flex-shrink:0}.libs-ui-table-header-col{height:100%;width:100%;align-items:center}.libs-ui-table-no-data-config-text{margin-top:16px;font-size:12px;color:#9ca2ad;font-family:var(--libs-ui-font-family-name, \"Arial\");font-weight:400}.libs-ui-table-no-data-config-icon{margin-bottom:12px}.libs-ui-table-no-data-config-icon:before{font-size:84px;color:#c1c1c1}.libs-ui-table-shadow-bottom{box-shadow:0 1px 1px #00143305,0 4px 8px #0014330a}@media only screen and (min-width: 1921px){.libs-ui-border-bottom-general{border-bottom:solid 2px #e6e8ed!important}}\n"] }]
|
|
1012
|
+
], template: "<div class=\"flex flex-col w-full h-full\">\n @if (!ignoreBar()) {\n <div\n class=\"flex items-center relative z-[1] bottom-0 left-0 w-full bg-white libs-ui-table-shadow-bottom {{ classBarInclude() }}\"\n [class.px-[16px]]=\"keysSelected().length || labelBarNoSelectItem()\"\n [class.py-[6px]]=\"keysSelected().length || labelBarNoSelectItem()\"\n (mouseenter)=\"resetIndexHover($event)\">\n <ng-content select=\"div.libs-ui-table-bar-left\"></ng-content>\n @if (!keysSelected().length && labelBarNoSelectItem()) {\n <div\n class=\"{{ classLabelBarNoSelectItemCss() }}\"\n [innerHtml]=\"labelBarNoSelectItem() | translate: { value: totalItemDisplay() }\"></div>\n }\n @if (keysSelected().length) {\n <div class=\"flex items-center pl-[12px]\">\n <div class=\"flex items-center h-full mt-[-2px]\">\n <libs_ui-components-checkbox-single\n [checked]=\"true\"\n [disable]=\"loading() || disableCheckbox()\"\n (outChange)=\"handlerChangeAllChecked()\" />\n </div>\n <div class=\"libs-ui-font-h5m text-[#071631] mr-[8px] {{ classLabelBarButtons() }}\">\n {{ labelBarButtons() | translate: { value: keysSelected().length } }}\n </div>\n @if (configSelectMoreItem()) {\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: true,\n maxHeight: 2048,\n classInclude: '!w-[121px]',\n position: {\n mode: 'start',\n distance: 0,\n },\n }\"\n [listConfig]=\"listConfigMoreItem()\"\n [listHiddenInputSearch]=\"true\"\n [listMaxItemShow]=\"5\"\n class=\"!w-[16px] h-[16px] mr-[8px]\"\n (outSelectKey)=\"handlerSelectedMoreItem($event)\"\n (outFunctionsControl)=\"handlerFunctionControlMoreSelectItem($event)\">\n <libs_ui-components-buttons-button\n [type]=\"'button-link-primary'\"\n [classInclude]=\"'!p-0 m-0'\"\n [classIconLeft]=\"'before:!text-[16px] libs-ui-icon-move-right rotate-90 mr-[6px]'\"\n [popover]=\"{ config: { content: 'i18n_more_select' } }\"\n [ignoreStopPropagationEvent]=\"true\" />\n </libs_ui-components-dropdown>\n }\n <div class=\"h-[16px] libs-ui-border-left-general ml-[16px]\"></div>\n @if (barButtons()?.length) {\n @for (button of barButtons(); track button) {\n @let constHtmlLabel = button.label || ' ';\n <libs_ui-components-buttons-button\n [type]=\"button.type || 'button-link-primary'\"\n [classIconLeft]=\"button.classIconLeft || ''\"\n [classInclude]=\"button.classInclude || ''\"\n [label]=\"constHtmlLabel | translate\"\n (outClick)=\"handlerBarButtonClick(button)\" />\n }\n }\n </div>\n }\n <ng-content select=\"div.libs-ui-table-bar-right\"></ng-content>\n </div>\n }\n\n <div\n #tableContainerElementRef\n class=\"libs-ui-table flex flex-col w-full h-full relative {{ classTableContainerInclude() }}\"\n [class.px-[16px]]=\"!ignoreBar()\"\n (mouseleave)=\"handlerMouseLeaveContainer($event)\">\n <div\n class=\"relative w-full shrink-0\"\n [style.height.px]=\"headerElementRef.offsetHeight\"\n [class.!hidden]=\"!items().length && isHiddenHeaderWhenNodata()\">\n <div\n #headerElementRef\n LibsUiComponentsScrollOverlayDirective\n [options]=\"{ scrollbarWidth: 0 }\"\n [class.libs-ui-border-bottom-dashed-general]=\"!hasItemHightLight() && isDashBorder()\"\n [class.libs-ui-border-bottom-general]=\"!hasItemHightLight() && !isDashBorder()\"\n [class]=\"classHeaderContainer()\"\n (outScroll)=\"handlerScrollHeader($event)\"\n (mouseenter)=\"handlerMouseEnterHeader($event)\"\n (mouseleave)=\"handlerMouseLeaveHeader($event)\">\n @if (headerLeft().length) {\n <div [class]=\"classHeaderLeftContainer()\">\n @for (header of headerLeft(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: true }\" />\n }\n </div>\n }\n @if (headerRight().length) {\n @let constHtmlFunctionGetWidthItem = functionGetWidthItem();\n @if (useScrollMeasureColumn() && constHtmlFunctionGetWidthItem) {\n <div\n class=\"flex w-full h-full relative\"\n LibsUiScrollMeasureItemDirectionHorizontalDirective\n [elementScroll]=\"headerElementRef\"\n [items]=\"headerRight()\"\n [functionGetWidthItem]=\"constHtmlFunctionGetWidthItem\"\n (outViewPortItem)=\"handlerOutViewPortItemHeaderRight($event)\"\n (outPaddingLeft)=\"handlerOutPaddingLeftHeaderRight($event)\">\n @for (header of headerRightViewPort(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: false }\" />\n }\n </div>\n } @else {\n @for (header of headerRight(); track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef; context: { headerItem: header, isHeaderLeft: false }\" />\n }\n }\n }\n </div>\n </div>\n @if (showFooter() && itemFooter() && customPositionFooter() === 'top') {\n <ng-container *ngTemplateOutlet=\"templateFooterRef\" />\n }\n <div class=\"relative flex flex-col w-full h-full overflow-x-hidden bg-white {{ classBodyInclude() || '' }}\">\n <div\n #bodyElementRef\n class=\"flex h-full w-full relative\"\n LibsUiComponentsScrollOverlayDirective\n (outScroll)=\"handlerScrollBody($event)\"\n (outScrollBottom)=\"handlerScrollBottom($event)\">\n @if (items().length) {\n <virtual-scroller\n #bodyComponentRef\n [items]=\"items()\"\n [enableUnequalChildrenSizes]=\"enableUnequalChildrenSizes()\"\n class=\"h-full\"\n [style.width.px]=\"headerElementRef.scrollWidth > (bodyElementRef ? bodyElementRef.scrollWidth : 0) ? headerElementRef.scrollWidth : undefined\"\n [parentScroll]=\"bodyElementRef\"\n [bufferAmount]=\"bufferAmount()\">\n @for (data of bodyComponentRef.viewPortItems; track data()) {\n @let constHtmlIsHightLightItem = data | LibsUiTableCheckItemHightLightPipe: itemsHightLight();\n <div\n #elementHover\n class=\"flex\"\n [class.bg-[#f3fcfc]]=\"constHtmlIsHightLightItem\"\n [class.libs-ui-border-top-1px-36d3d3]=\"constHtmlIsHightLightItem && $first && !ignoreBorderItem()\"\n [class.libs-ui-border-bottom-1px-36d3d3]=\"constHtmlIsHightLightItem && !ignoreBorderItem()\"\n [ngClass]=\"\n constHtmlIsHightLightItem || ($last && ignoreBorderItemLast())\n ? 'libs-ui-border-radius-bottom-left-4px libs-ui-border-radius-bottom-right-4px'\n : ignoreBorderItem()\n ? ''\n : isDashBorder()\n ? 'libs-ui-border-bottom-dashed-general'\n : 'libs-ui-border-bottom-general'\n \"\n [style.width.px]=\"headerElementRef.scrollWidth\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !constHtmlIsHightLightItem\"\n (mouseenter)=\"setIndexHover($event, data)\"\n (mouseleave)=\"resetIndexHoverWhenMouseLeave($event)\">\n @if (headerLeft().length || headerRight().length) {\n <div class=\"flex flex-col w-full\">\n <div class=\"flex w-full\">\n @if (headerLeft().length) {\n <div\n class=\"flex sticky top-0 left-0 z-[1]\"\n [class.bg-white]=\"!constHtmlIsHightLightItem\"\n [class.bg-[#f3fcfc]]=\"constHtmlIsHightLightItem\">\n @for (header of headerLeft(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px] {{ header.ignoreBorderRight ? '' : 'libs-ui-border-right-general' }}\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !constHtmlIsHightLightItem\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerLeft || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n </div>\n }\n @if (headerRight().length) {\n @if (useScrollMeasureColumn()) {\n <div\n class=\"flex w-full min-w-0\"\n [style.padding-left.px]=\"paddingLeftHeaderRight()\">\n @for (header of headerRightViewPort(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n </div>\n } @else {\n @for (header of headerRight(); track header) {\n <div\n class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef; context: { header: header, data: data, constHtmlIsHightLightItem: constHtmlIsHightLightItem }\" />\n </div>\n }\n }\n }\n </div>\n @if (configTemplateItemCollapseExpand() && data().specificExpand && data()[configTemplateItemCollapseExpand()?.fieldGetDataExpand || 'specificDataExpand']) {\n <div [class]=\"configTemplateItemCollapseExpand()?.cssWrapper || 'flex w-full'\">\n @for (dataExpand of data()[configTemplateItemCollapseExpand()?.fieldGetDataExpand || 'specificDataExpand'](); track dataExpand) {\n @if (configTemplateItemCollapseExpand()?.colTemplateConfig) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"dataExpand\"\n [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"dataExpand\"\n [class]=\"configTemplateItemCollapseExpand()?.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\n }\n }\n } @empty {\n <div class=\"relative h-[100px]\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n </virtual-scroller>\n } @else if (!loading()) {\n <div class=\"sticky left-0 top-0 z-[1] h-[calc(100%-10px)] w-full\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n @if (showScrollTablePinnedIfNoData()) {\n <div\n class=\"absolute h-[1px] bg-transparent top-0 left-0 z-[1]\"\n [style.width.px]=\"headerElementRef.scrollWidth\"></div>\n }\n }\n </div>\n\n @if (showFooter() && itemFooter() && customPositionFooter() === 'bottom') {\n <ng-container *ngTemplateOutlet=\"templateFooterRef\" />\n }\n\n @if (loading()) {\n <div class=\"absolute w-full h-full z-[2] flex items-center content-center\">\n <libs_ui-components-spinner />\n </div>\n }\n </div>\n\n @if (activityLoadData() === 'click-pagination') {\n <div class=\"flex w-full mt-[12px]\">\n <libs_ui-components-pagination\n [modeDisplayTotalPageAndGotoPage]=\"paginationConfig().modeDisplayTotalPageAndGotoPage\"\n [classDisplayTotalPageAndGotoPage]=\"paginationConfig().classDisplayTotalPageAndGotoPage\"\n [classIncludeItem]=\"paginationConfig().classIncludeItem\"\n [classIncludeContainer]=\"paginationConfig().classIncludeContainer\"\n [disable]=\"paginationConfig().disable\"\n [numberPageDisplay]=\"paginationConfig().numberPageDisplay\"\n [showTotalPage]=\"paginationConfig().showTotalPage\"\n [showInputGotoPage]=\"paginationConfig().showInputGotoPage\"\n [totalItems]=\"pagingTotalItems()\"\n [perPage]=\"pagingPerPage()\"\n [currentPage]=\"pagingCurrentPage()\"\n (outPageSelect)=\"handlerChangePage($event)\" />\n </div>\n }\n </div>\n</div>\n\n<ng-template\n #templateHeaderRef\n let-header=\"headerItem\"\n let-isHeaderLeft=\"isHeaderLeft\">\n <div\n [class]=\"'relative flex ' + (header.paddingLeftRightHeaderContainer ?? ' px-[12px] ') + (isHeaderLeft && !header.ignoreBorderRight ? ' libs-ui-border-right-general ' : ' ') + ' libs-ui-table-header-col '\"\n [class.flex-col]=\"header.rowsConfig\"\n [class.py-[8px]]=\"!header.ignorePyDefault\"\n [ngStyle]=\"\n (header | LibsUiTableCalculatorColumnPipe: (isHeaderLeft ? ignoreCalculatorWidthHeader()?.headerLeft || false : ignoreCalculatorWidthHeader()?.headerRight || false) : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n \"\n [ngClass]=\"header.ngClass || {}\">\n @if (!header.rowsConfig) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef; context: { headerItem: header, isColRender: false, isHeaderLeft: isHeaderLeft }\" />\n }\n @if (header.rowsConfig; as rowsConfig) {\n @for (row of rowsConfig.rows; track row) {\n <div [class]=\"row.classRow\">\n @for (col of row.cols; track col) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef; context: { headerItem: col, isColRender: true, isHeaderLeft: isHeaderLeft }\" />\n }\n </div>\n }\n }\n </div>\n</ng-template>\n\n<ng-template\n #templateHeaderContentRef\n let-header=\"headerItem\"\n let-isColRender=\"isColRender\"\n let-isHeaderLeft=\"isHeaderLeft\">\n <div\n #itemHeaderRef\n class=\"flex libs-ui-font-h6m min-h-[18px] text-[#6a7383] max-w-full\"\n [class.items-center]=\"header.contentHeaderAlignCenter ?? true\"\n [class.justify-end]=\"header.contentHeaderJustifyContentEnd\"\n [class.w-full]=\"header.isShowIndexOnRow\"\n [ngStyle]=\"\n isColRender\n ? (header | LibsUiTableCalculatorColumnPipe: (isHeaderLeft ? ignoreCalculatorWidthHeader()?.headerLeft || false : ignoreCalculatorWidthHeader()?.headerRight || false) : headerElementRef.clientWidth : headerLeft() : headerRight()) ||\n (header.isShowIndexOnRow ? { width: '50px', 'flex-shrink': '0', padding: '8px' } : {})\n : {}\n \"\n [ngClass]=\"isColRender ? header.ngClass || {} : {}\">\n @if (header.hasCheckbox) {\n @if (header.hasCheckboxAll) {\n <div\n class=\"flex h-full {{ header.checkboxAllClassInclude || 'mr-[16px]' }}\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single\n [key]=\"'all'\"\n [stillOtherOptions]=\"!!keysSelected().length && keysSelected().length !== items().length\"\n [checked]=\"!!keysSelected().length && keysSelected().length === items().length\"\n [disable]=\"loading()\"\n [classInclude]=\"header.checkboxClassInclude\"\n (outChange)=\"handlerChangeCheckedAllItems($event)\" />\n </div>\n } @else {\n <div class=\"flex h-full ml-[24px] {{ header.checkboxClassInclude }}\"></div>\n }\n }\n @for (tooltip of header.tooltipsLeft; track tooltip) {\n <div class=\"mr-[4px]\">\n @let constHtmlTooltip = tooltip.dataView || ' ';\n <libs_ui-components-popover\n [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"\n tooltip.config || {\n content: constHtmlTooltip | translate,\n position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12,\n },\n },\n }\n \"\n [innerHTML]=\"tooltip.dataView\" />\n </div>\n }\n\n @if (header.isShowIndexOnRow) {\n <div class=\"flex w-full h-full items-center justify-center {{ header.classIncludeIndexOnRow || '' }}\">\n {{ header.label ?? '#' }}\n </div>\n } @else {\n @if (header.label | LibsUiPipesCallFunctionInTemplatePipe: header.parseValue : header | async | translate; as labelHeaderColumn) {\n <libs_ui-components-popover\n [type]=\"header?.labelConfig?.type || 'text'\"\n [mode]=\"header?.labelConfig?.mode || 'hover'\"\n [classInclude]=\"header?.labelConfig?.classInclude || ''\"\n [ignoreShowPopover]=\"header?.labelConfig?.ignoreShowTooltip || false\"\n [config]=\"header.labelConfig?.config || { content: labelHeaderColumn }\"\n [innerHTML]=\"labelHeaderColumn\" />\n }\n }\n\n @for (tooltip of header.tooltipsRight; track tooltip) {\n <div class=\"ml-[4px]\">\n @let constHtmlTooltip = tooltip.dataView || ' ';\n <libs_ui-components-popover\n [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"\n tooltip.config || {\n content: constHtmlTooltip | translate,\n position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12,\n },\n },\n }\n \"\n [innerHTML]=\"tooltip.dataView\" />\n </div>\n }\n\n @if (header.hasSort && header.orderby) {\n <div class=\"ml-[4px]\">\n <libs_ui-components-buttons-sort-arrow\n [disable]=\"loading() || !items().length\"\n [fieldSort]=\"header.orderby\"\n [ignorePopoverContent]=\"header.sortIgnoreTooltipContent ?? true\"\n [popoverContentAsc]=\"header.sortTooltipContentAsc\"\n [popoverContentDesc]=\"header.sortTooltipContentDesc\"\n [defaultMode]=\"header.defaultMode\"\n [zIndex]=\"header.zIndexTooltipSort\"\n (outChange)=\"handlerChangeSort($event)\" />\n </div>\n }\n </div>\n @if (header.labelDescription) {\n <div class=\"flex\">\n <libs_ui-components-popover\n [type]=\"'text'\"\n [classInclude]=\"header.labelDescription.classInclude || ''\"\n [config]=\"{ content: header.labelDescription.content | translate }\"\n [innerHTML]=\"header.labelDescription.content | translate\" />\n </div>\n }\n</ng-template>\n\n<ng-template\n #templateBodyRef\n let-header=\"header\"\n let-data=\"data\"\n let-constHtmlIsHightLightItem=\"constHtmlIsHightLightItem\">\n <div class=\"flex w-full h-full\">\n @if (header.hasCheckbox) {\n <div\n class=\"flex h-full\"\n [class.invisible]=\"header.checkConditionCheckBoxHidden && (data() | LibsUiPipesCallFunctionInTemplatePipe: header.checkConditionCheckBoxHidden : data() | async)\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single\n [key]=\"data()[fieldKey()]\"\n [classInclude]=\"header.checkboxClassInclude\"\n [checked]=\"data()[fieldKey()] | LibsUiPipesCheckSelectedByKeyPipe: keysSelected() : keysSelected().length\"\n [disable]=\"loading() || disableCheckbox() || !!(maxItemSelected() && !(data()[fieldKey()] | LibsUiPipesCheckSelectedByKeyPipe: keysSelected() : keysSelected().length) && keysSelected().length >= maxItemSelected())\"\n (outChange)=\"handlerChangeItemChecked($event, data())\" />\n </div>\n }\n\n @if (header.isShowIndexOnRow; as config) {\n <div class=\"w-full flex items-center justify-center libs-ui-font-h4r{{ config.classIncludeIndexOnRow || '' }}\">\n <div\n LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{}\"\n [innerHTML]=\"data | LibsUiPipesCallFunctionInTemplatePipe: getIndexRow | async\"></div>\n </div>\n }\n\n @if (header.colTemplateConfig) {\n @let constHtmlIsHover = itemOfIndexHover === data && !constHtmlIsHightLightItem;\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [isHover]=\"constHtmlIsHover\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"header.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [isHover]=\"constHtmlIsHover\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n }\n }\n </div>\n</ng-template>\n\n<ng-template #templateFooterRef>\n @if (!isHiddenHeaderWhenNodata() || (isHiddenHeaderWhenNodata() && items().length)) {\n <div\n #footerElementRef\n class=\"flex w-full bg-[#f8f9fa] overflow-x-hidden z-[1] {{ ignoreBorderFooter() ? '' : customPositionFooter() === 'top' ? 'libs-ui-border-bottom-general' : 'libs-ui-table-shadow-top libs-ui-border-top-general' }} min-h-[35px]\"\n (mouseenter)=\"handlerMouseEnterFooter($event)\"\n (mouseleave)=\"handlerMouseLeaveFooter($event)\">\n @if (footerLeft()) {\n <div\n #footerLeftElementRef\n class=\"flex sticky top-0 left-0 z-[1] bg-[#f8f9fa]\">\n @for (footer of footerLeft(); track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px] {{ footer.ignoreBorderRight ? '' : 'libs-ui-border-right-general' }}\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerLeft || false : headerElementRef.clientWidth : footerLeft() : footerRight()) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n </div>\n }\n @if (footerRight(); as footerRightList) {\n @let constHtmlFunctionGetWidthItemFooter = functionGetWidthItem();\n @if (useScrollMeasureColumn() && constHtmlFunctionGetWidthItemFooter) {\n <div\n class=\"flex h-full w-full relative\"\n LibsUiScrollMeasureItemDirectionHorizontalDirective\n [elementScroll]=\"footerElementRef\"\n [items]=\"footerRightList\"\n [functionGetWidthItem]=\"constHtmlFunctionGetWidthItemFooter\"\n (outViewPortItem)=\"handlerOutViewPortItemFooterRight($event)\">\n @for (footer of footerRightViewPort(); track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : footerLeft() : footerRightList) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n </div>\n } @else {\n @for (footer of footerRightList; track footer) {\n <div\n class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer | LibsUiTableCalculatorColumnPipe: ignoreCalculatorWidthHeader()?.headerRight || false : headerElementRef.clientWidth : footerLeft() : footerRightList) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n @if (optimizeTableRenderByOnViewport()) {\n @defer (on viewport) {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n } @placeholder {\n <div [class]=\"footer.templateCssWrapperHost || 'w-full h-full'\"></div>\n }\n } @else {\n <libs_ui-components-table-templates\n [item]=\"itemFooter | LibsUiPipesConvertObjectToSignalPipe\"\n [class]=\"footer.templateCssWrapperHost || ''\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n }\n </div>\n }\n }\n }\n </div>\n }\n</ng-template>\n\n<ng-template #templateNodataRef>\n @if (keySearch() || onlyShowNoResult()) {\n @if (templateNoResult(); as templateNoResult) {\n <ng-container *ngTemplateOutlet=\"templateNoResult\" />\n } @else {\n <div class=\"flex items-center justify-center w-full h-full absolute left-0 top-0 z-[1]\">\n <div class=\"flex flex-col items-center justify-center w-full h-full shrink-0\">\n <ng-container *ngComponentOutlet=\"'no-result' | LibsUiIconsGetIconComponentPipe | async; inputs: { size: 64 }\" />\n <div\n class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"noDataConfig().ngStyle\"\n [ngClass]=\"noDataConfig().ngClass\"\n [innerHtml]=\"noDataSearchText() | translate\"></div>\n </div>\n </div>\n }\n } @else {\n @if (templateNoData(); as templateNoData) {\n <ng-container *ngTemplateOutlet=\"templateNoData\" />\n } @else {\n <div class=\"flex items-center justify-center w-full h-full absolute left-0 top-0 z-[1]\">\n <div class=\"flex flex-col items-center justify-center w-full h-full shrink-0\">\n <ng-container *ngComponentOutlet=\"'no-data' | LibsUiIconsGetIconComponentPipe | async; inputs: { size: 64 }\" />\n <div\n class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"noDataConfig().ngStyle\"\n [ngClass]=\"noDataConfig().ngClass\"\n [innerHtml]=\"noDataText() | translate\"></div>\n </div>\n </div>\n }\n }\n</ng-template>\n", styles: [".libs-ui-table-header-container{height:33px;flex-shrink:0}.libs-ui-table-header-col{height:100%;width:100%;align-items:center}.libs-ui-table-no-data-config-text{margin-top:16px;font-size:12px;color:#9ca2ad;font-family:var(--libs-ui-font-family-name, \"Arial\");font-weight:400}.libs-ui-table-no-data-config-icon{margin-bottom:12px}.libs-ui-table-no-data-config-icon:before{font-size:84px;color:#c1c1c1}.libs-ui-table-shadow-bottom{box-shadow:0 1px 1px #00143305,0 4px 8px #0014330a}@media only screen and (min-width: 1921px){.libs-ui-border-bottom-general{border-bottom:solid 2px #e6e8ed!important}}\n"] }]
|
|
983
1013
|
}], ctorParameters: () => [] });
|
|
984
1014
|
|
|
985
1015
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|