@libs-ui/components-list 0.1.1-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +3 -0
  2. package/defines/list.define.d.ts +10 -0
  3. package/esm2022/defines/list.define.mjs +70 -0
  4. package/esm2022/highlight-key-search/highlight-key-search.directive.mjs +82 -0
  5. package/esm2022/index.mjs +4 -0
  6. package/esm2022/interfaces/config-item.interface.mjs +2 -0
  7. package/esm2022/interfaces/data-emit.interface.mjs +3 -0
  8. package/esm2022/interfaces/function-control-event.interface.mjs +2 -0
  9. package/esm2022/interfaces/index.mjs +6 -0
  10. package/esm2022/interfaces/tab.interface.mjs +2 -0
  11. package/esm2022/interfaces/templates-type.type.mjs +2 -0
  12. package/esm2022/libs-ui-components-list.mjs +5 -0
  13. package/esm2022/list.component.mjs +420 -0
  14. package/esm2022/pipes/check-selected-by-key.pipe.mjs +21 -0
  15. package/esm2022/templates/checkbox/checkbox.component.mjs +304 -0
  16. package/esm2022/templates/group/group.component.mjs +788 -0
  17. package/esm2022/templates/group/item/item.component.mjs +82 -0
  18. package/esm2022/templates/group/pipes/calculator-left-line-vertical-item.pipe.mjs +38 -0
  19. package/esm2022/templates/group/pipes/calculator-margin-left-item.pipe.mjs +40 -0
  20. package/esm2022/templates/group/pipes/calculator-padding-left-item.pipe.mjs +26 -0
  21. package/esm2022/templates/radio/radio.component.mjs +193 -0
  22. package/esm2022/templates/rows/rows.component.mjs +72 -0
  23. package/esm2022/templates/tag/tag.component.mjs +139 -0
  24. package/esm2022/templates/templates.component.abstract.mjs +350 -0
  25. package/esm2022/templates/text/text.component.mjs +247 -0
  26. package/fesm2022/libs-ui-components-list.mjs +2757 -0
  27. package/fesm2022/libs-ui-components-list.mjs.map +1 -0
  28. package/highlight-key-search/highlight-key-search.directive.d.ts +13 -0
  29. package/index.d.ts +3 -0
  30. package/interfaces/config-item.interface.d.ts +260 -0
  31. package/interfaces/data-emit.interface.d.ts +16 -0
  32. package/interfaces/function-control-event.interface.d.ts +15 -0
  33. package/interfaces/index.d.ts +5 -0
  34. package/interfaces/tab.interface.d.ts +4 -0
  35. package/interfaces/templates-type.type.d.ts +1 -0
  36. package/list.component.d.ts +93 -0
  37. package/package.json +50 -0
  38. package/pipes/check-selected-by-key.pipe.d.ts +7 -0
  39. package/templates/checkbox/checkbox.component.d.ts +24 -0
  40. package/templates/group/group.component.d.ts +48 -0
  41. package/templates/group/item/item.component.d.ts +27 -0
  42. package/templates/group/pipes/calculator-left-line-vertical-item.pipe.d.ts +7 -0
  43. package/templates/group/pipes/calculator-margin-left-item.pipe.d.ts +7 -0
  44. package/templates/group/pipes/calculator-padding-left-item.pipe.d.ts +7 -0
  45. package/templates/radio/radio.component.d.ts +20 -0
  46. package/templates/rows/rows.component.d.ts +23 -0
  47. package/templates/tag/tag.component.d.ts +16 -0
  48. package/templates/templates.component.abstract.d.ts +94 -0
  49. package/templates/text/text.component.d.ts +24 -0
