@libs-ui/components-list 0.2.56 → 0.2.57

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.
@@ -1,4 +1,4 @@
1
- import { AsyncPipe, NgTemplateOutlet, NgClass } from '@angular/common';
1
+ import { AsyncPipe, NgComponentOutlet, NgTemplateOutlet, NgClass } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { input, inject, ElementRef, Directive, Pipe, signal, output, effect, untracked, Component, ChangeDetectionStrategy, model, viewChild } from '@angular/core';
4
4
  import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
@@ -7,20 +7,23 @@ import { LibsUiComponentsLabelComponent } from '@libs-ui/components-label';
7
7
  import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
8
8
  import { LibsUiDynamicComponentService } from '@libs-ui/services-dynamic-component';
9
9
  import { deleteUnicode, isEmpty, convertObjectToSignal, cloneDeep, isNil, escapeHtml, ERROR_MESSAGE_EMPTY_VALID } from '@libs-ui/utils';
10
- import * as i1 from '@ngx-translate/core';
10
+ import * as i2 from '@ngx-translate/core';
11
11
  import { TranslateModule, TranslateService } from '@ngx-translate/core';
12
12
  import { lastValueFrom, Subject, interval, timer, takeUntil as takeUntil$1 } from 'rxjs';
13
- import * as i1$1 from '@iharbeck/ngx-virtual-scroller';
14
- import { VirtualScrollerComponent, VirtualScrollerModule } from '@iharbeck/ngx-virtual-scroller';
15
- import { LibsUiComponentsAvatarComponent } from '@libs-ui/components-avatar';
16
- import { LibsUiComponentsButtonsSortArrowComponent } from '@libs-ui/components-buttons-sort';
13
+ import * as i1 from '@iharbeck/ngx-virtual-scroller';
14
+ import { VirtualScrollerModule, VirtualScrollerComponent } from '@iharbeck/ngx-virtual-scroller';
15
+ import { LibsUiComponentsCheckboxSingleComponent } from '@libs-ui/components-checkbox-single';
17
16
  import { LibsUiComponentsScrollOverlayDirective } from '@libs-ui/components-scroll-overlay';
18
17
  import { LibsUiComponentsSpinnerComponent } from '@libs-ui/components-spinner';
19
- import { LibsUiComponentsSwitchComponent } from '@libs-ui/components-switch';
20
- import { LibsUiComponentsBadgeComponent } from '@libs-ui/components-badge';
18
+ import { LibsUiIconsGetIconComponentPipe } from '@libs-ui/icons';
21
19
  import { LibsUiPipesCallFunctionInTemplatePipe } from '@libs-ui/pipes-call-function-in-template';
20
+ import { LibsUiComponentsAvatarComponent } from '@libs-ui/components-avatar';
21
+ import { LibsUiComponentsBadgeComponent } from '@libs-ui/components-badge';
22
22
  import { LibsUiHttpRequestService } from '@libs-ui/services-http-request';
23
23
  import { takeUntil, skipWhile, take } from 'rxjs/operators';
24
+ import { LibsUiComponentsRadioSingleComponent } from '@libs-ui/components-radio-single';
25
+ import { LibsUiComponentsButtonsSortArrowComponent } from '@libs-ui/components-buttons-sort';
26
+ import { LibsUiComponentsSwitchComponent } from '@libs-ui/components-switch';
24
27
 
25
28
  class LibsUiComponentsListHighlightKeySearchDirective {
26
29
  isHighlight = input(undefined);
@@ -162,7 +165,7 @@ class LibsUiComponentsListRowsComponent {
162
165
  this.outChangStageFlagMousePopover.emit(flag);
163
166
  }
164
167
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListRowsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
165
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListRowsComponent, isStandalone: true, selector: "libs_ui-components-list-templates_rows", inputs: { configTemplate: { classPropertyName: "configTemplate", publicName: "configTemplate", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, keySelected: { classPropertyName: "keySelected", publicName: "keySelected", isSignal: true, isRequired: false, transformFunction: null }, fieldKey: { classPropertyName: "fieldKey", publicName: "fieldKey", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outChangStageFlagMousePopover: "outChangStageFlagMousePopover", outEvent: "outEvent" }, ngImport: i0, template: "@if (configTemplate() && configItemTextRows(); as configItemTextRows) {\n <div class=\"flex flex-col w-full {{ configTemplate().classRows ?? '' }}\">\n @for (row of configItemTextRows; track $index; let indexRow = $index;) {\n <div [class]=\"row().classRow\">\n @if (row().getImage && ((item() | LibsUiPipesCallFunctionInTemplatePipe:row().getImage:item()) | async); as imgUrl) {\n <img [class]=\"(item() | LibsUiPipesCallFunctionInTemplatePipe:row().getClassImage:item()) | async\"\n src=\"{{ imgUrl }}\"\n (error)=\"handlerErrorImage($event,row().getImageError)\" />\n }\n @if (item()['fieldRowAvatarConfig'+indexRow]; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (fieldKey() && item()['fieldLabelRow'+indexRow]; as labelRow) {\n <libs_ui-components-popover type=\"text\"\n [config]=\"row().getPopoverConfig ? (('popover' | LibsUiPipesCallFunctionInTemplatePipe:row().getPopoverConfig:item()) | async) : { zIndex: zIndex()}\"\n [classInclude]=\"(keySelected() === item()[fieldKey()]) ? (row().classItemSelected || row().classGetValue || '') :(row().classGetValue || '')\"\n [innerHtml]=\"labelRow\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),row().action)\" />\n }\n @if (row().cols?.()?.length) {\n <div [class]=\"row().classCols || 'flex'\"\n [style]=\"item()[item()['fieldRowStylesDynamicCols'+indexRow]]\">\n @for (col of row().cols?.(); track $index; let colIndex = $index) {\n @if (col().getImage && ((item() | LibsUiPipesCallFunctionInTemplatePipe:col().getImage:item()) | async); as imgUrl) {\n <img [class]=\"(item() | LibsUiPipesCallFunctionInTemplatePipe:col().getClassImage:item()) | async\"\n src=\"{{ imgUrl }}\"\n (error)=\"handlerErrorImage($event,col().getImageError)\" />\n }\n @if (item()['fieldColAvatarConfig'+indexRow+colIndex]; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (item()['fieldLabelCol'+indexRow+colIndex]; as labelColFunc) {\n <libs_ui-components-popover type=\"text\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [classInclude]=\"(keySelected() === item()[fieldKey()]) ? (row().classItemSelected || col().classCol || '') :(col().classCol || '')\"\n [innerHtml]=\"('fieldLabelCol' | LibsUiPipesCallFunctionInTemplatePipe:labelColFunc:item()) | async\"\n [config]=\"{ zIndex: zIndex() }\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),col().action)\" />\n }\n @if (item()['fieldColPopover'+indexRow+colIndex]; as popover) {\n <libs_ui-components-popover [type]=\"popover.type ?? 'other'\"\n [config]=\"popover?.config\"\n [classInclude]=\"col().classCol\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),col().action)\">\n <span [class]=\"popover.classInclude || ''\"\n [innerHtml]=\"(popover.dataView ?? popoverIcon) | translate\">\n </span>\n </libs_ui-components-popover>\n }\n @if (item()['fieldColToggle'+indexRow+colIndex]; as toggle) {\n <libs_ui-components-label [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [hasToggle]=\"toggle.hasToggle\"\n [toggleActive]=\"toggle.toggleActive\"\n [toggleDisable]=\"toggle.toggleDisable\"\n [popover]=\"toggle.popover\"\n [classInclude]=\"toggle.classInclude\"\n [labelLeft]=\"toggle.labelLeft\"\n [labelRight]=\"toggle.labelRight\"\n (outSwitchEvent)=\"handlerSelectItem('click',item(),col().action)\" />\n }\n @if (item()['fieldColButton'+indexRow+colIndex]; as button) {\n <libs_ui-components-buttons-button [type]=\"button.type\"\n [classIconLeft]=\"button.classIconLeft\"\n [classIconRight]=\"button.classIconRight\"\n [classLabel]=\"button.classLabel\"\n [iconOnlyType]=\"button.iconOnlyType\"\n [popover]=\"button.popover\"\n [disable]=\"button.disable\"\n [ignorePointerEvent]=\"button.ignorePointerEvent\"\n [classInclude]=\"col().classCol ?? ' '\"\n [ignoreStopPropagationEvent]=\"false\"\n (outClick)=\"handlerSelectItem('click',item(),col().action)\" />\n }\n @if (item()['fieldBadge'+indexRow+colIndex]; as badge) {\n <libs_ui-components-badge [mode]=\"badge.mode || 'x+'\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [count]=\"badge.count\"\n [maxCount]=\"badge.maxCount || 99\"\n [classCircle]=\"badge.classCircle || 'libs-ui-font-h4r'\" />\n }\n }\n </div>\n }\n </div>\n }\n </div>\n}\n", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["getLastTextAfterSpace", "typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "idGenColor", "textAvatar", "classImageInclude"], outputs: ["outAvatarError"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { 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: LibsUiComponentsLabelComponent, selector: "libs_ui-components-label", inputs: ["iconPopoverClass", "classInclude", "labelLeft", "labelLeftClass", "labelLeftBehindToggleButton", "popover", "required", "buttonsLeft", "disableButtonsLeft", "buttonsRight", "disableButtonsRight", "labelRight", "labelRightClass", "labelRightRequired", "hasToggle", "toggleSize", "toggleActive", "toggleDisable", "description", "descriptionClass", "buttonsDescription", "disableButtonsDescription", "buttonsDescriptionContainerClass", "onlyShowCount", "zIndexPopover", "timerDestroyPopover", "count", "limitLength"], outputs: ["outClickButton", "outSwitchEvent", "outLabelRightClick", "outLabelLeftClick"] }, { kind: "component", type: LibsUiComponentsBadgeComponent, selector: "libs_ui-components-badge", inputs: ["popoverConfig", "active", "count", "mode", "maxCount", "ignoreMarginDefault", "classCircle", "ignoreStopPropagationEvent"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
168
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListRowsComponent, isStandalone: true, selector: "libs_ui-components-list-templates_rows", inputs: { configTemplate: { classPropertyName: "configTemplate", publicName: "configTemplate", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, keySelected: { classPropertyName: "keySelected", publicName: "keySelected", isSignal: true, isRequired: false, transformFunction: null }, fieldKey: { classPropertyName: "fieldKey", publicName: "fieldKey", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outChangStageFlagMousePopover: "outChangStageFlagMousePopover", outEvent: "outEvent" }, ngImport: i0, template: "@if (configTemplate() && configItemTextRows(); as configItemTextRows) {\n <div class=\"flex flex-col w-full {{ configTemplate().classRows ?? '' }}\">\n @for (row of configItemTextRows; track $index; let indexRow = $index;) {\n <div [class]=\"row().classRow\">\n @if (row().getImage && ((item() | LibsUiPipesCallFunctionInTemplatePipe:row().getImage:item()) | async); as imgUrl) {\n <img [class]=\"(item() | LibsUiPipesCallFunctionInTemplatePipe:row().getClassImage:item()) | async\"\n src=\"{{ imgUrl }}\"\n (error)=\"handlerErrorImage($event,row().getImageError)\" />\n }\n @if (item()['fieldRowAvatarConfig'+indexRow]; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (fieldKey() && item()['fieldLabelRow'+indexRow]; as labelRow) {\n <libs_ui-components-popover type=\"text\"\n [config]=\"row().getPopoverConfig ? (('popover' | LibsUiPipesCallFunctionInTemplatePipe:row().getPopoverConfig:item()) | async) : { zIndex: zIndex()}\"\n [classInclude]=\"(keySelected() === item()[fieldKey()]) ? (row().classItemSelected || row().classGetValue || '') :(row().classGetValue || '')\"\n [innerHtml]=\"labelRow\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),row().action)\" />\n }\n @if (row().cols?.()?.length) {\n <div [class]=\"row().classCols || 'flex'\"\n [style]=\"item()[item()['fieldRowStylesDynamicCols'+indexRow]]\">\n @for (col of row().cols?.(); track $index; let colIndex = $index) {\n @if (col().getImage && ((item() | LibsUiPipesCallFunctionInTemplatePipe:col().getImage:item()) | async); as imgUrl) {\n <img [class]=\"(item() | LibsUiPipesCallFunctionInTemplatePipe:col().getClassImage:item()) | async\"\n src=\"{{ imgUrl }}\"\n (error)=\"handlerErrorImage($event,col().getImageError)\" />\n }\n @if (item()['fieldColAvatarConfig'+indexRow+colIndex]; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (item()['fieldLabelCol'+indexRow+colIndex]; as labelColFunc) {\n <libs_ui-components-popover type=\"text\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [classInclude]=\"(keySelected() === item()[fieldKey()]) ? (row().classItemSelected || item()['fieldColClass'+indexRow+colIndex] || '') :(item()['fieldColClass'+indexRow+colIndex] || '')\"\n [innerHtml]=\"('fieldLabelCol' | LibsUiPipesCallFunctionInTemplatePipe:labelColFunc:item()) | async\"\n [config]=\"{ zIndex: zIndex() }\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),col().action)\" />\n }\n @if (item()['fieldColPopover'+indexRow+colIndex]; as popover) {\n <libs_ui-components-popover [type]=\"popover.type ?? 'other'\"\n [config]=\"popover?.config\"\n [classInclude]=\"item()['fieldColClass'+indexRow+colIndex]\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),col().action)\">\n <span [class]=\"popover.classInclude || ''\"\n [innerHtml]=\"(popover.dataView ?? popoverIcon) | translate\">\n </span>\n </libs_ui-components-popover>\n }\n @if (item()['fieldColToggle'+indexRow+colIndex]; as toggle) {\n <libs_ui-components-label [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [hasToggle]=\"toggle.hasToggle\"\n [toggleActive]=\"toggle.toggleActive\"\n [toggleDisable]=\"toggle.toggleDisable\"\n [popover]=\"toggle.popover\"\n [classInclude]=\"toggle.classInclude\"\n [labelLeft]=\"toggle.labelLeft\"\n [labelRight]=\"toggle.labelRight\"\n (outSwitchEvent)=\"handlerSelectItem('click',item(),col().action)\" />\n }\n @if (item()['fieldColButton'+indexRow+colIndex]; as button) {\n <libs_ui-components-buttons-button [type]=\"button.type\"\n [classIconLeft]=\"button.classIconLeft\"\n [classIconRight]=\"button.classIconRight\"\n [classLabel]=\"button.classLabel\"\n [iconOnlyType]=\"button.iconOnlyType\"\n [popover]=\"button.popover\"\n [disable]=\"button.disable\"\n [ignorePointerEvent]=\"button.ignorePointerEvent\"\n [classInclude]=\"item()['fieldColClass'+indexRow+colIndex] ?? ' '\"\n [ignoreStopPropagationEvent]=\"false\"\n (outClick)=\"handlerSelectItem('click',item(),col().action)\" />\n }\n @if (item()['fieldBadge'+indexRow+colIndex]; as badge) {\n <libs_ui-components-badge [mode]=\"badge.mode || 'x+'\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [count]=\"badge.count\"\n [maxCount]=\"badge.maxCount || 99\"\n [classCircle]=\"badge.classCircle || 'libs-ui-font-h4r'\" />\n }\n }\n </div>\n }\n </div>\n }\n </div>\n}\n", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["getLastTextAfterSpace", "typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "idGenColor", "textAvatar", "classImageInclude"], outputs: ["outAvatarError"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { 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: LibsUiComponentsLabelComponent, selector: "libs_ui-components-label", inputs: ["iconPopoverClass", "classInclude", "labelLeft", "labelLeftClass", "labelLeftBehindToggleButton", "popover", "required", "buttonsLeft", "disableButtonsLeft", "buttonsRight", "disableButtonsRight", "labelRight", "labelRightClass", "labelRightRequired", "hasToggle", "toggleSize", "toggleActive", "toggleDisable", "description", "descriptionClass", "buttonsDescription", "disableButtonsDescription", "buttonsDescriptionContainerClass", "onlyShowCount", "zIndexPopover", "timerDestroyPopover", "count", "limitLength"], outputs: ["outClickButton", "outSwitchEvent", "outLabelRightClick", "outLabelLeftClick"] }, { kind: "component", type: LibsUiComponentsBadgeComponent, selector: "libs_ui-components-badge", inputs: ["popoverConfig", "active", "count", "mode", "maxCount", "ignoreMarginDefault", "classCircle", "ignoreStopPropagationEvent"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
166
169
  }
167
170
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListRowsComponent, decorators: [{
168
171
  type: Component,
@@ -174,7 +177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
174
177
  LibsUiComponentsLabelComponent,
175
178
  LibsUiComponentsBadgeComponent,
176
179
  LibsUiPipesCallFunctionInTemplatePipe
177
- ], template: "@if (configTemplate() && configItemTextRows(); as configItemTextRows) {\n <div class=\"flex flex-col w-full {{ configTemplate().classRows ?? '' }}\">\n @for (row of configItemTextRows; track $index; let indexRow = $index;) {\n <div [class]=\"row().classRow\">\n @if (row().getImage && ((item() | LibsUiPipesCallFunctionInTemplatePipe:row().getImage:item()) | async); as imgUrl) {\n <img [class]=\"(item() | LibsUiPipesCallFunctionInTemplatePipe:row().getClassImage:item()) | async\"\n src=\"{{ imgUrl }}\"\n (error)=\"handlerErrorImage($event,row().getImageError)\" />\n }\n @if (item()['fieldRowAvatarConfig'+indexRow]; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (fieldKey() && item()['fieldLabelRow'+indexRow]; as labelRow) {\n <libs_ui-components-popover type=\"text\"\n [config]=\"row().getPopoverConfig ? (('popover' | LibsUiPipesCallFunctionInTemplatePipe:row().getPopoverConfig:item()) | async) : { zIndex: zIndex()}\"\n [classInclude]=\"(keySelected() === item()[fieldKey()]) ? (row().classItemSelected || row().classGetValue || '') :(row().classGetValue || '')\"\n [innerHtml]=\"labelRow\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),row().action)\" />\n }\n @if (row().cols?.()?.length) {\n <div [class]=\"row().classCols || 'flex'\"\n [style]=\"item()[item()['fieldRowStylesDynamicCols'+indexRow]]\">\n @for (col of row().cols?.(); track $index; let colIndex = $index) {\n @if (col().getImage && ((item() | LibsUiPipesCallFunctionInTemplatePipe:col().getImage:item()) | async); as imgUrl) {\n <img [class]=\"(item() | LibsUiPipesCallFunctionInTemplatePipe:col().getClassImage:item()) | async\"\n src=\"{{ imgUrl }}\"\n (error)=\"handlerErrorImage($event,col().getImageError)\" />\n }\n @if (item()['fieldColAvatarConfig'+indexRow+colIndex]; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (item()['fieldLabelCol'+indexRow+colIndex]; as labelColFunc) {\n <libs_ui-components-popover type=\"text\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [classInclude]=\"(keySelected() === item()[fieldKey()]) ? (row().classItemSelected || col().classCol || '') :(col().classCol || '')\"\n [innerHtml]=\"('fieldLabelCol' | LibsUiPipesCallFunctionInTemplatePipe:labelColFunc:item()) | async\"\n [config]=\"{ zIndex: zIndex() }\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),col().action)\" />\n }\n @if (item()['fieldColPopover'+indexRow+colIndex]; as popover) {\n <libs_ui-components-popover [type]=\"popover.type ?? 'other'\"\n [config]=\"popover?.config\"\n [classInclude]=\"col().classCol\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),col().action)\">\n <span [class]=\"popover.classInclude || ''\"\n [innerHtml]=\"(popover.dataView ?? popoverIcon) | translate\">\n </span>\n </libs_ui-components-popover>\n }\n @if (item()['fieldColToggle'+indexRow+colIndex]; as toggle) {\n <libs_ui-components-label [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [hasToggle]=\"toggle.hasToggle\"\n [toggleActive]=\"toggle.toggleActive\"\n [toggleDisable]=\"toggle.toggleDisable\"\n [popover]=\"toggle.popover\"\n [classInclude]=\"toggle.classInclude\"\n [labelLeft]=\"toggle.labelLeft\"\n [labelRight]=\"toggle.labelRight\"\n (outSwitchEvent)=\"handlerSelectItem('click',item(),col().action)\" />\n }\n @if (item()['fieldColButton'+indexRow+colIndex]; as button) {\n <libs_ui-components-buttons-button [type]=\"button.type\"\n [classIconLeft]=\"button.classIconLeft\"\n [classIconRight]=\"button.classIconRight\"\n [classLabel]=\"button.classLabel\"\n [iconOnlyType]=\"button.iconOnlyType\"\n [popover]=\"button.popover\"\n [disable]=\"button.disable\"\n [ignorePointerEvent]=\"button.ignorePointerEvent\"\n [classInclude]=\"col().classCol ?? ' '\"\n [ignoreStopPropagationEvent]=\"false\"\n (outClick)=\"handlerSelectItem('click',item(),col().action)\" />\n }\n @if (item()['fieldBadge'+indexRow+colIndex]; as badge) {\n <libs_ui-components-badge [mode]=\"badge.mode || 'x+'\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [count]=\"badge.count\"\n [maxCount]=\"badge.maxCount || 99\"\n [classCircle]=\"badge.classCircle || 'libs-ui-font-h4r'\" />\n }\n }\n </div>\n }\n </div>\n }\n </div>\n}\n" }]
180
+ ], template: "@if (configTemplate() && configItemTextRows(); as configItemTextRows) {\n <div class=\"flex flex-col w-full {{ configTemplate().classRows ?? '' }}\">\n @for (row of configItemTextRows; track $index; let indexRow = $index;) {\n <div [class]=\"row().classRow\">\n @if (row().getImage && ((item() | LibsUiPipesCallFunctionInTemplatePipe:row().getImage:item()) | async); as imgUrl) {\n <img [class]=\"(item() | LibsUiPipesCallFunctionInTemplatePipe:row().getClassImage:item()) | async\"\n src=\"{{ imgUrl }}\"\n (error)=\"handlerErrorImage($event,row().getImageError)\" />\n }\n @if (item()['fieldRowAvatarConfig'+indexRow]; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (fieldKey() && item()['fieldLabelRow'+indexRow]; as labelRow) {\n <libs_ui-components-popover type=\"text\"\n [config]=\"row().getPopoverConfig ? (('popover' | LibsUiPipesCallFunctionInTemplatePipe:row().getPopoverConfig:item()) | async) : { zIndex: zIndex()}\"\n [classInclude]=\"(keySelected() === item()[fieldKey()]) ? (row().classItemSelected || row().classGetValue || '') :(row().classGetValue || '')\"\n [innerHtml]=\"labelRow\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),row().action)\" />\n }\n @if (row().cols?.()?.length) {\n <div [class]=\"row().classCols || 'flex'\"\n [style]=\"item()[item()['fieldRowStylesDynamicCols'+indexRow]]\">\n @for (col of row().cols?.(); track $index; let colIndex = $index) {\n @if (col().getImage && ((item() | LibsUiPipesCallFunctionInTemplatePipe:col().getImage:item()) | async); as imgUrl) {\n <img [class]=\"(item() | LibsUiPipesCallFunctionInTemplatePipe:col().getClassImage:item()) | async\"\n src=\"{{ imgUrl }}\"\n (error)=\"handlerErrorImage($event,col().getImageError)\" />\n }\n @if (item()['fieldColAvatarConfig'+indexRow+colIndex]; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (item()['fieldLabelCol'+indexRow+colIndex]; as labelColFunc) {\n <libs_ui-components-popover type=\"text\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [classInclude]=\"(keySelected() === item()[fieldKey()]) ? (row().classItemSelected || item()['fieldColClass'+indexRow+colIndex] || '') :(item()['fieldColClass'+indexRow+colIndex] || '')\"\n [innerHtml]=\"('fieldLabelCol' | LibsUiPipesCallFunctionInTemplatePipe:labelColFunc:item()) | async\"\n [config]=\"{ zIndex: zIndex() }\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),col().action)\" />\n }\n @if (item()['fieldColPopover'+indexRow+colIndex]; as popover) {\n <libs_ui-components-popover [type]=\"popover.type ?? 'other'\"\n [config]=\"popover?.config\"\n [classInclude]=\"item()['fieldColClass'+indexRow+colIndex]\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n (outChangStageFlagMouse)='handlerChangStageFlagMouse($event)'\n (outEvent)=\"handlerSelectItem($event,item(),col().action)\">\n <span [class]=\"popover.classInclude || ''\"\n [innerHtml]=\"(popover.dataView ?? popoverIcon) | translate\">\n </span>\n </libs_ui-components-popover>\n }\n @if (item()['fieldColToggle'+indexRow+colIndex]; as toggle) {\n <libs_ui-components-label [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [hasToggle]=\"toggle.hasToggle\"\n [toggleActive]=\"toggle.toggleActive\"\n [toggleDisable]=\"toggle.toggleDisable\"\n [popover]=\"toggle.popover\"\n [classInclude]=\"toggle.classInclude\"\n [labelLeft]=\"toggle.labelLeft\"\n [labelRight]=\"toggle.labelRight\"\n (outSwitchEvent)=\"handlerSelectItem('click',item(),col().action)\" />\n }\n @if (item()['fieldColButton'+indexRow+colIndex]; as button) {\n <libs_ui-components-buttons-button [type]=\"button.type\"\n [classIconLeft]=\"button.classIconLeft\"\n [classIconRight]=\"button.classIconRight\"\n [classLabel]=\"button.classLabel\"\n [iconOnlyType]=\"button.iconOnlyType\"\n [popover]=\"button.popover\"\n [disable]=\"button.disable\"\n [ignorePointerEvent]=\"button.ignorePointerEvent\"\n [classInclude]=\"item()['fieldColClass'+indexRow+colIndex] ?? ' '\"\n [ignoreStopPropagationEvent]=\"false\"\n (outClick)=\"handlerSelectItem('click',item(),col().action)\" />\n }\n @if (item()['fieldBadge'+indexRow+colIndex]; as badge) {\n <libs_ui-components-badge [mode]=\"badge.mode || 'x+'\"\n [style]=\"(' ' | LibsUiPipesCallFunctionInTemplatePipe:item()['fieldColStylesDynamic'+indexRow+colIndex]:item()) | async\"\n [count]=\"badge.count\"\n [maxCount]=\"badge.maxCount || 99\"\n [classCircle]=\"badge.classCircle || 'libs-ui-font-h4r'\" />\n }\n }\n </div>\n }\n </div>\n }\n </div>\n}\n" }]
178
181
  }], ctorParameters: () => [] });
