cax-design-system 2.6.0 → 2.7.0

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 (51) hide show
  1. package/README.md +1 -1
  2. package/commentbox/commentbox.d.ts +111 -0
  3. package/commentbox/commentbox.module.d.ts +17 -0
  4. package/commentbox/index.d.ts +5 -0
  5. package/commentbox/public_api.d.ts +2 -0
  6. package/esm2022/card/card.mjs +2 -2
  7. package/esm2022/commentbox/cax-design-system-commentbox.mjs +5 -0
  8. package/esm2022/commentbox/commentbox.mjs +541 -0
  9. package/esm2022/commentbox/commentbox.module.mjs +27 -0
  10. package/esm2022/commentbox/public_api.mjs +3 -0
  11. package/esm2022/inputtext/inputtext.component.mjs +13 -4
  12. package/esm2022/inputtextarea/inputtextarea.component.mjs +8 -4
  13. package/esm2022/navigation/navigation.mjs +18 -5
  14. package/esm2022/table/components/column-filter/column-filter.mjs +52 -11
  15. package/esm2022/table/components/sort-icon/sort-icon.mjs +10 -7
  16. package/esm2022/table/table.mjs +123 -98
  17. package/esm2022/upload/cax-design-system-upload.mjs +5 -0
  18. package/esm2022/upload/public_api.mjs +3 -0
  19. package/esm2022/upload/upload.component.mjs +355 -0
  20. package/esm2022/upload/upload.component.module.mjs +21 -0
  21. package/fesm2022/cax-design-system-card.mjs +2 -2
  22. package/fesm2022/cax-design-system-card.mjs.map +1 -1
  23. package/fesm2022/cax-design-system-commentbox.mjs +572 -0
  24. package/fesm2022/cax-design-system-commentbox.mjs.map +1 -0
  25. package/fesm2022/cax-design-system-inputtext.mjs +12 -3
  26. package/fesm2022/cax-design-system-inputtext.mjs.map +1 -1
  27. package/fesm2022/cax-design-system-inputtextarea.mjs +7 -3
  28. package/fesm2022/cax-design-system-inputtextarea.mjs.map +1 -1
  29. package/fesm2022/cax-design-system-navigation.mjs +17 -4
  30. package/fesm2022/cax-design-system-navigation.mjs.map +1 -1
  31. package/fesm2022/cax-design-system-table.mjs +181 -113
  32. package/fesm2022/cax-design-system-table.mjs.map +1 -1
  33. package/fesm2022/cax-design-system-upload.mjs +380 -0
  34. package/fesm2022/cax-design-system-upload.mjs.map +1 -0
  35. package/inputtext/inputtext.component.d.ts +4 -1
  36. package/inputtextarea/inputtextarea.component.d.ts +2 -2
  37. package/navigation/navigation.d.ts +3 -1
  38. package/package.json +174 -162
  39. package/resources/cax.min.scss +1 -1
  40. package/resources/cax.scss +305 -254
  41. package/resources/components/card/card.scss +1 -1
  42. package/resources/components/commentbox/commentbox.scss +604 -0
  43. package/resources/components/table/table.scss +12 -4
  44. package/resources/components/upload/upload.component.scss +147 -0
  45. package/table/components/column-filter/column-filter.d.ts +6 -1
  46. package/table/components/sort-icon/sort-icon.d.ts +2 -1
  47. package/table/table.d.ts +6 -4
  48. package/upload/index.d.ts +5 -0
  49. package/upload/public_api.d.ts +2 -0
  50. package/upload/upload.component.d.ts +61 -0
  51. package/upload/upload.component.module.d.ts +11 -0
