@commercetools-frontend-extensions/export-resources-modal 4.6.11 → 4.6.13
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/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +33 -15
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +33 -15
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +33 -14
- package/dist/{de-16b6e603.cjs.prod.js → de-4612e610.cjs.dev.js} +4 -0
- package/dist/{de-d065df9f.esm.js → de-46838835.esm.js} +4 -0
- package/dist/{de-d4a85a4f.cjs.dev.js → de-550bdf59.cjs.prod.js} +4 -0
- package/dist/{en-489b5062.esm.js → en-03ff6505.esm.js} +4 -0
- package/dist/{en-f3054f24.cjs.dev.js → en-67d31b8f.cjs.dev.js} +4 -0
- package/dist/{en-6be5d801.cjs.prod.js → en-6c40dfd0.cjs.prod.js} +4 -0
- package/dist/{es-3072d392.esm.js → es-619e3759.esm.js} +4 -0
- package/dist/{es-f37701ea.cjs.prod.js → es-7eff2ec7.cjs.dev.js} +4 -0
- package/dist/{es-b1808cc2.cjs.dev.js → es-a3612086.cjs.prod.js} +4 -0
- package/dist/{fr-FR-66c381ea.cjs.prod.js → fr-FR-07fd1da3.cjs.prod.js} +4 -0
- package/dist/{fr-FR-bf242ea4.cjs.dev.js → fr-FR-511b32a3.cjs.dev.js} +4 -0
- package/dist/{fr-FR-9be90155.esm.js → fr-FR-9e6874ed.esm.js} +4 -0
- package/dist/{pt-BR-5cf442aa.esm.js → pt-BR-5a8dc558.esm.js} +4 -0
- package/dist/{pt-BR-ebc555b4.cjs.prod.js → pt-BR-7e767de3.cjs.prod.js} +4 -0
- package/dist/{pt-BR-6754aa85.cjs.dev.js → pt-BR-a80a154a.cjs.dev.js} +4 -0
- package/dist/{zh-CN-1da404c0.esm.js → zh-CN-2891a62b.esm.js} +4 -0
- package/dist/{zh-CN-e22002dc.cjs.prod.js → zh-CN-30c99ab4.cjs.dev.js} +4 -0
- package/dist/{zh-CN-03a85de5.cjs.dev.js → zh-CN-e16e11b6.cjs.prod.js} +4 -0
- package/package.json +10 -10
|
@@ -43,7 +43,6 @@ var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-arr
|
|
|
43
43
|
var _Set = require('@babel/runtime-corejs3/core-js-stable/set');
|
|
44
44
|
var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
|
|
45
45
|
var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
46
|
-
var moment = require('moment');
|
|
47
46
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
48
47
|
var constants = require('@commercetools-frontend/constants');
|
|
49
48
|
var sdk = require('@commercetools-frontend/sdk');
|
|
@@ -87,7 +86,6 @@ var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
|
|
|
87
86
|
var _Set__default = /*#__PURE__*/_interopDefault(_Set);
|
|
88
87
|
var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceProperty);
|
|
89
88
|
var _indexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_indexOfInstanceProperty);
|
|
90
|
-
var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
91
89
|
var sortBy__default = /*#__PURE__*/_interopDefault(sortBy);
|
|
92
90
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
93
91
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
@@ -670,8 +668,26 @@ function validate(_ref) {
|
|
|
670
668
|
return omitEmpty__default["default"](errors);
|
|
671
669
|
}
|
|
672
670
|
|
|
673
|
-
function resourceTypeToFileName(resourceType) {
|
|
674
|
-
|
|
671
|
+
function resourceTypeToFileName(resourceType, locale) {
|
|
672
|
+
var _context;
|
|
673
|
+
const date = new Date();
|
|
674
|
+
const dateFormatter = new Intl.DateTimeFormat(locale, {
|
|
675
|
+
year: '2-digit',
|
|
676
|
+
month: '2-digit',
|
|
677
|
+
day: '2-digit',
|
|
678
|
+
hour: '2-digit',
|
|
679
|
+
minute: '2-digit',
|
|
680
|
+
hour12: false
|
|
681
|
+
});
|
|
682
|
+
const parts = dateFormatter.formatToParts(date);
|
|
683
|
+
const dateParts = _reduceInstanceProperty__default["default"](parts).call(parts, (acc, part) => {
|
|
684
|
+
if (part.type !== 'literal') {
|
|
685
|
+
acc[part.type] = part.value;
|
|
686
|
+
}
|
|
687
|
+
return acc;
|
|
688
|
+
}, {});
|
|
689
|
+
const orderedDateParts = _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](parts).call(parts, part => part.type === 'day' || part.type === 'month' || part.type === 'year')).call(_context, part => dateParts[part.type]).join('-');
|
|
690
|
+
const formattedDate = `${orderedDateParts}_${dateParts.hour}-${dateParts.minute}`;
|
|
675
691
|
const resourceTypeMap = {
|
|
676
692
|
[EXPORTABLE_RESOURCES.CATEGORY]: 'Categories',
|
|
677
693
|
[EXPORTABLE_RESOURCES.PRODUCT]: 'Products',
|
|
@@ -685,7 +701,7 @@ function resourceTypeToFileName(resourceType) {
|
|
|
685
701
|
if (!displayName) {
|
|
686
702
|
throw new UnexpectedResourceTypeError(resourceType);
|
|
687
703
|
}
|
|
688
|
-
return `${displayName}_Export_${
|
|
704
|
+
return `${displayName}_Export_${formattedDate}`;
|
|
689
705
|
}
|
|
690
706
|
function mapLocalesToOptions(locales) {
|
|
691
707
|
return _mapInstanceProperty__default["default"](locales).call(locales, locale => ({
|
|
@@ -889,9 +905,11 @@ const updateFieldDependenciesStatus = formik => {
|
|
|
889
905
|
const useInitialValues = props => {
|
|
890
906
|
var _context;
|
|
891
907
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
892
|
-
locale: applicationContext.dataLocale
|
|
908
|
+
locale: applicationContext.dataLocale,
|
|
909
|
+
userLocale: applicationContext.user?.locale
|
|
893
910
|
})),
|
|
894
|
-
locale = _useApplicationContex.locale
|
|
911
|
+
locale = _useApplicationContex.locale,
|
|
912
|
+
userLocale = _useApplicationContex.userLocale;
|
|
895
913
|
const _useApplicationContex2 = applicationShellConnectors.useApplicationContext(context => ({
|
|
896
914
|
projectKey: context.project?.key
|
|
897
915
|
})),
|
|
@@ -912,11 +930,11 @@ const useInitialValues = props => {
|
|
|
912
930
|
groups = updateFieldGroupsWithIsExpandedValue(groups, cachedExpandedGroups[props.resourceType] || {});
|
|
913
931
|
return {
|
|
914
932
|
outputFormat: props.outputFormat,
|
|
915
|
-
fileName: `${resourceTypeToFileName(props.resourceType)}`,
|
|
933
|
+
fileName: `${resourceTypeToFileName(props.resourceType, userLocale)}`,
|
|
916
934
|
locales: [locale],
|
|
917
935
|
groups: updateFieldGroupWithAdditionalFieldExtensions(groups)
|
|
918
936
|
};
|
|
919
|
-
}, [props.fieldGroups, props.resourceType, props.outputFormat, cachedSelectedGroups, cachedExpandedGroups, locale]);
|
|
937
|
+
}, [props.fieldGroups, props.resourceType, props.outputFormat, cachedSelectedGroups, cachedExpandedGroups, locale, userLocale]);
|
|
920
938
|
};
|
|
921
939
|
|
|
922
940
|
async function createExportOperation(_ref, asyncDispatchFn) {
|
|
@@ -1879,19 +1897,19 @@ const getChunkImport = locale => {
|
|
|
1879
1897
|
const intlLocale = i18n.mapLocaleToIntlLocale(locale);
|
|
1880
1898
|
switch (intlLocale) {
|
|
1881
1899
|
case 'de':
|
|
1882
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-
|
|
1900
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-4612e610.cjs.dev.js'); });
|
|
1883
1901
|
case 'es':
|
|
1884
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-
|
|
1902
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-7eff2ec7.cjs.dev.js'); });
|
|
1885
1903
|
case 'fr-FR':
|
|
1886
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
1904
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-511b32a3.cjs.dev.js'); });
|
|
1887
1905
|
case 'zh-CN':
|
|
1888
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-
|
|
1906
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-30c99ab4.cjs.dev.js'); });
|
|
1889
1907
|
case 'ja':
|
|
1890
1908
|
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-ja" */'./ja-9bd5f452.cjs.dev.js'); });
|
|
1891
1909
|
case 'pt-BR':
|
|
1892
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
1910
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-a80a154a.cjs.dev.js'); });
|
|
1893
1911
|
default:
|
|
1894
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-
|
|
1912
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-67d31b8f.cjs.dev.js'); });
|
|
1895
1913
|
}
|
|
1896
1914
|
};
|
|
1897
1915
|
const loadMessages = async locale => {
|
|
@@ -43,7 +43,6 @@ var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-arr
|
|
|
43
43
|
var _Set = require('@babel/runtime-corejs3/core-js-stable/set');
|
|
44
44
|
var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
|
|
45
45
|
var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
46
|
-
var moment = require('moment');
|
|
47
46
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
48
47
|
var constants = require('@commercetools-frontend/constants');
|
|
49
48
|
var sdk = require('@commercetools-frontend/sdk');
|
|
@@ -87,7 +86,6 @@ var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
|
|
|
87
86
|
var _Set__default = /*#__PURE__*/_interopDefault(_Set);
|
|
88
87
|
var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceProperty);
|
|
89
88
|
var _indexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_indexOfInstanceProperty);
|
|
90
|
-
var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
91
89
|
var sortBy__default = /*#__PURE__*/_interopDefault(sortBy);
|
|
92
90
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
93
91
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
@@ -670,8 +668,26 @@ function validate(_ref) {
|
|
|
670
668
|
return omitEmpty__default["default"](errors);
|
|
671
669
|
}
|
|
672
670
|
|
|
673
|
-
function resourceTypeToFileName(resourceType) {
|
|
674
|
-
|
|
671
|
+
function resourceTypeToFileName(resourceType, locale) {
|
|
672
|
+
var _context;
|
|
673
|
+
const date = new Date();
|
|
674
|
+
const dateFormatter = new Intl.DateTimeFormat(locale, {
|
|
675
|
+
year: '2-digit',
|
|
676
|
+
month: '2-digit',
|
|
677
|
+
day: '2-digit',
|
|
678
|
+
hour: '2-digit',
|
|
679
|
+
minute: '2-digit',
|
|
680
|
+
hour12: false
|
|
681
|
+
});
|
|
682
|
+
const parts = dateFormatter.formatToParts(date);
|
|
683
|
+
const dateParts = _reduceInstanceProperty__default["default"](parts).call(parts, (acc, part) => {
|
|
684
|
+
if (part.type !== 'literal') {
|
|
685
|
+
acc[part.type] = part.value;
|
|
686
|
+
}
|
|
687
|
+
return acc;
|
|
688
|
+
}, {});
|
|
689
|
+
const orderedDateParts = _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](parts).call(parts, part => part.type === 'day' || part.type === 'month' || part.type === 'year')).call(_context, part => dateParts[part.type]).join('-');
|
|
690
|
+
const formattedDate = `${orderedDateParts}_${dateParts.hour}-${dateParts.minute}`;
|
|
675
691
|
const resourceTypeMap = {
|
|
676
692
|
[EXPORTABLE_RESOURCES.CATEGORY]: 'Categories',
|
|
677
693
|
[EXPORTABLE_RESOURCES.PRODUCT]: 'Products',
|
|
@@ -685,7 +701,7 @@ function resourceTypeToFileName(resourceType) {
|
|
|
685
701
|
if (!displayName) {
|
|
686
702
|
throw new UnexpectedResourceTypeError(resourceType);
|
|
687
703
|
}
|
|
688
|
-
return `${displayName}_Export_${
|
|
704
|
+
return `${displayName}_Export_${formattedDate}`;
|
|
689
705
|
}
|
|
690
706
|
function mapLocalesToOptions(locales) {
|
|
691
707
|
return _mapInstanceProperty__default["default"](locales).call(locales, locale => ({
|
|
@@ -889,9 +905,11 @@ const updateFieldDependenciesStatus = formik => {
|
|
|
889
905
|
const useInitialValues = props => {
|
|
890
906
|
var _context;
|
|
891
907
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
892
|
-
locale: applicationContext.dataLocale
|
|
908
|
+
locale: applicationContext.dataLocale,
|
|
909
|
+
userLocale: applicationContext.user?.locale
|
|
893
910
|
})),
|
|
894
|
-
locale = _useApplicationContex.locale
|
|
911
|
+
locale = _useApplicationContex.locale,
|
|
912
|
+
userLocale = _useApplicationContex.userLocale;
|
|
895
913
|
const _useApplicationContex2 = applicationShellConnectors.useApplicationContext(context => ({
|
|
896
914
|
projectKey: context.project?.key
|
|
897
915
|
})),
|
|
@@ -912,11 +930,11 @@ const useInitialValues = props => {
|
|
|
912
930
|
groups = updateFieldGroupsWithIsExpandedValue(groups, cachedExpandedGroups[props.resourceType] || {});
|
|
913
931
|
return {
|
|
914
932
|
outputFormat: props.outputFormat,
|
|
915
|
-
fileName: `${resourceTypeToFileName(props.resourceType)}`,
|
|
933
|
+
fileName: `${resourceTypeToFileName(props.resourceType, userLocale)}`,
|
|
916
934
|
locales: [locale],
|
|
917
935
|
groups: updateFieldGroupWithAdditionalFieldExtensions(groups)
|
|
918
936
|
};
|
|
919
|
-
}, [props.fieldGroups, props.resourceType, props.outputFormat, cachedSelectedGroups, cachedExpandedGroups, locale]);
|
|
937
|
+
}, [props.fieldGroups, props.resourceType, props.outputFormat, cachedSelectedGroups, cachedExpandedGroups, locale, userLocale]);
|
|
920
938
|
};
|
|
921
939
|
|
|
922
940
|
async function createExportOperation(_ref, asyncDispatchFn) {
|
|
@@ -1846,19 +1864,19 @@ const getChunkImport = locale => {
|
|
|
1846
1864
|
const intlLocale = i18n.mapLocaleToIntlLocale(locale);
|
|
1847
1865
|
switch (intlLocale) {
|
|
1848
1866
|
case 'de':
|
|
1849
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-
|
|
1867
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-550bdf59.cjs.prod.js'); });
|
|
1850
1868
|
case 'es':
|
|
1851
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-
|
|
1869
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-a3612086.cjs.prod.js'); });
|
|
1852
1870
|
case 'fr-FR':
|
|
1853
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
1871
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-07fd1da3.cjs.prod.js'); });
|
|
1854
1872
|
case 'zh-CN':
|
|
1855
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-
|
|
1873
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-e16e11b6.cjs.prod.js'); });
|
|
1856
1874
|
case 'ja':
|
|
1857
1875
|
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-ja" */'./ja-37632763.cjs.prod.js'); });
|
|
1858
1876
|
case 'pt-BR':
|
|
1859
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
1877
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-7e767de3.cjs.prod.js'); });
|
|
1860
1878
|
default:
|
|
1861
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-
|
|
1879
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-6c40dfd0.cjs.prod.js'); });
|
|
1862
1880
|
}
|
|
1863
1881
|
};
|
|
1864
1882
|
const loadMessages = async locale => {
|
|
@@ -39,7 +39,6 @@ import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array
|
|
|
39
39
|
import _Set from '@babel/runtime-corejs3/core-js-stable/set';
|
|
40
40
|
import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
|
|
41
41
|
import _indexOfInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/index-of';
|
|
42
|
-
import moment from 'moment';
|
|
43
42
|
import { useShowNotification } from '@commercetools-frontend/actions-global';
|
|
44
43
|
import { MC_API_PROXY_TARGETS, DOMAINS } from '@commercetools-frontend/constants';
|
|
45
44
|
import { actions, useAsyncDispatch } from '@commercetools-frontend/sdk';
|
|
@@ -631,8 +630,26 @@ function validate(_ref) {
|
|
|
631
630
|
return omitEmpty(errors);
|
|
632
631
|
}
|
|
633
632
|
|
|
634
|
-
function resourceTypeToFileName(resourceType) {
|
|
635
|
-
|
|
633
|
+
function resourceTypeToFileName(resourceType, locale) {
|
|
634
|
+
var _context;
|
|
635
|
+
const date = new Date();
|
|
636
|
+
const dateFormatter = new Intl.DateTimeFormat(locale, {
|
|
637
|
+
year: '2-digit',
|
|
638
|
+
month: '2-digit',
|
|
639
|
+
day: '2-digit',
|
|
640
|
+
hour: '2-digit',
|
|
641
|
+
minute: '2-digit',
|
|
642
|
+
hour12: false
|
|
643
|
+
});
|
|
644
|
+
const parts = dateFormatter.formatToParts(date);
|
|
645
|
+
const dateParts = _reduceInstanceProperty(parts).call(parts, (acc, part) => {
|
|
646
|
+
if (part.type !== 'literal') {
|
|
647
|
+
acc[part.type] = part.value;
|
|
648
|
+
}
|
|
649
|
+
return acc;
|
|
650
|
+
}, {});
|
|
651
|
+
const orderedDateParts = _mapInstanceProperty(_context = _filterInstanceProperty(parts).call(parts, part => part.type === 'day' || part.type === 'month' || part.type === 'year')).call(_context, part => dateParts[part.type]).join('-');
|
|
652
|
+
const formattedDate = `${orderedDateParts}_${dateParts.hour}-${dateParts.minute}`;
|
|
636
653
|
const resourceTypeMap = {
|
|
637
654
|
[EXPORTABLE_RESOURCES.CATEGORY]: 'Categories',
|
|
638
655
|
[EXPORTABLE_RESOURCES.PRODUCT]: 'Products',
|
|
@@ -646,7 +663,7 @@ function resourceTypeToFileName(resourceType) {
|
|
|
646
663
|
if (!displayName) {
|
|
647
664
|
throw new UnexpectedResourceTypeError(resourceType);
|
|
648
665
|
}
|
|
649
|
-
return `${displayName}_Export_${
|
|
666
|
+
return `${displayName}_Export_${formattedDate}`;
|
|
650
667
|
}
|
|
651
668
|
function mapLocalesToOptions(locales) {
|
|
652
669
|
return _mapInstanceProperty(locales).call(locales, locale => ({
|
|
@@ -850,9 +867,11 @@ const updateFieldDependenciesStatus = formik => {
|
|
|
850
867
|
const useInitialValues = props => {
|
|
851
868
|
var _context;
|
|
852
869
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
853
|
-
locale: applicationContext.dataLocale
|
|
870
|
+
locale: applicationContext.dataLocale,
|
|
871
|
+
userLocale: applicationContext.user?.locale
|
|
854
872
|
})),
|
|
855
|
-
locale = _useApplicationContex.locale
|
|
873
|
+
locale = _useApplicationContex.locale,
|
|
874
|
+
userLocale = _useApplicationContex.userLocale;
|
|
856
875
|
const _useApplicationContex2 = useApplicationContext(context => ({
|
|
857
876
|
projectKey: context.project?.key
|
|
858
877
|
})),
|
|
@@ -873,11 +892,11 @@ const useInitialValues = props => {
|
|
|
873
892
|
groups = updateFieldGroupsWithIsExpandedValue(groups, cachedExpandedGroups[props.resourceType] || {});
|
|
874
893
|
return {
|
|
875
894
|
outputFormat: props.outputFormat,
|
|
876
|
-
fileName: `${resourceTypeToFileName(props.resourceType)}`,
|
|
895
|
+
fileName: `${resourceTypeToFileName(props.resourceType, userLocale)}`,
|
|
877
896
|
locales: [locale],
|
|
878
897
|
groups: updateFieldGroupWithAdditionalFieldExtensions(groups)
|
|
879
898
|
};
|
|
880
|
-
}, [props.fieldGroups, props.resourceType, props.outputFormat, cachedSelectedGroups, cachedExpandedGroups, locale]);
|
|
899
|
+
}, [props.fieldGroups, props.resourceType, props.outputFormat, cachedSelectedGroups, cachedExpandedGroups, locale, userLocale]);
|
|
881
900
|
};
|
|
882
901
|
|
|
883
902
|
async function createExportOperation(_ref, asyncDispatchFn) {
|
|
@@ -1840,19 +1859,19 @@ const getChunkImport = locale => {
|
|
|
1840
1859
|
const intlLocale = mapLocaleToIntlLocale(locale);
|
|
1841
1860
|
switch (intlLocale) {
|
|
1842
1861
|
case 'de':
|
|
1843
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-
|
|
1862
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-46838835.esm.js');
|
|
1844
1863
|
case 'es':
|
|
1845
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-
|
|
1864
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-619e3759.esm.js');
|
|
1846
1865
|
case 'fr-FR':
|
|
1847
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
1866
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-9e6874ed.esm.js');
|
|
1848
1867
|
case 'zh-CN':
|
|
1849
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-
|
|
1868
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-2891a62b.esm.js');
|
|
1850
1869
|
case 'ja':
|
|
1851
1870
|
return import(/* webpackChunkName: "export-resources-modal-i18n-ja" */'./ja-73c088a7.esm.js');
|
|
1852
1871
|
case 'pt-BR':
|
|
1853
|
-
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
1872
|
+
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-5a8dc558.esm.js');
|
|
1854
1873
|
default:
|
|
1855
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-
|
|
1874
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-03ff6505.esm.js');
|
|
1856
1875
|
}
|
|
1857
1876
|
};
|
|
1858
1877
|
const loadMessages = async locale => {
|
|
@@ -161,6 +161,10 @@ var de = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Lagerbestände exportieren"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
|
@@ -159,6 +159,10 @@ var de = {
|
|
|
159
159
|
developer_comment: "Label for the inventories modal title",
|
|
160
160
|
string: "Lagerbestände exportieren"
|
|
161
161
|
},
|
|
162
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
163
|
+
developer_comment: "Label for the orders modal title",
|
|
164
|
+
string: "Export orders"
|
|
165
|
+
},
|
|
162
166
|
"ExportResourcesModal.modalTitle.product": {
|
|
163
167
|
developer_comment: "Label for the products modal title",
|
|
164
168
|
string: "Export products"
|
|
@@ -161,6 +161,10 @@ var de = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Lagerbestände exportieren"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
|
@@ -159,6 +159,10 @@ var en = {
|
|
|
159
159
|
developer_comment: "Label for the inventories modal title",
|
|
160
160
|
string: "Export inventories"
|
|
161
161
|
},
|
|
162
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
163
|
+
developer_comment: "Label for the orders modal title",
|
|
164
|
+
string: "Export orders"
|
|
165
|
+
},
|
|
162
166
|
"ExportResourcesModal.modalTitle.product": {
|
|
163
167
|
developer_comment: "Label for the products modal title",
|
|
164
168
|
string: "Export products"
|
|
@@ -161,6 +161,10 @@ var en = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Export inventories"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
|
@@ -161,6 +161,10 @@ var en = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Export inventories"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
|
@@ -159,6 +159,10 @@ var es = {
|
|
|
159
159
|
developer_comment: "Label for the inventories modal title",
|
|
160
160
|
string: "Exportar inventarios"
|
|
161
161
|
},
|
|
162
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
163
|
+
developer_comment: "Label for the orders modal title",
|
|
164
|
+
string: "Export orders"
|
|
165
|
+
},
|
|
162
166
|
"ExportResourcesModal.modalTitle.product": {
|
|
163
167
|
developer_comment: "Label for the products modal title",
|
|
164
168
|
string: "Exportar productos"
|
|
@@ -161,6 +161,10 @@ var es = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Exportar inventarios"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Exportar productos"
|
|
@@ -161,6 +161,10 @@ var es = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Exportar inventarios"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Exportar productos"
|
|
@@ -161,6 +161,10 @@ var frFR = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Exporter les inventaires"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
|
@@ -161,6 +161,10 @@ var frFR = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Exporter les inventaires"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
|
@@ -159,6 +159,10 @@ var frFR = {
|
|
|
159
159
|
developer_comment: "Label for the inventories modal title",
|
|
160
160
|
string: "Exporter les inventaires"
|
|
161
161
|
},
|
|
162
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
163
|
+
developer_comment: "Label for the orders modal title",
|
|
164
|
+
string: "Export orders"
|
|
165
|
+
},
|
|
162
166
|
"ExportResourcesModal.modalTitle.product": {
|
|
163
167
|
developer_comment: "Label for the products modal title",
|
|
164
168
|
string: "Export products"
|
|
@@ -159,6 +159,10 @@ var ptBR = {
|
|
|
159
159
|
developer_comment: "Label for the inventories modal title",
|
|
160
160
|
string: "Exportar inventários"
|
|
161
161
|
},
|
|
162
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
163
|
+
developer_comment: "Label for the orders modal title",
|
|
164
|
+
string: "Export orders"
|
|
165
|
+
},
|
|
162
166
|
"ExportResourcesModal.modalTitle.product": {
|
|
163
167
|
developer_comment: "Label for the products modal title",
|
|
164
168
|
string: "Export products"
|
|
@@ -161,6 +161,10 @@ var ptBR = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Exportar inventários"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
|
@@ -161,6 +161,10 @@ var ptBR = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "Exportar inventários"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
|
@@ -159,6 +159,10 @@ var zhCN = {
|
|
|
159
159
|
developer_comment: "Label for the inventories modal title",
|
|
160
160
|
string: "导出库存"
|
|
161
161
|
},
|
|
162
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
163
|
+
developer_comment: "Label for the orders modal title",
|
|
164
|
+
string: "Export orders"
|
|
165
|
+
},
|
|
162
166
|
"ExportResourcesModal.modalTitle.product": {
|
|
163
167
|
developer_comment: "Label for the products modal title",
|
|
164
168
|
string: "Export products"
|
|
@@ -161,6 +161,10 @@ var zhCN = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "导出库存"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
|
@@ -161,6 +161,10 @@ var zhCN = {
|
|
|
161
161
|
developer_comment: "Label for the inventories modal title",
|
|
162
162
|
string: "导出库存"
|
|
163
163
|
},
|
|
164
|
+
"ExportResourcesModal.modalTitle.order": {
|
|
165
|
+
developer_comment: "Label for the orders modal title",
|
|
166
|
+
string: "Export orders"
|
|
167
|
+
},
|
|
164
168
|
"ExportResourcesModal.modalTitle.product": {
|
|
165
169
|
developer_comment: "Label for the products modal title",
|
|
166
170
|
string: "Export products"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend-extensions/export-resources-modal",
|
|
3
3
|
"description": "Shared export modal for exporting resources",
|
|
4
|
-
"version": "4.6.
|
|
4
|
+
"version": "4.6.13",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"react": "17.0.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@commercetools-frontend/actions-global": "22.
|
|
35
|
-
"@commercetools-frontend/application-components": "22.
|
|
36
|
-
"@commercetools-frontend/application-shell": "22.
|
|
37
|
-
"@commercetools-frontend/application-shell-connectors": "22.
|
|
38
|
-
"@commercetools-frontend/constants": "22.
|
|
39
|
-
"@commercetools-frontend/i18n": "22.
|
|
40
|
-
"@commercetools-frontend/jest-preset-mc-app": "22.
|
|
34
|
+
"@commercetools-frontend/actions-global": "22.33.0",
|
|
35
|
+
"@commercetools-frontend/application-components": "22.33.0",
|
|
36
|
+
"@commercetools-frontend/application-shell": "22.33.0",
|
|
37
|
+
"@commercetools-frontend/application-shell-connectors": "22.33.0",
|
|
38
|
+
"@commercetools-frontend/constants": "22.33.0",
|
|
39
|
+
"@commercetools-frontend/i18n": "22.33.0",
|
|
40
|
+
"@commercetools-frontend/jest-preset-mc-app": "22.33.0",
|
|
41
41
|
"@commercetools-frontend/l10n": "22.x",
|
|
42
|
-
"@commercetools-frontend/sdk": "22.
|
|
43
|
-
"@commercetools-frontend/sentry": "22.
|
|
42
|
+
"@commercetools-frontend/sdk": "22.33.0",
|
|
43
|
+
"@commercetools-frontend/sentry": "22.33.0",
|
|
44
44
|
"@commercetools-frontend/ui-kit": "19.11.0",
|
|
45
45
|
"@commercetools-uikit/design-system": "19.11.0",
|
|
46
46
|
"@preconstruct/cli": "2.8.7",
|