@commercetools-frontend-extensions/change-history 8.31.0 → 8.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@ import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-st
|
|
|
7
7
|
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
8
8
|
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
9
9
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
10
|
-
import {
|
|
10
|
+
import { useMemo, Children, cloneElement, Fragment as Fragment$1, useState, useEffect, forwardRef, useCallback, Component, PureComponent } from 'react';
|
|
11
11
|
import { useLocation, useRouteMatch, useHistory, useParams, Switch, Route, Link as Link$1 } from 'react-router-dom';
|
|
12
12
|
import { InfoModalPage, useModalState, InfoDialog, InfoMainPage, MaintenancePageLayout, PageUnauthorized, PageContentFull, PageContentNarrow, PageContentWide, CustomFormModalPage, ConfirmationDialog } from '@commercetools-frontend/application-components';
|
|
13
13
|
import { useApplicationContext, useProjectExtensionImageRegex, ApplicationContext, ProjectExtensionProviderForImageRegex } from '@commercetools-frontend/application-shell-connectors';
|
|
@@ -16,26 +16,19 @@ import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instanc
|
|
|
16
16
|
import { GRAPHQL_TARGETS, NO_VALUE_FALLBACK } from '@commercetools-frontend/constants';
|
|
17
17
|
import get from 'lodash/get';
|
|
18
18
|
import camelCase from 'lodash/camelCase';
|
|
19
|
-
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
20
|
-
import '@babel/runtime-corejs3/core-js-stable/date/now';
|
|
21
|
-
import '@babel/runtime-corejs3/core-js-stable/set-timeout';
|
|
22
|
-
import _Symbol$toPrimitive from '@babel/runtime-corejs3/core-js-stable/symbol/to-primitive';
|
|
23
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
24
|
-
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
25
|
-
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
26
|
-
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
27
|
-
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
28
|
-
import { useFormik } from 'formik';
|
|
29
|
-
import pickBy from 'lodash/pickBy';
|
|
30
|
-
import 'qss';
|
|
31
19
|
import { useQuery } from '@apollo/client/react/hooks';
|
|
32
20
|
import _URLSearchParams from '@babel/runtime-corejs3/core-js-stable/url-search-params';
|
|
33
21
|
import { defineMessages, useIntl, FormattedMessage, injectIntl, IntlProvider } from 'react-intl';
|
|
22
|
+
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
34
23
|
import { Text, Link, designTokens, Spacings, FlatButton, Grid, FieldLabel, CollapsiblePanel, EyeIcon, Tooltip, LoadingSpinner, IconButton, Stamp, Avatar, CodeViewIcon, UserLinearIcon, SwitcherIcon, FilterIcon, DataTable, InformationIcon, ErrorMessage, SelectInput, Tag, AsyncSelectInput, FieldErrors, SearchSelectInput, DateTimeInput, DateInput, TimeInput, TextInput, DiamondIcon, ContentNotification, Card, ToggleInput, SecondaryIconButton, InfoIcon, DateRangeInput, CloseBoldIcon, PlusBoldIcon, AccessibleHidden, SecondaryButton, PrimaryButton, Collapsible, Pagination, Constraints, customProperties, CheckActiveIcon, CheckInactiveIcon, VerifiedIcon, UserFilledIcon, UsersIcon, ImportIcon, ListWithSearchIcon, ExternalLinkIcon, DotIcon } from '@commercetools-frontend/ui-kit';
|
|
35
24
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
36
25
|
import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
26
|
+
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
37
27
|
import PropTypes from 'prop-types';
|
|
38
28
|
import { css, keyframes } from '@emotion/react';
|
|
29
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
30
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
31
|
+
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
39
32
|
import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
40
33
|
import { designTokens as designTokens$1 } from '@commercetools-uikit/design-system';
|
|
41
34
|
import groupBy from 'lodash/groupBy';
|
|
@@ -57,8 +50,10 @@ import { useCountries, applyTransformedLocalizedFields, formatLocalizedString }
|
|
|
57
50
|
import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
58
51
|
import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
|
|
59
52
|
import { useQuery as useQuery$1 } from '@apollo/client/react';
|
|
60
|
-
import
|
|
53
|
+
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
61
54
|
import { useIsAuthorized } from '@commercetools-frontend/permissions';
|
|
55
|
+
import _Symbol$toPrimitive from '@babel/runtime-corejs3/core-js-stable/symbol/to-primitive';
|
|
56
|
+
import pickBy from 'lodash/pickBy';
|
|
62
57
|
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
63
58
|
import isNil$1 from 'lodash/isNil';
|
|
64
59
|
import omitBy from 'lodash/omitBy';
|
|
@@ -85,16 +80,18 @@ import { useApolloClient } from '@apollo/client';
|
|
|
85
80
|
import '@babel/runtime-corejs3/core-js-stable/parse-int';
|
|
86
81
|
import { DiamondIcon as DiamondIcon$1 } from '@commercetools-uikit/icons';
|
|
87
82
|
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
83
|
+
import { useFormik } from 'formik';
|
|
88
84
|
import DataTableManager from '@commercetools-uikit/data-table-manager';
|
|
89
85
|
import { DataTableManagerProvider } from '@commercetools-uikit/data-table-manager/data-table-manager-provider';
|
|
90
86
|
import has from 'lodash/has';
|
|
91
87
|
import _Array$from from '@babel/runtime-corejs3/core-js-stable/array/from';
|
|
92
88
|
import isFunction from 'lodash/isFunction';
|
|
93
89
|
import LeadingIcon from '@commercetools-uikit/icons/leading-icon';
|
|
90
|
+
import { oneLineTrim } from 'common-tags';
|
|
94
91
|
import { parseChunkImport, mapLocaleToIntlLocale } from '@commercetools-frontend/i18n';
|
|
95
92
|
|
|
96
93
|
// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
|
|
97
|
-
var version = "8.
|
|
94
|
+
var version = "8.32.0";
|
|
98
95
|
|
|
99
96
|
// EXAMPLE
|
|
100
97
|
// export const FEATURE_FLAG_NAME = 'featureFlagName';
|
|
@@ -773,132 +770,6 @@ const useStorePermissionsInDataFences = _ref => {
|
|
|
773
770
|
return storePermissionsInDataFences;
|
|
774
771
|
};
|
|
775
772
|
|
|
776
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/btoa#Unicode_strings
|
|
777
|
-
//
|
|
778
|
-
// Escape any extended characters so that the string we
|
|
779
|
-
// actually encode is an ASCII representation of the original.
|
|
780
|
-
// This is to avoid the `InvalidCharacterError`.
|
|
781
|
-
function stringToBase64(value) {
|
|
782
|
-
let encoded = '';
|
|
783
|
-
try {
|
|
784
|
-
encoded = btoa(decodeURIComponent(encodeURIComponent(value)));
|
|
785
|
-
} catch (e) {
|
|
786
|
-
/* noop */
|
|
787
|
-
}
|
|
788
|
-
return encoded;
|
|
789
|
-
}
|
|
790
|
-
function base64ToString(value) {
|
|
791
|
-
let decoded;
|
|
792
|
-
try {
|
|
793
|
-
decoded = decodeURIComponent(encodeURIComponent(atob(value)));
|
|
794
|
-
} catch (e) {
|
|
795
|
-
/* noop */
|
|
796
|
-
}
|
|
797
|
-
// @ts-ignore
|
|
798
|
-
return decoded;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
802
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[_Symbol$toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
803
|
-
function ownKeys$1l(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; }
|
|
804
|
-
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$1l(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$1l(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* NOTE
|
|
808
|
-
* The `version` comes first and can be overwritten to bust
|
|
809
|
-
* existing search queries in case of conflicting migrations.
|
|
810
|
-
*/
|
|
811
|
-
const VERSION_KEY = '__version';
|
|
812
|
-
const SAVED_SEARCH_VERSION = 2;
|
|
813
|
-
const matchesVersion = (searchQuery, version) => Boolean(searchQuery[VERSION_KEY]) && searchQuery[VERSION_KEY] === version;
|
|
814
|
-
const augmentWithVersion = searchQuery => _objectSpread$1l({
|
|
815
|
-
[VERSION_KEY]: SAVED_SEARCH_VERSION
|
|
816
|
-
}, searchQuery);
|
|
817
|
-
const omitVersion = searchQuery => {
|
|
818
|
-
var _context;
|
|
819
|
-
searchQuery[VERSION_KEY];
|
|
820
|
-
const searchQueryNoVersion = _objectWithoutProperties(searchQuery, _mapInstanceProperty(_context = [VERSION_KEY]).call(_context, _toPropertyKey));
|
|
821
|
-
return searchQueryNoVersion;
|
|
822
|
-
};
|
|
823
|
-
const omitUnknownFilters = searchQuery => _objectSpread$1l(_objectSpread$1l({}, searchQuery), searchQuery?.filters && {
|
|
824
|
-
filters: pickBy(searchQuery.filters, (_value, key) => {
|
|
825
|
-
var _context2;
|
|
826
|
-
return _includesInstanceProperty(_context2 = _Object$values(FILTER_OPTION_KEYS)).call(_context2, key);
|
|
827
|
-
})
|
|
828
|
-
});
|
|
829
|
-
const hasStorage = storageSlice => window.localStorage.getItem(storageSlice) !== null;
|
|
830
|
-
const encode = searchOptions => stringToBase64(_JSON$stringify(searchOptions));
|
|
831
|
-
const decode = searchOptions => {
|
|
832
|
-
if (searchOptions) {
|
|
833
|
-
const searchOptionsDecoded = base64ToString(searchOptions);
|
|
834
|
-
if (searchOptionsDecoded) {
|
|
835
|
-
return JSON.parse(searchOptionsDecoded);
|
|
836
|
-
} else {
|
|
837
|
-
throw new Error(`Error decoding searchOptions: ${searchOptions}`);
|
|
838
|
-
}
|
|
839
|
-
} else {
|
|
840
|
-
return null;
|
|
841
|
-
}
|
|
842
|
-
};
|
|
843
|
-
const getFromStorage = storageSlice => {
|
|
844
|
-
const itemFromStorage = window.localStorage.getItem(storageSlice);
|
|
845
|
-
return itemFromStorage ? decode(itemFromStorage) : null;
|
|
846
|
-
};
|
|
847
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
848
|
-
const putToStorage = (storageSlice, itemToStore) => window.localStorage.setItem(storageSlice, itemToStore ? encode(itemToStore) : itemToStore);
|
|
849
|
-
const removeFromStorage = storageSlice => window.localStorage.removeItem(storageSlice);
|
|
850
|
-
|
|
851
|
-
function ownKeys$1k(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; }
|
|
852
|
-
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1k(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1k(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
853
|
-
const getStorage = storageType => storageType === 'session' ? sessionStorage : localStorage;
|
|
854
|
-
const defaultOptions = {
|
|
855
|
-
storageType: 'local',
|
|
856
|
-
segregateByUser: true,
|
|
857
|
-
segregateByProject: true
|
|
858
|
-
};
|
|
859
|
-
const isNil = value => typeof value === 'undefined' || value === null;
|
|
860
|
-
const useStorage = function (storageKey, initialStorageValue) {
|
|
861
|
-
var _context;
|
|
862
|
-
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
863
|
-
const mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions), options);
|
|
864
|
-
const _useApplicationContex = useApplicationContext(context => ({
|
|
865
|
-
userId: context.user?.id,
|
|
866
|
-
projectKey: context.project?.key
|
|
867
|
-
})),
|
|
868
|
-
userId = _useApplicationContex.userId,
|
|
869
|
-
projectKey = _useApplicationContex.projectKey;
|
|
870
|
-
const scopedStorageKey = _filterInstanceProperty(_context = [mergedOptions.segregateByUser && userId, mergedOptions.segregateByProject && projectKey, SEARCH_SLICE_NAME_CHANGE_HISTORY, storageKey]).call(_context, Boolean).join('/');
|
|
871
|
-
const readFromStorage = useCallback(() => {
|
|
872
|
-
const storageValue = decode(getStorage(mergedOptions.storageType).getItem(scopedStorageKey));
|
|
873
|
-
|
|
874
|
-
/**
|
|
875
|
-
* NOTE:
|
|
876
|
-
* We prior wrote `undefined` or `null` to storage which when written
|
|
877
|
-
* to storage via `setItem` results in `"undefined"` or `"null"`
|
|
878
|
-
* being written polluting the storage.
|
|
879
|
-
*/
|
|
880
|
-
if (storageValue === 'undefined' || storageValue === 'null') {
|
|
881
|
-
getStorage(mergedOptions.storageType).removeItem(scopedStorageKey);
|
|
882
|
-
return null;
|
|
883
|
-
}
|
|
884
|
-
return storageValue;
|
|
885
|
-
}, [scopedStorageKey, mergedOptions.storageType]);
|
|
886
|
-
const _useState = useState(readFromStorage),
|
|
887
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
888
|
-
actualStorageValue = _useState2[0],
|
|
889
|
-
setActualStorageValue = _useState2[1];
|
|
890
|
-
const writeToStorage = useCallback(nextStorageValue => {
|
|
891
|
-
getStorage(mergedOptions.storageType).setItem(scopedStorageKey, encode(nextStorageValue));
|
|
892
|
-
setActualStorageValue(nextStorageValue);
|
|
893
|
-
}, [scopedStorageKey, mergedOptions.storageType]);
|
|
894
|
-
useEffect(() => {
|
|
895
|
-
if (isNil(actualStorageValue) && !isNil(initialStorageValue)) {
|
|
896
|
-
writeToStorage(initialStorageValue);
|
|
897
|
-
}
|
|
898
|
-
}, [actualStorageValue, initialStorageValue, writeToStorage]);
|
|
899
|
-
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
900
|
-
};
|
|
901
|
-
|
|
902
773
|
var FetchProductSelectionStoresInfo = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelectionStoresInfo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelectionRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 240, source: { body: "query FetchProductSelectionStoresInfo($where: String!) {\n stores(where: $where) {\n total\n results {\n id\n key\n productSelections {\n productSelectionRef {\n id\n }\n active\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
903
774
|
const emptyProductSelectionStoresInfo = {
|
|
904
775
|
total: 0,
|
|
@@ -1711,8 +1582,8 @@ const PRECISION_TYPES = {
|
|
|
1711
1582
|
centPrecision: 'centPrecision'
|
|
1712
1583
|
};
|
|
1713
1584
|
|
|
1714
|
-
function ownKeys$
|
|
1715
|
-
function _objectSpread$
|
|
1585
|
+
function ownKeys$1k(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; }
|
|
1586
|
+
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1716
1587
|
function getFractionedAmount(moneyValue) {
|
|
1717
1588
|
const _moneyValue$fractionD = moneyValue.fractionDigits,
|
|
1718
1589
|
fractionDigits = _moneyValue$fractionD === void 0 ? 2 : _moneyValue$fractionD;
|
|
@@ -1723,7 +1594,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
1723
1594
|
}
|
|
1724
1595
|
function formatMoney(moneyValue, intl, options) {
|
|
1725
1596
|
if (moneyValue === null) return;
|
|
1726
|
-
return intl.formatNumber(getFractionedAmount(moneyValue), _objectSpread$
|
|
1597
|
+
return intl.formatNumber(getFractionedAmount(moneyValue), _objectSpread$1k({
|
|
1727
1598
|
style: 'currency',
|
|
1728
1599
|
currency: moneyValue.currencyCode,
|
|
1729
1600
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -1809,8 +1680,8 @@ function formatCustomerName(_ref) {
|
|
|
1809
1680
|
return jsx(NoValueFallback, {});
|
|
1810
1681
|
}
|
|
1811
1682
|
|
|
1812
|
-
function ownKeys$
|
|
1813
|
-
function _objectSpread$
|
|
1683
|
+
function ownKeys$1j(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; }
|
|
1684
|
+
function _objectSpread$1j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1814
1685
|
const resourceTypesWithNoLabel = ['key-value-document', 'review'];
|
|
1815
1686
|
const parentTypesWithNoLabel = ['product-selection'];
|
|
1816
1687
|
const getReferenceLabel = (referenceValue, language, languages) => {
|
|
@@ -1896,7 +1767,7 @@ const ReferenceTypeChange = props => {
|
|
|
1896
1767
|
referenceType: String(true)
|
|
1897
1768
|
}));
|
|
1898
1769
|
const resourceType = intl.formatMessage(getEntityTypeNameMessage(props.typeId));
|
|
1899
|
-
const label = getReferenceLabel(_objectSpread$
|
|
1770
|
+
const label = getReferenceLabel(_objectSpread$1j({
|
|
1900
1771
|
id: props.id,
|
|
1901
1772
|
typeId: props.typeId
|
|
1902
1773
|
}, props.expandedProps), language, languages);
|
|
@@ -1927,8 +1798,8 @@ ReferenceTypeChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1927
1798
|
ReferenceTypeChange.displayName = 'ReferenceTypeChange';
|
|
1928
1799
|
|
|
1929
1800
|
const _excluded$l = ["id", "typeId"];
|
|
1930
|
-
function ownKeys$
|
|
1931
|
-
function _objectSpread$
|
|
1801
|
+
function ownKeys$1i(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; }
|
|
1802
|
+
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$1i(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$1i(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1932
1803
|
const ChangeItemValueByType = props => {
|
|
1933
1804
|
const intl = useIntl();
|
|
1934
1805
|
if (props.value === null || props.value === undefined) return jsx(NoValueLabel, {});
|
|
@@ -1978,7 +1849,7 @@ const ChangeItemValueByType = props => {
|
|
|
1978
1849
|
css: productAttributeValuesStyles,
|
|
1979
1850
|
children: [jsx(Text.Detail, {
|
|
1980
1851
|
isItalic: true,
|
|
1981
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
1852
|
+
children: jsx(FormattedMessage, _objectSpread$1i(_objectSpread$1i({}, messages$1k.attributeItem), {}, {
|
|
1982
1853
|
values: {
|
|
1983
1854
|
b: getBoldText,
|
|
1984
1855
|
index: index + 1
|
|
@@ -2006,8 +1877,8 @@ ChangeItemValueByType.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2006
1877
|
name: PropTypes.string.isRequired
|
|
2007
1878
|
} : {};
|
|
2008
1879
|
|
|
2009
|
-
function ownKeys$
|
|
2010
|
-
function _objectSpread$
|
|
1880
|
+
function ownKeys$1h(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; }
|
|
1881
|
+
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2011
1882
|
const CustomFieldChange = props => {
|
|
2012
1883
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
2013
1884
|
language: applicationContext.dataLocale,
|
|
@@ -2031,7 +1902,7 @@ const CustomFieldChange = props => {
|
|
|
2031
1902
|
}
|
|
2032
1903
|
};
|
|
2033
1904
|
return jsx(ComposedChange, {
|
|
2034
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
1905
|
+
label: jsx(FormattedMessage, _objectSpread$1h(_objectSpread$1h({}, messages$1k.customFieldLabel), {}, {
|
|
2035
1906
|
values: {
|
|
2036
1907
|
b: getBoldText,
|
|
2037
1908
|
customField: props.change.previousValue?.label ? localize({
|
|
@@ -2061,8 +1932,8 @@ CustomFieldChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2061
1932
|
}).isRequired
|
|
2062
1933
|
} : {};
|
|
2063
1934
|
|
|
2064
|
-
function ownKeys$
|
|
2065
|
-
function _objectSpread$
|
|
1935
|
+
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; }
|
|
1936
|
+
function _objectSpread$1g(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1g(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1g(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2066
1937
|
const CustomTypeChange = props => {
|
|
2067
1938
|
var _context;
|
|
2068
1939
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
@@ -2081,7 +1952,7 @@ const CustomTypeChange = props => {
|
|
|
2081
1952
|
language: language,
|
|
2082
1953
|
fallbackOrder: languages
|
|
2083
1954
|
})
|
|
2084
|
-
}) : jsx(FormattedMessage, _objectSpread$
|
|
1955
|
+
}) : jsx(FormattedMessage, _objectSpread$1g(_objectSpread$1g({}, messages$1k.customTypeIdLabel), {}, {
|
|
2085
1956
|
values: {
|
|
2086
1957
|
customTypeId: props.value.type.id
|
|
2087
1958
|
}
|
|
@@ -2137,8 +2008,8 @@ JsonDisplay.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2137
2008
|
value: PropTypes.any
|
|
2138
2009
|
} : {};
|
|
2139
2010
|
|
|
2140
|
-
function ownKeys$
|
|
2141
|
-
function _objectSpread$
|
|
2011
|
+
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; }
|
|
2012
|
+
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1f(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1f(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2142
2013
|
/**
|
|
2143
2014
|
* Maps custom type fields object property into an array
|
|
2144
2015
|
*
|
|
@@ -2163,13 +2034,13 @@ function transformCustomTypeValue(value) {
|
|
|
2163
2034
|
}
|
|
2164
2035
|
const mapCustomTypeFieldsToArray = value => {
|
|
2165
2036
|
var _context;
|
|
2166
|
-
return _objectSpread$
|
|
2037
|
+
return _objectSpread$1f(_objectSpread$1f({}, value), {}, {
|
|
2167
2038
|
fields: value?.fields ? _mapInstanceProperty(_context = _Object$entries(value.fields)).call(_context, _ref => {
|
|
2168
2039
|
let _ref2 = _slicedToArray(_ref, 2),
|
|
2169
2040
|
key = _ref2[0],
|
|
2170
2041
|
entry = _ref2[1];
|
|
2171
2042
|
const entryValue = entry.value !== undefined ? entry.value : entry;
|
|
2172
|
-
return _objectSpread$
|
|
2043
|
+
return _objectSpread$1f(_objectSpread$1f({}, entry), {}, {
|
|
2173
2044
|
name: key,
|
|
2174
2045
|
value: transformCustomTypeValue(entryValue)
|
|
2175
2046
|
});
|
|
@@ -2551,8 +2422,8 @@ var businessUnitChangeMessages = defineMessages({
|
|
|
2551
2422
|
}
|
|
2552
2423
|
});
|
|
2553
2424
|
|
|
2554
|
-
function ownKeys$
|
|
2555
|
-
function _objectSpread$
|
|
2425
|
+
function ownKeys$1e(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; }
|
|
2426
|
+
function _objectSpread$1e(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$1e(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$1e(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2556
2427
|
const formatRoleAssignmentsForChangeAssociate = (roleAssignments, intl) => _mapInstanceProperty(roleAssignments).call(roleAssignments, roleAssignment => jsx(Text.Detail, {
|
|
2557
2428
|
children: `${roleAssignment.associateRole.key}: ${roleAssignment.inheritance === 'Disabled' ? intl.formatMessage(businessUnitChangeMessages.inheritanceDisabled) : intl.formatMessage(businessUnitChangeMessages.inheritanceEnabled)}`
|
|
2558
2429
|
}, roleAssignment.associateRole.key)) || jsx(NoValueLabel, {});
|
|
@@ -2616,7 +2487,7 @@ const BusinessUnitChanges = props => {
|
|
|
2616
2487
|
case ResourceChangeInput.ChangeAddress:
|
|
2617
2488
|
{
|
|
2618
2489
|
return jsx(ComposedChange, {
|
|
2619
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
2490
|
+
label: jsx(FormattedMessage, _objectSpread$1e(_objectSpread$1e({}, messages$1k.addressIdLabel), {}, {
|
|
2620
2491
|
values: {
|
|
2621
2492
|
b: getBoldText,
|
|
2622
2493
|
addressId: props.value.id
|
|
@@ -2670,7 +2541,7 @@ const BusinessUnitChanges = props => {
|
|
|
2670
2541
|
{
|
|
2671
2542
|
return jsx(ComposedChange, {
|
|
2672
2543
|
label: jsxs(Fragment, {
|
|
2673
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
2544
|
+
children: [jsx(FormattedMessage, _objectSpread$1e(_objectSpread$1e({}, messages$1k.customFieldLabel), {}, {
|
|
2674
2545
|
values: {
|
|
2675
2546
|
b: getBoldText,
|
|
2676
2547
|
customField: props.change.previousValue?.label ? localize({
|
|
@@ -2680,7 +2551,7 @@ const BusinessUnitChanges = props => {
|
|
|
2680
2551
|
fallbackOrder: languages
|
|
2681
2552
|
}) : props.change.name
|
|
2682
2553
|
}
|
|
2683
|
-
})), jsx("br", {}), jsx(FormattedMessage, _objectSpread$
|
|
2554
|
+
})), jsx("br", {}), jsx(FormattedMessage, _objectSpread$1e(_objectSpread$1e({}, messages$1k.addressIdLabel), {}, {
|
|
2684
2555
|
values: {
|
|
2685
2556
|
b: getBoldText,
|
|
2686
2557
|
addressId: props.change.address.id
|
|
@@ -2700,7 +2571,7 @@ const BusinessUnitChanges = props => {
|
|
|
2700
2571
|
case ResourceChangeInput.SetAddressCustomType:
|
|
2701
2572
|
{
|
|
2702
2573
|
return jsx(ComposedChange, {
|
|
2703
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
2574
|
+
label: jsx(FormattedMessage, _objectSpread$1e(_objectSpread$1e({}, messages$1k.addressIdLabel), {}, {
|
|
2704
2575
|
values: {
|
|
2705
2576
|
b: getBoldText,
|
|
2706
2577
|
addressId: props.change.address.id
|
|
@@ -2761,10 +2632,10 @@ BusinessUnitChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2761
2632
|
value: PropTypes.any
|
|
2762
2633
|
} : {};
|
|
2763
2634
|
|
|
2764
|
-
function ownKeys$
|
|
2765
|
-
function _objectSpread$
|
|
2635
|
+
function ownKeys$1d(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; }
|
|
2636
|
+
function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1d(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2766
2637
|
const mapDiffToChange = (totalDiff, diff) => {
|
|
2767
|
-
return _objectSpread$
|
|
2638
|
+
return _objectSpread$1d(_objectSpread$1d({}, totalDiff), {}, {
|
|
2768
2639
|
[diff.path[0]]: {
|
|
2769
2640
|
previousValue: diff.lhs,
|
|
2770
2641
|
nextValue: diff.rhs
|
|
@@ -2812,8 +2683,8 @@ LocalizeChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2812
2683
|
value: PropTypes.objectOf(PropTypes.string)
|
|
2813
2684
|
} : {};
|
|
2814
2685
|
|
|
2815
|
-
function ownKeys$
|
|
2816
|
-
function _objectSpread$
|
|
2686
|
+
function ownKeys$1c(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; }
|
|
2687
|
+
function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1c(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2817
2688
|
const getChangeValue = (change, value) => {
|
|
2818
2689
|
if (!value) return jsx(NoValueLabel, {});
|
|
2819
2690
|
switch (change.change) {
|
|
@@ -2849,7 +2720,7 @@ const AssetChange = props => {
|
|
|
2849
2720
|
});
|
|
2850
2721
|
}
|
|
2851
2722
|
return jsx(ComposedChange, {
|
|
2852
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
2723
|
+
label: jsx(FormattedMessage, _objectSpread$1c(_objectSpread$1c({}, messages$1k.assetLabel), {}, {
|
|
2853
2724
|
values: {
|
|
2854
2725
|
b: getBoldText,
|
|
2855
2726
|
asset: localize({
|
|
@@ -2996,8 +2867,8 @@ CategoryChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2996
2867
|
value: PropTypes.any
|
|
2997
2868
|
} : {};
|
|
2998
2869
|
|
|
2999
|
-
function ownKeys$
|
|
3000
|
-
function _objectSpread$
|
|
2870
|
+
function ownKeys$1b(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; }
|
|
2871
|
+
function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1b(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1b(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3001
2872
|
const ChannelChanges = props => {
|
|
3002
2873
|
switch (props.change.change) {
|
|
3003
2874
|
case ResourceChangeInput.ChangeDescription:
|
|
@@ -3028,7 +2899,7 @@ const ChannelChanges = props => {
|
|
|
3028
2899
|
return jsxs(Spacings.Stack, {
|
|
3029
2900
|
scale: "xs",
|
|
3030
2901
|
children: [jsx("div", {
|
|
3031
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
2902
|
+
children: jsx(FormattedMessage, _objectSpread$1b(_objectSpread$1b({}, messages$1k.averageRatingLabel), {}, {
|
|
3032
2903
|
values: {
|
|
3033
2904
|
averageRating: props.value?.averageRating,
|
|
3034
2905
|
highestRating: props.value?.highestRating,
|
|
@@ -3036,7 +2907,7 @@ const ChannelChanges = props => {
|
|
|
3036
2907
|
}
|
|
3037
2908
|
}))
|
|
3038
2909
|
}), jsx("div", {
|
|
3039
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
2910
|
+
children: jsx(FormattedMessage, _objectSpread$1b(_objectSpread$1b({}, messages$1k.numberOfReviewsLabel), {}, {
|
|
3040
2911
|
values: {
|
|
3041
2912
|
count: props.value?.count
|
|
3042
2913
|
}
|
|
@@ -3052,7 +2923,7 @@ const ChannelChanges = props => {
|
|
|
3052
2923
|
}
|
|
3053
2924
|
case ResourceChangeInput.SetGeoLocation:
|
|
3054
2925
|
{
|
|
3055
|
-
return props.value ? jsx(FormattedMessage, _objectSpread$
|
|
2926
|
+
return props.value ? jsx(FormattedMessage, _objectSpread$1b(_objectSpread$1b({}, messages$1k.geoLocationLabel), {}, {
|
|
3056
2927
|
values: {
|
|
3057
2928
|
type: props.value.type,
|
|
3058
2929
|
longitude: props.value.coordinates[0],
|
|
@@ -4612,9 +4483,9 @@ var messages$X = defineMessages({
|
|
|
4612
4483
|
}
|
|
4613
4484
|
});
|
|
4614
4485
|
|
|
4615
|
-
function ownKeys$
|
|
4616
|
-
function _objectSpread$
|
|
4617
|
-
var changeMessages = _objectSpread$
|
|
4486
|
+
function ownKeys$1a(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; }
|
|
4487
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1a(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4488
|
+
var changeMessages = _objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a(_objectSpread$1a({}, assetsMessages), messages$1j), messages$1i), messages$1h), messages$1g), messages$1f), commonMessages), messages$1d), messages$1e), messages$1c), messages$1b), messages$1a), messages$19), messages$18), messages$17), messages$16), messages$15), messages$13), messages$14), messages$12), messages$11), messages$10), messages$$), messages$Z), messages$Y), messages$X), messages$_);
|
|
4618
4489
|
|
|
4619
4490
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$o() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
4620
4491
|
const tableStyles = process.env.NODE_ENV === "production" ? {
|
|
@@ -4751,8 +4622,8 @@ ShowFullChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
4751
4622
|
modal: PropTypes.node.isRequired
|
|
4752
4623
|
} : {};
|
|
4753
4624
|
|
|
4754
|
-
function ownKeys$
|
|
4755
|
-
function _objectSpread$
|
|
4625
|
+
function ownKeys$19(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; }
|
|
4626
|
+
function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$19(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$19(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4756
4627
|
const MAX_LINES = 12;
|
|
4757
4628
|
const MAX_CHARS = 2000;
|
|
4758
4629
|
const isChangeValueLarge$1 = value => {
|
|
@@ -4871,7 +4742,7 @@ const CustomObjectChanges = props => {
|
|
|
4871
4742
|
{
|
|
4872
4743
|
return isChangeValueLarge$1(props.change.previousValue) || isChangeValueLarge$1(props.change.nextValue) ? jsxs("div", {
|
|
4873
4744
|
css: productAttributeValuesStyles,
|
|
4874
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
4745
|
+
children: [jsx(FormattedMessage, _objectSpread$19(_objectSpread$19({}, messages$1k.pathLabel), {}, {
|
|
4875
4746
|
values: {
|
|
4876
4747
|
path: props.change.path,
|
|
4877
4748
|
b: getBoldText
|
|
@@ -4884,7 +4755,7 @@ const CustomObjectChanges = props => {
|
|
|
4884
4755
|
})
|
|
4885
4756
|
})]
|
|
4886
4757
|
}) : jsx(ComposedChange, {
|
|
4887
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
4758
|
+
label: jsx(FormattedMessage, _objectSpread$19(_objectSpread$19({}, messages$1k.pathLabel), {}, {
|
|
4888
4759
|
values: {
|
|
4889
4760
|
path: props.change.path,
|
|
4890
4761
|
b: getBoldText
|
|
@@ -4902,7 +4773,7 @@ const CustomObjectChanges = props => {
|
|
|
4902
4773
|
{
|
|
4903
4774
|
return jsxs("div", {
|
|
4904
4775
|
css: productAttributeValuesStyles,
|
|
4905
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
4776
|
+
children: [jsx(FormattedMessage, _objectSpread$19(_objectSpread$19({}, messages$1k.pathLabel), {}, {
|
|
4906
4777
|
values: {
|
|
4907
4778
|
path: props.change.path,
|
|
4908
4779
|
b: getBoldText
|
|
@@ -4922,7 +4793,7 @@ const CustomObjectChanges = props => {
|
|
|
4922
4793
|
{
|
|
4923
4794
|
return jsxs("div", {
|
|
4924
4795
|
css: productAttributeValuesStyles,
|
|
4925
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
4796
|
+
children: [jsx(FormattedMessage, _objectSpread$19(_objectSpread$19({}, messages$1k.pathLabel), {}, {
|
|
4926
4797
|
values: {
|
|
4927
4798
|
path: props.change.path,
|
|
4928
4799
|
b: getBoldText
|
|
@@ -4963,8 +4834,8 @@ CustomObjectChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
4963
4834
|
} : {};
|
|
4964
4835
|
|
|
4965
4836
|
const _excluded$j = ["typeId", "id"];
|
|
4966
|
-
function ownKeys$
|
|
4967
|
-
function _objectSpread$
|
|
4837
|
+
function ownKeys$18(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; }
|
|
4838
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$18(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$18(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4968
4839
|
const CustomerChanges = props => {
|
|
4969
4840
|
switch (props.change.change) {
|
|
4970
4841
|
case ResourceChangeInput.SetStores:
|
|
@@ -5003,7 +4874,7 @@ const CustomerChanges = props => {
|
|
|
5003
4874
|
case ResourceChangeInput.ChangeAddress:
|
|
5004
4875
|
{
|
|
5005
4876
|
return jsx(ComposedChange, {
|
|
5006
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
4877
|
+
label: jsx(FormattedMessage, _objectSpread$18(_objectSpread$18({}, messages$1k.addressIdLabel), {}, {
|
|
5007
4878
|
values: {
|
|
5008
4879
|
b: getBoldText,
|
|
5009
4880
|
addressId: props.value.id
|
|
@@ -5068,8 +4939,8 @@ CustomerChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
5068
4939
|
} : {};
|
|
5069
4940
|
|
|
5070
4941
|
const _excluded$i = ["typeId", "id"];
|
|
5071
|
-
function ownKeys$
|
|
5072
|
-
function _objectSpread$
|
|
4942
|
+
function ownKeys$17(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; }
|
|
4943
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$17(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$17(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5073
4944
|
const DiscountChanges = props => {
|
|
5074
4945
|
var _context;
|
|
5075
4946
|
const intl = useIntl();
|
|
@@ -5088,7 +4959,7 @@ const DiscountChanges = props => {
|
|
|
5088
4959
|
return jsxs(Spacings.Stack, {
|
|
5089
4960
|
scale: "xs",
|
|
5090
4961
|
children: [jsx("div", {
|
|
5091
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
4962
|
+
children: jsx(FormattedMessage, _objectSpread$17(_objectSpread$17({}, messages$1k.validFromLabel), {}, {
|
|
5092
4963
|
values: {
|
|
5093
4964
|
date: props.value.validFrom ? jsx(FormattedDateTime, {
|
|
5094
4965
|
type: "datetime",
|
|
@@ -5099,7 +4970,7 @@ const DiscountChanges = props => {
|
|
|
5099
4970
|
}
|
|
5100
4971
|
}))
|
|
5101
4972
|
}), jsx("div", {
|
|
5102
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
4973
|
+
children: jsx(FormattedMessage, _objectSpread$17(_objectSpread$17({}, messages$1k.validUntilLabel), {}, {
|
|
5103
4974
|
values: {
|
|
5104
4975
|
date: props.value.validUntil ? jsx(FormattedDateTime, {
|
|
5105
4976
|
type: "datetime",
|
|
@@ -5140,7 +5011,7 @@ const DiscountChanges = props => {
|
|
|
5140
5011
|
return jsxs(Spacings.Stack, {
|
|
5141
5012
|
scale: "xs",
|
|
5142
5013
|
children: [jsx("div", {
|
|
5143
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5014
|
+
children: jsx(FormattedMessage, _objectSpread$17(_objectSpread$17({}, messages$1k.predicateTypeLabel), {}, {
|
|
5144
5015
|
values: {
|
|
5145
5016
|
predicateType: jsx("b", {
|
|
5146
5017
|
children: props.value.type
|
|
@@ -5201,8 +5072,8 @@ DiscountChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
5201
5072
|
} : {};
|
|
5202
5073
|
|
|
5203
5074
|
const _excluded$h = ["typeId", "id"];
|
|
5204
|
-
function ownKeys$
|
|
5205
|
-
function _objectSpread$
|
|
5075
|
+
function ownKeys$16(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; }
|
|
5076
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$16(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$16(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5206
5077
|
const InventoryEntryChanges = props => {
|
|
5207
5078
|
switch (props.change.change) {
|
|
5208
5079
|
case ResourceChangeInput.SetCustomType:
|
|
@@ -5221,13 +5092,13 @@ const InventoryEntryChanges = props => {
|
|
|
5221
5092
|
return jsxs(Spacings.Stack, {
|
|
5222
5093
|
scale: "xs",
|
|
5223
5094
|
children: [jsx("div", {
|
|
5224
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5095
|
+
children: jsx(FormattedMessage, _objectSpread$16(_objectSpread$16({}, messages$1k.quantityOnStockLabel), {}, {
|
|
5225
5096
|
values: {
|
|
5226
5097
|
quantity: props.value.quantityOnStock
|
|
5227
5098
|
}
|
|
5228
5099
|
}))
|
|
5229
5100
|
}), jsx("div", {
|
|
5230
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5101
|
+
children: jsx(FormattedMessage, _objectSpread$16(_objectSpread$16({}, messages$1k.availableQuantityLabel), {}, {
|
|
5231
5102
|
values: {
|
|
5232
5103
|
quantity: props.value.availableQuantity
|
|
5233
5104
|
}
|
|
@@ -5235,7 +5106,7 @@ const InventoryEntryChanges = props => {
|
|
|
5235
5106
|
})]
|
|
5236
5107
|
});
|
|
5237
5108
|
case ResourceChangeInput.SetRestockableInDays:
|
|
5238
|
-
return jsx(FormattedMessage, _objectSpread$
|
|
5109
|
+
return jsx(FormattedMessage, _objectSpread$16(_objectSpread$16({}, messages$1k.setRestockableInDaysLabel), {}, {
|
|
5239
5110
|
values: {
|
|
5240
5111
|
day: props.value
|
|
5241
5112
|
}
|
|
@@ -5280,36 +5151,36 @@ InventoryEntryChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
5280
5151
|
value: PropTypes.any
|
|
5281
5152
|
} : {};
|
|
5282
5153
|
|
|
5283
|
-
function ownKeys$
|
|
5284
|
-
function _objectSpread$
|
|
5154
|
+
function ownKeys$15(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; }
|
|
5155
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$15(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$15(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5285
5156
|
const TrackingDataChange = props => props.value ? jsxs(Spacings.Stack, {
|
|
5286
5157
|
scale: "xs",
|
|
5287
5158
|
children: [props.value.trackingId && jsx("div", {
|
|
5288
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5159
|
+
children: jsx(FormattedMessage, _objectSpread$15(_objectSpread$15({}, messages$1k.trackingIdLabel), {}, {
|
|
5289
5160
|
values: {
|
|
5290
5161
|
trackingId: props.value.trackingId
|
|
5291
5162
|
}
|
|
5292
5163
|
}))
|
|
5293
5164
|
}), props.value.carrier && jsx("div", {
|
|
5294
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5165
|
+
children: jsx(FormattedMessage, _objectSpread$15(_objectSpread$15({}, messages$1k.carrierLabel), {}, {
|
|
5295
5166
|
values: {
|
|
5296
5167
|
carrier: props.value.carrier
|
|
5297
5168
|
}
|
|
5298
5169
|
}))
|
|
5299
5170
|
}), props.value.provider && jsx("div", {
|
|
5300
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5171
|
+
children: jsx(FormattedMessage, _objectSpread$15(_objectSpread$15({}, messages$1k.providerLabel), {}, {
|
|
5301
5172
|
values: {
|
|
5302
5173
|
provider: props.value.provider
|
|
5303
5174
|
}
|
|
5304
5175
|
}))
|
|
5305
5176
|
}), props.value.providerTransaction && jsx("div", {
|
|
5306
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5177
|
+
children: jsx(FormattedMessage, _objectSpread$15(_objectSpread$15({}, messages$1k.providerTransactionLabel), {}, {
|
|
5307
5178
|
values: {
|
|
5308
5179
|
providerTransaction: props.value.providerTransaction
|
|
5309
5180
|
}
|
|
5310
5181
|
}))
|
|
5311
5182
|
}), props.value.isReturn !== undefined && jsx("div", {
|
|
5312
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5183
|
+
children: jsx(FormattedMessage, _objectSpread$15(_objectSpread$15({}, messages$1k.isReturnLabel), {}, {
|
|
5313
5184
|
values: {
|
|
5314
5185
|
isReturn: _JSON$stringify(props.value.isReturn)
|
|
5315
5186
|
}
|
|
@@ -5329,25 +5200,25 @@ TrackingDataChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
5329
5200
|
const MeasurementsChange = props => props.value ? jsxs(Spacings.Stack, {
|
|
5330
5201
|
scale: "xs",
|
|
5331
5202
|
children: [props.value.heightInMillimeter && jsx("div", {
|
|
5332
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5203
|
+
children: jsx(FormattedMessage, _objectSpread$15(_objectSpread$15({}, messages$1k.heightInMillimeterLabel), {}, {
|
|
5333
5204
|
values: {
|
|
5334
5205
|
heightInMillimeter: props.value.heightInMillimeter
|
|
5335
5206
|
}
|
|
5336
5207
|
}))
|
|
5337
5208
|
}), props.value.lengthInMillimeter && jsx("div", {
|
|
5338
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5209
|
+
children: jsx(FormattedMessage, _objectSpread$15(_objectSpread$15({}, messages$1k.lengthInMillimeterLabel), {}, {
|
|
5339
5210
|
values: {
|
|
5340
5211
|
lengthInMillimeter: props.value.lengthInMillimeter
|
|
5341
5212
|
}
|
|
5342
5213
|
}))
|
|
5343
5214
|
}), props.value.widthInMillimeter && jsx("div", {
|
|
5344
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5215
|
+
children: jsx(FormattedMessage, _objectSpread$15(_objectSpread$15({}, messages$1k.widthInMillimeterLabel), {}, {
|
|
5345
5216
|
values: {
|
|
5346
5217
|
widthInMillimeter: props.value.widthInMillimeter
|
|
5347
5218
|
}
|
|
5348
5219
|
}))
|
|
5349
5220
|
}), props.value.weightInGram && jsx("div", {
|
|
5350
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5221
|
+
children: jsx(FormattedMessage, _objectSpread$15(_objectSpread$15({}, messages$1k.weightInGramLabel), {}, {
|
|
5351
5222
|
values: {
|
|
5352
5223
|
weightInGram: props.value.weightInGram
|
|
5353
5224
|
}
|
|
@@ -5364,8 +5235,8 @@ MeasurementsChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
5364
5235
|
})
|
|
5365
5236
|
} : {};
|
|
5366
5237
|
|
|
5367
|
-
function ownKeys$
|
|
5368
|
-
function _objectSpread$
|
|
5238
|
+
function ownKeys$14(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; }
|
|
5239
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$14(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$14(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5369
5240
|
const SetCustomerChange = props => {
|
|
5370
5241
|
if (!props.value) return jsx(NoValueLabel, {});
|
|
5371
5242
|
if (!props.value.email) return props.value.id;
|
|
@@ -5373,19 +5244,19 @@ const SetCustomerChange = props => {
|
|
|
5373
5244
|
css: productAttributeValuesStyles,
|
|
5374
5245
|
children: jsxs(Spacings.Stack, {
|
|
5375
5246
|
scale: "xs",
|
|
5376
|
-
children: [props.value.email && jsx(FormattedMessage, _objectSpread$
|
|
5247
|
+
children: [props.value.email && jsx(FormattedMessage, _objectSpread$14(_objectSpread$14({}, messages$1k.customerEmailLabel), {}, {
|
|
5377
5248
|
values: {
|
|
5378
5249
|
email: props.value.email
|
|
5379
5250
|
}
|
|
5380
|
-
})), props.value.firstName && jsx(FormattedMessage, _objectSpread$
|
|
5251
|
+
})), props.value.firstName && jsx(FormattedMessage, _objectSpread$14(_objectSpread$14({}, messages$1k.customerFirstNameLabel), {}, {
|
|
5381
5252
|
values: {
|
|
5382
5253
|
firstName: props.value.firstName
|
|
5383
5254
|
}
|
|
5384
|
-
})), props.value.lastName && jsx(FormattedMessage, _objectSpread$
|
|
5255
|
+
})), props.value.lastName && jsx(FormattedMessage, _objectSpread$14(_objectSpread$14({}, messages$1k.customerLastNameLabel), {}, {
|
|
5385
5256
|
values: {
|
|
5386
5257
|
lastName: props.value.lastName
|
|
5387
5258
|
}
|
|
5388
|
-
})), props.value.customerNumber && jsx(FormattedMessage, _objectSpread$
|
|
5259
|
+
})), props.value.customerNumber && jsx(FormattedMessage, _objectSpread$14(_objectSpread$14({}, messages$1k.customerNumberLabel), {}, {
|
|
5389
5260
|
values: {
|
|
5390
5261
|
customerNumber: props.value.customerNumber
|
|
5391
5262
|
}
|
|
@@ -5404,21 +5275,21 @@ SetCustomerChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
5404
5275
|
})
|
|
5405
5276
|
} : {};
|
|
5406
5277
|
|
|
5407
|
-
function ownKeys$
|
|
5408
|
-
function _objectSpread$
|
|
5278
|
+
function ownKeys$13(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; }
|
|
5279
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$13(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$13(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5409
5280
|
const ShippingRateChange = props => {
|
|
5410
5281
|
var _context;
|
|
5411
5282
|
const intl = useIntl();
|
|
5412
5283
|
return jsxs(Spacings.Stack, {
|
|
5413
5284
|
scale: "xs",
|
|
5414
5285
|
children: [jsx(Text.Detail, {
|
|
5415
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5286
|
+
children: jsx(FormattedMessage, _objectSpread$13(_objectSpread$13({}, messages$1k.shippingRatePriceLabel), {}, {
|
|
5416
5287
|
values: {
|
|
5417
5288
|
price: formatMoney(props.value.price, intl)
|
|
5418
5289
|
}
|
|
5419
5290
|
}))
|
|
5420
5291
|
}), props.value.freeAbove && jsx(Text.Detail, {
|
|
5421
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5292
|
+
children: jsx(FormattedMessage, _objectSpread$13(_objectSpread$13({}, messages$1k.shippingRateFreeAboveLabel), {}, {
|
|
5422
5293
|
values: {
|
|
5423
5294
|
freeAbove: formatMoney(props.value.freeAbove, intl)
|
|
5424
5295
|
}
|
|
@@ -5437,7 +5308,7 @@ const ShippingRateChange = props => {
|
|
|
5437
5308
|
children: jsxs(Spacings.Stack, {
|
|
5438
5309
|
scale: "xs",
|
|
5439
5310
|
children: [jsx(Text.Detail, {
|
|
5440
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5311
|
+
children: jsx(FormattedMessage, _objectSpread$13(_objectSpread$13({}, messages$1k.shippingRatePriceLabel), {}, {
|
|
5441
5312
|
values: {
|
|
5442
5313
|
price: formatMoney(tier.price, intl)
|
|
5443
5314
|
}
|
|
@@ -5445,17 +5316,17 @@ const ShippingRateChange = props => {
|
|
|
5445
5316
|
}), jsx(Spacings.Inline, {
|
|
5446
5317
|
scale: "xs",
|
|
5447
5318
|
children: jsxs(Text.Detail, {
|
|
5448
|
-
children: [tier.minimumCentAmount && jsx(FormattedMessage, _objectSpread$
|
|
5319
|
+
children: [tier.minimumCentAmount && jsx(FormattedMessage, _objectSpread$13(_objectSpread$13({}, messages$1k.cartValueShippingRateTierLabel), {}, {
|
|
5449
5320
|
values: {
|
|
5450
|
-
minimumCentAmount: formatMoney(_objectSpread$
|
|
5321
|
+
minimumCentAmount: formatMoney(_objectSpread$13(_objectSpread$13({}, tier.price), {}, {
|
|
5451
5322
|
centAmount: tier.minimumCentAmount
|
|
5452
5323
|
}), intl)
|
|
5453
5324
|
}
|
|
5454
|
-
})), tier.score && jsx(FormattedMessage, _objectSpread$
|
|
5325
|
+
})), tier.score && jsx(FormattedMessage, _objectSpread$13(_objectSpread$13({}, messages$1k.cartScoreShippingRateTierLabel), {}, {
|
|
5455
5326
|
values: {
|
|
5456
5327
|
score: tier.score
|
|
5457
5328
|
}
|
|
5458
|
-
})), tier.value && jsx(FormattedMessage, _objectSpread$
|
|
5329
|
+
})), tier.value && jsx(FormattedMessage, _objectSpread$13(_objectSpread$13({}, messages$1k.cartClassificationShippingRateTierLabel), {}, {
|
|
5459
5330
|
values: {
|
|
5460
5331
|
key: tier.value
|
|
5461
5332
|
}
|
|
@@ -5486,8 +5357,8 @@ ShippingRateChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
5486
5357
|
}).isRequired
|
|
5487
5358
|
} : {};
|
|
5488
5359
|
|
|
5489
|
-
function ownKeys$
|
|
5490
|
-
function _objectSpread$
|
|
5360
|
+
function ownKeys$12(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; }
|
|
5361
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$12(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$12(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5491
5362
|
const ShippingRateInputChange = props => {
|
|
5492
5363
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
5493
5364
|
language: applicationContext.dataLocale,
|
|
@@ -5509,7 +5380,7 @@ const ShippingRateInputChange = props => {
|
|
|
5509
5380
|
}), jsx(Spacings.Inline, {
|
|
5510
5381
|
scale: "xs",
|
|
5511
5382
|
children: jsx(Text.Detail, {
|
|
5512
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5383
|
+
children: jsx(FormattedMessage, _objectSpread$12(_objectSpread$12({}, messages$1k.valueLabel), {}, {
|
|
5513
5384
|
values: {
|
|
5514
5385
|
value: props.value.score || localize({
|
|
5515
5386
|
obj: props.value,
|
|
@@ -5532,8 +5403,8 @@ ShippingRateInputChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
5532
5403
|
}).isRequired
|
|
5533
5404
|
} : {};
|
|
5534
5405
|
|
|
5535
|
-
function ownKeys$
|
|
5536
|
-
function _objectSpread$
|
|
5406
|
+
function ownKeys$11(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; }
|
|
5407
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$11(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$11(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5537
5408
|
const TaxRateChange = props => {
|
|
5538
5409
|
var _context;
|
|
5539
5410
|
return jsxs(Spacings.Stack, {
|
|
@@ -5546,7 +5417,7 @@ const TaxRateChange = props => {
|
|
|
5546
5417
|
children: props.value.name
|
|
5547
5418
|
})]
|
|
5548
5419
|
}), jsx(Text.Detail, {
|
|
5549
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
5420
|
+
children: jsx(FormattedMessage, _objectSpread$11(_objectSpread$11({}, props.value.includedInPrice ? messages$1k.taxRateAmountIncludedInPriceLabel : messages$1k.taxRateAmountNotIncludedInPriceLabel), {}, {
|
|
5550
5421
|
values: {
|
|
5551
5422
|
amount: props.value.amount
|
|
5552
5423
|
}
|
|
@@ -5585,21 +5456,21 @@ TaxRateChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
5585
5456
|
}).isRequired
|
|
5586
5457
|
} : {};
|
|
5587
5458
|
|
|
5588
|
-
function ownKeys
|
|
5589
|
-
function _objectSpread
|
|
5459
|
+
function ownKeys$10(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; }
|
|
5460
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$10(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$10(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5590
5461
|
const TaxedPriceChange = props => {
|
|
5591
5462
|
var _context;
|
|
5592
5463
|
const intl = useIntl();
|
|
5593
5464
|
return jsxs(Spacings.Stack, {
|
|
5594
5465
|
scale: "xs",
|
|
5595
5466
|
children: [jsx(Text.Detail, {
|
|
5596
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5467
|
+
children: jsx(FormattedMessage, _objectSpread$10(_objectSpread$10({}, messages$1k.totalNetLabel), {}, {
|
|
5597
5468
|
values: {
|
|
5598
5469
|
totalNet: formatMoney(props.value.totalNet, intl)
|
|
5599
5470
|
}
|
|
5600
5471
|
}))
|
|
5601
5472
|
}), jsx(Text.Detail, {
|
|
5602
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5473
|
+
children: jsx(FormattedMessage, _objectSpread$10(_objectSpread$10({}, messages$1k.totalGrossLabel), {}, {
|
|
5603
5474
|
values: {
|
|
5604
5475
|
totalGross: formatMoney(props.value.totalGross, intl)
|
|
5605
5476
|
}
|
|
@@ -5619,7 +5490,7 @@ const TaxedPriceChange = props => {
|
|
|
5619
5490
|
children: taxPortion.name
|
|
5620
5491
|
})]
|
|
5621
5492
|
}), jsx(Text.Detail, {
|
|
5622
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5493
|
+
children: jsx(FormattedMessage, _objectSpread$10(_objectSpread$10({}, messages$1k.taxPortionItemLabel), {}, {
|
|
5623
5494
|
values: {
|
|
5624
5495
|
amount: formatMoney(taxPortion.amount, intl),
|
|
5625
5496
|
rate: taxPortion.rate
|
|
@@ -5806,23 +5677,23 @@ var messages$W = defineMessages({
|
|
|
5806
5677
|
|
|
5807
5678
|
const _excluded$g = ["typeId", "id"],
|
|
5808
5679
|
_excluded2$4 = ["typeId", "id"];
|
|
5809
|
-
function ownKeys
|
|
5810
|
-
function _objectSpread
|
|
5680
|
+
function ownKeys$$(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; }
|
|
5681
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context7 = ownKeys$$(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context8 = ownKeys$$(Object(t))).call(_context8, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5811
5682
|
const lineItemPropsMessages = {
|
|
5812
|
-
name: jsx(FormattedMessage, _objectSpread
|
|
5813
|
-
price: jsx(FormattedMessage, _objectSpread
|
|
5814
|
-
quantity: jsx(FormattedMessage, _objectSpread
|
|
5815
|
-
totalPrice: jsx(FormattedMessage, _objectSpread
|
|
5816
|
-
variantId: jsx(FormattedMessage, _objectSpread
|
|
5817
|
-
variantSku: jsx(FormattedMessage, _objectSpread
|
|
5683
|
+
name: jsx(FormattedMessage, _objectSpread$$({}, messages$W.nameColumnLabel)),
|
|
5684
|
+
price: jsx(FormattedMessage, _objectSpread$$({}, messages$W.priceColumnLabel)),
|
|
5685
|
+
quantity: jsx(FormattedMessage, _objectSpread$$({}, messages$W.quantityColumnLabel)),
|
|
5686
|
+
totalPrice: jsx(FormattedMessage, _objectSpread$$({}, messages$W.totalPriceColumnLabel)),
|
|
5687
|
+
variantId: jsx(FormattedMessage, _objectSpread$$({}, messages$W.variantIdColumnLabel)),
|
|
5688
|
+
variantSku: jsx(FormattedMessage, _objectSpread$$({}, messages$W.variantSkuColumnLabel))
|
|
5818
5689
|
};
|
|
5819
5690
|
const customLineItemsPropsMessages = {
|
|
5820
|
-
name: jsx(FormattedMessage, _objectSpread
|
|
5821
|
-
slug: jsx(FormattedMessage, _objectSpread
|
|
5822
|
-
quantity: jsx(FormattedMessage, _objectSpread
|
|
5823
|
-
totalPrice: jsx(FormattedMessage, _objectSpread
|
|
5691
|
+
name: jsx(FormattedMessage, _objectSpread$$({}, messages$W.nameColumnLabel)),
|
|
5692
|
+
slug: jsx(FormattedMessage, _objectSpread$$({}, messages$W.slugColumnLabel)),
|
|
5693
|
+
quantity: jsx(FormattedMessage, _objectSpread$$({}, messages$W.quantityColumnLabel)),
|
|
5694
|
+
totalPrice: jsx(FormattedMessage, _objectSpread$$({}, messages$W.totalPriceColumnLabel))
|
|
5824
5695
|
};
|
|
5825
|
-
const getLineItemLabel = (lineItemChange, language, languages) => jsx(FormattedMessage, _objectSpread
|
|
5696
|
+
const getLineItemLabel = (lineItemChange, language, languages) => jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.lineItemLabel), {}, {
|
|
5826
5697
|
values: {
|
|
5827
5698
|
b: getBoldText,
|
|
5828
5699
|
item: localize({
|
|
@@ -5835,7 +5706,7 @@ const getLineItemLabel = (lineItemChange, language, languages) => jsx(FormattedM
|
|
|
5835
5706
|
variant: lineItemChange.variant
|
|
5836
5707
|
}
|
|
5837
5708
|
}));
|
|
5838
|
-
const getCustomLineItemLabel = (customLineItemChange, language, languages) => jsx(FormattedMessage, _objectSpread
|
|
5709
|
+
const getCustomLineItemLabel = (customLineItemChange, language, languages) => jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.customLineItemLabel), {}, {
|
|
5839
5710
|
values: {
|
|
5840
5711
|
b: getBoldText,
|
|
5841
5712
|
item: localize({
|
|
@@ -5897,7 +5768,7 @@ const OrderChanges = props => {
|
|
|
5897
5768
|
{
|
|
5898
5769
|
var _context, _context2;
|
|
5899
5770
|
return jsx(ComposedChange, {
|
|
5900
|
-
label: jsx(FormattedMessage, _objectSpread
|
|
5771
|
+
label: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.parcelLabel), {}, {
|
|
5901
5772
|
values: {
|
|
5902
5773
|
b: getBoldText,
|
|
5903
5774
|
parcelDate: formatDateTime('datetime', props.change.parcel?.createdAt, {
|
|
@@ -5908,7 +5779,7 @@ const OrderChanges = props => {
|
|
|
5908
5779
|
nextValue: jsx(Spacings.Stack, {
|
|
5909
5780
|
scale: "xs",
|
|
5910
5781
|
children: props.change.nextValue.length > 0 ? _mapInstanceProperty(_context = props.change.nextValue).call(_context, next => jsx("div", {
|
|
5911
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5782
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.parcelInfoLabel), {}, {
|
|
5912
5783
|
values: {
|
|
5913
5784
|
parcelId: next.id,
|
|
5914
5785
|
parcelQuantity: next.quantity
|
|
@@ -5919,7 +5790,7 @@ const OrderChanges = props => {
|
|
|
5919
5790
|
previousValue: jsx(Spacings.Stack, {
|
|
5920
5791
|
scale: "xs",
|
|
5921
5792
|
children: props.change.previousValue.length > 0 ? _mapInstanceProperty(_context2 = props.change.previousValue).call(_context2, prev => jsx("div", {
|
|
5922
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5793
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.parcelInfoLabel), {}, {
|
|
5923
5794
|
values: {
|
|
5924
5795
|
parcelId: prev.id,
|
|
5925
5796
|
parcelQuantity: prev.quantity
|
|
@@ -5933,7 +5804,7 @@ const OrderChanges = props => {
|
|
|
5933
5804
|
{
|
|
5934
5805
|
var _context3, _context4;
|
|
5935
5806
|
return jsx(ComposedChange, {
|
|
5936
|
-
label: jsx(FormattedMessage, _objectSpread
|
|
5807
|
+
label: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.deliveryLabel), {}, {
|
|
5937
5808
|
values: {
|
|
5938
5809
|
b: getBoldText,
|
|
5939
5810
|
delivery: props.change.deliveryId
|
|
@@ -5942,7 +5813,7 @@ const OrderChanges = props => {
|
|
|
5942
5813
|
nextValue: jsx(Spacings.Stack, {
|
|
5943
5814
|
scale: "xs",
|
|
5944
5815
|
children: props.change.nextValue.length > 0 ? _mapInstanceProperty(_context3 = props.change.nextValue).call(_context3, next => jsx("div", {
|
|
5945
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5816
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.parcelInfoLabel), {}, {
|
|
5946
5817
|
values: {
|
|
5947
5818
|
parcelId: next.id,
|
|
5948
5819
|
parcelQuantity: next.quantity
|
|
@@ -5953,7 +5824,7 @@ const OrderChanges = props => {
|
|
|
5953
5824
|
previousValue: jsx(Spacings.Stack, {
|
|
5954
5825
|
scale: "xs",
|
|
5955
5826
|
children: props.change.previousValue.length > 0 ? _mapInstanceProperty(_context4 = props.change.previousValue).call(_context4, prev => jsx("div", {
|
|
5956
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5827
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.parcelInfoLabel), {}, {
|
|
5957
5828
|
values: {
|
|
5958
5829
|
parcelId: prev.id,
|
|
5959
5830
|
parcelQuantity: prev.quantity
|
|
@@ -5966,7 +5837,7 @@ const OrderChanges = props => {
|
|
|
5966
5837
|
case ResourceChangeInput.UpdateItemShippingAddress:
|
|
5967
5838
|
{
|
|
5968
5839
|
return jsx(ComposedChange, {
|
|
5969
|
-
label: jsx(FormattedMessage, _objectSpread
|
|
5840
|
+
label: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.addressKeyLabel), {}, {
|
|
5970
5841
|
values: {
|
|
5971
5842
|
b: getBoldText,
|
|
5972
5843
|
addressKey: props.change.previousValue.key || props.change.nextValue.key
|
|
@@ -5984,7 +5855,7 @@ const OrderChanges = props => {
|
|
|
5984
5855
|
nextValue: jsx(Spacings.Stack, {
|
|
5985
5856
|
scale: "xs",
|
|
5986
5857
|
children: props.change.nextValue?.targets.length > 0 ? props.change.nextValue?.targets.map(target => jsx("div", {
|
|
5987
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5858
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.itemShippingAddressLabel), {}, {
|
|
5988
5859
|
values: target
|
|
5989
5860
|
}))
|
|
5990
5861
|
}, `${props?.change?.change}-next-${target.id}-${target.quantity}`)) : jsx(NoValueLabel, {})
|
|
@@ -5992,7 +5863,7 @@ const OrderChanges = props => {
|
|
|
5992
5863
|
previousValue: jsx(Spacings.Stack, {
|
|
5993
5864
|
scale: "xs",
|
|
5994
5865
|
children: props.change.previousValue?.targets.length > 0 ? props.change.previousValue?.targets.map(target => jsx("div", {
|
|
5995
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5866
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.itemShippingAddressLabel), {}, {
|
|
5996
5867
|
values: target
|
|
5997
5868
|
}))
|
|
5998
5869
|
}, `${props?.change?.change}-prev-${target.id}-${target.quantity}`)) : jsx(NoValueLabel, {})
|
|
@@ -6002,7 +5873,7 @@ const OrderChanges = props => {
|
|
|
6002
5873
|
case ResourceChangeInput.SetParcelTrackingData:
|
|
6003
5874
|
{
|
|
6004
5875
|
return jsx(ComposedChange, {
|
|
6005
|
-
label: jsx(FormattedMessage, _objectSpread
|
|
5876
|
+
label: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.parcelLabel), {}, {
|
|
6006
5877
|
values: {
|
|
6007
5878
|
b: getBoldText,
|
|
6008
5879
|
parcelDate: formatDateTime('datetime', props.change.parcel?.createdAt, {
|
|
@@ -6021,7 +5892,7 @@ const OrderChanges = props => {
|
|
|
6021
5892
|
case ResourceChangeInput.SetParcelMeasurements:
|
|
6022
5893
|
{
|
|
6023
5894
|
return jsx(ComposedChange, {
|
|
6024
|
-
label: jsx(FormattedMessage, _objectSpread
|
|
5895
|
+
label: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.parcelLabel), {}, {
|
|
6025
5896
|
values: {
|
|
6026
5897
|
b: getBoldText,
|
|
6027
5898
|
parcelDate: formatDateTime('datetime', props.change.parcel?.createdAt, {
|
|
@@ -6043,7 +5914,7 @@ const OrderChanges = props => {
|
|
|
6043
5914
|
const value = props.value || props.change.previousValue;
|
|
6044
5915
|
return jsx("div", {
|
|
6045
5916
|
css: productAttributeValuesStyles,
|
|
6046
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5917
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.removeDeliveryLabel), {}, {
|
|
6047
5918
|
values: {
|
|
6048
5919
|
deliveryDate: value?.createdAt ? formatDateTime('datetime', value?.createdAt, {
|
|
6049
5920
|
locale: intl.locale
|
|
@@ -6060,7 +5931,7 @@ const OrderChanges = props => {
|
|
|
6060
5931
|
const value = props.value || props.change.previousValue;
|
|
6061
5932
|
return jsx("div", {
|
|
6062
5933
|
css: productAttributeValuesStyles,
|
|
6063
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5934
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.removeParcelLabel), {}, {
|
|
6064
5935
|
values: {
|
|
6065
5936
|
parcelDate: value?.createdAt ? formatDateTime('datetime', value?.createdAt, {
|
|
6066
5937
|
locale: intl.locale
|
|
@@ -6073,7 +5944,7 @@ const OrderChanges = props => {
|
|
|
6073
5944
|
case ResourceChangeInput.SetDeliveryAddress:
|
|
6074
5945
|
{
|
|
6075
5946
|
return jsx(ComposedChange, {
|
|
6076
|
-
label: jsx(FormattedMessage, _objectSpread
|
|
5947
|
+
label: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.deliveryLabel), {}, {
|
|
6077
5948
|
values: {
|
|
6078
5949
|
b: getBoldText,
|
|
6079
5950
|
delivery: props.change.deliveryId
|
|
@@ -6110,13 +5981,13 @@ const OrderChanges = props => {
|
|
|
6110
5981
|
case ResourceChangeInput.UpdateSyncInfo:
|
|
6111
5982
|
{
|
|
6112
5983
|
return jsx(ComposedChange, {
|
|
6113
|
-
label: jsx(FormattedMessage, _objectSpread
|
|
5984
|
+
label: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.syncedChannelLabel), {}, {
|
|
6114
5985
|
values: {
|
|
6115
5986
|
channel: props.value.channel.key || props.value.channel.id
|
|
6116
5987
|
}
|
|
6117
5988
|
})),
|
|
6118
5989
|
previousValue: props.change.previousValue ? jsx("div", {
|
|
6119
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5990
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.syncedAtLabel), {}, {
|
|
6120
5991
|
values: {
|
|
6121
5992
|
syncedAt: formatDateTime('datetime', props.change.previousValue.syncedAt, {
|
|
6122
5993
|
locale: intl.locale
|
|
@@ -6125,7 +5996,7 @@ const OrderChanges = props => {
|
|
|
6125
5996
|
}))
|
|
6126
5997
|
}) : jsx(NoValueLabel, {}),
|
|
6127
5998
|
nextValue: props.change.nextValue ? jsx("div", {
|
|
6128
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
5999
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.syncedAtLabel), {}, {
|
|
6129
6000
|
values: {
|
|
6130
6001
|
syncedAt: formatDateTime('datetime', props.change.nextValue.syncedAt, {
|
|
6131
6002
|
locale: intl.locale
|
|
@@ -6138,7 +6009,7 @@ const OrderChanges = props => {
|
|
|
6138
6009
|
case ResourceChangeInput.AddReturnInfo:
|
|
6139
6010
|
return jsx("div", {
|
|
6140
6011
|
css: productAttributeValuesStyles,
|
|
6141
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
6012
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.addReturnLabel), {}, {
|
|
6142
6013
|
values: {
|
|
6143
6014
|
returnDate: formatDateTime('datetime', props.change.nextValue.returnDate, {
|
|
6144
6015
|
locale: intl.locale
|
|
@@ -6178,18 +6049,18 @@ const OrderChanges = props => {
|
|
|
6178
6049
|
return jsxs("div", {
|
|
6179
6050
|
css: productAttributeValuesStyles,
|
|
6180
6051
|
children: [props?.change?.change === 'transitionCustomLineItemState' ? getCustomLineItemLabel(props.change, language, languages) : getLineItemLabel(props.change, language, languages), jsx(ComposedChange, {
|
|
6181
|
-
label: jsx(FormattedMessage, _objectSpread
|
|
6052
|
+
label: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.stateLabel), {}, {
|
|
6182
6053
|
values: {
|
|
6183
6054
|
b: getBoldText,
|
|
6184
6055
|
state: stateLabel
|
|
6185
6056
|
}
|
|
6186
6057
|
})),
|
|
6187
|
-
nextValue: nextState ? jsx(FormattedMessage, _objectSpread
|
|
6058
|
+
nextValue: nextState ? jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.stateQuantityLabel), {}, {
|
|
6188
6059
|
values: {
|
|
6189
6060
|
quantity: nextState.quantity
|
|
6190
6061
|
}
|
|
6191
6062
|
})) : jsx(NoValueLabel, {}),
|
|
6192
|
-
previousValue: prevState ? jsx(FormattedMessage, _objectSpread
|
|
6063
|
+
previousValue: prevState ? jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.stateQuantityLabel), {}, {
|
|
6193
6064
|
values: {
|
|
6194
6065
|
quantity: prevState.quantity
|
|
6195
6066
|
}
|
|
@@ -6351,7 +6222,7 @@ const OrderChanges = props => {
|
|
|
6351
6222
|
scale: "s",
|
|
6352
6223
|
children: [jsxs(Spacings.Stack, {
|
|
6353
6224
|
scale: "xs",
|
|
6354
|
-
children: [jsx(FormattedMessage, _objectSpread
|
|
6225
|
+
children: [jsx(FormattedMessage, _objectSpread$$({}, messages$1k.taxRateLabel)), jsxs(Spacings.Inline, {
|
|
6355
6226
|
scale: "l",
|
|
6356
6227
|
children: [jsx("div", {}), jsx(TaxRateChange, {
|
|
6357
6228
|
value: props.value.taxRate
|
|
@@ -6359,7 +6230,7 @@ const OrderChanges = props => {
|
|
|
6359
6230
|
})]
|
|
6360
6231
|
}), jsxs(Spacings.Stack, {
|
|
6361
6232
|
scale: "xs",
|
|
6362
|
-
children: [jsx(FormattedMessage, _objectSpread
|
|
6233
|
+
children: [jsx(FormattedMessage, _objectSpread$$({}, messages$1k.taxedPriceLabel)), jsxs(Spacings.Inline, {
|
|
6363
6234
|
scale: "l",
|
|
6364
6235
|
children: [jsx("div", {}), jsx(TaxedPriceChange, {
|
|
6365
6236
|
value: props.value.taxedPrice
|
|
@@ -6398,13 +6269,13 @@ const OrderChanges = props => {
|
|
|
6398
6269
|
nextValue: props.change.nextValue ? jsxs(Spacings.Stack, {
|
|
6399
6270
|
scale: "xs",
|
|
6400
6271
|
children: [jsx(Text.Detail, {
|
|
6401
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
6272
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.stateQuantityLabel), {}, {
|
|
6402
6273
|
values: {
|
|
6403
6274
|
quantity: props.change.nextValue.quantity
|
|
6404
6275
|
}
|
|
6405
6276
|
}))
|
|
6406
6277
|
}), jsx(Text.Detail, {
|
|
6407
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
6278
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.discountedPriceLabel), {}, {
|
|
6408
6279
|
values: {
|
|
6409
6280
|
discountedPrice: formatMoney(props.change.nextValue.discountedPrice.value, intl)
|
|
6410
6281
|
}
|
|
@@ -6414,13 +6285,13 @@ const OrderChanges = props => {
|
|
|
6414
6285
|
previousValue: props.change.previousValue ? jsxs(Spacings.Stack, {
|
|
6415
6286
|
scale: "xs",
|
|
6416
6287
|
children: [jsx(Text.Detail, {
|
|
6417
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
6288
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.stateQuantityLabel), {}, {
|
|
6418
6289
|
values: {
|
|
6419
6290
|
quantity: props.change.previousValue.quantity
|
|
6420
6291
|
}
|
|
6421
6292
|
}))
|
|
6422
6293
|
}), jsx(Text.Detail, {
|
|
6423
|
-
children: jsx(FormattedMessage, _objectSpread
|
|
6294
|
+
children: jsx(FormattedMessage, _objectSpread$$(_objectSpread$$({}, messages$1k.discountedPriceLabel), {}, {
|
|
6424
6295
|
values: {
|
|
6425
6296
|
discountedPrice: formatMoney(props.change.previousValue.discountedPrice.value, intl)
|
|
6426
6297
|
}
|
|
@@ -6790,8 +6661,8 @@ ProductSelectionChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
6790
6661
|
modifiedAt: PropTypes.string
|
|
6791
6662
|
} : {};
|
|
6792
6663
|
|
|
6793
|
-
function ownKeys$
|
|
6794
|
-
function _objectSpread$
|
|
6664
|
+
function ownKeys$_(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; }
|
|
6665
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$_(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$_(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6795
6666
|
const ProductTypeChanges = props => {
|
|
6796
6667
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
6797
6668
|
language: applicationContext.dataLocale,
|
|
@@ -6816,7 +6687,7 @@ const ProductTypeChanges = props => {
|
|
|
6816
6687
|
{
|
|
6817
6688
|
return jsx("div", {
|
|
6818
6689
|
css: productAttributeValuesStyles,
|
|
6819
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
6690
|
+
children: jsx(FormattedMessage, _objectSpread$_(_objectSpread$_({}, messages$1k.attributeNameLabel), {}, {
|
|
6820
6691
|
values: {
|
|
6821
6692
|
attributeName: props.change.previousValue?.name
|
|
6822
6693
|
}
|
|
@@ -6827,7 +6698,7 @@ const ProductTypeChanges = props => {
|
|
|
6827
6698
|
{
|
|
6828
6699
|
return jsx("div", {
|
|
6829
6700
|
css: productAttributeValuesStyles,
|
|
6830
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
6701
|
+
children: jsx(FormattedMessage, _objectSpread$_(_objectSpread$_({}, messages$1k.attributeNameLabel), {}, {
|
|
6831
6702
|
values: {
|
|
6832
6703
|
attributeName: props.value.name
|
|
6833
6704
|
}
|
|
@@ -6839,7 +6710,7 @@ const ProductTypeChanges = props => {
|
|
|
6839
6710
|
{
|
|
6840
6711
|
return jsxs("div", {
|
|
6841
6712
|
css: productAttributeValuesStyles,
|
|
6842
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
6713
|
+
children: [jsx(FormattedMessage, _objectSpread$_(_objectSpread$_({}, messages$1k.attributeChangeLabel), {}, {
|
|
6843
6714
|
values: {
|
|
6844
6715
|
b: getBoldText,
|
|
6845
6716
|
attribute: props.change.attributeName
|
|
@@ -6860,7 +6731,7 @@ const ProductTypeChanges = props => {
|
|
|
6860
6731
|
}) : props.change.previousValue?.label;
|
|
6861
6732
|
return jsxs("div", {
|
|
6862
6733
|
css: productAttributeValuesStyles,
|
|
6863
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
6734
|
+
children: [jsx(FormattedMessage, _objectSpread$_(_objectSpread$_({}, messages$1k.attributeChangeLabel), {}, {
|
|
6864
6735
|
values: {
|
|
6865
6736
|
b: getBoldText,
|
|
6866
6737
|
attribute: props.change.attributeName
|
|
@@ -6877,7 +6748,7 @@ const ProductTypeChanges = props => {
|
|
|
6877
6748
|
case ResourceChangeInput.ChangeInputHint:
|
|
6878
6749
|
{
|
|
6879
6750
|
return jsx(ComposedChange, {
|
|
6880
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
6751
|
+
label: jsx(FormattedMessage, _objectSpread$_(_objectSpread$_({}, messages$1k.attributeChangeLabel), {}, {
|
|
6881
6752
|
values: {
|
|
6882
6753
|
b: getBoldText,
|
|
6883
6754
|
attribute: props.change.attributeName
|
|
@@ -6891,7 +6762,7 @@ const ProductTypeChanges = props => {
|
|
|
6891
6762
|
case ResourceChangeInput.ChangePlainEnumValueLabel:
|
|
6892
6763
|
{
|
|
6893
6764
|
return jsx(ComposedChange, {
|
|
6894
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
6765
|
+
label: jsx(FormattedMessage, _objectSpread$_(_objectSpread$_({}, messages$1k.attributeChangeLabel), {}, {
|
|
6895
6766
|
values: {
|
|
6896
6767
|
b: getBoldText,
|
|
6897
6768
|
attribute: props.change.attributeName
|
|
@@ -6904,7 +6775,7 @@ const ProductTypeChanges = props => {
|
|
|
6904
6775
|
case ResourceChangeInput.ChangeLocalizedEnumValueLabel:
|
|
6905
6776
|
{
|
|
6906
6777
|
return jsx(ComposedChange, {
|
|
6907
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
6778
|
+
label: jsx(FormattedMessage, _objectSpread$_(_objectSpread$_({}, messages$1k.attributeChangeLabel), {}, {
|
|
6908
6779
|
values: {
|
|
6909
6780
|
b: getBoldText,
|
|
6910
6781
|
attribute: props.change.attributeName
|
|
@@ -6944,7 +6815,7 @@ const ProductTypeChanges = props => {
|
|
|
6944
6815
|
}));
|
|
6945
6816
|
}
|
|
6946
6817
|
return jsx(ComposedChange, {
|
|
6947
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
6818
|
+
label: jsx(FormattedMessage, _objectSpread$_(_objectSpread$_({}, messages$1k.attributeChangeLabel), {}, {
|
|
6948
6819
|
values: {
|
|
6949
6820
|
b: getBoldText,
|
|
6950
6821
|
attribute: props.change.attributeName
|
|
@@ -7008,8 +6879,8 @@ ProductTypeChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
7008
6879
|
value: PropTypes.any
|
|
7009
6880
|
} : {};
|
|
7010
6881
|
|
|
7011
|
-
function ownKeys$
|
|
7012
|
-
function _objectSpread$
|
|
6882
|
+
function ownKeys$Z(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; }
|
|
6883
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$Z(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$Z(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7013
6884
|
const getAttributeType = value => {
|
|
7014
6885
|
if (value.typeId && value.id) {
|
|
7015
6886
|
return 'reference';
|
|
@@ -7043,7 +6914,7 @@ const AttributeChange = props => {
|
|
|
7043
6914
|
const hasNextValues = hasValues(props.change.nextValue?.filter(Boolean));
|
|
7044
6915
|
return jsxs("div", {
|
|
7045
6916
|
css: productAttributeValuesStyles,
|
|
7046
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
6917
|
+
children: [jsx(FormattedMessage, _objectSpread$Z(_objectSpread$Z({}, messages$1k.variantLabel), {}, {
|
|
7047
6918
|
values: {
|
|
7048
6919
|
b: getBoldText,
|
|
7049
6920
|
variant: props.change.variant
|
|
@@ -7054,7 +6925,7 @@ const AttributeChange = props => {
|
|
|
7054
6925
|
const nextValue = getValue$2(v.name, props.change.nextValue?.filter(Boolean));
|
|
7055
6926
|
return jsxs("div", {
|
|
7056
6927
|
css: productAttributeValuesStyles,
|
|
7057
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
6928
|
+
children: [jsx(FormattedMessage, _objectSpread$Z(_objectSpread$Z({}, messages$1k.attributeLabel), {}, {
|
|
7058
6929
|
values: {
|
|
7059
6930
|
b: getBoldText,
|
|
7060
6931
|
attribute: v.name
|
|
@@ -7127,8 +6998,8 @@ AttributeChange.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
7127
6998
|
}).isRequired
|
|
7128
6999
|
} : {};
|
|
7129
7000
|
|
|
7130
|
-
function ownKeys$
|
|
7131
|
-
function _objectSpread$
|
|
7001
|
+
function ownKeys$Y(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; }
|
|
7002
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$Y(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$Y(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7132
7003
|
const getPriceAttribute = attribute => {
|
|
7133
7004
|
if (_includesInstanceProperty(attribute).call(attribute, 'customerGroup')) return 'customerGroup';
|
|
7134
7005
|
if (_includesInstanceProperty(attribute).call(attribute, 'custom')) return 'custom';
|
|
@@ -7163,12 +7034,12 @@ function renderAttribute(changedAttribute, value, intl) {
|
|
|
7163
7034
|
scale: "s",
|
|
7164
7035
|
children: [jsxs(Spacings.Inline, {
|
|
7165
7036
|
scale: "xs",
|
|
7166
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
7037
|
+
children: [jsx(FormattedMessage, _objectSpread$Y({}, messages$1k.customTypeLabel)), value.custom ? jsx("span", {
|
|
7167
7038
|
children: _JSON$stringify(value.custom.type.id, null, 2)
|
|
7168
7039
|
}) : jsx(NoValueLabel, {})]
|
|
7169
7040
|
}), jsxs(Spacings.Inline, {
|
|
7170
7041
|
scale: "xs",
|
|
7171
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
7042
|
+
children: [jsx(FormattedMessage, _objectSpread$Y({}, messages$1k.customFieldsLabel)), value.custom ? jsx("span", {
|
|
7172
7043
|
children: _JSON$stringify(value.custom.fields, null, 2)
|
|
7173
7044
|
}) : jsx(NoValueLabel, {})]
|
|
7174
7045
|
})]
|
|
@@ -7176,7 +7047,7 @@ function renderAttribute(changedAttribute, value, intl) {
|
|
|
7176
7047
|
if (_includesInstanceProperty(changedAttribute).call(changedAttribute, 'tiers')) return value.tiers ? jsx(Spacings.Stack, {
|
|
7177
7048
|
scale: "s",
|
|
7178
7049
|
children: _mapInstanceProperty(_context = value.tiers).call(_context, tier => jsx("div", {
|
|
7179
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
7050
|
+
children: jsx(FormattedMessage, _objectSpread$Y(_objectSpread$Y({}, messages$1k.priceTierLabel), {}, {
|
|
7180
7051
|
values: {
|
|
7181
7052
|
price: formatMoney(tier.value, intl),
|
|
7182
7053
|
quantity: tier.minimumQuantity
|
|
@@ -7210,14 +7081,14 @@ PriceChangeAttributes.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
7210
7081
|
} : {};
|
|
7211
7082
|
var PriceChangeAttributes$1 = injectIntl(PriceChangeAttributes);
|
|
7212
7083
|
|
|
7213
|
-
function ownKeys$
|
|
7214
|
-
function _objectSpread$
|
|
7084
|
+
function ownKeys$X(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; }
|
|
7085
|
+
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$X(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$X(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7215
7086
|
const VariantAvailabilityChange = props => {
|
|
7216
7087
|
var _context;
|
|
7217
7088
|
return jsxs("div", {
|
|
7218
7089
|
css: productAttributeValuesStyles,
|
|
7219
7090
|
children: [props.value.availableQuantity !== undefined && jsx("div", {
|
|
7220
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
7091
|
+
children: jsx(FormattedMessage, _objectSpread$X(_objectSpread$X({}, messages$1k.variantAvailabilityLabel), {}, {
|
|
7221
7092
|
values: {
|
|
7222
7093
|
isOnStock: _JSON$stringify(props.value.isOnStock),
|
|
7223
7094
|
availableQuantity: props.value.availableQuantity,
|
|
@@ -7230,14 +7101,14 @@ const VariantAvailabilityChange = props => {
|
|
|
7230
7101
|
channelInfo = _ref2[1];
|
|
7231
7102
|
return jsxs(Fragment$1, {
|
|
7232
7103
|
children: [jsx("div", {
|
|
7233
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
7104
|
+
children: jsx(FormattedMessage, _objectSpread$X(_objectSpread$X({}, messages$1k.channelLabel), {}, {
|
|
7234
7105
|
values: {
|
|
7235
7106
|
channel: channelId
|
|
7236
7107
|
}
|
|
7237
7108
|
}))
|
|
7238
7109
|
}), jsx("div", {
|
|
7239
7110
|
css: productAttributeValuesStyles,
|
|
7240
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
7111
|
+
children: jsx(FormattedMessage, _objectSpread$X(_objectSpread$X({}, messages$1k.variantAvailabilityLabel), {}, {
|
|
7241
7112
|
values: {
|
|
7242
7113
|
isOnStock: _JSON$stringify(channelInfo.isOnStock),
|
|
7243
7114
|
availableQuantity: channelInfo.availableQuantity,
|
|
@@ -7424,13 +7295,13 @@ const counterStyles = /*#__PURE__*/css("background:", designTokens$1.colorSurfac
|
|
|
7424
7295
|
|
|
7425
7296
|
const _excluded$c = ["children"],
|
|
7426
7297
|
_excluded2$1 = ["url", "size"];
|
|
7427
|
-
function ownKeys$
|
|
7428
|
-
function _objectSpread$
|
|
7298
|
+
function ownKeys$W(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; }
|
|
7299
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$W(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$W(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7429
7300
|
var NoImageIcon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjYiIGhlaWdodD0iNjYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGlkPSJOb0ltYWdlSWNvbi1wYXRoLTEiIGQ9Ik0wIDBoNjZ2NjZIMHoiLz48L2RlZnM+PGcgaWQ9Ik5vSW1hZ2VJY29uLUFMTC1jb21wb25lbnRzIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyBpZD0iTm9JbWFnZUljb24tU2hhcmVkLS8tSW1hZ2UtY29udGFpbmVyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNzAyIC0yMzIpIj48ZyBpZD0iTm9JbWFnZUljb24tdGh1bWJuYWlsLTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDcwMiAyMzIpIj48bWFzayBpZD0iTm9JbWFnZUljb24tbWFzay0yIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNOb0ltYWdlSWNvbi1wYXRoLTEiLz48L21hc2s+PHVzZSBpZD0iTm9JbWFnZUljb24tTWFzayIgZmlsbD0iI0Q4RDhEOCIgeGxpbms6aHJlZj0iI05vSW1hZ2VJY29uLXBhdGgtMSIvPjxnIG1hc2s9InVybCgjTm9JbWFnZUljb24tbWFzay0yKSIgZmlsbC1ydWxlPSJub256ZXJvIiBpZD0iTm9JbWFnZUljb24tUGF0aCI+PHBhdGggZD0iTTAgNC4zMTZDMCAxLjkzMiAyLjA5IDAgNC42NjcgMGg2Ny42NjZDNzQuOTExIDAgNzcgMS45MzIgNzcgNC4zMTZ2NTcuMzY4Qzc3IDY0LjA2NyA3NC45MSA2NiA3Mi4zMzMgNjZINC42NjdDMi4wODkgNjYgMCA2NC4wNjcgMCA2MS42ODRWNC4zMTZ6IiBmaWxsPSIjQjRFMUZEIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNikiLz48cGF0aCBkPSJNMzUgMTdhNyA3IDAgMTEtMTQgMCA3IDcgMCAwMTE0IDB6IiBmaWxsPSIjRThGM0ZDIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNikiLz48cGF0aCBkPSJNMjEuNzc2IDM1LjUzTDAgNjEuMjc2VjY2aDc3VjQ0LjY1NEw2MC4yNDQgMjUuMjE4Yy0xLjQwMS0xLjYyNi00LTEuNjI0LTUuMzk4LjAwNEwzOS40NCA0My4xNWMtMS4zODEgMS42MDctMy45NCAxLjYzMi01LjM1NS4wNTJsLTYuOTM2LTcuNzQ2Yy0xLjQyMi0xLjU4OC0zLjk5Ny0xLjU1My01LjM3Mi4wNzN6IiBmaWxsPSIjRThGNEZDIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNikiLz48L2c+PC9nPjwvZz48L2c+PC9zdmc+";
|
|
7430
7301
|
const WrapperComponent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7431
7302
|
let children = _ref.children,
|
|
7432
7303
|
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
7433
|
-
return jsx("div", _objectSpread$
|
|
7304
|
+
return jsx("div", _objectSpread$W(_objectSpread$W({}, props), {}, {
|
|
7434
7305
|
ref: ref,
|
|
7435
7306
|
children: children
|
|
7436
7307
|
}));
|
|
@@ -7518,10 +7389,10 @@ const ImageContainer = _ref3 => {
|
|
|
7518
7389
|
children: [isLoading && jsx(LoadingSpinner, {}), !isLoading && jsx(AccessibleImage, {
|
|
7519
7390
|
isSelectable: !!props.onClick,
|
|
7520
7391
|
label: props.label || '',
|
|
7521
|
-
children: jsx(Image, _objectSpread$
|
|
7392
|
+
children: jsx(Image, _objectSpread$W(_objectSpread$W({
|
|
7522
7393
|
css: imageStyles,
|
|
7523
7394
|
className: props.imageClassName
|
|
7524
|
-
}, omit(_objectSpread$
|
|
7395
|
+
}, omit(_objectSpread$W({
|
|
7525
7396
|
url,
|
|
7526
7397
|
size
|
|
7527
7398
|
}, props), ['counter'])), {}, {
|
|
@@ -7560,8 +7431,8 @@ ImageContainer.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
7560
7431
|
} : {};
|
|
7561
7432
|
|
|
7562
7433
|
const _excluded$b = ["typeId", "id"];
|
|
7563
|
-
function ownKeys$
|
|
7564
|
-
function _objectSpread$
|
|
7434
|
+
function ownKeys$V(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; }
|
|
7435
|
+
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context4 = ownKeys$V(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys$V(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7565
7436
|
const ProductChanges = props => {
|
|
7566
7437
|
const intl = useIntl();
|
|
7567
7438
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
@@ -7589,7 +7460,7 @@ const ProductChanges = props => {
|
|
|
7589
7460
|
return props.value && _Object$keys(props.value).length > 0 ? map(props.value, (value, key) => jsxs(Spacings.Stack, {
|
|
7590
7461
|
scale: "xs",
|
|
7591
7462
|
children: [jsx("div", {
|
|
7592
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
7463
|
+
children: jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.categoryOrderHintReferenceLabel), {}, {
|
|
7593
7464
|
values: {
|
|
7594
7465
|
category: value.name ? localize({
|
|
7595
7466
|
obj: value,
|
|
@@ -7600,7 +7471,7 @@ const ProductChanges = props => {
|
|
|
7600
7471
|
}
|
|
7601
7472
|
}))
|
|
7602
7473
|
}), jsx("div", {
|
|
7603
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
7474
|
+
children: jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.categoryOrderHintNumberLabel), {}, {
|
|
7604
7475
|
values: {
|
|
7605
7476
|
orderHint: value.orderHint
|
|
7606
7477
|
}
|
|
@@ -7622,7 +7493,7 @@ const ProductChanges = props => {
|
|
|
7622
7493
|
const priceDiff = getPropertyDifferences(props.change.previousValue, props.change.nextValue);
|
|
7623
7494
|
const changedAttributes = _Object$keys(priceDiff);
|
|
7624
7495
|
return jsx(ComposedChange, {
|
|
7625
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
7496
|
+
label: jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.variantLabel), {}, {
|
|
7626
7497
|
values: {
|
|
7627
7498
|
b: getBoldText,
|
|
7628
7499
|
variant: props.change.variant
|
|
@@ -7651,7 +7522,7 @@ const ProductChanges = props => {
|
|
|
7651
7522
|
const value = props.value || props.change.previousValue;
|
|
7652
7523
|
return jsxs("div", {
|
|
7653
7524
|
css: productAttributeValuesStyles,
|
|
7654
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
7525
|
+
children: [jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.variantLabel), {}, {
|
|
7655
7526
|
values: {
|
|
7656
7527
|
b: getBoldText,
|
|
7657
7528
|
variant: props.change.variant
|
|
@@ -7697,7 +7568,7 @@ const ProductChanges = props => {
|
|
|
7697
7568
|
});
|
|
7698
7569
|
return jsxs("div", {
|
|
7699
7570
|
css: productAttributeValuesStyles,
|
|
7700
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
7571
|
+
children: [jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.variantLabel), {}, {
|
|
7701
7572
|
values: {
|
|
7702
7573
|
b: getBoldText,
|
|
7703
7574
|
variant: props.change.variant
|
|
@@ -7717,7 +7588,7 @@ const ProductChanges = props => {
|
|
|
7717
7588
|
case ResourceChangeInput.SetAssetCustomType:
|
|
7718
7589
|
return jsxs("div", {
|
|
7719
7590
|
css: productAttributeValuesStyles,
|
|
7720
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
7591
|
+
children: [jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.variantLabel), {}, {
|
|
7721
7592
|
values: {
|
|
7722
7593
|
b: getBoldText,
|
|
7723
7594
|
variant: props.change.variant
|
|
@@ -7730,7 +7601,7 @@ const ProductChanges = props => {
|
|
|
7730
7601
|
{
|
|
7731
7602
|
return jsxs("div", {
|
|
7732
7603
|
css: productAttributeValuesStyles,
|
|
7733
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
7604
|
+
children: [jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.variantCatalogDataLabel), {}, {
|
|
7734
7605
|
values: {
|
|
7735
7606
|
i: getItalicText,
|
|
7736
7607
|
b: getBoldText,
|
|
@@ -7744,7 +7615,7 @@ const ProductChanges = props => {
|
|
|
7744
7615
|
children: [jsx("span", {
|
|
7745
7616
|
children: formatMoney(props.value.value, intl)
|
|
7746
7617
|
}), jsx("span", {
|
|
7747
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
7618
|
+
children: jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.productDiscountLabel), {}, {
|
|
7748
7619
|
values: {
|
|
7749
7620
|
productDiscount: props.value.discount?.name ? localize({
|
|
7750
7621
|
obj: props.value.discount,
|
|
@@ -7769,7 +7640,7 @@ const ProductChanges = props => {
|
|
|
7769
7640
|
const removedImages = props.value && props.value[0] || props.change.previousValue && props.change.previousValue[0];
|
|
7770
7641
|
return jsxs("div", {
|
|
7771
7642
|
css: productAttributeValuesStyles,
|
|
7772
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
7643
|
+
children: [jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.variantLabel), {}, {
|
|
7773
7644
|
values: {
|
|
7774
7645
|
b: getBoldText,
|
|
7775
7646
|
variant: props.change.variant
|
|
@@ -7781,13 +7652,13 @@ const ProductChanges = props => {
|
|
|
7781
7652
|
size: "thumb",
|
|
7782
7653
|
withHover: true
|
|
7783
7654
|
}, image.url))
|
|
7784
|
-
}) : jsx(FormattedMessage, _objectSpread$
|
|
7655
|
+
}) : jsx(FormattedMessage, _objectSpread$V({}, messages$1k.noImages))]
|
|
7785
7656
|
});
|
|
7786
7657
|
}
|
|
7787
7658
|
case ResourceChangeInput.MoveImageToPosition:
|
|
7788
7659
|
{
|
|
7789
7660
|
var _context3;
|
|
7790
|
-
if (props.value.length === 0) return jsx(FormattedMessage, _objectSpread$
|
|
7661
|
+
if (props.value.length === 0) return jsx(FormattedMessage, _objectSpread$V({}, messages$1k.noImages));
|
|
7791
7662
|
return jsx(Spacings.Inline, {
|
|
7792
7663
|
scale: "xs",
|
|
7793
7664
|
children: _mapInstanceProperty(_context3 = props.value).call(_context3, image => jsx(ImageContainer, {
|
|
@@ -7819,7 +7690,7 @@ const ProductChanges = props => {
|
|
|
7819
7690
|
case ResourceChangeInput.SetVariantAvailability:
|
|
7820
7691
|
{
|
|
7821
7692
|
return jsx(ComposedChange, {
|
|
7822
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
7693
|
+
label: jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.variantCatalogDataLabel), {}, {
|
|
7823
7694
|
values: {
|
|
7824
7695
|
i: getItalicText,
|
|
7825
7696
|
b: getBoldText,
|
|
@@ -7856,7 +7727,7 @@ const ProductChanges = props => {
|
|
|
7856
7727
|
const value = props.change.nextValue || props.change.previousValue;
|
|
7857
7728
|
return jsxs("div", {
|
|
7858
7729
|
css: productAttributeValuesStyles,
|
|
7859
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
7730
|
+
children: [jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.variantLabel), {}, {
|
|
7860
7731
|
values: {
|
|
7861
7732
|
b: getBoldText,
|
|
7862
7733
|
variant: props.change.variant
|
|
@@ -7896,7 +7767,7 @@ const ProductChanges = props => {
|
|
|
7896
7767
|
return props.value ? jsxs(Spacings.Stack, {
|
|
7897
7768
|
scale: "xs",
|
|
7898
7769
|
children: [jsx("div", {
|
|
7899
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
7770
|
+
children: jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.averageRatingLabel), {}, {
|
|
7900
7771
|
values: {
|
|
7901
7772
|
averageRating: props.value.averageRating,
|
|
7902
7773
|
highestRating: props.value.highestRating,
|
|
@@ -7904,7 +7775,7 @@ const ProductChanges = props => {
|
|
|
7904
7775
|
}
|
|
7905
7776
|
}))
|
|
7906
7777
|
}), jsx("div", {
|
|
7907
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
7778
|
+
children: jsx(FormattedMessage, _objectSpread$V(_objectSpread$V({}, messages$1k.numberOfReviewsLabel), {}, {
|
|
7908
7779
|
values: {
|
|
7909
7780
|
count: props.value.count
|
|
7910
7781
|
}
|
|
@@ -8269,8 +8140,8 @@ ReviewChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
8269
8140
|
} : {};
|
|
8270
8141
|
|
|
8271
8142
|
const _excluded$9 = ["typeId", "id"];
|
|
8272
|
-
function ownKeys$
|
|
8273
|
-
function _objectSpread$
|
|
8143
|
+
function ownKeys$U(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; }
|
|
8144
|
+
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$U(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$U(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8274
8145
|
const ShoppingListChanges = props => {
|
|
8275
8146
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
8276
8147
|
language: applicationContext.dataLocale,
|
|
@@ -8293,7 +8164,7 @@ const ShoppingListChanges = props => {
|
|
|
8293
8164
|
});
|
|
8294
8165
|
}
|
|
8295
8166
|
case ResourceChangeInput.SetDeleteDaysAfterLastModification:
|
|
8296
|
-
return jsx(FormattedMessage, _objectSpread$
|
|
8167
|
+
return jsx(FormattedMessage, _objectSpread$U(_objectSpread$U({}, messages$1k.setRestockableInDaysLabel), {}, {
|
|
8297
8168
|
values: {
|
|
8298
8169
|
day: props.value
|
|
8299
8170
|
}
|
|
@@ -8318,7 +8189,7 @@ const ShoppingListChanges = props => {
|
|
|
8318
8189
|
case ResourceChangeInput.ChangeTextLineItemName:
|
|
8319
8190
|
{
|
|
8320
8191
|
return jsx(ComposedChange, {
|
|
8321
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
8192
|
+
label: jsx(FormattedMessage, _objectSpread$U(_objectSpread$U({}, messages$1k.textLineItemLabel), {}, {
|
|
8322
8193
|
values: {
|
|
8323
8194
|
b: getBoldText,
|
|
8324
8195
|
item: localize({
|
|
@@ -8347,7 +8218,7 @@ const ShoppingListChanges = props => {
|
|
|
8347
8218
|
case ResourceChangeInput.ChangeTextLineItemQuantity:
|
|
8348
8219
|
{
|
|
8349
8220
|
return jsx(ComposedChange, {
|
|
8350
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
8221
|
+
label: jsx(FormattedMessage, _objectSpread$U(_objectSpread$U({}, props.change.change === 'changeTextLineItemQuantity' ? messages$1k.textLineItemLabel : messages$1k.lineItemLabel), {}, {
|
|
8351
8222
|
values: {
|
|
8352
8223
|
b: getBoldText,
|
|
8353
8224
|
item: localize({
|
|
@@ -8385,7 +8256,7 @@ const ShoppingListChanges = props => {
|
|
|
8385
8256
|
{
|
|
8386
8257
|
return jsxs("div", {
|
|
8387
8258
|
css: productAttributeValuesStyles,
|
|
8388
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
8259
|
+
children: [jsx(FormattedMessage, _objectSpread$U(_objectSpread$U({}, props.change.change === 'setTextLineItemCustomField' ? messages$1k.textLineItemLabel : messages$1k.lineItemLabel), {}, {
|
|
8389
8260
|
values: {
|
|
8390
8261
|
b: getBoldText,
|
|
8391
8262
|
item: localize({
|
|
@@ -8397,7 +8268,7 @@ const ShoppingListChanges = props => {
|
|
|
8397
8268
|
variant: props.change.lineItem?.variantId
|
|
8398
8269
|
}
|
|
8399
8270
|
})), jsx(CustomFieldChange, {
|
|
8400
|
-
change: _objectSpread$
|
|
8271
|
+
change: _objectSpread$U(_objectSpread$U({}, props.change), {}, {
|
|
8401
8272
|
name: props.change.name || props.change.fieldName
|
|
8402
8273
|
})
|
|
8403
8274
|
})]
|
|
@@ -8408,7 +8279,7 @@ const ShoppingListChanges = props => {
|
|
|
8408
8279
|
{
|
|
8409
8280
|
const item = props.change.textLineItem?.name ? props.change.textLineItem : props.change.lineItem;
|
|
8410
8281
|
return jsx(ComposedChange, {
|
|
8411
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
8282
|
+
label: jsx(FormattedMessage, _objectSpread$U(_objectSpread$U({}, props.change.change === 'setTextLineItemCustomType' ? messages$1k.textLineItemLabel : messages$1k.lineItemLabel), {}, {
|
|
8412
8283
|
values: {
|
|
8413
8284
|
b: getBoldText,
|
|
8414
8285
|
item: localize({
|
|
@@ -8638,13 +8509,13 @@ StoreChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
8638
8509
|
value: PropTypes.any
|
|
8639
8510
|
} : {};
|
|
8640
8511
|
|
|
8641
|
-
function ownKeys$
|
|
8642
|
-
function _objectSpread$
|
|
8643
|
-
const ResourceTypeCell = props => jsx(FormattedMessage, _objectSpread$
|
|
8512
|
+
function ownKeys$T(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; }
|
|
8513
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$T(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$T(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8514
|
+
const ResourceTypeCell = props => jsx(FormattedMessage, _objectSpread$T({}, getEntityTypeNameMessage(props.resourceType)));
|
|
8644
8515
|
ResourceTypeCell.displayName = 'ResourceTypeCell';
|
|
8645
8516
|
|
|
8646
|
-
function ownKeys$
|
|
8647
|
-
function _objectSpread$
|
|
8517
|
+
function ownKeys$S(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; }
|
|
8518
|
+
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$S(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$S(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8648
8519
|
const SubscriptionChanges = props => {
|
|
8649
8520
|
var _context, _context2;
|
|
8650
8521
|
switch (props.change.change) {
|
|
@@ -8655,7 +8526,7 @@ const SubscriptionChanges = props => {
|
|
|
8655
8526
|
case SUBSCRIPTION_CHANGE_TYPE_NAME.ADD_TRIGGERS:
|
|
8656
8527
|
return jsxs("div", {
|
|
8657
8528
|
css: productAttributeValuesStyles,
|
|
8658
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
8529
|
+
children: [jsx(FormattedMessage, _objectSpread$S(_objectSpread$S({}, messages$1k.subscriptionToLabel), {}, {
|
|
8659
8530
|
values: {
|
|
8660
8531
|
resourceType: jsx(ResourceTypeCell, {
|
|
8661
8532
|
resourceType: props.value.resourceTypeId
|
|
@@ -8728,8 +8599,8 @@ TaxCategoryChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
8728
8599
|
value: PropTypes.any
|
|
8729
8600
|
} : {};
|
|
8730
8601
|
|
|
8731
|
-
function ownKeys$
|
|
8732
|
-
function _objectSpread$
|
|
8602
|
+
function ownKeys$R(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; }
|
|
8603
|
+
function _objectSpread$R(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys$R(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys$R(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8733
8604
|
const TypeChanges = props => {
|
|
8734
8605
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
8735
8606
|
language: applicationContext.dataLocale,
|
|
@@ -8754,7 +8625,7 @@ const TypeChanges = props => {
|
|
|
8754
8625
|
{
|
|
8755
8626
|
return jsxs("div", {
|
|
8756
8627
|
css: productAttributeValuesStyles,
|
|
8757
|
-
children: [jsx(FormattedMessage, _objectSpread$
|
|
8628
|
+
children: [jsx(FormattedMessage, _objectSpread$R(_objectSpread$R({}, messages$1k.fieldChangeLabel), {}, {
|
|
8758
8629
|
values: {
|
|
8759
8630
|
b: getBoldText,
|
|
8760
8631
|
fieldName: props.change.fieldName
|
|
@@ -8762,7 +8633,7 @@ const TypeChanges = props => {
|
|
|
8762
8633
|
})), jsx("div", {
|
|
8763
8634
|
css: productAttributeValuesStyles,
|
|
8764
8635
|
children: props.change.change === 'addLocalizedEnumValue' ? localize({
|
|
8765
|
-
obj: _objectSpread$
|
|
8636
|
+
obj: _objectSpread$R({}, props.change.nextValue),
|
|
8766
8637
|
key: 'label',
|
|
8767
8638
|
language: language,
|
|
8768
8639
|
fallbackOrder: languages
|
|
@@ -8773,7 +8644,7 @@ const TypeChanges = props => {
|
|
|
8773
8644
|
case ResourceChangeInput.ChangeEnumValueLabel:
|
|
8774
8645
|
case ResourceChangeInput.ChangeInputHint:
|
|
8775
8646
|
return jsx(ComposedChange, {
|
|
8776
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
8647
|
+
label: jsx(FormattedMessage, _objectSpread$R(_objectSpread$R({}, messages$1k.fieldChangeLabel), {}, {
|
|
8777
8648
|
values: {
|
|
8778
8649
|
b: getBoldText,
|
|
8779
8650
|
fieldName: props.change.fieldName
|
|
@@ -8785,7 +8656,7 @@ const TypeChanges = props => {
|
|
|
8785
8656
|
case ResourceChangeInput.ChangeLocalizedEnumValueLabel:
|
|
8786
8657
|
{
|
|
8787
8658
|
return jsx(ComposedChange, {
|
|
8788
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
8659
|
+
label: jsx(FormattedMessage, _objectSpread$R(_objectSpread$R({}, messages$1k.fieldChangeLabel), {}, {
|
|
8789
8660
|
values: {
|
|
8790
8661
|
b: getBoldText,
|
|
8791
8662
|
fieldName: props.change.fieldName
|
|
@@ -8805,13 +8676,13 @@ const TypeChanges = props => {
|
|
|
8805
8676
|
return jsxs("div", {
|
|
8806
8677
|
css: productAttributeValuesStyles,
|
|
8807
8678
|
children: [jsx("div", {
|
|
8808
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
8679
|
+
children: jsx(FormattedMessage, _objectSpread$R(_objectSpread$R({}, messages$1k.definitionTypeLabel), {}, {
|
|
8809
8680
|
values: {
|
|
8810
8681
|
type: props.value.type.name
|
|
8811
8682
|
}
|
|
8812
8683
|
}))
|
|
8813
8684
|
}), jsx("div", {
|
|
8814
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
8685
|
+
children: jsx(FormattedMessage, _objectSpread$R(_objectSpread$R({}, messages$1k.definitionNameLabel), {}, {
|
|
8815
8686
|
values: {
|
|
8816
8687
|
name: props.value.name
|
|
8817
8688
|
}
|
|
@@ -8882,7 +8753,7 @@ const TypeChanges = props => {
|
|
|
8882
8753
|
})) || [];
|
|
8883
8754
|
}
|
|
8884
8755
|
return jsx(ComposedChange, {
|
|
8885
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
8756
|
+
label: jsx(FormattedMessage, _objectSpread$R(_objectSpread$R({}, messages$1k.fieldChangeLabel), {}, {
|
|
8886
8757
|
values: {
|
|
8887
8758
|
b: getBoldText,
|
|
8888
8759
|
fieldName: props.change.fieldName
|
|
@@ -8950,8 +8821,8 @@ ZoneChanges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
8950
8821
|
value: PropTypes.any
|
|
8951
8822
|
} : {};
|
|
8952
8823
|
|
|
8953
|
-
function ownKeys$
|
|
8954
|
-
function _objectSpread$
|
|
8824
|
+
function ownKeys$Q(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; }
|
|
8825
|
+
function _objectSpread$Q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$Q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$Q(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8955
8826
|
const GetChangesColumn = props => {
|
|
8956
8827
|
const resourceType = props.resourceType,
|
|
8957
8828
|
change = props.change,
|
|
@@ -8967,57 +8838,57 @@ const GetChangesColumn = props => {
|
|
|
8967
8838
|
}
|
|
8968
8839
|
switch (resourceType) {
|
|
8969
8840
|
case RESOURCE_TYPE_NAME.ASSOCIATE_ROLE:
|
|
8970
|
-
return jsx(AssociateRoleChanges, _objectSpread$
|
|
8841
|
+
return jsx(AssociateRoleChanges, _objectSpread$Q({}, props));
|
|
8971
8842
|
case RESOURCE_TYPE_NAME.CART_DISCOUNT:
|
|
8972
8843
|
case RESOURCE_TYPE_NAME.DISCOUNT_CODE:
|
|
8973
8844
|
case RESOURCE_TYPE_NAME.PRODUCT_DISCOUNT:
|
|
8974
|
-
return jsx(DiscountChanges, _objectSpread$
|
|
8845
|
+
return jsx(DiscountChanges, _objectSpread$Q({}, props));
|
|
8975
8846
|
case RESOURCE_TYPE_NAME.BUSINESS_UNIT:
|
|
8976
|
-
return jsx(BusinessUnitChanges, _objectSpread$
|
|
8847
|
+
return jsx(BusinessUnitChanges, _objectSpread$Q({}, props));
|
|
8977
8848
|
case RESOURCE_TYPE_NAME.CATEGORY:
|
|
8978
|
-
return jsx(CategoryChanges, _objectSpread$
|
|
8849
|
+
return jsx(CategoryChanges, _objectSpread$Q({}, props));
|
|
8979
8850
|
case RESOURCE_TYPE_NAME.CHANNEL:
|
|
8980
|
-
return jsx(ChannelChanges, _objectSpread$
|
|
8851
|
+
return jsx(ChannelChanges, _objectSpread$Q({}, props));
|
|
8981
8852
|
case RESOURCE_TYPE_NAME.CUSTOMER_GROUP:
|
|
8982
8853
|
case RESOURCE_TYPE_NAME.CUSTOMER:
|
|
8983
|
-
return jsx(CustomerChanges, _objectSpread$
|
|
8854
|
+
return jsx(CustomerChanges, _objectSpread$Q({}, props));
|
|
8984
8855
|
case RESOURCE_TYPE_NAME.EXTENSION:
|
|
8985
8856
|
case RESOURCE_TYPE_NAME.SUBSCRIPTION:
|
|
8986
|
-
return jsx(SubscriptionChanges$1, _objectSpread$
|
|
8857
|
+
return jsx(SubscriptionChanges$1, _objectSpread$Q({}, props));
|
|
8987
8858
|
case RESOURCE_TYPE_NAME.INVENTORY_ENTRY:
|
|
8988
|
-
return jsx(InventoryEntryChanges, _objectSpread$
|
|
8859
|
+
return jsx(InventoryEntryChanges, _objectSpread$Q({}, props));
|
|
8989
8860
|
case RESOURCE_TYPE_NAME.CUSTOM_OBJECT:
|
|
8990
|
-
return jsx(CustomObjectChanges, _objectSpread$
|
|
8861
|
+
return jsx(CustomObjectChanges, _objectSpread$Q({}, props));
|
|
8991
8862
|
case RESOURCE_TYPE_NAME.ORDER:
|
|
8992
|
-
return jsx(OrderChanges, _objectSpread$
|
|
8863
|
+
return jsx(OrderChanges, _objectSpread$Q({}, props));
|
|
8993
8864
|
case RESOURCE_TYPE_NAME.PAYMENT:
|
|
8994
|
-
return jsx(PaymentChanges, _objectSpread$
|
|
8865
|
+
return jsx(PaymentChanges, _objectSpread$Q({}, props));
|
|
8995
8866
|
case RESOURCE_TYPE_NAME.PRODUCT:
|
|
8996
|
-
return jsx(ProductChanges, _objectSpread$
|
|
8867
|
+
return jsx(ProductChanges, _objectSpread$Q({}, props));
|
|
8997
8868
|
case RESOURCE_TYPE_NAME.PRODUCT_SELECTION:
|
|
8998
|
-
return jsx(ProductSelectionChanges, _objectSpread$
|
|
8869
|
+
return jsx(ProductSelectionChanges, _objectSpread$Q({}, props));
|
|
8999
8870
|
case RESOURCE_TYPE_NAME.PRODUCT_TYPE:
|
|
9000
|
-
return jsx(ProductTypeChanges, _objectSpread$
|
|
8871
|
+
return jsx(ProductTypeChanges, _objectSpread$Q({}, props));
|
|
9001
8872
|
case RESOURCE_TYPE_NAME.QUOTE:
|
|
9002
|
-
return jsx(QuoteChanges, _objectSpread$
|
|
8873
|
+
return jsx(QuoteChanges, _objectSpread$Q({}, props));
|
|
9003
8874
|
case RESOURCE_TYPE_NAME.QUOTE_REQUEST:
|
|
9004
|
-
return jsx(QuoteRequestChanges, _objectSpread$
|
|
8875
|
+
return jsx(QuoteRequestChanges, _objectSpread$Q({}, props));
|
|
9005
8876
|
case RESOURCE_TYPE_NAME.STAGED_QUOTE:
|
|
9006
|
-
return jsx(StagedQuoteChanges, _objectSpread$
|
|
8877
|
+
return jsx(StagedQuoteChanges, _objectSpread$Q({}, props));
|
|
9007
8878
|
case RESOURCE_TYPE_NAME.REVIEW:
|
|
9008
|
-
return jsx(ReviewChanges, _objectSpread$
|
|
8879
|
+
return jsx(ReviewChanges, _objectSpread$Q({}, props));
|
|
9009
8880
|
case RESOURCE_TYPE_NAME.SHOPPING_LIST:
|
|
9010
|
-
return jsx(ShoppingListChanges, _objectSpread$
|
|
8881
|
+
return jsx(ShoppingListChanges, _objectSpread$Q({}, props));
|
|
9011
8882
|
case RESOURCE_TYPE_NAME.STATE:
|
|
9012
|
-
return jsx(StateChanges, _objectSpread$
|
|
8883
|
+
return jsx(StateChanges, _objectSpread$Q({}, props));
|
|
9013
8884
|
case RESOURCE_TYPE_NAME.STORE:
|
|
9014
|
-
return jsx(StoreChanges, _objectSpread$
|
|
8885
|
+
return jsx(StoreChanges, _objectSpread$Q({}, props));
|
|
9015
8886
|
case RESOURCE_TYPE_NAME.TAX_CATEGORY:
|
|
9016
|
-
return jsx(TaxCategoryChanges, _objectSpread$
|
|
8887
|
+
return jsx(TaxCategoryChanges, _objectSpread$Q({}, props));
|
|
9017
8888
|
case RESOURCE_TYPE_NAME.TYPE:
|
|
9018
|
-
return jsx(TypeChanges, _objectSpread$
|
|
8889
|
+
return jsx(TypeChanges, _objectSpread$Q({}, props));
|
|
9019
8890
|
case RESOURCE_TYPE_NAME.ZONE:
|
|
9020
|
-
return jsx(ZoneChanges, _objectSpread$
|
|
8891
|
+
return jsx(ZoneChanges, _objectSpread$Q({}, props));
|
|
9021
8892
|
default:
|
|
9022
8893
|
console.error('Unsupported resource type');
|
|
9023
8894
|
return jsx(Fragment, {});
|
|
@@ -9307,15 +9178,15 @@ const getEntityTypeNameMessage = resourceType => {
|
|
|
9307
9178
|
return message || messages$S.undefinedType;
|
|
9308
9179
|
};
|
|
9309
9180
|
|
|
9310
|
-
function ownKeys$
|
|
9311
|
-
function _objectSpread$
|
|
9181
|
+
function ownKeys$P(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; }
|
|
9182
|
+
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$P(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$P(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9312
9183
|
const mapLocalizedValue = (propAllLocales, language, languages) => {
|
|
9313
9184
|
if (!propAllLocales) return;
|
|
9314
9185
|
const localizedField = {
|
|
9315
9186
|
field: _reduceInstanceProperty(propAllLocales).call(propAllLocales, (localized, _ref) => {
|
|
9316
9187
|
let locale = _ref.locale,
|
|
9317
9188
|
value = _ref.value;
|
|
9318
|
-
return _objectSpread$
|
|
9189
|
+
return _objectSpread$P(_objectSpread$P({}, localized), {}, {
|
|
9319
9190
|
[locale]: value
|
|
9320
9191
|
});
|
|
9321
9192
|
}, {})
|
|
@@ -9969,8 +9840,8 @@ var messages$M = defineMessages({
|
|
|
9969
9840
|
}
|
|
9970
9841
|
});
|
|
9971
9842
|
|
|
9972
|
-
function ownKeys$
|
|
9973
|
-
function _objectSpread$
|
|
9843
|
+
function ownKeys$O(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; }
|
|
9844
|
+
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$O(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$O(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9974
9845
|
const mapChannelToPreview = _ref => {
|
|
9975
9846
|
let channel = _ref.resource,
|
|
9976
9847
|
intl = _ref.intl,
|
|
@@ -9991,7 +9862,7 @@ const mapChannelToPreview = _ref => {
|
|
|
9991
9862
|
}, {
|
|
9992
9863
|
fieldName: intl.formatMessage(messages$M.rolesLabel),
|
|
9993
9864
|
fieldValue: channel.roles
|
|
9994
|
-
}, _objectSpread$
|
|
9865
|
+
}, _objectSpread$O({}, channel.address || channel.geoLocation ? {
|
|
9995
9866
|
fieldName: 'address',
|
|
9996
9867
|
fieldValue: [{
|
|
9997
9868
|
fieldName: intl.formatMessage(messages$M.streetNameLabel),
|
|
@@ -10439,8 +10310,8 @@ var messages$G = defineMessages({
|
|
|
10439
10310
|
}
|
|
10440
10311
|
});
|
|
10441
10312
|
|
|
10442
|
-
function ownKeys$
|
|
10443
|
-
function _objectSpread$
|
|
10313
|
+
function ownKeys$N(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; }
|
|
10314
|
+
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$N(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$N(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10444
10315
|
const mapOrderToPreview = _ref => {
|
|
10445
10316
|
var _context, _context2;
|
|
10446
10317
|
let order = _ref.resource,
|
|
@@ -10491,7 +10362,7 @@ const mapOrderToPreview = _ref => {
|
|
|
10491
10362
|
fieldValue: order.orderState
|
|
10492
10363
|
}, {
|
|
10493
10364
|
fieldName: 'lineItems',
|
|
10494
|
-
fieldValue: _mapInstanceProperty(_context = order.lineItems).call(_context, lItem => _objectSpread$
|
|
10365
|
+
fieldValue: _mapInstanceProperty(_context = order.lineItems).call(_context, lItem => _objectSpread$N(_objectSpread$N({}, lItem), {}, {
|
|
10495
10366
|
name: mapLocalizedValue(lItem.nameAllLocales, language, languages),
|
|
10496
10367
|
price: formatMoney(lItem.price.value, intl),
|
|
10497
10368
|
totalPrice: formatMoney(lItem.totalPrice, intl),
|
|
@@ -10500,7 +10371,7 @@ const mapOrderToPreview = _ref => {
|
|
|
10500
10371
|
}))
|
|
10501
10372
|
}, {
|
|
10502
10373
|
fieldName: 'customLineItems',
|
|
10503
|
-
fieldValue: _mapInstanceProperty(_context2 = order.customLineItems).call(_context2, clItem => _objectSpread$
|
|
10374
|
+
fieldValue: _mapInstanceProperty(_context2 = order.customLineItems).call(_context2, clItem => _objectSpread$N(_objectSpread$N({}, clItem), {}, {
|
|
10504
10375
|
name: mapLocalizedValue(clItem.nameAllLocales, language, languages) || clItem.slug,
|
|
10505
10376
|
totalPrice: formatMoney(clItem.totalPrice, intl)
|
|
10506
10377
|
}))
|
|
@@ -10570,8 +10441,8 @@ var messages$F = defineMessages({
|
|
|
10570
10441
|
}
|
|
10571
10442
|
});
|
|
10572
10443
|
|
|
10573
|
-
function ownKeys$
|
|
10574
|
-
function _objectSpread$
|
|
10444
|
+
function ownKeys$M(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; }
|
|
10445
|
+
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$M(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$M(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10575
10446
|
const mapPaymentToPreview = _ref => {
|
|
10576
10447
|
var _context;
|
|
10577
10448
|
let payment = _ref.resource,
|
|
@@ -10616,7 +10487,7 @@ const mapPaymentToPreview = _ref => {
|
|
|
10616
10487
|
fieldValue: mapLocalizedValue(payment.paymentStatus?.state?.nameAllLocales, language, languages) || payment.paymentStatus?.state?.key
|
|
10617
10488
|
}, {
|
|
10618
10489
|
fieldName: 'transactions',
|
|
10619
|
-
fieldValue: _mapInstanceProperty(_context = payment.transactions).call(_context, transaction => _objectSpread$
|
|
10490
|
+
fieldValue: _mapInstanceProperty(_context = payment.transactions).call(_context, transaction => _objectSpread$M(_objectSpread$M({}, transaction), {}, {
|
|
10620
10491
|
amount: transaction.amount && formatMoney(transaction.amount, intl),
|
|
10621
10492
|
timestamp: formatDateTime('datetime', transaction.timestamp)
|
|
10622
10493
|
}))
|
|
@@ -11309,8 +11180,8 @@ var messages$y = defineMessages({
|
|
|
11309
11180
|
}
|
|
11310
11181
|
});
|
|
11311
11182
|
|
|
11312
|
-
function ownKeys$
|
|
11313
|
-
function _objectSpread$
|
|
11183
|
+
function ownKeys$L(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; }
|
|
11184
|
+
function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$L(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$L(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11314
11185
|
const mapShoppingListToPreview = _ref => {
|
|
11315
11186
|
var _context, _context2;
|
|
11316
11187
|
let shoppingList = _ref.resource,
|
|
@@ -11340,14 +11211,14 @@ const mapShoppingListToPreview = _ref => {
|
|
|
11340
11211
|
fieldValue: shoppingList.anonymousId
|
|
11341
11212
|
}, {
|
|
11342
11213
|
fieldName: 'lineItems',
|
|
11343
|
-
fieldValue: _mapInstanceProperty(_context = shoppingList.lineItems).call(_context, lItem => _objectSpread$
|
|
11214
|
+
fieldValue: _mapInstanceProperty(_context = shoppingList.lineItems).call(_context, lItem => _objectSpread$L(_objectSpread$L({}, lItem), {}, {
|
|
11344
11215
|
name: mapLocalizedValue(lItem.nameAllLocales, language, languages),
|
|
11345
11216
|
variantId: lItem.variant?.id,
|
|
11346
11217
|
variantSku: lItem.variant?.sku
|
|
11347
11218
|
}))
|
|
11348
11219
|
}, {
|
|
11349
11220
|
fieldName: 'textLineItems',
|
|
11350
|
-
fieldValue: _mapInstanceProperty(_context2 = shoppingList.textLineItems).call(_context2, tlItem => _objectSpread$
|
|
11221
|
+
fieldValue: _mapInstanceProperty(_context2 = shoppingList.textLineItems).call(_context2, tlItem => _objectSpread$L(_objectSpread$L({}, tlItem), {}, {
|
|
11351
11222
|
name: mapLocalizedValue(tlItem.nameAllLocales, language, languages),
|
|
11352
11223
|
description: mapLocalizedValue(tlItem.descriptionAllLocales, language, languages)
|
|
11353
11224
|
}))
|
|
@@ -11562,8 +11433,8 @@ var messages$v = defineMessages({
|
|
|
11562
11433
|
}
|
|
11563
11434
|
});
|
|
11564
11435
|
|
|
11565
|
-
function ownKeys$
|
|
11566
|
-
function _objectSpread$
|
|
11436
|
+
function ownKeys$K(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; }
|
|
11437
|
+
function _objectSpread$K(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$K(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$K(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11567
11438
|
const mapTaxCategoryToPreview = _ref => {
|
|
11568
11439
|
var _context;
|
|
11569
11440
|
let taxCategory = _ref.resource,
|
|
@@ -11584,7 +11455,7 @@ const mapTaxCategoryToPreview = _ref => {
|
|
|
11584
11455
|
fieldName: 'rates',
|
|
11585
11456
|
fieldValue: _mapInstanceProperty(_context = taxCategory.rates).call(_context, rate => {
|
|
11586
11457
|
var _context2;
|
|
11587
|
-
return _objectSpread$
|
|
11458
|
+
return _objectSpread$K(_objectSpread$K({}, rate), {}, {
|
|
11588
11459
|
state: rate.state || jsx(NoValueFallback, {}),
|
|
11589
11460
|
includedInPrice: intl.formatMessage(rate.includedInPrice ? messages$v.includedInPriceTrueLabel : messages$v.includedInPriceFalseLabel),
|
|
11590
11461
|
subRates: rate.subRates.length > 0 ? _mapInstanceProperty(_context2 = rate.subRates).call(_context2, _ref2 => {
|
|
@@ -13176,6 +13047,111 @@ const useRoutes = () => {
|
|
|
13176
13047
|
return routes;
|
|
13177
13048
|
};
|
|
13178
13049
|
|
|
13050
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/btoa#Unicode_strings
|
|
13051
|
+
//
|
|
13052
|
+
// Escape any extended characters so that the string we
|
|
13053
|
+
// actually encode is an ASCII representation of the original.
|
|
13054
|
+
// This is to avoid the `InvalidCharacterError`.
|
|
13055
|
+
function stringToBase64(value) {
|
|
13056
|
+
let encoded = '';
|
|
13057
|
+
try {
|
|
13058
|
+
encoded = btoa(decodeURIComponent(encodeURIComponent(value)));
|
|
13059
|
+
} catch (e) {
|
|
13060
|
+
/* noop */
|
|
13061
|
+
}
|
|
13062
|
+
return encoded;
|
|
13063
|
+
}
|
|
13064
|
+
function base64ToString(value) {
|
|
13065
|
+
let decoded;
|
|
13066
|
+
try {
|
|
13067
|
+
decoded = decodeURIComponent(encodeURIComponent(atob(value)));
|
|
13068
|
+
} catch (e) {
|
|
13069
|
+
/* noop */
|
|
13070
|
+
}
|
|
13071
|
+
// @ts-ignore
|
|
13072
|
+
return decoded;
|
|
13073
|
+
}
|
|
13074
|
+
|
|
13075
|
+
const encode = value => stringToBase64(_JSON$stringify(value));
|
|
13076
|
+
const decode = value => {
|
|
13077
|
+
if (value === null || value === '') {
|
|
13078
|
+
return null;
|
|
13079
|
+
}
|
|
13080
|
+
try {
|
|
13081
|
+
const decodedValue = base64ToString(value);
|
|
13082
|
+
return decodedValue ? JSON.parse(decodedValue) : null;
|
|
13083
|
+
} catch (error) {
|
|
13084
|
+
throw new Error(`Error decoding value: ${value}`);
|
|
13085
|
+
}
|
|
13086
|
+
};
|
|
13087
|
+
|
|
13088
|
+
function ownKeys$J(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; }
|
|
13089
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$J(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$J(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13090
|
+
const defaultOptions = {
|
|
13091
|
+
storageType: 'local',
|
|
13092
|
+
segregateByUser: true,
|
|
13093
|
+
segregateByProject: true
|
|
13094
|
+
};
|
|
13095
|
+
const getStorage = storageType => storageType === 'session' ? sessionStorage : localStorage;
|
|
13096
|
+
const isNil = value => typeof value === 'undefined' || value === null;
|
|
13097
|
+
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
13098
|
+
var _context;
|
|
13099
|
+
const mergedOptions = _objectSpread$J(_objectSpread$J({}, defaultOptions), options);
|
|
13100
|
+
const _useApplicationContex = useApplicationContext(context => ({
|
|
13101
|
+
userId: context.user?.id,
|
|
13102
|
+
projectKey: context.project?.key
|
|
13103
|
+
})),
|
|
13104
|
+
userId = _useApplicationContex.userId,
|
|
13105
|
+
projectKey = _useApplicationContex.projectKey;
|
|
13106
|
+
const scopedStorageKey = _filterInstanceProperty(_context = [mergedOptions.segregateByUser && userId, mergedOptions.segregateByProject && projectKey, storageKey]).call(_context, Boolean).join('/');
|
|
13107
|
+
const removeFromStorage = useCallback(() => {
|
|
13108
|
+
getStorage(mergedOptions.storageType).removeItem(scopedStorageKey);
|
|
13109
|
+
}, [mergedOptions.storageType, scopedStorageKey]);
|
|
13110
|
+
const readFromStorage = useCallback(() => {
|
|
13111
|
+
const encodedStorageValue = getStorage(mergedOptions.storageType).getItem(scopedStorageKey);
|
|
13112
|
+
const storageValue = encodedStorageValue ? decode(encodedStorageValue) : null;
|
|
13113
|
+
/**
|
|
13114
|
+
* NOTE:
|
|
13115
|
+
* We prior wrote `undefined` or `null` to storage which when written
|
|
13116
|
+
* to storage via `setItem` results in `"undefined"` or `"null"`
|
|
13117
|
+
* being written polluting the storage.
|
|
13118
|
+
*/
|
|
13119
|
+
if (storageValue === 'undefined' || storageValue === 'null') {
|
|
13120
|
+
removeFromStorage();
|
|
13121
|
+
return null;
|
|
13122
|
+
}
|
|
13123
|
+
return storageValue;
|
|
13124
|
+
}, [mergedOptions.storageType, removeFromStorage, scopedStorageKey]);
|
|
13125
|
+
const initializeStorageValue = () => {
|
|
13126
|
+
// default the storage value to the initial value, but only when a stored value exists
|
|
13127
|
+
return readFromStorage() ?? initialStorageValue ?? null;
|
|
13128
|
+
};
|
|
13129
|
+
const _useState = useState(initializeStorageValue),
|
|
13130
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13131
|
+
storageValue = _useState2[0],
|
|
13132
|
+
setStorageValue = _useState2[1];
|
|
13133
|
+
const writeToStorage = useCallback(nextStorageValue => {
|
|
13134
|
+
if (nextStorageValue) {
|
|
13135
|
+
getStorage(mergedOptions.storageType).setItem(scopedStorageKey, nextStorageValue ? encode(nextStorageValue) : '');
|
|
13136
|
+
} else {
|
|
13137
|
+
removeFromStorage();
|
|
13138
|
+
}
|
|
13139
|
+
setStorageValue(nextStorageValue);
|
|
13140
|
+
}, [mergedOptions.storageType, removeFromStorage, scopedStorageKey]);
|
|
13141
|
+
|
|
13142
|
+
// set the initial storage value in the storage. The reason why this is not
|
|
13143
|
+
// done in initializeStorageValue is the state initializer function should
|
|
13144
|
+
// be pure.
|
|
13145
|
+
// https://beta.reactjs.org/apis/react/useState#my-initializer-or-updater-function-runs-twice
|
|
13146
|
+
useEffect(() => {
|
|
13147
|
+
if (isNil(readFromStorage()) && !isNil(initialStorageValue) && storageValue !== initialStorageValue) {
|
|
13148
|
+
getStorage(mergedOptions.storageType).setItem(scopedStorageKey, encode(initialStorageValue));
|
|
13149
|
+
setStorageValue(initialStorageValue);
|
|
13150
|
+
}
|
|
13151
|
+
}, []);
|
|
13152
|
+
return [storageValue, writeToStorage, readFromStorage];
|
|
13153
|
+
};
|
|
13154
|
+
|
|
13179
13155
|
const toPermission = (permission, resourceName) => camelCase(`can ${permission} ${resourceName}`);
|
|
13180
13156
|
const createComposePath = resourceName => permission =>
|
|
13181
13157
|
// e.g applicationContext.dataFences?.store?.orders?.canViewOrders?.values
|
|
@@ -13281,60 +13257,97 @@ const useVersionTier = () => {
|
|
|
13281
13257
|
};
|
|
13282
13258
|
};
|
|
13283
13259
|
|
|
13260
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13261
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[_Symbol$toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13284
13262
|
function ownKeys$H(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; }
|
|
13285
|
-
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
13263
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$H(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$H(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13264
|
+
// NOTE: The `version` can be updated to bust existing search queries in case of conflicting migrations.
|
|
13265
|
+
const VERSION_KEY = '__version';
|
|
13266
|
+
const SAVED_SEARCH_VERSION = 2;
|
|
13267
|
+
const augmentWithVersion = searchQuery => _objectSpread$H({
|
|
13268
|
+
[VERSION_KEY]: SAVED_SEARCH_VERSION
|
|
13269
|
+
}, searchQuery);
|
|
13270
|
+
const omitVersion = searchQuery => {
|
|
13271
|
+
var _context;
|
|
13272
|
+
searchQuery[VERSION_KEY];
|
|
13273
|
+
const searchQueryNoVersion = _objectWithoutProperties(searchQuery, _mapInstanceProperty(_context = [VERSION_KEY]).call(_context, _toPropertyKey));
|
|
13274
|
+
return searchQueryNoVersion;
|
|
13275
|
+
};
|
|
13276
|
+
|
|
13277
|
+
// This will get rid of any filters that may have been deprecated at some point
|
|
13278
|
+
const omitUnknownFilters = searchQuery => _objectSpread$H(_objectSpread$H({}, searchQuery), searchQuery?.filters && {
|
|
13279
|
+
filters: _objectSpread$H(_objectSpread$H({}, pickBy(searchQuery.filters, (_value, key) => {
|
|
13280
|
+
var _context2;
|
|
13281
|
+
return _includesInstanceProperty(_context2 = _Object$values(FILTER_OPTION_KEYS)).call(_context2, key);
|
|
13282
|
+
})), {}, {
|
|
13283
|
+
[FILTER_OPTION_KEYS.DATE_RANGE]: searchQuery.filters[FILTER_OPTION_KEYS.DATE_RANGE] || []
|
|
13284
|
+
})
|
|
13285
|
+
});
|
|
13286
|
+
const isStoredSearchQueryInvalid = storedSearchQuery => {
|
|
13287
|
+
if (!storedSearchQuery) {
|
|
13288
|
+
return false;
|
|
13289
|
+
}
|
|
13290
|
+
return !storedSearchQuery.__version || storedSearchQuery.__version !== SAVED_SEARCH_VERSION;
|
|
13291
|
+
};
|
|
13286
13292
|
const useSearchViewRouterStateSearch = _ref => {
|
|
13287
|
-
let
|
|
13288
|
-
|
|
13293
|
+
let storageSlice = _ref.storageSlice,
|
|
13294
|
+
initialSearchQuery = _ref.initialSearchQuery;
|
|
13289
13295
|
const location = useLocation();
|
|
13290
13296
|
const history = useHistory();
|
|
13297
|
+
const _useStorage = useStorage(storageSlice, augmentWithVersion(initialSearchQuery)),
|
|
13298
|
+
_useStorage2 = _slicedToArray(_useStorage, 2),
|
|
13299
|
+
storedSearchQuery = _useStorage2[0],
|
|
13300
|
+
setStoredSearchQuery = _useStorage2[1];
|
|
13301
|
+
const locationHasSearchQuery = () => !!location.state?.search;
|
|
13302
|
+
const updateHistory = nextSearchQuery => {
|
|
13303
|
+
const encodedNextSearchQuery = nextSearchQuery ? encode(nextSearchQuery) : null;
|
|
13304
|
+
if (encodedNextSearchQuery !== location.state?.search) {
|
|
13305
|
+
history.replace(location.pathname, _objectSpread$H(_objectSpread$H({}, location.state), {}, {
|
|
13306
|
+
search: encodedNextSearchQuery
|
|
13307
|
+
}));
|
|
13308
|
+
}
|
|
13309
|
+
};
|
|
13310
|
+
const setSearchQuery = nextSearchQuery => {
|
|
13311
|
+
setStoredSearchQuery(nextSearchQuery ? augmentWithVersion(nextSearchQuery) : null);
|
|
13312
|
+
updateHistory(nextSearchQuery);
|
|
13313
|
+
};
|
|
13314
|
+
const resetSearchQuery = () => {
|
|
13315
|
+
setStoredSearchQuery(null);
|
|
13316
|
+
updateHistory(initialSearchQuery);
|
|
13317
|
+
};
|
|
13291
13318
|
const getSearchQuery = () => {
|
|
13292
|
-
let
|
|
13319
|
+
let currentSearchQuery = null;
|
|
13320
|
+
let isReset = false;
|
|
13293
13321
|
try {
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13322
|
+
if (locationHasSearchQuery()) {
|
|
13323
|
+
currentSearchQuery = decode(location.state.search);
|
|
13324
|
+
} else {
|
|
13325
|
+
currentSearchQuery = storedSearchQuery ? omitVersion(storedSearchQuery) : storedSearchQuery;
|
|
13297
13326
|
}
|
|
13298
|
-
// NOTE: We do not augment the version to what's read from the url
|
|
13299
|
-
// as it should contain none (prior to the addition) or a version.
|
|
13300
|
-
// This allows us to bust the cached search query.
|
|
13301
|
-
searchQuery = location.state?.search ? decode(location.state.search) : storedSearchQuery;
|
|
13302
13327
|
} catch (e) {
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
/**
|
|
13306
|
-
* NOTE:
|
|
13307
|
-
* This error is not really severe but worth tracking for visibility.
|
|
13308
|
-
* The user likely tampered with the URL directly.
|
|
13309
|
-
* To have some insights we add as `extraInfo` the `storageSlice`
|
|
13310
|
-
* which contains the view (e.g. discounts-list) and `projectKey`. Moreover, we add the
|
|
13311
|
-
* `rawQuery` which is the base64 encoded version to debug the problem.
|
|
13312
|
-
*/
|
|
13313
|
-
reportErrorToSentry(new Error('SearchViewRouterQuery: failed to parse from the url. Defaulting to initial query.'), {
|
|
13328
|
+
reportErrorToSentry(new Error('SearchViewRouterQuery: failed to parse stored search query. Defaulting to initial query.'), {
|
|
13314
13329
|
extra: {
|
|
13315
|
-
storageSlice: storageSlice,
|
|
13316
13330
|
rawQuery: location.state?.search,
|
|
13317
13331
|
version: SAVED_SEARCH_VERSION
|
|
13318
13332
|
}
|
|
13319
13333
|
});
|
|
13334
|
+
isReset = true;
|
|
13320
13335
|
}
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13336
|
+
if (!locationHasSearchQuery()) {
|
|
13337
|
+
if (isStoredSearchQueryInvalid(storedSearchQuery)) {
|
|
13338
|
+
// No history and no valid stored search, so let's reset to initial value
|
|
13339
|
+
isReset = true;
|
|
13340
|
+
} else {
|
|
13341
|
+
// No history but valid stored search, so let's add it to history
|
|
13342
|
+
updateHistory(currentSearchQuery);
|
|
13343
|
+
}
|
|
13325
13344
|
}
|
|
13326
|
-
|
|
13327
|
-
|
|
13328
|
-
|
|
13329
|
-
return omitVersion(_objectSpread$H(_objectSpread$H({}, initialSearchQuery), searchQuery));
|
|
13330
|
-
};
|
|
13331
|
-
const setSearchQuery = nextSearchQuery => {
|
|
13332
|
-
if (storageSlice) {
|
|
13333
|
-
putToStorage(storageSlice, augmentWithVersion(nextSearchQuery));
|
|
13345
|
+
if (isReset) {
|
|
13346
|
+
currentSearchQuery = initialSearchQuery;
|
|
13347
|
+
resetSearchQuery();
|
|
13334
13348
|
}
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
});
|
|
13349
|
+
let filteredSearchQuery = currentSearchQuery ? omitUnknownFilters(omitVersion(currentSearchQuery)) : null;
|
|
13350
|
+
return filteredSearchQuery;
|
|
13338
13351
|
};
|
|
13339
13352
|
return {
|
|
13340
13353
|
searchQuery: getSearchQuery(),
|
|
@@ -20269,10 +20282,7 @@ SearchView.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
20269
20282
|
function ownKeys$c(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; }
|
|
20270
20283
|
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$c(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20271
20284
|
const SearchViewRouterStateContainer = props => {
|
|
20272
|
-
const children = props.children
|
|
20273
|
-
storageSlice = props.storageSlice;
|
|
20274
|
-
const location = useLocation();
|
|
20275
|
-
const history = useHistory();
|
|
20285
|
+
const children = props.children;
|
|
20276
20286
|
const canViewBusinessUnits = useIsAuthorized({
|
|
20277
20287
|
demandedPermissions: [PERMISSIONS.ViewBusinessUnits]
|
|
20278
20288
|
});
|
|
@@ -20282,84 +20292,12 @@ const SearchViewRouterStateContainer = props => {
|
|
|
20282
20292
|
inContextEntity: props.inContextEntity,
|
|
20283
20293
|
canViewBusinessUnits: Boolean(canViewBusinessUnits)
|
|
20284
20294
|
});
|
|
20285
|
-
const _useState = useState(null),
|
|
20286
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
20287
|
-
searchQuery = _useState2[0],
|
|
20288
|
-
setSearchQuery = _useState2[1];
|
|
20289
|
-
const restoreSearchOptions = useCallback(() => {
|
|
20290
|
-
if (!storageSlice || !hasStorage(storageSlice)) return null;
|
|
20291
|
-
let storedSearchQuery;
|
|
20292
|
-
let resetSearchQuery = false;
|
|
20293
|
-
try {
|
|
20294
|
-
storedSearchQuery = getFromStorage(storageSlice);
|
|
20295
|
-
if (!storedSearchQuery) {
|
|
20296
|
-
return null;
|
|
20297
|
-
}
|
|
20298
|
-
if (!matchesVersion(storedSearchQuery, SAVED_SEARCH_VERSION)) {
|
|
20299
|
-
resetSearchQuery = true;
|
|
20300
|
-
} else {
|
|
20301
|
-
setSearchQuery(storedSearchQuery);
|
|
20302
|
-
}
|
|
20303
|
-
} catch (e) {
|
|
20304
|
-
resetSearchQuery = true;
|
|
20305
|
-
reportErrorToSentry(new Error('SearchViewRouterContainer: failed to restore and parse from localStorage. Removing faulty entry.'), {
|
|
20306
|
-
extra: {
|
|
20307
|
-
storageSlice: storageSlice,
|
|
20308
|
-
rawQuery: window.localStorage.getItem(storageSlice)
|
|
20309
|
-
}
|
|
20310
|
-
});
|
|
20311
|
-
}
|
|
20312
|
-
if (resetSearchQuery) {
|
|
20313
|
-
removeFromStorage(storageSlice);
|
|
20314
|
-
return null;
|
|
20315
|
-
} else {
|
|
20316
|
-
const searchQueryWithoutUnknownFilters = omitUnknownFilters(storedSearchQuery);
|
|
20317
|
-
const searchQueryWithoutVersion = omitVersion(searchQueryWithoutUnknownFilters);
|
|
20318
|
-
return _Object$keys(searchQueryWithoutVersion).length > 0 ? searchQueryWithoutVersion : null;
|
|
20319
|
-
}
|
|
20320
|
-
}, [storageSlice]);
|
|
20321
|
-
useEffect(() => {
|
|
20322
|
-
const searchOptions = restoreSearchOptions();
|
|
20323
|
-
setSearchQuery(searchOptions);
|
|
20324
|
-
if (searchOptions) {
|
|
20325
|
-
// we compare previous searchQuery with the current one
|
|
20326
|
-
// if there are no differences then we do not redirect
|
|
20327
|
-
const diff = getDifferences(searchOptions, decode(location.state?.search) || {});
|
|
20328
|
-
if (!diff) history.replace(location.pathname, {
|
|
20329
|
-
search: encode(augmentWithVersion(searchOptions))
|
|
20330
|
-
});
|
|
20331
|
-
}
|
|
20332
|
-
// eslint-disable-next-line
|
|
20333
|
-
}, []);
|
|
20334
20295
|
const handleSetSearchFilterState = nextSearchOptions => {
|
|
20335
|
-
|
|
20336
|
-
|
|
20337
|
-
* Attempt to parse the previous query to embed
|
|
20338
|
-
* it into the url again. Unparsed prev and next
|
|
20339
|
-
* can not be combined.
|
|
20340
|
-
*/
|
|
20341
|
-
let parsedPreviousSearchQuery = {};
|
|
20342
|
-
try {
|
|
20343
|
-
const previousSearchQuery = location.state?.search;
|
|
20344
|
-
if (previousSearchQuery) {
|
|
20345
|
-
parsedPreviousSearchQuery = decode(previousSearchQuery);
|
|
20346
|
-
}
|
|
20347
|
-
} catch (e) {
|
|
20348
|
-
console.error('Error parsing previous search query:', e);
|
|
20349
|
-
parsedPreviousSearchQuery = {};
|
|
20350
|
-
}
|
|
20351
|
-
const nextSearchQuery = _objectSpread$c(_objectSpread$c({}, parsedPreviousSearchQuery), nextSearchOptions);
|
|
20352
|
-
if (storageSlice) {
|
|
20353
|
-
putToStorage(storageSlice, augmentWithVersion(nextSearchQuery));
|
|
20354
|
-
}
|
|
20355
|
-
history.replace(location.pathname, {
|
|
20356
|
-
search: encode(augmentWithVersion(nextSearchQuery))
|
|
20357
|
-
});
|
|
20358
|
-
setSearchQuery(nextSearchQuery);
|
|
20296
|
+
const nextSearchQuery = _objectSpread$c(_objectSpread$c({}, props.searchQuery), nextSearchOptions);
|
|
20297
|
+
props.setFilters(nextSearchQuery);
|
|
20359
20298
|
};
|
|
20360
|
-
return jsx(SearchView, _objectSpread$c(_objectSpread$c(
|
|
20361
|
-
setSearchFiltersState: handleSetSearchFilterState
|
|
20362
|
-
}, searchQuery), {}, {
|
|
20299
|
+
return jsx(SearchView, _objectSpread$c(_objectSpread$c({}, props), {}, {
|
|
20300
|
+
setSearchFiltersState: handleSetSearchFilterState,
|
|
20363
20301
|
columns: columns,
|
|
20364
20302
|
children: children
|
|
20365
20303
|
}));
|
|
@@ -20396,20 +20334,11 @@ const ChangeHistoryList = props => {
|
|
|
20396
20334
|
const hasViewAuditLogPermission = useIsAuthorized({
|
|
20397
20335
|
demandedPermissions: [PERMISSIONS.ViewAuditLog]
|
|
20398
20336
|
});
|
|
20399
|
-
const
|
|
20400
|
-
userId: applicationContext.user && applicationContext.user.id,
|
|
20401
|
-
projectKey: applicationContext.project && applicationContext.project.key
|
|
20402
|
-
})),
|
|
20403
|
-
userId = _useApplicationContex.userId,
|
|
20404
|
-
projectKey = _useApplicationContex.projectKey;
|
|
20337
|
+
const projectKey = useApplicationContext(applicationContext => applicationContext.project && applicationContext.project.key);
|
|
20405
20338
|
const intl = useIntl();
|
|
20406
20339
|
const _useVersionTier = useVersionTier(),
|
|
20407
20340
|
tier = _useVersionTier.tier;
|
|
20408
|
-
const storageSlice = props.storageSlice ||
|
|
20409
|
-
${userId}/
|
|
20410
|
-
${projectKey}/
|
|
20411
|
-
${SEARCH_SLICE_NAME_CHANGE_HISTORY}
|
|
20412
|
-
`;
|
|
20341
|
+
const storageSlice = props.storageSlice || SEARCH_SLICE_NAME_CHANGE_HISTORY;
|
|
20413
20342
|
const initialSearchQuery = {
|
|
20414
20343
|
page: 1,
|
|
20415
20344
|
perPage: 20,
|
|
@@ -20471,11 +20400,20 @@ const ChangeHistoryList = props => {
|
|
|
20471
20400
|
total: changeHistoryFetcher.history.total,
|
|
20472
20401
|
isInContextView: props.isInContextView ?? false,
|
|
20473
20402
|
children: jsx(SearchViewRouterStateContainer, {
|
|
20403
|
+
storageSlice: storageSlice,
|
|
20404
|
+
setFilters: setSearchQuery,
|
|
20405
|
+
searchQuery: changeHistoryFetcher.searchQuery
|
|
20406
|
+
/* TODO: Can remove all these and just get them off searchQuery! */,
|
|
20474
20407
|
visibleColumns: changeHistoryFetcher.searchQuery.columns,
|
|
20408
|
+
filters: changeHistoryFetcher.searchQuery.filters,
|
|
20409
|
+
page: changeHistoryFetcher.searchQuery.page,
|
|
20410
|
+
perPage: changeHistoryFetcher.searchQuery.perPage,
|
|
20411
|
+
sorting: changeHistoryFetcher.searchQuery.sorting,
|
|
20412
|
+
dateFilter: changeHistoryFetcher.searchQuery.filters.createdAt,
|
|
20413
|
+
displaySettings: changeHistoryFetcher.searchQuery.displaySettings
|
|
20414
|
+
/* ------------------------------------------------------------ */,
|
|
20475
20415
|
columns: props.columns ?? defaultColumns,
|
|
20476
20416
|
inContextEntity: props.inContextEntity,
|
|
20477
|
-
storageSlice: storageSlice,
|
|
20478
|
-
filters: changeHistoryFetcher.searchQuery.filters,
|
|
20479
20417
|
filterDefinitions: createFilterDefinitions({
|
|
20480
20418
|
intl,
|
|
20481
20419
|
members,
|
|
@@ -20492,17 +20430,10 @@ const ChangeHistoryList = props => {
|
|
|
20492
20430
|
count: changeHistoryFetcher.history.count,
|
|
20493
20431
|
total: changeHistoryFetcher.history.total,
|
|
20494
20432
|
currentRecordsTotal: currentRecordsFetcher.total,
|
|
20495
|
-
page: changeHistoryFetcher.searchQuery.page,
|
|
20496
|
-
perPage: changeHistoryFetcher.searchQuery.perPage,
|
|
20497
|
-
sorting: changeHistoryFetcher.searchQuery.sorting,
|
|
20498
20433
|
isCurrentRecordsTotalEmpty: currentRecordsFetcher.total === 0,
|
|
20499
20434
|
isDisabled: isFilterButtonDisabled,
|
|
20500
20435
|
isDisabledPlaceholder: intl.formatMessage(messages$f.emptyChangeHistorySearchFilterNamePlaceholder),
|
|
20501
20436
|
hasDisabledStyle: changeHistoryFetcher.history.total === 0,
|
|
20502
|
-
dateFilter: changeHistoryFetcher.searchQuery.filters.createdAt,
|
|
20503
|
-
setFilters: setSearchQuery,
|
|
20504
|
-
searchQuery: changeHistoryFetcher.searchQuery,
|
|
20505
|
-
displaySettings: changeHistoryFetcher.searchQuery.displaySettings,
|
|
20506
20437
|
children: (searchViewProps // TODO: type this when search-view is typed
|
|
20507
20438
|
) => jsx(ChangeHistoryListView, {
|
|
20508
20439
|
results: searchViewProps.results,
|
|
@@ -22073,7 +22004,7 @@ const WelcomeDialog = _ref => {
|
|
|
22073
22004
|
hasFoundData = _useVersionTier.hasFoundData,
|
|
22074
22005
|
tier = _useVersionTier.tier;
|
|
22075
22006
|
const routes = useRoutes();
|
|
22076
|
-
const _useStorage = useStorage(STORAGE_KEYS.WELCOME_DIALOG
|
|
22007
|
+
const _useStorage = useStorage(`${SEARCH_SLICE_NAME_CHANGE_HISTORY}/${STORAGE_KEYS.WELCOME_DIALOG}`, false),
|
|
22077
22008
|
_useStorage2 = _slicedToArray(_useStorage, 2),
|
|
22078
22009
|
hasDismissedModal = _useStorage2[0],
|
|
22079
22010
|
setHasDismissedModal = _useStorage2[1];
|
|
@@ -22302,9 +22233,9 @@ const AssociateRoleTab = () => {
|
|
|
22302
22233
|
userId: context.user && context.user.id,
|
|
22303
22234
|
projectKey: context.project && context.project.key
|
|
22304
22235
|
})),
|
|
22305
|
-
locale = _useApplicationContex.locale
|
|
22306
|
-
|
|
22307
|
-
|
|
22236
|
+
locale = _useApplicationContex.locale;
|
|
22237
|
+
_useApplicationContex.userId;
|
|
22238
|
+
_useApplicationContex.projectKey;
|
|
22308
22239
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22309
22240
|
const associateRoleId = params.id || params.associateRoleId;
|
|
22310
22241
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22318,8 +22249,6 @@ const AssociateRoleTab = () => {
|
|
|
22318
22249
|
inContextEntity: RESOURCE_TYPE.ASSOCIATE_ROLE,
|
|
22319
22250
|
resourceId: associateRoleId,
|
|
22320
22251
|
storageSlice: oneLineTrim`
|
|
22321
|
-
${userId}/
|
|
22322
|
-
${projectKey}/
|
|
22323
22252
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22324
22253
|
associateRoles
|
|
22325
22254
|
`,
|
|
@@ -22352,9 +22281,9 @@ const BusinessUnitTab = () => {
|
|
|
22352
22281
|
userId: context.user && context.user.id,
|
|
22353
22282
|
projectKey: context.project && context.project.key
|
|
22354
22283
|
})),
|
|
22355
|
-
locale = _useApplicationContex.locale
|
|
22356
|
-
|
|
22357
|
-
|
|
22284
|
+
locale = _useApplicationContex.locale;
|
|
22285
|
+
_useApplicationContex.userId;
|
|
22286
|
+
_useApplicationContex.projectKey;
|
|
22358
22287
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22359
22288
|
const businessUnitId = params.id || params.businessUnitId;
|
|
22360
22289
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22368,8 +22297,6 @@ const BusinessUnitTab = () => {
|
|
|
22368
22297
|
inContextEntity: RESOURCE_TYPE.BUSINESS_UNIT,
|
|
22369
22298
|
resourceId: businessUnitId,
|
|
22370
22299
|
storageSlice: oneLineTrim`
|
|
22371
|
-
${userId}/
|
|
22372
|
-
${projectKey}/
|
|
22373
22300
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22374
22301
|
businessUnits
|
|
22375
22302
|
`,
|
|
@@ -22404,9 +22331,9 @@ const CartDiscountTab = () => {
|
|
|
22404
22331
|
userId: context.user && context.user.id,
|
|
22405
22332
|
projectKey: context.project && context.project.key
|
|
22406
22333
|
})),
|
|
22407
|
-
locale = _useApplicationContex.locale
|
|
22408
|
-
|
|
22409
|
-
|
|
22334
|
+
locale = _useApplicationContex.locale;
|
|
22335
|
+
_useApplicationContex.userId;
|
|
22336
|
+
_useApplicationContex.projectKey;
|
|
22410
22337
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22411
22338
|
const cartDiscountId = params.id || params.cartDiscountId;
|
|
22412
22339
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22420,8 +22347,6 @@ const CartDiscountTab = () => {
|
|
|
22420
22347
|
inContextEntity: RESOURCE_TYPE.CART_DISCOUNT,
|
|
22421
22348
|
resourceId: cartDiscountId,
|
|
22422
22349
|
storageSlice: oneLineTrim`
|
|
22423
|
-
${userId}/
|
|
22424
|
-
${projectKey}/
|
|
22425
22350
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22426
22351
|
cart-discounts
|
|
22427
22352
|
`,
|
|
@@ -22458,9 +22383,9 @@ const CategoryTab = () => {
|
|
|
22458
22383
|
userId: context.user && context.user.id,
|
|
22459
22384
|
projectKey: context.project && context.project.key
|
|
22460
22385
|
})),
|
|
22461
|
-
locale = _useApplicationContex.locale
|
|
22462
|
-
|
|
22463
|
-
|
|
22386
|
+
locale = _useApplicationContex.locale;
|
|
22387
|
+
_useApplicationContex.userId;
|
|
22388
|
+
_useApplicationContex.projectKey;
|
|
22464
22389
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22465
22390
|
const categoryId = params.id || params.categoryId;
|
|
22466
22391
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22474,8 +22399,6 @@ const CategoryTab = () => {
|
|
|
22474
22399
|
inContextEntity: RESOURCE_TYPE.CATEGORY,
|
|
22475
22400
|
resourceId: categoryId,
|
|
22476
22401
|
storageSlice: oneLineTrim`
|
|
22477
|
-
${userId}/
|
|
22478
|
-
${projectKey}/
|
|
22479
22402
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22480
22403
|
categories
|
|
22481
22404
|
`,
|
|
@@ -22512,9 +22435,9 @@ const ChannelTab = () => {
|
|
|
22512
22435
|
userId: context.user && context.user.id,
|
|
22513
22436
|
projectKey: context.project && context.project.key
|
|
22514
22437
|
})),
|
|
22515
|
-
locale = _useApplicationContex.locale
|
|
22516
|
-
|
|
22517
|
-
|
|
22438
|
+
locale = _useApplicationContex.locale;
|
|
22439
|
+
_useApplicationContex.userId;
|
|
22440
|
+
_useApplicationContex.projectKey;
|
|
22518
22441
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22519
22442
|
const channelId = params.id || params.channelId;
|
|
22520
22443
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22528,8 +22451,6 @@ const ChannelTab = () => {
|
|
|
22528
22451
|
resourceId: channelId,
|
|
22529
22452
|
inContextEntity: RESOURCE_TYPE.CHANNEL,
|
|
22530
22453
|
storageSlice: oneLineTrim`
|
|
22531
|
-
${userId}/
|
|
22532
|
-
${projectKey}/
|
|
22533
22454
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22534
22455
|
channels
|
|
22535
22456
|
`,
|
|
@@ -22566,9 +22487,9 @@ const CustomerTab = () => {
|
|
|
22566
22487
|
userId: context.user && context.user.id,
|
|
22567
22488
|
projectKey: context.project && context.project.key
|
|
22568
22489
|
})),
|
|
22569
|
-
locale = _useApplicationContex.locale
|
|
22570
|
-
|
|
22571
|
-
|
|
22490
|
+
locale = _useApplicationContex.locale;
|
|
22491
|
+
_useApplicationContex.userId;
|
|
22492
|
+
_useApplicationContex.projectKey;
|
|
22572
22493
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22573
22494
|
const customerId = params.id || params.customerId;
|
|
22574
22495
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22582,8 +22503,6 @@ const CustomerTab = () => {
|
|
|
22582
22503
|
inContextEntity: RESOURCE_TYPE.CUSTOMER,
|
|
22583
22504
|
resourceId: customerId,
|
|
22584
22505
|
storageSlice: oneLineTrim`
|
|
22585
|
-
${userId}/
|
|
22586
|
-
${projectKey}/
|
|
22587
22506
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22588
22507
|
customers
|
|
22589
22508
|
`,
|
|
@@ -22622,9 +22541,9 @@ const CustomerGroupTab = () => {
|
|
|
22622
22541
|
userId: context.user && context.user.id,
|
|
22623
22542
|
projectKey: context.project && context.project.key
|
|
22624
22543
|
})),
|
|
22625
|
-
locale = _useApplicationContex.locale
|
|
22626
|
-
|
|
22627
|
-
|
|
22544
|
+
locale = _useApplicationContex.locale;
|
|
22545
|
+
_useApplicationContex.userId;
|
|
22546
|
+
_useApplicationContex.projectKey;
|
|
22628
22547
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22629
22548
|
const customerGroupId = params.id || params.customerGroupId;
|
|
22630
22549
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22638,8 +22557,6 @@ const CustomerGroupTab = () => {
|
|
|
22638
22557
|
resourceId: customerGroupId,
|
|
22639
22558
|
inContextEntity: RESOURCE_TYPE.CUSTOMER_GROUP,
|
|
22640
22559
|
storageSlice: oneLineTrim`
|
|
22641
|
-
${userId}/
|
|
22642
|
-
${projectKey}/
|
|
22643
22560
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22644
22561
|
customer-groups
|
|
22645
22562
|
`,
|
|
@@ -22676,9 +22593,9 @@ const DiscountCodeTab = () => {
|
|
|
22676
22593
|
userId: context.user && context.user.id,
|
|
22677
22594
|
projectKey: context.project && context.project.key
|
|
22678
22595
|
})),
|
|
22679
|
-
locale = _useApplicationContex.locale
|
|
22680
|
-
|
|
22681
|
-
|
|
22596
|
+
locale = _useApplicationContex.locale;
|
|
22597
|
+
_useApplicationContex.userId;
|
|
22598
|
+
_useApplicationContex.projectKey;
|
|
22682
22599
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22683
22600
|
const discountCodeId = params.id || params.discountCodeId;
|
|
22684
22601
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22692,8 +22609,6 @@ const DiscountCodeTab = () => {
|
|
|
22692
22609
|
resourceId: discountCodeId,
|
|
22693
22610
|
inContextEntity: RESOURCE_TYPE.DISCOUNT_CODE,
|
|
22694
22611
|
storageSlice: oneLineTrim`
|
|
22695
|
-
${userId}/
|
|
22696
|
-
${projectKey}/
|
|
22697
22612
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22698
22613
|
discount-codes
|
|
22699
22614
|
`,
|
|
@@ -22732,9 +22647,9 @@ const OrderTab = () => {
|
|
|
22732
22647
|
userId: context.user && context.user.id,
|
|
22733
22648
|
projectKey: context.project && context.project.key
|
|
22734
22649
|
})),
|
|
22735
|
-
locale = _useApplicationContex.locale
|
|
22736
|
-
|
|
22737
|
-
|
|
22650
|
+
locale = _useApplicationContex.locale;
|
|
22651
|
+
_useApplicationContex.userId;
|
|
22652
|
+
_useApplicationContex.projectKey;
|
|
22738
22653
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22739
22654
|
const orderId = params.id || params.orderId;
|
|
22740
22655
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22748,8 +22663,6 @@ const OrderTab = () => {
|
|
|
22748
22663
|
inContextEntity: RESOURCE_TYPE.ORDER,
|
|
22749
22664
|
resourceId: orderId,
|
|
22750
22665
|
storageSlice: oneLineTrim`
|
|
22751
|
-
${userId}/
|
|
22752
|
-
${projectKey}/
|
|
22753
22666
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22754
22667
|
orders
|
|
22755
22668
|
`,
|
|
@@ -22786,9 +22699,9 @@ const ProductTab = () => {
|
|
|
22786
22699
|
userId: context.user && context.user.id,
|
|
22787
22700
|
projectKey: context.project && context.project.key
|
|
22788
22701
|
})),
|
|
22789
|
-
locale = _useApplicationContex.locale
|
|
22790
|
-
|
|
22791
|
-
|
|
22702
|
+
locale = _useApplicationContex.locale;
|
|
22703
|
+
_useApplicationContex.userId;
|
|
22704
|
+
_useApplicationContex.projectKey;
|
|
22792
22705
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22793
22706
|
const productId = params.id || params.productId;
|
|
22794
22707
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22802,8 +22715,6 @@ const ProductTab = () => {
|
|
|
22802
22715
|
inContextEntity: RESOURCE_TYPE.PRODUCT,
|
|
22803
22716
|
resourceId: productId,
|
|
22804
22717
|
storageSlice: oneLineTrim`
|
|
22805
|
-
${userId}/
|
|
22806
|
-
${projectKey}/
|
|
22807
22718
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22808
22719
|
products
|
|
22809
22720
|
`,
|
|
@@ -22840,9 +22751,9 @@ const ProductDiscountTab = () => {
|
|
|
22840
22751
|
userId: context.user && context.user.id,
|
|
22841
22752
|
projectKey: context.project && context.project.key
|
|
22842
22753
|
})),
|
|
22843
|
-
locale = _useApplicationContex.locale
|
|
22844
|
-
|
|
22845
|
-
|
|
22754
|
+
locale = _useApplicationContex.locale;
|
|
22755
|
+
_useApplicationContex.userId;
|
|
22756
|
+
_useApplicationContex.projectKey;
|
|
22846
22757
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22847
22758
|
const productDiscountId = params.id || params.productDiscountId;
|
|
22848
22759
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22856,8 +22767,6 @@ const ProductDiscountTab = () => {
|
|
|
22856
22767
|
resourceId: productDiscountId,
|
|
22857
22768
|
inContextEntity: RESOURCE_TYPE.PRODUCT_DISCOUNT,
|
|
22858
22769
|
storageSlice: oneLineTrim`
|
|
22859
|
-
${userId}/
|
|
22860
|
-
${projectKey}/
|
|
22861
22770
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22862
22771
|
product-discounts
|
|
22863
22772
|
`,
|
|
@@ -22896,9 +22805,9 @@ const ProductSelectionTab = () => {
|
|
|
22896
22805
|
userId: context.user && context.user.id,
|
|
22897
22806
|
projectKey: context.project && context.project.key
|
|
22898
22807
|
})),
|
|
22899
|
-
locale = _useApplicationContex.locale
|
|
22900
|
-
|
|
22901
|
-
|
|
22808
|
+
locale = _useApplicationContex.locale;
|
|
22809
|
+
_useApplicationContex.userId;
|
|
22810
|
+
_useApplicationContex.projectKey;
|
|
22902
22811
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22903
22812
|
const productSelectionId = params.id || params.productSelectionId;
|
|
22904
22813
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22912,8 +22821,6 @@ const ProductSelectionTab = () => {
|
|
|
22912
22821
|
resourceId: productSelectionId,
|
|
22913
22822
|
inContextEntity: RESOURCE_TYPE.PRODUCT_SELECTION,
|
|
22914
22823
|
storageSlice: oneLineTrim`
|
|
22915
|
-
${userId}/
|
|
22916
|
-
${projectKey}/
|
|
22917
22824
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22918
22825
|
product-selections
|
|
22919
22826
|
`,
|
|
@@ -22950,9 +22857,9 @@ const ProductTypeTab = () => {
|
|
|
22950
22857
|
userId: context.user && context.user.id,
|
|
22951
22858
|
projectKey: context.project && context.project.key
|
|
22952
22859
|
})),
|
|
22953
|
-
locale = _useApplicationContex.locale
|
|
22954
|
-
|
|
22955
|
-
|
|
22860
|
+
locale = _useApplicationContex.locale;
|
|
22861
|
+
_useApplicationContex.userId;
|
|
22862
|
+
_useApplicationContex.projectKey;
|
|
22956
22863
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
22957
22864
|
const productTypeId = params.id || params.productTypeId;
|
|
22958
22865
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -22966,8 +22873,6 @@ const ProductTypeTab = () => {
|
|
|
22966
22873
|
resourceId: productTypeId,
|
|
22967
22874
|
inContextEntity: RESOURCE_TYPE.PRODUCT_TYPE,
|
|
22968
22875
|
storageSlice: oneLineTrim`
|
|
22969
|
-
${userId}/
|
|
22970
|
-
${projectKey}/
|
|
22971
22876
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
22972
22877
|
product-types
|
|
22973
22878
|
`,
|
|
@@ -23004,9 +22909,9 @@ const QuoteTab = () => {
|
|
|
23004
22909
|
userId: context.user && context.user.id,
|
|
23005
22910
|
projectKey: context.project && context.project.key
|
|
23006
22911
|
})),
|
|
23007
|
-
locale = _useApplicationContex.locale
|
|
23008
|
-
|
|
23009
|
-
|
|
22912
|
+
locale = _useApplicationContex.locale;
|
|
22913
|
+
_useApplicationContex.userId;
|
|
22914
|
+
_useApplicationContex.projectKey;
|
|
23010
22915
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
23011
22916
|
const quoteId = params.id || params.quoteId;
|
|
23012
22917
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -23020,8 +22925,6 @@ const QuoteTab = () => {
|
|
|
23020
22925
|
resourceId: quoteId,
|
|
23021
22926
|
inContextEntity: RESOURCE_TYPE.QUOTE,
|
|
23022
22927
|
storageSlice: oneLineTrim`
|
|
23023
|
-
${userId}/
|
|
23024
|
-
${projectKey}/
|
|
23025
22928
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
23026
22929
|
quotes
|
|
23027
22930
|
`,
|
|
@@ -23058,9 +22961,9 @@ const QuoteRequestTab = () => {
|
|
|
23058
22961
|
userId: context.user && context.user.id,
|
|
23059
22962
|
projectKey: context.project && context.project.key
|
|
23060
22963
|
})),
|
|
23061
|
-
locale = _useApplicationContex.locale
|
|
23062
|
-
|
|
23063
|
-
|
|
22964
|
+
locale = _useApplicationContex.locale;
|
|
22965
|
+
_useApplicationContex.userId;
|
|
22966
|
+
_useApplicationContex.projectKey;
|
|
23064
22967
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
23065
22968
|
const quoteRequestId = params.id || params.quoteId;
|
|
23066
22969
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -23074,8 +22977,6 @@ const QuoteRequestTab = () => {
|
|
|
23074
22977
|
resourceId: quoteRequestId,
|
|
23075
22978
|
inContextEntity: RESOURCE_TYPE.QUOTE_REQUEST,
|
|
23076
22979
|
storageSlice: oneLineTrim`
|
|
23077
|
-
${userId}/
|
|
23078
|
-
${projectKey}/
|
|
23079
22980
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
23080
22981
|
quote-requests
|
|
23081
22982
|
`,
|
|
@@ -23112,9 +23013,9 @@ const StagedQuoteTab = () => {
|
|
|
23112
23013
|
userId: context.user && context.user.id,
|
|
23113
23014
|
projectKey: context.project && context.project.key
|
|
23114
23015
|
})),
|
|
23115
|
-
locale = _useApplicationContex.locale
|
|
23116
|
-
|
|
23117
|
-
|
|
23016
|
+
locale = _useApplicationContex.locale;
|
|
23017
|
+
_useApplicationContex.userId;
|
|
23018
|
+
_useApplicationContex.projectKey;
|
|
23118
23019
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
23119
23020
|
const stagedQuoteId = params.id || params.quoteId;
|
|
23120
23021
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -23128,8 +23029,6 @@ const StagedQuoteTab = () => {
|
|
|
23128
23029
|
resourceId: stagedQuoteId,
|
|
23129
23030
|
inContextEntity: RESOURCE_TYPE.STAGED_QUOTE,
|
|
23130
23031
|
storageSlice: oneLineTrim`
|
|
23131
|
-
${userId}/
|
|
23132
|
-
${projectKey}/
|
|
23133
23032
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
23134
23033
|
staged-quotes
|
|
23135
23034
|
`,
|
|
@@ -23166,9 +23065,9 @@ const StoreTab = () => {
|
|
|
23166
23065
|
userId: context.user && context.user.id,
|
|
23167
23066
|
projectKey: context.project && context.project.key
|
|
23168
23067
|
})),
|
|
23169
|
-
locale = _useApplicationContex.locale
|
|
23170
|
-
|
|
23171
|
-
|
|
23068
|
+
locale = _useApplicationContex.locale;
|
|
23069
|
+
_useApplicationContex.userId;
|
|
23070
|
+
_useApplicationContex.projectKey;
|
|
23172
23071
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
23173
23072
|
const storeId = params.id || params.storeId;
|
|
23174
23073
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -23182,8 +23081,6 @@ const StoreTab = () => {
|
|
|
23182
23081
|
resourceId: storeId,
|
|
23183
23082
|
inContextEntity: RESOURCE_TYPE.STORE,
|
|
23184
23083
|
storageSlice: oneLineTrim`
|
|
23185
|
-
${userId}/
|
|
23186
|
-
${projectKey}/
|
|
23187
23084
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
23188
23085
|
stores
|
|
23189
23086
|
`,
|
|
@@ -23220,9 +23117,9 @@ const TaxCategoryTab = () => {
|
|
|
23220
23117
|
userId: context.user && context.user.id,
|
|
23221
23118
|
projectKey: context.project && context.project.key
|
|
23222
23119
|
})),
|
|
23223
|
-
locale = _useApplicationContex.locale
|
|
23224
|
-
|
|
23225
|
-
|
|
23120
|
+
locale = _useApplicationContex.locale;
|
|
23121
|
+
_useApplicationContex.userId;
|
|
23122
|
+
_useApplicationContex.projectKey;
|
|
23226
23123
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
23227
23124
|
const taxCategoryId = params.id || params.taxCategoryId;
|
|
23228
23125
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -23236,8 +23133,6 @@ const TaxCategoryTab = () => {
|
|
|
23236
23133
|
resourceId: taxCategoryId,
|
|
23237
23134
|
inContextEntity: RESOURCE_TYPE.TAX_CATEGORY,
|
|
23238
23135
|
storageSlice: oneLineTrim`
|
|
23239
|
-
${userId}/
|
|
23240
|
-
${projectKey}/
|
|
23241
23136
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
23242
23137
|
tax-categories
|
|
23243
23138
|
`,
|
|
@@ -23274,9 +23169,9 @@ const ZoneTab = () => {
|
|
|
23274
23169
|
userId: context.user && context.user.id,
|
|
23275
23170
|
projectKey: context.project && context.project.key
|
|
23276
23171
|
})),
|
|
23277
|
-
locale = _useApplicationContex.locale
|
|
23278
|
-
|
|
23279
|
-
|
|
23172
|
+
locale = _useApplicationContex.locale;
|
|
23173
|
+
_useApplicationContex.userId;
|
|
23174
|
+
_useApplicationContex.projectKey;
|
|
23280
23175
|
const changeHistoryMessages = useAsyncIntlMessages(locale, loadI18n);
|
|
23281
23176
|
const zoneId = params.id || params.zoneId;
|
|
23282
23177
|
if (changeHistoryMessages.isLoading) return jsx(LoadingSpinner, {});
|
|
@@ -23290,8 +23185,6 @@ const ZoneTab = () => {
|
|
|
23290
23185
|
resourceId: zoneId,
|
|
23291
23186
|
inContextEntity: RESOURCE_TYPE.ZONE,
|
|
23292
23187
|
storageSlice: oneLineTrim`
|
|
23293
|
-
${userId}/
|
|
23294
|
-
${projectKey}/
|
|
23295
23188
|
${SEARCH_SLICE_NAME_CHANGE_HISTORY}/
|
|
23296
23189
|
zones
|
|
23297
23190
|
`,
|