@libs-ui/components-tabs 0.2.10-6.2

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,447 @@
1
+ import * as i0 from '@angular/core';
2
+ import { computed, signal, input, model, output, inject, ElementRef, effect, untracked, Component, ChangeDetectionStrategy, 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 { returnListObject } from '@libs-ui/services-http-request';
14
+
15
+ class LibsUiComponentsTabsItemComponent {
16
+ /* PROPERTY */
17
+ labelComputed = computed(() => escapeHtml(this.translateService.instant(this.item()[this.fieldLabel()])));
18
+ actionShowing = signal(false);
19
+ mutationObserver = signal(undefined);
20
+ mutationObserverSubject = new Subject();
21
+ onDestroy = new Subject();
22
+ popoverFunctionControlEvent = signal(undefined);
23
+ /* INPUT */
24
+ ignoreCalculatorTab = input.required();
25
+ step = input.required();
26
+ mode = input.required();
27
+ tabs = input.required();
28
+ item = model.required();
29
+ keySelected = input.required();
30
+ fieldLabel = input.required();
31
+ fieldKey = input.required();
32
+ cssDefault = input.required();
33
+ size = input.required();
34
+ disable = input();
35
+ disableLabel = input();
36
+ zIndex = input();
37
+ changeViewTab = input.required();
38
+ /* OUTPUT */
39
+ outAction = output();
40
+ /* INJECT*/
41
+ element = inject(ElementRef);
42
+ translateService = inject(TranslateService);
43
+ constructor() {
44
+ effect(() => {
45
+ if (this.mode() !== 'left' || this.ignoreCalculatorTab()) {
46
+ return;
47
+ }
48
+ untracked(() => {
49
+ this.updateSpecificWidth();
50
+ this.mutationObserver()?.disconnect();
51
+ this.mutationObserverSubject.pipe(debounceTime(10)).subscribe(() => this.updateSpecificWidth());
52
+ this.mutationObserver.set(new MutationObserver(() => this.mutationObserverSubject.next()));
53
+ this.mutationObserver()?.observe(this.element.nativeElement, { attributes: true, childList: true, subtree: true });
54
+ });
55
+ });
56
+ }
57
+ ngOnInit() {
58
+ if (!this.item().key) {
59
+ this.item.update(item => ({ ...item, key: uuid() }));
60
+ }
61
+ }
62
+ /* FUNCTIONS */
63
+ updateSpecificWidth() {
64
+ const preSpecificWidth = this.item().specificWidth;
65
+ const width = this.element.nativeElement.offsetWidth;
66
+ if (width && preSpecificWidth !== width) {
67
+ this.item.update(item => ({ ...item, specificWidth: width }));
68
+ this.changeViewTab().next();
69
+ }
70
+ }
71
+ handlerImgError(event) {
72
+ event.stopPropagation();
73
+ event.target.src = this.item().linkImageError;
74
+ }
75
+ handlerSelectedKey(event) {
76
+ if (!event) {
77
+ return;
78
+ }
79
+ this.outAction.emit({ item: this.item(), key: event.key });
80
+ this.popoverFunctionControlEvent()?.removePopoverOverlay();
81
+ }
82
+ handlerPopoverFunctionControlEvent(event) {
83
+ this.popoverFunctionControlEvent.set(event);
84
+ }
85
+ handlerPopoverEvent(event) {
86
+ if (event === 'show' || event === 'remove') {
87
+ this.actionShowing.set(event === 'show');
88
+ }
89
+ }
90
+ handlerClickButton(event, type) {
91
+ event.stopPropagation();
92
+ if (type === 'remove') {
93
+ this.outAction.emit({ key: 'remove', item: this.item() });
94
+ return;
95
+ }
96
+ const action = this.item()[type]?.action;
97
+ if (action) {
98
+ action(this.item());
99
+ }
100
+ }
101
+ ngOnDestroy() {
102
+ this.mutationObserver()?.disconnect();
103
+ this.onDestroy.next();
104
+ this.onDestroy.complete();
105
+ }
106
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTabsItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
107
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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 #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]=\"!!(item.disable || disable())\"\n [class.libs-ui-tab-header-center-item-hover]=\"!tabs().ignoreShowLineBottomInTab\"\n [class.libs-ui-tab-header-center-item-action-show]=\"actionShowing()\"\n [class.cursor-pointer]=\"!item.disable && !disable()\">\n @if (tabs().hasImage) {\n <img 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\"\n [src]=\"item.linkImage\"\n [attr.key]=\"item[fieldKey()]\"\n (error)=\"handlerImgError($event)\" />\n }\n @if (item.iconLeft) {\n <i 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\">\n </i>\n }\n @if (item.is_pin) {\n <i 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\">\n </i>\n }\n @if (tabs().hasStep) {\n @if (tabs().stepHasBackGround) {\n <div class=\"libs-ui-tab-header-center-item-step !border-none libs-ui-font-h6m\"\n [class.cursor-default]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\"\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 || item.disable || 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]]=\"item.disable || disable()\">{{ step() }}</span>\n }\n </div>\n } @else {\n <div 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\">\n <span>{{ step() }}</span>\n </div>\n }\n }\n @if (item.configButtonLeft) {\n <libs_ui-components-buttons-button [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 class=\"relative flex\"\n [style.maxWidth.px]=\"tabs().maxWidthTextLabelItem || 160\">\n <span 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') + \n (disableLabel() && (item.disable || disable()) ? ' libs-ui-disable' : '') \n + (tabs().stepHasBackGround && (item.disable || disable()) ? ' text-[#cdd0d6] cursor-default' : '')\"\n [innerHTML]=\"labelComputed()\"></span>\n @if (item.hasRedDot) {\n <div class=\"absolute right-[-6px] top-[-2px] w-[6px] h-[6px] bg-[#ee2d41] rounded-[6px]\">\n </div>\n }\n </div>\n }\n @if (item.popover) {\n <i class=\"libs-ui-tab-header-center-item-icon ml-[8px] libs-ui-icon-tooltip-outline\"\n LibsUiComponentsPopoverDirective\n [config]=\"item.popover\"\n [class.libs-ui-disable]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\">\n </i>\n }\n @if (item.iconRight) {\n <i 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\">\n </i>\n }\n @if (item.count !== undefined) {\n <libs_ui-components-badge [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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\" />\n }\n @if (item.configButtonRight) {\n <libs_ui-components-buttons-button [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 [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 [class.pointer-events-none]=\"item.disable || disable() || item[fieldKey()] !== keySelected()\"\n [mode]=\"'click-toggle'\"\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 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 [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'\">\n </i>\n }\n </libs_ui-components-popover>\n <ng-template #actionEl>\n <libs_ui-components-list [config]=\"right.listViewConfig()\"\n [maxItemShow]=\"5\"\n [hiddenInputSearch]=\"true\"\n [paddingLeftItem]=\"true\"\n (outSelectKey)=\"handlerSelectedKey($event)\" />\n </ng-template>\n }\n @if (tabs().allowRemove && tabs().items().length > 1) {\n <libs_ui-components-buttons-button [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{color:#6a7383}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][completed=true]:before{color:#6a7383}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][active=true]:before{color:var(--libs-ui-color-default, #226ff5)}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][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: "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: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "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", "itemChangeUnSelect", "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", "outLoading", "outFunctionsControl", "outChangStageFlagMousePopover", "outLoadItemsComplete"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
108
+ }
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTabsItemComponent, decorators: [{
110
+ type: Component,
111
+ args: [{ selector: 'libs_ui-components-tabs-item', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
112
+ LibsUiComponentsButtonsButtonComponent,
113
+ LibsUiComponentsPopoverComponent,
114
+ LibsUiComponentsBadgeComponent,
115
+ LibsUiComponentsListComponent,
116
+ LibsUiPipesCallFunctionInTemplatePipe
117
+ ], template: " @if (item(); as item) {\n <div #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]=\"!!(item.disable || disable())\"\n [class.libs-ui-tab-header-center-item-hover]=\"!tabs().ignoreShowLineBottomInTab\"\n [class.libs-ui-tab-header-center-item-action-show]=\"actionShowing()\"\n [class.cursor-pointer]=\"!item.disable && !disable()\">\n @if (tabs().hasImage) {\n <img 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\"\n [src]=\"item.linkImage\"\n [attr.key]=\"item[fieldKey()]\"\n (error)=\"handlerImgError($event)\" />\n }\n @if (item.iconLeft) {\n <i 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\">\n </i>\n }\n @if (item.is_pin) {\n <i 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\">\n </i>\n }\n @if (tabs().hasStep) {\n @if (tabs().stepHasBackGround) {\n <div class=\"libs-ui-tab-header-center-item-step !border-none libs-ui-font-h6m\"\n [class.cursor-default]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\"\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 || item.disable || 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]]=\"item.disable || disable()\">{{ step() }}</span>\n }\n </div>\n } @else {\n <div 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\">\n <span>{{ step() }}</span>\n </div>\n }\n }\n @if (item.configButtonLeft) {\n <libs_ui-components-buttons-button [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 class=\"relative flex\"\n [style.maxWidth.px]=\"tabs().maxWidthTextLabelItem || 160\">\n <span 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') + \n (disableLabel() && (item.disable || disable()) ? ' libs-ui-disable' : '') \n + (tabs().stepHasBackGround && (item.disable || disable()) ? ' text-[#cdd0d6] cursor-default' : '')\"\n [innerHTML]=\"labelComputed()\"></span>\n @if (item.hasRedDot) {\n <div class=\"absolute right-[-6px] top-[-2px] w-[6px] h-[6px] bg-[#ee2d41] rounded-[6px]\">\n </div>\n }\n </div>\n }\n @if (item.popover) {\n <i class=\"libs-ui-tab-header-center-item-icon ml-[8px] libs-ui-icon-tooltip-outline\"\n LibsUiComponentsPopoverDirective\n [config]=\"item.popover\"\n [class.libs-ui-disable]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\"\n [attr.active]=\"item[fieldKey()] === keySelected()\"\n [attr.completed]=\"step() <= (tabs().stepCompleted || -1)\">\n </i>\n }\n @if (item.iconRight) {\n <i 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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\">\n </i>\n }\n @if (item.count !== undefined) {\n <libs_ui-components-badge [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]=\"item.disable || disable()\"\n [class.pointer-events-none]=\"item.disable || disable()\" />\n }\n @if (item.configButtonRight) {\n <libs_ui-components-buttons-button [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 [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 [class.pointer-events-none]=\"item.disable || disable() || item[fieldKey()] !== keySelected()\"\n [mode]=\"'click-toggle'\"\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 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 [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'\">\n </i>\n }\n </libs_ui-components-popover>\n <ng-template #actionEl>\n <libs_ui-components-list [config]=\"right.listViewConfig()\"\n [maxItemShow]=\"5\"\n [hiddenInputSearch]=\"true\"\n [paddingLeftItem]=\"true\"\n (outSelectKey)=\"handlerSelectedKey($event)\" />\n </ng-template>\n }\n @if (tabs().allowRemove && tabs().items().length > 1) {\n <libs_ui-components-buttons-button [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{color:#6a7383}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][completed=true]:before{color:#6a7383}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][active=true]:before{color:var(--libs-ui-color-default, #226ff5)}.libs-ui-tab-header-center-item i[class*=libs-ui-icon-][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"] }]
118
+ }], ctorParameters: () => [] });
119
+
120
+ const tabMoreListConfig = (translate, fieldKey, fieldLabel, tabs, disable) => {
121
+ return {
122
+ type: 'text',
123
+ httpRequestData: signal({
124
+ serviceOther: returnListObject(tabs.items().filter(item => !item().specificDisplay).map(item => item())),
125
+ functionName: 'listObservable',
126
+ argumentsValue: []
127
+ }),
128
+ configTemplateText: signal({
129
+ fieldKey: fieldKey || 'key',
130
+ getClassItem: () => '!py-[12px]',
131
+ classRows: 'w-full',
132
+ notUseVirtualScroll: true,
133
+ rows: convertObjectToSignal([{
134
+ classCols: 'flex items-center',
135
+ cols: [
136
+ {
137
+ getPopover: (item) => {
138
+ if (!tabs.hasStep) {
139
+ return;
140
+ }
141
+ const step = (item.order || 0) + 1;
142
+ let classStep = 'bg-[#f8f9fa] text-[#9ca2ad]';
143
+ if (item.invalid) {
144
+ classStep = '!text-[#f15767] !bg-[#fdeaec]';
145
+ }
146
+ if (item.disable || disable) {
147
+ classStep = 'bg-[#f8f9fa] text-[#cdd0d6]';
148
+ }
149
+ return {
150
+ classInclude: 'flex',
151
+ dataView: `
152
+ <div class="libs-ui-font-h6m rounded-full min-w-[24px] min-h-[24px] flex items-center justify-center mr-[8px] ${classStep}">
153
+ ${(step <= (tabs.stepCompleted || -1)) ? `<i class="libs-ui-icon-check text-[#ffffff]"></i>` : `${step}`}
154
+ </div>
155
+ `
156
+ };
157
+ }
158
+ },
159
+ {
160
+ getPopover: (item) => item.iconLeft ? { classInclude: 'flex', dataView: `<i class="${item.iconLeft} text-[16px] mr-[8px]"></i>` } : undefined
161
+ },
162
+ {
163
+ getClassCol: (item) => `libs-ui-font-h6m ${item.invalid ? '!text-[#f15767]' : 'text-[#6a7383]'}`,
164
+ getValue: (data) => of(escapeHtml(translate.instant(data.item[fieldLabel] || ' ')))
165
+ },
166
+ {
167
+ getPopover: (item) => item.popover ? { config: item.popover } : undefined
168
+ },
169
+ {
170
+ getPopover: (item) => item.iconRight ? { classInclude: 'flex', dataView: `<i class="${item.iconRight} text-[16px] ml-[8px]"></i>` } : undefined
171
+ },
172
+ {
173
+ getConfigBadge: (item) => {
174
+ if (isNil(item.count)) {
175
+ return;
176
+ }
177
+ return {
178
+ mode: item.modeCount || 'x+',
179
+ count: item.count,
180
+ maxCount: item.maxCount || 99,
181
+ classCircle: (item.classCircle || 'libs-ui-font-h5r') + (item.invalid ? ' !text-[#f15767] !bg-[#fdeaec]' : '')
182
+ };
183
+ }
184
+ }
185
+ ]
186
+ }])
187
+ })
188
+ };
189
+ };
190
+
191
+ class LibsUiComponentsTabsComponent {
192
+ /* PROPERTY */
193
+ itemsDisplay = signal([]);
194
+ displayMoreItem = signal(false);
195
+ tabMoreListConfig = computed(() => tabMoreListConfig(this.translate, this.fieldKey(), this.fieldLabel(), this.tabs(), this.disable()));
196
+ changeViewTab = new Subject();
197
+ groupName = signal(uuid());
198
+ stylesDragDropOverrideComputed = computed(() => this.updateStylesDragDropOverride());
199
+ popoverFunctionControlEvent = signal(undefined);
200
+ onDestroy = new Subject();
201
+ /* INPUT */
202
+ tabs = input.required();
203
+ keySelected = model.required();
204
+ mode = input('left');
205
+ fieldKey = input('key');
206
+ fieldLabel = input('label');
207
+ disable = input();
208
+ disableLabel = input();
209
+ heightTabItem = input(40);
210
+ ignoreCalculatorTab = input(false);
211
+ size = input('medium');
212
+ allowDragDropPosition = input();
213
+ zIndex = input();
214
+ configCss = model();
215
+ popoverShowMoreTabItem = input();
216
+ checkCanChangeTabSelected = input();
217
+ /* OUTPUT */
218
+ outKeySelected = output();
219
+ outFunctionsControl = output();
220
+ outDragTabChange = output();
221
+ outDisplayMoreItem = output();
222
+ outAction = output();
223
+ /* VIEW CHILD */
224
+ headerEl = viewChild.required('headerEl');
225
+ headerLeftEl = viewChild.required('headerLeftEl');
226
+ headerRightEl = viewChild.required('headerRightEl');
227
+ /* INJECT*/
228
+ translate = inject(TranslateService);
229
+ ngOnInit() {
230
+ this.updateTabsCssConfig();
231
+ this.outFunctionsControl.emit({
232
+ addTabsItem: this.addTabsItem.bind(this),
233
+ calculatorTabsItemsDisplay: this.calculatorTabsItemDisplay.bind(this),
234
+ selectedTabsItem: this.handlerSelectedTabsItem.bind(this)
235
+ });
236
+ if (this.mode() !== 'left' || this.ignoreCalculatorTab()) {
237
+ this.tabs().items().map(item => item.update(data => ({ ...data, specificDisplay: true })));
238
+ this.itemsDisplay.set(this.tabs().items().filter(item => item().specificDisplay));
239
+ return;
240
+ }
241
+ fromEvent(window, 'resize').pipe(debounceTime$1(250), takeUntil(this.onDestroy)).subscribe(() => {
242
+ if (!this.tabs().items().length) {
243
+ return;
244
+ }
245
+ this.displayMoreItem.set(false);
246
+ this.calculatorTabsItemDisplay();
247
+ });
248
+ this.changeViewTab.pipe(debounceTime$1(20), takeUntil(this.onDestroy)).subscribe(() => this.calculatorTabsItemDisplay());
249
+ }
250
+ /* FUNCTIONS */
251
+ updateTabsCssConfig() {
252
+ if (this.configCss()) {
253
+ return;
254
+ }
255
+ switch (this.mode()) {
256
+ case 'left':
257
+ this.configCss.set({
258
+ first: 'ml-[20px] mr-[16px]',
259
+ other: 'ml-[20px] mr-[16px]'
260
+ });
261
+ break;
262
+ case 'center':
263
+ this.configCss.set({
264
+ first: 'px-[12px] ml-[18px] mr-[18px]',
265
+ other: 'px-[12px] mx-[18px]',
266
+ header: 'flex justify-center'
267
+ });
268
+ break;
269
+ case 'center-has-line':
270
+ this.configCss.set({
271
+ first: 'px-[16px]',
272
+ other: 'px-[16px]',
273
+ headerCenter: 'items-center'
274
+ });
275
+ break;
276
+ case 'space-between':
277
+ this.configCss.set({
278
+ first: 'mx-auto',
279
+ other: 'mx-auto',
280
+ headerCenter: 'w-full'
281
+ });
282
+ break;
283
+ }
284
+ }
285
+ updateStylesDragDropOverride() {
286
+ if (this.allowDragDropPosition()) {
287
+ return [
288
+ {
289
+ className: 'libs-ui-drag-drop-item-placeholder',
290
+ styles: ''
291
+ },
292
+ {
293
+ className: 'libs-ui-drag-drop-item',
294
+ styles: 'cursor: move;'
295
+ },
296
+ {
297
+ className: 'libs-ui-drag-drop-item-dragging',
298
+ styles: 'cursor: move; background: #dddddd;'
299
+ }
300
+ ];
301
+ }
302
+ return [
303
+ {
304
+ className: 'libs-ui-drag-drop-item',
305
+ styles: ''
306
+ },
307
+ {
308
+ className: 'libs-ui-drag-drop-item-disable',
309
+ styles: ''
310
+ }
311
+ ];
312
+ }
313
+ handlerDropContainer(event) {
314
+ const { itemDragInfo } = event;
315
+ if (!itemDragInfo) {
316
+ return;
317
+ }
318
+ const items = this.tabs().items;
319
+ const { indexDrag, indexDrop } = itemDragInfo;
320
+ if (isNil(indexDrag) || isNil(indexDrop) || indexDrop === indexDrag) {
321
+ return;
322
+ }
323
+ const itemDrag = items()[indexDrag];
324
+ items.update(items => {
325
+ items.splice(indexDrag, 1);
326
+ items.splice(indexDrop, 0, itemDrag);
327
+ return [...items];
328
+ });
329
+ this.outDragTabChange.emit();
330
+ }
331
+ handlerPopoverFunctionControlEvent(event) {
332
+ this.popoverFunctionControlEvent.set(event);
333
+ }
334
+ async handlerSelectedTabsItem(key, resetDisable = true) {
335
+ const itemSelected = this.tabs().items().find(item => item()[this.fieldKey()] === key);
336
+ if (!itemSelected) {
337
+ return;
338
+ }
339
+ if (resetDisable) {
340
+ itemSelected.update(item => ({ ...item, disable: false }));
341
+ }
342
+ this.handlerClickItem({ stopPropagation: () => { return; } }, itemSelected);
343
+ }
344
+ handlerSelectedKey(event) {
345
+ if (!event) {
346
+ return;
347
+ }
348
+ this.handlerClickItem({ stopPropagation: () => { return; } }, convertObjectToSignal(event.item));
349
+ this.outDragTabChange.emit();
350
+ }
351
+ async handlerClickItem(event, item) {
352
+ event.stopPropagation();
353
+ if (item().disable || this.disable()) {
354
+ return;
355
+ }
356
+ const checkCanChangeTabSelected = this.checkCanChangeTabSelected();
357
+ if (checkCanChangeTabSelected) {
358
+ const state = await checkCanChangeTabSelected();
359
+ if (state) {
360
+ this.changeItemSelected(item);
361
+ }
362
+ return;
363
+ }
364
+ this.changeItemSelected(item);
365
+ }
366
+ changeItemSelected(item) {
367
+ this.keySelected.set(item()[this.fieldKey()]);
368
+ this.outKeySelected.emit(this.keySelected());
369
+ this.popoverFunctionControlEvent()?.removePopoverOverlay();
370
+ this.calculatorTabsItemDisplay();
371
+ }
372
+ async handlerAction(event) {
373
+ this.outAction.emit(event);
374
+ }
375
+ async addTabsItem(item, selected = true, addFirst) {
376
+ const items = this.tabs().items;
377
+ items.update(items => {
378
+ if (addFirst) {
379
+ return [item, ...items];
380
+ }
381
+ return [...items, item];
382
+ });
383
+ if (selected) {
384
+ this.handlerClickItem({ stopPropagation: () => { return; } }, item);
385
+ }
386
+ }
387
+ async calculatorTabsItemDisplay() {
388
+ let items = this.tabs().items();
389
+ const indexItemSelected = items.findIndex(item => item()[this.fieldKey()] === this.keySelected());
390
+ if (indexItemSelected < 0) {
391
+ return;
392
+ }
393
+ this.displayMoreItem.set(false);
394
+ let displayMoreItem = false;
395
+ const headerWidth = this.headerEl().nativeElement.clientWidth || 0;
396
+ const itemSelected = items[indexItemSelected];
397
+ const itemSelectedWidth = itemSelected().specificWidth;
398
+ let totalWidthItemsDisplay = (this.headerLeftEl().nativeElement.clientWidth || 0) + (this.headerRightEl().nativeElement.clientWidth || 0) + 32;
399
+ items.forEach((item, index) => {
400
+ if (!item().specificWidth) {
401
+ return;
402
+ }
403
+ item.update(data => ({ ...data, specificDisplay: false }));
404
+ const itemWidth = item().specificWidth || 0;
405
+ const width = totalWidthItemsDisplay + itemWidth + (index < indexItemSelected ? itemSelectedWidth : 0);
406
+ totalWidthItemsDisplay += itemWidth;
407
+ if (width > headerWidth) {
408
+ displayMoreItem = true;
409
+ return;
410
+ }
411
+ item.update(data => ({ ...data, specificDisplay: true }));
412
+ });
413
+ itemSelected.update(data => ({ ...data, specificDisplay: true }));
414
+ const display = items.filter(item => item().specificDisplay === true);
415
+ const notDisplay = items.filter(item => item().specificDisplay === false);
416
+ items = display.concat(notDisplay);
417
+ items.forEach((item, index) => item.update(data => ({ ...data, order: index })));
418
+ this.tabs().items.set(items.sort((prev, next) => (prev().order || 0) - (next().order || 0)));
419
+ this.displayMoreItem.set(displayMoreItem);
420
+ this.outDisplayMoreItem.emit(this.displayMoreItem());
421
+ this.itemsDisplay.set(this.tabs().items().filter(item => item().specificDisplay));
422
+ }
423
+ ngOnDestroy() {
424
+ this.onDestroy.next();
425
+ this.onDestroy.complete();
426
+ }
427
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
428
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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 #headerEl\n class=\"libs-ui-tab-header z-[1] {{ configCss()?.header || '' }} {{ tabs().classIncludeHeader || '' }}\"\n [style.minHeight.px]=\"heightTabItem()\">\n <div #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 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 LibsUiDragItemDirective\n [disable]=\"disable() || !allowDragDropPosition()\"\n [groupName]=\"groupName()\"\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 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 [ignoreCalculatorTab]=\"true\"\n [changeViewTab]=\"changeViewTab\"\n (click)=\"handlerClickItem($event, 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 class=\"flex items-center\"\n [class.ml-auto]=\"displayMoreItem() && !tabs().viewMoreIgnoreMarginLeft\">\n @if (displayMoreItem()) {\n <libs_ui-components-popover 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 [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 #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 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 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 [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", "groupName", "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", "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: 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", "itemChangeUnSelect", "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", "outLoading", "outFunctionsControl", "outChangStageFlagMousePopover", "outLoadItemsComplete"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
429
+ }
430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTabsComponent, decorators: [{
431
+ type: Component,
432
+ args: [{ selector: 'libs_ui-components-tabs', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
433
+ LibsUiComponentsDragContainerDirective,
434
+ LibsUiDragItemDirective,
435
+ LibsUiComponentsPopoverComponent,
436
+ LibsUiComponentsButtonsButtonComponent,
437
+ LibsUiComponentsTabsItemComponent,
438
+ LibsUiComponentsListComponent
439
+ ], template: "<div class=\"libs-ui-tab\">\n <div #headerEl\n class=\"libs-ui-tab-header z-[1] {{ configCss()?.header || '' }} {{ tabs().classIncludeHeader || '' }}\"\n [style.minHeight.px]=\"heightTabItem()\">\n <div #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 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 LibsUiDragItemDirective\n [disable]=\"disable() || !allowDragDropPosition()\"\n [groupName]=\"groupName()\"\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 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 [ignoreCalculatorTab]=\"true\"\n [changeViewTab]=\"changeViewTab\"\n (click)=\"handlerClickItem($event, 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 class=\"flex items-center\"\n [class.ml-auto]=\"displayMoreItem() && !tabs().viewMoreIgnoreMarginLeft\">\n @if (displayMoreItem()) {\n <libs_ui-components-popover 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 [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 #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 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 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 [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"] }]
440
+ }] });
441
+
442
+ /**
443
+ * Generated bundle index. Do not edit.
444
+ */
445
+
446
+ export { LibsUiComponentsTabsComponent };
447
+ //# sourceMappingURL=libs-ui-components-tabs.mjs.map