@@ -0,0 +1,380 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output, HostListener, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i2 from 'cax-design-system/progressspinner';
6
+ import { ProgressSpinnerModule } from 'cax-design-system/progressspinner';
7
+ import * as i3 from 'cax-design-system/button';
8
+ import { Button } from 'cax-design-system/button';
9
+ import { FormsModule } from '@angular/forms';
10
+
11
+ class UploadComponent {
12
+ invalid = false;
13
+ style;
14
+ maxFileSize = 30;
15
+ inputFiles = 'Input Files';
16
+ uploadString = 'uploading the file';
17
+ errorText = 'Please upload a file';
18
+ allowMultiple = true;
19
+ // Enhanced event emitters
20
+ fileSelected = new EventEmitter();
21
+ filesQueued = new EventEmitter(); // Emit when files are queued for upload
22
+ uploadStarted = new EventEmitter();
23
+ uploadCompleted = new EventEmitter();
24
+ uploadCanceled = new EventEmitter(); // When user cancels an upload
25
+ uploadError = new EventEmitter(); // When upload fails
26
+ fileRemoved = new EventEmitter(); // When a file is removed from the list
27
+ allFilesRemoved = new EventEmitter(); // When all files are cleared
28
+ uploadStatusChange = new EventEmitter(); // Status changes
29
+ isDragging = false;
30
+ uploadedFiles = [];
31
+ uploadStatus = 'idle';
32
+ isProcessingQueue = false;
33
+ // Track actual files to process (excludes canceled ones)
34
+ get activeFilesCount() {
35
+ return this.uploadedFiles.filter((file) => file.status !== 'canceled').length;
36
+ }
37
+ onDragOver(event) {
38
+ event.preventDefault();
39
+ event.stopPropagation();
40
+ this.isDragging = true;
41
+ }
42
+ onDragLeave(event) {
43
+ event.preventDefault();
44
+ event.stopPropagation();
45
+ this.isDragging = false;
46
+ }
47
+ onDrop(event) {
48
+ event.preventDefault();
49
+ event.stopPropagation();
50
+ this.isDragging = false;
51
+ const files = event.dataTransfer?.files;
52
+ if (!files || files.length === 0)
53
+ return;
54
+ const fileArray = Array.from(files);
55
+ const validFiles = fileArray.filter((file) => {
56
+ if (file.size > this.maxFileSize * 1024 * 1024) {
57
+ this.emitError(file, `File size should be less than ${this.maxFileSize}MB`);
58
+ return false;
59
+ }
60
+ return true;
61
+ });
62
+ // Queue all files for upload
63
+ validFiles.forEach((file) => this.queueFile(file));
64
+ // Emit the queued files event
65
+ if (validFiles.length > 0) {
66
+ this.filesQueued.emit(validFiles);
67
+ }
68
+ // Start processing the queue if not already processing
69
+ if (!this.isProcessingQueue) {
70
+ this.processQueue();
71
+ }
72
+ }
73
+ handleFileInput(event) {
74
+ const files = event.target.files;
75
+ if (!files)
76
+ return;
77
+ const fileArray = Array.from(files);
78
+ const validFiles = fileArray.filter((file) => {
79
+ if (file.size > this.maxFileSize * 1024 * 1024) {
80
+ this.emitError(file, `File size should be less than ${this.maxFileSize}MB`);
81
+ return false;
82
+ }
83
+ return true;
84
+ });
85
+ // Queue all files for upload
86
+ validFiles.forEach((file) => this.queueFile(file));
87
+ // Emit the queued files event
88
+ if (validFiles.length > 0) {
89
+ this.filesQueued.emit(validFiles);
90
+ }
91
+ // Start processing the queue if not already processing
92
+ if (!this.isProcessingQueue) {
93
+ this.processQueue();
94
+ }
95
+ }
96
+ // Queue a file for upload
97
+ queueFile(file) {
98
+ const uploadEntry = {
99
+ file,
100
+ status: 'queued',
101
+ progress: 0
102
+ };
103
+ this.uploadedFiles.push(uploadEntry);
104
+ if (this.uploadStatus === 'idle') {
105
+ this.updateUploadStatus('uploading');
106
+ }
107
+ }
108
+ // Update upload status and emit event
109
+ updateUploadStatus(status) {
110
+ if (this.uploadStatus !== status) {
111
+ this.uploadStatus = status;
112
+ this.uploadStatusChange.emit(status);
113
+ }
114
+ }
115
+ // Process the queue of files sequentially
116
+ async processQueue() {
117
+ if (this.isProcessingQueue)
118
+ return;
119
+ this.isProcessingQueue = true;
120
+ // Find the next file to upload
121
+ let nextFileIndex = this.uploadedFiles.findIndex((file) => file.status === 'queued');
122
+ while (nextFileIndex !== -1) {
123
+ const currentFile = this.uploadedFiles[nextFileIndex];
124
+ await this.processFile(currentFile, nextFileIndex);
125
+ // Find the next file after processing
126
+ nextFileIndex = this.uploadedFiles.findIndex((file) => file.status === 'queued');
127
+ }
128
+ this.isProcessingQueue = false;
129
+ // Check if all uploads are complete and there are no more files to process
130
+ if (this.uploadedFiles.length > 0 && this.uploadedFiles.some((file) => file.status === 'complete') && !this.hasQueuedOrUploading) {
131
+ this.updateUploadStatus('complete');
132
+ }
133
+ }
134
+ // Trigger file input click programmatically
135
+ openFileSelector() {
136
+ const fileInput = document.getElementById('fileInput');
137
+ if (fileInput) {
138
+ fileInput.click();
139
+ }
140
+ }
141
+ // Emit error event
142
+ emitError(file, message) {
143
+ this.uploadError.emit({ file, error: message });
144
+ }
145
+ async processFile(fileEntry, index) {
146
+ // Update status to uploading
147
+ fileEntry.status = 'uploading';
148
+ fileEntry.progress = 0;
149
+ this.fileSelected.emit(fileEntry.file);
150
+ this.uploadStarted.emit(fileEntry.file);
151
+ try {
152
+ // Simulate upload with progress updates
153
+ for (let progress = 0; progress <= 100; progress += 10) {
154
+ // Check if upload was canceled during progress
155
+ // Need to check current status since it might have changed
156
+ if (fileEntry.status !== 'uploading') {
157
+ // Either canceled or errored
158
+ break;
159
+ }
160
+ fileEntry.progress = progress;
161
+ //this.uploadProgress.emit({ file: fileEntry.file, progress });
162
+ // Simulate network delay
163
+ await new Promise((resolve) => setTimeout(resolve, 200));
164
+ }
165
+ // Only set to complete if still uploading (not canceled or errored)
166
+ if (fileEntry.status === 'uploading') {
167
+ fileEntry.status = 'complete';
168
+ fileEntry.progress = 100;
169
+ this.uploadCompleted.emit(fileEntry.file);
170
+ }
171
+ }
172
+ catch (error) {
173
+ // Handle errors
174
+ fileEntry.status = 'error';
175
+ const errorMessage = error instanceof Error ? error.message : 'Unknown upload error';
176
+ fileEntry.errorMessage = errorMessage;
177
+ this.emitError(fileEntry.file, errorMessage);
178
+ }
179
+ }
180
+ cancelUpload(index) {
181
+ // Cancel the specified file and all files below it
182
+ for (let i = index; i < this.uploadedFiles.length; i++) {
183
+ const fileToCancel = this.uploadedFiles[i];
184
+ if (fileToCancel) {
185
+ const previousStatus = fileToCancel.status;
186
+ if (previousStatus === 'uploading' || previousStatus === 'queued') {
187
+ fileToCancel.status = 'canceled';
188
+ // Only emit if it was actively uploading (not just queued)
189
+ if (previousStatus === 'uploading') {
190
+ this.uploadCanceled.emit(fileToCancel.file);
191
+ }
192
+ }
193
+ }
194
+ }
195
+ // If the file at the specified index was uploading, process the next file in queue
196
+ // (which would now be a file before the index that might be queued)
197
+ if (this.uploadedFiles[index]?.status === 'canceled') {
198
+ setTimeout(() => this.processQueue(), 0);
199
+ }
200
+ }
201
+ // Cancel the current upload
202
+ cancelCurrentUpload() {
203
+ // Find the file that's currently uploading
204
+ const currentUploadIndex = this.uploadedFiles.findIndex((file) => file.status === 'uploading');
205
+ if (currentUploadIndex >= 0) {
206
+ this.cancelUpload(currentUploadIndex);
207
+ }
208
+ }
209
+ // Cancel all uploads
210
+ cancelAllUploads() {
211
+ let hadActiveUploads = false;
212
+ this.uploadedFiles.forEach((file) => {
213
+ if (file.status === 'uploading' || file.status === 'queued') {
214
+ hadActiveUploads = true;
215
+ const previousStatus = file.status;
216
+ file.status = 'canceled';
217
+ if (previousStatus === 'uploading') {
218
+ this.uploadCanceled.emit(file.file);
219
+ }
220
+ }
221
+ });
222
+ if (hadActiveUploads && !this.hasQueuedOrUploading) {
223
+ this.updateUploadStatus('idle');
224
+ }
225
+ }
226
+ // Remove a file from the list
227
+ removeFile(index) {
228
+ const fileToRemove = this.uploadedFiles[index];
229
+ // Cancel first if it's active
230
+ if (fileToRemove.status === 'uploading' || fileToRemove.status === 'queued') {
231
+ this.cancelUpload(index);
232
+ }
233
+ // Emit removal event
234
+ this.fileRemoved.emit(fileToRemove.file);
235
+ // Remove from array
236
+ this.uploadedFiles.splice(index, 1);
237
+ // Reset status if no files left
238
+ if (this.uploadedFiles.length === 0) {
239
+ this.updateUploadStatus('idle');
240
+ }
241
+ else if (!this.hasQueuedOrUploading && this.uploadStatus !== 'complete') {
242
+ // If there are no more queued or uploading files but we have completed files
243
+ this.updateUploadStatus('complete');
244
+ }
245
+ }
246
+ // Remove all files
247
+ removeAllFiles() {
248
+ // Cancel any active uploads
249
+ this.cancelAllUploads();
250
+ // Only emit if there were files to remove
251
+ if (this.uploadedFiles.length > 0) {
252
+ this.allFilesRemoved.emit();
253
+ }
254
+ this.uploadedFiles = [];
255
+ this.updateUploadStatus('idle');
256
+ }
257
+ // Retry a failed upload
258
+ retryUpload(index) {
259
+ const fileToRetry = this.uploadedFiles[index];
260
+ if (fileToRetry) {
261
+ const currentStatus = fileToRetry.status;
262
+ if (currentStatus === 'error' || currentStatus === 'canceled') {
263
+ fileToRetry.status = 'queued';
264
+ fileToRetry.errorMessage = undefined;
265
+ // Start processing if not already doing so
266
+ if (!this.isProcessingQueue) {
267
+ this.processQueue();
268
+ }
269
+ }
270
+ }
271
+ }
272
+ get hasUploading() {
273
+ return this.uploadedFiles.some((file) => file.status === 'uploading');
274
+ }
275
+ get hasQueuedOrUploading() {
276
+ return this.uploadedFiles.some((file) => file.status === 'uploading' || file.status === 'queued');
277
+ }
278
+ get hasErrors() {
279
+ return this.uploadedFiles.some((file) => file.status === 'error');
280
+ }
281
+ get allUploadsComplete() {
282
+ return this.uploadedFiles.length > 0 && this.uploadedFiles.some((file) => file.status === 'complete') && !this.hasQueuedOrUploading;
283
+ }
284
+ get uploadingProgressText() {
285
+ // Count active files (excluding canceled ones)
286
+ const totalActiveFiles = this.activeFilesCount;
287
+ const completedCount = this.uploadedFiles.filter((file) => file.status === 'complete').length;
288
+ const uploadingFile = this.uploadedFiles.find((file) => file.status === 'uploading');
289
+ if (uploadingFile) {
290
+ // We're currently uploading the (completedCount + 1)th active file
291
+ return `Uploading ${completedCount}/${totalActiveFiles} file${totalActiveFiles > 1 ? 's' : ''}...`;
292
+ }
293
+ if (this.uploadedFiles.some((file) => file.status === 'queued')) {
294
+ return `Uploading ${completedCount + 1}/${totalActiveFiles} file${totalActiveFiles > 1 ? 's' : ''}...`;
295
+ }
296
+ return `Uploading ${completedCount}/${totalActiveFiles} file${totalActiveFiles > 1 ? 's' : ''}...`;
297
+ }
298
+ // Calculate overall progress percentage across all files
299
+ get overallProgress() {
300
+ if (this.uploadedFiles.length === 0)
301
+ return 0;
302
+ const totalProgress = this.uploadedFiles.reduce((sum, file) => {
303
+ if (file.status === 'complete')
304
+ return sum + 100;
305
+ if (file.status === 'canceled' || file.status === 'error')
306
+ return sum;
307
+ return sum + (file.progress || 0);
308
+ }, 0);
309
+ const activeFilesCount = this.uploadedFiles.filter((file) => file.status !== 'canceled' && file.status !== 'error').length;
310
+ return activeFilesCount > 0 ? Math.round((totalProgress / (activeFilesCount * 100)) * 100) : 0;
311
+ }
312
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
313
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: UploadComponent, selector: "cax-upload", inputs: { invalid: "invalid", style: "style", maxFileSize: "maxFileSize", inputFiles: "inputFiles", uploadString: "uploadString", errorText: "errorText", allowMultiple: "allowMultiple" }, outputs: { fileSelected: "fileSelected", filesQueued: "filesQueued", uploadStarted: "uploadStarted", uploadCompleted: "uploadCompleted", uploadCanceled: "uploadCanceled", uploadError: "uploadError", fileRemoved: "fileRemoved", allFilesRemoved: "allFilesRemoved", uploadStatusChange: "uploadStatusChange" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0, template: "<p class=\"cax-files\">{{inputFiles}}</p>\r\n<div class=\"cax-upload-menu\" [ngStyle]=\"style\"\r\n [class.dragging]=\"isDragging\" \r\n (click)=\"openFileSelector()\">\r\n <input\r\n id=\"fileInput\"\r\n type=\"file\"\r\n (change)=\"handleFileInput($event)\"\r\n hidden\r\n multiple\r\n >\r\n\r\n <!-- Default Upload State -->\r\n <ng-container *ngIf=\"uploadStatus === 'idle'\" >\r\n <div class=\"cax-upload-options\" >\r\n <p class=\"hint-text\">\r\n <span class=\"drop-files\">Drop files here</span> or browse files from your device\r\n </p>\r\n <p class=\"max-size\">Max. File Size: {{ maxFileSize }}MB</p>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <!-- Uploading State -->\r\n<div *ngIf=\"uploadStatus === 'uploading'\" class=\"cax-upload-status uploading\" >\r\n <div class=\"status-container\">\r\n <cax-progressSpinner\r\n [strokeColor]=\"'primary'\"\r\n [size]=\"'lg'\"\r\n [animationDuration]=\"'2s'\"\r\n ></cax-progressSpinner>\r\n <p >{{ uploadingProgressText }}</p>\r\n <cax-button\r\n [label]=\"'Cancel'\"\r\n [rounded]=\"false\"\r\n [severity]=\"'danger'\"\r\n [size]=\"'large'\"\r\n [outlined]=\"'false'\"\r\n [link]=\"true\"\r\n (click)=\"cancelCurrentUpload(); $event.stopPropagation()\"\r\n />\r\n </div>\r\n</div>\r\n\r\n <!-- Complete State -->\r\n <div *ngIf=\"uploadStatus === 'complete'\" class=\"cax-upload-status complete\">\r\n <div class=\"status-container\">\r\n <div class=\"success-icon\"><i class=\"cax cax-check\"></i></div>\r\n <p>{{uploadString}}</p>\r\n <cax-button\r\n [label]=\"'Remove'\"\r\n [rounded]=\"false\"\r\n [severity]=\"'danger'\"\r\n [size]=\"'large'\"\r\n [outlined]=\"'false'\"\r\n [link]=\"true\"\r\n (click)=\"removeAllFiles(); $event.stopPropagation()\"\r\n />\r\n </div>\r\n </div>\r\n <div *ngIf=\"invalid\" id=\"helper-text\" class=\"cax-error-upload\"></div>\r\n</div>\r\n<div *ngIf=\"invalid\" id=\"helper-text\" class=\"cax-error-upload\">\r\n {{ errorText }}\r\n</div>\r\n\r\n<!-- stacked file -->\r\n<div *ngIf=\"uploadedFiles.length > 0\" class=\"cax-file-preview-wrapper\" [ngStyle]=\"style\">\r\n <div\r\n *ngFor=\"let item of uploadedFiles; let i = index\"\r\n class=\"cax-file-preview\"\r\n [ngClass]=\"{\r\n 'queued': item.status === 'queued',\r\n 'uploading': item.status === 'uploading',\r\n 'complete': item.status === 'complete',\r\n 'canceled': item.status === 'canceled'\r\n }\"\r\n >\r\n <div class=\"file-info\">\r\n <p class=\"file-name\">{{ item.file.name }}</p>\r\n </div> \r\n\r\n <!-- Show spinner for queued or uploading files -->\r\n <div *ngIf=\"item.status === 'queued' || item.status === 'uploading'\" class=\"spinner\">\r\n <cax-progressSpinner\r\n [strokeColor]=\"'primary'\"\r\n [size]=\"'sm'\"\r\n [animationDuration]=\"'2s'\">\r\n </cax-progressSpinner>\r\n </div>\r\n \r\n <!-- Show remove button only for complete or canceled files -->\r\n <button\r\n *ngIf=\"item.status === 'complete' || item.status === 'canceled'\"\r\n class=\"remove-button\"\r\n (click)=\"removeFile(i); $event.stopPropagation()\">\r\n <i class=\"cax cax-close\"></i> \r\n </button>\r\n </div>\r\n</div>", styles: ["@layer cax{.cax-files{font-size:14px;font-weight:500;margin-bottom:10px}.cax-upload-menu{width:569px;border-radius:12px;padding:24px 56px}.status-container{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:16px;height:150px}.status-container p{margin:0;font-size:14px;font-weight:500}.status-container .success-icon{width:50px;height:50px;border-radius:50%;display:flex;align-items:center;justify-content:center}.status-container .success-icon i{font-size:1.5rem;font-weight:800}.cax-upload-options{text-align:center}.cax-upload-options .hint-text{font-size:14px;font-weight:500}.cax-upload-options .drop-files{font-weight:500;font-size:14px}.cax-upload-options .max-size{font-size:12px;margin-bottom:20px;font-weight:400}.cax-error-upload{font-size:14px;font-weight:400;padding-top:8px}.cax-options-container{display:flex;gap:24px;justify-content:center}.cax-upload-option{display:flex;flex-direction:column;align-items:center;cursor:pointer}.cax-upload-option .icon-container{width:48px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:background-color .2s}.cax-upload-option span{font-size:14px;font-weight:600;padding-top:10px}.cax-file-preview-wrapper{display:flex;flex-direction:column;gap:10px;margin-top:1rem;width:569px}.cax-file-preview{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-radius:8px}.cax-file-preview .file-info{display:flex;align-items:center;gap:10px}.cax-file-preview .file-info .file-icon img{width:32px;height:32px}.cax-file-preview .file-info .file-name{font-weight:500;font-size:14px}.cax-file-preview .spinner{margin-left:auto;font-size:20px!important}.cax-file-preview .remove-button{background:none;border:none;margin-left:auto;cursor:pointer}.cax-file-preview .remove-button i{font-size:20px}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.ProgressSpinner, selector: "cax-progressSpinner", inputs: ["styleClass", "strokeColor", "backgroundStrokeColor", "size", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i3.Button, selector: "cax-button", inputs: ["type", "iconPos", "icon", "badge", "rightIcon", "leftIcon", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }] });
314
+ }
315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UploadComponent, decorators: [{
316
+ type: Component,
317
+ args: [{ selector: 'cax-upload', template: "<p class=\"cax-files\">{{inputFiles}}</p>\r\n<div class=\"cax-upload-menu\" [ngStyle]=\"style\"\r\n [class.dragging]=\"isDragging\" \r\n (click)=\"openFileSelector()\">\r\n <input\r\n id=\"fileInput\"\r\n type=\"file\"\r\n (change)=\"handleFileInput($event)\"\r\n hidden\r\n multiple\r\n >\r\n\r\n <!-- Default Upload State -->\r\n <ng-container *ngIf=\"uploadStatus === 'idle'\" >\r\n <div class=\"cax-upload-options\" >\r\n <p class=\"hint-text\">\r\n <span class=\"drop-files\">Drop files here</span> or browse files from your device\r\n </p>\r\n <p class=\"max-size\">Max. File Size: {{ maxFileSize }}MB</p>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <!-- Uploading State -->\r\n<div *ngIf=\"uploadStatus === 'uploading'\" class=\"cax-upload-status uploading\" >\r\n <div class=\"status-container\">\r\n <cax-progressSpinner\r\n [strokeColor]=\"'primary'\"\r\n [size]=\"'lg'\"\r\n [animationDuration]=\"'2s'\"\r\n ></cax-progressSpinner>\r\n <p >{{ uploadingProgressText }}</p>\r\n <cax-button\r\n [label]=\"'Cancel'\"\r\n [rounded]=\"false\"\r\n [severity]=\"'danger'\"\r\n [size]=\"'large'\"\r\n [outlined]=\"'false'\"\r\n [link]=\"true\"\r\n (click)=\"cancelCurrentUpload(); $event.stopPropagation()\"\r\n />\r\n </div>\r\n</div>\r\n\r\n <!-- Complete State -->\r\n <div *ngIf=\"uploadStatus === 'complete'\" class=\"cax-upload-status complete\">\r\n <div class=\"status-container\">\r\n <div class=\"success-icon\"><i class=\"cax cax-check\"></i></div>\r\n <p>{{uploadString}}</p>\r\n <cax-button\r\n [label]=\"'Remove'\"\r\n [rounded]=\"false\"\r\n [severity]=\"'danger'\"\r\n [size]=\"'large'\"\r\n [outlined]=\"'false'\"\r\n [link]=\"true\"\r\n (click)=\"removeAllFiles(); $event.stopPropagation()\"\r\n />\r\n </div>\r\n </div>\r\n <div *ngIf=\"invalid\" id=\"helper-text\" class=\"cax-error-upload\"></div>\r\n</div>\r\n<div *ngIf=\"invalid\" id=\"helper-text\" class=\"cax-error-upload\">\r\n {{ errorText }}\r\n</div>\r\n\r\n<!-- stacked file -->\r\n<div *ngIf=\"uploadedFiles.length > 0\" class=\"cax-file-preview-wrapper\" [ngStyle]=\"style\">\r\n <div\r\n *ngFor=\"let item of uploadedFiles; let i = index\"\r\n class=\"cax-file-preview\"\r\n [ngClass]=\"{\r\n 'queued': item.status === 'queued',\r\n 'uploading': item.status === 'uploading',\r\n 'complete': item.status === 'complete',\r\n 'canceled': item.status === 'canceled'\r\n }\"\r\n >\r\n <div class=\"file-info\">\r\n <p class=\"file-name\">{{ item.file.name }}</p>\r\n </div> \r\n\r\n <!-- Show spinner for queued or uploading files -->\r\n <div *ngIf=\"item.status === 'queued' || item.status === 'uploading'\" class=\"spinner\">\r\n <cax-progressSpinner\r\n [strokeColor]=\"'primary'\"\r\n [size]=\"'sm'\"\r\n [animationDuration]=\"'2s'\">\r\n </cax-progressSpinner>\r\n </div>\r\n \r\n <!-- Show remove button only for complete or canceled files -->\r\n <button\r\n *ngIf=\"item.status === 'complete' || item.status === 'canceled'\"\r\n class=\"remove-button\"\r\n (click)=\"removeFile(i); $event.stopPropagation()\">\r\n <i class=\"cax cax-close\"></i> \r\n </button>\r\n </div>\r\n</div>", styles: ["@layer cax{.cax-files{font-size:14px;font-weight:500;margin-bottom:10px}.cax-upload-menu{width:569px;border-radius:12px;padding:24px 56px}.status-container{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:16px;height:150px}.status-container p{margin:0;font-size:14px;font-weight:500}.status-container .success-icon{width:50px;height:50px;border-radius:50%;display:flex;align-items:center;justify-content:center}.status-container .success-icon i{font-size:1.5rem;font-weight:800}.cax-upload-options{text-align:center}.cax-upload-options .hint-text{font-size:14px;font-weight:500}.cax-upload-options .drop-files{font-weight:500;font-size:14px}.cax-upload-options .max-size{font-size:12px;margin-bottom:20px;font-weight:400}.cax-error-upload{font-size:14px;font-weight:400;padding-top:8px}.cax-options-container{display:flex;gap:24px;justify-content:center}.cax-upload-option{display:flex;flex-direction:column;align-items:center;cursor:pointer}.cax-upload-option .icon-container{width:48px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:background-color .2s}.cax-upload-option span{font-size:14px;font-weight:600;padding-top:10px}.cax-file-preview-wrapper{display:flex;flex-direction:column;gap:10px;margin-top:1rem;width:569px}.cax-file-preview{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-radius:8px}.cax-file-preview .file-info{display:flex;align-items:center;gap:10px}.cax-file-preview .file-info .file-icon img{width:32px;height:32px}.cax-file-preview .file-info .file-name{font-weight:500;font-size:14px}.cax-file-preview .spinner{margin-left:auto;font-size:20px!important}.cax-file-preview .remove-button{background:none;border:none;margin-left:auto;cursor:pointer}.cax-file-preview .remove-button i{font-size:20px}}\n"] }]
318
+ }], propDecorators: { invalid: [{
319
+ type: Input
320
+ }], style: [{
321
+ type: Input
322
+ }], maxFileSize: [{
323
+ type: Input
324
+ }], inputFiles: [{
325
+ type: Input
326
+ }], uploadString: [{
327
+ type: Input
328
+ }], errorText: [{
329
+ type: Input
330
+ }], allowMultiple: [{
331
+ type: Input
332
+ }], fileSelected: [{
333
+ type: Output
334
+ }], filesQueued: [{
335
+ type: Output
336
+ }], uploadStarted: [{
337
+ type: Output
338
+ }], uploadCompleted: [{
339
+ type: Output
340
+ }], uploadCanceled: [{
341
+ type: Output
342
+ }], uploadError: [{
343
+ type: Output
344
+ }], fileRemoved: [{
345
+ type: Output
346
+ }], allFilesRemoved: [{
347
+ type: Output
348
+ }], uploadStatusChange: [{
349
+ type: Output
350
+ }], onDragOver: [{
351
+ type: HostListener,
352
+ args: ['dragover', ['$event']]
353
+ }], onDragLeave: [{
354
+ type: HostListener,
355
+ args: ['dragleave', ['$event']]
356
+ }], onDrop: [{
357
+ type: HostListener,
358
+ args: ['drop', ['$event']]
359
+ }] } });
360
+
361
+ class UploadModule {
362
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
363
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: UploadModule, declarations: [UploadComponent], imports: [CommonModule, FormsModule, ProgressSpinnerModule, Button], exports: [UploadComponent] });
364
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UploadModule, imports: [CommonModule, FormsModule, ProgressSpinnerModule, Button] });
365
+ }
366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UploadModule, decorators: [{
367
+ type: NgModule,
368
+ args: [{
369
+ declarations: [UploadComponent],
370
+ imports: [CommonModule, FormsModule, ProgressSpinnerModule, Button],
371
+ exports: [UploadComponent]
372
+ }]
373
+ }] });
374
+
375
+ /**
376
+ * Generated bundle index. Do not edit.
377
+ */
378
+
379
+ export { UploadComponent, UploadModule };
380
+ //# sourceMappingURL=cax-design-system-upload.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cax-design-system-upload.mjs","sources":["../../src/app/components/upload/upload.component.ts","../../src/app/components/upload/upload.component.html","../../src/app/components/upload/upload.component.module.ts","../../src/app/components/upload/cax-design-system-upload.ts"],"sourcesContent":["import { Component, EventEmitter, HostListener, Input, Output } from '@angular/core';\n\nexport type UploadFileStatus = 'queued' | 'uploading' | 'complete' | 'canceled' | 'error';\n\nexport type UploadFile = {\n file: File;\n status: UploadFileStatus;\n progress?: number;\n errorMessage?: string;\n};\n\n@Component({\n selector: 'cax-upload',\n templateUrl: './upload.component.html',\n styleUrls: ['./upload.component.scss']\n})\nexport class UploadComponent {\n @Input() invalid: boolean = false;\n @Input() style: { [klass: string]: any } | null | undefined;\n @Input() maxFileSize: number = 30;\n @Input() inputFiles: string = 'Input Files';\n @Input() uploadString: string = 'uploading the file';\n @Input() errorText: string = 'Please upload a file';\n @Input() allowMultiple: boolean = true;\n\n // Enhanced event emitters\n @Output() fileSelected = new EventEmitter<File>();\n @Output() filesQueued = new EventEmitter<File[]>(); // Emit when files are queued for upload\n @Output() uploadStarted = new EventEmitter<File>();\n @Output() uploadCompleted = new EventEmitter<File>();\n @Output() uploadCanceled = new EventEmitter<File>(); // When user cancels an upload\n @Output() uploadError = new EventEmitter<{ file: File; error: string }>(); // When upload fails\n @Output() fileRemoved = new EventEmitter<File>(); // When a file is removed from the list\n @Output() allFilesRemoved = new EventEmitter<void>(); // When all files are cleared\n @Output() uploadStatusChange = new EventEmitter<'idle' | 'uploading' | 'complete'>(); // Status changes\n\n isDragging: boolean = false;\n uploadedFiles: UploadFile[] = [];\n uploadStatus: 'idle' | 'uploading' | 'complete' = 'idle';\n isProcessingQueue: boolean = false;\n\n // Track actual files to process (excludes canceled ones)\n private get activeFilesCount(): number {\n return this.uploadedFiles.filter((file) => file.status !== 'canceled').length;\n }\n\n @HostListener('dragover', ['$event'])\n onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDragging = true;\n }\n\n @HostListener('dragleave', ['$event'])\n onDragLeave(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDragging = false;\n }\n\n @HostListener('drop', ['$event'])\n onDrop(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDragging = false;\n\n const files = event.dataTransfer?.files;\n if (!files || files.length === 0) return;\n\n const fileArray = Array.from(files);\n const validFiles = fileArray.filter((file) => {\n if (file.size > this.maxFileSize * 1024 * 1024) {\n this.emitError(file, `File size should be less than ${this.maxFileSize}MB`);\n return false;\n }\n return true;\n });\n\n // Queue all files for upload\n validFiles.forEach((file) => this.queueFile(file));\n\n // Emit the queued files event\n if (validFiles.length > 0) {\n this.filesQueued.emit(validFiles);\n }\n\n // Start processing the queue if not already processing\n if (!this.isProcessingQueue) {\n this.processQueue();\n }\n }\n\n handleFileInput(event: any): void {\n const files: FileList = event.target.files;\n if (!files) return;\n\n const fileArray = Array.from(files);\n const validFiles = fileArray.filter((file) => {\n if (file.size > this.maxFileSize * 1024 * 1024) {\n this.emitError(file, `File size should be less than ${this.maxFileSize}MB`);\n return false;\n }\n return true;\n });\n\n // Queue all files for upload\n validFiles.forEach((file) => this.queueFile(file));\n\n // Emit the queued files event\n if (validFiles.length > 0) {\n this.filesQueued.emit(validFiles);\n }\n\n // Start processing the queue if not already processing\n if (!this.isProcessingQueue) {\n this.processQueue();\n }\n }\n\n // Queue a file for upload\n private queueFile(file: File): void {\n const uploadEntry: UploadFile = {\n file,\n status: 'queued',\n\n progress: 0\n };\n\n this.uploadedFiles.push(uploadEntry);\n\n if (this.uploadStatus === 'idle') {\n this.updateUploadStatus('uploading');\n }\n }\n\n // Update upload status and emit event\n private updateUploadStatus(status: 'idle' | 'uploading' | 'complete'): void {\n if (this.uploadStatus !== status) {\n this.uploadStatus = status;\n this.uploadStatusChange.emit(status);\n }\n }\n\n // Process the queue of files sequentially\n private async processQueue(): Promise<void> {\n if (this.isProcessingQueue) return;\n\n this.isProcessingQueue = true;\n\n // Find the next file to upload\n let nextFileIndex = this.uploadedFiles.findIndex((file) => file.status === 'queued');\n\n while (nextFileIndex !== -1) {\n const currentFile = this.uploadedFiles[nextFileIndex];\n await this.processFile(currentFile, nextFileIndex);\n\n // Find the next file after processing\n nextFileIndex = this.uploadedFiles.findIndex((file) => file.status === 'queued');\n }\n\n this.isProcessingQueue = false;\n\n // Check if all uploads are complete and there are no more files to process\n if (this.uploadedFiles.length > 0 && this.uploadedFiles.some((file) => file.status === 'complete') && !this.hasQueuedOrUploading) {\n this.updateUploadStatus('complete');\n }\n }\n\n // Trigger file input click programmatically\n openFileSelector(): void {\n const fileInput = document.getElementById('fileInput') as HTMLInputElement;\n if (fileInput) {\n fileInput.click();\n }\n }\n\n // Emit error event\n private emitError(file: File, message: string): void {\n this.uploadError.emit({ file, error: message });\n }\n private async processFile(fileEntry: UploadFile, index: number): Promise<void> {\n // Update status to uploading\n fileEntry.status = 'uploading';\n fileEntry.progress = 0;\n\n this.fileSelected.emit(fileEntry.file);\n this.uploadStarted.emit(fileEntry.file);\n\n try {\n // Simulate upload with progress updates\n for (let progress = 0; progress <= 100; progress += 10) {\n // Check if upload was canceled during progress\n // Need to check current status since it might have changed\n if (fileEntry.status !== 'uploading') {\n // Either canceled or errored\n break;\n }\n\n fileEntry.progress = progress;\n //this.uploadProgress.emit({ file: fileEntry.file, progress });\n\n // Simulate network delay\n await new Promise((resolve) => setTimeout(resolve, 200));\n }\n\n // Only set to complete if still uploading (not canceled or errored)\n if (fileEntry.status === 'uploading') {\n fileEntry.status = 'complete';\n fileEntry.progress = 100;\n this.uploadCompleted.emit(fileEntry.file);\n }\n } catch (error) {\n // Handle errors\n fileEntry.status = 'error';\n const errorMessage = error instanceof Error ? error.message : 'Unknown upload error';\n fileEntry.errorMessage = errorMessage;\n this.emitError(fileEntry.file, errorMessage);\n }\n }\n\n cancelUpload(index: number): void {\n // Cancel the specified file and all files below it\n for (let i = index; i < this.uploadedFiles.length; i++) {\n const fileToCancel = this.uploadedFiles[i];\n if (fileToCancel) {\n const previousStatus = fileToCancel.status;\n if (previousStatus === 'uploading' || previousStatus === 'queued') {\n fileToCancel.status = 'canceled';\n // Only emit if it was actively uploading (not just queued)\n if (previousStatus === 'uploading') {\n this.uploadCanceled.emit(fileToCancel.file);\n }\n }\n }\n }\n // If the file at the specified index was uploading, process the next file in queue\n // (which would now be a file before the index that might be queued)\n if (this.uploadedFiles[index]?.status === 'canceled') {\n setTimeout(() => this.processQueue(), 0);\n }\n }\n\n // Cancel the current upload\n cancelCurrentUpload(): void {\n // Find the file that's currently uploading\n const currentUploadIndex = this.uploadedFiles.findIndex((file) => file.status === 'uploading');\n if (currentUploadIndex >= 0) {\n this.cancelUpload(currentUploadIndex);\n }\n }\n\n // Cancel all uploads\n cancelAllUploads(): void {\n let hadActiveUploads = false;\n\n this.uploadedFiles.forEach((file) => {\n if (file.status === 'uploading' || file.status === 'queued') {\n hadActiveUploads = true;\n const previousStatus = file.status;\n file.status = 'canceled';\n\n if (previousStatus === 'uploading') {\n this.uploadCanceled.emit(file.file);\n }\n }\n });\n\n if (hadActiveUploads && !this.hasQueuedOrUploading) {\n this.updateUploadStatus('idle');\n }\n }\n\n // Remove a file from the list\n removeFile(index: number): void {\n const fileToRemove = this.uploadedFiles[index];\n\n // Cancel first if it's active\n if (fileToRemove.status === 'uploading' || fileToRemove.status === 'queued') {\n this.cancelUpload(index);\n }\n\n // Emit removal event\n this.fileRemoved.emit(fileToRemove.file);\n\n // Remove from array\n this.uploadedFiles.splice(index, 1);\n\n // Reset status if no files left\n if (this.uploadedFiles.length === 0) {\n this.updateUploadStatus('idle');\n } else if (!this.hasQueuedOrUploading && this.uploadStatus !== 'complete') {\n // If there are no more queued or uploading files but we have completed files\n this.updateUploadStatus('complete');\n }\n }\n\n // Remove all files\n removeAllFiles(): void {\n // Cancel any active uploads\n this.cancelAllUploads();\n\n // Only emit if there were files to remove\n if (this.uploadedFiles.length > 0) {\n this.allFilesRemoved.emit();\n }\n\n this.uploadedFiles = [];\n this.updateUploadStatus('idle');\n }\n\n // Retry a failed upload\n retryUpload(index: number): void {\n const fileToRetry = this.uploadedFiles[index];\n if (fileToRetry) {\n const currentStatus = fileToRetry.status;\n if (currentStatus === 'error' || currentStatus === 'canceled') {\n fileToRetry.status = 'queued';\n fileToRetry.errorMessage = undefined;\n\n // Start processing if not already doing so\n if (!this.isProcessingQueue) {\n this.processQueue();\n }\n }\n }\n }\n\n get hasUploading(): boolean {\n return this.uploadedFiles.some((file) => file.status === 'uploading');\n }\n\n get hasQueuedOrUploading(): boolean {\n return this.uploadedFiles.some((file) => file.status === 'uploading' || file.status === 'queued');\n }\n\n get hasErrors(): boolean {\n return this.uploadedFiles.some((file) => file.status === 'error');\n }\n\n get allUploadsComplete(): boolean {\n return this.uploadedFiles.length > 0 && this.uploadedFiles.some((file) => file.status === 'complete') && !this.hasQueuedOrUploading;\n }\n\n get uploadingProgressText(): string {\n // Count active files (excluding canceled ones)\n const totalActiveFiles = this.activeFilesCount;\n const completedCount = this.uploadedFiles.filter((file) => file.status === 'complete').length;\n const uploadingFile = this.uploadedFiles.find((file) => file.status === 'uploading');\n if (uploadingFile) {\n // We're currently uploading the (completedCount + 1)th active file\n return `Uploading ${completedCount}/${totalActiveFiles} file${totalActiveFiles > 1 ? 's' : ''}...`;\n }\n if (this.uploadedFiles.some((file) => file.status === 'queued')) {\n return `Uploading ${completedCount + 1}/${totalActiveFiles} file${totalActiveFiles > 1 ? 's' : ''}...`;\n }\n return `Uploading ${completedCount}/${totalActiveFiles} file${totalActiveFiles > 1 ? 's' : ''}...`;\n }\n\n // Calculate overall progress percentage across all files\n get overallProgress(): number {\n if (this.uploadedFiles.length === 0) return 0;\n\n const totalProgress = this.uploadedFiles.reduce((sum, file) => {\n if (file.status === 'complete') return sum + 100;\n if (file.status === 'canceled' || file.status === 'error') return sum;\n return sum + (file.progress || 0);\n }, 0);\n\n const activeFilesCount = this.uploadedFiles.filter((file) => file.status !== 'canceled' && file.status !== 'error').length;\n\n return activeFilesCount > 0 ? Math.round((totalProgress / (activeFilesCount * 100)) * 100) : 0;\n }\n}\n","<p class=\"cax-files\">{{inputFiles}}</p>\r\n<div class=\"cax-upload-menu\" [ngStyle]=\"style\"\r\n [class.dragging]=\"isDragging\" \r\n (click)=\"openFileSelector()\">\r\n <input\r\n id=\"fileInput\"\r\n type=\"file\"\r\n (change)=\"handleFileInput($event)\"\r\n hidden\r\n multiple\r\n >\r\n\r\n <!-- Default Upload State -->\r\n <ng-container *ngIf=\"uploadStatus === 'idle'\" >\r\n <div class=\"cax-upload-options\" >\r\n <p class=\"hint-text\">\r\n <span class=\"drop-files\">Drop files here</span> or browse files from your device\r\n </p>\r\n <p class=\"max-size\">Max. File Size: {{ maxFileSize }}MB</p>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <!-- Uploading State -->\r\n<div *ngIf=\"uploadStatus === 'uploading'\" class=\"cax-upload-status uploading\" >\r\n <div class=\"status-container\">\r\n <cax-progressSpinner\r\n [strokeColor]=\"'primary'\"\r\n [size]=\"'lg'\"\r\n [animationDuration]=\"'2s'\"\r\n ></cax-progressSpinner>\r\n <p >{{ uploadingProgressText }}</p>\r\n <cax-button\r\n [label]=\"'Cancel'\"\r\n [rounded]=\"false\"\r\n [severity]=\"'danger'\"\r\n [size]=\"'large'\"\r\n [outlined]=\"'false'\"\r\n [link]=\"true\"\r\n (click)=\"cancelCurrentUpload(); $event.stopPropagation()\"\r\n />\r\n </div>\r\n</div>\r\n\r\n <!-- Complete State -->\r\n <div *ngIf=\"uploadStatus === 'complete'\" class=\"cax-upload-status complete\">\r\n <div class=\"status-container\">\r\n <div class=\"success-icon\"><i class=\"cax cax-check\"></i></div>\r\n <p>{{uploadString}}</p>\r\n <cax-button\r\n [label]=\"'Remove'\"\r\n [rounded]=\"false\"\r\n [severity]=\"'danger'\"\r\n [size]=\"'large'\"\r\n [outlined]=\"'false'\"\r\n [link]=\"true\"\r\n (click)=\"removeAllFiles(); $event.stopPropagation()\"\r\n />\r\n </div>\r\n </div>\r\n <div *ngIf=\"invalid\" id=\"helper-text\" class=\"cax-error-upload\"></div>\r\n</div>\r\n<div *ngIf=\"invalid\" id=\"helper-text\" class=\"cax-error-upload\">\r\n {{ errorText }}\r\n</div>\r\n\r\n<!-- stacked file -->\r\n<div *ngIf=\"uploadedFiles.length > 0\" class=\"cax-file-preview-wrapper\" [ngStyle]=\"style\">\r\n <div\r\n *ngFor=\"let item of uploadedFiles; let i = index\"\r\n class=\"cax-file-preview\"\r\n [ngClass]=\"{\r\n 'queued': item.status === 'queued',\r\n 'uploading': item.status === 'uploading',\r\n 'complete': item.status === 'complete',\r\n 'canceled': item.status === 'canceled'\r\n }\"\r\n >\r\n <div class=\"file-info\">\r\n <p class=\"file-name\">{{ item.file.name }}</p>\r\n </div> \r\n\r\n <!-- Show spinner for queued or uploading files -->\r\n <div *ngIf=\"item.status === 'queued' || item.status === 'uploading'\" class=\"spinner\">\r\n <cax-progressSpinner\r\n [strokeColor]=\"'primary'\"\r\n [size]=\"'sm'\"\r\n [animationDuration]=\"'2s'\">\r\n </cax-progressSpinner>\r\n </div>\r\n \r\n <!-- Show remove button only for complete or canceled files -->\r\n <button\r\n *ngIf=\"item.status === 'complete' || item.status === 'canceled'\"\r\n class=\"remove-button\"\r\n (click)=\"removeFile(i); $event.stopPropagation()\">\r\n <i class=\"cax cax-close\"></i> \r\n </button>\r\n </div>\r\n</div>","import { CommonModule } from '@angular/common';\nimport { UploadComponent } from './upload.component';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule } from '@angular/core';\nimport { ProgressSpinnerModule } from 'cax-design-system/progressspinner';\nimport { Button } from 'cax-design-system/button';\n\n@NgModule({\n declarations: [UploadComponent],\n imports: [CommonModule, FormsModule, ProgressSpinnerModule, Button],\n exports: [UploadComponent]\n})\nexport class UploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAgBa,eAAe,CAAA;IACf,OAAO,GAAY,KAAK,CAAC;AACzB,IAAA,KAAK,CAA8C;IACnD,WAAW,GAAW,EAAE,CAAC;IACzB,UAAU,GAAW,aAAa,CAAC;IACnC,YAAY,GAAW,oBAAoB,CAAC;IAC5C,SAAS,GAAW,sBAAs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AAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,eAAe,CAAC;oBAC/B,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,CAAC;oBACnE,OAAO,EAAE,CAAC,eAAe,CAAC;AAC7B,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -11,6 +11,7 @@ export declare class InputTextComponent implements ControlValueAccessor {
11
11
  showLabel?: boolean;