@@ -0,0 +1,13 @@
1
+ import { AfterViewInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LibsUiComponentsListHighlightKeySearchDirective implements AfterViewInit {
4
+ readonly isHighlight: import("@angular/core").InputSignal<boolean | undefined>;
5
+ readonly keySearch: import("@angular/core").InputSignal<string | undefined>;
6
+ readonly classHighlight: import("@angular/core").InputSignal<string>;
7
+ private elementRef;
8
+ ngAfterViewInit(): void;
9
+ protected handlerHighlight(element: Node): void;
10
+ protected checkAndReplace(node: Node): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListHighlightKeySearchDirective, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LibsUiComponentsListHighlightKeySearchDirective, "[LibsUiComponentsListHighlightKeySearchDirective]", never, { "isHighlight": { "alias": "isHighlight"; "required": false; "isSignal": true; }; "keySearch": { "alias": "keySearch"; "required": false; "isSignal": true; }; "classHighlight": { "alias": "classHighlight"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
13
+ }
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './list.component';
2
+ export * from './defines/list.define';
3
+ export * from './interfaces';
@@ -0,0 +1,260 @@
1
+ import { IAvatarConfig } from '@libs-ui/components-avatar';
2
+ import { IBadge } from '@libs-ui/components-badge';
3
+ import { IButton } from '@libs-ui/components-buttons-button';
4
+ import { ISort } from '@libs-ui/components-buttons-sort';
5
+ import { ICheckboxItem } from '@libs-ui/components-checkbox-group';
6
+ import { ILabel } from '@libs-ui/components-label';
7
+ import { IPopover, IPopoverOverlay, TYPE_POPOVER_EVENT } from '@libs-ui/components-popover';
8
+ import { IHttpRequestConfig } from '@libs-ui/services-http-request';
9
+ import { TYPE_TEMPLATE } from './templates-type.type';
10
+ import { Observable } from 'rxjs';
11
+ import { WritableSignal } from '@angular/core';
12
+ import { TYPE_FUNCTION, TYPE_OBJECT } from '@libs-ui/interfaces-types';
13
+ import { LibsUiComponentsComponentOutletComponent } from '@libs-ui/components-component-outlet';
14
+ export type TYPE_LIST_ITEM = WritableSignal<TYPE_OBJECT>;
15
+ export interface IListConfigItem {
16
+ type: TYPE_TEMPLATE;
17
+ httpRequestData?: WritableSignal<IHttpRequestConfig>;
18
+ configTemplateText?: WritableSignal<IListConfigItemText>;
19
+ configTemplateRadio?: WritableSignal<IListConfigItemRadio>;
20
+ configTemplateCheckbox?: WritableSignal<IListConfigItemCheckbox>;
21
+ configTemplateGroup?: WritableSignal<IListConfigItemGroup>;
22
+ configTemplateTag?: WritableSignal<IListConfigItemTag>;
23
+ configDescriptionGroup?: WritableSignal<IConfigDescriptionGroup>;
24
+ textNoData?: string;
25
+ textNoDataClassInclude?: string;
26
+ textSearchNoData?: string;
27
+ autoSelectFirstItem?: boolean;
28
+ backgroundListCustom?: string;
29
+ paddingLeftItem?: boolean;
30
+ sort?: (items: Array<any>) => void;
31
+ hasIconNoData?: boolean;
32
+ ignoreShowDataWhenNotSearch?: boolean | undefined;
33
+ ignoreFixHeightShowDataWhenNotSearch?: boolean | undefined;
34
+ highlightTextSearchInResult?: boolean | undefined;
35
+ heightItem?: number;
36
+ minHeightItem?: number;
37
+ }
38
+ export interface IListConfigItemText {
39
+ fieldKey: string;
40
+ getValue?: (item: any, itemViewInList?: TYPE_LIST_ITEM) => string;
41
+ getLabelSearch?: (item: any) => string;
42
+ fieldGetImage?: string;
43
+ classIncludeImage?: string;
44
+ getImage?: (data: IDataFunctionCallInConfig) => Observable<string>;
45
+ getImageError?: (data: IDataFunctionCallInConfig) => Observable<string>;
46
+ imgTypeIcon?: boolean;
47
+ ignoreIconSelected?: boolean;
48
+ classIncludeIconSelected?: string;
49
+ ignoreShowFieldLabel?: boolean;
50
+ getHrefButton?: (item: any) => string;
51
+ getClassItem?: (item: any) => string;
52
+ getClassIncludePopover?: (item: any) => string;
53
+ getConfigButtonLeft?: (item: any) => IButton;
54
+ getClassIconLeft?: (item: any) => string;
55
+ getConfigHoverDanger?: (item: any) => boolean;
56
+ getPopover?: (item: any) => IPopover | undefined;
57
+ rows?: WritableSignal<Array<WritableSignal<IListConfigItemTextRow>>>;
58
+ classRowsWrapper?: string;
59
+ classRows?: string;
60
+ configLabelPopover?: WritableSignal<IPopoverOverlay>;
61
+ autoScrollToItemSelected?: boolean;
62
+ itemSort?: WritableSignal<ISort>;
63
+ actionSort?: (itemSort: ISort) => void;
64
+ notUseVirtualScroll?: boolean;
65
+ getAvatarConfig?: (item: any) => IAvatarConfig;
66
+ getConfigAlignStart?: (item: any) => boolean;
67
+ stylePaddingRightItemOther?: boolean;
68
+ getComponentOutlet?: () => Observable<LibsUiComponentsComponentOutletComponent | any>;
69
+ getDataComponentOutlet?: TYPE_FUNCTION;
70
+ }
71
+ export interface IListConfigItemTag extends IListConfigItemText {
72
+ fieldKey: string;
73
+ ignoreItemFlexWrap?: boolean;
74
+ classIncludeContainer?: string;
75
+ }
76
+ export interface IListConfigItemRadio {
77
+ fieldKey: string;
78
+ fieldGetImage?: string;
79
+ classIncludeImage?: string;
80
+ hasAvatarPagesSocial?: boolean;
81
+ hasAvatarGroupSocial?: boolean;
82
+ getValue?: (item: any, itemViewInList?: TYPE_LIST_ITEM) => string;
83
+ getLabelSearch?: (item: any) => string;
84
+ getPopover?: (item: any) => IPopover | undefined;
85
+ rowSameLineRadio?: boolean;
86
+ rows?: WritableSignal<Array<WritableSignal<IListConfigItemTextRow>>>;
87
+ classRowsWrapper?: string;
88
+ classRows?: string;
89
+ autoScrollToItemSelected?: boolean;
90
+ zIndexPopover?: number;
91
+ getAvatarConfig?: (item: any) => IAvatarConfig;
92
+ getClassItem?: (item: any) => string;
93
+ classItemInclude?: string;
94
+ getImage?: (data: IDataFunctionCallInConfig) => Observable<string>;
95
+ getImageError?: (data: IDataFunctionCallInConfig) => Observable<string>;
96
+ getComponentOutlet?: () => Observable<LibsUiComponentsComponentOutletComponent | any>;
97
+ getDataComponentOutlet?: TYPE_FUNCTION;
98
+ }
99
+ export interface IListConfigItemCheckbox {
100
+ autoSelectAllItem?: boolean;
101
+ classListInclude?: string;
102
+ httpRequestAllIdSelectOrUnSelect?: WritableSignal<IHttpRequestConfig>;
103
+ configButtonSelectAndUndSelectItem?: WritableSignal<{
104
+ classInclude?: string;
105
+ buttonCheckAll?: IButton;
106
+ buttonUncheckAll?: IButton;
107
+ }>;
108
+ configCheckboxCheckAll?: WritableSignal<ICheckboxItem>;
109
+ classIncludeHasConfigCheckBoxAll?: string;
110
+ fieldKey: string;
111
+ getValue?: (item: any, itemViewInList?: TYPE_LIST_ITEM) => string;
112
+ getLabelSearch?: (item: any) => string;
113
+ getPopover?: (item: any) => IPopover;
114
+ getClassItem?: (item: any) => string;
115
+ getImage?: (data: IDataFunctionCallInConfig) => Observable<string>;
116
+ getImageError?: (data: IDataFunctionCallInConfig) => Observable<string>;
117
+ fieldGetImage?: string;
118
+ hasAvatarPagesSocial?: boolean;
119
+ hasAvatarGroupSocial?: boolean;
120
+ classIncludeImage?: string;
121
+ rowSameLineCheckbox?: boolean;
122
+ rows?: WritableSignal<Array<WritableSignal<IListConfigItemTextRow>>>;
123
+ classRowsWrapper?: string;
124
+ classRows?: string;
125
+ ignoreClickItemUnChecked?: boolean;
126
+ classLabelInclude?: string;
127
+ fieldGetLinkImageError?: string;
128
+ zIndexPopover?: number;
129
+ classItemInclude?: string;
130
+ getAvatarConfig?: (item: any) => IAvatarConfig;
131
+ classCheckboxItemInclude?: string;
132
+ ignoreItemWidth100?: boolean;
133
+ classIncludeLastViewItem?: string;
134
+ classInclude?: string;
135
+ autoScrollToItemSelected?: boolean;
136
+ getComponentOutlet?: () => Observable<LibsUiComponentsComponentOutletComponent | any>;
137
+ getDataComponentOutlet?: TYPE_FUNCTION;
138
+ }
139
+ export interface IListConfigItemTextRow {
140
+ classRow?: string;
141
+ classItemSelected?: string;
142
+ getValue?: (item: any, itemViewInList?: TYPE_LIST_ITEM) => Observable<string>;
143
+ classGetValue?: string;
144
+ classCols?: string;
145
+ cols?: WritableSignal<Array<WritableSignal<IListConfigItemTextCol>>>;
146
+ getRowStylesDynamicCols?: (item: any) => string;
147
+ action?: (item: any) => void;
148
+ getImage?: (item: IDataFunctionCallInConfig) => Observable<string>;
149
+ getClassImage?: (item: IDataFunctionCallInConfig) => Observable<string>;
150
+ getImageError?: (item: IDataFunctionCallInConfig) => Observable<string>;
151
+ getPopoverConfig?: (item: any) => Observable<IPopoverOverlay>;
152
+ getAvatarConfig?: (item: any) => IAvatarConfig;
153
+ getComponentOutlet?: () => Observable<LibsUiComponentsComponentOutletComponent | any>;
154
+ getDataComponentOutlet?: TYPE_FUNCTION;
155
+ }
156
+ export interface IDataFunctionCallInConfig {
157
+ value?: any;
158
+ item?: any;
159
+ otherData?: any;
160
+ }
161
+ export interface IListConfigItemTextCol {
162
+ getClassCol?: (item: any, index: number) => string | undefined;
163
+ getValue?: (data: IDataFunctionCallInConfig, itemViewInList?: TYPE_LIST_ITEM, indexRow?: number, indexCol?: number) => Observable<string>;
164
+ getPopover?: (item: any, index: number) => IPopover | undefined;
165
+ action?: (item: any) => void;
166
+ getImage?: (item: any) => Observable<string>;
167
+ getClassImage?: (item: any) => Observable<string>;
168
+ getImageError?: (item: any) => Observable<string>;
169
+ getConfigBadge?: (item: any, index: number) => IBadge | undefined;
170
+ getStylesDynamicCol?: (data: IDataFunctionCallInConfig) => Observable<string>;
171
+ getButton?: (item: any, index: number) => IButton | undefined;
172
+ getLabelSwitch?: (item: any, index: number) => ILabel | undefined;
173
+ getAvatarConfig?: (item: any) => IAvatarConfig;
174
+ getComponentOutlet?: () => Observable<LibsUiComponentsComponentOutletComponent | any>;
175
+ getDataComponentOutlet?: TYPE_FUNCTION;
176
+ }
177
+ export interface IListConfigItemGroup {
178
+ flatItemsSupportAutoSelect?: (data: Array<any>) => Array<any>;
179
+ fieldKey?: string;
180
+ isViewRadio?: boolean;
181
+ timeIntervalCalculatorHeight?: number;
182
+ configButtonSelectAndUndSelectItem?: WritableSignal<{
183
+ classInclude?: string;
184
+ buttonCheckAll?: IButton;
185
+ buttonUncheckAll?: IButton;
186
+ }>;
187
+ configCheckboxCheckAll?: WritableSignal<ICheckboxItem>;
188
+ classIncludeHasConfigCheckBoxAll?: string;
189
+ getLabelSearch?: (item: any) => string;
190
+ getLabelGroup: (group: any) => string;
191
+ getExpandGroup?: (group: any) => boolean;
192
+ getPopoverGroup?: (group: any) => string;
193
+ getMaxLevelGroup: (group: any) => number;
194
+ getDescriptionGroupWhenNoData?: (group: any) => string | undefined;
195
+ getButtonGroup?: (group: any) => IButton;
196
+ getIconEmptyDataInGroup?: (group: any) => boolean;
197
+ getComponentOutletGroup?: () => Observable<LibsUiComponentsComponentOutletComponent | any>;
198
+ getDataComponentOutletGroup?: TYPE_FUNCTION;
199
+ ignoreCheckboxGroup?: boolean;
200
+ classIncludeNodata?: string;
201
+ classIncludeGroup?: string;
202
+ ignoreRadioGroup?: boolean;
203
+ ignoreTextUppercaseLabelGroup?: boolean;
204
+ ignoreGroupLine?: boolean;
205
+ marginTopHasLine?: number;
206
+ ignoreClickLabelGroup?: boolean;
207
+ fieldGetItems: string;
208
+ fieldGetAvatarItem?: string;
209
+ imgTypeIcon?: boolean;
210
+ classImageInclude?: string;
211
+ isViewTree?: boolean;
212
+ isViewTreeJson?: boolean;
213
+ getLabelItem: (item: any) => string;
214
+ getPopoverItem?: (item: any) => IPopover | undefined;
215
+ actionPopoverByItem?: (item: any, event: TYPE_POPOVER_EVENT) => void;
216
+ getExpandItem?: (group: any) => boolean;
217
+ getBonusPaddingLeftItem?: (item: any, parentItem?: any) => number;
218
+ getClassIncludeItemNoData?: (item: any, parentItem?: any) => string;
219
+ getComponentOutletItem?: () => Observable<LibsUiComponentsComponentOutletComponent | any>;
220
+ getDataComponentOutletItem?: TYPE_FUNCTION;
221
+ ignoreCheckboxItem?: boolean;
222
+ ignoreRadioItem?: boolean;
223
+ notChangeStateItemCheckOther?: boolean;
224
+ searchAllLevel?: boolean;
225
+ emitAllItemChecked?: boolean;
226
+ singleSelectItem?: boolean;
227
+ singleSelectItemByTree?: boolean;
228
+ hasIconCheckSingleSelectItem?: boolean;
229
+ colorBlueWhenItemSelected?: boolean;
230
+ hasBackgroundColorWhenItemSelected?: boolean;
231
+ iconExpand: '' | 'left' | 'right';
232
+ ignoreIconExpandMarginRight?: boolean;
233
+ onlySelectFirstItem?: boolean;
234
+ ignoreChooseParentThenAutoChooseChildren?: boolean;
235
+ chooseChildThenAutoChooseParent?: boolean;
236
+ ignoreUnselectChildrenRemoveSelectParent?: boolean;
237
+ ignoreEmitAllItemCheckedWhenChooseChildThenAutoChooseParent?: boolean;
238
+ disableItemNotLastLevel?: boolean;
239
+ classLabelItem?: string;
240
+ allowDisableLabel?: boolean;
241
+ zIndexLabel?: number;
242
+ expandFirstItem?: boolean;
243
+ widthLabelSub24WhenNotTreeView?: boolean;
244
+ classIncludeItem?: string;
245
+ getClassIncludeItemContent?: (item: any) => string;
246
+ getLinkImageError?: (item: any) => Observable<string>;
247
+ getImage?: (item: any) => Observable<string>;
248
+ getAvatarConfig?: (item: any) => IAvatarConfig;
249
+ getIconImageClass?: (item: any) => string;
250
+ classIncludeLastItem?: string;
251
+ autoCountWhenGroupEmptyItemLevel1?: boolean;
252
+ ignoreChangeChildrenDisableWhenChangeParent?: boolean;
253
+ ignoreFixHeightItem?: boolean;
254
+ }
255
+ export interface IConfigDescriptionGroup {
256
+ classInclude?: string;
257
+ tooltipDescription?: WritableSignal<IPopoverOverlay>;
258
+ textDescription: string;
259
+ classTextDescriptionInclude?: string;
260
+ }
@@ -0,0 +1,16 @@
1
+ import { TYPE_POPOVER_EVENT } from '@libs-ui/components-popover';
2
+ export interface IListDataEmitKey {
3
+ key: unknown;
4
+ item: any;
5
+ isClickManual: boolean;
6
+ }
7
+ export interface IListDataEmitMultiKey {
8
+ keys: Array<unknown>;
9
+ mapKeys: Array<IListDataEmitKey>;
10
+ isClickManual: boolean;
11
+ }
12
+ export interface IEmitRowsEvent {
13
+ event: TYPE_POPOVER_EVENT;
14
+ item: any;
15
+ action: any;
16
+ }
@@ -0,0 +1,15 @@
1
+ import { WritableSignal } from '@angular/core';
2
+ import { IBoundingClientRect } from '@libs-ui/interfaces-types';
3
+ export interface IListFunctionControlEvent {
4
+ checkIsValid: () => Promise<boolean>;
5
+ refresh: () => Promise<void>;
6
+ resetKeySelected: () => Promise<void>;
7
+ getRectListView: () => Promise<IBoundingClientRect>;
8
+ removeItems: (keys: Array<string>) => Promise<void>;
9
+ updateData: (data: IDataUpdateToStore) => Promise<void>;
10
+ setMessageError?: (message: string) => Promise<void>;
11
+ }
12
+ export interface IDataUpdateToStore {
13
+ newData: WritableSignal<Array<WritableSignal<any>>>;
14
+ functionCustomAddDataToStore: (newData: WritableSignal<Array<WritableSignal<any>>>, store: WritableSignal<Array<WritableSignal<any>>>) => void;
15
+ }
@@ -0,0 +1,5 @@
1
+ export * from './config-item.interface';
2
+ export * from './data-emit.interface';
3
+ export * from './function-control-event.interface';
4
+ export * from './tab.interface';
5
+ export * from './templates-type.type';
@@ -0,0 +1,4 @@
1
+ export interface IDropdownTab {
2
+ key: string;
3
+ name: string;
4
+ }
@@ -0,0 +1 @@
1
+ export type TYPE_TEMPLATE = 'checkbox' | 'group' | 'radio' | 'text' | 'tag';
@@ -0,0 +1,93 @@
1
+ import { ElementRef, OnDestroy, OnInit, TemplateRef } from '@angular/core';
2
+ import { IButton } from '@libs-ui/components-buttons-button';
3
+ import { IInputFunctionControlEvent } from '@libs-ui/components-inputs-input';
4
+ import { IInputSearchConfig } from '@libs-ui/components-inputs-search';
5
+ import { IValidRequired } from '@libs-ui/components-inputs-valid';
6
+ import { ILabel } from '@libs-ui/components-label';
7
+ import { IFlagMouse } from '@libs-ui/components-popover';
8
+ import { IPaging } from '@libs-ui/interfaces-types';
9
+ import { IListConfigItem, IListFunctionControlEvent } from './interfaces';
10
+ import { IListDataEmitKey, IListDataEmitMultiKey } from './interfaces/data-emit.interface';
11
+ import * as i0 from "@angular/core";
12
+ export declare class LibsUiComponentsListComponent implements OnInit, OnDestroy {
13
+ protected readonly ERROR_MESSAGE_EMPTY_VALID = "i18n_valid_empty_message";
14
+ protected disableButtonUnSelectOption: import("@angular/core").WritableSignal<boolean>;
15
+ protected isErrorRequired: import("@angular/core").WritableSignal<boolean>;
16
+ protected loading: import("@angular/core").WritableSignal<boolean>;
17
+ protected keySearchStore: import("@angular/core").WritableSignal<string | undefined>;
18
+ private onDestroy;
19
+ private onSearch;
20
+ private onRefresh;
21
+ private onSetHiddenItemByKey;
22
+ private onUpdateMultiKeySelectedGroup;
23
+ private onRemoveItems;
24
+ private onUpdateData;
25
+ private cleanUpEffect;
26
+ private componentRef?;
27
+ private configData;
28
+ private groupMultiKeySelected;
29
+ private functionControlInputSearch;
30
+ readonly hiddenInputSearch: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
31
+ readonly dropdownTabKeyActive: import("@angular/core").InputSignal<string | undefined>;
32
+ readonly keySearch: import("@angular/core").InputSignal<string | undefined>;
33
+ readonly paddingLeftItem: import("@angular/core").InputSignal<boolean | undefined>;
34
+ readonly config: import("@angular/core").InputSignalWithTransform<IListConfigItem | undefined, IListConfigItem | undefined>;
35
+ readonly autoSelectedFirstItemCallOutsideBefore: import("@angular/core").InputSignal<boolean>;
36
+ readonly isSearchOnline: import("@angular/core").InputSignal<boolean | undefined>;
37
+ readonly disable: import("@angular/core").InputSignal<boolean | undefined>;
38
+ readonly disableLabel: import("@angular/core").InputSignal<boolean | undefined>;
39
+ readonly labelConfig: import("@angular/core").InputSignal<ILabel | undefined>;
40
+ readonly searchConfig: import("@angular/core").InputSignalWithTransform<IInputSearchConfig, IInputSearchConfig | undefined>;
41
+ readonly searchPadding: import("@angular/core").InputSignal<boolean | undefined>;
42
+ readonly dividerClassInclude: import("@angular/core").InputSignal<string | undefined>;
43
+ readonly hasDivider: import("@angular/core").InputSignal<boolean>;
44
+ readonly buttonsOther: import("@angular/core").InputSignal<IButton[] | undefined>;
45
+ readonly hasButtonUnSelectOption: import("@angular/core").InputSignal<boolean | undefined>;
46
+ readonly clickExactly: import("@angular/core").InputSignal<boolean | undefined>;
47
+ readonly backgroundListCustom: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
48
+ readonly maxItemShow: import("@angular/core").InputSignal<number | undefined>;
49
+ readonly keySelected: import("@angular/core").InputSignal<unknown>;
50
+ readonly multiKeySelected: import("@angular/core").InputSignal<unknown[] | undefined>;
51
+ readonly keysDisableItem: import("@angular/core").InputSignal<unknown[] | undefined>;
52
+ readonly keysHiddenItem: import("@angular/core").InputSignal<unknown[] | undefined>;
53
+ readonly focusInputSearch: import("@angular/core").InputSignal<boolean | undefined>;
54
+ readonly skipFocusInputWhenKeySearchStoreUndefined: import("@angular/core").InputSignal<boolean | undefined>;
55
+ readonly functionGetItemsAutoAddList: import("@angular/core").InputSignal<(() => Array<any>) | undefined>;
56
+ readonly validRequired: import("@angular/core").InputSignal<IValidRequired | undefined>;
57
+ readonly showValidateBottom: import("@angular/core").InputSignal<boolean | undefined>;
58
+ readonly zIndex: import("@angular/core").InputSignal<number | undefined>;
59
+ readonly loadingIconSize: import("@angular/core").InputSignal<"small" | "large" | "medium" | "smaller" | undefined>;
60
+ readonly templateRefSearchNoData: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
61
+ readonly resetKeyWhenSelectAllKeyDropdown: import("@angular/core").InputSignal<boolean | undefined>;
62
+ readonly ignoreClassDisableDefaultWhenUseKeysDisableItem: import("@angular/core").InputSignal<boolean | undefined>;
63
+ readonly outSelectKey: import("@angular/core").OutputEmitterRef<IListDataEmitKey | undefined>;
64
+ readonly outSelectMultiKey: import("@angular/core").OutputEmitterRef<IListDataEmitMultiKey | undefined>;
65
+ readonly outUnSelectMultiKey: import("@angular/core").OutputEmitterRef<unknown[]>;
66
+ readonly outClickButtonOther: import("@angular/core").OutputEmitterRef<IButton>;
67
+ readonly outFieldKey: import("@angular/core").OutputEmitterRef<string | undefined>;
68
+ readonly outChangeView: import("@angular/core").OutputEmitterRef<any[]>;
69
+ readonly outKeySearch: import("@angular/core").OutputEmitterRef<string>;
70
+ readonly outLoading: import("@angular/core").OutputEmitterRef<boolean>;
71
+ readonly outFunctionsControl: import("@angular/core").OutputEmitterRef<IListFunctionControlEvent>;
72
+ readonly outChangStageFlagMousePopover: import("@angular/core").OutputEmitterRef<IFlagMouse>;
73
+ readonly outLoadItemsComplete: import("@angular/core").OutputEmitterRef<{
74
+ items: Array<any>;
75
+ paging?: IPaging;
76
+ }>;
77
+ protected listViewElementRef: import("@angular/core").Signal<ElementRef<any> | undefined>;
78
+ protected contentElementRef: import("@angular/core").Signal<ElementRef<any> | undefined>;
79
+ private dynamicComponentService;
80
+ constructor();
81
+ ngOnInit(): void;
82
+ get FunctionsControl(): IListFunctionControlEvent;
83
+ protected handlerSearch(keySearch: string): void;
84
+ protected handlerRemoveKeySelected(): Promise<void>;
85
+ protected handlerClickButtonOther(button: IButton): void;
86
+ protected handlerFunctionControlInputSearch(event: IInputFunctionControlEvent): void;
87
+ private checkIsValid;
88
+ private refresh;
89
+ private cloneConfig;
90
+ ngOnDestroy(): void;
91
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListComponent, never>;
92
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsListComponent, "libs_ui-components-list", never, { "hiddenInputSearch": { "alias": "hiddenInputSearch"; "required": false; "isSignal": true; }; "dropdownTabKeyActive": { "alias": "dropdownTabKeyActive"; "required": false; "isSignal": true; }; "keySearch": { "alias": "keySearch"; "required": false; "isSignal": true; }; "paddingLeftItem": { "alias": "paddingLeftItem"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "autoSelectedFirstItemCallOutsideBefore": { "alias": "autoSelectedFirstItemCallOutsideBefore"; "required": false; "isSignal": true; }; "isSearchOnline": { "alias": "isSearchOnline"; "required": false; "isSignal": true; }; "disable": { "alias": "disable"; "required": false; "isSignal": true; }; "disableLabel": { "alias": "disableLabel"; "required": false; "isSignal": true; }; "labelConfig": { "alias": "labelConfig"; "required": false; "isSignal": true; }; "searchConfig": { "alias": "searchConfig"; "required": false; "isSignal": true; }; "searchPadding": { "alias": "searchPadding"; "required": false; "isSignal": true; }; "dividerClassInclude": { "alias": "dividerClassInclude"; "required": false; "isSignal": true; }; "hasDivider": { "alias": "hasDivider"; "required": false; "isSignal": true; }; "buttonsOther": { "alias": "buttonsOther"; "required": false; "isSignal": true; }; "hasButtonUnSelectOption": { "alias": "hasButtonUnSelectOption"; "required": false; "isSignal": true; }; "clickExactly": { "alias": "clickExactly"; "required": false; "isSignal": true; }; "backgroundListCustom": { "alias": "backgroundListCustom"; "required": false; "isSignal": true; }; "maxItemShow": { "alias": "maxItemShow"; "required": false; "isSignal": true; }; "keySelected": { "alias": "keySelected"; "required": false; "isSignal": true; }; "multiKeySelected": { "alias": "multiKeySelected"; "required": false; "isSignal": true; }; "keysDisableItem": { "alias": "keysDisableItem"; "required": false; "isSignal": true; }; "keysHiddenItem": { "alias": "keysHiddenItem"; "required": false; "isSignal": true; }; "focusInputSearch": { "alias": "focusInputSearch"; "required": false; "isSignal": true; }; "skipFocusInputWhenKeySearchStoreUndefined": { "alias": "skipFocusInputWhenKeySearchStoreUndefined"; "required": false; "isSignal": true; }; "functionGetItemsAutoAddList": { "alias": "functionGetItemsAutoAddList"; "required": false; "isSignal": true; }; "validRequired": { "alias": "validRequired"; "required": false; "isSignal": true; }; "showValidateBottom": { "alias": "showValidateBottom"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "loadingIconSize": { "alias": "loadingIconSize"; "required": false; "isSignal": true; }; "templateRefSearchNoData": { "alias": "templateRefSearchNoData"; "required": false; "isSignal": true; }; "resetKeyWhenSelectAllKeyDropdown": { "alias": "resetKeyWhenSelectAllKeyDropdown"; "required": false; "isSignal": true; }; "ignoreClassDisableDefaultWhenUseKeysDisableItem": { "alias": "ignoreClassDisableDefaultWhenUseKeysDisableItem"; "required": false; "isSignal": true; }; }, { "outSelectKey": "outSelectKey"; "outSelectMultiKey": "outSelectMultiKey"; "outUnSelectMultiKey": "outUnSelectMultiKey"; "outClickButtonOther": "outClickButtonOther"; "outFieldKey": "outFieldKey"; "outChangeView": "outChangeView"; "outKeySearch": "outKeySearch"; "outLoading": "outLoading"; "outFunctionsControl": "outFunctionsControl"; "outChangStageFlagMousePopover": "outChangStageFlagMousePopover"; "outLoadItemsComplete": "outLoadItemsComplete"; }, never, never, true, never>;
93
+ }
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@libs-ui/components-list",
3
+ "version": "0.1.1-1",
4
+ "peerDependencies": {
5
+ "@angular/common": ">=18.0.0",
6
+ "@angular/core": ">=18.0.0",
7
+ "@libs-ui/utils": "0.1.1-1",
8
+ "@libs-ui/components-avatar": "0.1.1-1",
9
+ "@libs-ui/components-badge": "0.1.1-1",
10
+ "@libs-ui/components-buttons-button": "0.1.1-1",
11
+ "@libs-ui/components-buttons-sort": "0.1.1-1",
12
+ "@libs-ui/components-checkbox-group": "0.1.1-1",
13
+ "@libs-ui/components-label": "0.1.1-1",
14
+ "@libs-ui/components-popover": "0.1.1-1",
15
+ "@libs-ui/services-http-request": "0.1.1-1",
16
+ "rxjs": "~7.8.0",
17
+ "@libs-ui/interfaces-types": "0.1.1-1",
18
+ "@libs-ui/components-inputs-input": "0.1.1-1",
19
+ "@libs-ui/components-inputs-search": "0.1.1-1",
20
+ "@libs-ui/components-inputs-valid": "0.1.1-1",
21
+ "@libs-ui/services-dynamic-component": "0.1.1-1",
22
+ "@ngx-translate/core": "^15.0.0",
23
+ "@iharbeck/ngx-virtual-scroller": "15.2.0",
24
+ "@libs-ui/components-checkbox-single": "0.1.1-1",
25
+ "@libs-ui/components-scroll-overlay": "0.1.1-1",
26
+ "@libs-ui/components-spinner": "0.1.1-1",
27
+ "@libs-ui/icons": "0.1.1-1",
28
+ "@libs-ui/pipes-call-function-in-template": "0.1.1-1",
29
+ "@libs-ui/pipes-convert-object-to-signal": "0.1.1-1",
30
+ "@libs-ui/components-radio-single": "0.1.1-1",
31
+ "@libs-ui/components-switch": "0.1.1-1"
32
+ },
33
+ "sideEffects": false,
34
+ "module": "fesm2022/libs-ui-components-list.mjs",
35
+ "typings": "index.d.ts",
36
+ "exports": {
37
+ "./package.json": {
38
+ "default": "./package.json"
39
+ },
40
+ ".": {
41
+ "types": "./index.d.ts",
42
+ "esm2022": "./esm2022/libs-ui-components-list.mjs",
43
+ "esm": "./esm2022/libs-ui-components-list.mjs",
44
+ "default": "./fesm2022/libs-ui-components-list.mjs"
45
+ }
46
+ },
47
+ "dependencies": {
48
+ "tslib": "^2.3.0"
49
+ }
50
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LibsUiCheckSelectedByKeyPipe implements PipeTransform {
4
+ transform(value: any, multiKeys: Array<any> | undefined, length: number | undefined): boolean;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiCheckSelectedByKeyPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<LibsUiCheckSelectedByKeyPipe, "LibsUiCheckSelectedByKeyPipe", true>;
7
+ }
@@ -0,0 +1,24 @@
1
+ import { OnInit, WritableSignal } from '@angular/core';
2
+ import { VirtualScrollerComponent } from '@iharbeck/ngx-virtual-scroller';
3
+ import { LibsUiComponentsListTemplatesComponentAbstract } from '../templates.component.abstract';
4
+ import { IListConfigItemCheckbox } from './../../interfaces/config-item.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class LibsUiComponentsListCheckboxComponent extends LibsUiComponentsListTemplatesComponentAbstract implements OnInit {
7
+ protected configTemplateCheckbox: WritableSignal<IListConfigItemCheckbox | undefined>;
8
+ protected readonly virtualScrollerComponent: import("@angular/core").Signal<VirtualScrollerComponent | undefined>;
9
+ ngOnInit(): void;
10
+ protected handlerSelect(isSelectAll: boolean, isClickCheckboxAll?: boolean): Promise<void>;
11
+ private processHandlerSelectData;
12
+ private getIdsByService;
13
+ protected handlerScrollBottom(): void;
14
+ protected processSearch(): void;
15
+ protected handlerChange(event: any, item: any, ignoreDisable?: boolean, isClickManual?: boolean): void;
16
+ private checkAndEmitMultiKeySelected;
17
+ private emitSelectMultiKey;
18
+ protected processData(replace?: boolean): void;
19
+ private scrollToItemSelected;
20
+ protected autoSelectFirstItem(items: Array<WritableSignal<any>>): void;
21
+ protected getLengthItem(): number;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListCheckboxComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsListCheckboxComponent, "libs_ui-components-list-templates_checkbox", never, {}, {}, never, never, true, never>;
24
+ }
@@ -0,0 +1,48 @@
1
+ import { OnInit, WritableSignal } from '@angular/core';
2
+ import { IButton } from '@libs-ui/components-buttons-button';
3
+ import { IListConfigItemGroup } from '../../interfaces/config-item.interface';
4
+ import { LibsUiComponentsListTemplatesComponentAbstract } from '../templates.component.abstract';
5
+ import * as i0 from "@angular/core";
6
+ export declare class LibsUiComponentsListGroupComponent extends LibsUiComponentsListTemplatesComponentAbstract implements OnInit {
7
+ protected configTemplateGroup: WritableSignal<IListConfigItemGroup | undefined>;
8
+ protected level: WritableSignal<number>;
9
+ protected keysChecked: WritableSignal<string[]>;
10
+ protected keysStillOtherOptions: WritableSignal<string[]>;
11
+ protected totalItem: WritableSignal<number>;
12
+ protected totalItemChecked: WritableSignal<number>;
13
+ protected calculatorHeighItemSuccess: WritableSignal<boolean>;
14
+ protected keyFetch: WritableSignal<string>;
15
+ private readonly PATTERN_FAKE_ID;
16
+ private mappingItemsChecked;
17
+ private selectFirstItem;
18
+ private firstItemSelected;
19
+ ngOnInit(): void;
20
+ protected handlerCheckedOrUnCheckedAll(checked: boolean): void;
21
+ protected checkedGroupItems(items?: Array<WritableSignal<any>>, parent?: WritableSignal<any>): void;
22
+ protected handlerClickButtonGroup(buttonInGroup: IButton, item: any): void;
23
+ protected handlerToggleExpand(e: unknown, item: WritableSignal<any>, acceptEvent?: boolean): void;
24
+ protected handlerChangeView(): void;
25
+ protected handlerChangeItemChecked(item: any): void;
26
+ protected handlerChangeChecked(checked: boolean, item: WritableSignal<any>, isClickManual: boolean, isCheckedByDefaultKey?: boolean): void;
27
+ private getItemsOfGroup;
28
+ private setKeysStillOtherOptions;
29
+ private setKeysCheckedByMappingChecked;
30
+ private emitMultiKeyChecked;
31
+ private recursivelyCheckedParentByTree;
32
+ private setCheckCheckedItemsParent;
33
+ private setCheckCheckedItemsChild;
34
+ private removeCheckedItemsChild;
35
+ protected processSearch(): void;
36
+ protected processData(): void;
37
+ private refreshView;
38
+ private expandAllItemsInGroup;
39
+ private convertDataByGroupInItem;
40
+ private setDisplayItem;
41
+ private filterItemsDisplay;
42
+ protected getLengthItem(): number;
43
+ private getLengthAllGroup;
44
+ protected getHeightGroupHasLine(): number;
45
+ protected buildValueByConfig(item: WritableSignal<any>): string;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListGroupComponent, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsListGroupComponent, "libs_ui-components-list-templates_group", never, {}, {}, never, never, true, never>;
48
+ }
@@ -0,0 +1,27 @@
1
+ import { WritableSignal } from '@angular/core';
2
+ import { IFlagMouse, TYPE_POPOVER_EVENT } from '@libs-ui/components-popover';
3
+ import { IListConfigItem, IListConfigItemGroup } from '../../../interfaces/config-item.interface';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LibsUiComponentsListGroupItemComponent {
6
+ readonly items: import("@angular/core").InputSignal<WritableSignal<any>[]>;
7
+ readonly configTemplateGroup: import("@angular/core").InputSignal<IListConfigItemGroup | undefined>;
8
+ readonly keySearch: import("@angular/core").InputSignal<string | undefined>;
9
+ readonly fieldKey: import("@angular/core").InputSignal<string>;
10
+ readonly keysChecked: import("@angular/core").InputSignal<string[]>;
11
+ readonly keysDisableItem: import("@angular/core").InputSignal<any[] | undefined>;
12
+ readonly parentItem: import("@angular/core").InputSignal<any>;
13
+ readonly disable: import("@angular/core").InputSignal<boolean | undefined>;
14
+ readonly disableLabel: import("@angular/core").InputSignal<boolean | undefined>;
15
+ readonly config: import("@angular/core").InputSignal<IListConfigItem | undefined>;
16
+ readonly keysStillOtherOptions: import("@angular/core").InputSignal<string[]>;
17
+ readonly outChangeView: import("@angular/core").OutputEmitterRef<boolean>;
18
+ readonly outChange: import("@angular/core").OutputEmitterRef<any>;
19
+ readonly outChangStageFlagMousePopover: import("@angular/core").OutputEmitterRef<IFlagMouse>;
20
+ protected handlerToggleExpand(e: Event, item: WritableSignal<any>): void;
21
+ protected handlerChangeView(expand: boolean): void;
22
+ protected handlerChangeChecked(item: any, field_key?: string, disable?: boolean): void;
23
+ protected handlerEventPopover(event: TYPE_POPOVER_EVENT, item: any): void;
24
+ protected handlerChangStageFlagMouse(flag: IFlagMouse): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListGroupItemComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsListGroupItemComponent, "libs_ui-components-list-templates_group-item", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "configTemplateGroup": { "alias": "configTemplateGroup"; "required": false; "isSignal": true; }; "keySearch": { "alias": "keySearch"; "required": false; "isSignal": true; }; "fieldKey": { "alias": "fieldKey"; "required": false; "isSignal": true; }; "keysChecked": { "alias": "keysChecked"; "required": false; "isSignal": true; }; "keysDisableItem": { "alias": "keysDisableItem"; "required": false; "isSignal": true; }; "parentItem": { "alias": "parentItem"; "required": false; "isSignal": true; }; "disable": { "alias": "disable"; "required": false; "isSignal": true; }; "disableLabel": { "alias": "disableLabel"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "keysStillOtherOptions": { "alias": "keysStillOtherOptions"; "required": false; "isSignal": true; }; }, { "outChangeView": "outChangeView"; "outChange": "outChange"; "outChangStageFlagMousePopover": "outChangStageFlagMousePopover"; }, never, never, true, never>;
27
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe implements PipeTransform {
4
+ transform(level: number, maxLevel: number, isTreeView?: boolean, isTreeViewJson?: boolean, hasIcon?: boolean): number;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe, "LibsUiComponentsListGroupCalculatorLeftLineVerticalItemPipe", true>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LibsUiComponentsListGroupCalculatorMarginLeftItemPipe implements PipeTransform {
4
+ transform(level: number, maxLevel: number, isTreeView?: boolean, isViewTreeJson?: boolean, hasIcon?: boolean, isViewLabelEmpty?: boolean): number;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListGroupCalculatorMarginLeftItemPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<LibsUiComponentsListGroupCalculatorMarginLeftItemPipe, "LibsUiComponentsListGroupCalculatorMarginLeftItemPipe", true>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe implements PipeTransform {
4
+ transform(level: number, maxLevel: number, isTreeView?: boolean, isTreeViewJson?: boolean, hasChild?: boolean): number;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe, "LibsUiComponentsListGroupCalculatorPaddingLeftItemPipe", true>;
7
+ }