@commercetools-frontend/application-components 22.9.1 → 22.11.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-components.cjs.dev.js +45 -12
- package/dist/commercetools-frontend-application-components.cjs.prod.js +41 -8
- package/dist/commercetools-frontend-application-components.esm.js +44 -13
- package/dist/declarations/src/components/detail-pages/tabular-detail-page/tabular-detail-page.d.ts +2 -1
- package/dist/declarations/src/components/main-pages/tabular-main-page/tabular-main-page.d.ts +2 -1
- package/dist/declarations/src/components/modal-pages/tabular-modal-page/tabular-modal-page.d.ts +2 -1
- package/dist/declarations/src/hooks/use-custom-view-locator-selector/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-custom-view-locator-selector/use-custom-view-locator-selector.d.ts +5 -0
- package/dist/{public-page-layout-c011d275.cjs.dev.js → public-page-layout-27a5ab82.cjs.dev.js} +3 -0
- package/dist/{public-page-layout-055bb438.esm.js → public-page-layout-3a970c93.esm.js} +3 -0
- package/dist/{public-page-layout-3653aa0b.cjs.prod.js → public-page-layout-e73cb2ac.cjs.prod.js} +3 -0
- package/package.json +11 -11
|
@@ -40,8 +40,11 @@ var sentry = require('@commercetools-frontend/sentry');
|
|
|
40
40
|
var Constraints = require('@commercetools-uikit/constraints');
|
|
41
41
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
42
42
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
43
|
+
var reactBroadcast = require('@flopflip/react-broadcast');
|
|
43
44
|
var FlatButton = require('@commercetools-uikit/flat-button');
|
|
44
45
|
var IconButton = require('@commercetools-uikit/icon-button');
|
|
46
|
+
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
47
|
+
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
45
48
|
var PageNotFoundSVG = require('@commercetools-frontend/assets/images/page-not-found.svg');
|
|
46
49
|
var FailedAuthorizationSVG = require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
47
50
|
var useResizeObserver = require('@react-hook/resize-observer');
|
|
@@ -74,12 +77,14 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
|
|
|
74
77
|
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
75
78
|
var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
|
|
76
79
|
var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
|
|
80
|
+
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
81
|
+
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
77
82
|
var PageNotFoundSVG__default = /*#__PURE__*/_interopDefault(PageNotFoundSVG);
|
|
78
83
|
var FailedAuthorizationSVG__default = /*#__PURE__*/_interopDefault(FailedAuthorizationSVG);
|
|
79
84
|
var useResizeObserver__default = /*#__PURE__*/_interopDefault(useResizeObserver);
|
|
80
85
|
|
|
81
86
|
// NOTE: This string will be replaced on build time with the package version.
|
|
82
|
-
var version = "22.
|
|
87
|
+
var version = "22.11.0";
|
|
83
88
|
|
|
84
89
|
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
|
|
85
90
|
const appKitSpacing55 = '40px';
|
|
@@ -157,7 +162,7 @@ const getLinkStyles = (isActive, isDisabled) => [/*#__PURE__*/react.css("font-si
|
|
|
157
162
|
|
|
158
163
|
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; }
|
|
159
164
|
function _objectSpread$7(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$7(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$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
160
|
-
const pathWithoutSearch = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
165
|
+
const pathWithoutSearch$1 = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
161
166
|
const warnIfMissingContent = props => {
|
|
162
167
|
const hasContent = Boolean(props.intlMessage) || Boolean(props.label);
|
|
163
168
|
process.env.NODE_ENV !== "production" ? utils.warning(hasContent, 'TabHeader: one of either `label` or `intlMessage` is required but their values are `undefined`') : void 0;
|
|
@@ -179,7 +184,7 @@ const TabHeader = props => {
|
|
|
179
184
|
const location = reactRouterDom.useLocation();
|
|
180
185
|
const isActive = Boolean(reactRouterDom.matchPath(location.pathname, {
|
|
181
186
|
// strip the search, otherwise the path won't match
|
|
182
|
-
path: pathWithoutSearch(props.to),
|
|
187
|
+
path: pathWithoutSearch$1(props.to),
|
|
183
188
|
exact: props.exactPathMatch,
|
|
184
189
|
strict: false
|
|
185
190
|
}));
|
|
@@ -876,13 +881,15 @@ var FetchCustomViewsQuery = { kind: "Document", definitions: [{ kind: "Operation
|
|
|
876
881
|
const useCustomViewsConnector = _ref => {
|
|
877
882
|
var _data$allCustomViewsI;
|
|
878
883
|
let customViewLocatorCode = _ref.customViewLocatorCode;
|
|
884
|
+
const areCustomViewsEnabled = reactBroadcast.useFeatureToggle(constants.featureFlags.CUSTOM_VIEWS) && process.env.DISABLE_CUSTOM_VIEWS_FEATURE !== 'true';
|
|
879
885
|
const _useMcQuery = applicationShellConnectors.useMcQuery(FetchCustomViewsQuery, {
|
|
880
886
|
variables: {
|
|
881
887
|
customViewLocatorCode
|
|
882
888
|
},
|
|
883
889
|
context: {
|
|
884
890
|
target: constants.GRAPHQL_TARGETS.SETTINGS_SERVICE
|
|
885
|
-
}
|
|
891
|
+
},
|
|
892
|
+
skip: !areCustomViewsEnabled
|
|
886
893
|
}),
|
|
887
894
|
data = _useMcQuery.data,
|
|
888
895
|
error = _useMcQuery.error,
|
|
@@ -1503,6 +1510,26 @@ FormModalPage.defaultProps = defaultProps$a;
|
|
|
1503
1510
|
// The Intl messages can be used for button labels.
|
|
1504
1511
|
FormModalPage.Intl = i18n.sharedMessages;
|
|
1505
1512
|
|
|
1513
|
+
const pathWithoutSearch = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
1514
|
+
const useCustomViewLocatorSelector = function () {
|
|
1515
|
+
var _context;
|
|
1516
|
+
let customViewLocatorCodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1517
|
+
const location = reactRouterDom.useLocation();
|
|
1518
|
+
const customViewLocator = _findInstanceProperty__default["default"](_context = _Object$entries__default["default"](customViewLocatorCodes)).call(_context, _ref => {
|
|
1519
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
1520
|
+
locator = _ref2[1];
|
|
1521
|
+
return reactRouterDom.matchPath(location.pathname, {
|
|
1522
|
+
// strip the search, otherwise the path won't match
|
|
1523
|
+
path: pathWithoutSearch(locator),
|
|
1524
|
+
exact: true,
|
|
1525
|
+
strict: false
|
|
1526
|
+
});
|
|
1527
|
+
});
|
|
1528
|
+
return {
|
|
1529
|
+
currentCustomViewLocatorCode: customViewLocator === null || customViewLocator === void 0 ? void 0 : customViewLocator[0]
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
|
|
1506
1533
|
const TabControls = /*#__PURE__*/_styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
1507
1534
|
target: "elpldre1"
|
|
1508
1535
|
} : {
|
|
@@ -1545,6 +1572,8 @@ const defaultProps$8 = {
|
|
|
1545
1572
|
hideControls: false
|
|
1546
1573
|
};
|
|
1547
1574
|
const TabularModalPage = props => {
|
|
1575
|
+
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
1576
|
+
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
1548
1577
|
return jsxRuntime.jsxs(ModalPage, {
|
|
1549
1578
|
title: props.title,
|
|
1550
1579
|
isOpen: props.isOpen,
|
|
@@ -1556,7 +1585,7 @@ const TabularModalPage = props => {
|
|
|
1556
1585
|
getParentSelector: props.getParentSelector,
|
|
1557
1586
|
shouldDelayOnClose: props.shouldDelayOnClose,
|
|
1558
1587
|
afterOpenStyles: props.afterOpenStyles,
|
|
1559
|
-
customViewLocatorCode:
|
|
1588
|
+
customViewLocatorCode: currentCustomViewLocatorCode,
|
|
1560
1589
|
children: [jsxRuntime.jsxs(TabularPageContainer, {
|
|
1561
1590
|
color: "neutral",
|
|
1562
1591
|
children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
|
|
@@ -1582,7 +1611,7 @@ TabularModalPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1582
1611
|
level: _pt__default["default"].number,
|
|
1583
1612
|
title: _pt__default["default"].string.isRequired,
|
|
1584
1613
|
isOpen: _pt__default["default"].bool.isRequired,
|
|
1585
|
-
|
|
1614
|
+
customViewLocatorCodes: _pt__default["default"].objectOf(_pt__default["default"].any),
|
|
1586
1615
|
onClose: _pt__default["default"].func,
|
|
1587
1616
|
children: _pt__default["default"].node.isRequired,
|
|
1588
1617
|
zIndex: _pt__default["default"].number,
|
|
@@ -1822,10 +1851,12 @@ const defaultProps$4 = {
|
|
|
1822
1851
|
};
|
|
1823
1852
|
const TabularDetailPage = props => {
|
|
1824
1853
|
var _props$title;
|
|
1854
|
+
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
1855
|
+
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
1825
1856
|
process.env.NODE_ENV !== "production" ? utils.warning(props.title !== undefined || props.customTitleRow !== undefined, 'TabularDetailPage: one of either `title` or `customTitleRow` is required but both their values are `undefined`') : void 0;
|
|
1826
1857
|
return jsxRuntime.jsxs(PageWrapper, {
|
|
1827
1858
|
children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
|
|
1828
|
-
customViewLocatorCode:
|
|
1859
|
+
customViewLocatorCode: currentCustomViewLocatorCode
|
|
1829
1860
|
}), jsxRuntime.jsxs(TabularPageContainer, {
|
|
1830
1861
|
color: "neutral",
|
|
1831
1862
|
children: [jsxRuntime.jsx(PageTopBar, {
|
|
@@ -1858,7 +1889,7 @@ TabularDetailPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1858
1889
|
tabControls: _pt__default["default"].node.isRequired,
|
|
1859
1890
|
formControls: _pt__default["default"].node,
|
|
1860
1891
|
hideControls: _pt__default["default"].bool.isRequired,
|
|
1861
|
-
|
|
1892
|
+
customViewLocatorCodes: _pt__default["default"].objectOf(_pt__default["default"].any),
|
|
1862
1893
|
previousPathLabel: _pt__default["default"].oneOfType([_pt__default["default"].string, _pt__default["default"].shape({
|
|
1863
1894
|
id: _pt__default["default"].string.isRequired,
|
|
1864
1895
|
description: _pt__default["default"].oneOfType([_pt__default["default"].string, _pt__default["default"].object]),
|
|
@@ -1880,7 +1911,7 @@ TabularDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
|
1880
1911
|
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1881
1912
|
TabularDetailPage.Intl = i18n.sharedMessages;
|
|
1882
1913
|
|
|
1883
|
-
const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-
|
|
1914
|
+
const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-27a5ab82.cjs.dev.js' /* webpackChunkName: "public-page-layout" */); }));
|
|
1884
1915
|
|
|
1885
1916
|
const MainPageContainer = /*#__PURE__*/_styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
1886
1917
|
target: "ev8m2jf2"
|
|
@@ -2045,10 +2076,12 @@ const defaultProps$1 = {
|
|
|
2045
2076
|
};
|
|
2046
2077
|
const TabularMainPage = props => {
|
|
2047
2078
|
var _props$title;
|
|
2079
|
+
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
2080
|
+
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
2048
2081
|
process.env.NODE_ENV !== "production" ? utils.warning(props.title !== undefined || props.customTitleRow !== undefined, 'TabularMainPage: one of either `title` or `customTitleRow` is required but both their values are `undefined`') : void 0;
|
|
2049
2082
|
return jsxRuntime.jsxs(PageWrapper, {
|
|
2050
2083
|
children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
|
|
2051
|
-
customViewLocatorCode:
|
|
2084
|
+
customViewLocatorCode: currentCustomViewLocatorCode
|
|
2052
2085
|
}), jsxRuntime.jsxs(TabularPageContainer, {
|
|
2053
2086
|
color: "surface",
|
|
2054
2087
|
children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
|
|
@@ -2065,7 +2098,7 @@ const TabularMainPage = props => {
|
|
|
2065
2098
|
})
|
|
2066
2099
|
})]
|
|
2067
2100
|
}), jsxRuntime.jsx(ContentWrapper$1, {
|
|
2068
|
-
css: /*#__PURE__*/react.css("background-color:", designTokens.backgroundColorForTabularMainPageContent, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:TabularMainPage;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
2101
|
+
css: /*#__PURE__*/react.css("background-color:", designTokens.backgroundColorForTabularMainPageContent, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:TabularMainPage;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJ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ZVdyYXBwZXI+XG4gICAgICA8Q3VzdG9tVmlld3NTZWxlY3RvclxuICAgICAgICBjdXN0b21WaWV3TG9jYXRvckNvZGU9e2N1cnJlbnRDdXN0b21WaWV3TG9jYXRvckNvZGV9XG4gICAgICAvPlxuICAgICAgPFRhYnVsYXJQYWdlQ29udGFpbmVyIGNvbG9yPVwic3VyZmFjZVwiPlxuICAgICAgICB7cHJvcHMuY3VzdG9tVGl0bGVSb3cgfHwgKFxuICAgICAgICAgIDxQYWdlSGVhZGVyVGl0bGVcbiAgICAgICAgICAgIHRpdGxlPXtwcm9wcy50aXRsZSA/PyAnJ31cbiAgICAgICAgICAgIHN1YnRpdGxlPXtwcm9wcy5zdWJ0aXRsZX1cbiAgICAgICAgICAgIHRpdGxlU2l6ZT1cImJpZ1wiXG4gICAgICAgICAgLz5cbiAgICAgICAgKX1cbiAgICAgICAgPENvbnRyb2xzQ29udGFpbnRlclxuICAgICAgICAgIHRhYkNvbnRyb2xzPXtwcm9wcy50YWJDb250cm9sc31cbiAgICAgICAgICBmb3JtQ29udHJvbHM9e1xuICAgICAgICAgICAgPEZvcm1Db250cm9sc0NvbnRhaW5lcj5cbiAgICAgICAgICAgICAgeyFwcm9wcy5oaWRlQ29udHJvbHMgJiYgcHJvcHMuZm9ybUNvbnRyb2xzICYmIChcbiAgICAgICAgICAgICAgICA8U3BhY2luZ3MuSW5saW5lIGFsaWduSXRlbXM9XCJmbGV4LWVuZFwiPlxuICAgICAgICAgICAgICAgICAge3Byb3BzLmZvcm1Db250cm9sc31cbiAgICAgICAgICAgICAgICA8L1NwYWNpbmdzLklubGluZT5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvRm9ybUNvbnRyb2xzQ29udGFpbmVyPlxuICAgICAgICAgIH1cbiAgICAgICAgLz5cbiAgICAgIDwvVGFidWxhclBhZ2VDb250YWluZXI+XG4gICAgICA8Q29udGVudFdyYXBwZXJcbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAg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29tbWVyY2V0b29scy1mcm9udGVuZC9pMThuYCBwYWNrYWdlLlxuVGFidWxhck1haW5QYWdlLkludGwgPSBzaGFyZWRNZXNzYWdlcztcblxuZXhwb3J0IGRlZmF1bHQgVGFidWxhck1haW5QYWdlO1xuIl19 */"),
|
|
2069
2102
|
children: props.children
|
|
2070
2103
|
})]
|
|
2071
2104
|
});
|
|
@@ -2078,7 +2111,7 @@ TabularMainPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2078
2111
|
tabControls: _pt__default["default"].node.isRequired,
|
|
2079
2112
|
formControls: _pt__default["default"].node,
|
|
2080
2113
|
hideControls: _pt__default["default"].bool.isRequired,
|
|
2081
|
-
|
|
2114
|
+
customViewLocatorCodes: _pt__default["default"].objectOf(_pt__default["default"].any)
|
|
2082
2115
|
} : {};
|
|
2083
2116
|
TabularMainPage.displayName = 'TabularMainPage';
|
|
2084
2117
|
TabularMainPage.defaultProps = defaultProps$1;
|
|
@@ -40,8 +40,11 @@ var sentry = require('@commercetools-frontend/sentry');
|
|
|
40
40
|
var Constraints = require('@commercetools-uikit/constraints');
|
|
41
41
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
42
42
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
43
|
+
var reactBroadcast = require('@flopflip/react-broadcast');
|
|
43
44
|
var FlatButton = require('@commercetools-uikit/flat-button');
|
|
44
45
|
var IconButton = require('@commercetools-uikit/icon-button');
|
|
46
|
+
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
47
|
+
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
45
48
|
var PageNotFoundSVG = require('@commercetools-frontend/assets/images/page-not-found.svg');
|
|
46
49
|
var FailedAuthorizationSVG = require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
47
50
|
var useResizeObserver = require('@react-hook/resize-observer');
|
|
@@ -73,12 +76,14 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
|
|
|
73
76
|
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
74
77
|
var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
|
|
75
78
|
var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
|
|
79
|
+
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
80
|
+
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
76
81
|
var PageNotFoundSVG__default = /*#__PURE__*/_interopDefault(PageNotFoundSVG);
|
|
77
82
|
var FailedAuthorizationSVG__default = /*#__PURE__*/_interopDefault(FailedAuthorizationSVG);
|
|
78
83
|
var useResizeObserver__default = /*#__PURE__*/_interopDefault(useResizeObserver);
|
|
79
84
|
|
|
80
85
|
// NOTE: This string will be replaced on build time with the package version.
|
|
81
|
-
var version = "22.
|
|
86
|
+
var version = "22.11.0";
|
|
82
87
|
|
|
83
88
|
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
|
|
84
89
|
const appKitSpacing55 = '40px';
|
|
@@ -150,7 +155,7 @@ const getLinkStyles = (isActive, isDisabled) => [/*#__PURE__*/react.css("font-si
|
|
|
150
155
|
|
|
151
156
|
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; }
|
|
152
157
|
function _objectSpread$7(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$7(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$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
153
|
-
const pathWithoutSearch = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
158
|
+
const pathWithoutSearch$1 = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
154
159
|
const warnIfMissingContent = props => {
|
|
155
160
|
Boolean(props.intlMessage) || Boolean(props.label);
|
|
156
161
|
};
|
|
@@ -171,7 +176,7 @@ const TabHeader = props => {
|
|
|
171
176
|
const location = reactRouterDom.useLocation();
|
|
172
177
|
const isActive = Boolean(reactRouterDom.matchPath(location.pathname, {
|
|
173
178
|
// strip the search, otherwise the path won't match
|
|
174
|
-
path: pathWithoutSearch(props.to),
|
|
179
|
+
path: pathWithoutSearch$1(props.to),
|
|
175
180
|
exact: props.exactPathMatch,
|
|
176
181
|
strict: false
|
|
177
182
|
}));
|
|
@@ -701,13 +706,15 @@ var FetchCustomViewsQuery = { kind: "Document", definitions: [{ kind: "Operation
|
|
|
701
706
|
const useCustomViewsConnector = _ref => {
|
|
702
707
|
var _data$allCustomViewsI;
|
|
703
708
|
let customViewLocatorCode = _ref.customViewLocatorCode;
|
|
709
|
+
const areCustomViewsEnabled = reactBroadcast.useFeatureToggle(constants.featureFlags.CUSTOM_VIEWS) && process.env.DISABLE_CUSTOM_VIEWS_FEATURE !== 'true';
|
|
704
710
|
const _useMcQuery = applicationShellConnectors.useMcQuery(FetchCustomViewsQuery, {
|
|
705
711
|
variables: {
|
|
706
712
|
customViewLocatorCode
|
|
707
713
|
},
|
|
708
714
|
context: {
|
|
709
715
|
target: constants.GRAPHQL_TARGETS.SETTINGS_SERVICE
|
|
710
|
-
}
|
|
716
|
+
},
|
|
717
|
+
skip: !areCustomViewsEnabled
|
|
711
718
|
}),
|
|
712
719
|
data = _useMcQuery.data,
|
|
713
720
|
error = _useMcQuery.error,
|
|
@@ -1146,6 +1153,26 @@ FormModalPage.defaultProps = defaultProps$a;
|
|
|
1146
1153
|
// The Intl messages can be used for button labels.
|
|
1147
1154
|
FormModalPage.Intl = i18n.sharedMessages;
|
|
1148
1155
|
|
|
1156
|
+
const pathWithoutSearch = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
1157
|
+
const useCustomViewLocatorSelector = function () {
|
|
1158
|
+
var _context;
|
|
1159
|
+
let customViewLocatorCodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1160
|
+
const location = reactRouterDom.useLocation();
|
|
1161
|
+
const customViewLocator = _findInstanceProperty__default["default"](_context = _Object$entries__default["default"](customViewLocatorCodes)).call(_context, _ref => {
|
|
1162
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
1163
|
+
locator = _ref2[1];
|
|
1164
|
+
return reactRouterDom.matchPath(location.pathname, {
|
|
1165
|
+
// strip the search, otherwise the path won't match
|
|
1166
|
+
path: pathWithoutSearch(locator),
|
|
1167
|
+
exact: true,
|
|
1168
|
+
strict: false
|
|
1169
|
+
});
|
|
1170
|
+
});
|
|
1171
|
+
return {
|
|
1172
|
+
currentCustomViewLocatorCode: customViewLocator === null || customViewLocator === void 0 ? void 0 : customViewLocator[0]
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
|
|
1149
1176
|
const TabControls = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1150
1177
|
target: "elpldre1"
|
|
1151
1178
|
} )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
|
|
@@ -1176,6 +1203,8 @@ const defaultProps$8 = {
|
|
|
1176
1203
|
hideControls: false
|
|
1177
1204
|
};
|
|
1178
1205
|
const TabularModalPage = props => {
|
|
1206
|
+
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
1207
|
+
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
1179
1208
|
return jsxRuntime.jsxs(ModalPage, {
|
|
1180
1209
|
title: props.title,
|
|
1181
1210
|
isOpen: props.isOpen,
|
|
@@ -1187,7 +1216,7 @@ const TabularModalPage = props => {
|
|
|
1187
1216
|
getParentSelector: props.getParentSelector,
|
|
1188
1217
|
shouldDelayOnClose: props.shouldDelayOnClose,
|
|
1189
1218
|
afterOpenStyles: props.afterOpenStyles,
|
|
1190
|
-
customViewLocatorCode:
|
|
1219
|
+
customViewLocatorCode: currentCustomViewLocatorCode,
|
|
1191
1220
|
children: [jsxRuntime.jsxs(TabularPageContainer, {
|
|
1192
1221
|
color: "neutral",
|
|
1193
1222
|
children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
|
|
@@ -1356,9 +1385,11 @@ const defaultProps$4 = {
|
|
|
1356
1385
|
};
|
|
1357
1386
|
const TabularDetailPage = props => {
|
|
1358
1387
|
var _props$title;
|
|
1388
|
+
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
1389
|
+
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
1359
1390
|
return jsxRuntime.jsxs(PageWrapper, {
|
|
1360
1391
|
children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
|
|
1361
|
-
customViewLocatorCode:
|
|
1392
|
+
customViewLocatorCode: currentCustomViewLocatorCode
|
|
1362
1393
|
}), jsxRuntime.jsxs(TabularPageContainer, {
|
|
1363
1394
|
color: "neutral",
|
|
1364
1395
|
children: [jsxRuntime.jsx(PageTopBar, {
|
|
@@ -1397,7 +1428,7 @@ TabularDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
|
1397
1428
|
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1398
1429
|
TabularDetailPage.Intl = i18n.sharedMessages;
|
|
1399
1430
|
|
|
1400
|
-
const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-
|
|
1431
|
+
const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-e73cb2ac.cjs.prod.js' /* webpackChunkName: "public-page-layout" */); }));
|
|
1401
1432
|
|
|
1402
1433
|
const MainPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1403
1434
|
target: "ev8m2jf2"
|
|
@@ -1513,9 +1544,11 @@ const defaultProps$1 = {
|
|
|
1513
1544
|
};
|
|
1514
1545
|
const TabularMainPage = props => {
|
|
1515
1546
|
var _props$title;
|
|
1547
|
+
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
1548
|
+
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
1516
1549
|
return jsxRuntime.jsxs(PageWrapper, {
|
|
1517
1550
|
children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
|
|
1518
|
-
customViewLocatorCode:
|
|
1551
|
+
customViewLocatorCode: currentCustomViewLocatorCode
|
|
1519
1552
|
}), jsxRuntime.jsxs(TabularPageContainer, {
|
|
1520
1553
|
color: "surface",
|
|
1521
1554
|
children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
|
|
@@ -19,7 +19,7 @@ import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
|
19
19
|
import { isValidElement, useRef, useCallback, useEffect, useState, cloneElement, lazy, Children, forwardRef } from 'react';
|
|
20
20
|
import _styled from '@emotion/styled/base';
|
|
21
21
|
import Modal from 'react-modal';
|
|
22
|
-
import { PORTALS_CONTAINER_ID, DOMAINS, NOTIFICATION_KINDS_PAGE, CUSTOM_VIEWS_EVENTS_NAMES, CUSTOM_VIEWS_EVENTS_META, GRAPHQL_TARGETS, SUPPORT_PORTAL_URL } from '@commercetools-frontend/constants';
|
|
22
|
+
import { PORTALS_CONTAINER_ID, DOMAINS, NOTIFICATION_KINDS_PAGE, CUSTOM_VIEWS_EVENTS_NAMES, CUSTOM_VIEWS_EVENTS_META, featureFlags, GRAPHQL_TARGETS, SUPPORT_PORTAL_URL } from '@commercetools-frontend/constants';
|
|
23
23
|
import Card from '@commercetools-uikit/card';
|
|
24
24
|
import { CloseIcon, SidebarCollapseIcon, AngleLeftIcon, BinLinearIcon, ListIcon } from '@commercetools-uikit/icons';
|
|
25
25
|
import SecondaryIconButton from '@commercetools-uikit/secondary-icon-button';
|
|
@@ -36,15 +36,18 @@ import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
|
36
36
|
import Constraints from '@commercetools-uikit/constraints';
|
|
37
37
|
import { useShowNotification } from '@commercetools-frontend/actions-global';
|
|
38
38
|
import { useApplicationContext, useMcQuery } from '@commercetools-frontend/application-shell-connectors';
|
|
39
|
+
import { useFeatureToggle } from '@flopflip/react-broadcast';
|
|
39
40
|
import FlatButton from '@commercetools-uikit/flat-button';
|
|
40
41
|
import IconButton from '@commercetools-uikit/icon-button';
|
|
42
|
+
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
43
|
+
import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
41
44
|
import PageNotFoundSVG from '@commercetools-frontend/assets/images/page-not-found.svg';
|
|
42
45
|
import FailedAuthorizationSVG from '@commercetools-frontend/assets/images/doors-closed.svg';
|
|
43
46
|
import useResizeObserver from '@react-hook/resize-observer';
|
|
44
47
|
import { useMutationObserver } from '@commercetools-uikit/hooks';
|
|
45
48
|
|
|
46
49
|
// NOTE: This string will be replaced on build time with the package version.
|
|
47
|
-
var version = "22.
|
|
50
|
+
var version = "22.11.0";
|
|
48
51
|
|
|
49
52
|
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
|
|
50
53
|
const appKitSpacing55 = '40px';
|
|
@@ -122,7 +125,7 @@ const getLinkStyles = (isActive, isDisabled) => [/*#__PURE__*/css("font-size:",
|
|
|
122
125
|
|
|
123
126
|
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; }
|
|
124
127
|
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$7(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$7(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
125
|
-
const pathWithoutSearch = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
128
|
+
const pathWithoutSearch$1 = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
126
129
|
const warnIfMissingContent = props => {
|
|
127
130
|
const hasContent = Boolean(props.intlMessage) || Boolean(props.label);
|
|
128
131
|
process.env.NODE_ENV !== "production" ? warning(hasContent, 'TabHeader: one of either `label` or `intlMessage` is required but their values are `undefined`') : void 0;
|
|
@@ -144,7 +147,7 @@ const TabHeader = props => {
|
|
|
144
147
|
const location = useLocation();
|
|
145
148
|
const isActive = Boolean(matchPath(location.pathname, {
|
|
146
149
|
// strip the search, otherwise the path won't match
|
|
147
|
-
path: pathWithoutSearch(props.to),
|
|
150
|
+
path: pathWithoutSearch$1(props.to),
|
|
148
151
|
exact: props.exactPathMatch,
|
|
149
152
|
strict: false
|
|
150
153
|
}));
|
|
@@ -841,13 +844,15 @@ var FetchCustomViewsQuery = { kind: "Document", definitions: [{ kind: "Operation
|
|
|
841
844
|
const useCustomViewsConnector = _ref => {
|
|
842
845
|
var _data$allCustomViewsI;
|
|
843
846
|
let customViewLocatorCode = _ref.customViewLocatorCode;
|
|
847
|
+
const areCustomViewsEnabled = useFeatureToggle(featureFlags.CUSTOM_VIEWS) && process.env.DISABLE_CUSTOM_VIEWS_FEATURE !== 'true';
|
|
844
848
|
const _useMcQuery = useMcQuery(FetchCustomViewsQuery, {
|
|
845
849
|
variables: {
|
|
846
850
|
customViewLocatorCode
|
|
847
851
|
},
|
|
848
852
|
context: {
|
|
849
853
|
target: GRAPHQL_TARGETS.SETTINGS_SERVICE
|
|
850
|
-
}
|
|
854
|
+
},
|
|
855
|
+
skip: !areCustomViewsEnabled
|
|
851
856
|
}),
|
|
852
857
|
data = _useMcQuery.data,
|
|
853
858
|
error = _useMcQuery.error,
|
|
@@ -1468,6 +1473,26 @@ FormModalPage.defaultProps = defaultProps$a;
|
|
|
1468
1473
|
// The Intl messages can be used for button labels.
|
|
1469
1474
|
FormModalPage.Intl = sharedMessages;
|
|
1470
1475
|
|
|
1476
|
+
const pathWithoutSearch = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
1477
|
+
const useCustomViewLocatorSelector = function () {
|
|
1478
|
+
var _context;
|
|
1479
|
+
let customViewLocatorCodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1480
|
+
const location = useLocation();
|
|
1481
|
+
const customViewLocator = _findInstanceProperty(_context = _Object$entries(customViewLocatorCodes)).call(_context, _ref => {
|
|
1482
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
1483
|
+
locator = _ref2[1];
|
|
1484
|
+
return matchPath(location.pathname, {
|
|
1485
|
+
// strip the search, otherwise the path won't match
|
|
1486
|
+
path: pathWithoutSearch(locator),
|
|
1487
|
+
exact: true,
|
|
1488
|
+
strict: false
|
|
1489
|
+
});
|
|
1490
|
+
});
|
|
1491
|
+
return {
|
|
1492
|
+
currentCustomViewLocatorCode: customViewLocator === null || customViewLocator === void 0 ? void 0 : customViewLocator[0]
|
|
1493
|
+
};
|
|
1494
|
+
};
|
|
1495
|
+
|
|
1471
1496
|
const TabControls = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
1472
1497
|
target: "elpldre1"
|
|
1473
1498
|
} : {
|
|
@@ -1510,6 +1535,8 @@ const defaultProps$8 = {
|
|
|
1510
1535
|
hideControls: false
|
|
1511
1536
|
};
|
|
1512
1537
|
const TabularModalPage = props => {
|
|
1538
|
+
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
1539
|
+
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
1513
1540
|
return jsxs(ModalPage, {
|
|
1514
1541
|
title: props.title,
|
|
1515
1542
|
isOpen: props.isOpen,
|
|
@@ -1521,7 +1548,7 @@ const TabularModalPage = props => {
|
|
|
1521
1548
|
getParentSelector: props.getParentSelector,
|
|
1522
1549
|
shouldDelayOnClose: props.shouldDelayOnClose,
|
|
1523
1550
|
afterOpenStyles: props.afterOpenStyles,
|
|
1524
|
-
customViewLocatorCode:
|
|
1551
|
+
customViewLocatorCode: currentCustomViewLocatorCode,
|
|
1525
1552
|
children: [jsxs(TabularPageContainer, {
|
|
1526
1553
|
color: "neutral",
|
|
1527
1554
|
children: [props.customTitleRow || jsx(PageHeaderTitle, {
|
|
@@ -1547,7 +1574,7 @@ TabularModalPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1547
1574
|
level: _pt.number,
|
|
1548
1575
|
title: _pt.string.isRequired,
|
|
1549
1576
|
isOpen: _pt.bool.isRequired,
|
|
1550
|
-
|
|
1577
|
+
customViewLocatorCodes: _pt.objectOf(_pt.any),
|
|
1551
1578
|
onClose: _pt.func,
|
|
1552
1579
|
children: _pt.node.isRequired,
|
|
1553
1580
|
zIndex: _pt.number,
|
|
@@ -1787,10 +1814,12 @@ const defaultProps$4 = {
|
|
|
1787
1814
|
};
|
|
1788
1815
|
const TabularDetailPage = props => {
|
|
1789
1816
|
var _props$title;
|
|
1817
|
+
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
1818
|
+
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
1790
1819
|
process.env.NODE_ENV !== "production" ? warning(props.title !== undefined || props.customTitleRow !== undefined, 'TabularDetailPage: one of either `title` or `customTitleRow` is required but both their values are `undefined`') : void 0;
|
|
1791
1820
|
return jsxs(PageWrapper, {
|
|
1792
1821
|
children: [jsx(CustomViewSelectorOrNothing, {
|
|
1793
|
-
customViewLocatorCode:
|
|
1822
|
+
customViewLocatorCode: currentCustomViewLocatorCode
|
|
1794
1823
|
}), jsxs(TabularPageContainer, {
|
|
1795
1824
|
color: "neutral",
|
|
1796
1825
|
children: [jsx(PageTopBar, {
|
|
@@ -1823,7 +1852,7 @@ TabularDetailPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1823
1852
|
tabControls: _pt.node.isRequired,
|
|
1824
1853
|
formControls: _pt.node,
|
|
1825
1854
|
hideControls: _pt.bool.isRequired,
|
|
1826
|
-
|
|
1855
|
+
customViewLocatorCodes: _pt.objectOf(_pt.any),
|
|
1827
1856
|
previousPathLabel: _pt.oneOfType([_pt.string, _pt.shape({
|
|
1828
1857
|
id: _pt.string.isRequired,
|
|
1829
1858
|
description: _pt.oneOfType([_pt.string, _pt.object]),
|
|
@@ -1845,7 +1874,7 @@ TabularDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
|
1845
1874
|
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1846
1875
|
TabularDetailPage.Intl = sharedMessages;
|
|
1847
1876
|
|
|
1848
|
-
const PublicPageLayout = /*#__PURE__*/lazy(() => import('./public-page-layout-
|
|
1877
|
+
const PublicPageLayout = /*#__PURE__*/lazy(() => import('./public-page-layout-3a970c93.esm.js' /* webpackChunkName: "public-page-layout" */));
|
|
1849
1878
|
|
|
1850
1879
|
const MainPageContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
1851
1880
|
target: "ev8m2jf2"
|
|
@@ -2010,10 +2039,12 @@ const defaultProps$1 = {
|
|
|
2010
2039
|
};
|
|
2011
2040
|
const TabularMainPage = props => {
|
|
2012
2041
|
var _props$title;
|
|
2042
|
+
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
2043
|
+
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
2013
2044
|
process.env.NODE_ENV !== "production" ? warning(props.title !== undefined || props.customTitleRow !== undefined, 'TabularMainPage: one of either `title` or `customTitleRow` is required but both their values are `undefined`') : void 0;
|
|
2014
2045
|
return jsxs(PageWrapper, {
|
|
2015
2046
|
children: [jsx(CustomViewSelectorOrNothing, {
|
|
2016
|
-
customViewLocatorCode:
|
|
2047
|
+
customViewLocatorCode: currentCustomViewLocatorCode
|
|
2017
2048
|
}), jsxs(TabularPageContainer, {
|
|
2018
2049
|
color: "surface",
|
|
2019
2050
|
children: [props.customTitleRow || jsx(PageHeaderTitle, {
|
|
@@ -2030,7 +2061,7 @@ const TabularMainPage = props => {
|
|
|
2030
2061
|
})
|
|
2031
2062
|
})]
|
|
2032
2063
|
}), jsx(ContentWrapper$1, {
|
|
2033
|
-
css: /*#__PURE__*/css("background-color:", designTokens.backgroundColorForTabularMainPageContent, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:TabularMainPage;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
2064
|
+
css: /*#__PURE__*/css("background-color:", designTokens.backgroundColorForTabularMainPageContent, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:TabularMainPage;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRhYnVsYXItbWFpbi1wYWdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrR2dCIiwiZmlsZSI6InRhYnVsYXItbWFpbi1wYWdlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgUmVhY3RFbGVtZW50LC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iPlxuICAgICAgICB7cHJvcHMuY3VzdG9tVGl0bGVSb3cgfHwgKFxuICAgICAgICAgIDxQYWdlSGVhZGVyVGl0bGVcbiAgICAgICAgICAgIHRpdGxlPXtwcm9wcy50aXRsZSA/PyAnJ31cbiAgICAgICAgICAgIHN1YnRpdGxlPXtwcm9wcy5zdWJ0aXRsZX1cbiAgICAgICAgICAgIHRpdGxlU2l6ZT1cImJpZ1wiXG4gICAgICAgICAgLz5cbiAgICAgICAgKX1cbiAgICAgICAgPENvbnRyb2xzQ29udGFpbnRlclxuICAgICAgICAgIHRhYkNvbnRyb2xzPXtwcm9wcy50YWJDb250cm9sc31cbiAgICAgICAgICBmb3JtQ29udHJvbHM9e1xuICAgICAgICAgICAgPEZvcm1Db250cm9sc0NvbnRhaW5lcj5cbiAgICAgICAgICAgICAgeyFwcm9wcy5oaWRlQ29udHJvbHMgJiYgcHJvcHMuZm9ybUNvbnRyb2xzICYmIChcbiAgICAgICAgICAgICAgICA8U3BhY2luZ3MuSW5saW5lIGFsaWduSXRlbXM9XCJmbGV4LWVuZFwiPlxuICAgICAgICAgICAgICAgICAge3Byb3BzLmZvcm1Db250cm9sc31cbiAgICAgICAgICAgICAgICA8L1NwYWNpbmdzLklubGluZT5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvRm9ybUNvbnRyb2xzQ29udGFpbmVyPlxuICAgICAgICAgIH1cbiAgICAgICAgLz5cbiAgICAgIDwvVGFidWxhclBhZ2VDb250YWluZXI+XG4gICAgICA8Q29udGVudFdyYXBwZXJcbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHthcHBLaXREZXNpZ25Ub2tlbnMuYmFja2dyb3VuZENvbG9yRm9yVGFidWxhck1haW5QYWdlQ29udGVudH07XG4gICAgICAgIGB9XG4gICAgICA+XG4gICAgICAgIHtwcm9wcy5jaGlsZHJlbn1cbiAgICAgIDwvQ29udGVudFdyYXBwZXI+XG4gICAg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|
|
@@ -2043,7 +2074,7 @@ TabularMainPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2043
2074
|
tabControls: _pt.node.isRequired,
|
|
2044
2075
|
formControls: _pt.node,
|
|
2045
2076
|
hideControls: _pt.bool.isRequired,
|
|
2046
|
-
|
|
2077
|
+
customViewLocatorCodes: _pt.objectOf(_pt.any)
|
|
2047
2078
|
} : {};
|
|
2048
2079
|
TabularMainPage.displayName = 'TabularMainPage';
|
|
2049
2080
|
TabularMainPage.defaultProps = defaultProps$1;
|
package/dist/declarations/src/components/detail-pages/tabular-detail-page/tabular-detail-page.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode, MouseEvent, KeyboardEvent } from 'react';
|
|
2
|
+
import { LocationDescriptor } from 'history';
|
|
2
3
|
type MessageDescriptor = {
|
|
3
4
|
id: string;
|
|
4
5
|
description?: string | object;
|
|
@@ -13,7 +14,7 @@ type TTabularDetailPageProps = {
|
|
|
13
14
|
tabControls: ReactNode;
|
|
14
15
|
formControls?: ReactNode;
|
|
15
16
|
hideControls: boolean;
|
|
16
|
-
|
|
17
|
+
customViewLocatorCodes?: Record<string, LocationDescriptor>;
|
|
17
18
|
previousPathLabel?: string | MessageDescriptor;
|
|
18
19
|
onPreviousPathClick: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
19
20
|
};
|
package/dist/declarations/src/components/main-pages/tabular-main-page/tabular-main-page.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { LocationDescriptor } from 'history';
|
|
2
3
|
type TTabularMainPageProps = {
|
|
3
4
|
title?: string;
|
|
4
5
|
subtitle?: string | ReactElement;
|
|
@@ -7,7 +8,7 @@ type TTabularMainPageProps = {
|
|
|
7
8
|
tabControls: ReactNode;
|
|
8
9
|
formControls?: ReactNode;
|
|
9
10
|
hideControls: boolean;
|
|
10
|
-
|
|
11
|
+
customViewLocatorCodes?: Record<string, LocationDescriptor>;
|
|
11
12
|
};
|
|
12
13
|
declare const TabularMainPage: {
|
|
13
14
|
(props: TTabularMainPageProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
package/dist/declarations/src/components/modal-pages/tabular-modal-page/tabular-modal-page.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactElement, ReactNode, SyntheticEvent } from 'react';
|
|
2
2
|
import type { CSSObject } from '@emotion/react';
|
|
3
|
+
import { LocationDescriptor } from 'history';
|
|
3
4
|
type MessageDescriptor = {
|
|
4
5
|
id: string;
|
|
5
6
|
description?: string | object;
|
|
@@ -10,7 +11,7 @@ type Props = {
|
|
|
10
11
|
level?: number;
|
|
11
12
|
title: string;
|
|
12
13
|
isOpen: boolean;
|
|
13
|
-
|
|
14
|
+
customViewLocatorCodes?: Record<string, LocationDescriptor>;
|
|
14
15
|
onClose?: (event: SyntheticEvent) => void;
|
|
15
16
|
children: ReactNode;
|
|
16
17
|
zIndex?: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './use-custom-view-locator-selector';
|
package/dist/{public-page-layout-c011d275.cjs.dev.js → public-page-layout-27a5ab82.cjs.dev.js}
RENAMED
|
@@ -40,8 +40,11 @@ require('@commercetools-frontend/sentry');
|
|
|
40
40
|
require('@commercetools-uikit/constraints');
|
|
41
41
|
require('@commercetools-frontend/actions-global');
|
|
42
42
|
require('@commercetools-frontend/application-shell-connectors');
|
|
43
|
+
require('@flopflip/react-broadcast');
|
|
43
44
|
require('@commercetools-uikit/flat-button');
|
|
44
45
|
require('@commercetools-uikit/icon-button');
|
|
46
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
47
|
+
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
45
48
|
require('@commercetools-frontend/assets/images/page-not-found.svg');
|
|
46
49
|
require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
47
50
|
require('@react-hook/resize-observer');
|
|
@@ -38,8 +38,11 @@ import '@commercetools-frontend/sentry';
|
|
|
38
38
|
import '@commercetools-uikit/constraints';
|
|
39
39
|
import '@commercetools-frontend/actions-global';
|
|
40
40
|
import '@commercetools-frontend/application-shell-connectors';
|
|
41
|
+
import '@flopflip/react-broadcast';
|
|
41
42
|
import '@commercetools-uikit/flat-button';
|
|
42
43
|
import '@commercetools-uikit/icon-button';
|
|
44
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
45
|
+
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
43
46
|
import '@commercetools-frontend/assets/images/page-not-found.svg';
|
|
44
47
|
import '@commercetools-frontend/assets/images/doors-closed.svg';
|
|
45
48
|
import '@react-hook/resize-observer';
|
package/dist/{public-page-layout-3653aa0b.cjs.prod.js → public-page-layout-e73cb2ac.cjs.prod.js}
RENAMED
|
@@ -40,8 +40,11 @@ require('@commercetools-frontend/sentry');
|
|
|
40
40
|
require('@commercetools-uikit/constraints');
|
|
41
41
|
require('@commercetools-frontend/actions-global');
|
|
42
42
|
require('@commercetools-frontend/application-shell-connectors');
|
|
43
|
+
require('@flopflip/react-broadcast');
|
|
43
44
|
require('@commercetools-uikit/flat-button');
|
|
44
45
|
require('@commercetools-uikit/icon-button');
|
|
46
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
47
|
+
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
45
48
|
require('@commercetools-frontend/assets/images/page-not-found.svg');
|
|
46
49
|
require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
47
50
|
require('@react-hook/resize-observer');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/application-components",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.11.0",
|
|
4
4
|
"description": "Generic components for building Merchant Center applications",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/runtime": "^7.22.15",
|
|
38
38
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
39
|
-
"@commercetools-frontend/actions-global": "22.
|
|
40
|
-
"@commercetools-frontend/application-config": "22.
|
|
41
|
-
"@commercetools-frontend/application-shell-connectors": "22.
|
|
42
|
-
"@commercetools-frontend/assets": "22.
|
|
43
|
-
"@commercetools-frontend/constants": "22.
|
|
44
|
-
"@commercetools-frontend/i18n": "22.
|
|
45
|
-
"@commercetools-frontend/l10n": "22.
|
|
46
|
-
"@commercetools-frontend/sentry": "22.
|
|
39
|
+
"@commercetools-frontend/actions-global": "22.11.0",
|
|
40
|
+
"@commercetools-frontend/application-config": "22.11.0",
|
|
41
|
+
"@commercetools-frontend/application-shell-connectors": "22.11.0",
|
|
42
|
+
"@commercetools-frontend/assets": "22.11.0",
|
|
43
|
+
"@commercetools-frontend/constants": "22.11.0",
|
|
44
|
+
"@commercetools-frontend/i18n": "22.11.0",
|
|
45
|
+
"@commercetools-frontend/l10n": "22.11.0",
|
|
46
|
+
"@commercetools-frontend/sentry": "22.11.0",
|
|
47
47
|
"@commercetools-uikit/card": "^16.7.3",
|
|
48
48
|
"@commercetools-uikit/constraints": "^16.7.3",
|
|
49
49
|
"@commercetools-uikit/design-system": "^16.7.3",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"@commercetools-uikit/utils": "^16.7.3",
|
|
62
62
|
"@emotion/react": "11.11.0",
|
|
63
63
|
"@emotion/styled": "11.11.0",
|
|
64
|
+
"@flopflip/react-broadcast": "13.1.5",
|
|
64
65
|
"@react-hook/latest": "1.0.3",
|
|
65
66
|
"@react-hook/resize-observer": "1.2.6",
|
|
66
67
|
"@types/history": "^4.7.11",
|
|
@@ -89,8 +90,7 @@
|
|
|
89
90
|
"react": "17.0.2",
|
|
90
91
|
"react-dom": "17.0.2",
|
|
91
92
|
"react-intl": "^6.4.5",
|
|
92
|
-
"react-router-dom": "5.3.4"
|
|
93
|
-
"@commercetools-frontend/application-shell": "22.9.1"
|
|
93
|
+
"react-router-dom": "5.3.4"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"react": "17.x",
|