@libs-ui/components-list 0.2.63 → 0.2.65

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 (28) hide show
  1. package/defines/list.define.d.ts +2 -1
  2. package/esm2022/defines/list.define.mjs +14 -13
  3. package/esm2022/interfaces/config-item.interface.mjs +1 -1
  4. package/esm2022/list.component.mjs +40 -18
  5. package/esm2022/templates/checkbox/checkbox.component.mjs +10 -9
  6. package/esm2022/templates/group/group.component.mjs +773 -0
  7. package/esm2022/templates/group/item/item.component.mjs +77 -0
  8. package/esm2022/templates/group/pipes/calculator-left-line-vertical-item.pipe.mjs +38 -0
  9. package/esm2022/templates/group/pipes/calculator-margin-left-item.pipe.mjs +40 -0
  10. package/esm2022/templates/group/pipes/calculator-padding-left-item.pipe.mjs +26 -0
  11. package/esm2022/templates/radio/radio.component.mjs +5 -5
  12. package/esm2022/templates/rows/rows.component.mjs +4 -4
  13. package/esm2022/templates/tag/tag.component.mjs +3 -3
  14. package/esm2022/templates/templates.component.abstract.mjs +21 -16
  15. package/esm2022/templates/text/text.component.mjs +4 -4
  16. package/fesm2022/libs-ui-components-list.mjs +1013 -69
  17. package/fesm2022/libs-ui-components-list.mjs.map +1 -1
  18. package/interfaces/config-item.interface.d.ts +24 -29
  19. package/list.component.d.ts +2 -2
  20. package/package.json +1 -1
  21. package/templates/checkbox/checkbox.component.d.ts +1 -1
  22. package/templates/group/group.component.d.ts +50 -0
  23. package/templates/group/item/item.component.d.ts +27 -0
  24. package/templates/group/pipes/calculator-left-line-vertical-item.pipe.d.ts +7 -0
  25. package/templates/group/pipes/calculator-margin-left-item.pipe.d.ts +7 -0
  26. package/templates/group/pipes/calculator-padding-left-item.pipe.d.ts +7 -0
  27. package/templates/rows/rows.component.d.ts +2 -2
  28. package/templates/templates.component.abstract.d.ts +1 -1
@@ -11,13 +11,13 @@ import { Observable } from "rxjs";
11
11
  import { WritableSignal } from "@angular/core";