179
182
 
180
183
  /* eslint-disable @typescript-eslint/no-explicit-any */
@@ -198,7 +201,6 @@ class LibsUiComponentsListTemplatesComponentAbstract {
198
201
  intervalSetHeightViewPortSubscription;
199
202
  intervalCheckScrollSubscription;
200
203
  /* INPUT */
201
- functionCustomAddDataToStore = input();
202
204
  functionGetItemsAutoAddList = input();
203
205
  paddingLeftItem = input(undefined);
204
206
  maxItemShow = input(0);
@@ -214,6 +216,7 @@ class LibsUiComponentsListTemplatesComponentAbstract {
214
216
  onSetDataStore = input();
215
217
  onUpdateMultiKeySelectedGroup = input();
216
218
  onItemChangeUnSelect = input();
219
+ onUpdateData = input();
217
220
  clickExactly = input();
218
221
  keySelected = model(); // sử dụng cho type radio,text.
219
222
  multiKeySelected = model(); // sử dụng cho type cho phép chọn nhiều.
@@ -262,29 +265,26 @@ class LibsUiComponentsListTemplatesComponentAbstract {
262
265
  }
263
266
  this.processKeyChangeUnSelect(item);
264
267
  });
265
- // this.onSetDataStore()?.pipe(takeUntil(this.onDestroy)).subscribe((data) => {
266
- // this.setDataStore(data)
267
- // });
268
268
  this.onSetHiddenItemByKey()?.pipe(takeUntil(this.onDestroy)).subscribe(this.setHiddenItemByKey.bind(this));
269
269
  this.outFieldKey.emit(getFieldKeyByType(this.config(), this.fieldKeyDefault()));
270
270
  this.onRemoveItems()?.pipe(takeUntil(this.onDestroy)).subscribe(this.removeItems.bind(this));
271
+ this.onUpdateData()?.pipe(takeUntil(this.onDestroy)).subscribe(this.updateData.bind(this));
271
272
  }
272
273
  /* FUNCTIONS */
273
- // protected setDataStore(data: Array<any>) {
274
- // if (!data || !data.length) {
275
- // return;
276
- // }
277
- // if (this.config()?.type === 'checkbox') {
278
- // data.forEach(item => (item.isAddNew = true));
279
- // }
280
- // this.functionCustomAddDataToStore()?.(data, this.store());
281
- // if (!this.functionCustomAddDataToStore()) {
282
- // this.store.update(items => {
283
- // return [...convertObjectToSignal(data), ...items];
284
- // });
285
- // }
286
- // this.processData();
287
- // }
274
+ updateData(data) {
275
+ if (!data) {
276
+ return;
277
+ }
278
+ const { newData, functionCustomAddDataToStore } = data;
279
+ if (!newData || !newData.length) {
280
+ return;
281
+ }
282
+ if (this.config()?.type === 'checkbox') {
283
+ newData.forEach(item => (item.isAddNew = true));
284
+ }
285
+ functionCustomAddDataToStore(newData, this.store);
286
+ this.processData();
287
+ }
288
288
  getFieldKey() {
289
289
  let fieldKey;
290
290
  switch (this.config()?.type) {
@@ -473,6 +473,7 @@ class LibsUiComponentsListTemplatesComponentAbstract {
473
473
  row.cols.forEach(async (col, indexCol) => {
474
474
  const fieldNameCol = `fieldLabelCol${indexRow}${indexCol}`;
475
475
  newItem[fieldNameCol] = col.getValue;
476
+ newItem[`fieldColClass${indexRow}${indexCol}`] = col.getClassCol && col.getClassCol(ref, indexCol);
476
477
  newItem[`fieldColPopover${indexRow}${indexCol}`] = col.getPopover && col.getPopover(ref, indexCol);
477
478
  newItem[`fieldBadge${indexRow}${indexCol}`] = col.getConfigBadge && col.getConfigBadge(ref, indexCol);
478
479
  newItem[`fieldColStylesDynamic${indexRow}${indexCol}`] = col.getStylesDynamicCol;
@@ -499,12 +500,595 @@ class LibsUiComponentsListTemplatesComponentAbstract {
499
500
  this.onDestroy.complete();
500
501
  }
501
502
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTemplatesComponentAbstract, deps: [], target: i0.ɵɵFactoryTarget.Directive });
502
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.2.13", type: LibsUiComponentsListTemplatesComponentAbstract, inputs: { functionCustomAddDataToStore: { classPropertyName: "functionCustomAddDataToStore", publicName: "functionCustomAddDataToStore", isSignal: true, isRequired: false, transformFunction: null }, functionGetItemsAutoAddList: { classPropertyName: "functionGetItemsAutoAddList", publicName: "functionGetItemsAutoAddList", isSignal: true, isRequired: false, transformFunction: null }, paddingLeftItem: { classPropertyName: "paddingLeftItem", publicName: "paddingLeftItem", isSignal: true, isRequired: false, transformFunction: null }, maxItemShow: { classPropertyName: "maxItemShow", publicName: "maxItemShow", isSignal: true, isRequired: false, transformFunction: null }, searchConfig: { classPropertyName: "searchConfig", publicName: "searchConfig", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, keySearch: { classPropertyName: "keySearch", publicName: "keySearch", isSignal: true, isRequired: false, transformFunction: null }, dropdownTabKeyActive: { classPropertyName: "dropdownTabKeyActive", publicName: "dropdownTabKeyActive", isSignal: true, isRequired: false, transformFunction: null }, isSearchOnline: { classPropertyName: "isSearchOnline", publicName: "isSearchOnline", isSignal: true, isRequired: false, transformFunction: null }, onSearch: { classPropertyName: "onSearch", publicName: "onSearch", isSignal: true, isRequired: false, transformFunction: null }, onRefresh: { classPropertyName: "onRefresh", publicName: "onRefresh", isSignal: true, isRequired: false, transformFunction: null }, onSetHiddenItemByKey: { classPropertyName: "onSetHiddenItemByKey", publicName: "onSetHiddenItemByKey", isSignal: true, isRequired: false, transformFunction: null }, onRemoveItems: { classPropertyName: "onRemoveItems", publicName: "onRemoveItems", isSignal: true, isRequired: false, transformFunction: null }, onSetDataStore: { classPropertyName: "onSetDataStore", publicName: "onSetDataStore", isSignal: true, isRequired: false, transformFunction: null }, onUpdateMultiKeySelectedGroup: { classPropertyName: "onUpdateMultiKeySelectedGroup", publicName: "onUpdateMultiKeySelectedGroup", isSignal: true, isRequired: false, transformFunction: null }, onItemChangeUnSelect: { classPropertyName: "onItemChangeUnSelect", publicName: "onItemChangeUnSelect", isSignal: true, isRequired: false, transformFunction: null }, clickExactly: { classPropertyName: "clickExactly", publicName: "clickExactly", isSignal: true, isRequired: false, transformFunction: null }, keySelected: { classPropertyName: "keySelected", publicName: "keySelected", isSignal: true, isRequired: false, transformFunction: null }, multiKeySelected: { classPropertyName: "multiKeySelected", publicName: "multiKeySelected", isSignal: true, isRequired: false, transformFunction: null }, keysDisableItem: { classPropertyName: "keysDisableItem", publicName: "keysDisableItem", isSignal: true, isRequired: false, transformFunction: null }, keysHiddenItem: { classPropertyName: "keysHiddenItem", publicName: "keysHiddenItem", isSignal: true, isRequired: false, transformFunction: null }, disable: { classPropertyName: "disable", publicName: "disable", isSignal: true, isRequired: false, transformFunction: null }, disableLabel: { classPropertyName: "disableLabel", publicName: "disableLabel", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, loadingIconSize: { classPropertyName: "loadingIconSize", publicName: "loadingIconSize", isSignal: true, isRequired: false, transformFunction: null }, resetKeyWhenSelectAllKeyDropdown: { classPropertyName: "resetKeyWhenSelectAllKeyDropdown", publicName: "resetKeyWhenSelectAllKeyDropdown", isSignal: true, isRequired: false, transformFunction: null }, ignoreClassDisableDefaultWhenUseKeysDisableItem: { classPropertyName: "ignoreClassDisableDefaultWhenUseKeysDisableItem", publicName: "ignoreClassDisableDefaultWhenUseKeysDisableItem", isSignal: true, isRequired: false, transformFunction: null }, templateRefSearchNoData: { classPropertyName: "templateRefSearchNoData", publicName: "templateRefSearchNoData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { keySearch: "keySearchChange", keySelected: "keySelectedChange", multiKeySelected: "multiKeySelectedChange", keysHiddenItem: "keysHiddenItemChange", outSortSingleSelect: "outSortSingleSelect", outSelectKey: "outSelectKey", outSelectMultiKey: "outSelectMultiKey", outUnSelectMultiKey: "outUnSelectMultiKey", outFieldKey: "outFieldKey", outChangeView: "outChangeView", outLoading: "outLoading", outChangStageFlagMousePopover: "outChangStageFlagMousePopover", outLoadItemsComplete: "outLoadItemsComplete" }, viewQueries: [{ propertyName: "itemRef", first: true, predicate: ["itemRef"], descendants: true, isSignal: true }], ngImport: i0 });
503
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.2.13", type: LibsUiComponentsListTemplatesComponentAbstract, inputs: { functionGetItemsAutoAddList: { classPropertyName: "functionGetItemsAutoAddList", publicName: "functionGetItemsAutoAddList", isSignal: true, isRequired: false, transformFunction: null }, paddingLeftItem: { classPropertyName: "paddingLeftItem", publicName: "paddingLeftItem", isSignal: true, isRequired: false, transformFunction: null }, maxItemShow: { classPropertyName: "maxItemShow", publicName: "maxItemShow", isSignal: true, isRequired: false, transformFunction: null }, searchConfig: { classPropertyName: "searchConfig", publicName: "searchConfig", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, keySearch: { classPropertyName: "keySearch", publicName: "keySearch", isSignal: true, isRequired: false, transformFunction: null }, dropdownTabKeyActive: { classPropertyName: "dropdownTabKeyActive", publicName: "dropdownTabKeyActive", isSignal: true, isRequired: false, transformFunction: null }, isSearchOnline: { classPropertyName: "isSearchOnline", publicName: "isSearchOnline", isSignal: true, isRequired: false, transformFunction: null }, onSearch: { classPropertyName: "onSearch", publicName: "onSearch", isSignal: true, isRequired: false, transformFunction: null }, onRefresh: { classPropertyName: "onRefresh", publicName: "onRefresh", isSignal: true, isRequired: false, transformFunction: null }, onSetHiddenItemByKey: { classPropertyName: "onSetHiddenItemByKey", publicName: "onSetHiddenItemByKey", isSignal: true, isRequired: false, transformFunction: null }, onRemoveItems: { classPropertyName: "onRemoveItems", publicName: "onRemoveItems", isSignal: true, isRequired: false, transformFunction: null }, onSetDataStore: { classPropertyName: "onSetDataStore", publicName: "onSetDataStore", isSignal: true, isRequired: false, transformFunction: null }, onUpdateMultiKeySelectedGroup: { classPropertyName: "onUpdateMultiKeySelectedGroup", publicName: "onUpdateMultiKeySelectedGroup", isSignal: true, isRequired: false, transformFunction: null }, onItemChangeUnSelect: { classPropertyName: "onItemChangeUnSelect", publicName: "onItemChangeUnSelect", isSignal: true, isRequired: false, transformFunction: null }, onUpdateData: { classPropertyName: "onUpdateData", publicName: "onUpdateData", isSignal: true, isRequired: false, transformFunction: null }, clickExactly: { classPropertyName: "clickExactly", publicName: "clickExactly", isSignal: true, isRequired: false, transformFunction: null }, keySelected: { classPropertyName: "keySelected", publicName: "keySelected", isSignal: true, isRequired: false, transformFunction: null }, multiKeySelected: { classPropertyName: "multiKeySelected", publicName: "multiKeySelected", isSignal: true, isRequired: false, transformFunction: null }, keysDisableItem: { classPropertyName: "keysDisableItem", publicName: "keysDisableItem", isSignal: true, isRequired: false, transformFunction: null }, keysHiddenItem: { classPropertyName: "keysHiddenItem", publicName: "keysHiddenItem", isSignal: true, isRequired: false, transformFunction: null }, disable: { classPropertyName: "disable", publicName: "disable", isSignal: true, isRequired: false, transformFunction: null }, disableLabel: { classPropertyName: "disableLabel", publicName: "disableLabel", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, loadingIconSize: { classPropertyName: "loadingIconSize", publicName: "loadingIconSize", isSignal: true, isRequired: false, transformFunction: null }, resetKeyWhenSelectAllKeyDropdown: { classPropertyName: "resetKeyWhenSelectAllKeyDropdown", publicName: "resetKeyWhenSelectAllKeyDropdown", isSignal: true, isRequired: false, transformFunction: null }, ignoreClassDisableDefaultWhenUseKeysDisableItem: { classPropertyName: "ignoreClassDisableDefaultWhenUseKeysDisableItem", publicName: "ignoreClassDisableDefaultWhenUseKeysDisableItem", isSignal: true, isRequired: false, transformFunction: null }, templateRefSearchNoData: { classPropertyName: "templateRefSearchNoData", publicName: "templateRefSearchNoData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { keySearch: "keySearchChange", keySelected: "keySelectedChange", multiKeySelected: "multiKeySelectedChange", keysHiddenItem: "keysHiddenItemChange", outSortSingleSelect: "outSortSingleSelect", outSelectKey: "outSelectKey", outSelectMultiKey: "outSelectMultiKey", outUnSelectMultiKey: "outUnSelectMultiKey", outFieldKey: "outFieldKey", outChangeView: "outChangeView", outLoading: "outLoading", outChangStageFlagMousePopover: "outChangStageFlagMousePopover", outLoadItemsComplete: "outLoadItemsComplete" }, viewQueries: [{ propertyName: "itemRef", first: true, predicate: ["itemRef"], descendants: true, isSignal: true }], ngImport: i0 });
503
504
  }
