cat-documents-ng 1.0.2 → 1.0.4

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 (142) hide show
  1. package/README.md +298 -35
  2. package/Shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +44 -0
  3. package/Shared/components/table-primary/table-primary.component.d.ts +31 -0
  4. package/Shared/components/table-primary/table-primary.model.d.ts +19 -0
  5. package/Shared/constant/ERROR.d.ts +52 -0
  6. package/Shared/constant/SHARED.d.ts +546 -0
  7. package/Shared/constant/URLS.d.ts +123 -0
  8. package/Shared/services/app-config.service.d.ts +51 -0
  9. package/{projects/cat-document-lib/src/shared/services/global-error.handler.ts → Shared/services/global-error.handler.d.ts} +9 -11
  10. package/Shared/services/session.service.d.ts +46 -0
  11. package/Shared/shared.module.d.ts +14 -0
  12. package/fesm2022/cat-documents-ng.mjs +11392 -0
  13. package/fesm2022/cat-documents-ng.mjs.map +1 -0
  14. package/index.d.ts +5 -0
  15. package/lib/document/components/document-actions/document-actions.component.d.ts +78 -0
  16. package/lib/document/components/document-container/document-container.component.d.ts +162 -0
  17. package/lib/document/components/document-content-viewer/document-content-viewer.component.d.ts +291 -0
  18. package/lib/document/components/document-history/document-history.component.d.ts +160 -0
  19. package/lib/document/components/document-list/document-list.component.d.ts +299 -0
  20. package/lib/document/components/document-list-item/document-list-item.component.d.ts +28 -0
  21. package/lib/document/components/document-search/document-search.component.d.ts +77 -0
  22. package/lib/document/components/document-status/document-status.component.d.ts +24 -0
  23. package/lib/document/components/document-upload/document-upload.component.d.ts +321 -0
  24. package/lib/document/components/document-viewer/document-viewer.component.d.ts +137 -0
  25. package/lib/document/components/document-zoom-controls/document-zoom-controls.component.d.ts +33 -0
  26. package/lib/document/components/documents-menu/documents-menu.component.d.ts +110 -0
  27. package/{projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.ts → lib/document/components/folder-block/folder-block.component.d.ts} +12 -26
  28. package/lib/document/components/folder-container/folder-container.component.d.ts +162 -0
  29. package/lib/document/components/linked-document/linked-document.component.d.ts +39 -0
  30. package/lib/document/components/request-document/request-document.component.d.ts +69 -0
  31. package/lib/document/components/sidebar/sidebar.component.d.ts +109 -0
  32. package/lib/document/components/user-list/user-list.component.d.ts +34 -0
  33. package/lib/document/constant/DOCUMENT_HISTORY.d.ts +41 -0
  34. package/lib/document/directives/document.directive.d.ts +20 -0
  35. package/lib/document/directives/permission.directive.d.ts +38 -0
  36. package/lib/document/document.module.d.ts +60 -0
  37. package/lib/document/models/document-alert.model.d.ts +38 -0
  38. package/lib/document/models/document-category.model.d.ts +24 -0
  39. package/lib/document/models/document-history.model.d.ts +94 -0
  40. package/lib/document/models/document-list-response.model.d.ts +33 -0
  41. package/lib/document/models/document-type.model.d.ts +37 -0
  42. package/lib/document/models/document.model.d.ts +44 -0
  43. package/{projects/cat-document-lib/src/lib/document/models/folder.model.ts → lib/document/models/folder.model.d.ts} +7 -13
  44. package/lib/document/models/status-data.model.d.ts +27 -0
  45. package/lib/document/models/uploaded-file-response.model.d.ts +7 -0
  46. package/lib/document/models/user-list.model.d.ts +8 -0
  47. package/lib/document/services/csv-parser.service.d.ts +88 -0
  48. package/lib/document/services/document-actions.service.d.ts +48 -0
  49. package/lib/document/services/document-content-type.service.d.ts +85 -0
  50. package/lib/document/services/document-history-style.service.d.ts +34 -0
  51. package/lib/document/services/document-history.service.d.ts +42 -0
  52. package/lib/document/services/document-http.service.d.ts +179 -0
  53. package/lib/document/services/document-list.service.d.ts +74 -0
  54. package/lib/document/services/document-menu.service.d.ts +122 -0
  55. package/lib/document/services/document-scroll.service.d.ts +55 -0
  56. package/lib/document/services/document-table-builder.service.d.ts +38 -0
  57. package/lib/document/services/document-upload-business.service.d.ts +107 -0
  58. package/lib/document/services/document-upload-data.service.d.ts +40 -0
  59. package/lib/document/services/document-upload-form.service.d.ts +41 -0
  60. package/lib/document/services/document-upload.service.d.ts +99 -0
  61. package/lib/document/services/document-viewer.service.d.ts +97 -0
  62. package/lib/document/services/document-zoom.service.d.ts +81 -0
  63. package/lib/document/services/document.service.d.ts +161 -0
  64. package/lib/document/services/eml-parser.service.d.ts +116 -0
  65. package/lib/document/services/excel-parser.service.d.ts +169 -0
  66. package/lib/document/services/file-format.service.d.ts +34 -0
  67. package/lib/document/services/status-calculator.service.d.ts +20 -0
  68. package/lib/document/services/user-list.service.d.ts +29 -0
  69. package/lib/document/state/document.query.d.ts +243 -0
  70. package/{projects/cat-document-lib/src/lib/document/state/document.service.ts → lib/document/state/document.service.d.ts} +15 -46
  71. package/lib/document/state/document.state.d.ts +61 -0
  72. package/lib/document/state/document.store.d.ts +56 -0
  73. package/package.json +19 -57
  74. package/public-api.d.ts +27 -0
  75. package/src/assets/images/Document interface.png +0 -0
  76. package/src/assets/images/Document upload.png +0 -0
  77. package/src/assets/images/Pdf viewer dialog.png +0 -0
  78. package/.github/PULL_REQUEST_TEMPLATE.md +0 -32
  79. package/.husky/pre-commit +0 -4
  80. package/angular.json +0 -119
  81. package/eslint.config.cjs +0 -148
  82. package/projects/cat-document-lib/README.md +0 -63
  83. package/projects/cat-document-lib/ng-package.json +0 -11
  84. package/projects/cat-document-lib/package.json +0 -16
  85. package/projects/cat-document-lib/setup-jest.ts +0 -1
  86. package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.html +0 -6
  87. package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.scss +0 -0
  88. package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.spec.ts +0 -0
  89. package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.ts +0 -82
  90. package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.html +0 -35
  91. package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.scss +0 -12
  92. package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.spec.ts +0 -0
  93. package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.ts +0 -73
  94. package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.html +0 -33
  95. package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.scss +0 -22
  96. package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +0 -23
  97. package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.ts +0 -40
  98. package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.html +0 -56
  99. package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.scss +0 -26
  100. package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.spec.ts +0 -24
  101. package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.ts +0 -184
  102. package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.html +0 -244
  103. package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.scss +0 -36
  104. package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +0 -21
  105. package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.ts +0 -125
  106. package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.html +0 -46
  107. package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.scss +0 -0
  108. package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.spec.ts +0 -0
  109. package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.html +0 -2
  110. package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.scss +0 -0
  111. package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.spec.ts +0 -0
  112. package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.ts +0 -29
  113. package/projects/cat-document-lib/src/lib/document/document.module.ts +0 -187
  114. package/projects/cat-document-lib/src/lib/document/models/document.model.ts +0 -39
  115. package/projects/cat-document-lib/src/lib/document/services/file-format.service.spec.ts +0 -16
  116. package/projects/cat-document-lib/src/lib/document/services/file-format.service.ts +0 -41
  117. package/projects/cat-document-lib/src/lib/document/state/document.query.ts +0 -23
  118. package/projects/cat-document-lib/src/lib/document/state/document.state.ts +0 -39
  119. package/projects/cat-document-lib/src/lib/document/state/document.store.ts +0 -23
  120. package/projects/cat-document-lib/src/public-api.ts +0 -8
  121. package/projects/cat-document-lib/src/shared/constant/SHARED.ts +0 -232
  122. package/projects/cat-document-lib/src/shared/constant/URLS.ts +0 -31
  123. package/projects/cat-document-lib/src/shared/services/app-config.service.spec.ts +0 -16
  124. package/projects/cat-document-lib/src/shared/services/app-config.service.ts +0 -73
  125. package/projects/cat-document-lib/tsconfig.lib.json +0 -15
  126. package/projects/cat-document-lib/tsconfig.lib.prod.json +0 -11
  127. package/projects/cat-document-lib/tsconfig.spec.json +0 -15
  128. package/public/favicon.ico +0 -0
  129. package/src/app/app.component.html +0 -1
  130. package/src/app/app.component.scss +0 -0
  131. package/src/app/app.component.spec.ts +0 -29
  132. package/src/app/app.component.ts +0 -15
  133. package/src/app/app.module.ts +0 -60
  134. package/src/app/app.routing.module.ts +0 -19
  135. package/src/index.html +0 -13
  136. package/src/main.ts +0 -5
  137. package/src/styles.scss +0 -39
  138. package/tsconfig.app.json +0 -15
  139. package/tsconfig.json +0 -32
  140. /package/{projects/cat-document-lib/src → src}/assets/images/FolderImg.png +0 -0
  141. /package/{projects/cat-document-lib/src → src}/assets/images/Frame.png +0 -0
  142. /package/{projects/cat-document-lib/src → src}/assets/images/document.png +0 -0
