Skip to content

Commit

Permalink
Merge branch 'develop' into 'master' for 0.31.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
suschneider committed Jun 2, 2021
2 parents 2d2c922 + e333d18 commit 1f5f8be
Show file tree
Hide file tree
Showing 125 changed files with 1,452 additions and 2,504 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Please check if your PR fulfills the following requirements:
[ ] The commit message follows our guidelines: https://github.com/intershop/intershop-pwa/blob/develop/CONTRIBUTING.md
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
[ ] Visual changes have been approved by VD / IAD (if applicable)
-->

## PR Type
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ Thumbs.db

# nvm
.nvmrc

# generated xliff
*.xliff
7 changes: 6 additions & 1 deletion 3rd-party-licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@
"big.js@5.2.2","MIT","Copyright (c) 2018 Michael Mclaughlin","https://github.com/MikeMcl/big.js"
"binary-extensions@1.13.1","MIT","Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)","https://github.com/sindresorhus/binary-extensions"
"binary-extensions@2.2.0","MIT","Copyright (c) 2019 Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com), Paul Miller (https://paulmillr.com)","https://github.com/sindresorhus/binary-extensions"
"bindings@1.5.0","MIT","Copyright (c) 2012 Nathan Rajlich &lt;nathan@tootallnate.net&gt;","https://github.com/TooTallNate/node-bindings"
"bintrees@1.0.1","MIT*","Copyright (C) 2011 by Vadim Graboys","https://github.com/vadimg/js_bintrees"
"bl@4.1.0","MIT","Copyright (c) 2013-2019 bl contributors. ----------------------------------","https://github.com/rvagg/bl"
"blob@0.0.5","MIT","Copyright (C) 2014 Rase-","https://github.com/webmodules/blob"
Expand Down Expand Up @@ -787,6 +788,7 @@
"figures@3.2.0","MIT","Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)","https://github.com/sindresorhus/figures"
"file-entry-cache@6.0.1","MIT","Copyright (c) 2015 Roy Riojas","https://github.com/royriojas/file-entry-cache"
"file-loader@6.2.0","MIT","Copyright JS Foundation and other contributors","https://github.com/webpack-contrib/file-loader"
"file-uri-to-path@1.0.0","MIT","Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>","https://github.com/TooTallNate/file-uri-to-path"
"fill-range@4.0.0","MIT","Copyright (c) 2014-2017, Jon Schlinkert","https://github.com/jonschlinkert/fill-range"
"fill-range@7.0.1","MIT","Copyright (c) 2014-present, Jon Schlinkert.","https://github.com/jonschlinkert/fill-range"
"finalhandler@1.1.0","MIT","Copyright (c) 2014-2017 Douglas Christopher Wilson <doug@somethingdoug.com>","https://github.com/pillarjs/finalhandler"
Expand Down Expand Up @@ -942,7 +944,7 @@
"inquirer@7.3.3","MIT","Copyright (c) 2012 Simon Boudrias","https://github.com/SBoudrias/Inquirer.js"
"internal-ip@4.3.0","MIT","Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)","https://github.com/sindresorhus/internal-ip"
"interpret@1.4.0","MIT","Copyright (c) 2014-2018 Tyler Kellen <tyler@sleekcode.net>, Blaine Bublitz <blaine.bublitz@gmail.com>, and Eric Schoffstall <yo@contra.io>","https://github.com/gulpjs/interpret"
"intershop-pwa@0.30.0","UNLICENSED","Copyright (c) 2021 Intershop Communications AG, http://www.intershop.de",""
"intershop-pwa@0.31.0","UNLICENSED","Copyright (c) 2021 Intershop Communications AG, http://www.intershop.de",""
"intershop-schematics@0.0.1","UNLICENSED","",""
"inversify@5.1.1","MIT","Copyright (c) 2015-2017 Remo H. Jansen","https://github.com/inversify/InversifyJS"
"ip-regex@2.1.0","MIT","Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)","https://github.com/sindresorhus/ip-regex"
Expand Down Expand Up @@ -1210,6 +1212,7 @@
"multicast-dns@6.2.3","MIT","Copyright (c) 2015 Mathias Buus","https://github.com/mafintosh/multicast-dns"
"mute-stream@0.0.7","ISC","Copyright (c) Isaac Z. Schlueter and Contributors","https://github.com/isaacs/mute-stream"
"mute-stream@0.0.8","ISC","Copyright (c) Isaac Z. Schlueter and Contributors","https://github.com/isaacs/mute-stream"
"nan@2.14.2","MIT","Copyright (c) 2018 NAN contributors. -----------------------------------","https://github.com/nodejs/nan"
"nanoid@3.1.22","MIT","Copyright 2017 Andrey Sitnik <andrey@sitnik.ru>","https://github.com/ai/nanoid"
"nanomatch@1.2.13","MIT","Copyright (c) 2016-2018, Jon Schlinkert.","https://github.com/micromatch/nanomatch"
"natural-compare@1.4.0","MIT","Copyright (c) 2012-2015 Lauri Rooden &lt;lauri@rooden.ee&gt; . [The MIT License](http://lauri.rooden.ee/mit-license.txt)","https://github.com/litejs/natural-compare-lite"
Expand Down Expand Up @@ -1858,6 +1861,8 @@
"ws@7.4.5","MIT","Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>","https://github.com/websockets/ws"
"xdg-basedir@4.0.0","MIT","Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)","https://github.com/sindresorhus/xdg-basedir"
"xhr2@0.2.1","MIT","Copyright (c) 2013 Victor Costan","https://github.com/pwnall/node-xhr2"
"xliff@5.5.3","MIT","Copyright (c) 2021 locize","https://github.com/locize/xliff"
"xml-js@1.6.11","MIT","Copyright (c) 2016-2017 Yousuf Almarzooqi","https://github.com/nashwaan/xml-js"
"xml-name-validator@3.0.0","Apache-2.0","","https://github.com/jsdom/xml-name-validator"
"xmlchars@2.2.0","MIT","Copyright Louis-Dominique Dubeau and contributors to xmlchars","https://github.com/lddubeau/xmlchars"
"xmlhttprequest-ssl@1.5.5","MIT","","https://github.com/mjwwit/node-XMLHttpRequest"
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ kb_everyone

