@commercetools-frontend/experimental-components 7.0.0 → 7.1.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.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +361 -137
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +350 -137
- package/dist/commercetools-frontend-experimental-components.esm.js +361 -139
- package/dist/declarations/src/components/carousel/carousel.d.ts +28 -0
- package/dist/declarations/src/components/carousel/index.d.ts +2 -0
- package/dist/declarations/src/index.d.ts +2 -1
- package/dist/styles.css +32 -32
- package/package.json +15 -14
|
@@ -108,6 +108,8 @@ var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
|
|
|
108
108
|
var _spliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/splice');
|
|
109
109
|
var memoize = require('memoize-one');
|
|
110
110
|
var omitEmpty = require('omit-empty-es');
|
|
111
|
+
var shuffle = require('lodash/shuffle');
|
|
112
|
+
var reactSnapCarousel = require('react-snap-carousel');
|
|
111
113
|
var hoc = require('@apollo/client/react/hoc');
|
|
112
114
|
var flatten = require('lodash/flatten');
|
|
113
115
|
var uniqBy = require('lodash/uniqBy');
|
|
@@ -208,6 +210,7 @@ var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
|
|
|
208
210
|
var _spliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_spliceInstanceProperty);
|
|
209
211
|
var memoize__default = /*#__PURE__*/_interopDefault(memoize);
|
|
210
212
|
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
213
|
+
var shuffle__default = /*#__PURE__*/_interopDefault(shuffle);
|
|
211
214
|
var flatten__default = /*#__PURE__*/_interopDefault(flatten);
|
|
212
215
|
var uniqBy__default = /*#__PURE__*/_interopDefault(uniqBy);
|
|
213
216
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
@@ -301,8 +304,8 @@ var messages$S = reactIntl.defineMessages({
|
|
|
301
304
|
}
|
|
302
305
|
});
|
|
303
306
|
|
|
304
|
-
function ownKeys$
|
|
305
|
-
function _objectSpread$
|
|
307
|
+
function ownKeys$1t(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
308
|
+
function _objectSpread$1t(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1t(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1t(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
306
309
|
var GetChannelsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "ListValue", values: [{ kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, { kind: "StringValue", value: "key", block: false }] } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "60" } }], 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: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, 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: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
307
310
|
var GetChannelQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channel" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, 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: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
308
311
|
var PickerInputChannel = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, 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: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -331,7 +334,7 @@ const ChannelPickerInput = _ref => {
|
|
|
331
334
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
332
335
|
const variables = React.useMemo(() => {
|
|
333
336
|
const rolesClause = getRolesClause(roles);
|
|
334
|
-
return _objectSpread$
|
|
337
|
+
return _objectSpread$1t({
|
|
335
338
|
sortByNamePath: `name.${dataLocale}`
|
|
336
339
|
}, rolesClause && {
|
|
337
340
|
extraWhere: rolesClause
|
|
@@ -719,9 +722,9 @@ const StatePickerInput = _ref => {
|
|
|
719
722
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
720
723
|
var StatePickerInput$1 = StatePickerInput;
|
|
721
724
|
|
|
722
|
-
function ownKeys$
|
|
723
|
-
function _objectSpread$
|
|
724
|
-
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
725
|
+
function ownKeys$1s(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
726
|
+
function _objectSpread$1s(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1s(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1s(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
727
|
+
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$1s({
|
|
725
728
|
ref: ref,
|
|
726
729
|
style: {
|
|
727
730
|
display: 'block',
|
|
@@ -754,8 +757,8 @@ var messages$P = reactIntl.defineMessages({
|
|
|
754
757
|
}
|
|
755
758
|
});
|
|
756
759
|
|
|
757
|
-
function ownKeys$
|
|
758
|
-
function _objectSpread$
|
|
760
|
+
function ownKeys$1r(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
761
|
+
function _objectSpread$1r(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1r(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1r(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
759
762
|
const getBottomOption = formatMessage => ({
|
|
760
763
|
options: [{
|
|
761
764
|
label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
|
|
@@ -766,7 +769,7 @@ const getBottomOption = formatMessage => ({
|
|
|
766
769
|
const Option$2 = props => {
|
|
767
770
|
const _useIntl = reactIntl.useIntl(),
|
|
768
771
|
formatMessage = _useIntl.formatMessage;
|
|
769
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
772
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$1r(_objectSpread$1r({}, props), {}, {
|
|
770
773
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
771
774
|
tone: "secondary",
|
|
772
775
|
children: formatMessage(props.data.label)
|
|
@@ -783,8 +786,8 @@ const Option$2 = props => {
|
|
|
783
786
|
};
|
|
784
787
|
Option$2.displayName = 'Option';
|
|
785
788
|
|
|
786
|
-
function ownKeys$
|
|
787
|
-
function _objectSpread$
|
|
789
|
+
function ownKeys$1q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
790
|
+
function _objectSpread$1q(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1q(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1q(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
788
791
|
const useHandlers = onChange => {
|
|
789
792
|
const _useState = React.useState(),
|
|
790
793
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -795,8 +798,8 @@ const useHandlers = onChange => {
|
|
|
795
798
|
}, []);
|
|
796
799
|
const handleChange = useEventCallback$1(event => {
|
|
797
800
|
var _context;
|
|
798
|
-
const eventWithExtractedValue = _objectSpread$
|
|
799
|
-
target: _objectSpread$
|
|
801
|
+
const eventWithExtractedValue = _objectSpread$1q(_objectSpread$1q({}, event), {}, {
|
|
802
|
+
target: _objectSpread$1q(_objectSpread$1q({}, event.target), {}, {
|
|
800
803
|
value: _Array$isArray__default["default"](event.target.value) ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item?.value) : event.target.value?.value
|
|
801
804
|
})
|
|
802
805
|
});
|
|
@@ -806,9 +809,9 @@ const useHandlers = onChange => {
|
|
|
806
809
|
};
|
|
807
810
|
var useHandlers$1 = useHandlers;
|
|
808
811
|
|
|
809
|
-
const _excluded$
|
|
810
|
-
function ownKeys$
|
|
811
|
-
function _objectSpread$
|
|
812
|
+
const _excluded$g = ["extraWhere"];
|
|
813
|
+
function ownKeys$1p(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
814
|
+
function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1p(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1p(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
812
815
|
const constructPrefixSearchPredicate$1 = function () {
|
|
813
816
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
814
817
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -849,13 +852,13 @@ const useLoadOptions = _ref => {
|
|
|
849
852
|
}
|
|
850
853
|
const _ref2 = variables ?? {},
|
|
851
854
|
extraWhere = _ref2.extraWhere,
|
|
852
|
-
restVariables = _objectWithoutProperties(_ref2, _excluded$
|
|
855
|
+
restVariables = _objectWithoutProperties(_ref2, _excluded$g);
|
|
853
856
|
if (typeof extraWhere === 'string') {
|
|
854
857
|
where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
|
|
855
858
|
}
|
|
856
859
|
return client$1.query({
|
|
857
860
|
query,
|
|
858
|
-
variables: _objectSpread$
|
|
861
|
+
variables: _objectSpread$1p({
|
|
859
862
|
where
|
|
860
863
|
}, restVariables),
|
|
861
864
|
context: {
|
|
@@ -1160,8 +1163,8 @@ var keepDisplayName$1 = keepDisplayName;
|
|
|
1160
1163
|
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
|
|
1161
1164
|
var wrapDisplayName$1 = wrapDisplayName;
|
|
1162
1165
|
|
|
1163
|
-
function ownKeys$
|
|
1164
|
-
function _objectSpread$
|
|
1166
|
+
function ownKeys$1o(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1167
|
+
function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1o(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1o(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1165
1168
|
function _callSuper$8(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$8() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1166
1169
|
function _isNativeReflectConstruct$8() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$8 = function () { return !!t; })(); }
|
|
1167
1170
|
const withMouseOverState = BaseComponent => {
|
|
@@ -1192,7 +1195,7 @@ const withMouseOverState = BaseComponent => {
|
|
|
1192
1195
|
handleMouseOver: this.handleMouseOver,
|
|
1193
1196
|
handleMouseOut: this.handleMouseOut
|
|
1194
1197
|
};
|
|
1195
|
-
return jsxRuntime.jsx(BaseComponent, _objectSpread$
|
|
1198
|
+
return jsxRuntime.jsx(BaseComponent, _objectSpread$1o({}, _objectSpread$1o(_objectSpread$1o({}, this.props), injectedProps)));
|
|
1196
1199
|
}
|
|
1197
1200
|
}]);
|
|
1198
1201
|
}(React.Component);
|
|
@@ -1201,8 +1204,8 @@ const withMouseOverState = BaseComponent => {
|
|
|
1201
1204
|
};
|
|
1202
1205
|
var withMouseOverState$1 = withMouseOverState;
|
|
1203
1206
|
|
|
1204
|
-
function ownKeys$
|
|
1205
|
-
function _objectSpread$
|
|
1207
|
+
function ownKeys$1n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1208
|
+
function _objectSpread$1n(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1n(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1n(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1206
1209
|
function _callSuper$7(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1207
1210
|
function _isNativeReflectConstruct$7() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$7 = function () { return !!t; })(); }
|
|
1208
1211
|
var styles$j = {
|
|
@@ -1293,7 +1296,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
1293
1296
|
}, {
|
|
1294
1297
|
key: "render",
|
|
1295
1298
|
value: function render() {
|
|
1296
|
-
const commonProps = _objectSpread$
|
|
1299
|
+
const commonProps = _objectSpread$1n(_objectSpread$1n({
|
|
1297
1300
|
value: this.state.draftValue,
|
|
1298
1301
|
autoComplete: this.props.autoComplete,
|
|
1299
1302
|
onChange: this.handleChange,
|
|
@@ -1312,7 +1315,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
1312
1315
|
htmlFor: inputId,
|
|
1313
1316
|
children: this.props.label
|
|
1314
1317
|
})
|
|
1315
|
-
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$
|
|
1318
|
+
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$1n(_objectSpread$1n({}, commonProps), {}, {
|
|
1316
1319
|
id: inputId,
|
|
1317
1320
|
className: classnames__default["default"](styles$j.textarea, styles$j[`textarea-${this.props.style}`], {
|
|
1318
1321
|
[styles$j.invalid]: !this.props.isValid,
|
|
@@ -1321,7 +1324,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
1321
1324
|
rows: 1,
|
|
1322
1325
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
1323
1326
|
cacheMeasurements: true
|
|
1324
|
-
})) : jsxRuntime.jsx("input", _objectSpread$
|
|
1327
|
+
})) : jsxRuntime.jsx("input", _objectSpread$1n(_objectSpread$1n({}, commonProps), {}, {
|
|
1325
1328
|
id: inputId,
|
|
1326
1329
|
ref: this.props.inputRef,
|
|
1327
1330
|
type: this.props.as,
|
|
@@ -1521,8 +1524,8 @@ SearchInput.defaultProps = {
|
|
|
1521
1524
|
};
|
|
1522
1525
|
var searchInput = flowRight__default["default"](keepDisplayName$1(SearchInput), withMouseOverState$1, reactIntl.injectIntl)(SearchInput);
|
|
1523
1526
|
|
|
1524
|
-
function ownKeys$
|
|
1525
|
-
function _objectSpread$
|
|
1527
|
+
function ownKeys$1m(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1528
|
+
function _objectSpread$1m(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1526
1529
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1527
1530
|
const WithDataTablePaginationState = props => {
|
|
1528
1531
|
const _usePaginationState = uiKit.usePaginationState({
|
|
@@ -1535,7 +1538,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1535
1538
|
key: initialValues?.tableSorting?.key,
|
|
1536
1539
|
order: initialValues?.tableSorting?.order
|
|
1537
1540
|
});
|
|
1538
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1541
|
+
return jsxRuntime.jsx(Component, _objectSpread$1m(_objectSpread$1m({}, props), {}, {
|
|
1539
1542
|
dataTablePaginationState: {
|
|
1540
1543
|
page,
|
|
1541
1544
|
perPage,
|
|
@@ -1548,8 +1551,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1548
1551
|
};
|
|
1549
1552
|
var injectDataTablePaginationState$1 = injectDataTablePaginationState;
|
|
1550
1553
|
|
|
1551
|
-
function ownKeys$
|
|
1552
|
-
function _objectSpread$
|
|
1554
|
+
function ownKeys$1l(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1555
|
+
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1553
1556
|
const injectNotifications = function () {
|
|
1554
1557
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1555
1558
|
return Component => {
|
|
@@ -1564,7 +1567,7 @@ const injectNotifications = function () {
|
|
|
1564
1567
|
onActionError,
|
|
1565
1568
|
hideAllPageNotifications
|
|
1566
1569
|
};
|
|
1567
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1570
|
+
return jsxRuntime.jsx(Component, _objectSpread$1l(_objectSpread$1l({}, props), {}, {
|
|
1568
1571
|
[propName]: notifications
|
|
1569
1572
|
}));
|
|
1570
1573
|
};
|
|
@@ -1574,23 +1577,23 @@ const injectNotifications = function () {
|
|
|
1574
1577
|
};
|
|
1575
1578
|
var injectNotifications$1 = injectNotifications;
|
|
1576
1579
|
|
|
1577
|
-
function ownKeys$
|
|
1578
|
-
function _objectSpread$
|
|
1580
|
+
function ownKeys$1k(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1581
|
+
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__default["default"](_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1579
1582
|
function isPropsMapper(mapProps) {
|
|
1580
1583
|
return typeof mapProps === 'function';
|
|
1581
1584
|
}
|
|
1582
1585
|
const withProps = mapProps => Component => {
|
|
1583
1586
|
const EnhancedWithProps = ownProps => {
|
|
1584
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
1585
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1587
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1k(_objectSpread$1k({}, ownProps), mapProps(ownProps)) : _objectSpread$1k(_objectSpread$1k({}, ownProps), mapProps);
|
|
1588
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k({}, enhancedProps));
|
|
1586
1589
|
};
|
|
1587
1590
|
EnhancedWithProps.displayName = wrapDisplayName$1(Component, 'withProps');
|
|
1588
1591
|
return EnhancedWithProps;
|
|
1589
1592
|
};
|
|
1590
1593
|
var withProps$1 = withProps;
|
|
1591
1594
|
|
|
1592
|
-
function ownKeys$
|
|
1593
|
-
function _objectSpread$
|
|
1595
|
+
function ownKeys$1j(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1596
|
+
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__default["default"](_context = ownKeys$1j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1594
1597
|
const useRedirectEffect = _ref => {
|
|
1595
1598
|
let goTo = _ref.goTo;
|
|
1596
1599
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1610,31 +1613,31 @@ const defaultOptions$5 = {
|
|
|
1610
1613
|
skip: () => false
|
|
1611
1614
|
};
|
|
1612
1615
|
const withRedirectTo = options => Component => {
|
|
1613
|
-
const mergedOptions = _objectSpread$
|
|
1616
|
+
const mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$5), options);
|
|
1614
1617
|
const WithRedirectTo = props => {
|
|
1615
1618
|
if (!mergedOptions.skip(props)) {
|
|
1616
1619
|
return jsxRuntime.jsx(RedirectTo, {
|
|
1617
1620
|
goTo: options.selectGoTo(props)
|
|
1618
1621
|
});
|
|
1619
1622
|
}
|
|
1620
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1623
|
+
return jsxRuntime.jsx(Component, _objectSpread$1j({}, props));
|
|
1621
1624
|
};
|
|
1622
1625
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
1623
1626
|
return WithRedirectTo;
|
|
1624
1627
|
};
|
|
1625
1628
|
var withRedirectTo$1 = withRedirectTo;
|
|
1626
1629
|
|
|
1627
|
-
function ownKeys$
|
|
1628
|
-
function _objectSpread$
|
|
1630
|
+
function ownKeys$1i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1631
|
+
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1629
1632
|
const defaultOptions$4 = {
|
|
1630
1633
|
propName: 'modalState',
|
|
1631
1634
|
isInitiallyOpen: false
|
|
1632
1635
|
};
|
|
1633
1636
|
const injectModalState$2 = options => Component => {
|
|
1634
|
-
const mergedOptions = _objectSpread$
|
|
1637
|
+
const mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$4), options);
|
|
1635
1638
|
const WithModalState = props => {
|
|
1636
1639
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
1637
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1640
|
+
return jsxRuntime.jsx(Component, _objectSpread$1i(_objectSpread$1i({}, props), {}, {
|
|
1638
1641
|
[mergedOptions.propName]: modalState
|
|
1639
1642
|
}));
|
|
1640
1643
|
};
|
|
@@ -1643,17 +1646,17 @@ const injectModalState$2 = options => Component => {
|
|
|
1643
1646
|
};
|
|
1644
1647
|
var injectModalState$3 = injectModalState$2;
|
|
1645
1648
|
|
|
1646
|
-
function ownKeys$
|
|
1647
|
-
function _objectSpread$
|
|
1649
|
+
function ownKeys$1h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1650
|
+
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__default["default"](_context = ownKeys$1h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1648
1651
|
const defaultOptions$3 = {
|
|
1649
1652
|
propName: 'toggleState',
|
|
1650
1653
|
isInitiallyOpen: false
|
|
1651
1654
|
};
|
|
1652
1655
|
const injectModalState = options => Component => {
|
|
1653
|
-
const mergedOptions = _objectSpread$
|
|
1656
|
+
const mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$3), options);
|
|
1654
1657
|
const WithToggleState = props => {
|
|
1655
1658
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
1656
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1659
|
+
return jsxRuntime.jsx(Component, _objectSpread$1h(_objectSpread$1h({}, props), {}, {
|
|
1657
1660
|
[mergedOptions.propName]: toggleState
|
|
1658
1661
|
}));
|
|
1659
1662
|
};
|
|
@@ -1662,8 +1665,8 @@ const injectModalState = options => Component => {
|
|
|
1662
1665
|
};
|
|
1663
1666
|
var injectModalState$1 = injectModalState;
|
|
1664
1667
|
|
|
1665
|
-
function ownKeys$
|
|
1666
|
-
function _objectSpread$
|
|
1668
|
+
function ownKeys$1g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1669
|
+
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__default["default"](_context2 = ownKeys$1g(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1g(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1667
1670
|
const defaultOptions$2 = {
|
|
1668
1671
|
storageType: 'local',
|
|
1669
1672
|
segregateByUser: true
|
|
@@ -1681,7 +1684,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
1681
1684
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
1682
1685
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
1683
1686
|
var _context;
|
|
1684
|
-
const mergedOptions = _objectSpread$
|
|
1687
|
+
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$2), options);
|
|
1685
1688
|
const userId = applicationShellConnectors.useApplicationContext(context => context.user?.id);
|
|
1686
1689
|
const scopedStorageKey = _filterInstanceProperty__default["default"](_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
|
|
1687
1690
|
const readFromStorage = React.useCallback(() => {
|
|
@@ -1726,8 +1729,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1726
1729
|
};
|
|
1727
1730
|
var useStorage$1 = useStorage;
|
|
1728
1731
|
|
|
1729
|
-
function ownKeys$
|
|
1730
|
-
function _objectSpread$
|
|
1732
|
+
function ownKeys$1f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1733
|
+
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1731
1734
|
const defaultOptions$1 = {
|
|
1732
1735
|
propName: 'storage',
|
|
1733
1736
|
storageKey: '',
|
|
@@ -1740,7 +1743,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1740
1743
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
1741
1744
|
* argument position does not allow passing specification of option(s).
|
|
1742
1745
|
*/
|
|
1743
|
-
const mergedOptions = _objectSpread$
|
|
1746
|
+
const mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions$1), options);
|
|
1744
1747
|
const WithStorage = props => {
|
|
1745
1748
|
const _useStorage = useStorage$1(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1746
1749
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -1754,7 +1757,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1754
1757
|
readFromStorage
|
|
1755
1758
|
}
|
|
1756
1759
|
};
|
|
1757
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
1760
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1f(_objectSpread$1f({}, props), storageProp));
|
|
1758
1761
|
};
|
|
1759
1762
|
WithStorage.displayName = wrapDisplayName$1(WrappedComponent, 'WithStorage');
|
|
1760
1763
|
return WithStorage;
|
|
@@ -1799,8 +1802,8 @@ function useFormatLocalizedFieldToString() {
|
|
|
1799
1802
|
return formatLocalizedFieldToString;
|
|
1800
1803
|
}
|
|
1801
1804
|
|
|
1802
|
-
function ownKeys$
|
|
1803
|
-
function _objectSpread$
|
|
1805
|
+
function ownKeys$1e(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1806
|
+
function _objectSpread$1e(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1e(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1e(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1804
1807
|
var FetchResourceTypeDuplicatedField = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchResourceTypeDuplicatedField" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipAssociateRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipAttributeGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipChannels" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipDiscountCodes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipInventoryEntries" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipOrders" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipPayments" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRoles" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipAssociateRoles" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "attributeGroups" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipAttributeGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "categories" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipChannels" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "discountCodes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipDiscountCodes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventoryEntries" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipInventoryEntries" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "orders" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipOrders" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "payments" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipPayments" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "products" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 2328, source: { body: "query FetchResourceTypeDuplicatedField(\n $where: String\n $skipAssociateRoles: Boolean!\n $skipAttributeGroups: Boolean!\n $skipBusinessUnits: Boolean!\n $skipCarts: Boolean!\n $skipCartDiscounts: Boolean!\n $skipCategories: Boolean!\n $skipChannels: Boolean!\n $skipCustomers: Boolean!\n $skipCustomerGroups: Boolean!\n $skipDiscountCodes: Boolean!\n $skipInventoryEntries: Boolean!\n $skipOrders: Boolean!\n $skipPayments: Boolean!\n $skipProducts: Boolean!\n $skipProductDiscounts: Boolean!\n $skipProductSelections: Boolean!\n $skipProductTypes: Boolean!\n $skipShippingMethods: Boolean!\n $skipShoppingLists: Boolean!\n $skipStores: Boolean!\n $skipTaxCategories: Boolean!\n $skipZones: Boolean!\n) {\n associateRoles(where: $where) @skip(if: $skipAssociateRoles) {\n total\n }\n attributeGroups(where: $where) @skip(if: $skipAttributeGroups) {\n total\n }\n businessUnits(where: $where) @skip(if: $skipBusinessUnits) {\n total\n }\n carts(where: $where) @skip(if: $skipCarts) {\n total\n }\n cartDiscounts(where: $where) @skip(if: $skipCartDiscounts) {\n total\n }\n categories(where: $where) @skip(if: $skipCategories) {\n total\n }\n channels(where: $where) @skip(if: $skipChannels) {\n total\n }\n customers(where: $where) @skip(if: $skipCustomers) {\n total\n }\n customerGroups(where: $where) @skip(if: $skipCustomerGroups) {\n total\n }\n discountCodes(where: $where) @skip(if: $skipDiscountCodes) {\n total\n }\n inventoryEntries(where: $where) @skip(if: $skipInventoryEntries) {\n total\n }\n orders(where: $where) @skip(if: $skipOrders) {\n total\n }\n payments(where: $where) @skip(if: $skipPayments) {\n total\n }\n products(where: $where) @skip(if: $skipProducts) {\n total\n }\n productDiscounts(where: $where) @skip(if: $skipProductDiscounts) {\n total\n }\n productSelections(where: $where) @skip(if: $skipProductSelections) {\n total\n }\n productTypes(where: $where) @skip(if: $skipProductTypes) {\n total\n }\n shippingMethods(where: $where) @skip(if: $skipShippingMethods) {\n total\n }\n shoppingLists(where: $where) @skip(if: $skipShoppingLists) {\n total\n }\n stores(where: $where) @skip(if: $skipStores) {\n total\n }\n taxCategories(where: $where) @skip(if: $skipTaxCategories) {\n total\n }\n zones(where: $where) @skip(if: $skipZones) {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1805
1808
|
const MC_RESOURCES_WITH_KEYS = {
|
|
1806
1809
|
ASSOCIATE_ROLE: 'ASSOCIATE_ROLE',
|
|
@@ -1875,7 +1878,7 @@ const DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES = {
|
|
|
1875
1878
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES.ZONE]: true
|
|
1876
1879
|
};
|
|
1877
1880
|
const getSkipVariables = resourceType => {
|
|
1878
|
-
return _objectSpread$
|
|
1881
|
+
return _objectSpread$1e(_objectSpread$1e({}, DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES), {}, {
|
|
1879
1882
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES[resourceType]]: false
|
|
1880
1883
|
});
|
|
1881
1884
|
};
|
|
@@ -1900,7 +1903,7 @@ const getQueryVariables = _ref2 => {
|
|
|
1900
1903
|
fieldValue,
|
|
1901
1904
|
id
|
|
1902
1905
|
});
|
|
1903
|
-
return _objectSpread$
|
|
1906
|
+
return _objectSpread$1e({
|
|
1904
1907
|
where
|
|
1905
1908
|
}, skipVariables);
|
|
1906
1909
|
};
|
|
@@ -1934,8 +1937,8 @@ const usePrevious = value => {
|
|
|
1934
1937
|
};
|
|
1935
1938
|
var usePrevious$1 = usePrevious;
|
|
1936
1939
|
|
|
1937
|
-
function ownKeys$
|
|
1938
|
-
function _objectSpread$
|
|
1940
|
+
function ownKeys$1d(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1941
|
+
function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$1d(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$1d(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1939
1942
|
var FetchStoresQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sort" } }, type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "Variable", name: { kind: "Name", value: "sort" } } }, { 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: "count" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "offset" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "StoreBasicInfo" }, directives: [] }, { kind: "Field", name: { kind: "Name", value: "countries" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "languages" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }] }, { kind: "Field", name: { kind: "Name", value: "distributionChannelsRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "distributionChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], 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: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "supplyChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], 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: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "StoreBasicInfo" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Store" } }, 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: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 1089, source: { body: "#import '../../utils/graphql/fragments/store-basic-info.ctp.graphql'\n\nquery FetchStoresQuery(\n $limit: Int\n $offset: Int\n $sort: [String!]\n $where: String\n $excludeExtendedStoresList: Boolean!\n $excludeProductSelections: Boolean!\n) {\n stores(limit: $limit, offset: $offset, sort: $sort, where: $where) {\n total\n count\n offset\n results {\n ...StoreBasicInfo\n countries {\n code\n }\n languages @skip(if: $excludeExtendedStoresList)\n distributionChannelsRef {\n id\n }\n distributionChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n supplyChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n mode\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1940
1943
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
1941
1944
|
var _context, _context2;
|
|
@@ -1946,7 +1949,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
1946
1949
|
offset: storesQueryResult.offset,
|
|
1947
1950
|
results: ((_context = storesQueryResult.results) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(store => {
|
|
1948
1951
|
var _context3, _context4;
|
|
1949
|
-
return _objectSpread$
|
|
1952
|
+
return _objectSpread$1d(_objectSpread$1d({}, store), {}, {
|
|
1950
1953
|
productSelections: ((_context3 = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _filterInstanceProperty__default["default"](_context3), _context3))?.(productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
1951
1954
|
});
|
|
1952
1955
|
})
|
|
@@ -1954,7 +1957,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
1954
1957
|
};
|
|
1955
1958
|
const createQueryVariables$6 = ownProps => {
|
|
1956
1959
|
var _context5;
|
|
1957
|
-
return _objectSpread$
|
|
1960
|
+
return _objectSpread$1d(_objectSpread$1d({
|
|
1958
1961
|
limit: ownProps.limit,
|
|
1959
1962
|
offset: ownProps.offset,
|
|
1960
1963
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2034,8 +2037,8 @@ const useStoreKeysInDataFences = _ref => {
|
|
|
2034
2037
|
};
|
|
2035
2038
|
var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
|
|
2036
2039
|
|
|
2037
|
-
function ownKeys$
|
|
2038
|
-
function _objectSpread$
|
|
2040
|
+
function ownKeys$1c(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2041
|
+
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__default["default"](_context = ownKeys$1c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2039
2042
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2040
2043
|
const defaultOptions = {
|
|
2041
2044
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2063,7 +2066,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2063
2066
|
};
|
|
2064
2067
|
const usePersistedReminder = function () {
|
|
2065
2068
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2066
|
-
const mergedOptions = _objectSpread$
|
|
2069
|
+
const mergedOptions = _objectSpread$1c(_objectSpread$1c({}, defaultOptions), options);
|
|
2067
2070
|
const _useStorage = useStorage$1(mergedOptions.storageKey, null),
|
|
2068
2071
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2069
2072
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2128,8 +2131,8 @@ var messages$N = reactIntl.defineMessages({
|
|
|
2128
2131
|
}
|
|
2129
2132
|
});
|
|
2130
2133
|
|
|
2131
|
-
function ownKeys$
|
|
2132
|
-
function _objectSpread$
|
|
2134
|
+
function ownKeys$1b(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2135
|
+
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__default["default"](_context = ownKeys$1b(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1b(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2133
2136
|
const LinkToProfile = props => {
|
|
2134
2137
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2135
2138
|
to: "/account/profile",
|
|
@@ -2149,7 +2152,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2149
2152
|
isBold: true,
|
|
2150
2153
|
intlMessage: messages$N.profileUpdated
|
|
2151
2154
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2152
|
-
intlMessage: _objectSpread$
|
|
2155
|
+
intlMessage: _objectSpread$1b(_objectSpread$1b({}, messages$N.addMoreInformation), {}, {
|
|
2153
2156
|
values: {
|
|
2154
2157
|
newline: getNewLine
|
|
2155
2158
|
}
|
|
@@ -2158,7 +2161,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2158
2161
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2159
2162
|
scale: "xs",
|
|
2160
2163
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2161
|
-
intlMessage: _objectSpread$
|
|
2164
|
+
intlMessage: _objectSpread$1b(_objectSpread$1b({}, messages$N.informationAndProfileLink), {}, {
|
|
2162
2165
|
values: {
|
|
2163
2166
|
newline: getNewLine,
|
|
2164
2167
|
link: getLinkToProfile
|
|
@@ -2324,8 +2327,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2324
2327
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2325
2328
|
var useDebouncedPromiseCallback$1 = useDebouncedPromiseCallback;
|
|
2326
2329
|
|
|
2327
|
-
function ownKeys$
|
|
2328
|
-
function _objectSpread$
|
|
2330
|
+
function ownKeys$1a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2331
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1a(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2329
2332
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2330
2333
|
const updatedColumnProps = {};
|
|
2331
2334
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2345,14 +2348,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2345
2348
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2346
2349
|
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](cachedVisibleTableConfiguration).call(cachedVisibleTableConfiguration, cachedColumn => _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedColumn.key))).call(_context, cachedConfig => {
|
|
2347
2350
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2348
|
-
return _objectSpread$
|
|
2351
|
+
return _objectSpread$1a(_objectSpread$1a({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2349
2352
|
});
|
|
2350
2353
|
};
|
|
2351
2354
|
const handleCacheUpdate = _ref2 => {
|
|
2352
2355
|
let update = _ref2.update,
|
|
2353
2356
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2354
2357
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2355
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2358
|
+
return updateCachedTableConfiguration(_objectSpread$1a(_objectSpread$1a({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2356
2359
|
};
|
|
2357
2360
|
|
|
2358
2361
|
// Signature:
|
|
@@ -2381,7 +2384,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2381
2384
|
return {
|
|
2382
2385
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2383
2386
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2384
|
-
return _objectSpread$
|
|
2387
|
+
return _objectSpread$1a({
|
|
2385
2388
|
key: visibleColumnKey
|
|
2386
2389
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2387
2390
|
}),
|
|
@@ -2444,14 +2447,14 @@ const useProductSelectionsTotalFetcher = props => {
|
|
|
2444
2447
|
};
|
|
2445
2448
|
var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
|
|
2446
2449
|
|
|
2447
|
-
function ownKeys$
|
|
2448
|
-
function _objectSpread$
|
|
2450
|
+
function ownKeys$19(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2451
|
+
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__default["default"](_context2 = ownKeys$19(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$19(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2449
2452
|
|
|
2450
2453
|
// eslint-disable-next-line import/prefer-default-export
|
|
2451
2454
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2452
2455
|
var _context;
|
|
2453
|
-
return productSelections?.results && _objectSpread$
|
|
2454
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2456
|
+
return productSelections?.results && _objectSpread$19(_objectSpread$19({}, productSelections), {}, {
|
|
2457
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$19({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2455
2458
|
from: 'nameAllLocales',
|
|
2456
2459
|
to: 'name'
|
|
2457
2460
|
}])))
|
|
@@ -3936,8 +3939,8 @@ const getData = (code, field) => {
|
|
|
3936
3939
|
};
|
|
3937
3940
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
3938
3941
|
|
|
3939
|
-
function ownKeys$
|
|
3940
|
-
function _objectSpread$
|
|
3942
|
+
function ownKeys$18(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3943
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$18(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$18(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3941
3944
|
function formatMoneyRangeValue(value, intl) {
|
|
3942
3945
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
3943
3946
|
if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
|
|
@@ -3947,7 +3950,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
3947
3950
|
return '';
|
|
3948
3951
|
}
|
|
3949
3952
|
function formatMoneyValue(amount, currency, intl) {
|
|
3950
|
-
return formatMoney$2(_objectSpread$
|
|
3953
|
+
return formatMoney$2(_objectSpread$18({
|
|
3951
3954
|
centAmount: amount,
|
|
3952
3955
|
fractionDigits: getFractionDigit(currency)
|
|
3953
3956
|
}, currency ? {
|
|
@@ -3963,7 +3966,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
3963
3966
|
return amount / 10 ** fractionDigits;
|
|
3964
3967
|
}
|
|
3965
3968
|
function formatMoney$2(moneyValue, intl, options) {
|
|
3966
|
-
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$
|
|
3969
|
+
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$18({
|
|
3967
3970
|
style: 'currency',
|
|
3968
3971
|
currency: moneyValue.currencyCode,
|
|
3969
3972
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -4213,9 +4216,9 @@ const getPrefixSearchBounds = input => {
|
|
|
4213
4216
|
};
|
|
4214
4217
|
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4215
4218
|
|
|
4216
|
-
const _excluded$
|
|
4217
|
-
function ownKeys$
|
|
4218
|
-
function _objectSpread$
|
|
4219
|
+
const _excluded$f = ["action"];
|
|
4220
|
+
function ownKeys$17(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4221
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var _context0, _context1; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context0 = ownKeys$17(Object(t), !0)).call(_context0, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context1 = ownKeys$17(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4219
4222
|
|
|
4220
4223
|
/**
|
|
4221
4224
|
* Checks if a value is a LocalizedString
|
|
@@ -4237,7 +4240,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4237
4240
|
*/
|
|
4238
4241
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4239
4242
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4240
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$
|
|
4243
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$17(_objectSpread$17({}, customFields), {}, {
|
|
4241
4244
|
[customField.name]: customField.value
|
|
4242
4245
|
}), {});
|
|
4243
4246
|
};
|
|
@@ -4261,7 +4264,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4261
4264
|
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4262
4265
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4263
4266
|
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4264
|
-
return _objectSpread$
|
|
4267
|
+
return _objectSpread$17(_objectSpread$17(_objectSpread$17({}, transformedData), parent ? {
|
|
4265
4268
|
parent
|
|
4266
4269
|
} : {}), ancestors ? {
|
|
4267
4270
|
ancestors
|
|
@@ -4354,7 +4357,7 @@ const formatMoney = valueType => money => {
|
|
|
4354
4357
|
case 'fixed':
|
|
4355
4358
|
case 'fixedCart':
|
|
4356
4359
|
return {
|
|
4357
|
-
[money.type]: _objectSpread$
|
|
4360
|
+
[money.type]: _objectSpread$17({
|
|
4358
4361
|
centAmount: money.centAmount,
|
|
4359
4362
|
currencyCode: money.currencyCode
|
|
4360
4363
|
}, money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4535,7 +4538,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4535
4538
|
case 'addAttributeDefinition':
|
|
4536
4539
|
return {
|
|
4537
4540
|
[actionName]: {
|
|
4538
|
-
attributeDefinition: _objectSpread$
|
|
4541
|
+
attributeDefinition: _objectSpread$17(_objectSpread$17({}, actionPayload.attribute), {}, {
|
|
4539
4542
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4540
4543
|
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4541
4544
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4631,7 +4634,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4631
4634
|
return {
|
|
4632
4635
|
[actionName]: {
|
|
4633
4636
|
attributeName: actionPayload.attributeName,
|
|
4634
|
-
value: _objectSpread$
|
|
4637
|
+
value: _objectSpread$17(_objectSpread$17({}, actionPayload.value), {}, {
|
|
4635
4638
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4636
4639
|
})
|
|
4637
4640
|
}
|
|
@@ -4640,7 +4643,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4640
4643
|
return {
|
|
4641
4644
|
[actionName]: {
|
|
4642
4645
|
attributeName: actionPayload.attributeName,
|
|
4643
|
-
newValue: _objectSpread$
|
|
4646
|
+
newValue: _objectSpread$17(_objectSpread$17({}, actionPayload.newValue), {}, {
|
|
4644
4647
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4645
4648
|
})
|
|
4646
4649
|
}
|
|
@@ -4667,7 +4670,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4667
4670
|
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4668
4671
|
taxCategory: actionPayload.taxCategory,
|
|
4669
4672
|
money: {
|
|
4670
|
-
[actionPayload.money.type]: _objectSpread$
|
|
4673
|
+
[actionPayload.money.type]: _objectSpread$17({
|
|
4671
4674
|
centAmount: actionPayload.money.centAmount,
|
|
4672
4675
|
currencyCode: actionPayload.money.currencyCode
|
|
4673
4676
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4695,7 +4698,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4695
4698
|
return {
|
|
4696
4699
|
[actionName]: {
|
|
4697
4700
|
target: {
|
|
4698
|
-
[actionPayload.target.type]: _objectSpread$
|
|
4701
|
+
[actionPayload.target.type]: _objectSpread$17(_objectSpread$17(_objectSpread$17({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
|
|
4699
4702
|
triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
|
|
4700
4703
|
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
4701
4704
|
}))
|
|
@@ -4730,8 +4733,8 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4730
4733
|
fields: customFields
|
|
4731
4734
|
} : null;
|
|
4732
4735
|
return {
|
|
4733
|
-
[actionName]: _objectSpread$
|
|
4734
|
-
address: _objectSpread$
|
|
4736
|
+
[actionName]: _objectSpread$17(_objectSpread$17({}, actionPayload), {}, {
|
|
4737
|
+
address: _objectSpread$17(_objectSpread$17({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4735
4738
|
custom
|
|
4736
4739
|
})
|
|
4737
4740
|
})
|
|
@@ -4773,7 +4776,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4773
4776
|
};
|
|
4774
4777
|
const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
|
|
4775
4778
|
let actionName = _ref9.action,
|
|
4776
|
-
actionPayload = _objectWithoutProperties(_ref9, _excluded$
|
|
4779
|
+
actionPayload = _objectWithoutProperties(_ref9, _excluded$f);
|
|
4777
4780
|
return [...previousActions, convertAction(actionName, actionPayload)];
|
|
4778
4781
|
}, []);
|
|
4779
4782
|
const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
@@ -4839,8 +4842,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4839
4842
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
4840
4843
|
}
|
|
4841
4844
|
|
|
4842
|
-
function ownKeys$
|
|
4843
|
-
function _objectSpread$
|
|
4845
|
+
function ownKeys$16(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4846
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$16(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$16(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4844
4847
|
function getPriceChannelName(price) {
|
|
4845
4848
|
return price.channel?.name ?? price.channel?.key ?? null;
|
|
4846
4849
|
}
|
|
@@ -4852,11 +4855,11 @@ function getDiscountValue(price) {
|
|
|
4852
4855
|
} else if (price.value?.type === PRECISION_TYPES.highPrecision && price.discounted?.value?.type === PRECISION_TYPES.centPrecision) {
|
|
4853
4856
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4854
4857
|
}
|
|
4855
|
-
return price.discounted ? _objectSpread$
|
|
4858
|
+
return price.discounted ? _objectSpread$16(_objectSpread$16({}, price.value), {}, {
|
|
4856
4859
|
fractionedAmount,
|
|
4857
4860
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4858
4861
|
preciseAmount
|
|
4859
|
-
}) : _objectSpread$
|
|
4862
|
+
}) : _objectSpread$16(_objectSpread$16({}, price.value), {}, {
|
|
4860
4863
|
centAmount: 0
|
|
4861
4864
|
});
|
|
4862
4865
|
}
|
|
@@ -4887,7 +4890,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4887
4890
|
}
|
|
4888
4891
|
let preciseAmount;
|
|
4889
4892
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
|
|
4890
|
-
return _objectSpread$
|
|
4893
|
+
return _objectSpread$16(_objectSpread$16({}, price.value), {}, {
|
|
4891
4894
|
centAmount,
|
|
4892
4895
|
preciseAmount
|
|
4893
4896
|
});
|
|
@@ -4903,7 +4906,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4903
4906
|
}
|
|
4904
4907
|
let preciseAmount;
|
|
4905
4908
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
4906
|
-
return _objectSpread$
|
|
4909
|
+
return _objectSpread$16(_objectSpread$16({}, price.value), {}, {
|
|
4907
4910
|
centAmount,
|
|
4908
4911
|
preciseAmount
|
|
4909
4912
|
});
|
|
@@ -4915,7 +4918,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4915
4918
|
const currencyCode = price.value.currencyCode;
|
|
4916
4919
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4917
4920
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
4918
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$
|
|
4921
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$16(_objectSpread$16({}, minPrices), {}, {
|
|
4919
4922
|
[currencyCode]: price.value
|
|
4920
4923
|
});
|
|
4921
4924
|
}
|
|
@@ -4924,8 +4927,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4924
4927
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
4925
4928
|
}
|
|
4926
4929
|
|
|
4927
|
-
function ownKeys$
|
|
4928
|
-
function _objectSpread$
|
|
4930
|
+
function ownKeys$15(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4931
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$15(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$15(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4929
4932
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4930
4933
|
var _context, _context4;
|
|
4931
4934
|
return {
|
|
@@ -4940,14 +4943,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4940
4943
|
return {
|
|
4941
4944
|
name: fieldDefinition.name,
|
|
4942
4945
|
required: fieldDefinition.required,
|
|
4943
|
-
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4944
|
-
elementType: _objectSpread$
|
|
4946
|
+
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$15(_objectSpread$15({}, fieldDefinition.type), {}, {
|
|
4947
|
+
elementType: _objectSpread$15(_objectSpread$15({}, fieldDefinition.type.elementType), {}, {
|
|
4945
4948
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4946
4949
|
key: value.key,
|
|
4947
4950
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4948
4951
|
}))
|
|
4949
4952
|
})
|
|
4950
|
-
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4953
|
+
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$15(_objectSpread$15({}, fieldDefinition.type), {}, {
|
|
4951
4954
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
4952
4955
|
key: value.key,
|
|
4953
4956
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -4958,7 +4961,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4958
4961
|
})
|
|
4959
4962
|
}
|
|
4960
4963
|
},
|
|
4961
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
4964
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$15(_objectSpread$15({}, fields), {}, {
|
|
4962
4965
|
[customField.name]: customField.value
|
|
4963
4966
|
}), {})
|
|
4964
4967
|
};
|
|
@@ -4970,7 +4973,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
4970
4973
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
4971
4974
|
// in either case we return null
|
|
4972
4975
|
if (!productSelection) return null;
|
|
4973
|
-
return _objectSpread$
|
|
4976
|
+
return _objectSpread$15(_objectSpread$15({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
4974
4977
|
from: 'nameAllLocales',
|
|
4975
4978
|
to: 'name'
|
|
4976
4979
|
}])), {}, {
|
|
@@ -4993,8 +4996,8 @@ const transformAllToProperNounCase = text => {
|
|
|
4993
4996
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
4994
4997
|
};
|
|
4995
4998
|
|
|
4996
|
-
function ownKeys$
|
|
4997
|
-
function _objectSpread$
|
|
4999
|
+
function ownKeys$14(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5000
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$14(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$14(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4998
5001
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
4999
5002
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
5000
5003
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -5011,7 +5014,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
5011
5014
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
5012
5015
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
5013
5016
|
const definitionName = definition.type.elementType.name;
|
|
5014
|
-
return _objectSpread$
|
|
5017
|
+
return _objectSpread$14(_objectSpread$14({}, updateAction), {}, {
|
|
5015
5018
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
5016
5019
|
});
|
|
5017
5020
|
}
|
|
@@ -5514,8 +5517,8 @@ const messages$I = reactIntl.defineMessages({
|
|
|
5514
5517
|
});
|
|
5515
5518
|
var messages$J = messages$I;
|
|
5516
5519
|
|
|
5517
|
-
function ownKeys$
|
|
5518
|
-
function _objectSpread$
|
|
5520
|
+
function ownKeys$13(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5521
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$13(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$13(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5519
5522
|
function Option$1(props) {
|
|
5520
5523
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5521
5524
|
language: applicationContext.dataLocale,
|
|
@@ -5526,7 +5529,7 @@ function Option$1(props) {
|
|
|
5526
5529
|
const _useIntl = reactIntl.useIntl(),
|
|
5527
5530
|
formatMessage = _useIntl.formatMessage;
|
|
5528
5531
|
const cartDiscount = props.data;
|
|
5529
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5532
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$13(_objectSpread$13({}, props), {}, {
|
|
5530
5533
|
children: jsxRuntime.jsxs("div", {
|
|
5531
5534
|
"data-testid": "cart-discount-option",
|
|
5532
5535
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -5543,8 +5546,8 @@ function Option$1(props) {
|
|
|
5543
5546
|
}));
|
|
5544
5547
|
}
|
|
5545
5548
|
|
|
5546
|
-
function ownKeys$
|
|
5547
|
-
function _objectSpread$
|
|
5549
|
+
function ownKeys$12(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5550
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$12(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$12(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5548
5551
|
var CartDiscountsCount$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 425, source: { body: "query SearchCartDiscount($where: String) {\n cartDiscounts(limit: 500, where: $where) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n\nquery FetchCartDiscountById($cartDiscountId: String!) {\n cartDiscount(id: $cartDiscountId) {\n id\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
5549
5552
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
5550
5553
|
const filterOption$1 = (option, text) => {
|
|
@@ -5570,7 +5573,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5570
5573
|
})),
|
|
5571
5574
|
language = _useApplicationContex.language,
|
|
5572
5575
|
languages = _useApplicationContex.languages;
|
|
5573
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
5576
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$12(_objectSpread$12({}, cartDiscount), {}, {
|
|
5574
5577
|
value: cartDiscount.id,
|
|
5575
5578
|
key: cartDiscount.key,
|
|
5576
5579
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -5660,8 +5663,8 @@ const messages$G = reactIntl.defineMessages({
|
|
|
5660
5663
|
});
|
|
5661
5664
|
var messages$H = messages$G;
|
|
5662
5665
|
|
|
5663
|
-
function ownKeys
|
|
5664
|
-
function _objectSpread
|
|
5666
|
+
function ownKeys$11(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5667
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5665
5668
|
function Option(props) {
|
|
5666
5669
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5667
5670
|
language: applicationContext.dataLocale,
|
|
@@ -5672,7 +5675,7 @@ function Option(props) {
|
|
|
5672
5675
|
const _useIntl = reactIntl.useIntl(),
|
|
5673
5676
|
formatMessage = _useIntl.formatMessage;
|
|
5674
5677
|
const category = props.data;
|
|
5675
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread
|
|
5678
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$11(_objectSpread$11({}, props), {}, {
|
|
5676
5679
|
children: jsxRuntime.jsxs("div", {
|
|
5677
5680
|
"data-testid": "category-option",
|
|
5678
5681
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5701,8 +5704,8 @@ function Option(props) {
|
|
|
5701
5704
|
}));
|
|
5702
5705
|
}
|
|
5703
5706
|
|
|
5704
|
-
function ownKeys$
|
|
5705
|
-
function _objectSpread$
|
|
5707
|
+
function ownKeys$10(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5708
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$10(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$10(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5706
5709
|
const filterOption = () => true;
|
|
5707
5710
|
function CategoryReferenceSearch(props) {
|
|
5708
5711
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -5714,7 +5717,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5714
5717
|
})),
|
|
5715
5718
|
language = _useApplicationContex.language,
|
|
5716
5719
|
languages = _useApplicationContex.languages;
|
|
5717
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
5720
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$10(_objectSpread$10({}, category), {}, {
|
|
5718
5721
|
value: category.id,
|
|
5719
5722
|
label: l10n.formatLocalizedString(category, {
|
|
5720
5723
|
key: 'name',
|
|
@@ -5732,7 +5735,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5732
5735
|
}), [apolloClient]);
|
|
5733
5736
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
5734
5737
|
id: props.id,
|
|
5735
|
-
components: _objectSpread$
|
|
5738
|
+
components: _objectSpread$10({
|
|
5736
5739
|
Option
|
|
5737
5740
|
}, props.components),
|
|
5738
5741
|
isClearable: props.isClearable,
|
|
@@ -5771,9 +5774,9 @@ function useCachedCategoryOptions(ids) {
|
|
|
5771
5774
|
}]));
|
|
5772
5775
|
}
|
|
5773
5776
|
|
|
5774
|
-
const _excluded$
|
|
5775
|
-
function ownKeys
|
|
5776
|
-
function _objectSpread
|
|
5777
|
+
const _excluded$e = ["type"];
|
|
5778
|
+
function ownKeys$$(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5779
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5777
5780
|
var styles$g = {
|
|
5778
5781
|
"button": "button-module__button___1OzVf",
|
|
5779
5782
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
@@ -5802,7 +5805,7 @@ var styles$g = {
|
|
|
5802
5805
|
const Button = _ref => {
|
|
5803
5806
|
let _ref$type = _ref.type,
|
|
5804
5807
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
5805
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5808
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
5806
5809
|
const className = props.className,
|
|
5807
5810
|
onClick = props.onClick,
|
|
5808
5811
|
isDisabled = props.isDisabled,
|
|
@@ -5810,7 +5813,7 @@ const Button = _ref => {
|
|
|
5810
5813
|
|
|
5811
5814
|
// Pass only `data-*` props
|
|
5812
5815
|
const dataProps = filterDataAttributes(props);
|
|
5813
|
-
return jsxRuntime.jsx("button", _objectSpread
|
|
5816
|
+
return jsxRuntime.jsx("button", _objectSpread$$(_objectSpread$$({
|
|
5814
5817
|
onClick: isDisabled ? null : onClick,
|
|
5815
5818
|
type: type,
|
|
5816
5819
|
className: classnames__default["default"](styles$g.button, isDisabled ? styles$g.disabled : null, className),
|
|
@@ -5831,21 +5834,21 @@ var messages$F = reactIntl.defineMessages({
|
|
|
5831
5834
|
}
|
|
5832
5835
|
});
|
|
5833
5836
|
|
|
5834
|
-
const _excluded$
|
|
5835
|
-
function ownKeys$
|
|
5836
|
-
function _objectSpread$
|
|
5837
|
+
const _excluded$d = ["children", "allowMultiple", "acceptTypes"];
|
|
5838
|
+
function ownKeys$_(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5839
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$_(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$_(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5837
5840
|
var styles$f = {
|
|
5838
5841
|
"button": "file-input-module__button___2KypN",
|
|
5839
5842
|
"input": "file-input-module__input___3MP4D"
|
|
5840
5843
|
};
|
|
5841
5844
|
const FileInput = _ref => {
|
|
5842
5845
|
let _ref$children = _ref.children,
|
|
5843
|
-
children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
5846
|
+
children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$_({}, messages$F.chooseFile)) : _ref$children,
|
|
5844
5847
|
_ref$allowMultiple = _ref.allowMultiple,
|
|
5845
5848
|
allowMultiple = _ref$allowMultiple === void 0 ? false : _ref$allowMultiple,
|
|
5846
5849
|
_ref$acceptTypes = _ref.acceptTypes,
|
|
5847
5850
|
acceptTypes = _ref$acceptTypes === void 0 ? 'image/png,image/jpeg,image/gif' : _ref$acceptTypes,
|
|
5848
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5851
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
5849
5852
|
return jsxRuntime.jsx("label", {
|
|
5850
5853
|
children: jsxRuntime.jsxs("span", {
|
|
5851
5854
|
className: styles$f.button,
|
|
@@ -5863,6 +5866,215 @@ const FileInput = _ref => {
|
|
|
5863
5866
|
FileInput.displayName = 'FileInput';
|
|
5864
5867
|
var FileInput$1 = FileInput;
|
|
5865
5868
|
|
|
5869
|
+
// Start with a button "css reset"
|
|
5870
|
+
const baseButtonStyles = {
|
|
5871
|
+
name: "it1691",
|
|
5872
|
+
styles: "color:inherit;padding:0;font:inherit;cursor:pointer;outline:inherit;border:none;background:none"
|
|
5873
|
+
} ;
|
|
5874
|
+
|
|
5875
|
+
const _excluded$c = ["animationOrientation", "children", "onClick"];
|
|
5876
|
+
function ownKeys$Z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5877
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5878
|
+
const ICON_COLOR$1 = '#6359ff';
|
|
5879
|
+
const PaginationIconButton = _ref => {
|
|
5880
|
+
let animationOrientation = _ref.animationOrientation,
|
|
5881
|
+
children = _ref.children,
|
|
5882
|
+
onClick = _ref.onClick,
|
|
5883
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
5884
|
+
return jsxRuntime.jsx("button", _objectSpread$Z(_objectSpread$Z({
|
|
5885
|
+
css: [baseButtonStyles, /*#__PURE__*/react$1.css("svg{fill:", ICON_COLOR$1, ";}transition:transform ", uiKit.designTokens.transitionStandard, ";:hover{transform:translateX(\n ", animationOrientation === 'left' ? `calc(0px - var(--spacing-10))` : `var(--spacing-10)`, "\n );}padding-left:1px;padding-right:1px;:focus{border:1px solid ", ICON_COLOR$1, ";border-radius:", uiKit.designTokens.borderRadius1, ";padding-left:0px;padding-right:0px;}" + ("" ), "" ), "" , "" ],
|
|
5886
|
+
onClick: onClick
|
|
5887
|
+
}, rest), {}, {
|
|
5888
|
+
children: children
|
|
5889
|
+
}));
|
|
5890
|
+
};
|
|
5891
|
+
var PaginationIconButton$1 = PaginationIconButton;
|
|
5892
|
+
|
|
5893
|
+
const _excluded$b = ["isFilled", "onClick"];
|
|
5894
|
+
function ownKeys$Y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5895
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5896
|
+
const ICON_HEIGHT = '10px';
|
|
5897
|
+
const ICON_WIDTH = ICON_HEIGHT;
|
|
5898
|
+
// TODO: Integrate design tokens when redesign is complete
|
|
5899
|
+
const ICON_COLOR = '#6359FF';
|
|
5900
|
+
const ICON_HOVER_COLOR = '#B1ACFF';
|
|
5901
|
+
const PaginationSelectionButton = _ref => {
|
|
5902
|
+
let _ref$isFilled = _ref.isFilled,
|
|
5903
|
+
isFilled = _ref$isFilled === void 0 ? false : _ref$isFilled,
|
|
5904
|
+
onClick = _ref.onClick,
|
|
5905
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
5906
|
+
return jsxRuntime.jsx("button", _objectSpread$Y({
|
|
5907
|
+
css: [baseButtonStyles, /*#__PURE__*/react$1.css("height:", ICON_HEIGHT, ";width:", ICON_WIDTH, ";border-radius:", uiKit.designTokens.borderRadius6, ";border:", isFilled ? 'none' : `${uiKit.designTokens.borderWidth1} solid ${uiKit.designTokens.colorNeutral}`, ";background:", isFilled ? ICON_COLOR : 'none', ";transition:", uiKit.designTokens.transitionStandard, ";:hover{background:", isFilled ? undefined : ICON_HOVER_COLOR, ";}:focus{border:", uiKit.designTokens.borderWidth1, " solid ", ICON_COLOR, ";}" + ("" ), "" ), "" , "" ],
|
|
5908
|
+
onClick: onClick
|
|
5909
|
+
}, rest));
|
|
5910
|
+
};
|
|
5911
|
+
var PaginationSelectionButton$1 = PaginationSelectionButton;
|
|
5912
|
+
|
|
5913
|
+
const CAROUSEL_WIDTH = 384;
|
|
5914
|
+
const PAGINATION_CONTROL_HEIGHT = 26;
|
|
5915
|
+
const IMAGE_AREA_HEIGHT = 200;
|
|
5916
|
+
const BaseCarousel = _ref2 => {
|
|
5917
|
+
let items = _ref2.items,
|
|
5918
|
+
renderItem = _ref2.renderItem;
|
|
5919
|
+
// Randomize input array and cache across rerenders
|
|
5920
|
+
const _useState = React.useState(shuffle__default["default"](items)),
|
|
5921
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5922
|
+
shuffledItems = _useState2[0],
|
|
5923
|
+
setShuffledItems = _useState2[1];
|
|
5924
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(context => ({
|
|
5925
|
+
projectKey: context.project?.key
|
|
5926
|
+
})),
|
|
5927
|
+
projectKey = _useApplicationContex.projectKey;
|
|
5928
|
+
const handleFilterItemsWhenFlagDisabled = idx => {
|
|
5929
|
+
const newItems = _filterInstanceProperty__default["default"](shuffledItems).call(shuffledItems, (_, idx1) => idx !== idx1);
|
|
5930
|
+
setShuffledItems(newItems);
|
|
5931
|
+
};
|
|
5932
|
+
const _useSnapCarousel = reactSnapCarousel.useSnapCarousel(),
|
|
5933
|
+
scrollRef = _useSnapCarousel.scrollRef,
|
|
5934
|
+
pages = _useSnapCarousel.pages,
|
|
5935
|
+
activePageIndex = _useSnapCarousel.activePageIndex,
|
|
5936
|
+
prev = _useSnapCarousel.prev,
|
|
5937
|
+
next = _useSnapCarousel.next,
|
|
5938
|
+
goTo = _useSnapCarousel.goTo;
|
|
5939
|
+
const handlePrev = () => {
|
|
5940
|
+
if (activePageIndex === 0) {
|
|
5941
|
+
goTo(pages.length - 1);
|
|
5942
|
+
} else {
|
|
5943
|
+
prev();
|
|
5944
|
+
}
|
|
5945
|
+
};
|
|
5946
|
+
const handleNext = () => {
|
|
5947
|
+
if (activePageIndex === pages.length - 1) {
|
|
5948
|
+
goTo(0);
|
|
5949
|
+
} else {
|
|
5950
|
+
next();
|
|
5951
|
+
}
|
|
5952
|
+
};
|
|
5953
|
+
const getLinkTo = activeItem => {
|
|
5954
|
+
return activeItem.isExternal ? activeItem.linkTo() : activeItem.linkTo(projectKey);
|
|
5955
|
+
};
|
|
5956
|
+
|
|
5957
|
+
// Get the current item safely
|
|
5958
|
+
const currentItem = shuffledItems[activePageIndex];
|
|
5959
|
+
|
|
5960
|
+
// Don't render if there's no current item
|
|
5961
|
+
if (!currentItem) {
|
|
5962
|
+
return null;
|
|
5963
|
+
}
|
|
5964
|
+
return jsxRuntime.jsxs("div", {
|
|
5965
|
+
css: /*#__PURE__*/react$1.css("width:", CAROUSEL_WIDTH, "px;position:relative;" + ("" ), "" ),
|
|
5966
|
+
role: "region",
|
|
5967
|
+
"aria-roledescription": "carousel",
|
|
5968
|
+
"aria-label": "rotunda",
|
|
5969
|
+
children: [jsxRuntime.jsx("a", {
|
|
5970
|
+
href: getLinkTo(currentItem),
|
|
5971
|
+
target: currentItem.isExternal ? '_blank' : '_self',
|
|
5972
|
+
rel: "noopener noreferrer",
|
|
5973
|
+
children: jsxRuntime.jsx(uiKit.Card, {
|
|
5974
|
+
insetScale: "none",
|
|
5975
|
+
onClick: () => {},
|
|
5976
|
+
children: jsxRuntime.jsx("div", {
|
|
5977
|
+
css: /*#__PURE__*/react$1.css("position:relative;display:flex;scroll-snap-type:x mandatory;overflow:hidden;margin:0;padding-bottom:", uiKit.designTokens.spacing60, ";" + ("" ), "" ),
|
|
5978
|
+
ref: scrollRef,
|
|
5979
|
+
children: _mapInstanceProperty__default["default"](shuffledItems).call(shuffledItems, (item, idx) => renderItem({
|
|
5980
|
+
item
|
|
5981
|
+
}, handleFilterItemsWhenFlagDisabled, idx))
|
|
5982
|
+
})
|
|
5983
|
+
})
|
|
5984
|
+
}), jsxRuntime.jsx("div", {
|
|
5985
|
+
css: /*#__PURE__*/react$1.css("position:absolute;bottom:", uiKit.designTokens.spacingM, ";left:50%;pointer-events:none;" + ("" ), "" ),
|
|
5986
|
+
children: jsxRuntime.jsx("div", {
|
|
5987
|
+
css: /*#__PURE__*/react$1.css("position:relative;left:-50%;background-color:", uiKit.designTokens.colorSurface, ";pointer-events:auto;height:", PAGINATION_CONTROL_HEIGHT, "px;border-radius:", uiKit.designTokens.borderRadius4, ";padding-left:", uiKit.designTokens.spacing25, ";padding-right:", uiKit.designTokens.spacing25, ";display:flex;align-items:center;" + ("" ), "" ),
|
|
5988
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
5989
|
+
scale: "m",
|
|
5990
|
+
justifyContent: "center",
|
|
5991
|
+
alignItems: "center",
|
|
5992
|
+
children: [jsxRuntime.jsx(PaginationIconButton$1, {
|
|
5993
|
+
animationOrientation: "left",
|
|
5994
|
+
onClick: handlePrev,
|
|
5995
|
+
"aria-label": "go to previous slide",
|
|
5996
|
+
children: jsxRuntime.jsx(uiKit.AngleLeftIcon, {
|
|
5997
|
+
size: "small"
|
|
5998
|
+
})
|
|
5999
|
+
}), _mapInstanceProperty__default["default"](pages).call(pages, (_, i) => jsxRuntime.jsx(PaginationSelectionButton$1, {
|
|
6000
|
+
isFilled: activePageIndex === i,
|
|
6001
|
+
onClick: () => goTo(i),
|
|
6002
|
+
"aria-label": `go to slide ${i + 1}`
|
|
6003
|
+
}, i)), jsxRuntime.jsx(PaginationIconButton$1, {
|
|
6004
|
+
animationOrientation: "right",
|
|
6005
|
+
onClick: handleNext,
|
|
6006
|
+
"aria-label": "go to next slide",
|
|
6007
|
+
children: jsxRuntime.jsx(uiKit.AngleRightIcon, {
|
|
6008
|
+
size: "small"
|
|
6009
|
+
})
|
|
6010
|
+
})]
|
|
6011
|
+
})
|
|
6012
|
+
})
|
|
6013
|
+
})]
|
|
6014
|
+
});
|
|
6015
|
+
};
|
|
6016
|
+
var _ref$2 = {
|
|
6017
|
+
name: "97rk2e",
|
|
6018
|
+
styles: "width:100%;height:100%;flex-shrink:0;scroll-snap-align:start"
|
|
6019
|
+
} ;
|
|
6020
|
+
const CarouselContent = _ref3 => {
|
|
6021
|
+
let item = _ref3.item,
|
|
6022
|
+
handleFilterItemsWhenFlagDisabled = _ref3.handleFilterItemsWhenFlagDisabled,
|
|
6023
|
+
idx = _ref3.idx;
|
|
6024
|
+
const isEnabled = applicationShell.useFeatureToggle(item.flag || '');
|
|
6025
|
+
const intl = reactIntl.useIntl();
|
|
6026
|
+
React.useEffect(() => {
|
|
6027
|
+
if (item.flag && !isEnabled) {
|
|
6028
|
+
handleFilterItemsWhenFlagDisabled(idx);
|
|
6029
|
+
}
|
|
6030
|
+
}, [isEnabled, handleFilterItemsWhenFlagDisabled, idx, item]);
|
|
6031
|
+
if (item.flag && !isEnabled) {
|
|
6032
|
+
return null;
|
|
6033
|
+
}
|
|
6034
|
+
return jsxRuntime.jsx("div", {
|
|
6035
|
+
role: "group",
|
|
6036
|
+
"aria-roledescription": "slide",
|
|
6037
|
+
"aria-label": `slide-${idx + 1}`,
|
|
6038
|
+
css: _ref$2,
|
|
6039
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
6040
|
+
children: [jsxRuntime.jsx("img", {
|
|
6041
|
+
css: /*#__PURE__*/react$1.css("width:100%;height:", IMAGE_AREA_HEIGHT, "px;" + ("" ), "" ),
|
|
6042
|
+
src: item.imgSrc,
|
|
6043
|
+
alt: intl.formatMessage(item.imgAlt)
|
|
6044
|
+
}), jsxRuntime.jsx("div", {
|
|
6045
|
+
css: /*#__PURE__*/react$1.css("padding:0 ", uiKit.designTokens.spacingL, " 0 ", uiKit.designTokens.spacingL, ";" + ("" ), "" ),
|
|
6046
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
6047
|
+
scale: "xs",
|
|
6048
|
+
children: [jsxRuntime.jsx("div", {
|
|
6049
|
+
children: jsxRuntime.jsx(uiKit.Stamp, {
|
|
6050
|
+
tone: item.stampTone,
|
|
6051
|
+
isCondensed: true,
|
|
6052
|
+
label: intl.formatMessage(item.stampLabel)
|
|
6053
|
+
})
|
|
6054
|
+
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6055
|
+
intlMessage: item.textContent
|
|
6056
|
+
})]
|
|
6057
|
+
})
|
|
6058
|
+
})]
|
|
6059
|
+
})
|
|
6060
|
+
});
|
|
6061
|
+
};
|
|
6062
|
+
const Carousel = _ref4 => {
|
|
6063
|
+
let items = _ref4.items;
|
|
6064
|
+
return jsxRuntime.jsx(BaseCarousel, {
|
|
6065
|
+
items: items,
|
|
6066
|
+
renderItem: (_ref5, handleFilterItemsWhenFlagDisabled, idx) => {
|
|
6067
|
+
let item = _ref5.item;
|
|
6068
|
+
return jsxRuntime.jsx(CarouselContent, {
|
|
6069
|
+
handleFilterItemsWhenFlagDisabled: handleFilterItemsWhenFlagDisabled,
|
|
6070
|
+
item: item,
|
|
6071
|
+
idx: idx
|
|
6072
|
+
}, item.id);
|
|
6073
|
+
}
|
|
6074
|
+
});
|
|
6075
|
+
};
|
|
6076
|
+
var Carousel$1 = Carousel;
|
|
6077
|
+
|
|
5866
6078
|
var messages$E = reactIntl.defineMessages({
|
|
5867
6079
|
countriesBasicSelectPlaceholder: {
|
|
5868
6080
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
@@ -14257,6 +14469,7 @@ var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kin
|
|
|
14257
14469
|
exports.BooleanField = booleanField;
|
|
14258
14470
|
exports.Button = Button$1;
|
|
14259
14471
|
exports.CUSTOM_FIELD_TYPES = CUSTOM_FIELD_TYPES;
|
|
14472
|
+
exports.Carousel = Carousel$1;
|
|
14260
14473
|
exports.CartDiscountReferenceSearch = CartDiscountReferenceSearch;
|
|
14261
14474
|
exports.CategoryReferenceSearch = CategoryReferenceSearch;
|
|
14262
14475
|
exports.CategorySearchPickerOptionFragment = CategorySearchPickerOptionFragment;
|