cat-documents-ng 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +19 -15
  2. package/Shared/constant/SHARED.d.ts +150 -0
  3. package/{projects/cat-document-lib/src/Shared/constant/URLS.ts → Shared/constant/URLS.d.ts} +29 -31
  4. package/Shared/services/app-config.service.d.ts +51 -0
  5. package/{projects/cat-document-lib/src/Shared/services/global-error.handler.ts → Shared/services/global-error.handler.d.ts} +27 -29
  6. package/fesm2022/cat-documents-ng.mjs +1411 -0
  7. package/fesm2022/cat-documents-ng.mjs.map +1 -0
  8. package/index.d.ts +5 -0
  9. package/lib/document/components/document-container/document-container.component.d.ts +44 -0
  10. package/lib/document/components/document-list/document-list.component.d.ts +47 -0
  11. package/lib/document/components/document-list-item/document-list-item.component.d.ts +28 -0
  12. package/lib/document/components/document-upload/document-upload.component.d.ts +113 -0
  13. package/lib/document/components/document-viewer/document-viewer.component.d.ts +113 -0
  14. package/{projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.ts → lib/document/components/folder-block/folder-block.component.d.ts} +37 -51
  15. package/lib/document/components/folder-container/folder-container.component.d.ts +28 -0
  16. package/lib/document/document.module.d.ts +35 -0
  17. package/lib/document/models/document.model.d.ts +33 -0
  18. package/{projects/cat-document-lib/src/lib/document/models/folder.model.ts → lib/document/models/folder.model.d.ts} +29 -35
  19. package/lib/document/services/file-format.service.d.ts +23 -0
  20. package/{projects/cat-document-lib/src/lib/document/state/document.service.ts → lib/document/state/document.service.d.ts} +64 -95
  21. package/{projects/cat-document-lib/src/lib/document/state/document.state.ts → lib/document/state/document.state.d.ts} +30 -39
  22. package/lib/document/state/document.store.d.ts +20 -0
  23. package/package.json +25 -66
  24. package/{projects/cat-document-lib/src/public-api.ts → public-api.d.ts} +3 -8
  25. package/src/assets/config/api.config.json +4 -0
  26. package/.github/PULL_REQUEST_TEMPLATE.md +0 -32
  27. package/.github/workflows/pr-validation.yml +0 -87
  28. package/.husky/pre-commit +0 -4
  29. package/angular.json +0 -119
  30. package/eslint.config.cjs +0 -148
  31. package/projects/cat-document-lib/README.md +0 -63
  32. package/projects/cat-document-lib/jest.config.mjs +0 -18
  33. package/projects/cat-document-lib/ng-package.json +0 -11
  34. package/projects/cat-document-lib/package-lock.json +0 -599
  35. package/projects/cat-document-lib/package.json +0 -19
  36. package/projects/cat-document-lib/setup-jest.ts +0 -10
  37. package/projects/cat-document-lib/src/Shared/constant/SHARED.ts +0 -232
  38. package/projects/cat-document-lib/src/Shared/services/app-config.service.spec.ts +0 -16
  39. package/projects/cat-document-lib/src/Shared/services/app-config.service.ts +0 -73
  40. package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.html +0 -6
  41. package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.scss +0 -0
  42. package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.spec.ts +0 -0
  43. package/projects/cat-document-lib/src/lib/document/components/document-container/document-container.component.ts +0 -82
  44. package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.html +0 -35
  45. package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.scss +0 -12
  46. package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.spec.ts +0 -0
  47. package/projects/cat-document-lib/src/lib/document/components/document-list/document-list.component.ts +0 -73
  48. package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.html +0 -33
  49. package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.scss +0 -22
  50. package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +0 -23
  51. package/projects/cat-document-lib/src/lib/document/components/document-list-item/document-list-item.component.ts +0 -40
  52. package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.html +0 -56
  53. package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.scss +0 -26
  54. package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.spec.ts +0 -24
  55. package/projects/cat-document-lib/src/lib/document/components/document-upload/document-upload.component.ts +0 -184
  56. package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.html +0 -244
  57. package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.scss +0 -36
  58. package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +0 -21
  59. package/projects/cat-document-lib/src/lib/document/components/document-viewer/document-viewer.component.ts +0 -125
  60. package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.html +0 -46
  61. package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.scss +0 -0
  62. package/projects/cat-document-lib/src/lib/document/components/folder-block/folder-block.component.spec.ts +0 -0
  63. package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.html +0 -2
  64. package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.scss +0 -0
  65. package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.spec.ts +0 -0
  66. package/projects/cat-document-lib/src/lib/document/components/folder-container/folder-container.component.ts +0 -29
  67. package/projects/cat-document-lib/src/lib/document/document.module.ts +0 -191
  68. package/projects/cat-document-lib/src/lib/document/models/document.model.ts +0 -39
  69. package/projects/cat-document-lib/src/lib/document/services/file-format.service.spec.ts +0 -16
  70. package/projects/cat-document-lib/src/lib/document/services/file-format.service.ts +0 -41
  71. package/projects/cat-document-lib/src/lib/document/state/document.query.ts +0 -23
  72. package/projects/cat-document-lib/src/lib/document/state/document.store.ts +0 -23
  73. package/projects/cat-document-lib/tsconfig.lib.json +0 -15
  74. package/projects/cat-document-lib/tsconfig.lib.prod.json +0 -11
  75. package/projects/cat-document-lib/tsconfig.spec.json +0 -15
  76. package/public/favicon.ico +0 -0
  77. package/src/app/app.component.html +0 -1
  78. package/src/app/app.component.scss +0 -0
  79. package/src/app/app.component.spec.ts +0 -29
  80. package/src/app/app.component.ts +0 -15
  81. package/src/app/app.module.ts +0 -60
  82. package/src/app/app.routing.module.ts +0 -19
  83. package/src/index.html +0 -13
  84. package/src/main.ts +0 -5
  85. package/src/styles.scss +0 -39
  86. package/tsconfig.app.json +0 -15
  87. package/tsconfig.json +0 -32
  88. /package/{projects/cat-document-lib/src → src}/assets/images/FolderImg.png +0 -0
  89. /package/{projects/cat-document-lib/src → src}/assets/images/Frame.png +0 -0
  90. /package/{projects/cat-document-lib/src → src}/assets/images/document.png +0 -0
