@libs-ui/components-tabs 0.1.1-1

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.
@@ -0,0 +1,455 @@
1
+ import * as i0 from '@angular/core';
2
+ import { computed, signal, input, model, output, inject, ElementRef, effect, untracked, ChangeDetectionStrategy, Component, viewChild } from '@angular/core';
3
+ import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
4
+ import { LibsUiComponentsDragContainerDirective, LibsUiDragItemDirective } from '@libs-ui/components-drag-drop';
5
+ import { LibsUiComponentsListComponent } from '@libs-ui/components-list';
6
+ import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
7
+ import { escapeHtml, uuid, convertObjectToSignal, isNil } from '@libs-ui/utils';
8
+ import { TranslateService } from '@ngx-translate/core';
9
+ import { Subject, debounceTime, of, fromEvent } from 'rxjs';
10
+ import { debounceTime as debounceTime$1, takeUntil } from 'rxjs/operators';
11
+ import { LibsUiComponentsBadgeComponent } from '@libs-ui/components-badge';
12
+ import { LibsUiPipesCallFunctionInTemplatePipe } from '@libs-ui/pipes-call-function-in-template';
13
+ import { AsyncPipe } from '@angular/common';
14
+ import { returnListObject } from '@libs-ui/services-http-request';
15
+
16
+ class LibsUiComponentsTabsItemComponent {
17
+ // #region PROPERTY
18
+ labelComputed = computed(() => escapeHtml(this.translateService.instant(this.item()[this.fieldLabel()])));
19
+ actionShowing = signal(false);
20
+ mutationObserver = signal(undefined);
21
+ mutationObserverSubject = new Subject();
22
+ onDestroy = new Subject();
23
+ popoverFunctionControlEvent = signal(undefined);
24
+ // #region INPUT
25
+ ignoreCalculatorTab = input.required();
26
+ step = input.required();
27
+ mode = input.required();
28
+ tabs = input.required();
29
+ item = model.required();
30
+ keySelected = input.required();
31
+ fieldLabel = input.required();
32
+ fieldKey = input.required();
33
+ cssDefault = input.required();
34
+ size = input.required();
35
+ disable = input();
36
+ disableLabel = input();
37
+ zIndex = input();
38
+ changeViewTab = input.required();
39
+ // #region OUTPUT
40
+ outAction = output();
41
+ /* INJECT*/
42
+ element = inject(ElementRef);
43
+ translateService = inject(TranslateService);
44
+ constructor() {
45
+ effect(() => {
46
+ if (this.mode() !== 'left' || this.ignoreCalculatorTab()) {
47
+ return;
48
+ }
49
+ untracked(() => {
50
+ setTimeout(() => {
51
+ this.updateSpecificWidth();
52
+ this.mutationObserver()?.disconnect();
53
+ this.mutationObserverSubject.pipe(debounceTime(10)).subscribe(() => this.updateSpecificWidth());
54
+ this.mutationObserver.set(new MutationObserver(() => this.mutationObserverSubject.next()));
55
+ this.mutationObserver()?.observe(this.element.nativeElement, { attributes: true, childList: true, subtree: true });
56
+ });
57
+ });
58
+ });
59
+ }
60
+ ngOnInit() {
61
+ if (!this.item().key) {
62
+ this.item.update((item) => ({ ...item, key: uuid() }));
63
+ }
64
+ }
65
+ /* FUNCTIONS */
66
+ updateSpecificWidth() {
67
+ const preSpecificWidth = this.item().specificWidth;
68
+ const width = this.element.nativeElement.offsetWidth;
69
+ if (width && preSpecificWidth !== width) {
70
+ this.item.update((item) => ({ ...item, specificWidth: width }));
71
+ this.changeViewTab().next();
72
+ }
73
+ }
74
+ handlerImgError(event) {
75
+ event.stopPropagation();
76
+ event.target.src = this.item().linkImageError;
77
+ }
78
+ handlerSelectedKey(event) {
79
+ if (!event) {
80
+ return;
81
+ }
82
+ this.outAction.emit({ item: this.item(), key: event.key });
83
+ this.popoverFunctionControlEvent()?.removePopoverOverlay();
84
+ }
85
+ handlerPopoverFunctionControlEvent(event) {
86
+ this.popoverFunctionControlEvent.set(event);
87
+ }
88
+ handlerPopoverEvent(event) {
89
+ if (event !== 'show' && event !== 'remove') {
90
+ return;
91
+ }
92
+ this.actionShowing.set(event === 'show');
93
+ }
94
+ handlerClickButton(event, type) {
95
+ event.stopPropagation();
96
+ if (type === 'remove') {
97
+ this.outAction.emit({ key: 'remove', item: this.item() });
98
+ return;
99
+ }
100
+ const action = this.item()[type]?.action;
101
+ if (action) {
102
+ action(this.item());
103
+ }
104
+ }
105
+ ngOnDestroy() {
106
+ this.mutationObserver()?.disconnect();
107
+ this.onDestroy.next();
108
+ this.onDestroy.complete();
109
+ }
110
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsTabsItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsTabsItemComponent, isStandalone: true, selector: "libs_ui-components-tabs-item", inputs: { ignoreCalculatorTab: { classPropertyName: "ignoreCalculatorTab", publicName: "ignoreCalculatorTab", isSignal: true, isRequired: true, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, keySelected: { classPropertyName: "keySelected", publicName: "keySelected", isSignal: true, isRequired: true, transformFunction: null }, fieldLabel: { classPropertyName: "fieldLabel", publicName: "fieldLabel", isSignal: true, isRequired: true, transformFunction: null }, fieldKey: { classPropertyName: "fieldKey", publicName: "fieldKey", isSignal: true, isRequired: true, transformFunction: null }, cssDefault: { classPropertyName: "cssDefault", publicName: "cssDefault", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: true, 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 }, changeViewTab: { classPropertyName: "changeViewTab", publicName: "changeViewTab", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { item: "itemChange", outAction: "outAction" }, ngImport: i0, template: "@if (item(); as item) {\n <div\n #itemEl\n class=\"libs-ui-tab-header-center-item {{ cssDefault() }} {{ item.classInclude || '' }} {{ item[fieldKey()] === keySelected() && tabs().classIncludeActiveItem ? tabs().classIncludeActiveItem : '' }}\"\n [attr.key]=\"item[fieldKey()]\"\n [attr.invalid]=\"item.invalid && !tabs().ignoreShowLineBottomInTab\"\n [attr.active]=\"item[fieldKey()] === keySelected() && !tabs().ignoreShowLineBottomInTab\"\n [attr.disable]=\"disable()\"\n [class.!cursor-pointer]=\"!disable()\"\n [class.!cursor-default]=\"disable()\"\n [class.libs-ui-tab-header-center-item-hover]=\"!tabs().ignoreShowLineBottomInTab\"\n [class.libs-ui-tab-header-center-item-action-show]=\"actionShowing()\">\n @if (tabs().hasImage) {\n <img\n class=\"libs-ui-tab-header-center-item-image {{ item.classImageInclude || '' }}\"\n LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!item.popoverImage\"\n [config]=\"item.popoverImage\"\n [ignoreStopPropagationEvent]=\"true\"\n [class.libs-ui-disable]=\"disable()\"\n [src]=\"item.linkImage\"\n [attr.key]=\"item[fieldKey()]\"\n (error)=\"handlerImgError($event)\" />\n }\n @if (item.iconLeft) {\n <i\n class=\"libs-ui-tab-header-center-item-icon libs-ui-mr-8px {{ item.iconLeft }}\"\n LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!item.popoverIconLeft\"\n [config]=\"item.popoverIconLeft\"\n [ignoreStopPropagationEvent]=\"true\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.libs-ui-disable]=\"disable()\"></i>\n }\n @if (item.is_pin) {\n <i\n class=\"libs-ui-tab-header-center-item-icon mr-[8px] {{ item[fieldKey()] === keySelected() ? 'libs-ui-icon-pin-solid' : 'libs-ui-icon-pin-outline' }}\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.libs-ui-disable]=\"disable()\"></i>\n }\n @if (tabs().hasStep) {\n @if (tabs().stepHasBackGround) {\n <div\n class=\"libs-ui-tab-header-center-item-step !border-none libs-ui-font-h6m\"\n [class.!text-[#ffffff]]=\"item[fieldKey()] === keySelected() && !tabs().ignoreSelectedBackgroundStep && !item.invalid\"\n [class.!text-[var(--libs-ui-color-default)]]=\"item[fieldKey()] === keySelected() && tabs().ignoreSelectedBackgroundStep && !item.invalid\"\n [class.!text-[#f15767]]=\"item.invalid\"\n [class.bg-[#f8f9fa]]=\"step() > (tabs().stepCompleted || 0) && (tabs().ignoreSelectedBackgroundStep || disable()) && !item.invalid\"\n [class.bg-[#00bc62]]=\"step() <= (tabs().stepCompleted || -1) && !tabs().ignoreSelectedBackgroundStep && !item.invalid\"\n [class.bg-[var(--libs-ui-color-default)]]=\"item[fieldKey()] === keySelected() && !tabs().ignoreSelectedBackgroundStep && !item.invalid\"\n [class.bg-[var(--libs-ui-color-light-2)]]=\"((item[fieldKey()] === keySelected() && tabs().ignoreSelectedBackgroundStep) || (step() > (tabs().stepCompleted || 0) && !tabs().ignoreSelectedBackgroundStep)) && !item.invalid\"\n [class.!bg-[#fdeaec]]=\"item.invalid\">\n @if (step() <= (tabs().stepCompleted || -1)) {\n <i class=\"libs-ui-icon-check text-[#ffffff]\"></i>\n } @else {\n <span [class.text-[#cdd0d6]]=\"disable()\">{{ step() }}</span>\n }\n </div>\n } @else {\n <div\n class=\"libs-ui-tab-header-center-item-step\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.libs-ui-disable]=\"disable()\">\n <span>{{ step() }}</span>\n </div>\n }\n }\n @if (item.configButtonLeft) {\n <libs_ui-components-buttons-button\n [type]=\"item.configButtonLeft.type || 'button-link-third'\"\n [classInclude]=\"item.configButtonLeft.classInclude || ''\"\n [classIconLeft]=\"item.configButtonLeft.classIconLeft || ''\"\n [classLabel]=\"item.configButtonLeft.classLabel || ''\"\n [classIconRight]=\"item.configButtonLeft.classIconRight || ''\"\n [label]=\"item.configButtonLeft.label || ''\"\n [popover]=\"item.configButtonLeft.popover || {}\"\n (outClick)=\"handlerClickButton($event, 'configButtonLeft')\" />\n }\n @if (item[fieldLabel()]) {\n <div\n class=\"relative flex\"\n [style.maxWidth.px]=\"tabs().maxWidthTextLabelItem || 160\">\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{ position: { mode: step() === 1 ? 'start' : 'center', distance: 0 }, zIndex: zIndex() }\"\n [attr.size]=\"size()\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.!text-[#f15767]]=\"item.invalid\"\n [ignoreStopPropagationEvent]=\"true\"\n [classInclude]=\"'w-full libs-ui-tab-header-center-item-label ' + (item.classLabel || 'libs-ui-font-h6m') + (disableLabel() && disable() ? ' libs-ui-disable' : '') + (tabs().stepHasBackGround && disable() ? ' text-[#cdd0d6]' : '')\"\n [innerHTML]=\"labelComputed()\"></span>\n @if (item.hasRedDot) {\n <div class=\"absolute right-[-6px] top-[-2px] w-[6px] h-[6px] bg-[#ee2d41] rounded-[6px]\"></div>\n }\n </div>\n }\n @if (item.popover) {\n <i\n class=\"libs-ui-tab-header-center-item-icon ml-[8px] libs-ui-icon-tooltip-outline\"\n LibsUiComponentsPopoverDirective\n [config]=\"item.popover\"\n [ignoreStopPropagationEvent]=\"true\"\n [class.libs-ui-disable]=\"disable()\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"></i>\n }\n @if (item.iconRight) {\n <i\n class=\"libs-ui-tab-header-center-item-icon {{ item.iconRight }}\"\n LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!item.popoverIconRight\"\n [config]=\"item.popoverIconRight\"\n [ignoreStopPropagationEvent]=\"true\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.libs-ui-disable]=\"disable()\"></i>\n }\n @if (item.count !== undefined) {\n <libs_ui-components-badge\n [mode]=\"item.modeCount || 'x+'\"\n [count]=\"item.count\"\n [maxCount]=\"item.maxCount || 99\"\n [classCircle]=\"(item.classCircle || 'libs-ui-font-h5r') + (item.invalid ? ' !text-[#f15767] !bg-[#fdeaec]' : '')\"\n [active]=\"item[fieldKey()] === keySelected()\"\n [class.libs-ui-disable]=\"disable()\" />\n }\n @if (item.configButtonRight) {\n <libs_ui-components-buttons-button\n [type]=\"item.configButtonRight.type || 'button-link-third'\"\n [classInclude]=\"item.configButtonRight.classInclude || ''\"\n [classIconLeft]=\"item.configButtonRight.classIconLeft || ''\"\n [classLabel]=\"item.configButtonRight.classLabel || ''\"\n [classIconRight]=\"item.configButtonRight.classIconRight || ''\"\n [popover]=\"item.configButtonRight.popover || {}\"\n [label]=\"item.configButtonRight.label || ''\"\n (outClick)=\"handlerClickButton($event, 'configButtonRight')\" />\n }\n @if (tabs().actionRightConfig?.(); as right) {\n <libs_ui-components-popover\n [class]=\"right.classInclude || 'ml-[8px]'\"\n [class.libs-ui-tab-header-center-item-action]=\"right.onlyShowWhenHoverItemActive\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [mode]=\"'click-toggle'\"\n [ignoreStopPropagationEvent]=\"true\"\n [ignoreHiddenPopoverContentWhenMouseLeave]=\"true\"\n [elementRefCustom]=\"right.onlyShowWhenHoverItemActive ? undefined : itemEl\"\n [config]=\"{\n zIndex: right.config?.()?.zIndex || 1000,\n maxHeight: right.config?.()?.maxHeight || 287,\n maxWidth: right.config?.()?.maxWidth || 2048,\n width: right.config?.()?.width || 220,\n direction: right.config?.()?.direction || 'bottom',\n template: right.config?.()?.template || actionEl,\n classInclude: (right.config?.()?.classInclude || '') + ' !rounded-[4px] overflow-hidden',\n whiteTheme: true,\n ignoreArrow: true,\n position: right.config?.()?.position || { mode: 'start', distance: 0 },\n }\"\n (outEvent)=\"handlerPopoverEvent($event)\"\n (outFunctionsControl)=\"handlerPopoverFunctionControlEvent($event)\">\n @if (right.customView) {\n <div [innerHtml]=\"item[fieldKey()] | LibsUiPipesCallFunctionInTemplatePipe: right.customView : item\"></div>\n } @else {\n <i\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.invalid]=\"item.invalid\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class]=\"right.onlyShowWhenHoverItemActive ? 'libs-ui-icon-more-vertical rotate-90 libs-ui-tab-header-center-item-icon' : 'libs-ui-icon-chevron-right rotate-90 libs-ui-tab-header-center-item-icon'\"></i>\n }\n </libs_ui-components-popover>\n <ng-template #actionEl>\n @if (0 | LibsUiPipesCallFunctionInTemplatePipe: right.getListViewConfig : item : item[fieldKey()] : { valueIs0: 0 } | async; as config) {\n <libs_ui-components-list\n [config]=\"config()\"\n [maxItemShow]=\"5\"\n [hiddenInputSearch]=\"true\"\n [paddingLeftItem]=\"true\"\n (outSelectKey)=\"handlerSelectedKey($event)\" />\n }\n </ng-template>\n }\n @if (tabs().allowRemove && tabs().items().length > 1) {\n <libs_ui-components-buttons-button\n [type]=\"tabs().configButtonRemove?.type || 'button-link-custom'\"\n [iconOnlyType]=\"tabs().configButtonRemove?.iconOnlyType || true\"\n [classInclude]=\"tabs().configButtonRemove?.classInclude || 'ml-[8px] !p-0'\"\n [classIconLeft]=\"tabs().configButtonRemove?.classIconLeft || 'libs-ui-icon-close'\"\n [classLabel]=\"tabs().configButtonRemove?.classLabel || ''\"\n [classIconRight]=\"tabs().configButtonRemove?.classIconRight || ''\"\n [popover]=\"tabs().configButtonRemove?.popover || { config: { content: 'i18n_delete' } }\"\n [label]=\"tabs().configButtonRemove?.label || ''\"\n [buttonCustom]=\"{\n configStepColor: {\n text: '#6a7383',\n text_hover: '#f15767',\n text_active: '#f15767',\n text_disable: '#cdd0d6',\n },\n rootColor: '#f15767',\n }\"\n (outClick)=\"handlerClickButton($event, 'remove')\" />\n }\n </div>\n}\n", styles: [".libs-ui-tab-header-center-item{position:relative;display:flex;align-items:center;flex-wrap:nowrap;padding:12px 0;height:100%;width:fit-content}.libs-ui-tab-header-center-item[active=true]:after{content:\"\";width:100%;height:2px;background-color:var(--libs-ui-color-default, #226ff5);position:absolute;bottom:0;left:0}.libs-ui-tab-header-center-item[invalid=true]:after{background-color:#f15767}.libs-ui-tab-header-center-item-image{width:20px;height:20px;border-radius:50%;margin-right:8px}.libs-ui-tab-header-center-item-icon{display:flex}.libs-ui-tab-header-center-item-icon:before{font-size:12px}.libs-ui-tab-header-center-item-label{font-family:var(--libs-ui-font-family-name, \"Arial\");color:#6a7383;font-size:11px}.libs-ui-tab-header-center-item-label[size=langer]{font-size:13px}.libs-ui-tab-header-center-item-label[completed=true]{color:#6a7383}.libs-ui-tab-header-center-item-label[active=true]{color:var(--libs-ui-color-default, #226ff5)}.libs-ui-tab-header-center-item-action{display:none}.libs-ui-tab-header-center-item-step{border-radius:50%;border:1px solid #9ca2ad;color:#9ca2ad;min-width:24px;min-height:24px;display:flex;align-items:center;justify-content:center;margin-right:8px}.libs-ui-tab-header-center-item-step[completed=true]{color:#6a7383;border:1px solid #6a7383}.libs-ui-tab-header-center-item-step[active=true]{color:var(--libs-ui-color-default, #226ff5);border:1px solid var(--libs-ui-color-default, #226ff5)}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-]:before,.libs-ui-tab-header-center-item i[class*=icon-font-3rd]:before{color:#6a7383}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][completed=true]:before,.libs-ui-tab-header-center-item i[class*=icon-font-3rd][completed=true]:before{color:#6a7383}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][active=true]:before,.libs-ui-tab-header-center-item i[class*=icon-font-3rd][active=true]:before{color:var(--libs-ui-color-default, #226ff5)}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][invalid=true]:before,.libs-ui-tab-header-center-item i[class*=icon-font-3rd][invalid=true]:before{color:#f15767}.libs-ui-tab-header-center-item-hover:hover[active=false][disable=false]:after{content:\"\";width:100%;height:2px;background-color:#6a7383;position:absolute;bottom:0;left:0}.libs-ui-tab-header-center-item-hover:hover .libs-ui-tab-header-center-item-action[active=true],.libs-ui-tab-header-center-item-action-show .libs-ui-tab-header-center-item-action{display:flex}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsBadgeComponent, selector: "libs_ui-components-badge", inputs: ["popoverConfig", "active", "count", "mode", "maxCount", "ignoreMarginDefault", "classCircle", "ignoreStopPropagationEvent"] }, { kind: "component", type: LibsUiComponentsListComponent, selector: "libs_ui-components-list", inputs: ["hiddenInputSearch", "dropdownTabKeyActive", "keySearch", "paddingLeftItem", "config", "autoSelectedFirstItemCallOutsideBefore", "isSearchOnline", "disable", "disableLabel", "labelConfig", "searchConfig", "searchPadding", "dividerClassInclude", "hasDivider", "buttonsOther", "hasButtonUnSelectOption", "clickExactly", "backgroundListCustom", "maxItemShow", "keySelected", "multiKeySelected", "keysDisableItem", "keysHiddenItem", "focusInputSearch", "skipFocusInputWhenKeySearchStoreUndefined", "functionGetItemsAutoAddList", "validRequired", "showValidateBottom", "zIndex", "loadingIconSize", "templateRefSearchNoData", "resetKeyWhenSelectAllKeyDropdown", "ignoreClassDisableDefaultWhenUseKeysDisableItem"], outputs: ["outSelectKey", "outSelectMultiKey", "outUnSelectMultiKey", "outClickButtonOther", "outFieldKey", "outChangeView", "outKeySearch", "outLoading", "outFunctionsControl", "outChangStageFlagMousePopover", "outLoadItemsComplete"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
112
+ }
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsTabsItemComponent, decorators: [{
114
+ type: Component,
115
+ args: [{ selector: 'libs_ui-components-tabs-item', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, LibsUiComponentsButtonsButtonComponent, LibsUiComponentsPopoverComponent, LibsUiComponentsBadgeComponent, LibsUiComponentsListComponent, LibsUiPipesCallFunctionInTemplatePipe], template: "@if (item(); as item) {\n <div\n #itemEl\n class=\"libs-ui-tab-header-center-item {{ cssDefault() }} {{ item.classInclude || '' }} {{ item[fieldKey()] === keySelected() && tabs().classIncludeActiveItem ? tabs().classIncludeActiveItem : '' }}\"\n [attr.key]=\"item[fieldKey()]\"\n [attr.invalid]=\"item.invalid && !tabs().ignoreShowLineBottomInTab\"\n [attr.active]=\"item[fieldKey()] === keySelected() && !tabs().ignoreShowLineBottomInTab\"\n [attr.disable]=\"disable()\"\n [class.!cursor-pointer]=\"!disable()\"\n [class.!cursor-default]=\"disable()\"\n [class.libs-ui-tab-header-center-item-hover]=\"!tabs().ignoreShowLineBottomInTab\"\n [class.libs-ui-tab-header-center-item-action-show]=\"actionShowing()\">\n @if (tabs().hasImage) {\n <img\n class=\"libs-ui-tab-header-center-item-image {{ item.classImageInclude || '' }}\"\n LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!item.popoverImage\"\n [config]=\"item.popoverImage\"\n [ignoreStopPropagationEvent]=\"true\"\n [class.libs-ui-disable]=\"disable()\"\n [src]=\"item.linkImage\"\n [attr.key]=\"item[fieldKey()]\"\n (error)=\"handlerImgError($event)\" />\n }\n @if (item.iconLeft) {\n <i\n class=\"libs-ui-tab-header-center-item-icon libs-ui-mr-8px {{ item.iconLeft }}\"\n LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!item.popoverIconLeft\"\n [config]=\"item.popoverIconLeft\"\n [ignoreStopPropagationEvent]=\"true\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.libs-ui-disable]=\"disable()\"></i>\n }\n @if (item.is_pin) {\n <i\n class=\"libs-ui-tab-header-center-item-icon mr-[8px] {{ item[fieldKey()] === keySelected() ? 'libs-ui-icon-pin-solid' : 'libs-ui-icon-pin-outline' }}\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.libs-ui-disable]=\"disable()\"></i>\n }\n @if (tabs().hasStep) {\n @if (tabs().stepHasBackGround) {\n <div\n class=\"libs-ui-tab-header-center-item-step !border-none libs-ui-font-h6m\"\n [class.!text-[#ffffff]]=\"item[fieldKey()] === keySelected() && !tabs().ignoreSelectedBackgroundStep && !item.invalid\"\n [class.!text-[var(--libs-ui-color-default)]]=\"item[fieldKey()] === keySelected() && tabs().ignoreSelectedBackgroundStep && !item.invalid\"\n [class.!text-[#f15767]]=\"item.invalid\"\n [class.bg-[#f8f9fa]]=\"step() > (tabs().stepCompleted || 0) && (tabs().ignoreSelectedBackgroundStep || disable()) && !item.invalid\"\n [class.bg-[#00bc62]]=\"step() <= (tabs().stepCompleted || -1) && !tabs().ignoreSelectedBackgroundStep && !item.invalid\"\n [class.bg-[var(--libs-ui-color-default)]]=\"item[fieldKey()] === keySelected() && !tabs().ignoreSelectedBackgroundStep && !item.invalid\"\n [class.bg-[var(--libs-ui-color-light-2)]]=\"((item[fieldKey()] === keySelected() && tabs().ignoreSelectedBackgroundStep) || (step() > (tabs().stepCompleted || 0) && !tabs().ignoreSelectedBackgroundStep)) && !item.invalid\"\n [class.!bg-[#fdeaec]]=\"item.invalid\">\n @if (step() <= (tabs().stepCompleted || -1)) {\n <i class=\"libs-ui-icon-check text-[#ffffff]\"></i>\n } @else {\n <span [class.text-[#cdd0d6]]=\"disable()\">{{ step() }}</span>\n }\n </div>\n } @else {\n <div\n class=\"libs-ui-tab-header-center-item-step\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.libs-ui-disable]=\"disable()\">\n <span>{{ step() }}</span>\n </div>\n }\n }\n @if (item.configButtonLeft) {\n <libs_ui-components-buttons-button\n [type]=\"item.configButtonLeft.type || 'button-link-third'\"\n [classInclude]=\"item.configButtonLeft.classInclude || ''\"\n [classIconLeft]=\"item.configButtonLeft.classIconLeft || ''\"\n [classLabel]=\"item.configButtonLeft.classLabel || ''\"\n [classIconRight]=\"item.configButtonLeft.classIconRight || ''\"\n [label]=\"item.configButtonLeft.label || ''\"\n [popover]=\"item.configButtonLeft.popover || {}\"\n (outClick)=\"handlerClickButton($event, 'configButtonLeft')\" />\n }\n @if (item[fieldLabel()]) {\n <div\n class=\"relative flex\"\n [style.maxWidth.px]=\"tabs().maxWidthTextLabelItem || 160\">\n <span\n LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [config]=\"{ position: { mode: step() === 1 ? 'start' : 'center', distance: 0 }, zIndex: zIndex() }\"\n [attr.size]=\"size()\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.!text-[#f15767]]=\"item.invalid\"\n [ignoreStopPropagationEvent]=\"true\"\n [classInclude]=\"'w-full libs-ui-tab-header-center-item-label ' + (item.classLabel || 'libs-ui-font-h6m') + (disableLabel() && disable() ? ' libs-ui-disable' : '') + (tabs().stepHasBackGround && disable() ? ' text-[#cdd0d6]' : '')\"\n [innerHTML]=\"labelComputed()\"></span>\n @if (item.hasRedDot) {\n <div class=\"absolute right-[-6px] top-[-2px] w-[6px] h-[6px] bg-[#ee2d41] rounded-[6px]\"></div>\n }\n </div>\n }\n @if (item.popover) {\n <i\n class=\"libs-ui-tab-header-center-item-icon ml-[8px] libs-ui-icon-tooltip-outline\"\n LibsUiComponentsPopoverDirective\n [config]=\"item.popover\"\n [ignoreStopPropagationEvent]=\"true\"\n [class.libs-ui-disable]=\"disable()\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"></i>\n }\n @if (item.iconRight) {\n <i\n class=\"libs-ui-tab-header-center-item-icon {{ item.iconRight }}\"\n LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!item.popoverIconRight\"\n [config]=\"item.popoverIconRight\"\n [ignoreStopPropagationEvent]=\"true\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class.libs-ui-disable]=\"disable()\"></i>\n }\n @if (item.count !== undefined) {\n <libs_ui-components-badge\n [mode]=\"item.modeCount || 'x+'\"\n [count]=\"item.count\"\n [maxCount]=\"item.maxCount || 99\"\n [classCircle]=\"(item.classCircle || 'libs-ui-font-h5r') + (item.invalid ? ' !text-[#f15767] !bg-[#fdeaec]' : '')\"\n [active]=\"item[fieldKey()] === keySelected()\"\n [class.libs-ui-disable]=\"disable()\" />\n }\n @if (item.configButtonRight) {\n <libs_ui-components-buttons-button\n [type]=\"item.configButtonRight.type || 'button-link-third'\"\n [classInclude]=\"item.configButtonRight.classInclude || ''\"\n [classIconLeft]=\"item.configButtonRight.classIconLeft || ''\"\n [classLabel]=\"item.configButtonRight.classLabel || ''\"\n [classIconRight]=\"item.configButtonRight.classIconRight || ''\"\n [popover]=\"item.configButtonRight.popover || {}\"\n [label]=\"item.configButtonRight.label || ''\"\n (outClick)=\"handlerClickButton($event, 'configButtonRight')\" />\n }\n @if (tabs().actionRightConfig?.(); as right) {\n <libs_ui-components-popover\n [class]=\"right.classInclude || 'ml-[8px]'\"\n [class.libs-ui-tab-header-center-item-action]=\"right.onlyShowWhenHoverItemActive\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [mode]=\"'click-toggle'\"\n [ignoreStopPropagationEvent]=\"true\"\n [ignoreHiddenPopoverContentWhenMouseLeave]=\"true\"\n [elementRefCustom]=\"right.onlyShowWhenHoverItemActive ? undefined : itemEl\"\n [config]=\"{\n zIndex: right.config?.()?.zIndex || 1000,\n maxHeight: right.config?.()?.maxHeight || 287,\n maxWidth: right.config?.()?.maxWidth || 2048,\n width: right.config?.()?.width || 220,\n direction: right.config?.()?.direction || 'bottom',\n template: right.config?.()?.template || actionEl,\n classInclude: (right.config?.()?.classInclude || '') + ' !rounded-[4px] overflow-hidden',\n whiteTheme: true,\n ignoreArrow: true,\n position: right.config?.()?.position || { mode: 'start', distance: 0 },\n }\"\n (outEvent)=\"handlerPopoverEvent($event)\"\n (outFunctionsControl)=\"handlerPopoverFunctionControlEvent($event)\">\n @if (right.customView) {\n <div [innerHtml]=\"item[fieldKey()] | LibsUiPipesCallFunctionInTemplatePipe: right.customView : item\"></div>\n } @else {\n <i\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.invalid]=\"item.invalid\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\"\n [class]=\"right.onlyShowWhenHoverItemActive ? 'libs-ui-icon-more-vertical rotate-90 libs-ui-tab-header-center-item-icon' : 'libs-ui-icon-chevron-right rotate-90 libs-ui-tab-header-center-item-icon'\"></i>\n }\n </libs_ui-components-popover>\n <ng-template #actionEl>\n @if (0 | LibsUiPipesCallFunctionInTemplatePipe: right.getListViewConfig : item : item[fieldKey()] : { valueIs0: 0 } | async; as config) {\n <libs_ui-components-list\n [config]=\"config()\"\n [maxItemShow]=\"5\"\n [hiddenInputSearch]=\"true\"\n [paddingLeftItem]=\"true\"\n (outSelectKey)=\"handlerSelectedKey($event)\" />\n }\n </ng-template>\n }\n @if (tabs().allowRemove && tabs().items().length > 1) {\n <libs_ui-components-buttons-button\n [type]=\"tabs().configButtonRemove?.type || 'button-link-custom'\"\n [iconOnlyType]=\"tabs().configButtonRemove?.iconOnlyType || true\"\n [classInclude]=\"tabs().configButtonRemove?.classInclude || 'ml-[8px] !p-0'\"\n [classIconLeft]=\"tabs().configButtonRemove?.classIconLeft || 'libs-ui-icon-close'\"\n [classLabel]=\"tabs().configButtonRemove?.classLabel || ''\"\n [classIconRight]=\"tabs().configButtonRemove?.classIconRight || ''\"\n [popover]=\"tabs().configButtonRemove?.popover || { config: { content: 'i18n_delete' } }\"\n [label]=\"tabs().configButtonRemove?.label || ''\"\n [buttonCustom]=\"{\n configStepColor: {\n text: '#6a7383',\n text_hover: '#f15767',\n text_active: '#f15767',\n text_disable: '#cdd0d6',\n },\n rootColor: '#f15767',\n }\"\n (outClick)=\"handlerClickButton($event, 'remove')\" />\n }\n </div>\n}\n", styles: [".libs-ui-tab-header-center-item{position:relative;display:flex;align-items:center;flex-wrap:nowrap;padding:12px 0;height:100%;width:fit-content}.libs-ui-tab-header-center-item[active=true]:after{content:\"\";width:100%;height:2px;background-color:var(--libs-ui-color-default, #226ff5);position:absolute;bottom:0;left:0}.libs-ui-tab-header-center-item[invalid=true]:after{background-color:#f15767}.libs-ui-tab-header-center-item-image{width:20px;height:20px;border-radius:50%;margin-right:8px}.libs-ui-tab-header-center-item-icon{display:flex}.libs-ui-tab-header-center-item-icon:before{font-size:12px}.libs-ui-tab-header-center-item-label{font-family:var(--libs-ui-font-family-name, \"Arial\");color:#6a7383;font-size:11px}.libs-ui-tab-header-center-item-label[size=langer]{font-size:13px}.libs-ui-tab-header-center-item-label[completed=true]{color:#6a7383}.libs-ui-tab-header-center-item-label[active=true]{color:var(--libs-ui-color-default, #226ff5)}.libs-ui-tab-header-center-item-action{display:none}.libs-ui-tab-header-center-item-step{border-radius:50%;border:1px solid #9ca2ad;color:#9ca2ad;min-width:24px;min-height:24px;display:flex;align-items:center;justify-content:center;margin-right:8px}.libs-ui-tab-header-center-item-step[completed=true]{color:#6a7383;border:1px solid #6a7383}.libs-ui-tab-header-center-item-step[active=true]{color:var(--libs-ui-color-default, #226ff5);border:1px solid var(--libs-ui-color-default, #226ff5)}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-]:before,.libs-ui-tab-header-center-item i[class*=icon-font-3rd]:before{color:#6a7383}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][completed=true]:before,.libs-ui-tab-header-center-item i[class*=icon-font-3rd][completed=true]:before{color:#6a7383}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][active=true]:before,.libs-ui-tab-header-center-item i[class*=icon-font-3rd][active=true]:before{color:var(--libs-ui-color-default, #226ff5)}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][invalid=true]:before,.libs-ui-tab-header-center-item i[class*=icon-font-3rd][invalid=true]:before{color:#f15767}.libs-ui-tab-header-center-item-hover:hover[active=false][disable=false]:after{content:\"\";width:100%;height:2px;background-color:#6a7383;position:absolute;bottom:0;left:0}.libs-ui-tab-header-center-item-hover:hover .libs-ui-tab-header-center-item-action[active=true],.libs-ui-tab-header-center-item-action-show .libs-ui-tab-header-center-item-action{display:flex}\n"] }]
116
+ }], ctorParameters: () => [] });
117
+
118
+ const tabMoreListConfig = (translate, fieldKey, fieldLabel, tabs, disable) => {
119
+ return {
120
+ type: 'text',
121
+ httpRequestData: signal({
122
+ objectInstance: returnListObject(tabs
123
+ .items()
124
+ .filter((item) => !item().specificDisplay)
125
+ .map((item) => item())),
126
+ functionName: 'listObservable',
127
+ argumentsValue: [],
128
+ }),
129
+ configTemplateText: signal({
130
+ fieldKey: fieldKey || 'key',
131
+ getClassItem: () => '!py-[12px]',
132
+ classRows: 'w-full',
133
+ notUseVirtualScroll: true,
134
+ rows: convertObjectToSignal([
135
+ {
136
+ classCols: 'flex items-center',
137
+ cols: [
138
+ {
139
+ getPopover: (item) => {
140
+ if (!tabs.hasStep) {
141
+ return;
142
+ }
143
+ const step = (item.order || 0) + 1;
144
+ let classStep = 'bg-[#f8f9fa] text-[#9ca2ad]';
145
+ if (item.invalid) {
146
+ classStep = '!text-[#f15767] !bg-[#fdeaec]';
147
+ }
148
+ if (item.disable || disable) {
149
+ classStep = 'bg-[#f8f9fa] text-[#cdd0d6]';
150
+ }
151
+ return {
152
+ classInclude: 'flex',
153
+ dataView: `
154
+ <div class="libs-ui-font-h6m rounded-full min-w-[24px] min-h-[24px] flex items-center justify-center mr-[8px] ${classStep}">
155
+ ${step <= (tabs.stepCompleted || -1) ? `<i class="libs-ui-icon-check text-[#ffffff]"></i>` : `${step}`}
156
+ </div>
157
+ `,
158
+ };
159
+ },
160
+ },
161
+ {
162
+ getPopover: (item) => (item.iconLeft ? { classInclude: 'flex', dataView: `<i class="${item.iconLeft} text-[16px] mr-[8px]"></i>` } : undefined),
163
+ },
164
+ {
165
+ getClassCol: (item) => `libs-ui-font-h6m ${item.invalid ? '!text-[#f15767]' : 'text-[#6a7383]'}`,
166
+ getValue: (data) => of(escapeHtml(translate.instant(data.item[fieldLabel] || ' '))),
167
+ },
168
+ {
169
+ getPopover: (item) => (item.popover ? { config: item.popover } : undefined),
170
+ },
171
+ {
172
+ getPopover: (item) => (item.iconRight ? { classInclude: 'flex', dataView: `<i class="${item.iconRight} text-[16px] ml-[8px]"></i>` } : undefined),
173
+ },
174
+ {
175
+ getConfigBadge: (item) => {
176
+ if (isNil(item.count)) {
177
+ return;
178
+ }
179
+ return {
180
+ mode: item.modeCount || 'x+',
181
+ count: item.count,
182
+ maxCount: item.maxCount || 99,
183
+ classCircle: (item.classCircle || 'libs-ui-font-h5r') + (item.invalid ? ' !text-[#f15767] !bg-[#fdeaec]' : ''),
184
+ };
185
+ },
186
+ },
187
+ ],
188
+ },
189
+ ]),
190
+ }),
191
+ };
192
+ };
193
+
194
+ class LibsUiComponentsTabsComponent {
195
+ // #region PROPERTY
196
+ itemsDisplay = signal([]);
197
+ displayMoreItem = signal(false);
198
+ tabMoreListConfig = computed(() => tabMoreListConfig(this.translate, this.fieldKey(), this.fieldLabel(), this.tabs(), this.disable()));
199
+ changeViewTab = new Subject();
200
+ groupName = signal(uuid());
201
+ stylesDragDropOverrideComputed = computed(() => this.updateStylesDragDropOverride());
202
+ popoverFunctionControlEvent = signal(undefined);
203
+ onDestroy = new Subject();
204
+ // #region INPUT
205
+ tabs = input.required();
206
+ keySelected = model.required();
207
+ mode = input('left');
208
+ fieldKey = input('key');
209
+ fieldLabel = input('label');
210
+ disable = input();
211
+ disableLabel = input();
212
+ heightTabItem = input(40);
213
+ ignoreCalculatorTab = input(false);
214
+ size = input('medium');
215
+ allowDragDropPosition = input();
216
+ zIndex = input();
217
+ configCss = model();
218
+ popoverShowMoreTabItem = input();
219
+ checkCanChangeTabSelected = input();
220
+ // #region OUTPUT
221
+ outKeySelected = output();
222
+ outFunctionsControl = output();
223
+ outDragTabChange = output();
224
+ outDisplayMoreItem = output();
225
+ outAction = output();
226
+ /* VIEW CHILD */
227
+ headerEl = viewChild.required('headerEl');
228
+ headerLeftEl = viewChild.required('headerLeftEl');
229
+ headerRightEl = viewChild.required('headerRightEl');
230
+ /* INJECT*/
231
+ translate = inject(TranslateService);
232
+ ngOnInit() {
233
+ this.updateTabsCssConfig();
234
+ this.outFunctionsControl.emit(this.FunctionsControl);
235
+ if (this.mode() !== 'left' || this.ignoreCalculatorTab()) {
236
+ this.tabs()
237
+ .items()
238
+ .map((item) => item.update((data) => ({ ...data, specificDisplay: true })));
239
+ this.itemsDisplay.set(this.tabs()
240
+ .items()
241
+ .filter((item) => item().specificDisplay));
242
+ return;
243
+ }
244
+ fromEvent(window, 'resize')
245
+ .pipe(debounceTime$1(250), takeUntil(this.onDestroy))
246
+ .subscribe(() => {
247
+ if (!this.tabs().items().length) {
248
+ return;
249
+ }
250
+ this.displayMoreItem.set(false);
251
+ this.calculatorTabsItemDisplay();
252
+ });
253
+ this.changeViewTab.pipe(debounceTime$1(20), takeUntil(this.onDestroy)).subscribe(() => this.calculatorTabsItemDisplay());
254
+ }
255
+ /* FUNCTIONS */
256
+ get FunctionsControl() {
257
+ return {
258
+ addTabsItem: this.addTabsItem.bind(this),
259
+ calculatorTabsItemsDisplay: this.calculatorTabsItemDisplay.bind(this),
260
+ selectedTabsItem: this.handlerSelectedTabsItem.bind(this),
261
+ };
262
+ }
263
+ updateTabsCssConfig() {
264
+ if (this.configCss()) {
265
+ return;
266
+ }
267
+ switch (this.mode()) {
268
+ case 'left':
269
+ this.configCss.set({
270
+ first: 'ml-[20px] mr-[16px]',
271
+ other: 'ml-[20px] mr-[16px]',
272
+ });
273
+ break;
274
+ case 'center':
275
+ this.configCss.set({
276
+ first: 'px-[12px] ml-[18px] mr-[18px]',
277
+ other: 'px-[12px] mx-[18px]',
278
+ header: 'flex justify-center',
279
+ });
280
+ break;
281
+ case 'center-has-line':
282
+ this.configCss.set({
283
+ first: 'px-[16px]',
284
+ other: 'px-[16px]',
285
+ headerCenter: 'items-center',
286
+ });
287
+ break;
288
+ case 'space-between':
289
+ this.configCss.set({
290
+ first: 'mx-auto',
291
+ other: 'mx-auto',
292
+ headerCenter: 'w-full',
293
+ });
294
+ break;
295
+ }
296
+ }
297
+ updateStylesDragDropOverride() {
298
+ if (this.allowDragDropPosition()) {
299
+ return [
300
+ {
301
+ className: 'libs-ui-drag-drop-item-placeholder',
302
+ styles: '',
303
+ },
304
+ {
305
+ className: 'libs-ui-drag-drop-item',
306
+ styles: 'cursor: move;',
307
+ },
308
+ {
309
+ className: 'libs-ui-drag-drop-item-dragging',
310
+ styles: 'cursor: move; background: #dddddd;',
311
+ },
312
+ ];
313
+ }
314
+ return [
315
+ {
316
+ className: 'libs-ui-drag-drop-item',
317
+ styles: '',
318
+ },
319
+ {
320
+ className: 'libs-ui-drag-drop-item-disable',
321
+ styles: '',
322
+ },
323
+ ];
324
+ }
325
+ handlerDropContainer(event) {
326
+ const { itemDragInfo } = event;
327
+ if (!itemDragInfo) {
328
+ return;
329
+ }
330
+ const items = this.tabs().items;
331
+ const { indexDrag, indexDrop } = itemDragInfo;
332
+ if (isNil(indexDrag) || isNil(indexDrop) || indexDrop === indexDrag) {
333
+ return;
334
+ }
335
+ const itemDrag = items()[indexDrag];
336
+ items.update((items) => {
337
+ items.splice(indexDrag, 1);
338
+ items.splice(indexDrop, 0, itemDrag);
339
+ return [...items];
340
+ });
341
+ this.outDragTabChange.emit();
342
+ }
343
+ handlerPopoverFunctionControlEvent(event) {
344
+ this.popoverFunctionControlEvent.set(event);
345
+ }
346
+ async handlerSelectedTabsItem(key, resetDisable = true) {
347
+ const itemSelected = this.tabs()
348
+ .items()
349
+ .find((item) => item()[this.fieldKey()] === key);
350
+ if (!itemSelected) {
351
+ return;
352
+ }
353
+ if (resetDisable) {
354
+ itemSelected.update((item) => ({ ...item, disable: false }));
355
+ }
356
+ this.handlerClickItem(itemSelected);
357
+ }
358
+ handlerSelectedKey(event) {
359
+ if (!event) {
360
+ return;
361
+ }
362
+ this.handlerClickItem(convertObjectToSignal(event.item));
363
+ this.outDragTabChange.emit();
364
+ }
365
+ async handlerClickItem(item) {
366
+ if (item().disable || this.disable()) {
367
+ return;
368
+ }
369
+ const checkCanChangeTabSelected = this.checkCanChangeTabSelected();
370
+ if (checkCanChangeTabSelected) {
371
+ const state = await checkCanChangeTabSelected();
372
+ if (state) {
373
+ this.changeItemSelected(item);
374
+ }
375
+ return;
376
+ }
377
+ this.changeItemSelected(item);
378
+ }
379
+ changeItemSelected(item) {
380
+ this.keySelected.set(item()[this.fieldKey()]);
381
+ this.outKeySelected.emit(this.keySelected());
382
+ this.popoverFunctionControlEvent()?.removePopoverOverlay();
383
+ this.calculatorTabsItemDisplay();
384
+ }
385
+ async handlerAction(event) {
386
+ this.outAction.emit(event);
387
+ }
388
+ async addTabsItem(item, selected = true, addFirst) {
389
+ const items = this.tabs().items;
390
+ items.update((items) => {
391
+ if (addFirst) {
392
+ return [item, ...items];
393
+ }
394
+ return [...items, item];
395
+ });
396
+ if (selected) {
397
+ this.handlerClickItem(item);
398
+ }
399
+ }
400
+ async calculatorTabsItemDisplay() {
401
+ let items = this.tabs().items();
402
+ const indexItemSelected = items.findIndex((item) => item()[this.fieldKey()] === this.keySelected());
403
+ if (indexItemSelected < 0) {
404
+ return;
405
+ }
406
+ this.displayMoreItem.set(false);
407
+ let displayMoreItem = false;
408
+ const headerWidth = this.headerEl().nativeElement.clientWidth || 0;
409
+ const itemSelected = items[indexItemSelected];
410
+ const itemSelectedWidth = itemSelected().specificWidth;
411
+ let totalWidthItemsDisplay = (this.headerLeftEl().nativeElement.clientWidth || 0) + (this.headerRightEl().nativeElement.clientWidth || 0) + 32;
412
+ items.forEach((item, index) => {
413
+ if (!item().specificWidth) {
414
+ return;
415
+ }
416
+ item.update((data) => ({ ...data, specificDisplay: false }));
417
+ const itemWidth = item().specificWidth || 0;
418
+ const width = totalWidthItemsDisplay + itemWidth + (index < indexItemSelected ? itemSelectedWidth : 0);
419
+ totalWidthItemsDisplay += itemWidth;
420
+ if (width > headerWidth) {
421
+ displayMoreItem = true;
422
+ return;
423
+ }
424
+ item.update((data) => ({ ...data, specificDisplay: true }));
425
+ });
426
+ itemSelected.update((data) => ({ ...data, specificDisplay: true }));
427
+ const display = items.filter((item) => item().specificDisplay === true);
428
+ const notDisplay = items.filter((item) => item().specificDisplay === false);
429
+ items = display.concat(notDisplay);
430
+ items.forEach((item, index) => item.update((data) => ({ ...data, order: index })));
431
+ this.tabs().items.set(items.sort((prev, next) => (prev().order || 0) - (next().order || 0)));
432
+ this.displayMoreItem.set(displayMoreItem);
433
+ this.outDisplayMoreItem.emit(this.displayMoreItem());
434
+ this.itemsDisplay.set(this.tabs()
435
+ .items()
436
+ .filter((item) => item().specificDisplay));
437
+ }
438
+ ngOnDestroy() {
439
+ this.onDestroy.next();
440
+ this.onDestroy.complete();
441
+ }
442
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
443
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsTabsComponent, isStandalone: true, selector: "libs_ui-components-tabs", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: true, transformFunction: null }, keySelected: { classPropertyName: "keySelected", publicName: "keySelected", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, fieldKey: { classPropertyName: "fieldKey", publicName: "fieldKey", isSignal: true, isRequired: false, transformFunction: null }, fieldLabel: { classPropertyName: "fieldLabel", publicName: "fieldLabel", 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 }, heightTabItem: { classPropertyName: "heightTabItem", publicName: "heightTabItem", isSignal: true, isRequired: false, transformFunction: null }, ignoreCalculatorTab: { classPropertyName: "ignoreCalculatorTab", publicName: "ignoreCalculatorTab", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, allowDragDropPosition: { classPropertyName: "allowDragDropPosition", publicName: "allowDragDropPosition", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, configCss: { classPropertyName: "configCss", publicName: "configCss", isSignal: true, isRequired: false, transformFunction: null }, popoverShowMoreTabItem: { classPropertyName: "popoverShowMoreTabItem", publicName: "popoverShowMoreTabItem", isSignal: true, isRequired: false, transformFunction: null }, checkCanChangeTabSelected: { classPropertyName: "checkCanChangeTabSelected", publicName: "checkCanChangeTabSelected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { keySelected: "keySelectedChange", configCss: "configCssChange", outKeySelected: "outKeySelected", outFunctionsControl: "outFunctionsControl", outDragTabChange: "outDragTabChange", outDisplayMoreItem: "outDisplayMoreItem", outAction: "outAction" }, viewQueries: [{ propertyName: "headerEl", first: true, predicate: ["headerEl"], descendants: true, isSignal: true }, { propertyName: "headerLeftEl", first: true, predicate: ["headerLeftEl"], descendants: true, isSignal: true }, { propertyName: "headerRightEl", first: true, predicate: ["headerRightEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"libs-ui-tab\">\n <div\n #headerEl\n class=\"libs-ui-tab-header z-[1] {{ configCss()?.header || '' }} {{ tabs().classIncludeHeader || '' }}\"\n [style.minHeight.px]=\"heightTabItem()\">\n <div\n #headerLeftEl\n class=\"libs-ui-tab-header-left\">\n <ng-content select=\"div.libs-ui-tab-header-left\"></ng-content>\n </div>\n <div class=\"libs-ui-tab-header-center {{ configCss()?.headerCenter || '' }} {{ tabs().classIncludeHeaderCenter || '' }}\">\n <div\n class=\"!flex w-full\"\n #elementContainerEl\n LibsUiComponentsDragContainerDirective\n [stylesOverride]=\"stylesDragDropOverrideComputed()\"\n [groupName]=\"groupName()\"\n [(items)]=\"itemsDisplay\"\n [directionDrag]=\"'horizontal'\"\n [disableDragContainer]=\"!allowDragDropPosition()\"\n [acceptDragSameGroup]=\"allowDragDropPosition()\"\n (outDroppedContainer)=\"handlerDropContainer($event)\">\n @for (item of itemsDisplay(); track item) {\n <div\n LibsUiDragItemDirective\n [disable]=\"disable() || !allowDragDropPosition()\"\n [elementContainer]=\"elementContainerEl\"\n [dragBoundary]=\"true\"\n [dragBoundaryAcceptMouseLeaveContainer]=\"true\"\n class=\"relative libs-ui-tab-item-container\"\n [style.width.px]=\"mode() === 'space-between' ? elementContainerEl.clientWidth / (itemsDisplay().length || 1) : undefined\"\n [class.flex]=\"mode() === 'center-has-line'\"\n [class.items-center]=\"mode() === 'center-has-line'\">\n @if (allowDragDropPosition() && !disable()) {\n <span class=\"libs-ui-icon-arrange text-[#9ca2ad] absolute top-[14px] left-[4px]\"></span>\n }\n <libs_ui-components-tabs-item\n class=\"h-full w-full {{ tabs().classIncludeItem || '' }}\"\n [tabs]=\"tabs()\"\n [size]=\"size()\"\n [(item)]=\"item\"\n [step]=\"$index + 1\"\n [class.!pointer-events-none]=\"item().disable || disable()\"\n [disable]=\"item().disable || disable()\"\n [disableLabel]=\"disableLabel()\"\n [keySelected]=\"keySelected()\"\n [fieldLabel]=\"fieldLabel()\"\n [fieldKey]=\"fieldKey()\"\n [cssDefault]=\"($first ? configCss()?.first : configCss()?.other) || ''\"\n [zIndex]=\"zIndex()\"\n [mode]=\"mode()\"\n [ignoreCalculatorTab]=\"true\"\n [changeViewTab]=\"changeViewTab\"\n (click)=\"handlerClickItem(item)\"\n (outAction)=\"handlerAction($event)\" />\n @if (mode() === 'center-has-line' && !$last) {\n <div class=\"w-[40px] h-[1px] bg-[#e6e7ea]\"></div>\n }\n </div>\n }\n </div>\n </div>\n <div\n class=\"flex items-center\"\n [class.ml-auto]=\"displayMoreItem() && !tabs().viewMoreIgnoreMarginLeft\">\n @if (displayMoreItem()) {\n <libs_ui-components-popover\n class=\"w-full h-full flex items-center\"\n [mode]=\"'click-toggle'\"\n [ignoreHiddenPopoverContentWhenMouseLeave]=\"true\"\n [config]=\"{\n zIndex: popoverShowMoreTabItem()?.config?.zIndex || 1000,\n maxHeight: popoverShowMoreTabItem()?.config?.maxHeight || 287,\n maxWidth: popoverShowMoreTabItem()?.config?.maxWidth || 2048,\n width: popoverShowMoreTabItem()?.config?.width || 277,\n direction: popoverShowMoreTabItem()?.config?.direction || 'bottom',\n template: popoverShowMoreTabItem()?.config?.template || menuEl,\n whiteTheme: true,\n ignoreArrow: true,\n position: popoverShowMoreTabItem()?.config?.position || { mode: 'end', distance: 0 },\n }\"\n (outFunctionsControl)=\"handlerPopoverFunctionControlEvent($event)\">\n <libs_ui-components-buttons-button\n [type]=\"'button-link-third'\"\n [classInclude]=\"'!p-[8px]'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-more-vertical rotate-90 text-[16px] mr-0'\"\n [popover]=\"{ config: { content: popoverShowMoreTabItem()?.config?.content || 'i18n_view_more' } }\"\n [ignoreStopPropagationEvent]=\"true\" />\n </libs_ui-components-popover>\n }\n </div>\n <div\n #headerRightEl\n class=\"libs-ui-tab-header-right {{ tabs().classIncludeHeaderRight || '' }}\">\n <ng-content select=\"div.libs-ui-tab-header-right\"></ng-content>\n </div>\n </div>\n <div class=\"absolute top-0 z-0 w-full\">\n <div\n class=\"libs-ui-tab-header {{ configCss()?.header || '' }} {{ tabs().classIncludeHeader || '' }}\"\n [style.minHeight.px]=\"heightTabItem()\">\n <div class=\"libs-ui-tab-header-center {{ configCss()?.headerCenter || '' }} {{ tabs().classIncludeHeaderCenter || '' }}\">\n @for (item of tabs().items(); track item) {\n <libs_ui-components-tabs-item\n class=\"h-full w-full {{ tabs().classIncludeItem || '' }}\"\n [tabs]=\"tabs()\"\n [size]=\"size()\"\n [(item)]=\"item\"\n [step]=\"$index + 1\"\n [disable]=\"disable()\"\n [disableLabel]=\"disableLabel()\"\n [keySelected]=\"keySelected()\"\n [fieldLabel]=\"fieldLabel()\"\n [fieldKey]=\"fieldKey()\"\n [cssDefault]=\"($first ? configCss()?.first : configCss()?.other) || ''\"\n [zIndex]=\"zIndex()\"\n [mode]=\"mode()\"\n [changeViewTab]=\"changeViewTab\"\n [ignoreCalculatorTab]=\"ignoreCalculatorTab()\" />\n }\n </div>\n </div>\n </div>\n</div>\n<ng-template #menuEl>\n <libs_ui-components-list\n [config]=\"tabMoreListConfig()\"\n [maxItemShow]=\"5\"\n [hiddenInputSearch]=\"true\"\n [paddingLeftItem]=\"true\"\n (outSelectKey)=\"handlerSelectedKey($event)\" />\n</ng-template>\n", styles: [".libs-ui-tab{position:relative;display:flex;width:100%}.libs-ui-tab .libs-ui-tab-header{position:relative;background-color:#fff;display:flex;flex-wrap:nowrap;width:100%;overflow:hidden;flex-shrink:0}.libs-ui-tab .libs-ui-tab-header .libs-ui-tab-header-center{display:flex;flex-wrap:nowrap}.libs-ui-tab .libs-ui-tab-header .libs-ui-tab-item-container .libs-ui-icon-arrange{display:none}.libs-ui-tab .libs-ui-tab-header .libs-ui-tab-item-container:hover .libs-ui-icon-arrange{display:block}.libs-ui-tab .libs-ui-tab-content-container{width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: LibsUiComponentsDragContainerDirective, selector: "[LibsUiComponentsDragContainerDirective]", inputs: ["disableDragContainer", "mode", "directionDrag", "viewEncapsulation", "acceptDragSameGroup", "placeholder", "groupName", "dropToGroupName", "items", "stylesOverride"], outputs: ["itemsChange", "outDragStartContainer", "outDragOverContainer", "outDragLeaveContainer", "outDragEndContainer", "outDroppedContainer", "outDroppedContainerEmpty", "outFunctionControl"] }, { kind: "directive", type: LibsUiDragItemDirective, selector: "[LibsUiDragItemDirective]", inputs: ["fieldId", "item", "itemInContainerVirtualScroll", "throttleTimeHandlerDraggingEvent", "ignoreStopEvent", "onlyMouseDownStopEvent", "dragRootElement", "dragBoundary", "dragBoundaryAcceptMouseLeaveContainer", "elementContainer", "zIndex", "disable"], outputs: ["outDragStart", "outDragOver", "outDragLeave", "outDragEnd", "outDropped"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsTabsItemComponent, selector: "libs_ui-components-tabs-item", inputs: ["ignoreCalculatorTab", "step", "mode", "tabs", "item", "keySelected", "fieldLabel", "fieldKey", "cssDefault", "size", "disable", "disableLabel", "zIndex", "changeViewTab"], outputs: ["itemChange", "outAction"] }, { kind: "component", type: LibsUiComponentsListComponent, selector: "libs_ui-components-list", inputs: ["hiddenInputSearch", "dropdownTabKeyActive", "keySearch", "paddingLeftItem", "config", "autoSelectedFirstItemCallOutsideBefore", "isSearchOnline", "disable", "disableLabel", "labelConfig", "searchConfig", "searchPadding", "dividerClassInclude", "hasDivider", "buttonsOther", "hasButtonUnSelectOption", "clickExactly", "backgroundListCustom", "maxItemShow", "keySelected", "multiKeySelected", "keysDisableItem", "keysHiddenItem", "focusInputSearch", "skipFocusInputWhenKeySearchStoreUndefined", "functionGetItemsAutoAddList", "validRequired", "showValidateBottom", "zIndex", "loadingIconSize", "templateRefSearchNoData", "resetKeyWhenSelectAllKeyDropdown", "ignoreClassDisableDefaultWhenUseKeysDisableItem"], outputs: ["outSelectKey", "outSelectMultiKey", "outUnSelectMultiKey", "outClickButtonOther", "outFieldKey", "outChangeView", "outKeySearch", "outLoading", "outFunctionsControl", "outChangStageFlagMousePopover", "outLoadItemsComplete"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
444
+ }
445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsTabsComponent, decorators: [{
446
+ type: Component,
447
+ args: [{ selector: 'libs_ui-components-tabs', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [LibsUiComponentsDragContainerDirective, LibsUiDragItemDirective, LibsUiComponentsPopoverComponent, LibsUiComponentsButtonsButtonComponent, LibsUiComponentsTabsItemComponent, LibsUiComponentsListComponent], template: "<div class=\"libs-ui-tab\">\n <div\n #headerEl\n class=\"libs-ui-tab-header z-[1] {{ configCss()?.header || '' }} {{ tabs().classIncludeHeader || '' }}\"\n [style.minHeight.px]=\"heightTabItem()\">\n <div\n #headerLeftEl\n class=\"libs-ui-tab-header-left\">\n <ng-content select=\"div.libs-ui-tab-header-left\"></ng-content>\n </div>\n <div class=\"libs-ui-tab-header-center {{ configCss()?.headerCenter || '' }} {{ tabs().classIncludeHeaderCenter || '' }}\">\n <div\n class=\"!flex w-full\"\n #elementContainerEl\n LibsUiComponentsDragContainerDirective\n [stylesOverride]=\"stylesDragDropOverrideComputed()\"\n [groupName]=\"groupName()\"\n [(items)]=\"itemsDisplay\"\n [directionDrag]=\"'horizontal'\"\n [disableDragContainer]=\"!allowDragDropPosition()\"\n [acceptDragSameGroup]=\"allowDragDropPosition()\"\n (outDroppedContainer)=\"handlerDropContainer($event)\">\n @for (item of itemsDisplay(); track item) {\n <div\n LibsUiDragItemDirective\n [disable]=\"disable() || !allowDragDropPosition()\"\n [elementContainer]=\"elementContainerEl\"\n [dragBoundary]=\"true\"\n [dragBoundaryAcceptMouseLeaveContainer]=\"true\"\n class=\"relative libs-ui-tab-item-container\"\n [style.width.px]=\"mode() === 'space-between' ? elementContainerEl.clientWidth / (itemsDisplay().length || 1) : undefined\"\n [class.flex]=\"mode() === 'center-has-line'\"\n [class.items-center]=\"mode() === 'center-has-line'\">\n @if (allowDragDropPosition() && !disable()) {\n <span class=\"libs-ui-icon-arrange text-[#9ca2ad] absolute top-[14px] left-[4px]\"></span>\n }\n <libs_ui-components-tabs-item\n class=\"h-full w-full {{ tabs().classIncludeItem || '' }}\"\n [tabs]=\"tabs()\"\n [size]=\"size()\"\n [(item)]=\"item\"\n [step]=\"$index + 1\"\n [class.!pointer-events-none]=\"item().disable || disable()\"\n [disable]=\"item().disable || disable()\"\n [disableLabel]=\"disableLabel()\"\n [keySelected]=\"keySelected()\"\n [fieldLabel]=\"fieldLabel()\"\n [fieldKey]=\"fieldKey()\"\n [cssDefault]=\"($first ? configCss()?.first : configCss()?.other) || ''\"\n [zIndex]=\"zIndex()\"\n [mode]=\"mode()\"\n [ignoreCalculatorTab]=\"true\"\n [changeViewTab]=\"changeViewTab\"\n (click)=\"handlerClickItem(item)\"\n (outAction)=\"handlerAction($event)\" />\n @if (mode() === 'center-has-line' && !$last) {\n <div class=\"w-[40px] h-[1px] bg-[#e6e7ea]\"></div>\n }\n </div>\n }\n </div>\n </div>\n <div\n class=\"flex items-center\"\n [class.ml-auto]=\"displayMoreItem() && !tabs().viewMoreIgnoreMarginLeft\">\n @if (displayMoreItem()) {\n <libs_ui-components-popover\n class=\"w-full h-full flex items-center\"\n [mode]=\"'click-toggle'\"\n [ignoreHiddenPopoverContentWhenMouseLeave]=\"true\"\n [config]=\"{\n zIndex: popoverShowMoreTabItem()?.config?.zIndex || 1000,\n maxHeight: popoverShowMoreTabItem()?.config?.maxHeight || 287,\n maxWidth: popoverShowMoreTabItem()?.config?.maxWidth || 2048,\n width: popoverShowMoreTabItem()?.config?.width || 277,\n direction: popoverShowMoreTabItem()?.config?.direction || 'bottom',\n template: popoverShowMoreTabItem()?.config?.template || menuEl,\n whiteTheme: true,\n ignoreArrow: true,\n position: popoverShowMoreTabItem()?.config?.position || { mode: 'end', distance: 0 },\n }\"\n (outFunctionsControl)=\"handlerPopoverFunctionControlEvent($event)\">\n <libs_ui-components-buttons-button\n [type]=\"'button-link-third'\"\n [classInclude]=\"'!p-[8px]'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-more-vertical rotate-90 text-[16px] mr-0'\"\n [popover]=\"{ config: { content: popoverShowMoreTabItem()?.config?.content || 'i18n_view_more' } }\"\n [ignoreStopPropagationEvent]=\"true\" />\n </libs_ui-components-popover>\n }\n </div>\n <div\n #headerRightEl\n class=\"libs-ui-tab-header-right {{ tabs().classIncludeHeaderRight || '' }}\">\n <ng-content select=\"div.libs-ui-tab-header-right\"></ng-content>\n </div>\n </div>\n <div class=\"absolute top-0 z-0 w-full\">\n <div\n class=\"libs-ui-tab-header {{ configCss()?.header || '' }} {{ tabs().classIncludeHeader || '' }}\"\n [style.minHeight.px]=\"heightTabItem()\">\n <div class=\"libs-ui-tab-header-center {{ configCss()?.headerCenter || '' }} {{ tabs().classIncludeHeaderCenter || '' }}\">\n @for (item of tabs().items(); track item) {\n <libs_ui-components-tabs-item\n class=\"h-full w-full {{ tabs().classIncludeItem || '' }}\"\n [tabs]=\"tabs()\"\n [size]=\"size()\"\n [(item)]=\"item\"\n [step]=\"$index + 1\"\n [disable]=\"disable()\"\n [disableLabel]=\"disableLabel()\"\n [keySelected]=\"keySelected()\"\n [fieldLabel]=\"fieldLabel()\"\n [fieldKey]=\"fieldKey()\"\n [cssDefault]=\"($first ? configCss()?.first : configCss()?.other) || ''\"\n [zIndex]=\"zIndex()\"\n [mode]=\"mode()\"\n [changeViewTab]=\"changeViewTab\"\n [ignoreCalculatorTab]=\"ignoreCalculatorTab()\" />\n }\n </div>\n </div>\n </div>\n</div>\n<ng-template #menuEl>\n <libs_ui-components-list\n [config]=\"tabMoreListConfig()\"\n [maxItemShow]=\"5\"\n [hiddenInputSearch]=\"true\"\n [paddingLeftItem]=\"true\"\n (outSelectKey)=\"handlerSelectedKey($event)\" />\n</ng-template>\n", styles: [".libs-ui-tab{position:relative;display:flex;width:100%}.libs-ui-tab .libs-ui-tab-header{position:relative;background-color:#fff;display:flex;flex-wrap:nowrap;width:100%;overflow:hidden;flex-shrink:0}.libs-ui-tab .libs-ui-tab-header .libs-ui-tab-header-center{display:flex;flex-wrap:nowrap}.libs-ui-tab .libs-ui-tab-header .libs-ui-tab-item-container .libs-ui-icon-arrange{display:none}.libs-ui-tab .libs-ui-tab-header .libs-ui-tab-item-container:hover .libs-ui-icon-arrange{display:block}.libs-ui-tab .libs-ui-tab-content-container{width:100%;height:100%}\n"] }]
448
+ }] });
449
+
450
+ /**
451
+ * Generated bundle index. Do not edit.
452
+ */
453
+
454
+ export { LibsUiComponentsTabsComponent };
455
+ //# sourceMappingURL=libs-ui-components-tabs.mjs.map