504
505
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTemplatesComponentAbstract, decorators: [{
505
506
  type: Directive
506
507
  }], ctorParameters: () => [] });
507
508
 
509
+ /* eslint-disable @typescript-eslint/no-explicit-any */
510
+ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplatesComponentAbstract {
511
+ /* PROPERTY */
512
+ configTemplateCheckbox = signal(undefined);
513
+ ngOnInit() {
514
+ if (isEmpty(this.config()?.configTemplateCheckbox)) {
515
+ return;
516
+ }
517
+ this.configTemplateCheckbox.set(this.config()?.configTemplateCheckbox);
518
+ this.fieldKey.set(this.configTemplateCheckbox()?.fieldKey ?? this.fieldKeyDefault());
519
+ this.callApiByService();
520
+ }
521
+ /* FUNCTIONS */
522
+ async handlerSelect(isSelectAll) {
523
+ if (isSelectAll && this.resetKeyWhenSelectAllKeyDropdown()) {
524
+ this.multiKeySelected.set([]);
525
+ }
526
+ if (!this.multiKeySelected()) {
527
+ this.multiKeySelected.set([]);
528
+ }
529
+ if (this.loading()) {
530
+ return;
531
+ }
532
+ const result = await this.getIdsByService();
533
+ this.processHandlerSelectData(isSelectAll, result.data);
534
+ }
535
+ processHandlerSelectData(isSelectAll, ids) {
536
+ const keysDisable = this.keysDisableItem() || [];
537
+ const keys = new Set(this.multiKeySelected());
538
+ this.multiKeySelected.set([]);
539
+ this.loading.set(false);
540
+ this.outLoading.emit(this.loading());
541
+ if (isSelectAll) {
542
+ if (ids.length) {
543
+ ids.forEach(id => !keysDisable.some(key => key === id) && keys.add(id));
544
+ }
545
+ if (!ids.length) {
546
+ this.items().forEach(item => {
547
+ const key = item()[this.fieldKey()];
548
+ if (!keysDisable.some(keyDisable => keyDisable === key)) {
549
+ keys.add(key);
550
+ }
551
+ });
552
+ }
553
+ this.multiKeySelected.update(items => [...(items || []), ...keys]);
554
+ this.emitSelectMultiKey(this.multiKeySelected() || []);
555
+ return;
556
+ }
557
+ const keyUnSelected = new Set();
558
+ ids.forEach(id => {
559
+ if (!keysDisable.some(key => key === id)) {
560
+ keys.delete(id);
561
+ keyUnSelected.add(id);
562
+ }
563
+ });
564
+ if (!ids.length) {
565
+ this.items().forEach(item => {
566
+ const key = item()[this.fieldKey()];
567
+ if (!keysDisable.some(key => key === key)) {
568
+ keys.delete(key);
569
+ keyUnSelected.add(key);
570
+ }
571
+ });
572
+ }
573
+ this.multiKeySelected.update(items => [...(items || []), ...keys]);
574
+ this.outUnSelectMultiKey.emit(Array.from(keyUnSelected));
575
+ this.outSelectMultiKey.emit({ keys: this.multiKeySelected() || [], mapKeys: [], isClickManual: true });
576
+ }
577
+ async getIdsByService() {
578
+ if (!this.searchConfig() || !this.isSearchOnline()) {
579
+ return { code: 200, data: this.items().map(item => item()[this.fieldKey()]) };
580
+ }
581
+ try {
582
+ if (!this.configTemplateCheckbox()?.httpRequestAllIdSelectOrUnSelect) {
583
+ return { data: [] };
584
+ }
585
+ this.loading.set(true);
586
+ this.outLoading.emit(this.loading());
587
+ const httpRequestAllIdSelectOrUnSelect = this.configTemplateCheckbox()?.httpRequestAllIdSelectOrUnSelect;
588
+ if (!httpRequestAllIdSelectOrUnSelect) {
589
+ return { data: [] };
590
+ }
591
+ const { argumentsValue, guideAutoUpdateArgumentsValue } = httpRequestAllIdSelectOrUnSelect;
592
+ this.httpRequestService.updateArguments(argumentsValue, this.httpRequestService.fakeResponsePagingApi(), {}, this.keySearch(), this.isSearchOnline(), false, guideAutoUpdateArgumentsValue);
593
+ const result = await this.httpRequestService.callApi(httpRequestAllIdSelectOrUnSelect);
594
+ if (!result || !result.data || !result.data.length) {
595
+ return { data: [] };
596
+ }
597
+ return result;
598
+ }
599
+ catch (error) {
600
+ console.log(error);
601
+ return { data: [] };
602
+ }
603
+ }
604
+ handlerScrollBottom() {
605
+ if (this.loadedLastItem()) {
606
+ this.loading.set(false);
607
+ this.outLoading.emit(this.loading());
608
+ return;
609
+ }
610
+ if (this.loading() || this.loadedLastItem()) {
611
+ return;
612
+ }
613
+ this.loading.set(true);
614
+ this.outLoading.emit(this.loading());
615
+ this.callApiByService(false);
616
+ }
617
+ processSearch() {
618
+ if (!this.isSearchOnline()) {
619
+ return this.processData(true);
620
+ }
621
+ this.callApiByService(true);
622
+ }
623
+ processKeyChangeUnSelect(item) {
624
+ if (isNil(item[this.fieldKey()]) || item[this.fieldKey()] === '') {
625
+ return;
626
+ }
627
+ this.checkAndEmitMultiKeySelected(item);
628
+ }
629
+ handlerChange(event, item, ignoreDisable = false, isClickManual = true) {
630
+ if (this.configTemplateCheckbox()?.ignoreClickItemUnChecked) {
631
+ const key = item[this.fieldKey()];
632
+ if (this.multiKeySelected()?.includes(key)) {
633
+ return;
634
+ }
635
+ }
636
+ if (!this.multiKeySelected()) {
637
+ this.multiKeySelected.set([]);
638
+ }
639
+ if (!ignoreDisable && (this.disable() || this.keysDisableItem()?.some(key => key === item[this.fieldKey()]))) {
640
+ return;
641
+ }
642
+ if (event instanceof Event) {
643
+ if (this.clickExactly()) {
644
+ return;
645
+ }
646
+ this.checkAndEmitMultiKeySelected(item, isClickManual);
647
+ return;
648
+ }
649
+ this.checkAndEmitMultiKeySelected(item, isClickManual);
650
+ }
651
+ checkAndEmitMultiKeySelected(item, isClickManual = true) {
652
+ const key = item[this.fieldKey()];
653
+ const indexOfKey = this.multiKeySelected()?.indexOf(key) ?? -1;
654
+ if (indexOfKey < 0) {
655
+ this.multiKeySelected.update(items => [...(items || []), key]);
656
+ this.emitSelectMultiKey(this.multiKeySelected() || [], isClickManual);
657
+ return;
658
+ }
659
+ this.multiKeySelected()?.splice(indexOfKey, 1);
660
+ this.outUnSelectMultiKey.emit([key]);
661
+ this.emitSelectMultiKey(this.multiKeySelected() || [], isClickManual);
662
+ }
663
+ async emitSelectMultiKey(multiKeySelected, isClickManual = true) {
664
+ const mapKeys = new Array();
665
+ if (!multiKeySelected || !multiKeySelected.length) {
666
+ return this.outSelectMultiKey.emit({ keys: [], mapKeys, isClickManual });
667
+ }
668
+ multiKeySelected.forEach((key) => {
669
+ const item = this.store().find(item => item()[this.fieldKey()] === key);
670
+ mapKeys.push({ key, item, isClickManual });
671
+ });
672
+ this.outSelectMultiKey.emit({ keys: this.multiKeySelected() || [], mapKeys, isClickManual });
673
+ }
674
+ processData(replace) {
675
+ const itemByKeySearch = [];
676
+ const keysHidden = this.keysHiddenItem() || [];
677
+ const itemsAddNew = [];
678
+ if (replace) {
679
+ this.items.set([]);
680
+ }
681
+ this.store().forEach((item) => {
682
+ const itemTypeAddNew = item().isAddNew;
683
+ item.update(current => {
684
+ delete current.isAddNew;
685
+ return current;
686
+ });
687
+ const dataStore = cloneDeep(item);
688
+ dataStore.update(currentStore => {
689
+ return { ...currentStore, ref: item() };
690
+ });
691
+ if (this.configTemplateCheckbox()?.getPopover) {
692
+ dataStore.update(currentStore => {
693
+ return { ...currentStore, dataTooltip: this.configTemplateCheckbox()?.getPopover?.(dataStore()) };
694
+ });
695
+ }
696
+ const key = keysHidden.find(key => dataStore()[this.fieldKey()] === key);
697
+ if (key === undefined) {
698
+ const text = deleteUnicode(this.buildValueByConfig(dataStore, this.configTemplateCheckbox())).toLocaleLowerCase();
699
+ const textEscape = escapeHtml(text);
700
+ const keySearch = deleteUnicode(escapeHtml(this.keySearch().toLocaleLowerCase()));
701
+ if (((this.isSearchOnline() && this.config()?.httpRequestData?.serviceName && !this.config()?.httpRequestData?.serviceOther) ||
702
+ (text && (text.includes(keySearch) || textEscape.includes(keySearch)))) && (replace || (!replace && !this.items().find(dataItem => dataItem()[this.fieldKey()] === dataStore()[this.fieldKey()]))) && !itemByKeySearch.find(dataItem => dataItem()[this.fieldKey()] === dataStore()[this.fieldKey()])) {
703
+ dataStore.update(currentStore => {
704
+ return {
705
+ ...currentStore,
706
+ classLabelInclude: this.configTemplateCheckbox()?.getClassItem?.(dataStore()),
707
+ avatarConfig: this.configTemplateCheckbox()?.getAvatarConfig?.(dataStore())
708
+ };
709
+ });
710
+ if (itemTypeAddNew) {
711
+ itemsAddNew.unshift(dataStore);
712
+ return;
713
+ }
714
+ itemByKeySearch.push(dataStore);
715
+ }
716
+ return;
717
+ }
718
+ const indexItemRemove = this.items().findIndex(item => item()[this.fieldKey()] === key);
719
+ if (indexItemRemove > -1) {
720
+ this.items.update(items => {
721
+ items.splice(indexItemRemove, 1);
722
+ return items;
723
+ });
724
+ }
725
+ });
726
+ const checkLoadItem = (preStateHasScroll, currentHasScroll) => {
727
+ if (this.keysHiddenItem()?.length && preStateHasScroll && !currentHasScroll && (this.isSearchOnline())) {
728
+ this.callApiByService(false);
729
+ }
730
+ };
731
+ if (replace) {
732
+ this.items.set(itemByKeySearch);
733
+ this.config()?.sort?.(this.items());
734
+ this.autoSelectFirstItem(this.items());
735
+ this.setHeightViewPort();
736
+ this.checkViewPortScroll(checkLoadItem);
737
+ this.loading.set(false);
738
+ this.outLoading.emit(this.loading());
739
+ this.outLoadItemsComplete.emit({ items: this.items() });
740
+ return;
741
+ }
742
+ this.items.update(items => [...itemsAddNew, ...(items || []), ...itemByKeySearch]);
743
+ this.config()?.sort?.(this.items());
744
+ this.setHeightViewPort();
745
+ this.checkViewPortScroll(checkLoadItem);
746
+ this.loading.set(false);
747
+ this.outLoading.emit(this.loading());
748
+ this.outLoadItemsComplete.emit({ items: this.items() });
749
+ }
750
+ autoSelectFirstItem(items) {
751
+ if (this.multiKeySelected()?.length || !this.config()?.autoSelectFirstItem || !items || !items.length) {
752
+ return;
753
+ }
754
+ this.handlerChange('checkbox', items[0], true, false);
755
+ }
756
+ getLengthItem() {
757
+ return this.items().length;
758
+ }
759
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
760
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListCheckboxComponent, isStandalone: true, selector: "libs_ui-components-list-templates_checkbox", usesInheritance: true, ngImport: i0, template: "@if (configTemplateCheckbox(); as configTemplateCheckbox) {\n <div class=\"flex flex-col w-full h-full\">\n @if (items().length && configTemplateCheckbox.configButtonSelectAndUndSelectItem; as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(true)\" />\n <div class=\"text-[#e6e7ea]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(false)\" />\n </div>\n }\n @if (items().length && configTemplateCheckbox.configCheckboxCheckAll; as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general bg-[#ffffff] pl-[12px] '+(configTemplateCheckbox.classIncludeHasConfigCheckBoxAll ?? 'py-[6px] libs-ui-border-bottom-general')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"(multiKeySelected()?.length && (multiKeySelected()?.length ||0) >= (store().length || -1)) || false\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerSelect($event.checked)\" />\n </div>\n }\n <div #elementScroll\n [class]=\"'relative h-full w-full ' +((!items() || !items().length) ? 'bg-[#ffffff]': configTemplateCheckbox.classListInclude || '')\">\n @if (items() && items().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() && !config()?.ignoreShowDataWhenNotSearch ? heightViewPort()+'px':'100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]; let last = $last) {\n <div [class]=\"last ? (configTemplateCheckbox.classIncludeLastViewItem || '') : ''\">\n <div #itemRef\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [attr.clickExactly]=\"clickExactly\"\n [class]=\"'libs-ui-list-template-checkbox-item flex ' + (configTemplateCheckbox.classItemInclude || '')\"\n [class.w-full]=\"!configTemplateCheckbox.ignoreItemWidth100\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class.pl-[12px]]=\"paddingLeftItem()\"\n [class.py-[6px]]=\"clickExactly()\"\n [class.pr-[4px]]=\"hasScroll() && configTemplateCheckbox.rows\"\n [class.pr-[12px]]=\"!hasScroll() && configTemplateCheckbox.rows\"\n (click)=\"handlerChange($event,item())\">\n <div class=\"flex flex-col w-full\">\n @if (item().fieldLabel) {\n <libs_ui-components-checkbox-single [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [linkImage]=\"configTemplateCheckbox.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImage:item()) | async) : item()[configTemplateCheckbox.fieldGetImage || '']\"\n [linkImageError]=\"configTemplateCheckbox.getImageError ? (('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImageError:item()) | async) : item()[configTemplateCheckbox.fieldGetLinkImageError || '']\"\n [classLabelInclude]=\"item().classLabelInclude || configTemplateCheckbox.classLabelInclude || ''\"\n [zIndexLabel]=\"configTemplateCheckbox.zIndexPopover ?? 1200\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateCheckbox.hasAvatarGroupSocial\"\n [linkImageError]=\"configTemplateCheckbox.fieldGetLinkImageError || ''\"\n [classInclude]=\"configTemplateCheckbox.classInclude || ''\"\n [classImageInclude]=\"configTemplateCheckbox.classIncludeImage || ''\"\n [bullet]=\"item().bullet\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [popover]=\"item().dataPopover\"\n [clickExactly]=\"clickExactly()\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChange('checkbox',item())\" />\n }\n @if (configTemplateCheckbox?.rows) {\n <libs_ui-components-list-templates_rows class=\"{{ !configTemplateCheckbox.ignoreItemWidth100 ? 'w-full' : '' }} {{ configTemplateCheckbox.classRowsWrapper || configTemplateCheckbox.classRows ?? '' }}\"\n [item]=\"item()\"\n [zIndex]=\"zIndex()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined\"\n [configTemplate]=\"configTemplateCheckbox\"\n (outEvent)=\"handlerChange('checkbox',$event.item)\" />\n }\n </div>\n </div>\n </div>\n }\n </virtual-scroller>\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[4px] px-[12px]')\">\n @if (config()?.hasIconNoData && !loading()) {\n <div class=\"mb-[16px]\">\n <div *ngComponentOutlet=\"(keySearch() ? 'no-result' : 'no-data') | LibsUiIconsGetIconComponentPipe | async\"></div>\n </div>\n }\n @if (!keySearch() && !loading()) {\n <span>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <span>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (loading()) {\n <span>&nbsp;</span>\n }\n\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n </div>\n}\n", styles: [".libs-ui-list-template-checkbox-item{padding:6px 0 6px 16px;margin-right:8px;font-size:12px;line-height:18px;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i1.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: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: 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: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "pipe", type: LibsUiIconsGetIconComponentPipe, name: "LibsUiIconsGetIconComponentPipe" }, { kind: "directive", type: LibsUiComponentsListHighlightKeySearchDirective, selector: "[LibsUiComponentsListHighlightKeySearchDirective]", inputs: ["isHighlight", "keySearch", "classHighlight"] }, { kind: "component", type: LibsUiComponentsListRowsComponent, selector: "libs_ui-components-list-templates_rows", inputs: ["configTemplate", "item", "keySelected", "fieldKey", "zIndex"], outputs: ["outChangStageFlagMousePopover", "outEvent"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
761
+ }
762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListCheckboxComponent, decorators: [{
763
+ type: Component,
764
+ args: [{ selector: 'libs_ui-components-list-templates_checkbox', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
765
+ VirtualScrollerModule, NgComponentOutlet, AsyncPipe, TranslateModule, NgTemplateOutlet,
766
+ LibsUiComponentsButtonsButtonComponent,
767
+ LibsUiComponentsCheckboxSingleComponent,
768
+ LibsUiComponentsSpinnerComponent,
769
+ LibsUiComponentsScrollOverlayDirective,
770
+ LibsUiCheckSelectedByKeyPipe,
771
+ LibsUiIconsGetIconComponentPipe,
772
+ LibsUiComponentsListHighlightKeySearchDirective,
773
+ LibsUiComponentsListRowsComponent,
774
+ LibsUiPipesCallFunctionInTemplatePipe
775
+ ], template: "@if (configTemplateCheckbox(); as configTemplateCheckbox) {\n <div class=\"flex flex-col w-full h-full\">\n @if (items().length && configTemplateCheckbox.configButtonSelectAndUndSelectItem; as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(true)\" />\n <div class=\"text-[#e6e7ea]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(false)\" />\n </div>\n }\n @if (items().length && configTemplateCheckbox.configCheckboxCheckAll; as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general bg-[#ffffff] pl-[12px] '+(configTemplateCheckbox.classIncludeHasConfigCheckBoxAll ?? 'py-[6px] libs-ui-border-bottom-general')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"(multiKeySelected()?.length && (multiKeySelected()?.length ||0) >= (store().length || -1)) || false\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerSelect($event.checked)\" />\n </div>\n }\n <div #elementScroll\n [class]=\"'relative h-full w-full ' +((!items() || !items().length) ? 'bg-[#ffffff]': configTemplateCheckbox.classListInclude || '')\">\n @if (items() && items().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() && !config()?.ignoreShowDataWhenNotSearch ? heightViewPort()+'px':'100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]; let last = $last) {\n <div [class]=\"last ? (configTemplateCheckbox.classIncludeLastViewItem || '') : ''\">\n <div #itemRef\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [attr.clickExactly]=\"clickExactly\"\n [class]=\"'libs-ui-list-template-checkbox-item flex ' + (configTemplateCheckbox.classItemInclude || '')\"\n [class.w-full]=\"!configTemplateCheckbox.ignoreItemWidth100\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class.pl-[12px]]=\"paddingLeftItem()\"\n [class.py-[6px]]=\"clickExactly()\"\n [class.pr-[4px]]=\"hasScroll() && configTemplateCheckbox.rows\"\n [class.pr-[12px]]=\"!hasScroll() && configTemplateCheckbox.rows\"\n (click)=\"handlerChange($event,item())\">\n <div class=\"flex flex-col w-full\">\n @if (item().fieldLabel) {\n <libs_ui-components-checkbox-single [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [linkImage]=\"configTemplateCheckbox.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImage:item()) | async) : item()[configTemplateCheckbox.fieldGetImage || '']\"\n [linkImageError]=\"configTemplateCheckbox.getImageError ? (('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImageError:item()) | async) : item()[configTemplateCheckbox.fieldGetLinkImageError || '']\"\n [classLabelInclude]=\"item().classLabelInclude || configTemplateCheckbox.classLabelInclude || ''\"\n [zIndexLabel]=\"configTemplateCheckbox.zIndexPopover ?? 1200\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateCheckbox.hasAvatarGroupSocial\"\n [linkImageError]=\"configTemplateCheckbox.fieldGetLinkImageError || ''\"\n [classInclude]=\"configTemplateCheckbox.classInclude || ''\"\n [classImageInclude]=\"configTemplateCheckbox.classIncludeImage || ''\"\n [bullet]=\"item().bullet\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [popover]=\"item().dataPopover\"\n [clickExactly]=\"clickExactly()\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChange('checkbox',item())\" />\n }\n @if (configTemplateCheckbox?.rows) {\n <libs_ui-components-list-templates_rows class=\"{{ !configTemplateCheckbox.ignoreItemWidth100 ? 'w-full' : '' }} {{ configTemplateCheckbox.classRowsWrapper || configTemplateCheckbox.classRows ?? '' }}\"\n [item]=\"item()\"\n [zIndex]=\"zIndex()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined\"\n [configTemplate]=\"configTemplateCheckbox\"\n (outEvent)=\"handlerChange('checkbox',$event.item)\" />\n }\n </div>\n </div>\n </div>\n }\n </virtual-scroller>\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[4px] px-[12px]')\">\n @if (config()?.hasIconNoData && !loading()) {\n <div class=\"mb-[16px]\">\n <div *ngComponentOutlet=\"(keySearch() ? 'no-result' : 'no-data') | LibsUiIconsGetIconComponentPipe | async\"></div>\n </div>\n }\n @if (!keySearch() && !loading()) {\n <span>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <span>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (loading()) {\n <span>&nbsp;</span>\n }\n\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n </div>\n}\n", styles: [".libs-ui-list-template-checkbox-item{padding:6px 0 6px 16px;margin-right:8px;font-size:12px;line-height:18px;position:relative}\n"] }]
776
+ }] });
777
+
778
+ /* eslint-disable @typescript-eslint/no-explicit-any */
779
+ class LibsUiComponentsListRadioComponent extends LibsUiComponentsListTemplatesComponentAbstract {
780
+ /* PROPERTY */
781
+ configTemplateRadio = signal(undefined);
782
+ /* VIEW CHILD */
783
+ virtualScrollerComponent = viewChild(VirtualScrollerComponent);
784
+ ngOnInit() {
785
+ if (isEmpty(this.config()?.configTemplateRadio)) {
786
+ return;
787
+ }
788
+ super.ngOnInit();
789
+ this.configTemplateRadio.set(this.config()?.configTemplateRadio);
790
+ this.fieldKey.set(this.configTemplateRadio()?.fieldKey ?? this.fieldKeyDefault());
791
+ this.callApiByService();
792
+ }
793
+ /* FUNCTIONS */
794
+ handlerScrollBottom() {
795
+ if (this.loadedLastItem()) {
796
+ this.loading.set(false);
797
+ this.outLoading.emit(this.loading());
798
+ return;
799
+ }
800
+ if (this.loading() || this.loadedLastItem()) {
801
+ return;
802
+ }
803
+ this.loading.set(true);
804
+ this.outLoading.emit(this.loading());
805
+ this.callApiByService(false);
806
+ }
807
+ processSearch() {
808
+ if (!this.isSearchOnline()) {
809
+ return this.processData(true);
810
+ }
811
+ this.callApiByService(true);
812
+ }
813
+ processKeyChangeUnSelect(item) {
814
+ if (isNil(item[this.fieldKey()]) || item[this.fieldKey()] === '' || this.keySelected() !== item[this.fieldKey()]) {
815
+ return;
816
+ }
817
+ this.keySelected.set('');
818
+ this.outSelectKey.emit(undefined);
819
+ }
820
+ handlerChange(event, item, ignoreDisable, isClickManual = true) {
821
+ if (!item) {
822
+ return;
823
+ }
824
+ if (this.disable() && !ignoreDisable) {
825
+ return;
826
+ }
827
+ if (event instanceof Event) {
828
+ if (this.clickExactly()) {
829
+ return;
830
+ }
831
+ event.stopPropagation();
832
+ this.keySelected.set(item[this.fieldKey()]);
833
+ this.outSelectKey.emit({ key: this.keySelected(), item, isClickManual });
834
+ return;
835
+ }
836
+ this.keySelected.set(item[this.fieldKey()]);
837
+ this.outSelectKey.emit({ key: this.keySelected(), item, isClickManual });
838
+ }
839
+ processData(replace) {
840
+ const itemByKeySearch = [];
841
+ const keysHidden = this.keysHiddenItem() || [];
842
+ if (replace) {
843
+ this.items.set([]);
844
+ }
845
+ this.store().forEach((item) => {
846
+ const dataStore = cloneDeep(item);
847
+ dataStore.update(store => { return { ...store, ref: item() }; });
848
+ const key = keysHidden.find(key => dataStore()[this.fieldKey()] === key);
849
+ if (key === undefined) {
850
+ const text = deleteUnicode(this.buildValueByConfig(dataStore, this.configTemplateRadio())).toLocaleLowerCase();
851
+ const textEscape = escapeHtml(text);
852
+ const keySearch = deleteUnicode(escapeHtml(this.keySearch().toLocaleLowerCase()));
853
+ if (((this.isSearchOnline() && this.config()?.httpRequestData?.serviceName && !this.config()?.httpRequestData?.serviceOther) ||
854
+ (text && (text.includes(keySearch) || textEscape.includes(keySearch)))) && (replace || (!replace && !this.items().find(dataItem => dataItem()[this.fieldKey()] === dataStore()[this.fieldKey()]))) && !itemByKeySearch.find(dataItem => dataItem()[this.fieldKey()] === dataStore()[this.fieldKey()])) {
855
+ if (this.configTemplateRadio()?.getPopover) {
856
+ dataStore.update(currentStore => {
857
+ return { ...currentStore, dataTooltip: this.configTemplateRadio()?.getPopover?.(dataStore) };
858
+ });
859
+ }
860
+ dataStore.update(currentStore => {
861
+ return {
862
+ ...currentStore,
863
+ classLabelInclude: this.configTemplateRadio()?.getClassItem?.(dataStore()),
864
+ avatarConfig: this.configTemplateRadio()?.getAvatarConfig?.(dataStore())
865
+ };
866
+ });
867
+ itemByKeySearch.push(dataStore);
868
+ }
869
+ return;
870
+ }
871
+ const indexItemRemove = this.items().findIndex(item => item()[this.fieldKey()] === key);
872
+ if (indexItemRemove > -1) {
873
+ this.items.update(items => {
874
+ items.splice(indexItemRemove, 1);
875
+ return items;
876
+ });
877
+ }
878
+ });
879
+ const checkLoadItem = (preStateHasScroll, currentHasScroll) => {
880
+ if (this.keysHiddenItem()?.length && preStateHasScroll && !currentHasScroll && (this.isSearchOnline())) {
881
+ this.callApiByService(false);
882
+ }
883
+ };
884
+ if (replace) {
885
+ this.items.set(itemByKeySearch);
886
+ this.config()?.sort?.(this.items());
887
+ this.emitKeySelectedDefaultIfExistItem(this.items());
888
+ this.autoSelectFirstItem(this.items());
889
+ this.setHeightViewPort();
890
+ this.loading.set(false);
891
+ this.outLoading.emit(this.loading());
892
+ this.outLoadItemsComplete.emit({ items: this.items(), paging: this.pagingStore() });
893
+ this.checkViewPortScroll(checkLoadItem);
894
+ this.scrollToItemSelected();
895
+ return;
896
+ }
897
+ this.items.update(items => [...(items || []), ...itemByKeySearch]);
898
+ this.config()?.sort?.(this.items());
899
+ this.setHeightViewPort();
900
+ this.loading.set(false);
901
+ this.outLoading.emit(this.loading());
902
+ this.outLoadItemsComplete.emit({ items: this.items(), paging: this.pagingStore() });
903
+ this.checkViewPortScroll(checkLoadItem);
904
+ this.scrollToItemSelected();
905
+ }
906
+ scrollToItemSelected() {
907
+ if (!this.configTemplateRadio()?.autoScrollToItemSelected) {
908
+ return;
909
+ }
910
+ clearTimeout(this.timeAutoScrollItemSelected());
911
+ this.timeAutoScrollItemSelected.set(setTimeout(() => {
912
+ if (!this.keySelected) {
913
+ return;
914
+ }
915
+ const index = this.items().findIndex(item => item()[this.fieldKey()] === this.keySelected());
916
+ if (index !== -1) {
917
+ this.virtualScrollerComponent()?.scrollToIndex(index);
918
+ }
919
+ }));
920
+ }
921
+ autoSelectFirstItem(items) {
922
+ if (this.keySelected() || !this.config()?.autoSelectFirstItem || !items || !items.length) {
923
+ return;
924
+ }
925
+ this.handlerChange('radio', items[0], true, false);
926
+ }
927
+ emitKeySelectedDefaultIfExistItem(items) {
928
+ const item = items.find(store => store()[this.fieldKey()] === this.keySelected());
929
+ if (item) {
930
+ this.handlerChange('radio', item, true, false);
931
+ }
932
+ }
933
+ getLengthItem() {
934
+ return this.items().length;
935
+ }
936
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
937
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListRadioComponent, isStandalone: true, selector: "libs_ui-components-list-templates_radio", viewQueries: [{ propertyName: "virtualScrollerComponent", first: true, predicate: VirtualScrollerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (configTemplateRadio(); as configTemplateRadio) {\n <div class=\"relative h-full w-full\">\n @if (items().length) {\n <div #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\"\n (moScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"'libs-ui-list-template-radio-item flex ' + (configTemplateRadio.classItemInclude || '')\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class.pl-[12px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.py-[2px]]=\"clickExactly()\"\n (click)=\"handlerChange($event,item())\">\n <div class=\"flex flex-col w-full\">\n @if (item().fieldLabel) {\n <libs_ui-components-radio-single [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [active]=\"keySelected() === item()[fieldKey()]\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateRadio.hasAvatarGroupSocial\"\n [linkImage]=\"configTemplateRadio.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateRadio.getImageError ? configTemplateRadio.getImageError : configTemplateRadio.getImage):item()) | async) : item()[configTemplateRadio.fieldGetImage || '']\"\n [classImageInclude]=\"configTemplateRadio.classIncludeImage || ''\"\n [bullet]=\"item().bullet\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [classLabelInclude]=\"item().classLabelInclude || ''\"\n [popover]=\"item().dataPopover\"\n [clickExactly]=\"clickExactly()\"\n [disableLabel]=\"disableLabel()\"\n [zIndexLabel]=\"configTemplateRadio.zIndexPopover ?? 1200\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChange('radio',item())\" />\n }\n @if (configTemplateRadio?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateRadio.classRows ?? '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateRadio\"\n (outEvent)=\"handlerChange('radio',$event.item)\" />\n }\n </div>\n </div>\n }\n </virtual-scroller>\n </div>\n }\n @if (items().length) {\n <div [class]=\"'libs-ui-font-h4r text-[#c1c1c1] '+ (config()?.textNoDataClassInclude ?? 'py-[4px] px-[12px]')\">\n @if (!keySearch() && !loading()) {\n <span>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <span>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (loading()) {\n <span>&nbsp;</span>\n }\n </div>\n }\n\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n}\n", styles: [".libs-ui-list-template-radio-item{padding:4px 22px 4px 1px;font-size:12px;line-height:18px;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i1.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: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "component", type: LibsUiComponentsRadioSingleComponent, selector: "libs_ui-components-radio-single", inputs: ["key", "active", "classInclude", "label", "labelInterpolateParams", "ignorePopoverLabe", "classLabelInclude", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "popover", "disable", "disableLabel", "clickExactly", "typeRadio", "ignoreRadio", "zIndexLabel", "classIncludeIcon"], outputs: ["activeChange", "outClickLabel", "outChange", "outChangStageFlagMousePopover"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "component", type: LibsUiComponentsListRowsComponent, selector: "libs_ui-components-list-templates_rows", inputs: ["configTemplate", "item", "keySelected", "fieldKey", "zIndex"], outputs: ["outChangStageFlagMousePopover", "outEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
938
+ }
939
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListRadioComponent, decorators: [{
940
+ type: Component,
941
+ args: [{ selector: 'libs_ui-components-list-templates_radio', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
942
+ VirtualScrollerModule, AsyncPipe, TranslateModule, NgTemplateOutlet,
943
+ LibsUiComponentsSpinnerComponent,
944
+ LibsUiComponentsScrollOverlayDirective,
945
+ LibsUiComponentsRadioSingleComponent,
946
+ LibsUiPipesCallFunctionInTemplatePipe,
947
+ LibsUiCheckSelectedByKeyPipe,
948
+ LibsUiComponentsListRowsComponent
949
+ ], template: "@if (configTemplateRadio(); as configTemplateRadio) {\n <div class=\"relative h-full w-full\">\n @if (items().length) {\n <div #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\"\n (moScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"'libs-ui-list-template-radio-item flex ' + (configTemplateRadio.classItemInclude || '')\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class.pl-[12px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.py-[2px]]=\"clickExactly()\"\n (click)=\"handlerChange($event,item())\">\n <div class=\"flex flex-col w-full\">\n @if (item().fieldLabel) {\n <libs_ui-components-radio-single [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [active]=\"keySelected() === item()[fieldKey()]\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateRadio.hasAvatarGroupSocial\"\n [linkImage]=\"configTemplateRadio.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateRadio.getImageError ? configTemplateRadio.getImageError : configTemplateRadio.getImage):item()) | async) : item()[configTemplateRadio.fieldGetImage || '']\"\n [classImageInclude]=\"configTemplateRadio.classIncludeImage || ''\"\n [bullet]=\"item().bullet\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [classLabelInclude]=\"item().classLabelInclude || ''\"\n [popover]=\"item().dataPopover\"\n [clickExactly]=\"clickExactly()\"\n [disableLabel]=\"disableLabel()\"\n [zIndexLabel]=\"configTemplateRadio.zIndexPopover ?? 1200\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChange('radio',item())\" />\n }\n @if (configTemplateRadio?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateRadio.classRows ?? '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateRadio\"\n (outEvent)=\"handlerChange('radio',$event.item)\" />\n }\n </div>\n </div>\n }\n </virtual-scroller>\n </div>\n }\n @if (items().length) {\n <div [class]=\"'libs-ui-font-h4r text-[#c1c1c1] '+ (config()?.textNoDataClassInclude ?? 'py-[4px] px-[12px]')\">\n @if (!keySearch() && !loading()) {\n <span>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <span>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (loading()) {\n <span>&nbsp;</span>\n }\n </div>\n }\n\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n}\n", styles: [".libs-ui-list-template-radio-item{padding:4px 22px 4px 1px;font-size:12px;line-height:18px;position:relative}\n"] }]
950
+ }] });
951
+
952
+ /* eslint-disable @typescript-eslint/no-explicit-any */
953
+ class LibsUiComponentsListTagComponent extends LibsUiComponentsListTemplatesComponentAbstract {
954
+ /* PROPERTY */
955
+ configTemplateTag = signal(undefined);
956
+ ngOnInit() {
957
+ if (!this.config()?.configTemplateTag) {
958
+ return;
959
+ }
960
+ super.ngOnInit();
961
+ this.configTemplateTag.set(this.config()?.configTemplateTag);
962
+ this.fieldKey.set(this.configTemplateTag()?.fieldKey ?? this.fieldKeyDefault());
963
+ this.callApiByService();
964
+ }
965
+ /* FUNCTIONS */
966
+ handlerSelectItem(e, item) {
967
+ if (e instanceof Event) {
968
+ e.stopPropagation();
969
+ e.preventDefault();
970
+ }
971
+ if (!item || (this.keysDisableItem() && this.keysDisableItem()?.some(key => key === item[this.fieldKey()]))) {
972
+ return;
973
+ }
974
+ const key = item[this.fieldKey()];
975
+ const indexOfKey = this.multiKeySelected()?.indexOf(key) ?? -1;
976
+ if (indexOfKey < 0) {
977
+ this.multiKeySelected.update(items => [...(items || []), key]);
978
+ this.emitMoSelectMultiKey(this.multiKeySelected() || []);
979
+ return;
980
+ }
981
+ this.multiKeySelected.update(items => {
982
+ items?.splice(indexOfKey, 1);
983
+ return items;
984
+ });
985
+ this.outUnSelectMultiKey.emit([key]);
986
+ this.emitMoSelectMultiKey(this.multiKeySelected() || []);
987
+ }
988
+ async emitMoSelectMultiKey(multiKeySelected, isClickManual = true) {
989
+ const mapKeys = new Array();
990
+ if (!multiKeySelected || !multiKeySelected.length) {
991
+ return this.outSelectMultiKey.emit({ keys: [], mapKeys, isClickManual });
992
+ }
993
+ multiKeySelected.forEach((key) => {
994
+ const item = this.store().find(item => item()[this.fieldKey()] === key);
995
+ mapKeys.push({ key, item, isClickManual });
996
+ });
997
+ this.outSelectMultiKey.emit({ keys: this.multiKeySelected() || [], mapKeys, isClickManual });
998
+ }
999
+ handlerScrollBottom() {
1000
+ if (this.loadedLastItem()) {
1001
+ this.loading.set(false);
1002
+ this.outLoading.emit(this.loading());
1003
+ return;
1004
+ }
1005
+ if (this.loading() || this.loadedLastItem()) {
1006
+ return;
1007
+ }
1008
+ this.loading.set(true);
1009
+ this.outLoading.emit(this.loading());
1010
+ this.callApiByService(false);
1011
+ }
1012
+ processSearch() {
1013
+ this.callApiByService(true);
1014
+ }
1015
+ processData(replace) {
1016
+ const itemByKeySearch = [];
1017
+ const keysHidden = this.keysHiddenItem() || [];
1018
+ if (replace) {
1019
+ this.items.set([]);
1020
+ }
1021
+ this.store().forEach((item) => {
1022
+ const dataStore = cloneDeep(item);
1023
+ dataStore.update(currentStore => {
1024
+ return { ...currentStore, ref: item() };
1025
+ });
1026
+ const key = keysHidden.find(key => dataStore()[this.fieldKey()] === key);
1027
+ if (key === undefined) {
1028
+ const text = this.buildValueByConfig(dataStore, this.configTemplateTag());
1029
+ if (text && deleteUnicode(text.toLocaleLowerCase()).includes(deleteUnicode(this.keySearch().toLocaleLowerCase())) && !this.items().find(dataItem => dataItem()[this.fieldKey()] === dataStore()[this.fieldKey()])) {
1030
+ itemByKeySearch.push(dataStore);
1031
+ dataStore.update(currentStore => {
1032
+ return {
1033
+ ...currentStore,
1034
+ classItem: item().classItem || this.configTemplateTag()?.getClassItem?.(dataStore())
1035
+ };
1036
+ });
1037
+ }
1038
+ return;
1039
+ }
1040
+ const indexItemRemove = this.items().findIndex(item => item()[this.fieldKey()] === key);
1041
+ if (indexItemRemove > -1) {
1042
+ this.items.update(items => {
1043
+ items.splice(indexItemRemove, 1);
1044
+ return items;
1045
+ });
1046
+ }
1047
+ });
1048
+ const checkLoadItem = (preStateHasScroll, currentHasScroll) => {
1049
+ if (this.keysHiddenItem()?.length && preStateHasScroll && !currentHasScroll && (this.isSearchOnline())) {
1050
+ this.callApiByService(false);
1051
+ }
1052
+ };
1053
+ if (replace) {
1054
+ this.items.set(itemByKeySearch);
1055
+ this.config()?.sort?.(this.items());
1056
+ this.setHeightViewPort();
1057
+ this.checkViewPortScroll(checkLoadItem);
1058
+ this.loading.set(false);
1059
+ this.outLoading.emit(this.loading());
1060
+ return;
1061
+ }
1062
+ this.items.update(items => [...(items || []), ...itemByKeySearch]);
1063
+ this.config()?.sort?.(this.items());
1064
+ this.setHeightViewPort();
1065
+ this.checkViewPortScroll(checkLoadItem);
1066
+ this.loading.set(false);
1067
+ this.outLoading.emit(this.loading());
1068
+ }
1069
+ getLengthItem() {
1070
+ return this.items().length;
1071
+ }
1072
+ processKeyChangeUnSelect(item) {
1073
+ if (isNil(item[this.fieldKey()]) || item[this.fieldKey()] === '' || this.keySelected() !== item[this.fieldKey()]) {
1074
+ return;
1075
+ }
1076
+ this.keySelected.set('');
1077
+ this.outSelectKey.emit(undefined);
1078
+ }
1079
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTagComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1080
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListTagComponent, isStandalone: true, selector: "libs_ui-components-list-templates_tag", usesInheritance: true, ngImport: i0, template: "@if (configTemplateTag(); as configTemplateTag) {\n <div class=\"w-full h-full relative\"\n LibsUiComponentsScrollOverlayDirective\n (moScrollBottom)=\"handlerScrollBottom()\">\n <div class=\"relative max-h-[150px] h-full {{ configTemplateTag.classIncludeContainer }}\"\n [ngClass]=\"{'flex flex-wrap': !configTemplateTag.ignoreItemFlexWrap}\"\n [class.min-h-[45px]]=\"!loading() && (!items() || !items().length)\"\n [class.min-h-[104px]]=\"loading() && items()\">\n @for (item of items(); track item()[fieldKey()]) {\n <div [class.libs-ui-disable]=\"loading() || disable()\"\n [class.pointer-events-none]=\"loading() || disable()\"\n [class]=\"item().classContainerItem\">\n @if (!item().bullet) {\n <div (click)=\"handlerSelectItem($event, item())\"\n [class]=\"item().classItem || 'rounded-[20px] mb-[8px] mr-[8px] py-[4px] px-[8px] flex items-center cursor-pointer'\"\n [class.bg-[#e9f1fe]]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\"\n [class.libs-ui-color-global]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\">\n @if (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) {\n <div class=\"mr-[8px] text-[12px] libs-ui-icon-check libs-ui-color-global\"></div>\n }\n <span class=\"mo-lib-font-h6r\"\n [innerHTML]=\"item().fieldLabel\"></span>\n </div>\n }\n @if (item().bullet) {\n <div [class]=\"item().classItem || 'rounded-[10px] px-[8px] py-[1px] mb-[8px] mr-[8px]'\"\n [class.w-max]=\"configTemplateTag?.ignoreItemFlexWrap\"\n [style.background-color]=\"item().bullet?.backgroundColor\"\n [style.color]=\"item().bullet?.color\"\n (click)=\"handlerSelectItem($event,item())\">\n <span [innerHTML]=\"item().fieldLabel\"></span>\n </div>\n }\n </div>\n }\n @if (!items() || !items().length) {\n <div [class]=\"'libs-ui-font-h4r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[4px]')\">\n @if (!keySearch() && !loading()) {\n <ng-container>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</ng-container>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</ng-container>\n }\n @if (loading()) {\n <ng-container>&nbsp;</ng-container>\n }\n </div>\n }\n </div>\n @if (loading()) {\n <div class=\"w-full h-full absolute top-0\">\n <libs_ui-components-spinner [size]=\"'medium'\" />\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1081
+ }
1082
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTagComponent, decorators: [{
1083
+ type: Component,
1084
+ args: [{ selector: 'libs_ui-components-list-templates_tag', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
1085
+ VirtualScrollerModule, NgTemplateOutlet, TranslateModule, NgClass,
1086
+ LibsUiComponentsSpinnerComponent,
1087
+ LibsUiComponentsScrollOverlayDirective,
1088
+ LibsUiCheckSelectedByKeyPipe
1089
+ ], template: "@if (configTemplateTag(); as configTemplateTag) {\n <div class=\"w-full h-full relative\"\n LibsUiComponentsScrollOverlayDirective\n (moScrollBottom)=\"handlerScrollBottom()\">\n <div class=\"relative max-h-[150px] h-full {{ configTemplateTag.classIncludeContainer }}\"\n [ngClass]=\"{'flex flex-wrap': !configTemplateTag.ignoreItemFlexWrap}\"\n [class.min-h-[45px]]=\"!loading() && (!items() || !items().length)\"\n [class.min-h-[104px]]=\"loading() && items()\">\n @for (item of items(); track item()[fieldKey()]) {\n <div [class.libs-ui-disable]=\"loading() || disable()\"\n [class.pointer-events-none]=\"loading() || disable()\"\n [class]=\"item().classContainerItem\">\n @if (!item().bullet) {\n <div (click)=\"handlerSelectItem($event, item())\"\n [class]=\"item().classItem || 'rounded-[20px] mb-[8px] mr-[8px] py-[4px] px-[8px] flex items-center cursor-pointer'\"\n [class.bg-[#e9f1fe]]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\"\n [class.libs-ui-color-global]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\">\n @if (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) {\n <div class=\"mr-[8px] text-[12px] libs-ui-icon-check libs-ui-color-global\"></div>\n }\n <span class=\"mo-lib-font-h6r\"\n [innerHTML]=\"item().fieldLabel\"></span>\n </div>\n }\n @if (item().bullet) {\n <div [class]=\"item().classItem || 'rounded-[10px] px-[8px] py-[1px] mb-[8px] mr-[8px]'\"\n [class.w-max]=\"configTemplateTag?.ignoreItemFlexWrap\"\n [style.background-color]=\"item().bullet?.backgroundColor\"\n [style.color]=\"item().bullet?.color\"\n (click)=\"handlerSelectItem($event,item())\">\n <span [innerHTML]=\"item().fieldLabel\"></span>\n </div>\n }\n </div>\n }\n @if (!items() || !items().length) {\n <div [class]=\"'libs-ui-font-h4r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[4px]')\">\n @if (!keySearch() && !loading()) {\n <ng-container>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</ng-container>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</ng-container>\n }\n @if (loading()) {\n <ng-container>&nbsp;</ng-container>\n }\n </div>\n }\n </div>\n @if (loading()) {\n <div class=\"w-full h-full absolute top-0\">\n <libs_ui-components-spinner [size]=\"'medium'\" />\n </div>\n }\n </div>\n}\n" }]
1090
+ }] });
1091
+
508
1092
  /* eslint-disable @typescript-eslint/no-explicit-any */
