@commercetools-frontend-extensions/change-history 9.2.0 → 9.3.1
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-change-history.cjs.dev.js +116 -149
- package/dist/commercetools-frontend-extensions-change-history.cjs.prod.js +116 -149
- package/dist/commercetools-frontend-extensions-change-history.esm.js +77 -110
- package/dist/{de-079e6cad.cjs.prod.js → de-327050f3.cjs.dev.js} +565 -731
- package/dist/{de-c64c7be6.cjs.dev.js → de-9ec9118c.cjs.prod.js} +565 -731
- package/dist/{de-dd42d489.esm.js → de-ff92c46c.esm.js} +565 -731
- package/dist/declarations/src/i18n/load-i18n.d.ts +1404 -8873
- package/dist/{en-c78dcf93.cjs.dev.js → en-789a6829.cjs.dev.js} +516 -702
- package/dist/{en-393f2d4b.esm.js → en-95f84692.esm.js} +516 -702
- package/dist/{en-40de8863.cjs.prod.js → en-a9baf858.cjs.prod.js} +516 -702
- package/dist/{es-0549e536.cjs.dev.js → es-42bcdd3a.cjs.dev.js} +569 -735
- package/dist/{es-55faf3de.cjs.prod.js → es-a8d296be.cjs.prod.js} +569 -735
- package/dist/{es-691396c2.esm.js → es-f970b913.esm.js} +569 -735
- package/dist/{fr-FR-2f678d5f.esm.js → fr-FR-0b78bf1f.esm.js} +564 -730
- package/dist/{fr-FR-f1089b99.cjs.prod.js → fr-FR-2126c2a4.cjs.dev.js} +564 -730
- package/dist/{fr-FR-e7c4e125.cjs.dev.js → fr-FR-d35c5264.cjs.prod.js} +564 -730
- package/dist/{pt-BR-29bf9f10.cjs.prod.js → pt-BR-04f59d3d.cjs.prod.js} +567 -733
- package/dist/{pt-BR-2c2e6c98.cjs.dev.js → pt-BR-4e70a28d.cjs.dev.js} +567 -733
- package/dist/{pt-BR-f321b66b.esm.js → pt-BR-7b8b942e.esm.js} +567 -733
- package/package.json +24 -22
|
@@ -18,7 +18,7 @@ import camelCase from 'lodash/camelCase';
|
|
|
18
18
|
import get from 'lodash/get';
|
|
19
19
|
import { useQuery } from '@apollo/client/react/hooks';
|
|
20
20
|
import _URLSearchParams from '@babel/runtime-corejs3/core-js-stable/url-search-params';
|
|
21
|
-
import { defineMessages, useIntl, FormattedMessage,
|
|
21
|
+
import { defineMessages, useIntl, FormattedMessage, IntlProvider } from 'react-intl';
|
|
22
22
|
import { useCountries, applyTransformedLocalizedFields, formatLocalizedString } from '@commercetools-frontend/l10n';
|
|
23
23
|
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
24
24
|
import { Text, Link, designTokens, Spacings, FlatButton, Tooltip, LoadingSpinner, IconButton, CollapsiblePanel, Grid, FieldLabel, EyeIcon, DataTable, Stamp, Avatar, CodeViewIcon, UserLinearIcon, SwitcherIcon, ExternalLinkIcon, FilterIcon, ContentNotification, Card, DiamondIcon, SelectInput, DateRangeInput, PrimaryButton, AsyncSelectInput, utils, SearchSelectInput, selectUtils, InformationIcon, TextInput, DataTableManager, DataTableManagerProvider, SecondaryButton, Pagination, UserFilledIcon, UsersIcon, ImportIcon, LeadingIcon, customProperties, CheckActiveIcon, CheckInactiveIcon, Constraints, VerifiedIcon, ListWithSearchIcon, DotIcon } from '@commercetools-frontend/ui-kit';
|
|
@@ -31,6 +31,7 @@ import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
|
31
31
|
import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
32
32
|
import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
33
33
|
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
34
|
+
import { formatMoney, PRECISION_TYPES } from '@commercetools-frontend/experimental-components';
|
|
34
35
|
import groupBy from 'lodash/groupBy';
|
|
35
36
|
import 'common-tags/lib/oneLine';
|
|
36
37
|
import moment from 'moment-timezone';
|
|
@@ -79,7 +80,7 @@ import { oneLineTrim } from 'common-tags';
|
|
|
79
80
|
import { parseChunkImport, mapLocaleToIntlLocale } from '@commercetools-frontend/i18n';
|
|
80
81
|
|
|
81
82
|
// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
|
|
82
|
-
var version = "9.
|
|
83
|
+
var version = "9.3.1";
|
|
83
84
|
|
|
84
85
|
var fetchFeatureStatusQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchFeatureStatusQuery" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allFeatures" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 84, source: { body: "query FetchFeatureStatusQuery {\n allFeatures {\n name\n value\n reason\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
85
86
|
/**
|
|
@@ -1497,8 +1498,8 @@ const AddOrRemoveAssetPresenter = props => {
|
|
|
1497
1498
|
};
|
|
1498
1499
|
AddOrRemoveAssetPresenter.displayName = 'AddOrRemoveAssetPresenter';
|
|
1499
1500
|
|
|
1500
|
-
function ownKeys$
|
|
1501
|
-
function _objectSpread$
|
|
1501
|
+
function ownKeys$20(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; }
|
|
1502
|
+
function _objectSpread$20(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$20(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$20(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1502
1503
|
/**
|
|
1503
1504
|
* Maps custom type fields object property into an array
|
|
1504
1505
|
*
|
|
@@ -1523,13 +1524,13 @@ function transformCustomTypeValue(value) {
|
|
|
1523
1524
|
}
|
|
1524
1525
|
const mapCustomTypeFieldsToArray = value => {
|
|
1525
1526
|
var _context;
|
|
1526
|
-
return _objectSpread$
|
|
1527
|
+
return _objectSpread$20(_objectSpread$20({}, value), {}, {
|
|
1527
1528
|
fields: value?.fields ? _mapInstanceProperty(_context = _Object$entries(value.fields)).call(_context, _ref => {
|
|
1528
1529
|
let _ref2 = _slicedToArray(_ref, 2),
|
|
1529
1530
|
key = _ref2[0],
|
|
1530
1531
|
entry = _ref2[1];
|
|
1531
1532
|
const entryValue = entry.value !== undefined ? entry.value : entry;
|
|
1532
|
-
return _objectSpread$
|
|
1533
|
+
return _objectSpread$20(_objectSpread$20({}, entry), {}, {
|
|
1533
1534
|
name: key,
|
|
1534
1535
|
value: transformCustomTypeValue(entryValue)
|
|
1535
1536
|
});
|
|
@@ -1566,8 +1567,6 @@ const getItalicText = msg => jsx(Text.Detail, {
|
|
|
1566
1567
|
children: msg
|
|
1567
1568
|
}, crypto.randomUUID());
|
|
1568
1569
|
|
|
1569
|
-
const getNewLine = () => jsx("br", {}, crypto.randomUUID());
|
|
1570
|
-
|
|
1571
1570
|
const getPrimaryDetailText = msg => jsx(Text.Detail, {
|
|
1572
1571
|
as: "span",
|
|
1573
1572
|
tone: "primary",
|
|
@@ -1609,30 +1608,6 @@ const ComposedChange = props => jsx("div", {
|
|
|
1609
1608
|
});
|
|
1610
1609
|
ComposedChange.displayName = 'ComposedChange';
|
|
1611
1610
|
|
|
1612
|
-
const PRECISION_TYPES = {
|
|
1613
|
-
highPrecision: 'highPrecision',
|
|
1614
|
-
centPrecision: 'centPrecision'
|
|
1615
|
-
};
|
|
1616
|
-
|
|
1617
|
-
function ownKeys$20(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; }
|
|
1618
|
-
function _objectSpread$20(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$20(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$20(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1619
|
-
function getFractionedAmount(moneyValue) {
|
|
1620
|
-
const _moneyValue$fractionD = moneyValue.fractionDigits,
|
|
1621
|
-
fractionDigits = _moneyValue$fractionD === void 0 ? 2 : _moneyValue$fractionD;
|
|
1622
|
-
|
|
1623
|
-
// the amount should be available on preciseAmount for highPrecision
|
|
1624
|
-
const amount = moneyValue.type === PRECISION_TYPES.highPrecision ? moneyValue.preciseAmount : moneyValue.centAmount;
|
|
1625
|
-
return amount / 10 ** fractionDigits;
|
|
1626
|
-
}
|
|
1627
|
-
function formatMoney(moneyValue, intl, options) {
|
|
1628
|
-
if (moneyValue === null) return;
|
|
1629
|
-
return intl.formatNumber(getFractionedAmount(moneyValue), _objectSpread$20({
|
|
1630
|
-
style: 'currency',
|
|
1631
|
-
currency: moneyValue.currencyCode,
|
|
1632
|
-
minimumFractionDigits: moneyValue.fractionDigits
|
|
1633
|
-
}, options));
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
1611
|
/**
|
|
1637
1612
|
* Maps a RESOURCE_TYPE_ID (kebab-case) to the corresponding RESOURCE_TYPE (PascalCase).
|
|
1638
1613
|
* Returns `undefined` when the mapping does not exist.
|
|
@@ -2644,6 +2619,24 @@ function formatDateTime(type, value) {
|
|
|
2644
2619
|
}
|
|
2645
2620
|
}
|
|
2646
2621
|
|
|
2622
|
+
const FormattedDateTime = props => {
|
|
2623
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
2624
|
+
return {
|
|
2625
|
+
locale: applicationContext.user?.locale,
|
|
2626
|
+
timeZone: applicationContext.user?.timeZone
|
|
2627
|
+
};
|
|
2628
|
+
}),
|
|
2629
|
+
locale = _useApplicationContex.locale,
|
|
2630
|
+
timeZone = _useApplicationContex.timeZone;
|
|
2631
|
+
return jsx(Fragment, {
|
|
2632
|
+
children: formatDateTime(props.type, props.value, {
|
|
2633
|
+
timeZone: timeZone,
|
|
2634
|
+
locale: locale
|
|
2635
|
+
})
|
|
2636
|
+
});
|
|
2637
|
+
};
|
|
2638
|
+
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
2639
|
+
|
|
2647
2640
|
var messages$Z = defineMessages({
|
|
2648
2641
|
quantityLabel: {
|
|
2649
2642
|
id: 'ChangeItem.reservation.quantityLabel',
|
|
@@ -2682,7 +2675,6 @@ const DetailRow$3 = _ref => {
|
|
|
2682
2675
|
});
|
|
2683
2676
|
};
|
|
2684
2677
|
const ReservationPresenter = props => {
|
|
2685
|
-
const intl = useIntl();
|
|
2686
2678
|
const reservation = props.value || props.change.nextValue;
|
|
2687
2679
|
if (!reservation) {
|
|
2688
2680
|
return jsx(NoValueLabel, {});
|
|
@@ -2700,13 +2692,15 @@ const ReservationPresenter = props => {
|
|
|
2700
2692
|
})
|
|
2701
2693
|
}), jsx(DetailRow$3, {
|
|
2702
2694
|
label: jsx(FormattedMessage, _objectSpread$1T({}, messages$Z.createdAtLabel)),
|
|
2703
|
-
value: reservation.createdAt &&
|
|
2704
|
-
|
|
2695
|
+
value: reservation.createdAt && jsx(FormattedDateTime, {
|
|
2696
|
+
type: "datetime",
|
|
2697
|
+
value: reservation.createdAt
|
|
2705
2698
|
})
|
|
2706
2699
|
}), jsx(DetailRow$3, {
|
|
2707
2700
|
label: jsx(FormattedMessage, _objectSpread$1T({}, messages$Z.checkoutStartedAtLabel)),
|
|
2708
|
-
value: reservation.checkoutStartedAt &&
|
|
2709
|
-
|
|
2701
|
+
value: reservation.checkoutStartedAt && jsx(FormattedDateTime, {
|
|
2702
|
+
type: "datetime",
|
|
2703
|
+
value: reservation.checkoutStartedAt
|
|
2710
2704
|
})
|
|
2711
2705
|
})]
|
|
2712
2706
|
});
|
|
@@ -3082,8 +3076,6 @@ OrderChangeDiscountTypeCombinationPresenter.displayName = 'OrderChangeDiscountTy
|
|
|
3082
3076
|
function ownKeys$1Q(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; }
|
|
3083
3077
|
function _objectSpread$1Q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1Q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1Q(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3084
3078
|
const OrderDeliveryOrParcelPresenter = props => {
|
|
3085
|
-
const intl = useIntl();
|
|
3086
|
-
|
|
3087
3079
|
// For Add operations: props.value contains the added item
|
|
3088
3080
|
// For Remove operations: props.change.previousValue contains the removed item
|
|
3089
3081
|
const deliveryOrParcel = props.value || props.change.previousValue;
|
|
@@ -3093,9 +3085,10 @@ const OrderDeliveryOrParcelPresenter = props => {
|
|
|
3093
3085
|
const message = isParcelChange ? orderMessages.parcelDetailsLabel : orderMessages.deliveryDetailsLabel;
|
|
3094
3086
|
const dateKey = isParcelChange ? 'parcelDate' : 'deliveryDate';
|
|
3095
3087
|
const messageValues = {
|
|
3096
|
-
[dateKey]: deliveryOrParcel?.createdAt ?
|
|
3097
|
-
|
|
3098
|
-
|
|
3088
|
+
[dateKey]: deliveryOrParcel?.createdAt ? jsx(FormattedDateTime, {
|
|
3089
|
+
type: "datetime",
|
|
3090
|
+
value: deliveryOrParcel.createdAt
|
|
3091
|
+
}, dateKey) : jsx(NoValueFallback, {}, dateKey),
|
|
3099
3092
|
itemCount: deliveryOrParcel.items?.length || 0
|
|
3100
3093
|
};
|
|
3101
3094
|
|
|
@@ -3253,15 +3246,15 @@ const renderItems = items => jsx(Spacings.Stack, {
|
|
|
3253
3246
|
* **Use cases**: SetDeliveryItems, SetParcelItems
|
|
3254
3247
|
*/
|
|
3255
3248
|
const OrderItemsWithLabelPresenter = props => {
|
|
3256
|
-
const intl = useIntl();
|
|
3257
3249
|
const change = props.change;
|
|
3258
3250
|
const isParcelItems = change.change === ResourceChangeInput.SetParcelItems;
|
|
3259
3251
|
const label = isParcelItems ? jsx(FormattedMessage, _objectSpread$1N(_objectSpread$1N({}, orderMessages.parcelLabel), {}, {
|
|
3260
3252
|
values: {
|
|
3261
3253
|
b: getBoldText,
|
|
3262
|
-
parcelDate:
|
|
3263
|
-
|
|
3264
|
-
|
|
3254
|
+
parcelDate: change.parcel?.createdAt && jsx(FormattedDateTime, {
|
|
3255
|
+
type: "datetime",
|
|
3256
|
+
value: change.parcel.createdAt
|
|
3257
|
+
}, "parcelDate")
|
|
3265
3258
|
}
|
|
3266
3259
|
})) : jsx(FormattedMessage, _objectSpread$1N(_objectSpread$1N({}, orderMessages.deliveryLabel), {}, {
|
|
3267
3260
|
values: {
|
|
@@ -3675,15 +3668,15 @@ MeasurementsChange.displayName = 'MeasurementsChange';
|
|
|
3675
3668
|
function ownKeys$1G(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; }
|
|
3676
3669
|
function _objectSpread$1G(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1G(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1G(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3677
3670
|
const OrderParcelWithLabelPresenter = props => {
|
|
3678
|
-
const intl = useIntl();
|
|
3679
3671
|
const change = props.change;
|
|
3680
3672
|
const isTrackingData = change.change === ResourceChangeInput.SetParcelTrackingData;
|
|
3681
3673
|
const label = jsx(FormattedMessage, _objectSpread$1G(_objectSpread$1G({}, orderMessages.parcelLabel), {}, {
|
|
3682
3674
|
values: {
|
|
3683
3675
|
b: getBoldText,
|
|
3684
|
-
parcelDate:
|
|
3685
|
-
|
|
3686
|
-
|
|
3676
|
+
parcelDate: change.parcel?.createdAt && jsx(FormattedDateTime, {
|
|
3677
|
+
type: "datetime",
|
|
3678
|
+
value: change.parcel.createdAt
|
|
3679
|
+
}, "parcelDate")
|
|
3687
3680
|
}
|
|
3688
3681
|
}));
|
|
3689
3682
|
return jsx(ComposedChange, {
|
|
@@ -3730,14 +3723,14 @@ OrderPaymentPresenter.displayName = 'OrderPaymentPresenter';
|
|
|
3730
3723
|
function ownKeys$1F(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; }
|
|
3731
3724
|
function _objectSpread$1F(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1F(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1F(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3732
3725
|
const OrderReturnInfoPresenter = props => {
|
|
3733
|
-
const intl = useIntl();
|
|
3734
3726
|
return jsx("div", {
|
|
3735
3727
|
css: changeValueContainerStyles,
|
|
3736
3728
|
children: jsx(FormattedMessage, _objectSpread$1F(_objectSpread$1F({}, orderMessages.addReturnLabel), {}, {
|
|
3737
3729
|
values: {
|
|
3738
|
-
returnDate:
|
|
3739
|
-
|
|
3740
|
-
|
|
3730
|
+
returnDate: props.change.nextValue.returnDate ? jsx(FormattedDateTime, {
|
|
3731
|
+
type: "datetime",
|
|
3732
|
+
value: props.change.nextValue.returnDate
|
|
3733
|
+
}, "returnDate") : jsx(NoValueFallback, {}, "returnDate"),
|
|
3741
3734
|
returnTrackingId: props.change.nextValue.returnTrackingId || jsx(NoValueFallback, {}, "returnTrackingId"),
|
|
3742
3735
|
items: props.change.nextValue.items.length
|
|
3743
3736
|
}
|
|
@@ -4165,7 +4158,6 @@ OrderSetDiscountOnTotalPricePresenter.displayName = 'OrderSetDiscountOnTotalPric
|
|
|
4165
4158
|
function ownKeys$1z(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; }
|
|
4166
4159
|
function _objectSpread$1z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1z(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4167
4160
|
const OrderSyncInfoPresenter = props => {
|
|
4168
|
-
const intl = useIntl();
|
|
4169
4161
|
return jsx(ComposedChange, {
|
|
4170
4162
|
label: jsx(FormattedMessage, _objectSpread$1z(_objectSpread$1z({}, orderMessages.syncedChannelLabel), {}, {
|
|
4171
4163
|
values: {
|
|
@@ -4175,18 +4167,20 @@ const OrderSyncInfoPresenter = props => {
|
|
|
4175
4167
|
previousValue: props.change.previousValue ? jsx("div", {
|
|
4176
4168
|
children: jsx(FormattedMessage, _objectSpread$1z(_objectSpread$1z({}, orderMessages.syncedAtLabel), {}, {
|
|
4177
4169
|
values: {
|
|
4178
|
-
syncedAt:
|
|
4179
|
-
|
|
4180
|
-
|
|
4170
|
+
syncedAt: jsx(FormattedDateTime, {
|
|
4171
|
+
type: "datetime",
|
|
4172
|
+
value: props.change.previousValue.syncedAt
|
|
4173
|
+
}, "syncedAt")
|
|
4181
4174
|
}
|
|
4182
4175
|
}))
|
|
4183
4176
|
}) : jsx(NoValueLabel, {}),
|
|
4184
4177
|
nextValue: props.change.nextValue ? jsx("div", {
|
|
4185
4178
|
children: jsx(FormattedMessage, _objectSpread$1z(_objectSpread$1z({}, orderMessages.syncedAtLabel), {}, {
|
|
4186
4179
|
values: {
|
|
4187
|
-
syncedAt:
|
|
4188
|
-
|
|
4189
|
-
|
|
4180
|
+
syncedAt: jsx(FormattedDateTime, {
|
|
4181
|
+
type: "datetime",
|
|
4182
|
+
value: props.change.nextValue.syncedAt
|
|
4183
|
+
}, "syncedAt")
|
|
4190
4184
|
}
|
|
4191
4185
|
}))
|
|
4192
4186
|
}) : jsx(NoValueLabel, {})
|
|
@@ -4503,14 +4497,15 @@ LocalizedChangePresenter.displayName = 'LocalizedChangePresenter';
|
|
|
4503
4497
|
*/
|
|
4504
4498
|
const MoneyPresenter = props => {
|
|
4505
4499
|
const value = props.value;
|
|
4506
|
-
|
|
4500
|
+
const intl = useIntl();
|
|
4501
|
+
if (!value || !value.currencyCode) {
|
|
4507
4502
|
return null;
|
|
4508
4503
|
}
|
|
4509
|
-
const
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4504
|
+
const isHighPrecision = value.type === PRECISION_TYPES.highPrecision;
|
|
4505
|
+
const isMissingRequiredAmount = isHighPrecision ? value.preciseAmount === undefined : value.centAmount === undefined;
|
|
4506
|
+
if (isMissingRequiredAmount) return null;
|
|
4507
|
+
return jsx(Fragment, {
|
|
4508
|
+
children: formatMoney(value, intl)
|
|
4514
4509
|
});
|
|
4515
4510
|
};
|
|
4516
4511
|
MoneyPresenter.displayName = 'MoneyPresenter';
|
|
@@ -4763,24 +4758,6 @@ const CountryPresenter = _ref => {
|
|
|
4763
4758
|
};
|
|
4764
4759
|
CountryPresenter.displayName = 'CountryPresenter';
|
|
4765
4760
|
|
|
4766
|
-
const FormattedDateTime = props => {
|
|
4767
|
-
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
4768
|
-
return {
|
|
4769
|
-
locale: applicationContext.user?.locale,
|
|
4770
|
-
timeZone: applicationContext.user?.timeZone
|
|
4771
|
-
};
|
|
4772
|
-
}),
|
|
4773
|
-
locale = _useApplicationContex.locale,
|
|
4774
|
-
timeZone = _useApplicationContex.timeZone;
|
|
4775
|
-
return jsx(Fragment, {
|
|
4776
|
-
children: formatDateTime(props.type, props.value, {
|
|
4777
|
-
timeZone: timeZone,
|
|
4778
|
-
locale: locale
|
|
4779
|
-
})
|
|
4780
|
-
});
|
|
4781
|
-
};
|
|
4782
|
-
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
4783
|
-
|
|
4784
4761
|
const DateMode = {
|
|
4785
4762
|
/** Full timestamp - "12/25/2023 2:30 PM" */
|
|
4786
4763
|
DateTime: 'datetime',
|
|
@@ -7354,6 +7331,7 @@ function ShippingRatePresenter(props) {
|
|
|
7354
7331
|
var _context;
|
|
7355
7332
|
const change = props.change,
|
|
7356
7333
|
value = props.value;
|
|
7334
|
+
const intl = useIntl();
|
|
7357
7335
|
const shippingMethodChange = change;
|
|
7358
7336
|
const rateValue = value;
|
|
7359
7337
|
if (!rateValue) {
|
|
@@ -7377,21 +7355,13 @@ function ShippingRatePresenter(props) {
|
|
|
7377
7355
|
children: [rateValue.price && jsx("div", {
|
|
7378
7356
|
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$13.shippingRatePriceLabel), {}, {
|
|
7379
7357
|
values: {
|
|
7380
|
-
price:
|
|
7381
|
-
value: rateValue.price.centAmount / Math.pow(10, rateValue.price.fractionDigits || 2),
|
|
7382
|
-
style: "currency",
|
|
7383
|
-
currency: rateValue.price.currencyCode
|
|
7384
|
-
}, "price")
|
|
7358
|
+
price: formatMoney(rateValue.price, intl)
|
|
7385
7359
|
}
|
|
7386
7360
|
}))
|
|
7387
7361
|
}), rateValue.freeAbove && jsx("div", {
|
|
7388
7362
|
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$13.shippingRateFreeAboveLabel), {}, {
|
|
7389
7363
|
values: {
|
|
7390
|
-
freeAbove:
|
|
7391
|
-
value: rateValue.freeAbove.centAmount / Math.pow(10, rateValue.freeAbove.fractionDigits || 2),
|
|
7392
|
-
style: "currency",
|
|
7393
|
-
currency: rateValue.freeAbove.currencyCode
|
|
7394
|
-
}, "freeAbove")
|
|
7364
|
+
freeAbove: formatMoney(rateValue.freeAbove, intl)
|
|
7395
7365
|
}
|
|
7396
7366
|
}))
|
|
7397
7367
|
}), rateValue.tiers && rateValue.tiers.length > 0 && jsxs("div", {
|
|
@@ -7401,11 +7371,10 @@ function ShippingRatePresenter(props) {
|
|
|
7401
7371
|
css: changeValueContainerStyles,
|
|
7402
7372
|
children: [isCartValueTier(tier) && jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$13.cartValueShippingRateTierLabel), {}, {
|
|
7403
7373
|
values: {
|
|
7404
|
-
minimumCentAmount:
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
}, "minimumCentAmount")
|
|
7374
|
+
minimumCentAmount: formatMoney({
|
|
7375
|
+
currencyCode: rateValue.price.currencyCode,
|
|
7376
|
+
centAmount: tier.minimumCentAmount
|
|
7377
|
+
}, intl)
|
|
7409
7378
|
}
|
|
7410
7379
|
})), isCartClassificationTier(tier) && jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$13.cartClassificationShippingRateTierLabel), {}, {
|
|
7411
7380
|
values: {
|
|
@@ -8342,7 +8311,7 @@ var messages$L = defineMessages({
|
|
|
8342
8311
|
customObjectResource: {
|
|
8343
8312
|
id: 'ResourceCell.customObjectResource',
|
|
8344
8313
|
description: 'Label when the resource is a custom object',
|
|
8345
|
-
defaultMessage: 'Container: {container}
|
|
8314
|
+
defaultMessage: 'Container: {container}\nKey: {key}'
|
|
8346
8315
|
}
|
|
8347
8316
|
});
|
|
8348
8317
|
|
|
@@ -8352,8 +8321,7 @@ const getCustomObjectLabel = _ref => {
|
|
|
8352
8321
|
if ('container' in messageLabel && 'key' in messageLabel && messageLabel.container && messageLabel.key) {
|
|
8353
8322
|
return intl.formatMessage(messages$L.customObjectResource, {
|
|
8354
8323
|
container: messageLabel.container,
|
|
8355
|
-
key: messageLabel.key
|
|
8356
|
-
br: getNewLine
|
|
8324
|
+
key: messageLabel.key
|
|
8357
8325
|
});
|
|
8358
8326
|
}
|
|
8359
8327
|
return jsx(NoValueFallback, {});
|
|
@@ -8364,8 +8332,7 @@ const mapLabel$2 = _ref => {
|
|
|
8364
8332
|
intl = _ref.intl;
|
|
8365
8333
|
return data.container && data.key ? intl.formatMessage(messages$L.customObjectResource, {
|
|
8366
8334
|
container: data.container,
|
|
8367
|
-
key: data.key
|
|
8368
|
-
br: getNewLine
|
|
8335
|
+
key: data.key
|
|
8369
8336
|
}) : jsx(NoValueFallback, {});
|
|
8370
8337
|
};
|
|
8371
8338
|
|
|
@@ -21322,15 +21289,15 @@ const loadMessages = locale => {
|
|
|
21322
21289
|
const intlLocale = mapLocaleToIntlLocale(locale);
|
|
21323
21290
|
switch (intlLocale) {
|
|
21324
21291
|
case 'de':
|
|
21325
|
-
return import(/* webpackChunkName: "change-history-i18n-de" */'./de-
|
|
21292
|
+
return import(/* webpackChunkName: "change-history-i18n-de" */'./de-ff92c46c.esm.js');
|
|
21326
21293
|
case 'es':
|
|
21327
|
-
return import(/* webpackChunkName: "change-history-i18n-es" */'./es-
|
|
21294
|
+
return import(/* webpackChunkName: "change-history-i18n-es" */'./es-f970b913.esm.js');
|
|
21328
21295
|
case 'fr-FR':
|
|
21329
|
-
return import(/* webpackChunkName: "change-history-i18n-fr-FR" */'./fr-FR-
|
|
21296
|
+
return import(/* webpackChunkName: "change-history-i18n-fr-FR" */'./fr-FR-0b78bf1f.esm.js');
|
|
21330
21297
|
case 'pt-BR':
|
|
21331
|
-
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
21298
|
+
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-7b8b942e.esm.js');
|
|
21332
21299
|
default:
|
|
21333
|
-
return import(/* webpackChunkName: "change-history-i18n-en" */'./en-
|
|
21300
|
+
return import(/* webpackChunkName: "change-history-i18n-en" */'./en-95f84692.esm.js');
|
|
21334
21301
|
}
|
|
21335
21302
|
};
|
|
21336
21303
|
|