@@ -0,0 +1,4 @@
1
+ {
2
+ "baseApi": "http://localhost:3200/api/",
3
+ "apiUrl": "http://qa-gb.api.dynamatix.com:3100/api/"
4
+ }
@@ -1,32 +0,0 @@
1
- ## Hello Developer,
2
- Thank you for raising the Pull Request!
3
- We greatly appreciate your efforts and contributions to the team. To ensure the quality and standards our team is committed to, we kindly request you to complete the checklist below before submitting the PR.
4
-
5
- ## Pull Request Checklist
6
-
7
- ### Code Quality
8
- - [Y/N] Code adheres to coding standards and style guides.
9
- - [Y/N] Code is properly commented and documented.
10
- - [Y/N] No Hard-coded values are added.
11
- - [Y/N] PR doesn't include more than 10 files.
12
-
13
- ### Clean Coding
14
- - [Y/N] Classes and methods adheres to Single Responsibility Principle
15
- - [Y/N] Classes are not exceeding 200 lines of code
16
- - [Y/N] Methods are not exceeding 20 lines of code
17
-
18
- ### Testing
19
- - [Y/N] Unit tests are written and executed.
20
- - [Y/N] All tests pass successfully.
21
- - [Y/N] Manual testing is completed and verified.
22
-
23
- ### Functionality
24
- - [Y/N] Feature behaves as expected.
25
- - [Y/N] Edge cases are handled.
26
-
27
- ### Documentation
28
- - [Y/N] Relevant documentation is updated (e.g., README, user guides, API docs).
29
-
30
- ### Dependencies
31
- - [Y/N] No unused dependencies or imports.
32
- - [Y/N] Dependencies are updated and compatible.
@@ -1,87 +0,0 @@
1
- name: PR Validation
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - qa
7
-
8
- jobs:
9
- lint:
10
- name: Run Linting
11
- runs-on: ubuntu-latest
12
-
13
- strategy:
14
- matrix:
15
- node-version: [22]
16
-
17
- steps:
18
- - name: Checkout code
19
- uses: actions/checkout@v3
20
-
21
- - name: Setup Node.js
22
- uses: actions/setup-node@v3
23
- with:
24
- node-version: ${{ matrix.node-version }}
25
-
26
- - name: Install dependencies
27
- run: npm install
28
-
29
- - name: Run linting
30
- run: npm run lint
31
-
32
- check-commit:
33
- name: Check Commit
34
- runs-on: ubuntu-latest
35
-
36
- steps:
37
- # Checkout the repository
38
- - name: Checkout code
39
- uses: actions/checkout@v3
40
- with:
41
- fetch-depth: 0
42
-
43
- - name: Check Commit messages
44
- id: check-commit-messages
45
- run: |
46
- # Validate commit messages
47
- git log --no-merges --pretty=%B ${{ github.event.pull_request.base.sha || 'HEAD~20' }}..HEAD | while read -r commit_msg || [[ -n "$commit_msg" ]]; do
48
-
49
- # Skip empty commit messages
50
- if [[ -z "$commit_msg" ]]; then
51
- continue
52
- fi
53
-
54
- echo "🔍 Checking commit message: '$commit_msg'"
55
-
56
- if echo "$commit_msg" | grep -Eq '^(docs|test|feature|fix|refactor):|^\((docs|test|feature|fix|refactor)\):'; then
57
- echo "✅ Valid commit message: '$commit_msg'"
58
- else
59
- echo "❌ Invalid commit message: '$commit_msg'"
60
- exit 1
61
- fi
62
- done
63
-
64
- echo "✅ All commit messages passed validation."
65
-
66
- # tests:
67
- # name: Run Tests
68
- # runs-on: ubuntu-latest
69
-
70
- # strategy:
71
- # matrix:
72
- # node-version: [22]
73
-
74
- # steps:
75
- # - name: Checkout code
76
- # uses: actions/checkout@v3
77
-
78
- # - name: Setup Node.js
79
- # uses: actions/setup-node@v3
80
- # with:
81
- # node-version: ${{ matrix.node-version }}
82
-
83
- # - name: Install dependencies
84
- # run: npm install
85
-
86
- # - name: Run tests
87
- # run: npm test
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- npx lint-staged
package/angular.json DELETED
@@ -1,119 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
- "version": 1,
4
- "newProjectRoot": "projects",
5
- "projects": {
6
- "cat-documents-ng": {
7
- "projectType": "application",
8
- "schematics": {
9
- "@schematics/angular:component": {
10
- "style": "scss"
11
- }
12
- },
13
- "root": "",
14
- "sourceRoot": "src",
15
- "prefix": "app",
16
- "architect": {
17
- "build": {
18
- "builder": "@angular-devkit/build-angular:application",
19
- "options": {
20
- "outputPath": "dist/cat-documents-ng",
21
- "index": "src/index.html",
22
- "browser": "src/main.ts",
23
- "polyfills": ["zone.js"],
24
- "tsConfig": "tsconfig.app.json",
25
- "inlineStyleLanguage": "scss",
26
- "assets": [
27
- "src/favicon.ico",
28
- "src/assets",
29
- {
30
- "glob": "**/*",
31
- "input": "dist/cat-document-lib/src/assets",
32
- "output": "assets"
33
- }
34
- ],
35
- "styles": [
36
- "./node_modules/primeng/resources/themes/saga-blue/theme.css",
37
- "./node_modules/primeng/resources/primeng.min.css",
38
- "./node_modules/primeicons/primeicons.css",
39
- "./node_modules/primeflex/primeflex.css",
40
- "src/styles.scss"
41
- ],
42
- "scripts": []
43
- },
44
- "configurations": {
45
- "production": {
46
- "budgets": [
47
- {
48
- "type": "initial",
49
- "maximumWarning": "3mb",
50
- "maximumError": "3MB"
51
- },
52
- {
53
- "type": "anyComponentStyle",
54
- "maximumWarning": "4kB",
55
- "maximumError": "8kB"
56
- }
57
- ],
58
- "outputHashing": "all"
59
- },
60
- "development": {
61
- "optimization": false,
62
- "extractLicenses": false,
63
- "sourceMap": true
64
- }
65
- },
66
- "defaultConfiguration": "production"
67
- },
68
- "serve": {
69
- "builder": "@angular-devkit/build-angular:dev-server",
70
- "configurations": {
71
- "production": {
72
- "buildTarget": "cat-documents-ng:build:production"
73
- },
74
- "development": {
75
- "buildTarget": "cat-documents-ng:build:development"
76
- }
77
- },
78
- "defaultConfiguration": "development"
79
- },
80
- "extract-i18n": {
81
- "builder": "@angular-devkit/build-angular:extract-i18n"
82
- },
83
- "lint": {
84
- "builder": "@angular-eslint/builder:lint",
85
- "options": {
86
- "eslintConfig": "eslint.config.js",
87
- "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
88
- }
89
- }
90
- }
91
- },
92
- "cat-document-lib": {
93
- "projectType": "library",
94
- "root": "projects/cat-document-lib",
95
- "sourceRoot": "projects/cat-document-lib/src",
96
- "prefix": "lib",
97
- "architect": {
98
- "build": {
99
- "builder": "@angular-devkit/build-angular:ng-packagr",
100
- "options": {
101
- "project": "projects/cat-document-lib/ng-package.json"
102
- },
103
- "configurations": {
104
- "production": {
105
- "tsConfig": "projects/cat-document-lib/tsconfig.lib.prod.json"
106
- },
107
- "development": {
108
- "tsConfig": "projects/cat-document-lib/tsconfig.lib.json"
109
- }
110
- },
111
- "defaultConfiguration": "production"
112
- }
113
- }
114
- }
115
- },
116
- "cli": {
117
- "analytics": "77456047-823c-4f1a-b41d-1ddee393b72d"
118
- }
119
- }
package/eslint.config.cjs DELETED
@@ -1,148 +0,0 @@
1
- // @ts-check
2
- const eslint = require("@eslint/js");
3
- const tseslint = require("@typescript-eslint/eslint-plugin");
4
- const tseslintParser = require("@typescript-eslint/parser");
5
- const angular = require("@angular-eslint/eslint-plugin");
6
- const jsdoc = require("eslint-plugin-jsdoc");
7
- const angularParser = require("@angular-eslint/template-parser");
8
-
9
- module.exports = [
10
- {
11
- files: ["**/*.ts"],
12
- languageOptions: {
13
- parser: tseslintParser, // Use TypeScript parser for .ts files
14
- parserOptions: {
15
- ecmaVersion: 2020,
16
- sourceType: "module",
17
- project: "./tsconfig.json", // Ensure this points to your tsconfig.json
18
- },
19
- },
20
- plugins: {
21
- "@typescript-eslint": tseslint,
22
- "@angular-eslint": angular,
23
- jsdoc,
24
- },
25
- rules: {
26
- "@angular-eslint/directive-selector": [
27
- "error",
28
- {
29
- type: "attribute",
30
- style: "camelCase",
31
- },
32
- ],
33
- "@angular-eslint/component-selector": [
34
- "error",
35
- {
36
- type: "element",
37
- style: "kebab-case",
38
- },
39
- ],
40
- "jsdoc/check-access": 1, // Recommended
41
- "jsdoc/check-alignment": 1, // Recommended
42
- "jsdoc/check-param-names": 1, // Recommended
43
- "jsdoc/check-property-names": 1, // Recommended
44
- "jsdoc/check-tag-names": 1, // Recommended
45
- "jsdoc/check-types": 1, // Recommended
46
- "jsdoc/check-values": 1, // Recommended
47
- "jsdoc/empty-tags": 1, // Recommended
48
- "jsdoc/implements-on-classes": 1, // Recommended
49
- "jsdoc/multiline-blocks": 1, // Recommended
50
- "jsdoc/no-multi-asterisks": 1, // Recommended
51
- "jsdoc/no-undefined-types": 1, // Recommended
52
- "jsdoc/require-jsdoc": [
53
- "error",
54
- {
55
- "contexts": [
56
- "ClassDeclaration",
57
- "ClassExpression",
58
- "ArrowFunctionExpression",
59
- "FunctionDeclaration",
60
- "FunctionExpression",
61
- ],
62
- },
63
- ],
64
- 'jsdoc/require-description': 'error',
65
- "jsdoc/require-param": 1, // Recommended
66
- "jsdoc/require-param-description": 1, // Recommended
67
- "jsdoc/require-param-name": 1, // Recommended
68
- "jsdoc/require-param-type": 1, // Recommended
69
- "jsdoc/require-property": 1, // Recommended
70
- "jsdoc/require-property-description": 1, // Recommended
71
- "jsdoc/require-property-name": 1, // Recommended
72
- "jsdoc/require-property-type": 1, // Recommended
73
- "jsdoc/require-returns": 1, // Recommended
74
- "jsdoc/require-returns-check": 1, // Recommended
75
- "jsdoc/require-returns-description": 1, // Recommended
76
- "jsdoc/require-returns-type": 1, // Recommended
77
- "jsdoc/require-yields": 1, // Recommended
78
- "jsdoc/require-yields-check": 1, // Recommended
79
- "jsdoc/tag-lines": 1, // Recommended
80
- "jsdoc/valid-types": 1, // Recommended
81
- "max-lines": [
82
- "error",
83
- {
84
- max: 200,
85
- skipBlankLines: true,
86
- skipComments: true,
87
- },
88
- ],
89
- "max-lines-per-function": [
90
- "error",
91
- {
92
- max: 20,
93
- skipBlankLines: true,
94
- skipComments: true,
95
- IIFEs: true,
96
- },
97
- ],
98
- },
99
- },
100
- {
101
- files: ["**/*.html"],
102
- languageOptions: {
103
- parser: angularParser, // Use Angular template parser
104
- },
105
- plugins: {
106
- "@angular-eslint": angular,
107
- },
108
- rules: {
109
- // Add custom template rules here if needed
110
- },
111
- },
112
- {
113
- files: ["**/*.spec.ts"],
114
- languageOptions: {
115
- parser: tseslintParser, // Use TypeScript parser for .spec.ts files
116
- parserOptions: {
117
- ecmaVersion: 2020,
118
- sourceType: "module",
119
- project: "./tsconfig.json", // Ensure this points to your tsconfig.json
120
- },
121
- },
122
- plugins: {
123
- "@typescript-eslint": tseslint,
124
- "@angular-eslint": angular,
125
- },
126
- rules: {
127
- // Custom rules for spec files, e.g., allow certain things that are specific to testing
128
- "max-lines": [
129
- "error", // You might want to warn rather than error in test files
130
- {
131
- max: 500, // Allow more lines in spec files
132
- skipBlankLines: true,
133
- skipComments: true,
134
- },
135
- ],
136
- "max-lines-per-function": [
137
- "error", // You might want to relax this for test files as well
138
- {
139
- max: 50, // Allow more lines in functions in spec files
140
- skipBlankLines: true,
141
- skipComments: true,
142
- IIFEs: true,
143
- },
144
- ],
145
- // Add other rules specific to testing or Jest (if applicable)
146
- },
147
- }
148
- ];
@@ -1,63 +0,0 @@
1
- # CatDocumentLib
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-document-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-document-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,18 +0,0 @@
1
- export default {
2
- preset: 'jest-preset-angular',
3
- setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
4
- testPathIgnorePatterns: [
5
- '<rootDir>/node_modules/',
6
- '<rootDir>/dist/',
7
- ],
8
- transform: {
9
- '^.+\\.(ts|html)$': [
10
- 'jest-preset-angular',
11
- {
12
- tsconfig: '<rootDir>/tsconfig.spec.json',
13
- stringifyContentPathRegex: '\\.(html|svg)$',
14
- },
15
- ],
16
- },
17
- testEnvironment: 'jsdom',
18
- };
@@ -1,11 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/cat-document-lib",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- },
7
- "assets": [
8
- "src/assets"
9
- ]
10
-
11
- }