@@ -1,187 +0,0 @@
1
- import { APP_INITIALIZER, NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { DocumentContainerComponent } from './components/document-container/document-container.component';
4
- import { FolderContainerComponent } from './components/folder-container/folder-container.component';
5
- import { FolderBlockComponent } from './components/folder-block/folder-block.component';
6
- import { DocumentListComponent } from './components/document-list/document-list.component';
7
- import { AccordionModule } from 'primeng/accordion';
8
- import { DocumentListItemComponent } from './components/document-list-item/document-list-item.component';
9
- import { ButtonModule } from 'primeng/button';
10
- import { SidebarModule } from 'primeng/sidebar';
11
- import { FileUploadModule } from 'primeng/fileupload';
12
- import { DocumentUploadComponent } from './components/document-upload/document-upload.component';
13
- import { MessageService } from 'primeng/api';
14
- import { HttpClientModule } from '@angular/common/http';
15
- import { ProgressBarModule } from 'primeng/progressbar';
16
- import { BadgeModule } from 'primeng/badge';
17
- import { ListboxModule } from 'primeng/listbox';
18
- import { TimelineModule } from 'primeng/timeline';
19
- import { CheckboxModule } from 'primeng/checkbox';
20
- import { InputTextareaModule } from 'primeng/inputtextarea';
21
- import { FormsModule } from '@angular/forms';
22
- import { DocumentViewerComponent } from './components/document-viewer/document-viewer.component';
23
- import { PdfViewerModule } from 'ng2-pdf-viewer';
24
- import { DialogModule } from 'primeng/dialog';
25
- import { AppConfigService } from '../../Shared/services/app-config.service';
26
- import { GlobalErrorHandler } from '../../Shared/services/global-error.handler';
27
-
28
- /**
29
- * @module DocumentModule
30
- *
31
- * The `DocumentModule` handles the organization and display of document and folder components
32
- * in the application. This module is designed to support features like folder containers,
33
- * document lists, and individual document items.
34
- */
35
- @NgModule({
36
- declarations: [
37
- /**
38
- * The main container for managing documents.
39
- * DocumentContainerComponent
40
- */
41
- DocumentContainerComponent,
42
-
43
- /**
44
- * A container component to manage folders.
45
- * FolderContainerComponent
46
- */
47
- FolderContainerComponent,
48
-
49
- /**
50
- * A block component that represents an individual folder.
51
- * FolderBlockComponent
52
- */
53
- FolderBlockComponent,
54
-
55
- /**
56
- * A component to display a list of documents.
57
- * DocumentListComponent
58
- */
59
- DocumentListComponent,
60
-
61
- /**
62
- * A component representing an individual item in the document list.
63
- * DocumentListItemComponent
64
- */
65
- DocumentListItemComponent,
66
-
67
- /**
68
- * A component representing to upload a file.
69
- */
70
- DocumentUploadComponent,
71
-
72
- /**
73
- * A component representing and allow you to view the document.
74
- */
75
- DocumentViewerComponent,
76
-
77
- ],
78
- imports: [
79
- /**
80
- * Angular's CommonModule is imported to access common directives like `ngIf` and `ngFor`.
81
- */
82
- CommonModule,
83
-
84
- /**
85
- * PrimeNG AccordionModule is used for creating collapsible sections in the UI.
86
- */
87
- AccordionModule,
88
-
89
- /**
90
- * HttpClienModule for the http calls
91
- */
92
- HttpClientModule,
93
-
94
- /**
95
- * PrimeNG ButtonModule is used for creating buttons in the UI.
96
- */
97
- ButtonModule,
98
-
99
- /**
100
- * PrimeNG SidebarModule is used for creating sidebar in the UI.
101
- */
102
- SidebarModule,
103
-
104
- /**
105
- * PrimeNG FileUploadModule is used for uploading file.
106
- */
107
- FileUploadModule,
108
-
109
- /**
110
- * PrimeNG ProgressBarModule is used for showing progress.
111
- */
112
- ProgressBarModule,
113
-
114
- /**
115
- * PrimeNG BadgeModule is used for showing badge value.
116
- */
117
- BadgeModule,
118
-
119
- /**
120
- * PrimeNG ListboxModule is used for showing listbox value.
121
- */
122
- ListboxModule,
123
-
124
- /**
125
- * PrimeNG CheckboxModule is used for showing checkbox value.
126
- */
127
- CheckboxModule,
128
-
129
- /**
130
- * PrimeNG TimelineModule is used for showing timeline value.
131
- */
132
- TimelineModule,
133
- /**
134
- * PrimeNG InputTextareaModule is used for showing textarea value.
135
- */
136
- InputTextareaModule,
137
- /**
138
- * FormsModule to handle the forms.
139
- */
140
- FormsModule,
141
- /**
142
- * PdfViewerModule to handle and make visible the pdf.
143
- */
144
- PdfViewerModule,
145
- /**
146
- * PrimeNG DialogModule is used for showing dialog.
147
- */
148
- DialogModule
149
- ],
150
- exports: [
151
- /**
152
- * Exports the `DocumentContainerComponent` to be used in other modules.
153
- */
154
- DocumentContainerComponent
155
- ],
156
- providers: [
157
- /**
158
- * Provide the messageservice to be used in other components.
159
- */
160
- MessageService,
161
-
162
- /**
163
- * Provide the messageservice to be used in other components.
164
- */
165
- { provide: GlobalErrorHandler, useClass: GlobalErrorHandler },
166
- /**
167
- * Initializes the application configuration by loading it from the AppConfigService
168
- * before the application starts.
169
- * This ensures that the configuration is available for the rest of the app when needed.
170
- * The configuration is loaded asynchronously using the APP_INITIALIZER.
171
- * @returns {Function} - A function that loads the configuration from the AppConfigService.
172
- */
173
- {
174
- provide: APP_INITIALIZER,
175
- /**
176
- * This useFactory is executed when the app initializes.
177
- */
178
- useFactory: (configService: AppConfigService) => () =>
179
- configService.loadAppConfig().catch((error) => {
180
- throw new Error(error);
181
- }),
182
- deps: [AppConfigService],
183
- multi: true,
184
- }
185
- ]
186
- })
187
- export class DocumentModule { }
@@ -1,39 +0,0 @@
1
- import { SHARED } from "../../../Shared/constant/SHARED";
2
-
3
- /**
4
- * Represents a document model.
5
- *
6
- * This class contains the structure for document-related data, including file name,
7
- * status, and document URL.
8
- */
9
- export class DocumentModel {
10
- /**
11
- * The unique identifier for the document.
12
- * @type {number}
13
- */
14
- _id: number = SHARED.INITIAL_COUNT;
15
-
16
- /**
17
- * The name of the document file.
18
- * @type {?string}
19
- */
20
- fileName?: string;
21
-
22
- /**
23
- * The current status of the document.
24
- * @type {?string}
25
- */
26
- status?: string;
27
-
28
- /**
29
- * The URL where the document is hosted or stored.
30
- * @type {?string}
31
- */
32
- documentUrl?: string;
33
-
34
- /**
35
- * Date of document get uploaded
36
- * @type {?Date}
37
- */
38
- createdAt?: Date
39
- }
@@ -1,16 +0,0 @@
1
- import { TestBed } from '@angular/core/testing';
2
-
3
- import { FileFormatService } from './file-format.service';
4
-
5
- describe('FileFormatService', () => {
6
- let service: FileFormatService;
7
-
8
- beforeEach(() => {
9
- TestBed.configureTestingModule({});
10
- service = TestBed.inject(FileFormatService);
11
- });
12
-
13
- it('should be created', () => {
14
- expect(service).toBeTruthy();
15
- });
16
- });
@@ -1,41 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { SHARED } from '../../../Shared/constant/SHARED';
3
- import { PrimeNGConfig } from 'primeng/api';
4
-
5
- /**
6
- * Description placeholder
7
- * @class FileFormatService
8
- * @typedef {FileFormatService}
9
- */
10
- @Injectable({
11
- providedIn: 'root'
12
- })
13
- export class FileFormatService {
14
-
15
- /**
16
- * Creates an instance of FileFormatService.
17
- * @constructor
18
- */
19
- constructor() { }
20
-
21
- /**
22
- * Description placeholder
23
- * @param {number} bytes
24
- * @param {PrimeNGConfig} config
25
- * @returns {string}
26
- */
27
- formatFileSize(bytes: number, config:PrimeNGConfig): string {
28
- const kilobyte = 1024;
29
- const decimalPlaces = SHARED.ONE;
30
- const sizes = config.translation.fileSizeTypes || SHARED.FILE_SIZE_UNITS;
31
- if (bytes < kilobyte) {
32
- return `${bytes} ${sizes[SHARED.INITIAL_COUNT]}`;
33
- } else if (bytes < kilobyte * kilobyte) {
34
- const kbSize = bytes / kilobyte;
35
- return `${parseFloat(kbSize.toFixed(decimalPlaces))} ${sizes[SHARED.ONE]}`;
36
- } else {
37
- const mbSize = bytes / (kilobyte * kilobyte);
38
- return `${parseFloat(mbSize.toFixed(decimalPlaces))} ${sizes[SHARED.TWO]}`;
39
- }
40
- }
41
- }
@@ -1,23 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { QueryEntity } from '@datorama/akita';
3
- import { DocumentStore } from './document.store';
4
- import { DocumentState } from './document.state';
5
-
6
- /**
7
- * Service that provides querying capabilities for the `DocumentStore`.
8
- *
9
- * The `DocumentQuery` class extends Akita's `QueryEntity`, allowing consumers
10
- * to retrieve, observe, and filter data from the `DocumentStore` in a reactive manner.
11
- *
12
- * @extends QueryEntity<DocumentState>
13
- * * Creates an instance of `DocumentQuery`.
14
- *
15
- * @param {DocumentStore} store - The underlying store that holds the document state.
16
- */
17
-
18
- @Injectable({ providedIn: 'root' })
19
- export class DocumentQuery extends QueryEntity<DocumentState> {
20
- constructor(protected override store: DocumentStore) {
21
- super(store);
22
- }
23
- }
@@ -1,39 +0,0 @@
1
- import { EntityState } from '@datorama/akita';
2
- import { DocumentModel } from '../models/document.model';
3
-
4
- /**
5
- * Represents the state of the documents in the application.
6
- *
7
- * This interface extends Akita's `EntityState` to include additional properties
8
- * for managing document-specific data, such as `records`, `filteredRecords` and `folderId`.
9
- *
10
- * @extends EntityState<DocumentModel, string>
11
- *
12
- * @property {any[]} records - A collection of records related to documents.
13
- * @property {any[]} filteredRecords - A collection of filteredRecords related to documents.
14
- * @property {string | null} folderId - The ID of the currently selected folder, or `null` if no folder is selected.
15
- * @property {boolean} isDialogOpen - A flag indicating whether a dialog is open.
16
- */
17
- export interface DocumentState extends EntityState<DocumentModel, string> {
18
- records: DocumentModel[];
19
- folderId: string | null;
20
- isDialogOpen: boolean;
21
- filteredRecords:DocumentModel[]
22
- }
23
-
24
- /**
25
- * Creates the initial state for the `DocumentState` store.
26
- *
27
- * This function provides default values for all properties in the `DocumentState` interface,
28
- * ensuring the store starts with a consistent initial structure.
29
- *
30
- * @returns {DocumentState} The initial state of the document store.
31
- */
32
- export function createInitialState(): DocumentState {
33
- return {
34
- records: [],
35
- filteredRecords: [],
36
- folderId: null,
37
- isDialogOpen: false,
38
- };
39
- }
@@ -1,23 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { EntityStore, StoreConfig } from '@datorama/akita';
3
- import { createInitialState, DocumentState } from './document.state';
4
-
5
- /**
6
- * Store that manages the state of documents in the application.
7
- *
8
- * The `DocumentStore` class extends Akita's `EntityStore` to manage the entity state for documents.
9
- * It uses the `createInitialState` function to initialize the store with default values and
10
- * is configured with the name `'documents'`.
11
- *
12
- * @extends EntityStore<DocumentState>
13
- */
14
- @Injectable({ providedIn: 'root' })
15
- @StoreConfig({ name: 'documents' })
16
- export class DocumentStore extends EntityStore<DocumentState> {
17
- /**
18
- * Creates an instance of `DocumentStore` with the initial state of the documents.
19
- */
20
- constructor() {
21
- super(createInitialState());
22
- }
23
- }
@@ -1,8 +0,0 @@
1
- /*
2
- * Public API Surface of cat-document-lib
3
- */
4
-
5
- export * from './lib/document/document.module';
6
- export * from './lib/document/components/document-container/document-container.component';
7
- export * from './lib/document/components/document-viewer/document-viewer.component'
8
-
@@ -1,232 +0,0 @@
1
- /**
2
- * The `SHARED` class contains shared constants used across the application.
3
- * These constants are related to document statuses and other shared data.
4
- */
5
- export class SHARED {
6
- /**
7
- * Represents the count of missing files.
8
- */
9
- static MISSINGCOUNT = 2;
10
-
11
- /**
12
- * Represents the count of pending files.
13
- */
14
- static PENDINGCOUNT = 3;
15
-
16
- /**
17
- * Represents an empty string.
18
- */
19
- static EMPTY = "";
20
-
21
- /**
22
- * Represents an true.
23
- * @static
24
- * @type {boolean}
25
- */
26
- static TRUE: boolean = true;
27
-
28
-
29
- /**
30
- * Represents an false.
31
- * @static
32
- * @type {boolean}
33
- */
34
- static FALSE: boolean = false;
35
-
36
- /**
37
- * Represents an INITIAL_COUNT.
38
- */
39
- static INITIAL_COUNT = 0
40
- /**
41
- * Represents an INITIAL_VALUE.
42
- */
43
- static INITIAL_VALUE = 0
44
-
45
- /**
46
- * Represents the constant value for one (1).
47
- * @static
48
- * @type {number}
49
- */
50
- static ONE: number = 1
51
-
52
- /**
53
- * Represents the constant value for two (2).
54
- * @static
55
- * @type {number}
56
- */
57
- static TWO: number = 2
58
-
59
- /**
60
- * Represents the constant value for ten (10).
61
- * @static
62
- * @type {number}
63
- */
64
- static TEN: number = 10
65
-
66
- /**
67
- * Represents the constant string value 'files' used for file-related operations.
68
- * @static
69
- * @type {string}
70
- */
71
- static FILE: string = 'file';
72
-
73
- /**
74
- * Represents the array of file size units ('B', 'KB', 'MB') used for file size formatting.
75
- * @static
76
- * @type {string[]}
77
- */
78
- static FILE_SIZE_UNITS: string[] = ['B', 'KB', 'MB'];
79
-
80
- /**
81
- * Show SEVERITY value.
82
- * @static
83
- * @type {'error'}
84
- */
85
- static SEVERITY:string = 'error'
86
-
87
- /**
88
- * Show upload summery if it's failed.
89
- * @static
90
- * @type {'Upload Failed'}
91
- */
92
- static UPLOAD_SUMMERY:string = 'Upload Failed'
93
-
94
- /**
95
- * Represent empty array.
96
- * @static
97
- * @type {{}}
98
- */
99
- static EMPTY_ARRAY = []
100
-
101
- /**
102
- * Represent contextId.
103
- * @static
104
- * @type {string}
105
- */
106
- static CONTEXT_ID : string = 'contextId'
107
-
108
- /**
109
- * Represent fileSize.
110
- * @static
111
- * @type {string}
112
- */
113
- static FILE_SIZE : string = 'fileSize'
114
- }
115
-
116
- /**
117
- * `DUMMYDOCUMENTLIST` is a mock list of document objects used for testing and development purposes.
118
- * Each document includes an ID, file name, status, and document URL.
119
- */
120
- export const DUMMYDOCUMENTLIST = [
121
- {
122
- _id: 1,
123
- fileName: 'Document 1',
124
- status: 'pending',
125
- documentUrl: 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf',
126
- },
127
- {
128
- _id: 2,
129
- fileName: 'Document 2',
130
- status: 'verified',
131
- documentUrl: 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf',
132
- },
133
- {
134
- _id: 3,
135
- fileName: 'Document 3',
136
- status: 'sentReminder',
137
- documentUrl: 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf',
138
- },
139
- {
140
- _id: 4,
141
- fileName: 'Document 4',
142
- status: 'pending',
143
- documentUrl: 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf',
144
- },
145
- ];
146
-
147
- /**
148
- * `FOLDERPANEL` is a mock list of folder data representing various folders in the application.
149
- * Each folder contains an ID, file count, text description, missing files count, and pending files count.
150
- */
151
- export const FOLDERPANEL = [
152
- {
153
- _id: 'folder1',
154
- fileCount: 10,
155
- text: 'Documents',
156
- missingFiles: 3,
157
- pendingFiles: 2,
158
- },
159
- {
160
- _id: 'folder2',
161
- fileCount: 5,
162
- text: 'Images',
163
- missingFiles: 0,
164
- pendingFiles: 1,
165
- },
166
- {
167
- _id: 'folder3',
168
- fileCount: 20,
169
- text: 'Reports',
170
- missingFiles: 5,
171
- pendingFiles: 0,
172
- },
173
- {
174
- _id: 'folder4',
175
- fileCount: 8,
176
- text: 'Videos',
177
- missingFiles: 0,
178
- pendingFiles: 0,
179
- },
180
- {
181
- _id: 'folder5',
182
- fileCount: 15,
183
- text: 'Archives',
184
- missingFiles: 1,
185
- pendingFiles: 3,
186
- }
187
- ];
188
-
189
- /**
190
- * Dummy data for sumaery.
191
- * @type {{}}
192
- */
193
- export const DUMMYSUMMARY = [
194
- {
195
- status: 'Valuation report requested on 10th Oct 2024',
196
- date: '15/10/2020 10:30',
197
- icon: 'pi pi-shopping-cart',
198
- color: '#9C27B0',
199
- image: 'game-controller.jpg',
200
- },
201
- {
202
- status: 'Valuation report received on 13th Oct 2024',
203
- date: '15/10/2020 14:00',
204
- icon: 'pi pi-cog',
205
- color: '#673AB7',
206
- },
207
- {
208
- status: 'Waiting for Valuation Report to be accepted',
209
- date: '15/10/2020 16:15',
210
- icon: 'pi pi-shopping-cart',
211
- color: '#FF9800',
212
- },
213
- ];
214
-
215
- /**
216
- * Dummy data for list box.
217
- * @type {{}}
218
- */
219
- export const COUNTRIES = [
220
- { name: 'Any Word', code: 'NY', checked: false },
221
- { name: 'Case Sensitive', code: 'RM', checked: false },
222
- { name: 'Wildcard Search', code: 'LDN', checked: false },
223
- { name: 'Whole Word Only', code: 'IST', checked: false },
224
- ];
225
-
226
- /**
227
- * Default supported image types.
228
- * @type {{}}
229
- */
230
- export const SUPPORTED_IMAGE_TYPES = [
231
- 'image/png'
232
- ];
@@ -1,31 +0,0 @@
1
- /**
2
- * Class that holds the URLs used throughout the application.
3
- * These URLs are typically used for making API requests and accessing various resources.
4
- * @class URLS
5
- * @typedef {URLS}
6
- */
7
- export class URLS {
8
- /**
9
- * The URL to fetch the application configuration file.
10
- * This JSON file typically contains settings and options for the application.
11
- * @static
12
- * @type {string}
13
- */
14
- static CONFIGFILEURL = "assets/config/app.config.json";
15
-
16
- /**
17
- * The URL endpoint for document uploads.
18
- * Used to send documents to the server for storage or processing.
19
- * @static
20
- * @type {string}
21
- */
22
- static DOCUMENT_UPLOAD = "documents";
23
-
24
- /**
25
- * The query parameter to pass a context ID in API requests.
26
- * Used to specify the context for certain API calls, such as filtering or scoping the request.
27
- * @static
28
- * @type {string}
29
- */
30
- static CONTEXT = "?contextId=";
31
- }
@@ -1,16 +0,0 @@
1
- import { TestBed } from '@angular/core/testing';
2
-
3
- import { AppConfigService } from './app-config.service';
4
-
5
- describe('AppConfigService', () => {
6
- let service: AppConfigService;
7
-
8
- beforeEach(() => {
9
- TestBed.configureTestingModule({});
10
- service = TestBed.inject(AppConfigService);
11
- });
12
-
13
- it('should be created', () => {
14
- expect(service).toBeTruthy();
15
- });
16
- });