@commercetools-frontend-extensions/import-resources-modal 1.8.3 → 1.9.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 (36) hide show
  1. package/dist/{active-drag-drop-area-1b036a1a.cjs.dev.js → active-drag-drop-area-0467c118.cjs.dev.js} +1 -1
  2. package/dist/{active-drag-drop-area-4c295594.esm.js → active-drag-drop-area-294d353d.esm.js} +1 -1
  3. package/dist/{active-drag-drop-area-dc11c9dd.cjs.prod.js → active-drag-drop-area-a995b09d.cjs.prod.js} +1 -1
  4. package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.dev.js +1 -1
  5. package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.prod.js +1 -1
  6. package/dist/commercetools-frontend-extensions-import-resources-modal.esm.js +1 -1
  7. package/dist/{de-4d884a52.esm.js → de-19530b12.esm.js} +12 -0
  8. package/dist/{de-ba621f66.cjs.prod.js → de-2836a9ae.cjs.prod.js} +12 -0
  9. package/dist/{de-cd1c2b61.cjs.dev.js → de-db4fb974.cjs.dev.js} +12 -0
  10. package/dist/declarations/src/@hooks/use-import-permission.d.ts +2 -0
  11. package/dist/declarations/src/@types/resource-type.d.ts +2 -1
  12. package/dist/{disabled-drop-area-40108d06.cjs.prod.js → disabled-drop-area-16b58581.cjs.prod.js} +1 -1
  13. package/dist/{disabled-drop-area-377a3c8d.cjs.dev.js → disabled-drop-area-4a639dbf.cjs.dev.js} +1 -1
  14. package/dist/{disabled-drop-area-9ea4c457.esm.js → disabled-drop-area-7ca6b04a.esm.js} +1 -1
  15. package/dist/{en-88aad148.esm.js → en-1f091237.esm.js} +12 -0
  16. package/dist/{en-c4f7d882.cjs.dev.js → en-cb6893e4.cjs.prod.js} +12 -0
  17. package/dist/{en-102ccf29.cjs.prod.js → en-f53130d1.cjs.dev.js} +12 -0
  18. package/dist/{enabled-drop-area-5629adf7.cjs.prod.js → enabled-drop-area-1f50b766.cjs.prod.js} +1 -1
  19. package/dist/{enabled-drop-area-e60beae7.esm.js → enabled-drop-area-9bf924fa.esm.js} +1 -1
  20. package/dist/{enabled-drop-area-1bb3ba2c.cjs.dev.js → enabled-drop-area-a4a76650.cjs.dev.js} +1 -1
  21. package/dist/{es-09b5f26a.cjs.dev.js → es-420f21e1.cjs.dev.js} +12 -0
  22. package/dist/{es-d589515f.esm.js → es-a9aada13.esm.js} +12 -0
  23. package/dist/{es-1877968a.cjs.prod.js → es-f085026e.cjs.prod.js} +12 -0
  24. package/dist/{file-dropped-area-00056628.cjs.prod.js → file-dropped-area-84bc6912.cjs.prod.js} +1 -1
  25. package/dist/{file-dropped-area-f251fc3d.cjs.dev.js → file-dropped-area-9387283c.cjs.dev.js} +1 -1
  26. package/dist/{file-dropped-area-f5cd314a.esm.js → file-dropped-area-e6b5a3fa.esm.js} +1 -1
  27. package/dist/{fr-FR-d672a357.esm.js → fr-FR-02bd52fb.esm.js} +12 -0
  28. package/dist/{fr-FR-1d2ccb65.cjs.prod.js → fr-FR-342599f4.cjs.dev.js} +12 -0
  29. package/dist/{fr-FR-a5fe152a.cjs.dev.js → fr-FR-dc40a55c.cjs.prod.js} +12 -0
  30. package/dist/{index-42eec0a4.esm.js → index-10a225f5.esm.js} +74 -22
  31. package/dist/{index-bf0ed2a7.cjs.dev.js → index-40da749a.cjs.dev.js} +74 -22
  32. package/dist/{index-e152cdce.cjs.prod.js → index-77194696.cjs.prod.js} +74 -22
  33. package/dist/{pt-BR-606f307c.cjs.prod.js → pt-BR-31c46d23.cjs.prod.js} +12 -0
  34. package/dist/{pt-BR-0389b318.cjs.dev.js → pt-BR-339ed808.cjs.dev.js} +12 -0
  35. package/dist/{pt-BR-3512c390.esm.js → pt-BR-ac1fc192.esm.js} +12 -0
  36. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-bf0ed2a7.cjs.dev.js');
3
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-40da749a.cjs.dev.js');
4
4
  var jsxRuntime = require('@emotion/react/jsx-runtime');
5
5
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
6
6
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
@@ -1,4 +1,4 @@
1
- import { F as FileDropped, E as EnabledDropArea } from './index-42eec0a4.esm.js';
1
+ import { F as FileDropped, E as EnabledDropArea } from './index-10a225f5.esm.js';
2
2
  import { jsx } from '@emotion/react/jsx-runtime';
3
3
  import '@babel/runtime-corejs3/core-js-stable/object/keys';
4
4
  import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-e152cdce.cjs.prod.js');
3
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-77194696.cjs.prod.js');
4
4
  var jsxRuntime = require('@emotion/react/jsx-runtime');
5
5
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
6
6
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-bf0ed2a7.cjs.dev.js');
5
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-40da749a.cjs.dev.js');
6
6
  require('react');
7
7
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
8
8
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-e152cdce.cjs.prod.js');
5
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-77194696.cjs.prod.js');
6
6
  require('react');
7
7
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
8
8
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
@@ -1,4 +1,4 @@
1
- export { I as default, b as useImportPermission } from './index-42eec0a4.esm.js';
1
+ export { I as default, b as useImportPermission } from './index-10a225f5.esm.js';
2
2
  import 'react';
3
3
  import '@babel/runtime-corejs3/core-js-stable/object/keys';
4
4
  import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
