@libs-ui/components-tabs 0.2.306 → 0.2.307-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/index.mjs +1 -1
- package/esm2022/interfaces/tab.interface.mjs +1 -1
- package/esm2022/item/item.component.mjs +5 -12
- package/esm2022/tabs.component.mjs +47 -41
- package/esm2022/utils/tabs.mjs +26 -21
- package/fesm2022/libs-ui-components-tabs.mjs +71 -67
- package/fesm2022/libs-ui-components-tabs.mjs.map +1 -1
- package/interfaces/tab.interface.d.ts +7 -7
- package/package.json +10 -10
- package/tabs.component.d.ts +1 -0
- package/utils/tabs.d.ts +3 -3
|
@@ -59,7 +59,7 @@ class LibsUiComponentsTabsItemComponent {
|
|
|
59
59
|
}
|
|
60
60
|
ngOnInit() {
|
|
61
61
|
if (!this.item().key) {
|
|
62
|
-
this.item.update(item => ({ ...item, key: uuid() }));
|
|
62
|
+
this.item.update((item) => ({ ...item, key: uuid() }));
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
/* FUNCTIONS */
|
|
@@ -67,7 +67,7 @@ class LibsUiComponentsTabsItemComponent {
|
|
|
67
67
|
const preSpecificWidth = this.item().specificWidth;
|
|
68
68
|
const width = this.element.nativeElement.offsetWidth;
|
|
69
69
|
if (width && preSpecificWidth !== width) {
|
|
70
|
-
this.item.update(item => ({ ...item, specificWidth: width }));
|
|
70
|
+
this.item.update((item) => ({ ...item, specificWidth: width }));
|
|
71
71
|
this.changeViewTab().next();
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -108,34 +108,31 @@ class LibsUiComponentsTabsItemComponent {
|
|
|
108
108
|
this.onDestroy.complete();
|
|
109
109
|
}
|
|
110
110
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTabsItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
111
|
-
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]=\"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 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 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()\">\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]=\"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.!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 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 [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() && (disable()) ? ' libs-ui-disable' : '') \n + (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]\">\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 [ignoreStopPropagationEvent]=\"true\"\n [class.libs-ui-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]=\"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]=\"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 [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 [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 @if ((0 | LibsUiPipesCallFunctionInTemplatePipe:right.getListViewConfig:item: item[fieldKey()]: {valueIs0: 0} |async) ; as config) {\n <libs_ui-components-list [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 [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 });
|
|
111
|
+
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\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
112
|
}
|
|
113
113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTabsItemComponent, decorators: [{
|
|
114
114
|
type: Component,
|
|
115
|
-
args: [{ selector: 'libs_ui-components-tabs-item', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
116
|
-
AsyncPipe,
|
|
117
|
-
LibsUiComponentsButtonsButtonComponent,
|
|
118
|
-
LibsUiComponentsPopoverComponent,
|
|
119
|
-
LibsUiComponentsBadgeComponent,
|
|
120
|
-
LibsUiComponentsListComponent,
|
|
121
|
-
LibsUiPipesCallFunctionInTemplatePipe
|
|
122
|
-
], 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]=\"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 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 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()\">\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]=\"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.!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 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 [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() && (disable()) ? ' libs-ui-disable' : '') \n + (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]\">\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 [ignoreStopPropagationEvent]=\"true\"\n [class.libs-ui-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]=\"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]=\"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 [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 [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 @if ((0 | LibsUiPipesCallFunctionInTemplatePipe:right.getListViewConfig:item: item[fieldKey()]: {valueIs0: 0} |async) ; as config) {\n <libs_ui-components-list [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 [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"] }]
|
|
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"] }]
|
|
123
116
|
}], ctorParameters: () => [] });
|
|
124
117
|
|
|
125
118
|
const tabMoreListConfig = (translate, fieldKey, fieldLabel, tabs, disable) => {
|
|
126
119
|
return {
|
|
127
120
|
type: 'text',
|
|
128
121
|
httpRequestData: signal({
|
|
129
|
-
serviceOther: returnListObject(tabs
|
|
122
|
+
serviceOther: returnListObject(tabs
|
|
123
|
+
.items()
|
|
124
|
+
.filter((item) => !item().specificDisplay)
|
|
125
|
+
.map((item) => item())),
|
|
130
126
|
functionName: 'listObservable',
|
|
131
|
-
argumentsValue: []
|
|
127
|
+
argumentsValue: [],
|
|
132
128
|
}),
|
|
133
129
|
configTemplateText: signal({
|
|
134
130
|
fieldKey: fieldKey || 'key',
|
|
135
131
|
getClassItem: () => '!py-[12px]',
|
|
136
132
|
classRows: 'w-full',
|
|
137
133
|
notUseVirtualScroll: true,
|
|
138
|
-
rows: convertObjectToSignal([
|
|
134
|
+
rows: convertObjectToSignal([
|
|
135
|
+
{
|
|
139
136
|
classCols: 'flex items-center',
|
|
140
137
|
cols: [
|
|
141
138
|
{
|
|
@@ -155,24 +152,24 @@ const tabMoreListConfig = (translate, fieldKey, fieldLabel, tabs, disable) => {
|
|
|
155
152
|
classInclude: 'flex',
|
|
156
153
|
dataView: `
|
|
157
154
|
<div class="libs-ui-font-h6m rounded-full min-w-[24px] min-h-[24px] flex items-center justify-center mr-[8px] ${classStep}">
|
|
158
|
-
${
|
|
155
|
+
${step <= (tabs.stepCompleted || -1) ? `<i class="libs-ui-icon-check text-[#ffffff]"></i>` : `${step}`}
|
|
159
156
|
</div>
|
|
160
|
-
|
|
157
|
+
`,
|
|
161
158
|
};
|
|
162
|
-
}
|
|
159
|
+
},
|
|
163
160
|
},
|
|
164
161
|
{
|
|
165
|
-
getPopover: (item) => item.iconLeft ? { classInclude: 'flex', dataView: `<i class="${item.iconLeft} text-[16px] mr-[8px]"></i>` } : undefined
|
|
162
|
+
getPopover: (item) => (item.iconLeft ? { classInclude: 'flex', dataView: `<i class="${item.iconLeft} text-[16px] mr-[8px]"></i>` } : undefined),
|
|
166
163
|
},
|
|
167
164
|
{
|
|
168
165
|
getClassCol: (item) => `libs-ui-font-h6m ${item.invalid ? '!text-[#f15767]' : 'text-[#6a7383]'}`,
|
|
169
|
-
getValue: (data) => of(escapeHtml(translate.instant(data.item[fieldLabel] || ' ')))
|
|
166
|
+
getValue: (data) => of(escapeHtml(translate.instant(data.item[fieldLabel] || ' '))),
|
|
170
167
|
},
|
|
171
168
|
{
|
|
172
|
-
getPopover: (item) => item.popover ? { config: item.popover } : undefined
|
|
169
|
+
getPopover: (item) => (item.popover ? { config: item.popover } : undefined),
|
|
173
170
|
},
|
|
174
171
|
{
|
|
175
|
-
getPopover: (item) => item.iconRight ? { classInclude: 'flex', dataView: `<i class="${item.iconRight} text-[16px] ml-[8px]"></i>` } : undefined
|
|
172
|
+
getPopover: (item) => (item.iconRight ? { classInclude: 'flex', dataView: `<i class="${item.iconRight} text-[16px] ml-[8px]"></i>` } : undefined),
|
|
176
173
|
},
|
|
177
174
|
{
|
|
178
175
|
getConfigBadge: (item) => {
|
|
@@ -183,13 +180,14 @@ const tabMoreListConfig = (translate, fieldKey, fieldLabel, tabs, disable) => {
|
|
|
183
180
|
mode: item.modeCount || 'x+',
|
|
184
181
|
count: item.count,
|
|
185
182
|
maxCount: item.maxCount || 99,
|
|
186
|
-
classCircle: (item.classCircle || 'libs-ui-font-h5r') + (item.invalid ? ' !text-[#f15767] !bg-[#fdeaec]' : '')
|
|
183
|
+
classCircle: (item.classCircle || 'libs-ui-font-h5r') + (item.invalid ? ' !text-[#f15767] !bg-[#fdeaec]' : ''),
|
|
187
184
|
};
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
}
|
|
192
|
-
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
]),
|
|
190
|
+
}),
|
|
193
191
|
};
|
|
194
192
|
};
|
|
195
193
|
|
|
@@ -233,17 +231,19 @@ class LibsUiComponentsTabsComponent {
|
|
|
233
231
|
translate = inject(TranslateService);
|
|
234
232
|
ngOnInit() {
|
|
235
233
|
this.updateTabsCssConfig();
|
|
236
|
-
this.outFunctionsControl.emit(
|
|
237
|
-
addTabsItem: this.addTabsItem.bind(this),
|
|
238
|
-
calculatorTabsItemsDisplay: this.calculatorTabsItemDisplay.bind(this),
|
|
239
|
-
selectedTabsItem: this.handlerSelectedTabsItem.bind(this)
|
|
240
|
-
});
|
|
234
|
+
this.outFunctionsControl.emit(this.FunctionsControl);
|
|
241
235
|
if (this.mode() !== 'left' || this.ignoreCalculatorTab()) {
|
|
242
|
-
this.tabs()
|
|
243
|
-
|
|
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));
|
|
244
242
|
return;
|
|
245
243
|
}
|
|
246
|
-
fromEvent(window, 'resize')
|
|
244
|
+
fromEvent(window, 'resize')
|
|
245
|
+
.pipe(debounceTime$1(250), takeUntil(this.onDestroy))
|
|
246
|
+
.subscribe(() => {
|
|
247
247
|
if (!this.tabs().items().length) {
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
@@ -253,6 +253,13 @@ class LibsUiComponentsTabsComponent {
|
|
|
253
253
|
this.changeViewTab.pipe(debounceTime$1(20), takeUntil(this.onDestroy)).subscribe(() => this.calculatorTabsItemDisplay());
|
|
254
254
|
}
|
|
255
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
|
+
}
|
|
256
263
|
updateTabsCssConfig() {
|
|
257
264
|
if (this.configCss()) {
|
|
258
265
|
return;
|
|
@@ -261,28 +268,28 @@ class LibsUiComponentsTabsComponent {
|
|
|
261
268
|
case 'left':
|
|
262
269
|
this.configCss.set({
|
|
263
270
|
first: 'ml-[20px] mr-[16px]',
|
|
264
|
-
other: 'ml-[20px] mr-[16px]'
|
|
271
|
+
other: 'ml-[20px] mr-[16px]',
|
|
265
272
|
});
|
|
266
273
|
break;
|
|
267
274
|
case 'center':
|
|
268
275
|
this.configCss.set({
|
|
269
276
|
first: 'px-[12px] ml-[18px] mr-[18px]',
|
|
270
277
|
other: 'px-[12px] mx-[18px]',
|
|
271
|
-
header: 'flex justify-center'
|
|
278
|
+
header: 'flex justify-center',
|
|
272
279
|
});
|
|
273
280
|
break;
|
|
274
281
|
case 'center-has-line':
|
|
275
282
|
this.configCss.set({
|
|
276
283
|
first: 'px-[16px]',
|
|
277
284
|
other: 'px-[16px]',
|
|
278
|
-
headerCenter: 'items-center'
|
|
285
|
+
headerCenter: 'items-center',
|
|
279
286
|
});
|
|
280
287
|
break;
|
|
281
288
|
case 'space-between':
|
|
282
289
|
this.configCss.set({
|
|
283
290
|
first: 'mx-auto',
|
|
284
291
|
other: 'mx-auto',
|
|
285
|
-
headerCenter: 'w-full'
|
|
292
|
+
headerCenter: 'w-full',
|
|
286
293
|
});
|
|
287
294
|
break;
|
|
288
295
|
}
|
|
@@ -292,27 +299,27 @@ class LibsUiComponentsTabsComponent {
|
|
|
292
299
|
return [
|
|
293
300
|
{
|
|
294
301
|
className: 'libs-ui-drag-drop-item-placeholder',
|
|
295
|
-
styles: ''
|
|
302
|
+
styles: '',
|
|
296
303
|
},
|
|
297
304
|
{
|
|
298
305
|
className: 'libs-ui-drag-drop-item',
|
|
299
|
-
styles: 'cursor: move;'
|
|
306
|
+
styles: 'cursor: move;',
|
|
300
307
|
},
|
|
301
308
|
{
|
|
302
309
|
className: 'libs-ui-drag-drop-item-dragging',
|
|
303
|
-
styles: 'cursor: move; background: #dddddd;'
|
|
304
|
-
}
|
|
310
|
+
styles: 'cursor: move; background: #dddddd;',
|
|
311
|
+
},
|
|
305
312
|
];
|
|
306
313
|
}
|
|
307
314
|
return [
|
|
308
315
|
{
|
|
309
316
|
className: 'libs-ui-drag-drop-item',
|
|
310
|
-
styles: ''
|
|
317
|
+
styles: '',
|
|
311
318
|
},
|
|
312
319
|
{
|
|
313
320
|
className: 'libs-ui-drag-drop-item-disable',
|
|
314
|
-
styles: ''
|
|
315
|
-
}
|
|
321
|
+
styles: '',
|
|
322
|
+
},
|
|
316
323
|
];
|
|
317
324
|
}
|
|
318
325
|
handlerDropContainer(event) {
|
|
@@ -326,7 +333,7 @@ class LibsUiComponentsTabsComponent {
|
|
|
326
333
|
return;
|
|
327
334
|
}
|
|
328
335
|
const itemDrag = items()[indexDrag];
|
|
329
|
-
items.update(items => {
|
|
336
|
+
items.update((items) => {
|
|
330
337
|
items.splice(indexDrag, 1);
|
|
331
338
|
items.splice(indexDrop, 0, itemDrag);
|
|
332
339
|
return [...items];
|
|
@@ -337,12 +344,14 @@ class LibsUiComponentsTabsComponent {
|
|
|
337
344
|
this.popoverFunctionControlEvent.set(event);
|
|
338
345
|
}
|
|
339
346
|
async handlerSelectedTabsItem(key, resetDisable = true) {
|
|
340
|
-
const itemSelected = this.tabs()
|
|
347
|
+
const itemSelected = this.tabs()
|
|
348
|
+
.items()
|
|
349
|
+
.find((item) => item()[this.fieldKey()] === key);
|
|
341
350
|
if (!itemSelected) {
|
|
342
351
|
return;
|
|
343
352
|
}
|
|
344
353
|
if (resetDisable) {
|
|
345
|
-
itemSelected.update(item => ({ ...item, disable: false }));
|
|
354
|
+
itemSelected.update((item) => ({ ...item, disable: false }));
|
|
346
355
|
}
|
|
347
356
|
this.handlerClickItem(itemSelected);
|
|
348
357
|
}
|
|
@@ -378,7 +387,7 @@ class LibsUiComponentsTabsComponent {
|
|
|
378
387
|
}
|
|
379
388
|
async addTabsItem(item, selected = true, addFirst) {
|
|
380
389
|
const items = this.tabs().items;
|
|
381
|
-
items.update(items => {
|
|
390
|
+
items.update((items) => {
|
|
382
391
|
if (addFirst) {
|
|
383
392
|
return [item, ...items];
|
|
384
393
|
}
|
|
@@ -390,7 +399,7 @@ class LibsUiComponentsTabsComponent {
|
|
|
390
399
|
}
|
|
391
400
|
async calculatorTabsItemDisplay() {
|
|
392
401
|
let items = this.tabs().items();
|
|
393
|
-
const indexItemSelected = items.findIndex(item => item()[this.fieldKey()] === this.keySelected());
|
|
402
|
+
const indexItemSelected = items.findIndex((item) => item()[this.fieldKey()] === this.keySelected());
|
|
394
403
|
if (indexItemSelected < 0) {
|
|
395
404
|
return;
|
|
396
405
|
}
|
|
@@ -404,7 +413,7 @@ class LibsUiComponentsTabsComponent {
|
|
|
404
413
|
if (!item().specificWidth) {
|
|
405
414
|
return;
|
|
406
415
|
}
|
|
407
|
-
item.update(data => ({ ...data, specificDisplay: false }));
|
|
416
|
+
item.update((data) => ({ ...data, specificDisplay: false }));
|
|
408
417
|
const itemWidth = item().specificWidth || 0;
|
|
409
418
|
const width = totalWidthItemsDisplay + itemWidth + (index < indexItemSelected ? itemSelectedWidth : 0);
|
|
410
419
|
totalWidthItemsDisplay += itemWidth;
|
|
@@ -412,35 +421,30 @@ class LibsUiComponentsTabsComponent {
|
|
|
412
421
|
displayMoreItem = true;
|
|
413
422
|
return;
|
|
414
423
|
}
|
|
415
|
-
item.update(data => ({ ...data, specificDisplay: true }));
|
|
424
|
+
item.update((data) => ({ ...data, specificDisplay: true }));
|
|
416
425
|
});
|
|
417
|
-
itemSelected.update(data => ({ ...data, specificDisplay: true }));
|
|
418
|
-
const display = items.filter(item => item().specificDisplay === true);
|
|
419
|
-
const notDisplay = items.filter(item => item().specificDisplay === false);
|
|
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);
|
|
420
429
|
items = display.concat(notDisplay);
|
|
421
|
-
items.forEach((item, index) => item.update(data => ({ ...data, order: index })));
|
|
430
|
+
items.forEach((item, index) => item.update((data) => ({ ...data, order: index })));
|
|
422
431
|
this.tabs().items.set(items.sort((prev, next) => (prev().order || 0) - (next().order || 0)));
|
|
423
432
|
this.displayMoreItem.set(displayMoreItem);
|
|
424
433
|
this.outDisplayMoreItem.emit(this.displayMoreItem());
|
|
425
|
-
this.itemsDisplay.set(this.tabs()
|
|
434
|
+
this.itemsDisplay.set(this.tabs()
|
|
435
|
+
.items()
|
|
436
|
+
.filter((item) => item().specificDisplay));
|
|
426
437
|
}
|
|
427
438
|
ngOnDestroy() {
|
|
428
439
|
this.onDestroy.next();
|
|
429
440
|
this.onDestroy.complete();
|
|
430
441
|
}
|
|
431
442
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
432
|
-
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\n 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 [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 [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 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\n 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", "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 });
|
|
443
|
+
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\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 });
|
|
433
444
|
}
|
|
434
445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsTabsComponent, decorators: [{
|
|
435
446
|
type: Component,
|
|
436
|
-
args: [{ selector: 'libs_ui-components-tabs', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
437
|
-
LibsUiComponentsDragContainerDirective,
|
|
438
|
-
LibsUiDragItemDirective,
|
|
439
|
-
LibsUiComponentsPopoverComponent,
|
|
440
|
-
LibsUiComponentsButtonsButtonComponent,
|
|
441
|
-
LibsUiComponentsTabsItemComponent,
|
|
442
|
-
LibsUiComponentsListComponent
|
|
443
|
-
], 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\n 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 [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 [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 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\n 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"] }]
|
|
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"] }]
|
|
444
448
|
}] });
|
|
445
449
|
|
|
446
450
|
/**
|