@libs-ui/components-table 0.2.179 → 0.2.182
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/interfaces/table-config.interface.mjs +1 -1
- package/esm2022/pipes/calculator-column.pipe.mjs +52 -0
- package/esm2022/table.component.mjs +49 -12
- package/esm2022/templates/templates.component.mjs +9 -9
- package/fesm2022/libs-ui-components-table.mjs +106 -20
- package/fesm2022/libs-ui-components-table.mjs.map +1 -1
- package/interfaces/table-config.interface.d.ts +1 -0
- package/package.json +23 -23
- package/pipes/calculator-column.pipe.d.ts +9 -0
- package/table.component.d.ts +14 -6
- package/templates/templates.component.d.ts +1 -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 { input, ChangeDetectionStrategy, Component, computed, signal, output, viewChild, inject, ChangeDetectorRef, effect, untracked } from '@angular/core';
|
|
4
|
+
import { input, ChangeDetectionStrategy, Component, Pipe, computed, signal, output, viewChild, inject, ChangeDetectorRef, effect, untracked } from '@angular/core';
|
|
5
5
|
import * as i2 from '@iharbeck/ngx-virtual-scroller';
|
|
6
6
|
import { VirtualScrollerModule } from '@iharbeck/ngx-virtual-scroller';
|
|
7
7
|
import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
|
|
@@ -15,19 +15,20 @@ import { LibsUiIconsGetIconComponentPipe } from '@libs-ui/icons';
|
|
|
15
15
|
import { LibsUiPipesCallFunctionInTemplatePipe } from '@libs-ui/pipes-call-function-in-template';
|
|
16
16
|
import { LibsUiPipesCheckSelectedByKeyPipe } from '@libs-ui/pipes-check-selected-by-key';
|
|
17
17
|
import { returnListObject, LibsUiHttpRequestService } from '@libs-ui/services-http-request';
|
|
18
|
-
import { convertObjectToSignal, viewDataNumberByLanguage,
|
|
18
|
+
import { get, convertObjectToSignal, viewDataNumberByLanguage, cloneDeep, deleteUnicode, set } from '@libs-ui/utils';
|
|
19
19
|
import * as i1 from '@ngx-translate/core';
|
|
20
20
|
import { TranslateModule } from '@ngx-translate/core';
|
|
21
21
|
import { Subject, fromEvent, takeUntil, of, lastValueFrom, timer } from 'rxjs';
|
|
22
22
|
import { LibsUiComponentsAvatarComponent } from '@libs-ui/components-avatar';
|
|
23
|
+
import { LibsUiComponentsBadgeComponent } from '@libs-ui/components-badge';
|
|
23
24
|
import { LibsUiComponentsButtonsStatusComponent } from '@libs-ui/components-buttons-status';
|
|
24
25
|
import { LibsUiComponentsLineClampComponent } from '@libs-ui/components-line-clamp';
|
|
25
26
|
import { LibsUiComponentsSwitchComponent } from '@libs-ui/components-switch';
|
|
26
27
|
import { LibsUiPipesCloneObjectPipe } from '@libs-ui/pipes-clone-object';
|
|
28
|
+
import { LibsUiPipesGetValueOfObjectPipe } from '@libs-ui/pipes-get-value-of-object';
|
|
27
29
|
import { LibsUiPipesSecurityTrustPipe } from '@libs-ui/pipes-security-trust';
|
|
28
|
-
import {
|
|
30
|
+
import { LibsUiPipesConvertObjectToSignalPipe } from '@libs-ui/pipes-convert-object-to-signal';
|
|
29
31
|
|
|
30
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
31
32
|
class LibsUiComponentsTableTemplatesComponent {
|
|
32
33
|
lockClick;
|
|
33
34
|
functionControls = new Map();
|
|
@@ -36,7 +37,7 @@ class LibsUiComponentsTableTemplatesComponent {
|
|
|
36
37
|
configs = input();
|
|
37
38
|
templateCssWrapper = input();
|
|
38
39
|
item = input.required();
|
|
39
|
-
async handlerItemClick(event, config
|
|
40
|
+
async handlerItemClick(event, config) {
|
|
40
41
|
if (event instanceof Event) {
|
|
41
42
|
event.preventDefault();
|
|
42
43
|
event.stopPropagation();
|
|
@@ -52,7 +53,7 @@ class LibsUiComponentsTableTemplatesComponent {
|
|
|
52
53
|
this.lockClick = false;
|
|
53
54
|
}, 250);
|
|
54
55
|
if (config && config.action) {
|
|
55
|
-
config.action(
|
|
56
|
+
config.action(get(this.item(), config.field), this.item());
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
async clickButtonAction(button) {
|
|
@@ -106,30 +107,81 @@ class LibsUiComponentsTableTemplatesComponent {
|
|
|
106
107
|
this.functionControls.set(index, event);
|
|
107
108
|
}
|
|
108
109
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTableTemplatesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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=\"mo-lib-table-template {{ templateCssWrapper() || '' }}\">\n @for (config of configs; track $index) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track index;let index = $index;) {\n\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case (\"tooltip\") {\n @if ((fieldConfig.tooltip || {}); as tooltip) {\n <span LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"(fieldConfig.getTooltipConfig ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getTooltipConfig:item() | async) : (tooltip.config | LibsUiPipesCloneObjectPipe)) | translate\"\n [innerHTML]=\" (fieldConfig.field ? item()[fieldConfig.field] : tooltip.dataView) | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async | translate\"\n (outEvent)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\">\n </span>\n }\n }\n @case (\"image\") {\n @if (((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getImageSrc:item():isImageError) | async); as linkImage) {\n @if (linkImage !== ' ') {\n <img [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\" />\n }\n }\n }\n\n @case (\"avatar\") {\n @if ((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getAvatarConfig:item()) | async ; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [getLastTextAfterSpace]=\"avatarConfig.getLastTextAfterSpace\" />\n }\n }\n\n @case (\"buttons\") {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of (fieldConfig.buttons || (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getButtonsByItem:item() | async)); track $index) {\n\n <libs_ui-components-buttons-button [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"button().disable ?? fieldConfig.getDisable ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisable:item() | async): false\"\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 [config]=\"(item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item()) | async\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\" />\n }\n\n @case (\"switch\") {\n <libs_ui-components-switch [active]=\"item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getActiveValueSwitch:item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisableValueSwitch:item() | async): false\"\n (outSwitch)=\"handlerSwitch($event,fieldConfig)\" />\n }\n\n\n @case ((fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup') ? fieldConfig.instance : '') {\n @if ((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async) !== ' ') {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown [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]=\"fieldConfig.dropdownConfig?.getListConfig ? ((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.dropdownConfig?.getListConfig:item()) | async):fieldConfig.dropdownConfig?.listConfig\"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\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()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item())| async | translate\">\n </div>\n }\n @if (fieldConfig.instance === 'badge' && (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async) > 0) {\n <libs_ui-components-badge [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async\"\n [maxCount]=\"99\" />\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? fieldConfig.getDisable ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisable:item() | async): false\"\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\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case (\"line-clamp\") {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp [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 mo-lib-font-head-5': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\" />\n }\n </div>\n }\n\n @case (\"shape-style\") {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [innerHTML]=\"(item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item())| async | translate | LibsUiPipesSecurityTrustPipe:'html':true | async\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\">\n </div>\n }\n @default {\n @if (((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item()) | async | translate); as value) {\n @if (value !==' ') {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [innerHTML]=\"value | LibsUiPipesSecurityTrustPipe:'html':true|async\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\">\n </div>\n }\n }\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <div class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n }\n @else {\n <ng-container *ngComponentOutlet=\"(item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getComponentOutlet) | async; inputs:{item}\" />\n }\n }\n\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .mo-lib-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}:host .mo-lib-table-template .mo-lib-table-template-buttons-container{visibility:hidden!important}:host .mo-lib-table-template [is-hover=true].mo-lib-table-template-buttons-container{visibility:visible!important}\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: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["getLastTextAfterSpace", "typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "idGenColor", "textAvatar", "classImageInclude"], outputs: ["outAvatarError"] }, { 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", "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"], 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", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "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 });
|
|
110
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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=\"mo-lib-table-template {{ templateCssWrapper() || '' }}\">\n @for (config of configs; track $index) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track index;let index = $index;) {\n\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case (\"tooltip\") {\n @if ((fieldConfig.tooltip || {}); as tooltip) {\n <span LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"(fieldConfig.getTooltipConfig ? (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getTooltipConfig:item() | async) : (tooltip.config | LibsUiPipesCloneObjectPipe)) | translate\"\n [innerHTML]=\" (fieldConfig.field ? (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true ) : tooltip.dataView) | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async | translate\"\n (outEvent)=\"handlerItemClick($event,fieldConfig)\">\n </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 [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event,fieldConfig)\" />\n }\n }\n }\n\n @case (\"avatar\") {\n @if ((item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getAvatarConfig:item()) | async ; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [getLastTextAfterSpace]=\"avatarConfig.getLastTextAfterSpace\" />\n }\n }\n\n @case (\"buttons\") {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of (fieldConfig.buttons || (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getButtonsByItem:item() | async)); track $index) {\n\n <libs_ui-components-buttons-button [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"button().disable ?? fieldConfig.getDisable ? (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisable:item() | async): false\"\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\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 <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown [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]=\"fieldConfig.dropdownConfig?.getListConfig ? ((item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.dropdownConfig?.getListConfig:item()) | async):fieldConfig.dropdownConfig?.listConfig\"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\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\n [innerHtml]=\"(item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item())| async | translate\">\n </div>\n }\n @if (fieldConfig.instance === 'badge' && (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async) > 0) {\n <libs_ui-components-badge [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async\"\n [maxCount]=\"99\" />\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 ?? fieldConfig.getDisable ? (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisable:item() | async): false\"\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\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case (\"line-clamp\") {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\">\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 mo-lib-font-head-5': 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 [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [innerHTML]=\"(item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item())| async | translate | LibsUiPipesSecurityTrustPipe:'html':true | async\"\n (click)=\"handlerItemClick($event,fieldConfig)\">\n </div>\n }\n @default {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [innerHTML]=\"(item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item()) | async | translate | LibsUiPipesSecurityTrustPipe:'html':true|async\"\n (click)=\"handlerItemClick($event,fieldConfig)\">\n </div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <div class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n }\n @else {\n <ng-container\n *ngComponentOutlet=\"(item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getComponentOutlet) | async; inputs:{item}\" />\n }\n }\n\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .mo-lib-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}:host .mo-lib-table-template .mo-lib-table-template-buttons-container{visibility:hidden!important}:host .mo-lib-table-template [is-hover=true].mo-lib-table-template-buttons-container{visibility:visible!important}\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: ["getLastTextAfterSpace", "typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "idGenColor", "textAvatar", "classImageInclude"], outputs: ["outAvatarError"] }, { 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", "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"], 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", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "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 });
|
|
110
111
|
}
|
|
111
112
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTableTemplatesComponent, decorators: [{
|
|
112
113
|
type: Component,
|
|
113
114
|
args: [{ selector: 'libs_ui-components-table-templates', standalone: true, imports: [
|
|
114
|
-
NgStyle, NgClass, TranslateModule, AsyncPipe, NgComponentOutlet,
|
|
115
|
+
NgStyle, NgClass, TranslateModule, AsyncPipe, NgComponentOutlet, LibsUiPipesGetValueOfObjectPipe,
|
|
115
116
|
LibsUiComponentsAvatarComponent, LibsUiPipesCallFunctionInTemplatePipe,
|
|
116
117
|
LibsUiPipesSecurityTrustPipe, LibsUiComponentsPopoverComponent,
|
|
117
118
|
LibsUiComponentsButtonsStatusComponent, LibsUiComponentsSwitchComponent,
|
|
118
119
|
LibsUiPipesCloneObjectPipe, LibsUiComponentsButtonsButtonComponent,
|
|
119
120
|
LibsUiComponentsLineClampComponent, LibsUiComponentsDropdownComponent,
|
|
120
121
|
LibsUiComponentsBadgeComponent
|
|
121
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"mo-lib-table-template {{ templateCssWrapper() || '' }}\">\n @for (config of configs; track $index) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track index;let index = $index;) {\n\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case (\"tooltip\") {\n @if ((fieldConfig.tooltip || {}); as tooltip) {\n <span LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"(fieldConfig.getTooltipConfig ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getTooltipConfig:item() | async) : (tooltip.config | LibsUiPipesCloneObjectPipe)) | translate\"\n [innerHTML]=\" (fieldConfig.field ? item()[fieldConfig.field] : tooltip.dataView) | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async | translate\"\n (outEvent)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\">\n </span>\n }\n }\n @case (\"image\") {\n @if (((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getImageSrc:item():isImageError) | async); as linkImage) {\n @if (linkImage !== ' ') {\n <img [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\" />\n }\n }\n }\n\n @case (\"avatar\") {\n @if ((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getAvatarConfig:item()) | async ; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [getLastTextAfterSpace]=\"avatarConfig.getLastTextAfterSpace\" />\n }\n }\n\n @case (\"buttons\") {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of (fieldConfig.buttons || (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getButtonsByItem:item() | async)); track $index) {\n\n <libs_ui-components-buttons-button [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"button().disable ?? fieldConfig.getDisable ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisable:item() | async): false\"\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 [config]=\"(item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item()) | async\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\" />\n }\n\n @case (\"switch\") {\n <libs_ui-components-switch [active]=\"item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getActiveValueSwitch:item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisableValueSwitch:item() | async): false\"\n (outSwitch)=\"handlerSwitch($event,fieldConfig)\" />\n }\n\n\n @case ((fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup') ? fieldConfig.instance : '') {\n @if ((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async) !== ' ') {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown [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]=\"fieldConfig.dropdownConfig?.getListConfig ? ((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.dropdownConfig?.getListConfig:item()) | async):fieldConfig.dropdownConfig?.listConfig\"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\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()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item())| async | translate\">\n </div>\n }\n @if (fieldConfig.instance === 'badge' && (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async) > 0) {\n <libs_ui-components-badge [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async\"\n [maxCount]=\"99\" />\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? fieldConfig.getDisable ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisable:item() | async): false\"\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\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case (\"line-clamp\") {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp [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 mo-lib-font-head-5': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\" />\n }\n </div>\n }\n\n @case (\"shape-style\") {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [innerHTML]=\"(item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item())| async | translate | LibsUiPipesSecurityTrustPipe:'html':true | async\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\">\n </div>\n }\n @default {\n @if (((item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item()) | async | translate); as value) {\n @if (value !==' ') {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [innerHTML]=\"value | LibsUiPipesSecurityTrustPipe:'html':true|async\"\n (click)=\"handlerItemClick($event,fieldConfig,item()[fieldConfig.field])\">\n </div>\n }\n }\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <div class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n }\n @else {\n <ng-container *ngComponentOutlet=\"(item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getComponentOutlet) | async; inputs:{item}\" />\n }\n }\n\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .mo-lib-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}:host .mo-lib-table-template .mo-lib-table-template-buttons-container{visibility:hidden!important}:host .mo-lib-table-template [is-hover=true].mo-lib-table-template-buttons-container{visibility:visible!important}\n"] }]
|
|
122
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"mo-lib-table-template {{ templateCssWrapper() || '' }}\">\n @for (config of configs; track $index) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track index;let index = $index;) {\n\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case (\"tooltip\") {\n @if ((fieldConfig.tooltip || {}); as tooltip) {\n <span LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"(fieldConfig.getTooltipConfig ? (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getTooltipConfig:item() | async) : (tooltip.config | LibsUiPipesCloneObjectPipe)) | translate\"\n [innerHTML]=\" (fieldConfig.field ? (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true ) : tooltip.dataView) | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async | translate\"\n (outEvent)=\"handlerItemClick($event,fieldConfig)\">\n </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 [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event,fieldConfig)\" />\n }\n }\n }\n\n @case (\"avatar\") {\n @if ((item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getAvatarConfig:item()) | async ; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [getLastTextAfterSpace]=\"avatarConfig.getLastTextAfterSpace\" />\n }\n }\n\n @case (\"buttons\") {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of (fieldConfig.buttons || (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getButtonsByItem:item() | async)); track $index) {\n\n <libs_ui-components-buttons-button [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"button().disable ?? fieldConfig.getDisable ? (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisable:item() | async): false\"\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\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 <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown [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]=\"fieldConfig.dropdownConfig?.getListConfig ? ((item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.dropdownConfig?.getListConfig:item()) | async):fieldConfig.dropdownConfig?.listConfig\"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\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\n [innerHtml]=\"(item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item())| async | translate\">\n </div>\n }\n @if (fieldConfig.instance === 'badge' && (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async) > 0) {\n <libs_ui-components-badge [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item() | async\"\n [maxCount]=\"99\" />\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 ?? fieldConfig.getDisable ? (item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getDisable:item() | async): false\"\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\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case (\"line-clamp\") {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\">\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 mo-lib-font-head-5': 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 [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [innerHTML]=\"(item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item())| async | translate | LibsUiPipesSecurityTrustPipe:'html':true | async\"\n (click)=\"handlerItemClick($event,fieldConfig)\">\n </div>\n }\n @default {\n <div [ngStyle]=\"fieldConfig.ngStyle || {}\"\n [ngClass]=\"fieldConfig.ngClass || {}\"\n [innerHTML]=\"(item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.parseValue:item()) | async | translate | LibsUiPipesSecurityTrustPipe:'html':true|async\"\n (click)=\"handlerItemClick($event,fieldConfig)\">\n </div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <div class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n }\n @else {\n <ng-container\n *ngComponentOutlet=\"(item()|LibsUiPipesGetValueOfObjectPipe:fieldConfig.field:undefined:true | LibsUiPipesCallFunctionInTemplatePipe:fieldConfig.getComponentOutlet) | async; inputs:{item}\" />\n }\n }\n\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .mo-lib-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}:host .mo-lib-table-template .mo-lib-table-template-buttons-container{visibility:hidden!important}:host .mo-lib-table-template [is-hover=true].mo-lib-table-template-buttons-container{visibility:visible!important}\n"] }]
|
|
123
|
+
}] });
|
|
124
|
+
|
|
125
|
+
class LibsUiTableCalculatorColumnPipe {
|
|
126
|
+
transform(header, offsetWidth, headerLeftConfig, headerRightConfig) {
|
|
127
|
+
if (!header?.ngStyle) {
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
const getWidthOfStyle = (headerGetWidth) => {
|
|
131
|
+
let { flex, width, maxWidth } = headerGetWidth.ngStyle || {};
|
|
132
|
+
width = parseInt(width || '0');
|
|
133
|
+
maxWidth = parseInt(maxWidth || '0');
|
|
134
|
+
flex = parseInt((flex || '0').split(' ').pop() || '0');
|
|
135
|
+
if (!flex && !width && !maxWidth) {
|
|
136
|
+
return 0;
|
|
137
|
+
}
|
|
138
|
+
const widthMax = Math.max(width, maxWidth, flex);
|
|
139
|
+
if (headerGetWidth.keepWidthColumnIfTableWidhtGrandTotalColumnsHeader) {
|
|
140
|
+
offsetWidth -= widthMax;
|
|
141
|
+
return 0;
|
|
142
|
+
}
|
|
143
|
+
return widthMax;
|
|
144
|
+
};
|
|
145
|
+
let totalWidthHeader = headerLeftConfig?.reduce((acc, curr) => acc + getWidthOfStyle(curr), 0) ?? 0;
|
|
146
|
+
if (headerRightConfig?.length) {
|
|
147
|
+
totalWidthHeader = headerRightConfig?.reduce((acc, curr) => acc + getWidthOfStyle(curr), totalWidthHeader) ?? 0;
|
|
148
|
+
}
|
|
149
|
+
if (header.isShowIndexOnRow) {
|
|
150
|
+
totalWidthHeader += 50;
|
|
151
|
+
}
|
|
152
|
+
if (totalWidthHeader > offsetWidth || header.keepWidthColumnIfTableWidhtGrandTotalColumnsHeader) {
|
|
153
|
+
return header.ngStyle;
|
|
154
|
+
}
|
|
155
|
+
const width = getWidthOfStyle(header);
|
|
156
|
+
const widthCalculator = (width / totalWidthHeader) * offsetWidth;
|
|
157
|
+
return {
|
|
158
|
+
...header.ngStyle,
|
|
159
|
+
flex: `0 0 ${widthCalculator}px`,
|
|
160
|
+
width: `${widthCalculator}px`,
|
|
161
|
+
maxWidth: `${widthCalculator}px`
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiTableCalculatorColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
165
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: LibsUiTableCalculatorColumnPipe, isStandalone: true, name: "LibsUiTableCalculatorColumnPipe" });
|
|
166
|
+
}
|
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiTableCalculatorColumnPipe, decorators: [{
|
|
168
|
+
type: Pipe,
|
|
169
|
+
args: [{
|
|
170
|
+
name: 'LibsUiTableCalculatorColumnPipe',
|
|
171
|
+
standalone: true
|
|
172
|
+
}]
|
|
122
173
|
}] });
|
|
123
174
|
|
|
124
175
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
125
176
|
class LibsUiComponentsTableComponent {
|
|
126
177
|
/** PROPERTY */
|
|
127
|
-
classHeaderContainer = computed(() => `libs-ui-table-header-container w-full flex ${this.ignoreClassBgHeader() ? '' : 'bg-white'} overflow-x-hidden z-[1] items-center ${this.
|
|
178
|
+
classHeaderContainer = computed(() => `libs-ui-table-header-container w-full flex shrink-0 ${this.ignoreClassBgHeader() ? '' : 'bg-white'} overflow-x-hidden z-[1] items-center ${this.classHeaderContainerInclude() || ''}`);
|
|
179
|
+
classHeaderLeftContainer = computed(() => `h-full flex sticky top-0 left-0 z-[1] ${this.ignoreClassBgHeader() ? '' : 'bg-white'} ${this.classHeaderLeftInclude() || ''}`);
|
|
128
180
|
keysSelected = signal([]);
|
|
129
181
|
loading = signal(false);
|
|
130
182
|
stores = signal([]);
|
|
131
183
|
items = signal([]);
|
|
132
|
-
itemFooter = signal(
|
|
184
|
+
itemFooter = signal(undefined);
|
|
133
185
|
itemOfIndexHover;
|
|
134
186
|
keySearch = signal('');
|
|
135
187
|
totalItemInBackend = signal(0);
|
|
@@ -161,6 +213,7 @@ class LibsUiComponentsTableComponent {
|
|
|
161
213
|
storeParamsCallApi = signal({});
|
|
162
214
|
timeoutLeaveItem = signal(undefined);
|
|
163
215
|
functionControlSelectMoreItem;
|
|
216
|
+
mouseScrollContext = signal(undefined);
|
|
164
217
|
onDestroy = new Subject();
|
|
165
218
|
/** INPUT */
|
|
166
219
|
timeHighlighNewItem = input(2000, { transform: val => val ?? 2000 });
|
|
@@ -177,7 +230,8 @@ class LibsUiComponentsTableComponent {
|
|
|
177
230
|
bufferAmount = input(5, { transform: val => val ? (val > 25 ? 25 : val) : 5 });
|
|
178
231
|
totalItem = input();
|
|
179
232
|
isDashBorder = input();
|
|
180
|
-
|
|
233
|
+
classHeaderContainerInclude = input();
|
|
234
|
+
classHeaderLeftInclude = input();
|
|
181
235
|
classBodyInclude = input('', { transform: val => val ?? '' });
|
|
182
236
|
classFooterInclude = input('', { transform: val => val ?? '' });
|
|
183
237
|
classTableContainerInclude = input('', { transform: val => val ?? '' });
|
|
@@ -357,7 +411,7 @@ class LibsUiComponentsTableComponent {
|
|
|
357
411
|
const { argumentsValue, guideAutoUpdateArgumentsValue } = this.httpRequestDataFooter();
|
|
358
412
|
this.httpRequestService.updateArguments(argumentsValue, { storeParamsCallApi: this.storeParamsCallApi() }, this.pagingStore(), this.keySearch(), true, false, guideAutoUpdateArgumentsValue);
|
|
359
413
|
const result = await this.httpRequestService.callApi(this.httpRequestDataFooter());
|
|
360
|
-
this.itemFooter.set(convertObjectToSignal(result.data)
|
|
414
|
+
this.itemFooter.set(convertObjectToSignal(result.data));
|
|
361
415
|
}
|
|
362
416
|
async addItems(items, addFirst, ignoreHightLight, ignoreReCallFooter, autoCountNewItem) {
|
|
363
417
|
if (!items() || !items().length) {
|
|
@@ -443,14 +497,28 @@ class LibsUiComponentsTableComponent {
|
|
|
443
497
|
}
|
|
444
498
|
return this.items().length;
|
|
445
499
|
}
|
|
446
|
-
|
|
500
|
+
handlerScrollBody(e) {
|
|
447
501
|
e.stopPropagation();
|
|
502
|
+
if (this.mouseScrollContext() !== 'body') {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
448
505
|
this.headerElementRef().nativeElement.scrollLeft = e.target.scrollLeft;
|
|
449
506
|
if (this.footerElementRef()) {
|
|
450
507
|
this.footerElementRef().nativeElement.scrollLeft = e.target.scrollLeft;
|
|
451
508
|
}
|
|
452
509
|
this.resetIndexHover(e);
|
|
453
510
|
}
|
|
511
|
+
handlerScrollHeader(e) {
|
|
512
|
+
e.stopPropagation();
|
|
513
|
+
if (this.mouseScrollContext() !== 'header') {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
this.bodyElementRef().nativeElement.scrollLeft = e.target.scrollLeft;
|
|
517
|
+
if (this.footerElementRef()) {
|
|
518
|
+
this.footerElementRef().nativeElement.scrollLeft = e.target.scrollLeft;
|
|
519
|
+
}
|
|
520
|
+
this.resetIndexHover(e);
|
|
521
|
+
}
|
|
454
522
|
handlerScrollBottom(e) {
|
|
455
523
|
e.stopPropagation();
|
|
456
524
|
this.loadMore();
|
|
@@ -651,8 +719,18 @@ class LibsUiComponentsTableComponent {
|
|
|
651
719
|
}
|
|
652
720
|
this.itemOfIndexHover = undefined;
|
|
653
721
|
}
|
|
654
|
-
|
|
722
|
+
handlerMouseEnterHeader(event) {
|
|
655
723
|
event.stopPropagation();
|
|
724
|
+
this.setMouseContext('header');
|
|
725
|
+
this.resetIndexHover(event);
|
|
726
|
+
}
|
|
727
|
+
handlerMouseEnterBody(event) {
|
|
728
|
+
event.stopPropagation();
|
|
729
|
+
this.setMouseContext('body');
|
|
730
|
+
}
|
|
731
|
+
handlerMouseEnterFooter(event) {
|
|
732
|
+
event.stopPropagation();
|
|
733
|
+
this.setMouseContext('footer');
|
|
656
734
|
this.resetIndexHover(event);
|
|
657
735
|
if (this.classFooterInclude()) {
|
|
658
736
|
this.footerElementRef()?.nativeElement?.classList.remove('bg-[#f8f9fa]');
|
|
@@ -661,7 +739,12 @@ class LibsUiComponentsTableComponent {
|
|
|
661
739
|
this.footerLeftElementRef()?.nativeElement?.classList.add(this.classFooterInclude());
|
|
662
740
|
}
|
|
663
741
|
}
|
|
664
|
-
|
|
742
|
+
handlerMouseLeaveContainer(event) {
|
|
743
|
+
event.stopPropagation();
|
|
744
|
+
this.setMouseContext(undefined);
|
|
745
|
+
this.resetIndexHover(event);
|
|
746
|
+
}
|
|
747
|
+
handlerMouseLeaveFooter(event) {
|
|
665
748
|
event.stopPropagation();
|
|
666
749
|
if (this.classFooterInclude()) {
|
|
667
750
|
this.footerElementRef()?.nativeElement?.classList.remove(this.classFooterInclude());
|
|
@@ -670,6 +753,9 @@ class LibsUiComponentsTableComponent {
|
|
|
670
753
|
this.footerLeftElementRef()?.nativeElement?.classList.add('bg-[#f8f9fa]');
|
|
671
754
|
}
|
|
672
755
|
}
|
|
756
|
+
setMouseContext(context) {
|
|
757
|
+
this.mouseScrollContext.set(context);
|
|
758
|
+
}
|
|
673
759
|
resetScroll() {
|
|
674
760
|
if (this.headerElementRef()) {
|
|
675
761
|
this.headerElementRef().nativeElement.scrollLeft = 0;
|
|
@@ -720,19 +806,19 @@ class LibsUiComponentsTableComponent {
|
|
|
720
806
|
clearTimeout(this.timeoutLeaveItem());
|
|
721
807
|
}
|
|
722
808
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
723
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsTableComponent, isStandalone: true, selector: "libs_ui-components-table", inputs: { 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 }, 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 }, classHeaderInclude: { classPropertyName: "classHeaderInclude", publicName: "classHeaderInclude", 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 }, 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 } }, 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 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 class=\"{{ classLabelBarNoSelectItem() ?? 'px-[12px] py-[5px]' }}\"\n [innerHtml]='labelBarNoSelectItem() | translate:{value:totalItemDisplay()}'>\n </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 [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 [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 [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 <libs_ui-components-buttons-button [type]=\"button.type || 'button-link-primary'\"\n [classIconLeft]=\"button.classIconLeft || ''\"\n [classInclude]=\"button.classInclude || ''\"\n [label]=\"(button.label || ' ') | 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 #tableContainerElementRef\n class=\"libs-ui-table flex flex-col w-full h-full relative {{ classTableContainerInclude() }}\"\n [class.px-[16px]]='!ignoreBar()'\n (mouseleave)=\"resetIndexHover($event)\">\n <div #headerElementRef\n [class.libs-ui-border-bottom-dashed-general]=\"!hasItemHightLight() && isDashBorder()\"\n [class.libs-ui-border-bottom-general]=\"!hasItemHightLight() && !isDashBorder()\"\n [class.!hidden]=\"!items().length && isHiddenHeaderWhenNodata()\"\n [class]=\"classHeaderContainer()\"\n (mouseenter)=\"resetIndexHover($event)\">\n @if (headerLeft().length) {\n <div class=\"h-full flex sticky top-0 left-0 z-[1] {{ classHeaderInclude() }}\">\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 @for (header of headerRight();track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef;context:{headerItem:header,isHeaderLeft:false}\" />\n }\n }\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 @if (items().length) {\n <div #bodyElementRef\n class=\"flex h-full w-full relative\"\n LibsUiComponentsScrollOverlayDirective\n [options]=\"{scrollX: (!headerLeft().length || !headerRight()) ? 'hidden':'scroll'}\"\n (outScroll)=\"handlerScroll($event)\"\n (outScrollBottom)=\"handlerScrollBottom($event)\">\n <virtual-scroller #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 <div #elementHover\n class=\"flex\"\n [class.bg-[#f3fcfc]]=\"data().specificHightLight\"\n [class.libs-ui-border-top-1px-36d3d3]=\"data().specificHightLight && $first && !ignoreBorderItem()\"\n [class.libs-ui-border-bottom-1px-36d3d3]=\"data().specificHightLight && !ignoreBorderItem()\"\n [ngClass]=\"(data().specificHightLight || ($last && ignoreBorderItemLast())) ? 'libs-ui-border-radius-bottom-left-4px libs-ui-border-radius-bottom-right-4px' : ignoreBorderItem() ? '' : isDashBorder() ? 'libs-ui-border-bottom-dashed-general' : 'libs-ui-border-bottom-general'\"\n [style.width.px]=\"headerElementRef.scrollWidth\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !data().specificHightLight\"\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 class=\"flex sticky top-0 left-0 z-[1]\"\n [class.bg-white]=\"!data().specificHightLight\"\n [class.bg-[#f3fcfc]]=\"data().specificHightLight\">\n @for (header of headerLeft();track header) {\n <div class=\"relative flex px-[12px] py-[8px] {{ header.ignoreBorderRight ? '': 'libs-ui-border-right-general' }}\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !data().specificHightLight\"\n [ngStyle]=\"header.ngStyle || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef;context:{header:header,data:data}\" />\n </div>\n }\n </div>\n }\n @if (headerRight().length) {\n @for (header of headerRight();track header) {\n <div class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"header.ngStyle || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef;context:{header:header,data:data}\" />\n </div>\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 <libs_ui-components-table-templates [item]=\"dataExpand\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\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\n @if ((!items().length) && !loading() && noDataConfig()) {\n <div class=\"h-full\"\n [style.flex]=\"'0 0 '+headerElementRef.scrollWidth+'px'\">\n </div>\n }\n </div>\n }\n @if ((!items().length) && !loading()) {\n <div class=\"relative h-full w-full\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n }\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 </div>\n</div>\n\n<ng-template #templateHeaderRef\n let-header='headerItem'\n let-isHeaderLeft='isHeaderLeft'>\n <div [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]=\"header.ngStyle || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n @if (!header.rowsConfig) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef;context:{headerItem:header,isColRender:false}\" />\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}\" />\n }\n </div>\n }\n }\n </div>\n</ng-template>\n\n<ng-template #templateHeaderContentRef\n let-header='headerItem'\n let-isColRender='isColRender'>\n <div 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]=\"isColRender ? (header.ngStyle || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})) : {}\"\n [ngClass]=\"isColRender ? (header.ngClass || {}) : {}\">\n @if (header.hasCheckbox) {\n @if (header.hasCheckboxAll) {\n <div class=\"flex h-full {{ header.checkboxAllClassInclude || 'mr-[16px]' }}\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single [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 }}\">\n </div>\n }\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 [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 @if (header.tooltipOther; as tooltip) {\n <div class=\"ml-[4px]\">\n <libs_ui-components-popover [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"tooltip.config || {content:(tooltip.dataView || ' ') | translate, position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12\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 [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 [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 #templateBodyRef\n let-header='header'\n let-data='data'>\n <div class=\"flex w-full h-full\">\n @if (header.hasCheckbox) {\n <div 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 [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 LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{}\"\n [innerHTML]=\"data | LibsUiPipesCallFunctionInTemplatePipe:getIndexRow | async\">\n </div>\n </div>\n }\n\n @if (header.colTemplateConfig) {\n <libs_ui-components-table-templates [isHover]=\"itemOfIndexHover === data && !data.specificHightLight\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n }\n </div>\n</ng-template>\n\n<ng-template #templateFooterRef>\n @if (!isHiddenHeaderWhenNodata() || (isHiddenHeaderWhenNodata() && items().length)) {\n <div #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)=\"handlerMouseEnter($event)\"\n (mouseleave)=\"handlerMouseLeave($event)\">\n @if (footerLeft()) {\n <div #footerLeftElementRef\n class=\"flex sticky top-0 left-0 z-[1] bg-[#f8f9fa]\">\n @for (footer of footerLeft();track footer) {\n <div class=\"flex items-center px-[12px] py-[8px] {{ footer.ignoreBorderRight ? '': 'libs-ui-border-right-general' }}\"\n [ngStyle]=\"footer.ngStyle || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig) {\n <libs_ui-components-table-templates [item]=\"itemFooter\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n </div>\n }\n </div>\n }\n @if (footerRight()) {\n @for (footer of footerRight();track footer) {\n <div class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"footer.ngStyle || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig) {\n <libs_ui-components-table-templates [item]=\"itemFooter\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n </div>\n }\n }\n\n </div>\n }\n</ng-template>\n\n<ng-template #templateNodataRef>\n @if (noDataConfig(); as config) {\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 LibsUiComponentsScrollOverlayDirective>\n @if (!keySearch() && !onlyShowNoResult()) {\n <ng-container *ngComponentOutlet=\" ('no-data' | LibsUiIconsGetIconComponentPipe | async);inputs:{size:64}\" />\n <div class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"config.ngStyle || {}\"\n [ngClass]=\"config.ngClass || {}\"\n [innerHtml]=\"config.textNoData | translate\">\n </div>\n }\n @if (keySearch() || onlyShowNoResult()) {\n <ng-container *ngComponentOutlet=\"('no-result' | LibsUiIconsGetIconComponentPipe | async);inputs:{size:64}\" />\n <div class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"config.ngStyle || {}\"\n [ngClass]=\"config.ngClass || {}\"\n [innerHtml]=\"config.textSearchNoData | translate\">\n </div>\n }\n </div>\n </div>\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"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { 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", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "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: 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"], outputs: ["checkedChange", "linkImageChange", "outChange", "outEventPopover", "outClickLabel", "outChangStageFlagMousePopover"] }, { 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", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiIconsGetIconComponentPipe, name: "LibsUiIconsGetIconComponentPipe" }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiPipesCheckSelectedByKeyPipe, name: "LibsUiPipesCheckSelectedByKeyPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
809
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsTableComponent, isStandalone: true, selector: "libs_ui-components-table", inputs: { 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 }, 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 }, 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 } }, 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 class=\"{{ classLabelBarNoSelectItem() ?? 'px-[12px] py-[5px]' }}\"\n [innerHtml]='labelBarNoSelectItem() | translate:{value:totalItemDisplay()}'>\n </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 [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 [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 [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 <libs_ui-components-buttons-button [type]=\"button.type || 'button-link-primary'\"\n [classIconLeft]=\"button.classIconLeft || ''\"\n [classInclude]=\"button.classInclude || ''\"\n [label]=\"(button.label || ' ') | 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 #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 #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.!hidden]=\"!items().length && isHiddenHeaderWhenNodata()\"\n [class]=\"classHeaderContainer()\"\n (outScroll)=\"handlerScrollHeader($event)\"\n (mouseenter)=\"handlerMouseEnterHeader($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 @for (header of headerRight();track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef;context:{headerItem:header,isHeaderLeft:false}\" />\n }\n }\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 #bodyElementRef\n class=\"flex h-full w-full relative\"\n LibsUiComponentsScrollOverlayDirective\n [options]=\"{scrollX: (!headerLeft().length || !headerRight()) ? 'hidden':'scroll'}\"\n (outScroll)=\"handlerScrollBody($event)\"\n (outScrollBottom)=\"handlerScrollBottom($event)\"\n (mouseenter)=\"handlerMouseEnterBody($event)\">\n @if (items().length) {\n <virtual-scroller #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 <div #elementHover\n class=\"flex\"\n [class.bg-[#f3fcfc]]=\"data().specificHightLight\"\n [class.libs-ui-border-top-1px-36d3d3]=\"data().specificHightLight && $first && !ignoreBorderItem()\"\n [class.libs-ui-border-bottom-1px-36d3d3]=\"data().specificHightLight && !ignoreBorderItem()\"\n [ngClass]=\"(data().specificHightLight || ($last && ignoreBorderItemLast())) ? 'libs-ui-border-radius-bottom-left-4px libs-ui-border-radius-bottom-right-4px' : ignoreBorderItem() ? '' : isDashBorder() ? 'libs-ui-border-bottom-dashed-general' : 'libs-ui-border-bottom-general'\"\n [style.width.px]=\"headerElementRef.scrollWidth\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !data().specificHightLight\"\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 class=\"flex sticky top-0 left-0 z-[1]\"\n [class.bg-white]=\"!data().specificHightLight\"\n [class.bg-[#f3fcfc]]=\"data().specificHightLight\">\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 && !data().specificHightLight\"\n [ngStyle]=\"(header|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:headerLeft():headerRight()) || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef;context:{header:header,data:data}\" />\n </div>\n }\n </div>\n }\n @if (headerRight().length) {\n @for (header of headerRight();track header) {\n <div class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"(header|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:headerLeft():headerRight()) || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef;context:{header:header,data:data}\" />\n </div>\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 <libs_ui-components-table-templates [item]=\"dataExpand\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\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-full w-full\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\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 </div>\n</div>\n\n<ng-template #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]=\"(header|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:headerLeft():headerRight()) || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n @if (!header.rowsConfig) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef;context:{headerItem:header,isColRender:false}\" />\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}\" />\n }\n </div>\n }\n }\n </div>\n</ng-template>\n\n<ng-template #templateHeaderContentRef\n let-header='headerItem'\n let-isColRender='isColRender'>\n <div 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]=\"isColRender ? ((header|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:headerLeft():headerRight()) || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})) : {}\"\n [ngClass]=\"isColRender ? (header.ngClass || {}) : {}\">\n @if (header.hasCheckbox) {\n @if (header.hasCheckboxAll) {\n <div class=\"flex h-full {{ header.checkboxAllClassInclude || 'mr-[16px]' }}\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single [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 }}\">\n </div>\n }\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 [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 @if (header.tooltipOther; as tooltip) {\n <div class=\"ml-[4px]\">\n <libs_ui-components-popover [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"tooltip.config || {content:(tooltip.dataView || ' ') | translate, position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12\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 [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 [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 #templateBodyRef\n let-header='header'\n let-data='data'>\n <div class=\"flex w-full h-full\">\n @if (header.hasCheckbox) {\n <div 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 [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 LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{}\"\n [innerHTML]=\"data | LibsUiPipesCallFunctionInTemplatePipe:getIndexRow | async\">\n </div>\n </div>\n }\n\n @if (header.colTemplateConfig) {\n <libs_ui-components-table-templates [isHover]=\"itemOfIndexHover === data && !data.specificHightLight\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n }\n </div>\n</ng-template>\n\n<ng-template #templateFooterRef>\n @if (!isHiddenHeaderWhenNodata() || (isHiddenHeaderWhenNodata() && items().length)) {\n <div #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 #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:headerElementRef.clientWidth:footerLeft():footerRight()) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n <libs_ui-components-table-templates [item]=\"itemFooter|LibsUiPipesConvertObjectToSignalPipe\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n </div>\n }\n </div>\n }\n @if (footerRight()) {\n @for (footer of footerRight();track footer) {\n <div class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:footerLeft():footerRight()) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n <libs_ui-components-table-templates [item]=\"itemFooter|LibsUiPipesConvertObjectToSignalPipe\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n </div>\n }\n }\n\n </div>\n }\n</ng-template>\n\n<ng-template #templateNodataRef>\n @if (noDataConfig(); as config) {\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 LibsUiComponentsScrollOverlayDirective>\n @if (!keySearch() && !onlyShowNoResult()) {\n <ng-container *ngComponentOutlet=\" ('no-data' | LibsUiIconsGetIconComponentPipe | async);inputs:{size:64}\" />\n <div class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"config.ngStyle || {}\"\n [ngClass]=\"config.ngClass || {}\"\n [innerHtml]=\"config.textNoData | translate\">\n </div>\n }\n @if (keySearch() || onlyShowNoResult()) {\n <ng-container *ngComponentOutlet=\"('no-result' | LibsUiIconsGetIconComponentPipe | async);inputs:{size:64}\" />\n <div class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"config.ngStyle || {}\"\n [ngClass]=\"config.ngClass || {}\"\n [innerHtml]=\"config.textSearchNoData | translate\">\n </div>\n }\n </div>\n </div>\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"], 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", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "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: 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"], 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", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiIconsGetIconComponentPipe, name: "LibsUiIconsGetIconComponentPipe" }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiPipesCheckSelectedByKeyPipe, name: "LibsUiPipesCheckSelectedByKeyPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
724
810
|
}
|
|
725
811
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTableComponent, decorators: [{
|
|
726
812
|
type: Component,
|
|
727
813
|
args: [{ selector: 'libs_ui-components-table', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
728
814
|
NgClass, NgStyle, AsyncPipe, NgTemplateOutlet, NgComponentOutlet, LibsUiComponentsTableTemplatesComponent,
|
|
729
|
-
TranslateModule, VirtualScrollerModule, LibsUiComponentsButtonsButtonComponent,
|
|
815
|
+
TranslateModule, VirtualScrollerModule, LibsUiComponentsButtonsButtonComponent, LibsUiPipesConvertObjectToSignalPipe,
|
|
730
816
|
LibsUiComponentsDropdownComponent, LibsUiComponentsButtonsSortArrowComponent,
|
|
731
|
-
LibsUiComponentsCheckboxSingleComponent,
|
|
817
|
+
LibsUiComponentsCheckboxSingleComponent, LibsUiTableCalculatorColumnPipe,
|
|
732
818
|
LibsUiComponentsSpinnerComponent, LibsUiComponentsPopoverComponent,
|
|
733
819
|
LibsUiComponentsScrollOverlayDirective, LibsUiIconsGetIconComponentPipe,
|
|
734
820
|
LibsUiPipesCallFunctionInTemplatePipe, LibsUiPipesCheckSelectedByKeyPipe
|
|
735
|
-
], template: "<div class='flex flex-col w-full h-full'>\n @if (!ignoreBar()) {\n <div 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 class=\"{{ classLabelBarNoSelectItem() ?? 'px-[12px] py-[5px]' }}\"\n [innerHtml]='labelBarNoSelectItem() | translate:{value:totalItemDisplay()}'>\n </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 [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 [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 [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 <libs_ui-components-buttons-button [type]=\"button.type || 'button-link-primary'\"\n [classIconLeft]=\"button.classIconLeft || ''\"\n [classInclude]=\"button.classInclude || ''\"\n [label]=\"(button.label || ' ') | 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 #tableContainerElementRef\n class=\"libs-ui-table flex flex-col w-full h-full relative {{ classTableContainerInclude() }}\"\n [class.px-[16px]]='!ignoreBar()'\n (mouseleave)=\"resetIndexHover($event)\">\n <div #headerElementRef\n [class.libs-ui-border-bottom-dashed-general]=\"!hasItemHightLight() && isDashBorder()\"\n [class.libs-ui-border-bottom-general]=\"!hasItemHightLight() && !isDashBorder()\"\n [class.!hidden]=\"!items().length && isHiddenHeaderWhenNodata()\"\n [class]=\"classHeaderContainer()\"\n (mouseenter)=\"resetIndexHover($event)\">\n @if (headerLeft().length) {\n <div class=\"h-full flex sticky top-0 left-0 z-[1] {{ classHeaderInclude() }}\">\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 @for (header of headerRight();track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef;context:{headerItem:header,isHeaderLeft:false}\" />\n }\n }\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 @if (items().length) {\n <div #bodyElementRef\n class=\"flex h-full w-full relative\"\n LibsUiComponentsScrollOverlayDirective\n [options]=\"{scrollX: (!headerLeft().length || !headerRight()) ? 'hidden':'scroll'}\"\n (outScroll)=\"handlerScroll($event)\"\n (outScrollBottom)=\"handlerScrollBottom($event)\">\n <virtual-scroller #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 <div #elementHover\n class=\"flex\"\n [class.bg-[#f3fcfc]]=\"data().specificHightLight\"\n [class.libs-ui-border-top-1px-36d3d3]=\"data().specificHightLight && $first && !ignoreBorderItem()\"\n [class.libs-ui-border-bottom-1px-36d3d3]=\"data().specificHightLight && !ignoreBorderItem()\"\n [ngClass]=\"(data().specificHightLight || ($last && ignoreBorderItemLast())) ? 'libs-ui-border-radius-bottom-left-4px libs-ui-border-radius-bottom-right-4px' : ignoreBorderItem() ? '' : isDashBorder() ? 'libs-ui-border-bottom-dashed-general' : 'libs-ui-border-bottom-general'\"\n [style.width.px]=\"headerElementRef.scrollWidth\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !data().specificHightLight\"\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 class=\"flex sticky top-0 left-0 z-[1]\"\n [class.bg-white]=\"!data().specificHightLight\"\n [class.bg-[#f3fcfc]]=\"data().specificHightLight\">\n @for (header of headerLeft();track header) {\n <div class=\"relative flex px-[12px] py-[8px] {{ header.ignoreBorderRight ? '': 'libs-ui-border-right-general' }}\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !data().specificHightLight\"\n [ngStyle]=\"header.ngStyle || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef;context:{header:header,data:data}\" />\n </div>\n }\n </div>\n }\n @if (headerRight().length) {\n @for (header of headerRight();track header) {\n <div class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"header.ngStyle || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef;context:{header:header,data:data}\" />\n </div>\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 <libs_ui-components-table-templates [item]=\"dataExpand\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\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\n @if ((!items().length) && !loading() && noDataConfig()) {\n <div class=\"h-full\"\n [style.flex]=\"'0 0 '+headerElementRef.scrollWidth+'px'\">\n </div>\n }\n </div>\n }\n @if ((!items().length) && !loading()) {\n <div class=\"relative h-full w-full\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\n }\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 </div>\n</div>\n\n<ng-template #templateHeaderRef\n let-header='headerItem'\n let-isHeaderLeft='isHeaderLeft'>\n <div [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]=\"header.ngStyle || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n @if (!header.rowsConfig) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef;context:{headerItem:header,isColRender:false}\" />\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}\" />\n }\n </div>\n }\n }\n </div>\n</ng-template>\n\n<ng-template #templateHeaderContentRef\n let-header='headerItem'\n let-isColRender='isColRender'>\n <div 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]=\"isColRender ? (header.ngStyle || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})) : {}\"\n [ngClass]=\"isColRender ? (header.ngClass || {}) : {}\">\n @if (header.hasCheckbox) {\n @if (header.hasCheckboxAll) {\n <div class=\"flex h-full {{ header.checkboxAllClassInclude || 'mr-[16px]' }}\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single [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 }}\">\n </div>\n }\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 [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 @if (header.tooltipOther; as tooltip) {\n <div class=\"ml-[4px]\">\n <libs_ui-components-popover [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"tooltip.config || {content:(tooltip.dataView || ' ') | translate, position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12\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 [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 [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 #templateBodyRef\n let-header='header'\n let-data='data'>\n <div class=\"flex w-full h-full\">\n @if (header.hasCheckbox) {\n <div 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 [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 LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{}\"\n [innerHTML]=\"data | LibsUiPipesCallFunctionInTemplatePipe:getIndexRow | async\">\n </div>\n </div>\n }\n\n @if (header.colTemplateConfig) {\n <libs_ui-components-table-templates [isHover]=\"itemOfIndexHover === data && !data.specificHightLight\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n }\n </div>\n</ng-template>\n\n<ng-template #templateFooterRef>\n @if (!isHiddenHeaderWhenNodata() || (isHiddenHeaderWhenNodata() && items().length)) {\n <div #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)=\"handlerMouseEnter($event)\"\n (mouseleave)=\"handlerMouseLeave($event)\">\n @if (footerLeft()) {\n <div #footerLeftElementRef\n class=\"flex sticky top-0 left-0 z-[1] bg-[#f8f9fa]\">\n @for (footer of footerLeft();track footer) {\n <div class=\"flex items-center px-[12px] py-[8px] {{ footer.ignoreBorderRight ? '': 'libs-ui-border-right-general' }}\"\n [ngStyle]=\"footer.ngStyle || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig) {\n <libs_ui-components-table-templates [item]=\"itemFooter\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n </div>\n }\n </div>\n }\n @if (footerRight()) {\n @for (footer of footerRight();track footer) {\n <div class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"footer.ngStyle || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig) {\n <libs_ui-components-table-templates [item]=\"itemFooter\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n </div>\n }\n }\n\n </div>\n }\n</ng-template>\n\n<ng-template #templateNodataRef>\n @if (noDataConfig(); as config) {\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 LibsUiComponentsScrollOverlayDirective>\n @if (!keySearch() && !onlyShowNoResult()) {\n <ng-container *ngComponentOutlet=\" ('no-data' | LibsUiIconsGetIconComponentPipe | async);inputs:{size:64}\" />\n <div class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"config.ngStyle || {}\"\n [ngClass]=\"config.ngClass || {}\"\n [innerHtml]=\"config.textNoData | translate\">\n </div>\n }\n @if (keySearch() || onlyShowNoResult()) {\n <ng-container *ngComponentOutlet=\"('no-result' | LibsUiIconsGetIconComponentPipe | async);inputs:{size:64}\" />\n <div class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"config.ngStyle || {}\"\n [ngClass]=\"config.ngClass || {}\"\n [innerHtml]=\"config.textSearchNoData | translate\">\n </div>\n }\n </div>\n </div>\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"] }]
|
|
821
|
+
], 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 class=\"{{ classLabelBarNoSelectItem() ?? 'px-[12px] py-[5px]' }}\"\n [innerHtml]='labelBarNoSelectItem() | translate:{value:totalItemDisplay()}'>\n </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 [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 [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 [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 <libs_ui-components-buttons-button [type]=\"button.type || 'button-link-primary'\"\n [classIconLeft]=\"button.classIconLeft || ''\"\n [classInclude]=\"button.classInclude || ''\"\n [label]=\"(button.label || ' ') | 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 #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 #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.!hidden]=\"!items().length && isHiddenHeaderWhenNodata()\"\n [class]=\"classHeaderContainer()\"\n (outScroll)=\"handlerScrollHeader($event)\"\n (mouseenter)=\"handlerMouseEnterHeader($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 @for (header of headerRight();track header) {\n <ng-container *ngTemplateOutlet=\"templateHeaderRef;context:{headerItem:header,isHeaderLeft:false}\" />\n }\n }\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 #bodyElementRef\n class=\"flex h-full w-full relative\"\n LibsUiComponentsScrollOverlayDirective\n [options]=\"{scrollX: (!headerLeft().length || !headerRight()) ? 'hidden':'scroll'}\"\n (outScroll)=\"handlerScrollBody($event)\"\n (outScrollBottom)=\"handlerScrollBottom($event)\"\n (mouseenter)=\"handlerMouseEnterBody($event)\">\n @if (items().length) {\n <virtual-scroller #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 <div #elementHover\n class=\"flex\"\n [class.bg-[#f3fcfc]]=\"data().specificHightLight\"\n [class.libs-ui-border-top-1px-36d3d3]=\"data().specificHightLight && $first && !ignoreBorderItem()\"\n [class.libs-ui-border-bottom-1px-36d3d3]=\"data().specificHightLight && !ignoreBorderItem()\"\n [ngClass]=\"(data().specificHightLight || ($last && ignoreBorderItemLast())) ? 'libs-ui-border-radius-bottom-left-4px libs-ui-border-radius-bottom-right-4px' : ignoreBorderItem() ? '' : isDashBorder() ? 'libs-ui-border-bottom-dashed-general' : 'libs-ui-border-bottom-general'\"\n [style.width.px]=\"headerElementRef.scrollWidth\"\n [class.bg-[#f8f9fa]]=\"itemOfIndexHover === data && !data().specificHightLight\"\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 class=\"flex sticky top-0 left-0 z-[1]\"\n [class.bg-white]=\"!data().specificHightLight\"\n [class.bg-[#f3fcfc]]=\"data().specificHightLight\">\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 && !data().specificHightLight\"\n [ngStyle]=\"(header|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:headerLeft():headerRight()) || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef;context:{header:header,data:data}\" />\n </div>\n }\n </div>\n }\n @if (headerRight().length) {\n @for (header of headerRight();track header) {\n <div class=\"relative flex px-[12px] py-[8px]\"\n [ngStyle]=\"(header|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:headerLeft():headerRight()) || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n <ng-container *ngTemplateOutlet=\"templateBodyRef;context:{header:header,data:data}\" />\n </div>\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 <libs_ui-components-table-templates [item]=\"dataExpand\"\n [templateCssWrapper]=\"configTemplateItemCollapseExpand()?.templateCssWrapper\"\n [configs]=\"configTemplateItemCollapseExpand()?.colTemplateConfig\" />\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-full w-full\">\n <ng-container *ngTemplateOutlet=\"templateNodataRef\" />\n </div>\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 </div>\n</div>\n\n<ng-template #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]=\"(header|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:headerLeft():headerRight()) || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})\"\n [ngClass]=\"header.ngClass || {}\">\n @if (!header.rowsConfig) {\n <ng-container *ngTemplateOutlet=\"templateHeaderContentRef;context:{headerItem:header,isColRender:false}\" />\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}\" />\n }\n </div>\n }\n }\n </div>\n</ng-template>\n\n<ng-template #templateHeaderContentRef\n let-header='headerItem'\n let-isColRender='isColRender'>\n <div 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]=\"isColRender ? ((header|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:headerLeft():headerRight()) || (header.isShowIndexOnRow ? {width:'50px','flex-shirk':'0',padding:'8px'} : {})) : {}\"\n [ngClass]=\"isColRender ? (header.ngClass || {}) : {}\">\n @if (header.hasCheckbox) {\n @if (header.hasCheckboxAll) {\n <div class=\"flex h-full {{ header.checkboxAllClassInclude || 'mr-[16px]' }}\"\n [class.items-center]=\"header.checkboxAlignCenter\">\n <libs_ui-components-checkbox-single [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 }}\">\n </div>\n }\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 [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 @if (header.tooltipOther; as tooltip) {\n <div class=\"ml-[4px]\">\n <libs_ui-components-popover [type]=\"tooltip?.type || 'other'\"\n [mode]=\"tooltip?.mode || 'hover'\"\n [classInclude]=\"tooltip.classInclude || 'text-[#6a7383]'\"\n [ignoreShowPopover]=\"tooltip.ignoreShowTooltip || false\"\n [config]=\"tooltip.config || {content:(tooltip.dataView || ' ') | translate, position: {\n mode: 'center',\n distance: 0,\n autoUpdatePosition: {\n endDistance: 12,\n startDistance: -12\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 [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 [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 #templateBodyRef\n let-header='header'\n let-data='data'>\n <div class=\"flex w-full h-full\">\n @if (header.hasCheckbox) {\n <div 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 [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 LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{}\"\n [innerHTML]=\"data | LibsUiPipesCallFunctionInTemplatePipe:getIndexRow | async\">\n </div>\n </div>\n }\n\n @if (header.colTemplateConfig) {\n <libs_ui-components-table-templates [isHover]=\"itemOfIndexHover === data && !data.specificHightLight\"\n [class]=\"header.templateCssWrapperHost || ''\"\n [item]=\"data\"\n [templateCssWrapper]=\"header.templateCssWrapper\"\n [configs]=\"header.colTemplateConfig\" />\n }\n </div>\n</ng-template>\n\n<ng-template #templateFooterRef>\n @if (!isHiddenHeaderWhenNodata() || (isHiddenHeaderWhenNodata() && items().length)) {\n <div #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 #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:headerElementRef.clientWidth:footerLeft():footerRight()) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n <libs_ui-components-table-templates [item]=\"itemFooter|LibsUiPipesConvertObjectToSignalPipe\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n </div>\n }\n </div>\n }\n @if (footerRight()) {\n @for (footer of footerRight();track footer) {\n <div class=\"flex items-center px-[12px] py-[8px]\"\n [ngStyle]=\"(footer|LibsUiTableCalculatorColumnPipe:headerElementRef.clientWidth:footerLeft():footerRight()) || {}\"\n [ngClass]=\"footer.ngClass || {}\">\n @if (footer.colTemplateConfig && itemFooter()) {\n <libs_ui-components-table-templates [item]=\"itemFooter|LibsUiPipesConvertObjectToSignalPipe\"\n [templateCssWrapper]=\"footer.templateCssWrapper\"\n [configs]=\"footer.colTemplateConfig\" />\n }\n </div>\n }\n }\n\n </div>\n }\n</ng-template>\n\n<ng-template #templateNodataRef>\n @if (noDataConfig(); as config) {\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 LibsUiComponentsScrollOverlayDirective>\n @if (!keySearch() && !onlyShowNoResult()) {\n <ng-container *ngComponentOutlet=\" ('no-data' | LibsUiIconsGetIconComponentPipe | async);inputs:{size:64}\" />\n <div class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"config.ngStyle || {}\"\n [ngClass]=\"config.ngClass || {}\"\n [innerHtml]=\"config.textNoData | translate\">\n </div>\n }\n @if (keySearch() || onlyShowNoResult()) {\n <ng-container *ngComponentOutlet=\"('no-result' | LibsUiIconsGetIconComponentPipe | async);inputs:{size:64}\" />\n <div class=\"libs-ui-table-no-data-config-text\"\n [ngStyle]=\"config.ngStyle || {}\"\n [ngClass]=\"config.ngClass || {}\"\n [innerHtml]=\"config.textSearchNoData | translate\">\n </div>\n }\n </div>\n </div>\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"] }]
|
|
736
822
|
}], ctorParameters: () => [] });
|
|
737
823
|
|
|
738
824
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|