cat-documents-ng 0.0.4 → 0.0.6
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 -25
- package/projects/cat-document-lib/README.md +63 -0
- package/projects/cat-document-lib/jest.config.mjs +18 -0
- package/projects/cat-document-lib/ng-package.json +11 -0
- package/projects/cat-document-lib/package-lock.json +599 -0
- package/projects/cat-document-lib/package.json +19 -0
- package/projects/cat-document-lib/setup-jest.ts +10 -0
- package/projects/cat-document-lib/src/Shared/constant/SHARED.ts +232 -0
- package/{Shared/constant/URLS.d.ts → projects/cat-document-lib/src/Shared/constant/URLS.ts} +31 -29
- package/projects/cat-document-lib/src/Shared/services/app-config.service.spec.ts +16 -0
- package/projects/cat-document-lib/src/Shared/services/app-config.service.ts +73 -0
- package/{Shared/services/global-error.handler.d.ts → projects/cat-document-lib/src/Shared/services/global-error.handler.ts} +29 -27
- package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.html +6 -0
- package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.scss +0 -0
- package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.spec.ts +0 -0
- package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.ts +82 -0
- package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.html +35 -0
- package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.scss +12 -0
- package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.spec.ts +0 -0
- package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.ts +73 -0
- package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.html +33 -0
- package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.scss +22 -0
- package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +23 -0
- package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.ts +40 -0
- package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.html +56 -0
- package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.scss +26 -0
- package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.spec.ts +24 -0
- package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.ts +184 -0
- package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.html +244 -0
- package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.scss +36 -0
- package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +21 -0
- package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.ts +125 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.html +46 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.scss +0 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.spec.ts +0 -0
- package/{lib/document/components/folder-block/folder-block.component.d.ts → projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.ts} +51 -37
- package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.html +2 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.scss +0 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.spec.ts +0 -0
- package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.ts +29 -0
- package/projects/cat-document-lib/src/lib/document/document.module.ts +191 -0
- package/projects/cat-document-lib/src/lib/document/models/document.model.ts +39 -0
- package/{lib/document/models/folder.model.d.ts → projects/cat-document-lib/src/lib/document/models/folder.model.ts} +35 -29
- package/projects/cat-document-lib/src/lib/document/services/file-format.service.spec.ts +16 -0
- package/projects/cat-document-lib/src/lib/document/services/file-format.service.ts +41 -0
- package/projects/cat-document-lib/src/lib/document/state/document.query.ts +23 -0
- package/{lib/document/state/document.service.d.ts → projects/cat-document-lib/src/lib/document/state/document.service.ts} +95 -64
- package/{lib/document/state/document.state.d.ts → projects/cat-document-lib/src/lib/document/state/document.state.ts} +39 -30
- package/projects/cat-document-lib/src/lib/document/state/document.store.ts +23 -0
- package/{public-api.d.ts → projects/cat-document-lib/src/public-api.ts} +8 -3
- package/projects/cat-document-lib/tsconfig.lib.json +15 -0
- package/projects/cat-document-lib/tsconfig.lib.prod.json +11 -0
- package/projects/cat-document-lib/tsconfig.spec.json +15 -0
- 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/Shared/constant/SHARED.d.ts +0 -150
- package/Shared/services/app-config.service.d.ts +0 -51
- package/fesm2022/cat-documents-ng.mjs +0 -1411
- package/fesm2022/cat-documents-ng.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/document/components/document-container/document-container.component.d.ts +0 -44
- package/lib/document/components/document-list/document-list.component.d.ts +0 -47
- package/lib/document/components/document-list-item/document-list-item.component.d.ts +0 -28
- package/lib/document/components/document-upload/document-upload.component.d.ts +0 -113
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +0 -113
- package/lib/document/components/folder-container/folder-container.component.d.ts +0 -28
- package/lib/document/document.module.d.ts +0 -35
- package/lib/document/models/document.model.d.ts +0 -33
- package/lib/document/services/file-format.service.d.ts +0 -23
- package/lib/document/state/document.store.d.ts +0 -20
- /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
|
@@ -1,150 +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 declare class SHARED {
|
|
6
|
-
/**
|
|
7
|
-
* Represents the count of missing files.
|
|
8
|
-
*/
|
|
9
|
-
static MISSINGCOUNT: number;
|
|
10
|
-
/**
|
|
11
|
-
* Represents the count of pending files.
|
|
12
|
-
*/
|
|
13
|
-
static PENDINGCOUNT: number;
|
|
14
|
-
/**
|
|
15
|
-
* Represents an empty string.
|
|
16
|
-
*/
|
|
17
|
-
static EMPTY: string;
|
|
18
|
-
/**
|
|
19
|
-
* Represents an true.
|
|
20
|
-
* @static
|
|
21
|
-
* @type {boolean}
|
|
22
|
-
*/
|
|
23
|
-
static TRUE: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Represents an false.
|
|
26
|
-
* @static
|
|
27
|
-
* @type {boolean}
|
|
28
|
-
*/
|
|
29
|
-
static FALSE: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Represents an INITIAL_COUNT.
|
|
32
|
-
*/
|
|
33
|
-
static INITIAL_COUNT: number;
|
|
34
|
-
/**
|
|
35
|
-
* Represents an INITIAL_VALUE.
|
|
36
|
-
*/
|
|
37
|
-
static INITIAL_VALUE: number;
|
|
38
|
-
/**
|
|
39
|
-
* Represents the constant value for one (1).
|
|
40
|
-
* @static
|
|
41
|
-
* @type {number}
|
|
42
|
-
*/
|
|
43
|
-
static ONE: number;
|
|
44
|
-
/**
|
|
45
|
-
* Represents the constant value for two (2).
|
|
46
|
-
* @static
|
|
47
|
-
* @type {number}
|
|
48
|
-
*/
|
|
49
|
-
static TWO: number;
|
|
50
|
-
/**
|
|
51
|
-
* Represents the constant value for ten (10).
|
|
52
|
-
* @static
|
|
53
|
-
* @type {number}
|
|
54
|
-
*/
|
|
55
|
-
static TEN: number;
|
|
56
|
-
/**
|
|
57
|
-
* Represents the constant string value 'files' used for file-related operations.
|
|
58
|
-
* @static
|
|
59
|
-
* @type {string}
|
|
60
|
-
*/
|
|
61
|
-
static FILE: string;
|
|
62
|
-
/**
|
|
63
|
-
* Represents the array of file size units ('B', 'KB', 'MB') used for file size formatting.
|
|
64
|
-
* @static
|
|
65
|
-
* @type {string[]}
|
|
66
|
-
*/
|
|
67
|
-
static FILE_SIZE_UNITS: string[];
|
|
68
|
-
/**
|
|
69
|
-
* Show SEVERITY value.
|
|
70
|
-
* @static
|
|
71
|
-
* @type {'error'}
|
|
72
|
-
*/
|
|
73
|
-
static SEVERITY: string;
|
|
74
|
-
/**
|
|
75
|
-
* Show upload summery if it's failed.
|
|
76
|
-
* @static
|
|
77
|
-
* @type {'Upload Failed'}
|
|
78
|
-
*/
|
|
79
|
-
static UPLOAD_SUMMERY: string;
|
|
80
|
-
/**
|
|
81
|
-
* Represent empty array.
|
|
82
|
-
* @static
|
|
83
|
-
* @type {{}}
|
|
84
|
-
*/
|
|
85
|
-
static EMPTY_ARRAY: never[];
|
|
86
|
-
/**
|
|
87
|
-
* Represent contextId.
|
|
88
|
-
* @static
|
|
89
|
-
* @type {string}
|
|
90
|
-
*/
|
|
91
|
-
static CONTEXT_ID: string;
|
|
92
|
-
/**
|
|
93
|
-
* Represent fileSize.
|
|
94
|
-
* @static
|
|
95
|
-
* @type {string}
|
|
96
|
-
*/
|
|
97
|
-
static FILE_SIZE: string;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* `DUMMYDOCUMENTLIST` is a mock list of document objects used for testing and development purposes.
|
|
101
|
-
* Each document includes an ID, file name, status, and document URL.
|
|
102
|
-
*/
|
|
103
|
-
export declare const DUMMYDOCUMENTLIST: {
|
|
104
|
-
_id: number;
|
|
105
|
-
fileName: string;
|
|
106
|
-
status: string;
|
|
107
|
-
documentUrl: string;
|
|
108
|
-
}[];
|
|
109
|
-
/**
|
|
110
|
-
* `FOLDERPANEL` is a mock list of folder data representing various folders in the application.
|
|
111
|
-
* Each folder contains an ID, file count, text description, missing files count, and pending files count.
|
|
112
|
-
*/
|
|
113
|
-
export declare const FOLDERPANEL: {
|
|
114
|
-
_id: string;
|
|
115
|
-
fileCount: number;
|
|
116
|
-
text: string;
|
|
117
|
-
missingFiles: number;
|
|
118
|
-
pendingFiles: number;
|
|
119
|
-
}[];
|
|
120
|
-
/**
|
|
121
|
-
* Dummy data for sumaery.
|
|
122
|
-
* @type {{}}
|
|
123
|
-
*/
|
|
124
|
-
export declare const DUMMYSUMMARY: ({
|
|
125
|
-
status: string;
|
|
126
|
-
date: string;
|
|
127
|
-
icon: string;
|
|
128
|
-
color: string;
|
|
129
|
-
image: string;
|
|
130
|
-
} | {
|
|
131
|
-
status: string;
|
|
132
|
-
date: string;
|
|
133
|
-
icon: string;
|
|
134
|
-
color: string;
|
|
135
|
-
image?: undefined;
|
|
136
|
-
})[];
|
|
137
|
-
/**
|
|
138
|
-
* Dummy data for list box.
|
|
139
|
-
* @type {{}}
|
|
140
|
-
*/
|
|
141
|
-
export declare const COUNTRIES: {
|
|
142
|
-
name: string;
|
|
143
|
-
code: string;
|
|
144
|
-
checked: boolean;
|
|
145
|
-
}[];
|
|
146
|
-
/**
|
|
147
|
-
* Default supported image types.
|
|
148
|
-
* @type {{}}
|
|
149
|
-
*/
|
|
150
|
-
export declare const SUPPORTED_IMAGE_TYPES: string[];
|
|
@@ -1,51 +0,0 @@
|
|
|
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
|
-
}
|