@energycap/components 0.39.24-ECAP-26539-Item-Picker-Select-All.20240913-1532 → 0.39.24

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.
@@ -80,6 +80,13 @@ export declare class FileUploadComponent extends FormControlBase implements OnIn
80
80
  * Optional property to control whether the user can select multiple files
81
81
  */
82
82
  multiSelect?: boolean;
83
+ /**
84
+ * When true, the onFileSelected callback will not be called if the form is invalid.
85
+ * This is useful when the file needs to be validated before it can be uploaded.
86
+ * For server-side validation, leave this as false and use the onFileSelected callback
87
+ * to upload the file and handle any errors thrown by the API.
88
+ */
89
+ validateBeforeUpload: boolean;
83
90
  fileInput?: ElementRef;
84
91
  /** Property bound to the file input to filter what file types are shown in the dialog */
85
92
  fileTypeAccept: string | undefined;
@@ -113,5 +120,5 @@ export declare class FileUploadComponent extends FormControlBase implements OnIn
113
120
  private handleMultipleFiles;
114
121
  private readFile;
115
122
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
116
- static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "formModel": "formModel"; "placeholder": "placeholder"; "fileType": "fileType"; "fileOutput": "fileOutput"; "customExtensions": "customExtensions"; "onFileSelected": "onFileSelected"; "onMultipleFilesSelected": "onMultipleFilesSelected"; "displayType": "displayType"; "buttonLabel": "buttonLabel"; "buttonType": "buttonType"; "multiSelect": "multiSelect"; }, {}, never, never, false, never>;
123
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "formModel": "formModel"; "placeholder": "placeholder"; "fileType": "fileType"; "fileOutput": "fileOutput"; "customExtensions": "customExtensions"; "onFileSelected": "onFileSelected"; "onMultipleFilesSelected": "onMultipleFilesSelected"; "displayType": "displayType"; "buttonLabel": "buttonLabel"; "buttonType": "buttonType"; "multiSelect": "multiSelect"; "validateBeforeUpload": "validateBeforeUpload"; }, {}, never, never, false, never>;
117
124
  }
@@ -6,7 +6,6 @@ import { PagingInfo } from '../../display/table/table-pagination.component';
6
6
  import { TableSelectableRowContext } from '../../display/table/table-selectable-row.component';
7
7
  import { Overlay } from '../../display/view-overlay/view-overlay.component';
8
8
  import { MenuItem } from '../menu/menu.component';
9
- import { TranslateService } from '@ngx-translate/core';
10
9
  import * as i0 from "@angular/core";
11
10
  export interface PickerItem<TValue = any, SItems = any> extends MenuItem {
12
11
  id: string;
@@ -29,14 +28,8 @@ export declare class ItemPickerSelectableContext<T> extends TableSelectableRowCo
29
28
  * AdvancedRowClickBehavior is disabled for ItemPicker.
30
29
  */
31
30
  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
- */
36
- isSelectingAllItems: boolean;
37
31
  }
38
32
  export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDestroy {
39
- private translateService;
40
33
  /** Identifier for the component. This will be added to the beginning of all internal action elements */
41
34
  id?: string;
42
35
  /** Title displayed above the available items table */
@@ -68,12 +61,6 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
68
61
  * interpolation will be used.
69
62
  */
70
63
  noSelectedItemsMessage?: string;
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;
77
64
  /** List of available items to pick from */
78
65
  availableItems: PickerItem[];
79
66
  /**
@@ -87,17 +74,6 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
87
74
  /** Track by used for the searchable table rows */
88
75
  trackByIndex: (index: number) => number;
89
76
  tableStatus: Overlay;
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;
101
77
  /**
102
78
  * Template used to display the available and selected items as well as the available item header.
103
79
  * This will be set to the default template if a custom is not provided
@@ -107,12 +83,11 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
107
83
  internalizedSelectedItemTemplate: TemplateRef<any>;
108
84
  /** Default templates used if a custom template is not provided */
109
85
  private defaultAvailableHeaderTemplate;
110
- private defaultAvailableSelectAllHeaderTemplate;
111
86
  private defaultAvailableItemTemplate;
112
87
  private defaultSelectedItemTemplate;
113
88
  /** Used to shut down our subscriptions when the component is destroyed */
114
89
  private destroyed;
115
- constructor(translateService: TranslateService);
90
+ constructor();
116
91
  ngOnInit(): void;
117
92
  /**
118
93
  * Watch for changes and react if the custom item template value changes
@@ -133,16 +108,11 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
133
108
  * @param removeItem
134
109
  */
135
110
  removeSelectedItem(removeItem: PickerItem): void;
136
- /**
137
- * Click handler for the select all items button
138
- */
139
- selectAllItems(): void;
140
111
  /**
141
112
  * Watch for changes to the row checkboxes form array and update the selected items
142
113
  * list
143
114
  */
144
115
  private setupRowCheckboxesWatcher;
145
- private updateAvailableCheckboxText;
146
116
  /**
147
117
  * Watch to be told if changes to the map were made outside of the component and if so update
148
118
  * the array displayed in the selected list and select checkboxes for visible available items
@@ -150,5 +120,5 @@ export declare class ItemPickerComponent<T> implements OnInit, OnChanges, OnDest
150
120
  private setupSelectedItemsChangedWatcher;
151
121
  private setInternalizedTemplates;
152
122
  static ɵfac: i0.ɵɵFactoryDeclaration<ItemPickerComponent<any>, never>;
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>;
123
+ 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"; }, {}, never, never, false, never>;
154
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.39.24-ECAP-26539-Item-Picker-Select-All.20240913-1532",
3
+ "version": "0.39.24",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -44,8 +44,5 @@
44
44
  "LearnMore_SC": "Learn more",
45
45
  "SelectZipFiles_ELS": "Select ZIP files...",
46
46
  "Browse_TC": "Browse",
47
- "is invalid": "is invalid",
48
- "AllItemPickerItemsSelected_SC": "All {{count}} {{itemName}} selected",
49
- "SelectAllItemPickerItems_TC": "Select all {{count}} {{itemName}}",
50
- "CountSelected_TC": "{{count}} selected"
47
+ "is invalid": "is invalid"
51
48
  }