@commercetools-frontend-extensions/export-resources-modal 5.11.3 → 5.12.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.
Files changed (25) hide show
  1. package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +91 -17
  2. package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +91 -17
  3. package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +91 -17
  4. package/dist/{de-6ccb0cef.cjs.prod.js → de-c329851c.cjs.prod.js} +4 -0
  5. package/dist/{de-35056949.esm.js → de-c4790906.esm.js} +4 -0
  6. package/dist/{de-f6836c76.cjs.dev.js → de-e750003d.cjs.dev.js} +4 -0
  7. package/dist/declarations/src/@constants/export-types.d.ts +1 -0
  8. package/dist/declarations/src/@constants/exportable-resources.d.ts +1 -0
  9. package/dist/declarations/src/@constants/resource-type-messages.d.ts +1 -0
  10. package/dist/declarations/src/@hooks/use-start-export-operation.d.ts +1 -1
  11. package/dist/declarations/src/@types/export-resources-modal-context.d.ts +4 -1
  12. package/dist/declarations/src/@types/export-resources-modal-types.d.ts +5 -0
  13. package/dist/{en-91d5135c.cjs.dev.js → en-266b37b4.cjs.dev.js} +4 -0
  14. package/dist/{en-0158f656.cjs.prod.js → en-71b1a370.cjs.prod.js} +4 -0
  15. package/dist/{en-cec5abba.esm.js → en-95d6ae91.esm.js} +4 -0
  16. package/dist/{es-ba43fc4a.cjs.dev.js → es-247f58fc.cjs.prod.js} +4 -0
  17. package/dist/{es-00dfbfb5.cjs.prod.js → es-e7f0907c.cjs.dev.js} +4 -0
  18. package/dist/{es-2b5d715f.esm.js → es-ec8412cc.esm.js} +4 -0
  19. package/dist/{fr-FR-ed5c93d6.cjs.dev.js → fr-FR-91c6dc87.cjs.prod.js} +4 -0
  20. package/dist/{fr-FR-06105d51.esm.js → fr-FR-b8239dad.esm.js} +4 -0
  21. package/dist/{fr-FR-4cfbc2bd.cjs.prod.js → fr-FR-e38078dc.cjs.dev.js} +4 -0
  22. package/dist/{pt-BR-96af8e57.cjs.prod.js → pt-BR-0e9382e5.cjs.prod.js} +4 -0
  23. package/dist/{pt-BR-21e12a39.esm.js → pt-BR-26f18714.esm.js} +4 -0
  24. package/dist/{pt-BR-7de26dc9.cjs.dev.js → pt-BR-59bc8b1c.cjs.dev.js} +4 -0
  25. package/package.json +1 -1
