cat-documents-ng 0.2.35 → 0.2.36

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.
@@ -1,20 +1,16 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { SHARED } from '../../constant/SHARED';
3
+ import { ProcessedRowData, TableData } from './table-primary.model';
2
4
  import * as i0 from "@angular/core";
3
- export interface TableColumn {
4
- field: string;
5
- header: string;
6
- type?: 'text' | 'status' | 'document' | 'actions';
7
- width?: string;
8
- }
9
- export interface TableData {
10
- columns: TableColumn[];
11
- data: any[];
12
- }
13
- export declare class TablePrimaryComponent {
5
+ export declare class TablePrimaryComponent implements OnChanges {
14
6
  tableData: TableData;
15
7
  showHeader: boolean;
16
8
  tableStyle: any;
17
9
  rowClick: EventEmitter<any>;
10
+ processedData: ProcessedRowData[];
11
+ readonly SHARED: typeof SHARED;
12
+ ngOnChanges(changes: SimpleChanges): void;
13
+ private processTableData;
18
14
  getStatusClass(status: string): string;
19
15
  getStatusIcon(status: string): string;
20
16
  getFileExtension(fileName: string): string;
@@ -0,0 +1,19 @@
1
+ export interface TableColumn {
2
+ field: string;
3
+ header: string;
4
+ type?: 'text' | 'status' | 'document' | 'actions';
5
+ width?: string;
6
+ }
7
+ export interface TableData {
8
+ columns: TableColumn[];
9
+ data: any[];
10
+ }
11
+ export interface ProcessedRowData {
12
+ _fileExtension?: string;
13
+ _isPdfFile?: boolean;
14
+ _isImageFile?: boolean;
15
+ _isExcelFile?: boolean;
16
+ _isOtherFile?: boolean;
17
+ _statusClass?: string;
18
+ _statusIcon?: string;
19
+ }
@@ -220,6 +220,52 @@ export declare class SHARED {
220
220
  static STATUS_WITH_DASH: string;
221
221
  static ICON_WITH_DASH: string;
222
222
  static SEARCH_KEY: string;
223
+ static APPROVED: string;
224
+ static UPLOADED: string;
225
+ static PENDING: string;
226
+ static DOT: string;
227
+ static PDF: string;
228
+ static PENDING_STATUS: string;
229
+ static JPG: string;
230
+ static PNG: string;
231
+ static XLSX: string;
232
+ static APPROVED_STATUS: string;
233
+ static ALERT_STATUS: string;
234
+ static UPLOADED_STATUS: string;
235
+ static REVIEWING_STATUS: string;
236
+ static REJECTED_STATUS: string;
237
+ static STATUS_PENDING_CLASS: string;
238
+ static STATUS_APPROVED_CLASS: string;
239
+ static STATUS_ALERT_CLASS: string;
240
+ static STATUS_UPLOADED_CLASS: string;
241
+ static STATUS_REVIEWING_CLASS: string;
242
+ static STATUS_REJECTED_CLASS: string;
243
+ static ICON_CHECK: string;
244
+ static ICON_EXCLAMATION_TRIANGLE: string;
245
+ static ICON_CLOUD_UPLOAD: string;
246
+ static ICON_EYE: string;
247
+ static ICON_TIMES: string;
248
+ static ICON_CLOCK: string;
249
+ static ICON_FILE_PDF: string;
250
+ static ICON_IMAGE: string;
251
+ static ICON_FILE_EXCEL: string;
252
+ static ICON_FILE: string;
253
+ static ICON_DELETE: string;
254
+ static CELL_TYPE_DOCUMENT: string;
255
+ static CELL_TYPE_STATUS: string;
256
+ static CELL_TYPE_ACTIONS: string;
257
+ static CELL_TYPE_TEXT: string;
258
+ /**
259
+ * Document table columns configuration
260
+ * @static
261
+ * @type {Array<{field: string, header: string, type: 'text' | 'status' | 'document' | 'actions', width: string}>}
262
+ */
263
+ static DOCUMENT_TABLE_COLUMNS: Array<{
264
+ field: string;
265
+ header: string;
266
+ type: 'text' | 'status' | 'document' | 'actions';
267
+ width: string;
268
+ }>;
223
269
  }
224
270
  /**
225
271
  * `DUMMYDOCUMENTLIST` is a mock list of document objects used for testing and development purposes.