From 8fa78ebef36644fad2a2e1c5cb7645d968bd8109 Mon Sep 17 00:00:00 2001 From: Rinat Arsaev <11846445+KrickRay@users.noreply.github.com> Date: Mon, 1 Aug 2022 19:21:48 +0300 Subject: [PATCH] Select shared library (#119) --- .eslintrc.js | 2 +- .github/workflows/pr.yaml | 21 +- Dockerfile | 2 +- README.md | 7 + angular.json | 36 +- package-lock.json | 937 ++++++++++++++++++ package.json | 19 +- projects/ng-core/.browserslistrc | 16 + projects/ng-core/.prettierignore | 1 + projects/ng-core/README.md | 25 + projects/ng-core/karma.conf.js | 41 + projects/ng-core/ng-package.json | 7 + projects/ng-core/package.json | 11 + .../components/actions/actions.component.html | 0 .../components/actions/actions.component.scss | 0 .../components/actions/actions.component.ts | 0 .../lib}/components/actions/actions.module.ts | 0 .../src/lib/components/actions/index.ts | 2 + .../base-dialog/base-dialog.component.html | 0 .../base-dialog/base-dialog.component.scss | 0 .../base-dialog/base-dialog.component.ts | 2 +- .../base-dialog/base-dialog.module.ts | 4 +- .../base-dialog-actions.component.html | 0 .../base-dialog-actions.component.ts | 0 .../src/lib/components/base-dialog/index.ts | 8 + .../services/base-dialog.service.ts | 25 +- .../src/lib/components/base-dialog/tokens.ts | 20 + .../types/base-dialog-response-status.ts | 0 .../base-dialog/types/base-dialog-response.ts | 2 +- .../utils/base-dialog-superclass.ts | 3 +- projects/ng-core/src/lib/components/index.ts | 2 + projects/ng-core/src/lib/index.ts | 1 + projects/ng-core/src/public-api.ts | 5 + projects/ng-core/src/test.ts | 29 + projects/ng-core/tsconfig.lib.json | 16 + projects/ng-core/tsconfig.lib.prod.json | 10 + projects/ng-core/tsconfig.spec.json | 10 + src/app/app.module.ts | 3 - src/app/sections/claim/claim.component.ts | 3 +- src/app/sections/claim/claim.module.ts | 3 +- .../add-modification-dialog.component.ts | 7 +- .../change-status-dialog.component.ts | 2 +- ...dification-unit-timeline-item.component.ts | 3 +- .../claim/services/upload-file.service.ts | 3 +- .../party-claims/party-claims.component.ts | 3 +- .../payout-details/payout-details.module.ts | 2 +- .../cancel-payout-dialog.component.ts | 6 +- .../create-payout-dialog.component.ts | 6 +- .../payouts/payouts/payouts.component.ts | 8 +- .../payouts/payouts/payouts.module.ts | 2 +- .../services/payout-actions.service.ts | 3 +- .../repair-by-scenario-dialog.component.ts | 5 +- .../sections/repairing/repairing.component.ts | 3 +- .../sections/repairing/repairing.module.ts | 3 +- ...hange-delegate-ruleset-dialog.component.ts | 3 +- .../change-delegate-ruleset-dialog.module.ts | 3 +- .../change-target-dialog.component.ts | 2 +- .../change-target-dialog.module.ts | 3 +- .../attach-new-ruleset-dialog.component.ts | 2 +- .../party-delegate-rulesets.component.ts | 2 +- .../party-delegate-rulesets.module.ts | 2 +- ...add-party-routing-rule-dialog.component.ts | 3 +- .../add-party-routing-rule-dialog.module.ts | 3 +- ...itialize-routing-rules-dialog.component.ts | 3 +- .../initialize-routing-rules-dialog.module.ts | 3 +- .../party-routing-ruleset.component.ts | 4 +- .../routing-rules-list.component.ts | 4 +- .../add-routing-rule-dialog.component.ts | 3 +- .../add-routing-rule-dialog.module.ts | 2 +- .../add-routing-rule-dialog.service.ts | 3 +- .../routing-ruleset.component.ts | 3 +- .../create-adjustment-dialog.component.ts | 5 +- .../withdrawals/withdrawals.component.ts | 3 +- .../withdrawals/withdrawals.module.ts | 2 +- src/app/tokens.ts | 18 - src/components/actions/index.ts | 1 - src/components/base-dialog/index.ts | 4 - .../confirm-action-dialog.component.ts | 3 +- .../confirm-action-dialog.module.ts | 3 +- tsconfig.json | 4 +- 80 files changed, 1282 insertions(+), 138 deletions(-) create mode 100644 projects/ng-core/.browserslistrc create mode 100644 projects/ng-core/.prettierignore create mode 100644 projects/ng-core/README.md create mode 100644 projects/ng-core/karma.conf.js create mode 100644 projects/ng-core/ng-package.json create mode 100644 projects/ng-core/package.json rename {src => projects/ng-core/src/lib}/components/actions/actions.component.html (100%) rename {src => projects/ng-core/src/lib}/components/actions/actions.component.scss (100%) rename {src => projects/ng-core/src/lib}/components/actions/actions.component.ts (100%) rename {src => projects/ng-core/src/lib}/components/actions/actions.module.ts (100%) create mode 100644 projects/ng-core/src/lib/components/actions/index.ts rename {src => projects/ng-core/src/lib}/components/base-dialog/base-dialog.component.html (100%) rename {src => projects/ng-core/src/lib}/components/base-dialog/base-dialog.component.scss (100%) rename {src => projects/ng-core/src/lib}/components/base-dialog/base-dialog.component.ts (96%) rename {src => projects/ng-core/src/lib}/components/base-dialog/base-dialog.module.ts (92%) rename {src => projects/ng-core/src/lib}/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.html (100%) rename {src => projects/ng-core/src/lib}/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.ts (100%) create mode 100644 projects/ng-core/src/lib/components/base-dialog/index.ts rename {src => projects/ng-core/src/lib}/components/base-dialog/services/base-dialog.service.ts (58%) create mode 100644 projects/ng-core/src/lib/components/base-dialog/tokens.ts rename {src => projects/ng-core/src/lib}/components/base-dialog/types/base-dialog-response-status.ts (100%) rename {src => projects/ng-core/src/lib}/components/base-dialog/types/base-dialog-response.ts (65%) rename {src => projects/ng-core/src/lib}/components/base-dialog/utils/base-dialog-superclass.ts (92%) create mode 100644 projects/ng-core/src/lib/components/index.ts create mode 100644 projects/ng-core/src/lib/index.ts create mode 100644 projects/ng-core/src/public-api.ts create mode 100644 projects/ng-core/src/test.ts create mode 100644 projects/ng-core/tsconfig.lib.json create mode 100644 projects/ng-core/tsconfig.lib.prod.json create mode 100644 projects/ng-core/tsconfig.spec.json delete mode 100644 src/components/actions/index.ts delete mode 100644 src/components/base-dialog/index.ts diff --git a/.eslintrc.js b/.eslintrc.js index cc053003..2e7a5136 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -43,7 +43,7 @@ module.exports = { { ...baseTsRules, // TODO: add fixed directories - files: ['**/src/app/core/**/*.ts'], + files: ['**/src/app/core/**/*.ts', '**/projects/**/*.ts'], }, { ...baseTsRules, diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 7da1b8cf..de37fd09 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -9,6 +9,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: ./.github/actions/init + - name: Building libraries + run: npm run build-libs - name: Cache all uses: actions/cache@v3 id: cache @@ -16,7 +18,7 @@ jobs: path: ./* key: ${{ github.sha }} eslint: - name: ESLint + name: ESLint App runs-on: ubuntu-latest needs: [init] steps: @@ -27,7 +29,20 @@ jobs: path: ./* key: ${{ github.sha }} - name: Check - run: npm run lint-cmd + run: npm run lint + eslint-libs: + name: ESLint Libs + runs-on: ubuntu-latest + needs: [init] + steps: + - name: Cache all + uses: actions/cache@v3 + id: cache + with: + path: ./* + key: ${{ github.sha }} + - name: Check + run: npm run lint-libs prettier: name: Prettier runs-on: ubuntu-latest @@ -53,4 +68,4 @@ jobs: path: ./* key: ${{ github.sha }} - name: Build - run: npm run build + run: npm run build-app diff --git a/Dockerfile b/Dockerfile index 88283828..75cea778 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM nginx:1.21 -COPY dist /usr/share/nginx/html +COPY dist/control-center /usr/share/nginx/html COPY nginx.conf /etc/nginx/vhosts.d/control-center.conf \ No newline at end of file diff --git a/README.md b/README.md index 1b122be1..bce3a93f 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,10 @@ npm start ``` 2. Open [localhost:4200](http://localhost:4200/) + +If you want to develop a library, then it's better to start building library separately: + +```sh +npm run dev +npm run dev-libs +``` diff --git a/angular.json b/angular.json index 39274222..84d56c3b 100644 --- a/angular.json +++ b/angular.json @@ -37,9 +37,10 @@ "@vality/payout-manager-proto", "@vality/repairer-proto", "@vality/fistful-proto", - "@vality/file-storage-proto" + "@vality/file-storage-proto", + "@vality/thrift-ts" ], - "outputPath": "dist", + "outputPath": "dist/control-center", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", @@ -143,6 +144,37 @@ } } } + }, + "ng-core": { + "projectType": "library", + "root": "projects/ng-core", + "sourceRoot": "projects/ng-core/src", + "prefix": "v", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:ng-packagr", + "options": { + "project": "projects/ng-core/ng-package.json" + }, + "configurations": { + "production": { + "tsConfig": "projects/ng-core/tsconfig.lib.prod.json" + }, + "development": { + "tsConfig": "projects/ng-core/tsconfig.lib.json" + } + }, + "defaultConfiguration": "production" + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "projects/ng-core/src/test.ts", + "tsConfig": "projects/ng-core/tsconfig.spec.json", + "karmaConfig": "projects/ng-core/karma.conf.js" + } + } + } } }, "cli": { diff --git a/package-lock.json b/package-lock.json index 86ec52eb..c16df8d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,6 +78,7 @@ "@types/uuid": "3.4.3", "@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/parser": "^5.29.0", + "concurrently": "7.3.0", "dotenv": "16.0.0", "eslint": "8.20.0", "eslint-config-prettier": "8.5.0", @@ -95,6 +96,7 @@ "karma-coverage-istanbul-reporter": "3.0.3", "karma-jasmine": "5.1.0", "karma-jasmine-html-reporter": "2.0.0", + "ng-packagr": "14.1.0", "ngx-build-plus": "14.0.0", "prettier": "2.7.1", "prettier-plugin-organize-attributes": "0.0.5", @@ -4412,6 +4414,61 @@ "node": ">=10" } }, + "node_modules/@rollup/plugin-json": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", + "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.0.8" + }, + "peerDependencies": { + "rollup": "^1.20.0 || ^2.0.0" + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", + "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "peerDependencies": { + "rollup": "^2.42.0" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@rollup/pluginutils/node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, "node_modules/@s-libs/js-core": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/@s-libs/js-core/-/js-core-14.0.0.tgz", @@ -4705,6 +4762,15 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, + "node_modules/@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", @@ -8362,6 +8428,18 @@ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/builtin-status-codes": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-2.0.0.tgz", @@ -9072,6 +9150,53 @@ "typedarray": "^0.0.6" } }, + "node_modules/concurrently": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-7.3.0.tgz", + "integrity": "sha512-IiDwm+8DOcFEInca494A8V402tNTQlJaYq78RF2rijOrKEk/AOHTxhN4U1cp7GYKYX5Q6Ymh1dLTBlzIMN0ikA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^7.0.0", + "shell-quote": "^1.7.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^17.3.1" + }, + "bin": { + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.0 || >=16.0.0" + } + }, + "node_modules/concurrently/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -9702,6 +9827,12 @@ "node": ">=4" } }, + "node_modules/cuint": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", + "integrity": "sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw==", + "dev": true + }, "node_modules/custom-event": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", @@ -9713,6 +9844,19 @@ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" }, + "node_modules/date-fns": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.1.tgz", + "integrity": "sha512-dlLD5rKaKxpFdnjrs+5azHDFOPEu4ANy/LTh04A1DTzMM7qoajmKCBc8pkKRFT41CNzw+4gQh79X5C+Jq27HAw==", + "dev": true, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/date-format": { "version": "4.0.11", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.11.tgz", @@ -9752,6 +9896,15 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", @@ -11617,6 +11770,12 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, "node_modules/esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -13323,6 +13482,15 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/injection-js": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/injection-js/-/injection-js-2.4.0.tgz", + "integrity": "sha512-6jiJt0tCAo9zjHbcwLiPL+IuNe9SQ6a9g0PEzafThW3fOQi0mrmiJGBJvDD6tmhPh8cQHIQtCOrJuBfQME4kPA==", + "dev": true, + "dependencies": { + "tslib": "^2.0.0" + } + }, "node_modules/inquirer": { "version": "8.2.4", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz", @@ -13518,6 +13686,18 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "node_modules/is-builtin-module": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.1.0.tgz", + "integrity": "sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -13671,6 +13851,12 @@ "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", "dev": true }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true + }, "node_modules/is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", @@ -15584,6 +15770,231 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, + "node_modules/ng-packagr": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-14.1.0.tgz", + "integrity": "sha512-08B+bOp53YhmPobI1tK0YwGUAysden/PHtBUtmLaJxIHYVZqzH/RIFVaZLx+k+70TFqs+P2Hjpmo3wblWqFzxg==", + "dev": true, + "dependencies": { + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "ajv": "^8.10.0", + "ansi-colors": "^4.1.1", + "browserslist": "^4.20.0", + "cacache": "^16.0.0", + "chokidar": "^3.5.3", + "commander": "^9.0.0", + "dependency-graph": "^0.11.0", + "esbuild-wasm": "^0.14.29", + "find-cache-dir": "^3.3.2", + "glob": "^8.0.0", + "injection-js": "^2.4.0", + "jsonc-parser": "^3.0.0", + "less": "^4.1.2", + "ora": "^5.1.0", + "postcss": "^8.4.8", + "postcss-preset-env": "^7.4.2", + "postcss-url": "^10.1.3", + "rollup": "^2.70.0", + "rollup-plugin-sourcemaps": "^0.6.3", + "rxjs": "^7.5.5", + "sass": "^1.49.9", + "stylus": "^0.58.0" + }, + "bin": { + "ng-packagr": "cli/main.js" + }, + "engines": { + "node": "^14.15.0 || >=16.10.0" + }, + "optionalDependencies": { + "esbuild": "^0.14.29" + }, + "peerDependencies": { + "@angular/compiler-cli": "^14.0.0 || ^14.0.0-next || ^14.1.0-next", + "tslib": "^2.3.0", + "typescript": ">=4.6.2 <4.8" + } + }, + "node_modules/ng-packagr/node_modules/ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ng-packagr/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/ng-packagr/node_modules/commander": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", + "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/ng-packagr/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/ng-packagr/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ng-packagr/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/ng-packagr/node_modules/jsonc-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz", + "integrity": "sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==", + "dev": true + }, + "node_modules/ng-packagr/node_modules/minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ng-packagr/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/ng-packagr/node_modules/rxjs": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", + "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/ng-packagr/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/ng-packagr/node_modules/stylus": { + "version": "0.58.1", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.58.1.tgz", + "integrity": "sha512-AYiCHm5ogczdCPMfe9aeQa4NklB2gcf4D/IhzYPddJjTgPc+k4D/EVE0yfQbZD43MHP3lPy+8NZ9fcFxkrgs/w==", + "dev": true, + "dependencies": { + "css": "^3.0.0", + "debug": "^4.3.2", + "glob": "^7.1.6", + "sax": "~1.2.4", + "source-map": "^0.7.3" + }, + "bin": { + "stylus": "bin/stylus" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ng-packagr/node_modules/stylus/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/ng-packagr/node_modules/stylus/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ng-packagr/node_modules/stylus/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/ngx-build-plus": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/ngx-build-plus/-/ngx-build-plus-14.0.0.tgz", @@ -17839,6 +18250,60 @@ "node": ">=4" } }, + "node_modules/postcss-url": { + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-10.1.3.tgz", + "integrity": "sha512-FUzyxfI5l2tKmXdYc6VTu3TWZsInayEKPbiyW+P6vmmIrrb4I6CGX0BFoewgYHLK+oIL5FECEK02REYRpBvUCw==", + "dev": true, + "dependencies": { + "make-dir": "~3.1.0", + "mime": "~2.5.2", + "minimatch": "~3.0.4", + "xxhashjs": "~0.2.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-url/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/postcss-url/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/postcss-url/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", @@ -18544,6 +19009,54 @@ "inherits": "^2.0.1" } }, + "node_modules/rollup": { + "version": "2.77.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.1.tgz", + "integrity": "sha512-GhutNJrvTYD6s1moo+kyq7lD9DeR5HDyXo4bDFlDSkepC9kVKY+KK/NSZFzCmeXeia3kEzVuToQmHRdugyZHxw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-sourcemaps": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz", + "integrity": "sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.0.9", + "source-map-resolve": "^0.6.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "@types/node": ">=10.0.0", + "rollup": ">=0.31.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/rollup-plugin-sourcemaps/node_modules/source-map-resolve": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0" + } + }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -18915,6 +19428,12 @@ "node": ">=0.10.0" } }, + "node_modules/shell-quote": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", + "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", + "dev": true + }, "node_modules/short-uuid": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/short-uuid/-/short-uuid-4.1.0.tgz", @@ -19342,6 +19861,12 @@ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, "node_modules/spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -21834,6 +22359,15 @@ "node": ">=0.4" } }, + "node_modules/xxhashjs": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", + "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", + "dev": true, + "dependencies": { + "cuint": "^0.2.2" + } + }, "node_modules/y18n": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", @@ -25071,6 +25605,48 @@ } } }, + "@rollup/plugin-json": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", + "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.8" + } + }, + "@rollup/plugin-node-resolve": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", + "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + } + } + }, "@s-libs/js-core": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/@s-libs/js-core/-/js-core-14.0.0.tgz", @@ -25343,6 +25919,15 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", @@ -28278,6 +28863,12 @@ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, + "builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true + }, "builtin-status-codes": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-2.0.0.tgz", @@ -28833,6 +29424,40 @@ "typedarray": "^0.0.6" } }, + "concurrently": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-7.3.0.tgz", + "integrity": "sha512-IiDwm+8DOcFEInca494A8V402tNTQlJaYq78RF2rijOrKEk/AOHTxhN4U1cp7GYKYX5Q6Ymh1dLTBlzIMN0ikA==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^7.0.0", + "shell-quote": "^1.7.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^17.3.1" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -29311,6 +29936,12 @@ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true }, + "cuint": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", + "integrity": "sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw==", + "dev": true + }, "custom-event": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", @@ -29322,6 +29953,12 @@ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" }, + "date-fns": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.1.tgz", + "integrity": "sha512-dlLD5rKaKxpFdnjrs+5azHDFOPEu4ANy/LTh04A1DTzMM7qoajmKCBc8pkKRFT41CNzw+4gQh79X5C+Jq27HAw==", + "dev": true + }, "date-format": { "version": "4.0.11", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.11.tgz", @@ -29352,6 +29989,12 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, "default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", @@ -30659,6 +31302,12 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -32000,6 +32649,15 @@ "integrity": "sha512-TxYQaeNW/N8ymDvwAxPyRbhMBtnEwuvaTYpOQkFx1nSeusgezHniEc/l35Vo4iCq/mMiTJbpD7oYxN98hFlfmw==", "dev": true }, + "injection-js": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/injection-js/-/injection-js-2.4.0.tgz", + "integrity": "sha512-6jiJt0tCAo9zjHbcwLiPL+IuNe9SQ6a9g0PEzafThW3fOQi0mrmiJGBJvDD6tmhPh8cQHIQtCOrJuBfQME4kPA==", + "dev": true, + "requires": { + "tslib": "^2.0.0" + } + }, "inquirer": { "version": "8.2.4", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz", @@ -32160,6 +32818,15 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "is-builtin-module": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.1.0.tgz", + "integrity": "sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==", + "dev": true, + "requires": { + "builtin-modules": "^3.0.0" + } + }, "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -32263,6 +32930,12 @@ "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", "dev": true }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true + }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", @@ -33748,6 +34421,180 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, + "ng-packagr": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-14.1.0.tgz", + "integrity": "sha512-08B+bOp53YhmPobI1tK0YwGUAysden/PHtBUtmLaJxIHYVZqzH/RIFVaZLx+k+70TFqs+P2Hjpmo3wblWqFzxg==", + "dev": true, + "requires": { + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "ajv": "^8.10.0", + "ansi-colors": "^4.1.1", + "browserslist": "^4.20.0", + "cacache": "^16.0.0", + "chokidar": "^3.5.3", + "commander": "^9.0.0", + "dependency-graph": "^0.11.0", + "esbuild": "^0.14.29", + "esbuild-wasm": "^0.14.29", + "find-cache-dir": "^3.3.2", + "glob": "^8.0.0", + "injection-js": "^2.4.0", + "jsonc-parser": "^3.0.0", + "less": "^4.1.2", + "ora": "^5.1.0", + "postcss": "^8.4.8", + "postcss-preset-env": "^7.4.2", + "postcss-url": "^10.1.3", + "rollup": "^2.70.0", + "rollup-plugin-sourcemaps": "^0.6.3", + "rxjs": "^7.5.5", + "sass": "^1.49.9", + "stylus": "^0.58.0" + }, + "dependencies": { + "ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "commander": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", + "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "jsonc-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz", + "integrity": "sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==", + "dev": true + }, + "minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "rxjs": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", + "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + } + }, + "source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true + }, + "stylus": { + "version": "0.58.1", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.58.1.tgz", + "integrity": "sha512-AYiCHm5ogczdCPMfe9aeQa4NklB2gcf4D/IhzYPddJjTgPc+k4D/EVE0yfQbZD43MHP3lPy+8NZ9fcFxkrgs/w==", + "dev": true, + "requires": { + "css": "^3.0.0", + "debug": "^4.3.2", + "glob": "^7.1.6", + "sax": "~1.2.4", + "source-map": "^0.7.3" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + } + } + }, "ngx-build-plus": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/ngx-build-plus/-/ngx-build-plus-14.0.0.tgz", @@ -35373,6 +36220,44 @@ "util-deprecate": "^1.0.2" } }, + "postcss-url": { + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-10.1.3.tgz", + "integrity": "sha512-FUzyxfI5l2tKmXdYc6VTu3TWZsInayEKPbiyW+P6vmmIrrb4I6CGX0BFoewgYHLK+oIL5FECEK02REYRpBvUCw==", + "dev": true, + "requires": { + "make-dir": "~3.1.0", + "mime": "~2.5.2", + "minimatch": "~3.0.4", + "xxhashjs": "~0.2.2" + }, + "dependencies": { + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", @@ -35926,6 +36811,37 @@ "inherits": "^2.0.1" } }, + "rollup": { + "version": "2.77.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.1.tgz", + "integrity": "sha512-GhutNJrvTYD6s1moo+kyq7lD9DeR5HDyXo4bDFlDSkepC9kVKY+KK/NSZFzCmeXeia3kEzVuToQmHRdugyZHxw==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, + "rollup-plugin-sourcemaps": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz", + "integrity": "sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.9", + "source-map-resolve": "^0.6.0" + }, + "dependencies": { + "source-map-resolve": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0" + } + } + } + }, "run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -36208,6 +37124,12 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, + "shell-quote": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", + "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", + "dev": true + }, "short-uuid": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/short-uuid/-/short-uuid-4.1.0.tgz", @@ -36547,6 +37469,12 @@ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, + "spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -38410,6 +39338,15 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, + "xxhashjs": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", + "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", + "dev": true, + "requires": { + "cuint": "^0.2.2" + } + }, "y18n": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", diff --git a/package.json b/package.json index 8337a257..e14e15b0 100644 --- a/package.json +++ b/package.json @@ -4,17 +4,22 @@ "private": true, "scripts": { "postinstall": "ngcc", - "start": "ng serve --proxy-config proxy.conf.js --port 4200", - "build": "ng build --extra-webpack-config webpack.extra.js", + "start": "concurrently -n LIB,APP -c magenta,cyan npm:dev-libs \"sleep 0.5 && npm run dev\"", + "dev": "ng serve --proxy-config proxy.conf.js --port 4200", + "dev-libs": "ng build ng-core --watch", + "build-app": "ng build --extra-webpack-config webpack.extra.js", + "build-libs": "ng build ng-core", + "build": "npm run build-libs && npm run build-app", "test": "ng test", - "lint-cmd": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1115", - "lint": "npm run lint-cmd -- --cache", + "lint": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1115", "lint-fix": "npm run lint -- --fix", "lint-errors": "npm run lint -- --quiet", + "lint-libs": "eslint \"projects/**/*.{ts,js,html}\" --max-warnings 0", + "lint-libs-fix": "npm run lint -- --fix", "prettier-preset": "prettier \"**/*.{html,js,ts,css,scss,md,json,prettierrc,svg,huskyrc,yml,yaml}\"", "prettier": "npm run prettier-preset -- --list-different", - "prettier:fix": "npm run prettier-preset -- --write", - "fix": "npm run lint-fix; npm run prettier:fix" + "prettier-fix": "npm run prettier-preset -- --write", + "fix": "concurrently -n LIB,APP -c magenta,cyan npm:lint-libs-fix npm:lint-fix && npm run prettier-fix" }, "dependencies": { "@angular/animations": "14.0.4", @@ -86,6 +91,7 @@ "@types/uuid": "3.4.3", "@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/parser": "^5.29.0", + "concurrently": "7.3.0", "dotenv": "16.0.0", "eslint": "8.20.0", "eslint-config-prettier": "8.5.0", @@ -103,6 +109,7 @@ "karma-coverage-istanbul-reporter": "3.0.3", "karma-jasmine": "5.1.0", "karma-jasmine-html-reporter": "2.0.0", + "ng-packagr": "14.1.0", "ngx-build-plus": "14.0.0", "prettier": "2.7.1", "prettier-plugin-organize-attributes": "0.0.5", diff --git a/projects/ng-core/.browserslistrc b/projects/ng-core/.browserslistrc new file mode 100644 index 00000000..4f9ac269 --- /dev/null +++ b/projects/ng-core/.browserslistrc @@ -0,0 +1,16 @@ +# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries + +# For the full list of supported browsers by the Angular framework, please see: +# https://angular.io/guide/browser-support + +# You can see what browsers were selected by your queries by running: +# npx browserslist + +last 1 Chrome version +last 1 Firefox version +last 2 Edge major versions +last 2 Safari major versions +last 2 iOS major versions +Firefox ESR diff --git a/projects/ng-core/.prettierignore b/projects/ng-core/.prettierignore new file mode 100644 index 00000000..ec6d3cdd --- /dev/null +++ b/projects/ng-core/.prettierignore @@ -0,0 +1 @@ +package.json diff --git a/projects/ng-core/README.md b/projects/ng-core/README.md new file mode 100644 index 00000000..162c77a8 --- /dev/null +++ b/projects/ng-core/README.md @@ -0,0 +1,25 @@ +# NgCore + +This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.0. + +## Code scaffolding + +Run `ng generate component component-name --project ng-core` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ng-core`. + +> Note: Don't forget to add `--project ng-core` or else it will be added to the default project in your `angular.json` file. + +## Build + +Run `ng build ng-core` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Publishing + +After building your library with `ng build ng-core`, go to the dist folder `cd dist/ng-core` and run `npm publish`. + +## Running unit tests + +Run `ng test ng-core` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/projects/ng-core/karma.conf.js b/projects/ng-core/karma.conf.js new file mode 100644 index 00000000..e006db62 --- /dev/null +++ b/projects/ng-core/karma.conf.js @@ -0,0 +1,41 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage'), + require('@angular-devkit/build-angular/plugins/karma'), + ], + client: { + jasmine: { + // you can add configuration options for Jasmine here + // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html + // for example, you can disable the random execution with `random: false` + // or set a specific seed with `seed: 4321` + }, + clearContext: false, // leave Jasmine Spec Runner output visible in browser + }, + jasmineHtmlReporter: { + suppressAll: true, // removes the duplicated traces + }, + coverageReporter: { + dir: require('path').join(__dirname, '../../coverage/ng-core'), + subdir: '.', + reporters: [{ type: 'html' }, { type: 'text-summary' }], + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false, + restartOnFileChange: true, + }); +}; diff --git a/projects/ng-core/ng-package.json b/projects/ng-core/ng-package.json new file mode 100644 index 00000000..fe644b73 --- /dev/null +++ b/projects/ng-core/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/ng-core", + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/projects/ng-core/package.json b/projects/ng-core/package.json new file mode 100644 index 00000000..d73feb94 --- /dev/null +++ b/projects/ng-core/package.json @@ -0,0 +1,11 @@ +{ + "name": "@vality/ng-core", + "version": "0.0.1", + "peerDependencies": { + "@angular/common": "^14.0.0", + "@angular/core": "^14.0.0" + }, + "dependencies": { + "tslib": "^2.3.0" + } +} \ No newline at end of file diff --git a/src/components/actions/actions.component.html b/projects/ng-core/src/lib/components/actions/actions.component.html similarity index 100% rename from src/components/actions/actions.component.html rename to projects/ng-core/src/lib/components/actions/actions.component.html diff --git a/src/components/actions/actions.component.scss b/projects/ng-core/src/lib/components/actions/actions.component.scss similarity index 100% rename from src/components/actions/actions.component.scss rename to projects/ng-core/src/lib/components/actions/actions.component.scss diff --git a/src/components/actions/actions.component.ts b/projects/ng-core/src/lib/components/actions/actions.component.ts similarity index 100% rename from src/components/actions/actions.component.ts rename to projects/ng-core/src/lib/components/actions/actions.component.ts diff --git a/src/components/actions/actions.module.ts b/projects/ng-core/src/lib/components/actions/actions.module.ts similarity index 100% rename from src/components/actions/actions.module.ts rename to projects/ng-core/src/lib/components/actions/actions.module.ts diff --git a/projects/ng-core/src/lib/components/actions/index.ts b/projects/ng-core/src/lib/components/actions/index.ts new file mode 100644 index 00000000..26dc132e --- /dev/null +++ b/projects/ng-core/src/lib/components/actions/index.ts @@ -0,0 +1,2 @@ +export * from './actions.module'; +export * from './actions.component'; diff --git a/src/components/base-dialog/base-dialog.component.html b/projects/ng-core/src/lib/components/base-dialog/base-dialog.component.html similarity index 100% rename from src/components/base-dialog/base-dialog.component.html rename to projects/ng-core/src/lib/components/base-dialog/base-dialog.component.html diff --git a/src/components/base-dialog/base-dialog.component.scss b/projects/ng-core/src/lib/components/base-dialog/base-dialog.component.scss similarity index 100% rename from src/components/base-dialog/base-dialog.component.scss rename to projects/ng-core/src/lib/components/base-dialog/base-dialog.component.scss diff --git a/src/components/base-dialog/base-dialog.component.ts b/projects/ng-core/src/lib/components/base-dialog/base-dialog.component.ts similarity index 96% rename from src/components/base-dialog/base-dialog.component.ts rename to projects/ng-core/src/lib/components/base-dialog/base-dialog.component.ts index fc221120..f3f74829 100644 --- a/src/components/base-dialog/base-dialog.component.ts +++ b/projects/ng-core/src/lib/components/base-dialog/base-dialog.component.ts @@ -9,7 +9,7 @@ import { BaseDialogResponseStatus } from './types/base-dialog-response-status'; styleUrls: ['base-dialog.component.scss'], }) export class BaseDialogComponent { - @Input() title: string; + @Input() title!: string; @coerceBoolean @Input() disabled = false; @coerceBoolean @Input() inProgress = false; diff --git a/src/components/base-dialog/base-dialog.module.ts b/projects/ng-core/src/lib/components/base-dialog/base-dialog.module.ts similarity index 92% rename from src/components/base-dialog/base-dialog.module.ts rename to projects/ng-core/src/lib/components/base-dialog/base-dialog.module.ts index b376ab92..80b63929 100644 --- a/src/components/base-dialog/base-dialog.module.ts +++ b/projects/ng-core/src/lib/components/base-dialog/base-dialog.module.ts @@ -7,8 +7,7 @@ import { MatDividerModule } from '@angular/material/divider'; import { MatIconModule } from '@angular/material/icon'; import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { ActionsModule } from '@cc/components/actions'; - +import { ActionsModule } from '../actions'; import { BaseDialogComponent } from './base-dialog.component'; import { BaseDialogActionsComponent } from './components/base-dialog-actions/base-dialog-actions.component'; @@ -21,7 +20,6 @@ const SHARED_DECLARATIONS = [BaseDialogComponent, BaseDialogActionsComponent]; MatDividerModule, MatButtonModule, ActionsModule, - ActionsModule, MatIconModule, MatProgressBarModule, MatDialogModule, diff --git a/src/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.html b/projects/ng-core/src/lib/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.html similarity index 100% rename from src/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.html rename to projects/ng-core/src/lib/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.html diff --git a/src/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.ts b/projects/ng-core/src/lib/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.ts similarity index 100% rename from src/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.ts rename to projects/ng-core/src/lib/components/base-dialog/components/base-dialog-actions/base-dialog-actions.component.ts diff --git a/projects/ng-core/src/lib/components/base-dialog/index.ts b/projects/ng-core/src/lib/components/base-dialog/index.ts new file mode 100644 index 00000000..aa8b652a --- /dev/null +++ b/projects/ng-core/src/lib/components/base-dialog/index.ts @@ -0,0 +1,8 @@ +export * from './base-dialog.module'; +export * from './types/base-dialog-response-status'; +export * from './types/base-dialog-response'; +export * from './utils/base-dialog-superclass'; +export * from './tokens'; +export * from './base-dialog.component'; +export * from './components/base-dialog-actions/base-dialog-actions.component'; +export * from './services/base-dialog.service'; diff --git a/src/components/base-dialog/services/base-dialog.service.ts b/projects/ng-core/src/lib/components/base-dialog/services/base-dialog.service.ts similarity index 58% rename from src/components/base-dialog/services/base-dialog.service.ts rename to projects/ng-core/src/lib/components/base-dialog/services/base-dialog.service.ts index b58102d2..4e3d8442 100644 --- a/src/components/base-dialog/services/base-dialog.service.ts +++ b/projects/ng-core/src/lib/components/base-dialog/services/base-dialog.service.ts @@ -1,9 +1,10 @@ import { ComponentType } from '@angular/cdk/overlay'; -import { Inject, Injectable } from '@angular/core'; +import { Inject, Injectable, Optional } from '@angular/core'; import { MatDialog, MatDialogConfig, MatDialogRef } from '@angular/material/dialog'; -import { DIALOG_CONFIG, DialogConfig } from '@cc/app/tokens'; -import { BaseDialogResponse, BaseDialogSuperclass } from '@cc/components/base-dialog'; +import { DEFAULT_DIALOG_CONFIG, DIALOG_CONFIG, DialogConfig } from '../tokens'; +import { BaseDialogResponse } from '../types/base-dialog-response'; +import { BaseDialogSuperclass } from '../utils/base-dialog-superclass'; @Injectable({ providedIn: 'root', @@ -11,8 +12,12 @@ import { BaseDialogResponse, BaseDialogSuperclass } from '@cc/components/base-di export class BaseDialogService { constructor( private dialog: MatDialog, - @Inject(DIALOG_CONFIG) private dialogConfig: DialogConfig - ) {} + @Optional() + @Inject(DIALOG_CONFIG) + private dialogConfig: DialogConfig + ) { + if (!dialogConfig) this.dialogConfig = DEFAULT_DIALOG_CONFIG; + } open( dialogComponent: ComponentType>, @@ -25,12 +30,16 @@ export class BaseDialogService { ? [] : [data: D, configOrConfigName?: Omit, 'data'> | keyof DialogConfig] ): MatDialogRef> { + let config: Partial>; + if (!configOrConfigName) config = this.dialogConfig.medium; + else if (typeof configOrConfigName === 'string') + config = this.dialogConfig[configOrConfigName]; + else config = configOrConfigName; + return this.dialog.open(dialogComponent as never, { data, ...(dialogComponent as typeof BaseDialogSuperclass).defaultDialogConfig, - ...(typeof configOrConfigName === 'string' - ? this.dialogConfig[configOrConfigName] - : configOrConfigName), + ...config, }); } } diff --git a/projects/ng-core/src/lib/components/base-dialog/tokens.ts b/projects/ng-core/src/lib/components/base-dialog/tokens.ts new file mode 100644 index 00000000..de9a791a --- /dev/null +++ b/projects/ng-core/src/lib/components/base-dialog/tokens.ts @@ -0,0 +1,20 @@ +import { InjectionToken } from '@angular/core'; +import { MatDialogConfig } from '@angular/material/dialog'; +import { ValuesType } from 'utility-types'; + +export type DialogConfig = Record<'small' | 'medium' | 'large', MatDialogConfig>; + +export const DIALOG_CONFIG = new InjectionToken('dialogConfig'); + +export const BASE_CONFIG: ValuesType = { + maxHeight: '90vh', + disableClose: true, + autoFocus: false, + width: '552px', +}; + +export const DEFAULT_DIALOG_CONFIG: DialogConfig = { + small: { ...BASE_CONFIG, width: '360px' }, + medium: BASE_CONFIG, + large: { ...BASE_CONFIG, width: '648px' }, +}; diff --git a/src/components/base-dialog/types/base-dialog-response-status.ts b/projects/ng-core/src/lib/components/base-dialog/types/base-dialog-response-status.ts similarity index 100% rename from src/components/base-dialog/types/base-dialog-response-status.ts rename to projects/ng-core/src/lib/components/base-dialog/types/base-dialog-response-status.ts diff --git a/src/components/base-dialog/types/base-dialog-response.ts b/projects/ng-core/src/lib/components/base-dialog/types/base-dialog-response.ts similarity index 65% rename from src/components/base-dialog/types/base-dialog-response.ts rename to projects/ng-core/src/lib/components/base-dialog/types/base-dialog-response.ts index d6a9339f..deaf6d04 100644 --- a/src/components/base-dialog/types/base-dialog-response.ts +++ b/projects/ng-core/src/lib/components/base-dialog/types/base-dialog-response.ts @@ -1,4 +1,4 @@ -import { BaseDialogResponseStatus } from '@cc/components/base-dialog'; +import { BaseDialogResponseStatus } from './base-dialog-response-status'; export interface BaseDialogResponse { status: S | BaseDialogResponseStatus; diff --git a/src/components/base-dialog/utils/base-dialog-superclass.ts b/projects/ng-core/src/lib/components/base-dialog/utils/base-dialog-superclass.ts similarity index 92% rename from src/components/base-dialog/utils/base-dialog-superclass.ts rename to projects/ng-core/src/lib/components/base-dialog/utils/base-dialog-superclass.ts index 4329dc3b..b84b6f5d 100644 --- a/src/components/base-dialog/utils/base-dialog-superclass.ts +++ b/projects/ng-core/src/lib/components/base-dialog/utils/base-dialog-superclass.ts @@ -1,8 +1,7 @@ import { Directive, Injector } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; -import { DEFAULT_DIALOG_CONFIG } from '@cc/app/tokens'; - +import { DEFAULT_DIALOG_CONFIG } from '../tokens'; import { BaseDialogResponse } from '../types/base-dialog-response'; @Directive() diff --git a/projects/ng-core/src/lib/components/index.ts b/projects/ng-core/src/lib/components/index.ts new file mode 100644 index 00000000..53400852 --- /dev/null +++ b/projects/ng-core/src/lib/components/index.ts @@ -0,0 +1,2 @@ +export * from './actions'; +export * from './base-dialog'; diff --git a/projects/ng-core/src/lib/index.ts b/projects/ng-core/src/lib/index.ts new file mode 100644 index 00000000..07635cbb --- /dev/null +++ b/projects/ng-core/src/lib/index.ts @@ -0,0 +1 @@ +export * from './components'; diff --git a/projects/ng-core/src/public-api.ts b/projects/ng-core/src/public-api.ts new file mode 100644 index 00000000..91fe6f63 --- /dev/null +++ b/projects/ng-core/src/public-api.ts @@ -0,0 +1,5 @@ +/* + * Public API Surface of ng-core + */ + +export * from './lib'; diff --git a/projects/ng-core/src/test.ts b/projects/ng-core/src/test.ts new file mode 100644 index 00000000..47d6b41e --- /dev/null +++ b/projects/ng-core/src/test.ts @@ -0,0 +1,29 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js'; +import 'zone.js/testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting, +} from '@angular/platform-browser-dynamic/testing'; + +// eslint-disable-next-line @typescript-eslint/naming-convention +declare const require: { + context( + path: string, + deep?: boolean, + filter?: RegExp + ): { + (id: string): T; + keys(): string[]; + }; +}; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); + +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().forEach(context); diff --git a/projects/ng-core/tsconfig.lib.json b/projects/ng-core/tsconfig.lib.json new file mode 100644 index 00000000..08b6e7e6 --- /dev/null +++ b/projects/ng-core/tsconfig.lib.json @@ -0,0 +1,16 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/lib", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [], + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitAny": true + }, + "exclude": ["src/test.ts", "**/*.spec.ts"] +} diff --git a/projects/ng-core/tsconfig.lib.prod.json b/projects/ng-core/tsconfig.lib.prod.json new file mode 100644 index 00000000..560c2391 --- /dev/null +++ b/projects/ng-core/tsconfig.lib.prod.json @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, + "angularCompilerOptions": { + "compilationMode": "partial" + } +} diff --git a/projects/ng-core/tsconfig.spec.json b/projects/ng-core/tsconfig.spec.json new file mode 100644 index 00000000..4ed8f505 --- /dev/null +++ b/projects/ng-core/tsconfig.spec.json @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/spec", + "types": ["jasmine"] + }, + "files": ["src/test.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] +} diff --git a/src/app/app.module.ts b/src/app/app.module.ts index b1e5ffde..dfa0c1e5 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -36,12 +36,10 @@ import { SearchPartiesModule } from './sections/search-parties/search-parties.mo import { SectionsModule } from './sections/sections.module'; import { ThemeManager, ThemeManagerModule, ThemeName } from './theme-manager'; import { - DEFAULT_DIALOG_CONFIG, DEFAULT_MAT_DATE_FORMATS, DEFAULT_QUERY_PARAMS_SERIALIZERS, DEFAULT_SEARCH_LIMIT, DEFAULT_SMALL_SEARCH_LIMIT, - DIALOG_CONFIG, SEARCH_LIMIT, SMALL_SEARCH_LIMIT, } from './tokens'; @@ -87,7 +85,6 @@ moment.locale('en'); { provide: LOCALE_ID, useValue: 'en' }, { provide: SEARCH_LIMIT, useValue: DEFAULT_SEARCH_LIMIT }, { provide: SMALL_SEARCH_LIMIT, useValue: DEFAULT_SMALL_SEARCH_LIMIT }, - { provide: DIALOG_CONFIG, useValue: DEFAULT_DIALOG_CONFIG }, { provide: QUERY_PARAMS_SERIALIZERS, useValue: DEFAULT_QUERY_PARAMS_SERIALIZERS }, ], bootstrap: [AppComponent], diff --git a/src/app/sections/claim/claim.component.ts b/src/app/sections/claim/claim.component.ts index fc25626c..564035ae 100644 --- a/src/app/sections/claim/claim.component.ts +++ b/src/app/sections/claim/claim.component.ts @@ -1,6 +1,7 @@ import { Component } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core'; import { BehaviorSubject, combineLatest, @@ -19,8 +20,6 @@ import { ChangeStatusDialogComponent } from '@cc/app/sections/claim/components/c import { AllowedClaimStatusesService } from '@cc/app/sections/claim/services/allowed-claim-statuses.service'; import { UploadFileService } from '@cc/app/sections/claim/services/upload-file.service'; import { NotificationService } from '@cc/app/shared/services/notification'; -import { BaseDialogResponseStatus } from '@cc/components/base-dialog'; -import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service'; import { getUnionKey, inProgressFrom, progressTo } from '@cc/utils'; import { AddModificationDialogComponent } from './components/add-modification-dialog/add-modification-dialog.component'; diff --git a/src/app/sections/claim/claim.module.ts b/src/app/sections/claim/claim.module.ts index 5475ac7c..29da3e17 100644 --- a/src/app/sections/claim/claim.module.ts +++ b/src/app/sections/claim/claim.module.ts @@ -15,13 +15,12 @@ import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatSelectModule } from '@angular/material/select'; import { RouterModule } from '@angular/router'; +import { ActionsModule, BaseDialogModule } from '@vality/ng-core'; import { ngfModule } from 'angular-file'; import { MetadataFormModule, StatusModule } from '@cc/app/shared/components'; import { JsonViewerModule } from '@cc/app/shared/components/json-viewer/json-viewer.module'; import { ThriftPipesModule } from '@cc/app/shared/pipes'; -import { ActionsModule } from '@cc/components/actions'; -import { BaseDialogModule } from '@cc/components/base-dialog'; import { TimelineModule } from '@cc/components/timeline'; import { TimelineComponentsModule } from '../party-claim/changeset/timeline-components'; diff --git a/src/app/sections/claim/components/add-modification-dialog/add-modification-dialog.component.ts b/src/app/sections/claim/components/add-modification-dialog/add-modification-dialog.component.ts index 042f5efb..22bf7000 100644 --- a/src/app/sections/claim/components/add-modification-dialog/add-modification-dialog.component.ts +++ b/src/app/sections/claim/components/add-modification-dialog/add-modification-dialog.component.ts @@ -9,12 +9,15 @@ import { PartyModificationChange, } from '@vality/domain-proto/lib/claim_management'; import { Party } from '@vality/domain-proto/lib/domain'; +import { + BaseDialogResponseStatus, + BaseDialogSuperclass, + DEFAULT_DIALOG_CONFIG, +} from '@vality/ng-core'; import { BehaviorSubject } from 'rxjs'; import { ClaimManagementService } from '@cc/app/api/claim-management'; import { NotificationService } from '@cc/app/shared/services/notification'; -import { DEFAULT_DIALOG_CONFIG } from '@cc/app/tokens'; -import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog'; import { inProgressFrom, progressTo } from '@cc/utils'; @UntilDestroy() diff --git a/src/app/sections/claim/components/change-status-dialog/change-status-dialog.component.ts b/src/app/sections/claim/components/change-status-dialog/change-status-dialog.component.ts index bb310a28..2c136dd0 100644 --- a/src/app/sections/claim/components/change-status-dialog/change-status-dialog.component.ts +++ b/src/app/sections/claim/components/change-status-dialog/change-status-dialog.component.ts @@ -2,12 +2,12 @@ import { Component, Injector } from '@angular/core'; import { Validators, FormBuilder } from '@angular/forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Claim, ClaimStatus } from '@vality/domain-proto/lib/claim_management'; +import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core'; import { BehaviorSubject, Observable } from 'rxjs'; import { ClaimManagementService } from '@cc/app/api/claim-management'; import { AllowedClaimStatusesService } from '@cc/app/sections/claim/services/allowed-claim-statuses.service'; import { NotificationService } from '@cc/app/shared/services/notification'; -import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog'; import { getUnionKey, inProgressFrom, progressTo } from '@cc/utils'; @UntilDestroy() diff --git a/src/app/sections/claim/components/modification-unit-timeline-item/modification-unit-timeline-item.component.ts b/src/app/sections/claim/components/modification-unit-timeline-item/modification-unit-timeline-item.component.ts index c2003725..8ca1fefb 100644 --- a/src/app/sections/claim/components/modification-unit-timeline-item/modification-unit-timeline-item.component.ts +++ b/src/app/sections/claim/components/modification-unit-timeline-item/modification-unit-timeline-item.component.ts @@ -1,6 +1,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Claim, ModificationUnit } from '@vality/domain-proto/lib/claim_management'; +import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core'; import { coerceBoolean } from 'coerce-property'; import isEmpty from 'lodash-es/isEmpty'; import { BehaviorSubject, switchMap } from 'rxjs'; @@ -12,8 +13,6 @@ import { getModificationName } from '@cc/app/sections/claim/utils/get-modificati import { Patch } from '@cc/app/shared/components/json-viewer'; import { NotificationService } from '@cc/app/shared/services/notification'; import { Color, StatusColor } from '@cc/app/styles'; -import { BaseDialogResponseStatus } from '@cc/components/base-dialog'; -import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service'; import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog'; import { inProgressFrom, progressTo } from '@cc/utils'; import { getUnionValue } from '@cc/utils/get-union-key'; diff --git a/src/app/sections/claim/services/upload-file.service.ts b/src/app/sections/claim/services/upload-file.service.ts index 699119e6..8ff9b3aa 100644 --- a/src/app/sections/claim/services/upload-file.service.ts +++ b/src/app/sections/claim/services/upload-file.service.ts @@ -1,5 +1,6 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; +import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core'; import moment from 'moment'; import { switchMap } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -7,8 +8,6 @@ import { filter, map } from 'rxjs/operators'; import { ClaimManagementService } from '@cc/app/api/claim-management'; import { FileStorageService } from '@cc/app/api/file-storage'; import { NotificationService } from '@cc/app/shared/services/notification'; -import { BaseDialogResponseStatus } from '@cc/components/base-dialog'; -import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service'; import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog'; @Injectable() diff --git a/src/app/sections/party-claims/party-claims.component.ts b/src/app/sections/party-claims/party-claims.component.ts index 163719bb..2afa5d95 100644 --- a/src/app/sections/party-claims/party-claims.component.ts +++ b/src/app/sections/party-claims/party-claims.component.ts @@ -1,10 +1,9 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; +import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core'; import { filter } from 'rxjs/operators'; import { ClaimSearchForm } from '@cc/app/shared/components'; -import { BaseDialogResponseStatus } from '@cc/components/base-dialog'; -import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service'; import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog'; import { CreateClaimService } from './create-claim.service'; diff --git a/src/app/sections/payouts/payout-details/payout-details.module.ts b/src/app/sections/payouts/payout-details/payout-details.module.ts index 52eaaf94..eaf5d134 100644 --- a/src/app/sections/payouts/payout-details/payout-details.module.ts +++ b/src/app/sections/payouts/payout-details/payout-details.module.ts @@ -6,6 +6,7 @@ import { MatCardModule } from '@angular/material/card'; import { MatDividerModule } from '@angular/material/divider'; import { MatPaginatorModule } from '@angular/material/paginator'; import { MatTableModule } from '@angular/material/table'; +import { ActionsModule } from '@vality/ng-core'; import { ShopDetailsModule } from '@cc/app/shared/components'; import { PayoutToolDetailsModule } from '@cc/app/shared/components/payout-tool-details/payout-tool-details.module'; @@ -14,7 +15,6 @@ import { DetailsItemModule } from '@cc/components/details-item'; import { EmptySearchResultModule } from '@cc/components/empty-search-result'; import { HeadlineModule } from '@cc/components/headline'; -import { ActionsModule } from '../../../../components/actions'; import { PayoutDetailsRoutingModule } from './payout-details-routing.module'; import { PayoutDetailsComponent } from './payout-details.component'; diff --git a/src/app/sections/payouts/payouts/components/cancel-payout-dialog/cancel-payout-dialog.component.ts b/src/app/sections/payouts/payouts/components/cancel-payout-dialog/cancel-payout-dialog.component.ts index 04708ad9..727a0604 100644 --- a/src/app/sections/payouts/payouts/components/cancel-payout-dialog/cancel-payout-dialog.component.ts +++ b/src/app/sections/payouts/payouts/components/cancel-payout-dialog/cancel-payout-dialog.component.ts @@ -1,6 +1,7 @@ import { Component, Injector } from '@angular/core'; import { FormControl } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core'; import { PayoutID } from '@vality/payout-manager-proto'; import { BehaviorSubject } from 'rxjs'; @@ -8,11 +9,6 @@ import { PayoutManagementService } from '@cc/app/api/payout-manager'; import { NotificationService } from '@cc/app/shared/services/notification'; import { progressTo } from '@cc/utils/operators'; -import { - BaseDialogResponseStatus, - BaseDialogSuperclass, -} from '../../../../../../components/base-dialog'; - @UntilDestroy() @Component({ selector: 'cc-cancel-payout-dialog', diff --git a/src/app/sections/payouts/payouts/components/create-payout-dialog/create-payout-dialog.component.ts b/src/app/sections/payouts/payouts/components/create-payout-dialog/create-payout-dialog.component.ts index 2e8ca5db..c0205954 100644 --- a/src/app/sections/payouts/payouts/components/create-payout-dialog/create-payout-dialog.component.ts +++ b/src/app/sections/payouts/payouts/components/create-payout-dialog/create-payout-dialog.component.ts @@ -1,6 +1,7 @@ import { ChangeDetectionStrategy, Component, Injector } from '@angular/core'; import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core'; import { PayoutParams } from '@vality/payout-manager-proto'; import isNil from 'lodash-es/isNil'; import omitBy from 'lodash-es/omitBy'; @@ -11,11 +12,6 @@ import { NotificationService } from '@cc/app/shared/services/notification'; import { progressTo } from '@cc/utils/operators'; import { toMinor } from '@cc/utils/to-minor'; -import { - BaseDialogResponseStatus, - BaseDialogSuperclass, -} from '../../../../../../components/base-dialog'; - interface CreatePayoutDialogForm { partyId: string; shopId: string; diff --git a/src/app/sections/payouts/payouts/payouts.component.ts b/src/app/sections/payouts/payouts/payouts.component.ts index a3e46029..5b04b648 100644 --- a/src/app/sections/payouts/payouts/payouts.component.ts +++ b/src/app/sections/payouts/payouts/payouts.component.ts @@ -1,13 +1,12 @@ -import { Component, Inject, OnInit } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { FormControl } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogService } from '@vality/ng-core'; import omitBy from 'lodash-es/omitBy'; import { QueryParamsService } from '@cc/app/shared/services'; import { isNilOrEmptyString } from '@cc/utils/is-nil-or-empty-string'; -import { BaseDialogService } from '../../../../components/base-dialog/services/base-dialog.service'; -import { DIALOG_CONFIG, DialogConfig } from '../../../tokens'; import { PayoutActionsService } from '../services/payout-actions.service'; import { CreatePayoutDialogComponent } from './components/create-payout-dialog/create-payout-dialog.component'; import { PayoutsSearchForm } from './components/payouts-search-form/payouts-search-form.component'; @@ -29,8 +28,7 @@ export class PayoutsComponent implements OnInit { constructor( private fetchPayoutsService: FetchPayoutsService, private qp: QueryParamsService>, - private baseDialogService: BaseDialogService, - @Inject(DIALOG_CONFIG) private dialogConfig: DialogConfig + private baseDialogService: BaseDialogService ) {} ngOnInit() { diff --git a/src/app/sections/payouts/payouts/payouts.module.ts b/src/app/sections/payouts/payouts/payouts.module.ts index 08c62515..d77f7cdf 100644 --- a/src/app/sections/payouts/payouts/payouts.module.ts +++ b/src/app/sections/payouts/payouts/payouts.module.ts @@ -13,13 +13,13 @@ import { MatMenuModule } from '@angular/material/menu'; import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatSelectModule } from '@angular/material/select'; import { MatTableModule } from '@angular/material/table'; +import { BaseDialogModule } from '@vality/ng-core'; import { PayoutToolFieldModule, ShopFieldModule, StatusModule } from '@cc/app/shared/components'; import { MerchantFieldModule } from '@cc/app/shared/components/merchant-field'; import { ApiModelPipesModule, CommonPipesModule, ThriftPipesModule } from '@cc/app/shared/pipes'; import { EmptySearchResultModule } from '@cc/components/empty-search-result'; -import { BaseDialogModule } from '../../../../components/base-dialog'; import { CancelPayoutDialogComponent } from './components/cancel-payout-dialog/cancel-payout-dialog.component'; import { CreatePayoutDialogComponent } from './components/create-payout-dialog/create-payout-dialog.component'; import { PayoutsSearchFormComponent } from './components/payouts-search-form/payouts-search-form.component'; diff --git a/src/app/sections/payouts/services/payout-actions.service.ts b/src/app/sections/payouts/services/payout-actions.service.ts index 42c17105..3924a3b2 100644 --- a/src/app/sections/payouts/services/payout-actions.service.ts +++ b/src/app/sections/payouts/services/payout-actions.service.ts @@ -1,11 +1,10 @@ import { Injectable } from '@angular/core'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { PayoutID, PayoutStatus } from '@vality/magista-proto'; +import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core'; import { switchMap } from 'rxjs'; import { filter } from 'rxjs/operators'; -import { BaseDialogResponseStatus } from '../../../../components/base-dialog'; -import { BaseDialogService } from '../../../../components/base-dialog/services/base-dialog.service'; import { ConfirmActionDialogComponent } from '../../../../components/confirm-action-dialog'; import { PayoutManagementService } from '../../../api/payout-manager'; import { NotificationService } from '../../../shared/services/notification'; diff --git a/src/app/sections/repairing/components/repair-by-scenario-dialog/repair-by-scenario-dialog.component.ts b/src/app/sections/repairing/components/repair-by-scenario-dialog/repair-by-scenario-dialog.component.ts index eb977ec3..c19201d9 100644 --- a/src/app/sections/repairing/components/repair-by-scenario-dialog/repair-by-scenario-dialog.component.ts +++ b/src/app/sections/repairing/components/repair-by-scenario-dialog/repair-by-scenario-dialog.component.ts @@ -2,13 +2,10 @@ import { Component, Injector } from '@angular/core'; import { Validators } from '@angular/forms'; import { FormControl } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core'; import { RepairInvoicesRequest, RepairWithdrawalsRequest } from '@vality/repairer-proto'; import { BehaviorSubject, from } from 'rxjs'; -import { - BaseDialogResponseStatus, - BaseDialogSuperclass, -} from '../../../../../components/base-dialog'; import { progressTo } from '../../../../../utils'; import { RepairManagementService } from '../../../../api/repairer'; import { ErrorService } from '../../../../shared/services/error'; diff --git a/src/app/sections/repairing/repairing.component.ts b/src/app/sections/repairing/repairing.component.ts index 40461e12..38343f35 100644 --- a/src/app/sections/repairing/repairing.component.ts +++ b/src/app/sections/repairing/repairing.component.ts @@ -3,6 +3,7 @@ import { Component, OnInit } from '@angular/core'; import { FormBuilder } from '@angular/forms'; import { DateRange } from '@angular/material/datepicker'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core'; import { Machine, Namespace, ProviderID, RepairStatus } from '@vality/repairer-proto'; import isEmpty from 'lodash-es/isEmpty'; import isNil from 'lodash-es/isNil'; @@ -10,8 +11,6 @@ import omitBy from 'lodash-es/omitBy'; import { Moment } from 'moment'; import { filter, map, switchMap } from 'rxjs/operators'; -import { BaseDialogResponseStatus } from '../../../components/base-dialog'; -import { BaseDialogService } from '../../../components/base-dialog/services/base-dialog.service'; import { ConfirmActionDialogComponent } from '../../../components/confirm-action-dialog'; import { getEnumKeys } from '../../../utils'; import { RepairManagementService } from '../../api/repairer'; diff --git a/src/app/sections/repairing/repairing.module.ts b/src/app/sections/repairing/repairing.module.ts index bb2836e3..85930e2f 100644 --- a/src/app/sections/repairing/repairing.module.ts +++ b/src/app/sections/repairing/repairing.module.ts @@ -12,9 +12,8 @@ import { MatRadioModule } from '@angular/material/radio'; import { MatSelectModule } from '@angular/material/select'; import { MatTableModule } from '@angular/material/table'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { ActionsModule, BaseDialogModule } from '@vality/ng-core'; -import { ActionsModule } from '../../../components/actions'; -import { BaseDialogModule } from '../../../components/base-dialog'; import { EmptySearchResultModule } from '../../../components/empty-search-result'; import { TableModule } from '../../../components/table'; import { MetadataFormModule } from '../../shared'; diff --git a/src/app/sections/routing-rules/change-delegate-ruleset-dialog/change-delegate-ruleset-dialog.component.ts b/src/app/sections/routing-rules/change-delegate-ruleset-dialog/change-delegate-ruleset-dialog.component.ts index 44e169b2..7d5ff75d 100644 --- a/src/app/sections/routing-rules/change-delegate-ruleset-dialog/change-delegate-ruleset-dialog.component.ts +++ b/src/app/sections/routing-rules/change-delegate-ruleset-dialog/change-delegate-ruleset-dialog.component.ts @@ -1,10 +1,9 @@ import { ChangeDetectionStrategy, Component, Injector, OnInit } from '@angular/core'; import { UntypedFormBuilder } from '@angular/forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogSuperclass } from '@vality/ng-core'; import { map } from 'rxjs/operators'; -import { BaseDialogSuperclass } from '@cc/components/base-dialog'; - import { RoutingRulesService } from '../../../thrift-services'; @UntilDestroy() diff --git a/src/app/sections/routing-rules/change-delegate-ruleset-dialog/change-delegate-ruleset-dialog.module.ts b/src/app/sections/routing-rules/change-delegate-ruleset-dialog/change-delegate-ruleset-dialog.module.ts index 32f5bfaf..dc09cc70 100644 --- a/src/app/sections/routing-rules/change-delegate-ruleset-dialog/change-delegate-ruleset-dialog.module.ts +++ b/src/app/sections/routing-rules/change-delegate-ruleset-dialog/change-delegate-ruleset-dialog.module.ts @@ -5,8 +5,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatInputModule } from '@angular/material/input'; import { MatSelectModule } from '@angular/material/select'; - -import { BaseDialogModule } from '@cc/components/base-dialog'; +import { BaseDialogModule } from '@vality/ng-core'; import { ChangeDelegateRulesetDialogComponent } from './change-delegate-ruleset-dialog.component'; diff --git a/src/app/sections/routing-rules/change-target-dialog/change-target-dialog.component.ts b/src/app/sections/routing-rules/change-target-dialog/change-target-dialog.component.ts index 9ca284cc..07817721 100644 --- a/src/app/sections/routing-rules/change-target-dialog/change-target-dialog.component.ts +++ b/src/app/sections/routing-rules/change-target-dialog/change-target-dialog.component.ts @@ -1,9 +1,9 @@ import { ChangeDetectionStrategy, Component, Injector } from '@angular/core'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogSuperclass } from '@vality/ng-core'; import { BehaviorSubject } from 'rxjs'; import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type'; -import { BaseDialogSuperclass } from '@cc/components/base-dialog'; import { ErrorService } from '../../../shared/services/error'; import { RoutingRulesService } from '../../../thrift-services'; diff --git a/src/app/sections/routing-rules/change-target-dialog/change-target-dialog.module.ts b/src/app/sections/routing-rules/change-target-dialog/change-target-dialog.module.ts index e5e04875..79b7e5d9 100644 --- a/src/app/sections/routing-rules/change-target-dialog/change-target-dialog.module.ts +++ b/src/app/sections/routing-rules/change-target-dialog/change-target-dialog.module.ts @@ -3,8 +3,7 @@ import { NgModule } from '@angular/core'; import { FlexLayoutModule } from '@angular/flex-layout'; import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule } from '@angular/material/dialog'; - -import { BaseDialogModule } from '@cc/components/base-dialog'; +import { BaseDialogModule } from '@vality/ng-core'; import { TargetRulesetFormModule } from '../target-ruleset-form'; import { ChangeTargetDialogComponent } from './change-target-dialog.component'; diff --git a/src/app/sections/routing-rules/party-delegate-rulesets/attach-new-ruleset-dialog/attach-new-ruleset-dialog.component.ts b/src/app/sections/routing-rules/party-delegate-rulesets/attach-new-ruleset-dialog/attach-new-ruleset-dialog.component.ts index ea7085ee..63578a48 100644 --- a/src/app/sections/routing-rules/party-delegate-rulesets/attach-new-ruleset-dialog/attach-new-ruleset-dialog.component.ts +++ b/src/app/sections/routing-rules/party-delegate-rulesets/attach-new-ruleset-dialog/attach-new-ruleset-dialog.component.ts @@ -1,10 +1,10 @@ import { ChangeDetectionStrategy, Component, Injector } from '@angular/core'; import { UntypedFormBuilder } from '@angular/forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogSuperclass } from '@vality/ng-core'; import { BehaviorSubject } from 'rxjs'; import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type'; -import { BaseDialogSuperclass } from '@cc/components/base-dialog'; import { ErrorService } from '../../../../shared/services/error'; import { RoutingRulesService } from '../../../../thrift-services'; diff --git a/src/app/sections/routing-rules/party-delegate-rulesets/party-delegate-rulesets.component.ts b/src/app/sections/routing-rules/party-delegate-rulesets/party-delegate-rulesets.component.ts index 75678e2d..36988aa6 100644 --- a/src/app/sections/routing-rules/party-delegate-rulesets/party-delegate-rulesets.component.ts +++ b/src/app/sections/routing-rules/party-delegate-rulesets/party-delegate-rulesets.component.ts @@ -1,10 +1,10 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogService } from '@vality/ng-core'; import { first, map } from 'rxjs/operators'; import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type'; -import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service'; import { handleError } from '../../../../utils/operators/handle-error'; import { ErrorService } from '../../../shared/services/error'; diff --git a/src/app/sections/routing-rules/party-delegate-rulesets/party-delegate-rulesets.module.ts b/src/app/sections/routing-rules/party-delegate-rulesets/party-delegate-rulesets.module.ts index 0665e591..5c18aa50 100644 --- a/src/app/sections/routing-rules/party-delegate-rulesets/party-delegate-rulesets.module.ts +++ b/src/app/sections/routing-rules/party-delegate-rulesets/party-delegate-rulesets.module.ts @@ -14,8 +14,8 @@ import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatRadioModule } from '@angular/material/radio'; import { MatSelectModule } from '@angular/material/select'; import { RouterModule } from '@angular/router'; +import { BaseDialogModule } from '@vality/ng-core'; -import { BaseDialogModule } from '@cc/components/base-dialog'; import { DetailsItemModule } from '@cc/components/details-item'; import { ChangeTargetDialogModule } from '../change-target-dialog'; diff --git a/src/app/sections/routing-rules/party-routing-ruleset/add-party-routing-rule-dialog/add-party-routing-rule-dialog.component.ts b/src/app/sections/routing-rules/party-routing-ruleset/add-party-routing-rule-dialog/add-party-routing-rule-dialog.component.ts index 7a7cdbee..97a469c7 100644 --- a/src/app/sections/routing-rules/party-routing-ruleset/add-party-routing-rule-dialog/add-party-routing-rule-dialog.component.ts +++ b/src/app/sections/routing-rules/party-routing-ruleset/add-party-routing-rule-dialog/add-party-routing-rule-dialog.component.ts @@ -3,8 +3,7 @@ import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Shop } from '@vality/domain-proto/lib/domain'; import { StatWallet } from '@vality/fistful-proto/lib/fistful_stat'; - -import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog'; +import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core'; import { ErrorService } from '../../../../shared/services/error'; import { RoutingRulesService } from '../../../../thrift-services'; diff --git a/src/app/sections/routing-rules/party-routing-ruleset/add-party-routing-rule-dialog/add-party-routing-rule-dialog.module.ts b/src/app/sections/routing-rules/party-routing-ruleset/add-party-routing-rule-dialog/add-party-routing-rule-dialog.module.ts index f9a03285..5490d268 100644 --- a/src/app/sections/routing-rules/party-routing-ruleset/add-party-routing-rule-dialog/add-party-routing-rule-dialog.module.ts +++ b/src/app/sections/routing-rules/party-routing-ruleset/add-party-routing-rule-dialog/add-party-routing-rule-dialog.module.ts @@ -11,8 +11,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; import { MatRadioModule } from '@angular/material/radio'; import { MatSelectModule } from '@angular/material/select'; - -import { BaseDialogModule } from '@cc/components/base-dialog'; +import { BaseDialogModule } from '@vality/ng-core'; import { AddPartyRoutingRuleDialogComponent } from './add-party-routing-rule-dialog.component'; diff --git a/src/app/sections/routing-rules/party-routing-ruleset/initialize-routing-rules-dialog/initialize-routing-rules-dialog.component.ts b/src/app/sections/routing-rules/party-routing-ruleset/initialize-routing-rules-dialog/initialize-routing-rules-dialog.component.ts index ab8a9b0f..1489f224 100644 --- a/src/app/sections/routing-rules/party-routing-ruleset/initialize-routing-rules-dialog/initialize-routing-rules-dialog.component.ts +++ b/src/app/sections/routing-rules/party-routing-ruleset/initialize-routing-rules-dialog/initialize-routing-rules-dialog.component.ts @@ -1,8 +1,7 @@ import { Component, Injector } from '@angular/core'; import { UntypedFormBuilder } from '@angular/forms'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; - -import { BaseDialogSuperclass } from '@cc/components/base-dialog'; +import { BaseDialogSuperclass } from '@vality/ng-core'; import { ErrorService } from '../../../../shared/services/error'; import { RoutingRulesService } from '../../../../thrift-services'; diff --git a/src/app/sections/routing-rules/party-routing-ruleset/initialize-routing-rules-dialog/initialize-routing-rules-dialog.module.ts b/src/app/sections/routing-rules/party-routing-ruleset/initialize-routing-rules-dialog/initialize-routing-rules-dialog.module.ts index 34551cd4..9615fdc1 100644 --- a/src/app/sections/routing-rules/party-routing-ruleset/initialize-routing-rules-dialog/initialize-routing-rules-dialog.module.ts +++ b/src/app/sections/routing-rules/party-routing-ruleset/initialize-routing-rules-dialog/initialize-routing-rules-dialog.module.ts @@ -11,8 +11,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; import { MatRadioModule } from '@angular/material/radio'; import { MatSelectModule } from '@angular/material/select'; - -import { BaseDialogModule } from '@cc/components/base-dialog'; +import { BaseDialogModule } from '@vality/ng-core'; import { InitializeRoutingRulesDialogComponent } from './initialize-routing-rules-dialog.component'; diff --git a/src/app/sections/routing-rules/party-routing-ruleset/party-routing-ruleset.component.ts b/src/app/sections/routing-rules/party-routing-ruleset/party-routing-ruleset.component.ts index 83f2d029..1086d2b3 100644 --- a/src/app/sections/routing-rules/party-routing-ruleset/party-routing-ruleset.component.ts +++ b/src/app/sections/routing-rules/party-routing-ruleset/party-routing-ruleset.component.ts @@ -1,12 +1,10 @@ import { Component } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogService, BaseDialogResponseStatus } from '@vality/ng-core'; import { combineLatest, Observable } from 'rxjs'; import { filter, map, pluck, shareReplay, startWith, switchMap, take } from 'rxjs/operators'; -import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service'; - -import { BaseDialogResponseStatus } from '../../../../components/base-dialog'; import { DomainStoreService } from '../../../thrift-services/damsel/domain-store.service'; import { RoutingRulesType } from '../types/routing-rules-type'; import { AddPartyRoutingRuleDialogComponent } from './add-party-routing-rule-dialog'; diff --git a/src/app/sections/routing-rules/routing-rules-list/routing-rules-list.component.ts b/src/app/sections/routing-rules/routing-rules-list/routing-rules-list.component.ts index f92b5bbd..7076b1a4 100644 --- a/src/app/sections/routing-rules/routing-rules-list/routing-rules-list.component.ts +++ b/src/app/sections/routing-rules/routing-rules-list/routing-rules-list.component.ts @@ -10,12 +10,10 @@ import { MatPaginator } from '@angular/material/paginator'; import { MatTableDataSource } from '@angular/material/table'; import { ActivatedRoute } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core'; import { combineLatest, defer, ReplaySubject } from 'rxjs'; import { filter, map, shareReplay, startWith, switchMap } from 'rxjs/operators'; -import { BaseDialogResponseStatus } from '@cc/components/base-dialog'; -import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service'; - import { ConfirmActionDialogComponent } from '../../../../components/confirm-action-dialog'; import { handleError } from '../../../../utils/operators/handle-error'; import { ErrorService } from '../../../shared/services/error'; diff --git a/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.component.ts b/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.component.ts index d22e553d..4e0ef657 100644 --- a/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.component.ts +++ b/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.component.ts @@ -3,8 +3,7 @@ import { Validators } from '@angular/forms'; import { FormBuilder } from '@ngneat/reactive-forms'; import { UntilDestroy } from '@ngneat/until-destroy'; import { Predicate, RiskScore } from '@vality/domain-proto/lib/domain'; - -import { BaseDialogSuperclass } from '@cc/components/base-dialog'; +import { BaseDialogSuperclass } from '@vality/ng-core'; import { DomainStoreService } from '../../../../thrift-services/damsel/domain-store.service'; import { AddRoutingRuleDialogService, TerminalType } from './add-routing-rule-dialog.service'; diff --git a/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.module.ts b/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.module.ts index 2b133fd9..818fadeb 100644 --- a/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.module.ts +++ b/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.module.ts @@ -11,9 +11,9 @@ import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; import { MatRadioModule } from '@angular/material/radio'; import { MatSelectModule } from '@angular/material/select'; +import { BaseDialogModule } from '@vality/ng-core'; import { MetadataFormModule } from '@cc/app/shared'; -import { BaseDialogModule } from '@cc/components/base-dialog'; import { AddRoutingRuleDialogComponent } from './add-routing-rule-dialog.component'; import { ExpanderComponent } from './expander'; diff --git a/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.service.ts b/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.service.ts index 83cc5623..50767e3b 100644 --- a/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.service.ts +++ b/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.service.ts @@ -2,11 +2,10 @@ import { Injectable } from '@angular/core'; import { UntypedFormArray, UntypedFormBuilder, Validators } from '@angular/forms'; import { MatDialogRef } from '@angular/material/dialog'; import { Predicate } from '@vality/domain-proto/lib/domain'; +import { BaseDialogResponseStatus } from '@vality/ng-core'; import { of } from 'rxjs'; import { startWith, switchMap, take } from 'rxjs/operators'; -import { BaseDialogResponseStatus } from '@cc/components/base-dialog'; - import { RoutingRulesService } from '../../../../thrift-services'; import { AddRoutingRuleDialogComponent } from './add-routing-rule-dialog.component'; diff --git a/src/app/sections/routing-rules/routing-ruleset/routing-ruleset.component.ts b/src/app/sections/routing-rules/routing-ruleset/routing-ruleset.component.ts index fe0f7c54..98d10229 100644 --- a/src/app/sections/routing-rules/routing-ruleset/routing-ruleset.component.ts +++ b/src/app/sections/routing-rules/routing-ruleset/routing-ruleset.component.ts @@ -2,14 +2,13 @@ import { Component } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Predicate, TerminalObject } from '@vality/domain-proto/lib/domain'; +import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core'; import { Observable } from 'rxjs'; import { first, map, pluck, shareReplay, switchMap } from 'rxjs/operators'; import { objectToJSON } from '@cc/app/api/utils'; import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type'; import { NotificationService } from '@cc/app/shared/services/notification'; -import { BaseDialogResponseStatus } from '@cc/components/base-dialog'; -import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service'; import { ErrorService } from '../../../shared/services/error'; import { damselInstanceToObject } from '../../../thrift-services'; diff --git a/src/app/sections/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.ts b/src/app/sections/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.ts index ebff197c..d4e15a8e 100644 --- a/src/app/sections/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.ts +++ b/src/app/sections/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.ts @@ -5,14 +5,11 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { ExternalID } from '@vality/fistful-proto/lib/base'; import { StatWithdrawal } from '@vality/fistful-proto/lib/fistful_stat'; import { Status } from '@vality/fistful-proto/lib/withdrawal'; +import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core'; import { combineLatest, from, of } from 'rxjs'; import { catchError, finalize } from 'rxjs/operators'; import * as short from 'short-uuid'; -import { - BaseDialogResponseStatus, - BaseDialogSuperclass, -} from '../../../../../components/base-dialog'; import { ManagementService } from '../../../../api/withdrawal'; import { MetadataFormExtension } from '../../../../shared'; import { ErrorService } from '../../../../shared/services/error'; diff --git a/src/app/sections/withdrawals/withdrawals.component.ts b/src/app/sections/withdrawals/withdrawals.component.ts index d6e8cbed..48c3d902 100644 --- a/src/app/sections/withdrawals/withdrawals.component.ts +++ b/src/app/sections/withdrawals/withdrawals.component.ts @@ -6,11 +6,10 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { omitBy } from '@s-libs/micro-dash'; import { PartyID } from '@vality/domain-proto'; import { StatWithdrawal } from '@vality/fistful-proto/lib/fistful_stat'; +import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core'; import { Moment } from 'moment'; import { map } from 'rxjs/operators'; -import { BaseDialogResponseStatus } from '../../../components/base-dialog'; -import { BaseDialogService } from '../../../components/base-dialog/services/base-dialog.service'; import { SELECT_COLUMN_NAME } from '../../../components/table'; import { isNilOrEmptyString } from '../../../utils'; import { WithdrawalParams } from '../../query-dsl'; diff --git a/src/app/sections/withdrawals/withdrawals.module.ts b/src/app/sections/withdrawals/withdrawals.module.ts index a98084be..b5d6d48f 100644 --- a/src/app/sections/withdrawals/withdrawals.module.ts +++ b/src/app/sections/withdrawals/withdrawals.module.ts @@ -12,8 +12,8 @@ import { MatRadioModule } from '@angular/material/radio'; import { MatSelectModule } from '@angular/material/select'; import { MatSortModule } from '@angular/material/sort'; import { MatTableModule } from '@angular/material/table'; +import { BaseDialogModule } from '@vality/ng-core'; -import { BaseDialogModule } from '../../../components/base-dialog'; import { EmptySearchResultModule } from '../../../components/empty-search-result'; import { TableModule } from '../../../components/table'; import { MetadataFormModule, ThriftPipesModule } from '../../shared'; diff --git a/src/app/tokens.ts b/src/app/tokens.ts index 829419db..1c181058 100644 --- a/src/app/tokens.ts +++ b/src/app/tokens.ts @@ -1,7 +1,6 @@ import { InjectionToken } from '@angular/core'; import { MatDateFormats } from '@angular/material/core'; import { DateRange } from '@angular/material/datepicker'; -import { MatDialogConfig } from '@angular/material/dialog'; import { Moment } from 'moment'; import * as moment from 'moment'; @@ -13,23 +12,6 @@ export const DEFAULT_SEARCH_LIMIT = 10; export const SMALL_SEARCH_LIMIT = new InjectionToken('smallSearchLimit'); export const DEFAULT_SMALL_SEARCH_LIMIT = 5; -export type DialogConfig = { - small: MatDialogConfig; - medium: MatDialogConfig; - large: MatDialogConfig; -}; -export const DIALOG_CONFIG = new InjectionToken('dialogConfig'); -const BASE_CONFIG: MatDialogConfig = { - maxHeight: '90vh', - disableClose: true, - autoFocus: false, -}; -export const DEFAULT_DIALOG_CONFIG: DialogConfig = { - small: { ...BASE_CONFIG, width: '360px' }, - medium: { ...BASE_CONFIG, width: '552px' }, - large: { ...BASE_CONFIG, width: '648px' }, -}; - export const DEFAULT_QUERY_PARAMS_SERIALIZERS: Serializer[] = [ { id: 'moment', diff --git a/src/components/actions/index.ts b/src/components/actions/index.ts deleted file mode 100644 index 06e591b9..00000000 --- a/src/components/actions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './actions.module'; diff --git a/src/components/base-dialog/index.ts b/src/components/base-dialog/index.ts deleted file mode 100644 index af8ddb7e..00000000 --- a/src/components/base-dialog/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './base-dialog.module'; -export * from './types/base-dialog-response-status'; -export * from './types/base-dialog-response'; -export * from './utils/base-dialog-superclass'; diff --git a/src/components/confirm-action-dialog/confirm-action-dialog.component.ts b/src/components/confirm-action-dialog/confirm-action-dialog.component.ts index 79c3eb90..ca6d1fdc 100644 --- a/src/components/confirm-action-dialog/confirm-action-dialog.component.ts +++ b/src/components/confirm-action-dialog/confirm-action-dialog.component.ts @@ -1,6 +1,5 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; - -import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog'; +import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core'; @Component({ selector: 'cc-confirm-action-dialog', diff --git a/src/components/confirm-action-dialog/confirm-action-dialog.module.ts b/src/components/confirm-action-dialog/confirm-action-dialog.module.ts index d55c7c77..2426f007 100644 --- a/src/components/confirm-action-dialog/confirm-action-dialog.module.ts +++ b/src/components/confirm-action-dialog/confirm-action-dialog.module.ts @@ -2,8 +2,7 @@ import { NgModule } from '@angular/core'; import { FlexLayoutModule } from '@angular/flex-layout'; import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule } from '@angular/material/dialog'; - -import { BaseDialogModule } from '@cc/components/base-dialog'; +import { BaseDialogModule } from '@vality/ng-core'; import { ConfirmActionDialogComponent } from './confirm-action-dialog.component'; diff --git a/tsconfig.json b/tsconfig.json index 6f037e28..e25a9dd9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,8 +19,8 @@ "skipLibCheck": false, "paths": { "@cc/*": ["src/*"], - "thrift": ["node_modules/@vality/woody/dist/thrift"], - "node-int64": ["node_modules/@vality/thrift-ts/lib/int64"] + "@vality/ng-core": ["dist/ng-core"], + "thrift": ["node_modules/@vality/woody/dist/thrift"] } }, "angularCompilerOptions": {