@@ -163,6 +163,11 @@ var messages = reactIntl.defineMessages({
163
163
  description: 'Label for the business units modal title',
164
164
  defaultMessage: 'Export business units'
165
165
  },
166
+ 'modalTitle.product-tailoring': {
167
+ id: 'ExportResourcesModal.modalTitle.productTailoring',
168
+ description: 'Label for the product tailorings modal title',
169
+ defaultMessage: 'Export tailored products'
170
+ },
166
171
  outputFormat: {
167
172
  id: 'ExportResourcesModal.outputFormat',
168
173
  description: 'File format like (csv, xls, ...etc)',
@@ -387,6 +392,26 @@ var messages = reactIntl.defineMessages({
387
392
  description: 'Label for Export Filtered business units',
388
393
  defaultMessage: 'Export filtered: {total, plural, one {# business unit} other {# business units}}'
389
394
  },
395
+ exportScopeAllProductTailorings: {
396
+ id: 'ExportResourcesModal.exportScopeAllProductTailorings',
397
+ description: 'Label for Export All product tailorings',
398
+ defaultMessage: 'Export tailored products for {total, plural, one {# product} other {# products}} in all stores'
399
+ },
400
+ exportScopeSelectedProductTailorings: {
401
+ id: 'ExportResourcesModal.exportScopeSelectedProductTailorings',
402
+ description: 'Label for Export Selected product tailorings',
403
+ defaultMessage: 'Export tailored products for the {total, plural, one {# selected product} other {# selected products}}'
404
+ },
405
+ exportScopeFilteredProductTailorings: {
406
+ id: 'ExportResourcesModal.exportScopeFilteredProductTailorings',
407
+ description: 'Label for Export Filtered product tailorings',
408
+ defaultMessage: 'Export tailored products for the {total, plural, one {# filtered product} other {# filtered products}}'
409
+ },
410
+ exportScopeSpecificStoreProductTailorings: {
411
+ id: 'ExportResourcesModal.exportScopeSpecificStoreProductTailorings',
412
+ description: 'Label for Export For a specific store option for product tailorings',
413
+ defaultMessage: 'Export tailored products for a specific store'
414
+ },
390
415
  exportScopeAllOrders: {
391
416
  id: 'ExportResourcesModal.exportScopeAllOrders',
392
417
  description: 'Label for Export All orders',
@@ -677,6 +702,11 @@ var messages = reactIntl.defineMessages({
677
702
  description: 'Label for query predicate option',
678
703
  defaultMessage: 'Query predicate'
679
704
  },
705
+ selectStorePlaceholder: {
706
+ id: 'ExportResourcesModal.selectStorePlaceholder',
707
+ description: 'Placeholder for the store selection dropdown',
708
+ defaultMessage: 'Select store'
709
+ },
680
710
  invalidQueryPredicate: {
681
711
  id: 'ExportResourcesModal.invalidQueryPredicate',
682
712
  description: 'Error when query predicate field is not valid',
@@ -839,7 +869,8 @@ const EXPORT_TYPES = {
839
869
  ALL: 'all',
840
870
  FILTERED: 'filtered',
841
871
  SELECTED: 'selected',
842
- QUERY_PREDICATE: 'query-predicate'
872
+ QUERY_PREDICATE: 'query-predicate',
873
+ SPECIFIC_STORE: 'specific-store'
843
874
  };
844
875
 
845
876
  const EXPORTABLE_RESOURCES = {
@@ -850,7 +881,8 @@ const EXPORTABLE_RESOURCES = {
850
881
  INVENTORY_ENTRY: 'inventory-entry',
851
882
  ORDER: 'order',
852
883
  CUSTOMER: 'customer',
853
- BUSINESS_UNIT: 'business-unit'
884
+ BUSINESS_UNIT: 'business-unit',
885
+ PRODUCT_TAILORING: 'product-tailoring'
854
886
  };
855
887
 
856
888
  const OUTPUT_FORMATS = {
@@ -910,6 +942,12 @@ const resourceTypeMessages = {
910
942
  exportScopeAll: messages.exportScopeAllBusinessUnits,
911
943
  exportScopeSelected: messages.exportScopeSelectedBusinessUnits,
912
944
  exportScopeFiltered: messages.exportScopeFilteredBusinessUnits
945
+ },
946
+ [EXPORTABLE_RESOURCES.PRODUCT_TAILORING]: {
947
+ exportScopeAll: messages.exportScopeAllProductTailorings,
948
+ exportScopeSelected: messages.exportScopeSelectedProductTailorings,
949
+ exportScopeFiltered: messages.exportScopeFilteredProductTailorings,
950
+ exportScopeSpecificStore: messages.exportScopeSpecificStoreProductTailorings
913
951
  }
914
952
  };
915
953
 
@@ -1141,7 +1179,8 @@ function resourceTypeToFileName(resourceType, locale) {
1141
1179
  [EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: 'Inventories',
1142
1180
  [EXPORTABLE_RESOURCES.CUSTOMER]: 'Customers',
1143
1181
  [EXPORTABLE_RESOURCES.ORDER]: 'Orders',
1144
- [EXPORTABLE_RESOURCES.BUSINESS_UNIT]: 'Business_Units'
1182
+ [EXPORTABLE_RESOURCES.BUSINESS_UNIT]: 'Business_Units',
1183
+ [EXPORTABLE_RESOURCES.PRODUCT_TAILORING]: 'Product_Tailorings'
1145
1184
  };
1146
1185
  const displayName = resourceTypeMap[resourceType];
1147
1186
  if (!displayName) {
@@ -1770,7 +1809,7 @@ const useStartExportOperation = props => {
1770
1809
  projectKey: applicationContext.project?.key
1771
1810
  })),
1772
1811
  projectKey = _useApplicationContex.projectKey;
1773
- const startExportOperation = async (values, exportType, fieldSelectionMode, localeOption, importedHeaders) => {
1812
+ const startExportOperation = async (values, exportType, fieldSelectionMode, localeOption, importedHeaders, selectedStoreKey) => {
1774
1813
  try {
1775
1814
  if (!projectKey) throw new Error('Project key is missing');
1776
1815
  let fields = [];
@@ -1793,6 +1832,8 @@ const useStartExportOperation = props => {
1793
1832
  } else if (exportType === EXPORT_TYPES.QUERY_PREDICATE) {
1794
1833
  var _context;
1795
1834
  where = _trimInstanceProperty__default["default"](_context = values.queryPredicate).call(_context);
1835
+ } else if (exportType === EXPORT_TYPES.SPECIFIC_STORE) {
1836
+ where = `store(key="${selectedStoreKey}")`;
1796
1837
  }
1797
1838
  where = mergeWhereClause(props.baseFilters?.where, where);
1798
1839
  let locales = undefined;
@@ -2154,6 +2195,7 @@ const ExportPreferenceSection = () => {
2154
2195
  function ownKeys$8(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
2155
2196
  function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$8(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2156
2197
  function ExportScopeSection() {
2198
+ const intl = reactIntl.useIntl();
2157
2199
  const _useExportResourcesMo = useExportResourcesModalContext(),
2158
2200
  formik = _useExportResourcesMo.formik,
2159
2201
  exportType = _useExportResourcesMo.exportType,
@@ -2164,7 +2206,10 @@ function ExportScopeSection() {
2164
2206
  setExportType = _useExportResourcesMo.setExportType,
2165
2207
  resourceType = _useExportResourcesMo.resourceType,
2166
2208
  hideExportSelectedResourcesOption = _useExportResourcesMo.hideExportSelectedResourcesOption,
2167
- showQueryPredicateOption = _useExportResourcesMo.showQueryPredicateOption;
2209
+ showQueryPredicateOption = _useExportResourcesMo.showQueryPredicateOption,
2210
+ stores = _useExportResourcesMo.stores,
2211
+ selectedStoreKey = _useExportResourcesMo.selectedStoreKey,
2212
+ setSelectedStoreKey = _useExportResourcesMo.setSelectedStoreKey;
2168
2213
  const shouldShowQueryPredicateField = exportType === EXPORT_TYPES.QUERY_PREDICATE;
2169
2214
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
2170
2215
  children: [jsxRuntime.jsxs(uiKit.RadioInput.Group, {
@@ -2212,7 +2257,26 @@ function ExportScopeSection() {
2212
2257
  children: jsxRuntime.jsx(uiKit.Text.Body, {
2213
2258
  intlMessage: messages.queryPredicate
2214
2259
  })
2260
+ }), stores && stores.length > 0 && resourceTypeMessages[resourceType].exportScopeSpecificStore && jsxRuntime.jsx(uiKit.RadioInput.Option, {
2261
+ value: EXPORT_TYPES.SPECIFIC_STORE,
2262
+ children: jsxRuntime.jsx(uiKit.Text.Body, {
2263
+ intlMessage: resourceTypeMessages[resourceType].exportScopeSpecificStore
2264
+ })
2215
2265
  })]
2266
+ }), stores && stores.length > 0 && exportType !== EXPORT_TYPES.QUERY_PREDICATE && jsxRuntime.jsx(uiKit.SelectField, {
2267
+ name: "selectedStoreKey",
2268
+ title: "",
2269
+ horizontalConstraint: 7,
2270
+ isDisabled: exportType !== EXPORT_TYPES.SPECIFIC_STORE,
2271
+ value: selectedStoreKey,
2272
+ onChange: event => setSelectedStoreKey(event.target.value),
2273
+ options: _mapInstanceProperty__default["default"](stores).call(stores, store => ({
2274
+ value: store.key,
2275
+ label: store.name
2276
+ })),
2277
+ placeholder: intl.formatMessage(messages.selectStorePlaceholder),
2278
+ menuPortalTarget: document.body,
2279
+ menuPortalZIndex: Z_INDEX_DROPDOWN
2216
2280
  }), shouldShowQueryPredicateField && jsxRuntime.jsx(uiKit.TextField, {
2217
2281
  name: "queryPredicate",
2218
2282
  "data-testid": "query-predicate-field",
@@ -2234,7 +2298,10 @@ const ExportFileSettingsStep = () => {
2234
2298
  resourceType = _useExportResourcesMo.resourceType,
2235
2299
  setFieldSelectionMode = _useExportResourcesMo.setFieldSelectionMode,
2236
2300
  setLocaleOption = _useExportResourcesMo.setLocaleOption,
2237
- onClose = _useExportResourcesMo.onClose;
2301
+ onClose = _useExportResourcesMo.onClose,
2302
+ exportType = _useExportResourcesMo.exportType,
2303
+ selectedStoreKey = _useExportResourcesMo.selectedStoreKey;
2304
+ const isStoreSelectionMissing = exportType === EXPORT_TYPES.SPECIFIC_STORE && !selectedStoreKey;
2238
2305
  const handleOutputFormatChange = event => {
2239
2306
  formik.handleChange(event);
2240
2307
  if (event.target.value === OUTPUT_FORMATS.JSON) {
@@ -2254,7 +2321,7 @@ const ExportFileSettingsStep = () => {
2254
2321
  })}: ${intl.formatMessage(messages.selectContentToExport)}`,
2255
2322
  iconLeftPrimaryButton: jsxRuntime.jsx(uiKit.AngleRightIcon, {}),
2256
2323
  onPrimaryButtonClick: formik.submitForm,
2257
- isPrimaryButtonDisabled: !formik.isValid,
2324
+ isPrimaryButtonDisabled: !formik.isValid || isStoreSelectionMissing,
2258
2325
  onSecondaryButtonClick: onClose,
2259
2326
  onClose: onClose,
2260
2327
  size: 16,
@@ -3092,10 +3159,14 @@ const ExportResourcesProvider = _ref => {
3092
3159
  _React$useState0 = _slicedToArray(_React$useState9, 2),
3093
3160
  importedHeaders = _React$useState0[0],
3094
3161
  setImportedHeaders = _React$useState0[1];
3095
- const _React$useState1 = React__default["default"].useState([]),
3162
+ const _React$useState1 = React__default["default"].useState(''),
3096
3163
  _React$useState10 = _slicedToArray(_React$useState1, 2),
3097
- validationErrors = _React$useState10[0],
3098
- setValidationErrors = _React$useState10[1];
3164
+ selectedStoreKey = _React$useState10[0],
3165
+ setSelectedStoreKey = _React$useState10[1];
3166
+ const _React$useState11 = React__default["default"].useState([]),
3167
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
3168
+ validationErrors = _React$useState12[0],
3169
+ setValidationErrors = _React$useState12[1];
3099
3170
  const _useStartExportOperat = useStartExportOperation(props),
3100
3171
  startExportOperation = _useStartExportOperat.startExportOperation;
3101
3172
  const _useValidateExportOpe = useValidateExportOperation(),
@@ -3151,7 +3222,7 @@ const ExportResourcesProvider = _ref => {
3151
3222
  setCurrentStep(Step.ValidationErrors);
3152
3223
  }
3153
3224
  } else {
3154
- startExportOperation(values, exportType, fieldSelectionMode, localeOption, importedHeaders);
3225
+ startExportOperation(values, exportType, fieldSelectionMode, localeOption, importedHeaders, selectedStoreKey);
3155
3226
  }
3156
3227
  }
3157
3228
  });
@@ -3179,7 +3250,10 @@ const ExportResourcesProvider = _ref => {
3179
3250
  setLocaleOption,
3180
3251
  importedHeaders,
3181
3252
  setImportedHeaders,
3182
- validationErrors
3253
+ validationErrors,
3254
+ stores: props.stores,
3255
+ selectedStoreKey,
3256
+ setSelectedStoreKey
3183
3257
  },
3184
3258
  children: children
3185
3259
  });
@@ -3575,17 +3649,17 @@ const getChunkImport = locale => {
3575
3649
  const intlLocale = i18n.mapLocaleToIntlLocale(locale);
3576
3650
  switch (intlLocale) {
3577
3651
  case 'de':
3578
- return Promise.resolve().then(function () { return require('./de-f6836c76.cjs.dev.js'); });
3652
+ return Promise.resolve().then(function () { return require('./de-e750003d.cjs.dev.js'); });
3579
3653
  case 'es':
3580
- return Promise.resolve().then(function () { return require('./es-ba43fc4a.cjs.dev.js'); });
3654
+ return Promise.resolve().then(function () { return require('./es-e7f0907c.cjs.dev.js'); });
3581
3655
  case 'fr-FR':
3582
- return Promise.resolve().then(function () { return require('./fr-FR-ed5c93d6.cjs.dev.js'); });
3656
+ return Promise.resolve().then(function () { return require('./fr-FR-e38078dc.cjs.dev.js'); });
3583
3657
  case 'ja':
3584
3658
  return Promise.resolve().then(function () { return require('./ja-9bd5f452.cjs.dev.js'); });
3585
3659
  case 'pt-BR':
3586
- return Promise.resolve().then(function () { return require('./pt-BR-7de26dc9.cjs.dev.js'); });
3660
+ return Promise.resolve().then(function () { return require('./pt-BR-59bc8b1c.cjs.dev.js'); });
3587
3661
  default:
3588
- return Promise.resolve().then(function () { return require('./en-91d5135c.cjs.dev.js'); });
3662
+ return Promise.resolve().then(function () { return require('./en-266b37b4.cjs.dev.js'); });
3589
3663
  }
3590
3664
  };
3591
3665
  const loadMessages = async locale => {
@@ -163,6 +163,11 @@ var messages = reactIntl.defineMessages({
163
163
  description: 'Label for the business units modal title',
164
164
  defaultMessage: 'Export business units'
165
165
  },
166
+ 'modalTitle.product-tailoring': {
167
+ id: 'ExportResourcesModal.modalTitle.productTailoring',
168
+ description: 'Label for the product tailorings modal title',
169
+ defaultMessage: 'Export tailored products'
170
+ },
166
171
  outputFormat: {
167
172
  id: 'ExportResourcesModal.outputFormat',
168
173
  description: 'File format like (csv, xls, ...etc)',
@@ -387,6 +392,26 @@ var messages = reactIntl.defineMessages({
387
392
  description: 'Label for Export Filtered business units',
388
393
  defaultMessage: 'Export filtered: {total, plural, one {# business unit} other {# business units}}'
389
394
  },
395
+ exportScopeAllProductTailorings: {
396
+ id: 'ExportResourcesModal.exportScopeAllProductTailorings',
397
+ description: 'Label for Export All product tailorings',
398
+ defaultMessage: 'Export tailored products for {total, plural, one {# product} other {# products}} in all stores'
399
+ },
400
+ exportScopeSelectedProductTailorings: {
401
+ id: 'ExportResourcesModal.exportScopeSelectedProductTailorings',
402
+ description: 'Label for Export Selected product tailorings',
403
+ defaultMessage: 'Export tailored products for the {total, plural, one {# selected product} other {# selected products}}'
404
+ },
405
+ exportScopeFilteredProductTailorings: {
406
+ id: 'ExportResourcesModal.exportScopeFilteredProductTailorings',
407
+ description: 'Label for Export Filtered product tailorings',
408
+ defaultMessage: 'Export tailored products for the {total, plural, one {# filtered product} other {# filtered products}}'
409
+ },
410
+ exportScopeSpecificStoreProductTailorings: {
411
+ id: 'ExportResourcesModal.exportScopeSpecificStoreProductTailorings',
412
+ description: 'Label for Export For a specific store option for product tailorings',
413
+ defaultMessage: 'Export tailored products for a specific store'
414
+ },
390
415
  exportScopeAllOrders: {
391
416
  id: 'ExportResourcesModal.exportScopeAllOrders',
392
417
  description: 'Label for Export All orders',
@@ -677,6 +702,11 @@ var messages = reactIntl.defineMessages({
677
702
  description: 'Label for query predicate option',
678
703
  defaultMessage: 'Query predicate'
679
704
  },
705
+ selectStorePlaceholder: {
706
+ id: 'ExportResourcesModal.selectStorePlaceholder',
707
+ description: 'Placeholder for the store selection dropdown',
708
+ defaultMessage: 'Select store'
709
+ },
680
710
  invalidQueryPredicate: {
681
711
  id: 'ExportResourcesModal.invalidQueryPredicate',
682
712
  description: 'Error when query predicate field is not valid',
@@ -839,7 +869,8 @@ const EXPORT_TYPES = {
839
869
  ALL: 'all',
840
870
  FILTERED: 'filtered',
841
871
  SELECTED: 'selected',
842
- QUERY_PREDICATE: 'query-predicate'
872
+ QUERY_PREDICATE: 'query-predicate',
873
+ SPECIFIC_STORE: 'specific-store'
843
874
  };
844
875
 
845
876
  const EXPORTABLE_RESOURCES = {
@@ -850,7 +881,8 @@ const EXPORTABLE_RESOURCES = {
850
881
  INVENTORY_ENTRY: 'inventory-entry',
851
882
  ORDER: 'order',
852
883
  CUSTOMER: 'customer',
853
- BUSINESS_UNIT: 'business-unit'
884
+ BUSINESS_UNIT: 'business-unit',
885
+ PRODUCT_TAILORING: 'product-tailoring'
854
886
  };
855
887
 
856
888
  const OUTPUT_FORMATS = {
@@ -910,6 +942,12 @@ const resourceTypeMessages = {
910
942
  exportScopeAll: messages.exportScopeAllBusinessUnits,
911
943
  exportScopeSelected: messages.exportScopeSelectedBusinessUnits,
912
944
  exportScopeFiltered: messages.exportScopeFilteredBusinessUnits
945
+ },
946
+ [EXPORTABLE_RESOURCES.PRODUCT_TAILORING]: {
947
+ exportScopeAll: messages.exportScopeAllProductTailorings,
948
+ exportScopeSelected: messages.exportScopeSelectedProductTailorings,
949
+ exportScopeFiltered: messages.exportScopeFilteredProductTailorings,
950
+ exportScopeSpecificStore: messages.exportScopeSpecificStoreProductTailorings
913
951
  }
914
952
  };
915
953
 
@@ -1141,7 +1179,8 @@ function resourceTypeToFileName(resourceType, locale) {
1141
1179
  [EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: 'Inventories',
1142
1180
  [EXPORTABLE_RESOURCES.CUSTOMER]: 'Customers',
1143
1181
  [EXPORTABLE_RESOURCES.ORDER]: 'Orders',
1144
- [EXPORTABLE_RESOURCES.BUSINESS_UNIT]: 'Business_Units'
1182
+ [EXPORTABLE_RESOURCES.BUSINESS_UNIT]: 'Business_Units',
1183
+ [EXPORTABLE_RESOURCES.PRODUCT_TAILORING]: 'Product_Tailorings'
1145
1184
  };
1146
1185
  const displayName = resourceTypeMap[resourceType];
1147
1186
  if (!displayName) {
@@ -1770,7 +1809,7 @@ const useStartExportOperation = props => {
1770
1809
  projectKey: applicationContext.project?.key
1771
1810
  })),
1772
1811
  projectKey = _useApplicationContex.projectKey;
1773
- const startExportOperation = async (values, exportType, fieldSelectionMode, localeOption, importedHeaders) => {
1812
+ const startExportOperation = async (values, exportType, fieldSelectionMode, localeOption, importedHeaders, selectedStoreKey) => {
1774
1813
  try {
1775
1814
  if (!projectKey) throw new Error('Project key is missing');
1776
1815
  let fields = [];
@@ -1793,6 +1832,8 @@ const useStartExportOperation = props => {
1793
1832
  } else if (exportType === EXPORT_TYPES.QUERY_PREDICATE) {
1794
1833
  var _context;
1795
1834
  where = _trimInstanceProperty__default["default"](_context = values.queryPredicate).call(_context);
1835
+ } else if (exportType === EXPORT_TYPES.SPECIFIC_STORE) {
1836
+ where = `store(key="${selectedStoreKey}")`;
1796
1837
  }
1797
1838
  where = mergeWhereClause(props.baseFilters?.where, where);
1798
1839
  let locales = undefined;
@@ -2154,6 +2195,7 @@ const ExportPreferenceSection = () => {
2154
2195
  function ownKeys$8(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
2155
2196
  function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$8(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2156
2197
  function ExportScopeSection() {
2198
+ const intl = reactIntl.useIntl();
2157
2199
  const _useExportResourcesMo = useExportResourcesModalContext(),
2158
2200
  formik = _useExportResourcesMo.formik,
2159
2201
  exportType = _useExportResourcesMo.exportType,
@@ -2164,7 +2206,10 @@ function ExportScopeSection() {
2164
2206
  setExportType = _useExportResourcesMo.setExportType,
2165
2207
  resourceType = _useExportResourcesMo.resourceType,
2166
2208
  hideExportSelectedResourcesOption = _useExportResourcesMo.hideExportSelectedResourcesOption,
2167
- showQueryPredicateOption = _useExportResourcesMo.showQueryPredicateOption;
2209
+ showQueryPredicateOption = _useExportResourcesMo.showQueryPredicateOption,
2210
+ stores = _useExportResourcesMo.stores,
2211
+ selectedStoreKey = _useExportResourcesMo.selectedStoreKey,
2212
+ setSelectedStoreKey = _useExportResourcesMo.setSelectedStoreKey;
2168
2213
  const shouldShowQueryPredicateField = exportType === EXPORT_TYPES.QUERY_PREDICATE;
2169
2214
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
2170
2215
  children: [jsxRuntime.jsxs(uiKit.RadioInput.Group, {
@@ -2212,7 +2257,26 @@ function ExportScopeSection() {
2212
2257
  children: jsxRuntime.jsx(uiKit.Text.Body, {
2213
2258
  intlMessage: messages.queryPredicate
2214
2259
  })
2260
+ }), stores && stores.length > 0 && resourceTypeMessages[resourceType].exportScopeSpecificStore && jsxRuntime.jsx(uiKit.RadioInput.Option, {
2261
+ value: EXPORT_TYPES.SPECIFIC_STORE,
2262
+ children: jsxRuntime.jsx(uiKit.Text.Body, {
2263
+ intlMessage: resourceTypeMessages[resourceType].exportScopeSpecificStore
2264
+ })
2215
2265
  })]
2266
+ }), stores && stores.length > 0 && exportType !== EXPORT_TYPES.QUERY_PREDICATE && jsxRuntime.jsx(uiKit.SelectField, {
2267
+ name: "selectedStoreKey",
2268
+ title: "",
2269
+ horizontalConstraint: 7,
2270
+ isDisabled: exportType !== EXPORT_TYPES.SPECIFIC_STORE,
2271
+ value: selectedStoreKey,
2272
+ onChange: event => setSelectedStoreKey(event.target.value),
2273
+ options: _mapInstanceProperty__default["default"](stores).call(stores, store => ({
2274
+ value: store.key,
2275
+ label: store.name
2276
+ })),
2277
+ placeholder: intl.formatMessage(messages.selectStorePlaceholder),
2278
+ menuPortalTarget: document.body,
2279
+ menuPortalZIndex: Z_INDEX_DROPDOWN
2216
2280
  }), shouldShowQueryPredicateField && jsxRuntime.jsx(uiKit.TextField, {
2217
2281
  name: "queryPredicate",
2218
2282
  "data-testid": "query-predicate-field",
@@ -2234,7 +2298,10 @@ const ExportFileSettingsStep = () => {
2234
2298
  resourceType = _useExportResourcesMo.resourceType,
2235
2299
  setFieldSelectionMode = _useExportResourcesMo.setFieldSelectionMode,
2236
2300
  setLocaleOption = _useExportResourcesMo.setLocaleOption,
2237
- onClose = _useExportResourcesMo.onClose;
2301
+ onClose = _useExportResourcesMo.onClose,
2302
+ exportType = _useExportResourcesMo.exportType,
2303
+ selectedStoreKey = _useExportResourcesMo.selectedStoreKey;
2304
+ const isStoreSelectionMissing = exportType === EXPORT_TYPES.SPECIFIC_STORE && !selectedStoreKey;
2238
2305
  const handleOutputFormatChange = event => {
2239
2306
  formik.handleChange(event);
2240
2307
  if (event.target.value === OUTPUT_FORMATS.JSON) {
@@ -2254,7 +2321,7 @@ const ExportFileSettingsStep = () => {
2254
2321
  })}: ${intl.formatMessage(messages.selectContentToExport)}`,
2255
2322
  iconLeftPrimaryButton: jsxRuntime.jsx(uiKit.AngleRightIcon, {}),
2256
2323
  onPrimaryButtonClick: formik.submitForm,
2257
- isPrimaryButtonDisabled: !formik.isValid,
2324
+ isPrimaryButtonDisabled: !formik.isValid || isStoreSelectionMissing,
2258
2325
  onSecondaryButtonClick: onClose,
2259
2326
  onClose: onClose,
2260
2327
  size: 16,
@@ -3059,10 +3126,14 @@ const ExportResourcesProvider = _ref => {
3059
3126
  _React$useState0 = _slicedToArray(_React$useState9, 2),
3060
3127
  importedHeaders = _React$useState0[0],
3061
3128
  setImportedHeaders = _React$useState0[1];
3062
- const _React$useState1 = React__default["default"].useState([]),
3129
+ const _React$useState1 = React__default["default"].useState(''),
3063
3130
  _React$useState10 = _slicedToArray(_React$useState1, 2),
3064
- validationErrors = _React$useState10[0],
3065
- setValidationErrors = _React$useState10[1];
3131
+ selectedStoreKey = _React$useState10[0],
3132
+ setSelectedStoreKey = _React$useState10[1];
3133
+ const _React$useState11 = React__default["default"].useState([]),
3134
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
3135
+ validationErrors = _React$useState12[0],
3136
+ setValidationErrors = _React$useState12[1];
3066
3137
  const _useStartExportOperat = useStartExportOperation(props),
3067
3138
  startExportOperation = _useStartExportOperat.startExportOperation;
3068
3139
  const _useValidateExportOpe = useValidateExportOperation(),
@@ -3118,7 +3189,7 @@ const ExportResourcesProvider = _ref => {
3118
3189
  setCurrentStep(Step.ValidationErrors);
3119
3190
  }
3120
3191
  } else {
3121
- startExportOperation(values, exportType, fieldSelectionMode, localeOption, importedHeaders);
3192
+ startExportOperation(values, exportType, fieldSelectionMode, localeOption, importedHeaders, selectedStoreKey);
3122
3193
  }
3123
3194
  }
3124
3195
  });
@@ -3146,7 +3217,10 @@ const ExportResourcesProvider = _ref => {
3146
3217
  setLocaleOption,
3147
3218
  importedHeaders,
3148
3219
  setImportedHeaders,
3149
- validationErrors
3220
+ validationErrors,
3221
+ stores: props.stores,
3222
+ selectedStoreKey,
3223
+ setSelectedStoreKey
3150
3224
  },
3151
3225
  children: children
3152
3226
  });
@@ -3542,17 +3616,17 @@ const getChunkImport = locale => {
3542
3616
  const intlLocale = i18n.mapLocaleToIntlLocale(locale);
3543
3617
  switch (intlLocale) {
3544
3618
  case 'de':
3545
- return Promise.resolve().then(function () { return require('./de-6ccb0cef.cjs.prod.js'); });
3619
+ return Promise.resolve().then(function () { return require('./de-c329851c.cjs.prod.js'); });
3546
3620
  case 'es':
3547
- return Promise.resolve().then(function () { return require('./es-00dfbfb5.cjs.prod.js'); });
3621
+ return Promise.resolve().then(function () { return require('./es-247f58fc.cjs.prod.js'); });
3548
3622
  case 'fr-FR':
3549
- return Promise.resolve().then(function () { return require('./fr-FR-4cfbc2bd.cjs.prod.js'); });
3623
+ return Promise.resolve().then(function () { return require('./fr-FR-91c6dc87.cjs.prod.js'); });
3550
3624
  case 'ja':
3551
3625
  return Promise.resolve().then(function () { return require('./ja-37632763.cjs.prod.js'); });
3552
3626
  case 'pt-BR':
3553
- return Promise.resolve().then(function () { return require('./pt-BR-96af8e57.cjs.prod.js'); });
3627
+ return Promise.resolve().then(function () { return require('./pt-BR-0e9382e5.cjs.prod.js'); });
3554
3628
  default:
3555
- return Promise.resolve().then(function () { return require('./en-0158f656.cjs.prod.js'); });
3629
+ return Promise.resolve().then(function () { return require('./en-71b1a370.cjs.prod.js'); });
3556
3630
  }
3557
3631
  };
3558
3632
  const loadMessages = async locale => {
@@ -120,6 +120,11 @@ var messages = defineMessages({
120
120
  description: 'Label for the business units modal title',
121
121
  defaultMessage: 'Export business units'
122
122
  },
123
+ 'modalTitle.product-tailoring': {
124
+ id: 'ExportResourcesModal.modalTitle.productTailoring',
125
+ description: 'Label for the product tailorings modal title',
126
+ defaultMessage: 'Export tailored products'
127
+ },
123
128
  outputFormat: {
124
129
  id: 'ExportResourcesModal.outputFormat',
125
130
  description: 'File format like (csv, xls, ...etc)',
@@ -344,6 +349,26 @@ var messages = defineMessages({
344
349
  description: 'Label for Export Filtered business units',
345
350
  defaultMessage: 'Export filtered: {total, plural, one {# business unit} other {# business units}}'
346
351
  },
352
+ exportScopeAllProductTailorings: {
353
+ id: 'ExportResourcesModal.exportScopeAllProductTailorings',
354
+ description: 'Label for Export All product tailorings',
355
+ defaultMessage: 'Export tailored products for {total, plural, one {# product} other {# products}} in all stores'
356
+ },
357
+ exportScopeSelectedProductTailorings: {
358
+ id: 'ExportResourcesModal.exportScopeSelectedProductTailorings',
359
+ description: 'Label for Export Selected product tailorings',
360
+ defaultMessage: 'Export tailored products for the {total, plural, one {# selected product} other {# selected products}}'
361
+ },
362
+ exportScopeFilteredProductTailorings: {
363
+ id: 'ExportResourcesModal.exportScopeFilteredProductTailorings',
364
+ description: 'Label for Export Filtered product tailorings',
365
+ defaultMessage: 'Export tailored products for the {total, plural, one {# filtered product} other {# filtered products}}'
366
+ },
367
+ exportScopeSpecificStoreProductTailorings: {
368
+ id: 'ExportResourcesModal.exportScopeSpecificStoreProductTailorings',
369
+ description: 'Label for Export For a specific store option for product tailorings',
370
+ defaultMessage: 'Export tailored products for a specific store'
371
+ },
347
372
  exportScopeAllOrders: {
348
373
  id: 'ExportResourcesModal.exportScopeAllOrders',
349
374
  description: 'Label for Export All orders',
@@ -634,6 +659,11 @@ var messages = defineMessages({
634
659
  description: 'Label for query predicate option',
635
660
  defaultMessage: 'Query predicate'
636
661
  },
662
+ selectStorePlaceholder: {
663
+ id: 'ExportResourcesModal.selectStorePlaceholder',
664
+ description: 'Placeholder for the store selection dropdown',
665
+ defaultMessage: 'Select store'
666
+ },
637
667
  invalidQueryPredicate: {
638
668
  id: 'ExportResourcesModal.invalidQueryPredicate',
639
669
  description: 'Error when query predicate field is not valid',
@@ -796,7 +826,8 @@ const EXPORT_TYPES = {
796
826
  ALL: 'all',
797
827
  FILTERED: 'filtered',
798
828
  SELECTED: 'selected',
799
- QUERY_PREDICATE: 'query-predicate'
829
+ QUERY_PREDICATE: 'query-predicate',
830
+ SPECIFIC_STORE: 'specific-store'
800
831
  };
801
832
 
802
833
  const EXPORTABLE_RESOURCES = {
@@ -807,7 +838,8 @@ const EXPORTABLE_RESOURCES = {
807
838
  INVENTORY_ENTRY: 'inventory-entry',
808
839
  ORDER: 'order',
809
840
  CUSTOMER: 'customer',
810
- BUSINESS_UNIT: 'business-unit'
841
+ BUSINESS_UNIT: 'business-unit',
842
+ PRODUCT_TAILORING: 'product-tailoring'
811
843
  };
812
844
 
813
845
  const OUTPUT_FORMATS = {
@@ -867,6 +899,12 @@ const resourceTypeMessages = {
867
899
  exportScopeAll: messages.exportScopeAllBusinessUnits,
868
900
  exportScopeSelected: messages.exportScopeSelectedBusinessUnits,
869
901
  exportScopeFiltered: messages.exportScopeFilteredBusinessUnits
902
+ },
903
+ [EXPORTABLE_RESOURCES.PRODUCT_TAILORING]: {
904
+ exportScopeAll: messages.exportScopeAllProductTailorings,
905
+ exportScopeSelected: messages.exportScopeSelectedProductTailorings,
906
+ exportScopeFiltered: messages.exportScopeFilteredProductTailorings,
907
+ exportScopeSpecificStore: messages.exportScopeSpecificStoreProductTailorings
870
908
  }
871
909
  };
872
910
 
@@ -1098,7 +1136,8 @@ function resourceTypeToFileName(resourceType, locale) {
1098
1136
  [EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: 'Inventories',
1099
1137
  [EXPORTABLE_RESOURCES.CUSTOMER]: 'Customers',
1100
1138
  [EXPORTABLE_RESOURCES.ORDER]: 'Orders',
1101
- [EXPORTABLE_RESOURCES.BUSINESS_UNIT]: 'Business_Units'
1139
+ [EXPORTABLE_RESOURCES.BUSINESS_UNIT]: 'Business_Units',
1140
+ [EXPORTABLE_RESOURCES.PRODUCT_TAILORING]: 'Product_Tailorings'
1102
1141
  };
1103
1142
  const displayName = resourceTypeMap[resourceType];
1104
1143
  if (!displayName) {
@@ -1727,7 +1766,7 @@ const useStartExportOperation = props => {
1727
1766
  projectKey: applicationContext.project?.key
1728
1767
  })),
1729
1768
  projectKey = _useApplicationContex.projectKey;
1730
- const startExportOperation = async (values, exportType, fieldSelectionMode, localeOption, importedHeaders) => {
1769
+ const startExportOperation = async (values, exportType, fieldSelectionMode, localeOption, importedHeaders, selectedStoreKey) => {
1731
1770
  try {
1732
1771
  if (!projectKey) throw new Error('Project key is missing');
1733
1772
  let fields = [];
@@ -1750,6 +1789,8 @@ const useStartExportOperation = props => {
1750
1789
  } else if (exportType === EXPORT_TYPES.QUERY_PREDICATE) {
1751
1790
  var _context;
1752
1791
  where = _trimInstanceProperty(_context = values.queryPredicate).call(_context);
1792
+ } else if (exportType === EXPORT_TYPES.SPECIFIC_STORE) {
1793
+ where = `store(key="${selectedStoreKey}")`;
1753
1794
  }
1754
1795
  where = mergeWhereClause(props.baseFilters?.where, where);
1755
1796
  let locales = undefined;
@@ -2111,6 +2152,7 @@ const ExportPreferenceSection = () => {
2111
2152
  function ownKeys$8(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2112
2153
  function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$8(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$8(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
2113
2154
  function ExportScopeSection() {
2155
+ const intl = useIntl();
2114
2156
  const _useExportResourcesMo = useExportResourcesModalContext(),
2115
2157
  formik = _useExportResourcesMo.formik,
2116
2158
  exportType = _useExportResourcesMo.exportType,
@@ -2121,7 +2163,10 @@ function ExportScopeSection() {
2121
2163
  setExportType = _useExportResourcesMo.setExportType,
2122
2164
  resourceType = _useExportResourcesMo.resourceType,
2123
2165
  hideExportSelectedResourcesOption = _useExportResourcesMo.hideExportSelectedResourcesOption,
2124
- showQueryPredicateOption = _useExportResourcesMo.showQueryPredicateOption;
2166
+ showQueryPredicateOption = _useExportResourcesMo.showQueryPredicateOption,
2167
+ stores = _useExportResourcesMo.stores,
2168
+ selectedStoreKey = _useExportResourcesMo.selectedStoreKey,
2169
+ setSelectedStoreKey = _useExportResourcesMo.setSelectedStoreKey;
2125
2170
  const shouldShowQueryPredicateField = exportType === EXPORT_TYPES.QUERY_PREDICATE;
2126
2171
  return jsxs(Fragment, {
2127
2172
  children: [jsxs(RadioInput.Group, {
@@ -2169,7 +2214,26 @@ function ExportScopeSection() {
2169
2214
  children: jsx(Text.Body, {
2170
2215
  intlMessage: messages.queryPredicate
2171
2216
  })
2217
+ }), stores && stores.length > 0 && resourceTypeMessages[resourceType].exportScopeSpecificStore && jsx(RadioInput.Option, {
2218
+ value: EXPORT_TYPES.SPECIFIC_STORE,
2219
+ children: jsx(Text.Body, {
2220
+ intlMessage: resourceTypeMessages[resourceType].exportScopeSpecificStore
2221
+ })
2172
2222
  })]
2223
+ }), stores && stores.length > 0 && exportType !== EXPORT_TYPES.QUERY_PREDICATE && jsx(SelectField, {
2224
+ name: "selectedStoreKey",
2225
+ title: "",
2226
+ horizontalConstraint: 7,
2227
+ isDisabled: exportType !== EXPORT_TYPES.SPECIFIC_STORE,
2228
+ value: selectedStoreKey,
2229
+ onChange: event => setSelectedStoreKey(event.target.value),
2230
+ options: _mapInstanceProperty(stores).call(stores, store => ({
2231
+ value: store.key,
2232
+ label: store.name
2233
+ })),
2234
+ placeholder: intl.formatMessage(messages.selectStorePlaceholder),
2235
+ menuPortalTarget: document.body,
2236
+ menuPortalZIndex: Z_INDEX_DROPDOWN
2173
2237
  }), shouldShowQueryPredicateField && jsx(TextField, {
2174
2238
  name: "queryPredicate",
2175
2239
  "data-testid": "query-predicate-field",
@@ -2191,7 +2255,10 @@ const ExportFileSettingsStep = () => {
2191
2255
  resourceType = _useExportResourcesMo.resourceType,
2192
2256
  setFieldSelectionMode = _useExportResourcesMo.setFieldSelectionMode,
2193
2257
  setLocaleOption = _useExportResourcesMo.setLocaleOption,
2194
- onClose = _useExportResourcesMo.onClose;
2258
+ onClose = _useExportResourcesMo.onClose,
2259
+ exportType = _useExportResourcesMo.exportType,
2260
+ selectedStoreKey = _useExportResourcesMo.selectedStoreKey;
2261
+ const isStoreSelectionMissing = exportType === EXPORT_TYPES.SPECIFIC_STORE && !selectedStoreKey;
2195
2262
  const handleOutputFormatChange = event => {
2196
2263
  formik.handleChange(event);
2197
2264
  if (event.target.value === OUTPUT_FORMATS.JSON) {
@@ -2211,7 +2278,7 @@ const ExportFileSettingsStep = () => {
2211
2278
  })}: ${intl.formatMessage(messages.selectContentToExport)}`,
2212
2279
  iconLeftPrimaryButton: jsx(AngleRightIcon, {}),
2213
2280
  onPrimaryButtonClick: formik.submitForm,
2214
- isPrimaryButtonDisabled: !formik.isValid,
2281
+ isPrimaryButtonDisabled: !formik.isValid || isStoreSelectionMissing,
2215
2282
  onSecondaryButtonClick: onClose,
2216
2283
  onClose: onClose,
2217
2284
  size: 16,
@@ -3049,10 +3116,14 @@ const ExportResourcesProvider = _ref => {
3049
3116
  _React$useState0 = _slicedToArray(_React$useState9, 2),
3050
3117
  importedHeaders = _React$useState0[0],
3051
3118
  setImportedHeaders = _React$useState0[1];
3052
- const _React$useState1 = React.useState([]),
3119
+ const _React$useState1 = React.useState(''),
3053
3120
  _React$useState10 = _slicedToArray(_React$useState1, 2),
3054
- validationErrors = _React$useState10[0],
3055
- setValidationErrors = _React$useState10[1];
3121
+ selectedStoreKey = _React$useState10[0],
3122
+ setSelectedStoreKey = _React$useState10[1];
3123
+ const _React$useState11 = React.useState([]),
3124
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
3125
+ validationErrors = _React$useState12[0],
3126
+ setValidationErrors = _React$useState12[1];
3056
3127
  const _useStartExportOperat = useStartExportOperation(props),
3057
3128
  startExportOperation = _useStartExportOperat.startExportOperation;
3058
3129
  const _useValidateExportOpe = useValidateExportOperation(),
@@ -3108,7 +3179,7 @@ const ExportResourcesProvider = _ref => {
3108
3179
  setCurrentStep(Step.ValidationErrors);
3109
3180
  }
3110
3181
  } else {
3111
- startExportOperation(values, exportType, fieldSelectionMode, localeOption, importedHeaders);
3182
+ startExportOperation(values, exportType, fieldSelectionMode, localeOption, importedHeaders, selectedStoreKey);
3112
3183
  }
3113
3184
  }
3114
3185
  });
@@ -3136,7 +3207,10 @@ const ExportResourcesProvider = _ref => {
3136
3207
  setLocaleOption,
3137
3208
  importedHeaders,
3138
3209
  setImportedHeaders,
3139
- validationErrors
3210
+ validationErrors,
3211
+ stores: props.stores,
3212
+ selectedStoreKey,
3213
+ setSelectedStoreKey
3140
3214
  },
3141
3215
  children: children
3142
3216
  });
@@ -3532,17 +3606,17 @@ const getChunkImport = locale => {
3532
3606
  const intlLocale = mapLocaleToIntlLocale(locale);
3533
3607
  switch (intlLocale) {
3534
3608
  case 'de':
3535
- return import('./de-35056949.esm.js');
3609
+ return import('./de-c4790906.esm.js');
3536
3610
  case 'es':
3537
- return import('./es-2b5d715f.esm.js');
3611
+ return import('./es-ec8412cc.esm.js');
3538
3612
  case 'fr-FR':
3539
- return import('./fr-FR-06105d51.esm.js');
3613
+ return import('./fr-FR-b8239dad.esm.js');
3540
3614
  case 'ja':
3541
3615
  return import('./ja-73c088a7.esm.js');
3542
3616
  case 'pt-BR':
3543
- return import('./pt-BR-21e12a39.esm.js');
3617
+ return import('./pt-BR-26f18714.esm.js');
3544
3618
  default:
3545
- return import('./en-cec5abba.esm.js');
3619
+ return import('./en-95d6ae91.esm.js');
3546
3620
  }
3547
3621
  };
3548
3622
  const loadMessages = async locale => {
@@ -377,6 +377,10 @@ var de = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "Meine Ansichten"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "Es stimmen keine Ressourcen mit Ihrem Anfrage-Prädikat überein. Bitte überprüfen Sie Ihr Anfrage-Prädikat und versuchen Sie es erneut."
@@ -375,6 +375,10 @@ var de = {
375
375
  developer_comment: "Label for \"My Views\" Select Field",
376
376
  string: "Meine Ansichten"
377
377
  },
378
+ "ExportResourcesModal.noResourcesToExport": {
379
+ developer_comment: "Error message when there are no resources to export",
380
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
381
+ },
378
382
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
379
383
  developer_comment: "Error message when there are no resources to export for given query predicate",
380
384
  string: "Es stimmen keine Ressourcen mit Ihrem Anfrage-Prädikat überein. Bitte überprüfen Sie Ihr Anfrage-Prädikat und versuchen Sie es erneut."
@@ -377,6 +377,10 @@ var de = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "Meine Ansichten"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "Es stimmen keine Ressourcen mit Ihrem Anfrage-Prädikat überein. Bitte überprüfen Sie Ihr Anfrage-Prädikat und versuchen Sie es erneut."
@@ -3,4 +3,5 @@ export declare const EXPORT_TYPES: {
3
3
  readonly FILTERED: "filtered";
4
4
  readonly SELECTED: "selected";
5
5
  readonly QUERY_PREDICATE: "query-predicate";
6
+ readonly SPECIFIC_STORE: "specific-store";
6
7
  };
@@ -7,4 +7,5 @@ export declare const EXPORTABLE_RESOURCES: {
7
7
  readonly ORDER: "order";
8
8
  readonly CUSTOMER: "customer";
9
9
  readonly BUSINESS_UNIT: "business-unit";
10
+ readonly PRODUCT_TAILORING: "product-tailoring";
10
11
  };
@@ -5,6 +5,7 @@ export type ExportScopeMessagesMap = {
5
5
  exportScopeAll: MessageDescriptor;
6
6
  exportScopeSelected: MessageDescriptor;
7
7
  exportScopeFiltered: MessageDescriptor;
8
+ exportScopeSpecificStore?: MessageDescriptor;
8
9
  };
9
10
  };
10
11
  export declare const resourceTypeMessages: ExportScopeMessagesMap;
@@ -1,4 +1,4 @@
1
1
  import type { ExportResourcesModalProps, ExportType, FieldSelectionMode, FormValues, LocaleOption } from "../@types/index.js";
2
2
  export declare const useStartExportOperation: (props: ExportResourcesModalProps) => {
3
- startExportOperation: (values: FormValues, exportType: ExportType, fieldSelectionMode: FieldSelectionMode, localeOption: LocaleOption, importedHeaders: string[]) => Promise<void>;
3
+ startExportOperation: (values: FormValues, exportType: ExportType, fieldSelectionMode: FieldSelectionMode, localeOption: LocaleOption, importedHeaders: string[], selectedStoreKey: string) => Promise<void>;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { FormikProps } from 'formik';
3
- import type { ExportType, Filters } from "./export-resources-modal-types.js";
3
+ import type { ExportType, Filters, Store } from "./export-resources-modal-types.js";
4
4
  import type { FieldSelectionMode } from "./field-selection-mode.js";
5
5
  import type { FieldValidationError } from "./field-validation-error.js";
6
6
  import type { FormValues } from "./form.js";
@@ -33,4 +33,7 @@ export interface ExportResourcesModalContext {
33
33
  importedHeaders: string[];
34
34
  setImportedHeaders: React.Dispatch<React.SetStateAction<string[]>>;
35
35
  validationErrors: FieldValidationError[];
36
+ stores?: Store[];
37
+ selectedStoreKey: string;
38
+ setSelectedStoreKey: React.Dispatch<React.SetStateAction<string>>;
36
39
  }
@@ -20,6 +20,10 @@ export interface FieldGroup {
20
20
  isExpanded?: boolean;
21
21
  fields: Field[];
22
22
  }
23
+ export interface Store {
24
+ key: string;
25
+ name: string;
26
+ }
23
27
  export interface ExportResourcesModalProps {
24
28
  isOpen?: boolean;
25
29
  resourceType: ResourceType;
@@ -32,6 +36,7 @@ export interface ExportResourcesModalProps {
32
36
  fieldOrder?: string[];
33
37
  hideExportSelectedResourcesOption?: boolean;
34
38
  showQueryPredicateOption?: boolean;
39
+ stores?: Store[];
35
40
  onClose: () => void;
36
41
  onExportSuccess?: () => void;
37
42
  }
@@ -377,6 +377,10 @@ var en = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "My Views"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "No resources match your query predicate. Please check your query predicate and try again."
@@ -377,6 +377,10 @@ var en = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "My Views"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "No resources match your query predicate. Please check your query predicate and try again."
@@ -375,6 +375,10 @@ var en = {
375
375
  developer_comment: "Label for \"My Views\" Select Field",
376
376
  string: "My Views"
377
377
  },
378
+ "ExportResourcesModal.noResourcesToExport": {
379
+ developer_comment: "Error message when there are no resources to export",
380
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
381
+ },
378
382
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
379
383
  developer_comment: "Error message when there are no resources to export for given query predicate",
380
384
  string: "No resources match your query predicate. Please check your query predicate and try again."
@@ -377,6 +377,10 @@ var es = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "Mis vistas"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "No hay recursos para tu predicado de consulta. Por favor, revisa el predicado de su consulta e inténtalo de nuevo."
@@ -377,6 +377,10 @@ var es = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "Mis vistas"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "No hay recursos para tu predicado de consulta. Por favor, revisa el predicado de su consulta e inténtalo de nuevo."
@@ -375,6 +375,10 @@ var es = {
375
375
  developer_comment: "Label for \"My Views\" Select Field",
376
376
  string: "Mis vistas"
377
377
  },
378
+ "ExportResourcesModal.noResourcesToExport": {
379
+ developer_comment: "Error message when there are no resources to export",
380
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
381
+ },
378
382
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
379
383
  developer_comment: "Error message when there are no resources to export for given query predicate",
380
384
  string: "No hay recursos para tu predicado de consulta. Por favor, revisa el predicado de su consulta e inténtalo de nuevo."
@@ -377,6 +377,10 @@ var frFR = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "Mes affichages"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "Aucune correspondance d'entité pour votre prédicat de requête. Vérifiez votre prédicat de requête et réessayez."
@@ -375,6 +375,10 @@ var frFR = {
375
375
  developer_comment: "Label for \"My Views\" Select Field",
376
376
  string: "Mes affichages"
377
377
  },
378
+ "ExportResourcesModal.noResourcesToExport": {
379
+ developer_comment: "Error message when there are no resources to export",
380
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
381
+ },
378
382
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
379
383
  developer_comment: "Error message when there are no resources to export for given query predicate",
380
384
  string: "Aucune correspondance d'entité pour votre prédicat de requête. Vérifiez votre prédicat de requête et réessayez."
@@ -377,6 +377,10 @@ var frFR = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "Mes affichages"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "Aucune correspondance d'entité pour votre prédicat de requête. Vérifiez votre prédicat de requête et réessayez."
@@ -377,6 +377,10 @@ var ptBR = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "Minhas visualizações"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "Nenhum recurso corresponde ao predicado da sua consulta. Verifique o predicado da sua consulta e tente novamente."
@@ -375,6 +375,10 @@ var ptBR = {
375
375
  developer_comment: "Label for \"My Views\" Select Field",
376
376
  string: "Minhas visualizações"
377
377
  },
378
+ "ExportResourcesModal.noResourcesToExport": {
379
+ developer_comment: "Error message when there are no resources to export",
380
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
381
+ },
378
382
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
379
383
  developer_comment: "Error message when there are no resources to export for given query predicate",
380
384
  string: "Nenhum recurso corresponde ao predicado da sua consulta. Verifique o predicado da sua consulta e tente novamente."
@@ -377,6 +377,10 @@ var ptBR = {
377
377
  developer_comment: "Label for \"My Views\" Select Field",
378
378
  string: "Minhas visualizações"
379
379
  },
380
+ "ExportResourcesModal.noResourcesToExport": {
381
+ developer_comment: "Error message when there are no resources to export",
382
+ string: "There are no resources to export. Please adjust your selection or filters and try again."
383
+ },
380
384
  "ExportResourcesModal.noResourcesToExportForQueryPredicate": {
381
385
  developer_comment: "Error message when there are no resources to export for given query predicate",
382
386
  string: "Nenhum recurso corresponde ao predicado da sua consulta. Verifique o predicado da sua consulta e tente novamente."
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": "5.11.3",
4
+ "version": "5.12.0",
5
5
  "license": "BSD-3-Clause",
6
6
  "publishConfig": {
7
7
  "access": "public"