12
12
  leftIcon?: boolean;
13
13
  rightIcon?: boolean;
14
+ rightIconClickable?: boolean;
14
15
  clearIcon: boolean;
15
16
  label?: string;
16
17
  iconPath?: string;
@@ -27,6 +28,7 @@ export declare class InputTextComponent implements ControlValueAccessor {
27
28
  size: 'sm' | 'md' | 'lg';
28
29
  styleClass?: string;
29
30
  valueChange: EventEmitter<string>;
31
+ rightIconClick: EventEmitter<void>;
30
32
  private onChange;
31
33
  private onTouched;
32
34
  writeValue(value: string): void;
@@ -35,6 +37,7 @@ export declare class InputTextComponent implements ControlValueAccessor {
35
37
  setDisabledState(isDisabled: boolean): void;
36
38
  onInput(event: Event | string): void;
37
39
  clearInput(): void;
40
+ onRightIconClick(): void;
38
41
  static ɵfac: i0.ɵɵFactoryDeclaration<InputTextComponent, never>;
39
- static ɵcmp: i0.ɵɵComponentDeclaration<InputTextComponent, "cax-inputtext", never, { "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "successText": { "alias": "successText"; "required": false; }; "errorText": { "alias": "errorText"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "leftIcon": { "alias": "leftIcon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "clearIcon": { "alias": "clearIcon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "iconPath": { "alias": "iconPath"; "required": false; }; "disabledIcon": { "alias": "disabledIcon"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "leftIconClass": { "alias": "leftIconClass"; "required": false; }; "rightIconClass": { "alias": "rightIconClass"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "required": { "alias": "required"; "required": false; }; "style": { "alias": "style"; "required": false; }; "size": { "alias": "size"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputTextComponent, "cax-inputtext", never, { "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "successText": { "alias": "successText"; "required": false; }; "errorText": { "alias": "errorText"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "leftIcon": { "alias": "leftIcon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "rightIconClickable": { "alias": "rightIconClickable"; "required": false; }; "clearIcon": { "alias": "clearIcon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "iconPath": { "alias": "iconPath"; "required": false; }; "disabledIcon": { "alias": "disabledIcon"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "leftIconClass": { "alias": "leftIconClass"; "required": false; }; "rightIconClass": { "alias": "rightIconClass"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "required": { "alias": "required"; "required": false; }; "style": { "alias": "style"; "required": false; }; "size": { "alias": "size"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; }, { "valueChange": "valueChange"; "rightIconClick": "rightIconClick"; }, never, never, false, never>;
40
43
  }
@@ -38,8 +38,8 @@ export declare class InputTextareaComponent implements AfterViewInit {
38
38
  onResizeHandler(event: Event): void;
39
39
  ngAfterViewInit(): void;
40
40
  valueChange: EventEmitter<string>;
41
- private onChange;
42
- private onTouched;
41
+ onChange: (value: string) => void;
42
+ onTouched: () => void;
43
43
  writeValue(value: string): void;
44
44
  registerOnChange(fn: (value: string) => void): void;
45
45
  registerOnTouched(fn: () => void): void;
@@ -35,6 +35,7 @@ export declare class Navigation implements OnChanges, AfterViewInit {
35
35
  onSettingsClick: EventEmitter<any>;
36
36
  onLogoClick: EventEmitter<any>;
37
37
  onSubscriptionChange: EventEmitter<any>;
38
+ onNavExpanded: EventEmitter<boolean>;
38
39
  isHovered: boolean;
39
40
  isNavExpanded: boolean;
40
41
  notificationActive: boolean;
@@ -55,11 +56,12 @@ export declare class Navigation implements OnChanges, AfterViewInit {
55
56
  emitLogoClick(): void;
56
57
  onResize(): void;
57
58
  adjustUpDivHeight(): number;
59
+ onMouseEnter(): void;
58
60
  onMouseLeave(): void;
59
61
  hideAccountDetails(): void;
60
62
  changeActiveSusbcription(item: string): void;
61
63
  updateSubscription(item: SubscriptionList, child: string): void;
62
64
  toggleSubscriptionList(index: number): void;
63
65
  static ɵfac: i0.ɵɵFactoryDeclaration<Navigation, never>;
64
- static ɵcmp: i0.ɵɵComponentDeclaration<Navigation, "cax-navigation", never, { "header": { "alias": "header"; "required": false; }; "topNavList": { "alias": "topNavList"; "required": false; }; "bottomNavList": { "alias": "bottomNavList"; "required": false; }; "activeTab": { "alias": "activeTab"; "required": false; }; "notifications": { "alias": "notifications"; "required": false; }; "helpCentre": { "alias": "helpCentre"; "required": false; }; "copyrightYear": { "alias": "copyrightYear"; "required": false; }; "version": { "alias": "version"; "required": false; }; "logout": { "alias": "logout"; "required": false; }; "profile": { "alias": "profile"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; "userName": { "alias": "userName"; "required": false; }; "userImage": { "alias": "userImage"; "required": false; }; "headerLogo": { "alias": "headerLogo"; "required": false; }; "headerInitials": { "alias": "headerInitials"; "required": false; }; "subscriptionMode": { "alias": "subscriptionMode"; "required": false; }; "subscriptionList": { "alias": "subscriptionList"; "required": false; }; "selectedSubscription": { "alias": "selectedSubscription"; "required": false; }; "advanceSubscriptionList": { "alias": "advanceSubscriptionList"; "required": false; }; "displaySubscriptionName": { "alias": "displaySubscriptionName"; "required": false; }; }, { "onNavListItemChange": "onNavListItemChange"; "onNotificationClick": "onNotificationClick"; "onHelpCentreClick": "onHelpCentreClick"; "onLogoutClick": "onLogoutClick"; "onProfileClick": "onProfileClick"; "onSettingsClick": "onSettingsClick"; "onLogoClick": "onLogoClick"; "onSubscriptionChange": "onSubscriptionChange"; }, never, never, true, never>;
66
+ static ɵcmp: i0.ɵɵComponentDeclaration<Navigation, "cax-navigation", never, { "header": { "alias": "header"; "required": false; }; "topNavList": { "alias": "topNavList"; "required": false; }; "bottomNavList": { "alias": "bottomNavList"; "required": false; }; "activeTab": { "alias": "activeTab"; "required": false; }; "notifications": { "alias": "notifications"; "required": false; }; "helpCentre": { "alias": "helpCentre"; "required": false; }; "copyrightYear": { "alias": "copyrightYear"; "required": false; }; "version": { "alias": "version"; "required": false; }; "logout": { "alias": "logout"; "required": false; }; "profile": { "alias": "profile"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; "userName": { "alias": "userName"; "required": false; }; "userImage": { "alias": "userImage"; "required": false; }; "headerLogo": { "alias": "headerLogo"; "required": false; }; "headerInitials": { "alias": "headerInitials"; "required": false; }; "subscriptionMode": { "alias": "subscriptionMode"; "required": false; }; "subscriptionList": { "alias": "subscriptionList"; "required": false; }; "selectedSubscription": { "alias": "selectedSubscription"; "required": false; }; "advanceSubscriptionList": { "alias": "advanceSubscriptionList"; "required": false; }; "displaySubscriptionName": { "alias": "displaySubscriptionName"; "required": false; }; }, { "onNavListItemChange": "onNavListItemChange"; "onNotificationClick": "onNotificationClick"; "onHelpCentreClick": "onHelpCentreClick"; "onLogoutClick": "onLogoutClick"; "onProfileClick": "onProfileClick"; "onSettingsClick": "onSettingsClick"; "onLogoClick": "onLogoClick"; "onSubscriptionChange": "onSubscriptionChange"; "onNavExpanded": "onNavExpanded"; }, never, never, true, never>;
65
67
  }