@libs-ui/components-list 0.2.346-2 → 0.2.346-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/templates/checkbox/checkbox.component.mjs +19 -17
- package/esm2022/templates/group/item/item.component.mjs +3 -3
- package/esm2022/templates/radio/radio.component.mjs +12 -10
- package/esm2022/templates/templates.component.abstract.mjs +5 -5
- package/esm2022/templates/text/text.component.mjs +12 -12
- package/fesm2022/libs-ui-components-list.mjs +43 -41
- package/fesm2022/libs-ui-components-list.mjs.map +1 -1
- package/package.json +23 -23
|
@@ -7,7 +7,7 @@ import { LibsUiComponentsInputsSearchComponent } from '@libs-ui/components-input
|
|
|
7
7
|
import { LibsUiComponentsLabelComponent } from '@libs-ui/components-label';
|
|
8
8
|
import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
|
|
9
9
|
import { LibsUiDynamicComponentService } from '@libs-ui/services-dynamic-component';
|
|
10
|
-
import { deleteUnicode, isEmpty, convertObjectToSignal, isNil, convertSignalToObject, cloneDeep,
|
|
10
|
+
import { deleteUnicode, isEmpty, convertObjectToSignal, get, isNil, convertSignalToObject, cloneDeep, escapeHtml, uuid, set, ERROR_MESSAGE_EMPTY_VALID, isEqual } from '@libs-ui/utils';
|
|
11
11
|
import * as i1 from '@ngx-translate/core';
|
|
12
12
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
13
13
|
import { lastValueFrom, interval, of, range, Subject, timer } from 'rxjs';
|
|
@@ -23,11 +23,11 @@ import { LibsUiComponentsAvatarComponent } from '@libs-ui/components-avatar';
|
|
|
23
23
|
import { LibsUiComponentsBadgeComponent } from '@libs-ui/components-badge';
|
|
24
24
|
import { LibsUiHttpRequestService } from '@libs-ui/services-http-request';
|
|
25
25
|
import { skipWhile, take } from 'rxjs/operators';
|
|
26
|
+
import { LibsUiPipesGetValueOfObjectPipe } from '@libs-ui/pipes-get-value-of-object';
|
|
26
27
|
import { LibsUiPipesConvertSignalToObjectPipe } from '@libs-ui/pipes-convert-signal-to-object';
|
|
27
28
|
import { LibsUiComponentsRadioSingleComponent } from '@libs-ui/components-radio-single';
|
|
28
29
|
import { LibsUiComponentsButtonsSortArrowComponent } from '@libs-ui/components-buttons-sort';
|
|
29
30
|
import { LibsUiComponentsSwitchComponent } from '@libs-ui/components-switch';
|
|
30
|
-
import { LibsUiPipesGetValueOfObjectPipe } from '@libs-ui/pipes-get-value-of-object';
|
|
31
31
|
|
|
32
32
|
class LibsUiComponentsListHighlightKeySearchDirective {
|
|
33
33
|
isHighlight = input(undefined);
|
|
@@ -458,8 +458,8 @@ class LibsUiComponentsListTemplatesComponentAbstract {
|
|
|
458
458
|
return this.httpRequestService.fakeResponsePagingApi();
|
|
459
459
|
}
|
|
460
460
|
buildValueByConfig(item, configTemplate) {
|
|
461
|
-
const ref = item
|
|
462
|
-
const label = ref
|
|
461
|
+
const ref = get(item, 'ref', {});
|
|
462
|
+
const label = get(ref, 'label') ?? get(ref, 'title ') ?? get(ref, 'value') ?? get(ref, 'name');
|
|
463
463
|
const valueSearchByFunction = configTemplate?.getLabelSearch?.(ref);
|
|
464
464
|
if (!isNil(label) && typeof label !== 'object') {
|
|
465
465
|
item.update((currentItem) => {
|
|
@@ -481,7 +481,7 @@ class LibsUiComponentsListTemplatesComponentAbstract {
|
|
|
481
481
|
if (!configTemplate?.rows?.()) {
|
|
482
482
|
return valueSearchByFunction ?? (item().fieldLabel || ' ');
|
|
483
483
|
}
|
|
484
|
-
let textSearch = item
|
|
484
|
+
let textSearch = get(item, 'fieldLabel', ' ');
|
|
485
485
|
const rows = convertSignalToObject(configTemplate.rows());
|
|
486
486
|
rows.forEach(async (row, indexRow) => {
|
|
487
487
|
const fieldNameRow = `fieldLabelRow${indexRow}`;
|
|
@@ -562,12 +562,12 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
562
562
|
this.outLoading.emit(this.loading());
|
|
563
563
|
if (isSelectAll) {
|
|
564
564
|
if (ids.length) {
|
|
565
|
-
ids.forEach((id) => !keysDisable.some((keyDisable) => keyDisable === id) && keys.add(id));
|
|
565
|
+
ids.forEach((id) => !keysDisable.some((keyDisable) => get(keyDisable, '') === get(id, '')) && keys.add(get(id, '')));
|
|
566
566
|
}
|
|
567
567
|
if (!ids.length) {
|
|
568
568
|
this.items().forEach((item) => {
|
|
569
|
-
const key = item
|
|
570
|
-
if (!keysDisable.some((keyDisable) => keyDisable === key)) {
|
|
569
|
+
const key = get(item, this.fieldKey());
|
|
570
|
+
if (!keysDisable.some((keyDisable) => get(keyDisable, '') === get(key, ''))) {
|
|
571
571
|
keys.add(key);
|
|
572
572
|
}
|
|
573
573
|
});
|
|
@@ -585,8 +585,8 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
585
585
|
});
|
|
586
586
|
if (!ids.length) {
|
|
587
587
|
this.items().forEach((item) => {
|
|
588
|
-
const key = item
|
|
589
|
-
if (!keysDisable.some((keyDisable) => keyDisable === key)) {
|
|
588
|
+
const key = get(item, this.fieldKey());
|
|
589
|
+
if (!keysDisable.some((keyDisable) => get(keyDisable, '') === get(key, ''))) {
|
|
590
590
|
keys.delete(key);
|
|
591
591
|
keyUnSelected.add(key);
|
|
592
592
|
}
|
|
@@ -598,7 +598,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
598
598
|
}
|
|
599
599
|
async getIdsByService() {
|
|
600
600
|
if (!this.searchConfig() || !this.isSearchOnline()) {
|
|
601
|
-
return { code: 200, data: this.items().map((item) => item
|
|
601
|
+
return { code: 200, data: this.items().map((item) => get(item, this.fieldKey())) };
|
|
602
602
|
}
|
|
603
603
|
try {
|
|
604
604
|
if (!this.configTemplateCheckbox()?.httpRequestAllIdSelectOrUnSelect?.()) {
|
|
@@ -644,7 +644,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
644
644
|
}
|
|
645
645
|
handlerChange(event, item, ignoreDisable = false, isClickManual = true) {
|
|
646
646
|
if (this.configTemplateCheckbox()?.ignoreClickItemUnChecked) {
|
|
647
|
-
const key = item
|
|
647
|
+
const key = get(item, this.fieldKey());
|
|
648
648
|
if (this.multiKeySelected()?.includes(key)) {
|
|
649
649
|
return;
|
|
650
650
|
}
|
|
@@ -652,7 +652,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
652
652
|
if (!this.multiKeySelected()) {
|
|
653
653
|
this.multiKeySelected.set([]);
|
|
654
654
|
}
|
|
655
|
-
if (!ignoreDisable && (this.disable() || this.keysDisableItem()?.some((keyDisable) => keyDisable === item
|
|
655
|
+
if (!ignoreDisable && (this.disable() || this.keysDisableItem()?.some((keyDisable) => get(keyDisable, '') === get(item, this.fieldKey())))) {
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
658
658
|
if (event instanceof Event) {
|
|
@@ -682,7 +682,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
682
682
|
return this.outSelectMultiKey.emit({ keys: [], mapKeys, isClickManual });
|
|
683
683
|
}
|
|
684
684
|
multiKeySelected.forEach((key) => {
|
|
685
|
-
const item = this.store().find((item) => item
|
|
685
|
+
const item = this.store().find((item) => get(item, this.fieldKey()) === get(key, ''));
|
|
686
686
|
mapKeys.push({ key, item: convertSignalToObject(item), isClickManual });
|
|
687
687
|
});
|
|
688
688
|
this.outSelectMultiKey.emit({ keys: this.multiKeySelected() || [], mapKeys, isClickManual });
|
|
@@ -709,14 +709,14 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
709
709
|
return { ...currentStore, dataTooltip: this.configTemplateCheckbox()?.getPopover?.(dataStore()) };
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
|
-
const key = keysHidden.find((key) => dataStore
|
|
712
|
+
const key = keysHidden.find((key) => get(dataStore, this.fieldKey()) === get(key, ''));
|
|
713
713
|
if (key === undefined) {
|
|
714
714
|
const text = deleteUnicode(this.buildValueByConfig(dataStore, this.configTemplateCheckbox())).toLocaleLowerCase();
|
|
715
715
|
const textEscape = escapeHtml(text);
|
|
716
716
|
const keySearch = deleteUnicode(escapeHtml(this.keySearch().toLocaleLowerCase()));
|
|
717
717
|
if (((this.isSearchOnline() && this.config()?.httpRequestData?.()?.serviceClass && !this.config()?.httpRequestData?.()?.objectInstance) || (text && (text.includes(keySearch) || textEscape.includes(keySearch)))) &&
|
|
718
|
-
(replace || (!replace && !this.items().find((dataItem) => dataItem
|
|
719
|
-
!itemByKeySearch.find((dataItem) => dataItem
|
|
718
|
+
(replace || (!replace && !this.items().find((dataItem) => get(dataItem, this.fieldKey()) === get(dataStore, this.fieldKey())))) &&
|
|
719
|
+
!itemByKeySearch.find((dataItem) => get(dataItem, this.fieldKey()) === get(dataStore, this.fieldKey()))) {
|
|
720
720
|
dataStore.update((currentStore) => {
|
|
721
721
|
return {
|
|
722
722
|
...currentStore,
|
|
@@ -732,7 +732,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
732
732
|
}
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
|
-
this.items.update((items) => items.filter((item) => item
|
|
735
|
+
this.items.update((items) => items.filter((item) => get(item, this.fieldKey()) !== get(key, '')));
|
|
736
736
|
});
|
|
737
737
|
const callbackCheckScroll = (preStateHasScroll, currentHasScroll) => {
|
|
738
738
|
this.scrollToItemSelected();
|
|
@@ -768,7 +768,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
768
768
|
if (!this.keySelected) {
|
|
769
769
|
return;
|
|
770
770
|
}
|
|
771
|
-
const index = this.items().findIndex((item) => item
|
|
771
|
+
const index = this.items().findIndex((item) => get(item, this.fieldKey()) === get(this.keySelected, ''));
|
|
772
772
|
if (index !== -1) {
|
|
773
773
|
const offsetContainer = this.elementScroll()?.nativeElement?.offsetHeight;
|
|
774
774
|
const additionalOffset = ((offsetContainer ? offsetContainer - this.heightItem() : 0) / 2) * -1;
|
|
@@ -786,7 +786,7 @@ class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplate
|
|
|
786
786
|
return this.items().length;
|
|
787
787
|
}
|
|
788
788
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsListCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
789
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsListCheckboxComponent, isStandalone: true, selector: "libs_ui-components-list-templates_checkbox", viewQueries: [{ propertyName: "virtualScrollerComponent", first: true, predicate: VirtualScrollerComponent, descendants: true, isSignal: true }], 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\n [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-h6ri'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(true)\" />\n <div class=\"text-[#e6e7ea]\">|</div>\n <libs_ui-components-buttons-button\n [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-h6ri'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(false)\" />\n </div>\n }\n @if (items().length && configTemplateCheckbox.configCheckboxCheckAll?.(); as configCheckBox) {\n @let constHtmlLengthMultiKeySelected = multiKeySelected().length || 0;\n @let constHtmlLengthStore = store().length || -1;\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\n [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"(constHtmlLengthMultiKeySelected && constHtmlLengthMultiKeySelected >= constHtmlLengthStore) || false\"\n [stillOtherOptions]=\"!!constHtmlLengthMultiKeySelected && constHtmlLengthMultiKeySelected < constHtmlLengthStore\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerSelect($event.checked, true)\" />\n </div>\n }\n <div [class]=\"'relative h-full w-full ' + (!items() || !items().length ? 'bg-[#ffffff]' : configTemplateCheckbox.classListInclude || '')\">\n @if (items() && items().length) {\n <div\n #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [class.h-full]=\"!(heightViewPort() && !config()?.ignoreShowDataWhenNotSearch)\"\n [style.height]=\"heightViewPort() && !config()?.ignoreShowDataWhenNotSearch ? heightViewPort() + 'px' : '100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller\n #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\n #itemRef\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [attr.clickExactly]=\"clickExactly()\"\n [class]=\"'libs-ui-list-template-checkbox-item libs-ui-font-h5r 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\n class=\"flex flex-col w-full\"\n [class.!flex-row]=\"configTemplateCheckbox.rowSameLineCheckbox\">\n @if (item().fieldLabel) {\n <libs_ui-components-checkbox-single\n [label]=\"item().fieldLabel\"\n [avatarConfig]=\"(item().avatarConfig | LibsUiPipesConvertObjectToSignalPipe)?.()\"\n [linkImage]=\"configTemplateCheckbox.getImage ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getImage : item() | async) : item()[configTemplateCheckbox.fieldGetImage || '']\"\n [linkImageError]=\"\n configTemplateCheckbox.getImageError ? ('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getImageError : item() | async) : item()[configTemplateCheckbox.fieldGetLinkImageError || '']\n \"\n [classLabelInclude]=\"item().classLabelInclude || configTemplateCheckbox.classLabelInclude || 'libs-ui-font-h5r'\"\n [zIndexLabel]=\"configTemplateCheckbox.zIndexPopover ?? 1200\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: multiKeySelected() : multiKeySelected().length\"\n [key]=\"item()[fieldKey()]\"\n [imgTypeIcon]=\"configTemplateCheckbox.hasAvatarGroupSocial\"\n [classInclude]=\"configTemplateCheckbox.classInclude || ''\"\n [classImageInclude]=\"configTemplateCheckbox.classIncludeImage || ''\"\n [bullet]=\"(item().bullet | LibsUiPipesConvertObjectToSignalPipe)?.()\"\n [disable]=\"loading() || disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length)\"\n [popover]=\"(item().popoverLabel | LibsUiPipesConvertObjectToSignalPipe)?.() | LibsUiPipesConvertSignalToObjectPipe\"\n [clickExactly]=\"clickExactly()\"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getDataComponentOutlet : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getComponentOutlet : item() : fieldKey() : { valueIs0: 0 } | async\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerChange('checkbox', item())\" />\n }\n @if (configTemplateCheckbox?.rows) {\n <libs_ui-components-list-templates_rows\n 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 @let constHtmlTextNoData = config()?.textNoData || 'i18n_have_no_selection';\n <span>{{ constHtmlTextNoData | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null; context: { keySearch: keySearch() }\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n @let constHtmlTextSearchNoData = config()?.textSearchNoData || 'i18n_no_result';\n <span>{{ constHtmlTextSearchNoData | translate }}</span>\n }\n @if (loading()) {\n <span> </span>\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 16px;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", "isHandlerEnterDocumentClickButton"], 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", "dataComponentOutlet", "componentOutlet"], 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", "ignoreInit", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY", "elementScroll"], 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" }, { kind: "pipe", type: LibsUiPipesConvertObjectToSignalPipe, name: "LibsUiPipesConvertObjectToSignalPipe" }, { kind: "pipe", type: LibsUiPipesConvertSignalToObjectPipe, name: "LibsUiPipesConvertSignalToObjectPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
789
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsListCheckboxComponent, isStandalone: true, selector: "libs_ui-components-list-templates_checkbox", viewQueries: [{ propertyName: "virtualScrollerComponent", first: true, predicate: VirtualScrollerComponent, descendants: true, isSignal: true }], 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\n [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-h6ri'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(true)\" />\n <div class=\"text-[#e6e7ea]\">|</div>\n <libs_ui-components-buttons-button\n [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-h6ri'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(false)\" />\n </div>\n }\n @if (items().length && configTemplateCheckbox.configCheckboxCheckAll?.(); as configCheckBox) {\n @let constHtmlLengthMultiKeySelected = multiKeySelected().length || 0;\n @let constHtmlLengthStore = store().length || -1;\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\n [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"(constHtmlLengthMultiKeySelected && constHtmlLengthMultiKeySelected >= constHtmlLengthStore) || false\"\n [stillOtherOptions]=\"!!constHtmlLengthMultiKeySelected && constHtmlLengthMultiKeySelected < constHtmlLengthStore\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerSelect($event.checked, true)\" />\n </div>\n }\n <div [class]=\"'relative h-full w-full ' + (!items() || !items().length ? 'bg-[#ffffff]' : configTemplateCheckbox.classListInclude || '')\">\n @if (items() && items().length) {\n <div\n #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [class.h-full]=\"!(heightViewPort() && !config()?.ignoreShowDataWhenNotSearch)\"\n [style.height]=\"heightViewPort() && !config()?.ignoreShowDataWhenNotSearch ? heightViewPort() + 'px' : '100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller\n #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item(); let last = $last) {\n @let constHtmlKeyItem = item() | LibsUiPipesGetValueOfObjectPipe: fieldKey();\n <div [class]=\"last ? configTemplateCheckbox.classIncludeLastViewItem || '' : ''\">\n <div\n #itemRef\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [attr.clickExactly]=\"clickExactly()\"\n [class]=\"'libs-ui-list-template-checkbox-item libs-ui-font-h5r 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\n class=\"flex flex-col w-full\"\n [class.!flex-row]=\"configTemplateCheckbox.rowSameLineCheckbox\">\n @if (item().fieldLabel) {\n <libs_ui-components-checkbox-single\n [label]=\"item().fieldLabel\"\n [avatarConfig]=\"(item().avatarConfig | LibsUiPipesConvertObjectToSignalPipe)?.()\"\n [linkImage]=\"configTemplateCheckbox.getImage ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getImage : item() | async) : item()[configTemplateCheckbox.fieldGetImage || '']\"\n [linkImageError]=\"\n configTemplateCheckbox.getImageError ? ('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getImageError : item() | async) : item()[configTemplateCheckbox.fieldGetLinkImageError || '']\n \"\n [classLabelInclude]=\"item().classLabelInclude || configTemplateCheckbox.classLabelInclude || 'libs-ui-font-h5r'\"\n [zIndexLabel]=\"configTemplateCheckbox.zIndexPopover ?? 1200\"\n [checked]=\"constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: multiKeySelected() : multiKeySelected().length\"\n [key]=\"constHtmlKeyItem\"\n [imgTypeIcon]=\"configTemplateCheckbox.hasAvatarGroupSocial\"\n [classInclude]=\"configTemplateCheckbox.classInclude || ''\"\n [classImageInclude]=\"configTemplateCheckbox.classIncludeImage || ''\"\n [bullet]=\"(item().bullet | LibsUiPipesConvertObjectToSignalPipe)?.()\"\n [disable]=\"loading() || disable() || (constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length)\"\n [popover]=\"(item().popoverLabel | LibsUiPipesConvertObjectToSignalPipe)?.() | LibsUiPipesConvertSignalToObjectPipe\"\n [clickExactly]=\"clickExactly()\"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getDataComponentOutlet : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getComponentOutlet : item() : fieldKey() : { valueIs0: 0 } | async\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerChange('checkbox', item())\" />\n }\n @if (configTemplateCheckbox?.rows) {\n <libs_ui-components-list-templates_rows\n class=\"{{ !configTemplateCheckbox.ignoreItemWidth100 ? 'w-full' : '' }} {{ (configTemplateCheckbox.classRowsWrapper || configTemplateCheckbox.classRows) ?? '' }}\"\n [item]=\"item()\"\n [zIndex]=\"zIndex()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"(constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: multiKeySelected() : multiKeySelected().length) ? constHtmlKeyItem : 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 @let constHtmlTextNoData = config()?.textNoData || 'i18n_have_no_selection';\n <span>{{ constHtmlTextNoData | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null; context: { keySearch: keySearch() }\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n @let constHtmlTextSearchNoData = config()?.textSearchNoData || 'i18n_no_result';\n <span>{{ constHtmlTextSearchNoData | translate }}</span>\n }\n @if (loading()) {\n <span> </span>\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 16px;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", "isHandlerEnterDocumentClickButton"], 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", "dataComponentOutlet", "componentOutlet"], 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", "ignoreInit", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY", "elementScroll"], 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" }, { kind: "pipe", type: LibsUiPipesConvertObjectToSignalPipe, name: "LibsUiPipesConvertObjectToSignalPipe" }, { kind: "pipe", type: LibsUiPipesConvertSignalToObjectPipe, name: "LibsUiPipesConvertSignalToObjectPipe" }, { kind: "pipe", type: LibsUiPipesGetValueOfObjectPipe, name: "LibsUiPipesGetValueOfObjectPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
790
790
|
}
|
|
791
791
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsListCheckboxComponent, decorators: [{
|
|
792
792
|
type: Component,
|
|
@@ -807,7 +807,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
807
807
|
LibsUiPipesCallFunctionInTemplatePipe,
|
|
808
808
|
LibsUiPipesConvertObjectToSignalPipe,
|
|
809
809
|
LibsUiPipesConvertSignalToObjectPipe,
|
|
810
|
-
|
|
810
|
+
LibsUiPipesGetValueOfObjectPipe
|
|
811
|
+
], 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\n [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-h6ri'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(true)\" />\n <div class=\"text-[#e6e7ea]\">|</div>\n <libs_ui-components-buttons-button\n [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-h6ri'\"\n [disable]=\"loading() || disable() || false\"\n (outClick)=\"handlerSelect(false)\" />\n </div>\n }\n @if (items().length && configTemplateCheckbox.configCheckboxCheckAll?.(); as configCheckBox) {\n @let constHtmlLengthMultiKeySelected = multiKeySelected().length || 0;\n @let constHtmlLengthStore = store().length || -1;\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\n [label]=\"configCheckBox.label ?? 'i18n_all'\"\n [classLabelInclude]=\"configCheckBox.classLabelInclude || ''\"\n [checked]=\"(constHtmlLengthMultiKeySelected && constHtmlLengthMultiKeySelected >= constHtmlLengthStore) || false\"\n [stillOtherOptions]=\"!!constHtmlLengthMultiKeySelected && constHtmlLengthMultiKeySelected < constHtmlLengthStore\"\n [disable]=\"loading() || disable() || false\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerSelect($event.checked, true)\" />\n </div>\n }\n <div [class]=\"'relative h-full w-full ' + (!items() || !items().length ? 'bg-[#ffffff]' : configTemplateCheckbox.classListInclude || '')\">\n @if (items() && items().length) {\n <div\n #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [class.h-full]=\"!(heightViewPort() && !config()?.ignoreShowDataWhenNotSearch)\"\n [style.height]=\"heightViewPort() && !config()?.ignoreShowDataWhenNotSearch ? heightViewPort() + 'px' : '100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller\n #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item(); let last = $last) {\n @let constHtmlKeyItem = item() | LibsUiPipesGetValueOfObjectPipe: fieldKey();\n <div [class]=\"last ? configTemplateCheckbox.classIncludeLastViewItem || '' : ''\">\n <div\n #itemRef\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [attr.clickExactly]=\"clickExactly()\"\n [class]=\"'libs-ui-list-template-checkbox-item libs-ui-font-h5r 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\n class=\"flex flex-col w-full\"\n [class.!flex-row]=\"configTemplateCheckbox.rowSameLineCheckbox\">\n @if (item().fieldLabel) {\n <libs_ui-components-checkbox-single\n [label]=\"item().fieldLabel\"\n [avatarConfig]=\"(item().avatarConfig | LibsUiPipesConvertObjectToSignalPipe)?.()\"\n [linkImage]=\"configTemplateCheckbox.getImage ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getImage : item() | async) : item()[configTemplateCheckbox.fieldGetImage || '']\"\n [linkImageError]=\"\n configTemplateCheckbox.getImageError ? ('avatar_error' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getImageError : item() | async) : item()[configTemplateCheckbox.fieldGetLinkImageError || '']\n \"\n [classLabelInclude]=\"item().classLabelInclude || configTemplateCheckbox.classLabelInclude || 'libs-ui-font-h5r'\"\n [zIndexLabel]=\"configTemplateCheckbox.zIndexPopover ?? 1200\"\n [checked]=\"constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: multiKeySelected() : multiKeySelected().length\"\n [key]=\"constHtmlKeyItem\"\n [imgTypeIcon]=\"configTemplateCheckbox.hasAvatarGroupSocial\"\n [classInclude]=\"configTemplateCheckbox.classInclude || ''\"\n [classImageInclude]=\"configTemplateCheckbox.classIncludeImage || ''\"\n [bullet]=\"(item().bullet | LibsUiPipesConvertObjectToSignalPipe)?.()\"\n [disable]=\"loading() || disable() || (constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length)\"\n [popover]=\"(item().popoverLabel | LibsUiPipesConvertObjectToSignalPipe)?.() | LibsUiPipesConvertSignalToObjectPipe\"\n [clickExactly]=\"clickExactly()\"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getDataComponentOutlet : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateCheckbox.getComponentOutlet : item() : fieldKey() : { valueIs0: 0 } | async\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerChange('checkbox', item())\" />\n }\n @if (configTemplateCheckbox?.rows) {\n <libs_ui-components-list-templates_rows\n class=\"{{ !configTemplateCheckbox.ignoreItemWidth100 ? 'w-full' : '' }} {{ (configTemplateCheckbox.classRowsWrapper || configTemplateCheckbox.classRows) ?? '' }}\"\n [item]=\"item()\"\n [zIndex]=\"zIndex()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"(constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: multiKeySelected() : multiKeySelected().length) ? constHtmlKeyItem : 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 @let constHtmlTextNoData = config()?.textNoData || 'i18n_have_no_selection';\n <span>{{ constHtmlTextNoData | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null; context: { keySearch: keySearch() }\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n @let constHtmlTextSearchNoData = config()?.textSearchNoData || 'i18n_no_result';\n <span>{{ constHtmlTextSearchNoData | translate }}</span>\n }\n @if (loading()) {\n <span> </span>\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 16px;position:relative}\n"] }]
|
|
811
812
|
}] });
|
|
812
813
|
|
|
813
814
|
class LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe {
|
|
@@ -958,7 +959,7 @@ class LibsUiComponentsListGroupItemComponent {
|
|
|
958
959
|
this.outChangStageFlagMousePopover.emit(flag);
|
|
959
960
|
}
|
|
960
961
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsListGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
961
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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", outChangStageFlagMousePopover: "outChangStageFlagMousePopover" }, ngImport: i0, template: "@if (configTemplateGroup(); as configTemplateGroup) {\n @if ((configTemplateGroup.isViewTree && !!items().length) || (parentItem().maxLevelGroup > 2 && parentItem().level > 1)) {\n <div\n class=\"libs-ui-list-group-item-line-vertical\"\n [style.left.px]=\"\n parentItem().level\n | LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe\n : parentItem().maxLevelGroup\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(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]=\"\n item().level\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : item().maxLevelGroup\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n \"\n [style.paddingLeft.px]=\"\n item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe: item().maxLevelGroup : configTemplateGroup.isViewTree : configTemplateGroup.isViewTreeJson : !!item()[configTemplateGroup.fieldGetItems]?.()?.length\n \"\n [style.paddingRight.px]=\"\n item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe: item().maxLevelGroup : configTemplateGroup.isViewTree : configTemplateGroup.isViewTreeJson : !!item()[configTemplateGroup.fieldGetItems]?.()?.length\n \"\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]=\"\n !disable() && !(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !item().isAcceptSelectItem) && !(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length)\n \"\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 && !item().isAcceptSelectItem))\">\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTree) {\n <i\n class=\"libs-ui-icon-chevron-right before:!text-[16px]\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event, item)\"></i>\n }\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]()?.length) {\n <div [class]=\"'p-[5px]'\">\n <div\n [class]=\"'libs-ui-list-group-json_icon-item-parent'\"\n [attr.disabled]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) || false\"></div>\n </div>\n }\n <div class=\"flex w-full relative\">\n <div\n #labelRef\n class=\"invisible\"\n [class.hidden]=\"configTemplateGroup.ignoreFixHeightItem\">\n .\n </div>\n <div\n class=\"flex items-center w-full\"\n [class.absolute]=\"!configTemplateGroup.ignoreFixHeightItem\"\n [style.height.px]=\"!configTemplateGroup.ignoreFixHeightItem ? labelRef.clientHeight : 'auto'\">\n @let constHtmlClassIncludeItem = (configTemplateGroup.classIncludeItem || '') + ' w-full';\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single\n [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree || (configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.()?.length)\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.singleSelectItem\"\n [class]=\"constHtmlClassIncludeItem\"\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)]]=\"\n ((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) ||\n (configTemplateGroup.widthLabelSub24WhenNotTreeView &&\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) &&\n configTemplateGroup.singleSelectItem &&\n (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey))) &&\n !configTemplateGroup.ignoreIconExpandMarginRight\n \"\n [clickExactly]=\"false\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [disable]=\"\n disable() ||\n (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !item().isAcceptSelectItem && !configTemplateGroup.isViewTreeJson) ||\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) ||\n false\n \"\n [label]=\"item().fieldLabel\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysStillOtherOptions() : keysStillOtherOptions().length\"\n [classLabelInclude]=\"\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\n ? 'libs-ui-color-default libs-ui-font-h5r'\n : 'libs-ui-font-h5r'\n \"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getDataComponentOutletItem : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getComponentOutletItem : item() : fieldKey() : { valueIs0: 0 } | async\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getImage : item() | async) : (item()[configTemplateGroup.fieldGetAvatarItem || ''] | async)\"\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\n [avatarConfig]=\"item().avatarConfig\"\n [class.!ml-[8px]]=\"configTemplateGroup.isViewTree\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem\"\n [class]=\"constHtmlClassIncludeItem\"\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]=\"\n disable() ||\n (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.()?.length) ||\n (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) ||\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) ||\n false\n \"\n [label]=\"item().fieldLabel\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length\"\n [classLabelInclude]=\"\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\n ? 'text-[#009cdb] libs-ui-font-h5r '\n : ' libs-ui-font-h5r '\n \"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getDataComponentOutletItem : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getComponentOutletItem : item() : fieldKey() : { valueIs0: 0 } | async\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"\n configTemplateGroup.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage) : item() | async)\n : item()[configTemplateGroup.fieldGetAvatarItem || '']\n \"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n </div>\n </div>\n @if ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey)) {\n <i\n class=\"libs-ui-icon-check before:!text-[16px]\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n [class.libs-ui-icon-check]=\"configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\"></i>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.()?.length && !configTemplateGroup.isViewTree && !configTemplateGroup.isViewTreeJson) {\n <i\n class=\"libs-ui-icon-chevron-right before:!text-[16px]\"\n [class.rotate-90]=\"item().expand\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n (click)=\"handlerToggleExpand($event, item)\"></i>\n }\n </div>\n @if (item().expand || configTemplateGroup.isViewTreeJson) {\n @if (item().level < item().maxLevelGroup && !item()[configTemplateGroup.fieldGetItems]?.()?.length && configTemplateGroup.isViewTree) {\n <div\n class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"\n item().level + 1\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : item().maxLevelGroup + 1\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n : true\n \"\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\n [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 (outChangStageFlagMousePopover)=\"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\n class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"\n parentItem().level + 1\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : parentItem().maxLevelGroup + 1\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n : true\n \"\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 @let constHtmlTextNoData = parentItem().textDescriptionGroupWhenNoData || config()?.textNoData || 'i18n_no_result';\n <span>{{ constHtmlTextNoData | 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", "outChangStageFlagMousePopover"] }, { 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", "dataComponentOutlet", "componentOutlet"], 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", "ignorePopoverLabel", "classLabelInclude", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "popover", "disable", "disableLabel", "clickExactly", "typeRadio", "ignoreRadio", "zIndexLabel", "classIncludeIcon", "dataComponentOutlet", "componentOutlet"], outputs: ["activeChange", "outClickLabel", "outChange", "outChangStageFlagMousePopover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
962
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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", outChangStageFlagMousePopover: "outChangStageFlagMousePopover" }, ngImport: i0, template: "@if (configTemplateGroup(); as configTemplateGroup) {\n @if ((configTemplateGroup.isViewTree && !!items().length) || (parentItem().maxLevelGroup > 2 && parentItem().level > 1)) {\n <div\n class=\"libs-ui-list-group-item-line-vertical\"\n [style.left.px]=\"\n parentItem().level\n | LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe\n : parentItem().maxLevelGroup\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n \"></div>\n }\n @if (items() && items().length) {\n @for (item of items(); track item()) {\n <div>\n <div\n [style.marginLeft.px]=\"\n item().level\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : item().maxLevelGroup\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n \"\n [style.paddingLeft.px]=\"\n item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe: item().maxLevelGroup : configTemplateGroup.isViewTree : configTemplateGroup.isViewTreeJson : !!item()[configTemplateGroup.fieldGetItems]?.()?.length\n \"\n [style.paddingRight.px]=\"\n item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe: item().maxLevelGroup : configTemplateGroup.isViewTree : configTemplateGroup.isViewTreeJson : !!item()[configTemplateGroup.fieldGetItems]?.()?.length\n \"\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]=\"\n !disable() && !(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !item().isAcceptSelectItem) && !(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length)\n \"\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 && !item().isAcceptSelectItem))\">\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTree) {\n <i\n class=\"libs-ui-icon-chevron-right before:!text-[16px]\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event, item)\"></i>\n }\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]()?.length) {\n <div [class]=\"'p-[5px]'\">\n <div\n [class]=\"'libs-ui-list-group-json_icon-item-parent'\"\n [attr.disabled]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) || false\"></div>\n </div>\n }\n <div class=\"flex w-full relative\">\n <div\n #labelRef\n class=\"invisible\"\n [class.hidden]=\"configTemplateGroup.ignoreFixHeightItem\">\n .\n </div>\n <div\n class=\"flex items-center w-full\"\n [class.absolute]=\"!configTemplateGroup.ignoreFixHeightItem\"\n [style.height.px]=\"!configTemplateGroup.ignoreFixHeightItem ? labelRef.clientHeight : 'auto'\">\n @let constHtmlClassIncludeItem = (configTemplateGroup.classIncludeItem || '') + ' w-full';\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single\n [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree || (configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.()?.length)\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.singleSelectItem\"\n [class]=\"constHtmlClassIncludeItem\"\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)]]=\"\n ((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) ||\n (configTemplateGroup.widthLabelSub24WhenNotTreeView &&\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) &&\n configTemplateGroup.singleSelectItem &&\n (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey))) &&\n !configTemplateGroup.ignoreIconExpandMarginRight\n \"\n [clickExactly]=\"false\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [disable]=\"\n disable() ||\n (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !item().isAcceptSelectItem && !configTemplateGroup.isViewTreeJson) ||\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) ||\n false\n \"\n [label]=\"item().fieldLabel\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysStillOtherOptions() : keysStillOtherOptions().length\"\n [classLabelInclude]=\"\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\n ? 'libs-ui-color-default libs-ui-font-h5r'\n : 'libs-ui-font-h5r'\n \"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getDataComponentOutletItem : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getComponentOutletItem : item() : fieldKey() : { valueIs0: 0 } | async\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getImage : item() | async) : (item()[configTemplateGroup.fieldGetAvatarItem || ''] | async)\"\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\n [avatarConfig]=\"item().avatarConfig\"\n [class.!ml-[8px]]=\"configTemplateGroup.isViewTree\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem\"\n [class]=\"constHtmlClassIncludeItem\"\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]=\"\n disable() ||\n (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.()?.length) ||\n (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) ||\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) ||\n false\n \"\n [label]=\"item().fieldLabel\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length\"\n [classLabelInclude]=\"\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\n ? 'text-[#009cdb] libs-ui-font-h5r '\n : ' libs-ui-font-h5r '\n \"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getDataComponentOutletItem : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getComponentOutletItem : item() : fieldKey() : { valueIs0: 0 } | async\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"\n configTemplateGroup.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage) : item() | async)\n : item()[configTemplateGroup.fieldGetAvatarItem || '']\n \"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n </div>\n </div>\n @if ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey)) {\n <i\n class=\"libs-ui-icon-check before:!text-[16px]\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n [class.libs-ui-icon-check]=\"configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\"></i>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.()?.length && !configTemplateGroup.isViewTree && !configTemplateGroup.isViewTreeJson) {\n <i\n class=\"libs-ui-icon-chevron-right before:!text-[16px]\"\n [class.rotate-90]=\"item().expand\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n (click)=\"handlerToggleExpand($event, item)\"></i>\n }\n </div>\n @if (item().expand || configTemplateGroup.isViewTreeJson) {\n @if (item().level < item().maxLevelGroup && !item()[configTemplateGroup.fieldGetItems]?.()?.length && configTemplateGroup.isViewTree) {\n <div\n class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"\n item().level + 1\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : item().maxLevelGroup + 1\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n : true\n \"\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\n [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 (outChangStageFlagMousePopover)=\"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\n class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"\n parentItem().level + 1\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : parentItem().maxLevelGroup + 1\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n : true\n \"\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 @let constHtmlTextNoData = parentItem().textDescriptionGroupWhenNoData || config()?.textNoData || 'i18n_no_result';\n <span>{{ constHtmlTextNoData | 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", "outChangStageFlagMousePopover"] }, { 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", "dataComponentOutlet", "componentOutlet"], 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", "ignorePopoverLabel", "classLabelInclude", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "popover", "disable", "disableLabel", "clickExactly", "typeRadio", "ignoreRadio", "zIndexLabel", "classIncludeIcon", "dataComponentOutlet", "componentOutlet"], outputs: ["activeChange", "outClickLabel", "outChange", "outChangStageFlagMousePopover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
962
963
|
}
|
|
963
964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsListGroupItemComponent, decorators: [{
|
|
964
965
|
type: Component,
|
|
@@ -974,7 +975,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
974
975
|
LibsUiComponentsCheckboxSingleComponent,
|
|
975
976
|
LibsUiPipesCallFunctionInTemplatePipe,
|
|
976
977
|
LibsUiComponentsRadioSingleComponent,
|
|
977
|
-
], template: "@if (configTemplateGroup(); as configTemplateGroup) {\n @if ((configTemplateGroup.isViewTree && !!items().length) || (parentItem().maxLevelGroup > 2 && parentItem().level > 1)) {\n <div\n class=\"libs-ui-list-group-item-line-vertical\"\n [style.left.px]=\"\n parentItem().level\n | LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe\n : parentItem().maxLevelGroup\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(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]=\"\n item().level\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : item().maxLevelGroup\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n \"\n [style.paddingLeft.px]=\"\n item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe: item().maxLevelGroup : configTemplateGroup.isViewTree : configTemplateGroup.isViewTreeJson : !!item()[configTemplateGroup.fieldGetItems]?.()?.length\n \"\n [style.paddingRight.px]=\"\n item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe: item().maxLevelGroup : configTemplateGroup.isViewTree : configTemplateGroup.isViewTreeJson : !!item()[configTemplateGroup.fieldGetItems]?.()?.length\n \"\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]=\"\n !disable() && !(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !item().isAcceptSelectItem) && !(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length)\n \"\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 && !item().isAcceptSelectItem))\">\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTree) {\n <i\n class=\"libs-ui-icon-chevron-right before:!text-[16px]\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event, item)\"></i>\n }\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]()?.length) {\n <div [class]=\"'p-[5px]'\">\n <div\n [class]=\"'libs-ui-list-group-json_icon-item-parent'\"\n [attr.disabled]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) || false\"></div>\n </div>\n }\n <div class=\"flex w-full relative\">\n <div\n #labelRef\n class=\"invisible\"\n [class.hidden]=\"configTemplateGroup.ignoreFixHeightItem\">\n .\n </div>\n <div\n class=\"flex items-center w-full\"\n [class.absolute]=\"!configTemplateGroup.ignoreFixHeightItem\"\n [style.height.px]=\"!configTemplateGroup.ignoreFixHeightItem ? labelRef.clientHeight : 'auto'\">\n @let constHtmlClassIncludeItem = (configTemplateGroup.classIncludeItem || '') + ' w-full';\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single\n [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree || (configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.()?.length)\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.singleSelectItem\"\n [class]=\"constHtmlClassIncludeItem\"\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)]]=\"\n ((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) ||\n (configTemplateGroup.widthLabelSub24WhenNotTreeView &&\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) &&\n configTemplateGroup.singleSelectItem &&\n (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey))) &&\n !configTemplateGroup.ignoreIconExpandMarginRight\n \"\n [clickExactly]=\"false\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [disable]=\"\n disable() ||\n (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !item().isAcceptSelectItem && !configTemplateGroup.isViewTreeJson) ||\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) ||\n false\n \"\n [label]=\"item().fieldLabel\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysStillOtherOptions() : keysStillOtherOptions().length\"\n [classLabelInclude]=\"\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\n ? 'libs-ui-color-default libs-ui-font-h5r'\n : 'libs-ui-font-h5r'\n \"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getDataComponentOutletItem : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getComponentOutletItem : item() : fieldKey() : { valueIs0: 0 } | async\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getImage : item() | async) : (item()[configTemplateGroup.fieldGetAvatarItem || ''] | async)\"\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\n [avatarConfig]=\"item().avatarConfig\"\n [class.!ml-[8px]]=\"configTemplateGroup.isViewTree\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem\"\n [class]=\"constHtmlClassIncludeItem\"\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]=\"\n disable() ||\n (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.()?.length) ||\n (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) ||\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) ||\n false\n \"\n [label]=\"item().fieldLabel\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length\"\n [classLabelInclude]=\"\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\n ? 'text-[#009cdb] libs-ui-font-h5r '\n : ' libs-ui-font-h5r '\n \"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getDataComponentOutletItem : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getComponentOutletItem : item() : fieldKey() : { valueIs0: 0 } | async\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"\n configTemplateGroup.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage) : item() | async)\n : item()[configTemplateGroup.fieldGetAvatarItem || '']\n \"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n </div>\n </div>\n @if ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey)) {\n <i\n class=\"libs-ui-icon-check before:!text-[16px]\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n [class.libs-ui-icon-check]=\"configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\"></i>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.()?.length && !configTemplateGroup.isViewTree && !configTemplateGroup.isViewTreeJson) {\n <i\n class=\"libs-ui-icon-chevron-right before:!text-[16px]\"\n [class.rotate-90]=\"item().expand\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n (click)=\"handlerToggleExpand($event, item)\"></i>\n }\n </div>\n @if (item().expand || configTemplateGroup.isViewTreeJson) {\n @if (item().level < item().maxLevelGroup && !item()[configTemplateGroup.fieldGetItems]?.()?.length && configTemplateGroup.isViewTree) {\n <div\n class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"\n item().level + 1\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : item().maxLevelGroup + 1\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n : true\n \"\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\n [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 (outChangStageFlagMousePopover)=\"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\n class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"\n parentItem().level + 1\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : parentItem().maxLevelGroup + 1\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n : true\n \"\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 @let constHtmlTextNoData = parentItem().textDescriptionGroupWhenNoData || config()?.textNoData || 'i18n_no_result';\n <span>{{ constHtmlTextNoData | 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"] }]
|
|
978
|
+
], template: "@if (configTemplateGroup(); as configTemplateGroup) {\n @if ((configTemplateGroup.isViewTree && !!items().length) || (parentItem().maxLevelGroup > 2 && parentItem().level > 1)) {\n <div\n class=\"libs-ui-list-group-item-line-vertical\"\n [style.left.px]=\"\n parentItem().level\n | LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe\n : parentItem().maxLevelGroup\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n \"></div>\n }\n @if (items() && items().length) {\n @for (item of items(); track item()) {\n <div>\n <div\n [style.marginLeft.px]=\"\n item().level\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : item().maxLevelGroup\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n \"\n [style.paddingLeft.px]=\"\n item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe: item().maxLevelGroup : configTemplateGroup.isViewTree : configTemplateGroup.isViewTreeJson : !!item()[configTemplateGroup.fieldGetItems]?.()?.length\n \"\n [style.paddingRight.px]=\"\n item().level | LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe: item().maxLevelGroup : configTemplateGroup.isViewTree : configTemplateGroup.isViewTreeJson : !!item()[configTemplateGroup.fieldGetItems]?.()?.length\n \"\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]=\"\n !disable() && !(configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !item().isAcceptSelectItem) && !(item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length)\n \"\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 && !item().isAcceptSelectItem))\">\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTree) {\n <i\n class=\"libs-ui-icon-chevron-right before:!text-[16px]\"\n [class.rotate-90]=\"item().expand\"\n (click)=\"handlerToggleExpand($event, item)\"></i>\n }\n @if (item().level < item().maxLevelGroup && configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]()?.length) {\n <div [class]=\"'p-[5px]'\">\n <div\n [class]=\"'libs-ui-list-group-json_icon-item-parent'\"\n [attr.disabled]=\"disable() || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) || false\"></div>\n </div>\n }\n <div class=\"flex w-full relative\">\n <div\n #labelRef\n class=\"invisible\"\n [class.hidden]=\"configTemplateGroup.ignoreFixHeightItem\">\n .\n </div>\n <div\n class=\"flex items-center w-full\"\n [class.absolute]=\"!configTemplateGroup.ignoreFixHeightItem\"\n [style.height.px]=\"!configTemplateGroup.ignoreFixHeightItem ? labelRef.clientHeight : 'auto'\">\n @let constHtmlClassIncludeItem = (configTemplateGroup.classIncludeItem || '') + ' w-full';\n @if (!configTemplateGroup.isViewRadio) {\n <libs_ui-components-checkbox-single\n [avatarConfig]=\"item().avatarConfig\"\n [class.ml-[8px]]=\"configTemplateGroup.isViewTree || (configTemplateGroup.isViewTreeJson && !!item()[configTemplateGroup.fieldGetItems]?.()?.length)\"\n [ignoreCheckbox]=\"configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.singleSelectItem\"\n [class]=\"constHtmlClassIncludeItem\"\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)]]=\"\n ((configTemplateGroup.isViewTree && !configTemplateGroup.hasIconCheckSingleSelectItem) ||\n (configTemplateGroup.widthLabelSub24WhenNotTreeView &&\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) &&\n configTemplateGroup.singleSelectItem &&\n (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey))) &&\n !configTemplateGroup.ignoreIconExpandMarginRight\n \"\n [clickExactly]=\"false\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [disable]=\"\n disable() ||\n (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup && !item().isAcceptSelectItem && !configTemplateGroup.isViewTreeJson) ||\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) ||\n false\n \"\n [label]=\"item().fieldLabel\"\n [checked]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length\"\n [stillOtherOptions]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysStillOtherOptions() : keysStillOtherOptions().length\"\n [classLabelInclude]=\"\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\n ? 'libs-ui-color-default libs-ui-font-h5r'\n : 'libs-ui-font-h5r'\n \"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getDataComponentOutletItem : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getComponentOutletItem : item() : fieldKey() : { valueIs0: 0 } | async\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"configTemplateGroup.getImage ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getImage : item() | async) : (item()[configTemplateGroup.fieldGetAvatarItem || ''] | async)\"\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\n [avatarConfig]=\"item().avatarConfig\"\n [class.!ml-[8px]]=\"configTemplateGroup.isViewTree\"\n [ignoreRadio]=\"configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem\"\n [class]=\"constHtmlClassIncludeItem\"\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]=\"\n disable() ||\n (configTemplateGroup.disableItemNotLastLevel && !!item()[configTemplateGroup.fieldGetItems]?.()?.length) ||\n (configTemplateGroup.singleSelectItem && item().level < item().maxLevelGroup) ||\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) ||\n false\n \"\n [label]=\"item().fieldLabel\"\n [zIndexLabel]=\"configTemplateGroup.zIndexLabel ?? 1\"\n [active]=\"item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length\"\n [classLabelInclude]=\"\n (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\n ? 'text-[#009cdb] libs-ui-font-h5r '\n : ' libs-ui-font-h5r '\n \"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getDataComponentOutletItem : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateGroup.getComponentOutletItem : item() : fieldKey() : { valueIs0: 0 } | async\"\n [popover]=\"item().dataPopover\"\n [linkImage]=\"\n configTemplateGroup.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateGroup.getLinkImageError ? configTemplateGroup.getLinkImageError : configTemplateGroup.getImage) : item() | async)\n : item()[configTemplateGroup.fieldGetAvatarItem || '']\n \"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outChange)=\"handlerChangeChecked(item())\" />\n }\n </div>\n </div>\n @if ((item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: keysChecked() : keysChecked().length) && configTemplateGroup.singleSelectItem && (configTemplateGroup.hasIconCheckSingleSelectItem || item().isCheckedByDefaultKey)) {\n <i\n class=\"libs-ui-icon-check before:!text-[16px]\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n [class.libs-ui-icon-check]=\"configTemplateGroup.colorBlueWhenItemSelected && item().isCheckManual\"></i>\n }\n @if (!!item()[configTemplateGroup.fieldGetItems]?.()?.length && !configTemplateGroup.isViewTree && !configTemplateGroup.isViewTreeJson) {\n <i\n class=\"libs-ui-icon-chevron-right before:!text-[16px]\"\n [class.rotate-90]=\"item().expand\"\n [class.!ml-[8px]]=\"item().dataPopover\"\n (click)=\"handlerToggleExpand($event, item)\"></i>\n }\n </div>\n @if (item().expand || configTemplateGroup.isViewTreeJson) {\n @if (item().level < item().maxLevelGroup && !item()[configTemplateGroup.fieldGetItems]?.()?.length && configTemplateGroup.isViewTree) {\n <div\n class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"\n item().level + 1\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : item().maxLevelGroup + 1\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n : true\n \"\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\n [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 (outChangStageFlagMousePopover)=\"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\n class=\"libs-ui-font-h5r text-[#9ca2ad] relative\"\n [style.marginLeft.px]=\"\n parentItem().level + 1\n | LibsUiComponentsListGroupCalculatorMarginLeftItemPipe\n : parentItem().maxLevelGroup + 1\n : configTemplateGroup.isViewTree\n : configTemplateGroup.isViewTreeJson\n : !(configTemplateGroup.ignoreCheckboxItem || configTemplateGroup.ignoreRadioItem || configTemplateGroup.singleSelectItem)\n : true\n \"\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 @let constHtmlTextNoData = parentItem().textDescriptionGroupWhenNoData || config()?.textNoData || 'i18n_no_result';\n <span>{{ constHtmlTextNoData | 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"] }]
|
|
978
979
|
}] });
|
|
979
980
|
|
|
980
981
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -1812,14 +1813,14 @@ class LibsUiComponentsListRadioComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1812
1813
|
dataStore.update((store) => {
|
|
1813
1814
|
return { ...store, ref: item() };
|
|
1814
1815
|
});
|
|
1815
|
-
const key = keysHidden.find((key) => dataStore
|
|
1816
|
+
const key = keysHidden.find((key) => get(dataStore, this.fieldKey()) === get(key, ''));
|
|
1816
1817
|
if (key === undefined) {
|
|
1817
1818
|
const text = deleteUnicode(this.buildValueByConfig(dataStore, this.configTemplateRadio())).toLocaleLowerCase();
|
|
1818
1819
|
const textEscape = escapeHtml(text);
|
|
1819
1820
|
const keySearch = deleteUnicode(escapeHtml(this.keySearch().toLocaleLowerCase()));
|
|
1820
1821
|
if (((this.isSearchOnline() && this.config()?.httpRequestData?.()?.serviceClass && !this.config()?.httpRequestData?.()?.objectInstance) || (text && (text.includes(keySearch) || textEscape.includes(keySearch)))) &&
|
|
1821
|
-
(replace || (!replace && !this.items().find((dataItem) => dataItem
|
|
1822
|
-
!itemByKeySearch.find((dataItem) => dataItem
|
|
1822
|
+
(replace || (!replace && !this.items().find((dataItem) => get(dataItem, this.fieldKey()) === get(dataStore, this.fieldKey())))) &&
|
|
1823
|
+
!itemByKeySearch.find((dataItem) => get(dataItem, this.fieldKey()) === get(dataStore, this.fieldKey()))) {
|
|
1823
1824
|
if (this.configTemplateRadio()?.getPopover) {
|
|
1824
1825
|
dataStore.update((currentStore) => {
|
|
1825
1826
|
return { ...currentStore, dataTooltip: this.configTemplateRadio()?.getPopover?.(dataStore) };
|
|
@@ -1836,7 +1837,7 @@ class LibsUiComponentsListRadioComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1836
1837
|
}
|
|
1837
1838
|
return;
|
|
1838
1839
|
}
|
|
1839
|
-
const indexItemRemove = this.items().findIndex((item) => item
|
|
1840
|
+
const indexItemRemove = this.items().findIndex((item) => get(item, this.fieldKey()) === get(key, ''));
|
|
1840
1841
|
if (indexItemRemove > -1) {
|
|
1841
1842
|
this.items.update((items) => {
|
|
1842
1843
|
items.splice(indexItemRemove, 1);
|
|
@@ -1879,7 +1880,7 @@ class LibsUiComponentsListRadioComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1879
1880
|
if (!this.keySelected) {
|
|
1880
1881
|
return;
|
|
1881
1882
|
}
|
|
1882
|
-
const index = this.items().findIndex((item) => item
|
|
1883
|
+
const index = this.items().findIndex((item) => get(item, this.fieldKey()) === get(this.keySelected, ''));
|
|
1883
1884
|
if (index !== -1) {
|
|
1884
1885
|
const offsetContainer = this.elementScroll()?.nativeElement?.offsetHeight;
|
|
1885
1886
|
const additionalOffset = ((offsetContainer ? offsetContainer - this.heightItem() : 0) / 2) * -1;
|
|
@@ -1894,7 +1895,7 @@ class LibsUiComponentsListRadioComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1894
1895
|
this.handlerChange('radio', items[0]?.(), true, false);
|
|
1895
1896
|
}
|
|
1896
1897
|
emitKeySelectedDefaultIfExistItem(items) {
|
|
1897
|
-
const item = items.find((store) => store
|
|
1898
|
+
const item = items.find((store) => get(store, this.fieldKey()) === get(this.keySelected, ''));
|
|
1898
1899
|
if (item) {
|
|
1899
1900
|
this.handlerChange('radio', item(), true, false);
|
|
1900
1901
|
}
|
|
@@ -1903,7 +1904,7 @@ class LibsUiComponentsListRadioComponent extends LibsUiComponentsListTemplatesCo
|
|
|
1903
1904
|
return this.items().length;
|
|
1904
1905
|
}
|
|
1905
1906
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsListRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1906
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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\n #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [class.h-full]=\"!heightViewPort()\"\n [style.height]=\"heightViewPort() ? heightViewPort() + 'px' : '100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller\n #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()
|
|
1907
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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\n #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [class.h-full]=\"!heightViewPort()\"\n [style.height]=\"heightViewPort() ? heightViewPort() + 'px' : '100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller\n #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()) {\n @let constHtmlKeyItem = item() | LibsUiPipesGetValueOfObjectPipe: fieldKey();\n <div\n #itemRef\n [class]=\"'libs-ui-list-template-radio-item libs-ui-font-h5r 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\n class=\"flex flex-col w-full\"\n [class.!flex-row]=\"configTemplateRadio.rowSameLineRadio\">\n @if (item().fieldLabel) {\n <libs_ui-components-radio-single\n [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [active]=\"keySelected() === constHtmlKeyItem\"\n [key]=\"constHtmlKeyItem\"\n [imgTypeIcon]=\"configTemplateRadio.hasAvatarGroupSocial\"\n [linkImage]=\"\n configTemplateRadio.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateRadio.getImageError ? configTemplateRadio.getImageError : configTemplateRadio.getImage) : item() | async)\n : item()[configTemplateRadio.fieldGetImage || '']\n \"\n [classImageInclude]=\"configTemplateRadio.classIncludeImage || ''\"\n [bullet]=\"item().bullet?.()\"\n [disable]=\"loading() || disable() || (constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length)\"\n [classLabelInclude]=\"item().classLabelInclude || ''\"\n [popover]=\"(item().popoverLabel | LibsUiPipesConvertObjectToSignalPipe)?.() | LibsUiPipesConvertSignalToObjectPipe\"\n [clickExactly]=\"clickExactly()\"\n [disableLabel]=\"disableLabel()\"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateRadio.getDataComponentOutlet : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateRadio.getComponentOutlet : item() : fieldKey() : { valueIs0: 0 } | async\"\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\n class=\"w-full {{ (configTemplateRadio.classRowsWrapper || 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 @let constHtmlTextNoData = config()?.textNoData || 'i18n_have_no_selection';\n <span>{{ constHtmlTextNoData | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null; context: { keySearch: keySearch() }\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n @let constHtmlTextSearchNoData = config()?.textSearchNoData || 'i18n_no_result';\n <span>{{ constHtmlTextSearchNoData | 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:6px 16px;position:relative}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "ignoreInit", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY", "elementScroll"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "component", type: LibsUiComponentsRadioSingleComponent, selector: "libs_ui-components-radio-single", inputs: ["key", "active", "classInclude", "label", "labelInterpolateParams", "ignorePopoverLabel", "classLabelInclude", "linkImage", "linkImageError", "avatarConfig", "classImageInclude", "imgTypeIcon", "bullet", "popover", "disable", "disableLabel", "clickExactly", "typeRadio", "ignoreRadio", "zIndexLabel", "classIncludeIcon", "dataComponentOutlet", "componentOutlet"], 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"] }, { kind: "pipe", type: LibsUiPipesConvertObjectToSignalPipe, name: "LibsUiPipesConvertObjectToSignalPipe" }, { kind: "pipe", type: LibsUiPipesConvertSignalToObjectPipe, name: "LibsUiPipesConvertSignalToObjectPipe" }, { kind: "pipe", type: LibsUiPipesGetValueOfObjectPipe, name: "LibsUiPipesGetValueOfObjectPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1907
1908
|
}
|
|
1908
1909
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsListRadioComponent, decorators: [{
|
|
1909
1910
|
type: Component,
|
|
@@ -1920,7 +1921,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1920
1921
|
LibsUiComponentsListRowsComponent,
|
|
1921
1922
|
LibsUiPipesConvertObjectToSignalPipe,
|
|
1922
1923
|
LibsUiPipesConvertSignalToObjectPipe,
|
|
1923
|
-
|
|
1924
|
+
LibsUiPipesGetValueOfObjectPipe
|
|
1925
|
+
], template: "@if (configTemplateRadio(); as configTemplateRadio) {\n <div class=\"relative h-full w-full\">\n @if (items().length) {\n <div\n #elementScroll\n LibsUiComponentsScrollOverlayDirective\n class=\"w-full\"\n [class.h-full]=\"!heightViewPort()\"\n [style.height]=\"heightViewPort() ? heightViewPort() + 'px' : '100%'\"\n (outScrollBottom)=\"handlerScrollBottom()\">\n <virtual-scroller\n #scroll\n [parentScroll]=\"elementScroll\"\n [items]=\"items()\"\n class=\"h-full\">\n @for (item of scroll.viewPortItems; track item()) {\n @let constHtmlKeyItem = item() | LibsUiPipesGetValueOfObjectPipe: fieldKey();\n <div\n #itemRef\n [class]=\"'libs-ui-list-template-radio-item libs-ui-font-h5r 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\n class=\"flex flex-col w-full\"\n [class.!flex-row]=\"configTemplateRadio.rowSameLineRadio\">\n @if (item().fieldLabel) {\n <libs_ui-components-radio-single\n [label]=\"item().fieldLabel\"\n [avatarConfig]=\"item().avatarConfig\"\n [active]=\"keySelected() === constHtmlKeyItem\"\n [key]=\"constHtmlKeyItem\"\n [imgTypeIcon]=\"configTemplateRadio.hasAvatarGroupSocial\"\n [linkImage]=\"\n configTemplateRadio.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateRadio.getImageError ? configTemplateRadio.getImageError : configTemplateRadio.getImage) : item() | async)\n : item()[configTemplateRadio.fieldGetImage || '']\n \"\n [classImageInclude]=\"configTemplateRadio.classIncludeImage || ''\"\n [bullet]=\"item().bullet?.()\"\n [disable]=\"loading() || disable() || (constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length)\"\n [classLabelInclude]=\"item().classLabelInclude || ''\"\n [popover]=\"(item().popoverLabel | LibsUiPipesConvertObjectToSignalPipe)?.() | LibsUiPipesConvertSignalToObjectPipe\"\n [clickExactly]=\"clickExactly()\"\n [disableLabel]=\"disableLabel()\"\n [dataComponentOutlet]=\"undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateRadio.getDataComponentOutlet : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\"\n [componentOutlet]=\"0 | LibsUiPipesCallFunctionInTemplatePipe: configTemplateRadio.getComponentOutlet : item() : fieldKey() : { valueIs0: 0 } | async\"\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\n class=\"w-full {{ (configTemplateRadio.classRowsWrapper || 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 @let constHtmlTextNoData = config()?.textNoData || 'i18n_have_no_selection';\n <span>{{ constHtmlTextNoData | translate }}</span>\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null; context: { keySearch: keySearch() }\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n @let constHtmlTextSearchNoData = config()?.textSearchNoData || 'i18n_no_result';\n <span>{{ constHtmlTextSearchNoData | 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:6px 16px;position:relative}\n"] }]
|
|
1924
1926
|
}] });
|
|
1925
1927
|
|
|
1926
1928
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -2108,7 +2110,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
|
|
|
2108
2110
|
if (typeof e === 'string' && e !== 'click') {
|
|
2109
2111
|
return;
|
|
2110
2112
|
}
|
|
2111
|
-
if (!item || (this.keysDisableItem() && this.keysDisableItem()?.some((key) => key === item
|
|
2113
|
+
if (!item || (this.keysDisableItem() && this.keysDisableItem()?.some((key) => get(key, '') === get(item, this.fieldKey())))) {
|
|
2112
2114
|
return;
|
|
2113
2115
|
}
|
|
2114
2116
|
if (action) {
|
|
@@ -2120,7 +2122,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
|
|
|
2120
2122
|
}
|
|
2121
2123
|
if (this.configTemplateText()?.actionSort) {
|
|
2122
2124
|
const currentItemSort = this.configTemplateText()?.itemSort?.();
|
|
2123
|
-
const mode = currentItemSort
|
|
2125
|
+
const mode = get(currentItemSort, 'fieldSort') !== get(item, this.fieldKey()) ? 'asc' : get(currentItemSort, 'mode') === 'desc' ? 'asc' : 'desc';
|
|
2124
2126
|
const newSort = {
|
|
2125
2127
|
fieldSort: item[this.fieldKey()],
|
|
2126
2128
|
mode,
|
|
@@ -2146,7 +2148,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
|
|
|
2146
2148
|
}
|
|
2147
2149
|
this.store().forEach((item) => {
|
|
2148
2150
|
const dataStore = cloneDeep(item);
|
|
2149
|
-
const key = keysHidden.find((key) => dataStore
|
|
2151
|
+
const key = keysHidden.find((key) => get(dataStore, this.fieldKey()) === get(key, ''));
|
|
2150
2152
|
dataStore.update((store) => {
|
|
2151
2153
|
return { ...store, ref: item() };
|
|
2152
2154
|
});
|
|
@@ -2155,8 +2157,8 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
|
|
|
2155
2157
|
const textEscape = escapeHtml(text);
|
|
2156
2158
|
const keySearch = deleteUnicode(escapeHtml(this.keySearch().toLocaleLowerCase()));
|
|
2157
2159
|
if (((this.isSearchOnline() && this.config()?.httpRequestData?.()?.serviceClass && !this.config()?.httpRequestData?.()?.objectInstance) || (text && (text.includes(keySearch) || textEscape.includes(keySearch)))) &&
|
|
2158
|
-
(replace || (!replace && !this.items().find((dataItem) => dataItem
|
|
2159
|
-
!itemByKeySearch.find((dataItem) => dataItem
|
|
2160
|
+
(replace || (!replace && !this.items().find((dataItem) => get(dataItem, this.fieldKey()) === get(dataStore, this.fieldKey())))) &&
|
|
2161
|
+
!itemByKeySearch.find((dataItem) => get(dataItem, this.fieldKey()) === get(dataStore, this.fieldKey()))) {
|
|
2160
2162
|
dataStore.update((store) => {
|
|
2161
2163
|
return {
|
|
2162
2164
|
...store,
|
|
@@ -2174,7 +2176,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
|
|
|
2174
2176
|
}
|
|
2175
2177
|
return;
|
|
2176
2178
|
}
|
|
2177
|
-
const indexItemRemove = this.items().findIndex((item) => item
|
|
2179
|
+
const indexItemRemove = this.items().findIndex((item) => get(item, this.fieldKey()) === get(key, ''));
|
|
2178
2180
|
if (indexItemRemove > -1) {
|
|
2179
2181
|
this.items.update((items) => {
|
|
2180
2182
|
items.splice(indexItemRemove, 1);
|
|
@@ -2219,7 +2221,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
|
|
|
2219
2221
|
if (!this.keySelected()) {
|
|
2220
2222
|
return;
|
|
2221
2223
|
}
|
|
2222
|
-
const index = this.items().findIndex((item) => item
|
|
2224
|
+
const index = this.items().findIndex((item) => get(item, this.fieldKey()) === get(this.keySelected, ''));
|
|
2223
2225
|
if (index !== -1) {
|
|
2224
2226
|
const offsetContainer = this.elementScroll()?.nativeElement?.offsetHeight;
|
|
2225
2227
|
const additionalOffset = ((offsetContainer ? offsetContainer - this.heightItem() : 0) / 2) * -1;
|
|
@@ -2234,7 +2236,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
|
|
|
2234
2236
|
this.handlerSelectItem('click', items[0](), undefined, true, false);
|
|
2235
2237
|
}
|
|
2236
2238
|
emitKeySelectedDefaultIfExistItem(items) {
|
|
2237
|
-
const item = items.find((store) => store
|
|
2239
|
+
const item = items.find((store) => get(store, this.fieldKey()) === get(this.keySelected, ''));
|
|
2238
2240
|
if (item) {
|
|
2239
2241
|
this.handlerSelectItem('click', item(), undefined, true, false);
|
|
2240
2242
|
}
|
|
@@ -2247,7 +2249,7 @@ class LibsUiComponentsListTextComponent extends LibsUiComponentsListTemplatesCom
|
|
|
2247
2249
|
item.specific_loadImgError = true;
|
|
2248
2250
|
}
|
|
2249
2251
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsListTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2250
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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 <!-- ph\u1EA3i \u0111\u1EC3 [class.h-full]=\"!isShowHeightCalculate()\" th\u00EC LibsUiComponentsScrollOverlayDirective m\u1EDBi ho\u1EA1t \u0111\u1ED9ng \u0111\u01B0\u1EE3c -->\n <div\n #elementScroll\n [style.height]=\"isShowHeightCalculate() ? heightViewPort() + 'px' : '100%'\"\n class=\"w-full\"\n [class.h-full]=\"!isShowHeightCalculate()\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller\n #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 @let constHtmlTextNoData = config()?.textNoData || 'i18n_have_no_selection';\n {{ constHtmlTextNoData | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null; context: { keySearch: keySearch() }\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n @let constHtmlTextSearchNoData = config()?.textSearchNoData || 'i18n_no_result';\n {{ constHtmlTextSearchNoData | 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\n #listRef\n let-itemsView=\"itemsView\">\n @for (item of itemsView; track item()[fieldKey()]) {\n <div\n #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item libs-ui-font-h5r 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 | LibsUiPipesConvertObjectToSignalPipe)?.(); as bullet) {\n <span\n class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.backgroundColor]=\"bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event, item())\"></span>\n }\n @if ((item().avatarConfig | LibsUiPipesConvertObjectToSignalPipe)?.(); as avatarConfig) {\n <libs_ui-components-avatar\n [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 [getLastTextAfterSpace]=\"avatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"\n configTemplateText.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage) : item() | async)\n : item()[configTemplateText.fieldGetImage || '']\n \"\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 | LibsUiPipesConvertObjectToSignalPipe)?.(); as buttonLeft) {\n @if (item().hrefButton) {\n <a\n [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\n class=\"w-full\"\n [type]=\"buttonLeft.type ?? 'button-link-primary'\"\n [label]=\"buttonLeft.label ?? ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable ?? false\"\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 | LibsUiPipesConvertSignalToObjectPipe\"\n [styleButton]=\"buttonLeft.styleButton | LibsUiPipesConvertSignalToObjectPipe\"\n (outClick)=\"handlerSelectItem($event, item())\" />\n </ng-template>\n }\n @if ((item().switchConfig | LibsUiPipesConvertObjectToSignalPipe)?.(); as switchConfig) {\n <libs_ui-components-switch\n [active]=\"switchConfig.active\"\n (outSwitch)=\"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 @if (((item().popoverLabel | LibsUiPipesConvertObjectToSignalPipe)?.() | LibsUiPipesConvertSignalToObjectPipe) ?? { type: 'text' }; as popoverLabel) {\n <libs_ui-components-popover\n [type]=\"popoverLabel.type || 'text'\"\n [elementRefCustom]=\"popoverLabel.type === 'text' ? undefined : itemRef\"\n [ignoreShowPopover]=\"popoverLabel.ignoreShowPopover\"\n [config]=\"popoverLabel.config ?? configTemplateText.configLabelPopover?.() ?? {}\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (outEvent)=\"handlerSelectItem($event, item())\" />\n }\n }\n @if ((item().fieldPopover | LibsUiPipesConvertObjectToSignalPipe)?.(); as popover) {\n <libs_ui-components-popover\n class=\"{{ popover.classInclude }}\"\n [config]=\"popover.config\">\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n } @else {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows\n 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 (configTemplateText.getComponentOutlet) {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldKey() : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: configTemplateText.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateText.getDataComponentOutlet : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n\n @if ((keySelected() === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: multiKeySelected() : multiKeySelected().length)) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check ' + (configTemplateText.classIncludeIconSelected || 'right-[12px]')\"></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\n [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;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: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "classImageInclude", "zIndexPreviewImage", "clickPreviewImage", "idGenColor", "getLastTextAfterSpace", "textAvatar", "textAvatarClassInclude", "containertextAvatarClassInclude"], outputs: ["outAvatarError", "outEventPreviewImage"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "ignoreInit", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY", "elementScroll"], 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" }, { kind: "pipe", type: LibsUiPipesGetValueOfObjectPipe, name: "LibsUiPipesGetValueOfObjectPipe" }, { kind: "pipe", type: LibsUiPipesConvertObjectToSignalPipe, name: "LibsUiPipesConvertObjectToSignalPipe" }, { kind: "pipe", type: LibsUiPipesConvertSignalToObjectPipe, name: "LibsUiPipesConvertSignalToObjectPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2252
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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 <!-- ph\u1EA3i \u0111\u1EC3 [class.h-full]=\"!isShowHeightCalculate()\" th\u00EC LibsUiComponentsScrollOverlayDirective m\u1EDBi ho\u1EA1t \u0111\u1ED9ng \u0111\u01B0\u1EE3c -->\n <div\n #elementScroll\n [style.height]=\"isShowHeightCalculate() ? heightViewPort() + 'px' : '100%'\"\n class=\"w-full\"\n [class.h-full]=\"!isShowHeightCalculate()\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller\n #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 @let constHtmlTextNoData = config()?.textNoData || 'i18n_have_no_selection';\n {{ constHtmlTextNoData | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null; context: { keySearch: keySearch() }\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n @let constHtmlTextSearchNoData = config()?.textSearchNoData || 'i18n_no_result';\n {{ constHtmlTextSearchNoData | 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\n #listRef\n let-itemsView=\"itemsView\">\n @for (item of itemsView; track item()) {\n @let constHtmlKeyItem = item() | LibsUiPipesGetValueOfObjectPipe: fieldKey();\n @let constHtmlKeySelected = keySelected();\n <div\n #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item libs-ui-font-h5r 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() && constHtmlKeySelected === constHtmlKeyItem\"\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]]=\"constHtmlKeySelected === constHtmlKeyItem && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort) && !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{ 'pointer-events-none libs-ui-disable': loading() || disable() || ((constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem()) }\"\n (click)=\"handlerClickRelative($event, item())\">\n @if ((item().bullet | LibsUiPipesConvertObjectToSignalPipe)?.(); as bullet) {\n <span\n class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.backgroundColor]=\"bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event, item())\"></span>\n }\n @if ((item().avatarConfig | LibsUiPipesConvertObjectToSignalPipe)?.(); as avatarConfig) {\n <libs_ui-components-avatar\n [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 [getLastTextAfterSpace]=\"avatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"\n configTemplateText.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage) : item() | async)\n : item()[configTemplateText.fieldGetImage || '']\n \"\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 | LibsUiPipesConvertObjectToSignalPipe)?.(); as buttonLeft) {\n @if (item().hrefButton) {\n <a\n [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\n class=\"w-full\"\n [type]=\"buttonLeft.type ?? 'button-link-primary'\"\n [label]=\"buttonLeft.label ?? ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable ?? false\"\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 | LibsUiPipesConvertSignalToObjectPipe\"\n [styleButton]=\"buttonLeft.styleButton | LibsUiPipesConvertSignalToObjectPipe\"\n (outClick)=\"handlerSelectItem($event, item())\" />\n </ng-template>\n }\n @if ((item().switchConfig | LibsUiPipesConvertObjectToSignalPipe)?.(); as switchConfig) {\n <libs_ui-components-switch\n [active]=\"switchConfig.active\"\n (outSwitch)=\"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 @if (((item().popoverLabel | LibsUiPipesConvertObjectToSignalPipe)?.() | LibsUiPipesConvertSignalToObjectPipe) ?? { type: 'text' }; as popoverLabel) {\n <libs_ui-components-popover\n [type]=\"popoverLabel.type || 'text'\"\n [elementRefCustom]=\"popoverLabel.type === 'text' ? undefined : itemRef\"\n [ignoreShowPopover]=\"popoverLabel.ignoreShowPopover\"\n [config]=\"popoverLabel.config ?? configTemplateText.configLabelPopover?.() ?? {}\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (outEvent)=\"handlerSelectItem($event, item())\" />\n }\n }\n @if ((item().fieldPopover | LibsUiPipesConvertObjectToSignalPipe)?.(); as popover) {\n <libs_ui-components-popover\n class=\"{{ popover.classInclude }}\"\n [config]=\"popover.config\">\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n } @else {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows\n class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"constHtmlKeySelected\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event, $event.item, $event.action)\" />\n }\n @if (configTemplateText.getComponentOutlet) {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldKey() : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: configTemplateText.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateText.getDataComponentOutlet : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n\n @if ((constHtmlKeySelected === constHtmlKeyItem || (constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: multiKeySelected() : multiKeySelected().length)) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check ' + (configTemplateText.classIncludeIconSelected || 'right-[12px]')\"></i>\n }\n @if (constHtmlKeySelected === constHtmlKeyItem && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow\n [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText?.itemSort?.()?.mode || ''\"\n [fieldSort]=\"constHtmlKeyItem\"\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;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: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: LibsUiComponentsSpinnerComponent, selector: "libs_ui-components-spinner", inputs: ["type", "size"] }, { kind: "component", type: LibsUiComponentsAvatarComponent, selector: "libs_ui-components-avatar", inputs: ["typeShape", "classInclude", "size", "linkAvatar", "linkAvatarError", "classImageInclude", "zIndexPreviewImage", "clickPreviewImage", "idGenColor", "getLastTextAfterSpace", "textAvatar", "textAvatarClassInclude", "containertextAvatarClassInclude"], outputs: ["outAvatarError", "outEventPreviewImage"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "ignoreInit", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY", "elementScroll"], 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" }, { kind: "pipe", type: LibsUiPipesGetValueOfObjectPipe, name: "LibsUiPipesGetValueOfObjectPipe" }, { kind: "pipe", type: LibsUiPipesConvertObjectToSignalPipe, name: "LibsUiPipesConvertObjectToSignalPipe" }, { kind: "pipe", type: LibsUiPipesConvertSignalToObjectPipe, name: "LibsUiPipesConvertSignalToObjectPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2251
2253
|
}
|
|
2252
2254
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsListTextComponent, decorators: [{
|
|
2253
2255
|
type: Component,
|
|
@@ -2272,7 +2274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2272
2274
|
LibsUiPipesGetValueOfObjectPipe,
|
|
2273
2275
|
LibsUiPipesConvertObjectToSignalPipe,
|
|
2274
2276
|
LibsUiPipesConvertSignalToObjectPipe,
|
|
2275
|
-
], template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <!-- ph\u1EA3i \u0111\u1EC3 [class.h-full]=\"!isShowHeightCalculate()\" th\u00EC LibsUiComponentsScrollOverlayDirective m\u1EDBi ho\u1EA1t \u0111\u1ED9ng \u0111\u01B0\u1EE3c -->\n <div\n #elementScroll\n [style.height]=\"isShowHeightCalculate() ? heightViewPort() + 'px' : '100%'\"\n class=\"w-full\"\n [class.h-full]=\"!isShowHeightCalculate()\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller\n #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 @let constHtmlTextNoData = config()?.textNoData || 'i18n_have_no_selection';\n {{ constHtmlTextNoData | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null; context: { keySearch: keySearch() }\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n @let constHtmlTextSearchNoData = config()?.textSearchNoData || 'i18n_no_result';\n {{ constHtmlTextSearchNoData | 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\n #listRef\n let-itemsView=\"itemsView\">\n @for (item of itemsView; track item()[fieldKey()]) {\n <div\n #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item libs-ui-font-h5r 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 | LibsUiPipesConvertObjectToSignalPipe)?.(); as bullet) {\n <span\n class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.backgroundColor]=\"bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event, item())\"></span>\n }\n @if ((item().avatarConfig | LibsUiPipesConvertObjectToSignalPipe)?.(); as avatarConfig) {\n <libs_ui-components-avatar\n [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 [getLastTextAfterSpace]=\"avatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"\n configTemplateText.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage) : item() | async)\n : item()[configTemplateText.fieldGetImage || '']\n \"\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 | LibsUiPipesConvertObjectToSignalPipe)?.(); as buttonLeft) {\n @if (item().hrefButton) {\n <a\n [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\n class=\"w-full\"\n [type]=\"buttonLeft.type ?? 'button-link-primary'\"\n [label]=\"buttonLeft.label ?? ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable ?? false\"\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 | LibsUiPipesConvertSignalToObjectPipe\"\n [styleButton]=\"buttonLeft.styleButton | LibsUiPipesConvertSignalToObjectPipe\"\n (outClick)=\"handlerSelectItem($event, item())\" />\n </ng-template>\n }\n @if ((item().switchConfig | LibsUiPipesConvertObjectToSignalPipe)?.(); as switchConfig) {\n <libs_ui-components-switch\n [active]=\"switchConfig.active\"\n (outSwitch)=\"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 @if (((item().popoverLabel | LibsUiPipesConvertObjectToSignalPipe)?.() | LibsUiPipesConvertSignalToObjectPipe) ?? { type: 'text' }; as popoverLabel) {\n <libs_ui-components-popover\n [type]=\"popoverLabel.type || 'text'\"\n [elementRefCustom]=\"popoverLabel.type === 'text' ? undefined : itemRef\"\n [ignoreShowPopover]=\"popoverLabel.ignoreShowPopover\"\n [config]=\"popoverLabel.config ?? configTemplateText.configLabelPopover?.() ?? {}\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (outEvent)=\"handlerSelectItem($event, item())\" />\n }\n }\n @if ((item().fieldPopover | LibsUiPipesConvertObjectToSignalPipe)?.(); as popover) {\n <libs_ui-components-popover\n class=\"{{ popover.classInclude }}\"\n [config]=\"popover.config\">\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n } @else {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows\n 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 (configTemplateText.getComponentOutlet) {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldKey() : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: configTemplateText.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateText.getDataComponentOutlet : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n\n @if ((keySelected() === item()[fieldKey()] || (item()[fieldKey()] | LibsUiCheckSelectedByKeyPipe: multiKeySelected() : multiKeySelected().length)) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check ' + (configTemplateText.classIncludeIconSelected || 'right-[12px]')\"></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\n [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;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"] }]
|
|
2277
|
+
], template: "@if (configTemplateText(); as configTemplateText) {\n <div class=\"relative h-full w-full\">\n @if (items() && items().length) {\n <!-- ph\u1EA3i \u0111\u1EC3 [class.h-full]=\"!isShowHeightCalculate()\" th\u00EC LibsUiComponentsScrollOverlayDirective m\u1EDBi ho\u1EA1t \u0111\u1ED9ng \u0111\u01B0\u1EE3c -->\n <div\n #elementScroll\n [style.height]=\"isShowHeightCalculate() ? heightViewPort() + 'px' : '100%'\"\n class=\"w-full\"\n [class.h-full]=\"!isShowHeightCalculate()\"\n LibsUiComponentsScrollOverlayDirective\n (outScrollBottom)=\"handlerScrollBottom()\">\n @if (!configTemplateText.notUseVirtualScroll) {\n <virtual-scroller\n #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 @let constHtmlTextNoData = config()?.textNoData || 'i18n_have_no_selection';\n {{ constHtmlTextNoData | translate }}\n }\n @if (templateRefSearchNoData() && keySearch() && !loading()) {\n <ng-container *ngTemplateOutlet=\"templateRefSearchNoData() || null; context: { keySearch: keySearch() }\" />\n }\n @if (!templateRefSearchNoData() && keySearch() && !loading()) {\n @let constHtmlTextSearchNoData = config()?.textSearchNoData || 'i18n_no_result';\n {{ constHtmlTextSearchNoData | 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\n #listRef\n let-itemsView=\"itemsView\">\n @for (item of itemsView; track item()) {\n @let constHtmlKeyItem = item() | LibsUiPipesGetValueOfObjectPipe: fieldKey();\n @let constHtmlKeySelected = keySelected();\n <div\n #itemRef\n [class]=\"item().classItemWrapper || ''\">\n <div\n LibsUiComponentsListHighlightKeySearchDirective\n [isHighlight]=\"config()?.highlightTextSearchInResult\"\n [keySearch]=\"keySearch()\"\n [class]=\"'libs-ui-list-template-text-item libs-ui-font-h5r 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() && constHtmlKeySelected === constHtmlKeyItem\"\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]]=\"constHtmlKeySelected === constHtmlKeyItem && (!configTemplateText?.ignoreIconSelected || configTemplateText?.actionSort) && !configTemplateText?.stylePaddingRightItemOther\"\n [ngClass]=\"{ 'pointer-events-none libs-ui-disable': loading() || disable() || ((constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: keysDisableItem() : keysDisableItem()?.length) && !ignoreClassDisableDefaultWhenUseKeysDisableItem()) }\"\n (click)=\"handlerClickRelative($event, item())\">\n @if ((item().bullet | LibsUiPipesConvertObjectToSignalPipe)?.(); as bullet) {\n <span\n class=\"libs-ui-list-template-text-item-bullet flex flex-shrink-0\"\n [style.backgroundColor]=\"bullet.backgroundColor\"\n (click)=\"handlerSelectItem($event, item())\"></span>\n }\n @if ((item().avatarConfig | LibsUiPipesConvertObjectToSignalPipe)?.(); as avatarConfig) {\n <libs_ui-components-avatar\n [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 [getLastTextAfterSpace]=\"avatarConfig.getLastTextAfterSpace\"\n [textAvatar]=\"avatarConfig.textAvatar\" />\n }\n @if (configTemplateText.getImage || configTemplateText.fieldGetImage) {\n <img\n [src]=\"\n configTemplateText.getImage\n ? ('avatar' | LibsUiPipesCallFunctionInTemplatePipe: (item().specific_loadImgError && configTemplateText.getImageError ? configTemplateText.getImageError : configTemplateText.getImage) : item() | async)\n : item()[configTemplateText.fieldGetImage || '']\n \"\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 | LibsUiPipesConvertObjectToSignalPipe)?.(); as buttonLeft) {\n @if (item().hrefButton) {\n <a\n [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\n class=\"w-full\"\n [type]=\"buttonLeft.type ?? 'button-link-primary'\"\n [label]=\"buttonLeft.label ?? ' '\"\n [zIndex]=\"buttonLeft.zIndex\"\n [disable]=\"buttonLeft.disable ?? false\"\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 | LibsUiPipesConvertSignalToObjectPipe\"\n [styleButton]=\"buttonLeft.styleButton | LibsUiPipesConvertSignalToObjectPipe\"\n (outClick)=\"handlerSelectItem($event, item())\" />\n </ng-template>\n }\n @if ((item().switchConfig | LibsUiPipesConvertObjectToSignalPipe)?.(); as switchConfig) {\n <libs_ui-components-switch\n [active]=\"switchConfig.active\"\n (outSwitch)=\"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 @if (((item().popoverLabel | LibsUiPipesConvertObjectToSignalPipe)?.() | LibsUiPipesConvertSignalToObjectPipe) ?? { type: 'text' }; as popoverLabel) {\n <libs_ui-components-popover\n [type]=\"popoverLabel.type || 'text'\"\n [elementRefCustom]=\"popoverLabel.type === 'text' ? undefined : itemRef\"\n [ignoreShowPopover]=\"popoverLabel.ignoreShowPopover\"\n [config]=\"popoverLabel.config ?? configTemplateText.configLabelPopover?.() ?? {}\"\n [innerHtml]=\"item().fieldLabel\"\n [classInclude]=\"item().classInclude\"\n (outEvent)=\"handlerSelectItem($event, item())\" />\n }\n }\n @if ((item().fieldPopover | LibsUiPipesConvertObjectToSignalPipe)?.(); as popover) {\n <libs_ui-components-popover\n class=\"{{ popover.classInclude }}\"\n [config]=\"popover.config\">\n @if (popover.dataView) {\n <div [innerHtml]=\"popover.dataView | translate\"></div>\n } @else {\n <i class=\"libs-ui-icon-tooltip-outline\"></i>\n }\n </libs_ui-components-popover>\n }\n @if (configTemplateText?.rows) {\n <libs_ui-components-list-templates_rows\n class=\"w-full {{ configTemplateText.classRowsWrapper || configTemplateText.classRows || '' }}\"\n [item]=\"item()\"\n [fieldKey]=\"fieldKey()\"\n [keySelected]=\"constHtmlKeySelected\"\n [configTemplate]=\"configTemplateText\"\n [zIndex]=\"zIndex()\"\n (outChangStageFlagMousePopover)=\"handlerChangStageFlagMouse($event)\"\n (outEvent)=\"handlerSelectItem($event.event, $event.item, $event.action)\" />\n }\n @if (configTemplateText.getComponentOutlet) {\n <ng-container\n *ngComponentOutlet=\"\n item() | LibsUiPipesGetValueOfObjectPipe: fieldKey() : undefined : true | LibsUiPipesCallFunctionInTemplatePipe: configTemplateText.getComponentOutlet : item() | async;\n inputs: undefined | LibsUiPipesCallFunctionInTemplatePipe: configTemplateText.getDataComponentOutlet : item() : fieldKey() : { valueIsEmpty: { item: item() } } | async\n \" />\n }\n\n @if ((constHtmlKeySelected === constHtmlKeyItem || (constHtmlKeyItem | LibsUiCheckSelectedByKeyPipe: multiKeySelected() : multiKeySelected().length)) && !configTemplateText.ignoreIconSelected && !configTemplateText.actionSort) {\n <i [class]=\"'libs-ui-icon-check ' + (configTemplateText.classIncludeIconSelected || 'right-[12px]')\"></i>\n }\n @if (constHtmlKeySelected === constHtmlKeyItem && configTemplateText.actionSort) {\n <div class=\"libs-ui-list-template-text-sort\">\n <libs_ui-components-buttons-sort-arrow\n [disable]=\"loading() || disable() || false\"\n [mode]=\"configTemplateText?.itemSort?.()?.mode || ''\"\n [fieldSort]=\"constHtmlKeyItem\"\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;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"] }]
|
|
2276
2278
|
}] });
|
|
2277
2279
|
|
|
2278
2280
|
const getComponentByType = (typeTemplate) => {
|