cat-documents-ng 0.1.30 → 0.1.32
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/{src/Shared/constant/ERROR.ts → Shared/constant/ERROR.d.ts} +43 -38
- package/Shared/constant/PERMISSIONS.d.ts +20 -0
- package/Shared/constant/SHARED.d.ts +215 -0
- package/{src/Shared/constant/URLS.ts → Shared/constant/URLS.d.ts} +60 -65
- package/Shared/services/app-config.service.d.ts +51 -0
- package/{src/Shared/services/global-error.handler.ts → Shared/services/global-error.handler.d.ts} +27 -29
- package/Shared/services/session.service.d.ts +46 -0
- package/fesm2022/cat-documents-ng.mjs +2623 -0
- package/fesm2022/cat-documents-ng.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/document/components/document-container/document-container.component.d.ts +101 -0
- package/lib/document/components/document-list/document-list.component.d.ts +193 -0
- package/lib/document/components/document-list-item/document-list-item.component.d.ts +28 -0
- package/lib/document/components/document-upload/document-upload.component.d.ts +120 -0
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +77 -0
- package/{src/lib/document/components/folder-block/folder-block.component.ts → lib/document/components/folder-block/folder-block.component.d.ts} +37 -53
- package/lib/document/components/folder-container/folder-container.component.d.ts +29 -0
- package/lib/document/components/linked-document/linked-document.component.d.ts +38 -0
- package/lib/document/directives/document.directive.d.ts +20 -0
- package/lib/document/directives/permission.directive.d.ts +38 -0
- package/lib/document/document.module.d.ts +40 -0
- package/{src/lib/document/models/document-alert.model.ts → lib/document/models/document-alert.model.d.ts} +38 -45
- package/lib/document/models/document-type.model.d.ts +37 -0
- package/lib/document/models/document.model.d.ts +44 -0
- package/{src/lib/document/models/folder.model.ts → lib/document/models/folder.model.d.ts} +29 -35
- package/lib/document/services/document-http.service.d.ts +69 -0
- package/lib/document/services/document-upload.service.d.ts +67 -0
- package/lib/document/services/document.service.d.ts +20 -0
- package/lib/document/services/file-format.service.d.ts +23 -0
- package/lib/document/state/document.query.d.ts +50 -0
- package/{src/lib/document/state/document.service.ts → lib/document/state/document.service.d.ts} +64 -95
- package/{src/lib/document/state/document.state.ts → lib/document/state/document.state.d.ts} +36 -52
- package/lib/document/state/document.store.d.ts +29 -0
- package/package.json +25 -20
- package/{src/public-api.ts → public-api.d.ts} +6 -10
- package/ng-package.json +0 -11
- package/src/Shared/constant/PERMISSIONS.ts +0 -16
- package/src/Shared/constant/SHARED.ts +0 -312
- package/src/Shared/services/app-config.service.spec.ts +0 -19
- package/src/Shared/services/app-config.service.ts +0 -73
- package/src/Shared/services/session.service.spec.ts +0 -16
- package/src/Shared/services/session.service.ts +0 -76
- package/src/assets/config/api.config.json +0 -20
- package/src/lib/document/components/document-container/document-container.component.html +0 -14
- package/src/lib/document/components/document-container/document-container.component.scss +0 -8
- package/src/lib/document/components/document-container/document-container.component.spec.ts +0 -110
- package/src/lib/document/components/document-container/document-container.component.ts +0 -173
- package/src/lib/document/components/document-list/document-list.component.html +0 -81
- package/src/lib/document/components/document-list/document-list.component.scss +0 -82
- package/src/lib/document/components/document-list/document-list.component.spec.ts +0 -96
- package/src/lib/document/components/document-list/document-list.component.ts +0 -244
- package/src/lib/document/components/document-list-item/document-list-item.component.html +0 -36
- package/src/lib/document/components/document-list-item/document-list-item.component.scss +0 -34
- package/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +0 -75
- package/src/lib/document/components/document-list-item/document-list-item.component.ts +0 -40
- package/src/lib/document/components/document-upload/document-upload.component.html +0 -56
- package/src/lib/document/components/document-upload/document-upload.component.scss +0 -32
- package/src/lib/document/components/document-upload/document-upload.component.spec.ts +0 -95
- package/src/lib/document/components/document-upload/document-upload.component.ts +0 -162
- package/src/lib/document/components/document-viewer/document-viewer.component.html +0 -98
- package/src/lib/document/components/document-viewer/document-viewer.component.scss +0 -54
- package/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +0 -79
- package/src/lib/document/components/document-viewer/document-viewer.component.ts +0 -106
- package/src/lib/document/components/folder-block/folder-block.component.html +0 -46
- package/src/lib/document/components/folder-block/folder-block.component.scss +0 -9
- package/src/lib/document/components/folder-block/folder-block.component.spec.ts +0 -70
- package/src/lib/document/components/folder-container/folder-container.component.html +0 -2
- package/src/lib/document/components/folder-container/folder-container.component.scss +0 -0
- package/src/lib/document/components/folder-container/folder-container.component.spec.ts +0 -27
- package/src/lib/document/components/folder-container/folder-container.component.ts +0 -37
- package/src/lib/document/components/linked-document/linked-document.component.html +0 -23
- package/src/lib/document/components/linked-document/linked-document.component.scss +0 -10
- package/src/lib/document/components/linked-document/linked-document.component.spec.ts +0 -61
- package/src/lib/document/components/linked-document/linked-document.component.ts +0 -49
- package/src/lib/document/directives/document.directive.ts +0 -32
- package/src/lib/document/directives/permission.directive.spec.ts +0 -0
- package/src/lib/document/directives/permission.directive.ts +0 -66
- package/src/lib/document/document.module.ts +0 -241
- package/src/lib/document/models/document-type.model.ts +0 -44
- package/src/lib/document/models/document.model.ts +0 -53
- package/src/lib/document/services/document-http.service.spec.ts +0 -119
- package/src/lib/document/services/document-http.service.ts +0 -125
- package/src/lib/document/services/document-upload.service.spec.ts +0 -99
- package/src/lib/document/services/document-upload.service.ts +0 -127
- package/src/lib/document/services/document.service.ts +0 -29
- package/src/lib/document/services/file-format.service.spec.ts +0 -16
- package/src/lib/document/services/file-format.service.ts +0 -41
- package/src/lib/document/state/document.query.ts +0 -52
- package/src/lib/document/state/document.store.ts +0 -51
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,38 +1,43 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A utility class containing common error messages.
|
|
3
|
-
* @class ERRORS
|
|
4
|
-
*/
|
|
5
|
-
export class ERRORS {
|
|
6
|
-
/**
|
|
7
|
-
* Error message for invalid recipient.
|
|
8
|
-
* @static
|
|
9
|
-
* @type {string}
|
|
10
|
-
*/
|
|
11
|
-
static INVALID_RECIPIENT
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
* @
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
* @
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A utility class containing common error messages.
|
|
3
|
+
* @class ERRORS
|
|
4
|
+
*/
|
|
5
|
+
export declare class ERRORS {
|
|
6
|
+
/**
|
|
7
|
+
* Error message for invalid recipient.
|
|
8
|
+
* @static
|
|
9
|
+
* @type {string}
|
|
10
|
+
*/
|
|
11
|
+
static INVALID_RECIPIENT: string;
|
|
12
|
+
/**
|
|
13
|
+
* Error message for invalid document.
|
|
14
|
+
* @static
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
static ERROR_FETCHING_DOCUMENTS: string;
|
|
18
|
+
/**
|
|
19
|
+
* Error message for invalid document.
|
|
20
|
+
* @static
|
|
21
|
+
* @type {string}
|
|
22
|
+
*/
|
|
23
|
+
static ERROR_FETCHING_FOLDERS: string;
|
|
24
|
+
/**
|
|
25
|
+
* Error message for invalid document.
|
|
26
|
+
* @static
|
|
27
|
+
* @type {string}
|
|
28
|
+
*/
|
|
29
|
+
static ERROR_ALLDOCUMENT_MISSING: string;
|
|
30
|
+
/**
|
|
31
|
+
* Error message for invalid document.
|
|
32
|
+
* @static
|
|
33
|
+
* @type {string}
|
|
34
|
+
*/
|
|
35
|
+
static ERROR_DOCUMENT_TYPES: string;
|
|
36
|
+
/**
|
|
37
|
+
* Error message when the file name contains invalid characters.
|
|
38
|
+
* Disallowed characters: <, >, :, ", /, \, |, ?, *
|
|
39
|
+
* @static
|
|
40
|
+
* @type {string}
|
|
41
|
+
*/
|
|
42
|
+
static ERROR_INVALID_FILENAME_CHARACTERS: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storing all permission properties.
|
|
3
|
+
* @export
|
|
4
|
+
* @class PERMISSIONS
|
|
5
|
+
* @typedef {PERMISSIONS}
|
|
6
|
+
*/
|
|
7
|
+
export declare class PERMISSIONS {
|
|
8
|
+
/**
|
|
9
|
+
* Access permission.
|
|
10
|
+
* @static
|
|
11
|
+
* @type {string}
|
|
12
|
+
*/
|
|
13
|
+
static DOCUMENT_POST: string;
|
|
14
|
+
/**
|
|
15
|
+
* Access permission for updating existing documents.
|
|
16
|
+
* @static
|
|
17
|
+
* @type {string}
|
|
18
|
+
*/
|
|
19
|
+
static DOCUMENT_PUT: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
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 declare class SHARED {
|
|
6
|
+
/**
|
|
7
|
+
* Represents the stores userData.
|
|
8
|
+
*/
|
|
9
|
+
static SESSIONKEY: string;
|
|
10
|
+
/**
|
|
11
|
+
* Represents the count of missing files.
|
|
12
|
+
*/
|
|
13
|
+
static MISSINGCOUNT: number;
|
|
14
|
+
/**
|
|
15
|
+
* Represents the count of pending files.
|
|
16
|
+
*/
|
|
17
|
+
static PENDINGCOUNT: number;
|
|
18
|
+
/**
|
|
19
|
+
* Represents an empty string.
|
|
20
|
+
*/
|
|
21
|
+
static EMPTY: string;
|
|
22
|
+
/**
|
|
23
|
+
* Represents an true.
|
|
24
|
+
* @static
|
|
25
|
+
* @type {boolean}
|
|
26
|
+
*/
|
|
27
|
+
static TRUE: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Represents an false.
|
|
30
|
+
* @static
|
|
31
|
+
* @type {boolean}
|
|
32
|
+
*/
|
|
33
|
+
static FALSE: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Represents an INITIAL_COUNT.
|
|
36
|
+
*/
|
|
37
|
+
static INITIAL_COUNT: number;
|
|
38
|
+
/**
|
|
39
|
+
* Represents an INITIAL_VALUE.
|
|
40
|
+
*/
|
|
41
|
+
static INITIAL_VALUE: number;
|
|
42
|
+
/**
|
|
43
|
+
* Represents the constant value for one (1).
|
|
44
|
+
* @static
|
|
45
|
+
* @type {number}
|
|
46
|
+
*/
|
|
47
|
+
static ONE: number;
|
|
48
|
+
/**
|
|
49
|
+
* Represents the constant value for two (2).
|
|
50
|
+
* @static
|
|
51
|
+
* @type {number}
|
|
52
|
+
*/
|
|
53
|
+
static TWO: number;
|
|
54
|
+
/**
|
|
55
|
+
* Represents the constant value for ten (10).
|
|
56
|
+
* @static
|
|
57
|
+
* @type {number}
|
|
58
|
+
*/
|
|
59
|
+
static TEN: number;
|
|
60
|
+
/**
|
|
61
|
+
* Represents the constant string value 'files' used for file-related operations.
|
|
62
|
+
* @static
|
|
63
|
+
* @type {string}
|
|
64
|
+
*/
|
|
65
|
+
static FILE: string;
|
|
66
|
+
/**
|
|
67
|
+
* Represents the array of file size units ('B', 'KB', 'MB') used for file size formatting.
|
|
68
|
+
* @static
|
|
69
|
+
* @type {string[]}
|
|
70
|
+
*/
|
|
71
|
+
static FILE_SIZE_UNITS: string[];
|
|
72
|
+
/**
|
|
73
|
+
* Show SEVERITY value.
|
|
74
|
+
* @static
|
|
75
|
+
* @type {'error'}
|
|
76
|
+
*/
|
|
77
|
+
static SEVERITY: string;
|
|
78
|
+
/**
|
|
79
|
+
* Show SEVERITY value.
|
|
80
|
+
* @static
|
|
81
|
+
* @type {'error'}
|
|
82
|
+
*/
|
|
83
|
+
static SUCCESS_SEVERITY: string;
|
|
84
|
+
/**
|
|
85
|
+
* Show upload summery if it's failed.
|
|
86
|
+
* @static
|
|
87
|
+
* @type {'Upload Failed'}
|
|
88
|
+
*/
|
|
89
|
+
static UPLOAD_SUMMERY: string;
|
|
90
|
+
/**
|
|
91
|
+
* Show upload summery if it's success.
|
|
92
|
+
* @static
|
|
93
|
+
* @type {'Document uploaded successfully.'}
|
|
94
|
+
*/
|
|
95
|
+
static UPLOAD_SUCCESS: string;
|
|
96
|
+
/**
|
|
97
|
+
* Represent empty array.
|
|
98
|
+
* @static
|
|
99
|
+
* @type {{}}
|
|
100
|
+
*/
|
|
101
|
+
static EMPTY_ARRAY: never[];
|
|
102
|
+
/**
|
|
103
|
+
* Represent contextId.
|
|
104
|
+
* @static
|
|
105
|
+
* @type {string}
|
|
106
|
+
*/
|
|
107
|
+
static CONTEXT_ID: string;
|
|
108
|
+
/**
|
|
109
|
+
* Represent fileSize.
|
|
110
|
+
* @static
|
|
111
|
+
* @type {string}
|
|
112
|
+
*/
|
|
113
|
+
static FILE_SIZE: string;
|
|
114
|
+
/**
|
|
115
|
+
* Represent documentName.
|
|
116
|
+
* @static
|
|
117
|
+
* @type {string}
|
|
118
|
+
*/
|
|
119
|
+
static DOCUMENT_NAME: string;
|
|
120
|
+
/**
|
|
121
|
+
* Represent documentTypeId.
|
|
122
|
+
* @static
|
|
123
|
+
* @type {string}
|
|
124
|
+
*/
|
|
125
|
+
static DOCUMENT_TYPE_ID: string;
|
|
126
|
+
/**
|
|
127
|
+
* Represent upload summery.
|
|
128
|
+
* @static
|
|
129
|
+
* @type {string}
|
|
130
|
+
*/
|
|
131
|
+
static UPLOAD_ERROR_SUMMERY: string;
|
|
132
|
+
/**
|
|
133
|
+
* Represent upload error details.
|
|
134
|
+
* @static
|
|
135
|
+
* @type {string}
|
|
136
|
+
*/
|
|
137
|
+
static UPLOAD_ERROR_DETAILS: string;
|
|
138
|
+
/**
|
|
139
|
+
* Represents the message prefix for a successful document name update.
|
|
140
|
+
* @static
|
|
141
|
+
* @type {string}
|
|
142
|
+
*/
|
|
143
|
+
static UPDATE_DOCUMENT_NAME: string;
|
|
144
|
+
/**
|
|
145
|
+
* Identifier used to reference the file input element (e.g., for ViewChild or DOM access).
|
|
146
|
+
* @static
|
|
147
|
+
* @type {string}
|
|
148
|
+
*/
|
|
149
|
+
static FILE_INPUT: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* `DUMMYDOCUMENTLIST` is a mock list of document objects used for testing and development purposes.
|
|
153
|
+
* Each document includes an ID, file name, status, and document URL.
|
|
154
|
+
*/
|
|
155
|
+
export declare const DUMMYDOCUMENTLIST: {
|
|
156
|
+
_id: number;
|
|
157
|
+
fileName: string;
|
|
158
|
+
status: string;
|
|
159
|
+
documentUrl: string;
|
|
160
|
+
}[];
|
|
161
|
+
/**
|
|
162
|
+
* `FOLDERPANEL` is a mock list of folder data representing various folders in the application.
|
|
163
|
+
* Each folder contains an ID, file count, text description, missing files count, and pending files count.
|
|
164
|
+
*/
|
|
165
|
+
export declare const FOLDERPANEL: {
|
|
166
|
+
_id: string;
|
|
167
|
+
fileCount: number;
|
|
168
|
+
text: string;
|
|
169
|
+
missingFiles: number;
|
|
170
|
+
pendingFiles: number;
|
|
171
|
+
}[];
|
|
172
|
+
/**
|
|
173
|
+
* Dummy data for sumaery.
|
|
174
|
+
* @type {{}}
|
|
175
|
+
*/
|
|
176
|
+
export declare const DUMMYSUMMARY: ({
|
|
177
|
+
status: string;
|
|
178
|
+
date: string;
|
|
179
|
+
icon: string;
|
|
180
|
+
color: string;
|
|
181
|
+
image: string;
|
|
182
|
+
} | {
|
|
183
|
+
status: string;
|
|
184
|
+
date: string;
|
|
185
|
+
icon: string;
|
|
186
|
+
color: string;
|
|
187
|
+
image?: undefined;
|
|
188
|
+
})[];
|
|
189
|
+
/**
|
|
190
|
+
* Dummy data for list box.
|
|
191
|
+
* @type {{}}
|
|
192
|
+
*/
|
|
193
|
+
export declare const COUNTRIES: {
|
|
194
|
+
name: string;
|
|
195
|
+
code: string;
|
|
196
|
+
checked: boolean;
|
|
197
|
+
}[];
|
|
198
|
+
/**
|
|
199
|
+
* Default supported image types.
|
|
200
|
+
* @type {{}}
|
|
201
|
+
*/
|
|
202
|
+
export declare const SUPPORTED_IMAGE_TYPES: string[];
|
|
203
|
+
/**
|
|
204
|
+
* @constant {Array<{label: string, value: string, files: string[]}>} DOCUMENTTYPES
|
|
205
|
+
* An array of document type objects containing labels, values, and associated files.
|
|
206
|
+
*/
|
|
207
|
+
export declare const DOCUMENTTYPES: {
|
|
208
|
+
label: string;
|
|
209
|
+
value: string;
|
|
210
|
+
}[];
|
|
211
|
+
export declare const DocumentAlertList: {
|
|
212
|
+
status: string;
|
|
213
|
+
isAlert: boolean;
|
|
214
|
+
alertMessage: string;
|
|
215
|
+
}[];
|
|
@@ -1,65 +1,60 @@
|
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
* @type {string}
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
static CONTEXT_ID = "&contextId=";
|
|
65
|
-
}
|
|
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 declare 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: string;
|
|
15
|
+
/**
|
|
16
|
+
* The URL endpoint for document uploads.
|
|
17
|
+
* Used to send documents to the server for storage or processing.
|
|
18
|
+
* @static
|
|
19
|
+
* @type {string}
|
|
20
|
+
*/
|
|
21
|
+
static DOCUMENT_UPLOAD: string;
|
|
22
|
+
/**
|
|
23
|
+
* The query parameter to pass a context ID in API requests.
|
|
24
|
+
* Used to specify the context for certain API calls, such as filtering or scoping the request.
|
|
25
|
+
* @static
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
28
|
+
static CONTEXT: string;
|
|
29
|
+
/**
|
|
30
|
+
* The query parameter to pass a document ID in API requests.
|
|
31
|
+
* @static
|
|
32
|
+
* @type {string}
|
|
33
|
+
*/
|
|
34
|
+
static DOCUMENT_TYPES: string;
|
|
35
|
+
/**
|
|
36
|
+
* The query parameter to pass a context ID in API requests.
|
|
37
|
+
* @static
|
|
38
|
+
* @type {string}
|
|
39
|
+
*/
|
|
40
|
+
static FOLDERS: string;
|
|
41
|
+
/**
|
|
42
|
+
* The query parameter to pass a document ID in API requests.
|
|
43
|
+
* @static
|
|
44
|
+
* @type {string}
|
|
45
|
+
*/
|
|
46
|
+
static ALERT_BY_DOCUMENT_ID: string;
|
|
47
|
+
/**
|
|
48
|
+
* The query parameter to pass a document ID in API requests.
|
|
49
|
+
* @static
|
|
50
|
+
* @type {string}
|
|
51
|
+
*/
|
|
52
|
+
static PARENT_DOCUMENT_TYPE_ID: string;
|
|
53
|
+
/**
|
|
54
|
+
* The query parameter to pass a context ID in API requests.
|
|
55
|
+
* Used to specify the context for certain API calls, such as filtering or scoping the request.
|
|
56
|
+
* @static
|
|
57
|
+
* @type {string}
|
|
58
|
+
*/
|
|
59
|
+
static CONTEXT_ID: string;
|
|
60
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Service that handles loading and providing configuration settings for the application.
|
|
5
|
+
* It fetches configuration data from a remote server and exposes various configuration options.
|
|
6
|
+
* @class AppConfigService
|
|
7
|
+
* @typedef {AppConfigService}
|
|
8
|
+
*/
|
|
9
|
+
export declare class AppConfigService {
|
|
10
|
+
private http;
|
|
11
|
+
/**
|
|
12
|
+
* Holds the configuration data loaded from the server.
|
|
13
|
+
* @private
|
|
14
|
+
* @type {*}
|
|
15
|
+
*/
|
|
16
|
+
private appConfig;
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of AppConfigService.
|
|
19
|
+
* Initializes the HttpClient for making HTTP requests.
|
|
20
|
+
* @class
|
|
21
|
+
* @param {HttpClient} http - The HttpClient service used for making HTTP requests.
|
|
22
|
+
*/
|
|
23
|
+
constructor(http: HttpClient);
|
|
24
|
+
/**
|
|
25
|
+
* Loads the application configuration from the server by making an HTTP request to the configuration URL.
|
|
26
|
+
* This method retrieves the configuration data and assigns it to the appConfig property.
|
|
27
|
+
* @async
|
|
28
|
+
* @returns {*}
|
|
29
|
+
*/
|
|
30
|
+
loadAppConfig(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the base URL for the API from the loaded configuration.
|
|
33
|
+
* @readonly
|
|
34
|
+
* @type {*}
|
|
35
|
+
*/
|
|
36
|
+
get apiBaseUrl(): any;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the local server API URL from the loaded configuration.
|
|
39
|
+
* @readonly
|
|
40
|
+
* @type {*}
|
|
41
|
+
*/
|
|
42
|
+
get localServerApi(): any;
|
|
43
|
+
/**
|
|
44
|
+
* Returns the visibility options from the loaded configuration.
|
|
45
|
+
* @readonly
|
|
46
|
+
* @type {*}
|
|
47
|
+
*/
|
|
48
|
+
get visibilityOptions(): any;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppConfigService, never>;
|
|
50
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AppConfigService>;
|
|
51
|
+
}
|
package/{src/Shared/services/global-error.handler.ts → Shared/services/global-error.handler.d.ts}
RENAMED
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import { ErrorHandler,
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @
|
|
8
|
-
* @
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
* @
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
import { ErrorHandler, Injector } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* GlobalErrorHandler is a custom error handler that implements the ErrorHandler interface.
|
|
5
|
+
* It is used to handle both HTTP errors and other types of errors globally in the application.
|
|
6
|
+
* @class
|
|
7
|
+
* @implements {ErrorHandler}
|
|
8
|
+
* @decorator {Injectable}
|
|
9
|
+
*/
|
|
10
|
+
export declare class GlobalErrorHandler implements ErrorHandler {
|
|
11
|
+
private injector;
|
|
12
|
+
/**
|
|
13
|
+
* Creates an instance of GlobalErrorHandler.
|
|
14
|
+
* @constructor
|
|
15
|
+
* @param {Injector} injector - The Angular injector used to get instances of services.
|
|
16
|
+
*/
|
|
17
|
+
constructor(injector: Injector);
|
|
18
|
+
/**
|
|
19
|
+
* Handles errors globally in the application.
|
|
20
|
+
*
|
|
21
|
+
* @param {any} error - The error object that needs to be handled.
|
|
22
|
+
* @returns {void}
|
|
23
|
+
*/
|
|
24
|
+
handleError(error: any): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalErrorHandler, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalErrorHandler>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Service for managing user session details.
|
|
5
|
+
* @class SessionService
|
|
6
|
+
* @typedef {SessionService}
|
|
7
|
+
*/
|
|
8
|
+
export declare class SessionService {
|
|
9
|
+
router: Router;
|
|
10
|
+
/**
|
|
11
|
+
* Creates an instance of SessionService.
|
|
12
|
+
* @param {Router} router - Angular Router for navigation.
|
|
13
|
+
*/
|
|
14
|
+
constructor(router: Router);
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves the current user's role from local storage.
|
|
17
|
+
* @returns {string | null} The user's role, or null if not found.
|
|
18
|
+
*/
|
|
19
|
+
getUserRole(): string | null;
|
|
20
|
+
/**
|
|
21
|
+
* Stores the user session data in local storage.
|
|
22
|
+
* @param {any} data - The session data to store.
|
|
23
|
+
*/
|
|
24
|
+
setUserSession(data: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves the stored user session data.
|
|
27
|
+
* @returns {any | null} The parsed session data, or null if not found.
|
|
28
|
+
*/
|
|
29
|
+
getUserSession(): any | null;
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves the user's permissions from the stored session data.
|
|
32
|
+
* @returns {any | null} The user's permissions, or null if not found.
|
|
33
|
+
*/
|
|
34
|
+
getUserPermissions(): any | null;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves the session ID from the stored session data.
|
|
37
|
+
* @returns {any | null} The session ID, or null if not found.
|
|
38
|
+
*/
|
|
39
|
+
getSessionID(): any | null;
|
|
40
|
+
/**
|
|
41
|
+
* Clears all stored session data from local storage.
|
|
42
|
+
*/
|
|
43
|
+
clearSession(): void;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SessionService, never>;
|
|
45
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SessionService>;
|
|
46
|
+
}
|