12
12
  export interface IListConfigItem {
13
13
  type: TYPE_TEMPLATE;
14
- httpRequestData?: IHttpRequestConfig;
15
- configTemplateText?: IListConfigItemText;
16
- configTemplateRadio?: IListConfigItemRadio;
17
- configTemplateCheckbox?: IListConfigItemCheckbox;
18
- configTemplateGroup?: IListConfigItemGroup;
19
- configTemplateTag?: IListConfigItemTag;
20
- configDescriptionGroup?: IConfigDescriptionGroup;
14
+ httpRequestData?: WritableSignal<IHttpRequestConfig>;
15
+ configTemplateText?: WritableSignal<IListConfigItemText>;
16
+ configTemplateRadio?: WritableSignal<IListConfigItemRadio>;
17
+ configTemplateCheckbox?: WritableSignal<IListConfigItemCheckbox>;
18
+ configTemplateGroup?: WritableSignal<IListConfigItemGroup>;
19
+ configTemplateTag?: WritableSignal<IListConfigItemTag>;
20
+ configDescriptionGroup?: WritableSignal<IConfigDescriptionGroup>;
21
21
  textNoData?: string;
22
22
  textNoDataClassInclude?: string;
23
23
  textSearchNoData?: string;
@@ -48,10 +48,10 @@ export interface IListConfigItemText {
48
48
  getClassIconLeft?: (item: any) => string;
49
49
  getConfigHoverDanger?: (item: any) => boolean;
50
50
  getPopover?: (item: any) => IPopover | undefined;
51
- rows?: Array<IListConfigItemTextRow>;
51
+ rows?: WritableSignal<Array<WritableSignal<IListConfigItemTextRow>>>;
52
52
  classRowsWrapper?: string;
53
53
  classRows?: string;
54
- configLabelPopover?: IPopoverOverlay;
54
+ configLabelPopover?: WritableSignal<IPopoverOverlay>;
55
55
  autoScrollToItemSelected?: boolean;
56
56
  itemSort?: ISort;
57
57
  actionSort?: (itemSort: ISort) => void;
@@ -73,7 +73,7 @@ export interface IListConfigItemRadio {
73
73
  hasAvatarGroupSocial?: boolean;
74
74
  getValue?: (item: any) => string;
75
75
  getPopover?: (item: any) => IPopover | undefined;
76
- rows?: Array<IListConfigItemTextRow>;
76
+ rows?: WritableSignal<Array<WritableSignal<IListConfigItemTextRow>>>;
77
77
  classRows?: string;
78
78
  autoScrollToItemSelected?: boolean;
79
79
  zIndexPopover?: number;
@@ -86,13 +86,13 @@ export interface IListConfigItemRadio {
86
86
  export interface IListConfigItemCheckbox {
87
87
  autoSelectAllItem?: boolean;
88
88
  classListInclude?: string;
89
- httpRequestAllIdSelectOrUnSelect?: IHttpRequestConfig;
90
- configButtonSelectAndUndSelectItem?: {
89
+ httpRequestAllIdSelectOrUnSelect?: WritableSignal<IHttpRequestConfig>;
90
+ configButtonSelectAndUndSelectItem?: WritableSignal<{
91
91
  classInclude?: string;
92
92
  buttonCheckAll?: IButton;
93
93
  buttonUncheckAll?: IButton;
94
- };
95
- configCheckboxCheckAll?: ICheckboxItem;
94
+ }>;
95
+ configCheckboxCheckAll?: WritableSignal<ICheckboxItem>;
96
96
  classIncludeHasConfigCheckBoxAll?: string;
97
97
  fieldKey: string;
98
98
  getValue?: (item: any) => string;
@@ -104,7 +104,7 @@ export interface IListConfigItemCheckbox {
104
104
  hasAvatarPagesSocial?: boolean;
105
105
  hasAvatarGroupSocial?: boolean;
106
106
  classIncludeImage?: string;
107
- rows?: Array<IListConfigItemTextRow>;
107
+ rows?: WritableSignal<Array<WritableSignal<IListConfigItemTextRow>>>;
108
108
  classRowsWrapper?: string;
109
109
  classRows?: string;
110
110
  ignoreClickItemUnChecked?: boolean;
@@ -118,14 +118,14 @@ export interface IListConfigItemCheckbox {
118
118
  classIncludeLastViewItem?: string;
119
119
  classInclude?: string;
120
120
  }
121
- interface IListConfigItemTextRow {
121
+ export interface IListConfigItemTextRow {
122
122
  classRow?: string;
123
123
  classItemSelected?: string;
124
124
  getValue?: (data: IDataFunctionCallInConfig) => Observable<string>;
125
125
  classGetValue?: string;
126
126
  classCols?: string;
127
+ cols?: WritableSignal<Array<WritableSignal<IListConfigItemTextCol>>>;
127
128
  getRowStylesDynamicCols?: (item: any) => string;
128
- cols?: Array<IListConfigItemTextCol>;
129
129
  action?: (item: any) => void;
130
130
  getImage?: (item: IDataFunctionCallInConfig) => Observable<string>;
131
131
  getClassImage?: (item: IDataFunctionCallInConfig) => Observable<string>;
@@ -138,9 +138,6 @@ export interface IDataFunctionCallInConfig {
138
138
  item?: any;
139
139
  otherData?: any;
140
140
  }
141
- export interface IListConfigItemTextRowSignal extends Omit<IListConfigItemTextRow, 'cols'> {
142
- cols?: WritableSignal<Array<WritableSignal<IListConfigItemTextCol>>>;
143
- }
144
141
  export interface IListConfigItemTextCol {
145
142
  getClassCol?: (item: any, index: number) => string | undefined;
146
143
  getValue?: (data: IDataFunctionCallInConfig) => Observable<string>;
@@ -160,12 +157,12 @@ export interface IListConfigItemGroup {
160
157
  fieldKey?: string;
161
158
  isViewRadio?: boolean;
162
159
  timeIntervalCalculatorHeight?: number;
163
- configButtonSelectAndUndSelectItem?: {
160
+ configButtonSelectAndUndSelectItem?: WritableSignal<{
164
161
  classInclude?: string;
165
162
  buttonCheckAll?: IButton;
166
163
  buttonUncheckAll?: IButton;
167
- };
168
- configCheckboxCheckAll?: ICheckboxItem;
164
+ }>;
165
+ configCheckboxCheckAll?: WritableSignal<ICheckboxItem>;
169
166
  classIncludeHasConfigCheckBoxAll?: string;
170
167
  getLabelSearch?: (item: any) => string;
171
168
  getLabelGroup: (group: any) => string;
@@ -185,8 +182,6 @@ export interface IListConfigItemGroup {
185
182
  ignoreClickLabelGroup?: boolean;
186
183
  fieldGetItems: string;
187
184
  fieldGetAvatarItem?: string;
188
- hasAvatarPagesSocial?: boolean;
189
- hasAvatarGroupSocial?: boolean;
190
185
  imgTypeIcon?: boolean;
191
186
  classImageInclude?: string;
192
187
  isViewTree?: boolean;
@@ -222,17 +217,17 @@ export interface IListConfigItemGroup {
222
217
  widthLabelSub24WhenNotTreeView?: boolean;
223
218
  classIncludeItem?: string;
224
219
  getClassIncludeItemContent?: (item: any) => string;
225
- getLinkImageError?: (item: any) => string;
220
+ getLinkImageError?: (item: any) => Observable<string>;
221
+ getImage?: (item: any) => Observable<string>;
226
222
  getAvatarConfig?: (item: any) => IAvatarConfig;
227
- classIncludeLastItem?: string;
228
223
  getIconImageClass?: (item: any) => string;
224
+ classIncludeLastItem?: string;
229
225
  autoCountWhenGroupEmptyItemLevel1?: boolean;
230
226
  ignoreChangeChildrenDisableWhenChangeParent?: boolean;
231
227
  }
232
228
  export interface IConfigDescriptionGroup {
233
229
  classInclude?: string;
234
- tooltipDescription?: IPopoverOverlay;
230
+ tooltipDescription?: WritableSignal<IPopoverOverlay>;
235
231
  textDescription: string;
236
232
  classTextDescriptionInclude?: string;
237
233
  }
238
- export {};
@@ -6,7 +6,7 @@ import { IValidRequired } from "@libs-ui/components-inputs-valid";
6
6
  import { ILabel } from "@libs-ui/components-label";
7
7
  import { IFlagMouse } from "@libs-ui/components-popover";
8
8
  import { IPaging } from "@libs-ui/interfaces-types";
9
- import { IListFunctionControlEvent, IListConfigItem } from "./interfaces";
9
+ import { IListConfigItem, IListFunctionControlEvent } from "./interfaces";
10
10
  import { IListDataEmitKey, IListDataEmitMultiKey } from "./interfaces/data-emit.interface";
11
11
  import * as i0 from "@angular/core";
12
12
  export declare class LibsUiComponentsListComponent implements OnInit, OnDestroy {
@@ -56,7 +56,7 @@ export declare class LibsUiComponentsListComponent implements OnInit, OnDestroy
56
56
  readonly validRequired: import("@angular/core").InputSignal<IValidRequired | undefined>;
57
57
  readonly showValidateBottom: import("@angular/core").InputSignal<boolean | undefined>;
58
58
  readonly zIndex: import("@angular/core").InputSignal<number | undefined>;
59
- readonly loadingIconSize: import("@angular/core").InputSignal<"small" | "large" | "medium" | "smaller" | undefined>;
59
+ readonly loadingIconSize: import("@angular/core").InputSignal<"large" | "medium" | "small" | "smaller" | undefined>;
60
60
  readonly templateRefSearchNoData: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
61
61
  readonly resetKeyWhenSelectAllKeyDropdown: import("@angular/core").InputSignal<boolean | undefined>;
62
62
  readonly ignoreClassDisableDefaultWhenUseKeysDisableItem: import("@angular/core").InputSignal<boolean | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libs-ui/components-list",
3
- "version": "0.2.63",
3
+ "version": "0.2.65",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.0",
6
6
  "@angular/core": "^18.2.0"
@@ -15,7 +15,7 @@ export declare class LibsUiComponentsListCheckboxComponent extends LibsUiCompone
15
15
  private checkAndEmitMultiKeySelected;
16
16
  private emitSelectMultiKey;
17
17
  protected processData(replace?: boolean): void;
18
- protected autoSelectFirstItem(items: Array<any>): void;
18
+ protected autoSelectFirstItem(items: Array<WritableSignal<any>>): void;
19
19
  protected getLengthItem(): number;
20
20
  static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListCheckboxComponent, never>;
21
21
  static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsListCheckboxComponent, "libs_ui-components-list-templates_checkbox", never, {}, {}, never, never, true, never>;
@@ -0,0 +1,50 @@
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
+ constructor();
20
+ ngOnInit(): void;
21
+ protected handlerCheckedOrUnCheckedAll(checked: boolean): void;
22
+ protected checkedGroupItems(items?: Array<WritableSignal<any>>, parent?: WritableSignal<any>): void;
23
+ protected handlerClickButtonGroup(buttonInGroup: IButton, item: any): void;
24
+ protected handlerToggleExpand(e: unknown, item: any, acceptEvent?: boolean): void;
25
+ protected handlerChangeView(): void;
26
+ protected processKeyChangeUnSelect(item: WritableSignal<any>): void;
27
+ protected handlerChangeItemChecked(item: WritableSignal<any>): void;
28
+ protected handlerChangeChecked(checked: boolean, item: WritableSignal<any>, isCheckedByDefaultKey?: boolean): void;
29
+ private getItemsOfGroup;
30
+ private setKeysStillOtherOptions;
31
+ private setKeysCheckedByMappingChecked;
32
+ private emitMultiKeyChecked;
33
+ private recursivelyCheckedParentByTree;
34
+ private setCheckCheckedItemsParent;
35
+ private setCheckCheckedItemsChild;
36
+ private removeCheckedItemsChild;
37
+ protected processSearch(): void;
38
+ protected processData(): void;
39
+ private refreshView;
40
+ private expandAllItemsInGroup;
41
+ private convertDataByGroupInItem;
42
+ private setDisplayItem;
43
+ private filterItemsDisplay;
44
+ protected getLengthItem(): number;
45
+ private getLengthAllGroup;
46
+ protected getHeightGroupHasLine(): number;
47
+ protected buildValueByConfig(item: any): string;
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsListGroupComponent, never>;
49
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsListGroupComponent, "libs_ui-components-list-templates_group", never, {}, {}, never, never, true, never>;
50
+ }
@@ -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 outChangStageFlagMouseTooltip: import("@angular/core").OutputEmitterRef<IFlagMouse>;
20
+ protected handlerToggleExpand(e: Event, item: 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"; "outChangStageFlagMouseTooltip": "outChangStageFlagMouseTooltip"; }, 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
+ }
@@ -1,11 +1,11 @@
1
1
  import { WritableSignal } from "@angular/core";
2
2
  import { IFlagMouse, TYPE_POPOVER_EVENT } from "@libs-ui/components-popover";
3
3
  import { Observable } from "rxjs";
4
- import { IEmitRowsEvent, IListConfigItemCheckbox, IListConfigItemText, IListConfigItemTextRowSignal } from "../../interfaces";
4
+ import { IEmitRowsEvent, IListConfigItemCheckbox, IListConfigItemText, IListConfigItemTextRow } from "../../interfaces";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class LibsUiComponentsListRowsComponent {
7
7
  protected popoverIcon: WritableSignal<string>;
8
- protected configItemTextRows: WritableSignal<WritableSignal<IListConfigItemTextRowSignal>[]>;
8
+ protected configItemTextRows: WritableSignal<WritableSignal<IListConfigItemTextRow>[]>;
9
9
  readonly configTemplate: import("@angular/core").InputSignal<IListConfigItemText | IListConfigItemCheckbox>;
10
10
  readonly item: import("@angular/core").InputSignal<any>;
11
11
  readonly keySelected: import("@angular/core").InputSignal<unknown>;
@@ -50,7 +50,7 @@ export declare abstract class LibsUiComponentsListTemplatesComponentAbstract imp
50
50
  readonly disable: import("@angular/core").InputSignal<boolean | undefined>;
51
51
  readonly disableLabel: import("@angular/core").InputSignal<boolean | undefined>;
52
52
  readonly zIndex: import("@angular/core").InputSignal<number>;
53
- readonly loadingIconSize: import("@angular/core").InputSignal<"small" | "large" | "medium" | "smaller" | undefined>;
53
+ readonly loadingIconSize: import("@angular/core").InputSignal<"large" | "medium" | "small" | "smaller" | undefined>;
54
54
  readonly resetKeyWhenSelectAllKeyDropdown: import("@angular/core").InputSignal<boolean | undefined>;
55
55
  readonly ignoreClassDisableDefaultWhenUseKeysDisableItem: import("@angular/core").InputSignal<boolean | undefined>;
56
56
  readonly templateRefSearchNoData: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;