@energycap/components 0.39.24-ECAP-26539-Item-Picker-Select-All.20240912-1128 → 0.39.24-ECAP-26539-Item-Picker-Select-All.20240912-1552
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/esm2020/lib/controls/item-picker/item-picker.component.mjs +52 -31
- package/fesm2015/energycap-components.mjs +51 -30
- package/fesm2015/energycap-components.mjs.map +1 -1
- package/fesm2020/energycap-components.mjs +51 -30
- package/fesm2020/energycap-components.mjs.map +1 -1
- package/lib/controls/item-picker/item-picker.component.d.ts +27 -8
- package/package.json +1 -1
@@ -29,6 +29,10 @@ export declare class ItemPickerSelectableContext<T> extends TableSelectableRowCo
|
|
29
29
|
* AdvancedRowClickBehavior is disabled for ItemPicker.
|
30
30
|
*/
|
31
31
|
readonly disableAdvancedRowClickBehavior: boolean;
|
32
|
+
/** When true the user has opted to select all items across all pages. Due to api pagination
|
33
|
+
* we don't have all of the items locally, so the host will need to tell the API to operate on all
|
34
|
+
* via api filters or other means.
|
35
|
+
*/
|
32
36
|
isSelectingAllItems: boolean;
|
33
37
|
}
|
34
38
|
export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDestroy {
|
@@ -64,8 +68,12 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
|
|
64
68
|
* interpolation will be used.
|
65
69
|
*/
|
66
70
|
noSelectedItemsMessage?: string;
|
67
|
-
|
68
|
-
|
71
|
+
/** When true the button to select all items will be visible in the available items header when
|
72
|
+
* the header checkbox is checked and there are multiple pages of results
|
73
|
+
*/
|
74
|
+
enableSelectAllItems: boolean;
|
75
|
+
/** Passed in message to display in the selected items table when the select all items button is clicked */
|
76
|
+
selectAllItemsMessage: string;
|
69
77
|
/** List of available items to pick from */
|
70
78
|
availableItems: PickerItem[];
|
71
79
|
/**
|
@@ -79,9 +87,17 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
|
|
79
87
|
/** Track by used for the searchable table rows */
|
80
88
|
trackByIndex: (index: number) => number;
|
81
89
|
tableStatus: Overlay;
|
82
|
-
|
83
|
-
|
84
|
-
|
90
|
+
/** Text to display next to the checkbox in the available items header. Used to dislay how many items are
|
91
|
+
* selected when select all items is enabled
|
92
|
+
*/
|
93
|
+
availableCheckboxText: string;
|
94
|
+
/** When set to true the select all items button will show in the available items header. This is
|
95
|
+
* shown when the user has enabled select all for the item picker and the user selects the header checkbox
|
96
|
+
* with more than one page of results.
|
97
|
+
*/
|
98
|
+
showSelectAllItemsButton: boolean;
|
99
|
+
/** The total number of items returned from the api across all pages */
|
100
|
+
totalItemsBeforePaging?: number;
|
85
101
|
/**
|
86
102
|
* Template used to display the available and selected items as well as the available item header.
|
87
103
|
* This will be set to the default template if a custom is not provided
|
@@ -98,7 +114,6 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
|
|
98
114
|
private destroyed;
|
99
115
|
constructor(translateService: TranslateService);
|
100
116
|
ngOnInit(): void;
|
101
|
-
selectAllItems(): void;
|
102
117
|
/**
|
103
118
|
* Watch for changes and react if the custom item template value changes
|
104
119
|
*/
|
@@ -118,12 +133,16 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
|
|
118
133
|
* @param removeItem
|
119
134
|
*/
|
120
135
|
removeSelectedItem(removeItem: PickerItem): void;
|
136
|
+
/**
|
137
|
+
* Click handler for the select all items button
|
138
|
+
*/
|
139
|
+
selectAllItems(): void;
|
121
140
|
/**
|
122
141
|
* Watch for changes to the row checkboxes form array and update the selected items
|
123
142
|
* list
|
124
143
|
*/
|
125
144
|
private setupRowCheckboxesWatcher;
|
126
|
-
private
|
145
|
+
private updateAvailableCheckboxText;
|
127
146
|
/**
|
128
147
|
* Watch to be told if changes to the map were made outside of the component and if so update
|
129
148
|
* the array displayed in the selected list and select checkboxes for visible available items
|
@@ -131,5 +150,5 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
|
|
131
150
|
private setupSelectedItemsChangedWatcher;
|
132
151
|
private setInternalizedTemplates;
|
133
152
|
static ɵfac: i0.ɵɵFactoryDeclaration<ItemPickerComponent<any>, never>;
|
134
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ItemPickerComponent<any>, "ec-item-picker", never, { "id": "id"; "availableTitle": "availableTitle"; "selectedTitle": "selectedTitle"; "itemName": "itemName"; "formModel": "formModel"; "customAvailableHeaderTemplate": "customAvailableHeaderTemplate"; "customAvailableItemTemplate": "customAvailableItemTemplate"; "customSelectedItemTemplate": "customSelectedItemTemplate"; "ready": "ready"; "getItems": "getItems"; "selectionContext": "selectionContext"; "noDataMessage": "noDataMessage"; "noSelectedItemsMessage": "noSelectedItemsMessage"; "
|
153
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ItemPickerComponent<any>, "ec-item-picker", never, { "id": "id"; "availableTitle": "availableTitle"; "selectedTitle": "selectedTitle"; "itemName": "itemName"; "formModel": "formModel"; "customAvailableHeaderTemplate": "customAvailableHeaderTemplate"; "customAvailableItemTemplate": "customAvailableItemTemplate"; "customSelectedItemTemplate": "customSelectedItemTemplate"; "ready": "ready"; "getItems": "getItems"; "selectionContext": "selectionContext"; "noDataMessage": "noDataMessage"; "noSelectedItemsMessage": "noSelectedItemsMessage"; "enableSelectAllItems": "enableSelectAllItems"; "selectAllItemsMessage": "selectAllItemsMessage"; }, {}, never, never, false, never>;
|
135
154
|
}
|