diff --git a/.env-cmdrc b/.env-cmdrc index 7ed39e511e7..56d6af50ecb 100644 --- a/.env-cmdrc +++ b/.env-cmdrc @@ -53,10 +53,15 @@ "CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s8-public.model-t.myhybris.cloud", "CX_B2B": "true", "CX_S4OM": "true", - "CX_REQUESTED_DELIVERY_DATE": "true" + "CX_REQUESTED_DELIVERY_DATE": "true", + "CX_PDF_INVOICES": "true" }, "requested-delivery-date": { "CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s8-public.model-t.myhybris.cloud", "CX_REQUESTED_DELIVERY_DATE": "true" + }, + "pdf-invoices": { + "CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s5-public.model-t.myhybris.cloud", + "CX_PDF_INVOICES": "true" } } diff --git a/.github/workflows/cache-node-modules.yml b/.github/workflows/cache-node-modules.yml index d50a013d50a..dba6da3e70e 100644 --- a/.github/workflows/cache-node-modules.yml +++ b/.github/workflows/cache-node-modules.yml @@ -8,7 +8,7 @@ on: name: Cache node modules env: - NODE_VERSION: '16' + NODE_VERSION: '18' jobs: cacheNodeModules: diff --git a/.github/workflows/ci-continuous-integration.yml b/.github/workflows/ci-continuous-integration.yml index c9f062b1607..2044ac9fa45 100644 --- a/.github/workflows/ci-continuous-integration.yml +++ b/.github/workflows/ci-continuous-integration.yml @@ -10,7 +10,7 @@ on: # empty as it is used only to manually trigger the workflow env: - NODE_VERSION: '16' + NODE_VERSION: '18' NX_BASE: origin/${{ github.event.pull_request.base.ref }} NX_HEAD: origin/${{ github.event.pull_request.head.ref }} diff --git a/.github/workflows/ci-merge-checks.yml b/.github/workflows/ci-merge-checks.yml index afa03645564..5281b0a6b4a 100644 --- a/.github/workflows/ci-merge-checks.yml +++ b/.github/workflows/ci-merge-checks.yml @@ -12,7 +12,7 @@ on: env: CYPRESS_KEY: ${{ secrets.CYPRESS_KEY }} GH_TOKEN: ${{ github.token }} - NODE_VERSION: '16' + NODE_VERSION: '18' concurrency: group: ci-merge-checks-${{ github.head_ref || github.run_id }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf228056f0d..89b6a115c5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: env: CYPRESS_KEY: ${{ secrets.CYPRESS_KEY }} - NODE_VERSION: '16' + NODE_VERSION: '18' concurrency: group: ci-${{ github.head_ref || github.run_id }} diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index 621d247b4cc..cc200ae2293 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -9,7 +9,7 @@ on: # empty as it is used only to manually trigger the workflow env: CYPRESS_KEY: ${{ secrets.CYPRESS_KEY }} - NODE_VERSION: '16' + NODE_VERSION: '18' concurrency: group: lighthouse-${{ github.head_ref || github.run_id }} diff --git a/ci-scripts/e2e-cypress.sh b/ci-scripts/e2e-cypress.sh index 0af88a94591..8b2fd427c11 100755 --- a/ci-scripts/e2e-cypress.sh +++ b/ci-scripts/e2e-cypress.sh @@ -57,6 +57,8 @@ fi echo '-----' echo "Building Spartacus libraries" +export NODE_OPTIONS=--dns-result-order=ipv4first + npm ci (cd projects/storefrontapp-e2e-cypress && npm ci) diff --git a/ci-scripts/lhci.sh b/ci-scripts/lhci.sh index a067632a482..172c3d1d43a 100755 --- a/ci-scripts/lhci.sh +++ b/ci-scripts/lhci.sh @@ -2,6 +2,7 @@ set -e export SPA_ENV='lighthouse' +export NODE_OPTIONS=--dns-result-order=ipv4first npm install -g @lhci/cli@0.8.x diff --git a/core-libs/setup/package.json b/core-libs/setup/package.json index 77c1944a24a..2902e642dec 100644 --- a/core-libs/setup/package.json +++ b/core-libs/setup/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/setup", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Includes features that makes Spartacus and it's setup easier and streamlined.", "keywords": [ "spartacus", @@ -16,17 +16,17 @@ "test": "../../node_modules/.bin/jest --config ./jest.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular/core": "^15.2.4", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/user": "6.3.0-1" + "@angular/core": "^15.2.9", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/user": "6.5.0-1" }, "optionalDependencies": { - "@angular/platform-server": "^15.2.4", + "@angular/platform-server": "^15.2.9", "@nguniversal/express-engine": "^15.2.0", "express": "^4.18.2" }, diff --git a/core-libs/setup/ssr/optimized-engine/index.ts b/core-libs/setup/ssr/optimized-engine/index.ts index e3d0af3c739..b162debc6c5 100644 --- a/core-libs/setup/ssr/optimized-engine/index.ts +++ b/core-libs/setup/ssr/optimized-engine/index.ts @@ -7,3 +7,5 @@ export * from './optimized-ssr-engine'; export * from './rendering-cache'; export * from './ssr-optimization-options'; +export * from './rendering-strategy-resolver'; +export * from './rendering-strategy-resolver-options'; diff --git a/core-libs/setup/ssr/optimized-engine/optimized-ssr-engine.spec.ts b/core-libs/setup/ssr/optimized-engine/optimized-ssr-engine.spec.ts index ac97df28ba5..02b175d50df 100644 --- a/core-libs/setup/ssr/optimized-engine/optimized-ssr-engine.spec.ts +++ b/core-libs/setup/ssr/optimized-engine/optimized-ssr-engine.spec.ts @@ -1194,6 +1194,7 @@ describe('OptimizedSsrEngine', () => { "maxRenderTime": 300000, "reuseCurrentRendering": true, "debug": false, + "renderingStrategyResolver": "(request) => {\\n return shouldFallbackToCsr(request, options)\\n ? ssr_optimization_options_1.RenderingStrategy.ALWAYS_CSR\\n : ssr_optimization_options_1.RenderingStrategy.DEFAULT;\\n}", "logger": true } } @@ -1206,20 +1207,25 @@ describe('OptimizedSsrEngine', () => { logger: new MockExpressServerLogger() as ExpressServerLogger, }); expect(consoleLogSpy.mock.lastCall).toMatchInlineSnapshot(` - [ - "[spartacus] SSR optimization engine initialized", - { - "options": { - "concurrency": 10, - "debug": false, - "forcedSsrTimeout": 60000, - "logger": "MockExpressServerLogger", - "maxRenderTime": 300000, - "reuseCurrentRendering": true, - "timeout": 3000, - }, - }, - ] + [ + "[spartacus] SSR optimization engine initialized", + { + "options": { + "concurrency": 10, + "debug": false, + "forcedSsrTimeout": 60000, + "logger": "MockExpressServerLogger", + "maxRenderTime": 300000, + "renderingStrategyResolver": "(request) => { + return shouldFallbackToCsr(request, options) + ? ssr_optimization_options_1.RenderingStrategy.ALWAYS_CSR + : ssr_optimization_options_1.RenderingStrategy.DEFAULT; + }", + "reuseCurrentRendering": true, + "timeout": 3000, + }, + }, + ] `); }); it('should use the legacy server logger, if logger option not specified', () => { @@ -1232,7 +1238,8 @@ describe('OptimizedSsrEngine', () => { "forcedSsrTimeout": 60000, "maxRenderTime": 300000, "reuseCurrentRendering": true, - "debug": false + "debug": false, + "renderingStrategyResolver": "(request) => {\\n return shouldFallbackToCsr(request, options)\\n ? ssr_optimization_options_1.RenderingStrategy.ALWAYS_CSR\\n : ssr_optimization_options_1.RenderingStrategy.DEFAULT;\\n}" }", ] `); diff --git a/core-libs/setup/ssr/optimized-engine/rendering-strategy-resolver-options.ts b/core-libs/setup/ssr/optimized-engine/rendering-strategy-resolver-options.ts new file mode 100644 index 00000000000..26e69ec7802 --- /dev/null +++ b/core-libs/setup/ssr/optimized-engine/rendering-strategy-resolver-options.ts @@ -0,0 +1,16 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export interface RenderingStrategyResolverOptions { + excludedUrls?: string[]; + excludedParams?: string[]; +} + +export const defaultRenderingStrategyResolverOptions: RenderingStrategyResolverOptions = + { + excludedUrls: ['checkout', 'my-account', 'cx-preview'], + excludedParams: ['asm'], + }; diff --git a/core-libs/setup/ssr/optimized-engine/rendering-strategy-resolver.spec.ts b/core-libs/setup/ssr/optimized-engine/rendering-strategy-resolver.spec.ts new file mode 100644 index 00000000000..fa5b6a11977 --- /dev/null +++ b/core-libs/setup/ssr/optimized-engine/rendering-strategy-resolver.spec.ts @@ -0,0 +1,62 @@ +/// + +import { RenderingStrategy } from './ssr-optimization-options'; +import { Request } from 'express'; + +import { defaultRenderingStrategyResolver } from './rendering-strategy-resolver'; + +describe('RenderingStrategyResolver', () => { + let resolver: (req: Request) => RenderingStrategy = + defaultRenderingStrategyResolver({ + excludedUrls: ['checkout', 'my-account'], + excludedParams: ['asm'], + }); + + it('should return DEFAULT rendering strategy if no excluded parameters or URLs match', () => { + const request: Partial = { + query: {}, + url: '/some-page', + }; + + const strategy = resolver(request as Request); + + expect(strategy).toBe(RenderingStrategy.DEFAULT); + }); + + it('should return ALWAYS_CSR rendering strategy if an excluded parameter matches', () => { + const request: Partial = { + query: { + asm: 'true', + }, + url: '/some-page', + }; + + const strategy = resolver(request as Request); + + expect(strategy).toBe(RenderingStrategy.ALWAYS_CSR); + }); + + it('should return ALWAYS_CSR rendering strategy if the URL matches an excluded URL', () => { + const request: Partial = { + query: {}, + url: '/checkout/confirm', + }; + + const strategy = resolver(request as Request); + + expect(strategy).toBe(RenderingStrategy.ALWAYS_CSR); + }); + + it('should return ALWAYS_CSR rendering strategy if both excluded parameters and URLs match', () => { + const request: Partial = { + query: { + asm: 'true', + }, + url: '/checkout/confirm', + }; + + const strategy = resolver(request as Request); + + expect(strategy).toBe(RenderingStrategy.ALWAYS_CSR); + }); +}); diff --git a/core-libs/setup/ssr/optimized-engine/rendering-strategy-resolver.ts b/core-libs/setup/ssr/optimized-engine/rendering-strategy-resolver.ts new file mode 100644 index 00000000000..4253b92a17a --- /dev/null +++ b/core-libs/setup/ssr/optimized-engine/rendering-strategy-resolver.ts @@ -0,0 +1,64 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Request } from 'express'; +import { RenderingStrategy } from './ssr-optimization-options'; +import { RenderingStrategyResolverOptions } from './rendering-strategy-resolver-options'; + +const hasExcludedParams = ( + request: Request, + excludedParams: string[] | undefined +): boolean => { + const params: string[] = request.query + ? Object.getOwnPropertyNames(request.query) + : []; + + if (!excludedParams) { + return false; + } + + return excludedParams.some((excludedParam: string) => + params.some((param: string): boolean => excludedParam === param) + ); +}; + +const hasExcludedUrl = ( + request: Request, + excludedUrls: string[] | undefined +) => { + return request.url && excludedUrls + ? excludedUrls.some((url) => request.url.search(url) > -1) + : false; +}; + +const shouldFallbackToCsr = ( + request: Request, + { excludedParams, excludedUrls }: RenderingStrategyResolverOptions +) => { + return ( + hasExcludedParams(request, excludedParams) || + hasExcludedUrl(request, excludedUrls) + ); +}; + +/** + * Creates a rendering strategy resolver function with the specified options. + * + * @function + * @param options - The options to configure the rendering strategy resolver. + * @param [options.excludedUrls] - An optional array of URLs for which server-side rendering (SSR) should be disabled. + * @param [options.excludedParams] - An optional array of Query parameters for which SSR should be disabled. + * @returns A rendering strategy resolver function that takes a Request object + * as a parameter and returns the rendering strategy to be applied for the request, which can be either + * `RenderingStrategy.ALWAYS_CSR` or `RenderingStrategy.DEFAULT`. + */ +export const defaultRenderingStrategyResolver = + (options: RenderingStrategyResolverOptions) => + (request: Request): RenderingStrategy => { + return shouldFallbackToCsr(request, options) + ? RenderingStrategy.ALWAYS_CSR + : RenderingStrategy.DEFAULT; + }; diff --git a/core-libs/setup/ssr/optimized-engine/ssr-optimization-options.ts b/core-libs/setup/ssr/optimized-engine/ssr-optimization-options.ts index c63159bab8e..4dbdcc5b620 100644 --- a/core-libs/setup/ssr/optimized-engine/ssr-optimization-options.ts +++ b/core-libs/setup/ssr/optimized-engine/ssr-optimization-options.ts @@ -6,6 +6,8 @@ import { Request } from 'express'; import { ExpressServerLogger } from '../logger'; +import { defaultRenderingStrategyResolver } from './rendering-strategy-resolver'; +import { defaultRenderingStrategyResolverOptions } from './rendering-strategy-resolver-options'; export interface SsrOptimizationOptions { /** @@ -54,7 +56,10 @@ export interface SsrOptimizationOptions { renderKeyResolver?: (req: Request) => string; /** - * Allows defining custom rendering strategy per request + * This function allows for the definition of a custom rendering strategy on a per-request basis. + * By default, we provide a defaultRenderingStrategyResolver, + * which has a default parameter defaultRenderingStrategyResolverOptions. + * This default option disables server-side rendering (SSR) on pages such as 'checkout' and 'my-account'. * * @param req */ @@ -139,6 +144,9 @@ export const defaultSsrOptimizationOptions: SsrOptimizationOptions = { maxRenderTime: 300_000, reuseCurrentRendering: true, debug: false, + renderingStrategyResolver: defaultRenderingStrategyResolver( + defaultRenderingStrategyResolverOptions + ), //CXSPA-3680 - set ExpressServerLogger as default //logger: new ExpressServerLogger(), }; diff --git a/core-libs/setup/tsconfig.spec.json b/core-libs/setup/tsconfig.spec.json index b7c1c650dba..3b4caeb4fb9 100644 --- a/core-libs/setup/tsconfig.spec.json +++ b/core-libs/setup/tsconfig.spec.json @@ -262,6 +262,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/docs/assets/github-branch-selector.png b/docs/assets/github-branch-selector.png deleted file mode 100644 index 88545b95b4d..00000000000 Binary files a/docs/assets/github-branch-selector.png and /dev/null differ diff --git a/docs/self-publishing-spartacus-libraries.md b/docs/self-publishing-spartacus-libraries.md index d8679751204..24dee4f7d70 100644 --- a/docs/self-publishing-spartacus-libraries.md +++ b/docs/self-publishing-spartacus-libraries.md @@ -35,22 +35,18 @@ For more information about using Verdaccio or another registry software, see the git clone https://github.com/SAP/spartacus.git && cd spartacus ``` -1. Use the branch or tag name to check out the branch of the required release version. +1. Use the tag name to check out the required release version. - For example, the following command checks out the first code-frozen 5.0.0 release, which is in branch `release/5.0.0-CF1`: + For example, the following command checks out the 6.1.0 release: ```bash - git checkout release/5.0.0-CF1 + git checkout 6.1.0 ``` - When choosing a tag or branch, use the specific major.minor.patch (for example, `5.0.0`) of the release you want to use. The latest release is always recommended. + When specifying the tag of the release version, use the specific major.minor.patch (for example, `6.1.0`) of the release you want to use. The latest release is always recommended. You can use the `git branch` command to confirm which branch you are on. - **Note:** You can use the dropdown menu for switching branches in the top left of the main page of the [Spartacus GitHub repository](https://github.com/SAP/spartacus) to see which releases are available. Click on **develop**, enter `release/5` in the search field that appears in the dropdown menu, and you will see all of the available releases for version 5.0.0 and newer, as shown in the following example: - - ![GitHub Branch Selector](./assets/github-branch-selector.png) - 1. Run the following command to install packages and then build the libraries: ```bash @@ -116,35 +112,32 @@ This procedure can be used to create a fresh application. ## Upgrading an Existing Spartacus App -Before upgrading your Spartacus app to version 5.0, you first need to make sure your Angular libraries are up to date. Spartacus 5.0 requires Angular 14. +Before upgrading your Spartacus app to version 6.0, you first need to make sure your Angular libraries are up to date. Spartacus 6.0 requires Angular 15. ### Upgrading Your Angular Libraries -You can upgrade your application to Angular 14 as follows: - -- Start by upgrading Angular to version 13, and verify that all breaking changes have been addressed. -- When you have updated to Angular 13, you can then upgrade to Angular 14. - -You might have to append the `--force` flag if you encounter a mismatch between peer dependencies during the migration. The following is an example command that upgrades Angular to version 13. +When upgrading your Angular libraries to version 15, you might have to append the `--force` flag if you encounter a mismatch between peer dependencies during the migration. The following is an example command that upgrades Angular to version 15. ```bash -ng update @angular/cli@13 --force +ng update @angular/cli@15 --force ``` -Afterwards, you need to upgrade third party dependencies to the version that is compatible with Angular 14, such as `@ng-bootstrap/ng-bootstrap`, `@ng-select/ng-select` or `@ngrx/store`. +Afterwards, you need to upgrade third party dependencies to the version that is compatible with Angular 15, such as `ngx-infinite-scroll`, `@ng-select/ng-select` or `@ngrx/store`. For more information, see the official [Angular Update Guide](https://update.angular.io/). -### Upgrading Your Spartacus App to 5.0 +### Upgrading Your Spartacus App to 6.0 -Spartacus 5.0 includes many new features and fixes. Since this update is a major release, some of the updates may also be breaking changes for your application. In this case, additional work on your side may be required to fix issues that result from upgrading from 4.x to 5.0. +Spartacus 6.0 includes many new features and fixes. Since this update is a major release, some of the updates may also be breaking changes for your application. In this case, additional work on your side may be required to fix issues that result from upgrading from 5.2 to 6.0. + +**Note:** You must start with a version 5.2 composable storefront app to be able to update to version 6.0. **Note:** In the following procedure, Verdaccio is used as an example of registry software, but you can use any proxy registry software that is similar to npm. These steps assume that your proxy registry is already running in a terminal window. For more information about using Verdaccio or another registry software, see the [Prerequisites](#prerequisites) section, above. -1. To update your Spartacus app to version 5.0, run the following command in the workspace of your Angular application: +1. To update your Spartacus app to version 6.0, run the following command in the workspace of your Angular application: ```bash - ng update @spartacus/schematics@latest + ng update @spartacus/schematics@6.0.0 ``` 1. Follow the onscreen instructions that appear after running the command. @@ -153,7 +146,11 @@ Spartacus 5.0 includes many new features and fixes. Since this update is a major If you are using Verdaccio, you can end the script by selecting `Exit`. Do not force-close the script; doing so will prevent cleanup from running, and as a result, the script may not run correctly in the future. 1. Inspect your code for comments that begin with `// TODO:Spartacus`. For detailed information about each added comment, see the following: - - [Typescript Breaking Changes in Composable Storefront 5.0](https://help.sap.com/doc/typescript-breaking-changes-in-composable-storefront-50/5/en-US/typescript-changes-version-5.html) + - [Typescript Breaking Changes in Composable Storefront 6.0](https://help.sap.com/doc/typescript-breaking-changes-in-composable-storefront-60/6.0/en-US/typescript-changes-version-6.html) + - [Technical Changes in Composable Storefront 6.0](https://help.sap.com/docs/SAP_COMMERCE_COMPOSABLE_STOREFRONT/10a8bc7f635b4e3db6f6bb7880e58a7d/93ffb557d3c14922bda14dfc8b4250b4.html?locale=en-US&version=6.0#loio93ffb557d3c14922bda14dfc8b4250b4) + - [Changes to Styles in Composable Storefront 6.0](https://help.sap.com/docs/SAP_COMMERCE_COMPOSABLE_STOREFRONT/10a8bc7f635b4e3db6f6bb7880e58a7d/d008d0179ea141bf84fde6ec98244ae5.html?locale=en-US&version=6.0#loiod008d0179ea141bf84fde6ec98244ae5) + - [Changes to HTML in Composable Storefront 6.0](https://help.sap.com/docs/SAP_COMMERCE_COMPOSABLE_STOREFRONT/10a8bc7f635b4e3db6f6bb7880e58a7d/f6ecd8ecdc6042dca6552c0c16448e0c.html?locale=en-US&version=6.0#loiof6ecd8ecdc6042dca6552c0c16448e0c) + - [Changes to Sample Data in Composable Storefront 6.0](https://help.sap.com/docs/SAP_COMMERCE_COMPOSABLE_STOREFRONT/10a8bc7f635b4e3db6f6bb7880e58a7d/911c4c3a9e8c4d51a9ac4cc48cd4fda6.html?locale=en-US&version=6.0#loio911c4c3a9e8c4d51a9ac4cc48cd4fda6) **Note:** The process might also downgrade some dependencies (namely RxJS), because Spartacus does not yet support the newer version. @@ -161,12 +158,6 @@ Spartacus 5.0 includes many new features and fixes. Since this update is a major You should now be running with the latest libraries installed. You can open `node_modules` and check the `@spartacus` libraries that were installed. -### Additional Information - -There are other important details to be aware of when upgrading your Spartacus app to version 5.0, such as the removal of NG Bootstrap, the removal of ModalServices and related code, and the addition of new entry points to the `@spartacus/cart` and `@spartacus/checkout` libraries. - -For more information, see [Updating to Composable Storefront Version 5.0](https://help.sap.com/docs/SAP_COMMERCE_COMPOSABLE_STOREFRONT/6d285368b1014628aebbe0aa2c74cd9d/7266f6f01edb4328b4e09df299ea09be.html) on the SAP Help Portal. - ## Sharing the Local Repository Other team members may want to consume the locally-available libraries. It is recommended that you set up a server where you can install the npm-like registry of your choice, and where you can publish locally-built Spartacus libraries. diff --git a/extra-webpack.config.js b/extra-webpack.config.js index 971ec2f3e71..30cdeb342e2 100644 --- a/extra-webpack.config.js +++ b/extra-webpack.config.js @@ -29,6 +29,10 @@ module.exports = { __dirname, 'feature-libs/organization' ), + '@spartacus/pdf-invoices': path.join( + __dirname, + 'feature-libs/pdf-invoices' + ), '@spartacus/product': path.join(__dirname, 'feature-libs/product'), '@spartacus/product-configurator': path.join( __dirname, diff --git a/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.ts b/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.ts index b9f71340635..2d4d0b83384 100644 --- a/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.ts +++ b/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.ts @@ -306,6 +306,7 @@ export class AsmMainUiComponent implements OnInit, OnDestroy { this.csAgentAuthService.startCustomerEmulationSession(customerId); this.startingCustomerSession = true; this.showCustomerEmulationInfoAlert = true; + this.showCreateCustomerSuccessfullyAlert = false; if (parameters) { // TODO(CXSPA-3090): Remove feature flag in 7.0 if (this.featureConfig?.isLevel('6.3')) { diff --git a/feature-libs/asm/karma.conf.js b/feature-libs/asm/karma.conf.js index e3461fcbb60..3fe7e8cffb4 100644 --- a/feature-libs/asm/karma.conf.js +++ b/feature-libs/asm/karma.conf.js @@ -42,6 +42,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/asm/package.json b/feature-libs/asm/package.json index 84a145d3190..2b0dd49201b 100644 --- a/feature-libs/asm/package.json +++ b/feature-libs/asm/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/asm", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "ASM feature library for Spartacus", "keywords": [ "spartacus", @@ -22,22 +22,22 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/feature-libs/asm/tsconfig.schematics.json b/feature-libs/asm/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/asm/tsconfig.schematics.json +++ b/feature-libs/asm/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/cart/karma.conf.js b/feature-libs/cart/karma.conf.js index 9a580445bf6..a84400380c0 100644 --- a/feature-libs/cart/karma.conf.js +++ b/feature-libs/cart/karma.conf.js @@ -37,6 +37,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/cart/package.json b/feature-libs/cart/package.json index 43dbc51e2a3..16c604e51da 100644 --- a/feature-libs/cart/package.json +++ b/feature-libs/cart/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/cart", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "", "keywords": [ "spartacus", @@ -26,22 +26,22 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, diff --git a/feature-libs/cart/tsconfig.schematics.json b/feature-libs/cart/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/cart/tsconfig.schematics.json +++ b/feature-libs/cart/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/checkout/karma.conf.js b/feature-libs/checkout/karma.conf.js index 0b54f0947bf..a717dc45679 100644 --- a/feature-libs/checkout/karma.conf.js +++ b/feature-libs/checkout/karma.conf.js @@ -37,6 +37,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/checkout/package.json b/feature-libs/checkout/package.json index add1c29d462..a89a39383b2 100644 --- a/feature-libs/checkout/package.json +++ b/feature-libs/checkout/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/checkout", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Checkout feature library for Spartacus", "keywords": [ "spartacus", @@ -22,23 +22,23 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, diff --git a/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap b/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap index 27cc71fa3f2..72a254fbe1c 100644 --- a/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap +++ b/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap @@ -63,7 +63,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) @@ -506,7 +506,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) diff --git a/feature-libs/checkout/tsconfig.schematics.json b/feature-libs/checkout/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/checkout/tsconfig.schematics.json +++ b/feature-libs/checkout/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/customer-ticketing/karma.conf.js b/feature-libs/customer-ticketing/karma.conf.js index 2ba14b12752..aa436f39398 100644 --- a/feature-libs/customer-ticketing/karma.conf.js +++ b/feature-libs/customer-ticketing/karma.conf.js @@ -36,6 +36,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/customer-ticketing/package.json b/feature-libs/customer-ticketing/package.json index 3acb2256931..cbbeadcda3d 100644 --- a/feature-libs/customer-ticketing/package.json +++ b/feature-libs/customer-ticketing/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/customer-ticketing", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Customer-Ticketing library for Spartacus", "keywords": [ "spartacus", @@ -22,19 +22,19 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/feature-libs/customer-ticketing/tsconfig.schematics.json b/feature-libs/customer-ticketing/tsconfig.schematics.json index 6d31baba9ea..37183ad50a5 100644 --- a/feature-libs/customer-ticketing/tsconfig.schematics.json +++ b/feature-libs/customer-ticketing/tsconfig.schematics.json @@ -272,6 +272,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/order/karma.conf.js b/feature-libs/order/karma.conf.js index ce76e1edcea..b5601c34956 100644 --- a/feature-libs/order/karma.conf.js +++ b/feature-libs/order/karma.conf.js @@ -37,6 +37,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/order/package.json b/feature-libs/order/package.json index ef8e96d979d..9e2da427d5a 100644 --- a/feature-libs/order/package.json +++ b/feature-libs/order/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/order", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Order feature library for Spartacus", "keywords": [ "spartacus", @@ -22,23 +22,23 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/feature-libs/order/tsconfig.schematics.json b/feature-libs/order/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/order/tsconfig.schematics.json +++ b/feature-libs/order/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/organization/karma.conf.js b/feature-libs/organization/karma.conf.js index 822cf311160..27293165aea 100644 --- a/feature-libs/organization/karma.conf.js +++ b/feature-libs/organization/karma.conf.js @@ -42,6 +42,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/organization/package.json b/feature-libs/organization/package.json index 38f89ae0f91..55dc6558ba6 100644 --- a/feature-libs/organization/package.json +++ b/feature-libs/organization/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/organization", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Organization library for Spartacus", "keywords": [ "spartacus", @@ -22,24 +22,24 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, diff --git a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap index 0d0d33778be..8d9dd423c77 100644 --- a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap +++ b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap @@ -51,7 +51,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) @@ -266,7 +266,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) @@ -481,7 +481,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) @@ -696,7 +696,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) @@ -911,7 +911,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) diff --git a/feature-libs/organization/tsconfig.schematics.json b/feature-libs/organization/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/organization/tsconfig.schematics.json +++ b/feature-libs/organization/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/pdf-invoices/.eslintrc.json b/feature-libs/pdf-invoices/.eslintrc.json new file mode 100644 index 00000000000..862b5a870b0 --- /dev/null +++ b/feature-libs/pdf-invoices/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "extends": "../../.eslintrc.json", + "ignorePatterns": ["schematics/**/*.d.ts"] +} diff --git a/feature-libs/pdf-invoices/README.md b/feature-libs/pdf-invoices/README.md new file mode 100644 index 00000000000..b1cac7c8742 --- /dev/null +++ b/feature-libs/pdf-invoices/README.md @@ -0,0 +1,4 @@ +# PDF Invoices + +This feature allows users to view invoices for their orders and download PDF invoices using `Invoices` APIs. +When the user selects an invoice, the backend returns a byte array, which is converted to PDF and downloaded. \ No newline at end of file diff --git a/feature-libs/pdf-invoices/_index.scss b/feature-libs/pdf-invoices/_index.scss new file mode 100644 index 00000000000..86f72a0df42 --- /dev/null +++ b/feature-libs/pdf-invoices/_index.scss @@ -0,0 +1,2 @@ +@import '@spartacus/styles/scss/core'; +@import './styles/index'; diff --git a/feature-libs/pdf-invoices/assets/ng-package.json b/feature-libs/pdf-invoices/assets/ng-package.json new file mode 100644 index 00000000000..38e01ac17de --- /dev/null +++ b/feature-libs/pdf-invoices/assets/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "./public_api.ts" + } +} diff --git a/feature-libs/pdf-invoices/assets/public_api.ts b/feature-libs/pdf-invoices/assets/public_api.ts new file mode 100644 index 00000000000..f3d8f426ab4 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/public_api.ts @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './translations/translations'; diff --git a/feature-libs/pdf-invoices/assets/translations/en/index.ts b/feature-libs/pdf-invoices/assets/translations/en/index.ts new file mode 100644 index 00000000000..702a8063b58 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/en/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { pdfInvoices } from './pdf-invoices'; + +export const en = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/en/pdf-invoices.ts b/feature-libs/pdf-invoices/assets/translations/en/pdf-invoices.ts new file mode 100644 index 00000000000..808a173b3bc --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/en/pdf-invoices.ts @@ -0,0 +1,39 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export const pdfInvoices = { + pdfInvoices: { + featureNotEnabled: + 'Unable to obtain invoices, ensure that SAP Invoice and API for Invoices are enabled.', + invoicesLoadingError: + 'Something went wrong. Unable to display invoices for the order', + invoicesTable: { + header: 'Invoices', + label: 'Invoices Table', + invoiceId: 'Invoice #', + createdAt: 'Date', + netAmount: 'Net Amount', + totalAmount: 'Total Amount', + attachment: 'Download Invoice', + download: 'Download', + attachmentDescription: 'Download PDF for invoice {{id}}.', + noneFound: 'No Invoices Found', + }, + downloadPDFError: 'Something went wrong. Unable to obtain the invoice PDF.', + sortBy: 'Sort by', + sortInvoices: 'Sort invoices', + sorts: { + byCreatedAtAsc: 'Date Ascending', + byCreatedAtDesc: 'Date Descending', + byInvoiceIdAsc: 'Invoice Number Ascending', + byInvoiceIdDesc: 'Invoice Number Descending', + byNetAmountAsc: 'Net Amount Ascending', + byNetAmountDesc: 'Net Amount Descending', + byTotalAmountAsc: 'Total Amount Ascending', + byTotalAmountDesc: 'Total Amount Descending', + }, + }, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/translations.ts b/feature-libs/pdf-invoices/assets/translations/translations.ts new file mode 100644 index 00000000000..5c3d46cc2b6 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/translations.ts @@ -0,0 +1,16 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; +import { en } from './en/index'; + +export const pdfInvoicesTranslations: TranslationResources = { + en, +}; + +export const pdfInvoicesTranslationChunksConfig: TranslationChunksConfig = { + pdfInvoices: ['pdfInvoices'], +}; diff --git a/feature-libs/pdf-invoices/components/index.ts b/feature-libs/pdf-invoices/components/index.ts new file mode 100644 index 00000000000..8da193365a3 --- /dev/null +++ b/feature-libs/pdf-invoices/components/index.ts @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './pdf-invoices-components.module'; diff --git a/feature-libs/pdf-invoices/components/invoices-list/invoices-list.component.html b/feature-libs/pdf-invoices/components/invoices-list/invoices-list.component.html new file mode 100644 index 00000000000..823bd4d5cd1 --- /dev/null +++ b/feature-libs/pdf-invoices/components/invoices-list/invoices-list.component.html @@ -0,0 +1,191 @@ + + +
+ +
+

+ {{ 'pdfInvoices.invoicesTable.header' | cxTranslate }} +

+
+ + +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ {{ 'pdfInvoices.invoicesTable.invoiceId' | cxTranslate }} + + {{ 'pdfInvoices.invoicesTable.createdAt' | cxTranslate }} + + {{ 'pdfInvoices.invoicesTable.netAmount' | cxTranslate }} + + {{ 'pdfInvoices.invoicesTable.totalAmount' | cxTranslate }} + + +
+
+ {{ 'pdfInvoices.invoicesTable.invoiceId' | cxTranslate }} +
+
+ {{ invoice.invoiceId }} +
+
+
+ {{ 'pdfInvoices.invoicesTable.createdAt' | cxTranslate }} +
+
+ {{ invoice.createdAt | cxDate: 'longDate' }} +
+
+
+ {{ 'pdfInvoices.invoicesTable.netAmount' | cxTranslate }} +
+
+ {{ + invoice.netAmount?.formattedValue + ? invoice.netAmount?.formattedValue + : invoice.netAmount?.currencyIso + + ' ' + + invoice.netAmount?.value + }} +
+
+
+ {{ 'pdfInvoices.invoicesTable.totalAmount' | cxTranslate }} +
+
+ {{ + invoice.totalAmount?.formattedValue + ? invoice.totalAmount?.formattedValue + : invoice.totalAmount?.currencyIso + + ' ' + + invoice.totalAmount?.value + }} +
+
+
+ {{ 'pdfInvoices.invoicesTable.attachment' | cxTranslate }} +
+
+ +
+
+ + +
+
+ +
+
+
+
+
+
diff --git a/feature-libs/pdf-invoices/components/invoices-list/invoices-list.component.spec.ts b/feature-libs/pdf-invoices/components/invoices-list/invoices-list.component.spec.ts new file mode 100644 index 00000000000..04848888b74 --- /dev/null +++ b/feature-libs/pdf-invoices/components/invoices-list/invoices-list.component.spec.ts @@ -0,0 +1,474 @@ +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; +import { + GlobalMessageEntities, + GlobalMessageService, + GlobalMessageType, + HttpErrorModel, + I18nTestingModule, + LanguageService, + Translatable, + TranslationService, +} from '@spartacus/core'; +import { + InvoiceQueryParams, + InvoicesFields, + OrderInvoiceList, + PDFInvoicesFacade, +} from '@spartacus/pdf-invoices/root'; +import { FileDownloadService, IconTestingModule } from '@spartacus/storefront'; +import { EMPTY, Observable, of, throwError } from 'rxjs'; +import { take } from 'rxjs/operators'; +import { InvoicesListComponent } from './invoices-list.component'; +import createSpy = jasmine.createSpy; + +const blob = new Blob(); + +const mockOrderInvoiceList: OrderInvoiceList = { + invoices: [ + { + createdAt: new Date('2023-09-15T18:29:59+0000'), + invoiceId: '200000a', + netAmount: { + currencyIso: 'USD', + value: 115, + }, + totalAmount: { + currencyIso: 'USD', + value: 117, + }, + }, + { + createdAt: new Date('2023-08-31T18:29:59+0000'), + invoiceId: '200000b', + netAmount: { + currencyIso: 'USD', + value: 118, + formattedValue: '$118', //to test formatted value in UI + }, + totalAmount: { + currencyIso: 'USD', + value: 120, + formattedValue: '$120', //to test formatted value in UI + }, + }, + { + createdAt: new Date('2023-07-20T18:29:59+0000'), + invoiceId: '200000c', + netAmount: { + currencyIso: 'USD', + value: 398, + }, + totalAmount: { + currencyIso: 'USD', + value: 400, + }, + }, + { + createdAt: new Date('2023-06-22T18:29:59+0000'), + externalSystemId: 'S4SALES', //to test external id being passed for download + invoiceId: '200000d', + netAmount: { + currencyIso: 'USD', + value: 115, + }, + totalAmount: { + currencyIso: 'USD', + value: 117, + }, + }, + { + createdAt: new Date('2023-05-11T18:29:59+0000'), + invoiceId: '200000e', + netAmount: { + currencyIso: 'USD', + value: 118, + }, + totalAmount: { + currencyIso: 'USD', + value: 120, + }, + }, + ], + pagination: { + count: 5, + page: 0, + totalCount: 16, + totalPages: 4, + }, + sorts: [ + { + asc: true, + code: 'invoiceId', + }, + ], +}; + +@Component({ + template: '', + selector: 'cx-pagination', +}) +class MockPaginationComponent { + @Input() pagination: any; + @Output() viewPageEvent = new EventEmitter(); +} +@Component({ + template: '', + selector: 'cx-sorting', +}) +class MockSortingComponent { + @Input() sortOptions: any; + @Input() sortLabels: any; + @Input() selectedOption: any; + @Input() placeholder: any; + @Output() sortListEvent = new EventEmitter(); +} + +class MockPDFInvoicesFacade implements Partial { + getInvoicesForOrder( + params: InvoiceQueryParams, + _userId?: string, + _orderId?: string + ): Observable { + return of(params ? mockOrderInvoiceList : {}); + } + getInvoicePDF( + invoiceId: string, + _externalSystemId?: string, + _userId?: string, + _orderId?: string + ): Observable { + if (invoiceId) { + return of(blob); + } else { + return EMPTY; + } + } +} + +class MockFileDownloadService { + download = createSpy('MockFileDownloadService.download Spy'); +} + +class MockLanguageService { + getActive(): Observable { + return of('en'); + } +} + +class MockTranslationService implements Partial { + translate(value: string, options: any) { + return of(value + Object.values(options)); + } +} + +class MockGlobalMessageService implements Partial { + get(): Observable { + return of({}); + } + add(_: string | Translatable, __: GlobalMessageType, ___?: number): void {} + remove(_: GlobalMessageType, __?: number): void {} +} + +const mockInvoicesNotEnabledError: HttpErrorModel = { + details: [ + { + message: + 'There is no resource for path /occ/v2/powertools-spa/users/userId1/orders/15092023/invoices', + type: 'UnknownResourceError', + }, + ], +}; + +describe('InvoicesListComponent', () => { + let component: InvoicesListComponent; + let fixture: ComponentFixture; + let pdfInvoicesFacade: PDFInvoicesFacade; + let translationService: TranslationService; + let downloadService: FileDownloadService; + let globalMessageService: GlobalMessageService; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [I18nTestingModule, IconTestingModule], + declarations: [ + InvoicesListComponent, + MockPaginationComponent, + MockSortingComponent, + ], + providers: [ + { provide: PDFInvoicesFacade, useClass: MockPDFInvoicesFacade }, + { provide: FileDownloadService, useClass: MockFileDownloadService }, + { provide: LanguageService, useClass: MockLanguageService }, + { provide: TranslationService, useClass: MockTranslationService }, + { provide: GlobalMessageService, useClass: MockGlobalMessageService }, + ], + }).compileComponents(); + pdfInvoicesFacade = TestBed.inject(PDFInvoicesFacade); + translationService = TestBed.inject(TranslationService); + downloadService = TestBed.inject(FileDownloadService); + globalMessageService = TestBed.inject(GlobalMessageService); + + spyOn(globalMessageService, 'add').and.callThrough(); + spyOn(translationService, 'translate').and.returnValue(of('test')); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(InvoicesListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); + + it('should show feature not enabled error when the API returns error', () => { + spyOn(pdfInvoicesFacade, 'getInvoicesForOrder').and.returnValue( + throwError(mockInvoicesNotEnabledError) + ); + spyOn(component, 'getNotEnabledError').and.callThrough(); + + // Change the page + const newPage = 3; + component.pageChange(newPage); + expect(component.getNotEnabledError).toHaveBeenCalled(); + expect(globalMessageService.add).toHaveBeenCalledWith( + { key: 'pdfInvoices.featureNotEnabled' }, + GlobalMessageType.MSG_TYPE_ERROR + ); + }); + + it('should read document list', (done) => { + let orderInvoiceList: OrderInvoiceList = {}; + let queryParams: InvoiceQueryParams = {}; + component.invoicesList$ + .pipe(take(1)) + .subscribe((value: OrderInvoiceList) => { + orderInvoiceList = value; + }); + expect(orderInvoiceList).toEqual(mockOrderInvoiceList); + expect(component.pagination).toEqual({ + currentPage: 0, + pageSize: 5, + totalPages: 4, + totalResults: 16, + sort: 'invoiceId:asc', + }); + component.queryParams$ + .pipe(take(1)) + .subscribe((value: InvoiceQueryParams) => { + queryParams = value; + done(); + }); + expect(queryParams).toEqual({ + currentPage: 0, + pageSize: 5, + fields: InvoicesFields.FULL, + sort: 'invoiceId:asc', + }); + }); + + it('Should change page and invoke the API', () => { + // Spy functions to ensure new invoices are being fetched + spyOn(component, 'updateQueryParams').and.callThrough(); + spyOn(pdfInvoicesFacade, 'getInvoicesForOrder').and.callThrough(); + + // By default currentPage will be 0 + expect(component._initQueryParams.currentPage).toEqual(0); + + // Change the page + const newPage = 3; + component.pageChange(newPage); + + // The query params should be updated with the new page + expect(component['updateQueryParams']).toHaveBeenCalled(); + expect(component._initQueryParams.currentPage).toEqual(newPage); + + // A new call with updated parameters is made to PDF Invoices Facade + expect(pdfInvoicesFacade.getInvoicesForOrder).toHaveBeenCalledWith({ + ...component._initQueryParams, + currentPage: newPage, + fields: InvoicesFields.DEFAULT, + }); + }); + + it('Should change sort and invoke the API', () => { + // Spy functions to ensure new invoices are being fetched + spyOn(component, 'updateQueryParams').and.callThrough(); + spyOn(pdfInvoicesFacade, 'getInvoicesForOrder').and.callThrough(); + // Getting ready to change sort, make sure that current sort is different and should be one of the sortOptions key + const newSortCode = 'byTotalAmountAsc'; + expect(component._initQueryParams.sort).not.toEqual(newSortCode); + + // Change the sort + component.sortChange(newSortCode); + + // Expect sort to be updated and currentPage to be set back to 0 + expect(component._initQueryParams.sort).toEqual( + component['sortMapping'][newSortCode] + ); + const newPage = 3; + expect(component._initQueryParams.currentPage).not.toEqual(newPage); + expect(component._initQueryParams.currentPage).toEqual(0); + + expect(pdfInvoicesFacade.getInvoicesForOrder).toHaveBeenCalledWith({ + ...component._initQueryParams, + sort: component['sortMapping'][newSortCode], + currentPage: 0, + fields: InvoicesFields.DEFAULT, + }); + }); + + it('Should populate sort options with translations', () => { + // By default there are 8 sort options + expect(component.sortOptions?.length).toEqual(8); + + // Expect that translate was called for each of the sort Mappings + expect(component.sortOptions?.length).toEqual(8); + // Expect that the length of sortOptions is 2 + expect(translationService['translate']).toHaveBeenCalledTimes(8); + // Expect that names have been assigned + component.sortOptions.forEach((sort) => { + expect(sort?.code && component['sortMapping'][sort?.code]).not.toBeNull(); + expect(sort.name).toEqual('test'); + }); + }); + + it('Should have table headers', () => { + const tableElement = fixture.debugElement.query( + By.css('.cx-invoices-list-table') + ); + + const tableHeaders = tableElement.queryAll(By.css('th')); + expect(tableHeaders?.length).toEqual(5); + expect(tableHeaders[0].properties.innerText).toEqual( + 'pdfInvoices.invoicesTable.invoiceId' + ); + expect(tableHeaders[1].properties.innerText).toEqual( + 'pdfInvoices.invoicesTable.createdAt' + ); + expect(tableHeaders[2].properties.innerText).toEqual( + 'pdfInvoices.invoicesTable.netAmount' + ); + expect(tableHeaders[3].properties.innerText).toEqual( + 'pdfInvoices.invoicesTable.totalAmount' + ); + expect(tableHeaders[4].children[0].attributes.title).toEqual( + 'pdfInvoices.invoicesTable.attachment' + ); + }); + + it('Should have populated table data', () => { + const isDate = (formattedDate: string): boolean => + /[a-zA-Z]+ \d{1,2}, \d{4}/gm.test(formattedDate); + + const tableElement = fixture.debugElement.query( + By.css('.cx-invoices-list-table') + ); + + const tableRows = tableElement.queryAll(By.css('tr')); + expect(tableRows?.length).toEqual(5); + + tableRows?.forEach((row, rowNumber) => { + const tableCells = row.queryAll(By.css('.cx-invoices-list-value')); + + expect(tableCells?.length).toEqual(5); + + expect(tableCells[0].nativeElement.innerText).toEqual( + mockOrderInvoiceList.invoices?.[rowNumber]?.invoiceId + ); + + expect(isDate(tableCells[1].nativeElement.innerText)).toEqual( + !!mockOrderInvoiceList.invoices?.[rowNumber]?.createdAt + ); + + if ( + mockOrderInvoiceList.invoices?.[rowNumber]?.netAmount?.formattedValue + ) { + expect(tableCells[2].nativeElement.innerText).toEqual( + mockOrderInvoiceList.invoices?.[rowNumber]?.netAmount?.formattedValue + ); + } else { + expect(tableCells[2].nativeElement.innerHTML).toEqual( + ` ${mockOrderInvoiceList.invoices?.[rowNumber]?.netAmount?.currencyIso} ${mockOrderInvoiceList.invoices?.[rowNumber]?.netAmount?.value} ` + ); + } + + if ( + mockOrderInvoiceList.invoices?.[rowNumber]?.totalAmount?.formattedValue + ) { + expect(tableCells[3].nativeElement.innerText).toEqual( + mockOrderInvoiceList.invoices?.[rowNumber]?.totalAmount + ?.formattedValue + ); + } else { + expect(tableCells[3].nativeElement.innerHTML).toEqual( + ` ${mockOrderInvoiceList.invoices?.[rowNumber]?.totalAmount?.currencyIso} ${mockOrderInvoiceList.invoices?.[rowNumber]?.totalAmount?.value} ` + ); + } + + expect(!!tableCells[4].query(By.css('cx-icon'))).toEqual( + !!mockOrderInvoiceList.invoices?.[rowNumber] + ); + }); + }); + + it('should download the invoice file', async () => { + const invoicePDF = (mockOrderInvoiceList.invoices && + mockOrderInvoiceList.invoices[0]) || { + invoiceId: '', + externalSystemId: '', + }; + + spyOn(pdfInvoicesFacade, 'getInvoicePDF').and.returnValue(of(blob)); + const fakeUrl = 'blob:http://localhost:4321/15-09-2023-1234'; + spyOn(URL, 'createObjectURL').and.returnValue(fakeUrl); + + expect(invoicePDF).not.toBeUndefined(); + component.downloadPDFInvoice( + invoicePDF.invoiceId || '', + invoicePDF.externalSystemId + ); + fixture.detectChanges(); + + expect(pdfInvoicesFacade.getInvoicePDF).toHaveBeenCalledWith( + invoicePDF.invoiceId, + undefined + ); + + expect(downloadService.download).toHaveBeenCalledWith( + fakeUrl, + `${invoicePDF.invoiceId}.pdf` + ); + }); + + it('should download the attachment file with external system id', async () => { + const invoicePDF = (mockOrderInvoiceList.invoices && + mockOrderInvoiceList.invoices[0]) || { + invoiceId: '', + externalSystemId: '', + }; + + spyOn(pdfInvoicesFacade, 'getInvoicePDF').and.returnValue(of(blob)); + const fakeUrl = 'blob:http://localhost:4321/15-09-2023-1234'; + spyOn(URL, 'createObjectURL').and.returnValue(fakeUrl); + + component.downloadPDFInvoice( + invoicePDF.invoiceId || '', + invoicePDF.externalSystemId + ); + fixture.detectChanges(); + + expect(pdfInvoicesFacade.getInvoicePDF).toHaveBeenCalledWith( + invoicePDF.invoiceId, + invoicePDF.externalSystemId + ); + + expect(downloadService.download).toHaveBeenCalledWith( + fakeUrl, + `${invoicePDF.invoiceId}.pdf` + ); + }); +}); diff --git a/feature-libs/pdf-invoices/components/invoices-list/invoices-list.component.ts b/feature-libs/pdf-invoices/components/invoices-list/invoices-list.component.ts new file mode 100644 index 00000000000..59df4a89e1e --- /dev/null +++ b/feature-libs/pdf-invoices/components/invoices-list/invoices-list.component.ts @@ -0,0 +1,195 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + ChangeDetectionStrategy, + Component, + OnDestroy, + OnInit, +} from '@angular/core'; +import { + ErrorModel, + GlobalMessageService, + GlobalMessageType, + HttpErrorModel, + LanguageService, + PaginationModel, + SortModel, + TranslationService, +} from '@spartacus/core'; +import { + InvoiceQueryParams, + InvoicesFields, + OrderInvoiceList, + PDFInvoicesFacade, +} from '@spartacus/pdf-invoices/root'; +import { FileDownloadService, ICON_TYPE } from '@spartacus/storefront'; +import { + BehaviorSubject, + combineLatest, + EMPTY, + Observable, + Subscription, +} from 'rxjs'; +import { catchError, skip, switchMap, take, tap } from 'rxjs/operators'; + +@Component({ + selector: 'cx-invoices-list', + templateUrl: './invoices-list.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class InvoicesListComponent implements OnInit, OnDestroy { + /* For Enum use in HTML */ + ICON_TYPE = ICON_TYPE; + + protected PAGE_SIZE = 5; //Default page size + + sortOptions: SortModel[]; + sort = 'byInvoiceIdAsc'; + + protected sortMapping: { [key: string]: string } = { + byCreatedAtAsc: 'invoiceDate:asc', //TODO: (CXINT-2438) update the sort code after the API is changed + byCreatedAtDesc: 'invoiceDate:desc', //TODO: (CXINT-2438) update the sort code after the API is changed + byInvoiceIdAsc: 'invoiceId:asc', + byInvoiceIdDesc: 'invoiceId:desc', + byNetAmountAsc: 'netAmount:asc', + byNetAmountDesc: 'netAmount:desc', + byTotalAmountAsc: 'totalAmount:asc', + byTotalAmountDesc: 'totalAmount:desc', + }; + pagination: PaginationModel; + + // Contains the initial query parameters and will be updated with current state of filters + _initQueryParams: InvoiceQueryParams = { + currentPage: 0, + pageSize: this.PAGE_SIZE, + fields: InvoicesFields.FULL, + sort: this.sortMapping[this.sort], //backend supports sort codes like invoiceId:asc + }; + + // Triggers events on chaning the page, sort options + queryParams$ = new BehaviorSubject(this._initQueryParams); + + // Used by template to subscribe to data from documents api + invoicesList$: Observable = this.queryParams$.pipe( + switchMap((param) => this.pdfInvoicesFacade.getInvoicesForOrder(param)), + tap( + (invoicesList) => + (this.pagination = { + currentPage: invoicesList.pagination?.page, + pageSize: invoicesList.pagination?.count, + totalPages: invoicesList.pagination?.totalPages, + totalResults: invoicesList.pagination?.totalCount, + sort: this.sortMapping[this.sort], + }) + ), + catchError((error) => { + if (error && this.getNotEnabledError(error)?.length) { + this.globalMessageService.add( + { key: 'pdfInvoices.featureNotEnabled' }, + GlobalMessageType.MSG_TYPE_ERROR + ); + } + return EMPTY; + }) + ); + + protected subscription = new Subscription(); + + constructor( + protected pdfInvoicesFacade: PDFInvoicesFacade, + protected translationService: TranslationService, + protected downloadService: FileDownloadService, + protected languageService: LanguageService, + protected globalMessageService: GlobalMessageService + ) {} + + ngOnInit() { + this.subscription.add( + this.languageService + .getActive() + .pipe(skip(1)) + .subscribe(() => + this.updateQueryParams({ fields: InvoicesFields.FULL }) + ) + ); + + this.getSortOptions(); + } + + protected updateQueryParams(partialParams: InvoiceQueryParams) { + // Overwrite each value present in partialParams to _queryParams + Object.keys(partialParams).forEach( + (key) => + ((this._initQueryParams as any)[key] = (partialParams as any)[key]) + ); + + // Every request that doesn't specify fields should be set to DEFAULT + if (!partialParams.fields) { + this._initQueryParams.fields = InvoicesFields.DEFAULT; + } + + this.queryParams$.next(this._initQueryParams); + } + + pageChange(currentPage: number): void { + this.updateQueryParams({ + currentPage: currentPage, + }); + } + + sortChange(sortCode: string): void { + this.sort = sortCode; + this.updateQueryParams({ + sort: this.sortMapping[sortCode], //backend supports sort codes like invoiceId:asc + currentPage: 0, + }); + } + + downloadPDFInvoice(invoiceId: string, externalSystemId?: string): void { + this.pdfInvoicesFacade + .getInvoicePDF(invoiceId, externalSystemId) + .pipe(take(1)) + .subscribe({ + next: (data) => { + const file = new Blob([data], { type: data.type }); + const url = URL.createObjectURL(file); + this.downloadService.download(url, `${invoiceId}.pdf`); + }, + }); + } + + getSortOptions() { + this.sortOptions = []; + Object.keys(this.sortMapping).forEach((sortKey) => + this.sortOptions.push({ code: sortKey, selected: false }) + ); + + const translations = this.sortOptions.map((sort) => + this.translationService.translate(`pdfInvoices.sorts.${sort.code}`) + ); + + combineLatest(translations) + .pipe(take(1)) + .subscribe((translated) => + this.sortOptions.forEach( + (sort, index) => (sort.name = translated[index]) + ) + ); + } + + getNotEnabledError(response: HttpErrorModel): ErrorModel[] { + return response?.details + ? response.details.filter( + (error: any) => error?.type === 'UnknownResourceError' + ) + : []; + } + + ngOnDestroy(): void { + this.subscription.unsubscribe(); + } +} diff --git a/feature-libs/pdf-invoices/components/ng-package.json b/feature-libs/pdf-invoices/components/ng-package.json new file mode 100644 index 00000000000..38e01ac17de --- /dev/null +++ b/feature-libs/pdf-invoices/components/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "./public_api.ts" + } +} diff --git a/feature-libs/pdf-invoices/components/pdf-invoices-components.module.ts b/feature-libs/pdf-invoices/components/pdf-invoices-components.module.ts new file mode 100644 index 00000000000..a287b23521e --- /dev/null +++ b/feature-libs/pdf-invoices/components/pdf-invoices-components.module.ts @@ -0,0 +1,51 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { ReactiveFormsModule } from '@angular/forms'; +import { + AuthGuard, + CmsConfig, + I18nModule, + provideDefaultConfig, + UrlModule, +} from '@spartacus/core'; +import { + DatePickerModule, + IconModule, + ListNavigationModule, + MediaModule, + SpinnerModule, +} from '@spartacus/storefront'; +import { InvoicesListComponent } from './invoices-list/invoices-list.component'; + +@NgModule({ + imports: [ + CommonModule, + DatePickerModule, + I18nModule, + ReactiveFormsModule, + ListNavigationModule, + UrlModule, + IconModule, + MediaModule, + SpinnerModule, + ], + declarations: [InvoicesListComponent], + exports: [InvoicesListComponent], + providers: [ + provideDefaultConfig({ + cmsComponents: { + AccountOrderDetailsPDFInvoicesComponent: { + component: InvoicesListComponent, + guards: [AuthGuard], + }, + }, + }), + ], +}) +export class PDFInvoicesComponentsModule {} diff --git a/feature-libs/pdf-invoices/components/public_api.ts b/feature-libs/pdf-invoices/components/public_api.ts new file mode 100644 index 00000000000..cf302ad77cc --- /dev/null +++ b/feature-libs/pdf-invoices/components/public_api.ts @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './invoices-list/invoices-list.component'; +export * from './pdf-invoices-components.module'; diff --git a/feature-libs/pdf-invoices/core/connectors/converters.ts b/feature-libs/pdf-invoices/core/connectors/converters.ts new file mode 100644 index 00000000000..5edf9d429d6 --- /dev/null +++ b/feature-libs/pdf-invoices/core/connectors/converters.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { InjectionToken } from '@angular/core'; +import { Converter } from '@spartacus/core'; +import { OrderInvoiceList } from '@spartacus/pdf-invoices/root'; + +export const PDF_INVOICES_LIST_INVOICES_NORMALIZER = new InjectionToken< + Converter +>('PDFInvoicesListInvoices'); diff --git a/feature-libs/pdf-invoices/core/connectors/index.ts b/feature-libs/pdf-invoices/core/connectors/index.ts new file mode 100644 index 00000000000..d9d500d499a --- /dev/null +++ b/feature-libs/pdf-invoices/core/connectors/index.ts @@ -0,0 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './converters'; +export * from './pdf-invoices.adapter'; +export * from './pdf-invoices.connector'; diff --git a/feature-libs/pdf-invoices/core/connectors/pdf-invoices.adapter.ts b/feature-libs/pdf-invoices/core/connectors/pdf-invoices.adapter.ts new file mode 100644 index 00000000000..a9659b4fda8 --- /dev/null +++ b/feature-libs/pdf-invoices/core/connectors/pdf-invoices.adapter.ts @@ -0,0 +1,39 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + InvoiceQueryParams, + OrderInvoiceList, +} from '@spartacus/pdf-invoices/root'; +import { Observable } from 'rxjs'; + +export abstract class PDFInvoicesAdapter { + /** + * Abstract method used to get the PDF invoices for an order + * @param userId Logged in user id + * @param orderId If provided, it will be used, otherwise it will use orderId from router state. + * @param queryParams Additional query parameters used in the API request + */ + abstract getInvoicesForOrder( + userId: string, + orderId: string, + queryParams: InvoiceQueryParams + ): Observable; + + /** + * Returns the document blob for given invoiceId, orderId and externalSystemId + * @param userId Logged in user id + * @param orderId If provided, it will be used, otherwise it will use orderId from router state. + * @param invoiceId The id of the invoice to be downloaded + * @param externalSystemId External system that provides the invoice PDF + */ + abstract getInvoicePDF( + userId: string, + orderId: string, + invoiceId: string, + externalSystemId?: string + ): Observable; +} diff --git a/feature-libs/pdf-invoices/core/connectors/pdf-invoices.connector.spec.ts b/feature-libs/pdf-invoices/core/connectors/pdf-invoices.connector.spec.ts new file mode 100644 index 00000000000..33dca995e83 --- /dev/null +++ b/feature-libs/pdf-invoices/core/connectors/pdf-invoices.connector.spec.ts @@ -0,0 +1,121 @@ +import { TestBed } from '@angular/core/testing'; +import { + InvoiceQueryParams, + InvoicesFields, +} from '@spartacus/pdf-invoices/root'; +import { of } from 'rxjs'; +import { take } from 'rxjs/operators'; +import { PDFInvoicesAdapter } from './pdf-invoices.adapter'; +import { PDFInvoicesConnector } from './pdf-invoices.connector'; + +import createSpy = jasmine.createSpy; + +const mockUserId = 'userId1'; +const mockOrderId = '15092023'; +const mockExternalSystemId = 'IMPERIAL'; +const mockInvoiceId = 'Invoice-15-09-2023'; +const mockInvoiceQueryParams: InvoiceQueryParams = { + currentPage: 0, + pageSize: 10, + sort: 'invoiceID:asc', + fields: InvoicesFields.FULL, +}; + +class MockPDFInvoicesAdapter implements Partial { + getInvoicesForOrder = createSpy( + 'PDFInvoicesAdapter.getInvoicesForOrder' + ).and.callFake( + (_userId: string, _orderId: string, _queryParams: InvoiceQueryParams) => + of({}) + ); + getInvoicePDF = createSpy('PDFInvoicesAdapter.getInvoicePDF').and.callFake( + ( + _userId: string, + _orderId: string, + _invoiceId: string, + _externalSystemId?: string + ) => of({}) + ); +} + +describe('PDFInvoicesConnector', () => { + let pdfInvoicesConnector: PDFInvoicesConnector; + let adapter: PDFInvoicesAdapter; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + providers: [ + PDFInvoicesConnector, + { + provide: PDFInvoicesAdapter, + useClass: MockPDFInvoicesAdapter, + }, + ], + }); + + pdfInvoicesConnector = TestBed.inject(PDFInvoicesConnector); + adapter = TestBed.inject(PDFInvoicesAdapter); + }); + + it('should be created', () => { + expect(pdfInvoicesConnector).toBeTruthy(); + }); + + it('should call adapter when getInvoicesForOrder is invoked', (done) => { + let result; + pdfInvoicesConnector + .getInvoicesForOrder(mockUserId, mockOrderId, mockInvoiceQueryParams) + .pipe(take(1)) + .subscribe((res: any) => { + result = res; + expect(result).toEqual({}); + done(); + }); + expect(adapter.getInvoicesForOrder).toHaveBeenCalledWith( + mockUserId, + mockOrderId, + mockInvoiceQueryParams + ); + }); + + it('should call adapter when getInvoicePDF is invoked', (done) => { + let result; + pdfInvoicesConnector + .getInvoicePDF( + mockUserId, + mockOrderId, + mockInvoiceId, + mockExternalSystemId + ) + .pipe(take(1)) + .subscribe((res: any) => { + result = res; + expect(result).toEqual({}); + done(); + }); + expect(adapter.getInvoicePDF).toHaveBeenCalledWith( + mockUserId, + mockOrderId, + mockInvoiceId, + mockExternalSystemId + ); + }); + + it('should call adapter when getInvoicePDF is invoked without externalSystemId', (done) => { + let result; + pdfInvoicesConnector + .getInvoicePDF(mockUserId, mockOrderId, mockInvoiceId) + .pipe(take(1)) + .subscribe((res: any) => { + result = res; + expect(result).toEqual({}); + done(); + }); + expect(adapter.getInvoicePDF).toHaveBeenCalledWith( + mockUserId, + mockOrderId, + mockInvoiceId, + undefined + ); + }); +}); diff --git a/feature-libs/pdf-invoices/core/connectors/pdf-invoices.connector.ts b/feature-libs/pdf-invoices/core/connectors/pdf-invoices.connector.ts new file mode 100644 index 00000000000..f9493eacc6b --- /dev/null +++ b/feature-libs/pdf-invoices/core/connectors/pdf-invoices.connector.ts @@ -0,0 +1,42 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Injectable } from '@angular/core'; +import { + InvoiceQueryParams, + OrderInvoiceList, +} from '@spartacus/pdf-invoices/root'; +import { Observable } from 'rxjs'; +import { PDFInvoicesAdapter } from './pdf-invoices.adapter'; + +@Injectable({ + providedIn: 'root', +}) +export class PDFInvoicesConnector { + constructor(protected adapter: PDFInvoicesAdapter) {} + + public getInvoicesForOrder( + userId: string, + orderId: string, + queryParams: InvoiceQueryParams + ): Observable { + return this.adapter.getInvoicesForOrder(userId, orderId, queryParams); + } + + public getInvoicePDF( + userId: string, + orderId: string, + invoiceId: string, + externalSystemId?: string + ): Observable { + return this.adapter.getInvoicePDF( + userId, + orderId, + invoiceId, + externalSystemId + ); + } +} diff --git a/feature-libs/pdf-invoices/core/http-interceptors/bad-request/pdf-invoices-badrequest.handler.spec.ts b/feature-libs/pdf-invoices/core/http-interceptors/bad-request/pdf-invoices-badrequest.handler.spec.ts new file mode 100644 index 00000000000..dcb34f903fa --- /dev/null +++ b/feature-libs/pdf-invoices/core/http-interceptors/bad-request/pdf-invoices-badrequest.handler.spec.ts @@ -0,0 +1,96 @@ +import { HttpErrorResponse, HttpRequest } from '@angular/common/http'; +import { TestBed } from '@angular/core/testing'; +import { + GlobalMessageService, + GlobalMessageType, + HttpResponseStatus, +} from '@spartacus/core'; +import { PDFInvoicesBadRequestHandler } from './pdf-invoices-badrequest.handler'; + +class MockGlobalMessageService { + add() {} +} + +const MockRequest = {} as HttpRequest; + +const MockNoOrderIdBadRequestResponse = { + error: { + errors: [ + { + message: + 'Order with guid [15092023] not found for current user in current BaseStore', + type: 'UnknownIdentifierError', + }, + ], + }, +} as HttpErrorResponse; + +const MockDownloadPDFBadRequestResponse = { + error: { + errors: [ + { + message: 'Invoice with id [Imperial] not found for order [15092023]', + type: 'UnknownIdentifierError', + }, + ], + }, +} as HttpErrorResponse; + +describe('PDFInvoicesDateBadRequestHandler', () => { + let pdfInvoicesBRHandler: PDFInvoicesBadRequestHandler; + let globalMessageService: GlobalMessageService; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ + PDFInvoicesBadRequestHandler, + { + provide: GlobalMessageService, + useClass: MockGlobalMessageService, + }, + ], + }); + pdfInvoicesBRHandler = TestBed.inject(PDFInvoicesBadRequestHandler); + globalMessageService = TestBed.inject(GlobalMessageService); + }); + + it('should be created', () => { + expect(pdfInvoicesBRHandler).toBeTruthy(); + }); + + it('should register 400 responseStatus ', () => { + expect(pdfInvoicesBRHandler.responseStatus).toEqual( + HttpResponseStatus.BAD_REQUEST + ); + }); + + it('should handle invalid order id bad request', () => { + spyOn(globalMessageService, 'add'); + pdfInvoicesBRHandler.handleError( + MockRequest, + MockNoOrderIdBadRequestResponse + ); + + expect(globalMessageService.add).toHaveBeenCalledWith( + { + key: 'pdfInvoices.invoicesLoadingError', + }, + GlobalMessageType.MSG_TYPE_ERROR + ); + }); + + it('should handle invoice download bad request', () => { + spyOn(globalMessageService, 'add'); + pdfInvoicesBRHandler.handleError( + MockRequest, + MockDownloadPDFBadRequestResponse + ); + + expect(globalMessageService.add).toHaveBeenCalledWith( + { + key: 'pdfInvoices.downloadPDFError', + }, + GlobalMessageType.MSG_TYPE_ERROR + ); + }); +}); diff --git a/feature-libs/pdf-invoices/core/http-interceptors/bad-request/pdf-invoices-badrequest.handler.ts b/feature-libs/pdf-invoices/core/http-interceptors/bad-request/pdf-invoices-badrequest.handler.ts new file mode 100644 index 00000000000..7451ae27146 --- /dev/null +++ b/feature-libs/pdf-invoices/core/http-interceptors/bad-request/pdf-invoices-badrequest.handler.ts @@ -0,0 +1,91 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { HttpErrorResponse, HttpRequest } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { + ErrorModel, + GlobalMessageType, + HttpErrorHandler, + HttpResponseStatus, + Priority, +} from '@spartacus/core'; + +@Injectable({ + providedIn: 'root', +}) +export class PDFInvoicesBadRequestHandler extends HttpErrorHandler { + responseStatus = HttpResponseStatus.BAD_REQUEST; + + hasMatch(errorResponse: HttpErrorResponse): boolean { + return ( + super.hasMatch(errorResponse) && this.getErrors(errorResponse)?.length > 0 + ); + } + + handleError(request: HttpRequest, response: HttpErrorResponse): void { + this.handleInvoicesListError(request, response); + this.handlePDFDownloadError(request, response); + } + + protected handleInvoicesListError( + _request: HttpRequest, + response: HttpErrorResponse + ) { + this.getErrors(response) + .filter((e) => this.isInvoicesListNotFoundError(e)) + .forEach(() => { + this.globalMessageService.add( + { key: 'pdfInvoices.invoicesLoadingError' }, + GlobalMessageType.MSG_TYPE_ERROR + ); + }); + } + + protected handlePDFDownloadError( + _request: HttpRequest, + response: HttpErrorResponse + ) { + this.getErrors(response) + .filter((e) => this.isDownloadInvoiceError(e)) + .forEach(() => { + this.globalMessageService.add( + { + key: 'pdfInvoices.downloadPDFError', + }, + GlobalMessageType.MSG_TYPE_ERROR + ); + }); + } + + protected isInvoicesListNotFoundError(error: ErrorModel): boolean { + return ( + error?.type === 'UnknownIdentifierError' && + error?.message != null && + error?.message.includes('Order') + ); + } + + protected isDownloadInvoiceError(error: ErrorModel): boolean { + return ( + error?.type === 'UnknownIdentifierError' && + error?.message != null && + error?.message.includes('Invoice') + ); + } + + protected getErrors(response: HttpErrorResponse): ErrorModel[] { + return (response.error?.errors).filter( + (error: any) => + this.isInvoicesListNotFoundError(error) || + this.isDownloadInvoiceError(error) + ); + } + + getPriority(): Priority { + return Priority.NORMAL; + } +} diff --git a/feature-libs/pdf-invoices/core/http-interceptors/index.ts b/feature-libs/pdf-invoices/core/http-interceptors/index.ts new file mode 100644 index 00000000000..90d44b0abd5 --- /dev/null +++ b/feature-libs/pdf-invoices/core/http-interceptors/index.ts @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './bad-request/pdf-invoices-badrequest.handler'; diff --git a/feature-libs/pdf-invoices/core/ng-package.json b/feature-libs/pdf-invoices/core/ng-package.json new file mode 100644 index 00000000000..38e01ac17de --- /dev/null +++ b/feature-libs/pdf-invoices/core/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "./public_api.ts" + } +} diff --git a/feature-libs/pdf-invoices/core/pdf-invoices-core.module.ts b/feature-libs/pdf-invoices/core/pdf-invoices-core.module.ts new file mode 100644 index 00000000000..ba1d175d054 --- /dev/null +++ b/feature-libs/pdf-invoices/core/pdf-invoices-core.module.ts @@ -0,0 +1,30 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { NgModule } from '@angular/core'; +import { HttpErrorHandler } from '@spartacus/core'; +import { PDFInvoicesFacade } from '@spartacus/pdf-invoices/root'; +import { PDFInvoicesConnector } from './connectors/pdf-invoices.connector'; +import { PDFInvoicesBadRequestHandler } from './http-interceptors/bad-request/pdf-invoices-badrequest.handler'; +import { PDFInvoicesService } from './services'; + +@NgModule({ + imports: [], + providers: [ + PDFInvoicesService, + { + provide: PDFInvoicesFacade, + useExisting: PDFInvoicesService, + }, + { + provide: HttpErrorHandler, + useExisting: PDFInvoicesBadRequestHandler, + multi: true, + }, + PDFInvoicesConnector, + ], +}) +export class PDFInvoicesCoreModule {} diff --git a/feature-libs/pdf-invoices/core/public_api.ts b/feature-libs/pdf-invoices/core/public_api.ts new file mode 100644 index 00000000000..210f757f8dd --- /dev/null +++ b/feature-libs/pdf-invoices/core/public_api.ts @@ -0,0 +1,10 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './connectors/index'; +export * from './http-interceptors/index'; +export * from './pdf-invoices-core.module'; +export * from './services/index'; diff --git a/feature-libs/pdf-invoices/core/services/index.ts b/feature-libs/pdf-invoices/core/services/index.ts new file mode 100644 index 00000000000..7eb1d8cce75 --- /dev/null +++ b/feature-libs/pdf-invoices/core/services/index.ts @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './pdf-invoices.service'; diff --git a/feature-libs/pdf-invoices/core/services/pdf-invoices.service.spec.ts b/feature-libs/pdf-invoices/core/services/pdf-invoices.service.spec.ts new file mode 100644 index 00000000000..4901d71386a --- /dev/null +++ b/feature-libs/pdf-invoices/core/services/pdf-invoices.service.spec.ts @@ -0,0 +1,186 @@ +import { TestBed } from '@angular/core/testing'; +import { RoutingService, UserIdService } from '@spartacus/core'; +import { + InvoiceQueryParams, + InvoicesFields, +} from '@spartacus/pdf-invoices/root'; +import { of } from 'rxjs'; +import { take } from 'rxjs/operators'; +import { PDFInvoicesConnector } from '../connectors/pdf-invoices.connector'; +import { PDFInvoicesService } from './pdf-invoices.service'; + +import createSpy = jasmine.createSpy; + +const mockUserId = 'userId1'; +const mockOrderId = '15092023'; +const mockExternalSystemId = 'IMPERIAL'; +const mockInvoiceId = 'Invoice-15-09-2023'; +const mockInvoiceQueryParams: InvoiceQueryParams = { + currentPage: 0, + pageSize: 10, + sort: 'invoiceID:asc', + fields: InvoicesFields.FULL, +}; + +const blob = new Blob(); + +class MockPDFInvoicesConnector implements Partial { + getInvoicesForOrder = createSpy( + 'PDFInvoicesConnector.getInvoicesForOrder' + ).and.callFake( + (_userId: string, _orderId: string, _queryParams: InvoiceQueryParams) => + of({}) + ); + getInvoicePDF = createSpy('PDFInvoicesConnector.getInvoicePDF').and.callFake( + ( + _userId: string, + _orderId: string, + _invoiceId: string, + _externalSystemId?: string + ) => of(blob) + ); +} + +class MockUserIdService implements Partial { + takeUserId = createSpy('UserIdService.takeUserId').and.returnValue( + of(mockUserId) + ); +} + +class MockRoutingService implements Partial { + getRouterState = createSpy('RoutingService.getRouterState').and.returnValue( + of({ + state: { + semanticRoute: 'orders', + params: { orderCode: mockOrderId }, + }, + }) + ); +} + +describe('PDFInvoicesService', () => { + let pdfInvoicesService: PDFInvoicesService; + let connector: PDFInvoicesConnector; + + describe('Current user', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ + PDFInvoicesService, + { + provide: PDFInvoicesConnector, + useClass: MockPDFInvoicesConnector, + }, + { + provide: UserIdService, + useClass: MockUserIdService, + }, + { + provide: RoutingService, + useClass: MockRoutingService, + }, + ], + }); + + pdfInvoicesService = TestBed.inject(PDFInvoicesService); + connector = TestBed.inject(PDFInvoicesConnector); + }); + + it('should be created', () => { + expect(pdfInvoicesService).toBeTruthy(); + }); + + it('should call connector when getInvoicesForOrder is invoked', (done) => { + let result; + pdfInvoicesService + .getInvoicesForOrder(mockInvoiceQueryParams, mockUserId, mockOrderId) + .pipe(take(1)) + .subscribe((res: any) => { + result = res; + expect(result).toEqual({}); + done(); + }); + expect(connector.getInvoicesForOrder).toHaveBeenCalledWith( + mockUserId, + mockOrderId, + mockInvoiceQueryParams + ); + }); + + it('should set userId, orderId and call connector when getInvoicesForOrder is invoked without userId and orderId', (done) => { + let result; + pdfInvoicesService + .getInvoicesForOrder(mockInvoiceQueryParams) + .pipe(take(1)) + .subscribe((res: any) => { + result = res; + expect(result).toEqual({}); + done(); + }); + expect(connector.getInvoicesForOrder).toHaveBeenCalledWith( + mockUserId, + mockOrderId, + mockInvoiceQueryParams + ); + }); + + it('should call connector when getInvoicePDF is invoked', (done) => { + let result; + pdfInvoicesService + .getInvoicePDF( + mockInvoiceId, + mockExternalSystemId, + mockUserId, + mockOrderId + ) + .pipe(take(1)) + .subscribe((res: any) => { + result = res; + expect(result).toEqual(blob); + done(); + }); + expect(connector.getInvoicePDF).toHaveBeenCalledWith( + mockUserId, + mockOrderId, + mockInvoiceId, + mockExternalSystemId + ); + }); + + it('should call connector when getInvoicePDF is invoked without externalSystemId', (done) => { + let result; + pdfInvoicesService + .getInvoicePDF(mockInvoiceId, undefined, mockUserId, mockOrderId) + .pipe(take(1)) + .subscribe((res: any) => { + result = res; + expect(result).toEqual(blob); + done(); + }); + expect(connector.getInvoicePDF).toHaveBeenCalledWith( + mockUserId, + mockOrderId, + mockInvoiceId, + undefined + ); + }); + + it('should set userId, orderId and call connector when getInvoicePDF is invoked without userId, orderId, externalSystemId', (done) => { + let result; + pdfInvoicesService + .getInvoicePDF(mockInvoiceId) + .pipe(take(1)) + .subscribe((res: any) => { + result = res; + expect(result).toEqual(blob); + done(); + }); + expect(connector.getInvoicePDF).toHaveBeenCalledWith( + mockUserId, + mockOrderId, + mockInvoiceId, + undefined + ); + }); + }); +}); diff --git a/feature-libs/pdf-invoices/core/services/pdf-invoices.service.ts b/feature-libs/pdf-invoices/core/services/pdf-invoices.service.ts new file mode 100644 index 00000000000..d643db7d05a --- /dev/null +++ b/feature-libs/pdf-invoices/core/services/pdf-invoices.service.ts @@ -0,0 +1,81 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Injectable, OnDestroy } from '@angular/core'; +import { RoutingService, UserIdService } from '@spartacus/core'; +import { + InvoiceQueryParams, + OrderInvoiceList, + PDFInvoicesFacade, +} from '@spartacus/pdf-invoices/root'; +import { Observable, Subscription } from 'rxjs'; +import { distinctUntilChanged, map, shareReplay } from 'rxjs/operators'; +import { PDFInvoicesConnector } from '../connectors/pdf-invoices.connector'; + +@Injectable() +export class PDFInvoicesService implements PDFInvoicesFacade, OnDestroy { + protected subscriptions = new Subscription(); + + userId: string; + orderId: string; + + constructor( + private routingService: RoutingService, + private userIdService: UserIdService, + protected pdfInvoicesConnector: PDFInvoicesConnector + ) { + this.subscriptions.add( + this.userIdService + .takeUserId() + .subscribe((userId) => (this.userId = userId)) + ); + this.subscriptions.add( + this.getOrderId().subscribe((orderId) => (this.orderId = orderId)) + ); + } + + getInvoicesForOrder( + queryParams: InvoiceQueryParams, + userId?: string, + orderId?: string + ): Observable { + return this.pdfInvoicesConnector + .getInvoicesForOrder( + userId || this.userId, + orderId || this.orderId, + queryParams + ) + .pipe(shareReplay(1)); + } + + getInvoicePDF( + invoiceId: string, + externalSystemId?: string, + userId?: string, + orderId?: string + ): Observable { + return this.pdfInvoicesConnector + .getInvoicePDF( + userId || this.userId, + orderId || this.orderId, + invoiceId, + externalSystemId + ) + .pipe(shareReplay(1)); + } + + protected getOrderId(): Observable { + return this.routingService.getRouterState().pipe( + map((routingData) => routingData.state.params), + distinctUntilChanged(), + map((params) => params.orderCode) + ); + } + + ngOnDestroy(): void { + this.subscriptions.unsubscribe(); + } +} diff --git a/feature-libs/pdf-invoices/jest.schematics.config.js b/feature-libs/pdf-invoices/jest.schematics.config.js new file mode 100644 index 00000000000..85a061c3966 --- /dev/null +++ b/feature-libs/pdf-invoices/jest.schematics.config.js @@ -0,0 +1,35 @@ +const { pathsToModuleNameMapper } = require('ts-jest'); +const { compilerOptions } = require('./tsconfig.schematics.json'); +const { defaultTransformerOptions } = require('jest-preset-angular/presets'); + +/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ +module.exports = { + preset: 'jest-preset-angular', + globalSetup: 'jest-preset-angular/global-setup', + moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, { + prefix: '/', + }), + setupFilesAfterEnv: ['/setup-jest.ts'], + testMatch: ['**/+(*_)+(spec).+(ts)'], + transform: { + '^.+\\.(ts|js|mjs|html|svg)$': [ + 'jest-preset-angular', + { + ...defaultTransformerOptions, + tsconfig: '/tsconfig.schematics.json', + }, + ], + }, + + collectCoverage: false, + coverageReporters: ['json', 'lcov', 'text', 'clover'], + coverageDirectory: '/../../coverage/pdf-invoices/schematics', + coverageThreshold: { + global: { + statements: 90, + branches: 90, + functions: 90, + lines: 90, + }, + }, +}; diff --git a/feature-libs/pdf-invoices/karma.conf.js b/feature-libs/pdf-invoices/karma.conf.js new file mode 100644 index 00000000000..b1ea719a64b --- /dev/null +++ b/feature-libs/pdf-invoices/karma.conf.js @@ -0,0 +1,51 @@ +// 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: ['parallel', 'jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-parallel'), + require('karma-jasmine'), + require('karma-coverage'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('@angular-devkit/build-angular/plugins/karma'), + ], + parallelOptions: { + executors: 2, + shardStrategy: 'round-robin', + }, + client: { + clearContext: false, // leave Jasmine Spec Runner output visible in browser + jasmine: { + random: false, + }, + }, + reporters: ['progress', 'kjhtml', 'dots'], + coverageReporter: { + dir: require('path').join(__dirname, '../../coverage/pdf-invoices'), + reporters: [{ type: 'lcov', subdir: '.' }, { type: 'text-summary' }], + check: { + global: { + statements: 90, + lines: 90, + branches: 75, + functions: 85, + }, + }, + }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false, + restartOnFileChange: true, + }); +}; diff --git a/feature-libs/pdf-invoices/ng-package.json b/feature-libs/pdf-invoices/ng-package.json new file mode 100644 index 00000000000..7ba32570a26 --- /dev/null +++ b/feature-libs/pdf-invoices/ng-package.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/pdf-invoices", + "lib": { + "entryFile": "./public_api.ts" + }, + "assets": ["**/*.scss", "schematics/**/*.json", "schematics/**/*.js"] +} diff --git a/feature-libs/pdf-invoices/occ/adapters/index.ts b/feature-libs/pdf-invoices/occ/adapters/index.ts new file mode 100644 index 00000000000..1b932c5c19b --- /dev/null +++ b/feature-libs/pdf-invoices/occ/adapters/index.ts @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './occ-pdf-invoices.adapter'; diff --git a/feature-libs/pdf-invoices/occ/adapters/occ-pdf-invoices.adapter.spec.ts b/feature-libs/pdf-invoices/occ/adapters/occ-pdf-invoices.adapter.spec.ts new file mode 100644 index 00000000000..440d11c68a4 --- /dev/null +++ b/feature-libs/pdf-invoices/occ/adapters/occ-pdf-invoices.adapter.spec.ts @@ -0,0 +1,251 @@ +import { HttpClient, HttpErrorResponse } from '@angular/common/http'; +import { + HttpClientTestingModule, + HttpTestingController, +} from '@angular/common/http/testing'; +import { TestBed } from '@angular/core/testing'; +import { + HttpErrorModel, + normalizeHttpError, + OccConfig, + OccEndpoints, +} from '@spartacus/core'; +import { + InvoiceQueryParams, + InvoicesFields, + OrderInvoiceList, +} from '@spartacus/pdf-invoices/root'; +import { throwError } from 'rxjs'; +import { take } from 'rxjs/operators'; +import { OccPDFInvoicesAdapter } from './occ-pdf-invoices.adapter'; + +const mockUserId = 'userId1'; +const mockOrderId = '15092023'; +const mockExternalSystemId = 'IMPERIAL'; +const mockInvoiceId = 'Invoice-15-09-2023'; +const mockInvoiceQueryParams: InvoiceQueryParams = { + currentPage: 0, + pageSize: 10, + sort: 'invoiceID:asc', + fields: InvoicesFields.FULL, +}; + +const mockInvoicesList: OrderInvoiceList = { + invoices: [ + { + invoiceId: '123', + externalSystemId: mockExternalSystemId, + createdAt: new Date(), + netAmount: { + currencyIso: 'USD', + value: 123, + }, + totalAmount: { + currencyIso: 'USD', + value: 123, + }, + }, + ], +}; + +const MockOccModuleConfig: OccConfig = { + backend: { + occ: { + baseUrl: '', + prefix: '', + endpoints: { + pdfInvoicesListInvoices: 'users/${userId}/orders/${orderId}/invoices', + pdfInvoicesDownloadInvoicePDF: + 'users/${userId}/orders/${orderId}/invoices/${invoiceId}/download', + } as OccEndpoints, + }, + }, + context: { + baseSite: [''], + }, +}; + +const mockNoOrderIdBadRequestResponse = new HttpErrorResponse({ + error: { + errors: [ + { + message: + 'Order with guid [15092023] not found for current user in current BaseStore', + type: 'UnknownIdentifierError', + }, + ], + }, +}); + +const mockDownloadPDFBadRequestResponse = new HttpErrorResponse({ + error: { + errors: [ + { + message: 'Invoice with id [Imperial] not found for order [15092023]', + type: 'UnknownIdentifierError', + }, + ], + }, +}); + +describe('OccPDFInvoicesAdapter', () => { + let occPDFInvoicesAdapter: OccPDFInvoicesAdapter; + let httpClient: HttpClient; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + OccPDFInvoicesAdapter, + { provide: OccConfig, useValue: MockOccModuleConfig }, + ], + }); + occPDFInvoicesAdapter = TestBed.inject(OccPDFInvoicesAdapter); + httpClient = TestBed.inject(HttpClient); + httpMock = TestBed.inject(HttpTestingController); + }); + + afterEach(() => { + httpMock.verify(); + }); + + it('should be created', () => { + expect(occPDFInvoicesAdapter).toBeTruthy(); + }); + + describe(`get invoices for an order`, () => { + it(`should show PDF Invoices for given user id, order id`, (done) => { + occPDFInvoicesAdapter + .getInvoicesForOrder(mockUserId, mockOrderId, mockInvoiceQueryParams) + .pipe(take(1)) + .subscribe((result) => { + expect(result).toEqual(mockInvoicesList); + done(); + }); + + const mockReq = httpMock.expectOne((req) => { + return ( + req.method === 'GET' && + req.url === + `users/${mockUserId}/orders/${mockOrderId}/invoices?currentPage=${ + mockInvoiceQueryParams.currentPage + }&pageSize=${ + mockInvoiceQueryParams.pageSize + }&sort=${encodeURIComponent(mockInvoiceQueryParams.sort)}&fields=${ + mockInvoiceQueryParams.fields + }` + ); + }); + + expect(mockReq.cancelled).toBeFalsy(); + mockReq.flush(mockInvoicesList); + expect(mockReq.request.responseType).toEqual('json'); + }); + + it(`should result in error when Error is thrown`, (done) => { + spyOn(httpClient, 'get').and.returnValue( + throwError(mockNoOrderIdBadRequestResponse) + ); + + let result: HttpErrorModel | undefined; + const subscription = occPDFInvoicesAdapter + .getInvoicesForOrder(mockUserId, mockOrderId, mockInvoiceQueryParams) + .pipe(take(1)) + .subscribe({ + error: (err: any) => { + result = err; + done(); + }, + }); + + expect(result).toEqual( + normalizeHttpError(mockNoOrderIdBadRequestResponse) + ); + + subscription.unsubscribe(); + }); + }); + + describe(`get invoice PDF for an invoice id`, () => { + const mockFile: File = new File([], 'MockOrderInvoice', { + type: 'application/pdf', + }); + it(`should download PDF Invoices for given user id, order id`, (done) => { + occPDFInvoicesAdapter + .getInvoicePDF(mockUserId, mockOrderId, mockInvoiceId) + .pipe(take(1)) + .subscribe((result) => { + expect(result).toEqual(mockFile); + done(); + }); + + const mockReq = httpMock.expectOne((req) => { + return ( + req.method === 'GET' && + req.url === + `users/${mockUserId}/orders/${mockOrderId}/invoices/${mockInvoiceId}/download` + ); + }); + + expect(mockReq.cancelled).toBeFalsy(); + expect(mockReq.request.responseType).toEqual('blob'); + mockReq.flush(mockFile); + }); + + it(`should download PDF Invoices for given user id, order id and external system id`, (done) => { + occPDFInvoicesAdapter + .getInvoicePDF( + mockUserId, + mockOrderId, + mockInvoiceId, + mockExternalSystemId + ) + .pipe(take(1)) + .subscribe((result) => { + expect(result).toEqual(mockFile); + done(); + }); + + const mockReq = httpMock.expectOne((req) => { + return ( + req.method === 'GET' && + req.url === + `users/${mockUserId}/orders/${mockOrderId}/invoices/${mockInvoiceId}/download?externalSystemId=${mockExternalSystemId}` + ); + }); + + expect(mockReq.cancelled).toBeFalsy(); + mockReq.flush(mockFile); + expect(mockReq.request.responseType).toEqual('blob'); + }); + + it(`should result in error when Invoice download Error is thrown`, (done) => { + spyOn(httpClient, 'get').and.returnValue( + throwError(mockDownloadPDFBadRequestResponse) + ); + + let result: HttpErrorModel | undefined; + const subscription = occPDFInvoicesAdapter + .getInvoicePDF( + mockUserId, + mockOrderId, + mockInvoiceId, + mockExternalSystemId + ) + .pipe(take(1)) + .subscribe({ + error: (err: any) => { + result = err; + done(); + }, + }); + + expect(result).toEqual( + normalizeHttpError(mockDownloadPDFBadRequestResponse) + ); + + subscription.unsubscribe(); + }); + }); +}); diff --git a/feature-libs/pdf-invoices/occ/adapters/occ-pdf-invoices.adapter.ts b/feature-libs/pdf-invoices/occ/adapters/occ-pdf-invoices.adapter.ts new file mode 100644 index 00000000000..6655d21bd5a --- /dev/null +++ b/feature-libs/pdf-invoices/occ/adapters/occ-pdf-invoices.adapter.ts @@ -0,0 +1,97 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { HttpClient, HttpErrorResponse } from '@angular/common/http'; +import { inject, Injectable } from '@angular/core'; +import { + ConverterService, + LoggerService, + normalizeHttpError, + OccEndpointsService, +} from '@spartacus/core'; +import { + PDFInvoicesAdapter, + PDF_INVOICES_LIST_INVOICES_NORMALIZER, +} from '@spartacus/pdf-invoices/core'; +import { + InvoiceQueryParams, + OrderInvoiceList, +} from '@spartacus/pdf-invoices/root'; +import { Observable, throwError } from 'rxjs'; +import { catchError } from 'rxjs/operators'; + +@Injectable() +export class OccPDFInvoicesAdapter implements PDFInvoicesAdapter { + protected logger = inject(LoggerService); + + constructor( + protected http: HttpClient, + protected occEndpoints: OccEndpointsService, + protected converter: ConverterService + ) {} + + getInvoicesForOrder( + userId: string, + orderId: string, + queryParams: InvoiceQueryParams + ): Observable { + return this.http + .get( + this.buildInvoiceListUrl(userId, orderId, queryParams) + ) + .pipe( + catchError((error: HttpErrorResponse) => + throwError(normalizeHttpError(error, this.logger)) + ), + this.converter.pipeable(PDF_INVOICES_LIST_INVOICES_NORMALIZER) + ); + } + + getInvoicePDF( + userId: string, + orderId: string, + invoiceId: string, + externalSystemId?: string + ): Observable { + const options = { + responseType: 'blob' as 'json', + }; + + return this.http + .get( + this.buildInvoicePDFUrl(userId, orderId, invoiceId, externalSystemId), + options + ) + .pipe( + catchError((error: HttpErrorResponse) => + throwError(normalizeHttpError(error, this.logger)) + ) + ); + } + + private buildInvoiceListUrl( + userId: string, + orderId: string, + queryParams: InvoiceQueryParams + ): string { + return this.occEndpoints.buildUrl('pdfInvoicesListInvoices', { + urlParams: { userId, orderId }, + queryParams, + }); + } + + private buildInvoicePDFUrl( + userId: string, + orderId: string, + invoiceId: string, + externalSystemId?: string + ): string { + return this.occEndpoints.buildUrl('pdfInvoicesDownloadInvoicePDF', { + urlParams: { userId, orderId, invoiceId }, + queryParams: externalSystemId ? { externalSystemId } : undefined, + }); + } +} diff --git a/feature-libs/pdf-invoices/occ/config/default-occ-pdf-invoices-config.ts b/feature-libs/pdf-invoices/occ/config/default-occ-pdf-invoices-config.ts new file mode 100644 index 00000000000..8bd3af1fd8d --- /dev/null +++ b/feature-libs/pdf-invoices/occ/config/default-occ-pdf-invoices-config.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { OccConfig } from '@spartacus/core'; + +export const defaultOccPDFInvoicesConfig: OccConfig = { + backend: { + occ: { + endpoints: { + pdfInvoicesListInvoices: 'users/${userId}/orders/${orderId}/invoices', + pdfInvoicesDownloadInvoicePDF: + 'users/${userId}/orders/${orderId}/invoices/${invoiceId}/download', + }, + }, + }, +}; diff --git a/feature-libs/pdf-invoices/occ/model/index.ts b/feature-libs/pdf-invoices/occ/model/index.ts new file mode 100644 index 00000000000..7627afce6a4 --- /dev/null +++ b/feature-libs/pdf-invoices/occ/model/index.ts @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +// Imported for side effects (module augmentation) +import './occ-pdf-invoices.model'; diff --git a/feature-libs/pdf-invoices/occ/model/occ-pdf-invoices.model.ts b/feature-libs/pdf-invoices/occ/model/occ-pdf-invoices.model.ts new file mode 100644 index 00000000000..c7665f3fdaa --- /dev/null +++ b/feature-libs/pdf-invoices/occ/model/occ-pdf-invoices.model.ts @@ -0,0 +1,27 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { OccEndpoint } from '@spartacus/core'; + +declare module '@spartacus/core' { + interface OccEndpoints { + /** + * Get the list of invoices for an order + * + * @member {string} [pdfInvoicesListInvoices] + */ + + pdfInvoicesListInvoices?: string | OccEndpoint; + + /** + * Get the invoice document as a PDF file + * + * @member {string} [pdfInvoicesDownloadInvoicePDF] + */ + + pdfInvoicesDownloadInvoicePDF?: string | OccEndpoint; + } +} diff --git a/feature-libs/pdf-invoices/occ/ng-package.json b/feature-libs/pdf-invoices/occ/ng-package.json new file mode 100644 index 00000000000..38e01ac17de --- /dev/null +++ b/feature-libs/pdf-invoices/occ/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "./public_api.ts" + } +} diff --git a/feature-libs/pdf-invoices/occ/pdf-invoices-occ.module.ts b/feature-libs/pdf-invoices/occ/pdf-invoices-occ.module.ts new file mode 100644 index 00000000000..11568e8402e --- /dev/null +++ b/feature-libs/pdf-invoices/occ/pdf-invoices-occ.module.ts @@ -0,0 +1,24 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { provideDefaultConfig } from '@spartacus/core'; +import { PDFInvoicesAdapter } from '@spartacus/pdf-invoices/core'; +import { OccPDFInvoicesAdapter } from './adapters/occ-pdf-invoices.adapter'; +import { defaultOccPDFInvoicesConfig } from './config/default-occ-pdf-invoices-config'; + +@NgModule({ + imports: [CommonModule], + providers: [ + provideDefaultConfig(defaultOccPDFInvoicesConfig), + { + provide: PDFInvoicesAdapter, + useClass: OccPDFInvoicesAdapter, + }, + ], +}) +export class PDFInvoicesOccModule {} diff --git a/feature-libs/pdf-invoices/occ/public_api.ts b/feature-libs/pdf-invoices/occ/public_api.ts new file mode 100644 index 00000000000..a2e4710de7a --- /dev/null +++ b/feature-libs/pdf-invoices/occ/public_api.ts @@ -0,0 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './adapters/index'; +export * from './model/index'; +export * from './pdf-invoices-occ.module'; diff --git a/feature-libs/pdf-invoices/package.json b/feature-libs/pdf-invoices/package.json new file mode 100644 index 00000000000..4c147f7b38d --- /dev/null +++ b/feature-libs/pdf-invoices/package.json @@ -0,0 +1,42 @@ +{ + "name": "@spartacus/pdf-invoices", + "version": "6.5.0-1", + "description": "Invoices library for Spartacus", + "keywords": [ + "spartacus", + "framework", + "storefront", + "pdf-invoices" + ], + "homepage": "https://github.com/SAP/spartacus", + "repository": "https://github.com/SAP/spartacus/tree/develop/feature-libs/pdf-invoices", + "license": "Apache-2.0", + "exports": { + ".": { + "sass": "./_index.scss" + } + }, + "scripts": { + "build:schematics": "npm run clean:schematics && ../../node_modules/.bin/tsc -p ./tsconfig.schematics.json", + "clean:schematics": "../../node_modules/.bin/rimraf --glob \"schematics/**/*.js\" \"schematics/**/*.js.map\" \"schematics/**/*.d.ts\"", + "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" + }, + "dependencies": { + "tslib": "^2.6.2" + }, + "peerDependencies": { + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "rxjs": "^6.6.0" + }, + "publishConfig": { + "access": "public" + }, + "schematics": "./schematics/collection.json" +} diff --git a/feature-libs/pdf-invoices/pdf-invoices.module.ts b/feature-libs/pdf-invoices/pdf-invoices.module.ts new file mode 100644 index 00000000000..db2440d4336 --- /dev/null +++ b/feature-libs/pdf-invoices/pdf-invoices.module.ts @@ -0,0 +1,20 @@ +/* + * SPDX-FileCopyrightText: 2022 SAP Spartacus team + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { NgModule } from '@angular/core'; +import { PDFInvoicesComponentsModule } from '@spartacus/pdf-invoices/components'; +import { PDFInvoicesCoreModule } from '@spartacus/pdf-invoices/core'; +import { PDFInvoicesOccModule } from '@spartacus/pdf-invoices/occ'; + +@NgModule({ + imports: [ + PDFInvoicesComponentsModule, + PDFInvoicesCoreModule, + PDFInvoicesOccModule, + ], +}) +export class PDFInvoicesModule {} diff --git a/feature-libs/pdf-invoices/project.json b/feature-libs/pdf-invoices/project.json new file mode 100644 index 00000000000..1221fe4d75d --- /dev/null +++ b/feature-libs/pdf-invoices/project.json @@ -0,0 +1,40 @@ +{ + "name": "pdf-invoices", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "feature-libs/pdf-invoices", + "prefix": "cx", + "targets": { + "build": { + "executor": "./tools/build-lib:augmented-types", + "options": { + "tsConfig": "feature-libs/pdf-invoices/tsconfig.lib.json", + "project": "feature-libs/pdf-invoices/ng-package.json" + }, + "configurations": { + "production": { + "tsConfig": "feature-libs/pdf-invoices/tsconfig.lib.prod.json" + } + } + }, + "test": { + "executor": "@angular-devkit/build-angular:karma", + "options": { + "main": "feature-libs/pdf-invoices/test.ts", + "tsConfig": "feature-libs/pdf-invoices/tsconfig.spec.json", + "polyfills": ["zone.js", "zone.js/testing"], + "karmaConfig": "feature-libs/pdf-invoices/karma.conf.js" + } + }, + "lint": { + "executor": "@angular-eslint/builder:lint", + "options": { + "lintFilePatterns": [ + "feature-libs/pdf-invoices/**/*.ts", + "feature-libs/pdf-invoices/**/*.html" + ] + } + } + }, + "tags": ["type:feature"] +} diff --git a/feature-libs/pdf-invoices/public_api.ts b/feature-libs/pdf-invoices/public_api.ts new file mode 100644 index 00000000000..6ee849cfe47 --- /dev/null +++ b/feature-libs/pdf-invoices/public_api.ts @@ -0,0 +1,10 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* + * Public API Surface of pdf-invoices + */ +export * from './pdf-invoices.module'; diff --git a/feature-libs/pdf-invoices/root/facade/index.ts b/feature-libs/pdf-invoices/root/facade/index.ts new file mode 100644 index 00000000000..8cadd659ae0 --- /dev/null +++ b/feature-libs/pdf-invoices/root/facade/index.ts @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './pdf-invoices.facade'; diff --git a/feature-libs/pdf-invoices/root/facade/pdf-invoices.facade.ts b/feature-libs/pdf-invoices/root/facade/pdf-invoices.facade.ts new file mode 100644 index 00000000000..140f23fd448 --- /dev/null +++ b/feature-libs/pdf-invoices/root/facade/pdf-invoices.facade.ts @@ -0,0 +1,54 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Injectable } from '@angular/core'; +import { facadeFactory } from '@spartacus/core'; +import { Observable } from 'rxjs'; +import { PDF_INVOICES_FEATURE } from '../feature-name'; +import { + InvoiceQueryParams, + OrderInvoiceList, +} from '../model/pdf-invoices.model'; + +export function pdfInvoicesFacadeFactory() { + return facadeFactory({ + facade: PDFInvoicesFacade, + feature: PDF_INVOICES_FEATURE, + methods: ['getInvoicesForOrder', 'getInvoicePDF'], + }); +} + +@Injectable({ + providedIn: 'root', + useFactory: pdfInvoicesFacadeFactory, +}) +export abstract class PDFInvoicesFacade { + /** + * Abstract method used to get the PDF invoices for an order + * @param userId Logged in user id + * @param orderId If provided, it will be used, otherwise it will use orderId from router state. + * @param queryParams Additional query parameters used in the API request + */ + abstract getInvoicesForOrder( + queryParams: InvoiceQueryParams, + userId?: string, + orderId?: string + ): Observable; + + /** + * Returns the document blob for given invoiceId, orderId and externalSystemId + * @param userId Logged in user id + * @param orderId If provided, it will be used, otherwise it will use orderId from router state. + * @param invoiceId The id of the invoice to be downloaded + * @param externalSystemId External system that provides the invoice PDF + */ + abstract getInvoicePDF( + invoiceId: string, + externalSystemId?: string, + userId?: string, + orderId?: string + ): Observable; +} diff --git a/feature-libs/pdf-invoices/root/feature-name.ts b/feature-libs/pdf-invoices/root/feature-name.ts new file mode 100644 index 00000000000..d2a42807361 --- /dev/null +++ b/feature-libs/pdf-invoices/root/feature-name.ts @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export const PDF_INVOICES_FEATURE = 'pdfInvoices'; +export const PDF_INVOICES_CORE_FEATURE = 'pdfInvoicesCore'; diff --git a/feature-libs/pdf-invoices/root/model/index.ts b/feature-libs/pdf-invoices/root/model/index.ts new file mode 100644 index 00000000000..d81983e9057 --- /dev/null +++ b/feature-libs/pdf-invoices/root/model/index.ts @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './pdf-invoices.model'; diff --git a/feature-libs/pdf-invoices/root/model/pdf-invoices.model.ts b/feature-libs/pdf-invoices/root/model/pdf-invoices.model.ts new file mode 100644 index 00000000000..dfede29f369 --- /dev/null +++ b/feature-libs/pdf-invoices/root/model/pdf-invoices.model.ts @@ -0,0 +1,50 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +interface Amount { + currencyIso?: string; + value?: number; + formattedValue?: string; +} + +export enum InvoicesFields { + BASIC = 'BASIC', + DEFAULT = 'DEFAULT', + FULL = 'FULL', +} + +export interface OrderInvoice { + invoiceId: string; + externalSystemId?: string; + createdAt: Date; + netAmount: Amount; + totalAmount: Amount; +} + +export interface OrderInvoiceList { + invoices?: OrderInvoice[]; + pagination?: Pagination; + sorts?: Sort[]; +} + +export interface InvoiceQueryParams { + currentPage?: number; + pageSize?: number; + sort?: string; + fields?: InvoicesFields; +} + +interface Sort { + asc?: boolean; + code?: string; +} + +interface Pagination { + count?: number; + page?: number; + totalCount?: number; + totalPages?: number; +} diff --git a/feature-libs/pdf-invoices/root/ng-package.json b/feature-libs/pdf-invoices/root/ng-package.json new file mode 100644 index 00000000000..38e01ac17de --- /dev/null +++ b/feature-libs/pdf-invoices/root/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "./public_api.ts" + } +} diff --git a/feature-libs/pdf-invoices/root/pdf-invoices-root.module.ts b/feature-libs/pdf-invoices/root/pdf-invoices-root.module.ts new file mode 100644 index 00000000000..b5d80f34844 --- /dev/null +++ b/feature-libs/pdf-invoices/root/pdf-invoices-root.module.ts @@ -0,0 +1,34 @@ +/* + * SPDX-FileCopyrightText: 2022 SAP Spartacus team + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { NgModule } from '@angular/core'; +import { CmsConfig, provideDefaultConfigFactory } from '@spartacus/core'; +import { + PDF_INVOICES_CORE_FEATURE, + PDF_INVOICES_FEATURE, +} from './feature-name'; + +export function defaultRequestedDeliveryDateComponentsConfig(): CmsConfig { + const config: CmsConfig = { + featureModules: { + [PDF_INVOICES_FEATURE]: { + cmsComponents: ['AccountOrderDetailsPDFInvoicesComponent'], + }, + // by default core is bundled together with components + [PDF_INVOICES_CORE_FEATURE]: PDF_INVOICES_FEATURE, + }, + }; + + return config; +} + +@NgModule({ + providers: [ + provideDefaultConfigFactory(defaultRequestedDeliveryDateComponentsConfig), + ], +}) +export class PDFInvoicesRootModule {} diff --git a/feature-libs/pdf-invoices/root/public_api.ts b/feature-libs/pdf-invoices/root/public_api.ts new file mode 100644 index 00000000000..071a714f4b0 --- /dev/null +++ b/feature-libs/pdf-invoices/root/public_api.ts @@ -0,0 +1,10 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './facade/index'; +export * from './feature-name'; +export * from './model/index'; +export * from './pdf-invoices-root.module'; diff --git a/feature-libs/pdf-invoices/schematics/.gitignore b/feature-libs/pdf-invoices/schematics/.gitignore new file mode 100644 index 00000000000..c88f4d69e15 --- /dev/null +++ b/feature-libs/pdf-invoices/schematics/.gitignore @@ -0,0 +1,18 @@ +# Outputs +**/*.js +**/*.js.map +**/*.d.ts + +# IDEs +.idea/ +jsconfig.json +.vscode/ + +# Misc +node_modules/ +npm-debug.log* +yarn-error.log* + +# Mac OSX Finder files. +**/.DS_Store +.DS_Store diff --git a/feature-libs/pdf-invoices/schematics/add-pdf-invoices/__snapshots__/index_spec.ts.snap b/feature-libs/pdf-invoices/schematics/add-pdf-invoices/__snapshots__/index_spec.ts.snap new file mode 100644 index 00000000000..3cd99de4d80 --- /dev/null +++ b/feature-libs/pdf-invoices/schematics/add-pdf-invoices/__snapshots__/index_spec.ts.snap @@ -0,0 +1,130 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Spartacus PDF Invoices schematics: ng-add PDF Invoices feature eager loading should import appropriate modules 1`] = `""`; + +exports[`Spartacus PDF Invoices schematics: ng-add PDF Invoices feature general setup should add the feature using the lazy loading syntax 1`] = `""`; + +exports[`Spartacus PDF Invoices schematics: ng-add PDF Invoices feature general setup styling should create a proper scss file 1`] = ` +"@import "../../styles-config"; +@import "@spartacus/pdf-invoices"; +" +`; + +exports[`Spartacus PDF Invoices schematics: ng-add PDF Invoices feature general setup styling should update angular.json 1`] = ` +"{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "", + "projects": { + "schematics-test": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/schematics-test", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.scss", + "src/styles/spartacus/pdf-invoices.scss" + ], + "scripts": [], + "stylePreprocessorOptions": { + "includePaths": [ + "node_modules/" + ] + } + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "2.5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "browserTarget": "schematics-test:build:production" + }, + "development": { + "browserTarget": "schematics-test:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "schematics-test:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.scss", + "src/styles/spartacus/pdf-invoices.scss" + ], + "scripts": [], + "stylePreprocessorOptions": { + "includePaths": [ + "node_modules/" + ] + } + } + } + } + } + } +}" +`; diff --git a/feature-libs/pdf-invoices/schematics/add-pdf-invoices/index.ts b/feature-libs/pdf-invoices/schematics/add-pdf-invoices/index.ts new file mode 100644 index 00000000000..5a246702af3 --- /dev/null +++ b/feature-libs/pdf-invoices/schematics/add-pdf-invoices/index.ts @@ -0,0 +1,46 @@ +/* + * SPDX-FileCopyrightText: 2022 SAP Spartacus team + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + chain, + Rule, + SchematicContext, + Tree, +} from '@angular-devkit/schematics'; +import { + addFeatures, + addPackageJsonDependenciesForLibrary, + analyzeApplication, + analyzeCrossFeatureDependencies, + finalizeInstallation, + LibraryOptions as SpartacusPDFInvoicesOptions, + readPackageJson, + validateSpartacusInstallation, +} from '@spartacus/schematics'; +import { peerDependencies } from '../../package.json'; + +export function addPDFInvoicesFeature( + options: SpartacusPDFInvoicesOptions +): Rule { + return (tree: Tree, _context: SchematicContext): Rule => { + const packageJson = readPackageJson(tree); + validateSpartacusInstallation(packageJson); + + const features = analyzeCrossFeatureDependencies( + options.features as string[] + ); + + return chain([ + analyzeApplication(options, features), + + addFeatures(options, features), + addPackageJsonDependenciesForLibrary(peerDependencies, options), + + finalizeInstallation(options, features), + ]); + }; +} diff --git a/feature-libs/pdf-invoices/schematics/add-pdf-invoices/index_spec.ts b/feature-libs/pdf-invoices/schematics/add-pdf-invoices/index_spec.ts new file mode 100644 index 00000000000..2657523862e --- /dev/null +++ b/feature-libs/pdf-invoices/schematics/add-pdf-invoices/index_spec.ts @@ -0,0 +1,174 @@ +/// + +import { + SchematicTestRunner, + UnitTestTree, +} from '@angular-devkit/schematics/testing'; +import { + Schema as ApplicationOptions, + Style, +} from '@schematics/angular/application/schema'; +import { Schema as WorkspaceOptions } from '@schematics/angular/workspace/schema'; +import { + LibraryOptions as PDFInvoicesOptions, + pdfInvoicesFeatureModulePath, + PDF_INVOICES_FEATURE_NAME, + SpartacusOptions, + SPARTACUS_PDF_INVOICES, + SPARTACUS_SCHEMATICS, +} from '@spartacus/schematics'; +import * as path from 'path'; +import { peerDependencies } from '../../package.json'; + +const collectionPath = path.join(__dirname, '../collection.json'); +const scssFilePath = 'src/styles/spartacus/pdf-invoices.scss'; + +describe('Spartacus PDF Invoices schematics: ng-add', () => { + const schematicRunner = new SchematicTestRunner( + SPARTACUS_PDF_INVOICES, + collectionPath + ); + + let appTree: UnitTestTree; + + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + version: '0.5.0', + }; + + const appOptions: ApplicationOptions = { + name: 'schematics-test', + inlineStyle: false, + inlineTemplate: false, + routing: false, + style: Style.Scss, + skipTests: false, + projectRoot: '', + }; + + const spartacusDefaultOptions: SpartacusOptions = { + project: 'schematics-test', + lazy: true, + features: [], + }; + + const libraryNoFeaturesOptions: PDFInvoicesOptions = { + project: 'schematics-test', + lazy: true, + features: [], + }; + + const rddOptions: PDFInvoicesOptions = { + ...libraryNoFeaturesOptions, + features: [PDF_INVOICES_FEATURE_NAME], + }; + + beforeEach(async () => { + schematicRunner.registerCollection( + SPARTACUS_SCHEMATICS, + '../../projects/schematics/src/collection.json' + ); + + appTree = await schematicRunner.runExternalSchematic( + '@schematics/angular', + 'workspace', + workspaceOptions + ); + + appTree = await schematicRunner.runExternalSchematic( + '@schematics/angular', + 'application', + appOptions, + appTree + ); + + appTree = await schematicRunner.runExternalSchematic( + SPARTACUS_SCHEMATICS, + 'ng-add', + { ...spartacusDefaultOptions, name: 'schematics-test' }, + appTree + ); + }); + + describe('Without features', () => { + beforeEach(async () => { + appTree = await schematicRunner.runSchematic( + 'ng-add', + libraryNoFeaturesOptions, + appTree + ); + }); + + it('should not create any of the feature modules', () => { + expect(appTree.exists(pdfInvoicesFeatureModulePath)).toBeFalsy(); + }); + + it('should install necessary Spartacus libraries', () => { + const packageJson = JSON.parse(appTree.readContent('package.json')); + let dependencies: Record = {}; + dependencies = { ...packageJson.dependencies }; + dependencies = { ...dependencies, ...packageJson.devDependencies }; + + for (const toAdd in peerDependencies) { + // skip the SPARTACUS_SCHEMATICS, as those are added only when running by the Angular CLI, and not in the testing environment + if ( + !peerDependencies.hasOwnProperty(toAdd) || + toAdd === SPARTACUS_SCHEMATICS + ) { + continue; + } + // TODO: after 4.0: use this test, as we'll have synced versions between lib's and root package.json + // const expectedVersion = (peerDependencies as Record< + // string, + // string + // >)[toAdd]; + const expectedDependency = dependencies[toAdd]; + expect(expectedDependency).toBeTruthy(); + } + }); + }); + + describe('PDF Invoices feature', () => { + describe('general setup', () => { + beforeEach(async () => { + appTree = await schematicRunner.runSchematic( + 'ng-add', + rddOptions, + appTree + ); + }); + + it('should add the feature using the lazy loading syntax', async () => { + const module = appTree.readContent(pdfInvoicesFeatureModulePath); + expect(module).toMatchSnapshot(); + }); + + describe('styling', () => { + it('should create a proper scss file', () => { + const scssContent = appTree.readContent(scssFilePath); + expect(scssContent).toMatchSnapshot(); + }); + + it('should update angular.json', async () => { + const content = appTree.readContent('/angular.json'); + expect(content).toMatchSnapshot(); + }); + }); + }); + + describe('eager loading', () => { + beforeEach(async () => { + appTree = await schematicRunner.runSchematic( + 'ng-add', + { ...rddOptions, lazy: false }, + appTree + ); + }); + + it('should import appropriate modules', async () => { + const module = appTree.readContent(pdfInvoicesFeatureModulePath); + expect(module).toMatchSnapshot(); + }); + }); + }); +}); diff --git a/feature-libs/pdf-invoices/schematics/add-pdf-invoices/schema.json b/feature-libs/pdf-invoices/schematics/add-pdf-invoices/schema.json new file mode 100644 index 00000000000..5940aa3c67f --- /dev/null +++ b/feature-libs/pdf-invoices/schematics/add-pdf-invoices/schema.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/schema", + "$id": "PDFInvoicesSchematics", + "title": "PDF Invoices Schematics", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "$default": { + "$source": "projectName" + } + }, + "debug": { + "description": "Display additional details during the running process.", + "type": "boolean", + "default": false + }, + "lazy": { + "type": "boolean", + "description": "Lazy load the PDF Invoices library.", + "default": true + }, + "features": { + "type": "array", + "uniqueItems": true, + "default": ["PDF-Invoices"] + } + }, + "required": [] +} diff --git a/feature-libs/pdf-invoices/schematics/collection.json b/feature-libs/pdf-invoices/schematics/collection.json new file mode 100644 index 00000000000..a77410d0e50 --- /dev/null +++ b/feature-libs/pdf-invoices/schematics/collection.json @@ -0,0 +1,18 @@ +{ + "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", + "schematics": { + "ng-add": { + "factory": "./add-pdf-invoices/index#addPDFInvoicesFeature", + "description": "Add PDF Invoices feature", + "schema": "./add-pdf-invoices/schema.json", + "private": true, + "hidden": true, + "aliases": ["install"] + }, + "add": { + "factory": "./add-pdf-invoices/index#addPDFInvoicesFeature", + "description": "Add and configure PDF Invoices feature", + "schema": "./add-pdf-invoices/schema.json" + } + } +} diff --git a/feature-libs/pdf-invoices/setup-jest.ts b/feature-libs/pdf-invoices/setup-jest.ts new file mode 100644 index 00000000000..919fe8743ac --- /dev/null +++ b/feature-libs/pdf-invoices/setup-jest.ts @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import 'jest-preset-angular/setup-jest'; +import 'zone.js'; diff --git a/feature-libs/pdf-invoices/styles/_index.scss b/feature-libs/pdf-invoices/styles/_index.scss new file mode 100644 index 00000000000..17c0aa6bccd --- /dev/null +++ b/feature-libs/pdf-invoices/styles/_index.scss @@ -0,0 +1 @@ +@import './pdf-invoices'; diff --git a/feature-libs/pdf-invoices/styles/_pdf-invoices.scss b/feature-libs/pdf-invoices/styles/_pdf-invoices.scss new file mode 100644 index 00000000000..2c572e9181e --- /dev/null +++ b/feature-libs/pdf-invoices/styles/_pdf-invoices.scss @@ -0,0 +1,237 @@ +cx-invoices-list { + .cx-invoices-list { + @include media-breakpoint-down(md) { + max-width: 100%; + padding: 0; + } + } + + .cx-invoices-list-table { + padding: 1.5rem 0 1.125rem 0; + margin-bottom: 0; + border-top: 1px solid var(--cx-color-light); + border-bottom: 1px solid var(--cx-color-light); + + th { + padding: 1.5rem 0 1.125rem 0; + text-align: start; + + &:last-child { + text-align: end; + } + } + + td { + padding: 1.625rem 0; + + @include media-breakpoint-up(md) { + text-align: start; + } + + @include media-breakpoint-down(md) { + width: 100%; + display: flex; + border-width: 0; + padding: 0 1.25rem; + + &:first-child { + padding-top: 1.25rem; + } + + &:last-child { + padding-bottom: 1.25rem; + } + } + } + } + + .cx-invoices-list-header { + padding: 40px 0 0 0; + color: var(--cx-color-text); + + @include media-breakpoint-down(md) { + padding-top: 40px; + padding-inline-end: 20px; + padding-bottom: 0; + padding-inline-start: 20px; + } + } + + .cx-invoices-list-thead-mobile { + @include media-breakpoint-down(md) { + display: none; + } + } + + .cx-invoices-list-code { + .cx-invoices-list-value { + text-decoration: none; + } + } + + .cx-invoices-list-externalSystem { + .cx-invoices-list-value { + text-decoration: none; + } + } + + .cx-invoices-list-attachment { + .cx-invoices-list-value { + text-decoration: underline; + text-align: end; + color: var(--cx-color-primary); + } + } + + .cx-invoices-list-date { + text-align: center; + + @include media-breakpoint-down(md) { + text-align: start; + } + } + + .cx-invoices-list-status { + text-align: center; + text-transform: capitalize; + + @include media-breakpoint-down(md) { + text-align: start; + } + + .status-open { + color: var(--cx-color-success); + } + + .status-closed { + color: var(--cx-color-secondary); + } + } + + .cx-invoices-list-monetary { + text-align: end; + + @include media-breakpoint-down(md) { + text-align: start; + } + } + + .cx-invoices-list-label { + color: var(--cx-color-secondary); + + @include media-breakpoint-up(lg) { + display: none; + } + + @include media-breakpoint-down(md) { + @include type('8'); + min-width: 200px; + min-height: 48px; + } + } + + .cx-invoices-list-value { + color: var(--cx-color-text); + + @include media-breakpoint-down(md) { + @include type('5'); + font-weight: $font-weight-normal; + } + } + + .cx-invoices-list-form-group { + padding: 0; + margin-bottom: 0; + align-items: center; + display: flex; + width: 40%; + + span { + margin-inline-end: 0.5rem; + flex: none; + } + + cx-sorting { + width: 100%; + } + + @include media-breakpoint-down(md) { + padding: 1.25rem; + width: 100%; + } + } + + .cx-invoices-list-sort { + &.top { + display: flex; + justify-content: space-between; + padding: 1rem 0; + margin: 0; + + @include media-breakpoint-down(md) { + flex-direction: column; + padding-top: 0; + } + } + + &.bottom { + display: flex; + justify-content: flex-end; + padding: 1rem 0 1rem 0; + margin: 0; + + @include media-breakpoint-down(sm) { + flex-direction: column; + } + } + } + + .cx-invoices-list-pagination { + @include media-breakpoint-down(md) { + margin: 0 auto; + } + } + + .cx-invoices-list-no-document { + display: flex; + flex-wrap: wrap; + @include type('5'); + font-weight: $font-weight-normal; + min-height: 415px; + padding-top: 2rem; + border-top: 1px solid var(--cx-color-light); + justify-content: center; + + @include media-breakpoint-down(sm) { + min-height: 474px; + padding-inline-start: 1.25rem; + padding-inline-end: 1.25rem; + } + } + + .cx-invoices-list-row { + &:nth-child(odd) { + @include media-breakpoint-down(md) { + background-color: var(--cx-color-background); + } + } + } + + .cx-invoices-list-attachment-btn { + color: var(--cx-color-primary); + background-color: inherit; + border: 0; + } + + .cx-invoices-list-attachment-icon { + font-size: 1.4rem; + } + + .cx-invoices-list-attachment-text { + font-weight: var(--cx-font-weight-bold); + padding-inline-start: 0.5rem; + @include media-breakpoint-up(lg) { + display: none; + } + } +} diff --git a/feature-libs/pdf-invoices/test.ts b/feature-libs/pdf-invoices/test.ts new file mode 100644 index 00000000000..bd3bae74074 --- /dev/null +++ b/feature-libs/pdf-invoices/test.ts @@ -0,0 +1,22 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting, +} from '@angular/platform-browser-dynamic/testing'; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting(), + { + teardown: { destroyAfterEach: false }, + } +); diff --git a/feature-libs/pdf-invoices/tsconfig.lib.json b/feature-libs/pdf-invoices/tsconfig.lib.json new file mode 100644 index 00000000000..e36a15b522e --- /dev/null +++ b/feature-libs/pdf-invoices/tsconfig.lib.json @@ -0,0 +1,33 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/lib", + "declarationMap": true, + "forceConsistentCasingInFileNames": true, + "target": "es2020", + "module": "es2020", + "moduleResolution": "node", + "declaration": true, + "sourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "importHelpers": true, + "types": [], + "lib": ["dom", "esnext"], + "strict": true, + "paths": { + "@spartacus/core": ["dist/core"], + "@spartacus/storefront": ["dist/storefrontlib"] + } + }, + "angularCompilerOptions": { + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true, + "enableResourceInlining": true, + "strictInputAccessModifiers": true + }, + "exclude": ["test.ts", "setup-jest.ts", "**/*.spec.ts"] +} diff --git a/feature-libs/pdf-invoices/tsconfig.lib.prod.json b/feature-libs/pdf-invoices/tsconfig.lib.prod.json new file mode 100644 index 00000000000..0d1bf3896fa --- /dev/null +++ b/feature-libs/pdf-invoices/tsconfig.lib.prod.json @@ -0,0 +1,11 @@ +/* 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/feature-libs/pdf-invoices/tsconfig.schematics.json b/feature-libs/pdf-invoices/tsconfig.schematics.json new file mode 100644 index 00000000000..125e28e522d --- /dev/null +++ b/feature-libs/pdf-invoices/tsconfig.schematics.json @@ -0,0 +1,557 @@ +{ + "compilerOptions": { + "baseUrl": "./", + "module": "CommonJs", + "types": ["jest"], + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitThis": true, + "noUnusedParameters": true, + "noUnusedLocals": true, + "skipDefaultLibCheck": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "strictNullChecks": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "paths": { + "@spartacus/schematics": ["../../projects/schematics/index"], + "@spartacus/setup": ["../../core-libs/setup/public_api"], + "@spartacus/setup/ssr": ["../../core-libs/setup/ssr/public_api"], + "@spartacus/asm/assets": ["../../feature-libs/asm/assets/public_api"], + "@spartacus/asm/components": [ + "../../feature-libs/asm/components/public_api" + ], + "@spartacus/asm/core": ["../../feature-libs/asm/core/public_api"], + "@spartacus/asm": ["../../feature-libs/asm/public_api"], + "@spartacus/asm/occ": ["../../feature-libs/asm/occ/public_api"], + "@spartacus/asm/root": ["../../feature-libs/asm/root/public_api"], + "@spartacus/cart/base/assets": [ + "../../feature-libs/cart/base/assets/public_api" + ], + "@spartacus/cart/base/components/add-to-cart": [ + "../../feature-libs/cart/base/components/add-to-cart/public_api" + ], + "@spartacus/cart/base/components/mini-cart": [ + "../../feature-libs/cart/base/components/mini-cart/public_api" + ], + "@spartacus/cart/base/components": [ + "../../feature-libs/cart/base/components/public_api" + ], + "@spartacus/cart/base/core": [ + "../../feature-libs/cart/base/core/public_api" + ], + "@spartacus/cart/base": ["../../feature-libs/cart/base/public_api"], + "@spartacus/cart/base/occ": [ + "../../feature-libs/cart/base/occ/public_api" + ], + "@spartacus/cart/base/root": [ + "../../feature-libs/cart/base/root/public_api" + ], + "@spartacus/cart/import-export/assets": [ + "../../feature-libs/cart/import-export/assets/public_api" + ], + "@spartacus/cart/import-export/components": [ + "../../feature-libs/cart/import-export/components/public_api" + ], + "@spartacus/cart/import-export/core": [ + "../../feature-libs/cart/import-export/core/public_api" + ], + "@spartacus/cart/import-export": [ + "../../feature-libs/cart/import-export/public_api" + ], + "@spartacus/cart/import-export/root": [ + "../../feature-libs/cart/import-export/root/public_api" + ], + "@spartacus/cart": ["../../feature-libs/cart/public_api"], + "@spartacus/cart/quick-order/assets": [ + "../../feature-libs/cart/quick-order/assets/public_api" + ], + "@spartacus/cart/quick-order/components": [ + "../../feature-libs/cart/quick-order/components/public_api" + ], + "@spartacus/cart/quick-order/core": [ + "../../feature-libs/cart/quick-order/core/public_api" + ], + "@spartacus/cart/quick-order": [ + "../../feature-libs/cart/quick-order/public_api" + ], + "@spartacus/cart/quick-order/root": [ + "../../feature-libs/cart/quick-order/root/public_api" + ], + "@spartacus/cart/saved-cart/assets": [ + "../../feature-libs/cart/saved-cart/assets/public_api" + ], + "@spartacus/cart/saved-cart/components": [ + "../../feature-libs/cart/saved-cart/components/public_api" + ], + "@spartacus/cart/saved-cart/core": [ + "../../feature-libs/cart/saved-cart/core/public_api" + ], + "@spartacus/cart/saved-cart": [ + "../../feature-libs/cart/saved-cart/public_api" + ], + "@spartacus/cart/saved-cart/occ": [ + "../../feature-libs/cart/saved-cart/occ/public_api" + ], + "@spartacus/cart/saved-cart/root": [ + "../../feature-libs/cart/saved-cart/root/public_api" + ], + "@spartacus/cart/wish-list/assets": [ + "../../feature-libs/cart/wish-list/assets/public_api" + ], + "@spartacus/cart/wish-list/components/add-to-wishlist": [ + "../../feature-libs/cart/wish-list/components/add-to-wishlist/public_api" + ], + "@spartacus/cart/wish-list/components": [ + "../../feature-libs/cart/wish-list/components/public_api" + ], + "@spartacus/cart/wish-list/core": [ + "../../feature-libs/cart/wish-list/core/public_api" + ], + "@spartacus/cart/wish-list": [ + "../../feature-libs/cart/wish-list/public_api" + ], + "@spartacus/cart/wish-list/root": [ + "../../feature-libs/cart/wish-list/root/public_api" + ], + "@spartacus/checkout/b2b/assets": [ + "../../feature-libs/checkout/b2b/assets/public_api" + ], + "@spartacus/checkout/b2b/components": [ + "../../feature-libs/checkout/b2b/components/public_api" + ], + "@spartacus/checkout/b2b/core": [ + "../../feature-libs/checkout/b2b/core/public_api" + ], + "@spartacus/checkout/b2b": ["../../feature-libs/checkout/b2b/public_api"], + "@spartacus/checkout/b2b/occ": [ + "../../feature-libs/checkout/b2b/occ/public_api" + ], + "@spartacus/checkout/b2b/root": [ + "../../feature-libs/checkout/b2b/root/public_api" + ], + "@spartacus/checkout/base/assets": [ + "../../feature-libs/checkout/base/assets/public_api" + ], + "@spartacus/checkout/base/components": [ + "../../feature-libs/checkout/base/components/public_api" + ], + "@spartacus/checkout/base/core": [ + "../../feature-libs/checkout/base/core/public_api" + ], + "@spartacus/checkout/base": [ + "../../feature-libs/checkout/base/public_api" + ], + "@spartacus/checkout/base/occ": [ + "../../feature-libs/checkout/base/occ/public_api" + ], + "@spartacus/checkout/base/root": [ + "../../feature-libs/checkout/base/root/public_api" + ], + "@spartacus/checkout": ["../../feature-libs/checkout/public_api"], + "@spartacus/checkout/scheduled-replenishment/assets": [ + "../../feature-libs/checkout/scheduled-replenishment/assets/public_api" + ], + "@spartacus/checkout/scheduled-replenishment/components": [ + "../../feature-libs/checkout/scheduled-replenishment/components/public_api" + ], + "@spartacus/checkout/scheduled-replenishment": [ + "../../feature-libs/checkout/scheduled-replenishment/public_api" + ], + "@spartacus/checkout/scheduled-replenishment/root": [ + "../../feature-libs/checkout/scheduled-replenishment/root/public_api" + ], + "@spartacus/customer-ticketing/assets": [ + "../../feature-libs/customer-ticketing/assets/public_api" + ], + "@spartacus/customer-ticketing/components": [ + "../../feature-libs/customer-ticketing/components/public_api" + ], + "@spartacus/customer-ticketing/core": [ + "../../feature-libs/customer-ticketing/core/public_api" + ], + "@spartacus/customer-ticketing": [ + "../../feature-libs/customer-ticketing/public_api" + ], + "@spartacus/customer-ticketing/occ": [ + "../../feature-libs/customer-ticketing/occ/public_api" + ], + "@spartacus/customer-ticketing/root": [ + "../../feature-libs/customer-ticketing/root/public_api" + ], + "@spartacus/order/assets": ["../../feature-libs/order/assets/public_api"], + "@spartacus/order/components": [ + "../../feature-libs/order/components/public_api" + ], + "@spartacus/order/core": ["../../feature-libs/order/core/public_api"], + "@spartacus/order": ["../../feature-libs/order/public_api"], + "@spartacus/order/occ": ["../../feature-libs/order/occ/public_api"], + "@spartacus/order/root": ["../../feature-libs/order/root/public_api"], + "@spartacus/organization/account-summary/assets": [ + "../../feature-libs/organization/account-summary/assets/public_api" + ], + "@spartacus/organization/account-summary/components": [ + "../../feature-libs/organization/account-summary/components/public_api" + ], + "@spartacus/organization/account-summary/core": [ + "../../feature-libs/organization/account-summary/core/public_api" + ], + "@spartacus/organization/account-summary": [ + "../../feature-libs/organization/account-summary/public_api" + ], + "@spartacus/organization/account-summary/occ": [ + "../../feature-libs/organization/account-summary/occ/public_api" + ], + "@spartacus/organization/account-summary/root": [ + "../../feature-libs/organization/account-summary/root/public_api" + ], + "@spartacus/organization/administration/assets": [ + "../../feature-libs/organization/administration/assets/public_api" + ], + "@spartacus/organization/administration/components": [ + "../../feature-libs/organization/administration/components/public_api" + ], + "@spartacus/organization/administration/core": [ + "../../feature-libs/organization/administration/core/public_api" + ], + "@spartacus/organization/administration": [ + "../../feature-libs/organization/administration/public_api" + ], + "@spartacus/organization/administration/occ": [ + "../../feature-libs/organization/administration/occ/public_api" + ], + "@spartacus/organization/administration/root": [ + "../../feature-libs/organization/administration/root/public_api" + ], + "@spartacus/organization": ["../../feature-libs/organization/public_api"], + "@spartacus/organization/order-approval/assets": [ + "../../feature-libs/organization/order-approval/assets/public_api" + ], + "@spartacus/organization/order-approval": [ + "../../feature-libs/organization/order-approval/public_api" + ], + "@spartacus/organization/order-approval/root": [ + "../../feature-libs/organization/order-approval/root/public_api" + ], + "@spartacus/organization/unit-order/assets": [ + "../../feature-libs/organization/unit-order/assets/public_api" + ], + "@spartacus/organization/unit-order/components": [ + "../../feature-libs/organization/unit-order/components/public_api" + ], + "@spartacus/organization/unit-order/core": [ + "../../feature-libs/organization/unit-order/core/public_api" + ], + "@spartacus/organization/unit-order": [ + "../../feature-libs/organization/unit-order/public_api" + ], + "@spartacus/organization/unit-order/occ": [ + "../../feature-libs/organization/unit-order/occ/public_api" + ], + "@spartacus/organization/unit-order/root": [ + "../../feature-libs/organization/unit-order/root/public_api" + ], + "@spartacus/organization/user-registration/assets": [ + "../../feature-libs/organization/user-registration/assets/public_api" + ], + "@spartacus/organization/user-registration/components": [ + "../../feature-libs/organization/user-registration/components/public_api" + ], + "@spartacus/organization/user-registration/core": [ + "../../feature-libs/organization/user-registration/core/public_api" + ], + "@spartacus/organization/user-registration": [ + "../../feature-libs/organization/user-registration/public_api" + ], + "@spartacus/organization/user-registration/occ": [ + "../../feature-libs/organization/user-registration/occ/public_api" + ], + "@spartacus/organization/user-registration/root": [ + "../../feature-libs/organization/user-registration/root/public_api" + ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], + "@spartacus/pickup-in-store/assets": [ + "../../feature-libs/pickup-in-store/assets/public_api" + ], + "@spartacus/pickup-in-store/components": [ + "../../feature-libs/pickup-in-store/components/public_api" + ], + "@spartacus/pickup-in-store/core": [ + "../../feature-libs/pickup-in-store/core/public_api" + ], + "@spartacus/pickup-in-store": [ + "../../feature-libs/pickup-in-store/public_api" + ], + "@spartacus/pickup-in-store/occ": [ + "../../feature-libs/pickup-in-store/occ/public_api" + ], + "@spartacus/pickup-in-store/root": [ + "../../feature-libs/pickup-in-store/root/public_api" + ], + "@spartacus/product-configurator/common/assets": [ + "../../feature-libs/product-configurator/common/assets/public_api" + ], + "@spartacus/product-configurator/common": [ + "../../feature-libs/product-configurator/common/public_api" + ], + "@spartacus/product-configurator": [ + "../../feature-libs/product-configurator/public_api" + ], + "@spartacus/product-configurator/rulebased/cpq": [ + "../../feature-libs/product-configurator/rulebased/cpq/public_api" + ], + "@spartacus/product-configurator/rulebased": [ + "../../feature-libs/product-configurator/rulebased/public_api" + ], + "@spartacus/product-configurator/rulebased/root": [ + "../../feature-libs/product-configurator/rulebased/root/public_api" + ], + "@spartacus/product-configurator/textfield": [ + "../../feature-libs/product-configurator/textfield/public_api" + ], + "@spartacus/product-configurator/textfield/root": [ + "../../feature-libs/product-configurator/textfield/root/public_api" + ], + "@spartacus/product/bulk-pricing/assets": [ + "../../feature-libs/product/bulk-pricing/assets/public_api" + ], + "@spartacus/product/bulk-pricing/components": [ + "../../feature-libs/product/bulk-pricing/components/public_api" + ], + "@spartacus/product/bulk-pricing/core": [ + "../../feature-libs/product/bulk-pricing/core/public_api" + ], + "@spartacus/product/bulk-pricing": [ + "../../feature-libs/product/bulk-pricing/public_api" + ], + "@spartacus/product/bulk-pricing/occ": [ + "../../feature-libs/product/bulk-pricing/occ/public_api" + ], + "@spartacus/product/bulk-pricing/root": [ + "../../feature-libs/product/bulk-pricing/root/public_api" + ], + "@spartacus/product/future-stock/assets": [ + "../../feature-libs/product/future-stock/assets/public_api" + ], + "@spartacus/product/future-stock/components": [ + "../../feature-libs/product/future-stock/components/public_api" + ], + "@spartacus/product/future-stock/core": [ + "../../feature-libs/product/future-stock/core/public_api" + ], + "@spartacus/product/future-stock": [ + "../../feature-libs/product/future-stock/public_api" + ], + "@spartacus/product/future-stock/occ": [ + "../../feature-libs/product/future-stock/occ/public_api" + ], + "@spartacus/product/future-stock/root": [ + "../../feature-libs/product/future-stock/root/public_api" + ], + "@spartacus/product/image-zoom/assets": [ + "../../feature-libs/product/image-zoom/assets/public_api" + ], + "@spartacus/product/image-zoom/components": [ + "../../feature-libs/product/image-zoom/components/public_api" + ], + "@spartacus/product/image-zoom": [ + "../../feature-libs/product/image-zoom/public_api" + ], + "@spartacus/product/image-zoom/root": [ + "../../feature-libs/product/image-zoom/root/public_api" + ], + "@spartacus/product": ["../../feature-libs/product/public_api"], + "@spartacus/product/variants/assets": [ + "../../feature-libs/product/variants/assets/public_api" + ], + "@spartacus/product/variants/components": [ + "../../feature-libs/product/variants/components/public_api" + ], + "@spartacus/product/variants": [ + "../../feature-libs/product/variants/public_api" + ], + "@spartacus/product/variants/occ": [ + "../../feature-libs/product/variants/occ/public_api" + ], + "@spartacus/product/variants/root": [ + "../../feature-libs/product/variants/root/public_api" + ], + "@spartacus/qualtrics/components": [ + "../../feature-libs/qualtrics/components/public_api" + ], + "@spartacus/qualtrics": ["../../feature-libs/qualtrics/public_api"], + "@spartacus/qualtrics/root": [ + "../../feature-libs/qualtrics/root/public_api" + ], + "@spartacus/requested-delivery-date/assets": [ + "../../feature-libs/requested-delivery-date/assets/public_api" + ], + "@spartacus/requested-delivery-date/core": [ + "../../feature-libs/requested-delivery-date/core/public_api" + ], + "@spartacus/requested-delivery-date": [ + "../../feature-libs/requested-delivery-date/public_api" + ], + "@spartacus/requested-delivery-date/occ": [ + "../../feature-libs/requested-delivery-date/occ/public_api" + ], + "@spartacus/requested-delivery-date/root": [ + "../../feature-libs/requested-delivery-date/root/public_api" + ], + "@spartacus/smartedit/core": [ + "../../feature-libs/smartedit/core/public_api" + ], + "@spartacus/smartedit": ["../../feature-libs/smartedit/public_api"], + "@spartacus/smartedit/root": [ + "../../feature-libs/smartedit/root/public_api" + ], + "@spartacus/storefinder/assets": [ + "../../feature-libs/storefinder/assets/public_api" + ], + "@spartacus/storefinder/components": [ + "../../feature-libs/storefinder/components/public_api" + ], + "@spartacus/storefinder/core": [ + "../../feature-libs/storefinder/core/public_api" + ], + "@spartacus/storefinder": ["../../feature-libs/storefinder/public_api"], + "@spartacus/storefinder/occ": [ + "../../feature-libs/storefinder/occ/public_api" + ], + "@spartacus/storefinder/root": [ + "../../feature-libs/storefinder/root/public_api" + ], + "@spartacus/tracking": ["../../feature-libs/tracking/public_api"], + "@spartacus/tracking/personalization/core": [ + "../../feature-libs/tracking/personalization/core/public_api" + ], + "@spartacus/tracking/personalization": [ + "../../feature-libs/tracking/personalization/public_api" + ], + "@spartacus/tracking/personalization/root": [ + "../../feature-libs/tracking/personalization/root/public_api" + ], + "@spartacus/tracking/tms/aep": [ + "../../feature-libs/tracking/tms/aep/public_api" + ], + "@spartacus/tracking/tms/core": [ + "../../feature-libs/tracking/tms/core/public_api" + ], + "@spartacus/tracking/tms/gtm": [ + "../../feature-libs/tracking/tms/gtm/public_api" + ], + "@spartacus/tracking/tms": ["../../feature-libs/tracking/tms/public_api"], + "@spartacus/user/account/assets": [ + "../../feature-libs/user/account/assets/public_api" + ], + "@spartacus/user/account/components": [ + "../../feature-libs/user/account/components/public_api" + ], + "@spartacus/user/account/core": [ + "../../feature-libs/user/account/core/public_api" + ], + "@spartacus/user/account": ["../../feature-libs/user/account/public_api"], + "@spartacus/user/account/occ": [ + "../../feature-libs/user/account/occ/public_api" + ], + "@spartacus/user/account/root": [ + "../../feature-libs/user/account/root/public_api" + ], + "@spartacus/user": ["../../feature-libs/user/public_api"], + "@spartacus/user/profile/assets": [ + "../../feature-libs/user/profile/assets/public_api" + ], + "@spartacus/user/profile/components": [ + "../../feature-libs/user/profile/components/public_api" + ], + "@spartacus/user/profile/core": [ + "../../feature-libs/user/profile/core/public_api" + ], + "@spartacus/user/profile": ["../../feature-libs/user/profile/public_api"], + "@spartacus/user/profile/occ": [ + "../../feature-libs/user/profile/occ/public_api" + ], + "@spartacus/user/profile/root": [ + "../../feature-libs/user/profile/root/public_api" + ], + "@spartacus/cdc/assets": ["../../integration-libs/cdc/assets/public_api"], + "@spartacus/cdc/components": [ + "../../integration-libs/cdc/components/public_api" + ], + "@spartacus/cdc/core": ["../../integration-libs/cdc/core/public_api"], + "@spartacus/cdc": ["../../integration-libs/cdc/public_api"], + "@spartacus/cdc/organization/administration": [ + "../../integration-libs/cdc/organization/administration/public_api" + ], + "@spartacus/cdc/organization/user-registration": [ + "../../integration-libs/cdc/organization/user-registration/public_api" + ], + "@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"], + "@spartacus/cdc/user-account": [ + "../../integration-libs/cdc/user-account/public_api" + ], + "@spartacus/cdc/user-profile": [ + "../../integration-libs/cdc/user-profile/public_api" + ], + "@spartacus/cds": ["../../integration-libs/cds/public_api"], + "@spartacus/digital-payments/assets": [ + "../../integration-libs/digital-payments/assets/public_api" + ], + "@spartacus/digital-payments": [ + "../../integration-libs/digital-payments/public_api" + ], + "@spartacus/epd-visualization/assets": [ + "../../integration-libs/epd-visualization/assets/public_api" + ], + "@spartacus/epd-visualization/components": [ + "../../integration-libs/epd-visualization/components/public_api" + ], + "@spartacus/epd-visualization/core": [ + "../../integration-libs/epd-visualization/core/public_api" + ], + "@spartacus/epd-visualization/epd-visualization-api": [ + "../../integration-libs/epd-visualization/epd-visualization-api/public_api" + ], + "@spartacus/epd-visualization": [ + "../../integration-libs/epd-visualization/public_api" + ], + "@spartacus/epd-visualization/root": [ + "../../integration-libs/epd-visualization/root/public_api" + ], + "@spartacus/s4om/assets": [ + "../../integration-libs/s4om/assets/public_api" + ], + "@spartacus/s4om": ["../../integration-libs/s4om/public_api"], + "@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"], + "@spartacus/segment-refs": [ + "../../integration-libs/segment-refs/public_api" + ], + "@spartacus/segment-refs/root": [ + "../../integration-libs/segment-refs/root/public_api" + ], + "@spartacus/assets": ["../../projects/assets/src/public_api"], + "@spartacus/core": ["../../projects/core/public_api"], + "@spartacus/storefront": ["../../projects/storefrontlib/public_api"] + } + }, + "include": ["schematics/**/*.ts"], + "exclude": ["schematics/*/files/**/*", "schematics/**/*_spec.ts"] +} diff --git a/feature-libs/pdf-invoices/tsconfig.spec.json b/feature-libs/pdf-invoices/tsconfig.spec.json new file mode 100644 index 00000000000..9f660f8b0a1 --- /dev/null +++ b/feature-libs/pdf-invoices/tsconfig.spec.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/spec", + "strict": false, + "module": "es2020", + "types": ["jasmine", "node"], + "skipLibCheck": true, + "resolveJsonModule": true, + "esModuleInterop": true + }, + "files": ["test.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] +} diff --git a/feature-libs/pickup-in-store/karma.conf.js b/feature-libs/pickup-in-store/karma.conf.js index 2e5b72c7df4..5154d9516d0 100644 --- a/feature-libs/pickup-in-store/karma.conf.js +++ b/feature-libs/pickup-in-store/karma.conf.js @@ -37,6 +37,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/pickup-in-store/package.json b/feature-libs/pickup-in-store/package.json index 1ffe58a0192..6b5a478bb78 100644 --- a/feature-libs/pickup-in-store/package.json +++ b/feature-libs/pickup-in-store/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/pickup-in-store", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "", "keywords": [ "spartacus", @@ -22,24 +22,24 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefinder": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefinder": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, diff --git a/feature-libs/pickup-in-store/tsconfig.schematics.json b/feature-libs/pickup-in-store/tsconfig.schematics.json index a0cac3dd00d..e932a440398 100644 --- a/feature-libs/pickup-in-store/tsconfig.schematics.json +++ b/feature-libs/pickup-in-store/tsconfig.schematics.json @@ -275,6 +275,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/product-configurator/karma.conf.js b/feature-libs/product-configurator/karma.conf.js index f7ea355dfaf..d57a13f41d8 100644 --- a/feature-libs/product-configurator/karma.conf.js +++ b/feature-libs/product-configurator/karma.conf.js @@ -45,6 +45,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/product-configurator/package.json b/feature-libs/product-configurator/package.json index c92560dfcd8..1a2bac6a4d3 100644 --- a/feature-libs/product-configurator/package.json +++ b/feature-libs/product-configurator/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/product-configurator", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Product configurator feature library for Spartacus", "keywords": [ "spartacus", @@ -22,24 +22,24 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/checkout": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/checkout": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap b/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap index 19148ba7c82..f51dc2e0a31 100644 --- a/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap +++ b/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap @@ -58,7 +58,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) @@ -303,7 +303,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) @@ -534,7 +534,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } })] }) diff --git a/feature-libs/product-configurator/tsconfig.schematics.json b/feature-libs/product-configurator/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/product-configurator/tsconfig.schematics.json +++ b/feature-libs/product-configurator/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/product/karma.conf.js b/feature-libs/product/karma.conf.js index cf500675a9c..58cabf6bcb4 100644 --- a/feature-libs/product/karma.conf.js +++ b/feature-libs/product/karma.conf.js @@ -34,6 +34,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/product/package.json b/feature-libs/product/package.json index d05fcea3c57..f8f5b17f7cf 100644 --- a/feature-libs/product/package.json +++ b/feature-libs/product/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/product", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Product library for Spartacus", "keywords": [ "spartacus", @@ -22,17 +22,17 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/router": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/router": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, diff --git a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap index c64f861dfdd..1f089ce53e0 100644 --- a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap +++ b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap @@ -51,7 +51,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) @@ -266,7 +266,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu }, }), provideConfig({ features: { - level: '6.3' + level: '6.5' } }), provideConfig(defaultB2bOccConfig)] }) diff --git a/feature-libs/product/tsconfig.schematics.json b/feature-libs/product/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/product/tsconfig.schematics.json +++ b/feature-libs/product/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/qualtrics/karma.conf.js b/feature-libs/qualtrics/karma.conf.js index cf4314b55b0..ad54b8d4f69 100644 --- a/feature-libs/qualtrics/karma.conf.js +++ b/feature-libs/qualtrics/karma.conf.js @@ -34,6 +34,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/qualtrics/package.json b/feature-libs/qualtrics/package.json index d957fc0a4fa..dcce0fbc96e 100644 --- a/feature-libs/qualtrics/package.json +++ b/feature-libs/qualtrics/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/qualtrics", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Qualtrics library for Spartacus", "keywords": [ "spartacus", @@ -24,15 +24,15 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, diff --git a/feature-libs/qualtrics/tsconfig.schematics.json b/feature-libs/qualtrics/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/qualtrics/tsconfig.schematics.json +++ b/feature-libs/qualtrics/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/requested-delivery-date/karma.conf.js b/feature-libs/requested-delivery-date/karma.conf.js index e451c881c40..a143424cf73 100644 --- a/feature-libs/requested-delivery-date/karma.conf.js +++ b/feature-libs/requested-delivery-date/karma.conf.js @@ -39,6 +39,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/requested-delivery-date/package.json b/feature-libs/requested-delivery-date/package.json index cbeacc85e4a..48bc5689330 100644 --- a/feature-libs/requested-delivery-date/package.json +++ b/feature-libs/requested-delivery-date/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/requested-delivery-date", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Requested Delivery Date library for Spartacus", "keywords": [ "spartacus", @@ -22,20 +22,20 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@spartacus/cart": "6.3.0-1", - "@spartacus/checkout": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@spartacus/cart": "6.5.0-1", + "@spartacus/checkout": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.spec.ts b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.spec.ts index 2341afccc78..0fdab67fe5c 100644 --- a/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.spec.ts +++ b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.spec.ts @@ -229,6 +229,77 @@ describe('DeliveryModeDatePickerComponent', () => { }); }); + it('should NOT call setRequestedDeliveryDate when a date less than earliestRetrievalAt is provided', () => { + spyOn(component, 'setRequestedDeliveryDate'); + + component['requestedDelDateFacade'].setRequestedDeliveryDate = jasmine + .createSpy('setRequestedDeliveryDate') + .and.returnValue(of({})); + + const requestedRetrievalAt = '2023-05-03'; + const earliestRetrievalAt = '2023-09-15'; + const data = TestBed.inject(OutletContextData); + data.context$ = of({ + item: { + requestedRetrievalAt, + earliestRetrievalAt, + code: '123', + user: { + uid: 'current', + }, + }, + readonly: false, + }); + + component.ngOnInit(); + fixture.detectChanges(); + const newRequestedRetrievalAt = '2023-01-01'; + component['form'].patchValue({ + requestDeliveryDate: newRequestedRetrievalAt, + }); + + //Manually trigger change event for date picker. + const event = new Event('update'); + const datePickerEl: HTMLInputElement = fixture.debugElement.query( + By.css('cx-date-picker') + )?.nativeElement; + datePickerEl.dispatchEvent(event); + + expect(component['setRequestedDeliveryDate']).toHaveBeenCalled(); + expect( + component['requestedDelDateFacade'].setRequestedDeliveryDate + ).not.toHaveBeenCalled(); + }); + + it('should NOT show the date picker when the component outlet value is read only', () => { + spyOn(component, 'setRequestedDeliveryDate'); + const requestedRetrievalAt = '2023-05-03'; + const earliestRetrievalAt = '2023-09-15'; + const data = TestBed.inject(OutletContextData); + data.context$ = of({ + item: { + requestedRetrievalAt, + earliestRetrievalAt, + code: '123', + user: { + uid: 'current', + }, + }, + readonly: true, + }); + + component.ngOnInit(); + fixture.detectChanges(); + const datePickerEl: HTMLInputElement = fixture.debugElement.query( + By.css('cx-date-picker') + )?.nativeElement; + expect(datePickerEl).toBeUndefined(); + const datePickerReadOnlyEl: HTMLInputElement = fixture.debugElement.query( + By.css('cx-card') + )?.nativeElement; + expect(datePickerReadOnlyEl.innerHTML).not.toBeNull(); + }); + it('should show error message when backend OCC API returns UnknownResourceError', (done) => { spyOn(component['globalMessageService'], 'add'); diff --git a/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.ts b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.ts index 5911eedb6fa..853008fd95f 100644 --- a/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.ts +++ b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.ts @@ -67,6 +67,9 @@ export class DeliveryModeDatePickerComponent implements OnInit, OnDestroy { } else { //set the value of requestedRetrievalAt as earliestRetrievalAt and update occ. this.requestedRetrievalAt = this.earliestRetrievalAt; + this.form.patchValue({ + requestDeliveryDate: this.requestedRetrievalAt, + }); this.setRequestedDeliveryDate(); } this.form.patchValue({ @@ -104,15 +107,17 @@ export class DeliveryModeDatePickerComponent implements OnInit, OnDestroy { setRequestedDeliveryDate() { const userId = this.cartEntry?.user?.uid || ''; const cartId = this.cartEntry?.code || ''; - const requestedDate = - this.form?.get('requestDeliveryDate')?.value || - this.requestedRetrievalAt || - ''; + const requestedDate = this.form?.get('requestDeliveryDate')?.value || ''; if ( userId.length === 0 || cartId.length === 0 || - requestedDate.length === 0 + requestedDate.length === 0 || + !this.dateValidationService.isDateStringValid(requestedDate) || + !this.dateValidationService.isDateGreaterOrEqual( + requestedDate, + this.earliestRetrievalAt || '' + ) ) { return; } diff --git a/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.spec.ts b/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.spec.ts index 5e947fcaca0..f23ff8db9e9 100644 --- a/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.spec.ts +++ b/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.spec.ts @@ -6,6 +6,8 @@ const mockInvalidDate1 = '32-09-2023'; const mockInvalidDate2 = '29-02-rddo'; const mockInvalidDate3 = ''; const mockInvalidDate4 = 'abcd'; +const mockValidGreaterDate = '31-12-2023'; +const mockValidLesserDate = '01-01-2023'; describe('DateValidationService', () => { let service: DateValidationService; @@ -22,14 +24,40 @@ describe('DateValidationService', () => { expect(service).toBeTruthy(); }); - it('should validate correct Dates', () => { - expect(service.isDateStringValid(mockValidDate)).toBeTruthy(); + describe('isDateStringValid', () => { + it('should validate correct Dates', () => { + expect(service.isDateStringValid(mockValidDate)).toBeTruthy(); + }); + + it('should invalidate wrong Dates', () => { + expect(service.isDateStringValid(mockInvalidDate1)).toBeFalsy(); + expect(service.isDateStringValid(mockInvalidDate2)).toBeFalsy(); + expect(service.isDateStringValid(mockInvalidDate3)).toBeFalsy(); + expect(service.isDateStringValid(mockInvalidDate4)).toBeFalsy(); + }); }); - it('should invalidate wrong Dates', () => { - expect(service.isDateStringValid(mockInvalidDate1)).toBeFalsy(); - expect(service.isDateStringValid(mockInvalidDate2)).toBeFalsy(); - expect(service.isDateStringValid(mockInvalidDate3)).toBeFalsy(); - expect(service.isDateStringValid(mockInvalidDate4)).toBeFalsy(); + describe('isDateGreaterOrEqual', () => { + it('should return false for invalid dates', () => { + expect(service.isDateGreaterOrEqual(mockValidDate, '')).toBeFalsy(); + }); + + it('should return false when source date is less than target', () => { + expect( + service.isDateGreaterOrEqual(mockValidLesserDate, mockValidDate) + ).toBeFalsy(); + }); + + it('should return true for equal dates', () => { + expect( + service.isDateGreaterOrEqual(mockValidDate, mockValidDate) + ).toBeTruthy(); + }); + + it('should return true when source date is greater than target', () => { + expect( + service.isDateGreaterOrEqual(mockValidGreaterDate, mockValidDate) + ).toBeTruthy(); + }); }); }); diff --git a/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.ts b/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.ts index 2410013bd29..e6b9bd681cf 100644 --- a/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.ts +++ b/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.ts @@ -21,8 +21,32 @@ export class DateValidationService { value !== undefined && value.length > 0 && !isNaN( - new Date(value.replace(/(\d{2})-(\d{2})-(\d{4})/, '$2/$1/$3')).getDate() //convert 'dd-mm-yyyy' into 'mm/dd/yyyy' + this.getDateFromDateString(value).getDate() //convert 'dd-mm-yyyy' into 'mm/dd/yyyy' ) ); } + + /** + * Returns a Date object from a date string in the format 'dd-mm-yyy' + * @param value Date string in the format 'dd-mm-yyy' + */ + getDateFromDateString(value: string): Date { + return new Date(value.replace(/(\d{2})-(\d{2})-(\d{4})/, '$2/$1/$3')); + } + + /** + * Checks if the source date is greater than or equal to the target + * @param source Date string in the format 'dd-mm-yyy' + * @param target Date string in the format 'dd-mm-yyy' + * @returns true if `source` date is greater than or equal to `target` date + */ + isDateGreaterOrEqual(source: string, target: string): boolean { + if (source.length === 0 || target.length === 0) { + return false; + } + const d1 = this.getDateFromDateString(source); + const d2 = this.getDateFromDateString(target); + + return d1 < d2 ? false : true; + } } diff --git a/feature-libs/requested-delivery-date/tsconfig.lib.json b/feature-libs/requested-delivery-date/tsconfig.lib.json index 78d0becdbd7..6aa05ab39be 100644 --- a/feature-libs/requested-delivery-date/tsconfig.lib.json +++ b/feature-libs/requested-delivery-date/tsconfig.lib.json @@ -64,7 +64,6 @@ "@spartacus/cart/wish-list/core": ["dist/cart/wish-list/core"], "@spartacus/cart/wish-list": ["dist/cart/wish-list"], "@spartacus/cart/wish-list/root": ["dist/cart/wish-list/root"], - "@spartacus/core": ["dist/core"], "@spartacus/checkout/b2b/assets": ["dist/checkout/b2b/assets"], "@spartacus/checkout/b2b/components": ["dist/checkout/b2b/components"], "@spartacus/checkout/b2b/core": ["dist/checkout/b2b/core"], @@ -90,6 +89,7 @@ "@spartacus/checkout/scheduled-replenishment/root": [ "dist/checkout/scheduled-replenishment/root" ], + "@spartacus/core": ["dist/core"], "@spartacus/order/assets": ["dist/order/assets"], "@spartacus/order/components": ["dist/order/components"], "@spartacus/order/core": ["dist/order/core"], diff --git a/feature-libs/requested-delivery-date/tsconfig.schematics.json b/feature-libs/requested-delivery-date/tsconfig.schematics.json index 6d31baba9ea..37183ad50a5 100644 --- a/feature-libs/requested-delivery-date/tsconfig.schematics.json +++ b/feature-libs/requested-delivery-date/tsconfig.schematics.json @@ -272,6 +272,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/smartedit/assets/webApplicationInjector.js b/feature-libs/smartedit/assets/webApplicationInjector.js index 0e03ead7e02..8d6dcebe2d8 100644 --- a/feature-libs/smartedit/assets/webApplicationInjector.js +++ b/feature-libs/smartedit/assets/webApplicationInjector.js @@ -1,2 +1,3 @@ -/*! For license information please see webApplicationInjector.js.LICENSE.txt */ -(()=>{var t={874:(t,e,n)=>{var r,a,o;o=function(){var t,e,n=document,r=n.getElementsByTagName("head")[0],a=!1,o="push",i="readyState",s="onreadystatechange",c={},l={},d={},u={};function p(t,e){for(var n=0,r=t.length;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Heartbeat=void 0;class n{static startSendingHeartBeatToIframe(t){const e=n.getHeartBeatInterval(t);setInterval((()=>{parent.postMessage({pk:Math.random(),gatewayId:"heartBeatGateway",eventId:"heartBeat",data:{location:document.location.href}},"*")}),e)}static getHeartBeatInterval(t){return parseInt(t.getAttribute("data-smartedit-heart-beat-interval")||n.DEFAULT_HEARTBEAT_INTERVAL,10)}}e.Heartbeat=n,n.DEFAULT_HEARTBEAT_INTERVAL="500"},167:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(874);class a{static getWebappScriptElementFromDocument(t){if(t.currentScript){if(!(t.currentScript instanceof HTMLScriptElement))throw new Error("getWebappScriptElementFromDocument() found non html script element");return t.currentScript}const e=t.querySelector(`script#${a.webappScriptId}`);if(e)return e;const n=t.querySelectorAll(`script[src*=${a.webappScriptName}]`);if(1!==n.length)throw new Error(`SmartEdit unable to load - invalid ${a.webappScriptName} script tag`);return n.item(0)}static extractQueryParameter(t,e){const n={};return t.replace(/([?&])([^&=]+)=([^&]*)?/g,((t,e,r,a)=>(n[r]=a,""))),n[e]}static injectJS(t,e=0){t.length&&e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(167);class a{static convertWhitelistingToRegexp(t){return(t=t||[]).map((t=>{const e=t.trim();if(a.whitelistingConfigRegex.test(e)){const t=["^","$"].join(e.replace(/\./g,"\\.").replace(/\*/g,"[-a-zA-Z0-9]*"));return new RegExp(t)}throw new Error(a.whitelistingErrorMsg)}))}static getWhitelistFromScriptElement(t,e){let n=[a.getSanitizedHostFromLocation(e.location)];const o=t.getAttribute(a.allowOriginAttributeName)||"";o&&(n=n.concat(o.split(",")));let i="";const s=e.document.createElement("a");s.href=t.src;const c=r.default.extractQueryParameter(s.search,a.allowOriginQueryParamName);return c&&(i=decodeURI(c),i&&i.split(",").forEach((t=>n.push(t)))),n}static isAllowed(t,e,n){if(!/^(https?:)\/\/([-.a-zA-Z0-9]+(:[0-9]{1,5})?)$/.test(t))return!1;const r=e.document.createElement("a");return r.href=t,("https:"!==e.location.protocol||"https:"===r.protocol)&&n.some((t=>(t.lastIndex=0,t.test(a.getSanitizedHostFromLocation(r)))))}static getSanitizedHostFromLocation(t){const e=t.port||("https"===t.protocol.replace(/:/g,"")?"443":"80");return`${t.hostname}:${e}`}}e.default=a,a.whitelistingConfigRegex=new RegExp(/^(([-*a-zA-Z0-9]+[.])*([-a-zA-Z0-9]+[.]))?[-a-zA-Z0-9]+(:[0-9]{1,5})$/),a.allowOriginAttributeName="data-smartedit-allow-origin",a.allowOriginQueryParamName="allow-origin",a.whitelistingErrorMsg="\n\t\tAllowed whitelist characters are a-z, A-Z, 0-9, -, period, or *\n\t\tThe wildcard * can be used to represent a prefixed domain, Good example: *.domain.com:80\n\t\tbut not a suffix or port, Bad examples: subdomain.*.com subdomain.domain.com:*.\n\t\tEvery whitelisting must contain a specific port.\n\t"}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}(()=>{"use strict";const t=n(597),e=n(167),r=n(750),a="smartEditBootstrap",o=e.default.getWebappScriptElementFromDocument(document);if(!o)throw new Error("Unable to location webappInjector script");const i=r.default.getWhitelistFromScriptElement(o,window),s=r.default.convertWhitelistingToRegexp(i);parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"loading",data:{location:document.location.href}},"*"),window.addEventListener("load",(function(){parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"bootstrapSmartEdit",data:{location:document.location.href}},"*")})),window.addEventListener("message",(function(t){if(t.data.gatewayId===a&&"bundle"===t.data.eventId){if(!r.default.isAllowed(t.origin,window,s))throw new Error(t.origin+" is not allowed to override this storefront.");!function(t,n){if(window.smartedit=window.smartedit||{},parent.postMessage({gatewayId:a,eventId:"promiseAcknowledgement",data:{pk:t}},"*"),n){const t=document.getElementsByTagName("body")[0];!function(t){if(t.properties)for(const e in t.properties)t.properties.hasOwnProperty(e)&&(window.smartedit[e]=t.properties[e])}(n),function(t){if(!(t.js&&t.js.length>0))return;let n;n="string"==typeof t.js[0]?t.js:t.js.filter((t=>!t.namespaceToCheck||!window[t.namespaceToCheck])).map((t=>t.src)),e.default.injectJS(n)}(n),n.css&&n.css.length>0&&(e.default.removeThemeCSS(),e.default.injectCSS(t,n.css))}parent.postMessage({gatewayId:a,eventId:"promiseReturn",data:{pk:t,type:"success"}},"*")}(t.data.pk,t.data.data.resources)}}),!1),window.onbeforeunload=function(){parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"unloading",data:{location:document.location.href}},"*")},t.Heartbeat.startSendingHeartBeatToIframe(o)})()})(); \ No newline at end of file +/*! For license information please see webApplicationInjector.js.LICENSE.txt +Version: 0.0.3 */ +(()=>{var t={874:(t,e,n)=>{var r,a,o;o=function(){var t,e,n=document,r=n.getElementsByTagName("head")[0],a=!1,o="push",i="readyState",s="onreadystatechange",c={},l={},d={},u={};function p(t,e){for(var n=0,r=t.length;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Heartbeat=void 0;class n{static startSendingHeartBeatToIframe(t){const e=n.getHeartBeatInterval(t);setInterval((()=>{parent.postMessage({pk:Math.random(),gatewayId:"heartBeatGateway",eventId:"heartBeat",data:{location:document.location.href}},"*")}),e)}static getHeartBeatInterval(t){return parseInt(t.getAttribute("data-smartedit-heart-beat-interval")||n.DEFAULT_HEARTBEAT_INTERVAL,10)}}e.Heartbeat=n,n.DEFAULT_HEARTBEAT_INTERVAL="500"},986:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(874);class a{static getWebappScriptElementFromDocument(t){if(t.currentScript){if(!(t.currentScript instanceof HTMLScriptElement))throw new Error("getWebappScriptElementFromDocument() found non html script element");return t.currentScript}const e=t.querySelector(`script#${a.webappScriptId}`);if(e)return e;const n=t.querySelectorAll(`script[src*=${a.webappScriptName}]`);if(1!==n.length)throw new Error(`SmartEdit unable to load - invalid ${a.webappScriptName} script tag`);return n.item(0)}static extractQueryParameter(t,e){const n={};return t.replace(/([?&])([^&=]+)=([^&]*)?/g,((t,e,r,a)=>(n[r]=a,""))),n[e]}static injectJS(t,e=0){t.length&&e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(986);class a{static convertWhitelistingToRegexp(t){return(t=t||[]).map((t=>{const e=t.trim();if(a.whitelistingConfigRegex.test(e)){const t=["^","$"].join(e.replace(/\./g,"\\.").replace(/\*/g,"[-a-zA-Z0-9]*"));return new RegExp(t)}throw new Error(a.whitelistingErrorMsg)}))}static getWhitelistFromScriptElement(t,e){let n=[a.getSanitizedHostFromLocation(e.location)];const o=t.getAttribute(a.allowOriginAttributeName)||"";o&&(n=n.concat(o.split(",")));let i="";const s=e.document.createElement("a");s.href=t.src;const c=r.default.extractQueryParameter(s.search,a.allowOriginQueryParamName);return c&&(i=decodeURI(c),i&&i.split(",").forEach((t=>n.push(t)))),n}static isAllowed(t,e,n){if(!/^(https?:)\/\/([-.a-zA-Z0-9]+(:[0-9]{1,5})?)$/.test(t))return!1;const r=e.document.createElement("a");return r.href=t,("https:"!==e.location.protocol||"https:"===r.protocol)&&n.some((t=>(t.lastIndex=0,t.test(a.getSanitizedHostFromLocation(r)))))}static getSanitizedHostFromLocation(t){const e=t.port||("https"===t.protocol.replace(/:/g,"")?"443":"80");return`${t.hostname}:${e}`}}e.default=a,a.whitelistingConfigRegex=new RegExp(/^(([-*a-zA-Z0-9]+[.])*([-a-zA-Z0-9]+[.]))?[-a-zA-Z0-9]+(:[0-9]{1,5})$/),a.allowOriginAttributeName="data-smartedit-allow-origin",a.allowOriginQueryParamName="allow-origin",a.whitelistingErrorMsg="\n\t\tAllowed whitelist characters are a-z, A-Z, 0-9, -, period, or *\n\t\tThe wildcard * can be used to represent a prefixed domain, Good example: *.domain.com:80\n\t\tbut not a suffix or port, Bad examples: subdomain.*.com subdomain.domain.com:*.\n\t\tEvery whitelisting must contain a specific port.\n\t"}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}(()=>{"use strict";const t=n(977),e=n(986),r=n(810),a="smartEditBootstrap",o=e.default.getWebappScriptElementFromDocument(document);if(!o)throw new Error("Unable to location webappInjector script");const i=r.default.getWhitelistFromScriptElement(o,window),s=r.default.convertWhitelistingToRegexp(i);function c(t){parent.postMessage({gatewayId:a,eventId:"promiseAcknowledgement",data:{pk:t}},"*")}function l(t){parent.postMessage({gatewayId:a,eventId:"promiseReturn",data:{pk:t,type:"success"}},"*")}parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"loading",data:{location:document.location.href,version:"0.0.3"}},"*"),window.addEventListener("load",(function(){parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"bootstrapSmartEdit",data:{location:document.location.href}},"*")})),window.addEventListener("message",(function(t){if(!r.default.isAllowed(t.origin,window,s))throw new Error(t.origin+" is not allowed to override this storefront.");if(t.data.gatewayId===a&&"bundle"===t.data.eventId)return void function(t,n){if(window.smartedit=window.smartedit||{},c(t),n){const t=document.getElementsByTagName("head")[0];!function(t){if(!t.properties)return;for(const e in t.properties)t.properties.hasOwnProperty(e)&&(window.smartedit[e]=t.properties[e])}(n),function(t){if(!(t.js&&t.js.length>0))return;let n;n="string"==typeof t.js[0]?t.js:t.js.filter((t=>!t.namespaceToCheck||!window[t.namespaceToCheck])).map((t=>t.src));e.default.injectJS(n)}(n),n.css&&n.css.length>0&&e.default.injectCSS(t,n.css),n.themeCss&&n.themeCss.length>0&&e.default.injectThemeCSS(t,n.themeCss)}l(t)}(t.data.pk,t.data.data.resources);t.data.gatewayId===a&&"theme"===t.data.eventId&&(n=t.data.pk,o=t.data.data.resources,c(n),e.default.updateThemeCss(o.themeCss),l(n));var n,o}),!1),window.onbeforeunload=function(){parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"unloading",data:{location:document.location.href}},"*")},t.Heartbeat.startSendingHeartBeatToIframe(o)})()})(); diff --git a/feature-libs/smartedit/core/services/smart-edit.service.ts b/feature-libs/smartedit/core/services/smart-edit.service.ts index a4d1db8885f..ad824d4fdbe 100644 --- a/feature-libs/smartedit/core/services/smart-edit.service.ts +++ b/feature-libs/smartedit/core/services/smart-edit.service.ts @@ -13,8 +13,8 @@ import { RoutingService, WindowRef, } from '@spartacus/core'; -import { SmartEditConfig } from '@spartacus/smartedit/root'; import { filter, take } from 'rxjs/operators'; +import { SmartEditConfig } from '@spartacus/smartedit/root'; @Injectable({ providedIn: 'root', diff --git a/feature-libs/smartedit/karma.conf.js b/feature-libs/smartedit/karma.conf.js index b94d1f2a71c..e0fbf2282a3 100644 --- a/feature-libs/smartedit/karma.conf.js +++ b/feature-libs/smartedit/karma.conf.js @@ -37,6 +37,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/smartedit/package.json b/feature-libs/smartedit/package.json index b56b5b3f661..09a55b499a3 100644 --- a/feature-libs/smartedit/package.json +++ b/feature-libs/smartedit/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/smartedit", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Smart Edit feature library for Spartacus", "keywords": [ "spartacus", @@ -17,14 +17,14 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/feature-libs/smartedit/root/services/smart-edit-launcher.service.spec.ts b/feature-libs/smartedit/root/services/smart-edit-launcher.service.spec.ts index d774f300736..7364432d58b 100644 --- a/feature-libs/smartedit/root/services/smart-edit-launcher.service.spec.ts +++ b/feature-libs/smartedit/root/services/smart-edit-launcher.service.spec.ts @@ -1,9 +1,10 @@ import { Location } from '@angular/common'; import { TestBed } from '@angular/core/testing'; -import { ScriptLoader } from '@spartacus/core'; +import { FeatureModulesService, ScriptLoader } from '@spartacus/core'; import { defaultSmartEditConfig } from '../config/default-smart-edit-config'; import { SmartEditConfig } from '../config/smart-edit-config'; import { SmartEditLauncherService } from './smart-edit-launcher.service'; +import { of } from 'rxjs'; class MockLocation { path() { @@ -15,10 +16,16 @@ class MockScriptLoader { public embedScript(): void {} } +class MockFeatureModulesService implements Partial { + isConfigured = () => true; + resolveFeature = () => of(undefined); +} + describe('SmartEditLauncherService', () => { let smartEditLauncherService: SmartEditLauncherService; let location: Location; let scriptLoader: ScriptLoader; + let featureModules: FeatureModulesService; beforeEach(() => { TestBed.configureTestingModule({ @@ -26,12 +33,14 @@ describe('SmartEditLauncherService', () => { { provide: Location, useClass: MockLocation }, { provide: SmartEditConfig, useValue: defaultSmartEditConfig }, { provide: ScriptLoader, useClass: MockScriptLoader }, + { provide: FeatureModulesService, useClass: MockFeatureModulesService }, ], }); smartEditLauncherService = TestBed.inject(SmartEditLauncherService); location = TestBed.inject(Location); scriptLoader = TestBed.inject(ScriptLoader); + featureModules = TestBed.inject(FeatureModulesService); }); it('should be created', () => { @@ -62,6 +71,18 @@ describe('SmartEditLauncherService', () => { }); }); + describe('should lazy load SmartEditModule', () => { + it('lazy load SmartEditModule', () => { + spyOn(location, 'path').and.returnValue( + '/any/cx-preview?cmsTicketId=test-cms-ticket-id' + ); + spyOn(featureModules, 'resolveFeature').and.callThrough(); + + smartEditLauncherService.load(); + expect(featureModules.resolveFeature).toHaveBeenCalledWith('smartEdit'); + }); + }); + it('should be able to load webApplicationInjector.js', () => { spyOn(location, 'path').and.returnValue( '/any/cx-preview?cmsTicketId=test-cms-ticket-id' diff --git a/feature-libs/smartedit/root/services/smart-edit-launcher.service.ts b/feature-libs/smartedit/root/services/smart-edit-launcher.service.ts index 44c11833368..c874418f83f 100644 --- a/feature-libs/smartedit/root/services/smart-edit-launcher.service.ts +++ b/feature-libs/smartedit/root/services/smart-edit-launcher.service.ts @@ -5,9 +5,10 @@ */ import { Location } from '@angular/common'; -import { Injectable } from '@angular/core'; -import { ScriptLoader } from '@spartacus/core'; +import { inject, Injectable } from '@angular/core'; +import { FeatureModulesService, ScriptLoader } from '@spartacus/core'; import { SmartEditConfig } from '../config/smart-edit-config'; +import { SMART_EDIT_FEATURE } from '../feature-name'; /** * The SmartEditLauncherService is used to check whether Spartacus is launched inside Smart Edit; @@ -17,6 +18,7 @@ import { SmartEditConfig } from '../config/smart-edit-config'; providedIn: 'root', }) export class SmartEditLauncherService { + protected readonly featureModulesService = inject(FeatureModulesService); private _cmsTicketId: string | undefined; get cmsTicketId(): string | undefined { @@ -34,6 +36,8 @@ export class SmartEditLauncherService { */ load(): void { if (this.isLaunchedInSmartEdit()) { + this.featureModulesService.resolveFeature(SMART_EDIT_FEATURE).subscribe(); + this.scriptLoader?.embedScript({ src: 'assets/webApplicationInjector.js', params: undefined, diff --git a/feature-libs/smartedit/root/smart-edit-root.module.ts b/feature-libs/smartedit/root/smart-edit-root.module.ts index 3996328633e..3b8b99849d3 100644 --- a/feature-libs/smartedit/root/smart-edit-root.module.ts +++ b/feature-libs/smartedit/root/smart-edit-root.module.ts @@ -5,12 +5,8 @@ */ import { APP_INITIALIZER, NgModule } from '@angular/core'; -import { - provideDefaultConfig, - SMART_EDIT_DUMMY_COMPONENT_TYPE, -} from '@spartacus/core'; +import { provideDefaultConfig } from '@spartacus/core'; import { defaultSmartEditConfig } from './config/default-smart-edit-config'; -import { SMART_EDIT_FEATURE } from './feature-name'; import { interceptors } from './http-interceptors/index'; import { SmartEditLauncherService } from './services/smart-edit-launcher.service'; @@ -33,13 +29,6 @@ export function smartEditFactory( deps: [SmartEditLauncherService], multi: true, }, - provideDefaultConfig({ - featureModules: { - [SMART_EDIT_FEATURE]: { - cmsComponents: [SMART_EDIT_DUMMY_COMPONENT_TYPE], - }, - }, - }), ], }) export class SmartEditRootModule {} diff --git a/feature-libs/smartedit/tsconfig.schematics.json b/feature-libs/smartedit/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/smartedit/tsconfig.schematics.json +++ b/feature-libs/smartedit/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/storefinder/karma.conf.js b/feature-libs/storefinder/karma.conf.js index 9575997ae09..1a217c828b3 100644 --- a/feature-libs/storefinder/karma.conf.js +++ b/feature-libs/storefinder/karma.conf.js @@ -37,6 +37,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/storefinder/package.json b/feature-libs/storefinder/package.json index 33507e7151a..c888554bb06 100644 --- a/feature-libs/storefinder/package.json +++ b/feature-libs/storefinder/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/storefinder", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Store finder feature library for Spartacus", "keywords": [ "spartacus", @@ -22,20 +22,20 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, diff --git a/feature-libs/storefinder/tsconfig.schematics.json b/feature-libs/storefinder/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/storefinder/tsconfig.schematics.json +++ b/feature-libs/storefinder/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/tracking/karma.conf.js b/feature-libs/tracking/karma.conf.js index 50417459311..2e80be331c5 100644 --- a/feature-libs/tracking/karma.conf.js +++ b/feature-libs/tracking/karma.conf.js @@ -34,6 +34,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/tracking/package.json b/feature-libs/tracking/package.json index 957912bb9f7..c7b6f08f3b3 100644 --- a/feature-libs/tracking/package.json +++ b/feature-libs/tracking/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/tracking", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Spartacus tracking and personalization library", "keywords": [ "spartacus", @@ -21,14 +21,14 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/feature-libs/tracking/tsconfig.schematics.json b/feature-libs/tracking/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/tracking/tsconfig.schematics.json +++ b/feature-libs/tracking/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/feature-libs/user/karma.conf.js b/feature-libs/user/karma.conf.js index f727f4eb1bc..6c9c9aff463 100644 --- a/feature-libs/user/karma.conf.js +++ b/feature-libs/user/karma.conf.js @@ -37,6 +37,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/feature-libs/user/package.json b/feature-libs/user/package.json index dbd2f380bfb..577ba072b24 100644 --- a/feature-libs/user/package.json +++ b/feature-libs/user/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/user", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "User feature library for Spartacus", "keywords": [ "spartacus", @@ -22,20 +22,20 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/store": "^15.3.0", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/feature-libs/user/tsconfig.schematics.json b/feature-libs/user/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/feature-libs/user/tsconfig.schematics.json +++ b/feature-libs/user/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/integration-libs/cdc/karma.conf.js b/integration-libs/cdc/karma.conf.js index 4f3777d80c9..9f40841f4ae 100644 --- a/integration-libs/cdc/karma.conf.js +++ b/integration-libs/cdc/karma.conf.js @@ -34,6 +34,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/integration-libs/cdc/package.json b/integration-libs/cdc/package.json index 39dd392508b..e7fcc601152 100644 --- a/integration-libs/cdc/package.json +++ b/integration-libs/cdc/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/cdc", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Customer Data Cloud Integration library for Spartacus", "keywords": [ "spartacus", @@ -19,23 +19,23 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/asm": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/organization": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/asm": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/organization": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/integration-libs/cdc/root/config/default-cdc-routing-config.ts b/integration-libs/cdc/root/config/default-cdc-routing-config.ts index dbce5a577ae..0dc857d4663 100644 --- a/integration-libs/cdc/root/config/default-cdc-routing-config.ts +++ b/integration-libs/cdc/root/config/default-cdc-routing-config.ts @@ -9,12 +9,17 @@ import { RoutesConfig, RoutingConfig } from '@spartacus/core'; export const cdcRoutesConfig: RoutesConfig = { cdcLogin: { paths: ['/cdc/login'], - protected: true, + protected: false, authFlow: true, }, cdcCheckoutLogin: { paths: ['/cdc/checkout-login'], - protected: true, + protected: false, + authFlow: true, + }, + cdcOrgRegistration: { + paths: ['/cdc/register-org'], + protected: false, authFlow: true, }, }; diff --git a/integration-libs/cdc/root/service/cdc-js.service.spec.ts b/integration-libs/cdc/root/service/cdc-js.service.spec.ts index fe6ce38d4b2..b14609491e9 100644 --- a/integration-libs/cdc/root/service/cdc-js.service.spec.ts +++ b/integration-libs/cdc/root/service/cdc-js.service.spec.ts @@ -10,6 +10,7 @@ import { User, WindowRef, } from '@spartacus/core'; +import { OrganizationUserRegistrationForm } from '@spartacus/organization/user-registration/root'; import { UserProfileFacade } from '@spartacus/user/profile/root'; import { EMPTY, Observable, of, Subscription } from 'rxjs'; import { take } from 'rxjs/operators'; @@ -97,6 +98,7 @@ class MockSubscription { const b2b = { getOrganizationContext: () => {}, openDelegatedAdminLogin: () => {}, + registerOrganization: () => {}, }; const gigya = { @@ -1208,4 +1210,138 @@ describe('CdcJsService', () => { expect(service.getSiteConsentDetails).toBeTruthy(); }); }); + + describe('registerOrganisationWithoutScreenSet', () => { + it('should not call accounts.b2b.registerOrganization', (done) => { + spyOn( + service['gigyaSDK'].accounts.b2b, + 'registerOrganization' + ).and.callFake((options: { callback: Function }) => { + options.callback({ status: 'OK' }); + }); + expect(service.registerOrganisationWithoutScreenSet).toBeTruthy(); + const wrongOrgInfo: OrganizationUserRegistrationForm = { + companyName: '', + email: '', + firstName: '', + lastName: '', + }; + service.registerOrganisationWithoutScreenSet(wrongOrgInfo).subscribe({ + error: (error) => { + expect(error).toEqual('Organization details not provided'); + done(); + }, + }); + expect( + service['gigyaSDK'].accounts.b2b.registerOrganization + ).not.toHaveBeenCalled(); + }); + + it('should call accounts.b2b.registerOrganization', (done) => { + spyOn( + service['gigyaSDK'].accounts.b2b, + 'registerOrganization' + ).and.callFake((options: { callback: Function }) => { + options.callback({ status: 'OK' }); + }); + + expect(service.registerOrganisationWithoutScreenSet).toBeTruthy(); + const correctOrgInfo: OrganizationUserRegistrationForm = { + companyName: 'ABC', + email: 'abc@mail.com', + firstName: 'A', + lastName: 'User', + addressLine1: 'Line 1', + addressLine2: 'Line 2', + postalCode: '12312', + town: 'town', + region: 'region', + country: 'India', + phoneNumber: '+911234567890', + message: 'department: Dept;\nposition: Pos', + }; + + service + .registerOrganisationWithoutScreenSet(correctOrgInfo) + .subscribe(() => { + expect( + service['gigyaSDK'].accounts.b2b.registerOrganization + ).toHaveBeenCalledWith({ + organization: { + name: correctOrgInfo.companyName, + street_address: + correctOrgInfo.addressLine1 + ' ' + correctOrgInfo.addressLine2, + city: correctOrgInfo.town, + state: correctOrgInfo.region, + zip_code: correctOrgInfo.postalCode, + country: correctOrgInfo.country, + }, + requester: { + firstName: correctOrgInfo.firstName, + lastName: correctOrgInfo.lastName, + email: correctOrgInfo.email, + phone: correctOrgInfo.phoneNumber, + department: 'Dept', + jobFunction: 'Pos', + }, + regSource: 'https://spartacus.cx', + callback: jasmine.any(Function), + }); + done(); + }); + }); + + it('should call accounts.b2b.registerOrganization and not pass phone number if empty', (done) => { + spyOn( + service['gigyaSDK'].accounts.b2b, + 'registerOrganization' + ).and.callFake((options: { callback: Function }) => { + options.callback({ status: 'OK' }); + }); + + expect(service.registerOrganisationWithoutScreenSet).toBeTruthy(); + const correctOrgInfo: OrganizationUserRegistrationForm = { + companyName: 'ABC', + email: 'abc@mail.com', + firstName: 'A', + lastName: 'User', + addressLine1: 'Line 1', + addressLine2: 'Line 2', + postalCode: '12312', + town: 'town', + region: 'region', + country: 'India', + phoneNumber: '', + message: 'department: Dept;\nposition: Pos', + }; + + service + .registerOrganisationWithoutScreenSet(correctOrgInfo) + .subscribe(() => { + expect( + service['gigyaSDK'].accounts.b2b.registerOrganization + ).toHaveBeenCalledWith({ + organization: { + name: correctOrgInfo.companyName, + street_address: + correctOrgInfo.addressLine1 + ' ' + correctOrgInfo.addressLine2, + city: correctOrgInfo.town, + state: correctOrgInfo.region, + zip_code: correctOrgInfo.postalCode, + country: correctOrgInfo.country, + }, + requester: { + firstName: correctOrgInfo.firstName, + lastName: correctOrgInfo.lastName, + email: correctOrgInfo.email, + department: 'Dept', + jobFunction: 'Pos', + }, + regSource: 'https://spartacus.cx', + callback: jasmine.any(Function), + }); + done(); + }); + }); + }); }); diff --git a/integration-libs/cdc/root/service/cdc-js.service.ts b/integration-libs/cdc/root/service/cdc-js.service.ts index a86e511b464..abfb2de8e7e 100644 --- a/integration-libs/cdc/root/service/cdc-js.service.ts +++ b/integration-libs/cdc/root/service/cdc-js.service.ts @@ -305,21 +305,14 @@ export class CdcJsService implements OnDestroy { !orgInfo?.firstName || !orgInfo?.lastName ) { - return throwError(null); + return throwError('Organization details not provided'); } else { const regSource: string = this.winRef.nativeWindow?.location?.href || ''; const message = orgInfo.message; let department = null; let position = null; if (message) { - const msgList = message.replace('\n', '').split(';'); - for (const msg of msgList) { - if (msg.trim().toLowerCase().search('department') === 0) { - department = msg.split(':')[1].trim(); - } else if (msg.trim().toLowerCase().search('position') === 0) { - position = msg.split(':')[1].trim(); - } - } + ({ department, position } = this.parseMessage(message)); } return this.invokeAPI('accounts.b2b.registerOrganization', { @@ -335,7 +328,8 @@ export class CdcJsService implements OnDestroy { firstName: orgInfo.firstName, lastName: orgInfo.lastName, email: orgInfo.email, - phone: orgInfo.phoneNumber, + ...(orgInfo.phoneNumber && + orgInfo.phoneNumber.length > 0 && { phone: orgInfo.phoneNumber }), department: department, jobFunction: position, }, @@ -422,6 +416,23 @@ export class CdcJsService implements OnDestroy { return of(defaultSessionTimeOut); } + private parseMessage(message: string): { + department: string; + position: string; + } { + const msgList = message.replace('\n', '').split(';'); + let department = ''; + let position = ''; + for (const msg of msgList) { + if (msg.trim().toLowerCase().search('department') === 0) { + department = msg.split(':')[1].trim(); + } else if (msg.trim().toLowerCase().search('position') === 0) { + position = msg.split(':')[1].trim(); + } + } + return { department, position }; + } + private getCurrentBaseSite(): string { let baseSite: string = ''; this.baseSiteService diff --git a/integration-libs/cdc/tsconfig.schematics.json b/integration-libs/cdc/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/integration-libs/cdc/tsconfig.schematics.json +++ b/integration-libs/cdc/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/integration-libs/cds/karma.conf.js b/integration-libs/cds/karma.conf.js index ba9601acb3a..c08af0b3aeb 100644 --- a/integration-libs/cds/karma.conf.js +++ b/integration-libs/cds/karma.conf.js @@ -34,6 +34,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/integration-libs/cds/package.json b/integration-libs/cds/package.json index 3821b1a1a00..b5e02f5529f 100644 --- a/integration-libs/cds/package.json +++ b/integration-libs/cds/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/cds", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Context Driven Service library for Spartacus", "keywords": [ "spartacus", @@ -20,20 +20,20 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/router": "^15.2.9", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/tracking": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/tracking": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/integration-libs/cds/tsconfig.schematics.json b/integration-libs/cds/tsconfig.schematics.json index 06f6f342eaa..7c7a29e9bdf 100644 --- a/integration-libs/cds/tsconfig.schematics.json +++ b/integration-libs/cds/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/integration-libs/digital-payments/karma.conf.js b/integration-libs/digital-payments/karma.conf.js index 7156e0d7406..399eaae94e1 100644 --- a/integration-libs/digital-payments/karma.conf.js +++ b/integration-libs/digital-payments/karma.conf.js @@ -34,6 +34,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/integration-libs/digital-payments/package.json b/integration-libs/digital-payments/package.json index 726b83f117f..a1e1e32d33a 100644 --- a/integration-libs/digital-payments/package.json +++ b/integration-libs/digital-payments/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/digital-payments", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Digital Payments Integration library for Spartacus", "keywords": [ "spartacus", @@ -18,20 +18,20 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", - "@spartacus/cart": "6.3.0-1", - "@spartacus/checkout": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/checkout": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/integration-libs/digital-payments/tsconfig.schematics.json b/integration-libs/digital-payments/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/integration-libs/digital-payments/tsconfig.schematics.json +++ b/integration-libs/digital-payments/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/integration-libs/epd-visualization/karma.conf.js b/integration-libs/epd-visualization/karma.conf.js index bcd9271db68..9da0a2cf80c 100644 --- a/integration-libs/epd-visualization/karma.conf.js +++ b/integration-libs/epd-visualization/karma.conf.js @@ -34,6 +34,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/integration-libs/epd-visualization/package.json b/integration-libs/epd-visualization/package.json index 23a84e541d2..32479eeef12 100644 --- a/integration-libs/epd-visualization/package.json +++ b/integration-libs/epd-visualization/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/epd-visualization", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "SAP Enterprise Product Development Visualization integration library for Spartacus", "keywords": [ "spartacus", @@ -29,20 +29,20 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@sapui5/ts-types-esm": "1.108.14", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, diff --git a/integration-libs/epd-visualization/tsconfig.schematics.json b/integration-libs/epd-visualization/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/integration-libs/epd-visualization/tsconfig.schematics.json +++ b/integration-libs/epd-visualization/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/integration-libs/s4om/README.md b/integration-libs/s4om/README.md index 1b3443de9f4..0640be5488a 100644 --- a/integration-libs/s4om/README.md +++ b/integration-libs/s4om/README.md @@ -4,8 +4,11 @@ This library provides S/4 HANA Synchronous Order Management capabilities to Spar The features supported are: -- scheduleLines: Display a table of scheduled delivery dates and product quantity for each item in the B2B Cart using information from S/4 HANA system. +- Schedule Lines: Display a table of scheduled delivery dates and product quantity for each item in the B2B Cart using information from S/4 HANA system. -This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0. +- Requested Delivery Date: Allow customers to provide a delivery date for which the item would be needed. The minimum date would be fetched from the S/4 HANA system and used along with the Order. + +- PDF Invoices: View invoices for their orders and download PDF invoices using `Invoices` APIs. When the user selects an invoice, the backend returns a byte array, which is converted to PDF and downloaded. + diff --git a/integration-libs/s4om/karma.conf.js b/integration-libs/s4om/karma.conf.js index 6a9e6e21ebb..839449226ad 100644 --- a/integration-libs/s4om/karma.conf.js +++ b/integration-libs/s4om/karma.conf.js @@ -34,6 +34,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/integration-libs/s4om/package.json b/integration-libs/s4om/package.json index d0ddb7f36b9..c50a8ac267e 100644 --- a/integration-libs/s4om/package.json +++ b/integration-libs/s4om/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/s4om", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "S/4HANA Order Management (b2b feature)", "keywords": [ "spartacus", @@ -17,18 +17,19 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/requested-delivery-date": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/pdf-invoices": "6.5.0-1", + "@spartacus/requested-delivery-date": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/integration-libs/s4om/root/s4om-root.module.ts b/integration-libs/s4om/root/s4om-root.module.ts index a176a2349d7..be62fe178f1 100644 --- a/integration-libs/s4om/root/s4om-root.module.ts +++ b/integration-libs/s4om/root/s4om-root.module.ts @@ -6,6 +6,7 @@ import { NgModule } from '@angular/core'; import { CartOutlets } from '@spartacus/cart/base/root'; +import { PDFInvoicesComponentsModule } from '@spartacus/pdf-invoices/components'; import { RequestedDeliveryDateComponentsModule } from '@spartacus/requested-delivery-date/root'; import { OutletPosition, provideOutlet } from '@spartacus/storefront'; import { ScheduleLinesComponent } from './components/schedule-lines/schedule-lines.component'; @@ -15,6 +16,7 @@ import { ScheduleLinesModule } from './components/schedule-lines/schedule-lines. imports: [ ScheduleLinesModule, RequestedDeliveryDateComponentsModule, //Adding dependency with Requested Delivery Date so that the library gets installed along with S4OM + PDFInvoicesComponentsModule, //Adding dependency with PDF Invoices so that the library gets installed along with S4OM ], providers: [ provideOutlet({ diff --git a/integration-libs/s4om/schematics/add-s4om/schema.json b/integration-libs/s4om/schematics/add-s4om/schema.json index 19c66cb018b..b9e70316943 100644 --- a/integration-libs/s4om/schematics/add-s4om/schema.json +++ b/integration-libs/s4om/schematics/add-s4om/schema.json @@ -33,6 +33,10 @@ { "value": "Requested-Delivery-Date", "label": "Requested Delivery Date" + }, + { + "value": "PDF-Invoices", + "label": "PDF Invoices" } ] } diff --git a/integration-libs/s4om/tsconfig.lib.json b/integration-libs/s4om/tsconfig.lib.json index 1c370c142e5..9e5cf8bd8b1 100644 --- a/integration-libs/s4om/tsconfig.lib.json +++ b/integration-libs/s4om/tsconfig.lib.json @@ -61,7 +61,6 @@ "@spartacus/cart/wish-list": ["dist/cart/wish-list"], "@spartacus/cart/wish-list/root": ["dist/cart/wish-list/root"], "@spartacus/core": ["dist/core"], - "@spartacus/storefront": ["dist/storefrontlib"], "@spartacus/requested-delivery-date/assets": [ "dist/requested-delivery-date/assets" ], @@ -75,6 +74,7 @@ "@spartacus/requested-delivery-date/root": [ "dist/requested-delivery-date/root" ], + "@spartacus/storefront": ["dist/storefrontlib"], "@spartacus/user/account/assets": ["dist/user/account/assets"], "@spartacus/user/account/components": ["dist/user/account/components"], "@spartacus/user/account/core": ["dist/user/account/core"], @@ -118,7 +118,13 @@ "@spartacus/order/core": ["dist/order/core"], "@spartacus/order": ["dist/order"], "@spartacus/order/occ": ["dist/order/occ"], - "@spartacus/order/root": ["dist/order/root"] + "@spartacus/order/root": ["dist/order/root"], + "@spartacus/pdf-invoices/assets": ["dist/pdf-invoices/assets"], + "@spartacus/pdf-invoices/components": ["dist/pdf-invoices/components"], + "@spartacus/pdf-invoices/core": ["dist/pdf-invoices/core"], + "@spartacus/pdf-invoices": ["dist/pdf-invoices"], + "@spartacus/pdf-invoices/occ": ["dist/pdf-invoices/occ"], + "@spartacus/pdf-invoices/root": ["dist/pdf-invoices/root"] }, "resolveJsonModule": true, "esModuleInterop": true diff --git a/integration-libs/s4om/tsconfig.schematics.json b/integration-libs/s4om/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/integration-libs/s4om/tsconfig.schematics.json +++ b/integration-libs/s4om/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/integration-libs/segment-refs/karma.conf.js b/integration-libs/segment-refs/karma.conf.js index c784a91dad0..c054668810e 100644 --- a/integration-libs/segment-refs/karma.conf.js +++ b/integration-libs/segment-refs/karma.conf.js @@ -34,6 +34,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/integration-libs/segment-refs/package.json b/integration-libs/segment-refs/package.json index 005fa7301d6..9de2d251ff6 100644 --- a/integration-libs/segment-refs/package.json +++ b/integration-libs/segment-refs/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/segment-refs", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "segment-refs", "keywords": [ "spartacus", @@ -17,14 +17,14 @@ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", "rxjs": "^6.6.0" }, "publishConfig": { diff --git a/integration-libs/segment-refs/tsconfig.schematics.json b/integration-libs/segment-refs/tsconfig.schematics.json index 12a6e0af8a9..1cfbe64f282 100644 --- a/integration-libs/segment-refs/tsconfig.schematics.json +++ b/integration-libs/segment-refs/tsconfig.schematics.json @@ -259,6 +259,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/package-lock.json b/package-lock.json index cded6608585..a15cbf50258 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,53 +10,53 @@ "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@angular/animations": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/compiler": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/platform-browser": "^15.2.4", - "@angular/platform-browser-dynamic": "^15.2.4", - "@angular/platform-server": "^15.2.4", - "@angular/pwa": "^15.2.4", - "@angular/router": "^15.2.4", - "@angular/service-worker": "^15.2.4", + "@angular/animations": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/compiler": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/platform-browser": "^15.2.9", + "@angular/platform-browser-dynamic": "^15.2.9", + "@angular/platform-server": "^15.2.9", + "@angular/pwa": "^15.2.9", + "@angular/router": "^15.2.9", + "@angular/service-worker": "^15.2.9", "@fontsource/open-sans": "^4.5.14", - "@fortawesome/fontawesome-free": "5.8.1", + "@fortawesome/fontawesome-free": "6.4.2", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/router-store": "^15.3.0", "@ngrx/store": "^15.3.0", "@nguniversal/express-engine": "^15.2.0", - "@types/google.maps": "^3.49.2", + "@types/google.maps": "^3.54.0", "angular-oauth2-oidc": "^15.0.1", "bootstrap": "^4.6.2", "comment-json": "^4.2.3", "express": "^4.18.2", "hamburgers": "^1.2.1", - "i18next": "^21.9.1", - "i18next-http-backend": "^1.4.1", + "i18next": "^21.10.0", + "i18next-http-backend": "^1.4.5", "i18next-resources-to-backend": "^1.1.2", "ngx-infinite-scroll": "^15.0.0", "rxjs": "^6.6.0", - "ts-loader": "^9.3.1", - "tslib": "^2.4.0", - "zone.js": "~0.11.8" + "ts-loader": "^9.4.4", + "tslib": "^2.6.2", + "zone.js": "~0.12.0" }, "devDependencies": { "@angular-builders/custom-webpack": "^15.0.0", - "@angular-devkit/build-angular": "^15.2.4", - "@angular-devkit/core": "^15.2.4", - "@angular-devkit/schematics": "^15.2.4", + "@angular-devkit/build-angular": "^15.2.9", + "@angular-devkit/core": "^15.2.9", + "@angular-devkit/schematics": "^15.2.9", "@angular-eslint/builder": "^15.2.0", "@angular-eslint/eslint-plugin": "^15.2.0", "@angular-eslint/eslint-plugin-template": "^15.2.0", "@angular-eslint/schematics": "^15.2.0", "@angular-eslint/template-parser": "^15.2.0", "@angular-eslint/utils": "^15.2.0", - "@angular/cli": "^15.2.4", - "@angular/compiler-cli": "^15.2.4", - "@angular/language-service": "^15.2.4", + "@angular/cli": "^15.2.9", + "@angular/compiler-cli": "^15.2.9", + "@angular/language-service": "^15.2.9", "@babel/runtime": "^7.18.9", "@ngrx/store-devtools": "^15.3.0", "@nguniversal/builders": "^15.2.0", @@ -66,7 +66,7 @@ "@nrwl/jest": "^15.9.2", "@nrwl/workspace": "15.9.2", "@sapui5/ts-types-esm": "1.108.14", - "@schematics/angular": "^15.2.4", + "@schematics/angular": "^15.2.9", "@types/express": "^4.17.17", "@types/fs-extra": "^11.0.1", "@types/i18next": "^13.0.0", @@ -127,7 +127,7 @@ "webpack-cli": "^4.10.0" }, "engines": { - "node": "^14.20.0 || ^16.13.0 || ^18.10.0" + "node": "^16.13.0 || ^18.10.0" } }, "node_modules/@ampproject/remapping": { @@ -163,11 +163,12 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1502.4", + "version": "0.1502.9", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1502.9.tgz", + "integrity": "sha512-CFn+LbtYeLG7WqO+BBSjogl764StHpwgfJnNAXQ/3UouUktZ92z4lxhUm0PwIPb5k0lILsf81ubcS1vzwoXEEg==", "devOptional": true, - "license": "MIT", "dependencies": { - "@angular-devkit/core": "15.2.4", + "@angular-devkit/core": "15.2.9", "rxjs": "6.6.7" }, "engines": { @@ -177,14 +178,15 @@ } }, "node_modules/@angular-devkit/build-angular": { - "version": "15.2.4", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-15.2.9.tgz", + "integrity": "sha512-djOo2Q22zLrxPccSbINz93hD+pES/nNPoze4Ys/0IdtMlLmxO/YGsA+FG5eNeNAf2jK/JRoNydaYOh7XpGoCzA==", "dev": true, - "license": "MIT", "dependencies": { "@ampproject/remapping": "2.2.0", - "@angular-devkit/architect": "0.1502.4", - "@angular-devkit/build-webpack": "0.1502.4", - "@angular-devkit/core": "15.2.4", + "@angular-devkit/architect": "0.1502.9", + "@angular-devkit/build-webpack": "0.1502.9", + "@angular-devkit/core": "15.2.9", "@babel/core": "7.20.12", "@babel/generator": "7.20.14", "@babel/helper-annotate-as-pure": "7.18.6", @@ -196,7 +198,7 @@ "@babel/runtime": "7.20.13", "@babel/template": "7.20.7", "@discoveryjs/json-ext": "0.5.7", - "@ngtools/webpack": "15.2.4", + "@ngtools/webpack": "15.2.9", "ansi-colors": "4.1.3", "autoprefixer": "10.4.13", "babel-loader": "9.1.2", @@ -229,7 +231,7 @@ "rxjs": "6.6.7", "sass": "1.58.1", "sass-loader": "13.2.0", - "semver": "7.3.8", + "semver": "7.5.3", "source-map-loader": "4.0.1", "source-map-support": "0.5.21", "terser": "5.16.3", @@ -287,8 +289,9 @@ }, "node_modules/@angular-devkit/build-angular/node_modules/@babel/runtime": { "version": "7.20.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz", + "integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==", "dev": true, - "license": "MIT", "dependencies": { "regenerator-runtime": "^0.13.11" }, @@ -298,13 +301,15 @@ }, "node_modules/@angular-devkit/build-angular/node_modules/@types/estree": { "version": "0.0.51", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true }, "node_modules/@angular-devkit/build-angular/node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -318,24 +323,27 @@ }, "node_modules/@angular-devkit/build-angular/node_modules/ajv-keywords": { "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true, - "license": "MIT", "peerDependencies": { "ajv": "^6.9.1" } }, "node_modules/@angular-devkit/build-angular/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, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/@angular-devkit/build-angular/node_modules/eslint-scope": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -346,16 +354,18 @@ }, "node_modules/@angular-devkit/build-angular/node_modules/estraverse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/@angular-devkit/build-angular/node_modules/glob": { "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -372,24 +382,15 @@ }, "node_modules/@angular-devkit/build-angular/node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@angular-devkit/build-angular/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/@angular-devkit/build-angular/node_modules/minimatch": { "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -399,6 +400,8 @@ }, "node_modules/@angular-devkit/build-angular/node_modules/postcss": { "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", "dev": true, "funding": [ { @@ -410,7 +413,6 @@ "url": "https://tidelift.com/funding/github/npm/postcss" } ], - "license": "MIT", "dependencies": { "nanoid": "^3.3.4", "picocolors": "^1.0.0", @@ -421,9 +423,10 @@ } }, "node_modules/@angular-devkit/build-angular/node_modules/schema-utils": { - "version": "3.1.1", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, - "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -437,24 +440,17 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/@angular-devkit/build-angular/node_modules/semver": { - "version": "7.3.8", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } + "node_modules/@angular-devkit/build-angular/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true }, "node_modules/@angular-devkit/build-angular/node_modules/webpack": { "version": "5.76.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz", + "integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^0.0.51", @@ -497,17 +493,13 @@ } } }, - "node_modules/@angular-devkit/build-angular/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/@angular-devkit/build-webpack": { - "version": "0.1502.4", + "version": "0.1502.9", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1502.9.tgz", + "integrity": "sha512-VzMXoZjrbL1XlcSegqpZCBDbVvKFGPs3cKp4bXDD5ht95jcCyJPk5FA/wrh0pGGwbOF8ae/XOWFcPRzctC35iA==", "dev": true, - "license": "MIT", "dependencies": { - "@angular-devkit/architect": "0.1502.4", + "@angular-devkit/architect": "0.1502.9", "rxjs": "6.6.7" }, "engines": { @@ -521,8 +513,9 @@ } }, "node_modules/@angular-devkit/core": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.2.9.tgz", + "integrity": "sha512-6u44YJ9tEG2hiWITL1rwA9yP6ot4a3cyN/UOMRkYSa/XO2Gz5/dM3U74E2kwg+P1NcxLXffBWl0rz8/Y/lSZyQ==", "dependencies": { "ajv": "8.12.0", "ajv-formats": "2.1.1", @@ -545,10 +538,11 @@ } }, "node_modules/@angular-devkit/schematics": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-15.2.9.tgz", + "integrity": "sha512-o08nE8sTpfq/Fknrr1rzBsM8vY36BDox+8dOo9Zc/KqcVPwDy94YKRzHb+xxVaU9jy1VYeCjy63mkyELy7Z3zQ==", "dependencies": { - "@angular-devkit/core": "15.2.4", + "@angular-devkit/core": "15.2.9", "jsonc-parser": "3.2.0", "magic-string": "0.29.0", "ora": "5.4.1", @@ -646,8 +640,9 @@ } }, "node_modules/@angular/animations": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-15.2.9.tgz", + "integrity": "sha512-GQujLhI0cQFcl4Q8y0oSYKSRnW23GIeSL+Arl4eFufziJ9hGAAQNuesaNs/7i+9UlTHDMkPH3kd5ScXuYYz6wg==", "dependencies": { "tslib": "^2.3.0" }, @@ -655,18 +650,19 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/core": "15.2.4" + "@angular/core": "15.2.9" } }, "node_modules/@angular/cli": { - "version": "15.2.4", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-15.2.9.tgz", + "integrity": "sha512-mI6hkGyIJDKd8MRiBl3p5chsUhgnluwmpsq3g1FFPw+wv+eXsPYgCiHqXS/OsK+shFxii9XMxoZQO28bJ4NAOQ==", "devOptional": true, - "license": "MIT", "dependencies": { - "@angular-devkit/architect": "0.1502.4", - "@angular-devkit/core": "15.2.4", - "@angular-devkit/schematics": "15.2.4", - "@schematics/angular": "15.2.4", + "@angular-devkit/architect": "0.1502.9", + "@angular-devkit/core": "15.2.9", + "@angular-devkit/schematics": "15.2.9", + "@schematics/angular": "15.2.9", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.3", "ini": "3.0.1", @@ -678,7 +674,7 @@ "ora": "5.4.1", "pacote": "15.1.0", "resolve": "1.22.1", - "semver": "7.3.8", + "semver": "7.5.3", "symbol-observable": "4.0.0", "yargs": "17.6.2" }, @@ -691,39 +687,10 @@ "yarn": ">= 1.13.0" } }, - "node_modules/@angular/cli/node_modules/lru-cache": { - "version": "6.0.0", - "devOptional": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@angular/cli/node_modules/semver": { - "version": "7.3.8", - "devOptional": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@angular/cli/node_modules/yallist": { - "version": "4.0.0", - "devOptional": true, - "license": "ISC" - }, "node_modules/@angular/common": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-15.2.9.tgz", + "integrity": "sha512-LM9/UHG2dRrOzlu2KovrFwWIziFMjRxHzSP3Igw6Symw/wIl0kXGq8Fn6RpFP78zmLqnv+IQOoRiby9MCXsI4g==", "dependencies": { "tslib": "^2.3.0" }, @@ -731,13 +698,14 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/core": "15.2.4", + "@angular/core": "15.2.9", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/compiler": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-15.2.9.tgz", + "integrity": "sha512-MoKugbjk+E0wRBj12uvIyDLELlVLonnqjA2+XiF+7FxALIeyds3/qQeEoMmYIqAbN3NnTT5pV92RxWwG4tHFwA==", "dependencies": { "tslib": "^2.3.0" }, @@ -745,7 +713,7 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/core": "15.2.4" + "@angular/core": "15.2.9" }, "peerDependenciesMeta": { "@angular/core": { @@ -754,9 +722,10 @@ } }, "node_modules/@angular/compiler-cli": { - "version": "15.2.4", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-15.2.9.tgz", + "integrity": "sha512-zsbI8G2xHOeYWI0hjFzrI//ZhZV9il/uQW5dAimfwJp06KZDeXZ3PdwY9JQslf6F+saLwOObxy6QMrIVvfjy9w==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "7.19.3", "@jridgewell/sourcemap-codec": "^1.4.14", @@ -778,7 +747,7 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/compiler": "15.2.4", + "@angular/compiler": "15.2.9", "typescript": ">=4.8.2 <5.0" } }, @@ -831,8 +800,9 @@ } }, "node_modules/@angular/core": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-15.2.9.tgz", + "integrity": "sha512-w46Z1yUXCQfKV7XfnamOoLA2VD0MVUUYVrUjO73mHSskDXSXxfZAEHO9kfUS71Cj35PvhP3mbkqWscpea2WeYg==", "dependencies": { "tslib": "^2.3.0" }, @@ -845,8 +815,9 @@ } }, "node_modules/@angular/forms": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-15.2.9.tgz", + "integrity": "sha512-sk0pC2EFi2Ohg5J0q0NYptbT+2WOkoiERSMYA39ncDvlSZBWsNlxpkbGUSck7NIxjK2QfcVN1ldGbHlZTFvtqg==", "dependencies": { "tslib": "^2.3.0" }, @@ -854,23 +825,25 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/common": "15.2.4", - "@angular/core": "15.2.4", - "@angular/platform-browser": "15.2.4", + "@angular/common": "15.2.9", + "@angular/core": "15.2.9", + "@angular/platform-browser": "15.2.9", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/language-service": { - "version": "15.2.4", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-15.2.9.tgz", + "integrity": "sha512-B7lP4q/eHge2lZezOXS96EYzVf4stMCWfOnz7+pUUi0HbF+A5QCV65SWQddS/M+NM2jj8N2L/j+6UCH8lJjTQA==", "dev": true, - "license": "MIT", "engines": { "node": "^14.20.0 || ^16.13.0 || >=18.10.0" } }, "node_modules/@angular/platform-browser": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-15.2.9.tgz", + "integrity": "sha512-ufCHeSX+U6d43YOMkn3igwfqtlozoCXADcbyfUEG8m2y9XASobqmCKvdSk/zfl62oyiA8msntWBJVBE2l4xKXg==", "dependencies": { "tslib": "^2.3.0" }, @@ -878,9 +851,9 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/animations": "15.2.4", - "@angular/common": "15.2.4", - "@angular/core": "15.2.4" + "@angular/animations": "15.2.9", + "@angular/common": "15.2.9", + "@angular/core": "15.2.9" }, "peerDependenciesMeta": { "@angular/animations": { @@ -889,8 +862,9 @@ } }, "node_modules/@angular/platform-browser-dynamic": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-15.2.9.tgz", + "integrity": "sha512-ZIYDM6MShblb8OyV1m4+18lJJ2LCeICmeg2uSbpFYptYBSOClrTiYOOFVDJvn7HLvNzljLs16XPrgyaYVqNpcw==", "dependencies": { "tslib": "^2.3.0" }, @@ -898,15 +872,16 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/common": "15.2.4", - "@angular/compiler": "15.2.4", - "@angular/core": "15.2.4", - "@angular/platform-browser": "15.2.4" + "@angular/common": "15.2.9", + "@angular/compiler": "15.2.9", + "@angular/core": "15.2.9", + "@angular/platform-browser": "15.2.9" } }, "node_modules/@angular/platform-server": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-15.2.9.tgz", + "integrity": "sha512-GOjRSCpqN9WPi5ROvsVo9G4gACZ4Z6J2GYBFUOzUY/PaQkuGtigZhp0zPDU19vteabIa0p6C3jqOHw0+jHolgw==", "dependencies": { "domino": "^2.1.2", "tslib": "^2.3.0", @@ -916,20 +891,21 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/animations": "15.2.4", - "@angular/common": "15.2.4", - "@angular/compiler": "15.2.4", - "@angular/core": "15.2.4", - "@angular/platform-browser": "15.2.4", - "@angular/platform-browser-dynamic": "15.2.4" + "@angular/animations": "15.2.9", + "@angular/common": "15.2.9", + "@angular/compiler": "15.2.9", + "@angular/core": "15.2.9", + "@angular/platform-browser": "15.2.9", + "@angular/platform-browser-dynamic": "15.2.9" } }, "node_modules/@angular/pwa": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/pwa/-/pwa-15.2.9.tgz", + "integrity": "sha512-5WRHStoooHDg6o82zomHUu5uZqoK2QNFJrQ40mgvYv2/rK/NikQBQlARl9aYkwER4qRIu0aO/kmfCuAXPve17A==", "dependencies": { - "@angular-devkit/schematics": "15.2.4", - "@schematics/angular": "15.2.4", + "@angular-devkit/schematics": "15.2.9", + "@schematics/angular": "15.2.9", "parse5-html-rewriting-stream": "7.0.0" }, "engines": { @@ -947,8 +923,9 @@ } }, "node_modules/@angular/router": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-15.2.9.tgz", + "integrity": "sha512-UCbh5DLSDhybv0xKYT7kGQMfOVdyhHIHOZz5EYVebbhste6S+W1LE57vTHq7QtxJsyKBa/WSkaUkCLXD6ntCAg==", "dependencies": { "tslib": "^2.3.0" }, @@ -956,15 +933,16 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/common": "15.2.4", - "@angular/core": "15.2.4", - "@angular/platform-browser": "15.2.4", + "@angular/common": "15.2.9", + "@angular/core": "15.2.9", + "@angular/platform-browser": "15.2.9", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/service-worker": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-15.2.9.tgz", + "integrity": "sha512-qM/lcrjaxIfpKj174mMWedtGfLNgLl5m7p9mPNODFjqp5lQj3fTTS643ix5Pr0onwbvbNbXu4g67/WXJqap0eA==", "dependencies": { "tslib": "^2.3.0" }, @@ -975,8 +953,8 @@ "node": "^14.20.0 || ^16.13.0 || >=18.10.0" }, "peerDependencies": { - "@angular/common": "15.2.4", - "@angular/core": "15.2.4" + "@angular/common": "15.2.9", + "@angular/core": "15.2.9" } }, "node_modules/@assemblyscript/loader": { @@ -2936,8 +2914,10 @@ "license": "MIT" }, "node_modules/@fortawesome/fontawesome-free": { - "version": "5.8.1", - "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.2.tgz", + "integrity": "sha512-m5cPn3e2+FDCOgi1mz0RexTUvvQibBebOUlUlW0+YrMjDTPkiJ6VTKukA1GRsvRw+12KyJndNjj0O4AgTxm2Pg==", + "hasInstallScript": true, "engines": { "node": ">=6" } @@ -3398,9 +3378,10 @@ } }, "node_modules/@ngtools/webpack": { - "version": "15.2.4", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.2.9.tgz", + "integrity": "sha512-nOXUGqKkAEMlCcrhkDwWDzcVdKNH7MNRUXfNzsFc9zdeR/5p3qt6SVMN7OOE3NREyI7P6nzARc3S+6QDBjf3Jg==", "dev": true, - "license": "MIT", "engines": { "node": "^14.20.0 || ^16.13.0 || >=18.10.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", @@ -5858,11 +5839,12 @@ } }, "node_modules/@schematics/angular": { - "version": "15.2.4", - "license": "MIT", + "version": "15.2.9", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.2.9.tgz", + "integrity": "sha512-0Lit6TLNUwcAYiEkXgZp3vY9xAO1cnZCBXuUcp+6v+Ddnrt2w/YOiGe74p21cYe0StkTpTljsqsKBTiX7TMjQg==", "dependencies": { - "@angular-devkit/core": "15.2.4", - "@angular-devkit/schematics": "15.2.4", + "@angular-devkit/core": "15.2.9", + "@angular-devkit/schematics": "15.2.9", "jsonc-parser": "3.2.0" }, "engines": { @@ -6143,8 +6125,9 @@ } }, "node_modules/@types/google.maps": { - "version": "3.52.0", - "license": "MIT" + "version": "3.54.0", + "resolved": "https://registry.npmjs.org/@types/google.maps/-/google.maps-3.54.0.tgz", + "integrity": "sha512-b1MBy2eGrZoEFLnzq1RrlHbfzuWHz+Nitgqbb5N+MFA0kAUv0kYPmAXtczpb4dHlFZyu58EYzcKXtWNqSInyXg==" }, "node_modules/@types/graceful-fs": { "version": "4.1.6", @@ -7351,8 +7334,9 @@ }, "node_modules/adjust-sourcemap-loader": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", + "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==", "dev": true, - "license": "MIT", "dependencies": { "loader-utils": "^2.0.0", "regex-parser": "^2.2.11" @@ -7363,8 +7347,9 @@ }, "node_modules/adjust-sourcemap-loader/node_modules/loader-utils": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, - "license": "MIT", "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -9053,8 +9038,9 @@ }, "node_modules/copy-webpack-plugin": { "version": "11.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", + "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", "dev": true, - "license": "MIT", "dependencies": { "fast-glob": "^3.2.11", "glob-parent": "^6.0.1", @@ -9076,8 +9062,9 @@ }, "node_modules/copy-webpack-plugin/node_modules/glob-parent": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -9086,13 +9073,14 @@ } }, "node_modules/copy-webpack-plugin/node_modules/globby": { - "version": "13.1.3", + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", "dev": true, - "license": "MIT", "dependencies": { "dir-glob": "^3.0.1", - "fast-glob": "^3.2.11", - "ignore": "^5.2.0", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", "merge2": "^1.4.1", "slash": "^4.0.0" }, @@ -9105,8 +9093,9 @@ }, "node_modules/copy-webpack-plugin/node_modules/slash": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -11262,9 +11251,10 @@ "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.2.12", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -14855,8 +14845,9 @@ }, "node_modules/karma-source-map-support": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz", + "integrity": "sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==", "dev": true, - "license": "MIT", "dependencies": { "source-map-support": "^0.5.5" } @@ -15178,8 +15169,9 @@ }, "node_modules/loader-utils": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 12.13.0" } @@ -15877,8 +15869,9 @@ }, "node_modules/mini-css-extract-plugin": { "version": "2.7.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.2.tgz", + "integrity": "sha512-EdlUizq13o0Pd+uCp+WO/JpkLvHRVGt97RqfeGhXqAcorYo1ypJSpkV+WDT0vY/kmh/p7wRdJNJtuyK540PXDw==", "dev": true, - "license": "MIT", "dependencies": { "schema-utils": "^4.0.0" }, @@ -17844,8 +17837,9 @@ }, "node_modules/postcss-loader": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.0.2.tgz", + "integrity": "sha512-fUJzV/QH7NXUAqV8dWJ9Lg4aTkDCezpTS5HgJ2DvqznexTbSTxgi/dTECvTZ15BwKTtk8G/bqI/QTu2HPd3ZCg==", "dev": true, - "license": "MIT", "dependencies": { "cosmiconfig": "^7.0.0", "klona": "^2.0.5", @@ -18840,8 +18834,9 @@ }, "node_modules/regex-parser": { "version": "2.2.11", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz", + "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==", + "dev": true }, "node_modules/regexp.prototype.flags": { "version": "1.4.3", @@ -19005,8 +19000,9 @@ }, "node_modules/resolve-url-loader": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz", + "integrity": "sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==", "dev": true, - "license": "MIT", "dependencies": { "adjust-sourcemap-loader": "^4.0.0", "convert-source-map": "^1.7.0", @@ -19020,8 +19016,9 @@ }, "node_modules/resolve-url-loader/node_modules/loader-utils": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, - "license": "MIT", "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -19033,8 +19030,9 @@ }, "node_modules/resolve-url-loader/node_modules/source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -19291,8 +19289,9 @@ }, "node_modules/sass-loader": { "version": "13.2.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.2.0.tgz", + "integrity": "sha512-JWEp48djQA4nbZxmgC02/Wh0eroSUutulROUusYJO9P9zltRbNN80JCBHqRGzjd4cmZCa/r88xgfkjGD0TXsHg==", "dev": true, - "license": "MIT", "dependencies": { "klona": "^2.0.4", "neo-async": "^2.6.2" @@ -19459,9 +19458,9 @@ } }, "node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -19986,8 +19985,9 @@ }, "node_modules/source-map-loader": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.1.tgz", + "integrity": "sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA==", "dev": true, - "license": "MIT", "dependencies": { "abab": "^2.0.6", "iconv-lite": "^0.6.3", @@ -20006,8 +20006,9 @@ }, "node_modules/source-map-loader/node_modules/iconv-lite": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, - "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -21170,8 +21171,9 @@ } }, "node_modules/ts-loader": { - "version": "9.4.2", - "license": "MIT", + "version": "9.4.4", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.4.tgz", + "integrity": "sha512-MLukxDHBl8OJ5Dk3y69IsKVFRA/6MwzEqBgh+OXMPB/OD01KQuWPFd1WAQP8a5PeSCAxfnkhiuWqfmFJzJQt9w==", "dependencies": { "chalk": "^4.1.0", "enhanced-resolve": "^5.0.0", @@ -21274,8 +21276,9 @@ } }, "node_modules/tslib": { - "version": "2.5.0", - "license": "0BSD" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -21992,8 +21995,9 @@ }, "node_modules/webpack-dev-middleware": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-6.0.1.tgz", + "integrity": "sha512-PZPZ6jFinmqVPJZbisfggDiC+2EeGZ1ZByyMP5sOFJcPPWSexalISz+cvm+j+oYPT7FIJyxT76esjnw9DhE5sw==", "dev": true, - "license": "MIT", "dependencies": { "colorette": "^2.0.10", "memfs": "^3.4.12", @@ -22543,8 +22547,9 @@ } }, "node_modules/zone.js": { - "version": "0.11.8", - "license": "MIT", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.12.0.tgz", + "integrity": "sha512-XtC+I5dXU14HrzidAKBNMqneIVUykLEAA1x+v4KVrd6AUPWlwYORF8KgsVqvgdHiKZ4BkxxjvYi/ksEixTPR0Q==", "dependencies": { "tslib": "^2.3.0" } diff --git a/package.json b/package.json index 6a4ab0371de..21edbd1cfc7 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "SAP, Spartacus team", "engines": { - "node": "^14.20.0 || ^16.13.0 || ^18.10.0" + "node": "^16.13.0 || ^18.10.0" }, "scripts": { "build:analyze": "npm run build --stats-json && npx --yes webpack-bundle-analyzer dist/storefrontapp/stats.json", @@ -22,9 +22,10 @@ "build:digital-payments": "npm --prefix integration-libs/digital-payments run build:schematics && nx build digital-payments --configuration production", "build:epd-visualization": "npm --prefix integration-libs/epd-visualization run build:schematics && nx build epd-visualization --configuration production", "build:order": "npm --prefix feature-libs/order run build:schematics && nx build order --configuration production", - "build:libs": "nx build core --configuration production && nx build storefrontlib --configuration production && concurrently --kill-others-on-fail npm:build:schematics npm:build:user && npm run build:cart && npm run build:order && concurrently --kill-others-on-fail npm:build:checkout npm:build:asm npm:build:tracking npm:build:customer-ticketing && concurrently --kill-others-on-fail npm:build:organization npm:build:product npm:build:product-configurator npm:build:requested-delivery-date npm:build:storefinder && concurrently --kill-others-on-fail npm:build:smartedit npm:build:qualtrics npm:build:assets npm:build:cds npm:build:cdc npm:build:digital-payments npm:build:epd-visualization npm:build:s4om npm:build:segment-refs npm:build:pickup-in-store npm:build:opf && npm run build:setup", + "build:libs": "nx build core --configuration production && nx build storefrontlib --configuration production && concurrently --kill-others-on-fail npm:build:schematics npm:build:user && npm run build:cart && npm run build:order && concurrently --kill-others-on-fail npm:build:checkout npm:build:asm npm:build:tracking npm:build:customer-ticketing && concurrently --kill-others-on-fail npm:build:organization npm:build:pdf-invoices npm:build:product npm:build:product-configurator npm:build:requested-delivery-date npm:build:storefinder && concurrently --kill-others-on-fail npm:build:smartedit npm:build:qualtrics npm:build:assets npm:build:cds npm:build:cdc npm:build:digital-payments npm:build:epd-visualization npm:build:s4om npm:build:segment-refs npm:build:pickup-in-store npm:build:opf && npm run build:setup", "build:opf": "npm --prefix integration-libs/opf run build:schematics && nx build opf --configuration production", "build:organization": "npm --prefix feature-libs/organization run build:schematics && nx build organization --configuration production", + "build:pdf-invoices": "npm --prefix feature-libs/pdf-invoices run build:schematics && nx build pdf-invoices --configuration production", "build:pickup-in-store": "npm --prefix feature-libs/pickup-in-store run build:schematics && nx build pickup-in-store --configuration production", "build:product": "npm --prefix feature-libs/product run build:schematics && nx build product --configuration production", "build:product-configurator": "npm --prefix feature-libs/product-configurator run build:schematics && nx build product-configurator --configuration production", @@ -85,7 +86,7 @@ "start:prod": "env-cmd --no-override -e dev,b2c,$SPA_ENV nx serve storefrontapp --configuration=production", "start:pwa": "cd ./dist/storefrontapp/ && http-server --silent --proxy http://localhost:4200? -p 4200", "test": "nx test", - "test:libs": "concurrently \"nx test core --code-coverage\" \"nx test storefrontlib --code-coverage\" \"nx test cart --code-coverage\" \"nx test organization --code-coverage\" \"nx test storefinder --code-coverage\" \"nx test smartedit --code-coverage\" \"nx test asm --code-coverage\" \"nx test qualtrics --code-coverage\" \"nx test product --code-coverage\" \"nx test product-configurator --code-coverage\" \"nx test customer-ticketing --code-coverage\" \"nx test cdc --code-coverage\" \"nx test setup --code-coverage\" \"nx test checkout --code-coverage\" \"nx test order --code-coverage\" \"nx test digital-payments --code-coverage\" \"nx test epd-visualization --code-coverage\" \"nx test pickup-in-store --code-coverage\" \"nx test s4om --code-coverage\" \"nx test requested-delivery-date --code-coverage\"", + "test:libs": "concurrently \"nx test core --code-coverage\" \"nx test storefrontlib --code-coverage\" \"nx test cart --code-coverage\" \"nx test organization --code-coverage\" \"nx test storefinder --code-coverage\" \"nx test smartedit --code-coverage\" \"nx test asm --code-coverage\" \"nx test qualtrics --code-coverage\" \"nx test product --code-coverage\" \"nx test product-configurator --code-coverage\" \"nx test customer-ticketing --code-coverage\" \"nx test cdc --code-coverage\" \"nx test setup --code-coverage\" \"nx test checkout --code-coverage\" \"nx test order --code-coverage\" \"nx test digital-payments --code-coverage\" \"nx test epd-visualization --code-coverage\" \"nx test pickup-in-store --code-coverage\" \"nx test s4om --code-coverage\" \"nx test requested-delivery-date --code-coverage\" \"nx test pdf-invoices --code-coverage\"", "test:storefront:lib": "nx test storefrontlib --source-map --code-coverage", "test:opf:lib": "nx test opf --source-map --code-coverage", "dev:ssr": "env-cmd --no-override -e dev,b2c,$SPA_ENV cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 nx run storefrontapp:serve-ssr", @@ -105,53 +106,53 @@ }, "private": false, "dependencies": { - "@angular/animations": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/compiler": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/platform-browser": "^15.2.4", - "@angular/platform-browser-dynamic": "^15.2.4", - "@angular/platform-server": "^15.2.4", - "@angular/pwa": "^15.2.4", - "@angular/router": "^15.2.4", - "@angular/service-worker": "^15.2.4", + "@angular/animations": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/compiler": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/platform-browser": "^15.2.9", + "@angular/platform-browser-dynamic": "^15.2.9", + "@angular/platform-server": "^15.2.9", + "@angular/pwa": "^15.2.9", + "@angular/router": "^15.2.9", + "@angular/service-worker": "^15.2.9", "@fontsource/open-sans": "^4.5.14", - "@fortawesome/fontawesome-free": "5.8.1", + "@fortawesome/fontawesome-free": "6.4.2", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/router-store": "^15.3.0", "@ngrx/store": "^15.3.0", "@nguniversal/express-engine": "^15.2.0", - "@types/google.maps": "^3.49.2", + "@types/google.maps": "^3.54.0", "angular-oauth2-oidc": "^15.0.1", "bootstrap": "^4.6.2", "comment-json": "^4.2.3", "express": "^4.18.2", "hamburgers": "^1.2.1", - "i18next": "^21.9.1", - "i18next-http-backend": "^1.4.1", + "i18next": "^21.10.0", + "i18next-http-backend": "^1.4.5", "i18next-resources-to-backend": "^1.1.2", "ngx-infinite-scroll": "^15.0.0", "rxjs": "^6.6.0", - "ts-loader": "^9.3.1", - "tslib": "^2.4.0", - "zone.js": "~0.11.8" + "ts-loader": "^9.4.4", + "tslib": "^2.6.2", + "zone.js": "~0.12.0" }, "devDependencies": { "@angular-builders/custom-webpack": "^15.0.0", - "@angular-devkit/build-angular": "^15.2.4", - "@angular-devkit/core": "^15.2.4", - "@angular-devkit/schematics": "^15.2.4", + "@angular-devkit/build-angular": "^15.2.9", + "@angular-devkit/core": "^15.2.9", + "@angular-devkit/schematics": "^15.2.9", "@angular-eslint/builder": "^15.2.0", "@angular-eslint/eslint-plugin": "^15.2.0", "@angular-eslint/eslint-plugin-template": "^15.2.0", "@angular-eslint/schematics": "^15.2.0", "@angular-eslint/template-parser": "^15.2.0", "@angular-eslint/utils": "^15.2.0", - "@angular/cli": "^15.2.4", - "@angular/compiler-cli": "^15.2.4", - "@angular/language-service": "^15.2.4", + "@angular/cli": "^15.2.9", + "@angular/compiler-cli": "^15.2.9", + "@angular/language-service": "^15.2.9", "@babel/runtime": "^7.18.9", "@ngrx/store-devtools": "^15.3.0", "@nguniversal/builders": "^15.2.0", @@ -161,7 +162,7 @@ "@nrwl/jest": "^15.9.2", "@nrwl/workspace": "15.9.2", "@sapui5/ts-types-esm": "1.108.14", - "@schematics/angular": "^15.2.4", + "@schematics/angular": "^15.2.9", "@types/express": "^4.17.17", "@types/fs-extra": "^11.0.1", "@types/i18next": "^13.0.0", diff --git a/projects/assets/package.json b/projects/assets/package.json index 7d083ba55f6..470dea8bb63 100644 --- a/projects/assets/package.json +++ b/projects/assets/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/assets", - "version": "6.3.0-1", + "version": "6.5.0-1", "homepage": "https://github.com/SAP/spartacus", "repository": "https://github.com/SAP/spartacus/tree/develop/projects/assets", "scripts": { @@ -10,7 +10,7 @@ "generate:translations:ts-2-properties": "ts-node ./generate-translations-ts-2-properties" }, "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "publishConfig": { "access": "public" diff --git a/projects/assets/src/translations/en/product.ts b/projects/assets/src/translations/en/product.ts index a22582bfd6d..3e324c5b76a 100644 --- a/projects/assets/src/translations/en/product.ts +++ b/projects/assets/src/translations/en/product.ts @@ -80,6 +80,8 @@ export const product = { less: 'Show Less Reviews', thankYouForReview: 'Thank you for the review! Note that reviews may require review before appearing here.', + postReviewFail: + 'Something went wrong while posting your review. Please try again later.', }, productCarousel: { carouselLabel: 'Carousel, {{title}}', diff --git a/projects/core/karma.conf.js b/projects/core/karma.conf.js index 20bb029fff1..9a5b7b752c0 100644 --- a/projects/core/karma.conf.js +++ b/projects/core/karma.conf.js @@ -42,6 +42,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/projects/core/package.json b/projects/core/package.json index d4326fac941..87acd73c2ae 100644 --- a/projects/core/package.json +++ b/projects/core/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/core", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Spartacus - the core framework", "keywords": [ "spartacus", @@ -12,19 +12,19 @@ "repository": "https://github.com/SAP/spartacus/tree/develop/projects/core", "license": "Apache-2.0", "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/platform-browser": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/platform-browser": "^15.2.9", + "@angular/router": "^15.2.9", "@ngrx/effects": "^15.3.0", "@ngrx/router-store": "^15.3.0", "@ngrx/store": "^15.3.0", "angular-oauth2-oidc": "^15.0.1", - "i18next": "^21.9.1", - "i18next-http-backend": "^1.4.1", + "i18next": "^21.10.0", + "i18next-http-backend": "^1.4.5", "i18next-resources-to-backend": "^1.1.2", "rxjs": "^6.6.0" }, diff --git a/projects/core/src/cms/config/cms-config.ts b/projects/core/src/cms/config/cms-config.ts index 1f9e623082e..9c0ec6eb06e 100644 --- a/projects/core/src/cms/config/cms-config.ts +++ b/projects/core/src/cms/config/cms-config.ts @@ -41,6 +41,8 @@ export interface JspIncludeCmsComponentConfig { export const JSP_INCLUDE_CMS_COMPONENT_TYPE = 'JspIncludeComponent'; export const CMS_FLEX_COMPONENT_TYPE = 'CMSFlexComponent'; + +/** @deprecated - unused since 6.5. Now `SmartEditLauncher` is responsible for triggering the lazy loading of the `SMART_EDIT_FEATURE` */ export const SMART_EDIT_DUMMY_COMPONENT_TYPE = 'SmartEditDummyCMSComponent'; /** diff --git a/projects/core/src/product/store/actions/product-references.action.ts b/projects/core/src/product/store/actions/product-references.action.ts index a823d671b1f..78feecbdfca 100644 --- a/projects/core/src/product/store/actions/product-references.action.ts +++ b/projects/core/src/product/store/actions/product-references.action.ts @@ -28,7 +28,7 @@ export class LoadProductReferences implements Action { export class LoadProductReferencesFail implements Action { readonly type = LOAD_PRODUCT_REFERENCES_FAIL; - constructor(public payload: ErrorModel) {} + constructor(public payload?: ErrorModel) {} } export class LoadProductReferencesSuccess implements Action { diff --git a/projects/core/src/product/store/actions/product-reviews.action.ts b/projects/core/src/product/store/actions/product-reviews.action.ts index a40d3851578..a2cd3e0234b 100644 --- a/projects/core/src/product/store/actions/product-reviews.action.ts +++ b/projects/core/src/product/store/actions/product-reviews.action.ts @@ -5,7 +5,7 @@ */ import { Action } from '@ngrx/store'; -import { ErrorModel } from '../../../model/misc.model'; +import { ErrorModel, HttpErrorModel } from '../../../model/misc.model'; import { Review } from '../../../model/product.model'; export const LOAD_PRODUCT_REVIEWS = '[Product] Load Product Reviews Data'; @@ -25,7 +25,7 @@ export class LoadProductReviews implements Action { export class LoadProductReviewsFail implements Action { readonly type = LOAD_PRODUCT_REVIEWS_FAIL; - constructor(public payload: ErrorModel) {} + constructor(public payload?: ErrorModel) {} } export class LoadProductReviewsSuccess implements Action { @@ -40,7 +40,7 @@ export class PostProductReview implements Action { export class PostProductReviewFail implements Action { readonly type = POST_PRODUCT_REVIEW_FAIL; - constructor(public payload: string) {} + constructor(public payload?: HttpErrorModel) {} } export class PostProductReviewSuccess implements Action { diff --git a/projects/core/src/product/store/effects/product-references.effect.ts b/projects/core/src/product/store/effects/product-references.effect.ts index 630a755d639..01f026fa708 100644 --- a/projects/core/src/product/store/effects/product-references.effect.ts +++ b/projects/core/src/product/store/effects/product-references.effect.ts @@ -4,16 +4,18 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Injectable } from '@angular/core'; +import { inject, Injectable } from '@angular/core'; import { Actions, createEffect, ofType } from '@ngrx/effects'; import { Observable, of } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; -import { ErrorModel } from '../../../model/misc.model'; import { ProductReferencesConnector } from '../../connectors/references/product-references.connector'; import { ProductActions } from '../actions/index'; +import { normalizeHttpError } from '../../../util/normalize-http-error'; +import { LoggerService } from '../../../logger'; @Injectable() export class ProductReferencesEffects { + protected logger = inject(LoggerService); loadProductReferences$: Observable< | ProductActions.LoadProductReferencesSuccess | ProductActions.LoadProductReferencesFail @@ -31,11 +33,11 @@ export class ProductReferencesEffects { list: data, }); }), - catchError((_error) => + catchError((error) => of( - new ProductActions.LoadProductReferencesFail({ - message: payload.productCode, - } as ErrorModel) + new ProductActions.LoadProductReferencesFail( + normalizeHttpError(error, this.logger) + ) ) ) ); diff --git a/projects/core/src/product/store/effects/product-reviews.effect.spec.ts b/projects/core/src/product/store/effects/product-reviews.effect.spec.ts index b2f0cc81c6c..ec8ac6a5bd9 100644 --- a/projects/core/src/product/store/effects/product-reviews.effect.spec.ts +++ b/projects/core/src/product/store/effects/product-reviews.effect.spec.ts @@ -9,12 +9,12 @@ import { import { cold, hot } from 'jasmine-marbles'; import { Observable, of } from 'rxjs'; import { Review } from '../../../model/product.model'; -import { defaultOccProductConfig } from '../../../occ/adapters/product/default-occ-product-config'; -import { OccConfig } from '../../../occ/config/occ-config'; import { ProductActions } from '../actions/index'; import * as fromEffects from '../effects/product-reviews.effect'; -import { ProductReviewsConnector } from '../../connectors/index'; +import { defaultOccProductConfig } from '../../../occ/adapters/product/default-occ-product-config'; import createSpy = jasmine.createSpy; +import { OccConfig } from '../../../occ/config/occ-config'; +import { ProductReviewsConnector } from '../../connectors/reviews/product-reviews.connector'; const reviewData: Review[] = [ { @@ -27,21 +27,13 @@ const reviewData: Review[] = [ }, ]; -const MockOccModuleConfig: OccConfig = { - backend: { - occ: { - baseUrl: '', - prefix: '', - }, - }, -}; +class GlobalMessageServiceMock { + add(_message: GlobalMessage): void {} +} class MockProductReviewsConnector { get = createSpy('getList').and.returnValue(of(reviewData)); -} - -class GlobalMessageServiceMock { - add(_message: GlobalMessage): void {} + add = createSpy('addReview').and.returnValue(of({})); } describe('Product reviews effect', () => { @@ -56,7 +48,6 @@ describe('Product reviews effect', () => { provide: ProductReviewsConnector, useClass: MockProductReviewsConnector, }, - { provide: OccConfig, useValue: MockOccModuleConfig }, { provide: OccConfig, useValue: defaultOccProductConfig }, fromEffects.ProductReviewsEffects, provideMockActions(() => actions$), @@ -68,7 +59,7 @@ describe('Product reviews effect', () => { }); describe('loadProductReviews$', () => { - it('should return specified product reviews', () => { + it('should return specified product reviews on success', () => { const productCode = '12345'; const action = new ProductActions.LoadProductReviews(productCode); const completion = new ProductActions.LoadProductReviewsSuccess({ @@ -82,4 +73,17 @@ describe('Product reviews effect', () => { expect(effects.loadProductReviews$).toBeObservable(expected); }); }); + + describe('postProductReview', () => { + it('should post a product review and return success action on success', () => { + const reviewPayload = { productCode: '12345', review: {} }; + const action = new ProductActions.PostProductReview(reviewPayload); + const completion = new ProductActions.PostProductReviewSuccess({}); + + actions$ = hot('-a', { a: action }); + const expected = cold('-b', { b: completion }); + + expect(effects.postProductReview).toBeObservable(expected); + }); + }); }); diff --git a/projects/core/src/product/store/effects/product-reviews.effect.ts b/projects/core/src/product/store/effects/product-reviews.effect.ts index c9aad4da941..81b1cfdd3bf 100644 --- a/projects/core/src/product/store/effects/product-reviews.effect.ts +++ b/projects/core/src/product/store/effects/product-reviews.effect.ts @@ -4,20 +4,22 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Injectable } from '@angular/core'; +import { inject, Injectable } from '@angular/core'; import { Actions, createEffect, ofType } from '@ngrx/effects'; import { Observable, of } from 'rxjs'; import { catchError, map, mergeMap, tap } from 'rxjs/operators'; -import { ErrorModel } from '../../../model/misc.model'; import { ProductReviewsConnector } from '../../connectors/reviews/product-reviews.connector'; import { ProductActions } from '../actions/index'; import { GlobalMessageService, GlobalMessageType, } from '../../../global-message/index'; +import { normalizeHttpError } from '../../../util/normalize-http-error'; +import { LoggerService } from '../../../logger'; @Injectable() export class ProductReviewsEffects { + protected logger = inject(LoggerService); loadProductReviews$: Observable< | ProductActions.LoadProductReviewsSuccess | ProductActions.LoadProductReviewsFail @@ -33,11 +35,11 @@ export class ProductReviewsEffects { list: data, }); }), - catchError((_error) => + catchError((error) => of( - new ProductActions.LoadProductReviewsFail({ - message: productCode, - } as ErrorModel) + new ProductActions.LoadProductReviewsFail( + normalizeHttpError(error, this.logger) + ) ) ) ); @@ -61,8 +63,12 @@ export class ProductReviewsEffects { reviewResponse ); }), - catchError((_error) => - of(new ProductActions.PostProductReviewFail(payload.productCode)) + catchError((error) => + of( + new ProductActions.PostProductReviewFail( + normalizeHttpError(error, this.logger) + ) + ) ) ); }) @@ -83,6 +89,20 @@ export class ProductReviewsEffects { { dispatch: false } ); + showGlobalMessageOnPostProductReviewFail$ = createEffect( + () => + this.actions$.pipe( + ofType(ProductActions.POST_PRODUCT_REVIEW_FAIL), + tap(() => { + this.globalMessageService.add( + { key: 'productReview.postReviewFail' }, + GlobalMessageType.MSG_TYPE_ERROR + ); + }) + ), + { dispatch: false } + ); + constructor( private actions$: Actions, private productReviewsConnector: ProductReviewsConnector, diff --git a/projects/core/src/product/store/effects/product.effect.ts b/projects/core/src/product/store/effects/product.effect.ts index 87582569f82..3192d8fe193 100644 --- a/projects/core/src/product/store/effects/product.effect.ts +++ b/projects/core/src/product/store/effects/product.effect.ts @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Injectable, inject } from '@angular/core'; +import { inject, Injectable } from '@angular/core'; import { Actions, createEffect, ofType } from '@ngrx/effects'; import { Action } from '@ngrx/store'; -import { Observable, merge, of } from 'rxjs'; +import { merge, Observable, of } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; import { AuthActions } from '../../../auth/user-auth/store/actions'; import { LoggerService } from '../../../logger'; @@ -49,7 +49,7 @@ export class ProductEffects { merge( ...this.productConnector .getMany(products) - .map(this.productLoadEffect) + .map((productLoad) => this.productLoadEffect(productLoad)) ) ), withdrawOn(this.contextChange$) diff --git a/projects/core/src/state/utils/entity-loader/entity-loader.action.ts b/projects/core/src/state/utils/entity-loader/entity-loader.action.ts index bf9347e25c1..4e222f5f7c9 100644 --- a/projects/core/src/state/utils/entity-loader/entity-loader.action.ts +++ b/projects/core/src/state/utils/entity-loader/entity-loader.action.ts @@ -5,7 +5,7 @@ */ import { Action } from '@ngrx/store'; -import { entityMeta, EntityMeta } from '../entity/entity.action'; +import { EntityId, entityMeta, EntityMeta } from '../entity/entity.action'; import { failMeta, LoaderMeta, @@ -28,7 +28,7 @@ export interface EntityLoaderAction extends Action { export function entityLoadMeta( entityType: string, - id: string | string[] | null + id: EntityId ): EntityLoaderMeta { return { ...loadMeta(entityType), @@ -38,7 +38,7 @@ export function entityLoadMeta( export function entityFailMeta( entityType: string, - id: string | string[] | null, + id: EntityId, error?: any ): EntityLoaderMeta { return { @@ -49,7 +49,7 @@ export function entityFailMeta( export function entitySuccessMeta( entityType: string, - id: string | string[] | null + id: EntityId ): EntityLoaderMeta { return { ...successMeta(entityType), @@ -59,7 +59,7 @@ export function entitySuccessMeta( export function entityResetMeta( entityType: string, - id?: string | string[] | null + id?: EntityId ): EntityLoaderMeta { return { ...resetMeta(entityType), @@ -70,7 +70,7 @@ export function entityResetMeta( export class EntityLoadAction implements EntityLoaderAction { type = ENTITY_LOAD_ACTION; readonly meta: EntityLoaderMeta; - constructor(entityType: string, id: string | string[] | null) { + constructor(entityType: string, id: EntityId) { this.meta = entityLoadMeta(entityType, id); } } @@ -78,7 +78,7 @@ export class EntityLoadAction implements EntityLoaderAction { export class EntityFailAction implements EntityLoaderAction { type = ENTITY_FAIL_ACTION; readonly meta: EntityLoaderMeta; - constructor(entityType: string, id: string | string[] | null, error?: any) { + constructor(entityType: string, id: EntityId, error?: any) { this.meta = entityFailMeta(entityType, id, error); } } @@ -86,11 +86,7 @@ export class EntityFailAction implements EntityLoaderAction { export class EntitySuccessAction implements EntityLoaderAction { type = ENTITY_SUCCESS_ACTION; readonly meta: EntityLoaderMeta; - constructor( - entityType: string, - id: string | string[] | null, - public payload?: any - ) { + constructor(entityType: string, id: EntityId, public payload?: any) { this.meta = entitySuccessMeta(entityType, id); } } @@ -98,7 +94,7 @@ export class EntitySuccessAction implements EntityLoaderAction { export class EntityLoaderResetAction implements EntityLoaderAction { type = ENTITY_RESET_ACTION; readonly meta: EntityLoaderMeta; - constructor(entityType: string, id: string | string[] | null) { + constructor(entityType: string, id: EntityId) { this.meta = entityResetMeta(entityType, id); } } diff --git a/projects/core/src/state/utils/entity/entity.action.ts b/projects/core/src/state/utils/entity/entity.action.ts index 066576c55bb..0ef2e395d43 100644 --- a/projects/core/src/state/utils/entity/entity.action.ts +++ b/projects/core/src/state/utils/entity/entity.action.ts @@ -9,26 +9,22 @@ import { Action } from '@ngrx/store'; export const ENTITY_REMOVE_ACTION = '[ENTITY] REMOVE'; export const ENTITY_REMOVE_ALL_ACTION = '[ENTITY] REMOVE ALL'; +export type EntityId = string | string[] | null; + export interface EntityMeta { entityType: string; - entityId?: string | string[] | null; + entityId?: EntityId; entityRemove?: boolean; } -export function entityMeta( - type: string, - id?: string | string[] | null -): EntityMeta { +export function entityMeta(type: string, id?: EntityId): EntityMeta { return { entityType: type, entityId: id, }; } -export function entityRemoveMeta( - type: string, - id: string | string[] | null -): EntityMeta { +export function entityRemoveMeta(type: string, id: EntityId): EntityMeta { return { entityId: id, entityType: type, @@ -52,7 +48,7 @@ export interface EntityAction extends Action { export class EntityRemoveAction implements EntityAction { type = ENTITY_REMOVE_ACTION; readonly meta: EntityMeta; - constructor(entityType: string, id: string | string[] | null) { + constructor(entityType: string, id: EntityId) { this.meta = entityRemoveMeta(entityType, id); } } diff --git a/projects/schematics/package.json b/projects/schematics/package.json index 5ac1582093d..50f6adee320 100644 --- a/projects/schematics/package.json +++ b/projects/schematics/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/schematics", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Spartacus schematics", "keywords": [ "spartacus", @@ -16,17 +16,17 @@ "test": "npm run clean && ../../node_modules/.bin/jest --config ./jest.schematics.config.js" }, "dependencies": { - "@angular/pwa": "^15.2.4", + "@angular/pwa": "^15.2.9", "@nguniversal/express-engine": "^15.2.0", "semver": "^7.5.2", "ts-morph": "^9.1.0", - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/core": "^15.2.4", - "@angular-devkit/schematics": "^15.2.4", - "@angular/compiler": "^15.2.4", - "@schematics/angular": "^15.2.4", + "@angular-devkit/core": "^15.2.9", + "@angular-devkit/schematics": "^15.2.9", + "@angular/compiler": "^15.2.9", + "@schematics/angular": "^15.2.9", "jsonc-parser": "^3.2.0", "parse5": "^6.0.1", "typescript": "^4.8.2" @@ -52,6 +52,7 @@ "@spartacus/checkout", "@spartacus/order", "@spartacus/organization", + "@spartacus/pdf-invoices", "@spartacus/product", "@spartacus/product-configurator", "@spartacus/qualtrics", diff --git a/projects/schematics/src/add-spartacus/schema.json b/projects/schematics/src/add-spartacus/schema.json index 9f579571068..f6616728f58 100644 --- a/projects/schematics/src/add-spartacus/schema.json +++ b/projects/schematics/src/add-spartacus/schema.json @@ -41,6 +41,7 @@ "Bulk-Pricing", "Image-Zoom", "Future-Stock", + "PDF-Invoices", "Product-Variants", "VC-Configurator", "Textfield-Configurator", @@ -193,6 +194,10 @@ "value": "CPQ-Configurator", "label": "Product Configurator - CPQ Configurator (b2b feature)" }, + { + "value": "PDF-Invoices", + "label": "PDF Invoices" + }, { "value": "Qualtrics", "label": "Qualtrics" diff --git a/projects/schematics/src/dependencies.json b/projects/schematics/src/dependencies.json index 5c73395ce23..7377a7acaec 100644 --- a/projects/schematics/src/dependencies.json +++ b/projects/schematics/src/dependencies.json @@ -1,332 +1,343 @@ { "@spartacus/assets": {}, "@spartacus/core": { - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/platform-browser": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/platform-browser": "^15.2.9", + "@angular/router": "^15.2.9", "@ngrx/effects": "^15.3.0", "@ngrx/router-store": "^15.3.0", "@ngrx/store": "^15.3.0", "angular-oauth2-oidc": "^15.0.1", - "i18next": "^21.9.1", - "i18next-http-backend": "^1.4.1", + "i18next": "^21.10.0", + "i18next-http-backend": "^1.4.5", "i18next-resources-to-backend": "^1.1.2", "rxjs": "^6.6.0" }, "@spartacus/schematics": { - "@angular-devkit/core": "^15.2.4", - "@angular-devkit/schematics": "^15.2.4", - "@angular/compiler": "^15.2.4", - "@schematics/angular": "^15.2.4", + "@angular-devkit/core": "^15.2.9", + "@angular-devkit/schematics": "^15.2.9", + "@angular/compiler": "^15.2.9", + "@schematics/angular": "^15.2.9", "jsonc-parser": "^3.2.0", "parse5": "^6.0.1", "typescript": "^4.8.2" }, "storefrontapp-e2e-cypress": {}, "@spartacus/storefront": { - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/platform-browser": "^15.2.4", - "@angular/router": "^15.2.4", - "@angular/service-worker": "^15.2.4", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/platform-browser": "^15.2.9", + "@angular/router": "^15.2.9", + "@angular/service-worker": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/router-store": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/core": "6.3.0-1", + "@spartacus/core": "6.5.0-1", "ngx-infinite-scroll": "^15.0.0", "rxjs": "^6.6.0" }, "@spartacus/styles": { "@fontsource/open-sans": "^4.5.14", - "@fortawesome/fontawesome-free": "5.8.1", + "@fortawesome/fontawesome-free": "6.4.2", "@ng-select/ng-select": "^10.0.3", "bootstrap": "^4.6.2" }, "@spartacus/setup": { - "@angular/core": "^15.2.4", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/user": "6.3.0-1" + "@angular/core": "^15.2.9", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/user": "6.5.0-1" }, "@spartacus/asm": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/cart": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, "@spartacus/checkout": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, "@spartacus/customer-ticketing": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/order": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/organization": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, + "@spartacus/pdf-invoices": { + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "rxjs": "^6.6.0" + }, "@spartacus/pickup-in-store": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefinder": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefinder": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, "@spartacus/product": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/router": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/router": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, "@spartacus/product-configurator": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/checkout": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/checkout": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/qualtrics": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, "@spartacus/requested-delivery-date": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@spartacus/cart": "6.3.0-1", - "@spartacus/checkout": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@spartacus/cart": "6.5.0-1", + "@spartacus/checkout": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/smartedit": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/storefinder": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, "@spartacus/tracking": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/user": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/store": "^15.3.0", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/cdc": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/asm": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/organization": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/user": "6.3.0-1", + "@spartacus/asm": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/organization": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/user": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/cds": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/router": "^15.2.9", "@ngrx/store": "^15.3.0", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/order": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/tracking": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/order": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/tracking": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/digital-payments": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@ng-select/ng-select": "^10.0.3", - "@spartacus/cart": "6.3.0-1", - "@spartacus/checkout": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/checkout": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/epd-visualization": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/router": "^15.2.4", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/router": "^15.2.9", "@sapui5/ts-types-esm": "1.108.14", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "bootstrap": "^4.6.2", "rxjs": "^6.6.0" }, @@ -349,57 +360,58 @@ "rxjs": "^6.6.0" }, "@spartacus/s4om": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/cart": "6.3.0-1", - "@spartacus/core": "6.3.0-1", - "@spartacus/requested-delivery-date": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", - "@spartacus/storefront": "6.3.0-1", - "@spartacus/styles": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/cart": "6.5.0-1", + "@spartacus/core": "6.5.0-1", + "@spartacus/pdf-invoices": "6.5.0-1", + "@spartacus/requested-delivery-date": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", + "@spartacus/storefront": "6.5.0-1", + "@spartacus/styles": "6.5.0-1", "rxjs": "^6.6.0" }, "@spartacus/segment-refs": { - "@angular-devkit/schematics": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@spartacus/core": "6.3.0-1", - "@spartacus/schematics": "6.3.0-1", + "@angular-devkit/schematics": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@spartacus/core": "6.5.0-1", + "@spartacus/schematics": "6.5.0-1", "rxjs": "^6.6.0" }, "storefrontapp": { - "@angular/animations": "^15.2.4", - "@angular/common": "^15.2.4", - "@angular/compiler": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/platform-browser": "^15.2.4", - "@angular/platform-browser-dynamic": "^15.2.4", - "@angular/platform-server": "^15.2.4", - "@angular/pwa": "^15.2.4", - "@angular/router": "^15.2.4", - "@angular/service-worker": "^15.2.4", + "@angular/animations": "^15.2.9", + "@angular/common": "^15.2.9", + "@angular/compiler": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/platform-browser": "^15.2.9", + "@angular/platform-browser-dynamic": "^15.2.9", + "@angular/platform-server": "^15.2.9", + "@angular/pwa": "^15.2.9", + "@angular/router": "^15.2.9", + "@angular/service-worker": "^15.2.9", "@fontsource/open-sans": "^4.5.14", - "@fortawesome/fontawesome-free": "5.8.1", + "@fortawesome/fontawesome-free": "6.4.2", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/router-store": "^15.3.0", "@ngrx/store": "^15.3.0", "@nguniversal/express-engine": "^15.2.0", - "@types/google.maps": "^3.49.2", + "@types/google.maps": "^3.54.0", "angular-oauth2-oidc": "^15.0.1", "bootstrap": "^4.6.2", "comment-json": "^4.2.3", "express": "^4.18.2", "hamburgers": "^1.2.1", - "i18next": "^21.9.1", - "i18next-http-backend": "^1.4.1", + "i18next": "^21.10.0", + "i18next-http-backend": "^1.4.5", "i18next-resources-to-backend": "^1.1.2", "ngx-infinite-scroll": "^15.0.0", "rxjs": "^6.6.0", - "ts-loader": "^9.3.1", - "tslib": "^2.4.0", - "zone.js": "~0.11.8" + "ts-loader": "^9.4.4", + "tslib": "^2.6.2", + "zone.js": "~0.12.0" } } diff --git a/projects/schematics/src/migrations/migrations.json b/projects/schematics/src/migrations/migrations.json index 01112d36515..f8815c12d67 100644 --- a/projects/schematics/src/migrations/migrations.json +++ b/projects/schematics/src/migrations/migrations.json @@ -139,52 +139,52 @@ }, "00-migration-v6-ssr": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/ssr/ssr#migrate", "description": "Updates the SSR setup" }, "01-migration-v6-config-deprecations": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/config-deprecations/config-deprecations#migrate", "description": "Handle deprecated configuration properties" }, "02-migration-v6-constructor-deprecations": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/constructor-deprecations/constructor-deprecations#migrate", "description": "Add or remove constructor parameters" }, "03-migration-v6-css": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/css/css#migrate", "description": "Handle deprecated CSS" }, "04-migration-v6-dependency-management": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/dependency-management/dependency-management#migrate", "description": "Update dependencies" }, "05-migration-v6-methods-and-properties-deprecations": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/methods-and-properties-deprecations/methods-and-properties-deprecations#migrate", "description": "Comment about usage of removed public methods or properties" }, "06-migration-v6-missing-packages": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/missing-packages/missing-packages#migrate", "description": "Check missing packages" }, "07-migration-v6-removed-public-api-deprecations": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/removed-public-api-deprecations/removed-public-api-deprecations#migrate", "description": "Comment about usage of removed public api" }, "08-migration-v6-rename-symbol": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/rename-symbol/rename-symbol#migrate", "description": "Rename import symbols that were moved/changed in majors" }, "09-migration-v6-angular-json-styling": { - "version": "6.3.0-1", + "version": "6.5.0-1", "factory": "./6_0/angular-json-styles/angular-json-styles#migrate", "description": "Update the angular.json with the style preprocessor options" } diff --git a/projects/schematics/src/ng-add/__snapshots__/index_spec.ts.snap b/projects/schematics/src/ng-add/__snapshots__/index_spec.ts.snap index 0167385ada7..f0720fff3e4 100644 --- a/projects/schematics/src/ng-add/__snapshots__/index_spec.ts.snap +++ b/projects/schematics/src/ng-add/__snapshots__/index_spec.ts.snap @@ -53,35 +53,35 @@ exports[`Spartacus Schematics: ng-add should add spartacus properly with SSR 2`] "@angular/forms": "^15.2.0", "@angular/platform-browser": "^15.2.0", "@angular/platform-browser-dynamic": "^15.2.0", - "@angular/platform-server": "^15.2.4", + "@angular/platform-server": "^15.2.9", "@angular/router": "^15.2.0", - "@angular/service-worker": "^15.2.4", + "@angular/service-worker": "^15.2.9", "@fontsource/open-sans": "^4.5.14", - "@fortawesome/fontawesome-free": "5.8.1", + "@fortawesome/fontawesome-free": "6.4.2", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/router-store": "^15.3.0", "@ngrx/store": "^15.3.0", "@nguniversal/express-engine": "^15.2.0", - "@spartacus/assets": "~6.3.0-1", - "@spartacus/core": "~6.3.0-1", - "@spartacus/setup": "~6.3.0-1", - "@spartacus/storefront": "~6.3.0-1", - "@spartacus/styles": "~6.3.0-1", + "@spartacus/assets": "~6.5.0-1", + "@spartacus/core": "~6.5.0-1", + "@spartacus/setup": "~6.5.0-1", + "@spartacus/storefront": "~6.5.0-1", + "@spartacus/styles": "~6.5.0-1", "angular-oauth2-oidc": "^15.0.1", "bootstrap": "^4.6.2", "express": "^4.15.2", - "i18next": "^21.9.1", - "i18next-http-backend": "^1.4.1", + "i18next": "^21.10.0", + "i18next-http-backend": "^1.4.5", "i18next-resources-to-backend": "^1.1.2", "ngx-infinite-scroll": "^15.0.0", "rxjs": "^6.6.0", - "ts-loader": "^9.3.1", + "ts-loader": "^9.4.4", "tslib": "^2.3.0", "zone.js": "~0.12.0" }, "devDependencies": { - "@angular-devkit/build-angular": "^15.2.4", + "@angular-devkit/build-angular": "^15.2.9", "@angular/cli": "~0.5.0", "@angular/compiler-cli": "^15.2.0", "@nguniversal/builders": "^15.2.0", diff --git a/projects/schematics/src/shared/lib-configs/integration-libs/s4om-schematics-config.ts b/projects/schematics/src/shared/lib-configs/integration-libs/s4om-schematics-config.ts index c6231296800..b6466041d5e 100644 --- a/projects/schematics/src/shared/lib-configs/integration-libs/s4om-schematics-config.ts +++ b/projects/schematics/src/shared/lib-configs/integration-libs/s4om-schematics-config.ts @@ -7,6 +7,8 @@ import { CART_BASE_FEATURE_NAME, ORDER_FEATURE_NAME, + PDF_INVOICES_FEATURE_NAME, + REQUESTED_DELIVERY_DATE_FEATURE_NAME, S4OM_FEATURE_NAME, SPARTACUS_S4OM, SPARTACUS_S4OM_ASSETS, @@ -48,5 +50,10 @@ export const S4OM_SCHEMATICS_CONFIG: SchematicConfig = { chunks: S4OM_TRANSLATION_CHUNKS_CONFIG, importPath: SPARTACUS_S4OM_ASSETS, }, - dependencyFeatures: [CART_BASE_FEATURE_NAME, ORDER_FEATURE_NAME], + dependencyFeatures: [ + CART_BASE_FEATURE_NAME, + ORDER_FEATURE_NAME, + REQUESTED_DELIVERY_DATE_FEATURE_NAME, + PDF_INVOICES_FEATURE_NAME, + ], }; diff --git a/projects/schematics/src/shared/lib-configs/pdf-invoices-schematics-config.ts b/projects/schematics/src/shared/lib-configs/pdf-invoices-schematics-config.ts new file mode 100644 index 00000000000..7e75d23cd1c --- /dev/null +++ b/projects/schematics/src/shared/lib-configs/pdf-invoices-schematics-config.ts @@ -0,0 +1,57 @@ +/* + * SPDX-FileCopyrightText: 2022 SAP Spartacus team + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + PDF_INVOICES_FEATURE_NAME, + SPARTACUS_PDF_INVOICES, + SPARTACUS_PDF_INVOICES_ASSETS, + SPARTACUS_PDF_INVOICES_ROOT, + SPARTACUS_REQUESTED_DELIVERY_DATE, + USER_PROFILE_FEATURE_NAME, +} from '../libs-constants'; +import { SchematicConfig } from '../utils/lib-utils'; + +export const PDF_INVOICES_FEATURE_NAME_CONSTANT = 'PDF_INVOICES_FEATURE'; +export const PDF_INVOICES_FOLDER_NAME = 'pdf-invoices'; +export const PDF_INVOICES_TRANSLATIONS = 'pdfInvoicesTranslations'; +export const PDF_INVOICES_TRANSLATION_CHUNKS_CONFIG = + 'pdfInvoicesTranslationChunksConfig'; +export const PDF_INVOICES_ROOT_MODULE = 'PDFInvoicesRootModule'; +export const PDF_INVOICES_MODULE = 'PDFInvoicesModule'; + +export const PDF_INVOICES_SCSS_FILE_NAME = 'pdf-invoices.scss'; + +export const PDF_INVOICES_SCHEMATICS_CONFIG: SchematicConfig = { + library: { + featureName: PDF_INVOICES_FEATURE_NAME, + mainScope: SPARTACUS_REQUESTED_DELIVERY_DATE, + }, + folderName: PDF_INVOICES_FOLDER_NAME, + moduleName: PDF_INVOICES_MODULE, + featureModule: { + name: PDF_INVOICES_MODULE, + importPath: SPARTACUS_PDF_INVOICES, + }, + rootModule: { + name: PDF_INVOICES_ROOT_MODULE, + importPath: SPARTACUS_PDF_INVOICES_ROOT, + }, + styles: { + scssFileName: PDF_INVOICES_SCSS_FILE_NAME, + importStyle: SPARTACUS_PDF_INVOICES, + }, + lazyLoadingChunk: { + moduleSpecifier: SPARTACUS_PDF_INVOICES_ROOT, + namedImports: [PDF_INVOICES_FEATURE_NAME_CONSTANT], + }, + i18n: { + resources: PDF_INVOICES_TRANSLATIONS, + chunks: PDF_INVOICES_TRANSLATION_CHUNKS_CONFIG, + importPath: SPARTACUS_PDF_INVOICES_ASSETS, + }, + dependencyFeatures: [USER_PROFILE_FEATURE_NAME], +}; diff --git a/projects/schematics/src/shared/libs-constants.ts b/projects/schematics/src/shared/libs-constants.ts index 637d6f4cbdc..85dbc3780bd 100644 --- a/projects/schematics/src/shared/libs-constants.ts +++ b/projects/schematics/src/shared/libs-constants.ts @@ -131,6 +131,10 @@ export const SPARTACUS_FUTURE_STOCK = `@spartacus/product/future-stock`; export const SPARTACUS_FUTURE_STOCK_ROOT = `@spartacus/product/future-stock/root`; export const SPARTACUS_FUTURE_STOCK_ASSETS = `@spartacus/product/future-stock/assets`; +export const SPARTACUS_PDF_INVOICES = `@spartacus/pdf-invoices`; +export const SPARTACUS_PDF_INVOICES_ROOT = `@spartacus/pdf-invoices/root`; +export const SPARTACUS_PDF_INVOICES_ASSETS = `@spartacus/pdf-invoices/assets`; + export const SPARTACUS_PRODUCT_CONFIGURATOR = `@spartacus/product-configurator`; export const SPARTACUS_PRODUCT_CONFIGURATOR_COMMON = `@spartacus/product-configurator/common`; export const SPARTACUS_PRODUCT_CONFIGURATOR_ASSETS = `@spartacus/product-configurator/common/assets`; @@ -273,6 +277,8 @@ export const TRACKING_PERSONALIZATION_FEATURE_NAME = 'Personalization'; export const TRACKING_TMS_GTM_FEATURE_NAME = 'TMS-GTM'; export const TRACKING_TMS_AEP_FEATURE_NAME = 'TMS-AEPL'; +export const PDF_INVOICES_FEATURE_NAME = 'PDF-Invoices'; + export const USER_ACCOUNT_FEATURE_NAME = 'User-Account'; export const USER_PROFILE_FEATURE_NAME = 'User-Profile'; diff --git a/projects/schematics/src/shared/schematics-config-mappings.ts b/projects/schematics/src/shared/schematics-config-mappings.ts index 26a30bde5a2..ceb61031b94 100644 --- a/projects/schematics/src/shared/schematics-config-mappings.ts +++ b/projects/schematics/src/shared/schematics-config-mappings.ts @@ -37,6 +37,7 @@ import { ORGANIZATION_UNIT_ORDER_SCHEMATICS_CONFIG, ORGANIZATION_USER_REGISTRATION_SCHEMATICS_CONFIG, } from './lib-configs/organization-schematics-config'; +import { PDF_INVOICES_SCHEMATICS_CONFIG } from './lib-configs/pdf-invoices-schematics-config'; import { PICKUP_IN_STORE_SCHEMATICS_CONFIG } from './lib-configs/pickup-in-store-schematics-config'; import { PRODUCT_CONFIGURATOR_CPQ_SCHEMATICS_CONFIG, @@ -101,6 +102,8 @@ export const SCHEMATICS_CONFIGS: SchematicConfig[] = [ PRODUCT_VARIANTS_SCHEMATICS_CONFIG, PRODUCT_FUTURE_STOCK_SCHEMATICS_CONFIG, + PDF_INVOICES_SCHEMATICS_CONFIG, + QUALTRICS_SCHEMATICS_CONFIG, REQUESTED_DELIVERY_DATE_SCHEMATICS_CONFIG, diff --git a/projects/schematics/src/shared/utils/graph-utils_spec.ts b/projects/schematics/src/shared/utils/graph-utils_spec.ts index 953d60c42f8..55b75542f50 100644 --- a/projects/schematics/src/shared/utils/graph-utils_spec.ts +++ b/projects/schematics/src/shared/utils/graph-utils_spec.ts @@ -12,6 +12,7 @@ import { SPARTACUS_OPF, SPARTACUS_ORDER, SPARTACUS_ORGANIZATION, + SPARTACUS_PDF_INVOICES, SPARTACUS_PICKUP_IN_STORE, SPARTACUS_PRODUCT, SPARTACUS_PRODUCT_CONFIGURATOR, @@ -132,6 +133,7 @@ describe('Graph utils', () => { SPARTACUS_ORDER, SPARTACUS_CHECKOUT, SPARTACUS_REQUESTED_DELIVERY_DATE, + SPARTACUS_PDF_INVOICES, SPARTACUS_TRACKING, SPARTACUS_ORGANIZATION, SPARTACUS_ASM, @@ -171,6 +173,8 @@ describe('Graph utils', () => { "Personalization", "TMS-AEPL", "TMS-GTM", + "PDF-Invoices", + "Requested-Delivery-Date", "Organization-User-Registration", "Administration", "Account-Summary", @@ -190,7 +194,6 @@ describe('Graph utils', () => { "CDC", "Customer-Ticketing", "SmartEdit", - "Requested-Delivery-Date", "Qualtrics", "Future-Stock", "Product-Variants", diff --git a/projects/schematics/src/shared/utils/test-utils.ts b/projects/schematics/src/shared/utils/test-utils.ts index c1167679f48..c21f0c9826d 100644 --- a/projects/schematics/src/shared/utils/test-utils.ts +++ b/projects/schematics/src/shared/utils/test-utils.ts @@ -55,6 +55,8 @@ export const organizationUnitOrderFeatureModulePath = 'src/app/spartacus/features/organization/organization-unit-order-feature.module.ts'; export const organizationAccountSummaryFeatureModulePath = 'src/app/spartacus/features/organization/organization-account-summary-feature.module.ts'; +export const pdfInvoicesFeatureModulePath = + 'src/app/spartacus/features/pdf-invoices/pdf-invoices-feature.module.ts'; export const productBulkPricingFeatureModulePath = 'src/app/spartacus/features/product/product-bulk-pricing-feature.module.ts'; export const productImageZoomFeatureModulePath = diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cdc/b2b/b2b-register-org.core-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cdc/b2b/b2b-register-org.core-e2e.cy.ts index 216ba80a3d4..73362483372 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cdc/b2b/b2b-register-org.core-e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cdc/b2b/b2b-register-org.core-e2e.cy.ts @@ -4,22 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ -import * as cdc from '../../../../helpers/vendor/cdc/cdc'; -import { - user, - organisation, - getSampleUser, -} from '../../../../sample-data/checkout-flow'; -import { isolateTests } from '../../../../support/utils/test-isolation'; import { fillOrganizationUserRegistrationForm, navigateToOrganizationUserRegisterPage, - submitOrganizationUserRegistrationForm, verifyFormErrors, verifyGlobalMessageAfterRegistration, - verifyRedirectionToLoginPage, verifyTabbingOrder, } from '../../../../helpers/b2b/b2b-user-registration'; +import * as cdc from '../../../../helpers/vendor/cdc/cdc'; +import { + getSampleUser, + organisation, + user, +} from '../../../../sample-data/checkout-flow'; +import { isolateTests } from '../../../../support/utils/test-isolation'; describe('Register B2B Organisation when CDC enabled', () => { describe('Register B2B Organisation with Screenset', () => { @@ -74,6 +72,31 @@ describe('Register B2B Organisation when CDC enabled', () => { // cdc.verifyOrgRegistrationRequestReceived(); }); + describe('Register Organization without phone number (CXINT-2325)', () => { + before(() => { + cy.window().then((win) => win.sessionStorage.clear()); + cy.visit('/'); + }); + + it('should display validation errors if form is empty', () => { + navigateToOrganizationUserRegisterPage(); + let sampleB2BUser = getSampleUser(); + sampleB2BUser.phone = ''; + fillOrganizationUserRegistrationForm( + sampleB2BUser, + 'Please register my account' + ); + + cy.get('cx-user-registration-form').within(() => { + cy.get('button[type=submit]').click(); + }); + + const message = + 'Thank you for registering! A representative will contact you shortly and confirm your access information.'; + verifyGlobalMessageAfterRegistration(message); + }); + }); + describe('Form errors', () => { before(() => { cy.window().then((win) => win.sessionStorage.clear()); diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/pdf-invoices/pdf-invoices.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/pdf-invoices/pdf-invoices.e2e.cy.ts new file mode 100644 index 00000000000..8f49844f2bc --- /dev/null +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/pdf-invoices/pdf-invoices.e2e.cy.ts @@ -0,0 +1,142 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + interceptOrdersEndpoint, + waitForResponse, +} from '../../../helpers/order-history'; +import * as pdfInvoicesHelper from '../../../helpers/vendor/pdf-invoices/pdf-invoices'; +import * as s4Helper from '../../../helpers/vendor/s4om/s4om'; +import { + ORDER_REQUEST_ENDPOINT, + POWERTOOLS_BASESITE, + USER_REQUEST_ENDPOINT, +} from '../../../sample-data/b2b-checkout'; +import { isolateTestsBefore } from '../../../support/utils/test-isolation'; + +describe('PDF Invoices', { testIsolation: false }, () => { + isolateTestsBefore(); + before(() => { + cy.window().then((win) => win.sessionStorage.clear()); + Cypress.env('BASE_SITE', POWERTOOLS_BASESITE); + Cypress.env('OCC_PREFIX_USER_ENDPOINT', USER_REQUEST_ENDPOINT); + Cypress.env('OCC_PREFIX_ORDER_ENDPOINT', ORDER_REQUEST_ENDPOINT); + }); + + beforeEach(() => { + cy.restoreLocalStorage(); + }); + + afterEach(() => { + cy.saveLocalStorage(); + }); + + describe('PDF Invoices in Order History', () => { + it('should be able to login as a b2b user (CXINT-1851)', () => { + s4Helper.loginS4OMB2bUser(); + }); + + it('should be able to view order in order history with PO# (CXINT-1851)', () => { + cy.visit('/my-account/orders'); + const ordersAlias = interceptOrdersEndpoint(); + waitForResponse(ordersAlias); + + const pdfInvoicesOrderId = pdfInvoicesHelper.pdfInvoicesPastOrderId; + cy.wrap(pdfInvoicesOrderId).should('not.be.null'); + s4Helper.findRowInOrderHistoryTable( + ordersAlias, + pdfInvoicesOrderId, + pdfInvoicesHelper.poNumber + ); + }); + + it('should be able to view a past order detail in order detail page with requested delivery date information (CXINT-1851)', () => { + cy.intercept({ + method: 'GET', + pathname: `${Cypress.env('OCC_PREFIX')}/${Cypress.env( + 'BASE_SITE' + )}/users/current/orders/*`, + }).as('getOrderDetail'); + + cy.intercept({ + method: 'GET', + path: `**/users/current/orders/**/invoices?**`, + }).as('getInvoices'); + + const pdfInvoicesOrderId = pdfInvoicesHelper.pdfInvoicesPastOrderId; + cy.visit('/my-account/order/' + pdfInvoicesOrderId); + cy.wait('@getOrderDetail'); + cy.wait('@getInvoices').its('response.statusCode').should('eq', 200); + + s4Helper.reviewB2bOrderDetail( + pdfInvoicesHelper.pdfInvoicesB2bAccountShipToUser, + pdfInvoicesHelper.pdfInvoicesProduct, + pdfInvoicesHelper.cartWithB2bProductAndStandardShipping, + true, + null, + pdfInvoicesHelper.poNumber, + s4Helper.s4omCostCenter, + s4Helper.s4omB2BUnit, + false + ); + + pdfInvoicesHelper.verifyPDFInvoicesOrderDetailPage(); + }); + + it('should be able to traverse pages (CXINT-1851)', () => { + pdfInvoicesHelper.verifyInvoicesTablePagination(); + }); + + it('should be able to sort invoices by date ascending (CXINT-1851)', () => { + pdfInvoicesHelper.verifyInvoicesTableSortByDateAscending(); + }); + + it('should be able to sort invoices by date descending (CXINT-1851)', () => { + pdfInvoicesHelper.verifyInvoicesTableSortByDateDescending(); + }); + + it('should be able to sort invoices by net amount ascending (CXINT-1851)', () => { + pdfInvoicesHelper.verifyInvoicesTableSortByNetAmountAscending(); + }); + + it('should be able to sort invoices by net amount descending (CXINT-1851)', () => { + pdfInvoicesHelper.verifyInvoicesTableSortByNetAmountDescending(); + }); + + it('should be able to sort invoices by total amount ascending (CXINT-1851)', () => { + pdfInvoicesHelper.verifyInvoicesTableSortByTotalAmountAscending(); + }); + + it('should be able to sort invoices by total amount descending (CXINT-1851)', () => { + pdfInvoicesHelper.verifyInvoicesTableSortByTotalAmountDescending(); + }); + + it('should be able to sort invoices by Invoice Number ascending (CXINT-1851)', () => { + pdfInvoicesHelper.verifyInvoicesTableSortByInvoiceNumAscending(); + }); + + it('should be able to sort invoices by Invoice Number descending (CXINT-1851)', () => { + pdfInvoicesHelper.verifyInvoicesTableSortByInvoiceNumDescending(); + }); + + it('should be able to download first invoice (CXINT-1851)', () => { + cy.intercept({ + method: 'GET', + path: `**/users/current/orders/**/invoices?**`, + }).as('getInvoices'); + + const pdfInvoicesOrderId = pdfInvoicesHelper.pdfInvoicesPastOrderId; + cy.visit('/my-account/order/' + pdfInvoicesOrderId); + cy.wait('@getInvoices').its('response.statusCode').should('eq', 200); + + pdfInvoicesHelper.downloadFirstInvoice(); + }); + + it('should be able to download first invoice (CXINT-1851)', () => { + pdfInvoicesHelper.downloadLastInvoiceAcrossPages(); + }); + }); +}); diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/requested-delivery-date/requested-delivery-date.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/requested-delivery-date/requested-delivery-date.e2e.cy.ts index 21aa07b32f4..4f591da89a3 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/requested-delivery-date/requested-delivery-date.e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/requested-delivery-date/requested-delivery-date.e2e.cy.ts @@ -50,45 +50,45 @@ describe('Requested Delivery Date', { testIsolation: false }, () => { }); describe('Requested Delivery Date in Checkout Flow', () => { - it('should be able to login as a b2b user', () => { + it('should be able to login as a b2b user (CXINT-1850)', () => { s4Helper.loginS4OMB2bUser(); }); - it('should add a S4 HANA product (TG-11) to cart', () => { + it('should add a S4 HANA product (TG-11) to cart (CXINT-1850)', () => { s4Helper.resetCart(); //clear the cart s4Helper.addB2bS4ProductToCart(); //Ensure that the cart has only 1 S4 product }); - it('should proceed to checkout and select Account payment type', () => { + it('should proceed to checkout and select Account payment type (CXINT-1850)', () => { s4Helper.proceedtoCheckOutS4Product(); b2bCheckout.enterPONumber(rddHelper.poNumber); b2bCheckout.selectAccountPayment(); }); - it('should select shipping address', () => { + it('should select shipping address (CXINT-1850)', () => { s4Helper.selectS4OMAccountShippingAddress(); }); - it('should select delivery mode and display Request Delivery Date form', () => { + it('should select delivery mode and display Request Delivery Date form (CXINT-1850)', () => { rddHelper.selectAccountDeliveryMode(); }); - it('should show an error when an invalid delivery date is provided', () => { - rddHelper.updateRequestedDeliveryDate('1000-01-01'); + it('should show an error when an invalid delivery date is provided (CXINT-1850)', () => { + rddHelper.updateRequestedDeliveryDate('10000-01-01'); rddHelper.verifyDeliveryDateErrorMessage(); }); - it('should show an info message when the delivery date is updated', () => { + it('should show an info message when the delivery date is updated (CXINT-1850)', () => { rddHelper.updateRequestedDeliveryDate(inputDate); rddHelper.verifyDeliveryDateInfoMessage(); }); - it('should review and display the Requested Delivery Date', () => { + it('should review and display the Requested Delivery Date (CXINT-1850)', () => { rddHelper.proceedToOrderReviewPage(); rddHelper.verifyRDDOrderReviewPage(formattedDate); }); - it('should route back to the select delivery mode step when the edit button is clicked', () => { + it('should route back to the select delivery mode step when the edit button is clicked (CXINT-1850)', () => { rddHelper.editDeliveryMethodOrderReviewPage(); rddHelper.proceedToOrderReviewPage(); }); @@ -108,7 +108,7 @@ describe('Requested Delivery Date', { testIsolation: false }, () => { b2bCheckout.placeOrder('/order-confirmation'); }); - it('should display order confirmation summary page with Requested delivery date', () => { + it('should display order confirmation summary page with Requested delivery date (CXINT-1850)', () => { s4Helper.reviewB2bOrderDetail( s4Helper.s4omB2bAccountShipToUser, s4Helper.s4omProduct, @@ -125,7 +125,7 @@ describe('Requested Delivery Date', { testIsolation: false }, () => { }); describe('Requested Delivery Date in Order History', () => { - it('should be able to view order in order history with PO# and Cost center', () => { + it('should be able to view order in order history with PO# and Cost center (CXINT-1850)', () => { cy.visit('/my-account/orders'); const ordersAlias = interceptOrdersEndpoint(); waitForResponse(ordersAlias); @@ -139,7 +139,7 @@ describe('Requested Delivery Date', { testIsolation: false }, () => { ); }); - it('should be able to view a past order detail in order detail page with requested delivery date information', () => { + it('should be able to view a past order detail in order detail page with requested delivery date information (CXINT-1850)', () => { cy.intercept({ method: 'GET', pathname: `${Cypress.env('OCC_PREFIX')}/${Cypress.env( diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/s4om/s4om-schedule-lines.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/s4om/s4om-schedule-lines.e2e.cy.ts index 18547e65088..e4eaae27eed 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/s4om/s4om-schedule-lines.e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/s4om/s4om-schedule-lines.e2e.cy.ts @@ -38,39 +38,39 @@ describe('S4HANA Order management', { testIsolation: false }, () => { }); describe('Schedule Lines in Checkout Flow', () => { - it('should be able to login as a b2b user', () => { + it('should be able to login as a b2b user (CXINT-472)', () => { s4omHelper.loginS4OMB2bUser(); }); - it('should add a S4 HANA product (TG-11) to cart', () => { + it('should add a S4 HANA product (TG-11) to cart (CXINT-472)', () => { s4omHelper.resetCart(); //clear the cart s4omHelper.addB2bS4ProductToCart(); //Ensure that the cart has only 1 S4OM product }); - it('should show S4 HANA schedule lines in the add to cart popup', () => { + it('should show S4 HANA schedule lines in the add to cart popup (CXINT-472)', () => { s4omHelper.verifyScheduleLineInfo(); }); - it('should show S4 HANA schedule lines in the Cart page', () => { + it('should show S4 HANA schedule lines in the Cart page (CXINT-472)', () => { s4omHelper.goToCart(); s4omHelper.verifyScheduleLineInfo(); }); - it('should proceed to checkout and select Account payment type', () => { + it('should proceed to checkout and select Account payment type (CXINT-472)', () => { s4omHelper.proceedtoCheckOutS4Product(); b2bCheckout.enterPONumber(); b2bCheckout.selectAccountPayment(); }); - it('should select shipping address', () => { + it('should select shipping address (CXINT-472)', () => { s4omHelper.selectS4OMAccountShippingAddress(); }); - it('should select delivery mode', () => { + it('should select delivery mode (CXINT-472)', () => { s4omHelper.selectAccountDeliveryMode(); }); - it('should review and place order', () => { + it('should review and place order (CXINT-472)', () => { b2bCheckout.reviewB2bReviewOrderPage( b2bAccountShipToUser, s4omHelper.cartWithS4OMB2bProductAndPremiumShipping, @@ -82,7 +82,7 @@ describe('S4HANA Order management', { testIsolation: false }, () => { b2bCheckout.placeOrder('/order-confirmation'); }); - it('should display order confirmation summary page with delivery schedule lines', () => { + it('should display order confirmation summary page with delivery schedule lines (CXINT-472)', () => { s4omHelper.reviewB2bOrderDetail( s4omHelper.s4omB2bAccountShipToUser, s4omHelper.s4omProduct, @@ -98,7 +98,7 @@ describe('S4HANA Order management', { testIsolation: false }, () => { }); }); describe('Schedule lines in Order History', () => { - it('should be able to view order in order history with PO# and Cost center', () => { + it('should be able to view order in order history with PO# and Cost center (CXINT-472)', () => { cy.visit('/my-account/orders'); const ordersAlias = interceptOrdersEndpoint(); waitForResponse(ordersAlias); @@ -113,7 +113,7 @@ describe('S4HANA Order management', { testIsolation: false }, () => { ); }); - it('should be able to view a past order detail in order detail page with schedule line delivery information', () => { + it('should be able to view a past order detail in order detail page with schedule line delivery information (CXINT-472)', () => { cy.intercept({ method: 'GET', pathname: `${Cypress.env('OCC_PREFIX')}/${Cypress.env( diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/b2b/b2b-user-registration.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/b2b/b2b-user-registration.ts index 4f8e9d0c873..fca268aed94 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/helpers/b2b/b2b-user-registration.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/b2b/b2b-user-registration.ts @@ -54,7 +54,9 @@ export function fillOrganizationUserRegistrationForm( cy.get('#region-select').ngSelect(address?.state); } - cy.get('[formcontrolname="phoneNumber"]').type(phone); + if (phone) { + cy.get('[formcontrolname="phoneNumber"]').type(phone); + } if (message) { cy.get('[formcontrolname="message"]').type(message); diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/pdf-invoices/pdf-invoices.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/pdf-invoices/pdf-invoices.ts new file mode 100644 index 00000000000..d0156b8cd65 --- /dev/null +++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/pdf-invoices/pdf-invoices.ts @@ -0,0 +1,474 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + SampleCartProduct, + SampleProduct, + SampleUser, +} from '../../../sample-data/checkout-flow'; + +export const pdfInvoicesPastOrderId: string = '200000'; +export const poNumber: string = '111'; + +export const pdfInvoicesB2bAccountShipToUser: SampleUser = { + email: 'james.weber@harvestlive.inc', + password: 'welcome', + fullName: 'Stefan Reviewer', + address: { + city: 'Washington, 200000', + line1: 'Address line0, Washington', + }, +}; + +export const cartWithB2bProductAndStandardShipping: SampleCartProduct = { + estimatedShipping: '$5.26', + total: '$2,094.97', + totalAndShipping: '$2,100.23', +}; + +export const pdfInvoicesProduct: SampleProduct = { + name: 'Plier Set (3 Pack)', + code: '637227', +}; + +export const invoiceA = { + createdAt: '2023-09-16T18:29:59+0000', + invoiceId: '200000a', + netAmount: { + currencyIso: 'USD', + value: 115, + }, + totalAmount: { + currencyIso: 'USD', + value: 117, + }, +}; + +export const invoiceB = { + createdAt: '2023-09-01T18:29:59+0000', + invoiceId: '200000b', + netAmount: { + currencyIso: 'USD', + value: 118, + }, + totalAmount: { + currencyIso: 'USD', + value: 120, + }, +}; + +export const invoiceC = { + createdAt: '2023-07-21T18:29:59+0000', + invoiceId: '200000c', + netAmount: { + currencyIso: 'USD', + value: 398, + }, + totalAmount: { + currencyIso: 'USD', + value: 400, + }, +}; + +export const invoiceD = { + createdAt: '2023-06-23T18:29:59+0000', + invoiceId: '200000d', + netAmount: { + currencyIso: 'USD', + value: 115, + }, + totalAmount: { + currencyIso: 'USD', + value: 117, + }, +}; + +export const invoiceE = { + createdAt: '2023-05-12T18:29:59+0000', + invoiceId: '200000e', + netAmount: { + currencyIso: 'USD', + value: 118, + }, + totalAmount: { + currencyIso: 'USD', + value: 120, + }, +}; + +export const invoiceF = { + createdAt: '2022-12-11T18:29:59+0000', + invoiceId: '200000f', + netAmount: { + currencyIso: 'USD', + value: 398, + }, + totalAmount: { + currencyIso: 'USD', + value: 400, + }, +}; + +export const invoiceG = { + createdAt: '2022-11-08T04:59:59+0000', + invoiceId: '200000g', + netAmount: { + currencyIso: 'USD', + value: 115, + }, + totalAmount: { + currencyIso: 'USD', + value: 117, + }, +}; + +export const invoiceH = { + createdAt: '2022-10-06T03:59:59+0000', + invoiceId: '200000h', + netAmount: { + currencyIso: 'USD', + value: 118, + }, + totalAmount: { + currencyIso: 'USD', + value: 120, + }, +}; + +export const invoiceI = { + createdAt: '2022-06-05T03:59:59+0000', + invoiceId: '200000i', + netAmount: { + currencyIso: 'USD', + value: 398, + }, + totalAmount: { + currencyIso: 'USD', + value: 400, + }, +}; + +export const invoiceJ = { + createdAt: '2022-05-04T03:59:59+0000', + invoiceId: '200000j', + netAmount: { + currencyIso: 'USD', + value: 115, + }, + totalAmount: { + currencyIso: 'USD', + value: 117, + }, +}; + +export const invoiceK = { + createdAt: '2021-04-06T03:59:59+0000', + invoiceId: '200000k', + netAmount: { + currencyIso: 'USD', + value: 118, + }, + totalAmount: { + currencyIso: 'USD', + value: 120, + }, +}; + +export const invoiceL = { + createdAt: '2021-02-02T04:59:59+0000', + invoiceId: '200000l', + netAmount: { + currencyIso: 'USD', + value: 398, + }, + totalAmount: { + currencyIso: 'USD', + value: 400, + }, +}; + +export const invoiceM = { + createdAt: '2019-11-18T04:59:59+0000', + invoiceId: '200000m', + netAmount: { + currencyIso: 'USD', + value: 115, + }, + totalAmount: { + currencyIso: 'USD', + value: 117, + }, +}; + +export const invoiceN = { + createdAt: '2018-12-01T04:59:59+0000', + invoiceId: '200000n', + netAmount: { + currencyIso: 'USD', + value: 118, + }, + totalAmount: { + currencyIso: 'USD', + value: 120, + }, +}; + +export const invoiceO = { + createdAt: '2017-11-22T04:59:59+0000', + invoiceId: '200000o', + netAmount: { + currencyIso: 'USD', + value: 398, + }, + totalAmount: { + currencyIso: 'USD', + value: 400, + }, +}; + +export const invoiceP = { + createdAt: '2016-11-20T04:59:59+0000', + invoiceId: '200000p', + netAmount: { + currencyIso: 'USD', + value: 115, + }, + totalAmount: { + currencyIso: 'USD', + value: 117, + }, +}; + +export const invoiceQ = { + createdAt: '2016-11-18T04:59:59+0000', + invoiceId: '200000q', + netAmount: { + currencyIso: 'USD', + value: 118, + }, + totalAmount: { + currencyIso: 'USD', + value: 120, + }, +}; + +export const initialInvoicesData = { + page1: [invoiceA, invoiceB, invoiceC, invoiceD, invoiceE], + page2: [invoiceF, invoiceG, invoiceH, invoiceI, invoiceJ], + page3: [invoiceK, invoiceL, invoiceM, invoiceN, invoiceO], + page4: [invoiceP, invoiceQ], +}; + +export const sortByDateAscInvoicesData = { + page1: [invoiceQ, invoiceP, invoiceO, invoiceN, invoiceM], + page2: [invoiceL, invoiceK, invoiceJ, invoiceI, invoiceH], + page3: [invoiceG, invoiceF, invoiceE, invoiceD, invoiceC], + page4: [invoiceB, invoiceA], +}; + +export const sortByDateDescInvoicesData = { + ...initialInvoicesData, +}; + +export const sortByNetAmtAscInvoicesData = { + page1: [invoiceP, invoiceA, invoiceD, invoiceJ, invoiceG], + page2: [invoiceM, invoiceE, invoiceK, invoiceH, invoiceB], + page3: [invoiceN, invoiceQ, invoiceO, invoiceC, invoiceI], + page4: [invoiceL, invoiceF], +}; + +export const sortByNetAmtDescInvoicesData = { + page1: [invoiceO, invoiceC, invoiceI, invoiceL, invoiceF], + page2: [invoiceE, invoiceK, invoiceH, invoiceB, invoiceN], + page3: [invoiceQ, invoiceP, invoiceA, invoiceD, invoiceJ], + page4: [invoiceG, invoiceM], +}; + +export const sortByTotalAmtAscInvoicesData = { + ...sortByNetAmtAscInvoicesData, +}; + +export const sortByTotalAmtDescInvoicesData = { + ...sortByNetAmtDescInvoicesData, +}; + +export const sortByInvoiceIdAscInvoicesData = { + ...initialInvoicesData, +}; + +export const sortByInvoiceIdDescInvoicesData = { + page1: [invoiceQ, invoiceP, invoiceO, invoiceN, invoiceM], + page2: [invoiceL, invoiceK, invoiceJ, invoiceI, invoiceH], + page3: [invoiceG, invoiceF, invoiceE, invoiceD, invoiceC], + page4: [invoiceB, invoiceA], +}; + +export function verifyPDFInvoicesOrderDetailPage() { + checkTableData(initialInvoicesData.page1); +} + +export function verifyInvoicesTablePagination( + invoicesData = initialInvoicesData +) { + let index = 2; + + for (let invoiceData in invoicesData) { + checkTableData(invoicesData[invoiceData]); + if (index <= 4) { + moveToNextPage(index); + index += 1; + } + } +} +export function verifyInvoicesTableDownlodPDF() { + throw new Error('Function not implemented.'); +} + +export function verifyInvoicesTableSortByDateAscending() { + clickOnSortOptions('Date Ascending'); + verifyInvoicesTablePagination(sortByDateAscInvoicesData); +} + +export function verifyInvoicesTableSortByDateDescending() { + clickOnSortOptions('Date Descending'); + verifyInvoicesTablePagination(sortByDateDescInvoicesData); +} + +export function verifyInvoicesTableSortByInvoiceNumAscending() { + clickOnSortOptions('Invoice Number Ascending'); + verifyInvoicesTablePagination(sortByInvoiceIdAscInvoicesData); +} + +export function verifyInvoicesTableSortByInvoiceNumDescending() { + clickOnSortOptions('Invoice Number Descending'); + verifyInvoicesTablePagination(sortByInvoiceIdDescInvoicesData); +} + +export function verifyInvoicesTableSortByNetAmountAscending() { + clickOnSortOptions('Net Amount Ascending'); + verifyInvoicesTablePagination(sortByNetAmtAscInvoicesData); +} + +export function verifyInvoicesTableSortByNetAmountDescending() { + clickOnSortOptions('Net Amount Descending'); + verifyInvoicesTablePagination(sortByNetAmtDescInvoicesData); +} + +export function verifyInvoicesTableSortByTotalAmountAscending() { + clickOnSortOptions('Total Amount Ascending'); + verifyInvoicesTablePagination(sortByTotalAmtAscInvoicesData); +} + +export function verifyInvoicesTableSortByTotalAmountDescending() { + clickOnSortOptions('Total Amount Descending'); + verifyInvoicesTablePagination(sortByTotalAmtDescInvoicesData); +} + +export function clickOnSortOptions(sortOptionText: string) { + cy.get('cx-sorting').click(); + cy.get('.ng-option').contains(sortOptionText).click(); +} + +export function checkTableData( + rows: Array<{ + invoiceId?: string; + externalSystemId?: string; + createdAt?: string; + netAmount?: { + currencyIso?: string; + value?: number; + formattedValue?: string; + }; + totalAmount?: { + currencyIso?: string; + value?: number; + formattedValue?: string; + }; + }> +) { + cy.get('.cx-invoices-list-row').its('length').should('eq', rows.length); + + const columns: Array<{ + field: string; + class: string; + occurrence: number; + }> = [ + { field: 'invoiceId', class: 'code', occurrence: 0 }, + { field: 'createdAt', class: 'date', occurrence: 0 }, + { field: 'netAmount', class: 'monetary', occurrence: 0 }, + { field: 'totalAmount', class: 'monetary', occurrence: 1 }, + ]; + // For each row, check each column + rows.forEach((row, rowNumber) => { + columns.forEach((column) => { + //Handle amount fields separately + if ( + (column.field === 'netAmount' || column.field === 'totalAmount') && + row[column.field] + ) { + //handle amount fields + if (row[column.field].formattedValue) { + cy.get('.cx-invoices-list-row') + .eq(rowNumber) + .find(`.cx-invoices-list-${column.class}`) + .eq(column.occurrence) + .contains(row[column.field].formattedValue); + } else { + cy.get('.cx-invoices-list-row') + .eq(rowNumber) + .find(`.cx-invoices-list-${column.class}`) + .eq(column.occurrence) + .contains( + `${row[column.field].currencyIso} ${row[column.field].value}` + ); + } + } else if (column.field === 'createdAt' && row[column.field]) { + //handle date fields + cy.get('.cx-invoices-list-row') + .eq(rowNumber) + .find(`.cx-invoices-list-${column.class}`) + .eq(column.occurrence) + .contains(formatDateToLongLocaleDate(row[column.field])); + } else if (row[column.field]) { + //handle other fields + cy.get('.cx-invoices-list-row') + .eq(rowNumber) + .find(`.cx-invoices-list-${column.class}`) + .eq(column.occurrence) + .contains(row[column.field]); + } + }); + }); +} + +export function downloadFirstInvoice() { + cy.intercept({ + method: 'GET', + path: `**/users/current/**/invoices/**/download**`, + }).as('getAttachments'); + cy.get('.cx-invoices-list-row button').first().click(); + cy.wait('@getAttachments').its('response.statusCode').should('eq', 200); +} + +export function downloadLastInvoiceAcrossPages() { + for (let index = 2; index <= 4; index++) { + downloadFirstInvoice(); + moveToNextPage(index); + } +} + +//Format the date into a long date, eg. September 15, 2023 +export function formatDateToLongLocaleDate(date: string) { + return new Date(date).toLocaleDateString('en', { + year: 'numeric', + month: 'long', + day: 'numeric', + }); +} + +export function moveToNextPage(index: number) { + cy.get('cx-pagination').findByText(index).first().click(); +} diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/requested-delivery-date/requested-delivery-date.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/requested-delivery-date/requested-delivery-date.ts index c3f8432f38b..a074c5f26c9 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/requested-delivery-date/requested-delivery-date.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/requested-delivery-date/requested-delivery-date.ts @@ -99,8 +99,10 @@ export function verifyRDDDatePickerExists() { export function updateRequestedDeliveryDate(date: string) { interceptPutRequestedRetrievalAtEndpoint(); cy.get('cx-date-picker').within(() => { - cy.get('input[type="date"]', { timeout: 3000 }) + cy.get('input', { timeout: 3000 }) .should('not.be.disabled') + .invoke('removeAttr', 'type') + .clear() .type(date) .trigger('update'); }); diff --git a/projects/storefrontapp-e2e-cypress/package-lock.json b/projects/storefrontapp-e2e-cypress/package-lock.json index 1701d2bd87f..a10f3517be8 100644 --- a/projects/storefrontapp-e2e-cypress/package-lock.json +++ b/projects/storefrontapp-e2e-cypress/package-lock.json @@ -12,9 +12,9 @@ "@babel/core": "^7.14.3", "@babel/preset-env": "^7.14.2", "@cypress/webpack-preprocessor": "^5.9.1", - "@testing-library/cypress": "9.0.0", + "@testing-library/cypress": "10.0.1", "babel-loader": "^8.2.2", - "cypress": "12.6.0", + "cypress": "13.2.0", "cypress-file-upload": "^5.0.8", "ts-loader": "^9.4.2", "typescript": "^4.2.4", @@ -1630,9 +1630,9 @@ } }, "node_modules/@cypress/request": { - "version": "2.88.10", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", - "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", "dev": true, "dependencies": { "aws-sign2": "~0.7.0", @@ -1648,9 +1648,9 @@ "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "~6.5.2", + "qs": "6.10.4", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", + "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", "uuid": "^8.3.2" }, @@ -1766,39 +1766,39 @@ } }, "node_modules/@testing-library/cypress": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@testing-library/cypress/-/cypress-9.0.0.tgz", - "integrity": "sha512-c1XiCGeHGGTWn0LAU12sFUfoX3qfId5gcSE2yHode+vsyHDWraxDPALjVnHd4/Fa3j4KBcc5k++Ccy6A9qnkMA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@testing-library/cypress/-/cypress-10.0.1.tgz", + "integrity": "sha512-e8uswjTZIBhaIXjzEcrQQ8nHRWHgZH7XBxKuIWxZ/T7FxfWhCR48nFhUX5nfPizjVOKSThEfOSv67jquc1ASkw==", "dev": true, "dependencies": { "@babel/runtime": "^7.14.6", - "@testing-library/dom": "^8.1.0" + "@testing-library/dom": "^9.0.0" }, "engines": { "node": ">=12", "npm": ">=6" }, "peerDependencies": { - "cypress": "^12.0.0" + "cypress": "^12.0.0 || ^13.0.0" } }, "node_modules/@testing-library/dom": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.13.0.tgz", - "integrity": "sha512-9VHgfIatKNXQNaZTtLnalIy0jNZzY35a4S3oi08YAt9Hv1VsfZ/DfA45lM8D/UhtHBGJ4/lGwp0PZkVndRkoOQ==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.1.tgz", + "integrity": "sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w==", "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", - "@types/aria-query": "^4.2.0", - "aria-query": "^5.0.0", + "@types/aria-query": "^5.0.1", + "aria-query": "5.1.3", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.4.4", + "lz-string": "^1.5.0", "pretty-format": "^27.0.2" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/@testing-library/dom/node_modules/ansi-styles": { @@ -1872,9 +1872,9 @@ } }, "node_modules/@types/aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz", + "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==", "dev": true }, "node_modules/@types/eslint": { @@ -1910,9 +1910,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "14.18.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.18.tgz", - "integrity": "sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig==", + "version": "18.17.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.15.tgz", + "integrity": "sha512-2yrWpBk32tvV/JAd3HNHWuZn/VDN1P+72hWirHnvsvTGSqbANi+kSeuQR9yAHnbvaBvHDsoTdXV0Fe+iRtHLKA==", "dev": true }, "node_modules/@types/sinonjs__fake-timers": { @@ -2220,12 +2220,25 @@ ] }, "node_modules/aria-query": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz", - "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", "dev": true, - "engines": { - "node": ">=6.0" + "dependencies": { + "deep-equal": "^2.0.5" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/asn1": { @@ -2276,6 +2289,18 @@ "node": ">= 4.0.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -2286,9 +2311,9 @@ } }, "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", "dev": true }, "node_modules/babel-loader": { @@ -2671,9 +2696,9 @@ } }, "node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true, "engines": { "node": ">= 6" @@ -2735,7 +2760,7 @@ "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", "dev": true }, "node_modules/cross-spawn": { @@ -2753,15 +2778,15 @@ } }, "node_modules/cypress": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.6.0.tgz", - "integrity": "sha512-WdHSVaS1lumSd5XpVTslZd8ui9GIGphrzvXq9+3DtVhqjRZC5M70gu5SW/Y/SLPq3D1wiXGZoHC6HJ7ESVE2lw==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.2.0.tgz", + "integrity": "sha512-AvDQxBydE771GTq0TR4ZUBvv9m9ffXuB/ueEtpDF/6gOcvFR96amgwSJP16Yhqw6VhmwqspT5nAGzoxxB+D89g==", "dev": true, "hasInstallScript": true, "dependencies": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", + "@types/node": "^18.17.5", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -2773,7 +2798,7 @@ "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", "cli-table3": "~0.6.1", - "commander": "^5.1.0", + "commander": "^6.2.1", "common-tags": "^1.8.0", "dayjs": "^1.10.4", "debug": "^4.3.4", @@ -2791,12 +2816,13 @@ "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", + "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", @@ -2806,7 +2832,7 @@ "cypress": "bin/cypress" }, "engines": { - "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + "node": "^16.0.0 || ^18.0.0 || >=20.0.0" } }, "node_modules/cypress-file-upload": { @@ -2898,9 +2924,9 @@ } }, "node_modules/cypress/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -2930,7 +2956,7 @@ "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "dependencies": { "assert-plus": "^1.0.0" @@ -2962,12 +2988,56 @@ } } }, + "node_modules/deep-equal": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.2.tgz", + "integrity": "sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.1", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-data-property": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", + "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -2981,22 +3051,22 @@ "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk= sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, "engines": { "node": ">=0.4.0" } }, "node_modules/dom-accessibility-api": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.14.tgz", - "integrity": "sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==", + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "dependencies": { "jsbn": "~0.1.0", @@ -3058,6 +3128,26 @@ "node": ">=8.6" } }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-module-lexer": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", @@ -3213,7 +3303,7 @@ "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, "engines": [ "node >=0.6.0" @@ -3297,10 +3387,19 @@ "node": ">=8" } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, "engines": { "node": "*" @@ -3347,6 +3446,15 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -3357,13 +3465,14 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { @@ -3397,7 +3506,7 @@ "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "dependencies": { "assert-plus": "^1.0.0" @@ -3453,6 +3562,18 @@ "node": ">=4" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -3471,6 +3592,15 @@ "node": ">= 0.4.0" } }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -3492,6 +3622,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -3504,6 +3646,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/http-signature": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", @@ -3581,6 +3738,90 @@ "node": ">=10" } }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-ci": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", @@ -3605,6 +3846,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -3630,6 +3886,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -3639,6 +3904,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -3648,6 +3928,43 @@ "node": ">=8" } }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -3660,10 +3977,55 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, "node_modules/is-unicode-supported": { @@ -3678,6 +4040,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3687,7 +4077,7 @@ "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, "node_modules/jest-worker": { @@ -3737,7 +4127,7 @@ "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM= sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, "node_modules/jsesc": { @@ -3773,7 +4163,7 @@ "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, "node_modules/json5": { @@ -4085,9 +4475,9 @@ } }, "node_modules/lz-string": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY= sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "bin": { "lz-string": "bin/bin.js" @@ -4170,10 +4560,13 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/ms": { "version": "2.1.2", @@ -4205,6 +4598,31 @@ "node": ">=8" } }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -4355,7 +4773,7 @@ "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true }, "node_modules/picocolors": { @@ -4435,6 +4853,15 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/proxy-from-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", @@ -4442,9 +4869,9 @@ "dev": true }, "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, "node_modules/pump": { @@ -4467,14 +4894,26 @@ } }, "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, "engines": { "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -4523,6 +4962,23 @@ "@babel/runtime": "^7.8.4" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regexpu-core": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", @@ -4576,6 +5032,12 @@ "throttleit": "^1.0.0" } }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "node_modules/resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", @@ -4684,6 +5146,20 @@ "randombytes": "^2.1.0" } }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4705,6 +5181,20 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -4799,7 +5289,19 @@ "sshpk-verify": "bin/sshpk-verify" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.10.0" + } + }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dev": true, + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/string-width": { @@ -4992,16 +5494,27 @@ } }, "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { - "node": ">=0.8" + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" } }, "node_modules/ts-loader": { @@ -5117,7 +5630,7 @@ "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, "dependencies": { "safe-buffer": "^5.0.1" @@ -5129,7 +5642,7 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, "node_modules/type-fest": { @@ -5250,6 +5763,16 @@ "punycode": "^2.1.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -5262,7 +5785,7 @@ "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "engines": [ "node >=0.6.0" @@ -5375,6 +5898,56 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "dependencies": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -6567,9 +7140,9 @@ "optional": true }, "@cypress/request": { - "version": "2.88.10", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", - "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -6585,9 +7158,9 @@ "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "~6.5.2", + "qs": "6.10.4", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", + "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", "uuid": "^8.3.2" } @@ -6686,28 +7259,28 @@ } }, "@testing-library/cypress": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@testing-library/cypress/-/cypress-9.0.0.tgz", - "integrity": "sha512-c1XiCGeHGGTWn0LAU12sFUfoX3qfId5gcSE2yHode+vsyHDWraxDPALjVnHd4/Fa3j4KBcc5k++Ccy6A9qnkMA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@testing-library/cypress/-/cypress-10.0.1.tgz", + "integrity": "sha512-e8uswjTZIBhaIXjzEcrQQ8nHRWHgZH7XBxKuIWxZ/T7FxfWhCR48nFhUX5nfPizjVOKSThEfOSv67jquc1ASkw==", "dev": true, "requires": { "@babel/runtime": "^7.14.6", - "@testing-library/dom": "^8.1.0" + "@testing-library/dom": "^9.0.0" } }, "@testing-library/dom": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.13.0.tgz", - "integrity": "sha512-9VHgfIatKNXQNaZTtLnalIy0jNZzY35a4S3oi08YAt9Hv1VsfZ/DfA45lM8D/UhtHBGJ4/lGwp0PZkVndRkoOQ==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.1.tgz", + "integrity": "sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", - "@types/aria-query": "^4.2.0", - "aria-query": "^5.0.0", + "@types/aria-query": "^5.0.1", + "aria-query": "5.1.3", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.4.4", + "lz-string": "^1.5.0", "pretty-format": "^27.0.2" }, "dependencies": { @@ -6763,9 +7336,9 @@ } }, "@types/aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz", + "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==", "dev": true }, "@types/eslint": { @@ -6801,9 +7374,9 @@ "dev": true }, "@types/node": { - "version": "14.18.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.18.tgz", - "integrity": "sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig==", + "version": "18.17.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.15.tgz", + "integrity": "sha512-2yrWpBk32tvV/JAd3HNHWuZn/VDN1P+72hWirHnvsvTGSqbANi+kSeuQR9yAHnbvaBvHDsoTdXV0Fe+iRtHLKA==", "dev": true }, "@types/sinonjs__fake-timers": { @@ -7065,10 +7638,23 @@ "dev": true }, "aria-query": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz", - "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==", - "dev": true + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", + "dev": true, + "requires": { + "deep-equal": "^2.0.5" + } + }, + "array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + } }, "asn1": { "version": "0.2.6", @@ -7109,6 +7695,12 @@ "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -7116,9 +7708,9 @@ "dev": true }, "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", "dev": true }, "babel-loader": { @@ -7387,9 +7979,9 @@ } }, "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true }, "common-tags": { @@ -7440,7 +8032,7 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", "dev": true }, "cross-spawn": { @@ -7455,14 +8047,14 @@ } }, "cypress": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.6.0.tgz", - "integrity": "sha512-WdHSVaS1lumSd5XpVTslZd8ui9GIGphrzvXq9+3DtVhqjRZC5M70gu5SW/Y/SLPq3D1wiXGZoHC6HJ7ESVE2lw==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.2.0.tgz", + "integrity": "sha512-AvDQxBydE771GTq0TR4ZUBvv9m9ffXuB/ueEtpDF/6gOcvFR96amgwSJP16Yhqw6VhmwqspT5nAGzoxxB+D89g==", "dev": true, "requires": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", + "@types/node": "^18.17.5", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -7474,7 +8066,7 @@ "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", "cli-table3": "~0.6.1", - "commander": "^5.1.0", + "commander": "^6.2.1", "common-tags": "^1.8.0", "dayjs": "^1.10.4", "debug": "^4.3.4", @@ -7492,12 +8084,13 @@ "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", + "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", @@ -7562,9 +8155,9 @@ "dev": true }, "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -7591,7 +8184,7 @@ "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -7612,12 +8205,50 @@ "ms": "2.1.2" } }, + "deep-equal": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.2.tgz", + "integrity": "sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==", + "dev": true, + "requires": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.1", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + } + }, + "define-data-property": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", + "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + } + }, "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "requires": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } @@ -7625,19 +8256,19 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk= sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, "dom-accessibility-api": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.14.tgz", - "integrity": "sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==", + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "requires": { "jsbn": "~0.1.0", @@ -7690,6 +8321,23 @@ "ansi-colors": "^4.1.1" } }, + "es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + } + }, "es-module-lexer": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", @@ -7806,7 +8454,7 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true }, "fast-deep-equal": { @@ -7869,10 +8517,19 @@ "path-exists": "^4.0.0" } }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true }, "form-data": { @@ -7910,6 +8567,12 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -7917,13 +8580,14 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -7948,7 +8612,7 @@ "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -7989,6 +8653,15 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -8004,6 +8677,12 @@ "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -8019,12 +8698,27 @@ "get-intrinsic": "^1.1.1" } }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, "http-signature": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", @@ -8076,6 +8770,63 @@ "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true }, + "internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + } + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true + }, "is-ci": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", @@ -8094,6 +8845,15 @@ "has": "^1.0.3" } }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -8110,28 +8870,95 @@ "is-path-inside": "^3.0.2" } }, + "is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "dev": true + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "dev": true + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "requires": { + "which-typed-array": "^1.1.11" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, "is-unicode-supported": { @@ -8140,6 +8967,28 @@ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, + "is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true + }, + "is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -8149,7 +8998,7 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, "jest-worker": { @@ -8189,7 +9038,7 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM= sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, "jsesc": { @@ -8219,7 +9068,7 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, "json5": { @@ -8447,9 +9296,9 @@ } }, "lz-string": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY= sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true }, "make-dir": { @@ -8508,9 +9357,9 @@ } }, "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, "ms": { @@ -8540,6 +9389,22 @@ "path-key": "^3.0.0" } }, + "object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -8648,7 +9513,7 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true }, "picocolors": { @@ -8703,6 +9568,12 @@ } } }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true + }, "proxy-from-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", @@ -8710,9 +9581,9 @@ "dev": true }, "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, "pump": { @@ -8732,9 +9603,18 @@ "dev": true }, "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, "randombytes": { @@ -8782,6 +9662,17 @@ "@babel/runtime": "^7.8.4" } }, + "regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + } + }, "regexpu-core": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", @@ -8828,6 +9719,12 @@ "throttleit": "^1.0.0" } }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", @@ -8911,6 +9808,17 @@ "randombytes": "^2.1.0" } }, + "set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "requires": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -8926,6 +9834,17 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -9002,6 +9921,15 @@ "tweetnacl": "~0.14.0" } }, + "stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dev": true, + "requires": { + "internal-slot": "^1.0.4" + } + }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -9132,13 +10060,23 @@ } }, "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "dependencies": { + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true + } } }, "ts-loader": { @@ -9222,7 +10160,7 @@ "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -9231,7 +10169,7 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, "type-fest": { @@ -9305,6 +10243,16 @@ "punycode": "^2.1.0" } }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -9314,7 +10262,7 @@ "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -9392,6 +10340,44 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "requires": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + } + }, + "which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/projects/storefrontapp-e2e-cypress/package.json b/projects/storefrontapp-e2e-cypress/package.json index 28f54557686..9b05314ba7d 100644 --- a/projects/storefrontapp-e2e-cypress/package.json +++ b/projects/storefrontapp-e2e-cypress/package.json @@ -37,9 +37,9 @@ "@babel/core": "^7.14.3", "@babel/preset-env": "^7.14.2", "@cypress/webpack-preprocessor": "^5.9.1", - "@testing-library/cypress": "9.0.0", + "@testing-library/cypress": "10.0.1", "babel-loader": "^8.2.2", - "cypress": "12.6.0", + "cypress": "13.2.0", "cypress-file-upload": "^5.0.8", "ts-loader": "^9.4.2", "typescript": "^4.2.4", diff --git a/projects/storefrontapp/karma.conf.js b/projects/storefrontapp/karma.conf.js index 7e89609a52e..a9b06fd3c31 100644 --- a/projects/storefrontapp/karma.conf.js +++ b/projects/storefrontapp/karma.conf.js @@ -28,6 +28,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/projects/storefrontapp/project.json b/projects/storefrontapp/project.json index f0effe16e2c..cc0f2b5f957 100644 --- a/projects/storefrontapp/project.json +++ b/projects/storefrontapp/project.json @@ -49,6 +49,10 @@ "input": "projects/storefrontapp/src/styles/lib-storefinder.scss", "bundleName": "storefinder" }, + { + "input": "projects/storefrontapp/src/styles/lib-pdf-invoices.scss", + "bundleName": "pdf-invoices" + }, { "input": "projects/storefrontapp/src/styles/lib-product.scss", "bundleName": "product" diff --git a/projects/storefrontapp/src/app/spartacus/features/pdf-invoices/pdf-invoices-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/pdf-invoices/pdf-invoices-feature.module.ts new file mode 100644 index 00000000000..cfd2e9e6e84 --- /dev/null +++ b/projects/storefrontapp/src/app/spartacus/features/pdf-invoices/pdf-invoices-feature.module.ts @@ -0,0 +1,38 @@ +/* + * SPDX-FileCopyrightText: 2023 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { NgModule } from '@angular/core'; +import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; +import { + pdfInvoicesTranslationChunksConfig, + pdfInvoicesTranslations, +} from '@spartacus/pdf-invoices/assets'; +import { + PDFInvoicesRootModule, + PDF_INVOICES_FEATURE, +} from '@spartacus/pdf-invoices/root'; + +@NgModule({ + imports: [PDFInvoicesRootModule], + providers: [ + provideConfig({ + featureModules: { + [PDF_INVOICES_FEATURE]: { + module: () => + import('@spartacus/pdf-invoices').then((m) => m.PDFInvoicesModule), + }, + }, + }), + provideConfig({ + i18n: { + resources: pdfInvoicesTranslations, + chunks: pdfInvoicesTranslationChunksConfig, + fallbackLang: 'en', + }, + }), + ], +}) +export class PDFInvoicesFeatureModule {} diff --git a/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts b/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts index c03abffafc8..41932c51d6e 100644 --- a/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts +++ b/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts @@ -78,6 +78,7 @@ import { AccountSummaryFeatureModule } from './features/organization/organizatio import { AdministrationFeatureModule } from './features/organization/organization-administration-feature.module'; import { OrderApprovalFeatureModule } from './features/organization/organization-order-approval-feature.module'; import { UnitOrderFeatureModule } from './features/organization/organization-unit-order-feature.module'; +import { PDFInvoicesFeatureModule } from './features/pdf-invoices/pdf-invoices-feature.module'; import { PickupInStoreFeatureModule } from './features/pickup-in-store/pickup-in-store-feature.module'; import { ProductConfiguratorRulebasedFeatureModule } from './features/product-configurator/product-configurator-rulebased-feature.module'; import { ProductConfiguratorTextfieldFeatureModule } from './features/product-configurator/product-configurator-textfield-feature.module'; @@ -123,6 +124,9 @@ if (environment.digitalPayments) { if (environment.epdVisualization) { featureModules.push(EpdVisualizationFeatureModule); } +if (environment.pdfInvoices) { + featureModules.push(PDFInvoicesFeatureModule); +} if (environment.s4om) { featureModules.push(S4OMFeatureModule); } diff --git a/projects/storefrontapp/src/environments/environment.prod.ts b/projects/storefrontapp/src/environments/environment.prod.ts index 33ffd50eb53..60655cca3e2 100644 --- a/projects/storefrontapp/src/environments/environment.prod.ts +++ b/projects/storefrontapp/src/environments/environment.prod.ts @@ -20,4 +20,5 @@ export const environment: Environment = { opf: buildProcess.env.CX_OPF, segmentRefs: buildProcess.env.CX_SEGMENT_REFS, requestedDeliveryDate: buildProcess.env.CX_REQUESTED_DELIVERY_DATE, + pdfInvoices: buildProcess.env.CX_PDF_INVOICES, }; diff --git a/projects/storefrontapp/src/environments/environment.ts b/projects/storefrontapp/src/environments/environment.ts index c43111d6510..c021d752b03 100644 --- a/projects/storefrontapp/src/environments/environment.ts +++ b/projects/storefrontapp/src/environments/environment.ts @@ -33,4 +33,5 @@ export const environment: Environment = { opf: buildProcess.env.CX_OPF ?? false, segmentRefs: buildProcess.env.CX_SEGMENT_REFS ?? false, requestedDeliveryDate: buildProcess.env.CX_REQUESTED_DELIVERY_DATE ?? false, + pdfInvoices: buildProcess.env.CX_PDF_INVOICES ?? false, }; diff --git a/projects/storefrontapp/src/environments/models/build.process.env.d.ts b/projects/storefrontapp/src/environments/models/build.process.env.d.ts index 9ced14e5af9..3a2ef54ba7f 100644 --- a/projects/storefrontapp/src/environments/models/build.process.env.d.ts +++ b/projects/storefrontapp/src/environments/models/build.process.env.d.ts @@ -22,4 +22,5 @@ interface Env { CX_OPF: boolean; CX_SEGMENT_REFS: boolean; CX_REQUESTED_DELIVERY_DATE: boolean; + CX_PDF_INVOICES: boolean; } diff --git a/projects/storefrontapp/src/environments/models/environment.model.ts b/projects/storefrontapp/src/environments/models/environment.model.ts index e38ab5e40e2..5978a427ef5 100644 --- a/projects/storefrontapp/src/environments/models/environment.model.ts +++ b/projects/storefrontapp/src/environments/models/environment.model.ts @@ -18,4 +18,5 @@ export interface Environment { opf: boolean; segmentRefs: boolean; requestedDeliveryDate: boolean; + pdfInvoices: boolean; } diff --git a/projects/storefrontapp/src/styles/lib-pdf-invoices.scss b/projects/storefrontapp/src/styles/lib-pdf-invoices.scss new file mode 100644 index 00000000000..07362c045b4 --- /dev/null +++ b/projects/storefrontapp/src/styles/lib-pdf-invoices.scss @@ -0,0 +1,2 @@ +@import '../styles-config'; +@import '@spartacus/pdf-invoices'; diff --git a/projects/storefrontapp/tsconfig.app.prod.json b/projects/storefrontapp/tsconfig.app.prod.json index c6aa009267e..4bfb5cd91c1 100644 --- a/projects/storefrontapp/tsconfig.app.prod.json +++ b/projects/storefrontapp/tsconfig.app.prod.json @@ -178,6 +178,12 @@ "@spartacus/organization/user-registration/root": [ "dist/organization/user-registration/root" ], + "@spartacus/pdf-invoices/assets": ["dist/pdf-invoices/assets"], + "@spartacus/pdf-invoices/components": ["dist/pdf-invoices/components"], + "@spartacus/pdf-invoices/core": ["dist/pdf-invoices/core"], + "@spartacus/pdf-invoices": ["dist/pdf-invoices"], + "@spartacus/pdf-invoices/occ": ["dist/pdf-invoices/occ"], + "@spartacus/pdf-invoices/root": ["dist/pdf-invoices/root"], "@spartacus/pickup-in-store/assets": ["dist/pickup-in-store/assets"], "@spartacus/pickup-in-store/components": [ "dist/pickup-in-store/components" diff --git a/projects/storefrontapp/tsconfig.server.json b/projects/storefrontapp/tsconfig.server.json index 8d90484e9a9..e999bd24cec 100644 --- a/projects/storefrontapp/tsconfig.server.json +++ b/projects/storefrontapp/tsconfig.server.json @@ -261,6 +261,22 @@ "@spartacus/organization/user-registration/root": [ "../../feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "../../feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "../../feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "../../feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": ["../../feature-libs/pdf-invoices/public_api"], + "@spartacus/pdf-invoices/occ": [ + "../../feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "../../feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "../../feature-libs/pickup-in-store/assets/public_api" ], diff --git a/projects/storefrontapp/tsconfig.server.prod.json b/projects/storefrontapp/tsconfig.server.prod.json index 07092225018..1a735903d60 100644 --- a/projects/storefrontapp/tsconfig.server.prod.json +++ b/projects/storefrontapp/tsconfig.server.prod.json @@ -199,6 +199,14 @@ "@spartacus/organization/user-registration/root": [ "../../dist/organization/user-registration/root" ], + "@spartacus/pdf-invoices/assets": ["../../dist/pdf-invoices/assets"], + "@spartacus/pdf-invoices/components": [ + "../../dist/pdf-invoices/components" + ], + "@spartacus/pdf-invoices/core": ["../../dist/pdf-invoices/core"], + "@spartacus/pdf-invoices": ["../../dist/pdf-invoices"], + "@spartacus/pdf-invoices/occ": ["../../dist/pdf-invoices/occ"], + "@spartacus/pdf-invoices/root": ["../../dist/pdf-invoices/root"], "@spartacus/pickup-in-store/assets": [ "../../dist/pickup-in-store/assets" ], diff --git a/projects/storefrontlib/cms-structure/guards/cms-page-guard.service.spec.ts b/projects/storefrontlib/cms-structure/guards/cms-page-guard.service.spec.ts index 85b2d78cde1..29aeb50f743 100644 --- a/projects/storefrontlib/cms-structure/guards/cms-page-guard.service.spec.ts +++ b/projects/storefrontlib/cms-structure/guards/cms-page-guard.service.spec.ts @@ -9,8 +9,6 @@ import { PageType, RoutingService, SemanticPathService, - SMART_EDIT_CONTEXT, - SMART_EDIT_DUMMY_COMPONENT_TYPE, } from '@spartacus/core'; import { CmsComponentsService } from '@spartacus/storefront'; import { NEVER, of } from 'rxjs'; @@ -34,6 +32,7 @@ class MockCmsService implements Partial { getPageIndex = () => of(''); setPageFailIndex = () => {}; } + class MockCmsRoutesService implements Partial { handleCmsRoutesInGuard = () => true; } @@ -61,7 +60,6 @@ describe('CmsPageGuardService', () => { let cmsGuards: CmsGuardsService; let semanticPath: SemanticPathService; let service: CmsPageGuardService; - let cmsComponentsService: CmsComponentsService; beforeEach(() => { TestBed.configureTestingModule({ @@ -88,7 +86,6 @@ describe('CmsPageGuardService', () => { cmsI18n = TestBed.inject(CmsI18nService); cmsGuards = TestBed.inject(CmsGuardsService); semanticPath = TestBed.inject(SemanticPathService); - cmsComponentsService = TestBed.inject(CmsComponentsService); service = TestBed.inject(CmsPageGuardService); }); @@ -115,21 +112,6 @@ describe('CmsPageGuardService', () => { expect(cms.getPageComponentTypes).toHaveBeenCalledWith(pageContext); }); - it('should get a specific component type SMART_EDIT_DUMMY_COMPONENT_TYPE for SmartEdit review page', () => { - pageContext = { type: PageType.CONTENT_PAGE, id: SMART_EDIT_CONTEXT }; - spyOn(cms, 'getPageComponentTypes').and.returnValue(of([])); - spyOn(cmsComponentsService, 'determineMappings').and.callThrough(); - - service - .canActivatePage(pageContext, pageData, route, state) - .subscribe() - .unsubscribe(); - expect(cms.getPageComponentTypes).toHaveBeenCalledWith(pageContext); - expect(cmsComponentsService.determineMappings).toHaveBeenCalledWith([ - SMART_EDIT_DUMMY_COMPONENT_TYPE, - ]); - }); - describe('when CmsGuardsService emits false', () => { beforeEach(() => { spyOn(cmsGuards, 'cmsPageCanActivate').and.returnValue(of(false)); diff --git a/projects/storefrontlib/cms-structure/guards/cms-page-guard.service.ts b/projects/storefrontlib/cms-structure/guards/cms-page-guard.service.ts index f480bbc4003..6aa00a613c7 100644 --- a/projects/storefrontlib/cms-structure/guards/cms-page-guard.service.ts +++ b/projects/storefrontlib/cms-structure/guards/cms-page-guard.service.ts @@ -14,8 +14,6 @@ import { PageType, RoutingService, SemanticPathService, - SMART_EDIT_CONTEXT, - SMART_EDIT_DUMMY_COMPONENT_TYPE, } from '@spartacus/core'; import { Observable, of } from 'rxjs'; import { @@ -71,11 +69,6 @@ export class CmsPageGuardService { state: RouterStateSnapshot ): Observable { return this.cmsService.getPageComponentTypes(pageContext).pipe( - map((componentTypes) => - pageContext.id === SMART_EDIT_CONTEXT - ? [SMART_EDIT_DUMMY_COMPONENT_TYPE, ...componentTypes] - : componentTypes - ), take(1), switchMap((componentTypes) => this.cmsComponentsService.determineMappings(componentTypes) diff --git a/projects/storefrontlib/karma.conf.js b/projects/storefrontlib/karma.conf.js index 4d348dcb88e..6e9d815e8b5 100644 --- a/projects/storefrontlib/karma.conf.js +++ b/projects/storefrontlib/karma.conf.js @@ -37,6 +37,10 @@ module.exports = function (config) { }, }, }, + captureTimeout: 210000, + browserDisconnectTolerance: 3, + browserDisconnectTimeout: 210000, + browserNoActivityTimeout: 210000, port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/projects/storefrontlib/package.json b/projects/storefrontlib/package.json index ce778e85755..d45d0d961e9 100644 --- a/projects/storefrontlib/package.json +++ b/projects/storefrontlib/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/storefront", - "version": "6.3.0-1", + "version": "6.5.0-1", "keywords": [ "spartacus", "storefront", @@ -10,20 +10,20 @@ "repository": "https://github.com/SAP/spartacus/tree/develop/projects/storefrontlib", "license": "Apache-2.0", "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "peerDependencies": { - "@angular/common": "^15.2.4", - "@angular/core": "^15.2.4", - "@angular/forms": "^15.2.4", - "@angular/platform-browser": "^15.2.4", - "@angular/router": "^15.2.4", - "@angular/service-worker": "^15.2.4", + "@angular/common": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/platform-browser": "^15.2.9", + "@angular/router": "^15.2.9", + "@angular/service-worker": "^15.2.9", "@ng-select/ng-select": "^10.0.3", "@ngrx/effects": "^15.3.0", "@ngrx/router-store": "^15.3.0", "@ngrx/store": "^15.3.0", - "@spartacus/core": "6.3.0-1", + "@spartacus/core": "6.5.0-1", "ngx-infinite-scroll": "^15.0.0", "rxjs": "^6.6.0" }, diff --git a/projects/storefrontstyles/package.json b/projects/storefrontstyles/package.json index c8fc024414f..eb7e3b9434d 100644 --- a/projects/storefrontstyles/package.json +++ b/projects/storefrontstyles/package.json @@ -1,6 +1,6 @@ { "name": "@spartacus/styles", - "version": "6.3.0-1", + "version": "6.5.0-1", "description": "Style library containing global styles", "keywords": [ "spartacus", @@ -19,7 +19,7 @@ "devDependencies": {}, "peerDependencies": { "@fontsource/open-sans": "^4.5.14", - "@fortawesome/fontawesome-free": "5.8.1", + "@fortawesome/fontawesome-free": "6.4.2", "@ng-select/ng-select": "^10.0.3", "bootstrap": "^4.6.2" }, diff --git a/projects/storefrontstyles/scss/_versioning.scss b/projects/storefrontstyles/scss/_versioning.scss index 250a70f79d2..a8a375e9cef 100644 --- a/projects/storefrontstyles/scss/_versioning.scss +++ b/projects/storefrontstyles/scss/_versioning.scss @@ -24,7 +24,7 @@ // or `$styleVersion` are enabled. $_fullVersion: ( major: 6, - minor: 3, + minor: 5, patch: 0, ); diff --git a/scripts/install/functions.sh b/scripts/install/functions.sh index 762b1ebb540..4a89facbcb8 100644 --- a/scripts/install/functions.sh +++ b/scripts/install/functions.sh @@ -82,7 +82,7 @@ function update_projects_versions { fi printh "Updating all library versions to ${SPARTACUS_VERSION}" - (cd "${CLONE_DIR}/tools/config" && pwd && sed -i -E 's/PUBLISHING_VERSION = '\'\''/PUBLISHING_VERSION = '\'"${SPARTACUS_VERSION}"\''/g' const.ts); + (cd "${CLONE_DIR}/tools/config" && pwd && sed -i -E 's/PUBLISHING_VERSION = '\'.*\''/PUBLISHING_VERSION = '\'"${SPARTACUS_VERSION}"\''/g' const.ts); (cd "${CLONE_DIR}" && pwd && npm run config:update -- --generate-deps); } @@ -136,6 +136,18 @@ function add_s4om { fi } +function add_requested_delivery_date { + if [ "$ADD_REQUESTED_DELIVERY_DATE" = true ] ; then + ng add --skip-confirmation @spartacus/requested-delivery-date@${SPARTACUS_VERSION} --interactive false + fi +} + +function add_pdf_invoices { + if [ "$ADD_PDF_INVOICES" = true ] ; then + ng add --skip-confirmation @spartacus/pdf-invoices@${SPARTACUS_VERSION} --interactive false + fi +} + # Don't install b2b features here (use add_b2b function for that) function add_feature_libs { ng add @spartacus/tracking@${SPARTACUS_VERSION} --skip-confirmation --no-interactive @@ -164,6 +176,8 @@ function add_spartacus_csr { add_opf add_product_configurator add_s4om + add_requested_delivery_date + add_pdf_invoices remove_npmrc ) } @@ -187,6 +201,8 @@ function add_spartacus_ssr { add_opf add_product_configurator add_s4om + add_requested_delivery_date + add_pdf_invoices remove_npmrc ) } @@ -209,6 +225,8 @@ function add_spartacus_ssr_pwa { add_opf add_product_configurator add_s4om + add_requested_delivery_date + add_pdf_invoices remove_npmrc ) } @@ -713,6 +731,16 @@ function parseInstallArgs { echo "➖ Added S4OM" shift ;; + rdd) + ADD_REQUESTED_DELIVERY_DATE=true + echo "➖ Added Requested Delivery Date" + shift + ;; + invoices) + ADD_PDF_INVOICES=true + echo "➖ Added PDF Invoices" + shift + ;; opf) ADD_OPF=true echo "➖ Added OPF" diff --git a/tools/schematics/testing.ts b/tools/schematics/testing.ts index 91edc3b46dc..98b3014e651 100644 --- a/tools/schematics/testing.ts +++ b/tools/schematics/testing.ts @@ -17,6 +17,7 @@ const featureLibsFolders: string[] = [ 'order', 'checkout', 'organization', + 'pdf-invoices', 'pickup-in-store', 'product', 'product-configurator', @@ -52,6 +53,7 @@ const commands = [ 'build epd-visualization/schematics', 'build opf/schematics', 'build organization/schematics', + 'build pdf-invoices/schematics', 'build pickup-in-store/schematics', 'build product/schematics', 'build product-configurator/schematics', @@ -202,6 +204,7 @@ async function executeCommand(command: Command): Promise { case 'build epd-visualization/schematics': case 'build opf/schematics': case 'build organization/schematics': + case 'build pdf-invoices/schematics': case 'build pickup-in-store/schematics': case 'build product/schematics': case 'build product-configurator/schematics': diff --git a/tsconfig.compodoc.json b/tsconfig.compodoc.json index 864317c4df1..2f5cd7c9c25 100644 --- a/tsconfig.compodoc.json +++ b/tsconfig.compodoc.json @@ -311,6 +311,24 @@ "@spartacus/organization/user-registration/root": [ "feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": [ + "feature-libs/pdf-invoices/public_api" + ], + "@spartacus/pdf-invoices/occ": [ + "feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "feature-libs/pickup-in-store/assets/public_api" ], diff --git a/tsconfig.json b/tsconfig.json index a527a6da85d..38297317b38 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -335,6 +335,24 @@ "@spartacus/organization/user-registration/root": [ "feature-libs/organization/user-registration/root/public_api" ], + "@spartacus/pdf-invoices/assets": [ + "feature-libs/pdf-invoices/assets/public_api" + ], + "@spartacus/pdf-invoices/components": [ + "feature-libs/pdf-invoices/components/public_api" + ], + "@spartacus/pdf-invoices/core": [ + "feature-libs/pdf-invoices/core/public_api" + ], + "@spartacus/pdf-invoices": [ + "feature-libs/pdf-invoices/public_api" + ], + "@spartacus/pdf-invoices/occ": [ + "feature-libs/pdf-invoices/occ/public_api" + ], + "@spartacus/pdf-invoices/root": [ + "feature-libs/pdf-invoices/root/public_api" + ], "@spartacus/pickup-in-store/assets": [ "feature-libs/pickup-in-store/assets/public_api" ],