@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
|
@@ -35,6 +35,7 @@ var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
|
35
35
|
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
36
36
|
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
37
37
|
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
38
|
+
var experimentalComponents = require('@commercetools-frontend/experimental-components');
|
|
38
39
|
var groupBy = require('lodash/groupBy');
|
|
39
40
|
require('common-tags/lib/oneLine');
|
|
40
41
|
var moment = require('moment-timezone');
|
|
@@ -134,7 +135,7 @@ var debounce__default = /*#__PURE__*/_interopDefault(debounce);
|
|
|
134
135
|
var RadioInput__default = /*#__PURE__*/_interopDefault(RadioInput);
|
|
135
136
|
|
|
136
137
|
// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
|
|
137
|
-
var version = "9.
|
|
138
|
+
var version = "9.3.1";
|
|
138
139
|
|
|
139
140
|
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 } } } };
|
|
140
141
|
/**
|
|
@@ -1552,8 +1553,8 @@ const AddOrRemoveAssetPresenter = props => {
|
|
|
1552
1553
|
};
|
|
1553
1554
|
AddOrRemoveAssetPresenter.displayName = 'AddOrRemoveAssetPresenter';
|
|
1554
1555
|
|
|
1555
|
-
function ownKeys$
|
|
1556
|
-
function _objectSpread$
|
|
1556
|
+
function ownKeys$20(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; }
|
|
1557
|
+
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__default["default"](_context2 = ownKeys$20(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$20(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1557
1558
|
/**
|
|
1558
1559
|
* Maps custom type fields object property into an array
|
|
1559
1560
|
*
|
|
@@ -1578,13 +1579,13 @@ function transformCustomTypeValue(value) {
|
|
|
1578
1579
|
}
|
|
1579
1580
|
const mapCustomTypeFieldsToArray = value => {
|
|
1580
1581
|
var _context;
|
|
1581
|
-
return _objectSpread$
|
|
1582
|
+
return _objectSpread$20(_objectSpread$20({}, value), {}, {
|
|
1582
1583
|
fields: value?.fields ? _mapInstanceProperty__default["default"](_context = _Object$entries__default["default"](value.fields)).call(_context, _ref => {
|
|
1583
1584
|
let _ref2 = _slicedToArray(_ref, 2),
|
|
1584
1585
|
key = _ref2[0],
|
|
1585
1586
|
entry = _ref2[1];
|
|
1586
1587
|
const entryValue = entry.value !== undefined ? entry.value : entry;
|
|
1587
|
-
return _objectSpread$
|
|
1588
|
+
return _objectSpread$20(_objectSpread$20({}, entry), {}, {
|
|
1588
1589
|
name: key,
|
|
1589
1590
|
value: transformCustomTypeValue(entryValue)
|
|
1590
1591
|
});
|
|
@@ -1621,8 +1622,6 @@ const getItalicText = msg => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
|
1621
1622
|
children: msg
|
|
1622
1623
|
}, crypto.randomUUID());
|
|
1623
1624
|
|
|
1624
|
-
const getNewLine = () => jsxRuntime.jsx("br", {}, crypto.randomUUID());
|
|
1625
|
-
|
|
1626
1625
|
const getPrimaryDetailText = msg => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
1627
1626
|
as: "span",
|
|
1628
1627
|
tone: "primary",
|
|
@@ -1664,30 +1663,6 @@ const ComposedChange = props => jsxRuntime.jsx("div", {
|
|
|
1664
1663
|
});
|
|
1665
1664
|
ComposedChange.displayName = 'ComposedChange';
|
|
1666
1665
|
|
|
1667
|
-
const PRECISION_TYPES = {
|
|
1668
|
-
highPrecision: 'highPrecision',
|
|
1669
|
-
centPrecision: 'centPrecision'
|
|
1670
|
-
};
|
|
1671
|
-
|
|
1672
|
-
function ownKeys$20(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; }
|
|
1673
|
-
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__default["default"](_context = ownKeys$20(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$20(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1674
|
-
function getFractionedAmount(moneyValue) {
|
|
1675
|
-
const _moneyValue$fractionD = moneyValue.fractionDigits,
|
|
1676
|
-
fractionDigits = _moneyValue$fractionD === void 0 ? 2 : _moneyValue$fractionD;
|
|
1677
|
-
|
|
1678
|
-
// the amount should be available on preciseAmount for highPrecision
|
|
1679
|
-
const amount = moneyValue.type === PRECISION_TYPES.highPrecision ? moneyValue.preciseAmount : moneyValue.centAmount;
|
|
1680
|
-
return amount / 10 ** fractionDigits;
|
|
1681
|
-
}
|
|
1682
|
-
function formatMoney(moneyValue, intl, options) {
|
|
1683
|
-
if (moneyValue === null) return;
|
|
1684
|
-
return intl.formatNumber(getFractionedAmount(moneyValue), _objectSpread$20({
|
|
1685
|
-
style: 'currency',
|
|
1686
|
-
currency: moneyValue.currencyCode,
|
|
1687
|
-
minimumFractionDigits: moneyValue.fractionDigits
|
|
1688
|
-
}, options));
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
1666
|
/**
|
|
1692
1667
|
* Maps a RESOURCE_TYPE_ID (kebab-case) to the corresponding RESOURCE_TYPE (PascalCase).
|
|
1693
1668
|
* Returns `undefined` when the mapping does not exist.
|
|
@@ -1794,7 +1769,7 @@ const ChangeItemValueByType = props => {
|
|
|
1794
1769
|
const intl = reactIntl.useIntl();
|
|
1795
1770
|
if (props.value === null || props.value === undefined) return jsxRuntime.jsx(NoValueLabel, {});
|
|
1796
1771
|
if (props.value.currencyCode) {
|
|
1797
|
-
return formatMoney(props.value, intl);
|
|
1772
|
+
return experimentalComponents.formatMoney(props.value, intl);
|
|
1798
1773
|
}
|
|
1799
1774
|
if (typeof props.value === 'boolean') return _JSON$stringify__default["default"](props.value);
|
|
1800
1775
|
if (props.value.key) {
|
|
@@ -2699,6 +2674,24 @@ function formatDateTime(type, value) {
|
|
|
2699
2674
|
}
|
|
2700
2675
|
}
|
|
2701
2676
|
|
|
2677
|
+
const FormattedDateTime = props => {
|
|
2678
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
2679
|
+
return {
|
|
2680
|
+
locale: applicationContext.user?.locale,
|
|
2681
|
+
timeZone: applicationContext.user?.timeZone
|
|
2682
|
+
};
|
|
2683
|
+
}),
|
|
2684
|
+
locale = _useApplicationContex.locale,
|
|
2685
|
+
timeZone = _useApplicationContex.timeZone;
|
|
2686
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
2687
|
+
children: formatDateTime(props.type, props.value, {
|
|
2688
|
+
timeZone: timeZone,
|
|
2689
|
+
locale: locale
|
|
2690
|
+
})
|
|
2691
|
+
});
|
|
2692
|
+
};
|
|
2693
|
+
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
2694
|
+
|
|
2702
2695
|
var messages$Z = reactIntl.defineMessages({
|
|
2703
2696
|
quantityLabel: {
|
|
2704
2697
|
id: 'ChangeItem.reservation.quantityLabel',
|
|
@@ -2737,7 +2730,6 @@ const DetailRow$3 = _ref => {
|
|
|
2737
2730
|
});
|
|
2738
2731
|
};
|
|
2739
2732
|
const ReservationPresenter = props => {
|
|
2740
|
-
const intl = reactIntl.useIntl();
|
|
2741
2733
|
const reservation = props.value || props.change.nextValue;
|
|
2742
2734
|
if (!reservation) {
|
|
2743
2735
|
return jsxRuntime.jsx(NoValueLabel, {});
|
|
@@ -2755,13 +2747,15 @@ const ReservationPresenter = props => {
|
|
|
2755
2747
|
})
|
|
2756
2748
|
}), jsxRuntime.jsx(DetailRow$3, {
|
|
2757
2749
|
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1T({}, messages$Z.createdAtLabel)),
|
|
2758
|
-
value: reservation.createdAt &&
|
|
2759
|
-
|
|
2750
|
+
value: reservation.createdAt && jsxRuntime.jsx(FormattedDateTime, {
|
|
2751
|
+
type: "datetime",
|
|
2752
|
+
value: reservation.createdAt
|
|
2760
2753
|
})
|
|
2761
2754
|
}), jsxRuntime.jsx(DetailRow$3, {
|
|
2762
2755
|
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1T({}, messages$Z.checkoutStartedAtLabel)),
|
|
2763
|
-
value: reservation.checkoutStartedAt &&
|
|
2764
|
-
|
|
2756
|
+
value: reservation.checkoutStartedAt && jsxRuntime.jsx(FormattedDateTime, {
|
|
2757
|
+
type: "datetime",
|
|
2758
|
+
value: reservation.checkoutStartedAt
|
|
2765
2759
|
})
|
|
2766
2760
|
})]
|
|
2767
2761
|
});
|
|
@@ -3137,8 +3131,6 @@ OrderChangeDiscountTypeCombinationPresenter.displayName = 'OrderChangeDiscountTy
|
|
|
3137
3131
|
function ownKeys$1Q(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; }
|
|
3138
3132
|
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__default["default"](_context = ownKeys$1Q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1Q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3139
3133
|
const OrderDeliveryOrParcelPresenter = props => {
|
|
3140
|
-
const intl = reactIntl.useIntl();
|
|
3141
|
-
|
|
3142
3134
|
// For Add operations: props.value contains the added item
|
|
3143
3135
|
// For Remove operations: props.change.previousValue contains the removed item
|
|
3144
3136
|
const deliveryOrParcel = props.value || props.change.previousValue;
|
|
@@ -3148,9 +3140,10 @@ const OrderDeliveryOrParcelPresenter = props => {
|
|
|
3148
3140
|
const message = isParcelChange ? orderMessages.parcelDetailsLabel : orderMessages.deliveryDetailsLabel;
|
|
3149
3141
|
const dateKey = isParcelChange ? 'parcelDate' : 'deliveryDate';
|
|
3150
3142
|
const messageValues = {
|
|
3151
|
-
[dateKey]: deliveryOrParcel?.createdAt ?
|
|
3152
|
-
|
|
3153
|
-
|
|
3143
|
+
[dateKey]: deliveryOrParcel?.createdAt ? jsxRuntime.jsx(FormattedDateTime, {
|
|
3144
|
+
type: "datetime",
|
|
3145
|
+
value: deliveryOrParcel.createdAt
|
|
3146
|
+
}, dateKey) : jsxRuntime.jsx(NoValueFallback, {}, dateKey),
|
|
3154
3147
|
itemCount: deliveryOrParcel.items?.length || 0
|
|
3155
3148
|
};
|
|
3156
3149
|
|
|
@@ -3231,7 +3224,7 @@ const OrderItemDetailsPresenter = props => {
|
|
|
3231
3224
|
value: item.quantity
|
|
3232
3225
|
}), jsxRuntime.jsx(DetailRow$2, {
|
|
3233
3226
|
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1P({}, orderMessages.totalPriceColumnLabel)),
|
|
3234
|
-
value: formatMoney(item.totalPrice, intl)
|
|
3227
|
+
value: experimentalComponents.formatMoney(item.totalPrice, intl)
|
|
3235
3228
|
})]
|
|
3236
3229
|
});
|
|
3237
3230
|
};
|
|
@@ -3308,15 +3301,15 @@ const renderItems = items => jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
|
3308
3301
|
* **Use cases**: SetDeliveryItems, SetParcelItems
|
|
3309
3302
|
*/
|
|
3310
3303
|
const OrderItemsWithLabelPresenter = props => {
|
|
3311
|
-
const intl = reactIntl.useIntl();
|
|
3312
3304
|
const change = props.change;
|
|
3313
3305
|
const isParcelItems = change.change === ResourceChangeInput.SetParcelItems;
|
|
3314
3306
|
const label = isParcelItems ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1N(_objectSpread$1N({}, orderMessages.parcelLabel), {}, {
|
|
3315
3307
|
values: {
|
|
3316
3308
|
b: getBoldText,
|
|
3317
|
-
parcelDate:
|
|
3318
|
-
|
|
3319
|
-
|
|
3309
|
+
parcelDate: change.parcel?.createdAt && jsxRuntime.jsx(FormattedDateTime, {
|
|
3310
|
+
type: "datetime",
|
|
3311
|
+
value: change.parcel.createdAt
|
|
3312
|
+
}, "parcelDate")
|
|
3320
3313
|
}
|
|
3321
3314
|
})) : jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1N(_objectSpread$1N({}, orderMessages.deliveryLabel), {}, {
|
|
3322
3315
|
values: {
|
|
@@ -3388,7 +3381,7 @@ const OrderLineItemDiscountedPricePerQuantityPresenter = props => {
|
|
|
3388
3381
|
}), jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3389
3382
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1M(_objectSpread$1M({}, orderMessages.discountedPriceLabel), {}, {
|
|
3390
3383
|
values: {
|
|
3391
|
-
discountedPrice: formatMoney(props.change.nextValue.discountedPrice.value, intl)
|
|
3384
|
+
discountedPrice: experimentalComponents.formatMoney(props.change.nextValue.discountedPrice.value, intl)
|
|
3392
3385
|
}
|
|
3393
3386
|
}))
|
|
3394
3387
|
})]
|
|
@@ -3404,7 +3397,7 @@ const OrderLineItemDiscountedPricePerQuantityPresenter = props => {
|
|
|
3404
3397
|
}), jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3405
3398
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1M(_objectSpread$1M({}, orderMessages.discountedPriceLabel), {}, {
|
|
3406
3399
|
values: {
|
|
3407
|
-
discountedPrice: formatMoney(props.change.previousValue.discountedPrice.value, intl)
|
|
3400
|
+
discountedPrice: experimentalComponents.formatMoney(props.change.previousValue.discountedPrice.value, intl)
|
|
3408
3401
|
}
|
|
3409
3402
|
}))
|
|
3410
3403
|
})]
|
|
@@ -3426,15 +3419,15 @@ const OrderLineItemPricePresenter = props => {
|
|
|
3426
3419
|
const label = isCustomLineItem ? getCustomLineItemLabel(props.change, applicationContext.language, applicationContext.languages || []) : getLineItemLabel(props.change, applicationContext.language, applicationContext.languages || []);
|
|
3427
3420
|
const getNextValue = () => {
|
|
3428
3421
|
if (hasNestedValue) {
|
|
3429
|
-
return props.change.nextValue?.value ? formatMoney(props.change.nextValue.value, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
3422
|
+
return props.change.nextValue?.value ? experimentalComponents.formatMoney(props.change.nextValue.value, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
3430
3423
|
}
|
|
3431
|
-
return props.change.nextValue ? formatMoney(props.change.nextValue, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
3424
|
+
return props.change.nextValue ? experimentalComponents.formatMoney(props.change.nextValue, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
3432
3425
|
};
|
|
3433
3426
|
const getPreviousValue = () => {
|
|
3434
3427
|
if (hasNestedValue) {
|
|
3435
|
-
return props.change.previousValue?.value ? formatMoney(props.change.previousValue.value, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
3428
|
+
return props.change.previousValue?.value ? experimentalComponents.formatMoney(props.change.previousValue.value, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
3436
3429
|
}
|
|
3437
|
-
return props.change.previousValue ? formatMoney(props.change.previousValue, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
3430
|
+
return props.change.previousValue ? experimentalComponents.formatMoney(props.change.previousValue, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
3438
3431
|
};
|
|
3439
3432
|
return jsxRuntime.jsx(ComposedChange, {
|
|
3440
3433
|
label: label,
|
|
@@ -3564,13 +3557,13 @@ const TaxedPriceChange = props => {
|
|
|
3564
3557
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3565
3558
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1I(_objectSpread$1I({}, messages$13.totalNetLabel), {}, {
|
|
3566
3559
|
values: {
|
|
3567
|
-
totalNet: formatMoney(props.value.totalNet, intl)
|
|
3560
|
+
totalNet: experimentalComponents.formatMoney(props.value.totalNet, intl)
|
|
3568
3561
|
}
|
|
3569
3562
|
}))
|
|
3570
3563
|
}), jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3571
3564
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1I(_objectSpread$1I({}, messages$13.totalGrossLabel), {}, {
|
|
3572
3565
|
values: {
|
|
3573
|
-
totalGross: formatMoney(props.value.totalGross, intl)
|
|
3566
|
+
totalGross: experimentalComponents.formatMoney(props.value.totalGross, intl)
|
|
3574
3567
|
}
|
|
3575
3568
|
}))
|
|
3576
3569
|
}), props.value.taxPortions && jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -3590,7 +3583,7 @@ const TaxedPriceChange = props => {
|
|
|
3590
3583
|
}), jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3591
3584
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1I(_objectSpread$1I({}, messages$13.taxPortionItemLabel), {}, {
|
|
3592
3585
|
values: {
|
|
3593
|
-
amount: formatMoney(taxPortion.amount, intl),
|
|
3586
|
+
amount: experimentalComponents.formatMoney(taxPortion.amount, intl),
|
|
3594
3587
|
rate: taxPortion.rate
|
|
3595
3588
|
}
|
|
3596
3589
|
}))
|
|
@@ -3730,15 +3723,15 @@ MeasurementsChange.displayName = 'MeasurementsChange';
|
|
|
3730
3723
|
function ownKeys$1G(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; }
|
|
3731
3724
|
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__default["default"](_context = ownKeys$1G(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1G(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3732
3725
|
const OrderParcelWithLabelPresenter = props => {
|
|
3733
|
-
const intl = reactIntl.useIntl();
|
|
3734
3726
|
const change = props.change;
|
|
3735
3727
|
const isTrackingData = change.change === ResourceChangeInput.SetParcelTrackingData;
|
|
3736
3728
|
const label = jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1G(_objectSpread$1G({}, orderMessages.parcelLabel), {}, {
|
|
3737
3729
|
values: {
|
|
3738
3730
|
b: getBoldText,
|
|
3739
|
-
parcelDate:
|
|
3740
|
-
|
|
3741
|
-
|
|
3731
|
+
parcelDate: change.parcel?.createdAt && jsxRuntime.jsx(FormattedDateTime, {
|
|
3732
|
+
type: "datetime",
|
|
3733
|
+
value: change.parcel.createdAt
|
|
3734
|
+
}, "parcelDate")
|
|
3742
3735
|
}
|
|
3743
3736
|
}));
|
|
3744
3737
|
return jsxRuntime.jsx(ComposedChange, {
|
|
@@ -3763,7 +3756,7 @@ const OrderPaymentPresenter = props => {
|
|
|
3763
3756
|
previousValue: jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
3764
3757
|
scale: "xs",
|
|
3765
3758
|
children: props.change.previousValue?.payments.length > 0 ? props.change.previousValue?.payments.map(payment => {
|
|
3766
|
-
const paymentLabel = payment.amountPlanned ? formatMoney(payment.amountPlanned, intl) : `Payment ${payment.id}`;
|
|
3759
|
+
const paymentLabel = payment.amountPlanned ? experimentalComponents.formatMoney(payment.amountPlanned, intl) : `Payment ${payment.id}`;
|
|
3767
3760
|
return jsxRuntime.jsx("div", {
|
|
3768
3761
|
children: paymentLabel
|
|
3769
3762
|
}, `prev-${payment.id}`);
|
|
@@ -3772,7 +3765,7 @@ const OrderPaymentPresenter = props => {
|
|
|
3772
3765
|
nextValue: jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
3773
3766
|
scale: "xs",
|
|
3774
3767
|
children: props.change.nextValue?.payments.length > 0 ? props.change.nextValue?.payments.map(payment => {
|
|
3775
|
-
const paymentLabel = payment.amountPlanned ? formatMoney(payment.amountPlanned, intl) : `Payment ${payment.id}`;
|
|
3768
|
+
const paymentLabel = payment.amountPlanned ? experimentalComponents.formatMoney(payment.amountPlanned, intl) : `Payment ${payment.id}`;
|
|
3776
3769
|
return jsxRuntime.jsx("div", {
|
|
3777
3770
|
children: paymentLabel
|
|
3778
3771
|
}, `next-${payment.id}`);
|
|
@@ -3785,14 +3778,14 @@ OrderPaymentPresenter.displayName = 'OrderPaymentPresenter';
|
|
|
3785
3778
|
function ownKeys$1F(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; }
|
|
3786
3779
|
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__default["default"](_context = ownKeys$1F(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1F(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3787
3780
|
const OrderReturnInfoPresenter = props => {
|
|
3788
|
-
const intl = reactIntl.useIntl();
|
|
3789
3781
|
return jsxRuntime.jsx("div", {
|
|
3790
3782
|
css: changeValueContainerStyles,
|
|
3791
3783
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1F(_objectSpread$1F({}, orderMessages.addReturnLabel), {}, {
|
|
3792
3784
|
values: {
|
|
3793
|
-
returnDate:
|
|
3794
|
-
|
|
3795
|
-
|
|
3785
|
+
returnDate: props.change.nextValue.returnDate ? jsxRuntime.jsx(FormattedDateTime, {
|
|
3786
|
+
type: "datetime",
|
|
3787
|
+
value: props.change.nextValue.returnDate
|
|
3788
|
+
}, "returnDate") : jsxRuntime.jsx(NoValueFallback, {}, "returnDate"),
|
|
3796
3789
|
returnTrackingId: props.change.nextValue.returnTrackingId || jsxRuntime.jsx(NoValueFallback, {}, "returnTrackingId"),
|
|
3797
3790
|
items: props.change.nextValue.items.length
|
|
3798
3791
|
}
|
|
@@ -3904,7 +3897,7 @@ const OrderDirectDiscountsPresenter = props => {
|
|
|
3904
3897
|
})), discount.value.type === 'absolute' && 'money' in discount.value && jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
3905
3898
|
scale: "xs",
|
|
3906
3899
|
children: _mapInstanceProperty__default["default"](_context = discount.value.money).call(_context, (moneyValue, idx) => jsxRuntime.jsx("div", {
|
|
3907
|
-
children: formatMoney(moneyValue, intl)
|
|
3900
|
+
children: experimentalComponents.formatMoney(moneyValue, intl)
|
|
3908
3901
|
}, `money-${idx}`))
|
|
3909
3902
|
})]
|
|
3910
3903
|
})]
|
|
@@ -3952,7 +3945,7 @@ const renderDiscountedPrice$1 = (discountedPrice, intl) => {
|
|
|
3952
3945
|
}), jsxRuntime.jsx("div", {
|
|
3953
3946
|
css: changeValueContainerStyles,
|
|
3954
3947
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3955
|
-
children: formatMoney(discountedPrice.value, intl)
|
|
3948
|
+
children: experimentalComponents.formatMoney(discountedPrice.value, intl)
|
|
3956
3949
|
})
|
|
3957
3950
|
})]
|
|
3958
3951
|
}), discountedPrice.includedDiscounts && discountedPrice.includedDiscounts.length > 0 && jsxRuntime.jsxs("div", {
|
|
@@ -3971,7 +3964,7 @@ const renderDiscountedPrice$1 = (discountedPrice, intl) => {
|
|
|
3971
3964
|
}), jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3972
3965
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1C(_objectSpread$1C({}, orderMessages.discountedPriceLabel), {}, {
|
|
3973
3966
|
values: {
|
|
3974
|
-
discountedPrice: formatMoney(discount.discountedAmount, intl)
|
|
3967
|
+
discountedPrice: experimentalComponents.formatMoney(discount.discountedAmount, intl)
|
|
3975
3968
|
}
|
|
3976
3969
|
}))
|
|
3977
3970
|
})]
|
|
@@ -4074,7 +4067,7 @@ const OrderShippingPresenter = _ref2 => {
|
|
|
4074
4067
|
value: shipping.shippingInfo?.shippingMethodName || jsxRuntime.jsx(NoValueLabel, {})
|
|
4075
4068
|
}), jsxRuntime.jsx(DetailRow$1, {
|
|
4076
4069
|
label: intl.formatMessage(orderMessages.orderShippingShippingPriceLabel),
|
|
4077
|
-
value: shipping.shippingInfo?.price ? formatMoney(shipping.shippingInfo.price, intl) : jsxRuntime.jsx(NoValueLabel, {})
|
|
4070
|
+
value: shipping.shippingInfo?.price ? experimentalComponents.formatMoney(shipping.shippingInfo.price, intl) : jsxRuntime.jsx(NoValueLabel, {})
|
|
4078
4071
|
}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
4079
4072
|
scale: "xs",
|
|
4080
4073
|
children: [jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
@@ -4183,13 +4176,13 @@ const OrderSetDiscountOnTotalPricePresenter = props => {
|
|
|
4183
4176
|
scale: "xs",
|
|
4184
4177
|
children: [jsxRuntime.jsx(DetailRow, {
|
|
4185
4178
|
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1A({}, messages$Y.discountedAmountLabel)),
|
|
4186
|
-
value: discountOnTotalPrice.discountedAmount && formatMoney(discountOnTotalPrice.discountedAmount, intl)
|
|
4179
|
+
value: discountOnTotalPrice.discountedAmount && experimentalComponents.formatMoney(discountOnTotalPrice.discountedAmount, intl)
|
|
4187
4180
|
}), jsxRuntime.jsx(DetailRow, {
|
|
4188
4181
|
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1A({}, messages$Y.discountedNetAmountLabel)),
|
|
4189
|
-
value: discountOnTotalPrice.discountedNetAmount && formatMoney(discountOnTotalPrice.discountedNetAmount, intl)
|
|
4182
|
+
value: discountOnTotalPrice.discountedNetAmount && experimentalComponents.formatMoney(discountOnTotalPrice.discountedNetAmount, intl)
|
|
4190
4183
|
}), jsxRuntime.jsx(DetailRow, {
|
|
4191
4184
|
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1A({}, messages$Y.discountedGrossAmountLabel)),
|
|
4192
|
-
value: discountOnTotalPrice.discountedGrossAmount && formatMoney(discountOnTotalPrice.discountedGrossAmount, intl)
|
|
4185
|
+
value: discountOnTotalPrice.discountedGrossAmount && experimentalComponents.formatMoney(discountOnTotalPrice.discountedGrossAmount, intl)
|
|
4193
4186
|
}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
4194
4187
|
scale: "xs",
|
|
4195
4188
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -4206,7 +4199,7 @@ const OrderSetDiscountOnTotalPricePresenter = props => {
|
|
|
4206
4199
|
typeId: 'cart-discount'
|
|
4207
4200
|
}) : jsxRuntime.jsx(NoValueLabel, {})
|
|
4208
4201
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
4209
|
-
children: [jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1A({}, messages$Y.includedDiscountedAmountLabel)), ":", ' ', includedDiscount.discountedAmount ? formatMoney(includedDiscount.discountedAmount, intl) : jsxRuntime.jsx(NoValueLabel, {})]
|
|
4202
|
+
children: [jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1A({}, messages$Y.includedDiscountedAmountLabel)), ":", ' ', includedDiscount.discountedAmount ? experimentalComponents.formatMoney(includedDiscount.discountedAmount, intl) : jsxRuntime.jsx(NoValueLabel, {})]
|
|
4210
4203
|
})]
|
|
4211
4204
|
})
|
|
4212
4205
|
}, `${discountReference?.id || 'discount'}-${index}`);
|
|
@@ -4220,7 +4213,6 @@ OrderSetDiscountOnTotalPricePresenter.displayName = 'OrderSetDiscountOnTotalPric
|
|
|
4220
4213
|
function ownKeys$1z(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; }
|
|
4221
4214
|
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__default["default"](_context = ownKeys$1z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4222
4215
|
const OrderSyncInfoPresenter = props => {
|
|
4223
|
-
const intl = reactIntl.useIntl();
|
|
4224
4216
|
return jsxRuntime.jsx(ComposedChange, {
|
|
4225
4217
|
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1z(_objectSpread$1z({}, orderMessages.syncedChannelLabel), {}, {
|
|
4226
4218
|
values: {
|
|
@@ -4230,18 +4222,20 @@ const OrderSyncInfoPresenter = props => {
|
|
|
4230
4222
|
previousValue: props.change.previousValue ? jsxRuntime.jsx("div", {
|
|
4231
4223
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1z(_objectSpread$1z({}, orderMessages.syncedAtLabel), {}, {
|
|
4232
4224
|
values: {
|
|
4233
|
-
syncedAt:
|
|
4234
|
-
|
|
4235
|
-
|
|
4225
|
+
syncedAt: jsxRuntime.jsx(FormattedDateTime, {
|
|
4226
|
+
type: "datetime",
|
|
4227
|
+
value: props.change.previousValue.syncedAt
|
|
4228
|
+
}, "syncedAt")
|
|
4236
4229
|
}
|
|
4237
4230
|
}))
|
|
4238
4231
|
}) : jsxRuntime.jsx(NoValueLabel, {}),
|
|
4239
4232
|
nextValue: props.change.nextValue ? jsxRuntime.jsx("div", {
|
|
4240
4233
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1z(_objectSpread$1z({}, orderMessages.syncedAtLabel), {}, {
|
|
4241
4234
|
values: {
|
|
4242
|
-
syncedAt:
|
|
4243
|
-
|
|
4244
|
-
|
|
4235
|
+
syncedAt: jsxRuntime.jsx(FormattedDateTime, {
|
|
4236
|
+
type: "datetime",
|
|
4237
|
+
value: props.change.nextValue.syncedAt
|
|
4238
|
+
}, "syncedAt")
|
|
4245
4239
|
}
|
|
4246
4240
|
}))
|
|
4247
4241
|
}) : jsxRuntime.jsx(NoValueLabel, {})
|
|
@@ -4265,7 +4259,7 @@ const renderDiscountedPrice = (discountedPrice, intl) => {
|
|
|
4265
4259
|
}), jsxRuntime.jsx("div", {
|
|
4266
4260
|
css: changeValueContainerStyles,
|
|
4267
4261
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
4268
|
-
children: formatMoney(discountedPrice.value, intl)
|
|
4262
|
+
children: experimentalComponents.formatMoney(discountedPrice.value, intl)
|
|
4269
4263
|
})
|
|
4270
4264
|
})]
|
|
4271
4265
|
}), discountedPrice.includedDiscounts && discountedPrice.includedDiscounts.length > 0 && jsxRuntime.jsxs("div", {
|
|
@@ -4284,7 +4278,7 @@ const renderDiscountedPrice = (discountedPrice, intl) => {
|
|
|
4284
4278
|
}), jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
4285
4279
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1y(_objectSpread$1y({}, orderMessages.discountedPriceLabel), {}, {
|
|
4286
4280
|
values: {
|
|
4287
|
-
discountedPrice: formatMoney(discount.discountedAmount, intl)
|
|
4281
|
+
discountedPrice: experimentalComponents.formatMoney(discount.discountedAmount, intl)
|
|
4288
4282
|
}
|
|
4289
4283
|
}))
|
|
4290
4284
|
})]
|
|
@@ -4341,7 +4335,7 @@ const renderDiscountedPriceForQuantity = (priceForQuantity, intl) => {
|
|
|
4341
4335
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
4342
4336
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1x(_objectSpread$1x({}, orderMessages.discountedPriceLabel), {}, {
|
|
4343
4337
|
values: {
|
|
4344
|
-
discountedPrice: formatMoney(priceForQuantity.discountedPrice.value, intl)
|
|
4338
|
+
discountedPrice: experimentalComponents.formatMoney(priceForQuantity.discountedPrice.value, intl)
|
|
4345
4339
|
}
|
|
4346
4340
|
}))
|
|
4347
4341
|
})
|
|
@@ -4362,7 +4356,7 @@ const renderDiscountedPriceForQuantity = (priceForQuantity, intl) => {
|
|
|
4362
4356
|
}), jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
4363
4357
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1x(_objectSpread$1x({}, orderMessages.discountedPriceLabel), {}, {
|
|
4364
4358
|
values: {
|
|
4365
|
-
discountedPrice: formatMoney(discount.discountedAmount, intl)
|
|
4359
|
+
discountedPrice: experimentalComponents.formatMoney(discount.discountedAmount, intl)
|
|
4366
4360
|
}
|
|
4367
4361
|
}))
|
|
4368
4362
|
})]
|
|
@@ -4558,14 +4552,15 @@ LocalizedChangePresenter.displayName = 'LocalizedChangePresenter';
|
|
|
4558
4552
|
*/
|
|
4559
4553
|
const MoneyPresenter = props => {
|
|
4560
4554
|
const value = props.value;
|
|
4561
|
-
|
|
4555
|
+
const intl = reactIntl.useIntl();
|
|
4556
|
+
if (!value || !value.currencyCode) {
|
|
4562
4557
|
return null;
|
|
4563
4558
|
}
|
|
4564
|
-
const
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4559
|
+
const isHighPrecision = value.type === experimentalComponents.PRECISION_TYPES.highPrecision;
|
|
4560
|
+
const isMissingRequiredAmount = isHighPrecision ? value.preciseAmount === undefined : value.centAmount === undefined;
|
|
4561
|
+
if (isMissingRequiredAmount) return null;
|
|
4562
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
4563
|
+
children: experimentalComponents.formatMoney(value, intl)
|
|
4569
4564
|
});
|
|
4570
4565
|
};
|
|
4571
4566
|
MoneyPresenter.displayName = 'MoneyPresenter';
|
|
@@ -4581,7 +4576,7 @@ function formatTiers(tiers, intl) {
|
|
|
4581
4576
|
children: _mapInstanceProperty__default["default"](tiers).call(tiers, (tier, index) => jsxRuntime.jsx("div", {
|
|
4582
4577
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1v(_objectSpread$1v({}, messages$13.priceTierLabel), {}, {
|
|
4583
4578
|
values: {
|
|
4584
|
-
price: formatMoney(tier.value, intl),
|
|
4579
|
+
price: experimentalComponents.formatMoney(tier.value, intl),
|
|
4585
4580
|
quantity: tier.minimumQuantity
|
|
4586
4581
|
}
|
|
4587
4582
|
}))
|
|
@@ -4818,24 +4813,6 @@ const CountryPresenter = _ref => {
|
|
|
4818
4813
|
};
|
|
4819
4814
|
CountryPresenter.displayName = 'CountryPresenter';
|
|
4820
4815
|
|
|
4821
|
-
const FormattedDateTime = props => {
|
|
4822
|
-
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
4823
|
-
return {
|
|
4824
|
-
locale: applicationContext.user?.locale,
|
|
4825
|
-
timeZone: applicationContext.user?.timeZone
|
|
4826
|
-
};
|
|
4827
|
-
}),
|
|
4828
|
-
locale = _useApplicationContex.locale,
|
|
4829
|
-
timeZone = _useApplicationContex.timeZone;
|
|
4830
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
4831
|
-
children: formatDateTime(props.type, props.value, {
|
|
4832
|
-
timeZone: timeZone,
|
|
4833
|
-
locale: locale
|
|
4834
|
-
})
|
|
4835
|
-
});
|
|
4836
|
-
};
|
|
4837
|
-
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
4838
|
-
|
|
4839
4816
|
const DateMode = {
|
|
4840
4817
|
/** Full timestamp - "12/25/2023 2:30 PM" */
|
|
4841
4818
|
DateTime: 'datetime',
|
|
@@ -5295,11 +5272,11 @@ function renderAttributeByType(attributeName, value, intl) {
|
|
|
5295
5272
|
var _context;
|
|
5296
5273
|
switch (attributeName) {
|
|
5297
5274
|
case 'value':
|
|
5298
|
-
return formatMoney(value.value, intl);
|
|
5275
|
+
return experimentalComponents.formatMoney(value.value, intl);
|
|
5299
5276
|
case 'customerGroup':
|
|
5300
5277
|
return value.customerGroup?.id || jsxRuntime.jsx(NoValueLabel, {});
|
|
5301
5278
|
case 'discounted':
|
|
5302
|
-
return value.discounted ? formatMoney(value.discounted?.value, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
5279
|
+
return value.discounted ? experimentalComponents.formatMoney(value.discounted?.value, intl) : jsxRuntime.jsx(NoValueLabel, {});
|
|
5303
5280
|
case 'validFrom':
|
|
5304
5281
|
return value.validFrom ? jsxRuntime.jsx(FormattedDateTime, {
|
|
5305
5282
|
type: "datetime",
|
|
@@ -5332,7 +5309,7 @@ function renderAttributeByType(attributeName, value, intl) {
|
|
|
5332
5309
|
children: _mapInstanceProperty__default["default"](_context = value.tiers).call(_context, tier => jsxRuntime.jsx("div", {
|
|
5333
5310
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1p(_objectSpread$1p({}, messages$13.priceTierLabel), {}, {
|
|
5334
5311
|
values: {
|
|
5335
|
-
price: formatMoney(tier.value, intl),
|
|
5312
|
+
price: experimentalComponents.formatMoney(tier.value, intl),
|
|
5336
5313
|
quantity: tier.minimumQuantity
|
|
5337
5314
|
}
|
|
5338
5315
|
}))
|
|
@@ -5914,7 +5891,7 @@ function ProductDiscountedPricePresenter(props) {
|
|
|
5914
5891
|
children: value ? jsxRuntime.jsxs("div", {
|
|
5915
5892
|
css: changeValueContainerStyles,
|
|
5916
5893
|
children: [jsxRuntime.jsx("span", {
|
|
5917
|
-
children: formatMoney(value.value, intl)
|
|
5894
|
+
children: experimentalComponents.formatMoney(value.value, intl)
|
|
5918
5895
|
}), jsxRuntime.jsx("span", {
|
|
5919
5896
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1i(_objectSpread$1i({}, messages$V.productDiscountLabel), {}, {
|
|
5920
5897
|
values: {
|
|
@@ -7253,7 +7230,7 @@ const DiscountValuePresenter = _ref => {
|
|
|
7253
7230
|
children: [jsxRuntime.jsx("div", {
|
|
7254
7231
|
children: value?.type
|
|
7255
7232
|
}), value?.money?.map(val => jsxRuntime.jsx("div", {
|
|
7256
|
-
children: formatMoney(val, intl)
|
|
7233
|
+
children: experimentalComponents.formatMoney(val, intl)
|
|
7257
7234
|
}, `${val.currencyCode}-${val.centAmount}`))]
|
|
7258
7235
|
});
|
|
7259
7236
|
};
|
|
@@ -7409,6 +7386,7 @@ function ShippingRatePresenter(props) {
|
|
|
7409
7386
|
var _context;
|
|
7410
7387
|
const change = props.change,
|
|
7411
7388
|
value = props.value;
|
|
7389
|
+
const intl = reactIntl.useIntl();
|
|
7412
7390
|
const shippingMethodChange = change;
|
|
7413
7391
|
const rateValue = value;
|
|
7414
7392
|
if (!rateValue) {
|
|
@@ -7432,21 +7410,13 @@ function ShippingRatePresenter(props) {
|
|
|
7432
7410
|
children: [rateValue.price && jsxRuntime.jsx("div", {
|
|
7433
7411
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$13.shippingRatePriceLabel), {}, {
|
|
7434
7412
|
values: {
|
|
7435
|
-
price:
|
|
7436
|
-
value: rateValue.price.centAmount / Math.pow(10, rateValue.price.fractionDigits || 2),
|
|
7437
|
-
style: "currency",
|
|
7438
|
-
currency: rateValue.price.currencyCode
|
|
7439
|
-
}, "price")
|
|
7413
|
+
price: experimentalComponents.formatMoney(rateValue.price, intl)
|
|
7440
7414
|
}
|
|
7441
7415
|
}))
|
|
7442
7416
|
}), rateValue.freeAbove && jsxRuntime.jsx("div", {
|
|
7443
7417
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$13.shippingRateFreeAboveLabel), {}, {
|
|
7444
7418
|
values: {
|
|
7445
|
-
freeAbove:
|
|
7446
|
-
value: rateValue.freeAbove.centAmount / Math.pow(10, rateValue.freeAbove.fractionDigits || 2),
|
|
7447
|
-
style: "currency",
|
|
7448
|
-
currency: rateValue.freeAbove.currencyCode
|
|
7449
|
-
}, "freeAbove")
|
|
7419
|
+
freeAbove: experimentalComponents.formatMoney(rateValue.freeAbove, intl)
|
|
7450
7420
|
}
|
|
7451
7421
|
}))
|
|
7452
7422
|
}), rateValue.tiers && rateValue.tiers.length > 0 && jsxRuntime.jsxs("div", {
|
|
@@ -7456,11 +7426,10 @@ function ShippingRatePresenter(props) {
|
|
|
7456
7426
|
css: changeValueContainerStyles,
|
|
7457
7427
|
children: [isCartValueTier(tier) && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$13.cartValueShippingRateTierLabel), {}, {
|
|
7458
7428
|
values: {
|
|
7459
|
-
minimumCentAmount:
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
}, "minimumCentAmount")
|
|
7429
|
+
minimumCentAmount: experimentalComponents.formatMoney({
|
|
7430
|
+
currencyCode: rateValue.price.currencyCode,
|
|
7431
|
+
centAmount: tier.minimumCentAmount
|
|
7432
|
+
}, intl)
|
|
7464
7433
|
}
|
|
7465
7434
|
})), isCartClassificationTier(tier) && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$13.cartClassificationShippingRateTierLabel), {}, {
|
|
7466
7435
|
values: {
|
|
@@ -7512,7 +7481,7 @@ const TransactionPresenter = props => {
|
|
|
7512
7481
|
const intl = reactIntl.useIntl();
|
|
7513
7482
|
return jsxRuntime.jsx("div", {
|
|
7514
7483
|
css: changeValueContainerStyles,
|
|
7515
|
-
children: typeof props.value === 'string' ? props.value : `${props.value.type} ${formatMoney(props.value.amount, intl)} (${props.value.state})`
|
|
7484
|
+
children: typeof props.value === 'string' ? props.value : `${props.value.type} ${experimentalComponents.formatMoney(props.value.amount, intl)} (${props.value.state})`
|
|
7516
7485
|
});
|
|
7517
7486
|
};
|
|
7518
7487
|
TransactionPresenter.displayName = 'TransactionPresenter';
|
|
@@ -8397,7 +8366,7 @@ var messages$L = reactIntl.defineMessages({
|
|
|
8397
8366
|
customObjectResource: {
|
|
8398
8367
|
id: 'ResourceCell.customObjectResource',
|
|
8399
8368
|
description: 'Label when the resource is a custom object',
|
|
8400
|
-
defaultMessage: 'Container: {container}
|
|
8369
|
+
defaultMessage: 'Container: {container}\nKey: {key}'
|
|
8401
8370
|
}
|
|
8402
8371
|
});
|
|
8403
8372
|
|
|
@@ -8407,8 +8376,7 @@ const getCustomObjectLabel = _ref => {
|
|
|
8407
8376
|
if ('container' in messageLabel && 'key' in messageLabel && messageLabel.container && messageLabel.key) {
|
|
8408
8377
|
return intl.formatMessage(messages$L.customObjectResource, {
|
|
8409
8378
|
container: messageLabel.container,
|
|
8410
|
-
key: messageLabel.key
|
|
8411
|
-
br: getNewLine
|
|
8379
|
+
key: messageLabel.key
|
|
8412
8380
|
});
|
|
8413
8381
|
}
|
|
8414
8382
|
return jsxRuntime.jsx(NoValueFallback, {});
|
|
@@ -8419,8 +8387,7 @@ const mapLabel$2 = _ref => {
|
|
|
8419
8387
|
intl = _ref.intl;
|
|
8420
8388
|
return data.container && data.key ? intl.formatMessage(messages$L.customObjectResource, {
|
|
8421
8389
|
container: data.container,
|
|
8422
|
-
key: data.key
|
|
8423
|
-
br: getNewLine
|
|
8390
|
+
key: data.key
|
|
8424
8391
|
}) : jsxRuntime.jsx(NoValueFallback, {});
|
|
8425
8392
|
};
|
|
8426
8393
|
|
|
@@ -9568,13 +9535,13 @@ const ShippingRateChange = props => {
|
|
|
9568
9535
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
9569
9536
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$O(_objectSpread$O({}, messages$13.shippingRatePriceLabel), {}, {
|
|
9570
9537
|
values: {
|
|
9571
|
-
price: formatMoney(props.value.price, intl)
|
|
9538
|
+
price: experimentalComponents.formatMoney(props.value.price, intl)
|
|
9572
9539
|
}
|
|
9573
9540
|
}))
|
|
9574
9541
|
}), props.value.freeAbove && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
9575
9542
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$O(_objectSpread$O({}, messages$13.shippingRateFreeAboveLabel), {}, {
|
|
9576
9543
|
values: {
|
|
9577
|
-
freeAbove: formatMoney(props.value.freeAbove, intl)
|
|
9544
|
+
freeAbove: experimentalComponents.formatMoney(props.value.freeAbove, intl)
|
|
9578
9545
|
}
|
|
9579
9546
|
}))
|
|
9580
9547
|
}), props.value.tiers.length > 0 && jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -9593,7 +9560,7 @@ const ShippingRateChange = props => {
|
|
|
9593
9560
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
9594
9561
|
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$O(_objectSpread$O({}, messages$13.shippingRatePriceLabel), {}, {
|
|
9595
9562
|
values: {
|
|
9596
|
-
price: formatMoney(tier.price, intl)
|
|
9563
|
+
price: experimentalComponents.formatMoney(tier.price, intl)
|
|
9597
9564
|
}
|
|
9598
9565
|
}))
|
|
9599
9566
|
}), jsxRuntime.jsx(uiKit.Spacings.Inline, {
|
|
@@ -9601,7 +9568,7 @@ const ShippingRateChange = props => {
|
|
|
9601
9568
|
children: jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
9602
9569
|
children: [tier.minimumCentAmount && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$O(_objectSpread$O({}, messages$13.cartValueShippingRateTierLabel), {}, {
|
|
9603
9570
|
values: {
|
|
9604
|
-
minimumCentAmount: formatMoney(_objectSpread$O(_objectSpread$O({}, tier.price), {}, {
|
|
9571
|
+
minimumCentAmount: experimentalComponents.formatMoney(_objectSpread$O(_objectSpread$O({}, tier.price), {}, {
|
|
9605
9572
|
centAmount: tier.minimumCentAmount
|
|
9606
9573
|
}), intl)
|
|
9607
9574
|
}
|
|
@@ -10811,7 +10778,7 @@ const getPaymentLabel = _ref => {
|
|
|
10811
10778
|
intl = _ref.intl;
|
|
10812
10779
|
const amountPlanned = 'amountPlanned' in messageLabel ? messageLabel.amountPlanned : undefined;
|
|
10813
10780
|
const key = 'key' in messageLabel ? messageLabel.key : undefined;
|
|
10814
|
-
const paymentAmount = amountPlanned ? formatMoney(amountPlanned, intl) : undefined;
|
|
10781
|
+
const paymentAmount = amountPlanned ? experimentalComponents.formatMoney(amountPlanned, intl) : undefined;
|
|
10815
10782
|
return intl.formatMessage(messages$B.paymentResource, {
|
|
10816
10783
|
paymentValue: key || paymentAmount || jsxRuntime.jsx(NoValueFallback, {})
|
|
10817
10784
|
});
|
|
@@ -10821,7 +10788,7 @@ const mapLabel$1 = _ref => {
|
|
|
10821
10788
|
let data = _ref.data,
|
|
10822
10789
|
intl = _ref.intl;
|
|
10823
10790
|
return intl.formatMessage(messages$B.paymentResource, {
|
|
10824
|
-
paymentValue: data.key || formatMoney(data.amountPlanned, intl)
|
|
10791
|
+
paymentValue: data.key || experimentalComponents.formatMoney(data.amountPlanned, intl)
|
|
10825
10792
|
});
|
|
10826
10793
|
};
|
|
10827
10794
|
|
|
@@ -10987,7 +10954,7 @@ const mapPaymentToPreview = _ref => {
|
|
|
10987
10954
|
fieldValue: resource.interfaceId
|
|
10988
10955
|
}, {
|
|
10989
10956
|
fieldName: intl.formatMessage(messages$A.amountPlannedLabel),
|
|
10990
|
-
fieldValue: formatMoney(resource.amountPlanned, intl)
|
|
10957
|
+
fieldValue: experimentalComponents.formatMoney(resource.amountPlanned, intl)
|
|
10991
10958
|
}, {
|
|
10992
10959
|
fieldName: intl.formatMessage(messages$A.paymentMethodInfoMethodLabel),
|
|
10993
10960
|
fieldValue: resource.paymentMethodInfo?.method
|
|
@@ -11009,7 +10976,7 @@ const mapPaymentToPreview = _ref => {
|
|
|
11009
10976
|
}, {
|
|
11010
10977
|
fieldName: 'transactions',
|
|
11011
10978
|
fieldValue: _mapInstanceProperty__default["default"](_context = resource.transactions).call(_context, transaction => _objectSpread$K(_objectSpread$K({}, transaction), {}, {
|
|
11012
|
-
amount: transaction.amount && formatMoney(transaction.amount, intl),
|
|
10979
|
+
amount: transaction.amount && experimentalComponents.formatMoney(transaction.amount, intl),
|
|
11013
10980
|
timestamp: formatDateTime('datetime', transaction.timestamp)
|
|
11014
10981
|
}))
|
|
11015
10982
|
}];
|
|
@@ -21377,15 +21344,15 @@ const loadMessages = locale => {
|
|
|
21377
21344
|
const intlLocale = i18n.mapLocaleToIntlLocale(locale);
|
|
21378
21345
|
switch (intlLocale) {
|
|
21379
21346
|
case 'de':
|
|
21380
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-de" */'./de-
|
|
21347
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-de" */'./de-327050f3.cjs.dev.js'); });
|
|
21381
21348
|
case 'es':
|
|
21382
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-es" */'./es-
|
|
21349
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-es" */'./es-42bcdd3a.cjs.dev.js'); });
|
|
21383
21350
|
case 'fr-FR':
|
|
21384
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-fr-FR" */'./fr-FR-
|
|
21351
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-fr-FR" */'./fr-FR-2126c2a4.cjs.dev.js'); });
|
|
21385
21352
|
case 'pt-BR':
|
|
21386
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
21353
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-4e70a28d.cjs.dev.js'); });
|
|
21387
21354
|
default:
|
|
21388
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-en" */'./en-
|
|
21355
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-en" */'./en-789a6829.cjs.dev.js'); });
|
|
21389
21356
|
}
|
|
21390
21357
|
};
|
|
21391
21358
|
|