@commercetools-frontend-extensions/import-resources-modal 0.0.0-canary-20240529140709

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 (56) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +76 -0
  3. package/dist/active-drag-drop-area-06cef014.esm.js +60 -0
  4. package/dist/active-drag-drop-area-be3680ab.cjs.prod.js +62 -0
  5. package/dist/active-drag-drop-area-fae899bd.cjs.dev.js +62 -0
  6. package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.d.ts +3 -0
  7. package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.dev.js +60 -0
  8. package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.js +7 -0
  9. package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.prod.js +60 -0
  10. package/dist/commercetools-frontend-extensions-import-resources-modal.esm.js +52 -0
  11. package/dist/de-a34c5dd4.cjs.dev.js +6 -0
  12. package/dist/de-cd6c45d3.esm.js +4 -0
  13. package/dist/de-d954fe3d.cjs.prod.js +6 -0
  14. package/dist/declarations/src/@types/api.d.ts +13 -0
  15. package/dist/declarations/src/@types/basic-error-data-type.d.ts +5 -0
  16. package/dist/declarations/src/@types/file-upload.d.ts +52 -0
  17. package/dist/declarations/src/@types/import-container.d.ts +20 -0
  18. package/dist/declarations/src/@types/import-resources-modal-props.d.ts +7 -0
  19. package/dist/declarations/src/@types/import-states.d.ts +9 -0
  20. package/dist/declarations/src/@types/import-summary.d.ts +8 -0
  21. package/dist/declarations/src/@types/index.d.ts +9 -0
  22. package/dist/declarations/src/@types/resource-type.d.ts +1 -0
  23. package/dist/declarations/src/@types/shared.d.ts +7 -0
  24. package/dist/declarations/src/import-resources-modal.d.ts +6 -0
  25. package/dist/declarations/src/index.d.ts +2 -0
  26. package/dist/disabled-drop-area-2c088477.esm.js +37 -0
  27. package/dist/disabled-drop-area-99c1fa0b.cjs.prod.js +50 -0
  28. package/dist/disabled-drop-area-aa78075b.cjs.dev.js +50 -0
  29. package/dist/en-3a9aa2d4.esm.js +4 -0
  30. package/dist/en-6b3694f6.cjs.dev.js +6 -0
  31. package/dist/en-c7757448.cjs.prod.js +6 -0
  32. package/dist/enabled-drop-area-32e0dc61.cjs.prod.js +123 -0
  33. package/dist/enabled-drop-area-56d860b6.cjs.dev.js +123 -0
  34. package/dist/enabled-drop-area-69507fae.esm.js +110 -0
  35. package/dist/es-042343bd.cjs.prod.js +6 -0
  36. package/dist/es-8b3ecab1.cjs.dev.js +6 -0
  37. package/dist/es-e544023d.esm.js +4 -0
  38. package/dist/file-dropped-area-6acf82c0.cjs.dev.js +83 -0
  39. package/dist/file-dropped-area-6f365e02.esm.js +81 -0
  40. package/dist/file-dropped-area-e856a71f.cjs.prod.js +83 -0
  41. package/dist/fr-FR-9d9081ee.esm.js +4 -0
  42. package/dist/fr-FR-e7126fcc.cjs.dev.js +6 -0
  43. package/dist/fr-FR-fce1ca96.cjs.prod.js +6 -0
  44. package/dist/index-a4665b30.esm.js +1854 -0
  45. package/dist/index-bb7f975c.cjs.dev.js +1889 -0
  46. package/dist/index-d79bbd8e.cjs.prod.js +1883 -0
  47. package/dist/ja-37632763.cjs.prod.js +6 -0
  48. package/dist/ja-73c088a7.esm.js +4 -0
  49. package/dist/ja-9bd5f452.cjs.dev.js +6 -0
  50. package/dist/pt-BR-b37d730b.esm.js +4 -0
  51. package/dist/pt-BR-ea6b3251.cjs.dev.js +6 -0
  52. package/dist/pt-BR-ec2a1a11.cjs.prod.js +6 -0
  53. package/dist/zh-CN-4780d88e.esm.js +4 -0
  54. package/dist/zh-CN-52baa549.cjs.prod.js +6 -0
  55. package/dist/zh-CN-d4bc6d26.cjs.dev.js +6 -0
  56. package/package.json +88 -0
