@libs-ui/components-list 0.2.65 → 0.2.67
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/defines/list.define.d.ts +1 -1
- package/esm2022/list.component.mjs +47 -35
- package/esm2022/templates/checkbox/checkbox.component.mjs +6 -6
- package/esm2022/templates/group/group.component.mjs +46 -44
- package/esm2022/templates/group/item/item.component.mjs +8 -5
- package/esm2022/templates/radio/radio.component.mjs +3 -3
- package/esm2022/templates/tag/tag.component.mjs +2 -2
- package/esm2022/templates/templates.component.abstract.mjs +1 -1
- package/esm2022/templates/text/text.component.mjs +3 -3
- package/fesm2022/libs-ui-components-list.mjs +107 -90
- package/fesm2022/libs-ui-components-list.mjs.map +1 -1
- package/list.component.d.ts +2 -2
- package/package.json +1 -1
- package/templates/group/group.component.d.ts +3 -4
- package/templates/group/item/item.component.d.ts +1 -1
- package/templates/templates.component.abstract.d.ts +1 -1
|
@@ -519,6 +519,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
519
519
|
if (isEmpty(this.config()?.configTemplateCheckbox?.())) {
|
|
520
520
|
return;
|
|
521
521
|
}
|
|
522
|
+
super.ngOnInit();
|
|
522
523
|
this.configTemplateCheckbox.set(this.config()?.configTemplateCheckbox?.());
|
|
523
524
|
this.fieldKey.set(this.configTemplateCheckbox()?.fieldKey ?? this.fieldKeyDefault());
|
|
524
525
|
this.callApiByService();
|
|
@@ -632,7 +633,6 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
632
633
|
this.checkAndEmitMultiKeySelected(item);
|
|
633
634
|
}
|
|
634
635
|
handlerChange(event, item, ignoreDisable = false, isClickManual = true) {
|
|
635
|
-
console.log('handlerChange');
|
|
636
636
|
if (this.configTemplateCheckbox()?.ignoreClickItemUnChecked) {
|
|
637
637
|
const key = item[this.fieldKey()];
|
|
638
638
|
if (this.multiKeySelected()?.includes(key)) {
|
|
@@ -673,7 +673,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
673
673
|
}
|
|
674
674
|
multiKeySelected.forEach((key) => {
|
|
675
675
|
const item = this.store().find(item => item()[this.fieldKey()] === key);
|
|
676
|
-
mapKeys.push({ key, item, isClickManual });
|
|
676
|
+
mapKeys.push({ key, item: convertSignalToObject(item), isClickManual });
|
|
677
677
|
});
|
|
678
678
|
this.outSelectMultiKey.emit({ keys: this.multiKeySelected() || [], mapKeys, isClickManual });
|
|
679
679
|
}
|
|
@@ -763,7 +763,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
763
763
|
return this.items().length;
|
|
764
764
|
}
|
|
765
765
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
766
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListCheckboxComponent, isStandalone: true, selector: "libs_ui-components-list-templates_checkbox", usesInheritance: true, ngImport: i0, template: "@if (configTemplateCheckbox(); as configTemplateCheckbox) {\n <div class=\"flex flex-col w-full h-full\">\n @if (items().length && configTemplateCheckbox.configButtonSelectAndUndSelectItem?.(); as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(true)\" />\n <div class=\"text-[#e6e7ea]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(false)\" />\n </div>\n }\n @if (items().length && configTemplateCheckbox.configCheckboxCheckAll?.(); as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general bg-[#ffffff] pl-[12px] '+(configTemplateCheckbox.classIncludeHasConfigCheckBoxAll ?? 'py-[6px] libs-ui-border-bottom-general')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"(multiKeySelected()?.length && (multiKeySelected()?.length ||0) >= (store().length || -1)) || false\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerSelect($event.checked)\" />\n </div>\n }\n <div #elementScroll\n [class]=\"'relative h-full w-full ' +((!items() || !items().length) ? 'bg-[#ffffff]': configTemplateCheckbox.classListInclude || '')\">\n @if (items() && items().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() && !config()?.ignoreShowDataWhenNotSearch ? heightViewPort()+'px':'100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]; let last = $last) {\n <div [class]=\"last ? (configTemplateCheckbox.classIncludeLastViewItem || '') : ''\">\n <div #itemRef\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [attr.clickExactly]=\"clickExactly\"\n [class]=\"'libs-ui-list-template-checkbox-item flex ' + (configTemplateCheckbox.classItemInclude || '')\"\n [class.w-full]=\"!configTemplateCheckbox.ignoreItemWidth100\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class.pl-[12px]]=\"paddingLeftItem()\"\n [class.py-[6px]]=\"clickExactly()\"\n [class.pr-[4px]]=\"hasScroll() && configTemplateCheckbox.rows\"\n [class.pr-[12px]]=\"!hasScroll() && configTemplateCheckbox.rows\"\n (click)=\"handlerChange($event,item())\">\n <div class=\"flex flex-col w-full\">\n @if (item().fieldLabel) {\n <libs_ui-components-checkbox-single [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [linkImage]=\"configTemplateCheckbox.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImage:item()) | async) : item()[configTemplateCheckbox.fieldGetImage || '']\"\n [linkImageError]=\"configTemplateCheckbox.getImageError ? (('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImageError:item()) | async) : item()[configTemplateCheckbox.fieldGetLinkImageError || '']\"\n [classLabelInclude]=\"item().classLabelInclude || configTemplateCheckbox.classLabelInclude || ''\"\n [zIndexLabel]=\"configTemplateCheckbox.zIndexPopover ?? 1200\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateCheckbox.hasAvatarGroupSocial\"\n [linkImageError]=\"configTemplateCheckbox.fieldGetLinkImageError || ''\"\n [classInclude]=\"configTemplateCheckbox.classInclude || ''\"\n [classImageInclude]=\"configTemplateCheckbox.classIncludeImage || ''\"\n [bullet]=\"item().bullet\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [popover]=\"item().dataPopover\"\n [clickExactly]=\"clickExactly()\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChange('checkbox',item())\"\n (outClickLabel)=\"handlerChange('checkbox',item())\" />\n }\n @if (configTemplateCheckbox?.rows) {\n <libs_ui-components-list-templates_rows class=\"{{ !configTemplateCheckbox.ignoreItemWidth100 ? 'w-full' : '' }} {{ configTemplateCheckbox.classRowsWrapper || configTemplateCheckbox.classRows ?? '' }}\"\n [item]=\"item()\"\n [zIndex]=\"zIndex()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined\"\n [configTemplate]=\"configTemplateCheckbox\"\n (outEvent)=\"handlerChange('checkbox',$event.item)\" />\n }\n </div>\n </div>\n </div>\n }\n </virtual-scroller>\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[4px] px-[12px]')\">\n @if (config()?.hasIconNoData && !loading()) {\n <div class=\"mb-[16px]\">\n <div *ngComponentOutlet=\"(keySearch() ? 'no-result' : 'no-data') | LibsUiIconsGetIconComponentPipe | async\"></div>\n </div>\n }\n @if (!keySearch() && !loading()) {\n <span>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <span>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (loading()) {\n <span> </span>\n }\n\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n </div>\n}\n", styles: [".libs-ui-list-template-checkbox-item{padding:6px 0 6px 16px;margin-right:8px;font-size:12px;line-height:18px;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i1$1.VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["executeRefreshOutsideAngularZone", "enableUnequalChildrenSizes", "RTL", "useMarginInsteadOfTranslate", "modifyOverflowStyleOfParentScroll", "stripedTable", "scrollbarWidth", "scrollbarHeight", "childWidth", "childHeight", "ssrChildWidth", "ssrChildHeight", "ssrViewportWidth", "ssrViewportHeight", "bufferAmount", "scrollAnimationTime", "resizeBypassRefreshThreshold", "scrollThrottlingTime", "scrollDebounceTime", "checkResizeInterval", "items", "compareItems", "horizontal", "parentScroll"], outputs: ["vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsCheckboxSingleComponent, selector: "libs_ui-components-checkbox-single", inputs: ["key", "checked", "label", "classLabelInclude", "ignoreShowPopoverLabel", "typeLabelPopover", "popover", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "classInclude", "clickExactly", "disable", "disableLabel", "ignoreCheckbox", "zIndexLabel", "stillOtherOptions", "error", "showBorderError", "description", "iconImageClass", "classIconInclude", "modeBorder"], outputs: ["checkedChange", "linkImageChange", "outChange", "outEventPopover", "outClickLabel", "outChangStageFlagMousePopover"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "pipe", type: LibsUiIconsGetIconComponentPipe, name: "LibsUiIconsGetIconComponentPipe" }, { kind: "directive", type: LibsUiComponentsListHighlightKeySearchDirective, selector: "[LibsUiComponentsListHighlightKeySearchDirective]", inputs: ["isHighlight", "keySearch", "classHighlight"] }, { kind: "component", type: LibsUiComponentsListRowsComponent, selector: "libs_ui-components-list-templates_rows", inputs: ["configTemplate", "item", "keySelected", "fieldKey", "zIndex"], outputs: ["outChangStageFlagMousePopover", "outEvent"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
766
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListCheckboxComponent, isStandalone: true, selector: "libs_ui-components-list-templates_checkbox", usesInheritance: true, ngImport: i0, template: "@if (configTemplateCheckbox(); as configTemplateCheckbox) {\n <div class=\"flex flex-col w-full h-full\">\n @if (items().length && configTemplateCheckbox.configButtonSelectAndUndSelectItem?.(); as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(true)\" />\n <div class=\"text-[#e6e7ea]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(false)\" />\n </div>\n }\n @if (items().length && configTemplateCheckbox.configCheckboxCheckAll?.(); as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general bg-[#ffffff] pl-[12px] '+(configTemplateCheckbox.classIncludeHasConfigCheckBoxAll ?? 'py-[6px] libs-ui-border-bottom-general')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"(multiKeySelected()?.length && (multiKeySelected()?.length ||0) >= (store().length || -1)) || false\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerSelect($event.checked)\" />\n </div>\n }\n <div #elementScroll\n [class]=\"'relative h-full w-full ' +((!items() || !items().length) ? 'bg-[#ffffff]': configTemplateCheckbox.classListInclude || '')\">\n @if (items() && items().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() && !config()?.ignoreShowDataWhenNotSearch ? heightViewPort()+'px':'100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]; let last = $last) {\n <div [class]=\"last ? (configTemplateCheckbox.classIncludeLastViewItem || '') : ''\">\n <div #itemRef\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [attr.clickExactly]=\"clickExactly\"\n [class]=\"'libs-ui-list-template-checkbox-item flex ' + (configTemplateCheckbox.classItemInclude || '')\"\n [class.w-full]=\"!configTemplateCheckbox.ignoreItemWidth100\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class.!pl-[12px]]=\"paddingLeftItem()\"\n [class.!py-[6px]]=\"clickExactly()\"\n [class.!pr-[4px]]=\"hasScroll() && configTemplateCheckbox.rows\"\n [class.!pr-[12px]]=\"!hasScroll() && configTemplateCheckbox.rows\"\n (click)=\"handlerChange($event,item())\">\n <div class=\"flex flex-col w-full\">\n @if (item().fieldLabel) {\n <libs_ui-components-checkbox-single [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [linkImage]=\"configTemplateCheckbox.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImage:item()) | async) : item()[configTemplateCheckbox.fieldGetImage || '']\"\n [linkImageError]=\"configTemplateCheckbox.getImageError ? (('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImageError:item()) | async) : item()[configTemplateCheckbox.fieldGetLinkImageError || '']\"\n [classLabelInclude]=\"item().classLabelInclude || configTemplateCheckbox.classLabelInclude || ''\"\n [zIndexLabel]=\"configTemplateCheckbox.zIndexPopover ?? 1200\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateCheckbox.hasAvatarGroupSocial\"\n [linkImageError]=\"configTemplateCheckbox.fieldGetLinkImageError || ''\"\n [classInclude]=\"configTemplateCheckbox.classInclude || ''\"\n [classImageInclude]=\"configTemplateCheckbox.classIncludeImage || ''\"\n [bullet]=\"item().bullet\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [popover]=\"item().dataPopover\"\n [clickExactly]=\"clickExactly()\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChange('checkbox',item())\"\n (outClickLabel)=\"handlerChange('checkbox',item())\" />\n }\n @if (configTemplateCheckbox?.rows) {\n <libs_ui-components-list-templates_rows class=\"{{ !configTemplateCheckbox.ignoreItemWidth100 ? 'w-full' : '' }} {{ configTemplateCheckbox.classRowsWrapper || configTemplateCheckbox.classRows ?? '' }}\"\n [item]=\"item()\"\n [zIndex]=\"zIndex()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined\"\n [configTemplate]=\"configTemplateCheckbox\"\n (outEvent)=\"handlerChange('checkbox',$event.item)\" />\n }\n </div>\n </div>\n </div>\n }\n </virtual-scroller>\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[4px] px-[12px]')\">\n @if (config()?.hasIconNoData && !loading()) {\n <div class=\"mb-[16px]\">\n <div *ngComponentOutlet=\"(keySearch() ? 'no-result' : 'no-data') | LibsUiIconsGetIconComponentPipe | async\"></div>\n </div>\n }\n @if (!keySearch() && !loading()) {\n <span>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <span>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (loading()) {\n <span> </span>\n }\n\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n </div>\n}\n", styles: [".libs-ui-list-template-checkbox-item{padding:6px 0 6px 16px;margin-right:8px;font-size:12px;line-height:18px;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i1$1.VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["executeRefreshOutsideAngularZone", "enableUnequalChildrenSizes", "RTL", "useMarginInsteadOfTranslate", "modifyOverflowStyleOfParentScroll", "stripedTable", "scrollbarWidth", "scrollbarHeight", "childWidth", "childHeight", "ssrChildWidth", "ssrChildHeight", "ssrViewportWidth", "ssrViewportHeight", "bufferAmount", "scrollAnimationTime", "resizeBypassRefreshThreshold", "scrollThrottlingTime", "scrollDebounceTime", "checkResizeInterval", "items", "compareItems", "horizontal", "parentScroll"], outputs: ["vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsCheckboxSingleComponent, selector: "libs_ui-components-checkbox-single", inputs: ["key", "checked", "label", "classLabelInclude", "ignoreShowPopoverLabel", "typeLabelPopover", "popover", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "classInclude", "clickExactly", "disable", "disableLabel", "ignoreCheckbox", "zIndexLabel", "stillOtherOptions", "error", "showBorderError", "description", "iconImageClass", "classIconInclude", "modeBorder"], outputs: ["checkedChange", "linkImageChange", "outChange", "outEventPopover", "outClickLabel", "outChangStageFlagMousePopover"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "pipe", type: LibsUiIconsGetIconComponentPipe, name: "LibsUiIconsGetIconComponentPipe" }, { kind: "directive", type: LibsUiComponentsListHighlightKeySearchDirective, selector: "[LibsUiComponentsListHighlightKeySearchDirective]", inputs: ["isHighlight", "keySearch", "classHighlight"] }, { kind: "component", type: LibsUiComponentsListRowsComponent, selector: "libs_ui-components-list-templates_rows", inputs: ["configTemplate", "item", "keySelected", "fieldKey", "zIndex"], outputs: ["outChangStageFlagMousePopover", "outEvent"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
767
767
|
}
|
|
768
768
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListCheckboxComponent, decorators: [{
|
|
769
769
|
type: Component,
|
|
@@ -778,7 +778,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
778
778
|
LibsUiComponentsListHighlightKeySearchDirective,
|
|
779
779
|
LibsUiComponentsListRowsComponent,
|
|
780
780
|
LibsUiPipesCallFunctionInTemplatePipe
|
|
781
|
-
], template: "@if (configTemplateCheckbox(); as configTemplateCheckbox) {\n <div class=\"flex flex-col w-full h-full\">\n @if (items().length && configTemplateCheckbox.configButtonSelectAndUndSelectItem?.(); as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(true)\" />\n <div class=\"text-[#e6e7ea]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(false)\" />\n </div>\n }\n @if (items().length && configTemplateCheckbox.configCheckboxCheckAll?.(); as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general bg-[#ffffff] pl-[12px] '+(configTemplateCheckbox.classIncludeHasConfigCheckBoxAll ?? 'py-[6px] libs-ui-border-bottom-general')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"(multiKeySelected()?.length && (multiKeySelected()?.length ||0) >= (store().length || -1)) || false\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerSelect($event.checked)\" />\n </div>\n }\n <div #elementScroll\n [class]=\"'relative h-full w-full ' +((!items() || !items().length) ? 'bg-[#ffffff]': configTemplateCheckbox.classListInclude || '')\">\n @if (items() && items().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() && !config()?.ignoreShowDataWhenNotSearch ? heightViewPort()+'px':'100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]; let last = $last) {\n <div [class]=\"last ? (configTemplateCheckbox.classIncludeLastViewItem || '') : ''\">\n <div #itemRef\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [attr.clickExactly]=\"clickExactly\"\n [class]=\"'libs-ui-list-template-checkbox-item flex ' + (configTemplateCheckbox.classItemInclude || '')\"\n [class.w-full]=\"!configTemplateCheckbox.ignoreItemWidth100\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class
|
|
781
|
+
], template: "@if (configTemplateCheckbox(); as configTemplateCheckbox) {\n <div class=\"flex flex-col w-full h-full\">\n @if (items().length && configTemplateCheckbox.configButtonSelectAndUndSelectItem?.(); as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(true)\" />\n <div class=\"text-[#e6e7ea]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(false)\" />\n </div>\n }\n @if (items().length && configTemplateCheckbox.configCheckboxCheckAll?.(); as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general bg-[#ffffff] pl-[12px] '+(configTemplateCheckbox.classIncludeHasConfigCheckBoxAll ?? 'py-[6px] libs-ui-border-bottom-general')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"(multiKeySelected()?.length && (multiKeySelected()?.length ||0) >= (store().length || -1)) || false\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerSelect($event.checked)\" />\n </div>\n }\n <div #elementScroll\n [class]=\"'relative h-full w-full ' +((!items() || !items().length) ? 'bg-[#ffffff]': configTemplateCheckbox.classListInclude || '')\">\n @if (items() && items().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() && !config()?.ignoreShowDataWhenNotSearch ? heightViewPort()+'px':'100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]; let last = $last) {\n <div [class]=\"last ? (configTemplateCheckbox.classIncludeLastViewItem || '') : ''\">\n <div #itemRef\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [attr.clickExactly]=\"clickExactly\"\n [class]=\"'libs-ui-list-template-checkbox-item flex ' + (configTemplateCheckbox.classItemInclude || '')\"\n [class.w-full]=\"!configTemplateCheckbox.ignoreItemWidth100\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class.!pl-[12px]]=\"paddingLeftItem()\"\n [class.!py-[6px]]=\"clickExactly()\"\n [class.!pr-[4px]]=\"hasScroll() && configTemplateCheckbox.rows\"\n [class.!pr-[12px]]=\"!hasScroll() && configTemplateCheckbox.rows\"\n (click)=\"handlerChange($event,item())\">\n <div class=\"flex flex-col w-full\">\n @if (item().fieldLabel) {\n <libs_ui-components-checkbox-single [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [linkImage]=\"configTemplateCheckbox.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImage:item()) | async) : item()[configTemplateCheckbox.fieldGetImage || '']\"\n [linkImageError]=\"configTemplateCheckbox.getImageError ? (('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateCheckbox.getImageError:item()) | async) : item()[configTemplateCheckbox.fieldGetLinkImageError || '']\"\n [classLabelInclude]=\"item().classLabelInclude || configTemplateCheckbox.classLabelInclude || ''\"\n [zIndexLabel]=\"configTemplateCheckbox.zIndexPopover ?? 1200\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateCheckbox.hasAvatarGroupSocial\"\n [linkImageError]=\"configTemplateCheckbox.fieldGetLinkImageError || ''\"\n [classInclude]=\"configTemplateCheckbox.classInclude || ''\"\n [classImageInclude]=\"configTemplateCheckbox.classIncludeImage || ''\"\n [bullet]=\"item().bullet\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [popover]=\"item().dataPopover\"\n [clickExactly]=\"clickExactly()\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChange('checkbox',item())\"\n (outClickLabel)=\"handlerChange('checkbox',item())\" />\n }\n @if (configTemplateCheckbox?.rows) {\n <libs_ui-components-list-templates_rows class=\"{{ !configTemplateCheckbox.ignoreItemWidth100 ? 'w-full' : '' }} {{ configTemplateCheckbox.classRowsWrapper || configTemplateCheckbox.classRows ?? '' }}\"\n [item]=\"item()\"\n [zIndex]=\"zIndex()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined\"\n [configTemplate]=\"configTemplateCheckbox\"\n (outEvent)=\"handlerChange('checkbox',$event.item)\" />\n }\n </div>\n </div>\n </div>\n }\n </virtual-scroller>\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[4px] px-[12px]')\">\n @if (config()?.hasIconNoData && !loading()) {\n <div class=\"mb-[16px]\">\n <div *ngComponentOutlet=\"(keySearch() ? 'no-result' : 'no-data') | LibsUiIconsGetIconComponentPipe | async\"></div>\n </div>\n }\n @if (!keySearch() && !loading()) {\n <span>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <span>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (loading()) {\n <span> </span>\n }\n\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n </div>\n}\n", styles: [".libs-ui-list-template-checkbox-item{padding:6px 0 6px 16px;margin-right:8px;font-size:12px;line-height:18px;position:relative}\n"] }]
|
|
782
782
|
}] });
|
|
783
783
|
|
|
784
784
|
class LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe {
|
|
@@ -901,8 +901,11 @@ class LibsUiComponentsListGroupItemComponent {
|
|
|
901
901
|
/* FUNCTIONS */
|
|
902
902
|
handlerToggleExpand(e, item) {
|
|
903
903
|
e.stopPropagation();
|
|
904
|
-
item.
|
|
905
|
-
|
|
904
|
+
item.update(current => {
|
|
905
|
+
current.expand = !current.expand;
|
|
906
|
+
return current;
|
|
907
|
+
});
|
|
908
|
+
this.outChangeView.emit(item().expand);
|
|
906
909
|
}
|
|
907
910
|
handlerChangeView(expand) {
|
|
908
911
|
this.outChangeView.emit(expand);
|
|
@@ -926,7 +929,7 @@ class LibsUiComponentsListGroupItemComponent {
|
|
|
926
929
|
this.outChangStageFlagMouseTooltip.emit(flag);
|
|
927
930
|
}
|
|
928
931
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
929
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListGroupItemComponent, isStandalone: true, selector: "libs_ui-components-list-templates_group-item", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, configTemplateGroup: { classPropertyName: "configTemplateGroup", publicName: "configTemplateGroup", isSignal: true, isRequired: false, transformFunction: null }, keySearch: { classPropertyName: "keySearch", publicName: "keySearch", isSignal: true, isRequired: false, transformFunction: null }, fieldKey: { classPropertyName: "fieldKey", publicName: "fieldKey", isSignal: true, isRequired: false, transformFunction: null }, keysChecked: { classPropertyName: "keysChecked", publicName: "keysChecked", isSignal: true, isRequired: false, transformFunction: null }, keysDisableItem: { classPropertyName: "keysDisableItem", publicName: "keysDisableItem", isSignal: true, isRequired: false, transformFunction: null }, parentItem: { classPropertyName: "parentItem", publicName: "parentItem", 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 }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, keysStillOtherOptions: { classPropertyName: "keysStillOtherOptions", publicName: "keysStillOtherOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outChangeView: "outChangeView", outChange: "outChange", outChangStageFlagMouseTooltip: "outChangStageFlagMouseTooltip" }, ngImport: i0, template: "@if (configTemplateGroup(); as configTemplateGroup) {\n @if ((configTemplateGroup.isViewTree && !!items().length) || (parentItem().maxLevelGroup > 2 && parentItem().level > 1)) {\n <div class='libs-ui-list-group-item-line-vertical'\n [style.left.px]=\"parentItem().level | LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe:parentItem().maxLevelGroup:configTemplateGroup.isViewTree :configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\">\n </div>\n }\n @for (item of items(); track item()[fieldKey()]) {\n <div>\n <div\n [style.marginLeft.px]=\"item().level | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:item().maxLevelGroup:configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\"\n [style.paddingLeft.px]=\"item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe:item().maxLevelGroup:configTemplateGroup.isViewTree:configTemplateGroup.isViewTreeJson:!!item()[configTemplateGroup.fieldGetItems]?.length\"\n [class]=\"'libs-ui-bg-list-hover py-[6px] pr-[16px] flex items-center relative libs-ui-bg-list-hover-active ' + item()?.classInclude\"\n [class.libs-ui-bg-list-active]=\"configTemplateGroup.singleSelectItem && item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [class.libs-ui-disable]=\"configTemplateGroup.allowDisableLabel && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.pointer-events-none]=\"configTemplateGroup.allowDisableLabel && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.cursor-pointer]=\"!disable() && !(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) && !(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.libs-ui-bg-list-active]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.hasBackgroundColorWhenItemSelected && item().isCheckManual\"\n (click)=\"handlerChangeChecked(item(), item()[fieldKey()], disable() || (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup))\">\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTree) {\n <i class=\"libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.length) {\n <div [class]=\"'p-[5px]'\">\n <div [class]=\"'libs-ui-list-group-json_icon-item-parent'\"\n [attr.disabled]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\">\n </div>\n </div>\n }\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree || (configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.length)\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.-w-auto]=\"configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem\"\n [class.max-w-[calc(100%\n -\n 12px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && configTemplateGroup.ignoreIconExpandMarginRight\"\n [class.max-w-[calc(100%-24px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || (configTemplateGroup.widthLabelSub24WhenNotTreeView && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey))) && !configTemplateGroup.ignoreIconExpandMarginRight\"\n [clickExactly]=\"false\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [disable]=\"disable() || (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !configTemplateGroup.isViewTreeJson) || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\"\n [label]=\"item().fieldLabel\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysStillOtherOptions():keysStillOtherOptions().length\"\n [classLabelInclude]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual ? 'mo-lib-color-global mo-lib-font-head-5' : 'mo-lib-font-head-5'\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateGroup.getImage:item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [linkImageError]=\"configTemplateGroup.getLinkImageError ? (('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateGroup.getLinkImageError:item()) | async) : ''\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [iconImageClass]=\"item().iconImageClass ? item().iconImageClass : undefined\"\n [classImageInclude]=\"configTemplateGroup.classImageInclude || ''\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEventPopover)=\"handlerEventPopover($event, item())\"\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n @if (configTemplateGroup.isViewRadio) {\n <libs_ui-components-radio-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem\"\n [class.max-w-[calc(100%\n -\n 12px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && configTemplateGroup.ignoreIconExpandMarginRight\"\n [class.max-w-[calc(100%\n -\n 24px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && !configTemplateGroup.ignoreIconExpandMarginRight\"\n [clickExactly]=\"false\"\n [disable]=\"disable() || (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.length)||(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\"\n [label]=\"item().fieldLabel\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [classLabelInclude]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual ? 'text-[#009cdb]': ''\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChangeChecked(item)\" />\n }\n @if ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey)) {\n <i class=\"libs-ui-icon-check\"\n [class.ml-[8px]]=\"item().dataPopover\"\n [class.libs-ui-icon-check]=\"configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\">\n </i>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.length && !configTemplateGroup.isViewTree && !configTemplateGroup.isViewTreeJson) {\n <i class=\"libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n [class.ml-[8px]]=\"item().dataPopover\"\n (click)=\"handlerToggleExpand($event,item())\">\n </i>\n }\n </div>\n @if (item().expand || configTemplateGroup.isViewTreeJson) {\n @if (item().level < item().maxLevelGroup && !item()[configTemplateGroup.fieldGetItems]?.length && configTemplateGroup.isViewTree) {\n <div class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"(item().level + 1) | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:(item().maxLevelGroup+1):configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n <div [class]=\"item().classIncludeItemNoData || ''\">\n @if (!keySearch()) {\n <span>{{ 'i18n_no_data_yet' | translate }}</span>\n }\n @if (keySearch()) {\n <span>{{ 'i18n_no_result' | translate }}</span>\n }\n </div>\n </div>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.length) {\n <libs_ui-components-list-templates_group-item [keySearch]=\"keySearch()\"\n [items]=\"item()[configTemplateGroup.fieldGetItems]\"\n [parentItem]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keysChecked]=\"keysChecked()\"\n [disable]=\"(disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)) && !configTemplateGroup.isViewTreeJson\"\n [keysDisableItem]=\"keysDisableItem()\"\n [configTemplateGroup]=\"configTemplateGroup\"\n (outChangStageFlagMouseTooltip)='handlerChangStageFlagMouse($event)'\n (outChangeView)=\"handlerChangeView($event)\"\n (outChange)=\"handlerChangeChecked($event.item)\" />\n }\n }\n </div>\n }\n @if ((!items() || !items().length) && (parentItem().level < parentItem().maxLevelGroup)) {\n <div class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"(parentItem().level + 1) | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:(parentItem().maxLevelGroup+1):configTemplateGroup.isViewTree:configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [style.paddingLeft.px]=\"(parentItem().level + 1) | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe:(parentItem().maxLevelGroup+1):configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:false\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n <div [class]=\"parentItem().classIncludeItemNoData || ''\">\n @if (parentItem().iconEmptyDataInGroup) {\n <div class=\"pb-[16px]\">\n <ng-container *ngComponentOutlet=\"(keySearch() ? 'no-result' : 'no-data') | LibsUiIconsGetIconComponentPipe | async\" />\n </div>\n }\n @if (!keySearch()) {\n <span>{{ ( parentItem().textDescriptionGroupWhenNoData ?? config()?.textNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (keySearch()) {\n <span>{{ 'i18n_no_result' | translate }}</span>\n }\n </div>\n </div>\n }\n}\n", styles: [":host{position:relative}:host .libs-ui-list-group-item-line-vertical{position:absolute;width:1px;height:100%;background-color:#e6e7ea}.libs-ui--icon-check{--color: var(--libs-ui-color-default, #226FF5)}.libs-ui-icon-check:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}[class*=libs-ui-icon-chevron]:before{color:#6a7383}.libs-ui-list-group-json_icon-item-parent{min-width:6px;min-height:6px;height:6px;width:6px;border-radius:50%;background-color:#226ff5}.libs-ui-list-group-json_icon-item-parent[disabled=true]{background-color:#6a7383!important}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsListGroupItemComponent, selector: "libs_ui-components-list-templates_group-item", inputs: ["items", "configTemplateGroup", "keySearch", "fieldKey", "keysChecked", "keysDisableItem", "parentItem", "disable", "disableLabel", "config", "keysStillOtherOptions"], outputs: ["outChangeView", "outChange", "outChangStageFlagMouseTooltip"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe, name: "LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe" }, { kind: "pipe", type: LibsUiComponentsListGroupCalculatorMarginLeftItemPipe, name: "LibsUiComponentsListGroupCalculatorMarginLeftItemPipe" }, { kind: "pipe", type: LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe, name: "LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe" }, { kind: "pipe", type: LibsUiIconsGetIconComponentPipe, name: "LibsUiIconsGetIconComponentPipe" }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "component", type: LibsUiComponentsCheckboxSingleComponent, selector: "libs_ui-components-checkbox-single", inputs: ["key", "checked", "label", "classLabelInclude", "ignoreShowPopoverLabel", "typeLabelPopover", "popover", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "classInclude", "clickExactly", "disable", "disableLabel", "ignoreCheckbox", "zIndexLabel", "stillOtherOptions", "error", "showBorderError", "description", "iconImageClass", "classIconInclude", "modeBorder"], outputs: ["checkedChange", "linkImageChange", "outChange", "outEventPopover", "outClickLabel", "outChangStageFlagMousePopover"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "component", type: LibsUiComponentsRadioSingleComponent, selector: "libs_ui-components-radio-single", inputs: ["key", "active", "classInclude", "label", "labelInterpolateParams", "ignorePopoverLabe", "classLabelInclude", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "popover", "disable", "disableLabel", "clickExactly", "typeRadio", "ignoreRadio", "zIndexLabel", "classIncludeIcon"], outputs: ["activeChange", "outClickLabel", "outChange", "outChangStageFlagMousePopover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
932
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListGroupItemComponent, isStandalone: true, selector: "libs_ui-components-list-templates_group-item", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, configTemplateGroup: { classPropertyName: "configTemplateGroup", publicName: "configTemplateGroup", isSignal: true, isRequired: false, transformFunction: null }, keySearch: { classPropertyName: "keySearch", publicName: "keySearch", isSignal: true, isRequired: false, transformFunction: null }, fieldKey: { classPropertyName: "fieldKey", publicName: "fieldKey", isSignal: true, isRequired: false, transformFunction: null }, keysChecked: { classPropertyName: "keysChecked", publicName: "keysChecked", isSignal: true, isRequired: false, transformFunction: null }, keysDisableItem: { classPropertyName: "keysDisableItem", publicName: "keysDisableItem", isSignal: true, isRequired: false, transformFunction: null }, parentItem: { classPropertyName: "parentItem", publicName: "parentItem", 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 }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, keysStillOtherOptions: { classPropertyName: "keysStillOtherOptions", publicName: "keysStillOtherOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outChangeView: "outChangeView", outChange: "outChange", outChangStageFlagMouseTooltip: "outChangStageFlagMouseTooltip" }, ngImport: i0, template: "@if (configTemplateGroup(); as configTemplateGroup) {\n @if ((configTemplateGroup.isViewTree && !!items().length) || (parentItem().maxLevelGroup > 2 && parentItem().level > 1)) {\n <div class='libs-ui-list-group-item-line-vertical'\n [style.left.px]=\"parentItem().level | LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe:parentItem().maxLevelGroup:configTemplateGroup.isViewTree :configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\">\n </div>\n }\n @if (items() && items().length) {\n @for (item of items(); track item()[fieldKey()]) {\n <div>\n <div\n [style.marginLeft.px]=\"item().level | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:item().maxLevelGroup:configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\"\n [style.paddingLeft.px]=\"item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe:item().maxLevelGroup:configTemplateGroup.isViewTree:configTemplateGroup.isViewTreeJson:!!item()[configTemplateGroup.fieldGetItems]?.()?.length\"\n [class]=\"'libs-ui-bg-list-hover py-[6px] pr-[16px] flex items-center relative libs-ui-bg-list-hover-active ' + item()?.classInclude\"\n [class.libs-ui-bg-list-active]=\"configTemplateGroup.singleSelectItem && item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [class.libs-ui-disable]=\"configTemplateGroup.allowDisableLabel && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.pointer-events-none]=\"configTemplateGroup.allowDisableLabel && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.cursor-pointer]=\"!disable() && !(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) && !(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.libs-ui-bg-list-active]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.hasBackgroundColorWhenItemSelected && item().isCheckManual\"\n (click)=\"handlerChangeChecked(item(), item()[fieldKey()], disable() || (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup))\">\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTree) {\n <i class=\"libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]()?.length) {\n <div [class]=\"'p-[5px]'\">\n <div [class]=\"'libs-ui-list-group-json_icon-item-parent'\"\n [attr.disabled]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\">\n </div>\n </div>\n }\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree || (configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.()?.length)\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.-w-auto]=\"configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem\"\n [class.max-w-[calc(100%-12px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && configTemplateGroup.ignoreIconExpandMarginRight\"\n [class.max-w-[calc(100%-24px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || (configTemplateGroup.widthLabelSub24WhenNotTreeView && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey))) && !configTemplateGroup.ignoreIconExpandMarginRight\"\n [clickExactly]=\"false\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [disable]=\"disable() || (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !configTemplateGroup.isViewTreeJson) || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\"\n [label]=\"item().fieldLabel\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysStillOtherOptions():keysStillOtherOptions().length\"\n [classLabelInclude]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual ? 'libs-ui-color-default libs-ui-font-h5r' : 'libs-ui-font-h5r'\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateGroup.getImage:item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [linkImageError]=\"configTemplateGroup.getLinkImageError ? (('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateGroup.getLinkImageError:item()) | async) : ''\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [iconImageClass]=\"item().iconImageClass ? item().iconImageClass : undefined\"\n [classImageInclude]=\"configTemplateGroup.classImageInclude || ''\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEventPopover)=\"handlerEventPopover($event, item())\"\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n @if (configTemplateGroup.isViewRadio) {\n <libs_ui-components-radio-single [avatarConfig]=\"item().avatarConfig\"\n [class.!ml-[8px]]=\"configTemplateGroup.isViewTree\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem\"\n [class.max-w-[calc(100%-12px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && configTemplateGroup.ignoreIconExpandMarginRight\"\n [class.max-w-[calc(100%-24px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && !configTemplateGroup.ignoreIconExpandMarginRight\"\n [clickExactly]=\"false\"\n [disable]=\"disable() || (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.()?.length)||(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\"\n [label]=\"item().fieldLabel\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [classLabelInclude]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual ? 'text-[#009cdb] libs-ui-font-h5r ': ' libs-ui-font-h5r '\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n @if ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey)) {\n <i class=\"libs-ui-icon-check\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n [class.libs-ui-icon-check]=\"configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\">\n </i>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.()?.length && !configTemplateGroup.isViewTree && !configTemplateGroup.isViewTreeJson) {\n <i class=\"libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n </div>\n @if (item().expand || configTemplateGroup.isViewTreeJson) {\n @if (item().level < item().maxLevelGroup && !item()[configTemplateGroup.fieldGetItems]?.()?.length && configTemplateGroup.isViewTree) {\n <div class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"(item().level + 1) | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:(item().maxLevelGroup+1):configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [class.!py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.!py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n <div [class]=\"item().classIncludeItemNoData || ''\">\n @if (!keySearch()) {\n <span>{{ 'i18n_no_data_yet' | translate }}</span>\n }\n @if (keySearch()) {\n <span>{{ 'i18n_no_result' | translate }}</span>\n }\n </div>\n </div>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.()?.length) {\n <libs_ui-components-list-templates_group-item [keySearch]=\"keySearch()\"\n [items]=\"item()[configTemplateGroup.fieldGetItems]()\"\n [parentItem]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keysChecked]=\"keysChecked()\"\n [disable]=\"(disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)) && !configTemplateGroup.isViewTreeJson\"\n [keysDisableItem]=\"keysDisableItem()\"\n [configTemplateGroup]=\"configTemplateGroup\"\n (outChangStageFlagMouseTooltip)='handlerChangStageFlagMouse($event)'\n (outChangeView)=\"handlerChangeView($event)\"\n (outChange)=\"handlerChangeChecked($event.item)\" />\n }\n }\n </div>\n }\n }\n\n @if ((!items() || !items().length) && (parentItem().level < parentItem().maxLevelGroup)) {\n <div class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"(parentItem().level + 1) | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:(parentItem().maxLevelGroup+1):configTemplateGroup.isViewTree:configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [style.paddingLeft.px]=\"(parentItem().level + 1) | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe:(parentItem().maxLevelGroup+1):configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:false\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n <div [class]=\"parentItem().classIncludeItemNoData || ''\">\n @if (parentItem().iconEmptyDataInGroup) {\n <div class=\"pb-[16px]\">\n <ng-container *ngComponentOutlet=\"(keySearch() ? 'no-result' : 'no-data') | LibsUiIconsGetIconComponentPipe | async\" />\n </div>\n }\n @if (!keySearch()) {\n <span>{{ ( parentItem().textDescriptionGroupWhenNoData ?? config()?.textNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (keySearch()) {\n <span>{{ 'i18n_no_result' | translate }}</span>\n }\n </div>\n </div>\n }\n}\n", styles: [":host{position:relative}:host .libs-ui-list-group-item-line-vertical{position:absolute;width:1px;height:100%;background-color:#e6e7ea}.libs-ui--icon-check{--color: var(--libs-ui-color-default, #226FF5)}.libs-ui--icon-check:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}[class*=libs-ui-icon-chevron]:before{color:#6a7383}.libs-ui-list-group-json_icon-item-parent{min-width:6px;min-height:6px;height:6px;width:6px;border-radius:50%;background-color:#226ff5}.libs-ui-list-group-json_icon-item-parent[disabled=true]{background-color:#6a7383!important}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsListGroupItemComponent, selector: "libs_ui-components-list-templates_group-item", inputs: ["items", "configTemplateGroup", "keySearch", "fieldKey", "keysChecked", "keysDisableItem", "parentItem", "disable", "disableLabel", "config", "keysStillOtherOptions"], outputs: ["outChangeView", "outChange", "outChangStageFlagMouseTooltip"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe, name: "LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe" }, { kind: "pipe", type: LibsUiComponentsListGroupCalculatorMarginLeftItemPipe, name: "LibsUiComponentsListGroupCalculatorMarginLeftItemPipe" }, { kind: "pipe", type: LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe, name: "LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe" }, { kind: "pipe", type: LibsUiIconsGetIconComponentPipe, name: "LibsUiIconsGetIconComponentPipe" }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "component", type: LibsUiComponentsCheckboxSingleComponent, selector: "libs_ui-components-checkbox-single", inputs: ["key", "checked", "label", "classLabelInclude", "ignoreShowPopoverLabel", "typeLabelPopover", "popover", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "classInclude", "clickExactly", "disable", "disableLabel", "ignoreCheckbox", "zIndexLabel", "stillOtherOptions", "error", "showBorderError", "description", "iconImageClass", "classIconInclude", "modeBorder"], outputs: ["checkedChange", "linkImageChange", "outChange", "outEventPopover", "outClickLabel", "outChangStageFlagMousePopover"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "component", type: LibsUiComponentsRadioSingleComponent, selector: "libs_ui-components-radio-single", inputs: ["key", "active", "classInclude", "label", "labelInterpolateParams", "ignorePopoverLabe", "classLabelInclude", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "popover", "disable", "disableLabel", "clickExactly", "typeRadio", "ignoreRadio", "zIndexLabel", "classIncludeIcon"], outputs: ["activeChange", "outClickLabel", "outChange", "outChangStageFlagMousePopover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
930
933
|
}
|
|
931
934
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListGroupItemComponent, decorators: [{
|
|
932
935
|
type: Component,
|
|
@@ -940,7 +943,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
940
943
|
LibsUiComponentsCheckboxSingleComponent,
|
|
941
944
|
LibsUiPipesCallFunctionInTemplatePipe,
|
|
942
945
|
LibsUiComponentsRadioSingleComponent
|
|
943
|
-
], template: "@if (configTemplateGroup(); as configTemplateGroup) {\n @if ((configTemplateGroup.isViewTree && !!items().length) || (parentItem().maxLevelGroup > 2 && parentItem().level > 1)) {\n <div class='libs-ui-list-group-item-line-vertical'\n [style.left.px]=\"parentItem().level | LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe:parentItem().maxLevelGroup:configTemplateGroup.isViewTree :configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\">\n </div>\n }\n @for (item of items(); track item()[fieldKey()]) {\n <div>\n <div\n [style.marginLeft.px]=\"item().level | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:item().maxLevelGroup:configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\"\n [style.paddingLeft.px]=\"item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe:item().maxLevelGroup:configTemplateGroup.isViewTree:configTemplateGroup.isViewTreeJson:!!item()[configTemplateGroup.fieldGetItems]?.length\"\n [class]=\"'libs-ui-bg-list-hover py-[6px] pr-[16px] flex items-center relative libs-ui-bg-list-hover-active ' + item()?.classInclude\"\n [class.libs-ui-bg-list-active]=\"configTemplateGroup.singleSelectItem && item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [class.libs-ui-disable]=\"configTemplateGroup.allowDisableLabel && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.pointer-events-none]=\"configTemplateGroup.allowDisableLabel && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.cursor-pointer]=\"!disable() && !(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) && !(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.libs-ui-bg-list-active]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.hasBackgroundColorWhenItemSelected && item().isCheckManual\"\n (click)=\"handlerChangeChecked(item(), item()[fieldKey()], disable() || (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup))\">\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTree) {\n <i class=\"libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.length) {\n <div [class]=\"'p-[5px]'\">\n <div [class]=\"'libs-ui-list-group-json_icon-item-parent'\"\n [attr.disabled]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\">\n </div>\n </div>\n }\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree || (configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.length)\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.-w-auto]=\"configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem\"\n [class.max-w-[calc(100%\n -\n 12px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && configTemplateGroup.ignoreIconExpandMarginRight\"\n [class.max-w-[calc(100%-24px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || (configTemplateGroup.widthLabelSub24WhenNotTreeView && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey))) && !configTemplateGroup.ignoreIconExpandMarginRight\"\n [clickExactly]=\"false\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [disable]=\"disable() || (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !configTemplateGroup.isViewTreeJson) || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\"\n [label]=\"item().fieldLabel\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysStillOtherOptions():keysStillOtherOptions().length\"\n [classLabelInclude]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual ? 'mo-lib-color-global mo-lib-font-head-5' : 'mo-lib-font-head-5'\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateGroup.getImage:item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [linkImageError]=\"configTemplateGroup.getLinkImageError ? (('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateGroup.getLinkImageError:item()) | async) : ''\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [iconImageClass]=\"item().iconImageClass ? item().iconImageClass : undefined\"\n [classImageInclude]=\"configTemplateGroup.classImageInclude || ''\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEventPopover)=\"handlerEventPopover($event, item())\"\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n @if (configTemplateGroup.isViewRadio) {\n <libs_ui-components-radio-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem\"\n [class.max-w-[calc(100%\n -\n 12px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && configTemplateGroup.ignoreIconExpandMarginRight\"\n [class.max-w-[calc(100%\n -\n 24px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && !configTemplateGroup.ignoreIconExpandMarginRight\"\n [clickExactly]=\"false\"\n [disable]=\"disable() || (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.length)||(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\"\n [label]=\"item().fieldLabel\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [classLabelInclude]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual ? 'text-[#009cdb]': ''\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChangeChecked(item)\" />\n }\n @if ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey)) {\n <i class=\"libs-ui-icon-check\"\n [class.ml-[8px]]=\"item().dataPopover\"\n [class.libs-ui-icon-check]=\"configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\">\n </i>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.length && !configTemplateGroup.isViewTree && !configTemplateGroup.isViewTreeJson) {\n <i class=\"libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n [class.ml-[8px]]=\"item().dataPopover\"\n (click)=\"handlerToggleExpand($event,item())\">\n </i>\n }\n </div>\n @if (item().expand || configTemplateGroup.isViewTreeJson) {\n @if (item().level < item().maxLevelGroup && !item()[configTemplateGroup.fieldGetItems]?.length && configTemplateGroup.isViewTree) {\n <div class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"(item().level + 1) | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:(item().maxLevelGroup+1):configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n <div [class]=\"item().classIncludeItemNoData || ''\">\n @if (!keySearch()) {\n <span>{{ 'i18n_no_data_yet' | translate }}</span>\n }\n @if (keySearch()) {\n <span>{{ 'i18n_no_result' | translate }}</span>\n }\n </div>\n </div>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.length) {\n <libs_ui-components-list-templates_group-item [keySearch]=\"keySearch()\"\n [items]=\"item()[configTemplateGroup.fieldGetItems]\"\n [parentItem]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keysChecked]=\"keysChecked()\"\n [disable]=\"(disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)) && !configTemplateGroup.isViewTreeJson\"\n [keysDisableItem]=\"keysDisableItem()\"\n [configTemplateGroup]=\"configTemplateGroup\"\n (outChangStageFlagMouseTooltip)='handlerChangStageFlagMouse($event)'\n (outChangeView)=\"handlerChangeView($event)\"\n (outChange)=\"handlerChangeChecked($event.item)\" />\n }\n }\n </div>\n }\n @if ((!items() || !items().length) && (parentItem().level < parentItem().maxLevelGroup)) {\n <div class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"(parentItem().level + 1) | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:(parentItem().maxLevelGroup+1):configTemplateGroup.isViewTree:configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [style.paddingLeft.px]=\"(parentItem().level + 1) | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe:(parentItem().maxLevelGroup+1):configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:false\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n <div [class]=\"parentItem().classIncludeItemNoData || ''\">\n @if (parentItem().iconEmptyDataInGroup) {\n <div class=\"pb-[16px]\">\n <ng-container *ngComponentOutlet=\"(keySearch() ? 'no-result' : 'no-data') | LibsUiIconsGetIconComponentPipe | async\" />\n </div>\n }\n @if (!keySearch()) {\n <span>{{ ( parentItem().textDescriptionGroupWhenNoData ?? config()?.textNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (keySearch()) {\n <span>{{ 'i18n_no_result' | translate }}</span>\n }\n </div>\n </div>\n }\n}\n", styles: [":host{position:relative}:host .libs-ui-list-group-item-line-vertical{position:absolute;width:1px;height:100%;background-color:#e6e7ea}.libs-ui--icon-check{--color: var(--libs-ui-color-default, #226FF5)}.libs-ui-icon-check:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}[class*=libs-ui-icon-chevron]:before{color:#6a7383}.libs-ui-list-group-json_icon-item-parent{min-width:6px;min-height:6px;height:6px;width:6px;border-radius:50%;background-color:#226ff5}.libs-ui-list-group-json_icon-item-parent[disabled=true]{background-color:#6a7383!important}\n"] }]
|
|
946
|
+
], template: "@if (configTemplateGroup(); as configTemplateGroup) {\n @if ((configTemplateGroup.isViewTree && !!items().length) || (parentItem().maxLevelGroup > 2 && parentItem().level > 1)) {\n <div class='libs-ui-list-group-item-line-vertical'\n [style.left.px]=\"parentItem().level | LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe:parentItem().maxLevelGroup:configTemplateGroup.isViewTree :configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\">\n </div>\n }\n @if (items() && items().length) {\n @for (item of items(); track item()[fieldKey()]) {\n <div>\n <div\n [style.marginLeft.px]=\"item().level | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:item().maxLevelGroup:configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\"\n [style.paddingLeft.px]=\"item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe:item().maxLevelGroup:configTemplateGroup.isViewTree:configTemplateGroup.isViewTreeJson:!!item()[configTemplateGroup.fieldGetItems]?.()?.length\"\n [class]=\"'libs-ui-bg-list-hover py-[6px] pr-[16px] flex items-center relative libs-ui-bg-list-hover-active ' + item()?.classInclude\"\n [class.libs-ui-bg-list-active]=\"configTemplateGroup.singleSelectItem && item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [class.libs-ui-disable]=\"configTemplateGroup.allowDisableLabel && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.pointer-events-none]=\"configTemplateGroup.allowDisableLabel && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.cursor-pointer]=\"!disable() && !(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) && !(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [class.libs-ui-bg-list-active]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.hasBackgroundColorWhenItemSelected && item().isCheckManual\"\n (click)=\"handlerChangeChecked(item(), item()[fieldKey()], disable() || (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup))\">\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTree) {\n <i class=\"libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]()?.length) {\n <div [class]=\"'p-[5px]'\">\n <div [class]=\"'libs-ui-list-group-json_icon-item-parent'\"\n [attr.disabled]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\">\n </div>\n </div>\n }\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree || (configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.()?.length)\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.-w-auto]=\"configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem\"\n [class.max-w-[calc(100%-12px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && configTemplateGroup.ignoreIconExpandMarginRight\"\n [class.max-w-[calc(100%-24px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || (configTemplateGroup.widthLabelSub24WhenNotTreeView && (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey))) && !configTemplateGroup.ignoreIconExpandMarginRight\"\n [clickExactly]=\"false\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [disable]=\"disable() || (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !configTemplateGroup.isViewTreeJson) || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\"\n [label]=\"item().fieldLabel\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysStillOtherOptions():keysStillOtherOptions().length\"\n [classLabelInclude]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual ? 'libs-ui-color-default libs-ui-font-h5r' : 'libs-ui-font-h5r'\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateGroup.getImage:item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [linkImageError]=\"configTemplateGroup.getLinkImageError ? (('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe:configTemplateGroup.getLinkImageError:item()) | async) : ''\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [iconImageClass]=\"item().iconImageClass ? item().iconImageClass : undefined\"\n [classImageInclude]=\"configTemplateGroup.classImageInclude || ''\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEventPopover)=\"handlerEventPopover($event, item())\"\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n @if (configTemplateGroup.isViewRadio) {\n <libs_ui-components-radio-single [avatarConfig]=\"item().avatarConfig\"\n [class.!ml-[8px]]=\"configTemplateGroup.isViewTree\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem\"\n [class.max-w-[calc(100%-12px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && configTemplateGroup.ignoreIconExpandMarginRight\"\n [class.max-w-[calc(100%-24px)]]=\"((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) || configTemplateGroup.widthLabelSub24WhenNotTreeView) && !configTemplateGroup.ignoreIconExpandMarginRight\"\n [clickExactly]=\"false\"\n [disable]=\"disable() || (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.()?.length)||(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) || false\"\n [label]=\"item().fieldLabel\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [classLabelInclude]=\"(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual ? 'text-[#009cdb] libs-ui-font-h5r ': ' libs-ui-font-h5r '\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n @if ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey)) {\n <i class=\"libs-ui-icon-check\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n [class.libs-ui-icon-check]=\"configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\">\n </i>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.()?.length && !configTemplateGroup.isViewTree && !configTemplateGroup.isViewTreeJson) {\n <i class=\"libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n </div>\n @if (item().expand || configTemplateGroup.isViewTreeJson) {\n @if (item().level < item().maxLevelGroup && !item()[configTemplateGroup.fieldGetItems]?.()?.length && configTemplateGroup.isViewTree) {\n <div class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"(item().level + 1) | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:(item().maxLevelGroup+1):configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [class.!py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.!py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n <div [class]=\"item().classIncludeItemNoData || ''\">\n @if (!keySearch()) {\n <span>{{ 'i18n_no_data_yet' | translate }}</span>\n }\n @if (keySearch()) {\n <span>{{ 'i18n_no_result' | translate }}</span>\n }\n </div>\n </div>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.()?.length) {\n <libs_ui-components-list-templates_group-item [keySearch]=\"keySearch()\"\n [items]=\"item()[configTemplateGroup.fieldGetItems]()\"\n [parentItem]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keysChecked]=\"keysChecked()\"\n [disable]=\"(disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)) && !configTemplateGroup.isViewTreeJson\"\n [keysDisableItem]=\"keysDisableItem()\"\n [configTemplateGroup]=\"configTemplateGroup\"\n (outChangStageFlagMouseTooltip)='handlerChangStageFlagMouse($event)'\n (outChangeView)=\"handlerChangeView($event)\"\n (outChange)=\"handlerChangeChecked($event.item)\" />\n }\n }\n </div>\n }\n }\n\n @if ((!items() || !items().length) && (parentItem().level < parentItem().maxLevelGroup)) {\n <div class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"(parentItem().level + 1) | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:(parentItem().maxLevelGroup+1):configTemplateGroup.isViewTree:configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [style.paddingLeft.px]=\"(parentItem().level + 1) | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe:(parentItem().maxLevelGroup+1):configTemplateGroup.isViewTree: configTemplateGroup.isViewTreeJson:false\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n <div [class]=\"parentItem().classIncludeItemNoData || ''\">\n @if (parentItem().iconEmptyDataInGroup) {\n <div class=\"pb-[16px]\">\n <ng-container *ngComponentOutlet=\"(keySearch() ? 'no-result' : 'no-data') | LibsUiIconsGetIconComponentPipe | async\" />\n </div>\n }\n @if (!keySearch()) {\n <span>{{ ( parentItem().textDescriptionGroupWhenNoData ?? config()?.textNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (keySearch()) {\n <span>{{ 'i18n_no_result' | translate }}</span>\n }\n </div>\n </div>\n }\n}\n", styles: [":host{position:relative}:host .libs-ui-list-group-item-line-vertical{position:absolute;width:1px;height:100%;background-color:#e6e7ea}.libs-ui--icon-check{--color: var(--libs-ui-color-default, #226FF5)}.libs-ui--icon-check:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}[class*=libs-ui-icon-chevron]:before{color:#6a7383}.libs-ui-list-group-json_icon-item-parent{min-width:6px;min-height:6px;height:6px;width:6px;border-radius:50%;background-color:#226ff5}.libs-ui-list-group-json_icon-item-parent[disabled=true]{background-color:#6a7383!important}\n"] }]
|
|
944
947
|
}] });
|
|
945
948
|
|
|
946
949
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -958,9 +961,6 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
958
961
|
mappingItemsChecked = signal(new Map());
|
|
959
962
|
selectFirstItem = signal(false);
|
|
960
963
|
firstItemSelected = signal(undefined);
|
|
961
|
-
constructor() {
|
|
962
|
-
super();
|
|
963
|
-
}
|
|
964
964
|
ngOnInit() {
|
|
965
965
|
if (!this.config()?.configTemplateGroup?.()) {
|
|
966
966
|
return;
|
|
@@ -1000,9 +1000,11 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1000
1000
|
current.ref = item;
|
|
1001
1001
|
return current;
|
|
1002
1002
|
});
|
|
1003
|
-
|
|
1003
|
+
if (itemGroup) {
|
|
1004
|
+
this.checkedGroupItems(itemGroup(), item);
|
|
1005
|
+
}
|
|
1004
1006
|
if (this.multiKeySelected() && this.multiKeySelected()?.length && this.multiKeySelected()?.find(key => key === item()[this.fieldKey()])) {
|
|
1005
|
-
this.handlerChangeChecked(true, itemMap, !configTemplateGroup.singleSelectItem);
|
|
1007
|
+
this.handlerChangeChecked(true, itemMap, false, !configTemplateGroup.singleSelectItem);
|
|
1006
1008
|
return;
|
|
1007
1009
|
}
|
|
1008
1010
|
});
|
|
@@ -1019,21 +1021,21 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1019
1021
|
this.items().forEach(item => {
|
|
1020
1022
|
this.mappingItemsChecked().delete(item()[this.fieldKey()]);
|
|
1021
1023
|
const itemsOfGroup = item()[configTemplateGroup.fieldGetItems];
|
|
1022
|
-
if (itemsOfGroup() && itemsOfGroup().length) {
|
|
1024
|
+
if (itemsOfGroup && itemsOfGroup() && itemsOfGroup().length) {
|
|
1023
1025
|
this.removeCheckedItemsChild(itemsOfGroup());
|
|
1024
1026
|
}
|
|
1025
1027
|
});
|
|
1026
|
-
this.setKeysCheckedByMappingChecked();
|
|
1028
|
+
this.setKeysCheckedByMappingChecked(false);
|
|
1027
1029
|
return;
|
|
1028
1030
|
}
|
|
1029
1031
|
this.items().forEach(item => {
|
|
1030
1032
|
this.mappingItemsChecked().set(item()[this.fieldKey()], item());
|
|
1031
1033
|
const itemsOfGroup = item()[configTemplateGroup.fieldGetItems];
|
|
1032
|
-
if (itemsOfGroup() && itemsOfGroup().length) {
|
|
1034
|
+
if (itemsOfGroup && itemsOfGroup() && itemsOfGroup().length) {
|
|
1033
1035
|
this.setCheckCheckedItemsChild(itemsOfGroup());
|
|
1034
1036
|
}
|
|
1035
1037
|
});
|
|
1036
|
-
this.setKeysCheckedByMappingChecked();
|
|
1038
|
+
this.setKeysCheckedByMappingChecked(false);
|
|
1037
1039
|
}
|
|
1038
1040
|
checkedGroupItems(items, parent) {
|
|
1039
1041
|
const configTemplateGroup = this.configTemplateGroup();
|
|
@@ -1054,13 +1056,15 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1054
1056
|
current.parentItem = parent;
|
|
1055
1057
|
return current;
|
|
1056
1058
|
});
|
|
1057
|
-
|
|
1059
|
+
if (itemGroup) {
|
|
1060
|
+
this.checkedGroupItems(itemGroup(), item);
|
|
1061
|
+
}
|
|
1058
1062
|
if (this.multiKeySelected() && this.multiKeySelected()?.length && this.multiKeySelected()?.find(key => key === item()[this.fieldKey()])) {
|
|
1059
|
-
this.handlerChangeChecked(true, itemMap, !configTemplateGroup.singleSelectItem);
|
|
1063
|
+
this.handlerChangeChecked(true, itemMap, false, !configTemplateGroup.singleSelectItem);
|
|
1060
1064
|
return;
|
|
1061
1065
|
}
|
|
1062
1066
|
if (configTemplateGroup.singleSelectItem) {
|
|
1063
|
-
this.handlerChangeChecked(false, itemMap, !configTemplateGroup.singleSelectItem);
|
|
1067
|
+
this.handlerChangeChecked(false, itemMap, false, !configTemplateGroup.singleSelectItem);
|
|
1064
1068
|
}
|
|
1065
1069
|
});
|
|
1066
1070
|
}
|
|
@@ -1074,7 +1078,10 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1074
1078
|
if (e instanceof Event) {
|
|
1075
1079
|
e.stopPropagation();
|
|
1076
1080
|
}
|
|
1077
|
-
item.
|
|
1081
|
+
item.update(current => {
|
|
1082
|
+
current.expand = !current.expand;
|
|
1083
|
+
return current;
|
|
1084
|
+
});
|
|
1078
1085
|
this.refreshView();
|
|
1079
1086
|
}
|
|
1080
1087
|
handlerChangeView() {
|
|
@@ -1087,13 +1094,13 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1087
1094
|
this.handlerChangeItemChecked(item);
|
|
1088
1095
|
}
|
|
1089
1096
|
handlerChangeItemChecked(item) {
|
|
1090
|
-
const checked = !this.keysChecked().some(key => item
|
|
1097
|
+
const checked = !this.keysChecked().some(key => item[this.fieldKey()] === key);
|
|
1091
1098
|
if (!checked && this.configTemplateGroup()?.isViewRadio) {
|
|
1092
1099
|
return;
|
|
1093
1100
|
}
|
|
1094
|
-
this.handlerChangeChecked(checked, item);
|
|
1101
|
+
this.handlerChangeChecked(checked, signal(item), false);
|
|
1095
1102
|
}
|
|
1096
|
-
handlerChangeChecked(checked, item, isCheckedByDefaultKey) {
|
|
1103
|
+
handlerChangeChecked(checked, item, isClickManual, isCheckedByDefaultKey) {
|
|
1097
1104
|
const configTemplateGroup = this.configTemplateGroup();
|
|
1098
1105
|
if (!configTemplateGroup) {
|
|
1099
1106
|
return;
|
|
@@ -1138,7 +1145,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1138
1145
|
});
|
|
1139
1146
|
this.outUnSelectMultiKey.emit(this.keysChecked());
|
|
1140
1147
|
this.mappingItemsChecked().clear();
|
|
1141
|
-
this.setKeysCheckedByMappingChecked(item);
|
|
1148
|
+
this.setKeysCheckedByMappingChecked(isClickManual, item);
|
|
1142
1149
|
}
|
|
1143
1150
|
if (checked) {
|
|
1144
1151
|
this.expandAllItemsInGroup(item);
|
|
@@ -1153,7 +1160,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1153
1160
|
current.isCheckedByDefaultKey = refItem().isCheckedByDefaultKey;
|
|
1154
1161
|
return current;
|
|
1155
1162
|
});
|
|
1156
|
-
if (configTemplateGroup.chooseChildThenAutoChooseParent) { // chỉ chọn các
|
|
1163
|
+
if (configTemplateGroup.chooseChildThenAutoChooseParent) { // chỉ chọn các cha trên cùng tree, ko quan tâm node cha có các con đã đc tích hết chưa
|
|
1157
1164
|
item.update(current => {
|
|
1158
1165
|
current.isCheckManual = true;
|
|
1159
1166
|
return current;
|
|
@@ -1166,14 +1173,14 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1166
1173
|
if (!configTemplateGroup.ignoreChooseParentThenAutoChooseChildren && !isCheckedByDefaultKey) {
|
|
1167
1174
|
this.setCheckCheckedItemsChild(itemsOfGroup());
|
|
1168
1175
|
}
|
|
1169
|
-
this.setKeysCheckedByMappingChecked(item);
|
|
1176
|
+
this.setKeysCheckedByMappingChecked(isClickManual, item);
|
|
1170
1177
|
return;
|
|
1171
1178
|
}
|
|
1172
1179
|
if (configTemplateGroup.ignoreChooseParentThenAutoChooseChildren) { // lựa chọn node cha sẽ bỏ qua việc chọn tất cả node con
|
|
1173
|
-
this.setKeysCheckedByMappingChecked(item);
|
|
1180
|
+
this.setKeysCheckedByMappingChecked(isClickManual, item);
|
|
1174
1181
|
return;
|
|
1175
1182
|
}
|
|
1176
|
-
if (itemsOfGroup() && itemsOfGroup().length && !isCheckedByDefaultKey && !configTemplateGroup.isViewTreeJson) {
|
|
1183
|
+
if (itemsOfGroup && itemsOfGroup() && itemsOfGroup().length && !isCheckedByDefaultKey && !configTemplateGroup.isViewTreeJson) {
|
|
1177
1184
|
const itemsChange = configTemplateGroup.ignoreChangeChildrenDisableWhenChangeParent ?
|
|
1178
1185
|
itemsOfGroup().filter((item) => !this.keysDisableItem()?.find(key => key === item()[this.fieldKey()])) : itemsOfGroup();
|
|
1179
1186
|
this.setCheckCheckedItemsChild(itemsChange);
|
|
@@ -1181,7 +1188,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1181
1188
|
if (!configTemplateGroup.notChangeStateItemCheckOther && !configTemplateGroup.isViewTreeJson) {
|
|
1182
1189
|
this.setCheckCheckedItemsParent(item().parentItem);
|
|
1183
1190
|
}
|
|
1184
|
-
this.setKeysCheckedByMappingChecked(item);
|
|
1191
|
+
this.setKeysCheckedByMappingChecked(isClickManual, item);
|
|
1185
1192
|
return;
|
|
1186
1193
|
}
|
|
1187
1194
|
item.update(current => {
|
|
@@ -1203,14 +1210,14 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1203
1210
|
if (configTemplateGroup.notChangeStateItemCheckOther) {
|
|
1204
1211
|
this.mappingItemsChecked().delete(item()[this.fieldKey()]);
|
|
1205
1212
|
this.outUnSelectMultiKey.emit(!isEmpty(item()[this.fieldKey()]) ? [item()[this.fieldKey()]] : []);
|
|
1206
|
-
this.setKeysCheckedByMappingChecked(item);
|
|
1213
|
+
this.setKeysCheckedByMappingChecked(isClickManual, item);
|
|
1207
1214
|
return;
|
|
1208
1215
|
}
|
|
1209
1216
|
if (configTemplateGroup.ignoreUnselectChildrenRemoveSelectParent) {
|
|
1210
1217
|
this.recursivelyCheckedParentByTree(item().parentItem);
|
|
1211
1218
|
}
|
|
1212
1219
|
// nếu ko phải trường hơp của bank và danh mục sản phẩm thì bỏ cha sẽ bỏ con
|
|
1213
|
-
if (itemsOfGroup() && itemsOfGroup().length) {
|
|
1220
|
+
if (itemsOfGroup && itemsOfGroup() && itemsOfGroup().length) {
|
|
1214
1221
|
const itemsChange = configTemplateGroup.ignoreChangeChildrenDisableWhenChangeParent ?
|
|
1215
1222
|
itemsOfGroup().filter((item) => !this.keysDisableItem()?.find(key => key === item()[this.fieldKey()])) : itemsOfGroup();
|
|
1216
1223
|
this.removeCheckedItemsChild(itemsChange);
|
|
@@ -1218,7 +1225,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1218
1225
|
if (item().parentItem && !configTemplateGroup.ignoreUnselectChildrenRemoveSelectParent) {
|
|
1219
1226
|
this.mappingItemsChecked().delete(item().parentItem[this.fieldKey()]);
|
|
1220
1227
|
}
|
|
1221
|
-
this.setKeysCheckedByMappingChecked(item);
|
|
1228
|
+
this.setKeysCheckedByMappingChecked(isClickManual, item);
|
|
1222
1229
|
}
|
|
1223
1230
|
getItemsOfGroup(item, stores) {
|
|
1224
1231
|
const configTemplateGroup = this.configTemplateGroup();
|
|
@@ -1248,7 +1255,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1248
1255
|
return current;
|
|
1249
1256
|
});
|
|
1250
1257
|
}
|
|
1251
|
-
if (!itemParent()) {
|
|
1258
|
+
if (!itemParent || !itemParent()) {
|
|
1252
1259
|
return;
|
|
1253
1260
|
}
|
|
1254
1261
|
const itemsOfGroupParent = this.getItemsOfGroup(itemParent, this.store);
|
|
@@ -1274,9 +1281,9 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1274
1281
|
});
|
|
1275
1282
|
}
|
|
1276
1283
|
}
|
|
1277
|
-
setKeysCheckedByMappingChecked(item) {
|
|
1284
|
+
setKeysCheckedByMappingChecked(isClickManual, item) {
|
|
1278
1285
|
this.keysChecked.set(Array.from(this.mappingItemsChecked().keys()));
|
|
1279
|
-
this.emitMultiKeyChecked();
|
|
1286
|
+
this.emitMultiKeyChecked(isClickManual);
|
|
1280
1287
|
this.setKeysStillOtherOptions(item);
|
|
1281
1288
|
}
|
|
1282
1289
|
emitMultiKeyChecked(isClickManual = true) {
|
|
@@ -1288,7 +1295,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1288
1295
|
if ((configTemplateGroup.emitAllItemChecked || configTemplateGroup.chooseChildThenAutoChooseParent) && !configTemplateGroup.ignoreEmitAllItemCheckedWhenChooseChildThenAutoChooseParent) {
|
|
1289
1296
|
for (const [key, item] of this.mappingItemsChecked()) {
|
|
1290
1297
|
dataMultiKeyChecked.keys.push(key);
|
|
1291
|
-
dataMultiKeyChecked.mapKeys.push({ key, item: item.ref || item, isClickManual });
|
|
1298
|
+
dataMultiKeyChecked.mapKeys.push({ key, item: (item.ref?.() || item), isClickManual });
|
|
1292
1299
|
}
|
|
1293
1300
|
this.outSelectMultiKey.emit(dataMultiKeyChecked);
|
|
1294
1301
|
this.totalItemChecked.set(dataMultiKeyChecked.keys.length);
|
|
@@ -1297,7 +1304,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1297
1304
|
for (const [key, item] of this.mappingItemsChecked()) {
|
|
1298
1305
|
if (item[this.fieldKey()] && !String(item[this.fieldKey()]).includes(this.PATTERN_FAKE_ID) && (!item[configTemplateGroup.fieldGetItems]?.length || !item[configTemplateGroup.fieldGetItems]().some((itemGroup) => this.mappingItemsChecked().get(itemGroup()[this.fieldKey()])))) {
|
|
1299
1306
|
dataMultiKeyChecked.keys.push(key);
|
|
1300
|
-
dataMultiKeyChecked.mapKeys.push({ key, item: item.ref || item, isClickManual });
|
|
1307
|
+
dataMultiKeyChecked.mapKeys.push({ key, item: (item.ref?.() || item), isClickManual });
|
|
1301
1308
|
}
|
|
1302
1309
|
}
|
|
1303
1310
|
this.outSelectMultiKey.emit(dataMultiKeyChecked);
|
|
@@ -1337,7 +1344,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1337
1344
|
items.forEach(item => {
|
|
1338
1345
|
this.mappingItemsChecked().set(item()[this.fieldKey()], item());
|
|
1339
1346
|
const itemsOfGroup = item()[configTemplateGroup.fieldGetItems];
|
|
1340
|
-
if (itemsOfGroup() && itemsOfGroup().length) {
|
|
1347
|
+
if (itemsOfGroup && itemsOfGroup() && itemsOfGroup().length) {
|
|
1341
1348
|
this.setCheckCheckedItemsChild(itemsOfGroup());
|
|
1342
1349
|
}
|
|
1343
1350
|
});
|
|
@@ -1355,7 +1362,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1355
1362
|
this.mappingItemsChecked().delete(item()[this.fieldKey()]);
|
|
1356
1363
|
this.outUnSelectMultiKey.emit([item()[this.fieldKey()]]);
|
|
1357
1364
|
const itemsOfGroup = item()[configTemplateGroup.fieldGetItems];
|
|
1358
|
-
if (itemsOfGroup() && itemsOfGroup().length) {
|
|
1365
|
+
if (itemsOfGroup && itemsOfGroup() && itemsOfGroup().length) {
|
|
1359
1366
|
this.removeCheckedItemsChild(itemsOfGroup());
|
|
1360
1367
|
}
|
|
1361
1368
|
});
|
|
@@ -1451,7 +1458,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1451
1458
|
return current;
|
|
1452
1459
|
});
|
|
1453
1460
|
if (this.multiKeySelected() && this.multiKeySelected()?.length && this.multiKeySelected()?.some(key => key === itemMap()[this.fieldKey()])) {
|
|
1454
|
-
this.handlerChangeChecked(true, itemMap
|
|
1461
|
+
this.handlerChangeChecked(true, itemMap, false, true);
|
|
1455
1462
|
}
|
|
1456
1463
|
this.buildValueByConfig(itemMap());
|
|
1457
1464
|
return itemMap;
|
|
@@ -1459,7 +1466,6 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1459
1466
|
if (this.configTemplateGroup()?.searchAllLevel && this.keySearch()) {
|
|
1460
1467
|
items = items.filter(item => item().hasDisplay);
|
|
1461
1468
|
}
|
|
1462
|
-
console.log('items', items);
|
|
1463
1469
|
this.config()?.sort?.(items);
|
|
1464
1470
|
this.items.set(items);
|
|
1465
1471
|
this.multiKeySelected.set([]);
|
|
@@ -1469,8 +1475,8 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1469
1475
|
this.expandAllItemsInGroup(this.items()[0]);
|
|
1470
1476
|
}
|
|
1471
1477
|
this.setHeightViewPort();
|
|
1472
|
-
if (this.firstItemSelected()) {
|
|
1473
|
-
this.handlerChangeChecked(true, this.firstItemSelected);
|
|
1478
|
+
if (this.firstItemSelected && this.firstItemSelected()) {
|
|
1479
|
+
this.handlerChangeChecked(true, this.firstItemSelected, false);
|
|
1474
1480
|
this.firstItemSelected.set(undefined);
|
|
1475
1481
|
}
|
|
1476
1482
|
};
|
|
@@ -1542,7 +1548,6 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1542
1548
|
this.setDisplayItem(current);
|
|
1543
1549
|
}
|
|
1544
1550
|
const itemGroup = current[configTemplateGroup.fieldGetItems];
|
|
1545
|
-
console.log(itemGroup, current);
|
|
1546
1551
|
if (itemGroup?.()) {
|
|
1547
1552
|
const data = this.filterItemsDisplay(this.convertDataByGroupInItem(itemGroup?.(), signal(current)));
|
|
1548
1553
|
itemGroup.set(data);
|
|
@@ -1575,7 +1580,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1575
1580
|
}
|
|
1576
1581
|
current.avatarConfig = configTemplateGroup.getAvatarConfig && configTemplateGroup.getAvatarConfig(current);
|
|
1577
1582
|
if (this.multiKeySelected() && this.multiKeySelected()?.length && this.multiKeySelected()?.some(key => key === current[this.fieldKey()])) {
|
|
1578
|
-
this.handlerChangeChecked(true, current, true);
|
|
1583
|
+
this.handlerChangeChecked(true, signal(current), false, true);
|
|
1579
1584
|
}
|
|
1580
1585
|
if (this.selectFirstItem() && current.level === current.maxLevelGroup) {
|
|
1581
1586
|
this.firstItemSelected.set(current);
|
|
@@ -1609,7 +1614,7 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1609
1614
|
return itemsDisplay;
|
|
1610
1615
|
}
|
|
1611
1616
|
getLengthItem() {
|
|
1612
|
-
const data = { length: this.items.length };
|
|
1617
|
+
const data = { length: this.items().length };
|
|
1613
1618
|
if (data.length > this.maxItemShow()) {
|
|
1614
1619
|
return data.length;
|
|
1615
1620
|
}
|
|
@@ -1678,8 +1683,8 @@ class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1678
1683
|
item.fieldLabel = this.translateService.instant(item.label || item.name || ' ');
|
|
1679
1684
|
return labelSearch ?? item.fieldLabel;
|
|
1680
1685
|
}
|
|
1681
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListGroupComponent, deps:
|
|
1682
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListGroupComponent, isStandalone: true, selector: "libs_ui-components-list-templates_group", usesInheritance: true, ngImport: i0, template: "@if (configTemplateGroup(); as configTemplateGroup) {\n <div class=\"libs-ui-list-group overflow-[hidden]\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\">\n <div class=\"flex flex-col w-full h-full relative min-h-[28px]\">\n @if (items().length && configTemplateGroup.configButtonSelectAndUndSelectItem?.(); as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerCheckedOrUnCheckedAll(true)\" />\n <div class=\"text-[#999999]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6s'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerCheckedOrUnCheckedAll(false)\" />\n </div>\n }\n @if (items().length && configTemplateGroup.configCheckboxCheckAll?.(); as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general '+(configTemplateGroup.classIncludeHasConfigCheckBoxAll ?? ' bg-[#ffffff]')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"totalItemChecked() >= totalItem() && totalItem() > 0\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerCheckedOrUnCheckedAll($event.checked)\" />\n </div>\n }\n @if (items() && items().length) {\n <div class=\"w-full h-full relative flex\">\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full h-full absolute top-0 left-0 {{ configTemplateGroup.classIncludeGroup ? configTemplateGroup.classIncludeGroup : '' }}\">\n @for (item of items(); track item()[fieldKey()]; let first = $first; let last = $last) {\n <div #itemRef\n [style.marginTop.px]=\"!configTemplateGroup.ignoreGroupLine ? configTemplateGroup.marginTopHasLine || 4 : 0\"\n class=\"flex flex-col relative \">\n <div class=\"flex items-center py-[6px] \"\n [class.libs-ui-bg-list-hover]=\"!configTemplateGroup.ignoreClickLabelGroup\"\n [class.libs-ui-bg-list-hover-active]=\"!configTemplateGroup.ignoreClickLabelGroup\"\n [class.!cursor-pointer]=\"!configTemplateGroup.ignoreClickLabelGroup && (configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem)\"\n [style.paddingLeft.px]=\"level()*(configTemplateGroup.isViewTree ? 8 : 16)\"\n (click)=\"(configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem) ? handlerToggleExpand($event,item()) : undefined\">\n @if (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree) {\n <i class=\"cursor-pointer libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item())\">\n </i>\n }\n <div class=\"flex\"\n [class.mo-lib-calc-w-32px]=\"configTemplateGroup.iconExpand === 'right' && !configTemplateGroup.isViewTree && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length)\"\n [class.mo-lib-calc-w-16px]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\">\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree\"\n [class.w-full]=\"!item()[configTemplateGroup.fieldGetItems]?.length && !((configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length)))\"\n [class.max-w-[calc(100%-24px)]]=\"(configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length))\"\n [label]=\"item().fieldLabel\"\n [popover]=\"item().dataPopover\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? zIndex()\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [classLabelInclude]=\"(configTemplateGroup.classLabelItem ? configTemplateGroup.classLabelItem : (configTemplateGroup.isViewTree ? ' mo-lib-font-head-6 ':' mo-lib-font-head-6s ')) + ((configTemplateGroup.ignoreTextUppercaseLabelGroup || configTemplateGroup.isViewTree) ? '':' text-uppercase ')\"\n [disable]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysStillOtherOptions():keysStillOtherOptions().length\"\n (outChange)=\"handlerChangeChecked($event.checked,item())\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outClickLabel)=\"handlerToggleExpand('clickLabel',item(),configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem)\" />\n }\n\n @if (configTemplateGroup.isViewRadio) {\n <libs_ui-components-radio-single [class.ml-[8px]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\"\n [avatarConfig]=\"item().avatarConfig\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioGroup || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree\"\n [class.w-full]=\"!item()[configTemplateGroup.fieldGetItems]?.length && !((configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length)))\"\n [class.max-w-[calc(100%-24px)]]=\"(configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length))\"\n [label]=\"item().fieldLabel\"\n [popover]=\"item().dataPopover\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? zIndex()\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [classLabelInclude]=\"(configTemplateGroup.classLabelItem ? configTemplateGroup.classLabelItem : 'libs-ui-font-h6s ') + (configTemplateGroup.ignoreTextUppercaseLabelGroup ? '':' uppercase')\"\n [disable]=\"disable() || (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.length) || configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n (outChange)=\"handlerChangeChecked($event.active,item())\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outClickLabel)=\"handlerToggleExpand('clickLabel',item(),configTemplateGroup.ignoreRadioGroup || configTemplateGroup.singleSelectItem)\" />\n }\n\n @if (item().buttonInGroup; as buttonInGroup) {\n <libs_ui-components-buttons-button [type]=\"buttonInGroup.type || 'button-link-primary'\"\n [label]=\"buttonInGroup.label || ' '\"\n [classIconLeft]=\"(buttonInGroup.classIconLeft || '')+' flex mr-[8px] !text-[8px]'\"\n [classInclude]=\"buttonInGroup.classInclude\"\n [classLabel]=\"buttonInGroup.classLabel || 'libs-ui-font-h5r'\"\n [disable]=\"buttonInGroup.disable || disable() || false\"\n (outClick)=\"handlerClickButtonGroup(buttonInGroup,item())\" />\n }\n </div>\n\n @if (configTemplateGroup.iconExpand === 'right' && !configTemplateGroup.isViewTree && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length)) {\n <i class=\"flex items-center cursor-pointer mr-[16px] libs-ui-icon-chevron-right\"\n [class.ml-[8px]]=\"item().dataPopover\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n </div>\n @if (item().expand && calculatorHeighItemSuccess()) {\n <libs_ui-components-list-templates_group-item [keySearch]=\"keySearch()\"\n [items]=\"item()[configTemplateGroup.fieldGetItems]\"\n [parentItem]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keysChecked]=\"keysChecked()\"\n [disable]=\"disable()\"\n [keysDisableItem]=\"keysDisableItem() || []\"\n [configTemplateGroup]=\"configTemplateGroup\"\n [config]=\"config()\"\n [keysStillOtherOptions]=\"keysStillOtherOptions()\"\n (outChangeView)=\"handlerChangeView()\"\n (outChangStageFlagMouseTooltip)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChangeItemChecked($event.item)\" />\n }\n @if (!last && !configTemplateGroup.ignoreGroupLine && calculatorHeighItemSuccess()) {\n <div class=\"libs-ui-list-group-line\"\n [style.marginTop.px]=\"!configTemplateGroup.ignoreGroupLine ? configTemplateGroup.marginTopHasLine || 4 : 0\">\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (!items() || !items().length) {\n <div class=\"libs-ui-font-h5r text-[#c1c1c1] relative {{ configTemplateGroup.classIncludeNodata?configTemplateGroup.classIncludeNodata:'' }}\"\n [style.marginLeft.px]=\"0 | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:2:(configTemplateGroup.isViewTree || configTemplateGroup.iconExpand === 'left'):configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n @if (!keySearch() && !loading()) {\n <div>{{ (config()?.textNoData ?? 'i18n_no_data_yet') | translate }}</div>\n }\n @if (keySearch() && !loading()) {\n <div>{{ (config()?.textSearchNoData ??'i18n_no_result') | translate }}</div>\n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n </div>\n}\n", styles: [".libs-ui-list-group{display:flex;flex-direction:column;width:100%}.libs-ui-list-group .libs-ui-list-group-line{width:100%;height:1px;background-color:#e6e7ea}.libs-ui-list-group [class*=libs-ui-icon-chevron]:before{color:#6a7383}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsCheckboxSingleComponent, selector: "libs_ui-components-checkbox-single", inputs: ["key", "checked", "label", "classLabelInclude", "ignoreShowPopoverLabel", "typeLabelPopover", "popover", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "classInclude", "clickExactly", "disable", "disableLabel", "ignoreCheckbox", "zIndexLabel", "stillOtherOptions", "error", "showBorderError", "description", "iconImageClass", "classIconInclude", "modeBorder"], outputs: ["checkedChange", "linkImageChange", "outChange", "outEventPopover", "outClickLabel", "outChangStageFlagMousePopover"] }, { kind: "component", type: LibsUiComponentsRadioSingleComponent, selector: "libs_ui-components-radio-single", inputs: ["key", "active", "classInclude", "label", "labelInterpolateParams", "ignorePopoverLabe", "classLabelInclude", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "popover", "disable", "disableLabel", "clickExactly", "typeRadio", "ignoreRadio", "zIndexLabel", "classIncludeIcon"], outputs: ["activeChange", "outClickLabel", "outChange", "outChangStageFlagMousePopover"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiComponentsListGroupCalculatorMarginLeftItemPipe, name: "LibsUiComponentsListGroupCalculatorMarginLeftItemPipe" }, { kind: "component", type: LibsUiComponentsListGroupItemComponent, selector: "libs_ui-components-list-templates_group-item", inputs: ["items", "configTemplateGroup", "keySearch", "fieldKey", "keysChecked", "keysDisableItem", "parentItem", "disable", "disableLabel", "config", "keysStillOtherOptions"], outputs: ["outChangeView", "outChange", "outChangStageFlagMouseTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1686
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1687
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListGroupComponent, isStandalone: true, selector: "libs_ui-components-list-templates_group", usesInheritance: true, ngImport: i0, template: "@if (configTemplateGroup(); as configTemplateGroup) {\n <div class=\"libs-ui-list-group overflow-[hidden]\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\">\n <div class=\"flex flex-col w-full h-full relative min-h-[28px]\">\n @if (items().length && configTemplateGroup.configButtonSelectAndUndSelectItem?.(); as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerCheckedOrUnCheckedAll(true)\" />\n <div class=\"text-[#999999]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6s'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerCheckedOrUnCheckedAll(false)\" />\n </div>\n }\n @if (items().length && configTemplateGroup.configCheckboxCheckAll?.(); as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general '+(configTemplateGroup.classIncludeHasConfigCheckBoxAll ?? ' bg-[#ffffff]')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"totalItemChecked() >= totalItem() && totalItem() > 0\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerCheckedOrUnCheckedAll($event.checked)\" />\n </div>\n }\n @if (items() && items().length) {\n <div class=\"w-full h-full relative flex\">\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full h-full absolute top-0 left-0 {{ configTemplateGroup.classIncludeGroup ? configTemplateGroup.classIncludeGroup : '' }}\">\n @for (item of items(); track item()[fieldKey()]; let first = $first; let last = $last) {\n <div #itemRef\n [style.marginTop.px]=\"!configTemplateGroup.ignoreGroupLine ? configTemplateGroup.marginTopHasLine || 4 : 0\"\n class=\"flex flex-col relative \">\n <div class=\"flex items-center py-[6px] \"\n [class.libs-ui-bg-list-hover]=\"!configTemplateGroup.ignoreClickLabelGroup\"\n [class.libs-ui-bg-list-hover-active]=\"!configTemplateGroup.ignoreClickLabelGroup\"\n [class.!cursor-pointer]=\"!configTemplateGroup.ignoreClickLabelGroup && (configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem)\"\n [style.paddingLeft.px]=\"level()*(configTemplateGroup.isViewTree ? 8 : 16)\"\n (click)=\"(configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem) ? handlerToggleExpand($event,item()) : undefined\">\n @if (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree) {\n <i class=\"cursor-pointer libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n <div class=\"flex\"\n [class.w-[calc(100%-32px)]]=\"configTemplateGroup.iconExpand === 'right' && !configTemplateGroup.isViewTree && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length)\"\n [class.w-[calc(100%-16px)]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\">\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree\"\n [class.w-full]=\"!item()[configTemplateGroup.fieldGetItems]?.()?.length && !((configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length)))\"\n [class.max-w-[calc(100%-24px)]]=\"(configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length))\"\n [label]=\"item().fieldLabel\"\n [popover]=\"item().dataPopover\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? zIndex()\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [classLabelInclude]=\"(configTemplateGroup.classLabelItem ? configTemplateGroup.classLabelItem : (configTemplateGroup.isViewTree ? ' libs-ui-font-h6r ':' libs-ui-font-h6s ')) + ((configTemplateGroup.ignoreTextUppercaseLabelGroup || configTemplateGroup.isViewTree) ? '':' text-uppercase ')\"\n [disable]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysStillOtherOptions():keysStillOtherOptions().length\"\n (outChange)=\"handlerChangeChecked($event.checked,item, true)\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outClickLabel)=\"handlerToggleExpand('clickLabel',item(),configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem)\" />\n }\n\n @if (configTemplateGroup.isViewRadio) {\n <libs_ui-components-radio-single [class.ml-[8px]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\"\n [avatarConfig]=\"item().avatarConfig\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioGroup || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree\"\n [class.w-full]=\"!item()[configTemplateGroup.fieldGetItems]?.()?.length && !((configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length)))\"\n [class.max-w-[calc(100%-24px)]]=\"(configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length))\"\n [label]=\"item().fieldLabel\"\n [popover]=\"item().dataPopover\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? zIndex()\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [classLabelInclude]=\"(configTemplateGroup.classLabelItem ? configTemplateGroup.classLabelItem : 'libs-ui-font-h6s ') + (configTemplateGroup.ignoreTextUppercaseLabelGroup ? '':' uppercase')\"\n [disable]=\"disable() || (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.()?.length) || configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n (outChange)=\"handlerChangeChecked($event.active,item, true)\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outClickLabel)=\"handlerToggleExpand('clickLabel',item,configTemplateGroup.ignoreRadioGroup || configTemplateGroup.singleSelectItem)\" />\n }\n\n @if (item().buttonInGroup; as buttonInGroup) {\n <libs_ui-components-buttons-button [type]=\"buttonInGroup.type || 'button-link-primary'\"\n [label]=\"buttonInGroup.label || ' '\"\n [classIconLeft]=\"(buttonInGroup.classIconLeft || '')+' flex mr-[8px] !text-[8px]'\"\n [classInclude]=\"buttonInGroup.classInclude\"\n [classLabel]=\"buttonInGroup.classLabel || 'libs-ui-font-h5r'\"\n [disable]=\"buttonInGroup.disable || disable() || false\"\n (outClick)=\"handlerClickButtonGroup(buttonInGroup,item())\" />\n }\n </div>\n\n @if (configTemplateGroup.iconExpand === 'right' && !configTemplateGroup.isViewTree && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length)) {\n <i class=\"flex items-center cursor-pointer mr-[16px] libs-ui-icon-chevron-right\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n </div>\n @if (item().expand && calculatorHeighItemSuccess()) {\n <libs_ui-components-list-templates_group-item [keySearch]=\"keySearch()\"\n [items]=\"item()[configTemplateGroup.fieldGetItems]()\"\n [parentItem]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keysChecked]=\"keysChecked()\"\n [disable]=\"disable()\"\n [keysDisableItem]=\"keysDisableItem() || []\"\n [configTemplateGroup]=\"configTemplateGroup\"\n [config]=\"config()\"\n [keysStillOtherOptions]=\"keysStillOtherOptions()\"\n (outChangeView)=\"handlerChangeView()\"\n (outChangStageFlagMouseTooltip)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChangeItemChecked($event.item)\" />\n }\n @if (!last && !configTemplateGroup.ignoreGroupLine && calculatorHeighItemSuccess()) {\n <div class=\"libs-ui-list-group-line\"\n [style.marginTop.px]=\"!configTemplateGroup.ignoreGroupLine ? configTemplateGroup.marginTopHasLine || 4 : 0\">\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (!items() || !items().length) {\n <div class=\"libs-ui-font-h5r text-[#c1c1c1] relative {{ configTemplateGroup.classIncludeNodata?configTemplateGroup.classIncludeNodata:'' }}\"\n [style.marginLeft.px]=\"0 | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:2:(configTemplateGroup.isViewTree || configTemplateGroup.iconExpand === 'left'):configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n @if (!keySearch() && !loading()) {\n <div>{{ (config()?.textNoData ?? 'i18n_no_data_yet') | translate }}</div>\n }\n @if (keySearch() && !loading()) {\n <div>{{ (config()?.textSearchNoData ??'i18n_no_result') | translate }}</div>\n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n </div>\n}\n", styles: [".libs-ui-list-group{display:flex;flex-direction:column;width:100%}.libs-ui-list-group .libs-ui-list-group-line{width:100%;height:1px;background-color:#e6e7ea}.libs-ui-list-group [class*=libs-ui-icon-chevron]:before{color:#6a7383}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsCheckboxSingleComponent, selector: "libs_ui-components-checkbox-single", inputs: ["key", "checked", "label", "classLabelInclude", "ignoreShowPopoverLabel", "typeLabelPopover", "popover", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "classInclude", "clickExactly", "disable", "disableLabel", "ignoreCheckbox", "zIndexLabel", "stillOtherOptions", "error", "showBorderError", "description", "iconImageClass", "classIconInclude", "modeBorder"], outputs: ["checkedChange", "linkImageChange", "outChange", "outEventPopover", "outClickLabel", "outChangStageFlagMousePopover"] }, { kind: "component", type: LibsUiComponentsRadioSingleComponent, selector: "libs_ui-components-radio-single", inputs: ["key", "active", "classInclude", "label", "labelInterpolateParams", "ignorePopoverLabe", "classLabelInclude", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "popover", "disable", "disableLabel", "clickExactly", "typeRadio", "ignoreRadio", "zIndexLabel", "classIncludeIcon"], outputs: ["activeChange", "outClickLabel", "outChange", "outChangStageFlagMousePopover"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiComponentsListGroupCalculatorMarginLeftItemPipe, name: "LibsUiComponentsListGroupCalculatorMarginLeftItemPipe" }, { kind: "component", type: LibsUiComponentsListGroupItemComponent, selector: "libs_ui-components-list-templates_group-item", inputs: ["items", "configTemplateGroup", "keySearch", "fieldKey", "keysChecked", "keysDisableItem", "parentItem", "disable", "disableLabel", "config", "keysStillOtherOptions"], outputs: ["outChangeView", "outChange", "outChangStageFlagMouseTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1683
1688
|
}
|
|
1684
1689
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListGroupComponent, decorators: [{
|
|
1685
1690
|
type: Component,
|
|
@@ -1694,8 +1699,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1694
1699
|
LibsUiPipesCallFunctionInTemplatePipe,
|
|
1695
1700
|
LibsUiComponentsListGroupCalculatorMarginLeftItemPipe,
|
|
1696
1701
|
LibsUiComponentsListGroupItemComponent
|
|
1697
|
-
], template: "@if (configTemplateGroup(); as configTemplateGroup) {\n <div class=\"libs-ui-list-group overflow-[hidden]\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\">\n <div class=\"flex flex-col w-full h-full relative min-h-[28px]\">\n @if (items().length && configTemplateGroup.configButtonSelectAndUndSelectItem?.(); as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerCheckedOrUnCheckedAll(true)\" />\n <div class=\"text-[#999999]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6s'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerCheckedOrUnCheckedAll(false)\" />\n </div>\n }\n @if (items().length && configTemplateGroup.configCheckboxCheckAll?.(); as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general '+(configTemplateGroup.classIncludeHasConfigCheckBoxAll ?? ' bg-[#ffffff]')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"totalItemChecked() >= totalItem() && totalItem() > 0\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerCheckedOrUnCheckedAll($event.checked)\" />\n </div>\n }\n @if (items() && items().length) {\n <div class=\"w-full h-full relative flex\">\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full h-full absolute top-0 left-0 {{ configTemplateGroup.classIncludeGroup ? configTemplateGroup.classIncludeGroup : '' }}\">\n @for (item of items(); track item()[fieldKey()]; let first = $first; let last = $last) {\n <div #itemRef\n [style.marginTop.px]=\"!configTemplateGroup.ignoreGroupLine ? configTemplateGroup.marginTopHasLine || 4 : 0\"\n class=\"flex flex-col relative \">\n <div class=\"flex items-center py-[6px] \"\n [class.libs-ui-bg-list-hover]=\"!configTemplateGroup.ignoreClickLabelGroup\"\n [class.libs-ui-bg-list-hover-active]=\"!configTemplateGroup.ignoreClickLabelGroup\"\n [class.!cursor-pointer]=\"!configTemplateGroup.ignoreClickLabelGroup && (configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem)\"\n [style.paddingLeft.px]=\"level()*(configTemplateGroup.isViewTree ? 8 : 16)\"\n (click)=\"(configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem) ? handlerToggleExpand($event,item()) : undefined\">\n @if (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree) {\n <i class=\"cursor-pointer libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item())\">\n </i>\n }\n <div class=\"flex\"\n [class.mo-lib-calc-w-32px]=\"configTemplateGroup.iconExpand === 'right' && !configTemplateGroup.isViewTree && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length)\"\n [class.mo-lib-calc-w-16px]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\">\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree\"\n [class.w-full]=\"!item()[configTemplateGroup.fieldGetItems]?.length && !((configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length)))\"\n [class.max-w-[calc(100%-24px)]]=\"(configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length))\"\n [label]=\"item().fieldLabel\"\n [popover]=\"item().dataPopover\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? zIndex()\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [classLabelInclude]=\"(configTemplateGroup.classLabelItem ? configTemplateGroup.classLabelItem : (configTemplateGroup.isViewTree ? ' mo-lib-font-head-6 ':' mo-lib-font-head-6s ')) + ((configTemplateGroup.ignoreTextUppercaseLabelGroup || configTemplateGroup.isViewTree) ? '':' text-uppercase ')\"\n [disable]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysStillOtherOptions():keysStillOtherOptions().length\"\n (outChange)=\"handlerChangeChecked($event.checked,item())\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outClickLabel)=\"handlerToggleExpand('clickLabel',item(),configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem)\" />\n }\n\n @if (configTemplateGroup.isViewRadio) {\n <libs_ui-components-radio-single [class.ml-[8px]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\"\n [avatarConfig]=\"item().avatarConfig\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioGroup || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree\"\n [class.w-full]=\"!item()[configTemplateGroup.fieldGetItems]?.length && !((configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length)))\"\n [class.max-w-[calc(100%-24px)]]=\"(configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length))\"\n [label]=\"item().fieldLabel\"\n [popover]=\"item().dataPopover\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? zIndex()\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [classLabelInclude]=\"(configTemplateGroup.classLabelItem ? configTemplateGroup.classLabelItem : 'libs-ui-font-h6s ') + (configTemplateGroup.ignoreTextUppercaseLabelGroup ? '':' uppercase')\"\n [disable]=\"disable() || (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.length) || configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n (outChange)=\"handlerChangeChecked($event.active,item())\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outClickLabel)=\"handlerToggleExpand('clickLabel',item(),configTemplateGroup.ignoreRadioGroup || configTemplateGroup.singleSelectItem)\" />\n }\n\n @if (item().buttonInGroup; as buttonInGroup) {\n <libs_ui-components-buttons-button [type]=\"buttonInGroup.type || 'button-link-primary'\"\n [label]=\"buttonInGroup.label || ' '\"\n [classIconLeft]=\"(buttonInGroup.classIconLeft || '')+' flex mr-[8px] !text-[8px]'\"\n [classInclude]=\"buttonInGroup.classInclude\"\n [classLabel]=\"buttonInGroup.classLabel || 'libs-ui-font-h5r'\"\n [disable]=\"buttonInGroup.disable || disable() || false\"\n (outClick)=\"handlerClickButtonGroup(buttonInGroup,item())\" />\n }\n </div>\n\n @if (configTemplateGroup.iconExpand === 'right' && !configTemplateGroup.isViewTree && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.length)) {\n <i class=\"flex items-center cursor-pointer mr-[16px] libs-ui-icon-chevron-right\"\n [class.ml-[8px]]=\"item().dataPopover\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n </div>\n @if (item().expand && calculatorHeighItemSuccess()) {\n <libs_ui-components-list-templates_group-item [keySearch]=\"keySearch()\"\n [items]=\"item()[configTemplateGroup.fieldGetItems]\"\n [parentItem]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keysChecked]=\"keysChecked()\"\n [disable]=\"disable()\"\n [keysDisableItem]=\"keysDisableItem() || []\"\n [configTemplateGroup]=\"configTemplateGroup\"\n [config]=\"config()\"\n [keysStillOtherOptions]=\"keysStillOtherOptions()\"\n (outChangeView)=\"handlerChangeView()\"\n (outChangStageFlagMouseTooltip)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChangeItemChecked($event.item)\" />\n }\n @if (!last && !configTemplateGroup.ignoreGroupLine && calculatorHeighItemSuccess()) {\n <div class=\"libs-ui-list-group-line\"\n [style.marginTop.px]=\"!configTemplateGroup.ignoreGroupLine ? configTemplateGroup.marginTopHasLine || 4 : 0\">\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (!items() || !items().length) {\n <div class=\"libs-ui-font-h5r text-[#c1c1c1] relative {{ configTemplateGroup.classIncludeNodata?configTemplateGroup.classIncludeNodata:'' }}\"\n [style.marginLeft.px]=\"0 | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:2:(configTemplateGroup.isViewTree || configTemplateGroup.iconExpand === 'left'):configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n @if (!keySearch() && !loading()) {\n <div>{{ (config()?.textNoData ?? 'i18n_no_data_yet') | translate }}</div>\n }\n @if (keySearch() && !loading()) {\n <div>{{ (config()?.textSearchNoData ??'i18n_no_result') | translate }}</div>\n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n </div>\n}\n", styles: [".libs-ui-list-group{display:flex;flex-direction:column;width:100%}.libs-ui-list-group .libs-ui-list-group-line{width:100%;height:1px;background-color:#e6e7ea}.libs-ui-list-group [class*=libs-ui-icon-chevron]:before{color:#6a7383}\n"] }]
|
|
1698
|
-
}]
|
|
1702
|
+
], template: "@if (configTemplateGroup(); as configTemplateGroup) {\n <div class=\"libs-ui-list-group overflow-[hidden]\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\">\n <div class=\"flex flex-col w-full h-full relative min-h-[28px]\">\n @if (items().length && configTemplateGroup.configButtonSelectAndUndSelectItem?.(); as configButtonSelectItem) {\n <div [class]=\"'flex items-center bg-[#ffffff] '+(configButtonSelectItem.classInclude ?? 'libs-ui-border-bottom-general')\">\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonCheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonCheckAll?.label ?? 'i18n_select_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonCheckAll?.classInclude || 'pr-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonCheckAll?.classLabel || 'libs-ui-font-h6r'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerCheckedOrUnCheckedAll(true)\" />\n <div class=\"text-[#999999]\">|</div>\n <libs_ui-components-buttons-button [type]=\"configButtonSelectItem.buttonUncheckAll?.type ?? 'button-link-primary'\"\n [label]=\"configButtonSelectItem.buttonUncheckAll?.label ?? 'i18n_unselect_all_searched_results'\"\n [classInclude]=\"configButtonSelectItem.buttonUncheckAll?.classInclude || 'pl-[8px]'\"\n [classLabel]=\"configButtonSelectItem.buttonUncheckAll?.classLabel || 'libs-ui-font-h6s'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerCheckedOrUnCheckedAll(false)\" />\n </div>\n }\n @if (items().length && configTemplateGroup.configCheckboxCheckAll?.(); as configCheckBox) {\n <div [class]=\"'flex libs-ui-border-bottom-general '+(configTemplateGroup.classIncludeHasConfigCheckBoxAll ?? ' bg-[#ffffff]')\">\n <libs_ui-components-checkbox-single [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"totalItemChecked() >= totalItem() && totalItem() > 0\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerCheckedOrUnCheckedAll($event.checked)\" />\n </div>\n }\n @if (items() && items().length) {\n <div class=\"w-full h-full relative flex\">\n <div LibsUiComponentsScrollOverlayDirective\n class=\"w-full h-full absolute top-0 left-0 {{ configTemplateGroup.classIncludeGroup ? configTemplateGroup.classIncludeGroup : '' }}\">\n @for (item of items(); track item()[fieldKey()]; let first = $first; let last = $last) {\n <div #itemRef\n [style.marginTop.px]=\"!configTemplateGroup.ignoreGroupLine ? configTemplateGroup.marginTopHasLine || 4 : 0\"\n class=\"flex flex-col relative \">\n <div class=\"flex items-center py-[6px] \"\n [class.libs-ui-bg-list-hover]=\"!configTemplateGroup.ignoreClickLabelGroup\"\n [class.libs-ui-bg-list-hover-active]=\"!configTemplateGroup.ignoreClickLabelGroup\"\n [class.!cursor-pointer]=\"!configTemplateGroup.ignoreClickLabelGroup && (configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem)\"\n [style.paddingLeft.px]=\"level()*(configTemplateGroup.isViewTree ? 8 : 16)\"\n (click)=\"(configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem) ? handlerToggleExpand($event,item()) : undefined\">\n @if (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree) {\n <i class=\"cursor-pointer libs-ui-icon-chevron-right\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n <div class=\"flex\"\n [class.w-[calc(100%-32px)]]=\"configTemplateGroup.iconExpand === 'right' && !configTemplateGroup.isViewTree && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length)\"\n [class.w-[calc(100%-16px)]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\">\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree\"\n [class.w-full]=\"!item()[configTemplateGroup.fieldGetItems]?.()?.length && !((configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length)))\"\n [class.max-w-[calc(100%-24px)]]=\"(configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length))\"\n [label]=\"item().fieldLabel\"\n [popover]=\"item().dataPopover\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? zIndex()\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [classLabelInclude]=\"(configTemplateGroup.classLabelItem ? configTemplateGroup.classLabelItem : (configTemplateGroup.isViewTree ? ' libs-ui-font-h6r ':' libs-ui-font-h6s ')) + ((configTemplateGroup.ignoreTextUppercaseLabelGroup || configTemplateGroup.isViewTree) ? '':' text-uppercase ')\"\n [disable]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysStillOtherOptions():keysStillOtherOptions().length\"\n (outChange)=\"handlerChangeChecked($event.checked,item, true)\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outClickLabel)=\"handlerToggleExpand('clickLabel',item(),configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem)\" />\n }\n\n @if (configTemplateGroup.isViewRadio) {\n <libs_ui-components-radio-single [class.ml-[8px]]=\"configTemplateGroup.iconExpand === 'left' || configTemplateGroup.isViewTree\"\n [avatarConfig]=\"item().avatarConfig\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioGroup || configTemplateGroup.singleSelectItem\"\n [class]=\"configTemplateGroup.classIncludeItem || ''\"\n [class.w-auto]=\"configTemplateGroup.isViewTree\"\n [class.w-full]=\"!item()[configTemplateGroup.fieldGetItems]?.()?.length && !((configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length)))\"\n [class.max-w-[calc(100%-24px)]]=\"(configTemplateGroup.isViewTree || configTemplateGroup.widthLabelSub24WhenNotTreeView) && (configTemplateGroup.iconExpand === 'left' || configTemplateGroup.iconExpand === 'right' && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length))\"\n [label]=\"item().fieldLabel\"\n [popover]=\"item().dataPopover\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? zIndex()\"\n [imgTypeIcon]=\"configTemplateGroup.imgTypeIcon\"\n [linkImage]=\"configTemplateGroup.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage):item()) | async) : item()[configTemplateGroup.fieldGetAvatarItem || '']\"\n [classLabelInclude]=\"(configTemplateGroup.classLabelItem ? configTemplateGroup.classLabelItem : 'libs-ui-font-h6s ') + (configTemplateGroup.ignoreTextUppercaseLabelGroup ? '':' uppercase')\"\n [disable]=\"disable() || (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.()?.length) || configTemplateGroup.ignoreCheckboxGroup || configTemplateGroup.singleSelectItem || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysChecked():keysChecked().length\"\n (outChange)=\"handlerChangeChecked($event.active,item, true)\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outClickLabel)=\"handlerToggleExpand('clickLabel',item,configTemplateGroup.ignoreRadioGroup || configTemplateGroup.singleSelectItem)\" />\n }\n\n @if (item().buttonInGroup; as buttonInGroup) {\n <libs_ui-components-buttons-button [type]=\"buttonInGroup.type || 'button-link-primary'\"\n [label]=\"buttonInGroup.label || ' '\"\n [classIconLeft]=\"(buttonInGroup.classIconLeft || '')+' flex mr-[8px] !text-[8px]'\"\n [classInclude]=\"buttonInGroup.classInclude\"\n [classLabel]=\"buttonInGroup.classLabel || 'libs-ui-font-h5r'\"\n [disable]=\"buttonInGroup.disable || disable() || false\"\n (outClick)=\"handlerClickButtonGroup(buttonInGroup,item())\" />\n }\n </div>\n\n @if (configTemplateGroup.iconExpand === 'right' && !configTemplateGroup.isViewTree && (!configTemplateGroup.searchAllLevel || !!item()[configTemplateGroup.fieldGetItems]?.()?.length)) {\n <i class=\"flex items-center cursor-pointer mr-[16px] libs-ui-icon-chevron-right\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event,item)\">\n </i>\n }\n </div>\n @if (item().expand && calculatorHeighItemSuccess()) {\n <libs_ui-components-list-templates_group-item [keySearch]=\"keySearch()\"\n [items]=\"item()[configTemplateGroup.fieldGetItems]()\"\n [parentItem]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keysChecked]=\"keysChecked()\"\n [disable]=\"disable()\"\n [keysDisableItem]=\"keysDisableItem() || []\"\n [configTemplateGroup]=\"configTemplateGroup\"\n [config]=\"config()\"\n [keysStillOtherOptions]=\"keysStillOtherOptions()\"\n (outChangeView)=\"handlerChangeView()\"\n (outChangStageFlagMouseTooltip)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChangeItemChecked($event.item)\" />\n }\n @if (!last && !configTemplateGroup.ignoreGroupLine && calculatorHeighItemSuccess()) {\n <div class=\"libs-ui-list-group-line\"\n [style.marginTop.px]=\"!configTemplateGroup.ignoreGroupLine ? configTemplateGroup.marginTopHasLine || 4 : 0\">\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (!items() || !items().length) {\n <div class=\"libs-ui-font-h5r text-[#c1c1c1] relative {{ configTemplateGroup.classIncludeNodata?configTemplateGroup.classIncludeNodata:'' }}\"\n [style.marginLeft.px]=\"0 | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe:2:(configTemplateGroup.isViewTree || configTemplateGroup.iconExpand === 'left'):configTemplateGroup.isViewTreeJson:!(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem):true\"\n [class.py-[8px]]=\"configTemplateGroup.fieldGetAvatarItem\"\n [class.py-[4px]]=\"!configTemplateGroup.fieldGetAvatarItem\">\n @if (!keySearch() && !loading()) {\n <div>{{ (config()?.textNoData ?? 'i18n_no_data_yet') | translate }}</div>\n }\n @if (keySearch() && !loading()) {\n <div>{{ (config()?.textSearchNoData ??'i18n_no_result') | translate }}</div>\n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n </div>\n}\n", styles: [".libs-ui-list-group{display:flex;flex-direction:column;width:100%}.libs-ui-list-group .libs-ui-list-group-line{width:100%;height:1px;background-color:#e6e7ea}.libs-ui-list-group [class*=libs-ui-icon-chevron]:before{color:#6a7383}\n"] }]
|
|
1703
|
+
}] });
|
|
1699
1704
|
|
|
1700
1705
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1701
1706
|
class LibsUiComponentsListRadioComponent extends LibsUiComponentsListTemplatesComponentAbstract {
|
|
@@ -1856,7 +1861,7 @@ class LibsUiComponentsListRadioComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1856
1861
|
return this.items().length;
|
|
1857
1862
|
}
|
|
1858
1863
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1859
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListRadioComponent, isStandalone: true, selector: "libs_ui-components-list-templates_radio", viewQueries: [{ propertyName: "virtualScrollerComponent", first: true, predicate: VirtualScrollerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (configTemplateRadio(); as configTemplateRadio) {\n <div class=\"relative h-full w-full\">\n @if (items().length) {\n <div #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\"\n (moScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"'libs-ui-list-template-radio-item flex ' + (configTemplateRadio.classItemInclude || '')\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class
|
|
1864
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListRadioComponent, isStandalone: true, selector: "libs_ui-components-list-templates_radio", viewQueries: [{ propertyName: "virtualScrollerComponent", first: true, predicate: VirtualScrollerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (configTemplateRadio(); as configTemplateRadio) {\n <div class=\"relative h-full w-full\">\n @if (items().length) {\n <div #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\"\n (moScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"'libs-ui-list-template-radio-item flex ' + (configTemplateRadio.classItemInclude || '')\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class.!pl-[12px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.!py-[2px]]=\"clickExactly()\"\n (click)=\"handlerChange($event,item())\">\n <div class=\"flex flex-col w-full\">\n @if (item().fieldLabel) {\n <libs_ui-components-radio-single [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [active]=\"keySelected() === item()[fieldKey()]\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateRadio.hasAvatarGroupSocial\"\n [linkImage]=\"configTemplateRadio.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateRadio.getImageError ? configTemplateRadio.getImageError : configTemplateRadio.getImage):item()) | async) : item()[configTemplateRadio.fieldGetImage || '']\"\n [classImageInclude]=\"configTemplateRadio.classIncludeImage || ''\"\n [bullet]=\"item().bullet\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [classLabelInclude]=\"item().classLabelInclude || ''\"\n [popover]=\"item().dataPopover\"\n [clickExactly]=\"clickExactly()\"\n [disableLabel]=\"disableLabel()\"\n [zIndexLabel]=\"configTemplateRadio.zIndexPopover ?? 1200\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChange('radio',item())\"\n (outClickLabel)=\"handlerChange('radio',item())\" />\n }\n @if (configTemplateRadio?.rows?.()) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateRadio.classRows ?? '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateRadio\"\n (outEvent)=\"handlerChange('radio',$event.item)\" />\n }\n </div>\n </div>\n }\n </virtual-scroller>\n </div>\n }\n @if (!items().length) {\n <div [class]=\"'libs-ui-font-h4r text-[#c1c1c1] '+ (config()?.textNoDataClassInclude ?? 'py-[4px] px-[12px]')\">\n @if (!keySearch() && !loading()) {\n <span>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <span>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (loading()) {\n <span> </span>\n }\n </div>\n }\n\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n}\n", styles: [".libs-ui-list-template-radio-item{padding:4px 22px 4px 1px;font-size:12px;line-height:18px;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i1$1.VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["executeRefreshOutsideAngularZone", "enableUnequalChildrenSizes", "RTL", "useMarginInsteadOfTranslate", "modifyOverflowStyleOfParentScroll", "stripedTable", "scrollbarWidth", "scrollbarHeight", "childWidth", "childHeight", "ssrChildWidth", "ssrChildHeight", "ssrViewportWidth", "ssrViewportHeight", "bufferAmount", "scrollAnimationTime", "resizeBypassRefreshThreshold", "scrollThrottlingTime", "scrollDebounceTime", "checkResizeInterval", "items", "compareItems", "horizontal", "parentScroll"], outputs: ["vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "component", type: LibsUiComponentsRadioSingleComponent, selector: "libs_ui-components-radio-single", inputs: ["key", "active", "classInclude", "label", "labelInterpolateParams", "ignorePopoverLabe", "classLabelInclude", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "popover", "disable", "disableLabel", "clickExactly", "typeRadio", "ignoreRadio", "zIndexLabel", "classIncludeIcon"], outputs: ["activeChange", "outClickLabel", "outChange", "outChangStageFlagMousePopover"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "component", type: LibsUiComponentsListRowsComponent, selector: "libs_ui-components-list-templates_rows", inputs: ["configTemplate", "item", "keySelected", "fieldKey", "zIndex"], outputs: ["outChangStageFlagMousePopover", "outEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1860
1865
|
}
|
|
1861
1866
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListRadioComponent, decorators: [{
|
|
1862
1867
|
type: Component,
|
|
@@ -1868,7 +1873,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1868
1873
|
LibsUiPipesCallFunctionInTemplatePipe,
|
|
1869
1874
|
LibsUiCheckSelectedByKeyPipe,
|
|
1870
1875
|
LibsUiComponentsListRowsComponent
|
|
1871
|
-
], template: "@if (configTemplateRadio(); as configTemplateRadio) {\n <div class=\"relative h-full w-full\">\n @if (items().length) {\n <div #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\"\n (moScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"'libs-ui-list-template-radio-item flex ' + (configTemplateRadio.classItemInclude || '')\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class
|
|
1876
|
+
], template: "@if (configTemplateRadio(); as configTemplateRadio) {\n <div class=\"relative h-full w-full\">\n @if (items().length) {\n <div #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [style.height]=\"heightViewPort() ? heightViewPort()+'px':'100%'\"\n (moScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"'libs-ui-list-template-radio-item flex ' + (configTemplateRadio.classItemInclude || '')\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly()\"\n [class.libs-ui-bg-list-hover-active]=\"!clickExactly()\"\n [class.!pl-[12px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.!py-[2px]]=\"clickExactly()\"\n (click)=\"handlerChange($event,item())\">\n <div class=\"flex flex-col w-full\">\n @if (item().fieldLabel) {\n <libs_ui-components-radio-single [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [active]=\"keySelected() === item()[fieldKey()]\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateRadio.hasAvatarGroupSocial\"\n [linkImage]=\"configTemplateRadio.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateRadio.getImageError ? configTemplateRadio.getImageError : configTemplateRadio.getImage):item()) | async) : item()[configTemplateRadio.fieldGetImage || '']\"\n [classImageInclude]=\"configTemplateRadio.classIncludeImage || ''\"\n [bullet]=\"item().bullet\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length)\"\n [classLabelInclude]=\"item().classLabelInclude || ''\"\n [popover]=\"item().dataPopover\"\n [clickExactly]=\"clickExactly()\"\n [disableLabel]=\"disableLabel()\"\n [zIndexLabel]=\"configTemplateRadio.zIndexPopover ?? 1200\"\n (outChangStageFlagMousePopover)='handlerChangStageFlagMouse($event)'\n (outChange)=\"handlerChange('radio',item())\"\n (outClickLabel)=\"handlerChange('radio',item())\" />\n }\n @if (configTemplateRadio?.rows?.()) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateRadio.classRows ?? '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateRadio\"\n (outEvent)=\"handlerChange('radio',$event.item)\" />\n }\n </div>\n </div>\n }\n </virtual-scroller>\n </div>\n }\n @if (!items().length) {\n <div [class]=\"'libs-ui-font-h4r text-[#c1c1c1] '+ (config()?.textNoDataClassInclude ?? 'py-[4px] px-[12px]')\">\n @if (!keySearch() && !loading()) {\n <span>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <span>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</span>\n }\n @if (loading()) {\n <span> </span>\n }\n </div>\n }\n\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"'medium'\" />\n }\n </div>\n}\n", styles: [".libs-ui-list-template-radio-item{padding:4px 22px 4px 1px;font-size:12px;line-height:18px;position:relative}\n"] }]
|
|
1872
1877
|
}] });
|
|
1873
1878
|
|
|
1874
1879
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -1999,7 +2004,7 @@ class LibsUiComponentsListTagComponent extends LibsUiComponentsListTemplatesComp
|
|
|
1999
2004
|
this.outSelectKey.emit(undefined);
|
|
2000
2005
|
}
|
|
2001
2006
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTagComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2002
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListTagComponent, isStandalone: true, selector: "libs_ui-components-list-templates_tag", usesInheritance: true, ngImport: i0, template: "@if (configTemplateTag(); as configTemplateTag) {\n <div class=\"w-full h-full relative\"\n LibsUiComponentsScrollOverlayDirective\n (moScrollBottom)=\"handlerScrollBottom()\">\n <div class=\"relative max-h-[150px] h-full {{ configTemplateTag.classIncludeContainer }}\"\n [ngClass]=\"{'flex flex-wrap': !configTemplateTag.ignoreItemFlexWrap}\"\n [class.min-h-[45px]]=\"!loading() && (!items() || !items().length)\"\n [class.min-h-[104px]]=\"loading() && items()\">\n @for (item of items(); track item()[fieldKey()]) {\n <div [class.libs-ui-disable]=\"loading() || disable()\"\n [class.pointer-events-none]=\"loading() || disable()\"\n [class]=\"item().classContainerItem\">\n @if (!item().bullet) {\n <div (click)=\"handlerSelectItem($event, item())\"\n [class]=\"item().classItem || 'rounded-[20px] mb-[8px] mr-[8px] py-[4px] px-[8px] flex items-center cursor-pointer'\"\n [class.bg-[#e9f1fe]]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\"\n [class.libs-ui-color-global]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\">\n @if (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) {\n <div class=\"mr-[8px] text-[12px] libs-ui-icon-check libs-ui-color-global\"></div>\n }\n <span class=\"mo-lib-font-h6r\"\n [innerHTML]=\"item().fieldLabel\"></span>\n </div>\n }\n @if (item().bullet) {\n <div [class]=\"item().classItem || 'rounded-[10px] px-[8px] py-[1px] mb-[8px] mr-[8px]'\"\n [class.w-max]=\"configTemplateTag?.ignoreItemFlexWrap\"\n [style.background-color]=\"item().bullet?.backgroundColor\"\n [style.color]=\"item().bullet?.color\"\n (click)=\"handlerSelectItem($event,item())\">\n <span [innerHTML]=\"item().fieldLabel\"></span>\n </div>\n }\n </div>\n }\n @if (!items() || !items().length) {\n <div [class]=\"'libs-ui-font-h4r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[4px]')\">\n @if (!keySearch() && !loading()) {\n <ng-container>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</ng-container>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</ng-container>\n }\n @if (loading()) {\n <ng-container> </ng-container>\n }\n </div>\n }\n </div>\n @if (loading()) {\n <div class=\"w-full h-full absolute top-0\">\n <libs_ui-components-spinner [size]=\"'medium'\" />\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2007
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListTagComponent, isStandalone: true, selector: "libs_ui-components-list-templates_tag", usesInheritance: true, ngImport: i0, template: "@if (configTemplateTag(); as configTemplateTag) {\n <div class=\"w-full h-full relative\"\n LibsUiComponentsScrollOverlayDirective\n (moScrollBottom)=\"handlerScrollBottom()\">\n <div class=\"relative max-h-[150px] h-full {{ configTemplateTag.classIncludeContainer }}\"\n [ngClass]=\"{'flex flex-wrap': !configTemplateTag.ignoreItemFlexWrap}\"\n [class.min-h-[45px]]=\"!loading() && (!items() || !items().length)\"\n [class.min-h-[104px]]=\"loading() && items()\">\n @for (item of items(); track item()[fieldKey()]) {\n <div [class.libs-ui-disable]=\"loading() || disable()\"\n [class.pointer-events-none]=\"loading() || disable()\"\n [class]=\"item().classContainerItem\">\n @if (!item().bullet) {\n <div (click)=\"handlerSelectItem($event, item())\"\n [class]=\"item().classItem || 'rounded-[20px] mb-[8px] mr-[8px] py-[4px] px-[8px] flex items-center cursor-pointer'\"\n [class.bg-[#e9f1fe]]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\"\n [class.libs-ui-color-global]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length\">\n @if (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) {\n <div class=\"mr-[8px] text-[12px] libs-ui-icon-check libs-ui-color-global\"></div>\n }\n <span class=\"mo-lib-font-h6r\"\n [innerHTML]=\"item().fieldLabel\"></span>\n </div>\n }\n @if (item().bullet) {\n <div [class]=\"item().classItem || 'rounded-[10px] px-[8px] py-[1px] mb-[8px] mr-[8px]'\"\n [class.w-max]=\"configTemplateTag?.ignoreItemFlexWrap\"\n [style.background-color]=\"item().bullet?.backgroundColor\"\n [style.color]=\"item().bullet?.color\"\n (click)=\"handlerSelectItem($event,item())\">\n <span [innerHTML]=\"item().fieldLabel\"></span>\n </div>\n }\n </div>\n }\n @if (!items() || !items().length) {\n <div [class]=\"'libs-ui-font-h4r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[4px]')\">\n @if (!keySearch() && !loading()) {\n <ng-container>{{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}</ng-container>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container>{{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}</ng-container>\n }\n @if (loading()) {\n <ng-container> </ng-container>\n }\n </div>\n }\n </div>\n @if (loading()) {\n <div class=\"w-full h-full absolute top-0\">\n <libs_ui-components-spinner [size]=\"'medium'\" />\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2003
2008
|
}
|
|
2004
2009
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTagComponent, decorators: [{
|
|
2005
2010
|
type: Component,
|
|
@@ -2219,7 +2224,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
|
|
|
2219
2224
|
item.specific_loadImgError = true;
|
|
2220
2225
|
}
|
|
2221
2226
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2222
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListTextComponent, isStandalone: true, selector: "libs_ui-components-list-templates_text", viewQueries: [{ propertyName: "virtualScrollerComponent", first: true, predicate: VirtualScrollerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <div #elementScroll\n [style.height]=\"!configTemplateText.notUseVirtualScroll && heightViewPort() && (!config()?.ignoreShowDataWhenNotSearch || (config()?.ignoreShowDataWhenNotSearch && config()?.ignoreFixHeightShowDataWhenNotSearch)) ? heightViewPort()+'px':'100%'\"\n class=\"w-full\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:scroll.viewPortItems}' />\n </virtual-scroller>\n }\n @if (configTemplateText.notUseVirtualScroll) {\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:items()}' />\n }\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[6px] px-[16px]')\">\n @if (!keySearch() && !loading()) {\n {{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n {{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}\n }\n @if (loading()) {\n \n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"loadingIconSize() || 'medium'\" />\n }\n </div>\n <ng-template #listRef\n let-itemsView='itemsView'>\n @for (item of itemsView; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item flex '+(item().classItem || '')\"\n [class.items-center]=\"!item().itemAlignStart\"\n [class.items-start]=\"item().itemAlignStart\"\n [class.libs-ui-bg-list-hover-danger]=\"!clickExactly() && item().hoverDanger\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly() && !item().hoverDanger\"\n [class.libs-ui-bg-list-active]=\"!clickExactly() && keySelected() === item()[fieldKey()]\"\n [class.!pl-[16px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.libs-ui-bg-list-hover-ffffff]=\"item().disable\"\n [class.cursor-default]=\"item().disable\"\n [class.py-[2px]]=\"clickExactly()\"\n [class.pr-[48px]]=\"keySelected() === item()[fieldKey()] && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort)&& !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{'pointer-events-none libs-ui-disable':loading() || disable() || ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem())}\"\n (click)=\"handlerClickRelative($event,item())\">\n @if (item().bullet) {\n <span class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.background-color]=\"item().bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event,item())\">\n </span>\n }\n\n @if (item().avatarConfig; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [classImageInclude]=\"avatarConfig.classImageInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [classImageInclude]=\"avatarConfig.classImageInclude\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"configTemplateText.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage):item()) | async) : item()[configTemplateText.fieldGetImage || '']\"\n [class]=\"'libs-ui-list-template-text-item-avatar ' + (configTemplateText.classIncludeImage ?? '')\"\n [class.w-[18px]]=\"configTemplateText.imgTypeIcon\"\n [class.h-[18px]]=\"configTemplateText.imgTypeIcon\"\n (error)=\"handlerImageError($event, item())\"\n (click)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().buttonLeftConfig; as buttonLeft) {\n @if (item().hrefButton) {\n <a [class.w-full]=\"!buttonLeft.ignoreWidth100\"\n [href]=\"item().hrefButton\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </a>\n }\n @if (!item().hrefButton) {\n <div [class.w-full]=\"!buttonLeft.ignoreWidth100\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </div>\n }\n <ng-template #buttonLeftTemplate>\n <libs_ui-components-buttons-button class=\"w-full\"\n [type]=\"buttonLeft.type || 'button-link-primary'\"\n [label]=\"buttonLeft.label || ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable\"\n [classIconLeft]=\"buttonLeft.classIconLeft ? ((buttonLeft.classIconLeft || '')+' flex mr-[8px] text-[12px]') : ''\"\n [classInclude]=\"(buttonLeft.classInclude|| '')+' w-full'\"\n [classLabel]=\"(buttonLeft.classLabel ?? 'libs-ui-font-h4r')\"\n [ignoreStopPropagationEvent]=\"buttonLeft.ignoreStopPropagationEvent\"\n [styleIconLeft]=\"buttonLeft.styleIconLeft\"\n [styleButton]=\"buttonLeft.styleButton\"\n (moClick)=\"handlerSelectItem($event,item())\" />\n </ng-template>\n }\n @if (item().switchConfig) {\n <libs_ui-components-switch [active]=\"item().switchConfig.active\"\n (moSwitch)=\"handlerSelectItem('click',item())\" />\n }\n @if (item().classIconLeft) {\n <i [class]=\"item().classIconLeft + ' mr-[8px] text-[14px]'\"></i>\n }\n @if (!item().ignoreShowFieldLabel && !configTemplateText.rows) {\n <libs_ui-components-popover [type]=\"item().popoverLabel?.type || 'text'\"\n [elementRefCustom]=\"item().popoverLabel?.type === 'text'? undefined:itemRef\"\n [ignoreShowPopover]=\"item().popoverLabel?.ignoreShowPopover\"\n [config]=\"item().popoverLabel?.config || (configTemplateText.configLabelPopover || {})\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (moEvent)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().fieldPopover; as popover) {\n <libs_ui-components-popover class=\"{{ popover.classInclude || '' }}\"\n [config]=\"popover?.config\">\n @if (!popover.dataView) {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event,$event.item,$event.action)\" />\n }\n @if ((keySelected() === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check '+(configTemplateText.classIncludeIconSelected || 'right-[12px]')\">\n </i>\n }\n @if (keySelected() === item()[fieldKey()] && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText.itemSort?.mode || ''\"\n [fieldSort]=\"item()[fieldKey()]\"\n (outChange)=\"handlerSort($event)\" />\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n}\n", styles: [".libs-ui-list-template-text-item{padding:6px 16px 6px 1px;font-size:12px;line-height:18px;position:relative;cursor:pointer}.libs-ui-list-template-text-item>.libs-ui-icon-check,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort{position:absolute;right:16px}.libs-ui-list-template-text-item>.libs-ui-icon-check:before,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}.libs-ui-list-template-text-item-bullet{width:10px;height:10px;border-radius:50%;margin-right:8px;cursor:pointer}.libs-ui-list-template-text-item-avatar{width:24px;height:24px;border-radius:50%;margin-right:8px;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i1$1.VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["executeRefreshOutsideAngularZone", "enableUnequalChildrenSizes", "RTL", "useMarginInsteadOfTranslate", "modifyOverflowStyleOfParentScroll", "stripedTable", "scrollbarWidth", "scrollbarHeight", "childWidth", "childHeight", "ssrChildWidth", "ssrChildHeight", "ssrViewportWidth", "ssrViewportHeight", "bufferAmount", "scrollAnimationTime", "resizeBypassRefreshThreshold", "scrollThrottlingTime", "scrollDebounceTime", "checkResizeInterval", "items", "compareItems", "horizontal", "parentScroll"], outputs: ["vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["getLastTextAfterSpace", "typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "idGenColor", "textAvatar", "classImageInclude"], outputs: ["outAvatarError"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "component", type: LibsUiComponentsSwitchComponent, selector: "libs_ui-components-switch", inputs: ["size", "disable", "active"], outputs: ["activeChange", "outSwitch"] }, { kind: "component", type: LibsUiComponentsButtonsSortArrowComponent, selector: "libs_ui-components-buttons-sort-arrow", inputs: ["size", "mode", "fieldSort", "disable", "ignorePopoverContent", "popoverContentAsc", "popoverContentDesc", "defaultMode", "zIndex"], outputs: ["modeChange", "outChange"] }, { kind: "directive", type: LibsUiComponentsListHighlightKeySearchDirective, selector: "[LibsUiComponentsListHighlightKeySearchDirective]", inputs: ["isHighlight", "keySearch", "classHighlight"] }, { kind: "component", type: LibsUiComponentsListRowsComponent, selector: "libs_ui-components-list-templates_rows", inputs: ["configTemplate", "item", "keySelected", "fieldKey", "zIndex"], outputs: ["outChangStageFlagMousePopover", "outEvent"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2227
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsListTextComponent, isStandalone: true, selector: "libs_ui-components-list-templates_text", viewQueries: [{ propertyName: "virtualScrollerComponent", first: true, predicate: VirtualScrollerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <div #elementScroll\n [style.height]=\"!configTemplateText.notUseVirtualScroll && heightViewPort() && (!config()?.ignoreShowDataWhenNotSearch || (config()?.ignoreShowDataWhenNotSearch && config()?.ignoreFixHeightShowDataWhenNotSearch)) ? heightViewPort()+'px':'100%'\"\n class=\"w-full\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:scroll.viewPortItems}' />\n </virtual-scroller>\n }\n @if (configTemplateText.notUseVirtualScroll) {\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:items()}' />\n }\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[6px] px-[16px]')\">\n @if (!keySearch() && !loading()) {\n {{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n {{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}\n }\n @if (loading()) {\n \n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"loadingIconSize() || 'medium'\" />\n }\n </div>\n <ng-template #listRef\n let-itemsView='itemsView'>\n @for (item of itemsView; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item flex '+(item().classItem || '')\"\n [class.items-center]=\"!item().itemAlignStart\"\n [class.items-start]=\"item().itemAlignStart\"\n [class.libs-ui-bg-list-hover-danger]=\"!clickExactly() && item().hoverDanger\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly() && !item().hoverDanger\"\n [class.libs-ui-bg-list-active]=\"!clickExactly() && keySelected() === item()[fieldKey()]\"\n [class.!pl-[16px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.libs-ui-bg-list-hover-ffffff]=\"item().disable\"\n [class.cursor-default]=\"item().disable\"\n [class.!py-[2px]]=\"clickExactly()\"\n [class.!pr-[48px]]=\"keySelected() === item()[fieldKey()] && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort)&& !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{'pointer-events-none libs-ui-disable':loading() || disable() || ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem())}\"\n (click)=\"handlerClickRelative($event,item())\">\n @if (item().bullet) {\n <span class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.background-color]=\"item().bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event,item())\">\n </span>\n }\n\n @if (item().avatarConfig; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [classImageInclude]=\"avatarConfig.classImageInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [classImageInclude]=\"avatarConfig.classImageInclude\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"configTemplateText.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage):item()) | async) : item()[configTemplateText.fieldGetImage || '']\"\n [class]=\"'libs-ui-list-template-text-item-avatar ' + (configTemplateText.classIncludeImage ?? '')\"\n [class.w-[18px]]=\"configTemplateText.imgTypeIcon\"\n [class.h-[18px]]=\"configTemplateText.imgTypeIcon\"\n (error)=\"handlerImageError($event, item())\"\n (click)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().buttonLeftConfig; as buttonLeft) {\n @if (item().hrefButton) {\n <a [class.w-full]=\"!buttonLeft.ignoreWidth100\"\n [href]=\"item().hrefButton\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </a>\n }\n @if (!item().hrefButton) {\n <div [class.w-full]=\"!buttonLeft.ignoreWidth100\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </div>\n }\n <ng-template #buttonLeftTemplate>\n <libs_ui-components-buttons-button class=\"w-full\"\n [type]=\"buttonLeft.type || 'button-link-primary'\"\n [label]=\"buttonLeft.label || ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable\"\n [classIconLeft]=\"buttonLeft.classIconLeft ? ((buttonLeft.classIconLeft || '')+' flex mr-[8px] text-[12px]') : ''\"\n [classInclude]=\"(buttonLeft.classInclude|| '')+' w-full'\"\n [classLabel]=\"(buttonLeft.classLabel ?? 'libs-ui-font-h4r')\"\n [ignoreStopPropagationEvent]=\"buttonLeft.ignoreStopPropagationEvent\"\n [styleIconLeft]=\"buttonLeft.styleIconLeft\"\n [styleButton]=\"buttonLeft.styleButton\"\n (moClick)=\"handlerSelectItem($event,item())\" />\n </ng-template>\n }\n @if (item().switchConfig) {\n <libs_ui-components-switch [active]=\"item().switchConfig.active\"\n (moSwitch)=\"handlerSelectItem('click',item())\" />\n }\n @if (item().classIconLeft) {\n <i [class]=\"item().classIconLeft + ' mr-[8px] text-[14px]'\"></i>\n }\n @if (!item().ignoreShowFieldLabel && !configTemplateText.rows) {\n <libs_ui-components-popover [type]=\"item().popoverLabel?.type || 'text'\"\n [elementRefCustom]=\"item().popoverLabel?.type === 'text'? undefined:itemRef\"\n [ignoreShowPopover]=\"item().popoverLabel?.ignoreShowPopover\"\n [config]=\"item().popoverLabel?.config || (configTemplateText.configLabelPopover || {})\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (moEvent)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().fieldPopover; as popover) {\n <libs_ui-components-popover class=\"{{ popover.classInclude || '' }}\"\n [config]=\"popover?.config\">\n @if (!popover.dataView) {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event,$event.item,$event.action)\" />\n }\n @if ((keySelected() === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check '+(configTemplateText.classIncludeIconSelected || 'right-[12px]')\">\n </i>\n }\n @if (keySelected() === item()[fieldKey()] && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText.itemSort?.mode || ''\"\n [fieldSort]=\"item()[fieldKey()]\"\n (outChange)=\"handlerSort($event)\" />\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n}\n", styles: [".libs-ui-list-template-text-item{padding:6px 16px 6px 1px;font-size:12px;line-height:18px;position:relative;cursor:pointer}.libs-ui-list-template-text-item>.libs-ui-icon-check,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort{position:absolute;right:16px}.libs-ui-list-template-text-item>.libs-ui-icon-check:before,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}.libs-ui-list-template-text-item-bullet{width:10px;height:10px;border-radius:50%;margin-right:8px;cursor:pointer}.libs-ui-list-template-text-item-avatar{width:24px;height:24px;border-radius:50%;margin-right:8px;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: VirtualScrollerModule }, { kind: "component", type: i1$1.VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["executeRefreshOutsideAngularZone", "enableUnequalChildrenSizes", "RTL", "useMarginInsteadOfTranslate", "modifyOverflowStyleOfParentScroll", "stripedTable", "scrollbarWidth", "scrollbarHeight", "childWidth", "childHeight", "ssrChildWidth", "ssrChildHeight", "ssrViewportWidth", "ssrViewportHeight", "bufferAmount", "scrollAnimationTime", "resizeBypassRefreshThreshold", "scrollThrottlingTime", "scrollDebounceTime", "checkResizeInterval", "items", "compareItems", "horizontal", "parentScroll"], outputs: ["vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["getLastTextAfterSpace", "typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "idGenColor", "textAvatar", "classImageInclude"], outputs: ["outAvatarError"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "classContainer", "options"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "pipe", type: LibsUiCheckSelectedByKeyPipe, name: "LibsUiCheckSelectedByKeyPipe" }, { kind: "component", type: LibsUiComponentsSwitchComponent, selector: "libs_ui-components-switch", inputs: ["size", "disable", "active"], outputs: ["activeChange", "outSwitch"] }, { kind: "component", type: LibsUiComponentsButtonsSortArrowComponent, selector: "libs_ui-components-buttons-sort-arrow", inputs: ["size", "mode", "fieldSort", "disable", "ignorePopoverContent", "popoverContentAsc", "popoverContentDesc", "defaultMode", "zIndex"], outputs: ["modeChange", "outChange"] }, { kind: "directive", type: LibsUiComponentsListHighlightKeySearchDirective, selector: "[LibsUiComponentsListHighlightKeySearchDirective]", inputs: ["isHighlight", "keySearch", "classHighlight"] }, { kind: "component", type: LibsUiComponentsListRowsComponent, selector: "libs_ui-components-list-templates_rows", inputs: ["configTemplate", "item", "keySelected", "fieldKey", "zIndex"], outputs: ["outChangStageFlagMousePopover", "outEvent"] }, { kind: "pipe", type: LibsUiPipesCallFunctionInTemplatePipe, name: "LibsUiPipesCallFunctionInTemplatePipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2223
2228
|
}
|
|
2224
2229
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsListTextComponent, decorators: [{
|
|
2225
2230
|
type: Component,
|
|
@@ -2236,7 +2241,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2236
2241
|
LibsUiComponentsListHighlightKeySearchDirective,
|
|
2237
2242
|
LibsUiComponentsListRowsComponent,
|
|
2238
2243
|
LibsUiPipesCallFunctionInTemplatePipe
|
|
2239
|
-
], template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <div #elementScroll\n [style.height]=\"!configTemplateText.notUseVirtualScroll && heightViewPort() && (!config()?.ignoreShowDataWhenNotSearch || (config()?.ignoreShowDataWhenNotSearch && config()?.ignoreFixHeightShowDataWhenNotSearch)) ? heightViewPort()+'px':'100%'\"\n class=\"w-full\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:scroll.viewPortItems}' />\n </virtual-scroller>\n }\n @if (configTemplateText.notUseVirtualScroll) {\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:items()}' />\n }\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[6px] px-[16px]')\">\n @if (!keySearch() && !loading()) {\n {{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n {{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}\n }\n @if (loading()) {\n \n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"loadingIconSize() || 'medium'\" />\n }\n </div>\n <ng-template #listRef\n let-itemsView='itemsView'>\n @for (item of itemsView; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item flex '+(item().classItem || '')\"\n [class.items-center]=\"!item().itemAlignStart\"\n [class.items-start]=\"item().itemAlignStart\"\n [class.libs-ui-bg-list-hover-danger]=\"!clickExactly() && item().hoverDanger\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly() && !item().hoverDanger\"\n [class.libs-ui-bg-list-active]=\"!clickExactly() && keySelected() === item()[fieldKey()]\"\n [class.!pl-[16px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.libs-ui-bg-list-hover-ffffff]=\"item().disable\"\n [class.cursor-default]=\"item().disable\"\n [class.py-[2px]]=\"clickExactly()\"\n [class.pr-[48px]]=\"keySelected() === item()[fieldKey()] && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort)&& !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{'pointer-events-none libs-ui-disable':loading() || disable() || ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem())}\"\n (click)=\"handlerClickRelative($event,item())\">\n @if (item().bullet) {\n <span class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.background-color]=\"item().bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event,item())\">\n </span>\n }\n\n @if (item().avatarConfig; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [classImageInclude]=\"avatarConfig.classImageInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [classImageInclude]=\"avatarConfig.classImageInclude\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"configTemplateText.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage):item()) | async) : item()[configTemplateText.fieldGetImage || '']\"\n [class]=\"'libs-ui-list-template-text-item-avatar ' + (configTemplateText.classIncludeImage ?? '')\"\n [class.w-[18px]]=\"configTemplateText.imgTypeIcon\"\n [class.h-[18px]]=\"configTemplateText.imgTypeIcon\"\n (error)=\"handlerImageError($event, item())\"\n (click)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().buttonLeftConfig; as buttonLeft) {\n @if (item().hrefButton) {\n <a [class.w-full]=\"!buttonLeft.ignoreWidth100\"\n [href]=\"item().hrefButton\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </a>\n }\n @if (!item().hrefButton) {\n <div [class.w-full]=\"!buttonLeft.ignoreWidth100\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </div>\n }\n <ng-template #buttonLeftTemplate>\n <libs_ui-components-buttons-button class=\"w-full\"\n [type]=\"buttonLeft.type || 'button-link-primary'\"\n [label]=\"buttonLeft.label || ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable\"\n [classIconLeft]=\"buttonLeft.classIconLeft ? ((buttonLeft.classIconLeft || '')+' flex mr-[8px] text-[12px]') : ''\"\n [classInclude]=\"(buttonLeft.classInclude|| '')+' w-full'\"\n [classLabel]=\"(buttonLeft.classLabel ?? 'libs-ui-font-h4r')\"\n [ignoreStopPropagationEvent]=\"buttonLeft.ignoreStopPropagationEvent\"\n [styleIconLeft]=\"buttonLeft.styleIconLeft\"\n [styleButton]=\"buttonLeft.styleButton\"\n (moClick)=\"handlerSelectItem($event,item())\" />\n </ng-template>\n }\n @if (item().switchConfig) {\n <libs_ui-components-switch [active]=\"item().switchConfig.active\"\n (moSwitch)=\"handlerSelectItem('click',item())\" />\n }\n @if (item().classIconLeft) {\n <i [class]=\"item().classIconLeft + ' mr-[8px] text-[14px]'\"></i>\n }\n @if (!item().ignoreShowFieldLabel && !configTemplateText.rows) {\n <libs_ui-components-popover [type]=\"item().popoverLabel?.type || 'text'\"\n [elementRefCustom]=\"item().popoverLabel?.type === 'text'? undefined:itemRef\"\n [ignoreShowPopover]=\"item().popoverLabel?.ignoreShowPopover\"\n [config]=\"item().popoverLabel?.config || (configTemplateText.configLabelPopover || {})\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (moEvent)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().fieldPopover; as popover) {\n <libs_ui-components-popover class=\"{{ popover.classInclude || '' }}\"\n [config]=\"popover?.config\">\n @if (!popover.dataView) {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event,$event.item,$event.action)\" />\n }\n @if ((keySelected() === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check '+(configTemplateText.classIncludeIconSelected || 'right-[12px]')\">\n </i>\n }\n @if (keySelected() === item()[fieldKey()] && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText.itemSort?.mode || ''\"\n [fieldSort]=\"item()[fieldKey()]\"\n (outChange)=\"handlerSort($event)\" />\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n}\n", styles: [".libs-ui-list-template-text-item{padding:6px 16px 6px 1px;font-size:12px;line-height:18px;position:relative;cursor:pointer}.libs-ui-list-template-text-item>.libs-ui-icon-check,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort{position:absolute;right:16px}.libs-ui-list-template-text-item>.libs-ui-icon-check:before,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}.libs-ui-list-template-text-item-bullet{width:10px;height:10px;border-radius:50%;margin-right:8px;cursor:pointer}.libs-ui-list-template-text-item-avatar{width:24px;height:24px;border-radius:50%;margin-right:8px;cursor:pointer}\n"] }]
|
|
2244
|
+
], template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <div #elementScroll\n [style.height]=\"!configTemplateText.notUseVirtualScroll && heightViewPort() && (!config()?.ignoreShowDataWhenNotSearch || (config()?.ignoreShowDataWhenNotSearch && config()?.ignoreFixHeightShowDataWhenNotSearch)) ? heightViewPort()+'px':'100%'\"\n class=\"w-full\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:scroll.viewPortItems}' />\n </virtual-scroller>\n }\n @if (configTemplateText.notUseVirtualScroll) {\n <ng-container *ngTemplateOutlet='listRef;context:{itemsView:items()}' />\n }\n </div>\n }\n @if ((!items() || !items().length) && (!config()?.ignoreShowDataWhenNotSearch || keySearch())) {\n <div [class]=\"'libs-ui-font-h5r text-[#9ca2ad] '+ (config()?.textNoDataClassInclude ?? 'py-[6px] px-[16px]')\">\n @if (!keySearch() && !loading()) {\n {{ (config()?.textNoData ?? 'i18n_have_no_selection') | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null;context:{keySearch:keySearch()}\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n {{ (config()?.textSearchNoData ?? 'i18n_no_result') | translate }}\n }\n @if (loading()) {\n \n }\n </div>\n }\n @if (loading()) {\n <libs_ui-components-spinner [size]=\"loadingIconSize() || 'medium'\" />\n }\n </div>\n <ng-template #listRef\n let-itemsView='itemsView'>\n @for (item of itemsView; track item()[fieldKey()]) {\n <div #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item flex '+(item().classItem || '')\"\n [class.items-center]=\"!item().itemAlignStart\"\n [class.items-start]=\"item().itemAlignStart\"\n [class.libs-ui-bg-list-hover-danger]=\"!clickExactly() && item().hoverDanger\"\n [class.libs-ui-bg-list-hover]=\"!clickExactly() && !item().hoverDanger\"\n [class.libs-ui-bg-list-active]=\"!clickExactly() && keySelected() === item()[fieldKey()]\"\n [class.!pl-[16px]]=\"paddingLeftItem()\"\n [class.bg-[#ffffff]]=\"clickExactly()\"\n [class.libs-ui-bg-list-hover-ffffff]=\"item().disable\"\n [class.cursor-default]=\"item().disable\"\n [class.!py-[2px]]=\"clickExactly()\"\n [class.!pr-[48px]]=\"keySelected() === item()[fieldKey()] && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort)&& !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{'pointer-events-none libs-ui-disable':loading() || disable() || ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:keysDisableItem():keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem())}\"\n (click)=\"handlerClickRelative($event,item())\">\n @if (item().bullet) {\n <span class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.background-color]=\"item().bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event,item())\">\n </span>\n }\n\n @if (item().avatarConfig; as avatarConfig) {\n <libs_ui-components-avatar [typeShape]=\"avatarConfig.typeShape || 'circle'\"\n [classInclude]=\"avatarConfig.classInclude\"\n [classImageInclude]=\"avatarConfig.classImageInclude\"\n [size]='avatarConfig.size || 32'\n [linkAvatar]=\"avatarConfig.linkAvatar\"\n [linkAvatarError]=\"avatarConfig.linkAvatarError\"\n [idGenColor]=\"avatarConfig.idGenColor\"\n [textAvatar]=\"avatarConfig.textAvatar\"\n [classImageInclude]=\"avatarConfig.classImageInclude\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"configTemplateText.getImage ? (('avatar' | LibsUiPipesCallFunctionInTemplatePipe:(item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage):item()) | async) : item()[configTemplateText.fieldGetImage || '']\"\n [class]=\"'libs-ui-list-template-text-item-avatar ' + (configTemplateText.classIncludeImage ?? '')\"\n [class.w-[18px]]=\"configTemplateText.imgTypeIcon\"\n [class.h-[18px]]=\"configTemplateText.imgTypeIcon\"\n (error)=\"handlerImageError($event, item())\"\n (click)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().buttonLeftConfig; as buttonLeft) {\n @if (item().hrefButton) {\n <a [class.w-full]=\"!buttonLeft.ignoreWidth100\"\n [href]=\"item().hrefButton\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </a>\n }\n @if (!item().hrefButton) {\n <div [class.w-full]=\"!buttonLeft.ignoreWidth100\">\n <ng-container *ngTemplateOutlet=\"buttonLeftTemplate\" />\n </div>\n }\n <ng-template #buttonLeftTemplate>\n <libs_ui-components-buttons-button class=\"w-full\"\n [type]=\"buttonLeft.type || 'button-link-primary'\"\n [label]=\"buttonLeft.label || ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable\"\n [classIconLeft]=\"buttonLeft.classIconLeft ? ((buttonLeft.classIconLeft || '')+' flex mr-[8px] text-[12px]') : ''\"\n [classInclude]=\"(buttonLeft.classInclude|| '')+' w-full'\"\n [classLabel]=\"(buttonLeft.classLabel ?? 'libs-ui-font-h4r')\"\n [ignoreStopPropagationEvent]=\"buttonLeft.ignoreStopPropagationEvent\"\n [styleIconLeft]=\"buttonLeft.styleIconLeft\"\n [styleButton]=\"buttonLeft.styleButton\"\n (moClick)=\"handlerSelectItem($event,item())\" />\n </ng-template>\n }\n @if (item().switchConfig) {\n <libs_ui-components-switch [active]=\"item().switchConfig.active\"\n (moSwitch)=\"handlerSelectItem('click',item())\" />\n }\n @if (item().classIconLeft) {\n <i [class]=\"item().classIconLeft + ' mr-[8px] text-[14px]'\"></i>\n }\n @if (!item().ignoreShowFieldLabel && !configTemplateText.rows) {\n <libs_ui-components-popover [type]=\"item().popoverLabel?.type || 'text'\"\n [elementRefCustom]=\"item().popoverLabel?.type === 'text'? undefined:itemRef\"\n [ignoreShowPopover]=\"item().popoverLabel?.ignoreShowPopover\"\n [config]=\"item().popoverLabel?.config || (configTemplateText.configLabelPopover || {})\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (moEvent)=\"handlerSelectItem($event,item())\" />\n }\n @if (item().fieldPopover; as popover) {\n <libs_ui-components-popover class=\"{{ popover.classInclude || '' }}\"\n [config]=\"popover?.config\">\n @if (!popover.dataView) {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"keySelected()\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event,$event.item,$event.action)\" />\n }\n @if ((keySelected() === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe:multiKeySelected():multiKeySelected()?.length) ? item()[fieldKey()] : undefined) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check '+(configTemplateText.classIncludeIconSelected || 'right-[12px]')\">\n </i>\n }\n @if (keySelected() === item()[fieldKey()] && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText.itemSort?.mode || ''\"\n [fieldSort]=\"item()[fieldKey()]\"\n (outChange)=\"handlerSort($event)\" />\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n}\n", styles: [".libs-ui-list-template-text-item{padding:6px 16px 6px 1px;font-size:12px;line-height:18px;position:relative;cursor:pointer}.libs-ui-list-template-text-item>.libs-ui-icon-check,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort{position:absolute;right:16px}.libs-ui-list-template-text-item>.libs-ui-icon-check:before,.libs-ui-list-template-text-item .libs-ui-list-template-text-sort:before{font-size:16px;color:var(--libs-ui-color-default, #226FF5)}.libs-ui-list-template-text-item-bullet{width:10px;height:10px;border-radius:50%;margin-right:8px;cursor:pointer}.libs-ui-list-template-text-item-avatar{width:24px;height:24px;border-radius:50%;margin-right:8px;cursor:pointer}\n"] }]
|
|
2240
2245
|
}] });
|
|
2241
2246
|
|
|
2242
2247
|
const getComponentByType = (typeTemplate) => {
|
|
@@ -2320,6 +2325,7 @@ class LibsUiComponentsListComponent {
|
|
|
2320
2325
|
onUpdateMultiKeySelectedGroup = new Subject();
|
|
2321
2326
|
onRemoveItems = new Subject();
|
|
2322
2327
|
onUpdateData = new Subject();
|
|
2328
|
+
cleanUpEffect;
|
|
2323
2329
|
componentRef;
|
|
2324
2330
|
configData = signal({
|
|
2325
2331
|
type: 'text',
|
|
@@ -2383,10 +2389,47 @@ class LibsUiComponentsListComponent {
|
|
|
2383
2389
|
/* INJECT */
|
|
2384
2390
|
dynamicComponentService = inject(LibsUiDynamicComponentService);
|
|
2385
2391
|
constructor() {
|
|
2386
|
-
effect(() =>
|
|
2392
|
+
this.cleanUpEffect = effect(() => {
|
|
2393
|
+
if (this.keySearchStore() === this.keySearch()) {
|
|
2394
|
+
return;
|
|
2395
|
+
}
|
|
2396
|
+
const value = this.keySearch();
|
|
2397
|
+
untracked(() => {
|
|
2398
|
+
this.keySearchStore.set(value);
|
|
2399
|
+
this.onSearch.next(value);
|
|
2400
|
+
});
|
|
2401
|
+
});
|
|
2387
2402
|
effect(() => {
|
|
2388
|
-
|
|
2403
|
+
const itemChangeUnSelect = this.itemChangeUnSelect();
|
|
2404
|
+
const keysDisableItem = this.keysDisableItem();
|
|
2405
|
+
const keysHiddenItem = this.keysHiddenItem();
|
|
2406
|
+
const disable = this.disable();
|
|
2407
|
+
untracked(() => {
|
|
2408
|
+
const keySelected = this.keySelected();
|
|
2409
|
+
const multiKeySelected = this.multiKeySelected();
|
|
2410
|
+
this.onItemChangeUnSelect.next(itemChangeUnSelect);
|
|
2411
|
+
if (!this.componentRef) {
|
|
2412
|
+
return;
|
|
2413
|
+
}
|
|
2414
|
+
if (!isEmpty(keysDisableItem)) {
|
|
2415
|
+
this.componentRef.setInput('keysDisableItem', keysDisableItem);
|
|
2416
|
+
}
|
|
2417
|
+
if (!isEmpty(keysHiddenItem)) {
|
|
2418
|
+
this.onSetHiddenItemByKey.next(keysHiddenItem || []);
|
|
2419
|
+
}
|
|
2420
|
+
if (!isEmpty(disable)) {
|
|
2421
|
+
this.componentRef.setInput('disable', disable);
|
|
2422
|
+
}
|
|
2423
|
+
if (!isEmpty(keySelected)) {
|
|
2424
|
+
this.componentRef.setInput('keySelected', keySelected);
|
|
2425
|
+
}
|
|
2426
|
+
if (this.configData()?.type === 'group' && !isEmpty(multiKeySelected)) {
|
|
2427
|
+
this.componentRef.setInput('multiKeySelected', multiKeySelected);
|
|
2428
|
+
this.onUpdateMultiKeySelectedGroup.next();
|
|
2429
|
+
}
|
|
2430
|
+
});
|
|
2389
2431
|
});
|
|
2432
|
+
effect(this.refresh.bind(this));
|
|
2390
2433
|
}
|
|
2391
2434
|
ngOnInit() {
|
|
2392
2435
|
this.outFunctionsControl.emit({
|
|
@@ -2447,7 +2490,7 @@ class LibsUiComponentsListComponent {
|
|
|
2447
2490
|
const instance = this.componentRef.instance;
|
|
2448
2491
|
instance.outChangeView.subscribe(data => {
|
|
2449
2492
|
this.outChangeView.emit(data);
|
|
2450
|
-
if (this.skipFocusInputWhenKeySearchStoreUndefined() && isNil(this.keySearchStore)) {
|
|
2493
|
+
if (this.skipFocusInputWhenKeySearchStoreUndefined() && isNil(this.keySearchStore())) {
|
|
2451
2494
|
return;
|
|
2452
2495
|
}
|
|
2453
2496
|
if (this.focusInputSearch() && this.keySearchStore() !== keySearch) {
|
|
@@ -2494,39 +2537,11 @@ class LibsUiComponentsListComponent {
|
|
|
2494
2537
|
if (type === 'group') {
|
|
2495
2538
|
this.groupMultiKeySelected.set(data.keys);
|
|
2496
2539
|
}
|
|
2497
|
-
console.log('4');
|
|
2498
2540
|
this.outSelectMultiKey.emit(data);
|
|
2499
2541
|
this.checkIsValid();
|
|
2500
2542
|
});
|
|
2501
2543
|
}
|
|
2502
2544
|
/* FUNCTIONS */
|
|
2503
|
-
changeSignal() {
|
|
2504
|
-
this.keySearchStore.set(this.keySearch());
|
|
2505
|
-
this.onSearch.next(this.keySearch());
|
|
2506
|
-
this.onItemChangeUnSelect.next(this.itemChangeUnSelect());
|
|
2507
|
-
if (!this.componentRef) {
|
|
2508
|
-
return;
|
|
2509
|
-
}
|
|
2510
|
-
if (!isEmpty(this.keysDisableItem())) {
|
|
2511
|
-
this.componentRef.setInput('keysDisableItem', this.keysDisableItem());
|
|
2512
|
-
}
|
|
2513
|
-
if (!isEmpty(this.keysHiddenItem())) {
|
|
2514
|
-
this.onSetHiddenItemByKey.next(this.keysHiddenItem() || []);
|
|
2515
|
-
}
|
|
2516
|
-
if (!isEmpty(this.disable())) {
|
|
2517
|
-
this.componentRef.setInput('disable', this.disable());
|
|
2518
|
-
}
|
|
2519
|
-
if (!isEmpty(this.keySelected())) {
|
|
2520
|
-
this.componentRef.setInput('keySelected', this.keySelected());
|
|
2521
|
-
}
|
|
2522
|
-
if (this.configData()?.type !== 'group' && !isEmpty(this.multiKeySelected())) {
|
|
2523
|
-
this.componentRef.setInput('multiKeySelected', this.multiKeySelected());
|
|
2524
|
-
}
|
|
2525
|
-
if (this.configData()?.type === 'group' && !isEmpty(this.multiKeySelected())) {
|
|
2526
|
-
this.componentRef.setInput('multiKeySelected', this.multiKeySelected());
|
|
2527
|
-
this.onUpdateMultiKeySelectedGroup.next();
|
|
2528
|
-
}
|
|
2529
|
-
}
|
|
2530
2545
|
handlerSearch(keySearch) {
|
|
2531
2546
|
this.keySearchStore.set(keySearch);
|
|
2532
2547
|
this.onSearch.next(keySearch);
|
|
@@ -2536,7 +2551,6 @@ class LibsUiComponentsListComponent {
|
|
|
2536
2551
|
return;
|
|
2537
2552
|
}
|
|
2538
2553
|
this.outSelectKey.emit(undefined);
|
|
2539
|
-
console.log('5');
|
|
2540
2554
|
this.outSelectMultiKey.emit(undefined);
|
|
2541
2555
|
this.componentRef.setInput('keySelected', '');
|
|
2542
2556
|
this.componentRef.setInput('multiKeySelected', undefined);
|
|
@@ -2571,8 +2585,10 @@ class LibsUiComponentsListComponent {
|
|
|
2571
2585
|
return;
|
|
2572
2586
|
}
|
|
2573
2587
|
this.dropdownTabKeyActive();
|
|
2574
|
-
|
|
2575
|
-
|
|
2588
|
+
untracked(() => {
|
|
2589
|
+
this.configData.set(this.cloneConfig(config));
|
|
2590
|
+
this.onRefresh.next();
|
|
2591
|
+
});
|
|
2576
2592
|
}
|
|
2577
2593
|
cloneConfig(configInput) {
|
|
2578
2594
|
if (!configInput) {
|
|
@@ -2608,6 +2624,7 @@ class LibsUiComponentsListComponent {
|
|
|
2608
2624
|
return config;
|
|
2609
2625
|
}
|
|
2610
2626
|
ngOnDestroy() {
|
|
2627
|
+
this.cleanUpEffect.destroy();
|
|
2611
2628
|
this.outLoading.emit(false);
|
|
2612
2629
|
this.dynamicComponentService.remove(this.componentRef);
|
|
2613
2630
|
this.onRefresh.complete();
|