@commercetools-frontend-extensions/export-resources-modal 1.4.1 → 1.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 +9 -5
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +248 -387
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +246 -381
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +249 -388
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
27
27
|
// in case export all the resources
|
|
28
28
|
<ExportResourcesModal
|
|
29
29
|
outputFormat="csv"
|
|
30
|
+
showExportSelection={true}
|
|
30
31
|
resourceType="category"
|
|
31
32
|
allResourcesCount={143}
|
|
32
33
|
exportSelectionType="allResources"
|
|
@@ -55,6 +56,7 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
55
56
|
// in case export only resources matching filters & search
|
|
56
57
|
<ExportResourcesModal
|
|
57
58
|
outputFormat="csv"
|
|
59
|
+
showExportSelection={true}
|
|
58
60
|
resourceType="category"
|
|
59
61
|
allResourcesCount={143}
|
|
60
62
|
exportSelectionType="onlyMatching"
|
|
@@ -91,6 +93,7 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
91
93
|
// in case export only selected resources
|
|
92
94
|
<ExportResourcesModal
|
|
93
95
|
outputFormat="csv"
|
|
96
|
+
showExportSelection={true}
|
|
94
97
|
resourceType="category"
|
|
95
98
|
allResourcesCount={143}
|
|
96
99
|
exportSelectionType="onlySelected"
|
|
@@ -121,8 +124,9 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
121
124
|
## Properties
|
|
122
125
|
|
|
123
126
|
| Props | Type | Required | Default | Description |
|
|
124
|
-
| ------------------------ | ----------------------------------------------------------------------------- | :---------------------------------------------------------: | -------------- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
125
|
-
| `outputFormat` | `string`<br/>Possible values: `
|
|
127
|
+
| ------------------------ | ----------------------------------------------------------------------------- | :---------------------------------------------------------: | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
128
|
+
| `outputFormat` | `string`<br/>Possible values: `csv`, `json` | | `csv` | The file format to export |
|
|
129
|
+
| `showExportSelection` | `boolean` | | `false` | Determines whether the export selection section is displayed. This section allows users to select specific fields for export. This feature is a WIP |
|
|
126
130
|
| `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 |
|
|
127
131
|
| `resourceType` | `string` | ✅ Required | | The type of the resource, example: `category`, `product`... |
|
|
128
132
|
| `allResourcesCount` | `Number` | ✅ Required | | The count of all resources of identified `resourceType` |
|
|
@@ -132,9 +136,9 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
|
|
|
132
136
|
| `fields` | `array` | ✅ Required | | Array of the fields to export |
|
|
133
137
|
| `fields[].key` | `string` | ✅ Required | | The unique key of the field that is used to identify data type |
|
|
134
138
|
| `fields[].label` | `string` | | | The label of the field to be shown in the export modal, if it's not set the key will be shown instead |
|
|
135
|
-
| `fields[].isLocalized` | `boolean` | | false
|
|
136
|
-
| `appliedSearchTerms` | `array` | | []
|
|
137
|
-
| `appliedFilters` | `array` | | []
|
|
139
|
+
| `fields[].isLocalized` | `boolean` | | `false` | The field is a localized field |
|
|
140
|
+
| `appliedSearchTerms` | `array` | | `[]` | Array of the search terms that are used when `exportSelectionType` is `onlyMatching` |
|
|
141
|
+
| `appliedFilters` | `array` | | `[]` | Array of the filters that are used when `exportSelectionType` is `onlyMatching` |
|
|
138
142
|
| `renderProperties` | `function` | | | A prop to render properties that are resource-specific |
|
|
139
143
|
|
|
140
144
|
## Releasing
|