package/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) commercetools GmbH
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # @commercetools-frontend-extensions/import-resources-modal
2
+
3
+ Package for importing resources into Merchant Center Applications.
4
+
5
+ > This library takes into account that you are building a Merchant Center Applications which documentation you can find [here](https://docs.commercetools.com/custom-applications/).
6
+ > The components follow the same principles of the [UIKit](https://github.com/commercetools/ui-kit) components.
7
+
8
+ ## Getting started
9
+
10
+ ```bash
11
+ $ npm install --save @commercetools-frontend-extensions/import-resources-modal
12
+
13
+ // or
14
+
15
+ $ yarn add @commercetools-frontend-extensions/import-resources-modal
16
+ ```
17
+
18
+ ## Description
19
+
20
+ Import Resources Modal is an internal component used to import resources from csv files, it's using [Importer Services](https://github.com/commercetools/commercetools-importer) to create async import Job.
21
+
22
+ ## Usage
23
+
24
+ ```JSX
25
+ import ImportResourcesModal from '@commercetools-frontend-extensions/import-resources-modal';
26
+
27
+ <ImportResourcesModal
28
+ isOpen={true}
29
+ resourceType="category"
30
+ onStartImportSuccess={() => {}}
31
+ onClose={() => {}}
32
+ />
33
+ ```
34
+
35
+ ## Properties
36
+
37
+ | Props | Type | Required | Default | Description |
38
+ | -------------------------------------------- | ------------------------------------------------------- | :--------------------------------------------------: | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39
+ | `isOpen` | `boolean` | ✅ | | Controls whether the import modal is open or closed |
40
+ | `resourceType` | `string` | ✅ | | The type of the resource, example: `category`, `product`...
41
+ | `onStartImportSuccess` | `function` | | | A callback function invoked when the import process successfully starts |
42
+ | `onClose` | `function` | | | A callback function triggered when the modal is requested to close (either by clicking on the overlay, clicking the close button or pressing `ESC`). This function is also invoked after an import process, irrespective of whether it was successful or failed | |
43
+
44
+ ## Releasing
45
+
46
+ This package uses [`changesets`](https://github.com/atlassian/changesets) in order to do releases to NPM.
47
+
48
+ In case you want to publish a new version with the latest changes you need to:
49
+
50
+ 1. Add a changeset with `pnpm changeset` and select `@commercetools-frontend-extensions/import-resources-modal` as the modified package.
51
+ 2. Some options would be appear in order to do the release:
52
+ - `patch`: use this release for fixes or small changes
53
+ - `minor`: use this release for depenency upgrades or medium changes
54
+ - `major`: use this release for breaking changes
55
+ 3. After selecting the option you will need to add a comment for the release notes. We recommend to use the same format as for the commits.
56
+ - e.g: `feat(utils): add utils for dates`
57
+ 4. Push the `changeset` to your branch and GitHub actions will detect that the PR contains changes that affect the published library.
58
+ 5. After the PR gets merged, another PR will be created called `Version Packages` which is the one that will be detected, again by GitHub Actions, to do a release to NPM.
59
+ 6. Make sure that everything is correct and then merge `Version Packages` PR.
60
+ 7. Wait until the new version is available in NPM and then deploy the custom in CircleCI.
61
+
62
+ ### Canary releases
63
+
64
+ Canary releases are automatically published to the distribution channel via CI following a successful build and merge to the **main** branch.
65
+
66
+ ## i18n
67
+
68
+ The repo is configured with an integration with Transifex. The process for i18n is the same as the Merchant Center uses.
69
+
70
+ `pnpm i18n:build` for adding the new keys to transifex.
71
+
72
+ Once the PR gets merged to `main` transifex will receive a notification with new keys that need to be translated (that's why is important that `description` and `defaultMessage` are descriptive enough).
73
+
74
+ Whenever the translators finish translations and mark them as done, the repo will receive a PR (per language) for adding translated messages.
75
+
76
+ Once we review that translated keys are correct and add a `changeset` we can merge the PR. (Don't forget to deploy the custom app)
@@ -0,0 +1,60 @@
1
+ import { F as FileDropped, E as EnabledDropArea } from './index-a4665b30.esm.js';
2
+ import { jsx } from '@emotion/react/jsx-runtime';
3
+ import '@babel/runtime-corejs3/core-js-stable/object/keys';
4
+ import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
5
+ import '@babel/runtime-corejs3/core-js-stable/instance/filter';
6
+ import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
7
+ import '@babel/runtime-corejs3/core-js-stable/instance/for-each';
8
+ import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
9
+ import '@babel/runtime-corejs3/core-js-stable/object/define-properties';
10
+ import '@babel/runtime-corejs3/core-js-stable/object/define-property';
11
+ import '@babel/runtime-corejs3/helpers/defineProperty';
12
+ import 'react-intl';
13
+ import '@commercetools-frontend/application-shell-connectors';
14
+ import '@babel/runtime-corejs3/helpers/slicedToArray';
15
+ import 'react';
16
+ import '@commercetools-frontend/sdk';
17
+ import '@commercetools-frontend/constants';
18
+ import '@babel/runtime-corejs3/core-js-stable/instance/every';
19
+ import '@babel/runtime-corejs3/core-js-stable/instance/concat';
20
+ import 'pluralize';
21
+ import '@babel/runtime-corejs3/core-js-stable/promise';
22
+ import '@babel/runtime-corejs3/core-js-stable/array/is-array';
23
+ import '@babel/runtime-corejs3/core-js-stable/instance/flat-map';
24
+ import '@babel/runtime-corejs3/core-js-stable/instance/map';
25
+ import '@babel/runtime-corejs3/core-js-stable/instance/find';
26
+ import '@babel/runtime-corejs3/core-js-stable/instance/includes';
27
+ import 'papaparse';
28
+ import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
29
+ import '@babel/runtime-corejs3/core-js-stable/json/stringify';
30
+ import '@babel/runtime-corejs3/core-js-stable/instance/some';
31
+ import '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
32
+ import 'querystring';
33
+ import 'ramda';
34
+ import '@commercetools-frontend/application-shell';
35
+ import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
36
+ import '@babel/runtime-corejs3/helpers/createClass';
37
+ import '@babel/runtime-corejs3/helpers/classCallCheck';
38
+ import '@babel/runtime-corejs3/helpers/inherits';
39
+ import '@babel/runtime-corejs3/helpers/possibleConstructorReturn';
40
+ import '@babel/runtime-corejs3/helpers/getPrototypeOf';
41
+ import '@babel/runtime-corejs3/helpers/wrapNativeSuper';
42
+ import '@commercetools-frontend/application-components';
43
+ import '@commercetools-frontend/ui-kit';
44
+ import '@commercetools-frontend/actions-global';
45
+ import '@commercetools-frontend/sentry';
46
+ import 'react-dropzone';
47
+ import '@emotion/styled/base';
48
+ import '@emotion/react';
49
+ import '@babel/runtime-corejs3/core-js-stable/instance/slice';
50
+ import '@commercetools-uikit/data-table';
51
+ import 'lodash.truncate';
52
+ import '@commercetools-frontend/i18n';
53
+
54
+ function ActiveDragDropArea(_ref) {
55
+ let isFileDropped = _ref.isFileDropped;
56
+ if (isFileDropped) return jsx(FileDropped, {});
57
+ return jsx(EnabledDropArea, {});
58
+ }
59
+
60
+ export { ActiveDragDropArea as default };
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+
3
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-d79bbd8e.cjs.prod.js');
4
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
5
+ require('@babel/runtime-corejs3/core-js-stable/object/keys');
6
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
7
+ require('@babel/runtime-corejs3/core-js-stable/instance/filter');
8
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
9
+ require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
10
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
11
+ require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
12
+ require('@babel/runtime-corejs3/core-js-stable/object/define-property');
13
+ require('@babel/runtime-corejs3/helpers/defineProperty');
14
+ require('react-intl');
15
+ require('@commercetools-frontend/application-shell-connectors');
16
+ require('@babel/runtime-corejs3/helpers/slicedToArray');
17
+ require('react');
18
+ require('@commercetools-frontend/sdk');
19
+ require('@commercetools-frontend/constants');
20
+ require('@babel/runtime-corejs3/core-js-stable/instance/every');
21
+ require('@babel/runtime-corejs3/core-js-stable/instance/concat');
22
+ require('pluralize');
23
+ require('@babel/runtime-corejs3/core-js-stable/promise');
24
+ require('@babel/runtime-corejs3/core-js-stable/array/is-array');
25
+ require('@babel/runtime-corejs3/core-js-stable/instance/flat-map');
26
+ require('@babel/runtime-corejs3/core-js-stable/instance/map');
27
+ require('@babel/runtime-corejs3/core-js-stable/instance/find');
28
+ require('@babel/runtime-corejs3/core-js-stable/instance/includes');
29
+ require('papaparse');
30
+ require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
31
+ require('@babel/runtime-corejs3/core-js-stable/json/stringify');
32
+ require('@babel/runtime-corejs3/core-js-stable/instance/some');
33
+ require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
34
+ require('querystring');
35
+ require('ramda');
36
+ require('@commercetools-frontend/application-shell');
37
+ require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
38
+ require('@babel/runtime-corejs3/helpers/createClass');
39
+ require('@babel/runtime-corejs3/helpers/classCallCheck');
40
+ require('@babel/runtime-corejs3/helpers/inherits');
41
+ require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
42
+ require('@babel/runtime-corejs3/helpers/getPrototypeOf');
43
+ require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
44
+ require('@commercetools-frontend/application-components');
45
+ require('@commercetools-frontend/ui-kit');
46
+ require('@commercetools-frontend/actions-global');
47
+ require('@commercetools-frontend/sentry');
48
+ require('react-dropzone');
49
+ require('@emotion/styled/base');
50
+ require('@emotion/react');
51
+ require('@babel/runtime-corejs3/core-js-stable/instance/slice');
52
+ require('@commercetools-uikit/data-table');
53
+ require('lodash.truncate');
54
+ require('@commercetools-frontend/i18n');
55
+
56
+ function ActiveDragDropArea(_ref) {
57
+ let isFileDropped = _ref.isFileDropped;
58
+ if (isFileDropped) return jsxRuntime.jsx(dist_commercetoolsFrontendExtensionsImportResourcesModal.FileDropped, {});
59
+ return jsxRuntime.jsx(dist_commercetoolsFrontendExtensionsImportResourcesModal.EnabledDropArea, {});
60
+ }
61
+
62
+ exports["default"] = ActiveDragDropArea;
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+
3
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-bb7f975c.cjs.dev.js');
4
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
5
+ require('@babel/runtime-corejs3/core-js-stable/object/keys');
6
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
7
+ require('@babel/runtime-corejs3/core-js-stable/instance/filter');
8
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
9
+ require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
10
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
11
+ require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
12
+ require('@babel/runtime-corejs3/core-js-stable/object/define-property');
13
+ require('@babel/runtime-corejs3/helpers/defineProperty');
14
+ require('react-intl');
15
+ require('@commercetools-frontend/application-shell-connectors');
16
+ require('@babel/runtime-corejs3/helpers/slicedToArray');
17
+ require('react');
18
+ require('@commercetools-frontend/sdk');
19
+ require('@commercetools-frontend/constants');
20
+ require('@babel/runtime-corejs3/core-js-stable/instance/every');
21
+ require('@babel/runtime-corejs3/core-js-stable/instance/concat');
22
+ require('pluralize');
23
+ require('@babel/runtime-corejs3/core-js-stable/promise');
24
+ require('@babel/runtime-corejs3/core-js-stable/array/is-array');
25
+ require('@babel/runtime-corejs3/core-js-stable/instance/flat-map');
26
+ require('@babel/runtime-corejs3/core-js-stable/instance/map');
27
+ require('@babel/runtime-corejs3/core-js-stable/instance/find');
28
+ require('@babel/runtime-corejs3/core-js-stable/instance/includes');
29
+ require('papaparse');
30
+ require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
31
+ require('@babel/runtime-corejs3/core-js-stable/json/stringify');
32
+ require('@babel/runtime-corejs3/core-js-stable/instance/some');
33
+ require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
34
+ require('querystring');
35
+ require('ramda');
36
+ require('@commercetools-frontend/application-shell');
37
+ require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
38
+ require('@babel/runtime-corejs3/helpers/createClass');
39
+ require('@babel/runtime-corejs3/helpers/classCallCheck');
40
+ require('@babel/runtime-corejs3/helpers/inherits');
41
+ require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
42
+ require('@babel/runtime-corejs3/helpers/getPrototypeOf');
43
+ require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
44
+ require('@commercetools-frontend/application-components');
45
+ require('@commercetools-frontend/ui-kit');
46
+ require('@commercetools-frontend/actions-global');
47
+ require('@commercetools-frontend/sentry');
48
+ require('react-dropzone');
49
+ require('@emotion/styled/base');
50
+ require('@emotion/react');
51
+ require('@babel/runtime-corejs3/core-js-stable/instance/slice');
52
+ require('@commercetools-uikit/data-table');
53
+ require('lodash.truncate');
54
+ require('@commercetools-frontend/i18n');
55
+
56
+ function ActiveDragDropArea(_ref) {
57
+ let isFileDropped = _ref.isFileDropped;
58
+ if (isFileDropped) return jsxRuntime.jsx(dist_commercetoolsFrontendExtensionsImportResourcesModal.FileDropped, {});
59
+ return jsxRuntime.jsx(dist_commercetoolsFrontendExtensionsImportResourcesModal.EnabledDropArea, {});
60
+ }
61
+
62
+ exports["default"] = ActiveDragDropArea;
@@ -0,0 +1,3 @@
1
+ export * from "./declarations/src/index";
2
+ export { default } from "./declarations/src/index";
3
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1leHRlbnNpb25zLWltcG9ydC1yZXNvdXJjZXMtbW9kYWwuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-bb7f975c.cjs.dev.js');
6
+ require('@babel/runtime-corejs3/core-js-stable/object/keys');
7
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
8
+ require('@babel/runtime-corejs3/core-js-stable/instance/filter');
9
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
10
+ require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
11
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
12
+ require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
13
+ require('@babel/runtime-corejs3/core-js-stable/object/define-property');
14
+ require('@babel/runtime-corejs3/helpers/defineProperty');
15
+ require('react-intl');
16
+ require('@commercetools-frontend/application-shell-connectors');
17
+ require('@babel/runtime-corejs3/helpers/slicedToArray');
18
+ require('react');
19
+ require('@commercetools-frontend/sdk');
20
+ require('@commercetools-frontend/constants');
21
+ require('@babel/runtime-corejs3/core-js-stable/instance/every');
22
+ require('@babel/runtime-corejs3/core-js-stable/instance/concat');
23
+ require('pluralize');
24
+ require('@babel/runtime-corejs3/core-js-stable/promise');
25
+ require('@babel/runtime-corejs3/core-js-stable/array/is-array');
26
+ require('@babel/runtime-corejs3/core-js-stable/instance/flat-map');
27
+ require('@babel/runtime-corejs3/core-js-stable/instance/map');
28
+ require('@babel/runtime-corejs3/core-js-stable/instance/find');
29
+ require('@babel/runtime-corejs3/core-js-stable/instance/includes');
30
+ require('papaparse');
31
+ require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
32
+ require('@babel/runtime-corejs3/core-js-stable/json/stringify');
33
+ require('@babel/runtime-corejs3/core-js-stable/instance/some');
34
+ require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
35
+ require('querystring');
36
+ require('ramda');
37
+ require('@commercetools-frontend/application-shell');
38
+ require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
39
+ require('@babel/runtime-corejs3/helpers/createClass');
40
+ require('@babel/runtime-corejs3/helpers/classCallCheck');
41
+ require('@babel/runtime-corejs3/helpers/inherits');
42
+ require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
43
+ require('@babel/runtime-corejs3/helpers/getPrototypeOf');
44
+ require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
45
+ require('@emotion/react/jsx-runtime');
46
+ require('@commercetools-frontend/application-components');
47
+ require('@commercetools-frontend/ui-kit');
48
+ require('@commercetools-frontend/actions-global');
49
+ require('@commercetools-frontend/sentry');
50
+ require('react-dropzone');
51
+ require('@emotion/styled/base');
52
+ require('@emotion/react');
53
+ require('@babel/runtime-corejs3/core-js-stable/instance/slice');
54
+ require('@commercetools-uikit/data-table');
55
+ require('lodash.truncate');
56
+ require('@commercetools-frontend/i18n');
57
+
58
+
59
+
60
+ exports["default"] = dist_commercetoolsFrontendExtensionsImportResourcesModal.ImportResourcesModal;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./commercetools-frontend-extensions-import-resources-modal.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./commercetools-frontend-extensions-import-resources-modal.cjs.dev.js");
7
+ }
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-d79bbd8e.cjs.prod.js');
6
+ require('@babel/runtime-corejs3/core-js-stable/object/keys');
7
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
8
+ require('@babel/runtime-corejs3/core-js-stable/instance/filter');
9
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
10
+ require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
11
+ require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
12
+ require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
13
+ require('@babel/runtime-corejs3/core-js-stable/object/define-property');
14
+ require('@babel/runtime-corejs3/helpers/defineProperty');
15
+ require('react-intl');
16
+ require('@commercetools-frontend/application-shell-connectors');
17
+ require('@babel/runtime-corejs3/helpers/slicedToArray');
18
+ require('react');
19
+ require('@commercetools-frontend/sdk');
20
+ require('@commercetools-frontend/constants');
21
+ require('@babel/runtime-corejs3/core-js-stable/instance/every');
22
+ require('@babel/runtime-corejs3/core-js-stable/instance/concat');
23
+ require('pluralize');
24
+ require('@babel/runtime-corejs3/core-js-stable/promise');
25
+ require('@babel/runtime-corejs3/core-js-stable/array/is-array');
26
+ require('@babel/runtime-corejs3/core-js-stable/instance/flat-map');
27
+ require('@babel/runtime-corejs3/core-js-stable/instance/map');
28
+ require('@babel/runtime-corejs3/core-js-stable/instance/find');
29
+ require('@babel/runtime-corejs3/core-js-stable/instance/includes');
30
+ require('papaparse');
31
+ require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
32
+ require('@babel/runtime-corejs3/core-js-stable/json/stringify');
33
+ require('@babel/runtime-corejs3/core-js-stable/instance/some');
34
+ require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
35
+ require('querystring');
36
+ require('ramda');
37
+ require('@commercetools-frontend/application-shell');
38
+ require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
39
+ require('@babel/runtime-corejs3/helpers/createClass');
40
+ require('@babel/runtime-corejs3/helpers/classCallCheck');
41
+ require('@babel/runtime-corejs3/helpers/inherits');
42
+ require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
43
+ require('@babel/runtime-corejs3/helpers/getPrototypeOf');
44
+ require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
45
+ require('@emotion/react/jsx-runtime');
46
+ require('@commercetools-frontend/application-components');
47
+ require('@commercetools-frontend/ui-kit');
48
+ require('@commercetools-frontend/actions-global');
49
+ require('@commercetools-frontend/sentry');
50
+ require('react-dropzone');
51
+ require('@emotion/styled/base');
52
+ require('@emotion/react');
53
+ require('@babel/runtime-corejs3/core-js-stable/instance/slice');
54
+ require('@commercetools-uikit/data-table');
55
+ require('lodash.truncate');
56
+ require('@commercetools-frontend/i18n');
57
+
58
+
59
+
60
+ exports["default"] = dist_commercetoolsFrontendExtensionsImportResourcesModal.ImportResourcesModal;
@@ -0,0 +1,52 @@
1
+ export { I as default } from './index-a4665b30.esm.js';
2
+ import '@babel/runtime-corejs3/core-js-stable/object/keys';
3
+ import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
4
+ import '@babel/runtime-corejs3/core-js-stable/instance/filter';
5
+ import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
6
+ import '@babel/runtime-corejs3/core-js-stable/instance/for-each';
7
+ import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
8
+ import '@babel/runtime-corejs3/core-js-stable/object/define-properties';
9
+ import '@babel/runtime-corejs3/core-js-stable/object/define-property';
10
+ import '@babel/runtime-corejs3/helpers/defineProperty';
11
+ import 'react-intl';
12
+ import '@commercetools-frontend/application-shell-connectors';
13
+ import '@babel/runtime-corejs3/helpers/slicedToArray';
14
+ import 'react';
15
+ import '@commercetools-frontend/sdk';
16
+ import '@commercetools-frontend/constants';
17
+ import '@babel/runtime-corejs3/core-js-stable/instance/every';
18
+ import '@babel/runtime-corejs3/core-js-stable/instance/concat';
19
+ import 'pluralize';
20
+ import '@babel/runtime-corejs3/core-js-stable/promise';
21
+ import '@babel/runtime-corejs3/core-js-stable/array/is-array';
22
+ import '@babel/runtime-corejs3/core-js-stable/instance/flat-map';
23
+ import '@babel/runtime-corejs3/core-js-stable/instance/map';
24
+ import '@babel/runtime-corejs3/core-js-stable/instance/find';
25
+ import '@babel/runtime-corejs3/core-js-stable/instance/includes';
26
+ import 'papaparse';
27
+ import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
28
+ import '@babel/runtime-corejs3/core-js-stable/json/stringify';
29
+ import '@babel/runtime-corejs3/core-js-stable/instance/some';
30
+ import '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
31
+ import 'querystring';
32
+ import 'ramda';
33
+ import '@commercetools-frontend/application-shell';
34
+ import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
35
+ import '@babel/runtime-corejs3/helpers/createClass';
36
+ import '@babel/runtime-corejs3/helpers/classCallCheck';
37
+ import '@babel/runtime-corejs3/helpers/inherits';
38
+ import '@babel/runtime-corejs3/helpers/possibleConstructorReturn';
39
+ import '@babel/runtime-corejs3/helpers/getPrototypeOf';
40
+ import '@babel/runtime-corejs3/helpers/wrapNativeSuper';
41
+ import '@emotion/react/jsx-runtime';
42
+ import '@commercetools-frontend/application-components';
43
+ import '@commercetools-frontend/ui-kit';
44
+ import '@commercetools-frontend/actions-global';
45
+ import '@commercetools-frontend/sentry';
46
+ import 'react-dropzone';
47
+ import '@emotion/styled/base';
48
+ import '@emotion/react';
49
+ import '@babel/runtime-corejs3/core-js-stable/instance/slice';
50
+ import '@commercetools-uikit/data-table';
51
+ import 'lodash.truncate';
52
+ import '@commercetools-frontend/i18n';
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var de = {
4
+ };
5
+
6
+ exports["default"] = de;
@@ -0,0 +1,4 @@
1
+ var de = {
2
+ };
3
+
4
+ export { de as default };
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var de = {
4
+ };
5
+
6
+ exports["default"] = de;
@@ -0,0 +1,13 @@
1
+ type METHOD = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
2
+ export type ApiConfig = {
3
+ headers?: Record<string, string | null>;
4
+ method?: METHOD;
5
+ proxy?: string;
6
+ abortSignal?: AbortSignal;
7
+ };
8
+ export type Fetcher = {
9
+ url: string;
10
+ payload?: BodyInit;
11
+ config?: ApiConfig;
12
+ };
13
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface BasicErrorDataType {
2
+ message: string;
3
+ code: string;
4
+ [key: string]: unknown;
5
+ }
@@ -0,0 +1,52 @@
1
+ import type { TSdkAction } from '@commercetools-frontend/sdk';
2
+ import { ResourceType } from "./resource-type.js";
3
+ export type DelimiterCheck = {
4
+ isValid: boolean;
5
+ delimiter: string | null;
6
+ };
7
+ export type FileUploadClientSideError = {
8
+ title: string;
9
+ description: string;
10
+ };
11
+ export type UploadFileErrorRow = {
12
+ id: string;
13
+ row?: number;
14
+ code: string;
15
+ field: string;
16
+ validationMessage: string;
17
+ };
18
+ export type RowError = {
19
+ code: string;
20
+ message: string;
21
+ field: string;
22
+ };
23
+ export type RowErrorsResponse = {
24
+ row?: number;
25
+ errors: Array<RowError>;
26
+ };
27
+ export type FileUploadResponse = {
28
+ results: Array<RowErrorsResponse>;
29
+ invalid: number;
30
+ valid: number;
31
+ fileName: string;
32
+ rowsCount: number;
33
+ columnsCount: number;
34
+ columns: Array<string>;
35
+ ignoredColumns: Array<string>;
36
+ };
37
+ export interface FileUploadRequestParameters {
38
+ projectKey: string;
39
+ containerKey: string;
40
+ resourceType: ResourceType;
41
+ file: File;
42
+ abortSignal?: AbortSignal;
43
+ }
44
+ export interface ProcessUploadedFileRequestParameters {
45
+ projectKey: string;
46
+ containerKey: string;
47
+ resourceType: ResourceType;
48
+ asyncDispatch: (action: TSdkAction) => Promise<unknown>;
49
+ }
50
+ export type ProcessFileResponse = {
51
+ message: string;
52
+ };
@@ -0,0 +1,20 @@
1
+ import type { ImportContainerPagedResponse, ImportContainer, ImportContainerDraft, ImportSummary } from '@commercetools/importapi-sdk';
2
+ export declare function assertImportContainerPagedResponse(maybeImportContainerPagedResponse: unknown): asserts maybeImportContainerPagedResponse is ImportContainerPagedResponse;
3
+ export declare function assertImportSummary(maybeImportSummary: unknown): asserts maybeImportSummary is ImportSummary;
4
+ export declare function assertImportContainer(maybeImportContainerResponse: unknown): asserts maybeImportContainerResponse is ImportContainer;
5
+ export type CancelContainerResponse = {
6
+ message: string;
7
+ };
8
+ export declare function assertCancelContainerResponse(maybeCancelContainerResponse: unknown): asserts maybeCancelContainerResponse is CancelContainerResponse;
9
+ export type ImportContainerQueryParams = {
10
+ limit?: number;
11
+ offset?: number;
12
+ sort?: string;
13
+ tags?: string;
14
+ };
15
+ export interface ExtendedImportContainer extends ImportContainer {
16
+ tags?: string[];
17
+ }
18
+ export interface ExtendedImportContainerDraft extends ImportContainerDraft {
19
+ tags?: string[];
20
+ }
@@ -0,0 +1,7 @@
1
+ import type { ResourceType } from "./resource-type.js";
2
+ export interface ImportResourcesModalProps {
3
+ resourceType: ResourceType;
4
+ isOpen: boolean;
5
+ onClose?: () => void;
6
+ onStartImportSuccess?: () => void;
7
+ }
@@ -0,0 +1,9 @@
1
+ export declare enum ImportStates {
2
+ Processing = "processing",
3
+ WaitForUnresolvedReferences = "wait-for-unresolved-references",
4
+ PartiallyCompleted = "partially-completed",
5
+ Failed = "failed",
6
+ SuccessfullyCompleted = "successfully-completed",
7
+ NoRunningImports = "no-running-imports",
8
+ Canceled = "canceled"
9
+ }
@@ -0,0 +1,8 @@
1
+ import type { OperationStates, ImportSummary } from '@commercetools/importapi-sdk';
2
+ interface ExtendedOperationStates extends OperationStates {
3
+ readonly canceled: number;
4
+ }
5
+ export interface ExtendedImportSummary extends ImportSummary {
6
+ readonly states: ExtendedOperationStates;
7
+ }
8
+ export { type ExtendedImportSummary as ImportSummary };
@@ -0,0 +1,9 @@
1
+ export * from "./api.js";
2
+ export * from "./shared.js";
3
+ export * from "./file-upload.js";
4
+ export * from "./resource-type.js";
5
+ export * from "./import-resources-modal-props.js";
6
+ export * from "./basic-error-data-type.js";
7
+ export * from "./import-container.js";
8
+ export * from "./import-summary.js";
9
+ export * from "./import-states.js";