@libs-ui/components-table 0.2.356-38 → 0.2.356-40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/table.component.mjs +14 -8
- package/esm2022/templates/templates.component.mjs +4 -4
- package/fesm2022/libs-ui-components-table.mjs +16 -10
- package/fesm2022/libs-ui-components-table.mjs.map +1 -1
- package/package.json +28 -28
- package/table.component.d.ts +18 -18
- package/templates/templates.component.d.ts +1 -1
|
@@ -149,7 +149,7 @@ class LibsUiComponentsTableTemplatesComponent {
|
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
await this.handleLockClick(async () => {
|
|
152
|
-
if (config
|
|
152
|
+
if (config?.action) {
|
|
153
153
|
config.action(get(this.item(), config.field), this.item());
|
|
154
154
|
}
|
|
155
155
|
});
|
|
@@ -211,7 +211,7 @@ class LibsUiComponentsTableTemplatesComponent {
|
|
|
211
211
|
this.functionControls.clear();
|
|
212
212
|
}
|
|
213
213
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsTableTemplatesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
214
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsTableTemplatesComponent, isStandalone: true, selector: "libs_ui-components-table-templates", inputs: { isHover: { classPropertyName: "isHover", publicName: "isHover", isSignal: true, isRequired: false, transformFunction: null }, configs: { classPropertyName: "configs", publicName: "configs", isSignal: true, isRequired: false, transformFunction: null }, templateCssWrapper: { classPropertyName: "templateCssWrapper", publicName: "templateCssWrapper", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"libs-ui-table-template {{ templateCssWrapperComputed() }}\">\n @for (config of configs; track config) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track fieldConfig; let index = $index) {\n @let constHtmlNgStyle = fieldConfig.getNgStyle ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgStyle : item() | async) : fieldConfig.ngStyle || {};\n @let constHtmlNgClass = fieldConfig.getNgClass ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgClass : item() | async) : fieldConfig.ngClass || {};\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case ('tooltip') {\n @if (fieldConfig.tooltip || {}; as tooltip) {\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [isAddContentToParentDocument]=\"tooltip.isAddContentToParentDocument || false\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"\n (fieldConfig.getTooltipConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getTooltipConfig : item() | async)\n : (tooltip.config | LibsUiPipesCloneObjectPipe)\n ) | translate\n \"\n [innerHTML]=\"\n (fieldConfig.field ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true) : tooltip.dataView)\n | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item()\n | async\n | translate\n | LibsUiPipesSecurityTrustPipe: 'html' : true\n | async\n \"\n (outEvent)=\"handlerItemClick($event, fieldConfig)\"></span>\n }\n }\n @case ('image') {\n @if (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getImageSrc : item() : isImageError() | async; as linkImage) {\n @if (linkImage !== ' ') {\n <img\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n }\n }\n\n @case ('avatar') {\n @let constHtmlAvatarConfig =\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getAvatarConfig : item() : undefined : { valueIsEmpty: undefined } | async;\n @if (constHtmlAvatarConfig) {\n <libs_ui-components-avatar\n [typeShape]=\"constHtmlAvatarConfig.typeShape || 'circle'\"\n [classInclude]=\"constHtmlAvatarConfig.classInclude\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [size]=\"constHtmlAvatarConfig.size || 32\"\n [linkAvatar]=\"constHtmlAvatarConfig.linkAvatar\"\n [linkAvatarError]=\"constHtmlAvatarConfig.linkAvatarError\"\n [idGenColor]=\"constHtmlAvatarConfig.idGenColor\"\n [getLastTextAfterSpace]=\"constHtmlAvatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"constHtmlAvatarConfig.textAvatar\" />\n }\n }\n\n @case ('buttons') {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of fieldConfig.buttons || (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getButtonsByItem : item() | async); track button) {\n <libs_ui-components-buttons-button\n [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"\n (button().disable ?? fieldConfig.getDisable) ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async) : false\n \"\n [label]=\"button().label || ' '\"\n [classIconLeft]=\"button().classIconLeft || ''\"\n [classIconRight]=\"button().classIconRight || ''\"\n [popover]=\"button().popover || {}\"\n [classInclude]=\"button().classInclude || ''\"\n [ignorePointerEvent]=\"button().ignorePointerEvent\"\n [iconOnlyType]=\"button().iconOnlyType\"\n (outClick)=\"clickButtonAction(button())\" />\n }\n </div>\n }\n }\n\n @case ('button-status') {\n <libs_ui-components-buttons-status\n [config]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n\n @case ('switch') {\n <libs_ui-components-switch\n [active]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getActiveValueSwitch : item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisableValueSwitch : item() | async) : false\"\n (outSwitch)=\"handlerSwitch($event, fieldConfig)\" />\n }\n\n @case (fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup' ? fieldConfig.instance : '') {\n @if ((item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async) !== ' ') {\n @let constHtmlDisableDropdown =\n (fieldConfig.dropdownConfig?.disable ?? fieldConfig.getDisable)\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async)\n : false;\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: fieldConfig.dropdownConfig?.ignoreArrow || false,\n maxHeight: fieldConfig.dropdownConfig?.maxHeight || 2048,\n paddingLeftItem: fieldConfig.dropdownConfig?.paddingLeftItem ?? true,\n classInclude: fieldConfig.dropdownConfig?.classIncludePopup || 'w-[250px]',\n position: fieldConfig.dropdownConfig?.position || {\n mode: 'center',\n distance: 0,\n },\n }\"\n [zIndex]=\"fieldConfig.dropdownConfig?.zIndex\"\n [listConfig]=\"\n fieldConfig.dropdownConfig?.getListConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.dropdownConfig?.getListConfig : item() | async)\n : fieldConfig.dropdownConfig?.listConfig\n \"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\n [disable]=\"constHtmlDisableDropdown\"\n (outFunctionsControl)=\"handlerFunctionControl($event, index)\"\n (outSelectKey)=\"handlerSelectItemDropdown(fieldConfig, index, $event)\"\n (outSelectMultiKey)=\"handlerSelectItemsDropdown(fieldConfig, index, $event)\">\n @if (fieldConfig.instance === 'other-action-show-popup') {\n <div\n [innerHTML]=\"\n item()\n | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true\n | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item()\n | async\n | translate\n | LibsUiPipesSecurityTrustPipe: 'html' : true\n | async\n \"></div>\n }\n @if (fieldConfig.instance === 'badge') {\n @let constHtmlDataBadge = item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async;\n @if (constHtmlDataBadge > 0) {\n <libs_ui-components-badge\n [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"constHtmlDataBadge\"\n [maxCount]=\"99\" />\n }\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button\n [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? constHtmlDisableDropdown\"\n [label]=\"fieldConfig?.dropdownConfig?.button()?.label || ' '\"\n [classIconLeft]=\"fieldConfig?.dropdownConfig?.button()?.classIconLeft || 'libs-ui-icon-more-vertical rotate-[90deg] mr-0'\"\n [classIconRight]=\"fieldConfig?.dropdownConfig?.button()?.classIconRight || ''\"\n [popover]=\"fieldConfig?.dropdownConfig?.button()?.popover || {}\"\n [classInclude]=\"fieldConfig?.dropdownConfig?.button()?.classInclude || ''\"\n [ignoreStopPropagationEvent]=\"true\" />\n }\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case ('line-clamp') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp\n [ignoreShowButtonCollapseExpand]=\"lineClampConfig.ignoreShowButtonCollapseExpand ?? true\"\n [showTooltip]=\"lineClampConfig.showTooltip ?? true\"\n [maxHeight]=\"lineClampConfig.maxHeight || 36\"\n [maxWidthTooltip]=\"lineClampConfig.maxWidthTooltip || 200\"\n [maxHeightTooltip]=\"lineClampConfig.maxHeightTooltip || 100\"\n [ngClassObject]=\"lineClampConfig.ngClassObject ?? { 'libs-ui-line-clamp-content libs-ui-font-h5r': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n </div>\n }\n\n @case ('shape-style') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n @default {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div\n class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\"\n [style.height.px]=\"rowRef.clientHeight\">\n <div\n #rowRef\n class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates\n class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDataComponentOutlet : item() : fieldConfig.field : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n }\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .libs-ui-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsTableTemplatesComponent, selector: "libs_ui-components-table-templates", inputs: ["isHover", "configs", "templateCssWrapper", "item"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: LibsUiPipesGetValueOfObjectPipe, name: "LibsUiPipesGetValueOfObjectPipe" }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "classImageInclude", "zIndexPreviewImage", "clickPreviewImage", "idGenColor", "getLastTextAfterSpace", "textAvatar", "textAvatarClassInclude", "containerTextAvatarClassInclude"], outputs: ["outAvatarError", "outEventPreviewImage"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiPipesSecurityTrustPipe, name: "LibsUiPipesSecurityTrustPipe" }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsStatusComponent, selector: "libs_ui-components-buttons-status", inputs: ["config"] }, { kind: "component", type: LibsUiComponentsSwitchComponent, selector: "libs_ui-components-switch", inputs: ["size", "disable", "active"], outputs: ["activeChange", "outSwitch"] }, { kind: "pipe", type: LibsUiPipesCloneObjectPipe, name: "LibsUiPipesCloneObjectPipe" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsLineClampComponent, selector: "libs_ui-components-line_clamp", inputs: ["content", "lengthLimitDisplay", "maxHeight", "ignoreShowButtonCollapseExpand", "ignoreShowButtonCollapse", "showTooltip", "timeHidePopoverOnMouseout", "maxWidthTooltip", "maxHeightTooltip", "zIndexPopover", "isInnerText", "classClassLabelButtonCollapseExpand", "classClassIncludeButtonCollapseExpand", "ignoreStopPropagationTooltipEvent", "ngClassObject", "hasBackgroundGradient", "labelButtonViewMore", "labelButtonCollapse", "directionTooltip", "useXssFilter", "defaultIsCollapse"], outputs: ["outDisplayLineClamp", "outAction", "outClick", "outFunctionControl"] }, { kind: "component", type: LibsUiComponentsDropdownComponent, selector: "libs_ui-components-dropdown", inputs: ["useXssFilter", "popoverElementRefCustom", "classInclude", "ignoreStopPropagationEvent", "flagMouse", "flagMouseContent", "popoverCustomConfig", "isNgContent", "zIndex", "convertItemSelected", "getPopoverItemSelected", "httpRequestDetailItemById", "lengthKeys", "textDisplayWhenNoSelect", "textDisplayWhenMultiSelect", "classIncludeTextDisplayWhenNoSelect", "fieldLabel", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "dropdownTemplateRefNotSearchNoData", "fieldGetImage", "imageSize", "typeShape", "fieldGetIcon", "fieldGetTextAvatar", "fieldGetColorAvatar", "classAvatarInclude", "getLastTextAfterSpace", "linkImageError", "showError", "showBorderError", "disable", "readonly", "labelConfig", "disableLabel", "listSearchConfig", "isSearchOnline", "listHiddenInputSearch", "listSearchPadding", "listKeySearch", "listDividerClassInclude", "listConfig", "listButtonsOther", "listHasButtonUnSelectOption", "listClickExactly", "listBackgroundCustom", "listMaxItemShow", "listKeySelected", "listMultiKeySelected", "listKeysDisable", "listKeysHidden", "validRequired", "validMaxItemSelected", "changeValidUndefinedResetError", "allowSelectItemMultiple", "focusInputSearch", "onlyEmitDataWhenReset", "resetKeyWhenSelectAllKey", "listConfigHasDivider", "classIncludeIcon", "classIncludeContent", "listIgnoreClassDisableDefaultWhenUseKeysDisableItem", "tabKeyActive", "tabsConfig", "ignoreBorderBottom"], outputs: ["flagMouseChange", "flagMouseContentChange", "lengthKeysChange", "showBorderErrorChange", "listKeySelectedChange", "listMultiKeySelectedChange", "tabKeyActiveChange", "outSelectKey", "outSelectMultiKey", "outFunctionsControl", "outValidEvent", "outChangStageFlagMouse", "outDataChange", "outClickButtonOther", "outShowList", "outChangeTabKeyActive"] }, { kind: "component", type: LibsUiComponentsBadgeComponent, selector: "libs_ui-components-badge", inputs: ["popoverConfig", "active", "count", "mode", "maxCount", "ignoreMarginDefault", "classCircle", "ignoreStopPropagationEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
214
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsTableTemplatesComponent, isStandalone: true, selector: "libs_ui-components-table-templates", inputs: { isHover: { classPropertyName: "isHover", publicName: "isHover", isSignal: true, isRequired: false, transformFunction: null }, configs: { classPropertyName: "configs", publicName: "configs", isSignal: true, isRequired: false, transformFunction: null }, templateCssWrapper: { classPropertyName: "templateCssWrapper", publicName: "templateCssWrapper", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"libs-ui-table-template {{ templateCssWrapperComputed() }}\">\n @for (config of configs; track config) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track fieldConfig; let index = $index) {\n @let constHtmlNgStyle = fieldConfig.getNgStyle ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgStyle : item() | async) : fieldConfig.ngStyle || {};\n @let constHtmlNgClass = fieldConfig.getNgClass ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgClass : item() | async) : fieldConfig.ngClass || {};\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case ('tooltip') {\n @if (fieldConfig.tooltip || {}; as tooltip) {\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [isAddContentToParentDocument]=\"tooltip.isAddContentToParentDocument || false\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"\n (fieldConfig.getTooltipConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getTooltipConfig : item() | async)\n : (tooltip.config | LibsUiPipesCloneObjectPipe)\n ) | translate\n \"\n [innerHTML]=\"\n (fieldConfig.field ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true) : tooltip.dataView)\n | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item()\n | async\n | translate\n | LibsUiPipesSecurityTrustPipe: 'html' : false\n | async\n \"\n (outEvent)=\"handlerItemClick($event, fieldConfig)\"></span>\n }\n }\n @case ('image') {\n @if (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getImageSrc : item() : isImageError() | async; as linkImage) {\n @if (linkImage !== ' ') {\n <img\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [src]=\"linkImage\"\n alt=\"\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\" />\n }\n }\n }\n\n @case ('avatar') {\n @let constHtmlAvatarConfig =\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getAvatarConfig : item() : undefined : { valueIsEmpty: undefined } | async;\n @if (constHtmlAvatarConfig) {\n <libs_ui-components-avatar\n [typeShape]=\"constHtmlAvatarConfig.typeShape || 'circle'\"\n [classInclude]=\"constHtmlAvatarConfig.classInclude\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [size]=\"constHtmlAvatarConfig.size || 32\"\n [linkAvatar]=\"constHtmlAvatarConfig.linkAvatar\"\n [linkAvatarError]=\"constHtmlAvatarConfig.linkAvatarError\"\n [idGenColor]=\"constHtmlAvatarConfig.idGenColor\"\n [getLastTextAfterSpace]=\"constHtmlAvatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"constHtmlAvatarConfig.textAvatar\" />\n }\n }\n\n @case ('buttons') {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of fieldConfig.buttons || (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getButtonsByItem : item() | async); track button) {\n <libs_ui-components-buttons-button\n [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"\n (button().disable ?? fieldConfig.getDisable) ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async) : false\n \"\n [label]=\"button().label || ' '\"\n [classIconLeft]=\"button().classIconLeft || ''\"\n [classIconRight]=\"button().classIconRight || ''\"\n [popover]=\"button().popover || {}\"\n [classInclude]=\"button().classInclude || ''\"\n [ignorePointerEvent]=\"button().ignorePointerEvent\"\n [iconOnlyType]=\"button().iconOnlyType\"\n (outClick)=\"clickButtonAction(button())\" />\n }\n </div>\n }\n }\n\n @case ('button-status') {\n <libs_ui-components-buttons-status\n [config]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\" />\n }\n\n @case ('switch') {\n <libs_ui-components-switch\n [active]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getActiveValueSwitch : item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisableValueSwitch : item() | async) : false\"\n (outSwitch)=\"handlerSwitch($event, fieldConfig)\" />\n }\n\n @case (fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup' ? fieldConfig.instance : '') {\n @if ((item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async) !== ' ') {\n @let constHtmlDisableDropdown =\n (fieldConfig.dropdownConfig?.disable ?? fieldConfig.getDisable)\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async)\n : false;\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: fieldConfig.dropdownConfig?.ignoreArrow || false,\n maxHeight: fieldConfig.dropdownConfig?.maxHeight || 2048,\n paddingLeftItem: fieldConfig.dropdownConfig?.paddingLeftItem ?? true,\n classInclude: fieldConfig.dropdownConfig?.classIncludePopup || 'w-[250px]',\n position: fieldConfig.dropdownConfig?.position || {\n mode: 'center',\n distance: 0,\n },\n }\"\n [zIndex]=\"fieldConfig.dropdownConfig?.zIndex\"\n [listConfig]=\"\n fieldConfig.dropdownConfig?.getListConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.dropdownConfig?.getListConfig : item() | async)\n : fieldConfig.dropdownConfig?.listConfig\n \"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\n [disable]=\"constHtmlDisableDropdown\"\n (outFunctionsControl)=\"handlerFunctionControl($event, index)\"\n (outSelectKey)=\"handlerSelectItemDropdown(fieldConfig, index, $event)\"\n (outSelectMultiKey)=\"handlerSelectItemsDropdown(fieldConfig, index, $event)\">\n @if (fieldConfig.instance === 'other-action-show-popup') {\n <div\n [innerHTML]=\"\n item()\n | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true\n | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item()\n | async\n | translate\n | LibsUiPipesSecurityTrustPipe: 'html' : false\n | async\n \"></div>\n }\n @if (fieldConfig.instance === 'badge') {\n @let constHtmlDataBadge = item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async;\n @if (constHtmlDataBadge > 0) {\n <libs_ui-components-badge\n [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"constHtmlDataBadge\"\n [maxCount]=\"99\" />\n }\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button\n [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? constHtmlDisableDropdown\"\n [label]=\"fieldConfig?.dropdownConfig?.button()?.label || ' '\"\n [classIconLeft]=\"fieldConfig?.dropdownConfig?.button()?.classIconLeft || 'libs-ui-icon-more-vertical rotate-[90deg] mr-0'\"\n [classIconRight]=\"fieldConfig?.dropdownConfig?.button()?.classIconRight || ''\"\n [popover]=\"fieldConfig?.dropdownConfig?.button()?.popover || {}\"\n [classInclude]=\"fieldConfig?.dropdownConfig?.button()?.classInclude || ''\"\n [ignoreStopPropagationEvent]=\"true\" />\n }\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case ('line-clamp') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp\n [ignoreShowButtonCollapseExpand]=\"lineClampConfig.ignoreShowButtonCollapseExpand ?? true\"\n [showTooltip]=\"lineClampConfig.showTooltip ?? true\"\n [maxHeight]=\"lineClampConfig.maxHeight || 36\"\n [maxWidthTooltip]=\"lineClampConfig.maxWidthTooltip || 200\"\n [maxHeightTooltip]=\"lineClampConfig.maxHeightTooltip || 100\"\n [ngClassObject]=\"lineClampConfig.ngClassObject ?? { 'libs-ui-line-clamp-content libs-ui-font-h5r': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\" />\n }\n </div>\n }\n\n @case ('shape-style') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : false | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n @default {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div\n class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\"\n [style.height.px]=\"rowRef.clientHeight\">\n <div\n #rowRef\n class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates\n class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDataComponentOutlet : item() : fieldConfig.field : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n }\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .libs-ui-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsTableTemplatesComponent, selector: "libs_ui-components-table-templates", inputs: ["isHover", "configs", "templateCssWrapper", "item"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: LibsUiPipesGetValueOfObjectPipe, name: "LibsUiPipesGetValueOfObjectPipe" }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "classImageInclude", "zIndexPreviewImage", "clickPreviewImage", "idGenColor", "getLastTextAfterSpace", "textAvatar", "textAvatarClassInclude", "containerTextAvatarClassInclude"], outputs: ["outAvatarError", "outEventPreviewImage"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiPipesSecurityTrustPipe, name: "LibsUiPipesSecurityTrustPipe" }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsStatusComponent, selector: "libs_ui-components-buttons-status", inputs: ["config"] }, { kind: "component", type: LibsUiComponentsSwitchComponent, selector: "libs_ui-components-switch", inputs: ["size", "disable", "active"], outputs: ["activeChange", "outSwitch"] }, { kind: "pipe", type: LibsUiPipesCloneObjectPipe, name: "LibsUiPipesCloneObjectPipe" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsLineClampComponent, selector: "libs_ui-components-line_clamp", inputs: ["content", "lengthLimitDisplay", "maxHeight", "ignoreShowButtonCollapseExpand", "ignoreShowButtonCollapse", "showTooltip", "timeHidePopoverOnMouseout", "maxWidthTooltip", "maxHeightTooltip", "zIndexPopover", "isInnerText", "classClassLabelButtonCollapseExpand", "classClassIncludeButtonCollapseExpand", "ignoreStopPropagationTooltipEvent", "ngClassObject", "hasBackgroundGradient", "labelButtonViewMore", "labelButtonCollapse", "directionTooltip", "useXssFilter", "defaultIsCollapse"], outputs: ["outDisplayLineClamp", "outAction", "outClick", "outFunctionControl"] }, { kind: "component", type: LibsUiComponentsDropdownComponent, selector: "libs_ui-components-dropdown", inputs: ["useXssFilter", "popoverElementRefCustom", "classInclude", "ignoreStopPropagationEvent", "flagMouse", "flagMouseContent", "popoverCustomConfig", "isNgContent", "zIndex", "convertItemSelected", "getPopoverItemSelected", "httpRequestDetailItemById", "lengthKeys", "textDisplayWhenNoSelect", "textDisplayWhenMultiSelect", "classIncludeTextDisplayWhenNoSelect", "fieldLabel", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "dropdownTemplateRefNotSearchNoData", "fieldGetImage", "imageSize", "typeShape", "fieldGetIcon", "fieldGetTextAvatar", "fieldGetColorAvatar", "classAvatarInclude", "getLastTextAfterSpace", "linkImageError", "showError", "showBorderError", "disable", "readonly", "labelConfig", "disableLabel", "listSearchConfig", "isSearchOnline", "listHiddenInputSearch", "listSearchPadding", "listKeySearch", "listDividerClassInclude", "listConfig", "listButtonsOther", "listHasButtonUnSelectOption", "listClickExactly", "listBackgroundCustom", "listMaxItemShow", "listKeySelected", "listMultiKeySelected", "listKeysDisable", "listKeysHidden", "validRequired", "validMaxItemSelected", "changeValidUndefinedResetError", "allowSelectItemMultiple", "focusInputSearch", "onlyEmitDataWhenReset", "resetKeyWhenSelectAllKey", "listConfigHasDivider", "classIncludeIcon", "classIncludeContent", "listIgnoreClassDisableDefaultWhenUseKeysDisableItem", "tabKeyActive", "tabsConfig", "ignoreBorderBottom"], outputs: ["flagMouseChange", "flagMouseContentChange", "lengthKeysChange", "showBorderErrorChange", "listKeySelectedChange", "listMultiKeySelectedChange", "tabKeyActiveChange", "outSelectKey", "outSelectMultiKey", "outFunctionsControl", "outValidEvent", "outChangStageFlagMouse", "outDataChange", "outClickButtonOther", "outShowList", "outChangeTabKeyActive"] }, { kind: "component", type: LibsUiComponentsBadgeComponent, selector: "libs_ui-components-badge", inputs: ["popoverConfig", "active", "count", "mode", "maxCount", "ignoreMarginDefault", "classCircle", "ignoreStopPropagationEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
215
215
|
}
|
|
216
216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsTableTemplatesComponent, decorators: [{
|
|
217
217
|
type: Component,
|
|
@@ -233,7 +233,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
233
233
|
LibsUiComponentsLineClampComponent,
|
|
234
234
|
LibsUiComponentsDropdownComponent,
|
|
235
235
|
LibsUiComponentsBadgeComponent,
|
|
236
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"libs-ui-table-template {{ templateCssWrapperComputed() }}\">\n @for (config of configs; track config) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track fieldConfig; let index = $index) {\n @let constHtmlNgStyle = fieldConfig.getNgStyle ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgStyle : item() | async) : fieldConfig.ngStyle || {};\n @let constHtmlNgClass = fieldConfig.getNgClass ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgClass : item() | async) : fieldConfig.ngClass || {};\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case ('tooltip') {\n @if (fieldConfig.tooltip || {}; as tooltip) {\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [isAddContentToParentDocument]=\"tooltip.isAddContentToParentDocument || false\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"\n (fieldConfig.getTooltipConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getTooltipConfig : item() | async)\n : (tooltip.config | LibsUiPipesCloneObjectPipe)\n ) | translate\n \"\n [innerHTML]=\"\n (fieldConfig.field ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true) : tooltip.dataView)\n | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item()\n | async\n | translate\n | LibsUiPipesSecurityTrustPipe: 'html' : true\n | async\n \"\n (outEvent)=\"handlerItemClick($event, fieldConfig)\"></span>\n }\n }\n @case ('image') {\n @if (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getImageSrc : item() : isImageError() | async; as linkImage) {\n @if (linkImage !== ' ') {\n <img\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [src]=\"linkImage\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n }\n }\n\n @case ('avatar') {\n @let constHtmlAvatarConfig =\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getAvatarConfig : item() : undefined : { valueIsEmpty: undefined } | async;\n @if (constHtmlAvatarConfig) {\n <libs_ui-components-avatar\n [typeShape]=\"constHtmlAvatarConfig.typeShape || 'circle'\"\n [classInclude]=\"constHtmlAvatarConfig.classInclude\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [size]=\"constHtmlAvatarConfig.size || 32\"\n [linkAvatar]=\"constHtmlAvatarConfig.linkAvatar\"\n [linkAvatarError]=\"constHtmlAvatarConfig.linkAvatarError\"\n [idGenColor]=\"constHtmlAvatarConfig.idGenColor\"\n [getLastTextAfterSpace]=\"constHtmlAvatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"constHtmlAvatarConfig.textAvatar\" />\n }\n }\n\n @case ('buttons') {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of fieldConfig.buttons || (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getButtonsByItem : item() | async); track button) {\n <libs_ui-components-buttons-button\n [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"\n (button().disable ?? fieldConfig.getDisable) ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async) : false\n \"\n [label]=\"button().label || ' '\"\n [classIconLeft]=\"button().classIconLeft || ''\"\n [classIconRight]=\"button().classIconRight || ''\"\n [popover]=\"button().popover || {}\"\n [classInclude]=\"button().classInclude || ''\"\n [ignorePointerEvent]=\"button().ignorePointerEvent\"\n [iconOnlyType]=\"button().iconOnlyType\"\n (outClick)=\"clickButtonAction(button())\" />\n }\n </div>\n }\n }\n\n @case ('button-status') {\n <libs_ui-components-buttons-status\n [config]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n\n @case ('switch') {\n <libs_ui-components-switch\n [active]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getActiveValueSwitch : item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisableValueSwitch : item() | async) : false\"\n (outSwitch)=\"handlerSwitch($event, fieldConfig)\" />\n }\n\n @case (fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup' ? fieldConfig.instance : '') {\n @if ((item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async) !== ' ') {\n @let constHtmlDisableDropdown =\n (fieldConfig.dropdownConfig?.disable ?? fieldConfig.getDisable)\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async)\n : false;\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: fieldConfig.dropdownConfig?.ignoreArrow || false,\n maxHeight: fieldConfig.dropdownConfig?.maxHeight || 2048,\n paddingLeftItem: fieldConfig.dropdownConfig?.paddingLeftItem ?? true,\n classInclude: fieldConfig.dropdownConfig?.classIncludePopup || 'w-[250px]',\n position: fieldConfig.dropdownConfig?.position || {\n mode: 'center',\n distance: 0,\n },\n }\"\n [zIndex]=\"fieldConfig.dropdownConfig?.zIndex\"\n [listConfig]=\"\n fieldConfig.dropdownConfig?.getListConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.dropdownConfig?.getListConfig : item() | async)\n : fieldConfig.dropdownConfig?.listConfig\n \"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\n [disable]=\"constHtmlDisableDropdown\"\n (outFunctionsControl)=\"handlerFunctionControl($event, index)\"\n (outSelectKey)=\"handlerSelectItemDropdown(fieldConfig, index, $event)\"\n (outSelectMultiKey)=\"handlerSelectItemsDropdown(fieldConfig, index, $event)\">\n @if (fieldConfig.instance === 'other-action-show-popup') {\n <div\n [innerHTML]=\"\n item()\n | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true\n | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item()\n | async\n | translate\n | LibsUiPipesSecurityTrustPipe: 'html' : true\n | async\n \"></div>\n }\n @if (fieldConfig.instance === 'badge') {\n @let constHtmlDataBadge = item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async;\n @if (constHtmlDataBadge > 0) {\n <libs_ui-components-badge\n [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"constHtmlDataBadge\"\n [maxCount]=\"99\" />\n }\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button\n [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? constHtmlDisableDropdown\"\n [label]=\"fieldConfig?.dropdownConfig?.button()?.label || ' '\"\n [classIconLeft]=\"fieldConfig?.dropdownConfig?.button()?.classIconLeft || 'libs-ui-icon-more-vertical rotate-[90deg] mr-0'\"\n [classIconRight]=\"fieldConfig?.dropdownConfig?.button()?.classIconRight || ''\"\n [popover]=\"fieldConfig?.dropdownConfig?.button()?.popover || {}\"\n [classInclude]=\"fieldConfig?.dropdownConfig?.button()?.classInclude || ''\"\n [ignoreStopPropagationEvent]=\"true\" />\n }\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case ('line-clamp') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp\n [ignoreShowButtonCollapseExpand]=\"lineClampConfig.ignoreShowButtonCollapseExpand ?? true\"\n [showTooltip]=\"lineClampConfig.showTooltip ?? true\"\n [maxHeight]=\"lineClampConfig.maxHeight || 36\"\n [maxWidthTooltip]=\"lineClampConfig.maxWidthTooltip || 200\"\n [maxHeightTooltip]=\"lineClampConfig.maxHeightTooltip || 100\"\n [ngClassObject]=\"lineClampConfig.ngClassObject ?? { 'libs-ui-line-clamp-content libs-ui-font-h5r': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\" />\n }\n </div>\n }\n\n @case ('shape-style') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n @default {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div\n class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\"\n [style.height.px]=\"rowRef.clientHeight\">\n <div\n #rowRef\n class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates\n class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDataComponentOutlet : item() : fieldConfig.field : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n }\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .libs-ui-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}\n"] }]
|
|
236
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (configs(); as configs) {\n @if (item(); as item) {\n <div class=\"libs-ui-table-template {{ templateCssWrapperComputed() }}\">\n @for (config of configs; track config) {\n @if (config.fieldsConfig) {\n <div [class]=\"config.cssWrapper\">\n @for (fieldConfig of config.fieldsConfig; track fieldConfig; let index = $index) {\n @let constHtmlNgStyle = fieldConfig.getNgStyle ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgStyle : item() | async) : fieldConfig.ngStyle || {};\n @let constHtmlNgClass = fieldConfig.getNgClass ? (item()[fieldConfig.field] | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getNgClass : item() | async) : fieldConfig.ngClass || {};\n @if (!fieldConfig.rows && !fieldConfig.getComponentOutlet) {\n @switch (fieldConfig.instance) {\n @case ('tooltip') {\n @if (fieldConfig.tooltip || {}; as tooltip) {\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"tooltip.type || 'text'\"\n [mode]=\"tooltip.mode || 'hover'\"\n [isAddContentToParentDocument]=\"tooltip.isAddContentToParentDocument || false\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [classInclude]=\"tooltip.classInclude || ' '\"\n [ignoreShowPopover]=\"tooltip.ignoreShowPopover || false\"\n [config]=\"\n (fieldConfig.getTooltipConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getTooltipConfig : item() | async)\n : (tooltip.config | LibsUiPipesCloneObjectPipe)\n ) | translate\n \"\n [innerHTML]=\"\n (fieldConfig.field ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true) : tooltip.dataView)\n | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item()\n | async\n | translate\n | LibsUiPipesSecurityTrustPipe: 'html' : false\n | async\n \"\n (outEvent)=\"handlerItemClick($event, fieldConfig)\"></span>\n }\n }\n @case ('image') {\n @if (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getImageSrc : item() : isImageError() | async; as linkImage) {\n @if (linkImage !== ' ') {\n <img\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [src]=\"linkImage\"\n alt=\"\"\n (error)=\"handlerImageError($event)\"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\" />\n }\n }\n }\n\n @case ('avatar') {\n @let constHtmlAvatarConfig =\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getAvatarConfig : item() : undefined : { valueIsEmpty: undefined } | async;\n @if (constHtmlAvatarConfig) {\n <libs_ui-components-avatar\n [typeShape]=\"constHtmlAvatarConfig.typeShape || 'circle'\"\n [classInclude]=\"constHtmlAvatarConfig.classInclude\"\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [size]=\"constHtmlAvatarConfig.size || 32\"\n [linkAvatar]=\"constHtmlAvatarConfig.linkAvatar\"\n [linkAvatarError]=\"constHtmlAvatarConfig.linkAvatarError\"\n [idGenColor]=\"constHtmlAvatarConfig.idGenColor\"\n [getLastTextAfterSpace]=\"constHtmlAvatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"constHtmlAvatarConfig.textAvatar\" />\n }\n }\n\n @case ('buttons') {\n @if ((fieldConfig.buttons && fieldConfig.buttons.length) || fieldConfig.getButtonsByItem) {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.invisible]=\"!isHover() && fieldConfig.showButtonHoverMode\">\n @for (button of fieldConfig.buttons || (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getButtonsByItem : item() | async); track button) {\n <libs_ui-components-buttons-button\n [type]=\"button().type || 'button-primary'\"\n [sizeButton]=\"button().sizeButton || 'smaller'\"\n [disable]=\"\n (button().disable ?? fieldConfig.getDisable) ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async) : false\n \"\n [label]=\"button().label || ' '\"\n [classIconLeft]=\"button().classIconLeft || ''\"\n [classIconRight]=\"button().classIconRight || ''\"\n [popover]=\"button().popover || {}\"\n [classInclude]=\"button().classInclude || ''\"\n [ignorePointerEvent]=\"button().ignorePointerEvent\"\n [iconOnlyType]=\"button().iconOnlyType\"\n (outClick)=\"clickButtonAction(button())\" />\n }\n </div>\n }\n }\n\n @case ('button-status') {\n <libs_ui-components-buttons-status\n [config]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\" />\n }\n\n @case ('switch') {\n <libs_ui-components-switch\n [active]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getActiveValueSwitch : item() | async\"\n [disable]=\"fieldConfig.getDisableValueSwitch ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisableValueSwitch : item() | async) : false\"\n (outSwitch)=\"handlerSwitch($event, fieldConfig)\" />\n }\n\n @case (fieldConfig.instance === 'other-action-show-popup' || fieldConfig.instance === 'badge' || fieldConfig.instance === 'button-action-show-popup' ? fieldConfig.instance : '') {\n @if ((item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async) !== ' ') {\n @let constHtmlDisableDropdown =\n (fieldConfig.dropdownConfig?.disable ?? fieldConfig.getDisable)\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDisable : item() | async)\n : false;\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [class.ml-[8px]]=\"!fieldConfig.ignoreClassMarginLeft\">\n <libs_ui-components-dropdown\n [isNgContent]=\"true\"\n [popoverCustomConfig]=\"{\n widthByParent: false,\n ignoreArrow: fieldConfig.dropdownConfig?.ignoreArrow || false,\n maxHeight: fieldConfig.dropdownConfig?.maxHeight || 2048,\n paddingLeftItem: fieldConfig.dropdownConfig?.paddingLeftItem ?? true,\n classInclude: fieldConfig.dropdownConfig?.classIncludePopup || 'w-[250px]',\n position: fieldConfig.dropdownConfig?.position || {\n mode: 'center',\n distance: 0,\n },\n }\"\n [zIndex]=\"fieldConfig.dropdownConfig?.zIndex\"\n [listConfig]=\"\n fieldConfig.dropdownConfig?.getListConfig\n ? (item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.dropdownConfig?.getListConfig : item() | async)\n : fieldConfig.dropdownConfig?.listConfig\n \"\n [listBackgroundCustom]=\"fieldConfig.dropdownConfig?.listBackgroundListCustom\"\n [listMaxItemShow]=\"fieldConfig.dropdownConfig?.listMaxItemShow || 5\"\n [listKeysDisable]=\"fieldConfig.dropdownConfig?.listKeysDisableItem\"\n [listHiddenInputSearch]=\"fieldConfig.dropdownConfig?.listHiddenInputSearch\"\n [disable]=\"constHtmlDisableDropdown\"\n (outFunctionsControl)=\"handlerFunctionControl($event, index)\"\n (outSelectKey)=\"handlerSelectItemDropdown(fieldConfig, index, $event)\"\n (outSelectMultiKey)=\"handlerSelectItemsDropdown(fieldConfig, index, $event)\">\n @if (fieldConfig.instance === 'other-action-show-popup') {\n <div\n [innerHTML]=\"\n item()\n | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true\n | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item()\n | async\n | translate\n | LibsUiPipesSecurityTrustPipe: 'html' : false\n | async\n \"></div>\n }\n @if (fieldConfig.instance === 'badge') {\n @let constHtmlDataBadge = item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async;\n @if (constHtmlDataBadge > 0) {\n <libs_ui-components-badge\n [active]=\"true\"\n [ignoreMarginDefault]=\"true\"\n mode=\"+x\"\n [count]=\"constHtmlDataBadge\"\n [maxCount]=\"99\" />\n }\n }\n @if (fieldConfig.instance === 'button-action-show-popup') {\n <libs_ui-components-buttons-button\n [type]=\"fieldConfig?.dropdownConfig?.button()?.type || 'button-primary'\"\n [sizeButton]=\"fieldConfig?.dropdownConfig?.button()?.sizeButton || 'smaller'\"\n [disable]=\"fieldConfig?.dropdownConfig?.button()?.disable ?? constHtmlDisableDropdown\"\n [label]=\"fieldConfig?.dropdownConfig?.button()?.label || ' '\"\n [classIconLeft]=\"fieldConfig?.dropdownConfig?.button()?.classIconLeft || 'libs-ui-icon-more-vertical rotate-[90deg] mr-0'\"\n [classIconRight]=\"fieldConfig?.dropdownConfig?.button()?.classIconRight || ''\"\n [popover]=\"fieldConfig?.dropdownConfig?.button()?.popover || {}\"\n [classInclude]=\"fieldConfig?.dropdownConfig?.button()?.classInclude || ''\"\n [ignoreStopPropagationEvent]=\"true\" />\n }\n </libs_ui-components-dropdown>\n </div>\n }\n }\n\n @case ('line-clamp') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\">\n @if (fieldConfig.lineClampConfig; as lineClampConfig) {\n <libs_ui-components-line_clamp\n [ignoreShowButtonCollapseExpand]=\"lineClampConfig.ignoreShowButtonCollapseExpand ?? true\"\n [showTooltip]=\"lineClampConfig.showTooltip ?? true\"\n [maxHeight]=\"lineClampConfig.maxHeight || 36\"\n [maxWidthTooltip]=\"lineClampConfig.maxWidthTooltip || 200\"\n [maxHeightTooltip]=\"lineClampConfig.maxHeightTooltip || 100\"\n [ngClassObject]=\"lineClampConfig.ngClassObject ?? { 'libs-ui-line-clamp-content libs-ui-font-h5r': true }\"\n [isInnerText]=\"lineClampConfig.isInnerText || false\"\n [ignoreStopPropagationTooltipEvent]=\"true\"\n [content]=\"item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async\"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\" />\n }\n </div>\n }\n\n @case ('shape-style') {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : false | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n @default {\n <div\n [ngStyle]=\"constHtmlNgStyle\"\n [ngClass]=\"constHtmlNgClass\"\n [innerHTML]=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.parseValue : item() | async | translate | LibsUiPipesSecurityTrustPipe: 'html' : true | async\n \"\n (click)=\"handlerItemClick($event, fieldConfig)\"\n (keyup.enter)=\"handlerItemClick($event, fieldConfig)\"></div>\n }\n }\n } @else {\n @if (fieldConfig.rows) {\n <div\n class=\"w-full flex relative {{ fieldConfig.rowsTemplateCssWrapper }}\"\n [style.height.px]=\"rowRef.clientHeight\">\n <div\n #rowRef\n class=\"w-full flex absolute {{ fieldConfig.rowsTemplateCssWrapper }}\">\n <libs_ui-components-table-templates\n class=\"flex w-full\"\n [item]=\"item\"\n [configs]=\"fieldConfig.rows\" />\n </div>\n </div>\n } @else {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldConfig.field : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: fieldConfig.getDataComponentOutlet : item() : fieldConfig.field : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n }\n }\n </div>\n }\n }\n </div>\n }\n}\n", styles: [":host{width:100%;height:100%}:host .libs-ui-table-template{color:#071631;font-size:12px;font-weight:400;width:100%;height:inherit}\n"] }]
|
|
237
237
|
}] });
|
|
238
238
|
|
|
239
239
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -252,7 +252,7 @@ class LibsUiComponentsTableComponent {
|
|
|
252
252
|
configLabelPopover: this.moreItemPopoverConfig,
|
|
253
253
|
});
|
|
254
254
|
moreItemHttpData = signal({
|
|
255
|
-
objectInstance: returnListObject(
|
|
255
|
+
objectInstance: returnListObject(),
|
|
256
256
|
functionName: 'list',
|
|
257
257
|
argumentsValue: [],
|
|
258
258
|
});
|
|
@@ -289,7 +289,13 @@ class LibsUiComponentsTableComponent {
|
|
|
289
289
|
footerRight = input();
|
|
290
290
|
disableCheckbox = input(false, { transform: (val) => val ?? false });
|
|
291
291
|
enableUnequalChildrenSizes = input(false, { transform: (val) => val ?? false });
|
|
292
|
-
bufferAmount = input(5, {
|
|
292
|
+
bufferAmount = input(5, {
|
|
293
|
+
transform: (val) => {
|
|
294
|
+
if (!val)
|
|
295
|
+
return 5;
|
|
296
|
+
return val > 25 ? 25 : val;
|
|
297
|
+
},
|
|
298
|
+
});
|
|
293
299
|
totalItem = input();
|
|
294
300
|
isDashBorder = input();
|
|
295
301
|
classHeaderContainerInclude = input();
|
|
@@ -506,7 +512,7 @@ class LibsUiComponentsTableComponent {
|
|
|
506
512
|
this.functionControlSelectMoreItem = functionControl;
|
|
507
513
|
}
|
|
508
514
|
handlerSelectedMoreItem(event) {
|
|
509
|
-
if (!event
|
|
515
|
+
if (!event?.key || !this.configSelectMoreItem()) {
|
|
510
516
|
return;
|
|
511
517
|
}
|
|
512
518
|
this.functionControlSelectMoreItem?.reset();
|
|
@@ -756,7 +762,7 @@ class LibsUiComponentsTableComponent {
|
|
|
756
762
|
this.itemFooter.set(convertObjectToSignal(result.data));
|
|
757
763
|
}
|
|
758
764
|
async addItems(items, addFirst, ignoreHightLight, ignoreReCallFooter, autoCountNewItem) {
|
|
759
|
-
if (!items()
|
|
765
|
+
if (!items()?.length) {
|
|
760
766
|
return;
|
|
761
767
|
}
|
|
762
768
|
const existingKeys = new Set(this.items().map((item) => `${get(item, this.fieldKey())}`));
|
|
@@ -805,7 +811,7 @@ class LibsUiComponentsTableComponent {
|
|
|
805
811
|
this.items.update((items) => {
|
|
806
812
|
let isUpdate = false;
|
|
807
813
|
const newItems = items.filter((item) => {
|
|
808
|
-
if (`${get(item, this.fieldKey())}` === `${key}`) {
|
|
814
|
+
if (`${get(item, this.fieldKey())}` === `${String(key)}`) {
|
|
809
815
|
isUpdate = true;
|
|
810
816
|
return false;
|
|
811
817
|
}
|
|
@@ -816,7 +822,7 @@ class LibsUiComponentsTableComponent {
|
|
|
816
822
|
this.stores.update((items) => {
|
|
817
823
|
let isUpdate = false;
|
|
818
824
|
const newItems = items.filter((item) => {
|
|
819
|
-
if (`${get(item, this.fieldKey())}` === `${key}`) {
|
|
825
|
+
if (`${get(item, this.fieldKey())}` === `${String(key)}`) {
|
|
820
826
|
isUpdate = true;
|
|
821
827
|
if (autoCountNewItem) {
|
|
822
828
|
this.totalItemInBackend.update((value) => value - 1);
|
|
@@ -827,7 +833,7 @@ class LibsUiComponentsTableComponent {
|
|
|
827
833
|
});
|
|
828
834
|
return isUpdate ? newItems : items;
|
|
829
835
|
});
|
|
830
|
-
if (!this.keysSelected()
|
|
836
|
+
if (!this.keysSelected()?.length) {
|
|
831
837
|
return;
|
|
832
838
|
}
|
|
833
839
|
if (!autoCountNewItem) {
|