@commercetools-frontend-extensions/export-resources-modal 1.0.8 → 1.2.0

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 CHANGED
@@ -31,11 +31,17 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
31
31
  resourceType="category"
32
32
  allResourcesCount={143}
33
33
  exportSelectionType="allResources"
34
- columns={[
34
+ fields={[
35
35
  { key: 'externalId' },
36
36
  { key: 'createdAt' },
37
37
  { key: 'lastModifiedAt' },
38
38
  { key: 'name', isLocalized: true },
39
+ { key: 'parent', fields: [
40
+ {
41
+ key: 'name',
42
+ isLocalized: true
43
+ }
44
+ ]},
39
45
  ]}
40
46
  renderProperties={()=>(
41
47
  <>
@@ -54,11 +60,17 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
54
60
  resourceType="category"
55
61
  allResourcesCount={143}
56
62
  exportSelectionType="onlyMatching"
57
- columns={[
63
+ fields={[
58
64
  { key: 'externalId' },
59
65
  { key: 'createdAt' },
60
66
  { key: 'lastModifiedAt' },
61
67
  { key: 'name', isLocalized: true },
68
+ { key: 'parent', fields: [
69
+ {
70
+ key: 'name',
71
+ isLocalized: true
72
+ }
73
+ ]},
62
74
  ]}
63
75
  appliedFilters={
64
76
  [
@@ -86,11 +98,17 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
86
98
  allResourcesCount={143}
87
99
  exportSelectionType="onlySelected"
88
100
  selectedResourceIds={['02ed9a7d-7c1f-40da-b2b7-4cca6752bf29', '04051276-1641-4e01-a03e-d4de16b7e4eb', 'ac7d9f7b-5c7d-4dd3-b82b-8555ab4a2a6e']}
89
- columns={[
101
+ fields={[
90
102
  { key: 'externalId' },
91
103
  { key: 'createdAt' },
92
104
  { key: 'lastModifiedAt' },
93
105
  { key: 'name', isLocalized: true },
106
+ { key: 'parent', fields: [
107
+ {
108
+ key: 'name',
109
+ isLocalized: true
110
+ }
111
+ ]},
94
112
  ]}
95
113
  renderProperties={()=>(
96
114
  <>
@@ -115,9 +133,10 @@ import { ExportResourcesModal } from '@commercetools-frontend-extensions/export-
115
133
  | `exportSelectionType` | `string` <br/>Possible values:<br/>`allResources, onlyMatching, onlySelected` | | `allResources` | The type of export, so either export all resources or export only resources that match the filters & search or export only selected resources |
116
134
  | `matchingResourcesCount` | `Number` | ✅ Required only if `exportSelectionType` is `onlyMatching` | | The count of resources that matches the filters & search |
117
135
  | `selectedResourceIds` | `array` | ✅ Required only if `exportSelectionType` is `onlySelected` | | Array of Ids of the selected resources |
118
- | `columns` | `array` | ✅ Required | | Array of the columns to export |
119
- | `columns[].key` | `string` | ✅ Required | | The unique key of the column that is used to identify data type |
120
- | `columns[].isLocalized` | `boolean` | ✅ Required | | The column is a localised field |
136
+ | `fields` | `array` | ✅ Required | | Array of the fields to export |
137
+ | `fields[].key` | `string` | ✅ Required | | The unique key of the field that is used to identify data type |
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 |
139
+ | `fields[].isLocalized` | `boolean` | | false | The field is a localized field |
121
140
  | `appliedSearchTerms` | `array` | | [] | Array of the search terms that are used when `exportSelectionType` is `onlyMatching` |
122
141
  | `appliedFilters` | `array` | | [] | Array of the filters that are used when `exportSelectionType` is `onlyMatching` |
123
142
  | `renderProperties` | `function` | | | A prop to render properties that are resource-specific |