@commercetools-frontend/experimental-components 7.1.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-experimental-components.esm.js +1 -1
- package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/mocks/handlers.d.ts +7 -0
- package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/mocks/index.d.ts +2 -0
- package/dist/declarations/src/test-utils.d.ts +1 -0
- package/dist/styles.css +32 -32
- package/package.json +1 -1
- package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.dev.js +46 -27
- package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.prod.js +46 -27
- package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.esm.js +37 -19
|
@@ -9110,7 +9110,7 @@ const RecurrentIntervalPicker = _ref => {
|
|
|
9110
9110
|
}) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9111
9111
|
tone: "negative",
|
|
9112
9112
|
intlMessage: messages$w.missingSelectedWarning
|
|
9113
|
-
}) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9113
|
+
}) : null, !error && !skip && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9114
9114
|
type: "warning",
|
|
9115
9115
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
9116
9116
|
intlMessage: messages$w.noRecurrentIntervalsConfigured
|
|
@@ -9088,7 +9088,7 @@ const RecurrentIntervalPicker = _ref => {
|
|
|
9088
9088
|
}) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9089
9089
|
tone: "negative",
|
|
9090
9090
|
intlMessage: messages$w.missingSelectedWarning
|
|
9091
|
-
}) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9091
|
+
}) : null, !error && !skip && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9092
9092
|
type: "warning",
|
|
9093
9093
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
9094
9094
|
intlMessage: messages$w.noRecurrentIntervalsConfigured
|
|
@@ -9008,7 +9008,7 @@ const RecurrentIntervalPicker = _ref => {
|
|
|
9008
9008
|
}) : selectedIsMissingInData ? jsx(Text.Body, {
|
|
9009
9009
|
tone: "negative",
|
|
9010
9010
|
intlMessage: messages$w.missingSelectedWarning
|
|
9011
|
-
}) : null, !error && noRecurrentIntervalsConfigured && jsx(ContentNotification, {
|
|
9011
|
+
}) : null, !error && !skip && noRecurrentIntervalsConfigured && jsx(ContentNotification, {
|
|
9012
9012
|
type: "warning",
|
|
9013
9013
|
children: jsx(Text.Detail, {
|
|
9014
9014
|
intlMessage: messages$w.noRecurrentIntervalsConfigured
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TRecurrencePolicyQueryResult } from '../../../../../../types/src/generated/ctp';
|
|
2
|
+
declare const handlers: {
|
|
3
|
+
FetchRecurrencePolicies: {
|
|
4
|
+
all: (policies?: TRecurrencePolicyQueryResult['results']) => import("msw").GraphQLHandler<import("msw").GraphQLRequest<import("msw").GraphQLVariables>>;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export default handlers;
|
|
@@ -8,3 +8,4 @@ export { handlers as useStoreByFieldFetcherHandlers } from "./components/store-s
|
|
|
8
8
|
export { handlers as useStoresByWherePredicateFetcherHandlers } from "./components/store-select-input/components/stores-search-select-input/mocks/index.js";
|
|
9
9
|
export { handlers as platformLimitsMockHandlers } from "./features/platform-limits/shared/hooks/use-platform-limits-fetcher/mocks/index.js";
|
|
10
10
|
export { createFetchStoreDistributionChannelsQueryMock } from "./hooks/use-role-based-channels-fetcher/test-utils.js";
|
|
11
|
+
export { handlers as recurrenceIntervalsMockHandlers } from "./components/recurrent-interval-picker/use-recurrence-intervals/mocks/index.js";
|
package/dist/styles.css
CHANGED
|
@@ -92,18 +92,6 @@
|
|
|
92
92
|
border-bottom-left-radius: var(--border-radius-for-input);
|
|
93
93
|
border-bottom-right-radius: var(--border-radius-for-input);
|
|
94
94
|
}
|
|
95
|
-
/* imported from numeric-format-input.module.css */
|
|
96
|
-
|
|
97
|
-
.numeric-format-input-module__invalid___3LcyE {
|
|
98
|
-
/* this needs !important because react-select has a :focus style that
|
|
99
|
-
stops the border colour being set unless the element is blurred */
|
|
100
|
-
border-color: var(--color-error) !important;
|
|
101
|
-
border: 1px solid;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.numeric-format-input-module__disabled___hb6h4 {
|
|
105
|
-
cursor: not-allowed;
|
|
106
|
-
}
|
|
107
95
|
/* imported from search-input.module.css */
|
|
108
96
|
|
|
109
97
|
.search-input-module__block___1uM-y {
|
|
@@ -194,6 +182,18 @@
|
|
|
194
182
|
flex-shrink: 1;
|
|
195
183
|
margin-left: var(--spacing-s);
|
|
196
184
|
}
|
|
185
|
+
/* imported from numeric-format-input.module.css */
|
|
186
|
+
|
|
187
|
+
.numeric-format-input-module__invalid___3LcyE {
|
|
188
|
+
/* this needs !important because react-select has a :focus style that
|
|
189
|
+
stops the border colour being set unless the element is blurred */
|
|
190
|
+
border-color: var(--color-error) !important;
|
|
191
|
+
border: 1px solid;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.numeric-format-input-module__disabled___hb6h4 {
|
|
195
|
+
cursor: not-allowed;
|
|
196
|
+
}
|
|
197
197
|
/* imported from throttled-field.module.css */
|
|
198
198
|
|
|
199
199
|
.throttled-field-module__size___324jx {
|
|
@@ -519,6 +519,21 @@
|
|
|
519
519
|
align-items: center;
|
|
520
520
|
justify-content: center;
|
|
521
521
|
}
|
|
522
|
+
/* imported from reference-search.module.css */
|
|
523
|
+
|
|
524
|
+
.reference-search-module__container___3-iK3 {
|
|
525
|
+
width: 100%;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.reference-search-module__container___3-iK3 > div {
|
|
529
|
+
width: 100%;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.reference-search-module__missing-label___az9AO {
|
|
533
|
+
color: var(--color-warning);
|
|
534
|
+
font-size: 0.9rem;
|
|
535
|
+
margin-left: var(--spacing-xs);
|
|
536
|
+
}
|
|
522
537
|
/* imported from divider.module.css */
|
|
523
538
|
|
|
524
539
|
.divider-module__divider___4-vdy {
|
|
@@ -546,21 +561,6 @@
|
|
|
546
561
|
.divider-module__divider-dashed___2Em8A {
|
|
547
562
|
border-style: dashed;
|
|
548
563
|
}
|
|
549
|
-
/* imported from reference-search.module.css */
|
|
550
|
-
|
|
551
|
-
.reference-search-module__container___3-iK3 {
|
|
552
|
-
width: 100%;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
.reference-search-module__container___3-iK3 > div {
|
|
556
|
-
width: 100%;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
.reference-search-module__missing-label___az9AO {
|
|
560
|
-
color: var(--color-warning);
|
|
561
|
-
font-size: 0.9rem;
|
|
562
|
-
margin-left: var(--spacing-xs);
|
|
563
|
-
}
|
|
564
564
|
/* imported from set-buttons.module.css */
|
|
565
565
|
|
|
566
566
|
.set-buttons-module__topAlign___3AZwc {
|
|
@@ -595,16 +595,16 @@
|
|
|
595
595
|
.platform-limits-customers-status-module__status___3rXYM {
|
|
596
596
|
min-width: max-content;
|
|
597
597
|
}
|
|
598
|
-
/* imported from platform-limits-customers-combined.module.css */
|
|
599
|
-
|
|
600
|
-
.platform-limits-customers-combined-module__combined___OszDd {
|
|
601
|
-
margin-bottom: var(--spacing-s);
|
|
602
|
-
}
|
|
603
598
|
/* imported from platform-limits-customer-groups-status.module.css */
|
|
604
599
|
|
|
605
600
|
.platform-limits-customer-groups-status-module__status___6099G {
|
|
606
601
|
min-width: max-content;
|
|
607
602
|
}
|
|
603
|
+
/* imported from platform-limits-customers-combined.module.css */
|
|
604
|
+
|
|
605
|
+
.platform-limits-customers-combined-module__combined___OszDd {
|
|
606
|
+
margin-bottom: var(--spacing-s);
|
|
607
|
+
}
|
|
608
608
|
/* imported from platform-limits-customer-groups-combined.module.css */
|
|
609
609
|
|
|
610
610
|
.platform-limits-customer-groups-combined-module__combined___WjRoI {
|
package/package.json
CHANGED
package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.dev.js
CHANGED
|
@@ -28,7 +28,7 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
|
|
|
28
28
|
var _lastIndexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_lastIndexOfInstanceProperty);
|
|
29
29
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
30
30
|
|
|
31
|
-
const handlers$
|
|
31
|
+
const handlers$i = {
|
|
32
32
|
TotalNumberOfStores: {
|
|
33
33
|
all: total => msw.graphql.query('TotalNumberOfStores', (req, res, ctx) => {
|
|
34
34
|
return res(ctx.data({
|
|
@@ -39,16 +39,16 @@ const handlers$g = {
|
|
|
39
39
|
})
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
var handlers$
|
|
42
|
+
var handlers$j = handlers$i;
|
|
43
43
|
|
|
44
|
-
const handlers$
|
|
44
|
+
const handlers$g = {
|
|
45
45
|
TypeDefinitions: {
|
|
46
46
|
all: typeDefinitions => msw.graphql.query('FetchTypeDefinitionsQuery', (req, res, ctx) => res(ctx.data({
|
|
47
47
|
typeDefinitions
|
|
48
48
|
})))
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
var handlers$
|
|
51
|
+
var handlers$h = handlers$g;
|
|
52
52
|
|
|
53
53
|
const graphqlQueries = {
|
|
54
54
|
ASSOCIATE_ROLE: 'associateRoles',
|
|
@@ -74,7 +74,7 @@ const graphqlQueries = {
|
|
|
74
74
|
TAX_CATEGORY: 'taxCategories',
|
|
75
75
|
ZONE: 'zones'
|
|
76
76
|
};
|
|
77
|
-
const handlers$
|
|
77
|
+
const handlers$e = {
|
|
78
78
|
DuplicatedField: {
|
|
79
79
|
total: (total, resourceType) => msw.graphql.query('FetchResourceTypeDuplicatedField', (req, res, ctx) => {
|
|
80
80
|
if (!graphqlQueries[resourceType]) return res(ctx.data({}));
|
|
@@ -86,18 +86,18 @@ const handlers$c = {
|
|
|
86
86
|
})
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
var handlers$
|
|
89
|
+
var handlers$f = handlers$e;
|
|
90
90
|
|
|
91
|
-
const handlers$
|
|
91
|
+
const handlers$c = {
|
|
92
92
|
ProductSelections: {
|
|
93
93
|
all: productSelections => msw.graphql.query('FetchProductSelections', (req, res, ctx) => res(ctx.data({
|
|
94
94
|
productSelections
|
|
95
95
|
})))
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
var handlers$
|
|
98
|
+
var handlers$d = handlers$c;
|
|
99
99
|
|
|
100
|
-
const handlers$
|
|
100
|
+
const handlers$a = {
|
|
101
101
|
ProductSelections: {
|
|
102
102
|
total: total => msw.graphql.query('FetchProductSelectionsTotal', (req, res, ctx) => res(ctx.data({
|
|
103
103
|
productSelections: {
|
|
@@ -107,13 +107,13 @@ const handlers$8 = {
|
|
|
107
107
|
})))
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
|
-
var handlers$
|
|
110
|
+
var handlers$b = handlers$a;
|
|
111
111
|
|
|
112
112
|
const extractKeysFromWherePredicateClause = function () {
|
|
113
113
|
let whereClause = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
114
114
|
return whereClause.substring(_lastIndexOfInstanceProperty__default["default"](whereClause).call(whereClause, '("') + 1, _lastIndexOfInstanceProperty__default["default"](whereClause).call(whereClause, '")')).replace(/["]/g, '').split(', ');
|
|
115
115
|
};
|
|
116
|
-
const handlers$
|
|
116
|
+
const handlers$8 = {
|
|
117
117
|
StoresList: {
|
|
118
118
|
all: stores => msw.graphql.query('FetchStoresQuery', (req, res, ctx) => {
|
|
119
119
|
// GIVEN req.variables.where is specified
|
|
@@ -161,9 +161,9 @@ const handlers$6 = {
|
|
|
161
161
|
})
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
|
-
var handlers$
|
|
164
|
+
var handlers$9 = handlers$8;
|
|
165
165
|
|
|
166
|
-
const handlers$
|
|
166
|
+
const handlers$6 = {
|
|
167
167
|
FetchStoresByField: {
|
|
168
168
|
all: stores => msw.graphql.query('FetchStoresByField', (req, res, ctx) => {
|
|
169
169
|
return res(ctx.data({
|
|
@@ -172,9 +172,9 @@ const handlers$4 = {
|
|
|
172
172
|
})
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
|
-
var handlers$
|
|
175
|
+
var handlers$7 = handlers$6;
|
|
176
176
|
|
|
177
|
-
const handlers$
|
|
177
|
+
const handlers$4 = {
|
|
178
178
|
FetchStoresByWherePredicate: {
|
|
179
179
|
all: stores => msw.graphql.query('FetchStoresByWherePredicate', (req, res, ctx) => {
|
|
180
180
|
return res(ctx.data({
|
|
@@ -186,16 +186,16 @@ const handlers$2 = {
|
|
|
186
186
|
})
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
|
-
var handlers$
|
|
189
|
+
var handlers$5 = handlers$4;
|
|
190
190
|
|
|
191
|
-
const handlers = {
|
|
191
|
+
const handlers$2 = {
|
|
192
192
|
PlatformLimits: {
|
|
193
193
|
all: platformLimiits => msw.graphql.query('PlatformLimitsFetcherQuery', (req, res, ctx) => res(ctx.data({
|
|
194
194
|
limits: platformLimiits
|
|
195
195
|
})))
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
-
var handlers$
|
|
198
|
+
var handlers$3 = handlers$2;
|
|
199
199
|
|
|
200
200
|
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; }
|
|
201
201
|
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; }
|
|
@@ -217,13 +217,32 @@ const createFetchStoreDistributionChannelsQueryMock = custom => _objectSpread({
|
|
|
217
217
|
}
|
|
218
218
|
}, custom);
|
|
219
219
|
|
|
220
|
+
const handlers = {
|
|
221
|
+
FetchRecurrencePolicies: {
|
|
222
|
+
all: function () {
|
|
223
|
+
let policies = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
224
|
+
return msw.graphql.query('FetchRecurrencePolicies', (_, res, ctx) => {
|
|
225
|
+
return res(ctx.data({
|
|
226
|
+
recurrencePolicies: {
|
|
227
|
+
__typename: 'RecurrencePolicyQueryResult',
|
|
228
|
+
results: policies,
|
|
229
|
+
total: policies.length
|
|
230
|
+
}
|
|
231
|
+
}));
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
var handlers$1 = handlers;
|
|
237
|
+
|
|
220
238
|
exports.createFetchStoreDistributionChannelsQueryMock = createFetchStoreDistributionChannelsQueryMock;
|
|
221
|
-
exports.customFieldDefinitionsMockHanders = handlers$
|
|
222
|
-
exports.isFieldDuplicatedMockHandlers = handlers$
|
|
223
|
-
exports.platformLimitsMockHandlers = handlers$
|
|
224
|
-
exports.productSelectionsFetcherMockHandler = handlers$
|
|
225
|
-
exports.productSelectionsTotalFetcherMockHandler = handlers$
|
|
226
|
-
exports.
|
|
227
|
-
exports.
|
|
228
|
-
exports.
|
|
229
|
-
exports.
|
|
239
|
+
exports.customFieldDefinitionsMockHanders = handlers$h;
|
|
240
|
+
exports.isFieldDuplicatedMockHandlers = handlers$f;
|
|
241
|
+
exports.platformLimitsMockHandlers = handlers$3;
|
|
242
|
+
exports.productSelectionsFetcherMockHandler = handlers$d;
|
|
243
|
+
exports.productSelectionsTotalFetcherMockHandler = handlers$b;
|
|
244
|
+
exports.recurrenceIntervalsMockHandlers = handlers$1;
|
|
245
|
+
exports.storesListConnectorMockHandlers = handlers$9;
|
|
246
|
+
exports.useStoreByFieldFetcherHandlers = handlers$7;
|
|
247
|
+
exports.useStoresByWherePredicateFetcherHandlers = handlers$5;
|
|
248
|
+
exports.useTotalNumberOfStoresFetcherHandlers = handlers$j;
|
package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.prod.js
CHANGED
|
@@ -28,7 +28,7 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
|
|
|
28
28
|
var _lastIndexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_lastIndexOfInstanceProperty);
|
|
29
29
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
30
30
|
|
|
31
|
-
const handlers$
|
|
31
|
+
const handlers$i = {
|
|
32
32
|
TotalNumberOfStores: {
|
|
33
33
|
all: total => msw.graphql.query('TotalNumberOfStores', (req, res, ctx) => {
|
|
34
34
|
return res(ctx.data({
|
|
@@ -39,16 +39,16 @@ const handlers$g = {
|
|
|
39
39
|
})
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
var handlers$
|
|
42
|
+
var handlers$j = handlers$i;
|
|
43
43
|
|
|
44
|
-
const handlers$
|
|
44
|
+
const handlers$g = {
|
|
45
45
|
TypeDefinitions: {
|
|
46
46
|
all: typeDefinitions => msw.graphql.query('FetchTypeDefinitionsQuery', (req, res, ctx) => res(ctx.data({
|
|
47
47
|
typeDefinitions
|
|
48
48
|
})))
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
var handlers$
|
|
51
|
+
var handlers$h = handlers$g;
|
|
52
52
|
|
|
53
53
|
const graphqlQueries = {
|
|
54
54
|
ASSOCIATE_ROLE: 'associateRoles',
|
|
@@ -74,7 +74,7 @@ const graphqlQueries = {
|
|
|
74
74
|
TAX_CATEGORY: 'taxCategories',
|
|
75
75
|
ZONE: 'zones'
|
|
76
76
|
};
|
|
77
|
-
const handlers$
|
|
77
|
+
const handlers$e = {
|
|
78
78
|
DuplicatedField: {
|
|
79
79
|
total: (total, resourceType) => msw.graphql.query('FetchResourceTypeDuplicatedField', (req, res, ctx) => {
|
|
80
80
|
if (!graphqlQueries[resourceType]) return res(ctx.data({}));
|
|
@@ -86,18 +86,18 @@ const handlers$c = {
|
|
|
86
86
|
})
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
var handlers$
|
|
89
|
+
var handlers$f = handlers$e;
|
|
90
90
|
|
|
91
|
-
const handlers$
|
|
91
|
+
const handlers$c = {
|
|
92
92
|
ProductSelections: {
|
|
93
93
|
all: productSelections => msw.graphql.query('FetchProductSelections', (req, res, ctx) => res(ctx.data({
|
|
94
94
|
productSelections
|
|
95
95
|
})))
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
var handlers$
|
|
98
|
+
var handlers$d = handlers$c;
|
|
99
99
|
|
|
100
|
-
const handlers$
|
|
100
|
+
const handlers$a = {
|
|
101
101
|
ProductSelections: {
|
|
102
102
|
total: total => msw.graphql.query('FetchProductSelectionsTotal', (req, res, ctx) => res(ctx.data({
|
|
103
103
|
productSelections: {
|
|
@@ -107,13 +107,13 @@ const handlers$8 = {
|
|
|
107
107
|
})))
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
|
-
var handlers$
|
|
110
|
+
var handlers$b = handlers$a;
|
|
111
111
|
|
|
112
112
|
const extractKeysFromWherePredicateClause = function () {
|
|
113
113
|
let whereClause = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
114
114
|
return whereClause.substring(_lastIndexOfInstanceProperty__default["default"](whereClause).call(whereClause, '("') + 1, _lastIndexOfInstanceProperty__default["default"](whereClause).call(whereClause, '")')).replace(/["]/g, '').split(', ');
|
|
115
115
|
};
|
|
116
|
-
const handlers$
|
|
116
|
+
const handlers$8 = {
|
|
117
117
|
StoresList: {
|
|
118
118
|
all: stores => msw.graphql.query('FetchStoresQuery', (req, res, ctx) => {
|
|
119
119
|
// GIVEN req.variables.where is specified
|
|
@@ -161,9 +161,9 @@ const handlers$6 = {
|
|
|
161
161
|
})
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
|
-
var handlers$
|
|
164
|
+
var handlers$9 = handlers$8;
|
|
165
165
|
|
|
166
|
-
const handlers$
|
|
166
|
+
const handlers$6 = {
|
|
167
167
|
FetchStoresByField: {
|
|
168
168
|
all: stores => msw.graphql.query('FetchStoresByField', (req, res, ctx) => {
|
|
169
169
|
return res(ctx.data({
|
|
@@ -172,9 +172,9 @@ const handlers$4 = {
|
|
|
172
172
|
})
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
|
-
var handlers$
|
|
175
|
+
var handlers$7 = handlers$6;
|
|
176
176
|
|
|
177
|
-
const handlers$
|
|
177
|
+
const handlers$4 = {
|
|
178
178
|
FetchStoresByWherePredicate: {
|
|
179
179
|
all: stores => msw.graphql.query('FetchStoresByWherePredicate', (req, res, ctx) => {
|
|
180
180
|
return res(ctx.data({
|
|
@@ -186,16 +186,16 @@ const handlers$2 = {
|
|
|
186
186
|
})
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
|
-
var handlers$
|
|
189
|
+
var handlers$5 = handlers$4;
|
|
190
190
|
|
|
191
|
-
const handlers = {
|
|
191
|
+
const handlers$2 = {
|
|
192
192
|
PlatformLimits: {
|
|
193
193
|
all: platformLimiits => msw.graphql.query('PlatformLimitsFetcherQuery', (req, res, ctx) => res(ctx.data({
|
|
194
194
|
limits: platformLimiits
|
|
195
195
|
})))
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
-
var handlers$
|
|
198
|
+
var handlers$3 = handlers$2;
|
|
199
199
|
|
|
200
200
|
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; }
|
|
201
201
|
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; }
|
|
@@ -217,13 +217,32 @@ const createFetchStoreDistributionChannelsQueryMock = custom => _objectSpread({
|
|
|
217
217
|
}
|
|
218
218
|
}, custom);
|
|
219
219
|
|
|
220
|
+
const handlers = {
|
|
221
|
+
FetchRecurrencePolicies: {
|
|
222
|
+
all: function () {
|
|
223
|
+
let policies = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
224
|
+
return msw.graphql.query('FetchRecurrencePolicies', (_, res, ctx) => {
|
|
225
|
+
return res(ctx.data({
|
|
226
|
+
recurrencePolicies: {
|
|
227
|
+
__typename: 'RecurrencePolicyQueryResult',
|
|
228
|
+
results: policies,
|
|
229
|
+
total: policies.length
|
|
230
|
+
}
|
|
231
|
+
}));
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
var handlers$1 = handlers;
|
|
237
|
+
|
|
220
238
|
exports.createFetchStoreDistributionChannelsQueryMock = createFetchStoreDistributionChannelsQueryMock;
|
|
221
|
-
exports.customFieldDefinitionsMockHanders = handlers$
|
|
222
|
-
exports.isFieldDuplicatedMockHandlers = handlers$
|
|
223
|
-
exports.platformLimitsMockHandlers = handlers$
|
|
224
|
-
exports.productSelectionsFetcherMockHandler = handlers$
|
|
225
|
-
exports.productSelectionsTotalFetcherMockHandler = handlers$
|
|
226
|
-
exports.
|
|
227
|
-
exports.
|
|
228
|
-
exports.
|
|
229
|
-
exports.
|
|
239
|
+
exports.customFieldDefinitionsMockHanders = handlers$h;
|
|
240
|
+
exports.isFieldDuplicatedMockHandlers = handlers$f;
|
|
241
|
+
exports.platformLimitsMockHandlers = handlers$3;
|
|
242
|
+
exports.productSelectionsFetcherMockHandler = handlers$d;
|
|
243
|
+
exports.productSelectionsTotalFetcherMockHandler = handlers$b;
|
|
244
|
+
exports.recurrenceIntervalsMockHandlers = handlers$1;
|
|
245
|
+
exports.storesListConnectorMockHandlers = handlers$9;
|
|
246
|
+
exports.useStoreByFieldFetcherHandlers = handlers$7;
|
|
247
|
+
exports.useStoresByWherePredicateFetcherHandlers = handlers$5;
|
|
248
|
+
exports.useTotalNumberOfStoresFetcherHandlers = handlers$j;
|
|
@@ -11,7 +11,7 @@ import { graphql } from 'msw';
|
|
|
11
11
|
import _lastIndexOfInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/last-index-of';
|
|
12
12
|
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
13
13
|
|
|
14
|
-
const handlers$
|
|
14
|
+
const handlers$i = {
|
|
15
15
|
TotalNumberOfStores: {
|
|
16
16
|
all: total => graphql.query('TotalNumberOfStores', (req, res, ctx) => {
|
|
17
17
|
return res(ctx.data({
|
|
@@ -22,16 +22,16 @@ const handlers$g = {
|
|
|
22
22
|
})
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
var handlers$
|
|
25
|
+
var handlers$j = handlers$i;
|
|
26
26
|
|
|
27
|
-
const handlers$
|
|
27
|
+
const handlers$g = {
|
|
28
28
|
TypeDefinitions: {
|
|
29
29
|
all: typeDefinitions => graphql.query('FetchTypeDefinitionsQuery', (req, res, ctx) => res(ctx.data({
|
|
30
30
|
typeDefinitions
|
|
31
31
|
})))
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
var handlers$
|
|
34
|
+
var handlers$h = handlers$g;
|
|
35
35
|
|
|
36
36
|
const graphqlQueries = {
|
|
37
37
|
ASSOCIATE_ROLE: 'associateRoles',
|
|
@@ -57,7 +57,7 @@ const graphqlQueries = {
|
|
|
57
57
|
TAX_CATEGORY: 'taxCategories',
|
|
58
58
|
ZONE: 'zones'
|
|
59
59
|
};
|
|
60
|
-
const handlers$
|
|
60
|
+
const handlers$e = {
|
|
61
61
|
DuplicatedField: {
|
|
62
62
|
total: (total, resourceType) => graphql.query('FetchResourceTypeDuplicatedField', (req, res, ctx) => {
|
|
63
63
|
if (!graphqlQueries[resourceType]) return res(ctx.data({}));
|
|
@@ -69,18 +69,18 @@ const handlers$c = {
|
|
|
69
69
|
})
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
var handlers$
|
|
72
|
+
var handlers$f = handlers$e;
|
|
73
73
|
|
|
74
|
-
const handlers$
|
|
74
|
+
const handlers$c = {
|
|
75
75
|
ProductSelections: {
|
|
76
76
|
all: productSelections => graphql.query('FetchProductSelections', (req, res, ctx) => res(ctx.data({
|
|
77
77
|
productSelections
|
|
78
78
|
})))
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
var handlers$
|
|
81
|
+
var handlers$d = handlers$c;
|
|
82
82
|
|
|
83
|
-
const handlers$
|
|
83
|
+
const handlers$a = {
|
|
84
84
|
ProductSelections: {
|
|
85
85
|
total: total => graphql.query('FetchProductSelectionsTotal', (req, res, ctx) => res(ctx.data({
|
|
86
86
|
productSelections: {
|
|
@@ -90,13 +90,13 @@ const handlers$8 = {
|
|
|
90
90
|
})))
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
|
-
var handlers$
|
|
93
|
+
var handlers$b = handlers$a;
|
|
94
94
|
|
|
95
95
|
const extractKeysFromWherePredicateClause = function () {
|
|
96
96
|
let whereClause = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
97
97
|
return whereClause.substring(_lastIndexOfInstanceProperty(whereClause).call(whereClause, '("') + 1, _lastIndexOfInstanceProperty(whereClause).call(whereClause, '")')).replace(/["]/g, '').split(', ');
|
|
98
98
|
};
|
|
99
|
-
const handlers$
|
|
99
|
+
const handlers$8 = {
|
|
100
100
|
StoresList: {
|
|
101
101
|
all: stores => graphql.query('FetchStoresQuery', (req, res, ctx) => {
|
|
102
102
|
// GIVEN req.variables.where is specified
|
|
@@ -144,9 +144,9 @@ const handlers$6 = {
|
|
|
144
144
|
})
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
|
-
var handlers$
|
|
147
|
+
var handlers$9 = handlers$8;
|
|
148
148
|
|
|
149
|
-
const handlers$
|
|
149
|
+
const handlers$6 = {
|
|
150
150
|
FetchStoresByField: {
|
|
151
151
|
all: stores => graphql.query('FetchStoresByField', (req, res, ctx) => {
|
|
152
152
|
return res(ctx.data({
|
|
@@ -155,9 +155,9 @@ const handlers$4 = {
|
|
|
155
155
|
})
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
|
-
var handlers$
|
|
158
|
+
var handlers$7 = handlers$6;
|
|
159
159
|
|
|
160
|
-
const handlers$
|
|
160
|
+
const handlers$4 = {
|
|
161
161
|
FetchStoresByWherePredicate: {
|
|
162
162
|
all: stores => graphql.query('FetchStoresByWherePredicate', (req, res, ctx) => {
|
|
163
163
|
return res(ctx.data({
|
|
@@ -169,16 +169,16 @@ const handlers$2 = {
|
|
|
169
169
|
})
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
-
var handlers$
|
|
172
|
+
var handlers$5 = handlers$4;
|
|
173
173
|
|
|
174
|
-
const handlers = {
|
|
174
|
+
const handlers$2 = {
|
|
175
175
|
PlatformLimits: {
|
|
176
176
|
all: platformLimiits => graphql.query('PlatformLimitsFetcherQuery', (req, res, ctx) => res(ctx.data({
|
|
177
177
|
limits: platformLimiits
|
|
178
178
|
})))
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
|
-
var handlers$
|
|
181
|
+
var handlers$3 = handlers$2;
|
|
182
182
|
|
|
183
183
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
184
184
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -200,4 +200,22 @@ const createFetchStoreDistributionChannelsQueryMock = custom => _objectSpread({
|
|
|
200
200
|
}
|
|
201
201
|
}, custom);
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
const handlers = {
|
|
204
|
+
FetchRecurrencePolicies: {
|
|
205
|
+
all: function () {
|
|
206
|
+
let policies = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
207
|
+
return graphql.query('FetchRecurrencePolicies', (_, res, ctx) => {
|
|
208
|
+
return res(ctx.data({
|
|
209
|
+
recurrencePolicies: {
|
|
210
|
+
__typename: 'RecurrencePolicyQueryResult',
|
|
211
|
+
results: policies,
|
|
212
|
+
total: policies.length
|
|
213
|
+
}
|
|
214
|
+
}));
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
var handlers$1 = handlers;
|
|
220
|
+
|
|
221
|
+
export { createFetchStoreDistributionChannelsQueryMock, handlers$h as customFieldDefinitionsMockHanders, handlers$f as isFieldDuplicatedMockHandlers, handlers$3 as platformLimitsMockHandlers, handlers$d as productSelectionsFetcherMockHandler, handlers$b as productSelectionsTotalFetcherMockHandler, handlers$1 as recurrenceIntervalsMockHandlers, handlers$9 as storesListConnectorMockHandlers, handlers$7 as useStoreByFieldFetcherHandlers, handlers$5 as useStoresByWherePredicateFetcherHandlers, handlers$j as useTotalNumberOfStoresFetcherHandlers };
|