cat-documents-ng 0.0.5 → 0.0.7
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.
- package/.github/PULL_REQUEST_TEMPLATE.md +32 -0
- package/.github/workflows/pr-validation.yml +87 -0
- package/.husky/pre-commit +4 -0
- package/README.md +59 -63
- package/angular.json +119 -0
- package/eslint.config.cjs +148 -0
- package/package.json +66 -19
- package/projects/cat-document-lib/README.md +63 -0
- package/{jest.config.mjs → projects/cat-document-lib/jest.config.mjs} +18 -18
- package/{ng-package.json → projects/cat-document-lib/ng-package.json} +10 -10
- package/projects/cat-document-lib/package-lock.json +599 -0
- package/projects/cat-document-lib/package.json +19 -0
- package/{setup-jest.ts → projects/cat-document-lib/setup-jest.ts} +9 -9
- package/{src/shared → projects/cat-document-lib/src/Shared}/constant/SHARED.ts +231 -231
- package/{src/shared → projects/cat-document-lib/src/Shared}/constant/URLS.ts +31 -31
- package/{src/shared → projects/cat-document-lib/src/Shared}/services/app-config.service.spec.ts +16 -16
- package/{src/shared → projects/cat-document-lib/src/Shared}/services/app-config.service.ts +73 -73
- package/{src/shared → projects/cat-document-lib/src/Shared}/services/global-error.handler.ts +29 -29
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-container/document-container.component.html +5 -5
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-container/document-container.component.ts +82 -82
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-list/document-list.component.html +34 -34
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-list/document-list.component.scss +11 -11
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-list/document-list.component.ts +73 -73
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-list-item/document-list-item.component.html +32 -32
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-list-item/document-list-item.component.scss +21 -21
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-list-item/document-list-item.component.spec.ts +23 -23
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-list-item/document-list-item.component.ts +40 -40
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-upload/document-upload.component.html +55 -55
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-upload/document-upload.component.scss +26 -26
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-upload/document-upload.component.spec.ts +24 -24
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-upload/document-upload.component.ts +184 -184
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-viewer/document-viewer.component.html +244 -244
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-viewer/document-viewer.component.scss +35 -35
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-viewer/document-viewer.component.spec.ts +21 -21
- package/{src → projects/cat-document-lib/src}/lib/document/components/document-viewer/document-viewer.component.ts +125 -125
- package/{src → projects/cat-document-lib/src}/lib/document/components/folder-block/folder-block.component.html +46 -46
- package/{src → projects/cat-document-lib/src}/lib/document/components/folder-block/folder-block.component.ts +51 -51
- package/{src → projects/cat-document-lib/src}/lib/document/components/folder-container/folder-container.component.html +1 -1
- package/{src → projects/cat-document-lib/src}/lib/document/components/folder-container/folder-container.component.ts +29 -29
- package/{src → projects/cat-document-lib/src}/lib/document/document.module.ts +191 -191
- package/{src → projects/cat-document-lib/src}/lib/document/models/document.model.ts +39 -39
- package/{src → projects/cat-document-lib/src}/lib/document/models/folder.model.ts +35 -35
- package/{src → projects/cat-document-lib/src}/lib/document/services/file-format.service.spec.ts +16 -16
- package/{src → projects/cat-document-lib/src}/lib/document/services/file-format.service.ts +41 -41
- package/{src → projects/cat-document-lib/src}/lib/document/state/document.query.ts +23 -23
- package/{src → projects/cat-document-lib/src}/lib/document/state/document.service.ts +95 -95
- package/{src → projects/cat-document-lib/src}/lib/document/state/document.state.ts +39 -39
- package/{src → projects/cat-document-lib/src}/lib/document/state/document.store.ts +23 -23
- package/{src → projects/cat-document-lib/src}/public-api.ts +8 -8
- package/{tsconfig.lib.json → projects/cat-document-lib/tsconfig.lib.json} +15 -15
- package/{tsconfig.lib.prod.json → projects/cat-document-lib/tsconfig.lib.prod.json} +11 -11
- package/{tsconfig.spec.json → projects/cat-document-lib/tsconfig.spec.json} +15 -15
- package/public/favicon.ico +0 -0
- package/src/app/app.component.html +1 -0
- package/src/app/app.component.scss +0 -0
- package/src/app/app.component.spec.ts +29 -0
- package/src/app/app.component.ts +15 -0
- package/src/app/app.module.ts +60 -0
- package/src/app/app.routing.module.ts +19 -0
- package/src/index.html +13 -0
- package/src/main.ts +5 -0
- package/src/styles.scss +39 -0
- package/tsconfig.app.json +15 -0
- package/tsconfig.json +32 -0
- package/src/assets/config/app.config.json +0 -4
- /package/{src → projects/cat-document-lib/src}/assets/images/FolderImg.png +0 -0
- /package/{src → projects/cat-document-lib/src}/assets/images/Frame.png +0 -0
- /package/{src → projects/cat-document-lib/src}/assets/images/document.png +0 -0
- /package/{src → projects/cat-document-lib/src}/lib/document/components/document-container/document-container.component.scss +0 -0
- /package/{src → projects/cat-document-lib/src}/lib/document/components/document-container/document-container.component.spec.ts +0 -0
- /package/{src → projects/cat-document-lib/src}/lib/document/components/document-list/document-list.component.spec.ts +0 -0
- /package/{src → projects/cat-document-lib/src}/lib/document/components/folder-block/folder-block.component.scss +0 -0
- /package/{src → projects/cat-document-lib/src}/lib/document/components/folder-block/folder-block.component.spec.ts +0 -0
- /package/{src → projects/cat-document-lib/src}/lib/document/components/folder-container/folder-container.component.scss +0 -0
- /package/{src → projects/cat-document-lib/src}/lib/document/components/folder-container/folder-container.component.spec.ts +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import "jest-preset-angular/setup-jest";
|
|
3
|
-
|
|
4
|
-
import { TestBed } from '@angular/core/testing';
|
|
5
|
-
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
6
|
-
|
|
7
|
-
TestBed.initTestEnvironment(
|
|
8
|
-
BrowserDynamicTestingModule,
|
|
9
|
-
platformBrowserDynamicTesting()
|
|
1
|
+
|
|
2
|
+
import "jest-preset-angular/setup-jest";
|
|
3
|
+
|
|
4
|
+
import { TestBed } from '@angular/core/testing';
|
|
5
|
+
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
6
|
+
|
|
7
|
+
TestBed.initTestEnvironment(
|
|
8
|
+
BrowserDynamicTestingModule,
|
|
9
|
+
platformBrowserDynamicTesting()
|
|
10
10
|
);
|
|
@@ -1,232 +1,232 @@
|
|
|
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'
|
|
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
232
|
];
|
|
@@ -1,31 +1,31 @@
|
|
|
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
|
+
/**
|
|
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
|
+
}
|
package/{src/shared → projects/cat-document-lib/src/Shared}/services/app-config.service.spec.ts
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
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
|
-
});
|
|
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
|
+
});
|