# Changelog

## [0.31.0](https://github.com/intershop/intershop-pwa/releases/tag/0.31.0) (2021-06-02)

**required Intershop Commerce Management version: 7.10.30.2**

### Features

- enable loading translations from ICM (#695) ([7f8ae68](https://github.com/intershop/intershop-pwa/commit/7f8ae68))
- display only available products in product links carousels and lists (#626) ([386a584](https://github.com/intershop/intershop-pwa/commit/386a584))
- omit default redirect in multi channel when one base href is root route (#704) ([76c9074](https://github.com/intershop/intershop-pwa/commit/76c9074))
- use locales from ICM configuration (#685) ([204fd36](https://github.com/intershop/intershop-pwa/commit/204fd36))

### Bug Fixes

- breadcrumb styling harmonization (#713) ([abb2c4e](https://github.com/intershop/intershop-pwa/commit/abb2c4e))
- set punchout cookies with "SameSite=None; Secure" to work in https iframes (#683) ([f5900eb](https://github.com/intershop/intershop-pwa/commit/f5900eb))
- timing issue when fetching CMS content include data after logout (#711) ([712c91b](https://github.com/intershop/intershop-pwa/commit/712c91b))
- adapt static content navigation styling to meet new IAD/VD requirements (#682) ([2fd56b1](https://github.com/intershop/intershop-pwa/commit/2fd56b1))
- use region code instead of id for US new-address-form (#708) ([06f466c](https://github.com/intershop/intershop-pwa/commit/06f466c))
- add missing loading spinner when creating an account (registration) (#705) ([8a77c4d](https://github.com/intershop/intershop-pwa/commit/8a77c4d))
- undesired logout after contact us submission (#686) ([a76d4a6](https://github.com/intershop/intershop-pwa/commit/a76d4a6))
- track item changes as local state in checkout facade (#702) ([8600213](https://github.com/intershop/intershop-pwa/commit/8600213))
- mini cart opens if the user navigates from checkout to other pages (#688) ([5a0ed25](https://github.com/intershop/intershop-pwa/commit/5a0ed25))

## [0.30.0](https://github.com/intershop/intershop-pwa/releases/tag/0.30.0) (2021-05-05)

**required Intershop Commerce Management version: 7.10.30.2**
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# export appropriate ICM_BASE_URL and use with
# docker-compose up --build
# docker compose up --build

version: '3'
services:
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ To access these properties we provide the [`StatePropertiesService`](../../src/a
ICM provides a Configurations REST resource - `/configurations` - that is supposed to provide all relevant runtime configurations that can be defined in the ICM back office and are required to configure a REST client as well.
This includes service configurations, locales, basket preferences, etc.

The ICM configurations information can be accessed through the [`getServerConfigParameter`](../../src/app/core/store/general/server-config/server-config.selectors.ts) selector.
The ICM configurations information can be accessed through the [`getServerConfigParameter`](../../src/app/core/store/core/server-config/server-config.selectors.ts) selector.

## ICM Endpoint Configuration

Expand Down
19 changes: 18 additions & 1 deletion docs/concepts/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,27 @@ showModalDialog(dialog) {
## Localization Files Generation
The idea is to use the existing localization properties files of the current Responsive Starter Store cartridges (or the localization files of a project) and convert them into the proper JSON files that can be used by ngx-translate.
For this purpose a [Gradle plugin](https://gitlab.intershop.de/ISPWA/ngx-translate-plugin) was implemented that can handle this conversion process.
For this purpose a [Standalone Java application](https://gitlab.intershop.de/ISPWA/ngx-translate-plugin) was implemented that can handle this conversion process.
In the current state of the Intershop Progressive Web App, the converted localization properties from _a_responsive_ (without _app_sf_responsive_b2b_ and _app_sf_responsive_costcenter_) were added and should be used within the HTML templates.
## ICM Localization Management
In case you want to change translation values without redeploying the PWA, it is possible to override the local `.json` files via ICM localization backoffice page.
Therefore generate `.xliff` files and upload them to ICM for further import processing.
Here is how:
1. Use the `npm run xliff` command to convert all localization files into separate `.xliff` files. The result is placed in `src/assets/xliff`.
2. Upload and import each `.xliff` file to ICM. Please mind below warning to select the correct application type and target locale.
3. Refer to [Localization Management](https://docs.intershop.com/icm/7.10/olh/icm/en/operation_maintenance/topic_localization_management.html) in the ICM online help for further details.
:warning: Make sure to select the correct application type for which you want to import generated XLIFF data.
This has to fit to your PWA environment.
:warning: The generated `.xliff` files prefix translation keys with `pwa-`.
This allows to enable easy filtering.
The prefixes will be removed when the translations are loaded into the PWA.
## Localization File Clean Up Process
Localization files require constant maintenance to keep them up to date.
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/angular-component-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This pattern provides the needed flexibility if used together with handling obse
In this case the condition should look like this:

```typescript
<ng-container *ngIf="(observable$ | async) as synchronized; else loading">
<ng-container *ngIf="observable$ | async as synchronized; else loading">
```

## Do Not Unsubscribe, Use Destroy Observable and takeUntil Instead
Expand Down
22 changes: 19 additions & 3 deletions docs/guides/nginx-startup.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,29 @@ Multiple channels can also be configured via context paths, which re-configure t
lang: de_DE
```

The domain has to be supplied, to match all domains use `.+`.
The domain has to be supplied.
To match all domains use `.+`.
The parameters `baseHref` and `channel` are mandatory.
`baseHref` must start with `/`.
Also note that context path channels have to be supplied as a list.
The first entry is chosen as default channel, if the website is accessed without supplying a channel.
The first entry is chosen as default channel, if the website is accessed without supplying a channel, meaning the context path `/`.
It is also possible to explicitly set a channel configuration for the `/` context path.
Such a configuration is shown in the following configuration that sets different languages for the according context paths but within the same channel.

This configuration can be supplied simply by setting the environment variable `MULTI_CHANNEL`.
```yaml
'domain2':
- baseHref: /fr
channel: channel
lang: fr_FR
- baseHref: /de
channel: channel
lang: de_DE
- baseHref: /
channel: channel
lang: en_US
```

The configuration can be supplied simply by setting the environment variable `MULTI_CHANNEL`.
Alternatively, the source can be supplied by setting `MULTI_CHANNEL_SOURCE` in any [supported format by gomplate](https://docs.gomplate.ca/datasources).
If no environment variables for multi-channel configuration are given, the configuration will fall back to the content of [`nginx/multi-channel.yaml`](../../nginx/multi-channel.yaml), which can also be customized.

Expand Down
4 changes: 2 additions & 2 deletions e2e/cypress/integration/pages/meta-data.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class MetaDataModule {
'og:image': /.*og-image-default.*/,
'og:type': 'website',
'og:locale': 'en_US',
'og:locale:alternate': ['de_DE', 'fr_FR'],
'og:locale:alternate': ['fr_FR', 'de_DE'],
};

meta(key: string) {
Expand All @@ -29,7 +29,7 @@ export class MetaDataModule {
}

private checkStrategy(val: string | RegExp | string[]) {
return typeof val === 'string' ? 'equal' : Array.isArray(val) ? 'deep.equal' : 'match';
return typeof val === 'string' ? 'equal' : Array.isArray(val) ? 'include.members' : 'match';
}

check(expect: { title?: string; url?: RegExp; description?: string; [key: string]: string | RegExp }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Shopping User', () => {

it('should remove validation messages after customer address changed', () => {
at(CheckoutAddressesPage, page => {
page.changeInvoiceAddressRegion('US_CA');
page.changeInvoiceAddressRegion('CA');
waitLoadingEnd(1000);
page.validationMessage.should('not.exist');
});
Expand Down
3 changes: 3 additions & 0 deletions nginx/channel.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,14 @@ server {
{{- tmpl.Exec "LOCATION_TEMPLATE" . }}
}
{{ end }}
{{- if (has ($mapping | jsonpath "$..baseHref") "/") }}
{{- else }}
location / {
{{ $first := index $mapping 0 -}}
rewrite ^/$ "$scheme://$http_host{{ $first.baseHref }}/home" permanent;
rewrite ^(.*)$ "$scheme://$http_host{{ $first.baseHref }}$request_uri" permanent;
}
{{- end -}}
{{- end }}

# redirect server error pages to the static page /50x.html
Expand Down
57 changes: 52 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "intershop-pwa",
"description": "Intershop Progressive Web App",
"version": "0.30.0",
"version": "0.31.0",
"license": "Intershop Standard Software End User License Agreement Intershop 7",
"keywords": [
"intershop"
Expand Down Expand Up @@ -43,7 +43,8 @@
"analyze": "ng build --prod --stats-json && npx webpack-bundle-analyzer --host 0.0.0.0 dist/browser/stats.json dist/browser",
"serve": "node dist/server/main.js",
"start": "npm-run-all build serve",
"start:local": "ng run intershop-pwa:serve-ssr:local"
"start:local": "ng run intershop-pwa:serve-ssr:local",
"xliff": "node scripts/convert-to-xliff.js"
},
"dependencies": {
"@angular/animations": "~11.2.12",
Expand Down Expand Up @@ -96,6 +97,7 @@
"typeface-roboto": "1.1.13",
"typeface-roboto-condensed": "1.1.13",
"url-polyfill": "^1.1.12",
"xliff": "^5.5.3",
"zone.js": "~0.11.4"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 1f5f8be

Please sign in to comment.