509
1093
  class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesComponentAbstract {
510
1094
  /* PROPERTY */
@@ -554,7 +1138,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
554
1138
  this.keySelected.set('');
555
1139
  this.outSelectKey.emit(undefined);
556
1140
  }
557
- handlerSelectItem(e, item, action, ignoreDisable = false) {
1141
+ handlerSelectItem(e, item, action, ignoreDisable = false, isClickManual = true) {
558
1142
  if (e instanceof Event) {
559
1143
  e.stopPropagation();
560
1144
  e.preventDefault();
@@ -596,7 +1180,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
596
1180
  this.outSortSingleSelect.emit(this.configTemplateText()?.itemSort || newSort);
597
1181
  }
598
1182
  this.keySelected.set(item[this.fieldKey()]);
599
- this.outSelectKey.emit({ key: this.keySelected(), item, isClickManual: true });
1183
+ this.outSelectKey.emit({ key: this.keySelected(), item, isClickManual });
600
1184
  }
601
1185
  handlerSort(itemSort) {
602
1186
  itemSort.reset = () => 0;
@@ -620,7 +1204,6 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
620
1204
  dataStore.update(store => { return { ...store, ref: item() }; });
621
1205
  if (key === undefined) {
622
1206
  const text = deleteUnicode(this.buildValueByConfig(dataStore, this.configTemplateText())).toLocaleLowerCase();
623
- // console.log(text, dataStore());
624
1207
  const textEscape = escapeHtml(text);
625
1208
  const keySearch = deleteUnicode(escapeHtml(this.keySearch().toLocaleLowerCase()));
626
1209
  if (((this.isSearchOnline() && this.config()?.httpRequestData?.serviceName && !this.config()?.httpRequestData?.serviceOther) ||
@@ -688,7 +1271,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
688
1271
  if (!this.keySelected()) {
689
1272
  return;
690
1273
  }
691
- const index = this.items().findIndex(item => item()[this.fieldKey()] === this.keySelected);
1274
+ const index = this.items().findIndex(item => item()[this.fieldKey()] === this.keySelected());
692
1275
  if (index !== -1) {
693
1276
  this.virtualScrollerComponent()?.scrollToIndex(index);
694
1277
  }
@@ -698,12 +1281,12 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
698
1281
  if (this.keySelected() || !this.config()?.autoSelectFirstItem || !items || !items.length) {
699
1282
  return;
700
1283
  }
701
- this.handlerSelectItem('click', items[0](), undefined, true);
1284
+ this.handlerSelectItem('click', items[0](), undefined, true, false);
702
1285
  }
703
1286
  emitKeySelectedDefaultIfExistItem(items) {
704
1287
  const item = items.find(store => store()[this.fieldKey()] === this.keySelected());
705
1288
  if (item) {
706
- this.handlerSelectItem('click', item(), undefined, true);
1289
+ this.handlerSelectItem('click', item(), undefined, true, false);
707
1290
  }
708
1291
  }
709
1292
  getLengthItem() {
@@ -714,7 +1297,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
714
1297
  item.specific_loadImgError = true;
715
1298
  }
716
1299
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
717
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListTextComponent, isStandalone: true, selector: "libs_ui-components-list-templates_text", viewQueries: [{ propertyName: "virtualScrollerComponent", first: true, predicate: VirtualScrollerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <div #elementScroll\n [style.height]=\"!configTemplateText.notUseVirtualScroll && heightViewPort() && (!config()?.ignoreShowDataWhenNotSearch || (config()?.ignoreShowDataWhenNotSearch && config()?.ignoreFixHeightShowDataWhenNotSearch)) ? heightViewPort()+'px':'100%'\"\n class=\"w-full\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:scroll.viewPortItems}' />\n </virtual-scroller>\n }\n @if (configTemplateText.notUseVirtualScroll) {\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:items()}' />\n }\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[6px] px-[16px]')\">\n @if (!keySearch() && !loading()) {\n {{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\"></ng-container>\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n {{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}\n }\n @if (loading()) {\n &nbsp;\n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"loadingIconSize() || 'medium'\" />\n }\n </div>\n <ng-template #listRef\n let-itemsView='itemsView'>\n @for (item of itemsView; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item flex '+(item().classItem || '')\"\n [class.items-center]=\"!item().itemAlignStart\"\n [class.items-start]=\"item().itemAlignStart\"\n [class.libs-ui-bg-list-hover-danger]=\"!clickExactly() && item().hoverDanger\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly() && !item().hoverDanger\"\n [class.libs-ui-bg-list-selected]=\"!clickExactly() && keySelected() === item()[fieldKey()]\"\n [class.pl-[16px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.libs-ui-bg-list-hover-ffffff]=\"item().disable\"\n [class.cursor-default]=\"item().disable\"\n [class.py-[2px]]=\"clickExactly()\"\n [class.pr-[48px]]=\"keySelected() === item()[fieldKey()] && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort)&& !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{'pointer-events-none libs-ui-disable':loading() || disable() || ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem())}\"\n (click)=\"handlerClickRelative($event,item())\">\n @if (item().bullet) {\n <span class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.background-color]=\"item().bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event,item())\">\n </span>\n }\n\n @if (item().avatarConfig; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [classImageInclude]=\"avatarConfig.classImageInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [classImageInclude]=\"avatarConfig.classImageInclude\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"configTemplateText.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage):item()) | async) : item()[configTemplateText.fieldGetImage || '']\"\n [class]=\"'libs-ui-list-template-text-item-avatar ' + (configTemplateText.classIncludeImage ?? '')\"\n [class.w-[18px]]=\"configTemplateText.imgTypeIcon\"\n [class.h-[18px]]=\"configTemplateText.imgTypeIcon\"\n (error)=\"handlerImageError($event, item())\"\n (click)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().buttonLeftConfig; as buttonLeft) {\n @if (item().hrefButton) {\n <a [class.w-full]=\"!buttonLeft.ignoreWidth100\"\n [href]=\"item().hrefButton\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\"></ng-container>\n </a>\n }\n @if (!item().hrefButton) {\n <div [class.w-full]=\"!buttonLeft.ignoreWidth100\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\"></ng-container>\n </div>\n }\n <ng-template #buttonLeftTemplate>\n <libs_ui-components-buttons-button class=\"w-full\"\n [type]=\"buttonLeft.type || 'button-link-primary'\"\n [label]=\"buttonLeft.label || ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable\"\n [classIconLeft]=\"buttonLeft.classIconLeft ? ((buttonLeft.classIconLeft || '')+' flex mr-[8px] text-[12px]') : ''\"\n [classInclude]=\"(buttonLeft.classInclude|| '')+' w-full'\"\n [classLabel]=\"(buttonLeft.classLabel ?? 'libs-ui-font-h4r')\"\n [ignoreStopPropagationEvent]=\"buttonLeft.ignoreStopPropagationEvent\"\n [styleIconLeft]=\"buttonLeft.styleIconLeft\"\n [styleButton]=\"buttonLeft.styleButton\"\n (moClick)=\"handlerSelectItem($event,item())\" />\n </ng-template>\n }\n @if (item().switchConfig) {\n <libs_ui-components-switch [active]=\"item().switchConfig.active\"\n (moSwitch)=\"handlerSelectItem('click',item())\" />\n }\n @if (item().classIconLeft) {\n <i [class]=\"item().classIconLeft + ' mr-[8px] text-[14px]'\"></i>\n }\n @if (!item().ignoreShowFieldLabel && !configTemplateText.rows) {\n <libs_ui-components-popover [type]=\"item().popoverLabel?.type || 'text'\"\n [elementRefCustom]=\"item().popoverLabel?.type === 'text'? undefined:itemRef\"\n [ignoreShowPopover]=\"item().popoverLabel?.ignoreShowPopover\"\n [config]=\"item().popoverLabel?.config || (configTemplateText.configLabelPopover || {})\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (moEvent)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().fieldPopover; as popover) {\n <libs_ui-components-popover class=\"{{ popover.classInclude || '' }}\"\n [config]=\"popover?.config\">\n @if (!popover.dataView) {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event,$event.item,$event.action)\" />\n }\n @if ((keySelected === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check '+(configTemplateText.classIncludeIconSelected || 'right-[12px]')\">\n </i>\n }\n @if (keySelected() === item()[fieldKey()] && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText.itemSort?.mode || ''\"\n [fieldSort]=\"item()[fieldKey()]\"\n (outChange)=\"handlerSort($event)\" />\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n}\n", styles: [".libs-ui-list-template-text-item{padding:6px 16px 6px 1px;font-size:12px;line-height:18px;position:relative;cursor:pointer}.libs-ui-list-template-text-item>.libs-ui-icon-check,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort{position:absolute;right:16px}.libs-ui-list-template-text-item>.libs-ui-icon-check:before,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}.libs-ui-list-template-text-item-bullet{width:10px;height:10px;border-radius:50%;margin-right:8px;cursor:pointer}.libs-ui-list-template-text-item-avatar{width:24px;height:24px;border-radius:50%;margin-right:8px;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i1$1.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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["getLastTextAfterSpace", "typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "idGenColor", "textAvatar", "classImageInclude"], outputs: ["outAvatarError"] }, { 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: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "component", type: LibsUiComponentsSwitchComponent, selector: "libs_ui-components-switch", inputs: ["size", "disable", "active"], outputs: ["activeChange", "outSwitch"] }, { 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: "directive", type: LibsUiComponentsListHighlightKeySearchDirective, selector: "[LibsUiComponentsListHighlightKeySearchDirective]", inputs: ["isHighlight", "keySearch", "classHighlight"] }, { kind: "component", type: LibsUiComponentsListRowsComponent, selector: "libs_ui-components-list-templates_rows", inputs: ["configTemplate", "item", "keySelected", "fieldKey", "zIndex"], outputs: ["outChangStageFlagMousePopover", "outEvent"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1300
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListTextComponent, isStandalone: true, selector: "libs_ui-components-list-templates_text", viewQueries: [{ propertyName: "virtualScrollerComponent", first: true, predicate: VirtualScrollerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <div #elementScroll\n [style.height]=\"!configTemplateText.notUseVirtualScroll && heightViewPort() && (!config()?.ignoreShowDataWhenNotSearch || (config()?.ignoreShowDataWhenNotSearch && config()?.ignoreFixHeightShowDataWhenNotSearch)) ? heightViewPort()+'px':'100%'\"\n class=\"w-full\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:scroll.viewPortItems}' />\n </virtual-scroller>\n }\n @if (configTemplateText.notUseVirtualScroll) {\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:items()}' />\n }\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[6px] px-[16px]')\">\n @if (!keySearch() && !loading()) {\n {{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n {{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}\n }\n @if (loading()) {\n &nbsp;\n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"loadingIconSize() || 'medium'\" />\n }\n </div>\n <ng-template #listRef\n let-itemsView='itemsView'>\n @for (item of itemsView; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item flex '+(item().classItem || '')\"\n [class.items-center]=\"!item().itemAlignStart\"\n [class.items-start]=\"item().itemAlignStart\"\n [class.libs-ui-bg-list-hover-danger]=\"!clickExactly() && item().hoverDanger\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly() && !item().hoverDanger\"\n [class.libs-ui-bg-list-active]=\"!clickExactly() && keySelected() === item()[fieldKey()]\"\n [class.!pl-[16px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.libs-ui-bg-list-hover-ffffff]=\"item().disable\"\n [class.cursor-default]=\"item().disable\"\n [class.py-[2px]]=\"clickExactly()\"\n [class.pr-[48px]]=\"keySelected() === item()[fieldKey()] && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort)&& !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{'pointer-events-none libs-ui-disable':loading() || disable() || ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem())}\"\n (click)=\"handlerClickRelative($event,item())\">\n @if (item().bullet) {\n <span class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.background-color]=\"item().bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event,item())\">\n </span>\n }\n\n @if (item().avatarConfig; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [classImageInclude]=\"avatarConfig.classImageInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [classImageInclude]=\"avatarConfig.classImageInclude\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"configTemplateText.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage):item()) | async) : item()[configTemplateText.fieldGetImage || '']\"\n [class]=\"'libs-ui-list-template-text-item-avatar ' + (configTemplateText.classIncludeImage ?? '')\"\n [class.w-[18px]]=\"configTemplateText.imgTypeIcon\"\n [class.h-[18px]]=\"configTemplateText.imgTypeIcon\"\n (error)=\"handlerImageError($event, item())\"\n (click)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().buttonLeftConfig; as buttonLeft) {\n @if (item().hrefButton) {\n <a [class.w-full]=\"!buttonLeft.ignoreWidth100\"\n [href]=\"item().hrefButton\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </a>\n }\n @if (!item().hrefButton) {\n <div [class.w-full]=\"!buttonLeft.ignoreWidth100\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </div>\n }\n <ng-template #buttonLeftTemplate>\n <libs_ui-components-buttons-button class=\"w-full\"\n [type]=\"buttonLeft.type || 'button-link-primary'\"\n [label]=\"buttonLeft.label || ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable\"\n [classIconLeft]=\"buttonLeft.classIconLeft ? ((buttonLeft.classIconLeft || '')+' flex mr-[8px] text-[12px]') : ''\"\n [classInclude]=\"(buttonLeft.classInclude|| '')+' w-full'\"\n [classLabel]=\"(buttonLeft.classLabel ?? 'libs-ui-font-h4r')\"\n [ignoreStopPropagationEvent]=\"buttonLeft.ignoreStopPropagationEvent\"\n [styleIconLeft]=\"buttonLeft.styleIconLeft\"\n [styleButton]=\"buttonLeft.styleButton\"\n (moClick)=\"handlerSelectItem($event,item())\" />\n </ng-template>\n }\n @if (item().switchConfig) {\n <libs_ui-components-switch [active]=\"item().switchConfig.active\"\n (moSwitch)=\"handlerSelectItem('click',item())\" />\n }\n @if (item().classIconLeft) {\n <i [class]=\"item().classIconLeft + ' mr-[8px] text-[14px]'\"></i>\n }\n @if (!item().ignoreShowFieldLabel && !configTemplateText.rows) {\n <libs_ui-components-popover [type]=\"item().popoverLabel?.type || 'text'\"\n [elementRefCustom]=\"item().popoverLabel?.type === 'text'? undefined:itemRef\"\n [ignoreShowPopover]=\"item().popoverLabel?.ignoreShowPopover\"\n [config]=\"item().popoverLabel?.config || (configTemplateText.configLabelPopover || {})\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (moEvent)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().fieldPopover; as popover) {\n <libs_ui-components-popover class=\"{{ popover.classInclude || '' }}\"\n [config]=\"popover?.config\">\n @if (!popover.dataView) {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event,$event.item,$event.action)\" />\n }\n @if ((keySelected() === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check '+(configTemplateText.classIncludeIconSelected || 'right-[12px]')\">\n </i>\n }\n @if (keySelected() === item()[fieldKey()] && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText.itemSort?.mode || ''\"\n [fieldSort]=\"item()[fieldKey()]\"\n (outChange)=\"handlerSort($event)\" />\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n}\n", styles: [".libs-ui-list-template-text-item{padding:6px 16px 6px 1px;font-size:12px;line-height:18px;position:relative;cursor:pointer}.libs-ui-list-template-text-item>.libs-ui-icon-check,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort{position:absolute;right:16px}.libs-ui-list-template-text-item>.libs-ui-icon-check:before,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}.libs-ui-list-template-text-item-bullet{width:10px;height:10px;border-radius:50%;margin-right:8px;cursor:pointer}.libs-ui-list-template-text-item-avatar{width:24px;height:24px;border-radius:50%;margin-right:8px;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i1.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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["getLastTextAfterSpace", "typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "idGenColor", "textAvatar", "classImageInclude"], outputs: ["outAvatarError"] }, { 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: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "component", type: LibsUiComponentsSwitchComponent, selector: "libs_ui-components-switch", inputs: ["size", "disable", "active"], outputs: ["activeChange", "outSwitch"] }, { 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: "directive", type: LibsUiComponentsListHighlightKeySearchDirective, selector: "[LibsUiComponentsListHighlightKeySearchDirective]", inputs: ["isHighlight", "keySearch", "classHighlight"] }, { kind: "component", type: LibsUiComponentsListRowsComponent, selector: "libs_ui-components-list-templates_rows", inputs: ["configTemplate", "item", "keySelected", "fieldKey", "zIndex"], outputs: ["outChangStageFlagMousePopover", "outEvent"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
718
1301
  }
719
1302
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTextComponent, decorators: [{
720
1303
  type: Component,
@@ -731,26 +1314,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
731
1314
  LibsUiComponentsListHighlightKeySearchDirective,
732
1315
  LibsUiComponentsListRowsComponent,
733
1316
  LibsUiPipesCallFunctionInTemplatePipe
734
- ], template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <div #elementScroll\n [style.height]=\"!configTemplateText.notUseVirtualScroll && heightViewPort() && (!config()?.ignoreShowDataWhenNotSearch || (config()?.ignoreShowDataWhenNotSearch && config()?.ignoreFixHeightShowDataWhenNotSearch)) ? heightViewPort()+'px':'100%'\"\n class=\"w-full\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:scroll.viewPortItems}' />\n </virtual-scroller>\n }\n @if (configTemplateText.notUseVirtualScroll) {\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:items()}' />\n }\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[6px] px-[16px]')\">\n @if (!keySearch() && !loading()) {\n {{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\"></ng-container>\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n {{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}\n }\n @if (loading()) {\n &nbsp;\n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"loadingIconSize() || 'medium'\" />\n }\n </div>\n <ng-template #listRef\n let-itemsView='itemsView'>\n @for (item of itemsView; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item flex '+(item().classItem || '')\"\n [class.items-center]=\"!item().itemAlignStart\"\n [class.items-start]=\"item().itemAlignStart\"\n [class.libs-ui-bg-list-hover-danger]=\"!clickExactly() && item().hoverDanger\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly() && !item().hoverDanger\"\n [class.libs-ui-bg-list-selected]=\"!clickExactly() && keySelected() === item()[fieldKey()]\"\n [class.pl-[16px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.libs-ui-bg-list-hover-ffffff]=\"item().disable\"\n [class.cursor-default]=\"item().disable\"\n [class.py-[2px]]=\"clickExactly()\"\n [class.pr-[48px]]=\"keySelected() === item()[fieldKey()] && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort)&& !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{'pointer-events-none libs-ui-disable':loading() || disable() || ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem())}\"\n (click)=\"handlerClickRelative($event,item())\">\n @if (item().bullet) {\n <span class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.background-color]=\"item().bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event,item())\">\n </span>\n }\n\n @if (item().avatarConfig; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [classImageInclude]=\"avatarConfig.classImageInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [classImageInclude]=\"avatarConfig.classImageInclude\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"configTemplateText.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage):item()) | async) : item()[configTemplateText.fieldGetImage || '']\"\n [class]=\"'libs-ui-list-template-text-item-avatar ' + (configTemplateText.classIncludeImage ?? '')\"\n [class.w-[18px]]=\"configTemplateText.imgTypeIcon\"\n [class.h-[18px]]=\"configTemplateText.imgTypeIcon\"\n (error)=\"handlerImageError($event, item())\"\n (click)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().buttonLeftConfig; as buttonLeft) {\n @if (item().hrefButton) {\n <a [class.w-full]=\"!buttonLeft.ignoreWidth100\"\n [href]=\"item().hrefButton\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\"></ng-container>\n </a>\n }\n @if (!item().hrefButton) {\n <div [class.w-full]=\"!buttonLeft.ignoreWidth100\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\"></ng-container>\n </div>\n }\n <ng-template #buttonLeftTemplate>\n <libs_ui-components-buttons-button class=\"w-full\"\n [type]=\"buttonLeft.type || 'button-link-primary'\"\n [label]=\"buttonLeft.label || ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable\"\n [classIconLeft]=\"buttonLeft.classIconLeft ? ((buttonLeft.classIconLeft || '')+' flex mr-[8px] text-[12px]') : ''\"\n [classInclude]=\"(buttonLeft.classInclude|| '')+' w-full'\"\n [classLabel]=\"(buttonLeft.classLabel ?? 'libs-ui-font-h4r')\"\n [ignoreStopPropagationEvent]=\"buttonLeft.ignoreStopPropagationEvent\"\n [styleIconLeft]=\"buttonLeft.styleIconLeft\"\n [styleButton]=\"buttonLeft.styleButton\"\n (moClick)=\"handlerSelectItem($event,item())\" />\n </ng-template>\n }\n @if (item().switchConfig) {\n <libs_ui-components-switch [active]=\"item().switchConfig.active\"\n (moSwitch)=\"handlerSelectItem('click',item())\" />\n }\n @if (item().classIconLeft) {\n <i [class]=\"item().classIconLeft + ' mr-[8px] text-[14px]'\"></i>\n }\n @if (!item().ignoreShowFieldLabel && !configTemplateText.rows) {\n <libs_ui-components-popover [type]=\"item().popoverLabel?.type || 'text'\"\n [elementRefCustom]=\"item().popoverLabel?.type === 'text'? undefined:itemRef\"\n [ignoreShowPopover]=\"item().popoverLabel?.ignoreShowPopover\"\n [config]=\"item().popoverLabel?.config || (configTemplateText.configLabelPopover || {})\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (moEvent)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().fieldPopover; as popover) {\n <libs_ui-components-popover class=\"{{ popover.classInclude || '' }}\"\n [config]=\"popover?.config\">\n @if (!popover.dataView) {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event,$event.item,$event.action)\" />\n }\n @if ((keySelected === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check '+(configTemplateText.classIncludeIconSelected || 'right-[12px]')\">\n </i>\n }\n @if (keySelected() === item()[fieldKey()] && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText.itemSort?.mode || ''\"\n [fieldSort]=\"item()[fieldKey()]\"\n (outChange)=\"handlerSort($event)\" />\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n}\n", styles: [".libs-ui-list-template-text-item{padding:6px 16px 6px 1px;font-size:12px;line-height:18px;position:relative;cursor:pointer}.libs-ui-list-template-text-item>.libs-ui-icon-check,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort{position:absolute;right:16px}.libs-ui-list-template-text-item>.libs-ui-icon-check:before,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}.libs-ui-list-template-text-item-bullet{width:10px;height:10px;border-radius:50%;margin-right:8px;cursor:pointer}.libs-ui-list-template-text-item-avatar{width:24px;height:24px;border-radius:50%;margin-right:8px;cursor:pointer}\n"] }]
1317
+ ], template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <div #elementScroll\n [style.height]=\"!configTemplateText.notUseVirtualScroll && heightViewPort() && (!config()?.ignoreShowDataWhenNotSearch || (config()?.ignoreShowDataWhenNotSearch && config()?.ignoreFixHeightShowDataWhenNotSearch)) ? heightViewPort()+'px':'100%'\"\n class=\"w-full\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:scroll.viewPortItems}' />\n </virtual-scroller>\n }\n @if (configTemplateText.notUseVirtualScroll) {\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:items()}' />\n }\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[6px] px-[16px]')\">\n @if (!keySearch() && !loading()) {\n {{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n {{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}\n }\n @if (loading()) {\n &nbsp;\n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"loadingIconSize() || 'medium'\" />\n }\n </div>\n <ng-template #listRef\n let-itemsView='itemsView'>\n @for (item of itemsView; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item flex '+(item().classItem || '')\"\n [class.items-center]=\"!item().itemAlignStart\"\n [class.items-start]=\"item().itemAlignStart\"\n [class.libs-ui-bg-list-hover-danger]=\"!clickExactly() && item().hoverDanger\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly() && !item().hoverDanger\"\n [class.libs-ui-bg-list-active]=\"!clickExactly() && keySelected() === item()[fieldKey()]\"\n [class.!pl-[16px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.libs-ui-bg-list-hover-ffffff]=\"item().disable\"\n [class.cursor-default]=\"item().disable\"\n [class.py-[2px]]=\"clickExactly()\"\n [class.pr-[48px]]=\"keySelected() === item()[fieldKey()] && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort)&& !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{'pointer-events-none libs-ui-disable':loading() || disable() || ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem())}\"\n (click)=\"handlerClickRelative($event,item())\">\n @if (item().bullet) {\n <span class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.background-color]=\"item().bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event,item())\">\n </span>\n }\n\n @if (item().avatarConfig; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [classImageInclude]=\"avatarConfig.classImageInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [classImageInclude]=\"avatarConfig.classImageInclude\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"configTemplateText.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage):item()) | async) : item()[configTemplateText.fieldGetImage || '']\"\n [class]=\"'libs-ui-list-template-text-item-avatar ' + (configTemplateText.classIncludeImage ?? '')\"\n [class.w-[18px]]=\"configTemplateText.imgTypeIcon\"\n [class.h-[18px]]=\"configTemplateText.imgTypeIcon\"\n (error)=\"handlerImageError($event, item())\"\n (click)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().buttonLeftConfig; as buttonLeft) {\n @if (item().hrefButton) {\n <a [class.w-full]=\"!buttonLeft.ignoreWidth100\"\n [href]=\"item().hrefButton\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </a>\n }\n @if (!item().hrefButton) {\n <div [class.w-full]=\"!buttonLeft.ignoreWidth100\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </div>\n }\n <ng-template #buttonLeftTemplate>\n <libs_ui-components-buttons-button class=\"w-full\"\n [type]=\"buttonLeft.type || 'button-link-primary'\"\n [label]=\"buttonLeft.label || ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable\"\n [classIconLeft]=\"buttonLeft.classIconLeft ? ((buttonLeft.classIconLeft || '')+' flex mr-[8px] text-[12px]') : ''\"\n [classInclude]=\"(buttonLeft.classInclude|| '')+' w-full'\"\n [classLabel]=\"(buttonLeft.classLabel ?? 'libs-ui-font-h4r')\"\n [ignoreStopPropagationEvent]=\"buttonLeft.ignoreStopPropagationEvent\"\n [styleIconLeft]=\"buttonLeft.styleIconLeft\"\n [styleButton]=\"buttonLeft.styleButton\"\n (moClick)=\"handlerSelectItem($event,item())\" />\n </ng-template>\n }\n @if (item().switchConfig) {\n <libs_ui-components-switch [active]=\"item().switchConfig.active\"\n (moSwitch)=\"handlerSelectItem('click',item())\" />\n }\n @if (item().classIconLeft) {\n <i [class]=\"item().classIconLeft + ' mr-[8px] text-[14px]'\"></i>\n }\n @if (!item().ignoreShowFieldLabel && !configTemplateText.rows) {\n <libs_ui-components-popover [type]=\"item().popoverLabel?.type || 'text'\"\n [elementRefCustom]=\"item().popoverLabel?.type === 'text'? undefined:itemRef\"\n [ignoreShowPopover]=\"item().popoverLabel?.ignoreShowPopover\"\n [config]=\"item().popoverLabel?.config || (configTemplateText.configLabelPopover || {})\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (moEvent)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().fieldPopover; as popover) {\n <libs_ui-components-popover class=\"{{ popover.classInclude || '' }}\"\n [config]=\"popover?.config\">\n @if (!popover.dataView) {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event,$event.item,$event.action)\" />\n }\n @if ((keySelected() === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check '+(configTemplateText.classIncludeIconSelected || 'right-[12px]')\">\n </i>\n }\n @if (keySelected() === item()[fieldKey()] && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText.itemSort?.mode || ''\"\n [fieldSort]=\"item()[fieldKey()]\"\n (outChange)=\"handlerSort($event)\" />\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n}\n", styles: [".libs-ui-list-template-text-item{padding:6px 16px 6px 1px;font-size:12px;line-height:18px;position:relative;cursor:pointer}.libs-ui-list-template-text-item>.libs-ui-icon-check,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort{position:absolute;right:16px}.libs-ui-list-template-text-item>.libs-ui-icon-check:before,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}.libs-ui-list-template-text-item-bullet{width:10px;height:10px;border-radius:50%;margin-right:8px;cursor:pointer}.libs-ui-list-template-text-item-avatar{width:24px;height:24px;border-radius:50%;margin-right:8px;cursor:pointer}\n"] }]
735
1318
  }] });
736
1319
 
737
1320
  const getComponentByType = (typeTemplate) => {
738
1321
  switch (typeTemplate) {
739
1322
  case 'checkbox':
740
- return LibsUiComponentsListTextComponent;
1323
+ return LibsUiComponentsListCheckboxComponent;
741
1324
  case 'group':
742
1325
  return LibsUiComponentsListTextComponent;
743
1326
  case 'radio':
744
- return LibsUiComponentsListTextComponent;
1327
+ return LibsUiComponentsListRadioComponent;
745
1328
  case 'text':
746
1329
  return LibsUiComponentsListTextComponent;
747
1330
  case 'tag':
748
- return LibsUiComponentsListTextComponent;
1331
+ return LibsUiComponentsListTagComponent;
749
1332
  }
750
1333
  };
751
1334
  const getFieldKeyByType = (config, fieldKeyDefault) => {
752
1335
  if (!config) {
753
- return;
1336
+ return fieldKeyDefault;
754
1337
  }
755
1338
  switch (config.type) {
756
1339
  case 'checkbox':
@@ -812,10 +1395,10 @@ class LibsUiComponentsListComponent {
812
1395
  onSearch = new Subject();
813
1396
  onRefresh = new Subject();
814
1397
  onSetHiddenItemByKey = new Subject();
815
- onSetDataStore = new Subject();
816
1398
  onItemChangeUnSelect = new Subject();
817
1399
  onUpdateMultiKeySelectedGroup = new Subject();
818
1400
  onRemoveItems = new Subject();
1401
+ onUpdateData = new Subject();
819
1402
  componentRef;
820
1403
  configData = signal({
821
1404
  type: 'text',
@@ -854,7 +1437,6 @@ class LibsUiComponentsListComponent {
854
1437
  keysHiddenItem = input(undefined); // không dùng giá trị này kết hợp với template checkbox có config chứa configCheckboxCheckAll
855
1438
  focusInputSearch = input();
856
1439
  skipFocusInputWhenKeySearchStoreUndefined = input();
857
- functionCustomAddDataToStore = input();
858
1440
  functionGetItemsAutoAddList = input(undefined);
859
1441
  validRequired = input(undefined);
860
1442
  showValidateBottom = input();
@@ -880,37 +1462,9 @@ class LibsUiComponentsListComponent {
880
1462
  /* INJECT */
881
1463
  dynamicComponentService = inject(LibsUiDynamicComponentService);
882
1464
  constructor() {
1465
+ effect(() => untracked(this.changeSignal.bind(this)));
883
1466
  effect(() => {
884
- this.keySearchStore.set(this.keySearch());
885
- this.onSearch.next(this.keySearch());
886
- }, { allowSignalWrites: true });
887
- effect(() => this.onItemChangeUnSelect.next(this.itemChangeUnSelect()));
888
- effect(() => {
889
- if (!this.componentRef) {
890
- return;
891
- }
892
- if (!isEmpty(this.keysDisableItem())) {
893
- this.componentRef.setInput('keysDisableItem', this.keysDisableItem());
894
- }
895
- if (!isEmpty(this.keysHiddenItem())) {
896
- this.onSetHiddenItemByKey.next(this.keysHiddenItem() || []);
897
- }
898
- if (!isEmpty(this.disable())) {
899
- this.componentRef.setInput('disable', this.disable());
900
- }
901
- if (!isEmpty(this.keySelected())) {
902
- this.componentRef.setInput('keySelected', this.keySelected());
903
- }
904
- if (this.configData()?.type !== 'group' && !isEmpty(this.multiKeySelected())) {
905
- this.componentRef.setInput('multiKeySelected', this.multiKeySelected());
906
- }
907
- if (this.configData()?.type === 'group' && !isEmpty(this.multiKeySelected())) {
908
- this.componentRef.setInput('multiKeySelected', this.multiKeySelected());
909
- this.onUpdateMultiKeySelectedGroup.next();
910
- }
911
- }, { allowSignalWrites: true });
912
- effect(() => {
913
- this.refresh();
1467
+ untracked(() => this.refresh());
914
1468
  });
915
1469
  }
916
1470
  ngOnInit() {
@@ -919,7 +1473,8 @@ class LibsUiComponentsListComponent {
919
1473
  refresh: this.refresh.bind(this),
920
1474
  resetKeySelected: this.handlerRemoveKeySelected.bind(this),
921
1475
  getRectListView: async () => this.listViewElementRef()?.nativeElement.getBoundingClientRect(),
922
- removeItems: async (keys) => this.onRemoveItems.next(keys)
1476
+ removeItems: async (keys) => this.onRemoveItems.next(keys),
1477
+ updateData: async (data) => this.onUpdateData.next(data)
923
1478
  });
924
1479
  const config = this.config();
925
1480
  if (config) {
@@ -931,7 +1486,6 @@ class LibsUiComponentsListComponent {
931
1486
  timer(0).pipe(takeUntil$1(this.onDestroy)).subscribe(() => {
932
1487
  this.dynamicComponentService.addToElement(this.componentRef, this.contentElementRef()?.nativeElement);
933
1488
  });
934
- // this.componentRef.setInput('onSetDataStore', this.onSetDataStore);
935
1489
  this.componentRef.setInput('onSetHiddenItemByKey', this.onSetHiddenItemByKey);
936
1490
  this.componentRef.setInput('config', this.configData());
937
1491
  if (this.searchConfig()) {
@@ -939,6 +1493,7 @@ class LibsUiComponentsListComponent {
939
1493
  }
940
1494
  this.componentRef.setInput('onSearch', this.onSearch);
941
1495
  this.componentRef.setInput('onRefresh', this.onRefresh);
1496
+ this.componentRef.setInput('onUpdateData', this.onUpdateData);
942
1497
  this.componentRef.setInput('keySearch', this.keySearchStore() ?? '');
943
1498
  this.componentRef.setInput('dropdownTabKeyActive', this.dropdownTabKeyActive());
944
1499
  this.componentRef.setInput('clickExactly', this.clickExactly() || false);
@@ -946,7 +1501,6 @@ class LibsUiComponentsListComponent {
946
1501
  this.componentRef.setInput('paddingLeftItem', this.paddingLeftItem());
947
1502
  this.componentRef.setInput('resetKeyWhenSelectAllKeyDropdown', this.resetKeyWhenSelectAllKeyDropdown());
948
1503
  this.componentRef.setInput('ignoreClassDisableDefaultWhenUseKeysDisableItem', this.ignoreClassDisableDefaultWhenUseKeysDisableItem());
949
- this.componentRef.setInput('functionCustomAddDataToStore', this.functionCustomAddDataToStore());
950
1504
  this.componentRef.setInput('functionGetItemsAutoAddList', this.functionGetItemsAutoAddList());
951
1505
  if (this.maxItemShow()) {
952
1506
  this.componentRef.setInput('maxItemShow', this.maxItemShow());
@@ -1021,6 +1575,33 @@ class LibsUiComponentsListComponent {
1021
1575
  });
1022
1576
  }
1023
1577
  /* FUNCTIONS */
1578
+ changeSignal() {
1579
+ this.keySearchStore.set(this.keySearch());
1580
+ this.onSearch.next(this.keySearch());
1581
+ this.onItemChangeUnSelect.next(this.itemChangeUnSelect());
1582
+ if (!this.componentRef) {
1583
+ return;
1584
+ }
1585
+ if (!isEmpty(this.keysDisableItem())) {
1586
+ this.componentRef.setInput('keysDisableItem', this.keysDisableItem());
1587
+ }
1588
+ if (!isEmpty(this.keysHiddenItem())) {
1589
+ this.onSetHiddenItemByKey.next(this.keysHiddenItem() || []);
1590
+ }
1591
+ if (!isEmpty(this.disable())) {
1592
+ this.componentRef.setInput('disable', this.disable());
1593
+ }
1594
+ if (!isEmpty(this.keySelected())) {
1595
+ this.componentRef.setInput('keySelected', this.keySelected());
1596
+ }
1597
+ if (this.configData()?.type !== 'group' && !isEmpty(this.multiKeySelected())) {
1598
+ this.componentRef.setInput('multiKeySelected', this.multiKeySelected());
1599
+ }
1600
+ if (this.configData()?.type === 'group' && !isEmpty(this.multiKeySelected())) {
1601
+ this.componentRef.setInput('multiKeySelected', this.multiKeySelected());
1602
+ this.onUpdateMultiKeySelectedGroup.next();
1603
+ }
1604
+ }
1024
1605
  handlerSearch(keySearch) {
1025
1606
  this.keySearchStore.set(keySearch);
1026
1607
  this.onSearch.next(keySearch);
@@ -1064,7 +1645,7 @@ class LibsUiComponentsListComponent {
1064
1645
  return;
1065
1646
  }
1066
1647
  this.dropdownTabKeyActive();
1067
- Object.assign(this.configData, this.cloneConfig(config));
1648
+ this.configData.set(this.cloneConfig(config));
1068
1649
  this.onRefresh.next();
1069
1650
  }
1070
1651
  cloneConfig(configInput) {
@@ -1093,7 +1674,7 @@ class LibsUiComponentsListComponent {
1093
1674
  this.onDestroy.complete();
1094
1675
  }
1095
1676
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1096
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListComponent, isStandalone: true, selector: "libs_ui-components-list", inputs: { hiddenInputSearch: { classPropertyName: "hiddenInputSearch", publicName: "hiddenInputSearch", isSignal: true, isRequired: false, transformFunction: null }, dropdownTabKeyActive: { classPropertyName: "dropdownTabKeyActive", publicName: "dropdownTabKeyActive", isSignal: true, isRequired: false, transformFunction: null }, keySearch: { classPropertyName: "keySearch", publicName: "keySearch", isSignal: true, isRequired: false, transformFunction: null }, itemChangeUnSelect: { classPropertyName: "itemChangeUnSelect", publicName: "itemChangeUnSelect", isSignal: true, isRequired: false, transformFunction: null }, paddingLeftItem: { classPropertyName: "paddingLeftItem", publicName: "paddingLeftItem", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isSearchOnline: { classPropertyName: "isSearchOnline", publicName: "isSearchOnline", isSignal: true, isRequired: false, transformFunction: null }, disable: { classPropertyName: "disable", publicName: "disable", isSignal: true, isRequired: false, transformFunction: null }, disableLabel: { classPropertyName: "disableLabel", publicName: "disableLabel", isSignal: true, isRequired: false, transformFunction: null }, labelConfig: { classPropertyName: "labelConfig", publicName: "labelConfig", isSignal: true, isRequired: false, transformFunction: null }, searchConfig: { classPropertyName: "searchConfig", publicName: "searchConfig", isSignal: true, isRequired: false, transformFunction: null }, searchPadding: { classPropertyName: "searchPadding", publicName: "searchPadding", isSignal: true, isRequired: false, transformFunction: null }, dividerClassInclude: { classPropertyName: "dividerClassInclude", publicName: "dividerClassInclude", isSignal: true, isRequired: false, transformFunction: null }, hasDivider: { classPropertyName: "hasDivider", publicName: "hasDivider", isSignal: true, isRequired: false, transformFunction: null }, buttonsOther: { classPropertyName: "buttonsOther", publicName: "buttonsOther", isSignal: true, isRequired: false, transformFunction: null }, hasButtonUnSelectOption: { classPropertyName: "hasButtonUnSelectOption", publicName: "hasButtonUnSelectOption", isSignal: true, isRequired: false, transformFunction: null }, clickExactly: { classPropertyName: "clickExactly", publicName: "clickExactly", isSignal: true, isRequired: false, transformFunction: null }, backgroundListCustom: { classPropertyName: "backgroundListCustom", publicName: "backgroundListCustom", isSignal: true, isRequired: false, transformFunction: null }, maxItemShow: { classPropertyName: "maxItemShow", publicName: "maxItemShow", isSignal: true, isRequired: false, transformFunction: null }, keySelected: { classPropertyName: "keySelected", publicName: "keySelected", isSignal: true, isRequired: false, transformFunction: null }, multiKeySelected: { classPropertyName: "multiKeySelected", publicName: "multiKeySelected", isSignal: true, isRequired: false, transformFunction: null }, keysDisableItem: { classPropertyName: "keysDisableItem", publicName: "keysDisableItem", isSignal: true, isRequired: false, transformFunction: null }, keysHiddenItem: { classPropertyName: "keysHiddenItem", publicName: "keysHiddenItem", isSignal: true, isRequired: false, transformFunction: null }, focusInputSearch: { classPropertyName: "focusInputSearch", publicName: "focusInputSearch", isSignal: true, isRequired: false, transformFunction: null }, skipFocusInputWhenKeySearchStoreUndefined: { classPropertyName: "skipFocusInputWhenKeySearchStoreUndefined", publicName: "skipFocusInputWhenKeySearchStoreUndefined", isSignal: true, isRequired: false, transformFunction: null }, functionCustomAddDataToStore: { classPropertyName: "functionCustomAddDataToStore", publicName: "functionCustomAddDataToStore", isSignal: true, isRequired: false, transformFunction: null }, functionGetItemsAutoAddList: { classPropertyName: "functionGetItemsAutoAddList", publicName: "functionGetItemsAutoAddList", isSignal: true, isRequired: false, transformFunction: null }, validRequired: { classPropertyName: "validRequired", publicName: "validRequired", isSignal: true, isRequired: false, transformFunction: null }, showValidateBottom: { classPropertyName: "showValidateBottom", publicName: "showValidateBottom", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, loadingIconSize: { classPropertyName: "loadingIconSize", publicName: "loadingIconSize", isSignal: true, isRequired: false, transformFunction: null }, templateRefSearchNoData: { classPropertyName: "templateRefSearchNoData", publicName: "templateRefSearchNoData", isSignal: true, isRequired: false, transformFunction: null }, resetKeyWhenSelectAllKeyDropdown: { classPropertyName: "resetKeyWhenSelectAllKeyDropdown", publicName: "resetKeyWhenSelectAllKeyDropdown", isSignal: true, isRequired: false, transformFunction: null }, ignoreClassDisableDefaultWhenUseKeysDisableItem: { classPropertyName: "ignoreClassDisableDefaultWhenUseKeysDisableItem", publicName: "ignoreClassDisableDefaultWhenUseKeysDisableItem", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outSelectKey: "outSelectKey", outSelectMultiKey: "outSelectMultiKey", outUnSelectMultiKey: "outUnSelectMultiKey", outClickButtonOther: "outClickButtonOther", outFieldKey: "outFieldKey", outChangeView: "outChangeView", outLoading: "outLoading", outFunctionsControl: "outFunctionsControl", outChangStageFlagMousePopover: "outChangStageFlagMousePopover", outLoadItemsComplete: "outLoadItemsComplete" }, viewQueries: [{ propertyName: "listViewElementRef", first: true, predicate: ["listViewContainer"], descendants: true, isSignal: true }, { propertyName: "contentElementRef", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #listViewContainer\n class=\"flex flex-col\"\n [class.w-full]=\"!maxItemShow\"\n [class.h-full]=\"!maxItemShow\">\n @if (labelConfig(); as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [descriptionClass]=\"labelConfig.descriptionClass\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsLeft]=\"labelConfig.disableButtonsLeft || disable()\"\n [disableButtonsRight]=\"labelConfig.disableButtonsRight || disable()\"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\"labelConfig.toggleDisable || loading() || disable()\"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [buttonsDescription]=\"labelConfig.buttonsDescription\"\n [disableButtonsDescription]=\"labelConfig.disableButtonsDescription || disable()\"\n [buttonsDescriptionContainerClass]=\"labelConfig.buttonsDescriptionContainerClass\"\n [count]=\"labelConfig.count\" />\n }\n\n @if (!showValidateBottom()) {\n <ng-container *ngTemplateOutlet=\"templateValidate\"></ng-container>\n }\n @if (!hiddenInputSearch()) {\n <libs_ui-components-inputs-search [searchConfig]=\"searchConfig()\"\n [class.px-[12px]]=\"searchPadding()\"\n [class]=\"searchConfig().classCoverInputSearch\"\n [disable]=\" disable() || loading() || false\"\n (outSearch)=\"handlerSearch($event)\"\n (outFunctionsControl)=\"handlerFunctionControlInputSearch($event)\" />\n }\n @if (config()?.configDescriptionGroup; as description) {\n <div [class]=\"description?.classInclude\">\n <libs_ui-components-popover [config]=\"description?.tooltipDescription\">\n <div [class]=\"description?.classTextDescriptionInclude\">{{ description.textDescription }}</div>\n </libs_ui-components-popover>\n </div>\n }\n @if (!hiddenInputSearch() && hasDivider() && (!config()?.ignoreShowDataWhenNotSearch || keySearchStore())) {\n <div class=\"libs-ui-border-top-general {{ dividerClassInclude() ? dividerClassInclude():'' }}\"\n [class.libs-ui-divider-default]=\"!!searchPadding() && !dividerClassInclude()\">\n </div>\n }\n <div class=\"flex flex-col {{ (config()?.ignoreShowDataWhenNotSearch && keySearchStore() && !config()?.ignoreFixHeightShowDataWhenNotSearch) ? 'h-[353px]' : 'h-full' }}\">\n <div #contentContainer\n class=\"w-full h-full {{ backgroundListCustom() }}\"\n [class.libs-ui-disable]=\"disable() && disableLabel()\"\n [class.pointer-events-none]=\"disable() && disableLabel()\">\n </div>\n\n @for (buttonOther of buttonsOther(); track $index) {\n <div class=\"bg-[#ffffff]\">\n <libs_ui-components-buttons-button [type]=\"buttonOther.type || 'button-link-primary'\"\n [label]=\"buttonOther.label || ' '\"\n [classIconLeft]=\"(buttonOther.classIconLeft || '')+' flex mr-[8px] text-[16px]'\"\n classInclude=\"w-full libs-ui-border-top-general text-left rounded-0 {{ buttonOther.classInclude ? buttonOther.classInclude:'' }}\"\n classLabel=\"libs-ui-font-h5r whitespace-normal\"\n [disable]=\"buttonOther.disable || disable() || loading() || false\"\n (outClick)=\"handlerClickButtonOther(buttonOther)\" />\n </div>\n }\n @if (hasButtonUnSelectOption()) {\n <div class=\"bg-[#ffffff] rounded-b-[4px]\">\n <libs_ui-components-buttons-button label=\"i18n_unselect_option\"\n type=\"button-link-danger-high\"\n classIconLeft=\"flex mr-[8px] libs-ui-icon-close\"\n classInclude=\"w-100 libs-ui-border-top-general text-left rounded-0\"\n classLabel=\"mo-lib-font-h5r whitespace-normal\"\n [disable]=\"disableButtonUnSelectOption() || disable() || loading() || false\"\n (outClick)=\"handlerRemoveKeySelected()\" />\n </div>\n }\n </div>\n @if (showValidateBottom()) {\n <ng-container *ngTemplateOutlet=\"templateValidate\"></ng-container>\n }\n</div>\n\n<ng-template #templateValidate>\n @if (isErrorRequired()) {\n <div [class.mb-[8px]]=\"!showValidateBottom()\"\n [class.mt-[8px]]=\"showValidateBottom()\">\n <span class=\"text-[#ee2d41] mo-lib-font-h7\"\n [innerHtml]=\"(validRequired()?.message || ERROR_MESSAGE_EMPTY_VALID)| translate:validRequired()?.interpolateParams\">\n </span>\n </div>\n }\n</ng-template>\n", styles: [":host{background-color:#fff}:host ::ng-deep .libs-ui-list-view-highlight-text-search{background-color:#ffdb80;border-radius:2px;display:inline-block;overflow:unset}.libs-ui-divider-default{width:calc(100% - 24px);margin:12px auto 0}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsLabelComponent, selector: "libs_ui-components-label", inputs: ["iconPopoverClass", "classInclude", "labelLeft", "labelLeftClass", "labelLeftBehindToggleButton", "popover", "required", "buttonsLeft", "disableButtonsLeft", "buttonsRight", "disableButtonsRight", "labelRight", "labelRightClass", "labelRightRequired", "hasToggle", "toggleSize", "toggleActive", "toggleDisable", "description", "descriptionClass", "buttonsDescription", "disableButtonsDescription", "buttonsDescriptionContainerClass", "onlyShowCount", "zIndexPopover", "timerDestroyPopover", "count", "limitLength"], outputs: ["outClickButton", "outSwitchEvent", "outLabelRightClick", "outLabelLeftClick"] }, { kind: "component", type: LibsUiComponentsInputsSearchComponent, selector: "libs_ui-components-inputs-search", inputs: ["disable", "readonly", "searchConfig", "ignoreAutoComplete", "debounceTime", "ignoreStopPropagationEvent", "focusTimeOut", "blurTimeOut"], outputs: ["outSearch", "outValueChange", "outIconLeft", "outIconRight", "outFocusAndBlur", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1677
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListComponent, isStandalone: true, selector: "libs_ui-components-list", inputs: { hiddenInputSearch: { classPropertyName: "hiddenInputSearch", publicName: "hiddenInputSearch", isSignal: true, isRequired: false, transformFunction: null }, dropdownTabKeyActive: { classPropertyName: "dropdownTabKeyActive", publicName: "dropdownTabKeyActive", isSignal: true, isRequired: false, transformFunction: null }, keySearch: { classPropertyName: "keySearch", publicName: "keySearch", isSignal: true, isRequired: false, transformFunction: null }, itemChangeUnSelect: { classPropertyName: "itemChangeUnSelect", publicName: "itemChangeUnSelect", isSignal: true, isRequired: false, transformFunction: null }, paddingLeftItem: { classPropertyName: "paddingLeftItem", publicName: "paddingLeftItem", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isSearchOnline: { classPropertyName: "isSearchOnline", publicName: "isSearchOnline", isSignal: true, isRequired: false, transformFunction: null }, disable: { classPropertyName: "disable", publicName: "disable", isSignal: true, isRequired: false, transformFunction: null }, disableLabel: { classPropertyName: "disableLabel", publicName: "disableLabel", isSignal: true, isRequired: false, transformFunction: null }, labelConfig: { classPropertyName: "labelConfig", publicName: "labelConfig", isSignal: true, isRequired: false, transformFunction: null }, searchConfig: { classPropertyName: "searchConfig", publicName: "searchConfig", isSignal: true, isRequired: false, transformFunction: null }, searchPadding: { classPropertyName: "searchPadding", publicName: "searchPadding", isSignal: true, isRequired: false, transformFunction: null }, dividerClassInclude: { classPropertyName: "dividerClassInclude", publicName: "dividerClassInclude", isSignal: true, isRequired: false, transformFunction: null }, hasDivider: { classPropertyName: "hasDivider", publicName: "hasDivider", isSignal: true, isRequired: false, transformFunction: null }, buttonsOther: { classPropertyName: "buttonsOther", publicName: "buttonsOther", isSignal: true, isRequired: false, transformFunction: null }, hasButtonUnSelectOption: { classPropertyName: "hasButtonUnSelectOption", publicName: "hasButtonUnSelectOption", isSignal: true, isRequired: false, transformFunction: null }, clickExactly: { classPropertyName: "clickExactly", publicName: "clickExactly", isSignal: true, isRequired: false, transformFunction: null }, backgroundListCustom: { classPropertyName: "backgroundListCustom", publicName: "backgroundListCustom", isSignal: true, isRequired: false, transformFunction: null }, maxItemShow: { classPropertyName: "maxItemShow", publicName: "maxItemShow", isSignal: true, isRequired: false, transformFunction: null }, keySelected: { classPropertyName: "keySelected", publicName: "keySelected", isSignal: true, isRequired: false, transformFunction: null }, multiKeySelected: { classPropertyName: "multiKeySelected", publicName: "multiKeySelected", isSignal: true, isRequired: false, transformFunction: null }, keysDisableItem: { classPropertyName: "keysDisableItem", publicName: "keysDisableItem", isSignal: true, isRequired: false, transformFunction: null }, keysHiddenItem: { classPropertyName: "keysHiddenItem", publicName: "keysHiddenItem", isSignal: true, isRequired: false, transformFunction: null }, focusInputSearch: { classPropertyName: "focusInputSearch", publicName: "focusInputSearch", isSignal: true, isRequired: false, transformFunction: null }, skipFocusInputWhenKeySearchStoreUndefined: { classPropertyName: "skipFocusInputWhenKeySearchStoreUndefined", publicName: "skipFocusInputWhenKeySearchStoreUndefined", isSignal: true, isRequired: false, transformFunction: null }, functionGetItemsAutoAddList: { classPropertyName: "functionGetItemsAutoAddList", publicName: "functionGetItemsAutoAddList", isSignal: true, isRequired: false, transformFunction: null }, validRequired: { classPropertyName: "validRequired", publicName: "validRequired", isSignal: true, isRequired: false, transformFunction: null }, showValidateBottom: { classPropertyName: "showValidateBottom", publicName: "showValidateBottom", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, loadingIconSize: { classPropertyName: "loadingIconSize", publicName: "loadingIconSize", isSignal: true, isRequired: false, transformFunction: null }, templateRefSearchNoData: { classPropertyName: "templateRefSearchNoData", publicName: "templateRefSearchNoData", isSignal: true, isRequired: false, transformFunction: null }, resetKeyWhenSelectAllKeyDropdown: { classPropertyName: "resetKeyWhenSelectAllKeyDropdown", publicName: "resetKeyWhenSelectAllKeyDropdown", isSignal: true, isRequired: false, transformFunction: null }, ignoreClassDisableDefaultWhenUseKeysDisableItem: { classPropertyName: "ignoreClassDisableDefaultWhenUseKeysDisableItem", publicName: "ignoreClassDisableDefaultWhenUseKeysDisableItem", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outSelectKey: "outSelectKey", outSelectMultiKey: "outSelectMultiKey", outUnSelectMultiKey: "outUnSelectMultiKey", outClickButtonOther: "outClickButtonOther", outFieldKey: "outFieldKey", outChangeView: "outChangeView", outLoading: "outLoading", outFunctionsControl: "outFunctionsControl", outChangStageFlagMousePopover: "outChangStageFlagMousePopover", outLoadItemsComplete: "outLoadItemsComplete" }, viewQueries: [{ propertyName: "listViewElementRef", first: true, predicate: ["listViewContainer"], descendants: true, isSignal: true }, { propertyName: "contentElementRef", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #listViewContainer\n class=\"flex flex-col\"\n [class.w-full]=\"!maxItemShow\"\n [class.h-full]=\"!maxItemShow\">\n @if (labelConfig(); as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [descriptionClass]=\"labelConfig.descriptionClass\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsLeft]=\"labelConfig.disableButtonsLeft || disable()\"\n [disableButtonsRight]=\"labelConfig.disableButtonsRight || disable()\"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\"labelConfig.toggleDisable || loading() || disable()\"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [buttonsDescription]=\"labelConfig.buttonsDescription\"\n [disableButtonsDescription]=\"labelConfig.disableButtonsDescription || disable()\"\n [buttonsDescriptionContainerClass]=\"labelConfig.buttonsDescriptionContainerClass\"\n [count]=\"labelConfig.count\" />\n }\n\n @if (!showValidateBottom()) {\n <ng-container *ngTemplateOutlet=\"templateValidate\" />\n }\n @if (!hiddenInputSearch()) {\n <libs_ui-components-inputs-search [searchConfig]=\"searchConfig()\"\n [class.px-[12px]]=\"searchPadding()\"\n [class]=\"searchConfig().classCoverInputSearch\"\n [disable]=\" disable() || loading() || false\"\n (outSearch)=\"handlerSearch($event)\"\n (outFunctionsControl)=\"handlerFunctionControlInputSearch($event)\" />\n }\n @if (config()?.configDescriptionGroup; as description) {\n <div [class]=\"description?.classInclude\">\n <libs_ui-components-popover [config]=\"description?.tooltipDescription\">\n <div [class]=\"description?.classTextDescriptionInclude\">{{ description.textDescription }}</div>\n </libs_ui-components-popover>\n </div>\n }\n @if (!hiddenInputSearch() && hasDivider() && (!config()?.ignoreShowDataWhenNotSearch || keySearchStore())) {\n <div class=\"libs-ui-border-top-general {{ dividerClassInclude() ? dividerClassInclude():'' }}\"\n [class.libs-ui-divider-default]=\"!!searchPadding() && !dividerClassInclude()\">\n </div>\n }\n <div class=\"flex flex-col {{ (config()?.ignoreShowDataWhenNotSearch && keySearchStore() && !config()?.ignoreFixHeightShowDataWhenNotSearch) ? 'h-[353px]' : 'h-full' }}\">\n <div #contentContainer\n class=\"w-full h-full {{ backgroundListCustom() }}\"\n [class.libs-ui-disable]=\"disable() && disableLabel()\"\n [class.pointer-events-none]=\"disable() && disableLabel()\">\n </div>\n\n @for (buttonOther of buttonsOther(); track $index) {\n <div class=\"bg-[#ffffff]\">\n <libs_ui-components-buttons-button [type]=\"buttonOther.type || 'button-link-primary'\"\n [label]=\"buttonOther.label || ' '\"\n [classIconLeft]=\"(buttonOther.classIconLeft || '')+' flex mr-[8px] text-[16px]'\"\n classInclude=\"w-full libs-ui-border-top-general text-left rounded-0 {{ buttonOther.classInclude ? buttonOther.classInclude:'' }}\"\n classLabel=\"libs-ui-font-h5r whitespace-normal\"\n [disable]=\"buttonOther.disable || disable() || loading() || false\"\n (outClick)=\"handlerClickButtonOther(buttonOther)\" />\n </div>\n }\n @if (hasButtonUnSelectOption()) {\n <div class=\"bg-[#ffffff] rounded-b-[4px]\">\n <libs_ui-components-buttons-button label=\"i18n_unselect_option\"\n type=\"button-link-danger-high\"\n classIconLeft=\"flex mr-[8px] libs-ui-icon-close\"\n classInclude=\"w-100 libs-ui-border-top-general text-left rounded-0\"\n classLabel=\"mo-lib-font-h5r whitespace-normal\"\n [disable]=\"disableButtonUnSelectOption() || disable() || loading() || false\"\n (outClick)=\"handlerRemoveKeySelected()\" />\n </div>\n }\n </div>\n @if (showValidateBottom()) {\n <ng-container *ngTemplateOutlet=\"templateValidate\" />\n }\n</div>\n\n<ng-template #templateValidate>\n @if (isErrorRequired()) {\n <div [class.mb-[8px]]=\"!showValidateBottom()\"\n [class.mt-[8px]]=\"showValidateBottom()\">\n <span class=\"text-[#ee2d41] mo-lib-font-h7\"\n [innerHtml]=\"(validRequired()?.message || ERROR_MESSAGE_EMPTY_VALID)| translate:validRequired()?.interpolateParams\">\n </span>\n </div>\n }\n</ng-template>\n", styles: [":host{background-color:#fff}:host ::ng-deep .libs-ui-list-view-highlight-text-search{background-color:#ffdb80;border-radius:2px;display:inline-block;overflow:unset}.libs-ui-divider-default{width:calc(100% - 24px);margin:12px auto 0}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsLabelComponent, selector: "libs_ui-components-label", inputs: ["iconPopoverClass", "classInclude", "labelLeft", "labelLeftClass", "labelLeftBehindToggleButton", "popover", "required", "buttonsLeft", "disableButtonsLeft", "buttonsRight", "disableButtonsRight", "labelRight", "labelRightClass", "labelRightRequired", "hasToggle", "toggleSize", "toggleActive", "toggleDisable", "description", "descriptionClass", "buttonsDescription", "disableButtonsDescription", "buttonsDescriptionContainerClass", "onlyShowCount", "zIndexPopover", "timerDestroyPopover", "count", "limitLength"], outputs: ["outClickButton", "outSwitchEvent", "outLabelRightClick", "outLabelLeftClick"] }, { kind: "component", type: LibsUiComponentsInputsSearchComponent, selector: "libs_ui-components-inputs-search", inputs: ["disable", "readonly", "searchConfig", "ignoreAutoComplete", "debounceTime", "ignoreStopPropagationEvent", "focusTimeOut", "blurTimeOut"], outputs: ["outSearch", "outValueChange", "outIconLeft", "outIconRight", "outFocusAndBlur", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1097
1678
  }
1098
1679
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListComponent, decorators: [{
1099
1680
  type: Component,
@@ -1103,7 +1684,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1103
1684
  LibsUiComponentsInputsSearchComponent,
1104
1685
  LibsUiComponentsPopoverComponent,
1105
1686
  LibsUiComponentsButtonsButtonComponent
1106
- ], template: "<div #listViewContainer\n class=\"flex flex-col\"\n [class.w-full]=\"!maxItemShow\"\n [class.h-full]=\"!maxItemShow\">\n @if (labelConfig(); as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [descriptionClass]=\"labelConfig.descriptionClass\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsLeft]=\"labelConfig.disableButtonsLeft || disable()\"\n [disableButtonsRight]=\"labelConfig.disableButtonsRight || disable()\"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\"labelConfig.toggleDisable || loading() || disable()\"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [buttonsDescription]=\"labelConfig.buttonsDescription\"\n [disableButtonsDescription]=\"labelConfig.disableButtonsDescription || disable()\"\n [buttonsDescriptionContainerClass]=\"labelConfig.buttonsDescriptionContainerClass\"\n [count]=\"labelConfig.count\" />\n }\n\n @if (!showValidateBottom()) {\n <ng-container *ngTemplateOutlet=\"templateValidate\"></ng-container>\n }\n @if (!hiddenInputSearch()) {\n <libs_ui-components-inputs-search [searchConfig]=\"searchConfig()\"\n [class.px-[12px]]=\"searchPadding()\"\n [class]=\"searchConfig().classCoverInputSearch\"\n [disable]=\" disable() || loading() || false\"\n (outSearch)=\"handlerSearch($event)\"\n (outFunctionsControl)=\"handlerFunctionControlInputSearch($event)\" />\n }\n @if (config()?.configDescriptionGroup; as description) {\n <div [class]=\"description?.classInclude\">\n <libs_ui-components-popover [config]=\"description?.tooltipDescription\">\n <div [class]=\"description?.classTextDescriptionInclude\">{{ description.textDescription }}</div>\n </libs_ui-components-popover>\n </div>\n }\n @if (!hiddenInputSearch() && hasDivider() && (!config()?.ignoreShowDataWhenNotSearch || keySearchStore())) {\n <div class=\"libs-ui-border-top-general {{ dividerClassInclude() ? dividerClassInclude():'' }}\"\n [class.libs-ui-divider-default]=\"!!searchPadding() && !dividerClassInclude()\">\n </div>\n }\n <div class=\"flex flex-col {{ (config()?.ignoreShowDataWhenNotSearch && keySearchStore() && !config()?.ignoreFixHeightShowDataWhenNotSearch) ? 'h-[353px]' : 'h-full' }}\">\n <div #contentContainer\n class=\"w-full h-full {{ backgroundListCustom() }}\"\n [class.libs-ui-disable]=\"disable() && disableLabel()\"\n [class.pointer-events-none]=\"disable() && disableLabel()\">\n </div>\n\n @for (buttonOther of buttonsOther(); track $index) {\n <div class=\"bg-[#ffffff]\">\n <libs_ui-components-buttons-button [type]=\"buttonOther.type || 'button-link-primary'\"\n [label]=\"buttonOther.label || ' '\"\n [classIconLeft]=\"(buttonOther.classIconLeft || '')+' flex mr-[8px] text-[16px]'\"\n classInclude=\"w-full libs-ui-border-top-general text-left rounded-0 {{ buttonOther.classInclude ? buttonOther.classInclude:'' }}\"\n classLabel=\"libs-ui-font-h5r whitespace-normal\"\n [disable]=\"buttonOther.disable || disable() || loading() || false\"\n (outClick)=\"handlerClickButtonOther(buttonOther)\" />\n </div>\n }\n @if (hasButtonUnSelectOption()) {\n <div class=\"bg-[#ffffff] rounded-b-[4px]\">\n <libs_ui-components-buttons-button label=\"i18n_unselect_option\"\n type=\"button-link-danger-high\"\n classIconLeft=\"flex mr-[8px] libs-ui-icon-close\"\n classInclude=\"w-100 libs-ui-border-top-general text-left rounded-0\"\n classLabel=\"mo-lib-font-h5r whitespace-normal\"\n [disable]=\"disableButtonUnSelectOption() || disable() || loading() || false\"\n (outClick)=\"handlerRemoveKeySelected()\" />\n </div>\n }\n </div>\n @if (showValidateBottom()) {\n <ng-container *ngTemplateOutlet=\"templateValidate\"></ng-container>\n }\n</div>\n\n<ng-template #templateValidate>\n @if (isErrorRequired()) {\n <div [class.mb-[8px]]=\"!showValidateBottom()\"\n [class.mt-[8px]]=\"showValidateBottom()\">\n <span class=\"text-[#ee2d41] mo-lib-font-h7\"\n [innerHtml]=\"(validRequired()?.message || ERROR_MESSAGE_EMPTY_VALID)| translate:validRequired()?.interpolateParams\">\n </span>\n </div>\n }\n</ng-template>\n", styles: [":host{background-color:#fff}:host ::ng-deep .libs-ui-list-view-highlight-text-search{background-color:#ffdb80;border-radius:2px;display:inline-block;overflow:unset}.libs-ui-divider-default{width:calc(100% - 24px);margin:12px auto 0}\n"] }]
1687
+ ], template: "<div #listViewContainer\n class=\"flex flex-col\"\n [class.w-full]=\"!maxItemShow\"\n [class.h-full]=\"!maxItemShow\">\n @if (labelConfig(); as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [descriptionClass]=\"labelConfig.descriptionClass\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsLeft]=\"labelConfig.disableButtonsLeft || disable()\"\n [disableButtonsRight]=\"labelConfig.disableButtonsRight || disable()\"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\"labelConfig.toggleDisable || loading() || disable()\"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [buttonsDescription]=\"labelConfig.buttonsDescription\"\n [disableButtonsDescription]=\"labelConfig.disableButtonsDescription || disable()\"\n [buttonsDescriptionContainerClass]=\"labelConfig.buttonsDescriptionContainerClass\"\n [count]=\"labelConfig.count\" />\n }\n\n @if (!showValidateBottom()) {\n <ng-container *ngTemplateOutlet=\"templateValidate\" />\n }\n @if (!hiddenInputSearch()) {\n <libs_ui-components-inputs-search [searchConfig]=\"searchConfig()\"\n [class.px-[12px]]=\"searchPadding()\"\n [class]=\"searchConfig().classCoverInputSearch\"\n [disable]=\" disable() || loading() || false\"\n (outSearch)=\"handlerSearch($event)\"\n (outFunctionsControl)=\"handlerFunctionControlInputSearch($event)\" />\n }\n @if (config()?.configDescriptionGroup; as description) {\n <div [class]=\"description?.classInclude\">\n <libs_ui-components-popover [config]=\"description?.tooltipDescription\">\n <div [class]=\"description?.classTextDescriptionInclude\">{{ description.textDescription }}</div>\n </libs_ui-components-popover>\n </div>\n }\n @if (!hiddenInputSearch() && hasDivider() && (!config()?.ignoreShowDataWhenNotSearch || keySearchStore())) {\n <div class=\"libs-ui-border-top-general {{ dividerClassInclude() ? dividerClassInclude():'' }}\"\n [class.libs-ui-divider-default]=\"!!searchPadding() && !dividerClassInclude()\">\n </div>\n }\n <div class=\"flex flex-col {{ (config()?.ignoreShowDataWhenNotSearch && keySearchStore() && !config()?.ignoreFixHeightShowDataWhenNotSearch) ? 'h-[353px]' : 'h-full' }}\">\n <div #contentContainer\n class=\"w-full h-full {{ backgroundListCustom() }}\"\n [class.libs-ui-disable]=\"disable() && disableLabel()\"\n [class.pointer-events-none]=\"disable() && disableLabel()\">\n </div>\n\n @for (buttonOther of buttonsOther(); track $index) {\n <div class=\"bg-[#ffffff]\">\n <libs_ui-components-buttons-button [type]=\"buttonOther.type || 'button-link-primary'\"\n [label]=\"buttonOther.label || ' '\"\n [classIconLeft]=\"(buttonOther.classIconLeft || '')+' flex mr-[8px] text-[16px]'\"\n classInclude=\"w-full libs-ui-border-top-general text-left rounded-0 {{ buttonOther.classInclude ? buttonOther.classInclude:'' }}\"\n classLabel=\"libs-ui-font-h5r whitespace-normal\"\n [disable]=\"buttonOther.disable || disable() || loading() || false\"\n (outClick)=\"handlerClickButtonOther(buttonOther)\" />\n </div>\n }\n @if (hasButtonUnSelectOption()) {\n <div class=\"bg-[#ffffff] rounded-b-[4px]\">\n <libs_ui-components-buttons-button label=\"i18n_unselect_option\"\n type=\"button-link-danger-high\"\n classIconLeft=\"flex mr-[8px] libs-ui-icon-close\"\n classInclude=\"w-100 libs-ui-border-top-general text-left rounded-0\"\n classLabel=\"mo-lib-font-h5r whitespace-normal\"\n [disable]=\"disableButtonUnSelectOption() || disable() || loading() || false\"\n (outClick)=\"handlerRemoveKeySelected()\" />\n </div>\n }\n </div>\n @if (showValidateBottom()) {\n <ng-container *ngTemplateOutlet=\"templateValidate\" />\n }\n</div>\n\n<ng-template #templateValidate>\n @if (isErrorRequired()) {\n <div [class.mb-[8px]]=\"!showValidateBottom()\"\n [class.mt-[8px]]=\"showValidateBottom()\">\n <span class=\"text-[#ee2d41] mo-lib-font-h7\"\n [innerHtml]=\"(validRequired()?.message || ERROR_MESSAGE_EMPTY_VALID)| translate:validRequired()?.interpolateParams\">\n </span>\n </div>\n }\n</ng-template>\n", styles: [":host{background-color:#fff}:host ::ng-deep .libs-ui-list-view-highlight-text-search{background-color:#ffdb80;border-radius:2px;display:inline-block;overflow:unset}.libs-ui-divider-default{width:calc(100% - 24px);margin:12px auto 0}\n"] }]
1107
1688
  }], ctorParameters: () => [] });
1108
1689
 
1109
1690
  ;