@commercetools-frontend-extensions/export-resources-modal 4.2.1 → 4.3.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 CHANGED
@@ -33,6 +33,7 @@ import ExportResourcesModal from '@commercetools-frontend-extensions/export-reso
33
33
  fieldGroups={[
34
34
  {
35
35
  groupLabel: 'All general fields',
36
+ groupName: 'general',
36
37
  fields: [
37
38
  {
38
39
  name: 'key',
@@ -78,6 +79,7 @@ import ExportResourcesModal from '@commercetools-frontend-extensions/export-reso
78
79
  },
79
80
  {
80
81
  groupLabel: 'All custom fields',
82
+ groupName: 'custom',
81
83
  fields: [
82
84
  {
83
85
  name: 'custom-type-key-and-type-id',
@@ -135,6 +137,7 @@ import ExportResourcesModal from '@commercetools-frontend-extensions/export-reso
135
137
  fields={[
136
138
  {
137
139
  groupLabel: 'All General fields',
140
+ groupName: 'general',
138
141
  fields:[
139
142
  {
140
143
  name: 'key',
@@ -171,6 +174,7 @@ import ExportResourcesModal from '@commercetools-frontend-extensions/export-reso
171
174
  },
172
175
  {
173
176
  groupLabel: 'All custom fields',
177
+ groupName: 'custom',
174
178
  fields: [
175
179
  {
176
180
  name: 'custom-type-key-and-typeid',
@@ -236,12 +240,17 @@ import ExportResourcesModal from '@commercetools-frontend-extensions/export-reso
236
240
  | `totalResourcesCount` | `number` | ✅ | | The count of all resources of identified `resourceType` |
237
241
  | `selectedResourceIds` | `array` | | | Array of Ids of the selected resources |
238
242
  | `fieldGroups` | `array` | ✅ | | Array of the grouped `fields` to export. |
239
- | `fieldGroups[].groupLabel` | `array` | ✅ | | Array of the grouped `fields` to export. |
243
+ | `fieldGroups[].groupLabel` | `string` | ✅ | | The label of the field group to be showin in the export modal |
244
+ | `fieldGroups[].groupName` | `string` | ✅ | | The name of the field group used to determine the state of expanded groups |
245
+ | `fieldGroups[].isExpanded` | `string` | | `false` | This property used to control the default state of each expandable group section in the UI. If `isExpanded` is set to `true`, then the corresponding group will be expanded when the component loads. The default value is `false` which means unless explicitly set to `true`, the group will be collapsed on initial load |
240
246
  | `fieldGroups[].fields` | `array` | ✅ | | Array of the fields to export. The fields must align with the [commercetools API schema](https://docs.commercetools.com/api/). Field can have nested `fields` array. |
241
247
  | `fieldGroups[].fields[].name` | `string` | ✅ | | A string that represents the unique identifier for each field |
242
248
  | `fieldGroups[].fields[].label` | `string` | ✅ | | The label of the field to be shown in the export modal |
243
249
  | `fieldGroups[].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 |
250
+ | `fieldGroups[].fields[].dependentGroupNames` | `array` | | | The array of group names are provided along with the `isReadOnly` to determine the state of readonly field. If any of the group mentioned in the `dependentGroupNames` has atleast 1 checkbox selected, then the field is automatically selected. If the `dependentGroupNames` is not passed then the state of `isReadOnly` is determined by the same group the field belongs to. |
244
251
  | `fieldGroups[].fields[].isSelectedByDefault` | `boolean` | | `true` | This field is a part of the `fields` array is used to control the default state of the corresponding checkbox in the UI. If `isSelectedByDefault` is set to true, the checkbox for that particular field will be checked by default when the component loads. The default value of this attribute is `true` which means unless explicitly set to `false`, the checkbox for the field will be checked on initial load. |
252
+ | `fieldGroups[].fields[].isExpandable` | `boolean` | | `false`| `isExpandable` property indicates if the field can be expanded/collapsed on the UI. If the `isExpandable` is passed as true, then a expand/collapse button is displayed on the UI to control |
253
+ | `fieldGroups[].fields[].isExpanded` | `boolean` | | `false` | This property is used along with `fieldGroups[].fields[].isExpandable` to control the default state of each expandable fields in the UI. If `fieldGroups[].fields[].isExpanded` is set to `true`, then the corresponding field will be expanded when the component loads. The default value is `false` which means unless explicitly set to `true`, the field will be collapsed on initial load |
245
254
  | `renderProperties` | `function` | | | A prop to render properties that are resource-specific |
246
255
  | `fieldOrder` | `string[]` | | | The field names are sorted based on the order passed. The value `*` can be passed to denote any fields and for example fieldOrder=['*', 'custom'] will push all the fields that starts with custom to the last in the list and any other fields will be at the beginning of the list |
247
256