cat-qw-lib 0.0.1 → 0.0.2
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/README.md +63 -63
- package/ng-package.json +10 -0
- package/package.json +16 -23
- package/src/assets/config/api.config.json +4 -0
- package/src/lib/admin/action-admin/action-admin.module.ts +16 -0
- package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.html +1 -0
- package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.scss +0 -0
- package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.spec.ts +23 -0
- package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.ts +11 -0
- package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.html +5 -0
- package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.scss +0 -0
- package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.spec.ts +23 -0
- package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.ts +24 -0
- package/src/lib/admin/action-admin/models/action.model.ts +12 -0
- package/src/lib/admin/action-admin/state/action.query.ts +11 -0
- package/src/lib/admin/action-admin/state/action.service.ts +18 -0
- package/src/lib/admin/action-admin/state/action.state.ts +14 -0
- package/src/lib/admin/action-admin/state/action.store.ts +14 -0
- package/src/lib/admin/admin.module.ts +22 -0
- package/src/lib/admin/api-admin/api-admin.module.ts +39 -0
- package/src/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.html +96 -0
- package/src/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.scss +6 -0
- package/src/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.spec.ts +23 -0
- package/src/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.ts +94 -0
- package/src/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.html +6 -0
- package/src/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.scss +0 -0
- package/src/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.spec.ts +23 -0
- package/src/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.ts +17 -0
- package/src/lib/admin/api-admin/components/api-credential-form/api-credential-form.component.html +29 -0
- package/src/lib/admin/api-admin/components/api-credential-form/api-credential-form.component.scss +0 -0
- package/src/lib/admin/api-admin/components/api-credential-form/api-credential-form.component.spec.ts +21 -0
- package/src/lib/admin/api-admin/components/api-credential-form/api-credential-form.component.ts +25 -0
- package/src/lib/admin/api-admin/models/api-admin.model.ts +16 -0
- package/src/lib/admin/api-admin/models/credentials.model.ts +4 -0
- package/src/lib/admin/api-admin/state/api-admin.query.ts +14 -0
- package/src/lib/admin/api-admin/state/api-admin.service.ts +31 -0
- package/src/lib/admin/api-admin/state/api-admin.state.ts +14 -0
- package/src/lib/admin/api-admin/state/api-admin.store.ts +13 -0
- package/src/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.css +0 -0
- package/src/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.html +1 -0
- package/src/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.spec.ts +23 -0
- package/src/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.ts +11 -0
- package/src/lib/admin/dd-admin/components/dd-admin-list/dd-admin-list.component.css +0 -0
- package/src/lib/admin/dd-admin/components/dd-admin-list/dd-admin-list.component.html +1 -0
- package/src/lib/admin/dd-admin/components/dd-admin-list/dd-admin-list.component.spec.ts +23 -0
- package/src/lib/admin/dd-admin/components/dd-admin-list/dd-admin-list.component.ts +11 -0
- package/src/lib/admin/dd-admin/dd-admin.module.ts +12 -0
- package/src/lib/admin/queue-admin/components/queue-admin-form/queue-admin-form.component.css +0 -0
- package/src/lib/admin/queue-admin/components/queue-admin-form/queue-admin-form.component.html +1 -0
- package/src/lib/admin/queue-admin/components/queue-admin-form/queue-admin-form.component.spec.ts +23 -0
- package/src/lib/admin/queue-admin/components/queue-admin-form/queue-admin-form.component.ts +11 -0
- package/src/lib/admin/queue-admin/components/queue-admin-list/queue-admin-list.component.css +0 -0
- package/src/lib/admin/queue-admin/components/queue-admin-list/queue-admin-list.component.html +1 -0
- package/src/lib/admin/queue-admin/components/queue-admin-list/queue-admin-list.component.spec.ts +23 -0
- package/src/lib/admin/queue-admin/components/queue-admin-list/queue-admin-list.component.ts +11 -0
- package/src/lib/admin/queue-admin/queue-admin.module.ts +12 -0
- package/src/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.css +0 -0
- package/src/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.html +1 -0
- package/src/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.spec.ts +23 -0
- package/src/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.ts +11 -0
- package/src/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.css +0 -0
- package/src/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.html +1 -0
- package/src/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.spec.ts +23 -0
- package/src/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.ts +11 -0
- package/src/lib/admin/widget-admin/widget-admin.module.ts +12 -0
- package/src/lib/shared/_base/base-control/base-control.component.html +1 -0
- package/src/lib/shared/_base/base-control/base-control.component.scss +0 -0
- package/src/lib/shared/_base/base-control/base-control.component.spec.ts +21 -0
- package/src/lib/shared/_base/base-control/base-control.component.ts +55 -0
- package/src/lib/shared/_base/base-form/base-form.component.html +1 -0
- package/src/lib/shared/_base/base-form/base-form.component.scss +0 -0
- package/src/lib/shared/_base/base-form/base-form.component.spec.ts +21 -0
- package/src/lib/shared/_base/base-form/base-form.component.ts +81 -0
- package/src/lib/shared/_base/base-list/base-list.component.html +1 -0
- package/src/lib/shared/_base/base-list/base-list.component.scss +0 -0
- package/src/lib/shared/_base/base-list/base-list.component.spec.ts +21 -0
- package/src/lib/shared/_base/base-list/base-list.component.ts +31 -0
- package/src/lib/shared/components/form-container/form-container.component.html +55 -0
- package/src/lib/shared/components/form-container/form-container.component.scss +108 -0
- package/src/lib/shared/components/form-container/form-container.component.spec.ts +21 -0
- package/src/lib/shared/components/form-container/form-container.component.ts +55 -0
- package/src/lib/shared/components/sidebar/sidebar.component.html +13 -0
- package/src/lib/shared/components/sidebar/sidebar.component.scss +45 -0
- package/src/lib/shared/components/sidebar/sidebar.component.spec.ts +21 -0
- package/src/lib/shared/components/sidebar/sidebar.component.ts +26 -0
- package/src/lib/shared/constant/CSS.ts +9 -0
- package/src/lib/shared/constant/DATASOURCES.ts +10 -0
- package/src/lib/shared/constant/ERROR.ts +3 -0
- package/src/lib/shared/constant/HEADERS.ts +4 -0
- package/src/lib/shared/constant/LIST-CONFIG.ts +10 -0
- package/src/lib/shared/constant/LOOKUPS.ts +3 -0
- package/src/lib/shared/constant/ROUTES.ts +12 -0
- package/src/lib/shared/constant/SHARED.ts +603 -0
- package/src/lib/shared/constant/URLS.ts +3 -0
- package/src/lib/shared/controls/button/button.component.html +25 -0
- package/src/lib/shared/controls/button/button.component.scss +0 -0
- package/src/lib/shared/controls/button/button.component.spec.ts +21 -0
- package/src/lib/shared/controls/button/button.component.ts +15 -0
- package/src/lib/shared/controls/check-box/check-box.component.html +22 -0
- package/src/lib/shared/controls/check-box/check-box.component.scss +32 -0
- package/src/lib/shared/controls/check-box/check-box.component.spec.ts +26 -0
- package/src/lib/shared/controls/check-box/check-box.component.ts +16 -0
- package/src/lib/shared/controls/date/date.component.html +43 -0
- package/src/lib/shared/controls/date/date.component.scss +0 -0
- package/src/lib/shared/controls/date/date.component.spec.ts +21 -0
- package/src/lib/shared/controls/date/date.component.ts +42 -0
- package/src/lib/shared/controls/dropdown/dropdown.component.html +28 -0
- package/src/lib/shared/controls/dropdown/dropdown.component.scss +12 -0
- package/src/lib/shared/controls/dropdown/dropdown.component.ts +71 -0
- package/src/lib/shared/controls/file-upload/file-upload.component.html +18 -0
- package/src/lib/shared/controls/file-upload/file-upload.component.scss +0 -0
- package/src/lib/shared/controls/file-upload/file-upload.component.spec.ts +21 -0
- package/src/lib/shared/controls/file-upload/file-upload.component.ts +19 -0
- package/src/lib/shared/controls/number-feild/number-feild.component.html +39 -0
- package/src/lib/shared/controls/number-feild/number-feild.component.scss +13 -0
- package/src/lib/shared/controls/number-feild/number-feild.component.spec.ts +21 -0
- package/src/lib/shared/controls/number-feild/number-feild.component.ts +35 -0
- package/src/lib/shared/controls/password/password.component.html +22 -0
- package/src/lib/shared/controls/password/password.component.scss +0 -0
- package/src/lib/shared/controls/password/password.component.spec.ts +28 -0
- package/src/lib/shared/controls/password/password.component.ts +24 -0
- package/src/lib/shared/controls/text-area/text-area.component.html +36 -0
- package/src/lib/shared/controls/text-area/text-area.component.scss +22 -0
- package/src/lib/shared/controls/text-area/text-area.component.spec.ts +23 -0
- package/src/lib/shared/controls/text-area/text-area.component.ts +25 -0
- package/src/lib/shared/controls/text-box/text-box.component.html +44 -0
- package/src/lib/shared/controls/text-box/text-box.component.scss +25 -0
- package/src/lib/shared/controls/text-box/text-box.component.spec.ts +30 -0
- package/src/lib/shared/controls/text-box/text-box.component.ts +26 -0
- package/src/lib/shared/controls/username/username.component.html +16 -0
- package/src/lib/shared/controls/username/username.component.scss +0 -0
- package/src/lib/shared/controls/username/username.component.spec.ts +29 -0
- package/src/lib/shared/controls/username/username.component.ts +17 -0
- package/src/lib/shared/index.ts +35 -0
- package/src/lib/shared/models/attribute.model.ts +42 -0
- package/src/lib/shared/models/base.model.ts +3 -0
- package/src/lib/shared/models/list.model.ts +27 -0
- package/src/lib/shared/models/message.model.ts +4 -0
- package/src/lib/shared/pipe/capitalize-words.pipe.spec.ts +8 -0
- package/src/lib/shared/pipe/capitalize-words.pipe.ts +17 -0
- package/src/lib/shared/services/app-config.service.spec.ts +16 -0
- package/src/lib/shared/services/app-config.service.ts +25 -0
- package/src/lib/shared/services/auth/auth.guard.spec.ts +17 -0
- package/src/lib/shared/services/auth/auth.guard.ts +25 -0
- package/src/lib/shared/services/data-transformer.service.spec.ts +16 -0
- package/src/lib/shared/services/data-transformer.service.ts +41 -0
- package/src/lib/shared/services/date-parser.service.spec.ts +16 -0
- package/src/lib/shared/services/date-parser.service.ts +54 -0
- package/src/lib/shared/services/list.service.spec.ts +16 -0
- package/src/lib/shared/services/list.service.ts +53 -0
- package/src/lib/shared/services/session.service.spec.ts +16 -0
- package/src/lib/shared/services/session.service.ts +37 -0
- package/src/lib/shared/services/table.builder.ts +38 -0
- package/src/lib/shared/services/validator.service.spec.ts +16 -0
- package/src/lib/shared/services/validator.service.ts +13 -0
- package/src/lib/shared/shared.module.ts +62 -0
- package/src/lib/shared/state/base.query.ts +48 -0
- package/src/lib/shared/state/base.service.ts +69 -0
- package/src/lib/shared/state/base.state.ts +6 -0
- package/src/lib/shared/state/base.store.ts +56 -0
- package/src/lib/shared/table-primary/components/table-primary.component.html +56 -0
- package/src/lib/shared/table-primary/components/table-primary.component.scss +187 -0
- package/src/lib/shared/table-primary/components/table-primary.component.spec.ts +21 -0
- package/src/lib/shared/table-primary/components/table-primary.component.ts +71 -0
- package/src/lib/shared/table-primary/models/table-primary-header.model.ts +7 -0
- package/src/lib/shared/table-primary/models/table-primary.model.ts +6 -0
- package/src/lib/widget/components/widget-body/widget-body.component.html +1 -0
- package/src/lib/widget/components/widget-body/widget-body.component.scss +0 -0
- package/src/lib/widget/components/widget-body/widget-body.component.spec.ts +23 -0
- package/src/lib/widget/components/widget-body/widget-body.component.ts +11 -0
- package/src/lib/widget/components/widget-container/widget-container.component.css +0 -0
- package/src/lib/widget/components/widget-container/widget-container.component.html +1 -0
- package/src/lib/widget/components/widget-container/widget-container.component.spec.ts +23 -0
- package/src/lib/widget/components/widget-container/widget-container.component.ts +11 -0
- package/src/lib/widget/components/widget-footer/widget-footer.component.css +0 -0
- package/src/lib/widget/components/widget-footer/widget-footer.component.html +1 -0
- package/src/lib/widget/components/widget-footer/widget-footer.component.spec.ts +23 -0
- package/src/lib/widget/components/widget-footer/widget-footer.component.ts +11 -0
- package/src/lib/widget/components/widget-header/widget-header.component.css +0 -0
- package/src/lib/widget/components/widget-header/widget-header.component.html +1 -0
- package/src/lib/widget/components/widget-header/widget-header.component.spec.ts +23 -0
- package/src/lib/widget/components/widget-header/widget-header.component.ts +11 -0
- package/src/lib/widget/components/widget-item/widget-item.component.css +0 -0
- package/src/lib/widget/components/widget-item/widget-item.component.html +1 -0
- package/src/lib/widget/components/widget-item/widget-item.component.spec.ts +23 -0
- package/src/lib/widget/components/widget-item/widget-item.component.ts +11 -0
- package/src/lib/widget/widget.module.ts +12 -0
- package/src/public-api.ts +11 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +15 -0
- package/fesm2022/cat-qw-lib.mjs +0 -42
- package/fesm2022/cat-qw-lib.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/cat-qw-lib.component.d.ts +0 -5
- package/lib/cat-qw-lib.service.d.ts +0 -6
- package/public-api.d.ts +0 -2
package/README.md
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
# CatQwLib
|
|
2
|
-
|
|
3
|
-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.0.0.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ng generate component component-name
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
ng generate --help
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Building
|
|
20
|
-
|
|
21
|
-
To build the library, run:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
ng build cat-qw-lib
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
-
|
|
29
|
-
### Publishing the Library
|
|
30
|
-
|
|
31
|
-
Once the project is built, you can publish your library by following these steps:
|
|
32
|
-
|
|
33
|
-
1. Navigate to the `dist` directory:
|
|
34
|
-
```bash
|
|
35
|
-
cd dist/cat-qw-lib
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
-
```bash
|
|
40
|
-
npm publish
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Running unit tests
|
|
44
|
-
|
|
45
|
-
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
ng test
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Running end-to-end tests
|
|
52
|
-
|
|
53
|
-
For end-to-end (e2e) testing, run:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
ng e2e
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
-
|
|
61
|
-
## Additional Resources
|
|
62
|
-
|
|
63
|
-
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
1
|
+
# CatQwLib
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.0.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build cat-qw-lib
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
```bash
|
|
35
|
+
cd dist/cat-qw-lib
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
+
```bash
|
|
40
|
+
npm publish
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Running unit tests
|
|
44
|
+
|
|
45
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
ng test
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Running end-to-end tests
|
|
52
|
+
|
|
53
|
+
For end-to-end (e2e) testing, run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ng e2e
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
+
|
|
61
|
+
## Additional Resources
|
|
62
|
+
|
|
63
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cat-qw-lib",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^19.0.0",
|
|
6
|
-
"@angular/core": "^19.0.0"
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"tslib": "^2.3.0"
|
|
10
|
-
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
".": {
|
|
19
|
-
"types": "./index.d.ts",
|
|
20
|
-
"default": "./fesm2022/cat-qw-lib.mjs"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "cat-qw-lib",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^19.0.0",
|
|
6
|
+
"@angular/core": "^19.0.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"typings": "index.d.ts",
|
|
12
|
+
"main": "bundles/cat-qw-lib.umd.js",
|
|
13
|
+
"module": "fesm2015/cat-qw-lib.js",
|
|
14
|
+
"es2015": "fesm2015/cat-qw-lib.js",
|
|
15
|
+
"sideEffects": false
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { AdminActionListComponent } from './components/admin-action-list/admin-action-list.component';
|
|
4
|
+
import { TablePrimaryComponent } from '../../shared';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@NgModule({
|
|
9
|
+
declarations: [AdminActionListComponent],
|
|
10
|
+
imports: [
|
|
11
|
+
CommonModule,
|
|
12
|
+
TablePrimaryComponent
|
|
13
|
+
],
|
|
14
|
+
exports: [AdminActionListComponent]
|
|
15
|
+
})
|
|
16
|
+
export class ActionAdminModule { }
|
package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<p>admin-action-form works!</p>
|
package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.scss
ADDED
|
File without changes
|
package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.spec.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { AdminActionFormComponent } from './admin-action-form.component';
|
|
4
|
+
|
|
5
|
+
describe('AdminActionFormComponent', () => {
|
|
6
|
+
let component: AdminActionFormComponent;
|
|
7
|
+
let fixture: ComponentFixture<AdminActionFormComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [AdminActionFormComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(AdminActionFormComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
package/src/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-admin-action-form',
|
|
5
|
+
standalone : false,
|
|
6
|
+
templateUrl: './admin-action-form.component.html',
|
|
7
|
+
styleUrl: './admin-action-form.component.scss'
|
|
8
|
+
})
|
|
9
|
+
export class AdminActionFormComponent {
|
|
10
|
+
|
|
11
|
+
}
|
package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.scss
ADDED
|
File without changes
|
package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.spec.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { AdminActionListComponent } from './admin-action-list.component';
|
|
4
|
+
|
|
5
|
+
describe('AdminActionListComponent', () => {
|
|
6
|
+
let component: AdminActionListComponent;
|
|
7
|
+
let fixture: ComponentFixture<AdminActionListComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [AdminActionListComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(AdminActionListComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
package/src/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { BaseListComponent } from '../../../../shared/_base/base-list/base-list.component';
|
|
3
|
+
import { ActionModel } from '../../models/action.model';
|
|
4
|
+
import { TableBuilder } from '../../../../shared/services/table.builder';
|
|
5
|
+
import { ActionService } from '../../state/action.service';
|
|
6
|
+
import { actionHiddenHeaderList, actionList, actionTableColumnWidthList } from '../../../../shared/constant/SHARED';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'lib-admin-action-list',
|
|
10
|
+
standalone : false,
|
|
11
|
+
templateUrl: './admin-action-list.component.html',
|
|
12
|
+
styleUrl: './admin-action-list.component.scss'
|
|
13
|
+
})
|
|
14
|
+
export class AdminActionListComponent extends BaseListComponent<ActionModel>{
|
|
15
|
+
constructor(service: ActionService, private tableBuilder: TableBuilder){
|
|
16
|
+
super(service, tableBuilder)
|
|
17
|
+
this.tableBuilder.hiddenHeaders = actionHiddenHeaderList;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
override ngOnInit(): void {
|
|
21
|
+
const actionTableColumnWidths = actionTableColumnWidthList;
|
|
22
|
+
this.table = this.tableBuilder.buildTable(actionList, actionTableColumnWidths);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SHARED } from "../../../shared/constant/SHARED";
|
|
2
|
+
import { BaseModel } from "../../../shared/models/base.model";
|
|
3
|
+
|
|
4
|
+
export class ActionModel extends BaseModel {
|
|
5
|
+
actionName!: string;
|
|
6
|
+
apiEndPoint!: string;
|
|
7
|
+
prompt!: string;
|
|
8
|
+
queue!: string;
|
|
9
|
+
status!: StatusType;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type StatusType = "Enable" | "Disable";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { ActionModel } from '../models/action.model';
|
|
3
|
+
import { ActionStore } from './action.store';
|
|
4
|
+
import { BaseQuery } from '../../../shared/state/base.query';
|
|
5
|
+
|
|
6
|
+
@Injectable({ providedIn: 'root' })
|
|
7
|
+
export class ActionQuery extends BaseQuery<ActionModel> {
|
|
8
|
+
constructor(protected override store: ActionStore) {
|
|
9
|
+
super(store);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
import { ActionModel } from '../models/action.model';
|
|
5
|
+
import { ActionStore } from './action.store';
|
|
6
|
+
import { DATASOURCES } from '../../../shared/constant/DATASOURCES';
|
|
7
|
+
import { BaseService } from '../../../shared/state/base.service';
|
|
8
|
+
import { AppConfigService } from '../../../shared/services/app-config.service';
|
|
9
|
+
import { ListService } from '../../../shared/services/list.service';
|
|
10
|
+
|
|
11
|
+
@Injectable({ providedIn: 'root' })
|
|
12
|
+
export class ActionService extends BaseService<ActionModel> {
|
|
13
|
+
|
|
14
|
+
constructor(public actionStore: ActionStore, http: HttpClient, appConfigService : AppConfigService, listService:ListService) {
|
|
15
|
+
super(http, actionStore, appConfigService,listService);
|
|
16
|
+
this._pathName = DATASOURCES.ACTIONS;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseState } from "../../../shared/state/base.state";
|
|
2
|
+
import { ActionModel } from "../models/action.model";
|
|
3
|
+
|
|
4
|
+
export interface ActionState extends BaseState {
|
|
5
|
+
actions: ActionModel[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function createInitialState(): ActionState {
|
|
9
|
+
return {
|
|
10
|
+
actions: [],
|
|
11
|
+
records: [],
|
|
12
|
+
lists: []
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { StoreConfig } from '@datorama/akita';
|
|
3
|
+
import { BaseStore } from '../../../shared/state/base.store';
|
|
4
|
+
import { ActionModel } from '../models/action.model';
|
|
5
|
+
|
|
6
|
+
@Injectable({ providedIn: 'root' })
|
|
7
|
+
@StoreConfig({ name: 'action' })
|
|
8
|
+
export class ActionStore extends BaseStore<ActionModel> {
|
|
9
|
+
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { AppConfigService } from '../shared';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@NgModule({
|
|
8
|
+
declarations: [],
|
|
9
|
+
imports: [
|
|
10
|
+
CommonModule
|
|
11
|
+
],
|
|
12
|
+
providers: [
|
|
13
|
+
{
|
|
14
|
+
provide: APP_INITIALIZER,
|
|
15
|
+
useFactory: (configService: AppConfigService) => () =>
|
|
16
|
+
configService.loadAppConfig(),
|
|
17
|
+
deps: [AppConfigService],
|
|
18
|
+
multi: true,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
})
|
|
22
|
+
export class AdminModule { }
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ApiAdminFormComponent } from './components/api-admin-form/api-admin-form.component';
|
|
4
|
+
import { ApiAdminListComponent } from './components/api-admin-list/api-admin-list.component';
|
|
5
|
+
import { FormsModule } from '@angular/forms';
|
|
6
|
+
import { AppConfigService, PasswordComponent, SharedModule, TablePrimaryComponent, UsernameComponent } from '../../shared';
|
|
7
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
8
|
+
import { ButtonModule } from 'primeng/button';
|
|
9
|
+
import { ApiCredentialFormComponent } from './components/api-credential-form/api-credential-form.component';
|
|
10
|
+
import { TextAreaComponent } from '../../shared/controls/text-area/text-area.component';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@NgModule({
|
|
14
|
+
declarations: [ApiAdminFormComponent,ApiCredentialFormComponent ,ApiAdminListComponent],
|
|
15
|
+
imports: [
|
|
16
|
+
CommonModule,
|
|
17
|
+
FormsModule,
|
|
18
|
+
SharedModule,
|
|
19
|
+
HttpClientModule,
|
|
20
|
+
ButtonModule,
|
|
21
|
+
UsernameComponent,
|
|
22
|
+
PasswordComponent,
|
|
23
|
+
TextAreaComponent,
|
|
24
|
+
TablePrimaryComponent
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
],
|
|
28
|
+
exports : [ApiAdminFormComponent, ApiAdminListComponent],
|
|
29
|
+
providers: [
|
|
30
|
+
{
|
|
31
|
+
provide: APP_INITIALIZER,
|
|
32
|
+
useFactory: (configService: AppConfigService) => () =>
|
|
33
|
+
configService.loadAppConfig(),
|
|
34
|
+
deps: [AppConfigService],
|
|
35
|
+
multi: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
})
|
|
39
|
+
export class ApiAdminModule { }
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<form-container
|
|
2
|
+
[headerText]="'Queue / Api Management Form'"
|
|
3
|
+
[messages]="messages"
|
|
4
|
+
(onSave)="handleSubmit()"
|
|
5
|
+
[showSave]="true"
|
|
6
|
+
>
|
|
7
|
+
<div class="card p-fluid p-formgrid grid ">
|
|
8
|
+
<h4 class="font-bold col-12 md:col-12">Api Management Form</h4>
|
|
9
|
+
<div class="col-12 md:col-6">
|
|
10
|
+
<text-box
|
|
11
|
+
[store]="apiAdminStore"
|
|
12
|
+
[record]="record"
|
|
13
|
+
[attributeModel]="{
|
|
14
|
+
readonly: false,
|
|
15
|
+
name: 'name',
|
|
16
|
+
isRequired: true,
|
|
17
|
+
displayText: 'Name',
|
|
18
|
+
placeholder: 'Enter Name'
|
|
19
|
+
}"
|
|
20
|
+
></text-box>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="col-12 md:col-6">
|
|
23
|
+
<text-box
|
|
24
|
+
[store]="apiAdminStore"
|
|
25
|
+
[record]="record"
|
|
26
|
+
[attributeModel]="{
|
|
27
|
+
readonly: false,
|
|
28
|
+
name: 'path',
|
|
29
|
+
isRequired: true,
|
|
30
|
+
displayText: 'Path',
|
|
31
|
+
placeholder: 'Enter Path'
|
|
32
|
+
}"
|
|
33
|
+
></text-box>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="col-12 md:col-2">
|
|
37
|
+
<button
|
|
38
|
+
pButton
|
|
39
|
+
pRipple
|
|
40
|
+
type="button"
|
|
41
|
+
label="Validate"
|
|
42
|
+
(click)="hanldeValidateApi()"
|
|
43
|
+
class="p-button-raised"
|
|
44
|
+
></button>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="card p-fluid p-formgrid grid ">
|
|
48
|
+
<h4 class="font-bold">Other Details</h4>
|
|
49
|
+
<div class="col-12 md:col-12 p-0 m-0">
|
|
50
|
+
<api-credential-form [record]="record"></api-credential-form>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="col-12 md:col-6">
|
|
53
|
+
<dropdown
|
|
54
|
+
[store]="apiAdminStore"
|
|
55
|
+
[record]="record"
|
|
56
|
+
[attributeModel]="{
|
|
57
|
+
name: 'parentApiConfigID',
|
|
58
|
+
dataSource: 'apiConfig',
|
|
59
|
+
listLabelProperty: 'name',
|
|
60
|
+
listValueProperty: '_id',
|
|
61
|
+
displayText: 'Select Parent',
|
|
62
|
+
placeholder: 'Select Parent API',
|
|
63
|
+
childListName: 'parentKey',
|
|
64
|
+
childListKey: 'name'
|
|
65
|
+
}"
|
|
66
|
+
(onInput)="handleModelChange($event)"
|
|
67
|
+
></dropdown>
|
|
68
|
+
|
|
69
|
+
</div>
|
|
70
|
+
<div class="col-12 md:col-6">
|
|
71
|
+
<dropdown
|
|
72
|
+
[store]="apiAdminStore"
|
|
73
|
+
[record]="record"
|
|
74
|
+
[attributeModel]="{
|
|
75
|
+
name:'parentKey',
|
|
76
|
+
displayText : 'Property',
|
|
77
|
+
placeholder: 'Select Property',
|
|
78
|
+
options: apiPropertyList
|
|
79
|
+
}"></dropdown>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="col-12 md:col-12">
|
|
83
|
+
<text-area
|
|
84
|
+
[store]="apiAdminStore"
|
|
85
|
+
[record]="record"
|
|
86
|
+
[attributeModel]="{
|
|
87
|
+
readonly: false,
|
|
88
|
+
name: 'description',
|
|
89
|
+
isRequired: false,
|
|
90
|
+
displayText: 'Description',
|
|
91
|
+
placeholder: 'Enter Description'
|
|
92
|
+
}"
|
|
93
|
+
></text-area>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</form-container>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ApiAdminFormComponent } from './api-admin-form.component';
|
|
4
|
+
|
|
5
|
+
describe('ApiAdminFormComponent', () => {
|
|
6
|
+
let component: ApiAdminFormComponent;
|
|
7
|
+
let fixture: ComponentFixture<ApiAdminFormComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ApiAdminFormComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ApiAdminFormComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Component, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
3
|
+
import { Message, SelectItem } from 'primeng/api';
|
|
4
|
+
import { BaseFormComponent, SHARED } from '../../../../shared';
|
|
5
|
+
import { ValidatorService } from '../../../../shared/services/validator.service';
|
|
6
|
+
import { Credentials } from '../../models/credentials.model';
|
|
7
|
+
import { ROUTES } from '../../../../shared/constant/ROUTES';
|
|
8
|
+
import { ApiAdminService } from '../../state/api-admin.service';
|
|
9
|
+
import { ApiAdminStore } from '../../state/api-admin.store';
|
|
10
|
+
import { ApiAdminModel } from '../../models/api-admin.model';
|
|
11
|
+
import { Subscription } from 'rxjs';
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'lib-api-admin-form',
|
|
14
|
+
templateUrl: './api-admin-form.component.html',
|
|
15
|
+
styleUrl: './api-admin-form.component.scss',
|
|
16
|
+
standalone: false
|
|
17
|
+
})
|
|
18
|
+
export class ApiAdminFormComponent extends BaseFormComponent<ApiAdminModel> implements OnInit , OnDestroy{
|
|
19
|
+
|
|
20
|
+
messages: Message[] = SHARED.EMPTYARRAY;
|
|
21
|
+
name: string = SHARED.EMPTY;
|
|
22
|
+
selectedParentId!: string;
|
|
23
|
+
filteredRecords: string[] = SHARED.EMPTYARRAY;
|
|
24
|
+
dropdownOptions: any[] = SHARED.EMPTYARRAY;
|
|
25
|
+
apiPropertyList!: SelectItem[];
|
|
26
|
+
private recordChangeSubscription: Subscription | null = null;
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
constructor(public apiAdminService: ApiAdminService, override validatorService: ValidatorService, override router: Router, override activatedRoute: ActivatedRoute, public apiAdminStore: ApiAdminStore) {
|
|
30
|
+
super(apiAdminService, validatorService, router, activatedRoute)
|
|
31
|
+
this.record.credentials = new Credentials();
|
|
32
|
+
this.record.isActive = true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
override ngOnInit(): void {
|
|
36
|
+
super.ngOnInit();
|
|
37
|
+
this.recordChangeSubscription = this.recordChange.subscribe((res) => {
|
|
38
|
+
if (this.record && this.record.parentApiConfigID) {
|
|
39
|
+
this.apiPropertyList = [{
|
|
40
|
+
label: this.record.parentKey,
|
|
41
|
+
value: this.record.parentKey
|
|
42
|
+
}]
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
hanldeValidateApi() {
|
|
48
|
+
const payload = {
|
|
49
|
+
apiPath: this.record.path,
|
|
50
|
+
credentials: SHARED.token
|
|
51
|
+
}
|
|
52
|
+
if (this.record.path) {
|
|
53
|
+
this.apiAdminService.checkApiByPathName(ROUTES.VALIDATEAPI, payload).subscribe({
|
|
54
|
+
next: (res: any) => {
|
|
55
|
+
if (res) {
|
|
56
|
+
this.messages = [{ severity: SHARED.SUCCESS, detail: res.message }];
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
this.messages = SHARED.EMPTYARRAY
|
|
59
|
+
}, 3000);
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
error: (error: any) => {
|
|
63
|
+
this.messages = [{ severity: SHARED.ERROR, detail: error.error.message }];
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
this.messages = SHARED.EMPTYARRAY;
|
|
66
|
+
}, 3000);
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
} else {
|
|
70
|
+
this.messages = [{ severity: SHARED.ERROR, detail: SHARED.INVALID_API_PATH }];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
handleModelChange(event: string) {
|
|
75
|
+
if (event) {
|
|
76
|
+
this.apiAdminService.getById(event).subscribe((res: any) => {
|
|
77
|
+
this.apiPropertyList = res.properties.map((property: string) => ({
|
|
78
|
+
label: property,
|
|
79
|
+
value: property
|
|
80
|
+
}));
|
|
81
|
+
})
|
|
82
|
+
} else {
|
|
83
|
+
this.record.parentKey = SHARED.EMPTY;
|
|
84
|
+
this.apiPropertyList = SHARED.EMPTYARRAY;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
ngOnDestroy(): void {
|
|
89
|
+
if (this.recordChangeSubscription) {
|
|
90
|
+
this.recordChangeSubscription.unsubscribe();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|