diff --git a/libs/ngrx-accelerator/.eslintrc.json b/libs/ngrx-accelerator/.eslintrc.json new file mode 100644 index 00000000..4557503f --- /dev/null +++ b/libs/ngrx-accelerator/.eslintrc.json @@ -0,0 +1,40 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts"], + "extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], + "rules": { + "@angular-eslint/directive-selector": [ + "error", + { + "type": "attribute", + "prefix": "ocx", + "style": "camelCase" + } + ], + "@angular-eslint/component-selector": [ + "error", + { + "type": "element", + "prefix": "ocx", + "style": "kebab-case" + } + ] + } + }, + { + "files": ["*.html"], + "extends": ["plugin:@nx/angular-template"], + "rules": {} + }, + { + "files": ["*.json"], + "parser": "jsonc-eslint-parser", + "rules": { + "@nx/dependency-checks": "error" + } + } + ] +} diff --git a/libs/ngrx-accelerator/README.md b/libs/ngrx-accelerator/README.md new file mode 100644 index 00000000..212412a1 --- /dev/null +++ b/libs/ngrx-accelerator/README.md @@ -0,0 +1,7 @@ +# ngrx-accelerator + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test ngrx-accelerator` to execute the unit tests. diff --git a/libs/ngrx-accelerator/jest.config.ts b/libs/ngrx-accelerator/jest.config.ts new file mode 100644 index 00000000..fe363561 --- /dev/null +++ b/libs/ngrx-accelerator/jest.config.ts @@ -0,0 +1,22 @@ +/* eslint-disable */ +export default { + displayName: 'ngrx-accelerator', + preset: '../../jest.preset.js', + setupFilesAfterEnv: ['/src/test-setup.ts'], + coverageDirectory: '../../coverage/libs/ngrx-accelerator', + transform: { + '^.+\\.(ts|mjs|js|html)$': [ + 'jest-preset-angular', + { + tsconfig: '/tsconfig.spec.json', + stringifyContentPathRegex: '\\.(html|svg)$', + }, + ], + }, + transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], + snapshotSerializers: [ + 'jest-preset-angular/build/serializers/no-ng-attributes', + 'jest-preset-angular/build/serializers/ng-snapshot', + 'jest-preset-angular/build/serializers/html-comment', + ], +} diff --git a/libs/ngrx-accelerator/ng-package.json b/libs/ngrx-accelerator/ng-package.json new file mode 100644 index 00000000..b600f8d9 --- /dev/null +++ b/libs/ngrx-accelerator/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/libs/ngrx-accelerator", + "lib": { + "entryFile": "src/index.ts" + }, + "assets": [ + "CHANGELOG.md" + ] +} \ No newline at end of file diff --git a/libs/ngrx-accelerator/package.json b/libs/ngrx-accelerator/package.json new file mode 100644 index 00000000..0dd4ae59 --- /dev/null +++ b/libs/ngrx-accelerator/package.json @@ -0,0 +1,22 @@ +{ + "name": "@onecx/ngrx-accelerator", + "version": "5.3.2", + "peerDependencies": { + "@angular/core": "^18.0.5", + "@angular/router": "^18.0.5", + "deepmerge": "^4.3.1", + "fast-deep-equal": "^3.1.3", + "@ngrx/effects": "^18.0.1", + "@ngrx/operators": "^18.0.1", + "@ngrx/router-store": "^18.0.1", + "@ngrx/store": "^18.0.1", + "rxjs": "7.8.1", + "tslib": "^2.6.3", + "zod": "^3.23.8" + }, + "main": "./src/index.js", + "typings": "./src/index.d.ts", + "publishConfig": { + "access": "public" + } +} diff --git a/libs/ngrx-accelerator/project.json b/libs/ngrx-accelerator/project.json new file mode 100644 index 00000000..d2e0d49c --- /dev/null +++ b/libs/ngrx-accelerator/project.json @@ -0,0 +1,47 @@ +{ + "name": "ngrx-accelerator", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/ngrx-accelerator/src", + "prefix": "lib", + "projectType": "library", + "tags": [], + "targets": { + "build": { + "executor": "@nx/js:tsc", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "dist/libs/ngrx-accelerator", + "main": "libs/ngrx-accelerator/src/index.ts", + "tsConfig": "libs/ngrx-accelerator/tsconfig.lib.json", + "assets": ["libs/ngrx-accelerator/*.md"] + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "libs/ngrx-accelerator/jest.config.ts", + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["libs/ngrx-accelerator/**/*.ts", "libs/ngrx-accelerator/package.json"] + } + }, + "release": { + "executor": "nx-release:build-update-publish", + "options": { + "libName": "ngrx-accelerator" + } + } + } +} diff --git a/libs/ngrx-accelerator/src/index.ts b/libs/ngrx-accelerator/src/index.ts new file mode 100644 index 00000000..f457c2fe --- /dev/null +++ b/libs/ngrx-accelerator/src/index.ts @@ -0,0 +1,11 @@ +// Effects +export * from './lib/utils/effects/create-query-params-effect' +export * from './lib/utils/effects/filter-for-navigated-to' +export * from './lib/utils/effects/filter-for-only-query-params-changed' +export * from './lib/utils/effects/filter-for-query-params-changed' + +// Selectors +export * from './lib/utils/selectors/create-child-selectors' + +// Local Storage +export * from './lib/utils/local-storage/lazy-loading-merge-reducer' \ No newline at end of file diff --git a/libs/ngrx-accelerator/src/lib/utils/effects/create-query-params-effect.ts b/libs/ngrx-accelerator/src/lib/utils/effects/create-query-params-effect.ts new file mode 100644 index 00000000..fea8eab4 --- /dev/null +++ b/libs/ngrx-accelerator/src/lib/utils/effects/create-query-params-effect.ts @@ -0,0 +1,32 @@ +import { ActivatedRoute, Router } from '@angular/router' +import { Actions, createEffect, ofType } from '@ngrx/effects' +import { concatLatestFrom } from '@ngrx/operators' +import { ActionCreator, Creator } from '@ngrx/store' +import { tap } from 'rxjs' + +export function createQueryParamsEffect>( + actions$: Actions, + actionType: AC, + router: Router, + activatedRoute: ActivatedRoute, + reducer: (state: Record, action: ReturnType) => Record +) { + return createEffect( + () => { + return actions$.pipe( + ofType(actionType), + concatLatestFrom(() => activatedRoute.queryParams), + tap(([action, queryParams]) => { + const params = reducer(queryParams, action) + router.navigate([], { + relativeTo: activatedRoute, + queryParams: params, + replaceUrl: true, + onSameUrlNavigation: 'reload', + }) + }) + ) + }, + { dispatch: false } + ) +} diff --git a/libs/ngrx-accelerator/src/lib/utils/effects/filter-for-navigated-to.ts b/libs/ngrx-accelerator/src/lib/utils/effects/filter-for-navigated-to.ts new file mode 100644 index 00000000..d2669c93 --- /dev/null +++ b/libs/ngrx-accelerator/src/lib/utils/effects/filter-for-navigated-to.ts @@ -0,0 +1,30 @@ +import { filter, MonoTypeOperatorFunction } from 'rxjs' +import { ActivatedRoute, Router } from '@angular/router' +import { Type } from '@angular/core' +import { RouterNavigatedAction } from '@ngrx/router-store' + +export function filterForNavigatedTo( + router: Router, + component: Type +): MonoTypeOperatorFunction { + return (source) => { + return source.pipe( + filter(() => { + return checkForComponent(component, router.routerState.root) + }) + ) + } +} + +function checkForComponent(component: any, route: ActivatedRoute): boolean { + if (route.component === component) { + return true + } + for (const c of route.children) { + const r = checkForComponent(component, c) + if (r) { + return true + } + } + return false +} diff --git a/libs/ngrx-accelerator/src/lib/utils/effects/filter-for-only-query-params-changed.ts b/libs/ngrx-accelerator/src/lib/utils/effects/filter-for-only-query-params-changed.ts new file mode 100644 index 00000000..d9977b65 --- /dev/null +++ b/libs/ngrx-accelerator/src/lib/utils/effects/filter-for-only-query-params-changed.ts @@ -0,0 +1,34 @@ +import { Router, RoutesRecognized } from '@angular/router' +import { RouterNavigatedAction } from '@ngrx/router-store' +import { filter, map, MonoTypeOperatorFunction, withLatestFrom } from 'rxjs' + +/** + * @deprecated use filterOutOnlyQueryParamsChanged + */ +export function filterForOnlyQueryParamsChanged( + router: Router +): MonoTypeOperatorFunction { + return filterOutOnlyQueryParamsChanged(router) +} + +export function filterOutOnlyQueryParamsChanged( + router: Router +): MonoTypeOperatorFunction { + return (source) => { + return source.pipe( + withLatestFrom( + router.events.pipe( + filter((e) => e instanceof RoutesRecognized), + map(() => router.routerState) + ) + ), + filter(([action, previousRouterState]) => { + const previousPath = previousRouterState.snapshot.url.split('?')[0] + const currentPath = action.payload.event.urlAfterRedirects.split('?')[0] + + return previousPath !== currentPath + }), + map(([action]) => action) + ) + } +} diff --git a/libs/ngrx-accelerator/src/lib/utils/effects/filter-for-query-params-changed.ts b/libs/ngrx-accelerator/src/lib/utils/effects/filter-for-query-params-changed.ts new file mode 100644 index 00000000..b53cef21 --- /dev/null +++ b/libs/ngrx-accelerator/src/lib/utils/effects/filter-for-query-params-changed.ts @@ -0,0 +1,59 @@ +import { RouterNavigatedAction } from '@ngrx/router-store' +import { ZodType } from 'zod' +import { MonoTypeOperatorFunction, filter, withLatestFrom, map } from 'rxjs' +import equal from 'fast-deep-equal' +import { Router, RoutesRecognized } from '@angular/router' + +/** + * @deprecated use filterOutQueryParamsHaveNotChanged + */ +export function filterForQueryParamsChanged( + router: Router, + queryParamsTypeDef: ZodType, + allowEmptyQueryParamsList = false +): MonoTypeOperatorFunction { + return filterOutQueryParamsHaveNotChanged(router, queryParamsTypeDef, allowEmptyQueryParamsList) +} + +export function filterOutQueryParamsHaveNotChanged( + router: Router, + queryParamsTypeDef: ZodType, + allowEmptyQueryParamsList = false +): MonoTypeOperatorFunction { + return (source) => { + return source.pipe( + withLatestFrom( + router.events.pipe( + filter((e) => e instanceof RoutesRecognized), + map(() => router.routerState) + ) + ), + filter(([action, previousRouterState]) => { + if ( + !allowEmptyQueryParamsList && + Object.keys(action?.payload?.routerState?.root?.queryParams || {}).length === 0 + ) { + return false + } + const currentQueryParams = previousRouterState.snapshot.root.queryParams + const actionResult = queryParamsTypeDef.safeParse(action?.payload?.routerState?.root?.queryParams) + const currentResult = queryParamsTypeDef.safeParse(currentQueryParams) + + if (actionResult.success && currentResult.success) { + const actionParams = actionResult.data + const currentParams = currentResult.data + if ( + allowEmptyQueryParamsList && + Object.keys(actionParams).length === 0 && + Object.keys(currentParams).length === 0 + ) { + return true + } + return !equal(actionParams, currentParams) + } + return false + }), + map(([action]) => action) + ) + } +} diff --git a/libs/ngrx-accelerator/src/lib/utils/local-storage/lazy-loading-merge-reducer.ts b/libs/ngrx-accelerator/src/lib/utils/local-storage/lazy-loading-merge-reducer.ts new file mode 100644 index 00000000..469825d0 --- /dev/null +++ b/libs/ngrx-accelerator/src/lib/utils/local-storage/lazy-loading-merge-reducer.ts @@ -0,0 +1,22 @@ +import deepmerge from 'deepmerge' + +export const lazyLoadingMergeReducer = (state: any, rehydratedState: any, _action: any) => { + const overwriteMerge = (_destinationArray: any, sourceArray: any, _options: any) => sourceArray + const options: deepmerge.Options = { + arrayMerge: overwriteMerge, + } + const keysToRehydrate = Object.keys(rehydratedState).filter((key) => state[key]) + if (keysToRehydrate.length) { + const stateToRehydrate = Object.keys(rehydratedState).reduce((acc: Record, key) => { + if (keysToRehydrate.includes(key)) { + acc[key] = rehydratedState[key] + } + return acc + }, {}) + state = deepmerge(state, stateToRehydrate, options) + keysToRehydrate.forEach((key) => { + delete rehydratedState[key] + }) + } + return state +} diff --git a/libs/ngrx-accelerator/src/lib/utils/selectors/create-child-selectors.ts b/libs/ngrx-accelerator/src/lib/utils/selectors/create-child-selectors.ts new file mode 100644 index 00000000..efadae1e --- /dev/null +++ b/libs/ngrx-accelerator/src/lib/utils/selectors/create-child-selectors.ts @@ -0,0 +1,26 @@ +import { MemoizedSelector, createSelector } from '@ngrx/store' + +type Primitive = string | number | bigint | boolean | null | undefined + +type ChildSelectors, ChildState> = ChildState extends Primitive | unknown[] | Date + ? Record + : { + [K in keyof ChildState & string as `select${Capitalize}`]: MemoizedSelector + } + +function capitalize(text: T): Capitalize { + return (text.charAt(0).toUpperCase() + text.substring(1)) as Capitalize +} + +export function createChildSelectors, ChildState extends Record>( + featureSelector: MemoizedSelector, + initialChildState: ChildState +): ChildSelectors { + return Object.keys(initialChildState).reduce( + (nestedSelectors, nestedKey) => ({ + ...nestedSelectors, + [`select${capitalize(nestedKey)}`]: createSelector(featureSelector, (parentState) => parentState?.[nestedKey]), + }), + {} as ChildSelectors + ) +} diff --git a/libs/ngrx-accelerator/src/test-setup.ts b/libs/ngrx-accelerator/src/test-setup.ts new file mode 100644 index 00000000..a5e675ac --- /dev/null +++ b/libs/ngrx-accelerator/src/test-setup.ts @@ -0,0 +1,8 @@ +// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment +globalThis.ngJest = { + testEnvironmentOptions: { + errorOnUnknownElements: true, + errorOnUnknownProperties: true, + }, +} +import 'jest-preset-angular/setup-jest' diff --git a/libs/ngrx-accelerator/tsconfig.json b/libs/ngrx-accelerator/tsconfig.json new file mode 100644 index 00000000..56deb89f --- /dev/null +++ b/libs/ngrx-accelerator/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "target": "es2022", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "extends": "../../tsconfig.base.json", + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/libs/ngrx-accelerator/tsconfig.lib.json b/libs/ngrx-accelerator/tsconfig.lib.json new file mode 100644 index 00000000..4cab05d4 --- /dev/null +++ b/libs/ngrx-accelerator/tsconfig.lib.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [] + }, + "exclude": ["src/**/*.spec.ts", "src/test-setup.ts", "jest.config.ts", "src/**/*.test.ts"], + "include": ["src/**/*.ts"] +} diff --git a/libs/ngrx-accelerator/tsconfig.spec.json b/libs/ngrx-accelerator/tsconfig.spec.json new file mode 100644 index 00000000..7870b7c0 --- /dev/null +++ b/libs/ngrx-accelerator/tsconfig.spec.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "target": "es2016", + "types": ["jest", "node"] + }, + "files": ["src/test-setup.ts"], + "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] +} diff --git a/libs/portal-integration-angular/ngrx/create-child-selectors.ts b/libs/portal-integration-angular/ngrx/create-child-selectors.ts index efadae1e..80c048b5 100644 --- a/libs/portal-integration-angular/ngrx/create-child-selectors.ts +++ b/libs/portal-integration-angular/ngrx/create-child-selectors.ts @@ -12,6 +12,9 @@ function capitalize(text: T): Capitalize { return (text.charAt(0).toUpperCase() + text.substring(1)) as Capitalize } +/** + * @deprecated Please import from \@onecx/ngrx-accelerator + */ export function createChildSelectors, ChildState extends Record>( featureSelector: MemoizedSelector, initialChildState: ChildState diff --git a/libs/portal-integration-angular/ngrx/create-query-params-effect.ts b/libs/portal-integration-angular/ngrx/create-query-params-effect.ts index fea8eab4..f26653e2 100644 --- a/libs/portal-integration-angular/ngrx/create-query-params-effect.ts +++ b/libs/portal-integration-angular/ngrx/create-query-params-effect.ts @@ -4,6 +4,9 @@ import { concatLatestFrom } from '@ngrx/operators' import { ActionCreator, Creator } from '@ngrx/store' import { tap } from 'rxjs' +/** + * @deprecated Please import from \@onecx/ngrx-accelerator + */ export function createQueryParamsEffect>( actions$: Actions, actionType: AC, diff --git a/libs/portal-integration-angular/ngrx/filter-for-navigated-to.ts b/libs/portal-integration-angular/ngrx/filter-for-navigated-to.ts index d2669c93..78a8eddf 100644 --- a/libs/portal-integration-angular/ngrx/filter-for-navigated-to.ts +++ b/libs/portal-integration-angular/ngrx/filter-for-navigated-to.ts @@ -3,6 +3,9 @@ import { ActivatedRoute, Router } from '@angular/router' import { Type } from '@angular/core' import { RouterNavigatedAction } from '@ngrx/router-store' +/** + * @deprecated Please import from \@onecx/ngrx-accelerator + */ export function filterForNavigatedTo( router: Router, component: Type diff --git a/libs/portal-integration-angular/ngrx/filter-for-only-query-params-changed.ts b/libs/portal-integration-angular/ngrx/filter-for-only-query-params-changed.ts index d9977b65..955d8265 100644 --- a/libs/portal-integration-angular/ngrx/filter-for-only-query-params-changed.ts +++ b/libs/portal-integration-angular/ngrx/filter-for-only-query-params-changed.ts @@ -11,6 +11,9 @@ export function filterForOnlyQueryParamsChanged return filterOutOnlyQueryParamsChanged(router) } +/** + * @deprecated Please import from \@onecx/ngrx-accelerator + */ export function filterOutOnlyQueryParamsChanged( router: Router ): MonoTypeOperatorFunction { diff --git a/libs/portal-integration-angular/ngrx/filter-for-query-params-changed.ts b/libs/portal-integration-angular/ngrx/filter-for-query-params-changed.ts index b53cef21..bd2c1d10 100644 --- a/libs/portal-integration-angular/ngrx/filter-for-query-params-changed.ts +++ b/libs/portal-integration-angular/ngrx/filter-for-query-params-changed.ts @@ -15,6 +15,9 @@ export function filterForQueryParamsChanged( return filterOutQueryParamsHaveNotChanged(router, queryParamsTypeDef, allowEmptyQueryParamsList) } +/** + * @deprecated Please import from \@onecx/ngrx-accelerator + */ export function filterOutQueryParamsHaveNotChanged( router: Router, queryParamsTypeDef: ZodType, diff --git a/nx.json b/nx.json index 3ba47634..ff794c37 100644 --- a/nx.json +++ b/nx.json @@ -4,32 +4,17 @@ "default": { "runner": "nx/tasks-runners/default", "options": { - "cacheableOperations": [ - "build", - "lint", - "test", - "e2e", - "build-storybook" - ] + "cacheableOperations": ["build", "lint", "test", "e2e", "build-storybook"] } } }, "targetDefaults": { "build": { - "dependsOn": [ - "^build" - ], - "inputs": [ - "production", - "^production" - ] + "dependsOn": ["^build"], + "inputs": ["production", "^production"] }, "test": { - "inputs": [ - "default", - "^production", - "{workspaceRoot}/jest.preset.js" - ] + "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"] }, "lint": { "inputs": [ @@ -40,19 +25,11 @@ ] }, "build-storybook": { - "inputs": [ - "default", - "^production", - "{projectRoot}/.storybook/**/*", - "{projectRoot}/tsconfig.storybook.json" - ] + "inputs": ["default", "^production", "{projectRoot}/.storybook/**/*", "{projectRoot}/tsconfig.storybook.json"] } }, "namedInputs": { - "default": [ - "{projectRoot}/**/*", - "sharedGlobals" - ], + "default": ["{projectRoot}/**/*", "sharedGlobals"], "production": [ "default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", @@ -83,4 +60,4 @@ "style": "scss" } } -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index d6a24979..95b8df03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,11 +78,13 @@ "@storybook/core-server": "^8.2.8", "@swc-node/register": "~1.10.0", "@swc/core": "~1.7.10", + "@swc/helpers": "~0.5.11", "@types/d3": "^7.4.3", "@types/jest": "^29.5.12", "@types/node": "~22.4.0", "@typescript-eslint/eslint-plugin": "7.17.0", "@typescript-eslint/parser": "7.18.0", + "@typescript-eslint/utils": "^7.16.0", "blob-polyfill": "^9.0.20240710", "conventional-changelog-conventionalcommits": "^8.0.0", "esbuild": "^0.19.2", @@ -9561,9 +9563,9 @@ "peer": true }, "node_modules/@pnpm/npm-conf": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.0.tgz", - "integrity": "sha512-DqrO+oXGR7HCuicNy6quk6ALJSDDPKI7RZz1bP5im8mSL8J2e+9w26LdkjuAfpAjOutYUJVbnXnx4IbTQeIgfw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", "dev": true, "peer": true, "dependencies": { @@ -10066,9 +10068,9 @@ } }, "node_modules/@semantic-release/github": { - "version": "10.1.3", - "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-10.1.3.tgz", - "integrity": "sha512-QVw7YT3J4VqyVjOnlRsFA3OCERAJHER4QbSPupbav3ER0fawrs2BAWbQFjsr24OAD4KTTKMZsVzF+GYFWCDtaQ==", + "version": "10.1.4", + "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-10.1.4.tgz", + "integrity": "sha512-dg+JTNp1XHazwAx9HgIuVewStfpv5g7QqwBF09aZVqwVkdTXw4agR/nhWSD0yxDbsx0YCeJTcjUOj92gf8/0Jw==", "dev": true, "peer": true, "dependencies": { @@ -11847,6 +11849,15 @@ "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", "dev": true }, + "node_modules/@swc/helpers": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.12.tgz", + "integrity": "sha512-KMZNXiGibsW9kvZAO1Pam2JPTDBm+KSHMMHWdsyI/1DbIZjT2A6Gy3hblVXUMEDvUAKq+e0vL0X0o54owWji7g==", + "dev": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@swc/types": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.12.tgz", diff --git a/package.json b/package.json index 2d3d73d3..7466c5c6 100644 --- a/package.json +++ b/package.json @@ -77,11 +77,13 @@ "@storybook/core-server": "^8.2.8", "@swc-node/register": "~1.10.0", "@swc/core": "~1.7.10", + "@swc/helpers": "~0.5.11", "@types/d3": "^7.4.3", "@types/jest": "^29.5.12", "@types/node": "~22.4.0", "@typescript-eslint/eslint-plugin": "7.17.0", "@typescript-eslint/parser": "7.18.0", + "@typescript-eslint/utils": "^7.16.0", "blob-polyfill": "^9.0.20240710", "conventional-changelog-conventionalcommits": "^8.0.0", "esbuild": "^0.19.2", diff --git a/tsconfig.base.json b/tsconfig.base.json index eec484a8..fc6d9f85 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -27,6 +27,7 @@ "@onecx/angular-webcomponents": ["libs/angular-webcomponents/src/index.ts"], "@onecx/integration-interface": ["libs/integration-interface/src/index.ts"], "@onecx/keycloak-auth": ["libs/keycloak-auth/src/index.ts"], + "@onecx/ngrx-accelerator": ["libs/ngrx-accelerator/src/index.ts"], "@onecx/portal-integration-angular": ["libs/portal-integration-angular/src/index.ts"], "@onecx/portal-integration-angular/mocks": ["libs/portal-integration-angular/mocks/index.ts"], "@onecx/portal-integration-angular/testing": ["libs/portal-integration-angular/testing/index.ts"],