@commercetools-frontend-extensions/export-resources-modal 0.0.0-canary-20240904084742 → 0.0.0-canary-20240906151917
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 +46 -39
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +46 -39
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +46 -39
- package/dist/{de-695399d9.cjs.prod.js → de-16b6e603.cjs.prod.js} +4 -0
- package/dist/{de-99b348fe.esm.js → de-d065df9f.esm.js} +4 -0
- package/dist/{de-87c7cf7f.cjs.dev.js → de-d4a85a4f.cjs.dev.js} +4 -0
- package/dist/declarations/src/@hooks/index.d.ts +1 -1
- package/dist/declarations/src/@hooks/use-convert-type-definitions-for-export.d.ts +8 -0
- package/dist/declarations/src/@types/index.d.ts +1 -1
- package/dist/declarations/src/@types/type-definition.d.ts +22 -0
- package/dist/declarations/src/index.d.ts +1 -1
- package/dist/{en-105944c8.esm.js → en-489b5062.esm.js} +4 -0
- package/dist/{en-d02c912e.cjs.dev.js → en-6be5d801.cjs.prod.js} +4 -0
- package/dist/{en-985e1cb3.cjs.prod.js → en-f3054f24.cjs.dev.js} +4 -0
- package/dist/{es-a50b0543.esm.js → es-3072d392.esm.js} +4 -0
- package/dist/{es-51b65e08.cjs.prod.js → es-b1808cc2.cjs.dev.js} +4 -0
- package/dist/{es-76fb86f4.cjs.dev.js → es-f37701ea.cjs.prod.js} +4 -0
- package/dist/{fr-FR-9067e0c6.cjs.dev.js → fr-FR-66c381ea.cjs.prod.js} +4 -0
- package/dist/{fr-FR-45e4cba6.esm.js → fr-FR-9be90155.esm.js} +4 -0
- package/dist/{fr-FR-edf47120.cjs.prod.js → fr-FR-bf242ea4.cjs.dev.js} +4 -0
- package/dist/{pt-BR-ee02597a.esm.js → pt-BR-5cf442aa.esm.js} +4 -0
- package/dist/{pt-BR-4b462e67.cjs.dev.js → pt-BR-6754aa85.cjs.dev.js} +4 -0
- package/dist/{pt-BR-4ccc10dd.cjs.prod.js → pt-BR-ebc555b4.cjs.prod.js} +4 -0
- package/dist/{zh-CN-4fc3d4db.cjs.prod.js → zh-CN-03a85de5.cjs.dev.js} +4 -0
- package/dist/{zh-CN-1b0b93bc.esm.js → zh-CN-1da404c0.esm.js} +4 -0
- package/dist/{zh-CN-1b65bfd5.cjs.dev.js → zh-CN-e22002dc.cjs.prod.js} +4 -0
- package/package.json +11 -11
- package/dist/declarations/src/@hooks/use-convert-custom-type-definitions-for-export.d.ts +0 -8
- package/dist/declarations/src/@types/custom-type-definition.d.ts +0 -38
|
@@ -1034,66 +1034,73 @@ const useStartExportOperation = props => {
|
|
|
1034
1034
|
const _excluded$1 = ["fieldDefinitions"];
|
|
1035
1035
|
function ownKeys$5(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; }
|
|
1036
1036
|
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$5(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$5(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1037
|
-
const
|
|
1038
|
-
const getCustomFieldFullName = _ref => {
|
|
1037
|
+
const getFieldFullName = _ref => {
|
|
1039
1038
|
var _context;
|
|
1040
|
-
let
|
|
1041
|
-
|
|
1042
|
-
return _filterInstanceProperty__default["default"](_context = [
|
|
1039
|
+
let fieldPrefix = _ref.fieldPrefix,
|
|
1040
|
+
fieldName = _ref.fieldName;
|
|
1041
|
+
return _filterInstanceProperty__default["default"](_context = [fieldPrefix, fieldName]).call(_context, Boolean).join('.');
|
|
1043
1042
|
};
|
|
1044
|
-
const
|
|
1043
|
+
const localizeTypeDefinitionLabels = function () {
|
|
1045
1044
|
let typeDefinitions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1046
1045
|
return _mapInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, _ref2 => {
|
|
1047
1046
|
let fieldDefinitions = _ref2.fieldDefinitions,
|
|
1048
1047
|
typeDefinition = _objectWithoutProperties(_ref2, _excluded$1);
|
|
1048
|
+
const isTypeLabelLocalized = _Array$isArray__default["default"](typeDefinition.label);
|
|
1049
1049
|
return {
|
|
1050
|
-
type: l10n.applyTransformedLocalizedFields(typeDefinition, [{
|
|
1051
|
-
from: '
|
|
1052
|
-
to: 'name'
|
|
1053
|
-
}]),
|
|
1054
|
-
fields: _mapInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, fieldDefinition => _objectSpread$5({}, l10n.applyTransformedLocalizedFields(fieldDefinition, [{
|
|
1055
|
-
from: 'labelAllLocales',
|
|
1050
|
+
type: isTypeLabelLocalized ? l10n.applyTransformedLocalizedFields(typeDefinition, [{
|
|
1051
|
+
from: 'label',
|
|
1056
1052
|
to: 'label'
|
|
1057
|
-
}])
|
|
1053
|
+
}]) : typeDefinition,
|
|
1054
|
+
fields: _mapInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, fieldDefinition => {
|
|
1055
|
+
const isFieldLabelLocalized = _Array$isArray__default["default"](fieldDefinition.label);
|
|
1056
|
+
if (!isFieldLabelLocalized) {
|
|
1057
|
+
return fieldDefinition;
|
|
1058
|
+
}
|
|
1059
|
+
return _objectSpread$5({}, l10n.applyTransformedLocalizedFields(fieldDefinition, [{
|
|
1060
|
+
from: 'label',
|
|
1061
|
+
to: 'label'
|
|
1062
|
+
}]));
|
|
1063
|
+
})
|
|
1058
1064
|
};
|
|
1059
1065
|
});
|
|
1060
1066
|
};
|
|
1061
|
-
const
|
|
1067
|
+
const useConvertTypeDefinitionsForExport = () => {
|
|
1062
1068
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
1063
1069
|
language: applicationContext.dataLocale,
|
|
1064
1070
|
languages: applicationContext.project?.languages
|
|
1065
1071
|
})),
|
|
1066
1072
|
language = _useApplicationContex.language,
|
|
1067
1073
|
languages = _useApplicationContex.languages;
|
|
1068
|
-
const
|
|
1069
|
-
let
|
|
1070
|
-
|
|
1071
|
-
expandAll = _ref3.expandAll
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1074
|
+
const convertTypeDefinitionsForExport = _ref3 => {
|
|
1075
|
+
let typeDefinitions = _ref3.typeDefinitions,
|
|
1076
|
+
fieldPrefix = _ref3.fieldPrefix,
|
|
1077
|
+
_ref3$expandAll = _ref3.expandAll,
|
|
1078
|
+
expandAll = _ref3$expandAll === void 0 ? false : _ref3$expandAll;
|
|
1079
|
+
if (!typeDefinitions) return [];
|
|
1080
|
+
const transformedTypeDefinitions = localizeTypeDefinitionLabels(typeDefinitions);
|
|
1081
|
+
return _mapInstanceProperty__default["default"](transformedTypeDefinitions).call(transformedTypeDefinitions, transformedType => {
|
|
1075
1082
|
var _context2;
|
|
1076
1083
|
return {
|
|
1077
1084
|
isExpandable: true,
|
|
1078
1085
|
isExpanded: expandAll,
|
|
1079
|
-
name:
|
|
1086
|
+
name: transformedType.type.name,
|
|
1080
1087
|
label: l10n.formatLocalizedString({
|
|
1081
|
-
|
|
1088
|
+
label: transformedType.type.label
|
|
1082
1089
|
}, {
|
|
1083
|
-
key: '
|
|
1090
|
+
key: 'label',
|
|
1084
1091
|
locale: language,
|
|
1085
1092
|
fallbackOrder: languages,
|
|
1086
|
-
fallback:
|
|
1093
|
+
fallback: transformedType.type.name
|
|
1087
1094
|
}),
|
|
1088
|
-
fields: _mapInstanceProperty__default["default"](_context2 =
|
|
1089
|
-
name:
|
|
1090
|
-
|
|
1091
|
-
|
|
1095
|
+
fields: _mapInstanceProperty__default["default"](_context2 = transformedType.fields).call(_context2, fieldDefinition => ({
|
|
1096
|
+
name: getFieldFullName({
|
|
1097
|
+
fieldPrefix: fieldPrefix,
|
|
1098
|
+
fieldName: fieldDefinition.name
|
|
1092
1099
|
}),
|
|
1093
1100
|
label: l10n.formatLocalizedString({
|
|
1094
|
-
|
|
1101
|
+
label: fieldDefinition.label
|
|
1095
1102
|
}, {
|
|
1096
|
-
key: '
|
|
1103
|
+
key: 'label',
|
|
1097
1104
|
locale: language,
|
|
1098
1105
|
fallbackOrder: languages,
|
|
1099
1106
|
fallback: fieldDefinition.name
|
|
@@ -1103,7 +1110,7 @@ const useConvertCustomTypeDefinitionsForExport = () => {
|
|
|
1103
1110
|
});
|
|
1104
1111
|
};
|
|
1105
1112
|
return {
|
|
1106
|
-
|
|
1113
|
+
convertTypeDefinitionsForExport
|
|
1107
1114
|
};
|
|
1108
1115
|
};
|
|
1109
1116
|
|
|
@@ -1842,19 +1849,19 @@ const getChunkImport = locale => {
|
|
|
1842
1849
|
const intlLocale = i18n.mapLocaleToIntlLocale(locale);
|
|
1843
1850
|
switch (intlLocale) {
|
|
1844
1851
|
case 'de':
|
|
1845
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-de" */'./de-
|
|
1852
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-de" */'./de-d4a85a4f.cjs.dev.js'); });
|
|
1846
1853
|
case 'es':
|
|
1847
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-es" */'./es-
|
|
1854
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-es" */'./es-b1808cc2.cjs.dev.js'); });
|
|
1848
1855
|
case 'fr-FR':
|
|
1849
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
1856
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-bf242ea4.cjs.dev.js'); });
|
|
1850
1857
|
case 'zh-CN':
|
|
1851
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-
|
|
1858
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-03a85de5.cjs.dev.js'); });
|
|
1852
1859
|
case 'ja':
|
|
1853
1860
|
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-ja" */'./ja-9bd5f452.cjs.dev.js'); });
|
|
1854
1861
|
case 'pt-BR':
|
|
1855
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
1862
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-6754aa85.cjs.dev.js'); });
|
|
1856
1863
|
default:
|
|
1857
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-en" */'./en-
|
|
1864
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-en" */'./en-f3054f24.cjs.dev.js'); });
|
|
1858
1865
|
}
|
|
1859
1866
|
};
|
|
1860
1867
|
const loadMessages = async locale => {
|
|
@@ -1939,4 +1946,4 @@ ExportResourcesModal.defaultProps = {
|
|
|
1939
1946
|
exports.EXPORTABLE_RESOURCES = EXPORTABLE_RESOURCES;
|
|
1940
1947
|
exports.EXPORT_TYPES = EXPORT_TYPES;
|
|
1941
1948
|
exports["default"] = ExportResourcesModal;
|
|
1942
|
-
exports.
|
|
1949
|
+
exports.useConvertTypeDefinitionsForExport = useConvertTypeDefinitionsForExport;
|
|
@@ -1034,66 +1034,73 @@ const useStartExportOperation = props => {
|
|
|
1034
1034
|
const _excluded$1 = ["fieldDefinitions"];
|
|
1035
1035
|
function ownKeys$5(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; }
|
|
1036
1036
|
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$5(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$5(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1037
|
-
const
|
|
1038
|
-
const getCustomFieldFullName = _ref => {
|
|
1037
|
+
const getFieldFullName = _ref => {
|
|
1039
1038
|
var _context;
|
|
1040
|
-
let
|
|
1041
|
-
|
|
1042
|
-
return _filterInstanceProperty__default["default"](_context = [
|
|
1039
|
+
let fieldPrefix = _ref.fieldPrefix,
|
|
1040
|
+
fieldName = _ref.fieldName;
|
|
1041
|
+
return _filterInstanceProperty__default["default"](_context = [fieldPrefix, fieldName]).call(_context, Boolean).join('.');
|
|
1043
1042
|
};
|
|
1044
|
-
const
|
|
1043
|
+
const localizeTypeDefinitionLabels = function () {
|
|
1045
1044
|
let typeDefinitions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1046
1045
|
return _mapInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, _ref2 => {
|
|
1047
1046
|
let fieldDefinitions = _ref2.fieldDefinitions,
|
|
1048
1047
|
typeDefinition = _objectWithoutProperties(_ref2, _excluded$1);
|
|
1048
|
+
const isTypeLabelLocalized = _Array$isArray__default["default"](typeDefinition.label);
|
|
1049
1049
|
return {
|
|
1050
|
-
type: l10n.applyTransformedLocalizedFields(typeDefinition, [{
|
|
1051
|
-
from: '
|
|
1052
|
-
to: 'name'
|
|
1053
|
-
}]),
|
|
1054
|
-
fields: _mapInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, fieldDefinition => _objectSpread$5({}, l10n.applyTransformedLocalizedFields(fieldDefinition, [{
|
|
1055
|
-
from: 'labelAllLocales',
|
|
1050
|
+
type: isTypeLabelLocalized ? l10n.applyTransformedLocalizedFields(typeDefinition, [{
|
|
1051
|
+
from: 'label',
|
|
1056
1052
|
to: 'label'
|
|
1057
|
-
}])
|
|
1053
|
+
}]) : typeDefinition,
|
|
1054
|
+
fields: _mapInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, fieldDefinition => {
|
|
1055
|
+
const isFieldLabelLocalized = _Array$isArray__default["default"](fieldDefinition.label);
|
|
1056
|
+
if (!isFieldLabelLocalized) {
|
|
1057
|
+
return fieldDefinition;
|
|
1058
|
+
}
|
|
1059
|
+
return _objectSpread$5({}, l10n.applyTransformedLocalizedFields(fieldDefinition, [{
|
|
1060
|
+
from: 'label',
|
|
1061
|
+
to: 'label'
|
|
1062
|
+
}]));
|
|
1063
|
+
})
|
|
1058
1064
|
};
|
|
1059
1065
|
});
|
|
1060
1066
|
};
|
|
1061
|
-
const
|
|
1067
|
+
const useConvertTypeDefinitionsForExport = () => {
|
|
1062
1068
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
1063
1069
|
language: applicationContext.dataLocale,
|
|
1064
1070
|
languages: applicationContext.project?.languages
|
|
1065
1071
|
})),
|
|
1066
1072
|
language = _useApplicationContex.language,
|
|
1067
1073
|
languages = _useApplicationContex.languages;
|
|
1068
|
-
const
|
|
1069
|
-
let
|
|
1070
|
-
|
|
1071
|
-
expandAll = _ref3.expandAll
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1074
|
+
const convertTypeDefinitionsForExport = _ref3 => {
|
|
1075
|
+
let typeDefinitions = _ref3.typeDefinitions,
|
|
1076
|
+
fieldPrefix = _ref3.fieldPrefix,
|
|
1077
|
+
_ref3$expandAll = _ref3.expandAll,
|
|
1078
|
+
expandAll = _ref3$expandAll === void 0 ? false : _ref3$expandAll;
|
|
1079
|
+
if (!typeDefinitions) return [];
|
|
1080
|
+
const transformedTypeDefinitions = localizeTypeDefinitionLabels(typeDefinitions);
|
|
1081
|
+
return _mapInstanceProperty__default["default"](transformedTypeDefinitions).call(transformedTypeDefinitions, transformedType => {
|
|
1075
1082
|
var _context2;
|
|
1076
1083
|
return {
|
|
1077
1084
|
isExpandable: true,
|
|
1078
1085
|
isExpanded: expandAll,
|
|
1079
|
-
name:
|
|
1086
|
+
name: transformedType.type.name,
|
|
1080
1087
|
label: l10n.formatLocalizedString({
|
|
1081
|
-
|
|
1088
|
+
label: transformedType.type.label
|
|
1082
1089
|
}, {
|
|
1083
|
-
key: '
|
|
1090
|
+
key: 'label',
|
|
1084
1091
|
locale: language,
|
|
1085
1092
|
fallbackOrder: languages,
|
|
1086
|
-
fallback:
|
|
1093
|
+
fallback: transformedType.type.name
|
|
1087
1094
|
}),
|
|
1088
|
-
fields: _mapInstanceProperty__default["default"](_context2 =
|
|
1089
|
-
name:
|
|
1090
|
-
|
|
1091
|
-
|
|
1095
|
+
fields: _mapInstanceProperty__default["default"](_context2 = transformedType.fields).call(_context2, fieldDefinition => ({
|
|
1096
|
+
name: getFieldFullName({
|
|
1097
|
+
fieldPrefix: fieldPrefix,
|
|
1098
|
+
fieldName: fieldDefinition.name
|
|
1092
1099
|
}),
|
|
1093
1100
|
label: l10n.formatLocalizedString({
|
|
1094
|
-
|
|
1101
|
+
label: fieldDefinition.label
|
|
1095
1102
|
}, {
|
|
1096
|
-
key: '
|
|
1103
|
+
key: 'label',
|
|
1097
1104
|
locale: language,
|
|
1098
1105
|
fallbackOrder: languages,
|
|
1099
1106
|
fallback: fieldDefinition.name
|
|
@@ -1103,7 +1110,7 @@ const useConvertCustomTypeDefinitionsForExport = () => {
|
|
|
1103
1110
|
});
|
|
1104
1111
|
};
|
|
1105
1112
|
return {
|
|
1106
|
-
|
|
1113
|
+
convertTypeDefinitionsForExport
|
|
1107
1114
|
};
|
|
1108
1115
|
};
|
|
1109
1116
|
|
|
@@ -1809,19 +1816,19 @@ const getChunkImport = locale => {
|
|
|
1809
1816
|
const intlLocale = i18n.mapLocaleToIntlLocale(locale);
|
|
1810
1817
|
switch (intlLocale) {
|
|
1811
1818
|
case 'de':
|
|
1812
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-de" */'./de-
|
|
1819
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-de" */'./de-16b6e603.cjs.prod.js'); });
|
|
1813
1820
|
case 'es':
|
|
1814
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-es" */'./es-
|
|
1821
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-es" */'./es-f37701ea.cjs.prod.js'); });
|
|
1815
1822
|
case 'fr-FR':
|
|
1816
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
1823
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-66c381ea.cjs.prod.js'); });
|
|
1817
1824
|
case 'zh-CN':
|
|
1818
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-
|
|
1825
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-e22002dc.cjs.prod.js'); });
|
|
1819
1826
|
case 'ja':
|
|
1820
1827
|
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-ja" */'./ja-37632763.cjs.prod.js'); });
|
|
1821
1828
|
case 'pt-BR':
|
|
1822
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
1829
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-ebc555b4.cjs.prod.js'); });
|
|
1823
1830
|
default:
|
|
1824
|
-
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-en" */'./en-
|
|
1831
|
+
return Promise.resolve().then(function () { return require( /* webpackChunkName: "export-resources-modal-i18n-en" */'./en-6be5d801.cjs.prod.js'); });
|
|
1825
1832
|
}
|
|
1826
1833
|
};
|
|
1827
1834
|
const loadMessages = async locale => {
|
|
@@ -1906,4 +1913,4 @@ ExportResourcesModal.defaultProps = {
|
|
|
1906
1913
|
exports.EXPORTABLE_RESOURCES = EXPORTABLE_RESOURCES;
|
|
1907
1914
|
exports.EXPORT_TYPES = EXPORT_TYPES;
|
|
1908
1915
|
exports["default"] = ExportResourcesModal;
|
|
1909
|
-
exports.
|
|
1916
|
+
exports.useConvertTypeDefinitionsForExport = useConvertTypeDefinitionsForExport;
|
|
@@ -1000,66 +1000,73 @@ const useStartExportOperation = props => {
|
|
|
1000
1000
|
const _excluded$1 = ["fieldDefinitions"];
|
|
1001
1001
|
function ownKeys$5(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; }
|
|
1002
1002
|
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$5(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$5(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1003
|
-
const
|
|
1004
|
-
const getCustomFieldFullName = _ref => {
|
|
1003
|
+
const getFieldFullName = _ref => {
|
|
1005
1004
|
var _context;
|
|
1006
|
-
let
|
|
1007
|
-
|
|
1008
|
-
return _filterInstanceProperty(_context = [
|
|
1005
|
+
let fieldPrefix = _ref.fieldPrefix,
|
|
1006
|
+
fieldName = _ref.fieldName;
|
|
1007
|
+
return _filterInstanceProperty(_context = [fieldPrefix, fieldName]).call(_context, Boolean).join('.');
|
|
1009
1008
|
};
|
|
1010
|
-
const
|
|
1009
|
+
const localizeTypeDefinitionLabels = function () {
|
|
1011
1010
|
let typeDefinitions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1012
1011
|
return _mapInstanceProperty(typeDefinitions).call(typeDefinitions, _ref2 => {
|
|
1013
1012
|
let fieldDefinitions = _ref2.fieldDefinitions,
|
|
1014
1013
|
typeDefinition = _objectWithoutProperties(_ref2, _excluded$1);
|
|
1014
|
+
const isTypeLabelLocalized = _Array$isArray(typeDefinition.label);
|
|
1015
1015
|
return {
|
|
1016
|
-
type: applyTransformedLocalizedFields(typeDefinition, [{
|
|
1017
|
-
from: '
|
|
1018
|
-
to: 'name'
|
|
1019
|
-
}]),
|
|
1020
|
-
fields: _mapInstanceProperty(fieldDefinitions).call(fieldDefinitions, fieldDefinition => _objectSpread$5({}, applyTransformedLocalizedFields(fieldDefinition, [{
|
|
1021
|
-
from: 'labelAllLocales',
|
|
1016
|
+
type: isTypeLabelLocalized ? applyTransformedLocalizedFields(typeDefinition, [{
|
|
1017
|
+
from: 'label',
|
|
1022
1018
|
to: 'label'
|
|
1023
|
-
}])
|
|
1019
|
+
}]) : typeDefinition,
|
|
1020
|
+
fields: _mapInstanceProperty(fieldDefinitions).call(fieldDefinitions, fieldDefinition => {
|
|
1021
|
+
const isFieldLabelLocalized = _Array$isArray(fieldDefinition.label);
|
|
1022
|
+
if (!isFieldLabelLocalized) {
|
|
1023
|
+
return fieldDefinition;
|
|
1024
|
+
}
|
|
1025
|
+
return _objectSpread$5({}, applyTransformedLocalizedFields(fieldDefinition, [{
|
|
1026
|
+
from: 'label',
|
|
1027
|
+
to: 'label'
|
|
1028
|
+
}]));
|
|
1029
|
+
})
|
|
1024
1030
|
};
|
|
1025
1031
|
});
|
|
1026
1032
|
};
|
|
1027
|
-
const
|
|
1033
|
+
const useConvertTypeDefinitionsForExport = () => {
|
|
1028
1034
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
1029
1035
|
language: applicationContext.dataLocale,
|
|
1030
1036
|
languages: applicationContext.project?.languages
|
|
1031
1037
|
})),
|
|
1032
1038
|
language = _useApplicationContex.language,
|
|
1033
1039
|
languages = _useApplicationContex.languages;
|
|
1034
|
-
const
|
|
1035
|
-
let
|
|
1036
|
-
|
|
1037
|
-
expandAll = _ref3.expandAll
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1040
|
+
const convertTypeDefinitionsForExport = _ref3 => {
|
|
1041
|
+
let typeDefinitions = _ref3.typeDefinitions,
|
|
1042
|
+
fieldPrefix = _ref3.fieldPrefix,
|
|
1043
|
+
_ref3$expandAll = _ref3.expandAll,
|
|
1044
|
+
expandAll = _ref3$expandAll === void 0 ? false : _ref3$expandAll;
|
|
1045
|
+
if (!typeDefinitions) return [];
|
|
1046
|
+
const transformedTypeDefinitions = localizeTypeDefinitionLabels(typeDefinitions);
|
|
1047
|
+
return _mapInstanceProperty(transformedTypeDefinitions).call(transformedTypeDefinitions, transformedType => {
|
|
1041
1048
|
var _context2;
|
|
1042
1049
|
return {
|
|
1043
1050
|
isExpandable: true,
|
|
1044
1051
|
isExpanded: expandAll,
|
|
1045
|
-
name:
|
|
1052
|
+
name: transformedType.type.name,
|
|
1046
1053
|
label: formatLocalizedString({
|
|
1047
|
-
|
|
1054
|
+
label: transformedType.type.label
|
|
1048
1055
|
}, {
|
|
1049
|
-
key: '
|
|
1056
|
+
key: 'label',
|
|
1050
1057
|
locale: language,
|
|
1051
1058
|
fallbackOrder: languages,
|
|
1052
|
-
fallback:
|
|
1059
|
+
fallback: transformedType.type.name
|
|
1053
1060
|
}),
|
|
1054
|
-
fields: _mapInstanceProperty(_context2 =
|
|
1055
|
-
name:
|
|
1056
|
-
|
|
1057
|
-
|
|
1061
|
+
fields: _mapInstanceProperty(_context2 = transformedType.fields).call(_context2, fieldDefinition => ({
|
|
1062
|
+
name: getFieldFullName({
|
|
1063
|
+
fieldPrefix: fieldPrefix,
|
|
1064
|
+
fieldName: fieldDefinition.name
|
|
1058
1065
|
}),
|
|
1059
1066
|
label: formatLocalizedString({
|
|
1060
|
-
|
|
1067
|
+
label: fieldDefinition.label
|
|
1061
1068
|
}, {
|
|
1062
|
-
key: '
|
|
1069
|
+
key: 'label',
|
|
1063
1070
|
locale: language,
|
|
1064
1071
|
fallbackOrder: languages,
|
|
1065
1072
|
fallback: fieldDefinition.name
|
|
@@ -1069,7 +1076,7 @@ const useConvertCustomTypeDefinitionsForExport = () => {
|
|
|
1069
1076
|
});
|
|
1070
1077
|
};
|
|
1071
1078
|
return {
|
|
1072
|
-
|
|
1079
|
+
convertTypeDefinitionsForExport
|
|
1073
1080
|
};
|
|
1074
1081
|
};
|
|
1075
1082
|
|
|
@@ -1808,19 +1815,19 @@ const getChunkImport = locale => {
|
|
|
1808
1815
|
const intlLocale = mapLocaleToIntlLocale(locale);
|
|
1809
1816
|
switch (intlLocale) {
|
|
1810
1817
|
case 'de':
|
|
1811
|
-
return import( /* webpackChunkName: "export-resources-modal-i18n-de" */'./de-
|
|
1818
|
+
return import( /* webpackChunkName: "export-resources-modal-i18n-de" */'./de-d065df9f.esm.js');
|
|
1812
1819
|
case 'es':
|
|
1813
|
-
return import( /* webpackChunkName: "export-resources-modal-i18n-es" */'./es-
|
|
1820
|
+
return import( /* webpackChunkName: "export-resources-modal-i18n-es" */'./es-3072d392.esm.js');
|
|
1814
1821
|
case 'fr-FR':
|
|
1815
|
-
return import( /* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
1822
|
+
return import( /* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-9be90155.esm.js');
|
|
1816
1823
|
case 'zh-CN':
|
|
1817
|
-
return import( /* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-
|
|
1824
|
+
return import( /* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-1da404c0.esm.js');
|
|
1818
1825
|
case 'ja':
|
|
1819
1826
|
return import( /* webpackChunkName: "export-resources-modal-i18n-ja" */'./ja-73c088a7.esm.js');
|
|
1820
1827
|
case 'pt-BR':
|
|
1821
|
-
return import( /* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
1828
|
+
return import( /* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-5cf442aa.esm.js');
|
|
1822
1829
|
default:
|
|
1823
|
-
return import( /* webpackChunkName: "export-resources-modal-i18n-en" */'./en-
|
|
1830
|
+
return import( /* webpackChunkName: "export-resources-modal-i18n-en" */'./en-489b5062.esm.js');
|
|
1824
1831
|
}
|
|
1825
1832
|
};
|
|
1826
1833
|
const loadMessages = async locale => {
|
|
@@ -1902,4 +1909,4 @@ ExportResourcesModal.defaultProps = {
|
|
|
1902
1909
|
fieldOrder: []
|
|
1903
1910
|
};
|
|
1904
1911
|
|
|
1905
|
-
export { EXPORTABLE_RESOURCES, EXPORT_TYPES, ExportResourcesModal as default,
|
|
1912
|
+
export { EXPORTABLE_RESOURCES, EXPORT_TYPES, ExportResourcesModal as default, useConvertTypeDefinitionsForExport };
|
|
@@ -149,6 +149,10 @@ var de = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Rabattcodes exportieren"
|
|
@@ -147,6 +147,10 @@ var de = {
|
|
|
147
147
|
developer_comment: "Label for the categories modal title",
|
|
148
148
|
string: "Export categories"
|
|
149
149
|
},
|
|
150
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
151
|
+
developer_comment: "Label for the customers modal title",
|
|
152
|
+
string: "Export customers"
|
|
153
|
+
},
|
|
150
154
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
151
155
|
developer_comment: "Label for the discount codes modal title",
|
|
152
156
|
string: "Rabattcodes exportieren"
|
|
@@ -149,6 +149,10 @@ var de = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Rabattcodes exportieren"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from "./use-export-resources-modal-context.js";
|
|
2
2
|
export * from "./use-initial-values.js";
|
|
3
3
|
export * from "./use-start-export-operation.js";
|
|
4
|
-
export * from "./use-convert-
|
|
4
|
+
export * from "./use-convert-type-definitions-for-export.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Field, TypeDefinition } from "../@types/index.js";
|
|
2
|
+
export declare const useConvertTypeDefinitionsForExport: () => {
|
|
3
|
+
convertTypeDefinitionsForExport: ({ typeDefinitions, fieldPrefix, expandAll, }: {
|
|
4
|
+
typeDefinitions?: TypeDefinition[] | undefined;
|
|
5
|
+
fieldPrefix?: string | undefined;
|
|
6
|
+
expandAll?: boolean | undefined;
|
|
7
|
+
}) => Field[];
|
|
8
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type LocalizedField = {
|
|
2
|
+
value: string;
|
|
3
|
+
locale: string;
|
|
4
|
+
};
|
|
5
|
+
export type FieldDefinition = {
|
|
6
|
+
name: string;
|
|
7
|
+
label: LocalizedField[];
|
|
8
|
+
};
|
|
9
|
+
export type TypeDefinition = {
|
|
10
|
+
name: string;
|
|
11
|
+
label: LocalizedField[];
|
|
12
|
+
fieldDefinitions: FieldDefinition[];
|
|
13
|
+
};
|
|
14
|
+
type TransformedFieldDefinition = {
|
|
15
|
+
name: string;
|
|
16
|
+
label: LocalizedField[];
|
|
17
|
+
};
|
|
18
|
+
export type TransformedTypeDefinition = {
|
|
19
|
+
type: FieldDefinition;
|
|
20
|
+
fields: TransformedFieldDefinition[];
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ExportResourcesModal from "./export-resources-modal.js";
|
|
2
2
|
export { EXPORT_TYPES, EXPORTABLE_RESOURCES } from "./@constants/index.js";
|
|
3
3
|
export * from "./@types/index.js";
|
|
4
|
-
export {
|
|
4
|
+
export { useConvertTypeDefinitionsForExport } from "./@hooks/index.js";
|
|
5
5
|
export default ExportResourcesModal;
|
|
@@ -147,6 +147,10 @@ var en = {
|
|
|
147
147
|
developer_comment: "Label for the categories modal title",
|
|
148
148
|
string: "Export categories"
|
|
149
149
|
},
|
|
150
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
151
|
+
developer_comment: "Label for the customers modal title",
|
|
152
|
+
string: "Export customers"
|
|
153
|
+
},
|
|
150
154
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
151
155
|
developer_comment: "Label for the discount codes modal title",
|
|
152
156
|
string: "Export discount codes"
|
|
@@ -149,6 +149,10 @@ var en = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Export discount codes"
|
|
@@ -149,6 +149,10 @@ var en = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Export discount codes"
|
|
@@ -147,6 +147,10 @@ var es = {
|
|
|
147
147
|
developer_comment: "Label for the categories modal title",
|
|
148
148
|
string: "Exportar categorías"
|
|
149
149
|
},
|
|
150
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
151
|
+
developer_comment: "Label for the customers modal title",
|
|
152
|
+
string: "Export customers"
|
|
153
|
+
},
|
|
150
154
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
151
155
|
developer_comment: "Label for the discount codes modal title",
|
|
152
156
|
string: "Exportar código/s de descuento"
|
|
@@ -149,6 +149,10 @@ var es = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Exportar categorías"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Exportar código/s de descuento"
|
|
@@ -149,6 +149,10 @@ var es = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Exportar categorías"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Exportar código/s de descuento"
|
|
@@ -149,6 +149,10 @@ var frFR = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Exporter les codes de remise"
|
|
@@ -147,6 +147,10 @@ var frFR = {
|
|
|
147
147
|
developer_comment: "Label for the categories modal title",
|
|
148
148
|
string: "Export categories"
|
|
149
149
|
},
|
|
150
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
151
|
+
developer_comment: "Label for the customers modal title",
|
|
152
|
+
string: "Export customers"
|
|
153
|
+
},
|
|
150
154
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
151
155
|
developer_comment: "Label for the discount codes modal title",
|
|
152
156
|
string: "Exporter les codes de remise"
|
|
@@ -149,6 +149,10 @@ var frFR = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Exporter les codes de remise"
|
|
@@ -147,6 +147,10 @@ var ptBR = {
|
|
|
147
147
|
developer_comment: "Label for the categories modal title",
|
|
148
148
|
string: "Export categories"
|
|
149
149
|
},
|
|
150
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
151
|
+
developer_comment: "Label for the customers modal title",
|
|
152
|
+
string: "Export customers"
|
|
153
|
+
},
|
|
150
154
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
151
155
|
developer_comment: "Label for the discount codes modal title",
|
|
152
156
|
string: "Exportar códigos de desconto"
|
|
@@ -149,6 +149,10 @@ var ptBR = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Exportar códigos de desconto"
|
|
@@ -149,6 +149,10 @@ var ptBR = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "Exportar códigos de desconto"
|
|
@@ -149,6 +149,10 @@ var zhCN = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "导出折扣代码"
|
|
@@ -147,6 +147,10 @@ var zhCN = {
|
|
|
147
147
|
developer_comment: "Label for the categories modal title",
|
|
148
148
|
string: "Export categories"
|
|
149
149
|
},
|
|
150
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
151
|
+
developer_comment: "Label for the customers modal title",
|
|
152
|
+
string: "Export customers"
|
|
153
|
+
},
|
|
150
154
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
151
155
|
developer_comment: "Label for the discount codes modal title",
|
|
152
156
|
string: "导出折扣代码"
|
|
@@ -149,6 +149,10 @@ var zhCN = {
|
|
|
149
149
|
developer_comment: "Label for the categories modal title",
|
|
150
150
|
string: "Export categories"
|
|
151
151
|
},
|
|
152
|
+
"ExportResourcesModal.modalTitle.customer": {
|
|
153
|
+
developer_comment: "Label for the customers modal title",
|
|
154
|
+
string: "Export customers"
|
|
155
|
+
},
|
|
152
156
|
"ExportResourcesModal.modalTitle.discountCode": {
|
|
153
157
|
developer_comment: "Label for the discount codes modal title",
|
|
154
158
|
string: "导出折扣代码"
|
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": "0.0.0-canary-
|
|
4
|
+
"version": "0.0.0-canary-20240906151917",
|
|
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.
|
|
41
|
-
"@commercetools-frontend/l10n": "22.
|
|
42
|
-
"@commercetools-frontend/sdk": "22.
|
|
43
|
-
"@commercetools-frontend/sentry": "22.
|
|
34
|
+
"@commercetools-frontend/actions-global": "22.32.0",
|
|
35
|
+
"@commercetools-frontend/application-components": "22.32.0",
|
|
36
|
+
"@commercetools-frontend/application-shell": "22.32.0",
|
|
37
|
+
"@commercetools-frontend/application-shell-connectors": "22.32.0",
|
|
38
|
+
"@commercetools-frontend/constants": "22.32.0",
|
|
39
|
+
"@commercetools-frontend/i18n": "22.32.0",
|
|
40
|
+
"@commercetools-frontend/jest-preset-mc-app": "22.32.0",
|
|
41
|
+
"@commercetools-frontend/l10n": "22.x",
|
|
42
|
+
"@commercetools-frontend/sdk": "22.32.0",
|
|
43
|
+
"@commercetools-frontend/sentry": "22.32.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",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Field, CustomTypeDefinition } from "../@types/index.js";
|
|
2
|
-
export declare const useConvertCustomTypeDefinitionsForExport: () => {
|
|
3
|
-
convertCustomTypeDefinitionsForExport: ({ customTypeDefinitions, customFieldPrefix, expandAll, }: {
|
|
4
|
-
customTypeDefinitions?: CustomTypeDefinition[] | undefined;
|
|
5
|
-
customFieldPrefix?: string | undefined;
|
|
6
|
-
expandAll?: boolean | undefined;
|
|
7
|
-
}) => Field[];
|
|
8
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
type LocalizedString = {
|
|
2
|
-
value: string;
|
|
3
|
-
locale: string;
|
|
4
|
-
};
|
|
5
|
-
type FieldType = {
|
|
6
|
-
name: string;
|
|
7
|
-
};
|
|
8
|
-
export type FieldDefinition = {
|
|
9
|
-
type: FieldType;
|
|
10
|
-
name: string;
|
|
11
|
-
labelAllLocales: LocalizedString[];
|
|
12
|
-
};
|
|
13
|
-
export type CustomTypeDefinition = {
|
|
14
|
-
key: string;
|
|
15
|
-
nameAllLocales: LocalizedString[];
|
|
16
|
-
fieldDefinitions: FieldDefinition[];
|
|
17
|
-
};
|
|
18
|
-
type TransformedFieldDefinition = {
|
|
19
|
-
type: {
|
|
20
|
-
name: string;
|
|
21
|
-
};
|
|
22
|
-
name: string;
|
|
23
|
-
label: {
|
|
24
|
-
value: string;
|
|
25
|
-
locale: string;
|
|
26
|
-
}[];
|
|
27
|
-
};
|
|
28
|
-
export type TransformedCustomTypeDefinition = {
|
|
29
|
-
type: {
|
|
30
|
-
key: string;
|
|
31
|
-
name: {
|
|
32
|
-
value: string;
|
|
33
|
-
locale: string;
|
|
34
|
-
}[];
|
|
35
|
-
};
|
|
36
|
-
fields: TransformedFieldDefinition[];
|
|
37
|
-
};
|
|
38
|
-
export {};
|