@shopgate/pwa-common 7.23.0 → 7.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants/Configuration.js +26 -1
- package/package.json +3 -3
|
@@ -1 +1,26 @@
|
|
|
1
|
-
export var APP_PLATFORM='APP_PLATFORM';export var RESET_APP_REDUCERS='RESET_APP_REDUCERS';export var DEFAULT_PRODUCTS_FETCH_PARAMS='DEFAULT_PRODUCTS_FETCH_PARAMS';export var TAB_BAR_PATTERNS_BLACK_LIST='TAB_BAR_PATTERNS_BLACK_LIST';export var CONFIGURATION_COLLECTION_KEY_BASE_URL='CONFIGURATION_COLLECTION_KEY_BASE_URL';export var PIPELINES='PIPELINES';export var IS_CONNECT_EXTENSION_ATTACHED='IS_CONNECT_EXTENSION_ATTACHED'
|
|
1
|
+
export var APP_PLATFORM='APP_PLATFORM';export var RESET_APP_REDUCERS='RESET_APP_REDUCERS';export var DEFAULT_PRODUCTS_FETCH_PARAMS='DEFAULT_PRODUCTS_FETCH_PARAMS';export var TAB_BAR_PATTERNS_BLACK_LIST='TAB_BAR_PATTERNS_BLACK_LIST';export var CONFIGURATION_COLLECTION_KEY_BASE_URL='CONFIGURATION_COLLECTION_KEY_BASE_URL';export var PIPELINES='PIPELINES';export var IS_CONNECT_EXTENSION_ATTACHED='IS_CONNECT_EXTENSION_ATTACHED';/**
|
|
2
|
+
* This configuration collection key can be used to register a helper function to modify external
|
|
3
|
+
* image urls that are not delivered via the Shopgate CDN. The handler allows to add additional
|
|
4
|
+
* parameters to the image url to e.g. set resolution, format or quality.
|
|
5
|
+
*
|
|
6
|
+
* The handler function receives the source url and an object containing the options for the image.
|
|
7
|
+
* @param {string} src - The plain source URL of the image.
|
|
8
|
+
* @param {Object} options - An object containing parameters for the image.
|
|
9
|
+
* @param {number} options.width - The desired width of the image in pixels.
|
|
10
|
+
* @param {number} options.height - The desired height of the image in pixels.
|
|
11
|
+
* @param {string} options.fillColor - A hex color code to use as the background fill color.
|
|
12
|
+
* @param {number} options.quality - The quality of the image (e.g., for compression) as percentage.
|
|
13
|
+
* @param {string} options.format - The desired image format (e.g., 'jpeg', 'png').
|
|
14
|
+
* @returns {string|null|undefined} - The modified image URL.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* configuration.set(
|
|
18
|
+
* CONFIGURATION_COLLECTION_CREATE_EXTERNAL_IMAGE_URL,
|
|
19
|
+
* (baseUrl, { width } = {}) => {
|
|
20
|
+
* if (!baseUrl || !baseUrl.startsWith('https://mycdn.com')) {
|
|
21
|
+
* return null;
|
|
22
|
+
* }
|
|
23
|
+
* return `${baseUrl}?width=${width}`;
|
|
24
|
+
* }
|
|
25
|
+
* );
|
|
26
|
+
*/export var CONFIGURATION_COLLECTION_CREATE_EXTERNAL_IMAGE_URL='CONFIGURATION_COLLECTION_CREATE_EXTERNAL_IMAGE_URL';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/pwa-common",
|
|
3
|
-
"version": "7.23.
|
|
3
|
+
"version": "7.23.2",
|
|
4
4
|
"description": "Common library for the Shopgate Connect PWA.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Shopgate <support@shopgate.com>",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@redux-devtools/extension": "^3.3.0",
|
|
19
19
|
"@sentry/browser": "6.0.1",
|
|
20
|
-
"@shopgate/pwa-benchmark": "7.23.
|
|
20
|
+
"@shopgate/pwa-benchmark": "7.23.2",
|
|
21
21
|
"@virtuous/conductor": "~2.5.0",
|
|
22
22
|
"@virtuous/react-conductor": "~2.5.0",
|
|
23
23
|
"@virtuous/redux-persister": "1.1.0-beta.7",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"url-search-params": "^0.10.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@shopgate/pwa-core": "7.23.
|
|
46
|
+
"@shopgate/pwa-core": "7.23.2",
|
|
47
47
|
"@types/react-portal": "^3.0.9",
|
|
48
48
|
"lodash": "^4.17.4",
|
|
49
49
|
"prop-types": "~15.8.1",
|