@energycap/components 0.39.4-ECAP-23219-bills-tree-collapse.20240103-1423 → 0.39.4-ECAP-23220-bc-file-upload-dialog.20240104-1113

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.
@@ -35,6 +35,30 @@ export declare class FileUploadComponent extends FormControlBase implements OnIn
35
35
  * and set the file name and contents to the formModel, otherwise on failure it'll do nothing.
36
36
  */
37
37
  onFileSelected?: (file: File) => Promise<any>;
38
+ /**
39
+ * Optional callback supported for when the hosting page needs to process multiple files
40
+ * We simply map the FileList to an array of File objects and pass that array to the
41
+ * callback and let the hosting page handle the processing
42
+ */
43
+ onMultipleFilesSelected?: (files: File[]) => Promise<any>;
44
+ /**
45
+ * Optional display type that controls whether the file input textbox is displayed or
46
+ * simply a button the user clicks to launch the OS file storage dialog.
47
+ * Default: file
48
+ */
49
+ displayType?: 'file' | 'button';
50
+ /**
51
+ * When display type is set to button this property will control the button label
52
+ */
53
+ buttonLabel?: string;
54
+ /**
55
+ * When display type is set to button this property will control the button type
56
+ */
57
+ buttonType?: string;
58
+ /**
59
+ * Optional property to control whether the user can select multiple files
60
+ */
61
+ multiSelect?: boolean;
38
62
  fileInput?: ElementRef;
39
63
  /** Property bound to the file input to filter what file types are shown in the dialog */
40
64
  fileTypeAccept: string | undefined;
@@ -68,6 +92,11 @@ export declare class FileUploadComponent extends FormControlBase implements OnIn
68
92
  * @param onFileSelectedResult
69
93
  */
70
94
  private patchFileResult;
95
+ /** Maps the files to an array of File objects and sends them along
96
+ * to the derived onMultipleFileSelected method in the hosting component
97
+ */
98
+ private handleMultipleFiles;
99
+ private readFile;
71
100
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
72
- static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "placeholder": "placeholder"; "fileType": "fileType"; "fileOutput": "fileOutput"; "customExtensions": "customExtensions"; "onFileSelected": "onFileSelected"; }, {}, never, never, false, never>;
101
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "placeholder": "placeholder"; "fileType": "fileType"; "fileOutput": "fileOutput"; "customExtensions": "customExtensions"; "onFileSelected": "onFileSelected"; "onMultipleFilesSelected": "onMultipleFilesSelected"; "displayType": "displayType"; "buttonLabel": "buttonLabel"; "buttonType": "buttonType"; "multiSelect": "multiSelect"; }, {}, never, never, false, never>;
73
102
  }
@@ -17,8 +17,8 @@ export declare class HierarchyItem implements LinkItem {
17
17
  queryParams?: Params | null;
18
18
  queryParamsHandling?: QueryParamsHandling;
19
19
  icon?: string;
20
- /** Display item as a link, a heading, or with a divider line below it */
21
- display?: 'default' | 'heading' | 'divider';
20
+ /** Display item as a link or a heading */
21
+ display?: 'default' | 'heading';
22
22
  /** Set to hide toggle, even if item has children */
23
23
  hideToggle?: boolean;
24
24
  /** Flag to indicate whether the item has children or not, mostly drives
@@ -50,10 +50,6 @@ export declare class HierarchyItem implements LinkItem {
50
50
  * would be to expand all parent items above a node that is the current selection.
51
51
  */
52
52
  parentItem?: HierarchyItem;
53
- /**
54
- * Set to have no level indentation for the item. Useful for top level items in a tree that is not hierarchical
55
- */
56
- noIndent?: boolean | undefined;
57
53
  }
58
54
  export declare abstract class HierarchyBase implements OnChanges, OnDestroy {
59
55
  /** First item to start the hierarchy structure */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.39.4-ECAP-23219-bills-tree-collapse.20240103-1423",
3
+ "version": "0.39.4-ECAP-23220-bc-file-upload-dialog.20240104-1113",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -41,5 +41,7 @@
41
41
  "ClearSelection_TC": "Clear Selection",
42
42
  "ItemPickerNoItemsSelected_SC": "No {{itemName}} selected. Select from the available {{itemName}} list.",
43
43
  "Done_TC": "Done",
44
- "LearnMore_SC": "Learn more"
44
+ "LearnMore_SC": "Learn more",
45
+ "SelectZipFiles_ELS": "Select ZIP files...",
46
+ "Browse_TC": "Browse"
45
47
  }