@commercetools-frontend-extensions/import-resources-modal 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{active-drag-drop-area-cef224e3.cjs.dev.js → active-drag-drop-area-41fee9e7.cjs.dev.js} +1 -1
- package/dist/{active-drag-drop-area-14547b3b.esm.js → active-drag-drop-area-ba4a3de3.esm.js} +1 -1
- package/dist/{active-drag-drop-area-8c1a33ba.cjs.prod.js → active-drag-drop-area-f971a15f.cjs.prod.js} +1 -1
- package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-extensions-import-resources-modal.esm.js +1 -1
- package/dist/declarations/src/@types/current-step.d.ts +6 -0
- package/dist/declarations/src/@types/index.d.ts +1 -0
- package/dist/{enabled-drop-area-77804d07.esm.js → enabled-drop-area-8f86bce2.esm.js} +1 -1
- package/dist/{enabled-drop-area-7e676557.cjs.dev.js → enabled-drop-area-c92a8c96.cjs.dev.js} +1 -1
- package/dist/{enabled-drop-area-f5edef91.cjs.prod.js → enabled-drop-area-f0ec971a.cjs.prod.js} +1 -1
- package/dist/{file-dropped-area-0f2194fc.cjs.prod.js → file-dropped-area-369406e5.cjs.prod.js} +1 -1
- package/dist/{file-dropped-area-f4f37cd4.cjs.dev.js → file-dropped-area-3a4c29f4.cjs.dev.js} +1 -1
- package/dist/{file-dropped-area-01985830.esm.js → file-dropped-area-6b9d6fed.esm.js} +1 -1
- package/dist/{index-d687055a.cjs.prod.js → index-27e1b5f7.cjs.prod.js} +63 -50
- package/dist/{index-f96d232d.esm.js → index-417ba1cb.esm.js} +64 -51
- package/dist/{index-53c3ff29.cjs.dev.js → index-98a32d1e.cjs.dev.js} +63 -50
- package/package.json +1 -1
package/dist/{active-drag-drop-area-cef224e3.cjs.dev.js → active-drag-drop-area-41fee9e7.cjs.dev.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-
|
|
3
|
+
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-98a32d1e.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');
|
package/dist/{active-drag-drop-area-14547b3b.esm.js → active-drag-drop-area-ba4a3de3.esm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FileDropped, E as EnabledDropArea } from './index-
|
|
1
|
+
import { F as FileDropped, E as EnabledDropArea } from './index-417ba1cb.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-
|
|
3
|
+
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-27e1b5f7.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-
|
|
5
|
+
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-98a32d1e.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-
|
|
5
|
+
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-27e1b5f7.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, a as useImportPermission } from './index-
|
|
1
|
+
export { I as default, a as useImportPermission } from './index-417ba1cb.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';
|
|
@@ -9,7 +9,7 @@ import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object
|
|
|
9
9
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
10
10
|
import 'react';
|
|
11
11
|
import { Spacings, Text, Link } from '@commercetools-frontend/ui-kit';
|
|
12
|
-
import { m as messages } from './index-
|
|
12
|
+
import { m as messages } from './index-417ba1cb.esm.js';
|
|
13
13
|
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
14
14
|
import '@babel/runtime-corejs3/core-js-stable/instance/every';
|
|
15
15
|
import 'react-intl';
|
package/dist/{enabled-drop-area-7e676557.cjs.dev.js → enabled-drop-area-c92a8c96.cjs.dev.js}
RENAMED
|
@@ -11,7 +11,7 @@ var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/obje
|
|
|
11
11
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
12
12
|
require('react');
|
|
13
13
|
var uiKit = require('@commercetools-frontend/ui-kit');
|
|
14
|
-
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-
|
|
14
|
+
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-98a32d1e.cjs.dev.js');
|
|
15
15
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
16
16
|
require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
17
17
|
require('react-intl');
|
package/dist/{enabled-drop-area-f5edef91.cjs.prod.js → enabled-drop-area-f0ec971a.cjs.prod.js}
RENAMED
|
@@ -11,7 +11,7 @@ var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/obje
|
|
|
11
11
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
12
12
|
require('react');
|
|
13
13
|
var uiKit = require('@commercetools-frontend/ui-kit');
|
|
14
|
-
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-
|
|
14
|
+
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-27e1b5f7.cjs.prod.js');
|
|
15
15
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
16
16
|
require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
17
17
|
require('react-intl');
|
package/dist/{file-dropped-area-0f2194fc.cjs.prod.js → file-dropped-area-369406e5.cjs.prod.js}
RENAMED
|
@@ -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-
|
|
5
|
+
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-27e1b5f7.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');
|
package/dist/{file-dropped-area-f4f37cd4.cjs.dev.js → file-dropped-area-3a4c29f4.cjs.dev.js}
RENAMED
|
@@ -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-
|
|
5
|
+
var dist_commercetoolsFrontendExtensionsImportResourcesModal = require('./index-98a32d1e.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-
|
|
3
|
+
import { u as useImportResourcesContext, m as messages } from './index-417ba1cb.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';
|
|
@@ -79,8 +79,46 @@ var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceP
|
|
|
79
79
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
80
80
|
var DataTable__default = /*#__PURE__*/_interopDefault(DataTable);
|
|
81
81
|
|
|
82
|
+
const EnabledResourceType = {
|
|
83
|
+
category: true,
|
|
84
|
+
product: true,
|
|
85
|
+
inventory: true,
|
|
86
|
+
'discount-code': true,
|
|
87
|
+
customer: false,
|
|
88
|
+
order: false,
|
|
89
|
+
'product-type': false
|
|
90
|
+
};
|
|
91
|
+
function isResourceType(maybeResourceType) {
|
|
92
|
+
return typeof maybeResourceType === 'string' && maybeResourceType in EnabledResourceType;
|
|
93
|
+
}
|
|
94
|
+
function assertResourceType(maybeResourceType) {
|
|
95
|
+
if (isResourceType(maybeResourceType)) return;
|
|
96
|
+
throw new Error(`Invalid value: ${maybeResourceType}`);
|
|
97
|
+
}
|
|
98
|
+
function isError(maybeError) {
|
|
99
|
+
if (maybeError instanceof Error) return true;
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
104
|
+
function hasOwnProperty(obj, prop) {
|
|
105
|
+
return typeof obj === 'object' && obj !== null && obj.hasOwnProperty(prop);
|
|
106
|
+
}
|
|
107
|
+
function hasRequiredFields(maybeValidObject, requiredFields) {
|
|
108
|
+
return typeof maybeValidObject === 'object' && maybeValidObject !== null && _everyInstanceProperty__default["default"](requiredFields).call(requiredFields, property => hasOwnProperty(maybeValidObject, property));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
let CurrentStep$1 = /*#__PURE__*/function (CurrentStep) {
|
|
112
|
+
CurrentStep["Upload"] = "upload";
|
|
113
|
+
CurrentStep["Uploading"] = "uploading";
|
|
114
|
+
CurrentStep["UploadResult"] = "upload-result";
|
|
115
|
+
CurrentStep["ImportConfirmationModal"] = "import-confirmation-modal";
|
|
116
|
+
return CurrentStep;
|
|
117
|
+
}({});
|
|
118
|
+
|
|
82
119
|
function ownKeys$i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
83
120
|
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
121
|
+
|
|
84
122
|
// TODO: make this resource type specific
|
|
85
123
|
|
|
86
124
|
function reducer(state, action) {
|
|
@@ -99,7 +137,7 @@ function reducer(state, action) {
|
|
|
99
137
|
containerKey: action.containerKey
|
|
100
138
|
});
|
|
101
139
|
if (action.type === 'cancelImport') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
102
|
-
currentStep: 1,
|
|
140
|
+
currentStep: CurrentStep$1.Upload,
|
|
103
141
|
containerKey: undefined,
|
|
104
142
|
fileUploadErrors: [],
|
|
105
143
|
uploadFileResponse: undefined,
|
|
@@ -108,7 +146,7 @@ function reducer(state, action) {
|
|
|
108
146
|
progress: 0
|
|
109
147
|
});
|
|
110
148
|
if (action.type === 'uploadNewFile') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
111
|
-
currentStep: 1,
|
|
149
|
+
currentStep: CurrentStep$1.Upload,
|
|
112
150
|
containerKey: undefined,
|
|
113
151
|
fileUploadErrors: [],
|
|
114
152
|
uploadFileResponse: undefined,
|
|
@@ -147,7 +185,7 @@ function getUnknownActionError(actionType) {
|
|
|
147
185
|
return `Unkown type: ${actionType}`;
|
|
148
186
|
}
|
|
149
187
|
const initialState = {
|
|
150
|
-
currentStep: 1,
|
|
188
|
+
currentStep: CurrentStep$1.Upload,
|
|
151
189
|
abortController: new AbortController(),
|
|
152
190
|
dropAreaState: 'disabled',
|
|
153
191
|
uploadFileResponse: undefined,
|
|
@@ -346,7 +384,10 @@ const ACTION_RIGHTS = {
|
|
|
346
384
|
|
|
347
385
|
function ownKeys$g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
348
386
|
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
349
|
-
const
|
|
387
|
+
const PUBLISH_PRODUCTS = 'publishProducts';
|
|
388
|
+
const DEFAULT_SHORT_LIVED_FLAGS = {
|
|
389
|
+
[PUBLISH_PRODUCTS]: false
|
|
390
|
+
};
|
|
350
391
|
const DEFAULT_LONG_LIVED_FLAGS = {};
|
|
351
392
|
_objectSpread$g(_objectSpread$g({}, DEFAULT_SHORT_LIVED_FLAGS), DEFAULT_LONG_LIVED_FLAGS);
|
|
352
393
|
|
|
@@ -493,35 +534,6 @@ function getProccessFileURL(projectKey, resourceType, containerKey) {
|
|
|
493
534
|
return `/${projectKey}/${pluralize.plural(resourceType)}/import-containers/${containerKey}/process-file`;
|
|
494
535
|
}
|
|
495
536
|
|
|
496
|
-
const EnabledResourceType = {
|
|
497
|
-
category: true,
|
|
498
|
-
product: true,
|
|
499
|
-
inventory: true,
|
|
500
|
-
'discount-code': true,
|
|
501
|
-
customer: false,
|
|
502
|
-
order: false,
|
|
503
|
-
'product-type': false
|
|
504
|
-
};
|
|
505
|
-
function isResourceType(maybeResourceType) {
|
|
506
|
-
return typeof maybeResourceType === 'string' && maybeResourceType in EnabledResourceType;
|
|
507
|
-
}
|
|
508
|
-
function assertResourceType(maybeResourceType) {
|
|
509
|
-
if (isResourceType(maybeResourceType)) return;
|
|
510
|
-
throw new Error(`Invalid value: ${maybeResourceType}`);
|
|
511
|
-
}
|
|
512
|
-
function isError(maybeError) {
|
|
513
|
-
if (maybeError instanceof Error) return true;
|
|
514
|
-
return false;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
518
|
-
function hasOwnProperty(obj, prop) {
|
|
519
|
-
return typeof obj === 'object' && obj !== null && obj.hasOwnProperty(prop);
|
|
520
|
-
}
|
|
521
|
-
function hasRequiredFields(maybeValidObject, requiredFields) {
|
|
522
|
-
return typeof maybeValidObject === 'object' && maybeValidObject !== null && _everyInstanceProperty__default["default"](requiredFields).call(requiredFields, property => hasOwnProperty(maybeValidObject, property));
|
|
523
|
-
}
|
|
524
|
-
|
|
525
537
|
function uploadFileForImport(_ref) {
|
|
526
538
|
let projectKey = _ref.projectKey,
|
|
527
539
|
containerKey = _ref.containerKey,
|
|
@@ -742,13 +754,13 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
|
|
|
742
754
|
return /*#__PURE__*/react.css("" , "" );
|
|
743
755
|
}
|
|
744
756
|
|
|
745
|
-
var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-
|
|
757
|
+
var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-f971a15f.cjs.prod.js' /* webpackChunkName: "active-drag-drop-area" */); }));
|
|
746
758
|
|
|
747
759
|
var DisabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./disabled-drop-area-99c1fa0b.cjs.prod.js' /* webpackChunkName: "disabled-drop-area" */); }));
|
|
748
760
|
|
|
749
|
-
var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-
|
|
761
|
+
var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-f0ec971a.cjs.prod.js' /* webpackChunkName: "enabled-drop-area" */); }));
|
|
750
762
|
|
|
751
|
-
var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-
|
|
763
|
+
var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-369406e5.cjs.prod.js' /* webpackChunkName: "filed-dropped-area" */); }));
|
|
752
764
|
|
|
753
765
|
function getDropArea(_ref) {
|
|
754
766
|
let dropAreaState = _ref.dropAreaState,
|
|
@@ -952,7 +964,7 @@ const useUpload = () => {
|
|
|
952
964
|
});
|
|
953
965
|
if (errors.length > 0) {
|
|
954
966
|
actions.setFileUploadErrors(errors);
|
|
955
|
-
actions.setCurrentStep(
|
|
967
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
956
968
|
return false;
|
|
957
969
|
}
|
|
958
970
|
return true;
|
|
@@ -968,7 +980,7 @@ const useUpload = () => {
|
|
|
968
980
|
title: intl.formatMessage(messages$6.missingRequiredField),
|
|
969
981
|
description: intl.formatMessage(messages$6.missingKeyError)
|
|
970
982
|
}]);
|
|
971
|
-
actions.setCurrentStep(
|
|
983
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
972
984
|
} else if (error.errorData?.code === 'MissingCsvFieldIdentifier') {
|
|
973
985
|
const MissingCsvFieldIdentifierError = error.errorData;
|
|
974
986
|
const fieldNames = formatKeys(MissingCsvFieldIdentifierError.rowValue);
|
|
@@ -978,10 +990,10 @@ const useUpload = () => {
|
|
|
978
990
|
fieldNames
|
|
979
991
|
})
|
|
980
992
|
}]);
|
|
981
|
-
actions.setCurrentStep(
|
|
993
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
982
994
|
} else if (error.errorData?.invalid > 0) {
|
|
983
995
|
actions.setUploadFileResponse(error.errorData);
|
|
984
|
-
actions.setCurrentStep(
|
|
996
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
985
997
|
} else {
|
|
986
998
|
actions.cancelImport();
|
|
987
999
|
showNotification({
|
|
@@ -1012,7 +1024,7 @@ const useUpload = () => {
|
|
|
1012
1024
|
if (!projectKey || !state.droppedFile || !state.resourceType) return;
|
|
1013
1025
|
const canUpload = await isFileValid(state.droppedFile);
|
|
1014
1026
|
if (!canUpload) return;
|
|
1015
|
-
actions.setCurrentStep(
|
|
1027
|
+
actions.setCurrentStep(CurrentStep$1.Uploading);
|
|
1016
1028
|
const containerKey = encodeFileNameWithTimestampToContainerKey(state.droppedFile.name);
|
|
1017
1029
|
actions.setContainerKey(containerKey);
|
|
1018
1030
|
try {
|
|
@@ -1038,7 +1050,7 @@ const useUpload = () => {
|
|
|
1038
1050
|
file: state.droppedFile,
|
|
1039
1051
|
onSuccess: fileUploadResponse => {
|
|
1040
1052
|
actions.setUploadFileResponse(fileUploadResponse);
|
|
1041
|
-
actions.setCurrentStep(
|
|
1053
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1042
1054
|
},
|
|
1043
1055
|
onProgress: progress => {
|
|
1044
1056
|
actions.setProgress(progress);
|
|
@@ -1052,7 +1064,7 @@ const useUpload = () => {
|
|
|
1052
1064
|
} catch (error) {
|
|
1053
1065
|
deleteImportContainer(projectKey, containerKey, asyncDispatch);
|
|
1054
1066
|
handleUploadError(error);
|
|
1055
|
-
actions.setCurrentStep(
|
|
1067
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1056
1068
|
}
|
|
1057
1069
|
};
|
|
1058
1070
|
return {
|
|
@@ -1191,13 +1203,14 @@ const UploadProductSettings = () => {
|
|
|
1191
1203
|
});
|
|
1192
1204
|
};
|
|
1193
1205
|
const UploadSettings = () => {
|
|
1206
|
+
const isPublishProductsEnabled = applicationShell.useFeatureToggle(PUBLISH_PRODUCTS);
|
|
1194
1207
|
const _useImportResourcesCo2 = useImportResourcesContext(),
|
|
1195
1208
|
state = _useImportResourcesCo2.state;
|
|
1196
1209
|
const canPublishProducts = permissions.useIsAuthorized({
|
|
1197
1210
|
demandedPermissions: [PERMISSIONS.ManageProducts],
|
|
1198
1211
|
demandedActionRights: [ACTION_RIGHTS.PublishProducts]
|
|
1199
1212
|
});
|
|
1200
|
-
if (state.resourceType === 'product' && canPublishProducts) return jsxRuntime.jsx(UploadProductSettings, {});
|
|
1213
|
+
if (state.resourceType === 'product' && canPublishProducts && isPublishProductsEnabled) return jsxRuntime.jsx(UploadProductSettings, {});
|
|
1201
1214
|
return null;
|
|
1202
1215
|
};
|
|
1203
1216
|
|
|
@@ -1704,7 +1717,7 @@ function UploadPreviewModal() {
|
|
|
1704
1717
|
shouldDeleteImportContainer: true
|
|
1705
1718
|
}),
|
|
1706
1719
|
onPrimaryButtonClick: () => {
|
|
1707
|
-
actions.setCurrentStep(
|
|
1720
|
+
actions.setCurrentStep(CurrentStep$1.ImportConfirmationModal);
|
|
1708
1721
|
},
|
|
1709
1722
|
onClose: () => onClose({
|
|
1710
1723
|
shouldDeleteImportContainer: true
|
|
@@ -2013,7 +2026,7 @@ const Uploading = () => {
|
|
|
2013
2026
|
size: "medium",
|
|
2014
2027
|
label: intl.formatMessage(sharedMessages.cancel),
|
|
2015
2028
|
onClick: () => {
|
|
2016
|
-
actions.setCurrentStep(1);
|
|
2029
|
+
actions.setCurrentStep(CurrentStep$1.Upload);
|
|
2017
2030
|
state.abortController.abort();
|
|
2018
2031
|
}
|
|
2019
2032
|
})]
|
|
@@ -2031,10 +2044,10 @@ const CurrentStep = () => {
|
|
|
2031
2044
|
const _useImportResourcesCo = useImportResourcesContext(),
|
|
2032
2045
|
state = _useImportResourcesCo.state;
|
|
2033
2046
|
const steps = {
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2047
|
+
upload: jsxRuntime.jsx(Upload, {}),
|
|
2048
|
+
uploading: jsxRuntime.jsx(Uploading, {}),
|
|
2049
|
+
'upload-result': jsxRuntime.jsx(UploadResult, {}),
|
|
2050
|
+
'import-confirmation-modal': jsxRuntime.jsx(ImportConfirmationModal, {})
|
|
2038
2051
|
};
|
|
2039
2052
|
return steps[state.currentStep] || null;
|
|
2040
2053
|
};
|
|
@@ -14,7 +14,7 @@ import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
|
14
14
|
import React, { lazy, useContext, useMemo, useState, useEffect } from 'react';
|
|
15
15
|
import { actions, useAsyncDispatch } from '@commercetools-frontend/sdk';
|
|
16
16
|
import { MC_API_PROXY_TARGETS, DOMAINS } from '@commercetools-frontend/constants';
|
|
17
|
-
import { createHttpClientOptions, buildApiUrl } from '@commercetools-frontend/application-shell';
|
|
17
|
+
import { createHttpClientOptions, buildApiUrl, useFeatureToggle } from '@commercetools-frontend/application-shell';
|
|
18
18
|
import _Reflect$construct from '@babel/runtime-corejs3/core-js-stable/reflect/construct';
|
|
19
19
|
import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
|
|
20
20
|
import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
|
|
@@ -50,8 +50,46 @@ import { useIsAuthorized } from '@commercetools-frontend/permissions';
|
|
|
50
50
|
import DataTable from '@commercetools-uikit/data-table';
|
|
51
51
|
import { parseChunkImport, mapLocaleToIntlLocale } from '@commercetools-frontend/i18n';
|
|
52
52
|
|
|
53
|
+
const EnabledResourceType = {
|
|
54
|
+
category: true,
|
|
55
|
+
product: true,
|
|
56
|
+
inventory: true,
|
|
57
|
+
'discount-code': true,
|
|
58
|
+
customer: false,
|
|
59
|
+
order: false,
|
|
60
|
+
'product-type': false
|
|
61
|
+
};
|
|
62
|
+
function isResourceType(maybeResourceType) {
|
|
63
|
+
return typeof maybeResourceType === 'string' && maybeResourceType in EnabledResourceType;
|
|
64
|
+
}
|
|
65
|
+
function assertResourceType(maybeResourceType) {
|
|
66
|
+
if (isResourceType(maybeResourceType)) return;
|
|
67
|
+
throw new Error(`Invalid value: ${maybeResourceType}`);
|
|
68
|
+
}
|
|
69
|
+
function isError(maybeError) {
|
|
70
|
+
if (maybeError instanceof Error) return true;
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
75
|
+
function hasOwnProperty(obj, prop) {
|
|
76
|
+
return typeof obj === 'object' && obj !== null && obj.hasOwnProperty(prop);
|
|
77
|
+
}
|
|
78
|
+
function hasRequiredFields(maybeValidObject, requiredFields) {
|
|
79
|
+
return typeof maybeValidObject === 'object' && maybeValidObject !== null && _everyInstanceProperty(requiredFields).call(requiredFields, property => hasOwnProperty(maybeValidObject, property));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
let CurrentStep$1 = /*#__PURE__*/function (CurrentStep) {
|
|
83
|
+
CurrentStep["Upload"] = "upload";
|
|
84
|
+
CurrentStep["Uploading"] = "uploading";
|
|
85
|
+
CurrentStep["UploadResult"] = "upload-result";
|
|
86
|
+
CurrentStep["ImportConfirmationModal"] = "import-confirmation-modal";
|
|
87
|
+
return CurrentStep;
|
|
88
|
+
}({});
|
|
89
|
+
|
|
53
90
|
function ownKeys$i(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
54
91
|
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
92
|
+
|
|
55
93
|
// TODO: make this resource type specific
|
|
56
94
|
|
|
57
95
|
function reducer(state, action) {
|
|
@@ -70,7 +108,7 @@ function reducer(state, action) {
|
|
|
70
108
|
containerKey: action.containerKey
|
|
71
109
|
});
|
|
72
110
|
if (action.type === 'cancelImport') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
73
|
-
currentStep: 1,
|
|
111
|
+
currentStep: CurrentStep$1.Upload,
|
|
74
112
|
containerKey: undefined,
|
|
75
113
|
fileUploadErrors: [],
|
|
76
114
|
uploadFileResponse: undefined,
|
|
@@ -79,7 +117,7 @@ function reducer(state, action) {
|
|
|
79
117
|
progress: 0
|
|
80
118
|
});
|
|
81
119
|
if (action.type === 'uploadNewFile') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
82
|
-
currentStep: 1,
|
|
120
|
+
currentStep: CurrentStep$1.Upload,
|
|
83
121
|
containerKey: undefined,
|
|
84
122
|
fileUploadErrors: [],
|
|
85
123
|
uploadFileResponse: undefined,
|
|
@@ -118,7 +156,7 @@ function getUnknownActionError(actionType) {
|
|
|
118
156
|
return `Unkown type: ${actionType}`;
|
|
119
157
|
}
|
|
120
158
|
const initialState = {
|
|
121
|
-
currentStep: 1,
|
|
159
|
+
currentStep: CurrentStep$1.Upload,
|
|
122
160
|
abortController: new AbortController(),
|
|
123
161
|
dropAreaState: 'disabled',
|
|
124
162
|
uploadFileResponse: undefined,
|
|
@@ -317,7 +355,10 @@ const ACTION_RIGHTS = {
|
|
|
317
355
|
|
|
318
356
|
function ownKeys$g(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
319
357
|
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
320
|
-
const
|
|
358
|
+
const PUBLISH_PRODUCTS = 'publishProducts';
|
|
359
|
+
const DEFAULT_SHORT_LIVED_FLAGS = {
|
|
360
|
+
[PUBLISH_PRODUCTS]: false
|
|
361
|
+
};
|
|
321
362
|
const DEFAULT_LONG_LIVED_FLAGS = {};
|
|
322
363
|
_objectSpread$g(_objectSpread$g({}, DEFAULT_SHORT_LIVED_FLAGS), DEFAULT_LONG_LIVED_FLAGS);
|
|
323
364
|
|
|
@@ -464,35 +505,6 @@ function getProccessFileURL(projectKey, resourceType, containerKey) {
|
|
|
464
505
|
return `/${projectKey}/${plural(resourceType)}/import-containers/${containerKey}/process-file`;
|
|
465
506
|
}
|
|
466
507
|
|
|
467
|
-
const EnabledResourceType = {
|
|
468
|
-
category: true,
|
|
469
|
-
product: true,
|
|
470
|
-
inventory: true,
|
|
471
|
-
'discount-code': true,
|
|
472
|
-
customer: false,
|
|
473
|
-
order: false,
|
|
474
|
-
'product-type': false
|
|
475
|
-
};
|
|
476
|
-
function isResourceType(maybeResourceType) {
|
|
477
|
-
return typeof maybeResourceType === 'string' && maybeResourceType in EnabledResourceType;
|
|
478
|
-
}
|
|
479
|
-
function assertResourceType(maybeResourceType) {
|
|
480
|
-
if (isResourceType(maybeResourceType)) return;
|
|
481
|
-
throw new Error(`Invalid value: ${maybeResourceType}`);
|
|
482
|
-
}
|
|
483
|
-
function isError(maybeError) {
|
|
484
|
-
if (maybeError instanceof Error) return true;
|
|
485
|
-
return false;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
489
|
-
function hasOwnProperty(obj, prop) {
|
|
490
|
-
return typeof obj === 'object' && obj !== null && obj.hasOwnProperty(prop);
|
|
491
|
-
}
|
|
492
|
-
function hasRequiredFields(maybeValidObject, requiredFields) {
|
|
493
|
-
return typeof maybeValidObject === 'object' && maybeValidObject !== null && _everyInstanceProperty(requiredFields).call(requiredFields, property => hasOwnProperty(maybeValidObject, property));
|
|
494
|
-
}
|
|
495
|
-
|
|
496
508
|
function uploadFileForImport(_ref) {
|
|
497
509
|
let projectKey = _ref.projectKey,
|
|
498
510
|
containerKey = _ref.containerKey,
|
|
@@ -716,13 +728,13 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
|
|
|
716
728
|
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== */");
|
|
717
729
|
}
|
|
718
730
|
|
|
719
|
-
var ActiveDragDropArea = /*#__PURE__*/lazy(() => import('./active-drag-drop-area-
|
|
731
|
+
var ActiveDragDropArea = /*#__PURE__*/lazy(() => import('./active-drag-drop-area-ba4a3de3.esm.js' /* webpackChunkName: "active-drag-drop-area" */));
|
|
720
732
|
|
|
721
733
|
var DisabledDropArea = /*#__PURE__*/lazy(() => import('./disabled-drop-area-2c088477.esm.js' /* webpackChunkName: "disabled-drop-area" */));
|
|
722
734
|
|
|
723
|
-
var EnabledDropArea = /*#__PURE__*/lazy(() => import('./enabled-drop-area-
|
|
735
|
+
var EnabledDropArea = /*#__PURE__*/lazy(() => import('./enabled-drop-area-8f86bce2.esm.js' /* webpackChunkName: "enabled-drop-area" */));
|
|
724
736
|
|
|
725
|
-
var FileDropped = /*#__PURE__*/lazy(() => import('./file-dropped-area-
|
|
737
|
+
var FileDropped = /*#__PURE__*/lazy(() => import('./file-dropped-area-6b9d6fed.esm.js' /* webpackChunkName: "filed-dropped-area" */));
|
|
726
738
|
|
|
727
739
|
function getDropArea(_ref) {
|
|
728
740
|
let dropAreaState = _ref.dropAreaState,
|
|
@@ -926,7 +938,7 @@ const useUpload = () => {
|
|
|
926
938
|
});
|
|
927
939
|
if (errors.length > 0) {
|
|
928
940
|
actions.setFileUploadErrors(errors);
|
|
929
|
-
actions.setCurrentStep(
|
|
941
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
930
942
|
return false;
|
|
931
943
|
}
|
|
932
944
|
return true;
|
|
@@ -942,7 +954,7 @@ const useUpload = () => {
|
|
|
942
954
|
title: intl.formatMessage(messages$6.missingRequiredField),
|
|
943
955
|
description: intl.formatMessage(messages$6.missingKeyError)
|
|
944
956
|
}]);
|
|
945
|
-
actions.setCurrentStep(
|
|
957
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
946
958
|
} else if (error.errorData?.code === 'MissingCsvFieldIdentifier') {
|
|
947
959
|
const MissingCsvFieldIdentifierError = error.errorData;
|
|
948
960
|
const fieldNames = formatKeys(MissingCsvFieldIdentifierError.rowValue);
|
|
@@ -952,10 +964,10 @@ const useUpload = () => {
|
|
|
952
964
|
fieldNames
|
|
953
965
|
})
|
|
954
966
|
}]);
|
|
955
|
-
actions.setCurrentStep(
|
|
967
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
956
968
|
} else if (error.errorData?.invalid > 0) {
|
|
957
969
|
actions.setUploadFileResponse(error.errorData);
|
|
958
|
-
actions.setCurrentStep(
|
|
970
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
959
971
|
} else {
|
|
960
972
|
actions.cancelImport();
|
|
961
973
|
showNotification({
|
|
@@ -986,7 +998,7 @@ const useUpload = () => {
|
|
|
986
998
|
if (!projectKey || !state.droppedFile || !state.resourceType) return;
|
|
987
999
|
const canUpload = await isFileValid(state.droppedFile);
|
|
988
1000
|
if (!canUpload) return;
|
|
989
|
-
actions.setCurrentStep(
|
|
1001
|
+
actions.setCurrentStep(CurrentStep$1.Uploading);
|
|
990
1002
|
const containerKey = encodeFileNameWithTimestampToContainerKey(state.droppedFile.name);
|
|
991
1003
|
actions.setContainerKey(containerKey);
|
|
992
1004
|
try {
|
|
@@ -1012,7 +1024,7 @@ const useUpload = () => {
|
|
|
1012
1024
|
file: state.droppedFile,
|
|
1013
1025
|
onSuccess: fileUploadResponse => {
|
|
1014
1026
|
actions.setUploadFileResponse(fileUploadResponse);
|
|
1015
|
-
actions.setCurrentStep(
|
|
1027
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1016
1028
|
},
|
|
1017
1029
|
onProgress: progress => {
|
|
1018
1030
|
actions.setProgress(progress);
|
|
@@ -1026,7 +1038,7 @@ const useUpload = () => {
|
|
|
1026
1038
|
} catch (error) {
|
|
1027
1039
|
deleteImportContainer(projectKey, containerKey, asyncDispatch);
|
|
1028
1040
|
handleUploadError(error);
|
|
1029
|
-
actions.setCurrentStep(
|
|
1041
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1030
1042
|
}
|
|
1031
1043
|
};
|
|
1032
1044
|
return {
|
|
@@ -1165,13 +1177,14 @@ const UploadProductSettings = () => {
|
|
|
1165
1177
|
});
|
|
1166
1178
|
};
|
|
1167
1179
|
const UploadSettings = () => {
|
|
1180
|
+
const isPublishProductsEnabled = useFeatureToggle(PUBLISH_PRODUCTS);
|
|
1168
1181
|
const _useImportResourcesCo2 = useImportResourcesContext(),
|
|
1169
1182
|
state = _useImportResourcesCo2.state;
|
|
1170
1183
|
const canPublishProducts = useIsAuthorized({
|
|
1171
1184
|
demandedPermissions: [PERMISSIONS.ManageProducts],
|
|
1172
1185
|
demandedActionRights: [ACTION_RIGHTS.PublishProducts]
|
|
1173
1186
|
});
|
|
1174
|
-
if (state.resourceType === 'product' && canPublishProducts) return jsx(UploadProductSettings, {});
|
|
1187
|
+
if (state.resourceType === 'product' && canPublishProducts && isPublishProductsEnabled) return jsx(UploadProductSettings, {});
|
|
1175
1188
|
return null;
|
|
1176
1189
|
};
|
|
1177
1190
|
|
|
@@ -1695,7 +1708,7 @@ function UploadPreviewModal() {
|
|
|
1695
1708
|
shouldDeleteImportContainer: true
|
|
1696
1709
|
}),
|
|
1697
1710
|
onPrimaryButtonClick: () => {
|
|
1698
|
-
actions.setCurrentStep(
|
|
1711
|
+
actions.setCurrentStep(CurrentStep$1.ImportConfirmationModal);
|
|
1699
1712
|
},
|
|
1700
1713
|
onClose: () => onClose({
|
|
1701
1714
|
shouldDeleteImportContainer: true
|
|
@@ -2015,7 +2028,7 @@ const Uploading = () => {
|
|
|
2015
2028
|
size: "medium",
|
|
2016
2029
|
label: intl.formatMessage(sharedMessages.cancel),
|
|
2017
2030
|
onClick: () => {
|
|
2018
|
-
actions.setCurrentStep(1);
|
|
2031
|
+
actions.setCurrentStep(CurrentStep$1.Upload);
|
|
2019
2032
|
state.abortController.abort();
|
|
2020
2033
|
}
|
|
2021
2034
|
})]
|
|
@@ -2033,10 +2046,10 @@ const CurrentStep = () => {
|
|
|
2033
2046
|
const _useImportResourcesCo = useImportResourcesContext(),
|
|
2034
2047
|
state = _useImportResourcesCo.state;
|
|
2035
2048
|
const steps = {
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2049
|
+
upload: jsx(Upload, {}),
|
|
2050
|
+
uploading: jsx(Uploading, {}),
|
|
2051
|
+
'upload-result': jsx(UploadResult, {}),
|
|
2052
|
+
'import-confirmation-modal': jsx(ImportConfirmationModal, {})
|
|
2040
2053
|
};
|
|
2041
2054
|
return steps[state.currentStep] || null;
|
|
2042
2055
|
};
|
|
@@ -79,8 +79,46 @@ var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceP
|
|
|
79
79
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
80
80
|
var DataTable__default = /*#__PURE__*/_interopDefault(DataTable);
|
|
81
81
|
|
|
82
|
+
const EnabledResourceType = {
|
|
83
|
+
category: true,
|
|
84
|
+
product: true,
|
|
85
|
+
inventory: true,
|
|
86
|
+
'discount-code': true,
|
|
87
|
+
customer: false,
|
|
88
|
+
order: false,
|
|
89
|
+
'product-type': false
|
|
90
|
+
};
|
|
91
|
+
function isResourceType(maybeResourceType) {
|
|
92
|
+
return typeof maybeResourceType === 'string' && maybeResourceType in EnabledResourceType;
|
|
93
|
+
}
|
|
94
|
+
function assertResourceType(maybeResourceType) {
|
|
95
|
+
if (isResourceType(maybeResourceType)) return;
|
|
96
|
+
throw new Error(`Invalid value: ${maybeResourceType}`);
|
|
97
|
+
}
|
|
98
|
+
function isError(maybeError) {
|
|
99
|
+
if (maybeError instanceof Error) return true;
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
104
|
+
function hasOwnProperty(obj, prop) {
|
|
105
|
+
return typeof obj === 'object' && obj !== null && obj.hasOwnProperty(prop);
|
|
106
|
+
}
|
|
107
|
+
function hasRequiredFields(maybeValidObject, requiredFields) {
|
|
108
|
+
return typeof maybeValidObject === 'object' && maybeValidObject !== null && _everyInstanceProperty__default["default"](requiredFields).call(requiredFields, property => hasOwnProperty(maybeValidObject, property));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
let CurrentStep$1 = /*#__PURE__*/function (CurrentStep) {
|
|
112
|
+
CurrentStep["Upload"] = "upload";
|
|
113
|
+
CurrentStep["Uploading"] = "uploading";
|
|
114
|
+
CurrentStep["UploadResult"] = "upload-result";
|
|
115
|
+
CurrentStep["ImportConfirmationModal"] = "import-confirmation-modal";
|
|
116
|
+
return CurrentStep;
|
|
117
|
+
}({});
|
|
118
|
+
|
|
82
119
|
function ownKeys$i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
83
120
|
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
121
|
+
|
|
84
122
|
// TODO: make this resource type specific
|
|
85
123
|
|
|
86
124
|
function reducer(state, action) {
|
|
@@ -99,7 +137,7 @@ function reducer(state, action) {
|
|
|
99
137
|
containerKey: action.containerKey
|
|
100
138
|
});
|
|
101
139
|
if (action.type === 'cancelImport') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
102
|
-
currentStep: 1,
|
|
140
|
+
currentStep: CurrentStep$1.Upload,
|
|
103
141
|
containerKey: undefined,
|
|
104
142
|
fileUploadErrors: [],
|
|
105
143
|
uploadFileResponse: undefined,
|
|
@@ -108,7 +146,7 @@ function reducer(state, action) {
|
|
|
108
146
|
progress: 0
|
|
109
147
|
});
|
|
110
148
|
if (action.type === 'uploadNewFile') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
111
|
-
currentStep: 1,
|
|
149
|
+
currentStep: CurrentStep$1.Upload,
|
|
112
150
|
containerKey: undefined,
|
|
113
151
|
fileUploadErrors: [],
|
|
114
152
|
uploadFileResponse: undefined,
|
|
@@ -147,7 +185,7 @@ function getUnknownActionError(actionType) {
|
|
|
147
185
|
return `Unkown type: ${actionType}`;
|
|
148
186
|
}
|
|
149
187
|
const initialState = {
|
|
150
|
-
currentStep: 1,
|
|
188
|
+
currentStep: CurrentStep$1.Upload,
|
|
151
189
|
abortController: new AbortController(),
|
|
152
190
|
dropAreaState: 'disabled',
|
|
153
191
|
uploadFileResponse: undefined,
|
|
@@ -346,7 +384,10 @@ const ACTION_RIGHTS = {
|
|
|
346
384
|
|
|
347
385
|
function ownKeys$g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
348
386
|
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
349
|
-
const
|
|
387
|
+
const PUBLISH_PRODUCTS = 'publishProducts';
|
|
388
|
+
const DEFAULT_SHORT_LIVED_FLAGS = {
|
|
389
|
+
[PUBLISH_PRODUCTS]: false
|
|
390
|
+
};
|
|
350
391
|
const DEFAULT_LONG_LIVED_FLAGS = {};
|
|
351
392
|
_objectSpread$g(_objectSpread$g({}, DEFAULT_SHORT_LIVED_FLAGS), DEFAULT_LONG_LIVED_FLAGS);
|
|
352
393
|
|
|
@@ -493,35 +534,6 @@ function getProccessFileURL(projectKey, resourceType, containerKey) {
|
|
|
493
534
|
return `/${projectKey}/${pluralize.plural(resourceType)}/import-containers/${containerKey}/process-file`;
|
|
494
535
|
}
|
|
495
536
|
|
|
496
|
-
const EnabledResourceType = {
|
|
497
|
-
category: true,
|
|
498
|
-
product: true,
|
|
499
|
-
inventory: true,
|
|
500
|
-
'discount-code': true,
|
|
501
|
-
customer: false,
|
|
502
|
-
order: false,
|
|
503
|
-
'product-type': false
|
|
504
|
-
};
|
|
505
|
-
function isResourceType(maybeResourceType) {
|
|
506
|
-
return typeof maybeResourceType === 'string' && maybeResourceType in EnabledResourceType;
|
|
507
|
-
}
|
|
508
|
-
function assertResourceType(maybeResourceType) {
|
|
509
|
-
if (isResourceType(maybeResourceType)) return;
|
|
510
|
-
throw new Error(`Invalid value: ${maybeResourceType}`);
|
|
511
|
-
}
|
|
512
|
-
function isError(maybeError) {
|
|
513
|
-
if (maybeError instanceof Error) return true;
|
|
514
|
-
return false;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
518
|
-
function hasOwnProperty(obj, prop) {
|
|
519
|
-
return typeof obj === 'object' && obj !== null && obj.hasOwnProperty(prop);
|
|
520
|
-
}
|
|
521
|
-
function hasRequiredFields(maybeValidObject, requiredFields) {
|
|
522
|
-
return typeof maybeValidObject === 'object' && maybeValidObject !== null && _everyInstanceProperty__default["default"](requiredFields).call(requiredFields, property => hasOwnProperty(maybeValidObject, property));
|
|
523
|
-
}
|
|
524
|
-
|
|
525
537
|
function uploadFileForImport(_ref) {
|
|
526
538
|
let projectKey = _ref.projectKey,
|
|
527
539
|
containerKey = _ref.containerKey,
|
|
@@ -745,13 +757,13 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
|
|
|
745
757
|
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== */");
|
|
746
758
|
}
|
|
747
759
|
|
|
748
|
-
var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-
|
|
760
|
+
var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-41fee9e7.cjs.dev.js' /* webpackChunkName: "active-drag-drop-area" */); }));
|
|
749
761
|
|
|
750
762
|
var DisabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./disabled-drop-area-aa78075b.cjs.dev.js' /* webpackChunkName: "disabled-drop-area" */); }));
|
|
751
763
|
|
|
752
|
-
var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-
|
|
764
|
+
var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-c92a8c96.cjs.dev.js' /* webpackChunkName: "enabled-drop-area" */); }));
|
|
753
765
|
|
|
754
|
-
var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-
|
|
766
|
+
var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-3a4c29f4.cjs.dev.js' /* webpackChunkName: "filed-dropped-area" */); }));
|
|
755
767
|
|
|
756
768
|
function getDropArea(_ref) {
|
|
757
769
|
let dropAreaState = _ref.dropAreaState,
|
|
@@ -955,7 +967,7 @@ const useUpload = () => {
|
|
|
955
967
|
});
|
|
956
968
|
if (errors.length > 0) {
|
|
957
969
|
actions.setFileUploadErrors(errors);
|
|
958
|
-
actions.setCurrentStep(
|
|
970
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
959
971
|
return false;
|
|
960
972
|
}
|
|
961
973
|
return true;
|
|
@@ -971,7 +983,7 @@ const useUpload = () => {
|
|
|
971
983
|
title: intl.formatMessage(messages$6.missingRequiredField),
|
|
972
984
|
description: intl.formatMessage(messages$6.missingKeyError)
|
|
973
985
|
}]);
|
|
974
|
-
actions.setCurrentStep(
|
|
986
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
975
987
|
} else if (error.errorData?.code === 'MissingCsvFieldIdentifier') {
|
|
976
988
|
const MissingCsvFieldIdentifierError = error.errorData;
|
|
977
989
|
const fieldNames = formatKeys(MissingCsvFieldIdentifierError.rowValue);
|
|
@@ -981,10 +993,10 @@ const useUpload = () => {
|
|
|
981
993
|
fieldNames
|
|
982
994
|
})
|
|
983
995
|
}]);
|
|
984
|
-
actions.setCurrentStep(
|
|
996
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
985
997
|
} else if (error.errorData?.invalid > 0) {
|
|
986
998
|
actions.setUploadFileResponse(error.errorData);
|
|
987
|
-
actions.setCurrentStep(
|
|
999
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
988
1000
|
} else {
|
|
989
1001
|
actions.cancelImport();
|
|
990
1002
|
showNotification({
|
|
@@ -1015,7 +1027,7 @@ const useUpload = () => {
|
|
|
1015
1027
|
if (!projectKey || !state.droppedFile || !state.resourceType) return;
|
|
1016
1028
|
const canUpload = await isFileValid(state.droppedFile);
|
|
1017
1029
|
if (!canUpload) return;
|
|
1018
|
-
actions.setCurrentStep(
|
|
1030
|
+
actions.setCurrentStep(CurrentStep$1.Uploading);
|
|
1019
1031
|
const containerKey = encodeFileNameWithTimestampToContainerKey(state.droppedFile.name);
|
|
1020
1032
|
actions.setContainerKey(containerKey);
|
|
1021
1033
|
try {
|
|
@@ -1041,7 +1053,7 @@ const useUpload = () => {
|
|
|
1041
1053
|
file: state.droppedFile,
|
|
1042
1054
|
onSuccess: fileUploadResponse => {
|
|
1043
1055
|
actions.setUploadFileResponse(fileUploadResponse);
|
|
1044
|
-
actions.setCurrentStep(
|
|
1056
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1045
1057
|
},
|
|
1046
1058
|
onProgress: progress => {
|
|
1047
1059
|
actions.setProgress(progress);
|
|
@@ -1055,7 +1067,7 @@ const useUpload = () => {
|
|
|
1055
1067
|
} catch (error) {
|
|
1056
1068
|
deleteImportContainer(projectKey, containerKey, asyncDispatch);
|
|
1057
1069
|
handleUploadError(error);
|
|
1058
|
-
actions.setCurrentStep(
|
|
1070
|
+
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1059
1071
|
}
|
|
1060
1072
|
};
|
|
1061
1073
|
return {
|
|
@@ -1194,13 +1206,14 @@ const UploadProductSettings = () => {
|
|
|
1194
1206
|
});
|
|
1195
1207
|
};
|
|
1196
1208
|
const UploadSettings = () => {
|
|
1209
|
+
const isPublishProductsEnabled = applicationShell.useFeatureToggle(PUBLISH_PRODUCTS);
|
|
1197
1210
|
const _useImportResourcesCo2 = useImportResourcesContext(),
|
|
1198
1211
|
state = _useImportResourcesCo2.state;
|
|
1199
1212
|
const canPublishProducts = permissions.useIsAuthorized({
|
|
1200
1213
|
demandedPermissions: [PERMISSIONS.ManageProducts],
|
|
1201
1214
|
demandedActionRights: [ACTION_RIGHTS.PublishProducts]
|
|
1202
1215
|
});
|
|
1203
|
-
if (state.resourceType === 'product' && canPublishProducts) return jsxRuntime.jsx(UploadProductSettings, {});
|
|
1216
|
+
if (state.resourceType === 'product' && canPublishProducts && isPublishProductsEnabled) return jsxRuntime.jsx(UploadProductSettings, {});
|
|
1204
1217
|
return null;
|
|
1205
1218
|
};
|
|
1206
1219
|
|
|
@@ -1724,7 +1737,7 @@ function UploadPreviewModal() {
|
|
|
1724
1737
|
shouldDeleteImportContainer: true
|
|
1725
1738
|
}),
|
|
1726
1739
|
onPrimaryButtonClick: () => {
|
|
1727
|
-
actions.setCurrentStep(
|
|
1740
|
+
actions.setCurrentStep(CurrentStep$1.ImportConfirmationModal);
|
|
1728
1741
|
},
|
|
1729
1742
|
onClose: () => onClose({
|
|
1730
1743
|
shouldDeleteImportContainer: true
|
|
@@ -2044,7 +2057,7 @@ const Uploading = () => {
|
|
|
2044
2057
|
size: "medium",
|
|
2045
2058
|
label: intl.formatMessage(sharedMessages.cancel),
|
|
2046
2059
|
onClick: () => {
|
|
2047
|
-
actions.setCurrentStep(1);
|
|
2060
|
+
actions.setCurrentStep(CurrentStep$1.Upload);
|
|
2048
2061
|
state.abortController.abort();
|
|
2049
2062
|
}
|
|
2050
2063
|
})]
|
|
@@ -2062,10 +2075,10 @@ const CurrentStep = () => {
|
|
|
2062
2075
|
const _useImportResourcesCo = useImportResourcesContext(),
|
|
2063
2076
|
state = _useImportResourcesCo.state;
|
|
2064
2077
|
const steps = {
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2078
|
+
upload: jsxRuntime.jsx(Upload, {}),
|
|
2079
|
+
uploading: jsxRuntime.jsx(Uploading, {}),
|
|
2080
|
+
'upload-result': jsxRuntime.jsx(UploadResult, {}),
|
|
2081
|
+
'import-confirmation-modal': jsxRuntime.jsx(ImportConfirmationModal, {})
|
|
2069
2082
|
};
|
|
2070
2083
|
return steps[state.currentStep] || null;
|
|
2071
2084
|
};
|
package/package.json
CHANGED