@commercetools-frontend/experimental-components 4.0.0 → 5.0.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.
|
@@ -52,7 +52,6 @@ var PropTypes = require('prop-types');
|
|
|
52
52
|
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
53
53
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
54
54
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
55
|
-
var applicationShell = require('@commercetools-frontend/application-shell');
|
|
56
55
|
var react = require('@apollo/client/react');
|
|
57
56
|
var _lastIndexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/last-index-of');
|
|
58
57
|
var msw = require('msw');
|
|
@@ -60,11 +59,11 @@ var get = require('lodash/get');
|
|
|
60
59
|
var formik = require('formik');
|
|
61
60
|
var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
|
|
62
61
|
var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
|
|
62
|
+
var applicationShell = require('@commercetools-frontend/application-shell');
|
|
63
63
|
var debounce = require('debounce-promise');
|
|
64
64
|
var pick = require('lodash/pick');
|
|
65
65
|
var hooks = require('@apollo/client/react/hooks');
|
|
66
66
|
var moment$1 = require('moment');
|
|
67
|
-
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
68
67
|
var classnames = require('classnames');
|
|
69
68
|
require('react-required-if');
|
|
70
69
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
@@ -120,8 +119,6 @@ var compact = require('lodash/compact');
|
|
|
120
119
|
var _Set = require('@babel/runtime-corejs3/core-js-stable/set');
|
|
121
120
|
require('@babel/runtime-corejs3/helpers/get');
|
|
122
121
|
var _spliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/splice');
|
|
123
|
-
var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
|
|
124
|
-
var reactRouterDom = require('react-router-dom');
|
|
125
122
|
|
|
126
123
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
127
124
|
|
|
@@ -163,7 +160,6 @@ var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
|
|
|
163
160
|
var debounce__default = /*#__PURE__*/_interopDefault(debounce);
|
|
164
161
|
var pick__default = /*#__PURE__*/_interopDefault(pick);
|
|
165
162
|
var moment__default$1 = /*#__PURE__*/_interopDefault(moment$1);
|
|
166
|
-
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
167
163
|
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
168
164
|
var Textarea__default = /*#__PURE__*/_interopDefault(Textarea);
|
|
169
165
|
var has__default = /*#__PURE__*/_interopDefault(has);
|
|
@@ -202,7 +198,6 @@ var _findIndexInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInde
|
|
|
202
198
|
var compact__default = /*#__PURE__*/_interopDefault(compact);
|
|
203
199
|
var _Set__default = /*#__PURE__*/_interopDefault(_Set);
|
|
204
200
|
var _spliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_spliceInstanceProperty);
|
|
205
|
-
var _URL__default = /*#__PURE__*/_interopDefault(_URL);
|
|
206
201
|
|
|
207
202
|
const QUERY_MAX_LIMIT = 500;
|
|
208
203
|
const SHOW_TOOLTIP_CHARS_COUNT = 40;
|
|
@@ -214,28 +209,6 @@ const SEARCHABLE_REFERENCES = {
|
|
|
214
209
|
productType: 'product-type',
|
|
215
210
|
state: 'state'
|
|
216
211
|
};
|
|
217
|
-
const trackingEvents$5 = {
|
|
218
|
-
showInfoNotification: {
|
|
219
|
-
category: 'Account-Profile',
|
|
220
|
-
action: 'showMyProfileUpdateNotification',
|
|
221
|
-
label: 'Show My Profile Update Notification'
|
|
222
|
-
},
|
|
223
|
-
clickOnInfoNotification: {
|
|
224
|
-
category: 'Account-Profile',
|
|
225
|
-
action: 'openAccountMyProfilePage',
|
|
226
|
-
label: 'Open My Profile Page'
|
|
227
|
-
},
|
|
228
|
-
clickCloseInfoNotification: {
|
|
229
|
-
category: 'Account-Profile',
|
|
230
|
-
action: 'closeInfoNotification',
|
|
231
|
-
label: 'Close Info Notification'
|
|
232
|
-
},
|
|
233
|
-
updateBusinessRoleOnProfilePage: {
|
|
234
|
-
category: 'Account-Profile',
|
|
235
|
-
action: 'updateMyProfilePage',
|
|
236
|
-
label: 'Update My Profile Page'
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
212
|
const BUSINESS_ROLE_NOTIFICATION = 'businessRoleNotification';
|
|
240
213
|
|
|
241
214
|
// The max API limit for one request
|
|
@@ -2218,8 +2191,6 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2218
2191
|
return WithStorage;
|
|
2219
2192
|
};
|
|
2220
2193
|
|
|
2221
|
-
var useTracking = (() => React.useContext(applicationShell.GtmContext));
|
|
2222
|
-
|
|
2223
2194
|
/**
|
|
2224
2195
|
* @returns function with the following parameters
|
|
2225
2196
|
* - {LocalizedStrings} localizedStrings - an array of graphql LocalizedString,
|
|
@@ -2529,10 +2500,7 @@ var messages$M = reactIntl.defineMessages({
|
|
|
2529
2500
|
function ownKeys$1f(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2530
2501
|
function _objectSpread$1f(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1f(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1f(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2531
2502
|
const LinkToProfile = props => {
|
|
2532
|
-
const _useTrackingShared = useTrackingShared(),
|
|
2533
|
-
trackClickOnInfoNotification = _useTrackingShared.trackClickOnInfoNotification;
|
|
2534
2503
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2535
|
-
onClick: trackClickOnInfoNotification,
|
|
2536
2504
|
to: "/account/profile",
|
|
2537
2505
|
children: props.children
|
|
2538
2506
|
});
|
|
@@ -2570,45 +2538,8 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2570
2538
|
});
|
|
2571
2539
|
NotificationText.displayName = 'NotificationText';
|
|
2572
2540
|
|
|
2573
|
-
const forwardHandler = (track, handler) => function () {
|
|
2574
|
-
track();
|
|
2575
|
-
handler(...arguments);
|
|
2576
|
-
};
|
|
2577
|
-
const defaultProcessTrackingEvent = trackingEvent => trackingEvent;
|
|
2578
|
-
const useTrackingHandler = function (trackingEvent) {
|
|
2579
|
-
let processTrackingEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultProcessTrackingEvent;
|
|
2580
|
-
const _useTrackingContext = useTracking(),
|
|
2581
|
-
track = _useTrackingContext.track;
|
|
2582
|
-
return React.useCallback(function () {
|
|
2583
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2584
|
-
args[_key] = arguments[_key];
|
|
2585
|
-
}
|
|
2586
|
-
const _processTrackingEvent = processTrackingEvent(trackingEvent, ...args),
|
|
2587
|
-
action = _processTrackingEvent.action,
|
|
2588
|
-
category = _processTrackingEvent.category,
|
|
2589
|
-
label = _processTrackingEvent.label;
|
|
2590
|
-
track(action, category, label);
|
|
2591
|
-
}, [track, trackingEvent, processTrackingEvent]);
|
|
2592
|
-
};
|
|
2593
|
-
const useTrackingShared = () => {
|
|
2594
|
-
const trackShowInfoNotification = useTrackingHandler(trackingEvents$5.showInfoNotification);
|
|
2595
|
-
const trackClickOnInfoNotification = useTrackingHandler(trackingEvents$5.clickOnInfoNotification);
|
|
2596
|
-
const trackClickCloseInfoNotification = useTrackingHandler(trackingEvents$5.clickCloseInfoNotification);
|
|
2597
|
-
const trackUpdateBusinessRoleOnProfilePage = useTrackingHandler(trackingEvents$5.updateBusinessRoleOnProfilePage);
|
|
2598
|
-
return {
|
|
2599
|
-
trackShowInfoNotification,
|
|
2600
|
-
trackClickOnInfoNotification,
|
|
2601
|
-
trackClickCloseInfoNotification,
|
|
2602
|
-
trackUpdateBusinessRoleOnProfilePage,
|
|
2603
|
-
forwardHandler
|
|
2604
|
-
};
|
|
2605
|
-
};
|
|
2606
|
-
|
|
2607
2541
|
const useRoleNotification = _ref => {
|
|
2608
2542
|
let dismissNotification = _ref.onDismiss;
|
|
2609
|
-
const _useTrackingShared = useTrackingShared(),
|
|
2610
|
-
trackClickCloseInfoNotification = _useTrackingShared.trackClickCloseInfoNotification,
|
|
2611
|
-
forwardHandler = _useTrackingShared.forwardHandler;
|
|
2612
2543
|
const notification = actionsGlobal.useShowNotification({
|
|
2613
2544
|
domain: constants.DOMAINS.SIDE,
|
|
2614
2545
|
kind: 'info'
|
|
@@ -2619,7 +2550,7 @@ const useRoleNotification = _ref => {
|
|
|
2619
2550
|
notification({
|
|
2620
2551
|
text: jsxRuntime.jsx(NotificationText, {})
|
|
2621
2552
|
}, {
|
|
2622
|
-
onDismiss: () =>
|
|
2553
|
+
onDismiss: () => dismissNotification()
|
|
2623
2554
|
});
|
|
2624
2555
|
}
|
|
2625
2556
|
};
|
|
@@ -2632,9 +2563,6 @@ const useRoleNotificationEffect = () => {
|
|
|
2632
2563
|
const storageKey = 'roleExpiry';
|
|
2633
2564
|
const userBusinessRole = user.businessRole;
|
|
2634
2565
|
const scopedStorageKey = [user.id, storageKey].join('/');
|
|
2635
|
-
const _useTrackingShared = useTrackingShared(),
|
|
2636
|
-
trackShowInfoNotification = _useTrackingShared.trackShowInfoNotification,
|
|
2637
|
-
forwardHandler = _useTrackingShared.forwardHandler;
|
|
2638
2566
|
const _usePersistedReminder = usePersistedReminder({
|
|
2639
2567
|
storageKey,
|
|
2640
2568
|
reminderInterval: REMINDER_OPTION_3_DAY
|
|
@@ -2647,7 +2575,6 @@ const useRoleNotificationEffect = () => {
|
|
|
2647
2575
|
onDismiss: scheduleReminder
|
|
2648
2576
|
});
|
|
2649
2577
|
const isFirstTimeUser = !hasChosenReminderRef.current;
|
|
2650
|
-
const openBusinessRoleNotification = () => forwardHandler(trackShowInfoNotification(), roleNotification());
|
|
2651
2578
|
React.useEffect(() => {
|
|
2652
2579
|
/*
|
|
2653
2580
|
If the user does not have a business role,
|
|
@@ -2657,11 +2584,11 @@ const useRoleNotificationEffect = () => {
|
|
|
2657
2584
|
if (isFlopFlipReady) {
|
|
2658
2585
|
// 1. first time user
|
|
2659
2586
|
if (!userBusinessRole && isFirstTimeUser) {
|
|
2660
|
-
|
|
2587
|
+
roleNotification();
|
|
2661
2588
|
}
|
|
2662
2589
|
// 2. returning but not filled business role and has closed notification before
|
|
2663
2590
|
else if (!userBusinessRole && hasReminderExpired) {
|
|
2664
|
-
|
|
2591
|
+
roleNotification();
|
|
2665
2592
|
}
|
|
2666
2593
|
// 3. has filled business role
|
|
2667
2594
|
else if (userBusinessRole) {
|
|
@@ -3068,41 +2995,11 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
3068
2995
|
}
|
|
3069
2996
|
});
|
|
3070
2997
|
|
|
3071
|
-
const trackingEvents$4 = {
|
|
3072
|
-
selectChannelName: {
|
|
3073
|
-
action: 'select',
|
|
3074
|
-
category: 'ReferenceChannel',
|
|
3075
|
-
label: 'name'
|
|
3076
|
-
},
|
|
3077
|
-
selectChannelKey: {
|
|
3078
|
-
action: 'select',
|
|
3079
|
-
category: 'ReferenceChannel',
|
|
3080
|
-
label: 'key'
|
|
3081
|
-
},
|
|
3082
|
-
selectChannelId: {
|
|
3083
|
-
action: 'select',
|
|
3084
|
-
category: 'ReferenceChannel',
|
|
3085
|
-
label: 'id'
|
|
3086
|
-
},
|
|
3087
|
-
selectWithoutTyping: {
|
|
3088
|
-
action: 'select',
|
|
3089
|
-
category: 'ReferenceChannel',
|
|
3090
|
-
label: 'noEntry'
|
|
3091
|
-
}
|
|
3092
|
-
};
|
|
3093
|
-
|
|
3094
2998
|
function ownKeys$1c(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3095
2999
|
function _objectSpread$1c(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1c(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1c(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3096
3000
|
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 } } } };
|
|
3097
3001
|
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 } } } };
|
|
3098
3002
|
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 } } } };
|
|
3099
|
-
const getTrackingEvent$4 = (inputValue, selectedValue) => {
|
|
3100
|
-
const id = selectedValue.value,
|
|
3101
|
-
key = selectedValue.key,
|
|
3102
|
-
name = selectedValue.name;
|
|
3103
|
-
const trackingEvent = !inputValue ? trackingEvents$4.selectWithoutTyping : _startsWithInstanceProperty__default["default"](name).call(name, inputValue) ? trackingEvents$4.selectChannelName : _startsWithInstanceProperty__default["default"](key).call(key, inputValue) ? trackingEvents$4.selectChannelKey : id === inputValue ? trackingEvents$4.selectChannelId : void 0;
|
|
3104
|
-
return trackingEvent;
|
|
3105
|
-
};
|
|
3106
3003
|
const ChannelPickerInput = _ref => {
|
|
3107
3004
|
var _currentOption$data$l, _currentOption$data;
|
|
3108
3005
|
let isClearable = _ref.isClearable,
|
|
@@ -3168,7 +3065,7 @@ const ChannelPickerInput = _ref => {
|
|
|
3168
3065
|
onError(error);
|
|
3169
3066
|
}), [loadOptions, convertChannelToOption, onError]);
|
|
3170
3067
|
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
3171
|
-
const _useHandlers = useHandlers(onChange
|
|
3068
|
+
const _useHandlers = useHandlers(onChange),
|
|
3172
3069
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
3173
3070
|
handleInternalInputChange = _useHandlers2[0],
|
|
3174
3071
|
handleChange = _useHandlers2[1];
|
|
@@ -3551,7 +3448,6 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3551
3448
|
value: function render() {
|
|
3552
3449
|
return jsxRuntime.jsx("div", {
|
|
3553
3450
|
className: classnames__default["default"](this.props.blockClassName, styles$h.block),
|
|
3554
|
-
"data-track-component": "Search",
|
|
3555
3451
|
children: jsxRuntime.jsxs("div", {
|
|
3556
3452
|
className: classnames__default["default"](this.props.containerClassName, styles$h.container),
|
|
3557
3453
|
children: [jsxRuntime.jsx("div", {
|
|
@@ -3568,8 +3464,6 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3568
3464
|
label: this.props.label,
|
|
3569
3465
|
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$J.placeholder),
|
|
3570
3466
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
3571
|
-
"data-track-component": "Text",
|
|
3572
|
-
"data-track-event": "change",
|
|
3573
3467
|
onChange: this.handleInputChange,
|
|
3574
3468
|
onEnter: this.handleEnter,
|
|
3575
3469
|
onBlurValue: this.props.onBlur,
|
|
@@ -3593,8 +3487,6 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3593
3487
|
}),
|
|
3594
3488
|
onClick: this.props.disabled ? null : this.handleSubmit,
|
|
3595
3489
|
label: "search-button",
|
|
3596
|
-
"data-track-component": "Button",
|
|
3597
|
-
"data-track-event": "click",
|
|
3598
3490
|
onMouseOver: this.props.handleMouseOver,
|
|
3599
3491
|
onMouseOut: this.props.handleMouseOut,
|
|
3600
3492
|
children: jsxRuntime.jsx(uiKit.SearchIcon, {
|
|
@@ -3824,9 +3716,7 @@ Option$2.displayName = 'Option';
|
|
|
3824
3716
|
|
|
3825
3717
|
function ownKeys$18(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3826
3718
|
function _objectSpread$18(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$18(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$18(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3827
|
-
const useHandlers =
|
|
3828
|
-
const _useTracking = useTracking(),
|
|
3829
|
-
track = _useTracking.track;
|
|
3719
|
+
const useHandlers = onChange => {
|
|
3830
3720
|
const _useState = React.useState(),
|
|
3831
3721
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3832
3722
|
inputValue = _useState2[0],
|
|
@@ -3836,25 +3726,13 @@ const useHandlers = (onChange, getTrackingEvent) => {
|
|
|
3836
3726
|
}, []);
|
|
3837
3727
|
const handleChange = useEventCallback(event => {
|
|
3838
3728
|
var _event$target$value;
|
|
3839
|
-
const doTrack = () => {
|
|
3840
|
-
const trackingEvent = getTrackingEvent(inputValue, event.target.value);
|
|
3841
|
-
if (trackingEvent) {
|
|
3842
|
-
const action = trackingEvent.action,
|
|
3843
|
-
category = trackingEvent.category,
|
|
3844
|
-
label = trackingEvent.label;
|
|
3845
|
-
track(action, category, label);
|
|
3846
|
-
}
|
|
3847
|
-
};
|
|
3848
|
-
if (event.target.value) {
|
|
3849
|
-
doTrack();
|
|
3850
|
-
}
|
|
3851
3729
|
const eventWithExtractedValue = _objectSpread$18(_objectSpread$18({}, event), {}, {
|
|
3852
3730
|
target: _objectSpread$18(_objectSpread$18({}, event.target), {}, {
|
|
3853
3731
|
value: (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value
|
|
3854
3732
|
})
|
|
3855
3733
|
});
|
|
3856
3734
|
onChange(eventWithExtractedValue);
|
|
3857
|
-
}, [onChange,
|
|
3735
|
+
}, [onChange, inputValue]);
|
|
3858
3736
|
return [handleInputChange, handleChange];
|
|
3859
3737
|
};
|
|
3860
3738
|
|
|
@@ -3969,30 +3847,11 @@ var messages$H = reactIntl.defineMessages({
|
|
|
3969
3847
|
}
|
|
3970
3848
|
});
|
|
3971
3849
|
|
|
3972
|
-
const trackingEvents$3 = {
|
|
3973
|
-
selectProductTypeName: {
|
|
3974
|
-
action: 'select',
|
|
3975
|
-
category: 'ReferenceProductType',
|
|
3976
|
-
label: 'name'
|
|
3977
|
-
},
|
|
3978
|
-
selectProductTypeId: {
|
|
3979
|
-
action: 'select',
|
|
3980
|
-
category: 'ReferenceProductType',
|
|
3981
|
-
label: 'id'
|
|
3982
|
-
}
|
|
3983
|
-
};
|
|
3984
|
-
|
|
3985
3850
|
var GetProductTypeQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetProductTypeQuery" }, 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: "productType" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 212, source: { body: "query GetProductTypesQuery($where: String) {\n productTypes(where: $where) {\n results {\n id\n name\n }\n }\n}\n\nquery GetProductTypeQuery($id: String) {\n productType(id: $id) {\n id\n name\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
3986
3851
|
const DropdownIndicator$1 = () => jsxRuntime.jsx(uiKit.SearchIcon, {
|
|
3987
3852
|
color: "primary"
|
|
3988
3853
|
});
|
|
3989
3854
|
DropdownIndicator$1.displayName = 'DropdownIndicator';
|
|
3990
|
-
const getTrackingEvent$3 = (inputValue, selectedValue) => {
|
|
3991
|
-
const id = selectedValue.value,
|
|
3992
|
-
name = selectedValue.label;
|
|
3993
|
-
const trackingEvent = _startsWithInstanceProperty__default["default"](name).call(name, inputValue) ? trackingEvents$3.selectProductTypeName : id === inputValue ? trackingEvents$3.selectProductTypeId : void 0;
|
|
3994
|
-
return trackingEvent;
|
|
3995
|
-
};
|
|
3996
3855
|
const convertProductTypeToOption = productType => {
|
|
3997
3856
|
if (!productType) return null;
|
|
3998
3857
|
const id = productType.id,
|
|
@@ -4042,7 +3901,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
4042
3901
|
onError(error);
|
|
4043
3902
|
}), [loadProductTypes, onError]);
|
|
4044
3903
|
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
4045
|
-
const _useHandlers = useHandlers(onChange
|
|
3904
|
+
const _useHandlers = useHandlers(onChange),
|
|
4046
3905
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
4047
3906
|
handleInternalInputChange = _useHandlers2[0],
|
|
4048
3907
|
handleChange = _useHandlers2[1];
|
|
@@ -4103,38 +3962,8 @@ var messages$G = reactIntl.defineMessages({
|
|
|
4103
3962
|
}
|
|
4104
3963
|
});
|
|
4105
3964
|
|
|
4106
|
-
const trackingEvents$2 = {
|
|
4107
|
-
selectStateName: {
|
|
4108
|
-
action: 'select',
|
|
4109
|
-
category: 'ReferenceState',
|
|
4110
|
-
label: 'name'
|
|
4111
|
-
},
|
|
4112
|
-
selectStateKey: {
|
|
4113
|
-
action: 'select',
|
|
4114
|
-
category: 'ReferenceState',
|
|
4115
|
-
label: 'key'
|
|
4116
|
-
},
|
|
4117
|
-
selectStateId: {
|
|
4118
|
-
action: 'select',
|
|
4119
|
-
category: 'ReferenceState',
|
|
4120
|
-
label: 'id'
|
|
4121
|
-
},
|
|
4122
|
-
selectWithoutTyping: {
|
|
4123
|
-
action: 'select',
|
|
4124
|
-
category: 'ReferenceState',
|
|
4125
|
-
label: 'noEntry'
|
|
4126
|
-
}
|
|
4127
|
-
};
|
|
4128
|
-
|
|
4129
3965
|
var GetStatesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetStatesQuery" }, 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: "states" }, 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: "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: 377, source: { body: "query GetStatesQuery($where: String, $sortByNamePath: String!) {\n states(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery GetStateQuery($id: String) {\n state(id: $id) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
4130
3966
|
var GetStateQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetStateQuery" }, 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: "state" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], 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: 377, source: { body: "query GetStatesQuery($where: String, $sortByNamePath: String!) {\n states(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery GetStateQuery($id: String) {\n state(id: $id) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
4131
|
-
const getTrackingEvent$2 = (inputValue, selectedValue) => {
|
|
4132
|
-
const id = selectedValue.value,
|
|
4133
|
-
key = selectedValue.key,
|
|
4134
|
-
name = selectedValue.name;
|
|
4135
|
-
const trackingEvent = !inputValue ? trackingEvents$2.selectWithoutTyping : _startsWithInstanceProperty__default["default"](name).call(name, inputValue) ? trackingEvents$2.selectStateName : _startsWithInstanceProperty__default["default"](key).call(key, inputValue) ? trackingEvents$2.selectStateKey : id === inputValue ? trackingEvents$2.selectStateId : void 0;
|
|
4136
|
-
return trackingEvent;
|
|
4137
|
-
};
|
|
4138
3967
|
const StatePickerInput = _ref => {
|
|
4139
3968
|
var _currentOption$data$l, _currentOption$data;
|
|
4140
3969
|
let isClearable = _ref.isClearable,
|
|
@@ -4191,7 +4020,7 @@ const StatePickerInput = _ref => {
|
|
|
4191
4020
|
onError(error);
|
|
4192
4021
|
}), [loadOptions, convertStateToOption, onError]);
|
|
4193
4022
|
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
4194
|
-
const _useHandlers = useHandlers(onChange
|
|
4023
|
+
const _useHandlers = useHandlers(onChange),
|
|
4195
4024
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
4196
4025
|
handleInternalInputChange = _useHandlers2[0],
|
|
4197
4026
|
handleChange = _useHandlers2[1];
|
|
@@ -6329,37 +6158,12 @@ var messages$D = reactIntl.defineMessages({
|
|
|
6329
6158
|
}
|
|
6330
6159
|
});
|
|
6331
6160
|
|
|
6332
|
-
const trackingEvents$1 = {
|
|
6333
|
-
selectProductName: {
|
|
6334
|
-
action: 'select',
|
|
6335
|
-
category: 'ReferenceProduct',
|
|
6336
|
-
label: 'name'
|
|
6337
|
-
},
|
|
6338
|
-
selectProductKey: {
|
|
6339
|
-
action: 'select',
|
|
6340
|
-
category: 'ReferenceProduct',
|
|
6341
|
-
label: 'key'
|
|
6342
|
-
},
|
|
6343
|
-
selectProductId: {
|
|
6344
|
-
action: 'select',
|
|
6345
|
-
category: 'ReferenceProduct',
|
|
6346
|
-
label: 'id'
|
|
6347
|
-
}
|
|
6348
|
-
};
|
|
6349
|
-
|
|
6350
6161
|
var GetProductQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetProductQuery" }, 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: "product" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], 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: "masterData" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ 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: 440, source: { body: "query GetProductsQuery($where: String) {\n products(where: $where) {\n results {\n id\n key\n masterData {\n current {\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n\nquery GetProductQuery($id: String) {\n product(id: $id) {\n id\n key\n masterData {\n current {\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
6351
6162
|
var GetProductsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetProductsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "masterData" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ 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: 440, source: { body: "query GetProductsQuery($where: String) {\n products(where: $where) {\n results {\n id\n key\n masterData {\n current {\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n\nquery GetProductQuery($id: String) {\n product(id: $id) {\n id\n key\n masterData {\n current {\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
6352
6163
|
const DropdownIndicator = () => jsxRuntime.jsx(uiKit.SearchIcon, {
|
|
6353
6164
|
color: "primary"
|
|
6354
6165
|
});
|
|
6355
6166
|
DropdownIndicator.displayName = 'DropdownIndicator';
|
|
6356
|
-
const getTrackingEvent$1 = (inputValue, selectedValue) => {
|
|
6357
|
-
const id = selectedValue.value,
|
|
6358
|
-
key = selectedValue.key,
|
|
6359
|
-
name = selectedValue.name;
|
|
6360
|
-
const trackingEvent = _startsWithInstanceProperty__default["default"](name).call(name, inputValue) ? trackingEvents$1.selectProductName : _startsWithInstanceProperty__default["default"](key).call(key, inputValue) ? trackingEvents$1.selectProductKey : id === inputValue ? trackingEvents$1.selectProductId : void 0;
|
|
6361
|
-
return trackingEvent;
|
|
6362
|
-
};
|
|
6363
6167
|
const ProductPickerInput = _ref => {
|
|
6364
6168
|
var _currentOption$data$l, _currentOption$data;
|
|
6365
6169
|
let isClearable = _ref.isClearable,
|
|
@@ -6417,7 +6221,7 @@ const ProductPickerInput = _ref => {
|
|
|
6417
6221
|
onError(error);
|
|
6418
6222
|
}), [loadOptions, onError, convertProductToOption]);
|
|
6419
6223
|
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
6420
|
-
const _useHandlers = useHandlers(onChange
|
|
6224
|
+
const _useHandlers = useHandlers(onChange),
|
|
6421
6225
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
6422
6226
|
handleInternalInputChange = _useHandlers2[0],
|
|
6423
6227
|
handleChange = _useHandlers2[1];
|
|
@@ -6830,7 +6634,7 @@ function CustomInputSet(props) {
|
|
|
6830
6634
|
touched = _useFormikContext.touched,
|
|
6831
6635
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
6832
6636
|
dirty = _useFormikContext.dirty;
|
|
6833
|
-
const
|
|
6637
|
+
const itemFieldDefinition = _objectSpread$U(_objectSpread$U({}, props.fieldDefinition), {}, {
|
|
6834
6638
|
type: props.fieldDefinition.type.elementType
|
|
6835
6639
|
});
|
|
6836
6640
|
const value = React.useMemo(() => props.value || [undefined], [props.value]);
|
|
@@ -6889,7 +6693,7 @@ function CustomInputSet(props) {
|
|
|
6889
6693
|
// in <CustomFieldComponent /> where proper component for given field/attribute
|
|
6890
6694
|
// type is selected.
|
|
6891
6695
|
const type = getType(props.fieldDefinition);
|
|
6892
|
-
const typeName = type.name.toLowerCase();
|
|
6696
|
+
const typeName = type === null || type === void 0 ? void 0 : type.name.toLowerCase();
|
|
6893
6697
|
const areButtonsTopAligned = _includesInstanceProperty__default["default"](_context2 = [CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.localizedenum, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.string, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.reference]).call(_context2, typeName);
|
|
6894
6698
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
6895
6699
|
children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
|
|
@@ -6914,7 +6718,7 @@ function CustomInputSet(props) {
|
|
|
6914
6718
|
alignItems: areButtonsTopAligned ? 'flex-start' : 'center',
|
|
6915
6719
|
children: [jsxRuntime.jsx(CustomFieldInput, {
|
|
6916
6720
|
name: fieldName,
|
|
6917
|
-
fieldDefinition:
|
|
6721
|
+
fieldDefinition: itemFieldDefinition,
|
|
6918
6722
|
isDisabled: props.isDisabled,
|
|
6919
6723
|
isReadOnly: props.isReadOnly,
|
|
6920
6724
|
onBlur: props.onBlur,
|
|
@@ -6941,7 +6745,6 @@ function CustomInputSet(props) {
|
|
|
6941
6745
|
})]
|
|
6942
6746
|
});
|
|
6943
6747
|
}
|
|
6944
|
-
CustomInputSet.displayName = 'CustomInputSet';
|
|
6945
6748
|
|
|
6946
6749
|
var messages$C = reactIntl.defineMessages({
|
|
6947
6750
|
referencedProductType: {
|
|
@@ -7400,7 +7203,6 @@ function ProductAttributes(props) {
|
|
|
7400
7203
|
inputValuesConverter: convertInputValue
|
|
7401
7204
|
});
|
|
7402
7205
|
}
|
|
7403
|
-
ProductAttributes.displayName = 'ProductAttributes';
|
|
7404
7206
|
|
|
7405
7207
|
const useFieldDefintion = attributeDefinition => React.useMemo(() => attributeDefinitionToFieldDefinition(attributeDefinition), [attributeDefinition]);
|
|
7406
7208
|
function ProductAttributeInput(props) {
|
|
@@ -7749,30 +7551,23 @@ const nonSetComponents = {
|
|
|
7749
7551
|
[CUSTOM_FIELD_TYPES.date]: CustomDateTimeInput,
|
|
7750
7552
|
[CUSTOM_FIELD_TYPES.nested]: CustomNestedInput
|
|
7751
7553
|
};
|
|
7752
|
-
const getSetComponent = fieldDefinition => {
|
|
7753
|
-
const type = getType(fieldDefinition);
|
|
7754
|
-
const typeName = type.name.toLowerCase();
|
|
7755
|
-
// Boolean is the only set element with picularities (i.e. way more
|
|
7756
|
-
// convenient for user to work with it as with select input with three values:
|
|
7757
|
-
// [true], [false] and [true, false]).
|
|
7758
|
-
if (typeName === CUSTOM_FIELD_TYPES.boolean) return CustomBooleanInputSet;
|
|
7759
|
-
// All the rest sets are just a fancy wrapper around single-item components
|
|
7760
|
-
return CustomInputSet;
|
|
7761
|
-
};
|
|
7762
|
-
const getNonSetComponent = fieldDefinition => {
|
|
7763
|
-
const typeName = fieldDefinition.type.name.toLowerCase();
|
|
7764
|
-
return nonSetComponents[typeName];
|
|
7765
|
-
};
|
|
7766
|
-
const isSet = fieldDefinition => {
|
|
7767
|
-
const typeName = fieldDefinition.type.name.toLowerCase();
|
|
7768
|
-
return typeName === 'set';
|
|
7769
|
-
};
|
|
7770
|
-
const getInputComponent = fieldDefinition => {
|
|
7771
|
-
if (isSet(fieldDefinition)) return getSetComponent(fieldDefinition);
|
|
7772
|
-
return getNonSetComponent(fieldDefinition);
|
|
7773
|
-
};
|
|
7774
7554
|
const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
7775
|
-
const InputComponent =
|
|
7555
|
+
const InputComponent = React.useMemo(() => {
|
|
7556
|
+
var _props$fieldDefinitio;
|
|
7557
|
+
const typeName = (_props$fieldDefinitio = props.fieldDefinition.type) === null || _props$fieldDefinitio === void 0 ? void 0 : _props$fieldDefinitio.name.toLowerCase();
|
|
7558
|
+
if (typeName === 'set') {
|
|
7559
|
+
var _getSetElementType;
|
|
7560
|
+
// Boolean is the only set element with peculiarities (i.e. way more
|
|
7561
|
+
// convenient for user to work with it as with select input with three values:
|
|
7562
|
+
// [true], [false] and [true, false]).
|
|
7563
|
+
if (((_getSetElementType = getType(props.fieldDefinition)) === null || _getSetElementType === void 0 ? void 0 : _getSetElementType.name.toLowerCase()) === CUSTOM_FIELD_TYPES.boolean) {
|
|
7564
|
+
return CustomBooleanInputSet;
|
|
7565
|
+
}
|
|
7566
|
+
// All the rest sets are just a fancy wrapper around single-item components
|
|
7567
|
+
return CustomInputSet;
|
|
7568
|
+
}
|
|
7569
|
+
return nonSetComponents[typeName];
|
|
7570
|
+
}, [props.fieldDefinition]);
|
|
7776
7571
|
if (!InputComponent) return null;
|
|
7777
7572
|
return jsxRuntime.jsx(InputComponent, {
|
|
7778
7573
|
name: props.name,
|
|
@@ -8435,43 +8230,9 @@ var messages$y = reactIntl.defineMessages({
|
|
|
8435
8230
|
}
|
|
8436
8231
|
});
|
|
8437
8232
|
|
|
8438
|
-
const trackingEvents = {
|
|
8439
|
-
selectCustomerGroupName: {
|
|
8440
|
-
action: 'select',
|
|
8441
|
-
category: 'ReferenceCustomerGroup',
|
|
8442
|
-
label: 'name'
|
|
8443
|
-
},
|
|
8444
|
-
selectCustomerGroupKey: {
|
|
8445
|
-
action: 'select',
|
|
8446
|
-
category: 'ReferenceCustomerGroup',
|
|
8447
|
-
label: 'key'
|
|
8448
|
-
},
|
|
8449
|
-
selectCustomerGroupId: {
|
|
8450
|
-
action: 'select',
|
|
8451
|
-
category: 'ReferenceCustomerGroup',
|
|
8452
|
-
label: 'id'
|
|
8453
|
-
},
|
|
8454
|
-
selectWithoutTyping: {
|
|
8455
|
-
action: 'select',
|
|
8456
|
-
category: 'ReferenceCustomerGroup',
|
|
8457
|
-
label: 'noEntry'
|
|
8458
|
-
}
|
|
8459
|
-
};
|
|
8460
|
-
|
|
8461
8233
|
var GetCustomerGroupsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetCustomerGroupsQuery" }, 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: "customerGroups" }, 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: "PickerInputCustomerGroups" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputCustomerGroups" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomerGroup" } }, 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: "name" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 406, source: { body: "fragment PickerInputCustomerGroups on CustomerGroup {\n id\n key\n name\n}\n\nquery GetCustomerGroupsQuery($where: String, $sortByNamePath: String!) {\n customerGroups(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputCustomerGroups\n }\n }\n}\n\nquery GetCustomerGroupQuery($id: String) {\n customerGroup(id: $id) {\n ...PickerInputCustomerGroups\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8462
8234
|
var GetCustomerGroupQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetCustomerGroupQuery" }, 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: "customerGroup" }, 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: "PickerInputCustomerGroups" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputCustomerGroups" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomerGroup" } }, 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: "name" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 406, source: { body: "fragment PickerInputCustomerGroups on CustomerGroup {\n id\n key\n name\n}\n\nquery GetCustomerGroupsQuery($where: String, $sortByNamePath: String!) {\n customerGroups(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputCustomerGroups\n }\n }\n}\n\nquery GetCustomerGroupQuery($id: String) {\n customerGroup(id: $id) {\n ...PickerInputCustomerGroups\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8463
8235
|
var PickerInputCustomerGroups = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputCustomerGroups" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomerGroup" } }, 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: "name" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 406, source: { body: "fragment PickerInputCustomerGroups on CustomerGroup {\n id\n key\n name\n}\n\nquery GetCustomerGroupsQuery($where: String, $sortByNamePath: String!) {\n customerGroups(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputCustomerGroups\n }\n }\n}\n\nquery GetCustomerGroupQuery($id: String) {\n customerGroup(id: $id) {\n ...PickerInputCustomerGroups\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8464
|
-
const getTrackingEvent = (inputValue, selectedValue) => {
|
|
8465
|
-
const id = selectedValue.value,
|
|
8466
|
-
key = selectedValue.key,
|
|
8467
|
-
name = selectedValue.name;
|
|
8468
|
-
const selectWithoutTyping = trackingEvents.selectWithoutTyping,
|
|
8469
|
-
selectCustomerGroupId = trackingEvents.selectCustomerGroupId,
|
|
8470
|
-
selectCustomerGroupKey = trackingEvents.selectCustomerGroupKey,
|
|
8471
|
-
selectCustomerGroupName = trackingEvents.selectCustomerGroupName;
|
|
8472
|
-
const trackingEvent = !inputValue ? selectWithoutTyping : _startsWithInstanceProperty__default["default"](name).call(name, inputValue) ? selectCustomerGroupName : _startsWithInstanceProperty__default["default"](key).call(key, inputValue) ? selectCustomerGroupKey : id === inputValue ? selectCustomerGroupId : void 0;
|
|
8473
|
-
return trackingEvent;
|
|
8474
|
-
};
|
|
8475
8236
|
const CustomerGroupPickerInput = _ref => {
|
|
8476
8237
|
var _currentOption$data$l, _currentOption$data;
|
|
8477
8238
|
let isClearable = _ref.isClearable,
|
|
@@ -8534,7 +8295,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
8534
8295
|
onError(error);
|
|
8535
8296
|
}), [loadOptions, convertCustomerGroupToOption, onError]);
|
|
8536
8297
|
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
8537
|
-
const _useHandlers = useHandlers(onChange
|
|
8298
|
+
const _useHandlers = useHandlers(onChange),
|
|
8538
8299
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
8539
8300
|
handleInternalInputChange = _useHandlers2[0],
|
|
8540
8301
|
handleChange = _useHandlers2[1];
|
|
@@ -10177,7 +9938,7 @@ const BusinessUnitAssociatesListView = props => {
|
|
|
10177
9938
|
};
|
|
10178
9939
|
BusinessUnitAssociatesListView.displayName = 'BusinessUnitAssociatesListView';
|
|
10179
9940
|
|
|
10180
|
-
var BusinessUnitAssociatesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "BusinessUnitAssociatesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeAssociateRoleAssignmentsRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "businessUnit" }, 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: "BusinessUnitAssociatesFragment" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "BusinessUnitAssociatesFragment" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BusinessUnit" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "associates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "roles" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeRoles" } } }] }] }, { kind: "Field", name: { kind: "Name", value: "associateRoleAssignments" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeAssociateRoleAssignmentsRoles" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRole" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "firstName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastName" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "inheritedAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRoleAssignments" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeAssociateRoleAssignmentsRoles" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRole" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "firstName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastName" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }] } }], loc: { start: 0, end:
|
|
9941
|
+
var BusinessUnitAssociatesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "BusinessUnitAssociatesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeAssociateRoleAssignmentsRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "businessUnit" }, 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: "BusinessUnitAssociatesFragment" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "BusinessUnitAssociatesFragment" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BusinessUnit" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "associates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "roles" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeRoles" } } }] }] }, { kind: "Field", name: { kind: "Name", value: "associateRoleAssignments" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeAssociateRoleAssignmentsRoles" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRole" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inheritance" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "customer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "firstName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastName" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "inheritedAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRoleAssignments" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeAssociateRoleAssignmentsRoles" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRole" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "firstName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastName" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 849, source: { body: "fragment BusinessUnitAssociatesFragment on BusinessUnit {\n id\n associates {\n roles @skip(if: $shouldExcludeRoles)\n associateRoleAssignments\n @skip(if: $shouldExcludeAssociateRoleAssignmentsRoles) {\n associateRole {\n name\n key\n }\n inheritance\n }\n customer {\n id\n email\n firstName\n lastName\n }\n }\n inheritedAssociates {\n associateRoleAssignments\n @skip(if: $shouldExcludeAssociateRoleAssignmentsRoles) {\n associateRole {\n name\n key\n }\n }\n customer {\n id\n email\n firstName\n lastName\n }\n }\n __typename\n}\n\nquery BusinessUnitAssociatesQuery(\n $id: String!\n $shouldExcludeRoles: Boolean!\n $shouldExcludeAssociateRoleAssignmentsRoles: Boolean!\n) {\n businessUnit(id: $id) {\n ...BusinessUnitAssociatesFragment\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10181
9942
|
const useBusinessUnitAssociatesFetcher = _ref => {
|
|
10182
9943
|
let id = _ref.id,
|
|
10183
9944
|
shouldExcludeRoles = _ref.shouldExcludeRoles,
|
|
@@ -12455,9 +12216,6 @@ var messages$7 = reactIntl.defineMessages({
|
|
|
12455
12216
|
function ownKeys$f(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12456
12217
|
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$f(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$f(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12457
12218
|
const MissingValueField = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
12458
|
-
"data-track-component": "MissingValue",
|
|
12459
|
-
"data-track-event": "change",
|
|
12460
|
-
"data-track-label": props.isChecked,
|
|
12461
12219
|
name: "missing-value",
|
|
12462
12220
|
isChecked: props.isChecked,
|
|
12463
12221
|
onChange: props.onChange,
|
|
@@ -14324,30 +14082,6 @@ const getTimeZoneLabel = memoize__default["default"]((selectedTimeZone, timeZone
|
|
|
14324
14082
|
return _concatInstanceProperty__default["default"](_context4 = "(GMT ".concat(timeZoneData.offset, ") ")).call(_context4, timeZoneData.name);
|
|
14325
14083
|
});
|
|
14326
14084
|
|
|
14327
|
-
function findButtonLinkPathname(element) {
|
|
14328
|
-
if (element.tagName === 'A') {
|
|
14329
|
-
var _context;
|
|
14330
|
-
const linkUrl = new _URL__default["default"](element.href);
|
|
14331
|
-
return _concatInstanceProperty__default["default"](_context = "".concat(linkUrl.pathname)).call(_context, linkUrl.search);
|
|
14332
|
-
}
|
|
14333
|
-
return findButtonLinkPathname(element.parentElement);
|
|
14334
|
-
}
|
|
14335
|
-
function trackMenuClick(_ref) {
|
|
14336
|
-
let event = _ref.event,
|
|
14337
|
-
track = _ref.track,
|
|
14338
|
-
pathToMatch = _ref.pathToMatch,
|
|
14339
|
-
trackingEvent = _ref.trackingEvent;
|
|
14340
|
-
const buttonLinkPathname = findButtonLinkPathname(event.target);
|
|
14341
|
-
const shouldTrackEvent = !!reactRouterDom.matchPath(buttonLinkPathname, {
|
|
14342
|
-
path: pathToMatch,
|
|
14343
|
-
exact: true,
|
|
14344
|
-
strict: true
|
|
14345
|
-
});
|
|
14346
|
-
if (shouldTrackEvent) {
|
|
14347
|
-
track(trackingEvent.action, trackingEvent.category, trackingEvent.label);
|
|
14348
|
-
}
|
|
14349
|
-
}
|
|
14350
|
-
|
|
14351
14085
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14352
14086
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
14353
14087
|
function withPendingRequests() {
|
|
@@ -14533,7 +14267,6 @@ exports.splitVariantAttributesByConstraint = splitVariantAttributesByConstraint;
|
|
|
14533
14267
|
exports.storesListConnectorMockHandlers = handlers$7;
|
|
14534
14268
|
exports.stringToBase64 = stringToBase64;
|
|
14535
14269
|
exports.swapArrayItems = swapArrayItems;
|
|
14536
|
-
exports.trackMenuClick = trackMenuClick;
|
|
14537
14270
|
exports.transformAllToProperNounCase = transformAllToProperNounCase;
|
|
14538
14271
|
exports.transformCustomFieldsRawToCustomFields = transformCustomFieldsRawToCustomFields;
|
|
14539
14272
|
exports.transformLocalizedFieldsForCategory = transformLocalizedFieldsForCategory;
|
|
@@ -14562,9 +14295,6 @@ exports.useTaxCategoriesPlatformLimits = useTaxCategoriesLimits;
|
|
|
14562
14295
|
exports.useTotalNumberOfBusinessUnitsFetcherHandlers = handlers$1;
|
|
14563
14296
|
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher;
|
|
14564
14297
|
exports.useTotalNumberOfStoresFetcherHandlers = handlers$3;
|
|
14565
|
-
exports.useTracking = useTracking;
|
|
14566
|
-
exports.useTrackingContext = useTracking;
|
|
14567
|
-
exports.useTrackingShared = useTrackingShared;
|
|
14568
14298
|
exports.validateCustomField = validateFilter$2;
|
|
14569
14299
|
exports.validateCustomFields = validations;
|
|
14570
14300
|
exports.validateDate = validateFilter$1;
|