@commercetools-frontend/application-shell-connectors 22.10.0 → 22.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-application-shell-connectors.cjs.dev.js +25 -22
- package/dist/commercetools-frontend-application-shell-connectors.cjs.prod.js +25 -22
- package/dist/commercetools-frontend-application-shell-connectors.esm.js +25 -22
- package/dist/declarations/src/components/custom-view-context/custom-view-context.d.ts +5 -3
- package/dist/declarations/src/types/generated/settings.d.ts +114 -1
- package/package.json +5 -5
|
@@ -81,7 +81,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
|
|
|
81
81
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
82
82
|
|
|
83
83
|
// NOTE: This string will be replaced on build time with the package version.
|
|
84
|
-
var version = "22.
|
|
84
|
+
var version = "22.12.0";
|
|
85
85
|
|
|
86
86
|
// From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
|
|
87
87
|
const getDisplayName = Component => {
|
|
@@ -126,8 +126,8 @@ function getMcApiUrl() {
|
|
|
126
126
|
return environment.mcApiUrl;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
function ownKeys$
|
|
130
|
-
function _objectSpread$
|
|
129
|
+
function ownKeys$7(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; }
|
|
130
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$7(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
131
131
|
// Menu visibilities
|
|
132
132
|
|
|
133
133
|
// Permissions
|
|
@@ -160,7 +160,7 @@ const normalizeAllAppliedPermissions = allAppliedPermissions => {
|
|
|
160
160
|
}
|
|
161
161
|
return _reduceInstanceProperty__default["default"](allAppliedPermissions).call(allAppliedPermissions, (transformedAllApplied, allApplied) => {
|
|
162
162
|
if (!allApplied) return transformedAllApplied;
|
|
163
|
-
return _objectSpread$
|
|
163
|
+
return _objectSpread$7(_objectSpread$7({}, transformedAllApplied), {}, {
|
|
164
164
|
[allApplied.name]: allApplied.value
|
|
165
165
|
});
|
|
166
166
|
}, {});
|
|
@@ -171,7 +171,7 @@ const normalizeAllAppliedMenuVisibilities = allAppliedMenuVisibilities => {
|
|
|
171
171
|
}
|
|
172
172
|
return _reduceInstanceProperty__default["default"](allAppliedMenuVisibilities).call(allAppliedMenuVisibilities, (transformedAllApplied, allApplied) => {
|
|
173
173
|
if (!allApplied) return transformedAllApplied;
|
|
174
|
-
return _objectSpread$
|
|
174
|
+
return _objectSpread$7(_objectSpread$7({}, transformedAllApplied), {}, {
|
|
175
175
|
[allApplied.name]: allApplied.value
|
|
176
176
|
});
|
|
177
177
|
}, {});
|
|
@@ -183,8 +183,8 @@ const normalizeAllAppliedActionRights = allAppliedActionRights => {
|
|
|
183
183
|
return _reduceInstanceProperty__default["default"](allAppliedActionRights).call(allAppliedActionRights, (transformedAllApplied, allApplied) => {
|
|
184
184
|
if (!allApplied) return transformedAllApplied;
|
|
185
185
|
const previousAllAppliedGroup = transformedAllApplied[allApplied.group];
|
|
186
|
-
return _objectSpread$
|
|
187
|
-
[allApplied.group]: _objectSpread$
|
|
186
|
+
return _objectSpread$7(_objectSpread$7({}, transformedAllApplied), {}, {
|
|
187
|
+
[allApplied.group]: _objectSpread$7(_objectSpread$7({}, previousAllAppliedGroup), {}, {
|
|
188
188
|
[allApplied.name]: allApplied.value
|
|
189
189
|
})
|
|
190
190
|
});
|
|
@@ -195,7 +195,7 @@ const normalizeAppliedDataFencesForStoresByResourceType = dataFences => {
|
|
|
195
195
|
const groupedByResourceType = _reduceInstanceProperty__default["default"](dataFences).call(dataFences, (previousGroupsOfSameType, appliedDataFence) => {
|
|
196
196
|
if (!appliedDataFence) return previousGroupsOfSameType;
|
|
197
197
|
const previousGroup = previousGroupsOfSameType[appliedDataFence.group];
|
|
198
|
-
return _objectSpread$
|
|
198
|
+
return _objectSpread$7(_objectSpread$7({}, previousGroupsOfSameType), {}, {
|
|
199
199
|
[appliedDataFence.group]: [...(previousGroup || []), appliedDataFence]
|
|
200
200
|
});
|
|
201
201
|
}, {});
|
|
@@ -207,13 +207,13 @@ const normalizeAppliedDataFencesForStoresByResourceType = dataFences => {
|
|
|
207
207
|
const dataFenceByName = nextDataFenceValues[dataFence.name] || {
|
|
208
208
|
values: []
|
|
209
209
|
};
|
|
210
|
-
return _objectSpread$
|
|
211
|
-
[dataFence.name]: _objectSpread$
|
|
210
|
+
return _objectSpread$7(_objectSpread$7({}, nextDataFenceValues), {}, {
|
|
211
|
+
[dataFence.name]: _objectSpread$7(_objectSpread$7({}, dataFenceByName), {}, {
|
|
212
212
|
values: [..._valuesInstanceProperty__default["default"](dataFenceByName), dataFence.value]
|
|
213
213
|
})
|
|
214
214
|
});
|
|
215
215
|
}, {});
|
|
216
|
-
return _objectSpread$
|
|
216
|
+
return _objectSpread$7(_objectSpread$7({}, previousGroupedByResourceType), {}, {
|
|
217
217
|
[resourceType]: groupByDataFenceName
|
|
218
218
|
});
|
|
219
219
|
}, {});
|
|
@@ -257,19 +257,19 @@ const normalizeAllAppliedDataFences = allAppliedDataFences => {
|
|
|
257
257
|
const groupedByType = _reduceInstanceProperty__default["default"](allAppliedDataFences).call(allAppliedDataFences, (previousGroupsOfSameType, appliedDataFence) => {
|
|
258
258
|
if (!appliedDataFence) return previousGroupsOfSameType;
|
|
259
259
|
const previousGroup = previousGroupsOfSameType[appliedDataFence.type];
|
|
260
|
-
return _objectSpread$
|
|
260
|
+
return _objectSpread$7(_objectSpread$7({}, previousGroupsOfSameType), {}, {
|
|
261
261
|
[appliedDataFence.type]: [...(previousGroup || []), appliedDataFence]
|
|
262
262
|
});
|
|
263
263
|
}, {});
|
|
264
|
-
const normalizedDataFences = _objectSpread$
|
|
264
|
+
const normalizedDataFences = _objectSpread$7({}, 'store' in groupedByType ? {
|
|
265
265
|
store: normalizeAppliedDataFencesForStoresByResourceType(groupedByType.store)
|
|
266
266
|
} : {});
|
|
267
267
|
if (_Object$keys__default["default"](normalizedDataFences).length > 0) return normalizedDataFences;
|
|
268
268
|
return null;
|
|
269
269
|
};
|
|
270
270
|
|
|
271
|
-
function ownKeys$
|
|
272
|
-
function _objectSpread$
|
|
271
|
+
function ownKeys$6(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; }
|
|
272
|
+
function _objectSpread$6(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$6(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$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
273
273
|
const Context$2 = /*#__PURE__*/react.createContext({});
|
|
274
274
|
const defaultTimeZone = moment__default["default"].tz.guess() || 'Etc/UTC';
|
|
275
275
|
|
|
@@ -303,7 +303,7 @@ const mapUserToApplicationContextUser = user => {
|
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
|
-
applicationContextUser.idTokenUserInfo = _objectSpread$
|
|
306
|
+
applicationContextUser.idTokenUserInfo = _objectSpread$6(_objectSpread$6({}, user.idTokenUserInfo), {}, {
|
|
307
307
|
additionalClaims
|
|
308
308
|
});
|
|
309
309
|
}
|
|
@@ -311,7 +311,7 @@ const mapUserToApplicationContextUser = user => {
|
|
|
311
311
|
};
|
|
312
312
|
|
|
313
313
|
// Adjust certain fields which depend e.g. on the origin
|
|
314
|
-
const mapEnvironmentToApplicationContextEnvironment = (environment, origin) => _objectSpread$
|
|
314
|
+
const mapEnvironmentToApplicationContextEnvironment = (environment, origin) => _objectSpread$6(_objectSpread$6({}, environment), {}, {
|
|
315
315
|
// NOTE: The `mcApiUrl` depends on `servedByProxy`
|
|
316
316
|
mcApiUrl: getMcApiUrl(environment, origin)
|
|
317
317
|
});
|
|
@@ -371,7 +371,7 @@ function withApplicationContext(mapApplicationContextToProps) {
|
|
|
371
371
|
const mappedProps = mapApplicationContextToProps ? mapApplicationContextToProps(applicationContext) : {
|
|
372
372
|
applicationContext
|
|
373
373
|
};
|
|
374
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
374
|
+
return jsxRuntime.jsx(Component, _objectSpread$6(_objectSpread$6({}, props), mappedProps));
|
|
375
375
|
}
|
|
376
376
|
});
|
|
377
377
|
WrappedComponent.displayName = "withApplicationContext(".concat(getDisplayName(Component), ")");
|
|
@@ -398,11 +398,13 @@ function useApplicationContextHook(selector) {
|
|
|
398
398
|
// See related issue: https://github.com/babel/babel/issues/8361
|
|
399
399
|
const useApplicationContext = useApplicationContextHook;
|
|
400
400
|
|
|
401
|
+
function ownKeys$5(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; }
|
|
402
|
+
function _objectSpread$5(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$5(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$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
401
403
|
const Context$1 = /*#__PURE__*/react.createContext({});
|
|
402
404
|
const CustomViewContextProvider = props => {
|
|
403
405
|
const contextValue = react.useMemo(() => ({
|
|
404
406
|
hostUrl: props.hostUrl,
|
|
405
|
-
|
|
407
|
+
customViewConfig: props.customViewConfig
|
|
406
408
|
}), [props.hostUrl, props.customViewConfig]);
|
|
407
409
|
return jsxRuntime.jsx(Context$1.Provider, {
|
|
408
410
|
value: contextValue,
|
|
@@ -420,13 +422,14 @@ CustomViewContextProvider.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
420
422
|
// Then implement the function. Typescript will pick the appropriate signature
|
|
421
423
|
// based on the function arguments.
|
|
422
424
|
function useCustomViewContextHook(selector) {
|
|
423
|
-
const context = react.useContext(Context$1);
|
|
424
425
|
// Because of the way the CustomViewShell configures the Context.Provider,
|
|
425
426
|
// we ensure that, when we read from the context, we always get actual
|
|
426
427
|
// context object and not the initial value.
|
|
427
428
|
// Therefore, we can safely cast the value to be out `TCustomViewContext` type.
|
|
428
|
-
const customViewContext =
|
|
429
|
-
|
|
429
|
+
const customViewContext = react.useContext(Context$1);
|
|
430
|
+
const applicationContext = useApplicationContext();
|
|
431
|
+
const mergedContext = _objectSpread$5(_objectSpread$5({}, applicationContext), customViewContext);
|
|
432
|
+
return selector ? selector(mergedContext) : mergedContext;
|
|
430
433
|
}
|
|
431
434
|
|
|
432
435
|
// This is a workaround to trick babel/rollup to correctly export the function.
|
|
@@ -79,7 +79,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
|
|
|
79
79
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
80
80
|
|
|
81
81
|
// NOTE: This string will be replaced on build time with the package version.
|
|
82
|
-
var version = "22.
|
|
82
|
+
var version = "22.12.0";
|
|
83
83
|
|
|
84
84
|
// From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
|
|
85
85
|
const getDisplayName = Component => {
|
|
@@ -124,8 +124,8 @@ function getMcApiUrl() {
|
|
|
124
124
|
return environment.mcApiUrl;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
function ownKeys$
|
|
128
|
-
function _objectSpread$
|
|
127
|
+
function ownKeys$7(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; }
|
|
128
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$7(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
129
129
|
// Menu visibilities
|
|
130
130
|
|
|
131
131
|
// Permissions
|
|
@@ -158,7 +158,7 @@ const normalizeAllAppliedPermissions = allAppliedPermissions => {
|
|
|
158
158
|
}
|
|
159
159
|
return _reduceInstanceProperty__default["default"](allAppliedPermissions).call(allAppliedPermissions, (transformedAllApplied, allApplied) => {
|
|
160
160
|
if (!allApplied) return transformedAllApplied;
|
|
161
|
-
return _objectSpread$
|
|
161
|
+
return _objectSpread$7(_objectSpread$7({}, transformedAllApplied), {}, {
|
|
162
162
|
[allApplied.name]: allApplied.value
|
|
163
163
|
});
|
|
164
164
|
}, {});
|
|
@@ -169,7 +169,7 @@ const normalizeAllAppliedMenuVisibilities = allAppliedMenuVisibilities => {
|
|
|
169
169
|
}
|
|
170
170
|
return _reduceInstanceProperty__default["default"](allAppliedMenuVisibilities).call(allAppliedMenuVisibilities, (transformedAllApplied, allApplied) => {
|
|
171
171
|
if (!allApplied) return transformedAllApplied;
|
|
172
|
-
return _objectSpread$
|
|
172
|
+
return _objectSpread$7(_objectSpread$7({}, transformedAllApplied), {}, {
|
|
173
173
|
[allApplied.name]: allApplied.value
|
|
174
174
|
});
|
|
175
175
|
}, {});
|
|
@@ -181,8 +181,8 @@ const normalizeAllAppliedActionRights = allAppliedActionRights => {
|
|
|
181
181
|
return _reduceInstanceProperty__default["default"](allAppliedActionRights).call(allAppliedActionRights, (transformedAllApplied, allApplied) => {
|
|
182
182
|
if (!allApplied) return transformedAllApplied;
|
|
183
183
|
const previousAllAppliedGroup = transformedAllApplied[allApplied.group];
|
|
184
|
-
return _objectSpread$
|
|
185
|
-
[allApplied.group]: _objectSpread$
|
|
184
|
+
return _objectSpread$7(_objectSpread$7({}, transformedAllApplied), {}, {
|
|
185
|
+
[allApplied.group]: _objectSpread$7(_objectSpread$7({}, previousAllAppliedGroup), {}, {
|
|
186
186
|
[allApplied.name]: allApplied.value
|
|
187
187
|
})
|
|
188
188
|
});
|
|
@@ -193,7 +193,7 @@ const normalizeAppliedDataFencesForStoresByResourceType = dataFences => {
|
|
|
193
193
|
const groupedByResourceType = _reduceInstanceProperty__default["default"](dataFences).call(dataFences, (previousGroupsOfSameType, appliedDataFence) => {
|
|
194
194
|
if (!appliedDataFence) return previousGroupsOfSameType;
|
|
195
195
|
const previousGroup = previousGroupsOfSameType[appliedDataFence.group];
|
|
196
|
-
return _objectSpread$
|
|
196
|
+
return _objectSpread$7(_objectSpread$7({}, previousGroupsOfSameType), {}, {
|
|
197
197
|
[appliedDataFence.group]: [...(previousGroup || []), appliedDataFence]
|
|
198
198
|
});
|
|
199
199
|
}, {});
|
|
@@ -205,13 +205,13 @@ const normalizeAppliedDataFencesForStoresByResourceType = dataFences => {
|
|
|
205
205
|
const dataFenceByName = nextDataFenceValues[dataFence.name] || {
|
|
206
206
|
values: []
|
|
207
207
|
};
|
|
208
|
-
return _objectSpread$
|
|
209
|
-
[dataFence.name]: _objectSpread$
|
|
208
|
+
return _objectSpread$7(_objectSpread$7({}, nextDataFenceValues), {}, {
|
|
209
|
+
[dataFence.name]: _objectSpread$7(_objectSpread$7({}, dataFenceByName), {}, {
|
|
210
210
|
values: [..._valuesInstanceProperty__default["default"](dataFenceByName), dataFence.value]
|
|
211
211
|
})
|
|
212
212
|
});
|
|
213
213
|
}, {});
|
|
214
|
-
return _objectSpread$
|
|
214
|
+
return _objectSpread$7(_objectSpread$7({}, previousGroupedByResourceType), {}, {
|
|
215
215
|
[resourceType]: groupByDataFenceName
|
|
216
216
|
});
|
|
217
217
|
}, {});
|
|
@@ -255,19 +255,19 @@ const normalizeAllAppliedDataFences = allAppliedDataFences => {
|
|
|
255
255
|
const groupedByType = _reduceInstanceProperty__default["default"](allAppliedDataFences).call(allAppliedDataFences, (previousGroupsOfSameType, appliedDataFence) => {
|
|
256
256
|
if (!appliedDataFence) return previousGroupsOfSameType;
|
|
257
257
|
const previousGroup = previousGroupsOfSameType[appliedDataFence.type];
|
|
258
|
-
return _objectSpread$
|
|
258
|
+
return _objectSpread$7(_objectSpread$7({}, previousGroupsOfSameType), {}, {
|
|
259
259
|
[appliedDataFence.type]: [...(previousGroup || []), appliedDataFence]
|
|
260
260
|
});
|
|
261
261
|
}, {});
|
|
262
|
-
const normalizedDataFences = _objectSpread$
|
|
262
|
+
const normalizedDataFences = _objectSpread$7({}, 'store' in groupedByType ? {
|
|
263
263
|
store: normalizeAppliedDataFencesForStoresByResourceType(groupedByType.store)
|
|
264
264
|
} : {});
|
|
265
265
|
if (_Object$keys__default["default"](normalizedDataFences).length > 0) return normalizedDataFences;
|
|
266
266
|
return null;
|
|
267
267
|
};
|
|
268
268
|
|
|
269
|
-
function ownKeys$
|
|
270
|
-
function _objectSpread$
|
|
269
|
+
function ownKeys$6(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; }
|
|
270
|
+
function _objectSpread$6(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$6(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$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
271
271
|
const Context$2 = /*#__PURE__*/react.createContext({});
|
|
272
272
|
const defaultTimeZone = moment__default["default"].tz.guess() || 'Etc/UTC';
|
|
273
273
|
|
|
@@ -301,7 +301,7 @@ const mapUserToApplicationContextUser = user => {
|
|
|
301
301
|
}
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
|
-
applicationContextUser.idTokenUserInfo = _objectSpread$
|
|
304
|
+
applicationContextUser.idTokenUserInfo = _objectSpread$6(_objectSpread$6({}, user.idTokenUserInfo), {}, {
|
|
305
305
|
additionalClaims
|
|
306
306
|
});
|
|
307
307
|
}
|
|
@@ -309,7 +309,7 @@ const mapUserToApplicationContextUser = user => {
|
|
|
309
309
|
};
|
|
310
310
|
|
|
311
311
|
// Adjust certain fields which depend e.g. on the origin
|
|
312
|
-
const mapEnvironmentToApplicationContextEnvironment = (environment, origin) => _objectSpread$
|
|
312
|
+
const mapEnvironmentToApplicationContextEnvironment = (environment, origin) => _objectSpread$6(_objectSpread$6({}, environment), {}, {
|
|
313
313
|
// NOTE: The `mcApiUrl` depends on `servedByProxy`
|
|
314
314
|
mcApiUrl: getMcApiUrl(environment, origin)
|
|
315
315
|
});
|
|
@@ -364,7 +364,7 @@ function withApplicationContext(mapApplicationContextToProps) {
|
|
|
364
364
|
const mappedProps = mapApplicationContextToProps ? mapApplicationContextToProps(applicationContext) : {
|
|
365
365
|
applicationContext
|
|
366
366
|
};
|
|
367
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
367
|
+
return jsxRuntime.jsx(Component, _objectSpread$6(_objectSpread$6({}, props), mappedProps));
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
370
|
WrappedComponent.displayName = "withApplicationContext(".concat(getDisplayName(Component), ")");
|
|
@@ -391,11 +391,13 @@ function useApplicationContextHook(selector) {
|
|
|
391
391
|
// See related issue: https://github.com/babel/babel/issues/8361
|
|
392
392
|
const useApplicationContext = useApplicationContextHook;
|
|
393
393
|
|
|
394
|
+
function ownKeys$5(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; }
|
|
395
|
+
function _objectSpread$5(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$5(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$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
394
396
|
const Context$1 = /*#__PURE__*/react.createContext({});
|
|
395
397
|
const CustomViewContextProvider = props => {
|
|
396
398
|
const contextValue = react.useMemo(() => ({
|
|
397
399
|
hostUrl: props.hostUrl,
|
|
398
|
-
|
|
400
|
+
customViewConfig: props.customViewConfig
|
|
399
401
|
}), [props.hostUrl, props.customViewConfig]);
|
|
400
402
|
return jsxRuntime.jsx(Context$1.Provider, {
|
|
401
403
|
value: contextValue,
|
|
@@ -409,13 +411,14 @@ CustomViewContextProvider.propTypes = {};
|
|
|
409
411
|
// Then implement the function. Typescript will pick the appropriate signature
|
|
410
412
|
// based on the function arguments.
|
|
411
413
|
function useCustomViewContextHook(selector) {
|
|
412
|
-
const context = react.useContext(Context$1);
|
|
413
414
|
// Because of the way the CustomViewShell configures the Context.Provider,
|
|
414
415
|
// we ensure that, when we read from the context, we always get actual
|
|
415
416
|
// context object and not the initial value.
|
|
416
417
|
// Therefore, we can safely cast the value to be out `TCustomViewContext` type.
|
|
417
|
-
const customViewContext =
|
|
418
|
-
|
|
418
|
+
const customViewContext = react.useContext(Context$1);
|
|
419
|
+
const applicationContext = useApplicationContext();
|
|
420
|
+
const mergedContext = _objectSpread$5(_objectSpread$5({}, applicationContext), customViewContext);
|
|
421
|
+
return selector ? selector(mergedContext) : mergedContext;
|
|
419
422
|
}
|
|
420
423
|
|
|
421
424
|
// This is a workaround to trick babel/rollup to correctly export the function.
|
|
@@ -46,7 +46,7 @@ import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringif
|
|
|
46
46
|
import { RetryLink } from '@apollo/client/link/retry';
|
|
47
47
|
|
|
48
48
|
// NOTE: This string will be replaced on build time with the package version.
|
|
49
|
-
var version = "22.
|
|
49
|
+
var version = "22.12.0";
|
|
50
50
|
|
|
51
51
|
// From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
|
|
52
52
|
const getDisplayName = Component => {
|
|
@@ -91,8 +91,8 @@ function getMcApiUrl() {
|
|
|
91
91
|
return environment.mcApiUrl;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
function ownKeys$
|
|
95
|
-
function _objectSpread$
|
|
94
|
+
function ownKeys$7(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; }
|
|
95
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$7(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$7(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
96
96
|
// Menu visibilities
|
|
97
97
|
|
|
98
98
|
// Permissions
|
|
@@ -125,7 +125,7 @@ const normalizeAllAppliedPermissions = allAppliedPermissions => {
|
|
|
125
125
|
}
|
|
126
126
|
return _reduceInstanceProperty(allAppliedPermissions).call(allAppliedPermissions, (transformedAllApplied, allApplied) => {
|
|
127
127
|
if (!allApplied) return transformedAllApplied;
|
|
128
|
-
return _objectSpread$
|
|
128
|
+
return _objectSpread$7(_objectSpread$7({}, transformedAllApplied), {}, {
|
|
129
129
|
[allApplied.name]: allApplied.value
|
|
130
130
|
});
|
|
131
131
|
}, {});
|
|
@@ -136,7 +136,7 @@ const normalizeAllAppliedMenuVisibilities = allAppliedMenuVisibilities => {
|
|
|
136
136
|
}
|
|
137
137
|
return _reduceInstanceProperty(allAppliedMenuVisibilities).call(allAppliedMenuVisibilities, (transformedAllApplied, allApplied) => {
|
|
138
138
|
if (!allApplied) return transformedAllApplied;
|
|
139
|
-
return _objectSpread$
|
|
139
|
+
return _objectSpread$7(_objectSpread$7({}, transformedAllApplied), {}, {
|
|
140
140
|
[allApplied.name]: allApplied.value
|
|
141
141
|
});
|
|
142
142
|
}, {});
|
|
@@ -148,8 +148,8 @@ const normalizeAllAppliedActionRights = allAppliedActionRights => {
|
|
|
148
148
|
return _reduceInstanceProperty(allAppliedActionRights).call(allAppliedActionRights, (transformedAllApplied, allApplied) => {
|
|
149
149
|
if (!allApplied) return transformedAllApplied;
|
|
150
150
|
const previousAllAppliedGroup = transformedAllApplied[allApplied.group];
|
|
151
|
-
return _objectSpread$
|
|
152
|
-
[allApplied.group]: _objectSpread$
|
|
151
|
+
return _objectSpread$7(_objectSpread$7({}, transformedAllApplied), {}, {
|
|
152
|
+
[allApplied.group]: _objectSpread$7(_objectSpread$7({}, previousAllAppliedGroup), {}, {
|
|
153
153
|
[allApplied.name]: allApplied.value
|
|
154
154
|
})
|
|
155
155
|
});
|
|
@@ -160,7 +160,7 @@ const normalizeAppliedDataFencesForStoresByResourceType = dataFences => {
|
|
|
160
160
|
const groupedByResourceType = _reduceInstanceProperty(dataFences).call(dataFences, (previousGroupsOfSameType, appliedDataFence) => {
|
|
161
161
|
if (!appliedDataFence) return previousGroupsOfSameType;
|
|
162
162
|
const previousGroup = previousGroupsOfSameType[appliedDataFence.group];
|
|
163
|
-
return _objectSpread$
|
|
163
|
+
return _objectSpread$7(_objectSpread$7({}, previousGroupsOfSameType), {}, {
|
|
164
164
|
[appliedDataFence.group]: [...(previousGroup || []), appliedDataFence]
|
|
165
165
|
});
|
|
166
166
|
}, {});
|
|
@@ -172,13 +172,13 @@ const normalizeAppliedDataFencesForStoresByResourceType = dataFences => {
|
|
|
172
172
|
const dataFenceByName = nextDataFenceValues[dataFence.name] || {
|
|
173
173
|
values: []
|
|
174
174
|
};
|
|
175
|
-
return _objectSpread$
|
|
176
|
-
[dataFence.name]: _objectSpread$
|
|
175
|
+
return _objectSpread$7(_objectSpread$7({}, nextDataFenceValues), {}, {
|
|
176
|
+
[dataFence.name]: _objectSpread$7(_objectSpread$7({}, dataFenceByName), {}, {
|
|
177
177
|
values: [..._valuesInstanceProperty(dataFenceByName), dataFence.value]
|
|
178
178
|
})
|
|
179
179
|
});
|
|
180
180
|
}, {});
|
|
181
|
-
return _objectSpread$
|
|
181
|
+
return _objectSpread$7(_objectSpread$7({}, previousGroupedByResourceType), {}, {
|
|
182
182
|
[resourceType]: groupByDataFenceName
|
|
183
183
|
});
|
|
184
184
|
}, {});
|
|
@@ -222,19 +222,19 @@ const normalizeAllAppliedDataFences = allAppliedDataFences => {
|
|
|
222
222
|
const groupedByType = _reduceInstanceProperty(allAppliedDataFences).call(allAppliedDataFences, (previousGroupsOfSameType, appliedDataFence) => {
|
|
223
223
|
if (!appliedDataFence) return previousGroupsOfSameType;
|
|
224
224
|
const previousGroup = previousGroupsOfSameType[appliedDataFence.type];
|
|
225
|
-
return _objectSpread$
|
|
225
|
+
return _objectSpread$7(_objectSpread$7({}, previousGroupsOfSameType), {}, {
|
|
226
226
|
[appliedDataFence.type]: [...(previousGroup || []), appliedDataFence]
|
|
227
227
|
});
|
|
228
228
|
}, {});
|
|
229
|
-
const normalizedDataFences = _objectSpread$
|
|
229
|
+
const normalizedDataFences = _objectSpread$7({}, 'store' in groupedByType ? {
|
|
230
230
|
store: normalizeAppliedDataFencesForStoresByResourceType(groupedByType.store)
|
|
231
231
|
} : {});
|
|
232
232
|
if (_Object$keys(normalizedDataFences).length > 0) return normalizedDataFences;
|
|
233
233
|
return null;
|
|
234
234
|
};
|
|
235
235
|
|
|
236
|
-
function ownKeys$
|
|
237
|
-
function _objectSpread$
|
|
236
|
+
function ownKeys$6(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; }
|
|
237
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$6(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$6(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
238
238
|
const Context$2 = /*#__PURE__*/createContext({});
|
|
239
239
|
const defaultTimeZone = moment.tz.guess() || 'Etc/UTC';
|
|
240
240
|
|
|
@@ -268,7 +268,7 @@ const mapUserToApplicationContextUser = user => {
|
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
|
-
applicationContextUser.idTokenUserInfo = _objectSpread$
|
|
271
|
+
applicationContextUser.idTokenUserInfo = _objectSpread$6(_objectSpread$6({}, user.idTokenUserInfo), {}, {
|
|
272
272
|
additionalClaims
|
|
273
273
|
});
|
|
274
274
|
}
|
|
@@ -276,7 +276,7 @@ const mapUserToApplicationContextUser = user => {
|
|
|
276
276
|
};
|
|
277
277
|
|
|
278
278
|
// Adjust certain fields which depend e.g. on the origin
|
|
279
|
-
const mapEnvironmentToApplicationContextEnvironment = (environment, origin) => _objectSpread$
|
|
279
|
+
const mapEnvironmentToApplicationContextEnvironment = (environment, origin) => _objectSpread$6(_objectSpread$6({}, environment), {}, {
|
|
280
280
|
// NOTE: The `mcApiUrl` depends on `servedByProxy`
|
|
281
281
|
mcApiUrl: getMcApiUrl(environment, origin)
|
|
282
282
|
});
|
|
@@ -336,7 +336,7 @@ function withApplicationContext(mapApplicationContextToProps) {
|
|
|
336
336
|
const mappedProps = mapApplicationContextToProps ? mapApplicationContextToProps(applicationContext) : {
|
|
337
337
|
applicationContext
|
|
338
338
|
};
|
|
339
|
-
return jsx(Component, _objectSpread$
|
|
339
|
+
return jsx(Component, _objectSpread$6(_objectSpread$6({}, props), mappedProps));
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
342
|
WrappedComponent.displayName = "withApplicationContext(".concat(getDisplayName(Component), ")");
|
|
@@ -363,11 +363,13 @@ function useApplicationContextHook(selector) {
|
|
|
363
363
|
// See related issue: https://github.com/babel/babel/issues/8361
|
|
364
364
|
const useApplicationContext = useApplicationContextHook;
|
|
365
365
|
|
|
366
|
+
function ownKeys$5(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; }
|
|
367
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$5(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$5(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
366
368
|
const Context$1 = /*#__PURE__*/createContext({});
|
|
367
369
|
const CustomViewContextProvider = props => {
|
|
368
370
|
const contextValue = useMemo(() => ({
|
|
369
371
|
hostUrl: props.hostUrl,
|
|
370
|
-
|
|
372
|
+
customViewConfig: props.customViewConfig
|
|
371
373
|
}), [props.hostUrl, props.customViewConfig]);
|
|
372
374
|
return jsx(Context$1.Provider, {
|
|
373
375
|
value: contextValue,
|
|
@@ -385,13 +387,14 @@ CustomViewContextProvider.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
385
387
|
// Then implement the function. Typescript will pick the appropriate signature
|
|
386
388
|
// based on the function arguments.
|
|
387
389
|
function useCustomViewContextHook(selector) {
|
|
388
|
-
const context = useContext(Context$1);
|
|
389
390
|
// Because of the way the CustomViewShell configures the Context.Provider,
|
|
390
391
|
// we ensure that, when we read from the context, we always get actual
|
|
391
392
|
// context object and not the initial value.
|
|
392
393
|
// Therefore, we can safely cast the value to be out `TCustomViewContext` type.
|
|
393
|
-
const customViewContext =
|
|
394
|
-
|
|
394
|
+
const customViewContext = useContext(Context$1);
|
|
395
|
+
const applicationContext = useApplicationContext();
|
|
396
|
+
const mergedContext = _objectSpread$5(_objectSpread$5({}, applicationContext), customViewContext);
|
|
397
|
+
return selector ? selector(mergedContext) : mergedContext;
|
|
395
398
|
}
|
|
396
399
|
|
|
397
400
|
// This is a workaround to trick babel/rollup to correctly export the function.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { CustomViewData } from '@commercetools-frontend/constants';
|
|
3
|
+
import { type TApplicationContext } from '../application-context';
|
|
3
4
|
export type TCustomViewContext = {
|
|
4
5
|
hostUrl: string;
|
|
5
|
-
|
|
6
|
+
customViewConfig: CustomViewData;
|
|
6
7
|
};
|
|
8
|
+
export type TMergedContext = TApplicationContext<{}> & TCustomViewContext;
|
|
7
9
|
export type TCustomViewContextProviderProps = {
|
|
8
10
|
hostUrl: string;
|
|
9
11
|
customViewConfig: CustomViewData;
|
|
@@ -11,7 +13,7 @@ export type TCustomViewContextProviderProps = {
|
|
|
11
13
|
};
|
|
12
14
|
declare const Context: import("react").Context<{}>;
|
|
13
15
|
declare const CustomViewContextProvider: (props: TCustomViewContextProviderProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
14
|
-
declare function useCustomViewContextHook():
|
|
15
|
-
declare function useCustomViewContextHook<SelectedContext>(selector: (context:
|
|
16
|
+
declare function useCustomViewContextHook(): TMergedContext;
|
|
17
|
+
declare function useCustomViewContextHook<SelectedContext>(selector: (context: TMergedContext) => SelectedContext): SelectedContext;
|
|
16
18
|
declare const useCustomViewContext: typeof useCustomViewContextHook;
|
|
17
19
|
export { Context, CustomViewContextProvider, useCustomViewContext };
|
|
@@ -596,6 +596,7 @@ export type TMutation = {
|
|
|
596
596
|
activateCustomersSearchListMyView?: Maybe<TCustomersSearchListMyView>;
|
|
597
597
|
activateDashboardView?: Maybe<TDashboardView>;
|
|
598
598
|
activateDiscountCodesCustomView?: Maybe<TDiscountsCustomView>;
|
|
599
|
+
activateOrderDetailView?: Maybe<TOrderDetailView>;
|
|
599
600
|
activateOrdersListView?: Maybe<TOrdersListView>;
|
|
600
601
|
activateOrganizationExtensionOidcSsoConfig?: Maybe<TOrganizationExtension>;
|
|
601
602
|
activatePimSearchListView?: Maybe<TPimSearchListView>;
|
|
@@ -613,6 +614,7 @@ export type TMutation = {
|
|
|
613
614
|
createCustomersSearchListMyView: TCustomersSearchListMyView;
|
|
614
615
|
createDashboardView: TDashboardView;
|
|
615
616
|
createDiscountCodesCustomView: TDiscountsCustomView;
|
|
617
|
+
createOrderDetailView: TOrderDetailView;
|
|
616
618
|
createOrdersListView: TOrdersListView;
|
|
617
619
|
createPimSearchListView: TPimSearchListView;
|
|
618
620
|
createProductDiscountsCustomView: TDiscountsCustomView;
|
|
@@ -625,6 +627,7 @@ export type TMutation = {
|
|
|
625
627
|
deactivateCustomersSearchListMyView?: Maybe<TOrdersListView>;
|
|
626
628
|
deactivateDashboardView?: Maybe<TDashboardView>;
|
|
627
629
|
deactivateDiscountCodesCustomView?: Maybe<TDiscountsCustomView>;
|
|
630
|
+
deactivateOrderDetailView?: Maybe<TOrderDetailView>;
|
|
628
631
|
deactivateOrdersListView?: Maybe<TOrdersListView>;
|
|
629
632
|
deactivateOrganizationExtensionOidcSsoConfig?: Maybe<TOrganizationExtension>;
|
|
630
633
|
deactivatePimSearchListView?: Maybe<TPimSearchListView>;
|
|
@@ -632,6 +635,7 @@ export type TMutation = {
|
|
|
632
635
|
deactivateProductTypeAttributesView?: Maybe<TProductTypeAttributesView>;
|
|
633
636
|
deactivateProjectSettingsStoresView?: Maybe<TProjectSettingsStoresView>;
|
|
634
637
|
deleteAllDashboardViews: Array<TDashboardView>;
|
|
638
|
+
deleteAllOrderDetailViews: Array<TOrderDetailView>;
|
|
635
639
|
deleteAllOrdersListViews: Array<TOrdersListView>;
|
|
636
640
|
deleteBusinessUnitsListMyView?: Maybe<TBusinessUnitsListMyView>;
|
|
637
641
|
deleteCartDiscountsCustomView?: Maybe<TDiscountsCustomView>;
|
|
@@ -642,6 +646,7 @@ export type TMutation = {
|
|
|
642
646
|
deleteCustomersSearchListMyView?: Maybe<TCustomersSearchListMyView>;
|
|
643
647
|
deleteDashboardView?: Maybe<TDashboardView>;
|
|
644
648
|
deleteDiscountCodesCustomView?: Maybe<TDiscountsCustomView>;
|
|
649
|
+
deleteOrderDetailView?: Maybe<TOrderDetailView>;
|
|
645
650
|
deleteOrdersListView?: Maybe<TOrdersListView>;
|
|
646
651
|
deletePimSearchListView?: Maybe<TPimSearchListView>;
|
|
647
652
|
deleteProductDiscountsCustomView?: Maybe<TDiscountsCustomView>;
|
|
@@ -671,6 +676,7 @@ export type TMutation = {
|
|
|
671
676
|
updateCustomersSearchListMyView?: Maybe<TCustomersSearchListMyView>;
|
|
672
677
|
updateDashboardView?: Maybe<TDashboardView>;
|
|
673
678
|
updateDiscountCodesCustomView?: Maybe<TDiscountsCustomView>;
|
|
679
|
+
updateOrderDetailView?: Maybe<TOrderDetailView>;
|
|
674
680
|
updateOrdersListView?: Maybe<TOrdersListView>;
|
|
675
681
|
updatePimSearchListView?: Maybe<TPimSearchListView>;
|
|
676
682
|
updateProductDiscountsCustomView?: Maybe<TDiscountsCustomView>;
|
|
@@ -698,6 +704,9 @@ export type TMutation_ActivateDashboardViewArgs = {
|
|
|
698
704
|
export type TMutation_ActivateDiscountCodesCustomViewArgs = {
|
|
699
705
|
id: Scalars['ID'];
|
|
700
706
|
};
|
|
707
|
+
export type TMutation_ActivateOrderDetailViewArgs = {
|
|
708
|
+
id: Scalars['ID'];
|
|
709
|
+
};
|
|
701
710
|
export type TMutation_ActivateOrdersListViewArgs = {
|
|
702
711
|
id: Scalars['ID'];
|
|
703
712
|
};
|
|
@@ -759,6 +768,9 @@ export type TMutation_CreateDashboardViewArgs = {
|
|
|
759
768
|
export type TMutation_CreateDiscountCodesCustomViewArgs = {
|
|
760
769
|
data: TDiscountsCustomViewInput;
|
|
761
770
|
};
|
|
771
|
+
export type TMutation_CreateOrderDetailViewArgs = {
|
|
772
|
+
data: TOrderDetailViewInput;
|
|
773
|
+
};
|
|
762
774
|
export type TMutation_CreateOrdersListViewArgs = {
|
|
763
775
|
data: TOrdersListViewInput;
|
|
764
776
|
};
|
|
@@ -795,6 +807,9 @@ export type TMutation_DeactivateDashboardViewArgs = {
|
|
|
795
807
|
export type TMutation_DeactivateDiscountCodesCustomViewArgs = {
|
|
796
808
|
id: Scalars['ID'];
|
|
797
809
|
};
|
|
810
|
+
export type TMutation_DeactivateOrderDetailViewArgs = {
|
|
811
|
+
id: Scalars['ID'];
|
|
812
|
+
};
|
|
798
813
|
export type TMutation_DeactivateOrdersListViewArgs = {
|
|
799
814
|
id: Scalars['ID'];
|
|
800
815
|
};
|
|
@@ -843,6 +858,9 @@ export type TMutation_DeleteDashboardViewArgs = {
|
|
|
843
858
|
export type TMutation_DeleteDiscountCodesCustomViewArgs = {
|
|
844
859
|
id: Scalars['ID'];
|
|
845
860
|
};
|
|
861
|
+
export type TMutation_DeleteOrderDetailViewArgs = {
|
|
862
|
+
id: Scalars['ID'];
|
|
863
|
+
};
|
|
846
864
|
export type TMutation_DeleteOrdersListViewArgs = {
|
|
847
865
|
id: Scalars['ID'];
|
|
848
866
|
};
|
|
@@ -954,6 +972,10 @@ export type TMutation_UpdateDiscountCodesCustomViewArgs = {
|
|
|
954
972
|
data: TDiscountsCustomViewInput;
|
|
955
973
|
id: Scalars['ID'];
|
|
956
974
|
};
|
|
975
|
+
export type TMutation_UpdateOrderDetailViewArgs = {
|
|
976
|
+
data: TOrderDetailViewInput;
|
|
977
|
+
id: Scalars['ID'];
|
|
978
|
+
};
|
|
957
979
|
export type TMutation_UpdateOrdersListViewArgs = {
|
|
958
980
|
data: TOrdersListViewInput;
|
|
959
981
|
id: Scalars['ID'];
|
|
@@ -1082,6 +1104,24 @@ export type TOidcSsoConfigDataInput = {
|
|
|
1082
1104
|
sessionTokenExpTimeSeconds?: InputMaybe<Scalars['Int']>;
|
|
1083
1105
|
teamIdForNewUsers: Scalars['String'];
|
|
1084
1106
|
};
|
|
1107
|
+
export type TOrderDetailView = {
|
|
1108
|
+
__typename?: 'OrderDetailView';
|
|
1109
|
+
createdAt: Scalars['DateTime'];
|
|
1110
|
+
id: Scalars['ID'];
|
|
1111
|
+
isActive?: Maybe<Scalars['Boolean']>;
|
|
1112
|
+
nameAllLocales?: Maybe<Array<TLocalizedField>>;
|
|
1113
|
+
projectKey: Scalars['String'];
|
|
1114
|
+
table?: Maybe<TTable>;
|
|
1115
|
+
updatedAt: Scalars['DateTime'];
|
|
1116
|
+
userId: Scalars['String'];
|
|
1117
|
+
};
|
|
1118
|
+
export type TOrderDetailViewInput = {
|
|
1119
|
+
nameAllLocales: Array<TLocalizedFieldCreateInput>;
|
|
1120
|
+
table?: InputMaybe<TOrderDetailViewTableInput>;
|
|
1121
|
+
};
|
|
1122
|
+
export type TOrderDetailViewTableInput = {
|
|
1123
|
+
visibleColumns: Array<Scalars['String']>;
|
|
1124
|
+
};
|
|
1085
1125
|
export declare enum TOrderStatesVisibility {
|
|
1086
1126
|
HideOrderState = "HideOrderState",
|
|
1087
1127
|
HidePaymentState = "HidePaymentState",
|
|
@@ -1149,6 +1189,13 @@ export type TOrganizationExtensionForCustomApplication = {
|
|
|
1149
1189
|
organizationId: Scalars['String'];
|
|
1150
1190
|
organizationName?: Maybe<Scalars['String']>;
|
|
1151
1191
|
};
|
|
1192
|
+
export type TOrganizationExtensionForCustomView = {
|
|
1193
|
+
__typename?: 'OrganizationExtensionForCustomView';
|
|
1194
|
+
customView?: Maybe<TRestrictedCustomViewForOrganization>;
|
|
1195
|
+
id: Scalars['ID'];
|
|
1196
|
+
organizationId: Scalars['String'];
|
|
1197
|
+
organizationName?: Maybe<Scalars['String']>;
|
|
1198
|
+
};
|
|
1152
1199
|
export type TPimSearchListView = {
|
|
1153
1200
|
__typename?: 'PimSearchListView';
|
|
1154
1201
|
createdAt: Scalars['DateTime'];
|
|
@@ -1270,6 +1317,7 @@ export type TQuery = {
|
|
|
1270
1317
|
activeCustomersSearchListMyView?: Maybe<TCustomersSearchListMyView>;
|
|
1271
1318
|
activeDashboardView?: Maybe<TDashboardView>;
|
|
1272
1319
|
activeDiscountCodesCustomView?: Maybe<TDiscountsCustomView>;
|
|
1320
|
+
activeOrderDetailView?: Maybe<TOrderDetailView>;
|
|
1273
1321
|
activeOrdersListView?: Maybe<TOrdersListView>;
|
|
1274
1322
|
activePimSearchListView?: Maybe<TPimSearchListView>;
|
|
1275
1323
|
activeProductDiscountsCustomView?: Maybe<TDiscountsCustomView>;
|
|
@@ -1300,10 +1348,13 @@ export type TQuery = {
|
|
|
1300
1348
|
discountCodesCustomViews: Array<Maybe<TDiscountsCustomView>>;
|
|
1301
1349
|
globalOrganizationExtension?: Maybe<TOrganizationExtension>;
|
|
1302
1350
|
myCustomApplications: Array<TMyCustomApplication>;
|
|
1351
|
+
orderDetailView?: Maybe<TOrderDetailView>;
|
|
1352
|
+
orderDetailViews: Array<Maybe<TOrderDetailView>>;
|
|
1303
1353
|
ordersListView?: Maybe<TOrdersListView>;
|
|
1304
1354
|
ordersListViews: Array<Maybe<TOrdersListView>>;
|
|
1305
1355
|
organizationExtension?: Maybe<TOrganizationExtension>;
|
|
1306
1356
|
organizationExtensionForCustomApplication?: Maybe<TOrganizationExtensionForCustomApplication>;
|
|
1357
|
+
organizationExtensionForCustomView?: Maybe<TOrganizationExtensionForCustomView>;
|
|
1307
1358
|
pimSearchListView?: Maybe<TPimSearchListView>;
|
|
1308
1359
|
pimSearchListViews: Array<Maybe<TPimSearchListView>>;
|
|
1309
1360
|
productDiscountsCustomView?: Maybe<TDiscountsCustomView>;
|
|
@@ -1373,6 +1424,9 @@ export type TQuery_GlobalOrganizationExtensionArgs = {
|
|
|
1373
1424
|
export type TQuery_MyCustomApplicationsArgs = {
|
|
1374
1425
|
params?: InputMaybe<TMyCustomApplicationQueryInput>;
|
|
1375
1426
|
};
|
|
1427
|
+
export type TQuery_OrderDetailViewArgs = {
|
|
1428
|
+
id: Scalars['ID'];
|
|
1429
|
+
};
|
|
1376
1430
|
export type TQuery_OrdersListViewArgs = {
|
|
1377
1431
|
id: Scalars['ID'];
|
|
1378
1432
|
};
|
|
@@ -1382,6 +1436,9 @@ export type TQuery_OrganizationExtensionArgs = {
|
|
|
1382
1436
|
export type TQuery_OrganizationExtensionForCustomApplicationArgs = {
|
|
1383
1437
|
entryPointUriPath: Scalars['String'];
|
|
1384
1438
|
};
|
|
1439
|
+
export type TQuery_OrganizationExtensionForCustomViewArgs = {
|
|
1440
|
+
customViewId: Scalars['String'];
|
|
1441
|
+
};
|
|
1385
1442
|
export type TQuery_PimSearchListViewArgs = {
|
|
1386
1443
|
id: Scalars['ID'];
|
|
1387
1444
|
};
|
|
@@ -1587,7 +1644,8 @@ export type TSampleDataImportMetadata = {
|
|
|
1587
1644
|
dataset?: Maybe<TSampleDatasets>;
|
|
1588
1645
|
};
|
|
1589
1646
|
export declare enum TSampleDatasets {
|
|
1590
|
-
Fashion = "FASHION"
|
|
1647
|
+
Fashion = "FASHION",
|
|
1648
|
+
Goodstore = "GOODSTORE"
|
|
1591
1649
|
}
|
|
1592
1650
|
export type TSort = {
|
|
1593
1651
|
__typename?: 'Sort';
|
|
@@ -1773,6 +1831,17 @@ export type TCreateCustomApplicationFromCliMutation = {
|
|
|
1773
1831
|
id: string;
|
|
1774
1832
|
} | null;
|
|
1775
1833
|
};
|
|
1834
|
+
export type TCreateCustomViewFromCliMutationVariables = Exact<{
|
|
1835
|
+
organizationId: Scalars['String'];
|
|
1836
|
+
data: TCustomViewDraftDataInput;
|
|
1837
|
+
}>;
|
|
1838
|
+
export type TCreateCustomViewFromCliMutation = {
|
|
1839
|
+
__typename?: 'Mutation';
|
|
1840
|
+
createCustomView?: {
|
|
1841
|
+
__typename?: 'RestrictedCustomViewForOrganization';
|
|
1842
|
+
id: string;
|
|
1843
|
+
} | null;
|
|
1844
|
+
};
|
|
1776
1845
|
export type TFetchCustomApplicationFromCliQueryVariables = Exact<{
|
|
1777
1846
|
entryPointUriPath: Scalars['String'];
|
|
1778
1847
|
}>;
|
|
@@ -1818,6 +1887,38 @@ export type TFetchCustomApplicationFromCliQuery = {
|
|
|
1818
1887
|
};
|
|
1819
1888
|
} | null;
|
|
1820
1889
|
};
|
|
1890
|
+
export type TFetchCustomViewFromCliQueryVariables = Exact<{
|
|
1891
|
+
customViewId: Scalars['String'];
|
|
1892
|
+
}>;
|
|
1893
|
+
export type TFetchCustomViewFromCliQuery = {
|
|
1894
|
+
__typename?: 'Query';
|
|
1895
|
+
organizationExtensionForCustomView?: {
|
|
1896
|
+
__typename?: 'OrganizationExtensionForCustomView';
|
|
1897
|
+
organizationId: string;
|
|
1898
|
+
customView?: {
|
|
1899
|
+
__typename?: 'RestrictedCustomViewForOrganization';
|
|
1900
|
+
id: string;
|
|
1901
|
+
defaultLabel: string;
|
|
1902
|
+
url: string;
|
|
1903
|
+
type: TCustomViewType;
|
|
1904
|
+
locators: Array<string>;
|
|
1905
|
+
labelAllLocales: Array<{
|
|
1906
|
+
__typename?: 'LocalizedField';
|
|
1907
|
+
locale: string;
|
|
1908
|
+
value: string;
|
|
1909
|
+
}>;
|
|
1910
|
+
typeSettings?: {
|
|
1911
|
+
__typename?: 'CustomViewTypeSettings';
|
|
1912
|
+
size?: TCustomViewSize | null;
|
|
1913
|
+
} | null;
|
|
1914
|
+
permissions: Array<{
|
|
1915
|
+
__typename?: 'CustomViewPermission';
|
|
1916
|
+
name: string;
|
|
1917
|
+
oAuthScopes: Array<string>;
|
|
1918
|
+
}>;
|
|
1919
|
+
} | null;
|
|
1920
|
+
} | null;
|
|
1921
|
+
};
|
|
1821
1922
|
export type TUpdateCustomApplicationFromCliMutationVariables = Exact<{
|
|
1822
1923
|
organizationId: Scalars['String'];
|
|
1823
1924
|
data: TCustomApplicationDraftDataInput;
|
|
@@ -1830,3 +1931,15 @@ export type TUpdateCustomApplicationFromCliMutation = {
|
|
|
1830
1931
|
id: string;
|
|
1831
1932
|
} | null;
|
|
1832
1933
|
};
|
|
1934
|
+
export type TUpdateCustomViewFromCliMutationVariables = Exact<{
|
|
1935
|
+
organizationId: Scalars['String'];
|
|
1936
|
+
data: TCustomViewDraftDataInput;
|
|
1937
|
+
customViewId: Scalars['String'];
|
|
1938
|
+
}>;
|
|
1939
|
+
export type TUpdateCustomViewFromCliMutation = {
|
|
1940
|
+
__typename?: 'Mutation';
|
|
1941
|
+
updateCustomView?: {
|
|
1942
|
+
__typename?: 'RestrictedCustomViewForOrganization';
|
|
1943
|
+
id: string;
|
|
1944
|
+
} | null;
|
|
1945
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/application-shell-connectors",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.12.0",
|
|
4
4
|
"description": "Contains complementary tools for @commercetools-frontend/application-shell",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@babel/runtime": "^7.22.15",
|
|
39
39
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
40
|
-
"@commercetools-frontend/application-config": "22.
|
|
41
|
-
"@commercetools-frontend/browser-history": "22.
|
|
42
|
-
"@commercetools-frontend/constants": "22.
|
|
43
|
-
"@commercetools-frontend/sentry": "22.
|
|
40
|
+
"@commercetools-frontend/application-config": "22.12.0",
|
|
41
|
+
"@commercetools-frontend/browser-history": "22.12.0",
|
|
42
|
+
"@commercetools-frontend/constants": "22.12.0",
|
|
43
|
+
"@commercetools-frontend/sentry": "22.12.0",
|
|
44
44
|
"@commercetools/http-user-agent": "3.0.0",
|
|
45
45
|
"@emotion/react": "11.11.0",
|
|
46
46
|
"@types/lodash": "^4.14.198",
|