@@ -2,6 +2,14 @@ var de = {
2
2
  "ImportResourcesModal.browseFile": {
3
3
  string: "Datei durchsuchen"
4
4
  },
5
+ "ImportResourcesModal.business-unit": {
6
+ developer_comment: "Label for the business-unit resource type",
7
+ string: "Business unit"
8
+ },
9
+ "ImportResourcesModal.business-units": {
10
+ developer_comment: "Label for the business-units resource type",
11
+ string: "Business units"
12
+ },
5
13
  "ImportResourcesModal.cancel": {
6
14
  developer_comment: "Label for the cancel button",
7
15
  string: "Abbrechen"
@@ -166,6 +174,10 @@ var de = {
166
174
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
167
175
  string: "Stellen Sie sicher, dass die Datei die erforderlichen Schlüssel für die Elemente einschließlich {fieldNames} enthält"
168
176
  },
177
+ "ImportResourcesModal.modalTitle.businessUnit": {
178
+ developer_comment: "Label for the business units modal title",
179
+ string: "Import business units by CSV"
180
+ },
169
181
  "ImportResourcesModal.modalTitle.category": {
170
182
  developer_comment: "Label for the categories modal title",
171
183
  string: "Kategorien nach CSV importieren"
@@ -4,6 +4,14 @@ var de = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Datei durchsuchen"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Abbrechen"
@@ -168,6 +176,10 @@ var de = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Stellen Sie sicher, dass die Datei die erforderlichen Schlüssel für die Elemente einschließlich {fieldNames} enthält"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Kategorien nach CSV importieren"
@@ -4,6 +4,14 @@ var de = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Datei durchsuchen"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Abbrechen"
@@ -168,6 +176,10 @@ var de = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Stellen Sie sicher, dass die Datei die erforderlichen Schlüssel für die Elemente einschließlich {fieldNames} enthält"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Kategorien nach CSV importieren"
@@ -2,6 +2,8 @@ export declare const useImportPermission: () => {
2
2
  canImportProducts: any;
3
3
  canImportCategories: boolean;
4
4
  canImportDiscountCodes: boolean;
5
+ canImportBusinessUnits: boolean;
5
6
  canImportInventories: boolean;
6
7
  canImportProductTypes: boolean;
8
+ canImportCustomObjects: any;
7
9
  };
@@ -1 +1,2 @@
1
- export type ResourceType = 'category' | 'product' | 'inventory' | 'discount-code' | 'customer' | 'order' | 'product-type';
1
+ import type { ResourceTypeId } from '@commercetools/importapi-sdk';
2
+ export type ResourceType = ResourceTypeId;
@@ -14,7 +14,7 @@ require('@babel/runtime-corejs3/helpers/slicedToArray');
14
14
  require('react');
15
15
  require('@commercetools-frontend/application-shell-connectors');
16
16
  require('@commercetools-frontend/sdk');
17
- require('./index-e152cdce.cjs.prod.js');
17
+ require('./index-77194696.cjs.prod.js');
18
18
  require('@commercetools-frontend/constants');
19
19
  require('@commercetools-frontend/application-shell');
20
20
  require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
@@ -14,7 +14,7 @@ require('@babel/runtime-corejs3/helpers/slicedToArray');
14
14
  require('react');
15
15
  require('@commercetools-frontend/application-shell-connectors');
16
16
  require('@commercetools-frontend/sdk');
17
- require('./index-bf0ed2a7.cjs.dev.js');
17
+ require('./index-40da749a.cjs.dev.js');
18
18
  require('@commercetools-frontend/constants');
19
19
  require('@commercetools-frontend/application-shell');
20
20
  require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
@@ -12,7 +12,7 @@ import '@babel/runtime-corejs3/helpers/slicedToArray';
12
12
  import 'react';
13
13
  import '@commercetools-frontend/application-shell-connectors';
14
14
  import '@commercetools-frontend/sdk';
15
- import './index-42eec0a4.esm.js';
15
+ import './index-10a225f5.esm.js';
16
16
  import '@commercetools-frontend/constants';
17
17
  import '@commercetools-frontend/application-shell';
18
18
  import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
@@ -2,6 +2,14 @@ var en = {
2
2
  "ImportResourcesModal.browseFile": {
3
3
  string: "Browse file"
4
4
  },
5
+ "ImportResourcesModal.business-unit": {
6
+ developer_comment: "Label for the business-unit resource type",
7
+ string: "Business unit"
8
+ },
9
+ "ImportResourcesModal.business-units": {
10
+ developer_comment: "Label for the business-units resource type",
11
+ string: "Business units"
12
+ },
5
13
  "ImportResourcesModal.cancel": {
6
14
  developer_comment: "Label for the cancel button",
7
15
  string: "Cancel"
@@ -166,6 +174,10 @@ var en = {
166
174
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
167
175
  string: "Make sure the file contains required keys for the elements including {fieldNames}"
168
176
  },
177
+ "ImportResourcesModal.modalTitle.businessUnit": {
178
+ developer_comment: "Label for the business units modal title",
179
+ string: "Import business units by CSV"
180
+ },
169
181
  "ImportResourcesModal.modalTitle.category": {
170
182
  developer_comment: "Label for the categories modal title",
171
183
  string: "Import categories by CSV"
@@ -4,6 +4,14 @@ var en = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Browse file"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Cancel"
@@ -168,6 +176,10 @@ var en = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Make sure the file contains required keys for the elements including {fieldNames}"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Import categories by CSV"
@@ -4,6 +4,14 @@ var en = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Browse file"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Cancel"
@@ -168,6 +176,10 @@ var en = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Make sure the file contains required keys for the elements including {fieldNames}"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Import categories by CSV"
@@ -14,7 +14,7 @@ require('@babel/runtime-corejs3/helpers/slicedToArray');
14
14
  require('react');
15
15
  require('@commercetools-frontend/application-shell-connectors');
16
16
  require('@commercetools-frontend/sdk');
17
- var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-e152cdce.cjs.prod.js');
17
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-77194696.cjs.prod.js');
18
18
  require('@commercetools-frontend/constants');
19
19
  require('@commercetools-frontend/application-shell');
20
20
  require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
@@ -12,7 +12,7 @@ import '@babel/runtime-corejs3/helpers/slicedToArray';
12
12
  import 'react';
13
13
  import '@commercetools-frontend/application-shell-connectors';
14
14
  import '@commercetools-frontend/sdk';
15
- import { a as FileIcon, m as messages } from './index-42eec0a4.esm.js';
15
+ import { a as FileIcon, m as messages } from './index-10a225f5.esm.js';
16
16
  import '@commercetools-frontend/constants';
17
17
  import '@commercetools-frontend/application-shell';
18
18
  import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
@@ -14,7 +14,7 @@ require('@babel/runtime-corejs3/helpers/slicedToArray');
14
14
  require('react');
15
15
  require('@commercetools-frontend/application-shell-connectors');
16
16
  require('@commercetools-frontend/sdk');
17
- var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-bf0ed2a7.cjs.dev.js');
17
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-40da749a.cjs.dev.js');
18
18
  require('@commercetools-frontend/constants');
19
19
  require('@commercetools-frontend/application-shell');
20
20
  require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
@@ -4,6 +4,14 @@ var es = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Explorar archivo"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Cancelar"
@@ -168,6 +176,10 @@ var es = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Asegúrate de que los archivos contienen las claves necesarias para los elementos incluidas {fieldNames}"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Importar categorías mediante CSV"
@@ -2,6 +2,14 @@ var es = {
2
2
  "ImportResourcesModal.browseFile": {
3
3
  string: "Explorar archivo"
4
4
  },
5
+ "ImportResourcesModal.business-unit": {
6
+ developer_comment: "Label for the business-unit resource type",
7
+ string: "Business unit"
8
+ },
9
+ "ImportResourcesModal.business-units": {
10
+ developer_comment: "Label for the business-units resource type",
11
+ string: "Business units"
12
+ },
5
13
  "ImportResourcesModal.cancel": {
6
14
  developer_comment: "Label for the cancel button",
7
15
  string: "Cancelar"
@@ -166,6 +174,10 @@ var es = {
166
174
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
167
175
  string: "Asegúrate de que los archivos contienen las claves necesarias para los elementos incluidas {fieldNames}"
168
176
  },
177
+ "ImportResourcesModal.modalTitle.businessUnit": {
178
+ developer_comment: "Label for the business units modal title",
179
+ string: "Import business units by CSV"
180
+ },
169
181
  "ImportResourcesModal.modalTitle.category": {
170
182
  developer_comment: "Label for the categories modal title",
171
183
  string: "Importar categorías mediante CSV"
@@ -4,6 +4,14 @@ var es = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Explorar archivo"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Cancelar"
@@ -168,6 +176,10 @@ var es = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Asegúrate de que los archivos contienen las claves necesarias para los elementos incluidas {fieldNames}"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Importar categorías mediante CSV"
@@ -2,7 +2,7 @@
2
2
 
3
3
  var reactIntl = require('react-intl');
4
4
  var uiKit = require('@commercetools-frontend/ui-kit');
5
- var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-e152cdce.cjs.prod.js');
5
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-77194696.cjs.prod.js');
6
6
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
7
7
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
8
8
  require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var reactIntl = require('react-intl');
4
4
  var uiKit = require('@commercetools-frontend/ui-kit');
5
- var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-bf0ed2a7.cjs.dev.js');
5
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-40da749a.cjs.dev.js');
6
6
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
7
7
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
8
8
  require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -1,6 +1,6 @@
1
1
  import { useIntl } from 'react-intl';
2
2
  import { Spacings, PaperclipIcon, Constraints, Text, SecondaryButton } from '@commercetools-frontend/ui-kit';
3
- import { u as useImportResourcesContext, m as messages } from './index-42eec0a4.esm.js';
3
+ import { u as useImportResourcesContext, m as messages } from './index-10a225f5.esm.js';
4
4
  import '@babel/runtime-corejs3/core-js-stable/object/keys';
5
5
  import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
6
6
  import '@babel/runtime-corejs3/core-js-stable/instance/filter';
@@ -2,6 +2,14 @@ var frFR = {
2
2
  "ImportResourcesModal.browseFile": {
3
3
  string: "Parcourir le fichier"
4
4
  },
5
+ "ImportResourcesModal.business-unit": {
6
+ developer_comment: "Label for the business-unit resource type",
7
+ string: "Business unit"
8
+ },
9
+ "ImportResourcesModal.business-units": {
10
+ developer_comment: "Label for the business-units resource type",
11
+ string: "Business units"
12
+ },
5
13
  "ImportResourcesModal.cancel": {
6
14
  developer_comment: "Label for the cancel button",
7
15
  string: "Annuler"
@@ -166,6 +174,10 @@ var frFR = {
166
174
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
167
175
  string: "Assurez-vous que le fichier contienne les clés requises pour les éléments y compris {fieldNames}"
168
176
  },
177
+ "ImportResourcesModal.modalTitle.businessUnit": {
178
+ developer_comment: "Label for the business units modal title",
179
+ string: "Import business units by CSV"
180
+ },
169
181
  "ImportResourcesModal.modalTitle.category": {
170
182
  developer_comment: "Label for the categories modal title",
171
183
  string: "Importer des catégories par CSV"
@@ -4,6 +4,14 @@ var frFR = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Parcourir le fichier"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Annuler"
@@ -168,6 +176,10 @@ var frFR = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Assurez-vous que le fichier contienne les clés requises pour les éléments y compris {fieldNames}"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Importer des catégories par CSV"
@@ -4,6 +4,14 @@ var frFR = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Parcourir le fichier"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Annuler"
@@ -168,6 +176,10 @@ var frFR = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Assurez-vous que le fichier contienne les clés requises pour les éléments y compris {fieldNames}"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Importer des catégories par CSV"
@@ -57,7 +57,8 @@ const EnabledResourceType = {
57
57
  'discount-code': true,
58
58
  customer: false,
59
59
  order: false,
60
- 'product-type': false
60
+ 'product-type': false,
61
+ 'business-unit': true
61
62
  };
62
63
  function isResourceType(maybeResourceType) {
63
64
  return typeof maybeResourceType === 'string' && maybeResourceType in EnabledResourceType;
@@ -286,7 +287,8 @@ const IMPORTABLE_RESOURCES = {
286
287
  DISCOUNT_CODE: 'discount-code',
287
288
  CUSTOMER: 'customer',
288
289
  ORDER: 'order',
289
- PRODUCT_TYPE: 'product-type'
290
+ PRODUCT_TYPE: 'product-type',
291
+ BUSINESS_UNIT: 'business-unit'
290
292
  };
291
293
 
292
294
  const FILE_SIZE_LIMITS_MB = {
@@ -296,7 +298,8 @@ const FILE_SIZE_LIMITS_MB = {
296
298
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 35,
297
299
  [IMPORTABLE_RESOURCES.CUSTOMER]: 0,
298
300
  [IMPORTABLE_RESOURCES.ORDER]: 0,
299
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 35
301
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 35,
302
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 35
300
303
  };
301
304
  const ROW_LIMITS = {
302
305
  [IMPORTABLE_RESOURCES.CATEGORY]: 80_000,
@@ -305,7 +308,8 @@ const ROW_LIMITS = {
305
308
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 80_000,
306
309
  [IMPORTABLE_RESOURCES.CUSTOMER]: 0,
307
310
  [IMPORTABLE_RESOURCES.ORDER]: 0,
308
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 80_000
311
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 80_000,
312
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 80_000
309
313
  };
310
314
  const RESOURCE_TYPE_TEMPLATE_DOWNLOAD_LINKS = {
311
315
  [IMPORTABLE_RESOURCES.CATEGORY]: 'https://docs.commercetools.com/merchant-center/downloads/category_import_template.csv',
@@ -314,7 +318,8 @@ const RESOURCE_TYPE_TEMPLATE_DOWNLOAD_LINKS = {
314
318
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 'https://docs.commercetools.com/merchant-center/downloads/discount_code_import_template.csv',
315
319
  [IMPORTABLE_RESOURCES.CUSTOMER]: 'https://docs.commercetools.com/merchant-center/import-data#download-a-template',
316
320
  [IMPORTABLE_RESOURCES.ORDER]: 'https://docs.commercetools.com/merchant-center/import-data#download-a-template',
317
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/downloads/product_type_import_template.csv'
321
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/downloads/product_type_import_template.csv',
322
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 'https://docs.commercetools.com/merchant-center/downloads/business_unit_import_template.csv'
318
323
  };
319
324
  const RESOURCE_TYPE_DOCUMENTATION_LINKS = {
320
325
  [IMPORTABLE_RESOURCES.CATEGORY]: 'https://docs.commercetools.com/merchant-center/import-categories#supported-headers-and-values',
@@ -323,7 +328,8 @@ const RESOURCE_TYPE_DOCUMENTATION_LINKS = {
323
328
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 'https://docs.commercetools.com/merchant-center/import-discount-codes#supported-headers-and-values',
324
329
  [IMPORTABLE_RESOURCES.CUSTOMER]: 'https://docs.commercetools.com/merchant-center/import-customers#supported-headers-and-values',
325
330
  [IMPORTABLE_RESOURCES.ORDER]: 'https://docs.commercetools.com/merchant-center/import-orders#supported-headers-and-values',
326
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/import-product-types#supported-headers-and-values'
331
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/import-product-types#supported-headers-and-values',
332
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 'https://docs.commercetools.com/merchant-center/import-business-units#supported-headers-and-values'
327
333
  };
328
334
 
329
335
  const CT_API_DOCS_URL = 'https://docs.commercetools.com/api/';
@@ -340,7 +346,19 @@ const PERMISSIONS = {
340
346
  ViewProductTypes: 'ViewProductTypes',
341
347
  // DiscountCodes
342
348
  ManageDiscountCodes: 'ManageDiscountCodes',
343
- ViewDiscountCodes: 'ViewDiscountCodes'
349
+ ViewDiscountCodes: 'ViewDiscountCodes',
350
+ // Customers
351
+ ManageCustomers: 'ManageCustomers',
352
+ ViewCustomers: 'ViewCustomers',
353
+ // Orders
354
+ ManageOrders: 'ManageOrders',
355
+ ViewOrders: 'ViewOrders',
356
+ // KeyValueDocuments
357
+ ManageKeyValueDocuments: 'ManageKeyValueDocuments',
358
+ ViewKeyValueDocuments: 'ViewKeyValueDocuments',
359
+ // BusinessUnits
360
+ ManageBusinessUnits: 'ManageBusinessUnits',
361
+ ViewBusinessUnits: 'ViewBusinessUnits'
344
362
  };
345
363
  const ACTION_RIGHTS = {
346
364
  PublishProducts: {
@@ -380,6 +398,11 @@ var sharedMessages = defineMessages({
380
398
  description: 'Label for the inventories modal title',
381
399
  defaultMessage: 'Import discount codes by CSV'
382
400
  },
401
+ [`modalTitle.${IMPORTABLE_RESOURCES.BUSINESS_UNIT}`]: {
402
+ id: 'ImportResourcesModal.modalTitle.businessUnit',
403
+ description: 'Label for the business units modal title',
404
+ defaultMessage: 'Import business units by CSV'
405
+ },
383
406
  [`modalTitle.${IMPORTABLE_RESOURCES.CUSTOMER}`]: {
384
407
  id: 'ImportResourcesModal.modalTitle.customer',
385
408
  description: 'Label for the customers modal title',
@@ -586,6 +609,16 @@ var sharedMessages = defineMessages({
586
609
  description: 'Label for the discount-codes resource type',
587
610
  defaultMessage: 'Discount codes'
588
611
  },
612
+ 'business-unit': {
613
+ id: 'ImportResourcesModal.business-unit',
614
+ description: 'Label for the business-unit resource type',
615
+ defaultMessage: 'Business unit'
616
+ },
617
+ 'business-units': {
618
+ id: 'ImportResourcesModal.business-units',
619
+ description: 'Label for the business-units resource type',
620
+ defaultMessage: 'Business units'
621
+ },
589
622
  unknownResourceType: {
590
623
  id: 'ImportResourcesModal.unknown-resource-type',
591
624
  description: 'Label for the unknown resource type',
@@ -757,6 +790,7 @@ function resourceTypeToMessage(resourceType) {
757
790
  'product-variant-patch': sharedMessages['product-variant-patch'],
758
791
  'standalone-price': sharedMessages['standalone-price'],
759
792
  'custom-object': sharedMessages['custom-object'],
793
+ 'business-unit': sharedMessages['business-unit'],
760
794
  type: sharedMessages.type
761
795
  };
762
796
  const message = resourceTypeMap[resourceType];
@@ -782,7 +816,8 @@ function resourceTypeToPluralMessage(resourceType) {
782
816
  'product-draft': sharedMessages['product-drafts'],
783
817
  'product-variant': sharedMessages['product-variants'],
784
818
  'product-variant-patch': sharedMessages['product-variant-patches'],
785
- 'standalone-price': sharedMessages['standalone-prices']
819
+ 'standalone-price': sharedMessages['standalone-prices'],
820
+ 'business-unit': sharedMessages['business-units']
786
821
  };
787
822
  const message = resourceTypePluralMap[resourceType];
788
823
  if (!message) {
@@ -1043,13 +1078,13 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
1043
1078
  return /*#__PURE__*/css(process.env.NODE_ENV === "production" ? "" : ";label:getDefaultDropWrapperStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyb3AtYXJlYS13cmFwcGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0QlkiLCJmaWxlIjoiZHJvcC1hcmVhLXdyYXBwZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBEcm9wem9uZVJvb3RQcm9wcyB9IGZyb20gJ3JlYWN0LWRyb3B6b25lJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IHN0eWxlcyB9IGZyb20gJy4vc3R5bGVzJ1xuaW1wb3J0IHsgdHlwZSBEcm9wQXJlYVN0YXRlIH0gZnJvbSAnLi4vLi4vLi4vQHR5cGVzJ1xuXG5pbnRlcmZhY2UgRHJvcFdyYXBwZXJQcm9wcyBleHRlbmRzIERyb3B6b25lUm9vdFByb3BzIHtcbiAgZHJvcEFyZWFTdGF0ZTogRHJvcEFyZWFTdGF0ZVxufVxuZXhwb3J0IGNvbnN0IERyb3BXcmFwcGVyID0gc3R5bGVkLmRpdjxEcm9wV3JhcHBlclByb3BzPmBcbiAgJHtzdHlsZXMuYmFzZX1cbiAgJHsocHJvcHMpID0+IHtcbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2Rpc2FibGVkJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5kaXNhYmxlZFxuICAgIH1cbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ3JlYWR5LWZvci1kcm9wJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5yZWFkeUZvckRyb3BcbiAgICB9XG4gICAgaWYgKHByb3BzLmRyb3BBcmVhU3RhdGUgPT09ICdhY3RpdmUtZHJhZycpIHtcbiAgICAgIHJldHVybiBzdHlsZXMuYWN0aXZlRHJhZ1xuICAgIH1cbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2ZpbGUtZHJvcHBlZCcpIHtcbiAgICAgIHJldHVybiBzdHlsZXMuZmlsZURyb3BwZWRcbiAgICB9XG4gICAgcmV0dXJuIGdldERlZmF1bHREcm9wV3JhcHBlclN0eWxlcyhwcm9wcy5kcm9wQXJlYVN0YXRlKVxuICB9fVxuYFxuZnVuY3Rpb24gZ2V0RGVmYXVsdERyb3BXcmFwcGVyU3R5bGVzKF9kcm9wQXJlYVN0YXRlOiBuZXZlcikge1xuICByZXR1cm4gY3NzYGBcbn1cbiJdfQ== */");
1044
1079
  }
1045
1080
 
1046
- var ActiveDragDropArea = /*#__PURE__*/lazy(() => import('./active-drag-drop-area-4c295594.esm.js'));
1081
+ var ActiveDragDropArea = /*#__PURE__*/lazy(() => import('./active-drag-drop-area-294d353d.esm.js'));
1047
1082
 
1048
- var DisabledDropArea = /*#__PURE__*/lazy(() => import('./disabled-drop-area-9ea4c457.esm.js'));
1083
+ var DisabledDropArea = /*#__PURE__*/lazy(() => import('./disabled-drop-area-7ca6b04a.esm.js'));
1049
1084
 
1050
- var EnabledDropArea = /*#__PURE__*/lazy(() => import('./enabled-drop-area-e60beae7.esm.js'));
1085
+ var EnabledDropArea = /*#__PURE__*/lazy(() => import('./enabled-drop-area-9bf924fa.esm.js'));
1051
1086
 
1052
- var FileDropped = /*#__PURE__*/lazy(() => import('./file-dropped-area-f5cd314a.esm.js'));
1087
+ var FileDropped = /*#__PURE__*/lazy(() => import('./file-dropped-area-e6b5a3fa.esm.js'));
1053
1088
 
1054
1089
  function getDropArea(_ref) {
1055
1090
  let dropAreaState = _ref.dropAreaState,
@@ -1371,12 +1406,24 @@ const useImportPermission = () => {
1371
1406
  const canManageProducts = useIsAuthorized({
1372
1407
  demandedPermissions: [PERMISSIONS.ManageProducts]
1373
1408
  });
1374
- const canImportCategories = useIsAuthorized({
1409
+ const canManageCustomers = useIsAuthorized({
1410
+ demandedPermissions: [PERMISSIONS.ManageCustomers]
1411
+ });
1412
+ const canManageOrders = useIsAuthorized({
1413
+ demandedPermissions: [PERMISSIONS.ManageOrders]
1414
+ });
1415
+ const canManageKeyValueDocuments = useIsAuthorized({
1416
+ demandedPermissions: [PERMISSIONS.ManageKeyValueDocuments]
1417
+ });
1418
+ const canMAnageCategories = useIsAuthorized({
1375
1419
  demandedPermissions: [PERMISSIONS.ManageCategories]
1376
1420
  });
1377
- const canImportDiscountCodes = useIsAuthorized({
1421
+ const canManageDiscountCodes = useIsAuthorized({
1378
1422
  demandedPermissions: [PERMISSIONS.ManageDiscountCodes]
1379
1423
  });
1424
+ const canManageBusinessUnits = useIsAuthorized({
1425
+ demandedPermissions: [PERMISSIONS.ManageBusinessUnits]
1426
+ });
1380
1427
  const canImportProducts = useMemo(() => {
1381
1428
  if (!actionRights) return false;
1382
1429
  const canAddPrices = actionRights.canAddPrices,
@@ -1385,12 +1432,17 @@ const useImportPermission = () => {
1385
1432
  canEditPrices = actionRights.canEditPrices;
1386
1433
  return canManageProducts && canAddPrices && canAddProducts && canEditAttributesAll && canEditPrices;
1387
1434
  }, [canManageProducts, actionRights]);
1435
+ const canManageCustomObjects = useMemo(() => {
1436
+ return canManageProducts || canManageCustomers || canManageOrders || canManageKeyValueDocuments;
1437
+ }, [canManageCustomers, canManageOrders, canManageProducts, canManageKeyValueDocuments]);
1388
1438
  return {
1389
1439
  canImportProducts,
1390
- canImportCategories,
1391
- canImportDiscountCodes,
1440
+ canImportCategories: canMAnageCategories,
1441
+ canImportDiscountCodes: canManageDiscountCodes,
1442
+ canImportBusinessUnits: canManageBusinessUnits,
1392
1443
  canImportInventories: canManageProducts,
1393
- canImportProductTypes: canManageProducts
1444
+ canImportProductTypes: canManageProducts,
1445
+ canImportCustomObjects: canManageCustomObjects
1394
1446
  };
1395
1447
  };
1396
1448
 
@@ -2463,17 +2515,17 @@ const getChunkImport = locale => {
2463
2515
  const intlLocale = mapLocaleToIntlLocale(locale);
2464
2516
  switch (intlLocale) {
2465
2517
  case 'de':
2466
- return import('./de-4d884a52.esm.js');
2518
+ return import('./de-19530b12.esm.js');
2467
2519
  case 'es':
2468
- return import('./es-d589515f.esm.js');
2520
+ return import('./es-a9aada13.esm.js');
2469
2521
  case 'fr-FR':
2470
- return import('./fr-FR-d672a357.esm.js');
2522
+ return import('./fr-FR-02bd52fb.esm.js');
2471
2523
  case 'ja':
2472
2524
  return import('./ja-73c088a7.esm.js');
2473
2525
  case 'pt-BR':
2474
- return import('./pt-BR-3512c390.esm.js');
2526
+ return import('./pt-BR-ac1fc192.esm.js');
2475
2527
  default:
2476
- return import('./en-88aad148.esm.js');
2528
+ return import('./en-1f091237.esm.js');
2477
2529
  }
2478
2530
  };
2479
2531
  const loadMessages = async locale => {
@@ -85,7 +85,8 @@ const EnabledResourceType = {
85
85
  'discount-code': true,
86
86
  customer: false,
87
87
  order: false,
88
- 'product-type': false
88
+ 'product-type': false,
89
+ 'business-unit': true
89
90
  };
90
91
  function isResourceType(maybeResourceType) {
91
92
  return typeof maybeResourceType === 'string' && maybeResourceType in EnabledResourceType;
@@ -314,7 +315,8 @@ const IMPORTABLE_RESOURCES = {
314
315
  DISCOUNT_CODE: 'discount-code',
315
316
  CUSTOMER: 'customer',
316
317
  ORDER: 'order',
317
- PRODUCT_TYPE: 'product-type'
318
+ PRODUCT_TYPE: 'product-type',
319
+ BUSINESS_UNIT: 'business-unit'
318
320
  };
319
321
 
320
322
  const FILE_SIZE_LIMITS_MB = {
@@ -324,7 +326,8 @@ const FILE_SIZE_LIMITS_MB = {
324
326
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 35,
325
327
  [IMPORTABLE_RESOURCES.CUSTOMER]: 0,
326
328
  [IMPORTABLE_RESOURCES.ORDER]: 0,
327
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 35
329
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 35,
330
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 35
328
331
  };
329
332
  const ROW_LIMITS = {
330
333
  [IMPORTABLE_RESOURCES.CATEGORY]: 80_000,
@@ -333,7 +336,8 @@ const ROW_LIMITS = {
333
336
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 80_000,
334
337
  [IMPORTABLE_RESOURCES.CUSTOMER]: 0,
335
338
  [IMPORTABLE_RESOURCES.ORDER]: 0,
336
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 80_000
339
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 80_000,
340
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 80_000
337
341
  };
338
342
  const RESOURCE_TYPE_TEMPLATE_DOWNLOAD_LINKS = {
339
343
  [IMPORTABLE_RESOURCES.CATEGORY]: 'https://docs.commercetools.com/merchant-center/downloads/category_import_template.csv',
@@ -342,7 +346,8 @@ const RESOURCE_TYPE_TEMPLATE_DOWNLOAD_LINKS = {
342
346
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 'https://docs.commercetools.com/merchant-center/downloads/discount_code_import_template.csv',
343
347
  [IMPORTABLE_RESOURCES.CUSTOMER]: 'https://docs.commercetools.com/merchant-center/import-data#download-a-template',
344
348
  [IMPORTABLE_RESOURCES.ORDER]: 'https://docs.commercetools.com/merchant-center/import-data#download-a-template',
345
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/downloads/product_type_import_template.csv'
349
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/downloads/product_type_import_template.csv',
350
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 'https://docs.commercetools.com/merchant-center/downloads/business_unit_import_template.csv'
346
351
  };
347
352
  const RESOURCE_TYPE_DOCUMENTATION_LINKS = {
348
353
  [IMPORTABLE_RESOURCES.CATEGORY]: 'https://docs.commercetools.com/merchant-center/import-categories#supported-headers-and-values',
@@ -351,7 +356,8 @@ const RESOURCE_TYPE_DOCUMENTATION_LINKS = {
351
356
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 'https://docs.commercetools.com/merchant-center/import-discount-codes#supported-headers-and-values',
352
357
  [IMPORTABLE_RESOURCES.CUSTOMER]: 'https://docs.commercetools.com/merchant-center/import-customers#supported-headers-and-values',
353
358
  [IMPORTABLE_RESOURCES.ORDER]: 'https://docs.commercetools.com/merchant-center/import-orders#supported-headers-and-values',
354
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/import-product-types#supported-headers-and-values'
359
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/import-product-types#supported-headers-and-values',
360
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 'https://docs.commercetools.com/merchant-center/import-business-units#supported-headers-and-values'
355
361
  };
356
362
 
357
363
  const CT_API_DOCS_URL = 'https://docs.commercetools.com/api/';
@@ -368,7 +374,19 @@ const PERMISSIONS = {
368
374
  ViewProductTypes: 'ViewProductTypes',
369
375
  // DiscountCodes
370
376
  ManageDiscountCodes: 'ManageDiscountCodes',
371
- ViewDiscountCodes: 'ViewDiscountCodes'
377
+ ViewDiscountCodes: 'ViewDiscountCodes',
378
+ // Customers
379
+ ManageCustomers: 'ManageCustomers',
380
+ ViewCustomers: 'ViewCustomers',
381
+ // Orders
382
+ ManageOrders: 'ManageOrders',
383
+ ViewOrders: 'ViewOrders',
384
+ // KeyValueDocuments
385
+ ManageKeyValueDocuments: 'ManageKeyValueDocuments',
386
+ ViewKeyValueDocuments: 'ViewKeyValueDocuments',
387
+ // BusinessUnits
388
+ ManageBusinessUnits: 'ManageBusinessUnits',
389
+ ViewBusinessUnits: 'ViewBusinessUnits'
372
390
  };
373
391
  const ACTION_RIGHTS = {
374
392
  PublishProducts: {
@@ -408,6 +426,11 @@ var sharedMessages = reactIntl.defineMessages({
408
426
  description: 'Label for the inventories modal title',
409
427
  defaultMessage: 'Import discount codes by CSV'
410
428
  },
429
+ [`modalTitle.${IMPORTABLE_RESOURCES.BUSINESS_UNIT}`]: {
430
+ id: 'ImportResourcesModal.modalTitle.businessUnit',
431
+ description: 'Label for the business units modal title',
432
+ defaultMessage: 'Import business units by CSV'
433
+ },
411
434
  [`modalTitle.${IMPORTABLE_RESOURCES.CUSTOMER}`]: {
412
435
  id: 'ImportResourcesModal.modalTitle.customer',
413
436
  description: 'Label for the customers modal title',
@@ -614,6 +637,16 @@ var sharedMessages = reactIntl.defineMessages({
614
637
  description: 'Label for the discount-codes resource type',
615
638
  defaultMessage: 'Discount codes'
616
639
  },
640
+ 'business-unit': {
641
+ id: 'ImportResourcesModal.business-unit',
642
+ description: 'Label for the business-unit resource type',
643
+ defaultMessage: 'Business unit'
644
+ },
645
+ 'business-units': {
646
+ id: 'ImportResourcesModal.business-units',
647
+ description: 'Label for the business-units resource type',
648
+ defaultMessage: 'Business units'
649
+ },
617
650
  unknownResourceType: {
618
651
  id: 'ImportResourcesModal.unknown-resource-type',
619
652
  description: 'Label for the unknown resource type',
@@ -785,6 +818,7 @@ function resourceTypeToMessage(resourceType) {
785
818
  'product-variant-patch': sharedMessages['product-variant-patch'],
786
819
  'standalone-price': sharedMessages['standalone-price'],
787
820
  'custom-object': sharedMessages['custom-object'],
821
+ 'business-unit': sharedMessages['business-unit'],
788
822
  type: sharedMessages.type
789
823
  };
790
824
  const message = resourceTypeMap[resourceType];
@@ -810,7 +844,8 @@ function resourceTypeToPluralMessage(resourceType) {
810
844
  'product-draft': sharedMessages['product-drafts'],
811
845
  'product-variant': sharedMessages['product-variants'],
812
846
  'product-variant-patch': sharedMessages['product-variant-patches'],
813
- 'standalone-price': sharedMessages['standalone-prices']
847
+ 'standalone-price': sharedMessages['standalone-prices'],
848
+ 'business-unit': sharedMessages['business-units']
814
849
  };
815
850
  const message = resourceTypePluralMap[resourceType];
816
851
  if (!message) {
@@ -1071,13 +1106,13 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
1071
1106
  return /*#__PURE__*/react.css(process.env.NODE_ENV === "production" ? "" : ";label:getDefaultDropWrapperStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyb3AtYXJlYS13cmFwcGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0QlkiLCJmaWxlIjoiZHJvcC1hcmVhLXdyYXBwZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBEcm9wem9uZVJvb3RQcm9wcyB9IGZyb20gJ3JlYWN0LWRyb3B6b25lJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IHN0eWxlcyB9IGZyb20gJy4vc3R5bGVzJ1xuaW1wb3J0IHsgdHlwZSBEcm9wQXJlYVN0YXRlIH0gZnJvbSAnLi4vLi4vLi4vQHR5cGVzJ1xuXG5pbnRlcmZhY2UgRHJvcFdyYXBwZXJQcm9wcyBleHRlbmRzIERyb3B6b25lUm9vdFByb3BzIHtcbiAgZHJvcEFyZWFTdGF0ZTogRHJvcEFyZWFTdGF0ZVxufVxuZXhwb3J0IGNvbnN0IERyb3BXcmFwcGVyID0gc3R5bGVkLmRpdjxEcm9wV3JhcHBlclByb3BzPmBcbiAgJHtzdHlsZXMuYmFzZX1cbiAgJHsocHJvcHMpID0+IHtcbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2Rpc2FibGVkJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5kaXNhYmxlZFxuICAgIH1cbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ3JlYWR5LWZvci1kcm9wJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5yZWFkeUZvckRyb3BcbiAgICB9XG4gICAgaWYgKHByb3BzLmRyb3BBcmVhU3RhdGUgPT09ICdhY3RpdmUtZHJhZycpIHtcbiAgICAgIHJldHVybiBzdHlsZXMuYWN0aXZlRHJhZ1xuICAgIH1cbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2ZpbGUtZHJvcHBlZCcpIHtcbiAgICAgIHJldHVybiBzdHlsZXMuZmlsZURyb3BwZWRcbiAgICB9XG4gICAgcmV0dXJuIGdldERlZmF1bHREcm9wV3JhcHBlclN0eWxlcyhwcm9wcy5kcm9wQXJlYVN0YXRlKVxuICB9fVxuYFxuZnVuY3Rpb24gZ2V0RGVmYXVsdERyb3BXcmFwcGVyU3R5bGVzKF9kcm9wQXJlYVN0YXRlOiBuZXZlcikge1xuICByZXR1cm4gY3NzYGBcbn1cbiJdfQ== */");
1072
1107
  }
1073
1108
 
1074
- var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-1b036a1a.cjs.dev.js'); }));
1109
+ var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-0467c118.cjs.dev.js'); }));
1075
1110
 
1076
- var DisabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./disabled-drop-area-377a3c8d.cjs.dev.js'); }));
1111
+ var DisabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./disabled-drop-area-4a639dbf.cjs.dev.js'); }));
1077
1112
 
1078
- var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-1bb3ba2c.cjs.dev.js'); }));
1113
+ var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-a4a76650.cjs.dev.js'); }));
1079
1114
 
1080
- var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-f251fc3d.cjs.dev.js'); }));
1115
+ var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-9387283c.cjs.dev.js'); }));
1081
1116
 
1082
1117
  function getDropArea(_ref) {
1083
1118
  let dropAreaState = _ref.dropAreaState,
@@ -1399,12 +1434,24 @@ const useImportPermission = () => {
1399
1434
  const canManageProducts = permissions.useIsAuthorized({
1400
1435
  demandedPermissions: [PERMISSIONS.ManageProducts]
1401
1436
  });
1402
- const canImportCategories = permissions.useIsAuthorized({
1437
+ const canManageCustomers = permissions.useIsAuthorized({
1438
+ demandedPermissions: [PERMISSIONS.ManageCustomers]
1439
+ });
1440
+ const canManageOrders = permissions.useIsAuthorized({
1441
+ demandedPermissions: [PERMISSIONS.ManageOrders]
1442
+ });
1443
+ const canManageKeyValueDocuments = permissions.useIsAuthorized({
1444
+ demandedPermissions: [PERMISSIONS.ManageKeyValueDocuments]
1445
+ });
1446
+ const canMAnageCategories = permissions.useIsAuthorized({
1403
1447
  demandedPermissions: [PERMISSIONS.ManageCategories]
1404
1448
  });
1405
- const canImportDiscountCodes = permissions.useIsAuthorized({
1449
+ const canManageDiscountCodes = permissions.useIsAuthorized({
1406
1450
  demandedPermissions: [PERMISSIONS.ManageDiscountCodes]
1407
1451
  });
1452
+ const canManageBusinessUnits = permissions.useIsAuthorized({
1453
+ demandedPermissions: [PERMISSIONS.ManageBusinessUnits]
1454
+ });
1408
1455
  const canImportProducts = React.useMemo(() => {
1409
1456
  if (!actionRights) return false;
1410
1457
  const canAddPrices = actionRights.canAddPrices,
@@ -1413,12 +1460,17 @@ const useImportPermission = () => {
1413
1460
  canEditPrices = actionRights.canEditPrices;
1414
1461
  return canManageProducts && canAddPrices && canAddProducts && canEditAttributesAll && canEditPrices;
1415
1462
  }, [canManageProducts, actionRights]);
1463
+ const canManageCustomObjects = React.useMemo(() => {
1464
+ return canManageProducts || canManageCustomers || canManageOrders || canManageKeyValueDocuments;
1465
+ }, [canManageCustomers, canManageOrders, canManageProducts, canManageKeyValueDocuments]);
1416
1466
  return {
1417
1467
  canImportProducts,
1418
- canImportCategories,
1419
- canImportDiscountCodes,
1468
+ canImportCategories: canMAnageCategories,
1469
+ canImportDiscountCodes: canManageDiscountCodes,
1470
+ canImportBusinessUnits: canManageBusinessUnits,
1420
1471
  canImportInventories: canManageProducts,
1421
- canImportProductTypes: canManageProducts
1472
+ canImportProductTypes: canManageProducts,
1473
+ canImportCustomObjects: canManageCustomObjects
1422
1474
  };
1423
1475
  };
1424
1476
 
@@ -2491,17 +2543,17 @@ const getChunkImport = locale => {
2491
2543
  const intlLocale = i18n.mapLocaleToIntlLocale(locale);
2492
2544
  switch (intlLocale) {
2493
2545
  case 'de':
2494
- return Promise.resolve().then(function () { return require('./de-cd1c2b61.cjs.dev.js'); });
2546
+ return Promise.resolve().then(function () { return require('./de-db4fb974.cjs.dev.js'); });
2495
2547
  case 'es':
2496
- return Promise.resolve().then(function () { return require('./es-09b5f26a.cjs.dev.js'); });
2548
+ return Promise.resolve().then(function () { return require('./es-420f21e1.cjs.dev.js'); });
2497
2549
  case 'fr-FR':
2498
- return Promise.resolve().then(function () { return require('./fr-FR-a5fe152a.cjs.dev.js'); });
2550
+ return Promise.resolve().then(function () { return require('./fr-FR-342599f4.cjs.dev.js'); });
2499
2551
  case 'ja':
2500
2552
  return Promise.resolve().then(function () { return require('./ja-9bd5f452.cjs.dev.js'); });
2501
2553
  case 'pt-BR':
2502
- return Promise.resolve().then(function () { return require('./pt-BR-0389b318.cjs.dev.js'); });
2554
+ return Promise.resolve().then(function () { return require('./pt-BR-339ed808.cjs.dev.js'); });
2503
2555
  default:
2504
- return Promise.resolve().then(function () { return require('./en-c4f7d882.cjs.dev.js'); });
2556
+ return Promise.resolve().then(function () { return require('./en-f53130d1.cjs.dev.js'); });
2505
2557
  }
2506
2558
  };
2507
2559
  const loadMessages = async locale => {
@@ -85,7 +85,8 @@ const EnabledResourceType = {
85
85
  'discount-code': true,
86
86
  customer: false,
87
87
  order: false,
88
- 'product-type': false
88
+ 'product-type': false,
89
+ 'business-unit': true
89
90
  };
90
91
  function isResourceType(maybeResourceType) {
91
92
  return typeof maybeResourceType === 'string' && maybeResourceType in EnabledResourceType;
@@ -314,7 +315,8 @@ const IMPORTABLE_RESOURCES = {
314
315
  DISCOUNT_CODE: 'discount-code',
315
316
  CUSTOMER: 'customer',
316
317
  ORDER: 'order',
317
- PRODUCT_TYPE: 'product-type'
318
+ PRODUCT_TYPE: 'product-type',
319
+ BUSINESS_UNIT: 'business-unit'
318
320
  };
319
321
 
320
322
  const FILE_SIZE_LIMITS_MB = {
@@ -324,7 +326,8 @@ const FILE_SIZE_LIMITS_MB = {
324
326
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 35,
325
327
  [IMPORTABLE_RESOURCES.CUSTOMER]: 0,
326
328
  [IMPORTABLE_RESOURCES.ORDER]: 0,
327
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 35
329
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 35,
330
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 35
328
331
  };
329
332
  const ROW_LIMITS = {
330
333
  [IMPORTABLE_RESOURCES.CATEGORY]: 80_000,
@@ -333,7 +336,8 @@ const ROW_LIMITS = {
333
336
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 80_000,
334
337
  [IMPORTABLE_RESOURCES.CUSTOMER]: 0,
335
338
  [IMPORTABLE_RESOURCES.ORDER]: 0,
336
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 80_000
339
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 80_000,
340
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 80_000
337
341
  };
338
342
  const RESOURCE_TYPE_TEMPLATE_DOWNLOAD_LINKS = {
339
343
  [IMPORTABLE_RESOURCES.CATEGORY]: 'https://docs.commercetools.com/merchant-center/downloads/category_import_template.csv',
@@ -342,7 +346,8 @@ const RESOURCE_TYPE_TEMPLATE_DOWNLOAD_LINKS = {
342
346
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 'https://docs.commercetools.com/merchant-center/downloads/discount_code_import_template.csv',
343
347
  [IMPORTABLE_RESOURCES.CUSTOMER]: 'https://docs.commercetools.com/merchant-center/import-data#download-a-template',
344
348
  [IMPORTABLE_RESOURCES.ORDER]: 'https://docs.commercetools.com/merchant-center/import-data#download-a-template',
345
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/downloads/product_type_import_template.csv'
349
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/downloads/product_type_import_template.csv',
350
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 'https://docs.commercetools.com/merchant-center/downloads/business_unit_import_template.csv'
346
351
  };
347
352
  const RESOURCE_TYPE_DOCUMENTATION_LINKS = {
348
353
  [IMPORTABLE_RESOURCES.CATEGORY]: 'https://docs.commercetools.com/merchant-center/import-categories#supported-headers-and-values',
@@ -351,7 +356,8 @@ const RESOURCE_TYPE_DOCUMENTATION_LINKS = {
351
356
  [IMPORTABLE_RESOURCES.DISCOUNT_CODE]: 'https://docs.commercetools.com/merchant-center/import-discount-codes#supported-headers-and-values',
352
357
  [IMPORTABLE_RESOURCES.CUSTOMER]: 'https://docs.commercetools.com/merchant-center/import-customers#supported-headers-and-values',
353
358
  [IMPORTABLE_RESOURCES.ORDER]: 'https://docs.commercetools.com/merchant-center/import-orders#supported-headers-and-values',
354
- [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/import-product-types#supported-headers-and-values'
359
+ [IMPORTABLE_RESOURCES.PRODUCT_TYPE]: 'https://docs.commercetools.com/merchant-center/import-product-types#supported-headers-and-values',
360
+ [IMPORTABLE_RESOURCES.BUSINESS_UNIT]: 'https://docs.commercetools.com/merchant-center/import-business-units#supported-headers-and-values'
355
361
  };
356
362
 
357
363
  const CT_API_DOCS_URL = 'https://docs.commercetools.com/api/';
@@ -368,7 +374,19 @@ const PERMISSIONS = {
368
374
  ViewProductTypes: 'ViewProductTypes',
369
375
  // DiscountCodes
370
376
  ManageDiscountCodes: 'ManageDiscountCodes',
371
- ViewDiscountCodes: 'ViewDiscountCodes'
377
+ ViewDiscountCodes: 'ViewDiscountCodes',
378
+ // Customers
379
+ ManageCustomers: 'ManageCustomers',
380
+ ViewCustomers: 'ViewCustomers',
381
+ // Orders
382
+ ManageOrders: 'ManageOrders',
383
+ ViewOrders: 'ViewOrders',
384
+ // KeyValueDocuments
385
+ ManageKeyValueDocuments: 'ManageKeyValueDocuments',
386
+ ViewKeyValueDocuments: 'ViewKeyValueDocuments',
387
+ // BusinessUnits
388
+ ManageBusinessUnits: 'ManageBusinessUnits',
389
+ ViewBusinessUnits: 'ViewBusinessUnits'
372
390
  };
373
391
  const ACTION_RIGHTS = {
374
392
  PublishProducts: {
@@ -408,6 +426,11 @@ var sharedMessages = reactIntl.defineMessages({
408
426
  description: 'Label for the inventories modal title',
409
427
  defaultMessage: 'Import discount codes by CSV'
410
428
  },
429
+ [`modalTitle.${IMPORTABLE_RESOURCES.BUSINESS_UNIT}`]: {
430
+ id: 'ImportResourcesModal.modalTitle.businessUnit',
431
+ description: 'Label for the business units modal title',
432
+ defaultMessage: 'Import business units by CSV'
433
+ },
411
434
  [`modalTitle.${IMPORTABLE_RESOURCES.CUSTOMER}`]: {
412
435
  id: 'ImportResourcesModal.modalTitle.customer',
413
436
  description: 'Label for the customers modal title',
@@ -614,6 +637,16 @@ var sharedMessages = reactIntl.defineMessages({
614
637
  description: 'Label for the discount-codes resource type',
615
638
  defaultMessage: 'Discount codes'
616
639
  },
640
+ 'business-unit': {
641
+ id: 'ImportResourcesModal.business-unit',
642
+ description: 'Label for the business-unit resource type',
643
+ defaultMessage: 'Business unit'
644
+ },
645
+ 'business-units': {
646
+ id: 'ImportResourcesModal.business-units',
647
+ description: 'Label for the business-units resource type',
648
+ defaultMessage: 'Business units'
649
+ },
617
650
  unknownResourceType: {
618
651
  id: 'ImportResourcesModal.unknown-resource-type',
619
652
  description: 'Label for the unknown resource type',
@@ -785,6 +818,7 @@ function resourceTypeToMessage(resourceType) {
785
818
  'product-variant-patch': sharedMessages['product-variant-patch'],
786
819
  'standalone-price': sharedMessages['standalone-price'],
787
820
  'custom-object': sharedMessages['custom-object'],
821
+ 'business-unit': sharedMessages['business-unit'],
788
822
  type: sharedMessages.type
789
823
  };
790
824
  const message = resourceTypeMap[resourceType];
@@ -810,7 +844,8 @@ function resourceTypeToPluralMessage(resourceType) {
810
844
  'product-draft': sharedMessages['product-drafts'],
811
845
  'product-variant': sharedMessages['product-variants'],
812
846
  'product-variant-patch': sharedMessages['product-variant-patches'],
813
- 'standalone-price': sharedMessages['standalone-prices']
847
+ 'standalone-price': sharedMessages['standalone-prices'],
848
+ 'business-unit': sharedMessages['business-units']
814
849
  };
815
850
  const message = resourceTypePluralMap[resourceType];
816
851
  if (!message) {
@@ -1068,13 +1103,13 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
1068
1103
  return /*#__PURE__*/react.css("" , "" );
1069
1104
  }
1070
1105
 
1071
- var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-dc11c9dd.cjs.prod.js'); }));
1106
+ var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-a995b09d.cjs.prod.js'); }));
1072
1107
 
1073
- var DisabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./disabled-drop-area-40108d06.cjs.prod.js'); }));
1108
+ var DisabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./disabled-drop-area-16b58581.cjs.prod.js'); }));
1074
1109
 
1075
- var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-5629adf7.cjs.prod.js'); }));
1110
+ var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-1f50b766.cjs.prod.js'); }));
1076
1111
 
1077
- var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-00056628.cjs.prod.js'); }));
1112
+ var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-84bc6912.cjs.prod.js'); }));
1078
1113
 
1079
1114
  function getDropArea(_ref) {
1080
1115
  let dropAreaState = _ref.dropAreaState,
@@ -1396,12 +1431,24 @@ const useImportPermission = () => {
1396
1431
  const canManageProducts = permissions.useIsAuthorized({
1397
1432
  demandedPermissions: [PERMISSIONS.ManageProducts]
1398
1433
  });
1399
- const canImportCategories = permissions.useIsAuthorized({
1434
+ const canManageCustomers = permissions.useIsAuthorized({
1435
+ demandedPermissions: [PERMISSIONS.ManageCustomers]
1436
+ });
1437
+ const canManageOrders = permissions.useIsAuthorized({
1438
+ demandedPermissions: [PERMISSIONS.ManageOrders]
1439
+ });
1440
+ const canManageKeyValueDocuments = permissions.useIsAuthorized({
1441
+ demandedPermissions: [PERMISSIONS.ManageKeyValueDocuments]
1442
+ });
1443
+ const canMAnageCategories = permissions.useIsAuthorized({
1400
1444
  demandedPermissions: [PERMISSIONS.ManageCategories]
1401
1445
  });
1402
- const canImportDiscountCodes = permissions.useIsAuthorized({
1446
+ const canManageDiscountCodes = permissions.useIsAuthorized({
1403
1447
  demandedPermissions: [PERMISSIONS.ManageDiscountCodes]
1404
1448
  });
1449
+ const canManageBusinessUnits = permissions.useIsAuthorized({
1450
+ demandedPermissions: [PERMISSIONS.ManageBusinessUnits]
1451
+ });
1405
1452
  const canImportProducts = React.useMemo(() => {
1406
1453
  if (!actionRights) return false;
1407
1454
  const canAddPrices = actionRights.canAddPrices,
@@ -1410,12 +1457,17 @@ const useImportPermission = () => {
1410
1457
  canEditPrices = actionRights.canEditPrices;
1411
1458
  return canManageProducts && canAddPrices && canAddProducts && canEditAttributesAll && canEditPrices;
1412
1459
  }, [canManageProducts, actionRights]);
1460
+ const canManageCustomObjects = React.useMemo(() => {
1461
+ return canManageProducts || canManageCustomers || canManageOrders || canManageKeyValueDocuments;
1462
+ }, [canManageCustomers, canManageOrders, canManageProducts, canManageKeyValueDocuments]);
1413
1463
  return {
1414
1464
  canImportProducts,
1415
- canImportCategories,
1416
- canImportDiscountCodes,
1465
+ canImportCategories: canMAnageCategories,
1466
+ canImportDiscountCodes: canManageDiscountCodes,
1467
+ canImportBusinessUnits: canManageBusinessUnits,
1417
1468
  canImportInventories: canManageProducts,
1418
- canImportProductTypes: canManageProducts
1469
+ canImportProductTypes: canManageProducts,
1470
+ canImportCustomObjects: canManageCustomObjects
1419
1471
  };
1420
1472
  };
1421
1473
 
@@ -2464,17 +2516,17 @@ const getChunkImport = locale => {
2464
2516
  const intlLocale = i18n.mapLocaleToIntlLocale(locale);
2465
2517
  switch (intlLocale) {
2466
2518
  case 'de':
2467
- return Promise.resolve().then(function () { return require('./de-ba621f66.cjs.prod.js'); });
2519
+ return Promise.resolve().then(function () { return require('./de-2836a9ae.cjs.prod.js'); });
2468
2520
  case 'es':
2469
- return Promise.resolve().then(function () { return require('./es-1877968a.cjs.prod.js'); });
2521
+ return Promise.resolve().then(function () { return require('./es-f085026e.cjs.prod.js'); });
2470
2522
  case 'fr-FR':
2471
- return Promise.resolve().then(function () { return require('./fr-FR-1d2ccb65.cjs.prod.js'); });
2523
+ return Promise.resolve().then(function () { return require('./fr-FR-dc40a55c.cjs.prod.js'); });
2472
2524
  case 'ja':
2473
2525
  return Promise.resolve().then(function () { return require('./ja-37632763.cjs.prod.js'); });
2474
2526
  case 'pt-BR':
2475
- return Promise.resolve().then(function () { return require('./pt-BR-606f307c.cjs.prod.js'); });
2527
+ return Promise.resolve().then(function () { return require('./pt-BR-31c46d23.cjs.prod.js'); });
2476
2528
  default:
2477
- return Promise.resolve().then(function () { return require('./en-102ccf29.cjs.prod.js'); });
2529
+ return Promise.resolve().then(function () { return require('./en-cb6893e4.cjs.prod.js'); });
2478
2530
  }
2479
2531
  };
2480
2532
  const loadMessages = async locale => {
@@ -4,6 +4,14 @@ var ptBR = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Procurar arquivo"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Cancelar"
@@ -168,6 +176,10 @@ var ptBR = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Certifique-se de que o arquivo contém as chaves necessárias para os elementos, incluindo {fieldNames}"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Importar categorias por CSV"
@@ -4,6 +4,14 @@ var ptBR = {
4
4
  "ImportResourcesModal.browseFile": {
5
5
  string: "Procurar arquivo"
6
6
  },
7
+ "ImportResourcesModal.business-unit": {
8
+ developer_comment: "Label for the business-unit resource type",
9
+ string: "Business unit"
10
+ },
11
+ "ImportResourcesModal.business-units": {
12
+ developer_comment: "Label for the business-units resource type",
13
+ string: "Business units"
14
+ },
7
15
  "ImportResourcesModal.cancel": {
8
16
  developer_comment: "Label for the cancel button",
9
17
  string: "Cancelar"
@@ -168,6 +176,10 @@ var ptBR = {
168
176
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
169
177
  string: "Certifique-se de que o arquivo contém as chaves necessárias para os elementos, incluindo {fieldNames}"
170
178
  },
179
+ "ImportResourcesModal.modalTitle.businessUnit": {
180
+ developer_comment: "Label for the business units modal title",
181
+ string: "Import business units by CSV"
182
+ },
171
183
  "ImportResourcesModal.modalTitle.category": {
172
184
  developer_comment: "Label for the categories modal title",
173
185
  string: "Importar categorias por CSV"
@@ -2,6 +2,14 @@ var ptBR = {
2
2
  "ImportResourcesModal.browseFile": {
3
3
  string: "Procurar arquivo"
4
4
  },
5
+ "ImportResourcesModal.business-unit": {
6
+ developer_comment: "Label for the business-unit resource type",
7
+ string: "Business unit"
8
+ },
9
+ "ImportResourcesModal.business-units": {
10
+ developer_comment: "Label for the business-units resource type",
11
+ string: "Business units"
12
+ },
5
13
  "ImportResourcesModal.cancel": {
6
14
  developer_comment: "Label for the cancel button",
7
15
  string: "Cancelar"
@@ -166,6 +174,10 @@ var ptBR = {
166
174
  developer_comment: "Error message displayed when the uploaded file is missing required keys",
167
175
  string: "Certifique-se de que o arquivo contém as chaves necessárias para os elementos, incluindo {fieldNames}"
168
176
  },
177
+ "ImportResourcesModal.modalTitle.businessUnit": {
178
+ developer_comment: "Label for the business units modal title",
179
+ string: "Import business units by CSV"
180
+ },
169
181
  "ImportResourcesModal.modalTitle.category": {
170
182
  developer_comment: "Label for the categories modal title",
171
183
  string: "Importar categorias por CSV"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-frontend-extensions/import-resources-modal",
3
3
  "description": "Shared import modal for importing resources",
4
- "version": "1.8.3",
4
+ "version": "1.9.0",
5
5
  "license": "BSD-3-Clause",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -45,11 +45,11 @@
45
45
  "@commercetools-frontend/permissions": "24.2.1",
46
46
  "@commercetools-frontend/sdk": "24.2.1",
47
47
  "@commercetools-frontend/sentry": "24.2.1",
48
- "@commercetools-frontend/ui-kit": "20.1.0",
49
- "@commercetools-uikit/data-table": "20.1.0",
50
- "@commercetools-uikit/design-system": "20.1.0",
51
- "@commercetools-uikit/icons": "20.1.0",
52
- "@commercetools-uikit/select-field": "20.1.0",
48
+ "@commercetools-frontend/ui-kit": "20.2.2",
49
+ "@commercetools-uikit/data-table": "20.2.2",
50
+ "@commercetools-uikit/design-system": "20.2.2",
51
+ "@commercetools-uikit/icons": "20.2.2",
52
+ "@commercetools-uikit/select-field": "20.2.2",
53
53
  "@preconstruct/cli": "2.8.12",
54
54
  "@types/jest": "29.5.14",
55
55
  "@types/lodash.truncate": "^4.4.7",