@commercetools-frontend-extensions/export-resources-modal 1.3.4 → 1.3.5
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 -5
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +1 -2
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +1 -2
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,6 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
26
26
|
|
|
27
27
|
// in case export all the resources
|
|
28
28
|
<ExportResourcesModal
|
|
29
|
-
isOpen={true}
|
|
30
29
|
outputFormat="csv"
|
|
31
30
|
resourceType="category"
|
|
32
31
|
allResourcesCount={143}
|
|
@@ -55,7 +54,6 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
55
54
|
|
|
56
55
|
// in case export only resources matching filters & search
|
|
57
56
|
<ExportResourcesModal
|
|
58
|
-
isOpen={true}
|
|
59
57
|
outputFormat="csv"
|
|
60
58
|
resourceType="category"
|
|
61
59
|
allResourcesCount={143}
|
|
@@ -92,7 +90,6 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
92
90
|
|
|
93
91
|
// in case export only selected resources
|
|
94
92
|
<ExportResourcesModal
|
|
95
|
-
isOpen={true}
|
|
96
93
|
outputFormat="csv"
|
|
97
94
|
resourceType="category"
|
|
98
95
|
allResourcesCount={143}
|
|
@@ -124,8 +121,7 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
124
121
|
## Properties
|
|
125
122
|
|
|
126
123
|
| Props | Type | Required | Default | Description |
|
|
127
|
-
| ------------------------ | ----------------------------------------------------------------------------- | :---------------------------------------------------------: | -------------- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
128
|
-
| `isOpen` | `boolean` | ✅ Required | | Indicates whether the Modal is open or closed. The parent component needs to manage this state |
|
|
124
|
+
| ------------------------ | ----------------------------------------------------------------------------- | :---------------------------------------------------------: | -------------- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
129
125
|
| `outputFormat` | `string`<br/>Possible values: `json`, `csv` | | `json` | The file format to export |
|
|
130
126
|
| `closeModal` | `function` | ✅ Required | | Called when the page closes click on overlay, click on close button, press ESC. If the function is not provided, the page cannot be closed by any of the listed options |
|
|
131
127
|
| `resourceType` | `string` | ✅ Required | | The type of the resource, example: `category`, `product`... |
|
|
@@ -1227,7 +1227,6 @@ const ExportResourcesContext = /*#__PURE__*/react$1.createContext();
|
|
|
1227
1227
|
const ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
1228
1228
|
resourceType: PropTypes__default["default"].string.isRequired,
|
|
1229
1229
|
outputFormat: PropTypes__default["default"].string,
|
|
1230
|
-
isOpen: PropTypes__default["default"].bool.isRequired,
|
|
1231
1230
|
closeModal: PropTypes__default["default"].func.isRequired,
|
|
1232
1231
|
allResourcesCount: PropTypes__default["default"].number.isRequired,
|
|
1233
1232
|
matchingResourcesCount: PropTypes__default["default"].number,
|
|
@@ -1306,10 +1305,10 @@ const ExportResourcesModal = _ref => {
|
|
|
1306
1305
|
children: _ref2 => {
|
|
1307
1306
|
let formik = _ref2.formik;
|
|
1308
1307
|
return jsxRuntime.jsxs(applicationComponents.FormModalPage, {
|
|
1308
|
+
isOpen: true,
|
|
1309
1309
|
title: intl.formatMessage(messages.modalTitle, {
|
|
1310
1310
|
resourceType: resourceTypePlural
|
|
1311
1311
|
}),
|
|
1312
|
-
isOpen: props.isOpen,
|
|
1313
1312
|
onClose: props.closeModal,
|
|
1314
1313
|
onSecondaryButtonClick: props.closeModal,
|
|
1315
1314
|
isPrimaryButtonDisabled: !formik.isValid,
|
|
@@ -1189,7 +1189,6 @@ const ExportResourcesContext = /*#__PURE__*/react$1.createContext();
|
|
|
1189
1189
|
PropTypes__default["default"].shape({
|
|
1190
1190
|
resourceType: PropTypes__default["default"].string.isRequired,
|
|
1191
1191
|
outputFormat: PropTypes__default["default"].string,
|
|
1192
|
-
isOpen: PropTypes__default["default"].bool.isRequired,
|
|
1193
1192
|
closeModal: PropTypes__default["default"].func.isRequired,
|
|
1194
1193
|
allResourcesCount: PropTypes__default["default"].number.isRequired,
|
|
1195
1194
|
matchingResourcesCount: PropTypes__default["default"].number,
|
|
@@ -1264,10 +1263,10 @@ const ExportResourcesModal = _ref => {
|
|
|
1264
1263
|
children: _ref2 => {
|
|
1265
1264
|
let formik = _ref2.formik;
|
|
1266
1265
|
return jsxRuntime.jsxs(applicationComponents.FormModalPage, {
|
|
1266
|
+
isOpen: true,
|
|
1267
1267
|
title: intl.formatMessage(messages.modalTitle, {
|
|
1268
1268
|
resourceType: resourceTypePlural
|
|
1269
1269
|
}),
|
|
1270
|
-
isOpen: props.isOpen,
|
|
1271
1270
|
onClose: props.closeModal,
|
|
1272
1271
|
onSecondaryButtonClick: props.closeModal,
|
|
1273
1272
|
isPrimaryButtonDisabled: !formik.isValid,
|
|
@@ -1202,7 +1202,6 @@ const ExportResourcesContext = /*#__PURE__*/createContext();
|
|
|
1202
1202
|
const ExportResourcesModalShape = PropTypes.shape({
|
|
1203
1203
|
resourceType: PropTypes.string.isRequired,
|
|
1204
1204
|
outputFormat: PropTypes.string,
|
|
1205
|
-
isOpen: PropTypes.bool.isRequired,
|
|
1206
1205
|
closeModal: PropTypes.func.isRequired,
|
|
1207
1206
|
allResourcesCount: PropTypes.number.isRequired,
|
|
1208
1207
|
matchingResourcesCount: PropTypes.number,
|
|
@@ -1281,10 +1280,10 @@ const ExportResourcesModal = _ref => {
|
|
|
1281
1280
|
children: _ref2 => {
|
|
1282
1281
|
let formik = _ref2.formik;
|
|
1283
1282
|
return jsxs(FormModalPage, {
|
|
1283
|
+
isOpen: true,
|
|
1284
1284
|
title: intl.formatMessage(messages.modalTitle, {
|
|
1285
1285
|
resourceType: resourceTypePlural
|
|
1286
1286
|
}),
|
|
1287
|
-
isOpen: props.isOpen,
|
|
1288
1287
|
onClose: props.closeModal,
|
|
1289
1288
|
onSecondaryButtonClick: props.closeModal,
|
|
1290
1289
|
isPrimaryButtonDisabled: !formik.isValid,
|
package/package.json
CHANGED