@commercetools-frontend-extensions/export-resources-modal 3.5.0 → 3.5.1
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/README.md +1 -1
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +3 -0
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +3 -0
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +3 -0
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -205,7 +205,7 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
205
205
|
| `totalResourcesCount` | `Number` | (✅) Required only if the `exportType` is `all` | | The count of all resources of identified `resourceType` |
|
|
206
206
|
| `exportType` | `string` <br/>Possible values:<br/>`all` and `selected` | | `all` | The type of export, so either export `all` resources or export only `selected` resources |
|
|
207
207
|
| `selectedResourceIds` | `array` | (✅) Required only if the `exportType` is `selected` | | Array of Ids of the selected resources |
|
|
208
|
-
| `fields` | `array` | ✅ | | Array of the fields to export. The fields must align with the [commercetools
|
|
208
|
+
| `fields` | `array` | ✅ | | Array of the fields to export. The fields must align with the [commercetools API schema](https://docs.commercetools.com/api/) |
|
|
209
209
|
| `fields[].name` | `string` | ✅ | | A string that represents the unique identifier for each field |
|
|
210
210
|
| `fields[].label` | `string` | ✅ | | The label of the field to be shown in the export modal |
|
|
211
211
|
| `fields[].isRequired` | `boolean` | | `false` | `isRequired` field indicates whether a field is required for the export process. If `true` the field will be selected by default and cannot be deselected by the user. This is useful for fields that are essential for the export process. Fields marked as required will have a `*` appended to their label in the UI |
|
|
@@ -519,6 +519,9 @@ const categoryFieldExtension = fields => {
|
|
|
519
519
|
if (_startsWithInstanceProperty__default["default"](field).call(field, 'custom.fields.') && !_includesInstanceProperty__default["default"](acc).call(acc, 'custom.type.key')) {
|
|
520
520
|
return [...acc, 'custom.type.key', 'custom.type.typeId', field];
|
|
521
521
|
}
|
|
522
|
+
if (field === 'assets') {
|
|
523
|
+
return [...acc, 'assets.key', 'assets.name', 'assets.sources.key', 'assets.sources.uri', 'assets.sources.contentType', 'assets.sources.dimensions.w', 'assets.sources.dimensions.h', 'assets.description', 'assets.tags'];
|
|
524
|
+
}
|
|
522
525
|
return [...acc, field];
|
|
523
526
|
}, []);
|
|
524
527
|
};
|
|
@@ -519,6 +519,9 @@ const categoryFieldExtension = fields => {
|
|
|
519
519
|
if (_startsWithInstanceProperty__default["default"](field).call(field, 'custom.fields.') && !_includesInstanceProperty__default["default"](acc).call(acc, 'custom.type.key')) {
|
|
520
520
|
return [...acc, 'custom.type.key', 'custom.type.typeId', field];
|
|
521
521
|
}
|
|
522
|
+
if (field === 'assets') {
|
|
523
|
+
return [...acc, 'assets.key', 'assets.name', 'assets.sources.key', 'assets.sources.uri', 'assets.sources.contentType', 'assets.sources.dimensions.w', 'assets.sources.dimensions.h', 'assets.description', 'assets.tags'];
|
|
524
|
+
}
|
|
522
525
|
return [...acc, field];
|
|
523
526
|
}, []);
|
|
524
527
|
};
|
|
@@ -486,6 +486,9 @@ const categoryFieldExtension = fields => {
|
|
|
486
486
|
if (_startsWithInstanceProperty(field).call(field, 'custom.fields.') && !_includesInstanceProperty(acc).call(acc, 'custom.type.key')) {
|
|
487
487
|
return [...acc, 'custom.type.key', 'custom.type.typeId', field];
|
|
488
488
|
}
|
|
489
|
+
if (field === 'assets') {
|
|
490
|
+
return [...acc, 'assets.key', 'assets.name', 'assets.sources.key', 'assets.sources.uri', 'assets.sources.contentType', 'assets.sources.dimensions.w', 'assets.sources.dimensions.h', 'assets.description', 'assets.tags'];
|
|
491
|
+
}
|
|
489
492
|
return [...acc, field];
|
|
490
493
|
}, []);
|
|
491
494
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend-extensions/export-resources-modal",
|
|
3
3
|
"description": "Shared export modal for exporting resources",
|
|
4
|
-
"version": "3.5.
|
|
4
|
+
"version": "3.5.1",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"README.md"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@babel/runtime": "7.24.
|
|
19
|
-
"@babel/runtime-corejs3": "7.24.
|
|
18
|
+
"@babel/runtime": "7.24.4",
|
|
19
|
+
"@babel/runtime-corejs3": "7.24.4",
|
|
20
20
|
"@emotion/react": "11.11.4",
|
|
21
|
-
"@emotion/styled": "11.11.
|
|
22
|
-
"@formatjs/cli": "6.2.
|
|
21
|
+
"@emotion/styled": "11.11.5",
|
|
22
|
+
"@formatjs/cli": "6.2.9",
|
|
23
23
|
"formik": "^2.2.9",
|
|
24
24
|
"gql-query-builder": "^3.8.0",
|
|
25
25
|
"jest": "29.7.0",
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"omit-empty-es": "^1.1.3",
|
|
28
28
|
"prop-types": "15.8.1",
|
|
29
29
|
"react": "17.0.2",
|
|
30
|
-
"react-intl": "6.6.
|
|
30
|
+
"react-intl": "6.6.5"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@commercetools-frontend/actions-global": "22.23.
|
|
34
|
-
"@commercetools-frontend/application-components": "22.23.
|
|
35
|
-
"@commercetools-frontend/application-shell": "22.23.
|
|
36
|
-
"@commercetools-frontend/application-shell-connectors": "22.23.
|
|
37
|
-
"@commercetools-frontend/constants": "22.23.
|
|
38
|
-
"@commercetools-frontend/jest-preset-mc-app": "22.23.
|
|
39
|
-
"@commercetools-frontend/sdk": "22.23.
|
|
40
|
-
"@commercetools-frontend/sentry": "22.23.
|
|
33
|
+
"@commercetools-frontend/actions-global": "22.23.3",
|
|
34
|
+
"@commercetools-frontend/application-components": "22.23.3",
|
|
35
|
+
"@commercetools-frontend/application-shell": "22.23.3",
|
|
36
|
+
"@commercetools-frontend/application-shell-connectors": "22.23.3",
|
|
37
|
+
"@commercetools-frontend/constants": "22.23.3",
|
|
38
|
+
"@commercetools-frontend/jest-preset-mc-app": "22.23.3",
|
|
39
|
+
"@commercetools-frontend/sdk": "22.23.3",
|
|
40
|
+
"@commercetools-frontend/sentry": "22.23.3",
|
|
41
41
|
"@commercetools-frontend/ui-kit": "19.0.0",
|
|
42
42
|
"@commercetools-uikit/design-system": "19.0.0",
|
|
43
43
|
"@preconstruct/cli": "2.8.3",
|