@commercetools-frontend/application-components 24.10.0 → 24.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-components.cjs.dev.js +73 -61
- package/dist/commercetools-frontend-application-components.cjs.prod.js +73 -61
- package/dist/commercetools-frontend-application-components.esm.js +72 -61
- package/dist/{custom-views-selector-7be2d0a2.cjs.dev.js → custom-views-selector-1397a063.cjs.dev.js} +8 -5
- package/dist/{custom-views-selector-96c35463.cjs.prod.js → custom-views-selector-2da0a246.cjs.prod.js} +8 -5
- package/dist/{custom-views-selector-e1672974.esm.js → custom-views-selector-375370c8.esm.js} +8 -5
- package/dist/{public-page-layout-7d1cb99f.esm.js → public-page-layout-2fea64b6.esm.js} +1 -1
- package/dist/{public-page-layout-b182d2dd.cjs.prod.js → public-page-layout-a0d532d4.cjs.prod.js} +1 -1
- package/dist/{public-page-layout-b92fb7e4.cjs.dev.js → public-page-layout-c0f5e884.cjs.dev.js} +1 -1
- package/package.json +10 -10
|
@@ -14,6 +14,7 @@ import Text from '@commercetools-uikit/text';
|
|
|
14
14
|
import { warning, useWarning } from '@commercetools-uikit/utils';
|
|
15
15
|
import { css, keyframes, Global } from '@emotion/react';
|
|
16
16
|
import { designTokens as designTokens$1, transformTokensToCssVarsReferences } from '@commercetools-uikit/design-system';
|
|
17
|
+
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
17
18
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
18
19
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
19
20
|
import _styled from '@emotion/styled/base';
|
|
@@ -32,6 +33,7 @@ import omitBy from 'lodash/omitBy';
|
|
|
32
33
|
import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
|
|
33
34
|
import _setTimeout from '@babel/runtime-corejs3/core-js-stable/set-timeout';
|
|
34
35
|
import FlatButton from '@commercetools-uikit/flat-button';
|
|
36
|
+
import _taggedTemplateLiteral from '@babel/runtime-corejs3/helpers/esm/taggedTemplateLiteral';
|
|
35
37
|
import IconButton from '@commercetools-uikit/icon-button';
|
|
36
38
|
import Constraints from '@commercetools-uikit/constraints';
|
|
37
39
|
import PageNotFoundSVG from '@commercetools-frontend/assets/images/page-not-found.svg';
|
|
@@ -47,18 +49,20 @@ import useResizeObserver from '@react-hook/resize-observer';
|
|
|
47
49
|
import { useMutationObserver } from '@commercetools-uikit/hooks';
|
|
48
50
|
|
|
49
51
|
// NOTE: This string will be replaced on build time with the package version.
|
|
50
|
-
var version = "24.
|
|
52
|
+
var version = "24.12.0";
|
|
53
|
+
|
|
54
|
+
var _context, _context2, _context3, _context4, _context5;
|
|
51
55
|
|
|
52
56
|
// We keep these tokens as they are related to page layout components which should have
|
|
53
57
|
// a slightly different layout (margins/paddings) when used within a Custom View panel.
|
|
54
58
|
// https://github.com/commercetools/merchant-center-application-kit/pull/3353
|
|
55
59
|
const themesOverrides = {
|
|
56
60
|
default: {
|
|
57
|
-
marginForCustomViewsSelectorAsTabular:
|
|
58
|
-
marginForPageContent:
|
|
59
|
-
paddingForDetailPageHeader:
|
|
60
|
-
paddingForMainPageHeader:
|
|
61
|
-
paddingForTabularPageHeader:
|
|
61
|
+
marginForCustomViewsSelectorAsTabular: "0 ".concat(designTokens$1.spacing55),
|
|
62
|
+
marginForPageContent: _concatInstanceProperty(_context = "".concat(designTokens$1.spacing50, " ")).call(_context, designTokens$1.spacing55),
|
|
63
|
+
paddingForDetailPageHeader: _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "".concat(designTokens$1.spacing50, " ")).call(_context3, designTokens$1.spacing55, " ")).call(_context2, designTokens$1.spacing40),
|
|
64
|
+
paddingForMainPageHeader: _concatInstanceProperty(_context4 = "".concat(designTokens$1.spacing50, " ")).call(_context4, designTokens$1.spacing55, " 0"),
|
|
65
|
+
paddingForTabularPageHeader: _concatInstanceProperty(_context5 = "".concat(designTokens$1.spacing40, " ")).call(_context5, designTokens$1.spacing55, " 0"),
|
|
62
66
|
backgroundColorForNavbar: designTokens$1.colorPrimary10,
|
|
63
67
|
backgroundColorForNavbarHeader: designTokens$1.colorPrimary10,
|
|
64
68
|
fontColorForTabLabelWhenActive: designTokens$1.colorPrimary
|
|
@@ -168,11 +172,10 @@ const getModalContentStyles = props => {
|
|
|
168
172
|
|
|
169
173
|
// To ensure that the mouse click on the overlay surface goes "through"
|
|
170
174
|
// and triggers the modal to close, we need to turn off the pointer events.
|
|
171
|
-
const baseStyles = /*#__PURE__*/css("display:grid;height:100%;width:100%;outline:none;position:relative;pointer-events:none;z-index:", typeof props.zIndex === 'number' ?
|
|
172
|
-
// Use `!important` to overwrite the default value assigned by the Stacking Layer System.
|
|
175
|
+
const baseStyles = /*#__PURE__*/css("display:grid;height:100%;width:100%;outline:none;position:relative;pointer-events:none;z-index:", typeof props.zIndex === 'number' ? // Use `!important` to overwrite the default value assigned by the Stacking Layer System.
|
|
173
176
|
// We're assigning value 1 unit higher than the overlay to ensure the content is on top.
|
|
174
177
|
// It's safe to do that since the modal is topmost in the stacking layer.
|
|
175
|
-
|
|
178
|
+
"".concat(props.zIndex + 1, " !important") : 'auto', ";", gridStyle, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:baseStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRpYWxvZy5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEV3QiIsImZpbGUiOiJkaWFsb2cuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCB0eXBlIFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBDb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cgTGF5ZXIgU3lzdGVtLlxuICAgIHR5cGVvZiB6SW5kZXggPT09ICdudW1iZXInID8gYCR7ekluZGV4fSAhaW1wb3J0YW50YCA6ICdhdXRvJ307XG4gIHRvcDogMDtcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgzMiwgNjIsIDcyLCAwLjUpO1xuICBvcGFjaXR5OiAxO1xuYDtcblxuZXhwb3J0IGNvbnN0IERpYWxvZ0NvbnRlbnQgPSBzdHlsZWQuZGl2YFxuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHdpZHRoOiAxMDAlO1xuICBoZWlnaHQ6IDEwMCU7XG4gIHRvcDogMDtcbmA7XG4iXX0= */");
|
|
176
179
|
return baseStyles;
|
|
177
180
|
};
|
|
178
181
|
const ClickableDialogContent = /*#__PURE__*/_styled(Content$2, process.env.NODE_ENV === "production" ? {
|
|
@@ -190,7 +193,7 @@ const DialogOverlay = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "prod
|
|
|
190
193
|
let zIndex = _ref.zIndex;
|
|
191
194
|
return (
|
|
192
195
|
// Use `!important` to overwrite the default value assigned by the Stacking Layer System.
|
|
193
|
-
typeof zIndex === 'number' ?
|
|
196
|
+
typeof zIndex === 'number' ? "".concat(zIndex, " !important") : 'auto'
|
|
194
197
|
);
|
|
195
198
|
}, ";top:0;width:100%;height:100%;background-color:rgba(32, 62, 72, 0.5);opacity:1;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRpYWxvZy5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUdtRSIsImZpbGUiOiJkaWFsb2cuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCB0eXBlIFNlcmlhbGl6ZWRTdHlsZXMgfS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BVc2UgYCFpbXBvcnRhbnRgIHRvIG92ZXJ3cml0ZSB0aGUgZGVmYXVsdCB2YWx1ZSBhc3NpZ25lZCBieSB0aGUgU3RhY2tpbmcgTGF5ZXIgU3lzdGVtLlxuICAgIHR5cGVvZiB6SW5kZXggPT09ICdudW1iZXInID8gYCR7ekluZGV4fSAhaW1wb3J0YW50YCA6ICdhdXRvJ307XG4gIHRvcDogMDtcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgzMiwgNjIsIDcyLCAwLjUpO1xuICBvcGFjaXR5OiAxO1xuYDtcblxuZXhwb3J0IGNvbnN0IERpYWxvZ0NvbnRlbnQgPSBzdHlsZWQuZGl2YFxuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHdpZHRoOiAxMDAlO1xuICBoZWlnaHQ6IDEwMCU7XG4gIHRvcDogMDtcbmA7XG4iXX0= */"));
|
|
196
199
|
const DialogContent$1 = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
@@ -209,7 +212,7 @@ const DialogContent$1 = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "pr
|
|
|
209
212
|
|
|
210
213
|
const _excluded$j = ["size", "getParentSelector"];
|
|
211
214
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$a() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
212
|
-
const getDefaultParentSelector$1 = () => process.env.NODE_ENV === 'test' ? document.body : document.querySelector(
|
|
215
|
+
const getDefaultParentSelector$1 = () => process.env.NODE_ENV === 'test' ? document.body : document.querySelector("#".concat(PORTALS_CONTAINER_ID));
|
|
213
216
|
const GridArea = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
214
217
|
target: "elx55gk0"
|
|
215
218
|
} : {
|
|
@@ -491,7 +494,7 @@ FormDialog.TextTitle = TextTitle;
|
|
|
491
494
|
|
|
492
495
|
const CustomViewSelector = /*#__PURE__*/lazy(() => {
|
|
493
496
|
if (typeof window !== 'undefined' && typeof window.app !== 'undefined') {
|
|
494
|
-
return import('./custom-views-selector-
|
|
497
|
+
return import('./custom-views-selector-375370c8.esm.js' /* webpackChunkName: "custom-views-selector" */);
|
|
495
498
|
}
|
|
496
499
|
return _Promise.resolve({
|
|
497
500
|
default: () => null
|
|
@@ -593,7 +596,7 @@ const PageHeader = props => {
|
|
|
593
596
|
truncate: true
|
|
594
597
|
}), props.children]
|
|
595
598
|
}), jsx(CustomViewSelector, {
|
|
596
|
-
margin:
|
|
599
|
+
margin: "".concat(designTokens$1.spacing40, " 0 0 0"),
|
|
597
600
|
customViewLocatorCode: props.customViewLocatorCode
|
|
598
601
|
})]
|
|
599
602
|
});
|
|
@@ -710,6 +713,7 @@ const ModalPageTopBar = _ref3 => {
|
|
|
710
713
|
};
|
|
711
714
|
ModalPageTopBar.displayName = 'ModalPageTopBar';
|
|
712
715
|
|
|
716
|
+
var _templateObject;
|
|
713
717
|
const stylesBySize = {
|
|
714
718
|
'10': {
|
|
715
719
|
width: '600px',
|
|
@@ -728,14 +732,7 @@ const stylesBySize = {
|
|
|
728
732
|
transitionTime: 300
|
|
729
733
|
}
|
|
730
734
|
};
|
|
731
|
-
const overlayShow = keyframes
|
|
732
|
-
0% {
|
|
733
|
-
opacity: 0;
|
|
734
|
-
}
|
|
735
|
-
100% {
|
|
736
|
-
opacity: 1;
|
|
737
|
-
}
|
|
738
|
-
`;
|
|
735
|
+
const overlayShow = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n"])));
|
|
739
736
|
|
|
740
737
|
// we can't use Overlay from Radix-ui because it doesn't appear in DOM when Dialog.Root is rendered with `modal={false}`
|
|
741
738
|
const ModalOverlay = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
@@ -747,7 +744,7 @@ const ModalOverlay = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "produ
|
|
|
747
744
|
let zIndex = _ref.zIndex;
|
|
748
745
|
return (
|
|
749
746
|
// Use `!important` to overwrite the default value assigned by the Stacking Layer System.
|
|
750
|
-
typeof zIndex === 'number' ?
|
|
747
|
+
typeof zIndex === 'number' ? "".concat(zIndex, " !important") : 'inherit'
|
|
751
748
|
);
|
|
752
749
|
}, ";opacity:0;", _ref2 => {
|
|
753
750
|
let size = _ref2.size;
|
|
@@ -757,21 +754,21 @@ const ModalOverlay = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "produ
|
|
|
757
754
|
const getContentShowAnimation = size => keyframes({
|
|
758
755
|
'0%': {
|
|
759
756
|
opacity: 0,
|
|
760
|
-
transform:
|
|
757
|
+
transform: "translate3d(".concat(size !== 'scale' ? stylesBySize[size].width : '30px', ", 0, 0)")
|
|
761
758
|
},
|
|
762
759
|
'100%': {
|
|
763
760
|
opacity: 1,
|
|
764
|
-
transform:
|
|
761
|
+
transform: "translate3d(0, 0, 0)"
|
|
765
762
|
}
|
|
766
763
|
});
|
|
767
764
|
const getContentHideAnimation = size => keyframes({
|
|
768
765
|
'0%': {
|
|
769
766
|
opacity: 1,
|
|
770
|
-
transform:
|
|
767
|
+
transform: "translate3d(0, 0, 0)"
|
|
771
768
|
},
|
|
772
769
|
'100%': {
|
|
773
770
|
opacity: 0,
|
|
774
|
-
transform:
|
|
771
|
+
transform: "translate3d(".concat(size !== 'scale' ? stylesBySize[size].width : '30px', ", 0, 0)")
|
|
775
772
|
}
|
|
776
773
|
});
|
|
777
774
|
const ModalContent = /*#__PURE__*/_styled(Content$2, process.env.NODE_ENV === "production" ? {
|
|
@@ -782,11 +779,11 @@ const ModalContent = /*#__PURE__*/_styled(Content$2, process.env.NODE_ENV === "p
|
|
|
782
779
|
target: "e1jbmsa0",
|
|
783
780
|
label: "ModalContent"
|
|
784
781
|
})("position:absolute;top:0;right:0;height:100%;width:", _ref3 => {
|
|
782
|
+
var _context;
|
|
785
783
|
let size = _ref3.size;
|
|
786
|
-
return size !== 'scale' ?
|
|
787
|
-
// In case we're using a specific size, we want it to be used until there's no space left.
|
|
784
|
+
return size !== 'scale' ? // In case we're using a specific size, we want it to be used until there's no space left.
|
|
788
785
|
// In such scenario, we want the modal to be as wide as possible, but using the shared indentation width size.
|
|
789
|
-
|
|
786
|
+
_concatInstanceProperty(_context = "min(".concat(stylesBySize[size].width, ", calc(100% - ")).call(_context, PORTALS_CONTAINER_INDENTATION_SIZE, ")) !important") : stylesBySize.scale.width;
|
|
790
787
|
}, ";display:flex;flex-direction:column;background-color:", designTokens$1.colorSurface, ";box-shadow:0px 0px 40px 0px rgba(0, 0, 0, 0.1);outline:0;z-index:inherit;&[data-state='open']{animation:", _ref4 => {
|
|
791
788
|
let size = _ref4.size;
|
|
792
789
|
return getContentShowAnimation(size);
|
|
@@ -817,7 +814,7 @@ const HiddenEmptyDialogTitle = () => jsx("div", {
|
|
|
817
814
|
// instead of a specific element that will be cleaned up, resulting in
|
|
818
815
|
// console errors (even though the test passes). We only need to to this in
|
|
819
816
|
// test environment.
|
|
820
|
-
const getDefaultParentSelector = () => process.env.NODE_ENV === 'test' ? document.body : document.querySelector(
|
|
817
|
+
const getDefaultParentSelector = () => process.env.NODE_ENV === 'test' ? document.body : document.querySelector("#".concat(PORTALS_CONTAINER_ID));
|
|
821
818
|
|
|
822
819
|
// NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
|
|
823
820
|
// However, we need to explicitly define this otherwise the prop-types babel plugin
|
|
@@ -890,7 +887,7 @@ const ModalPage = _ref => {
|
|
|
890
887
|
onInteractOutside: e => {
|
|
891
888
|
// Prevent only the modal from closing, handle all other events
|
|
892
889
|
const overlay = document.querySelector('[data-role="modal-overlay-clickable"]');
|
|
893
|
-
if (!overlay
|
|
890
|
+
if (!(overlay !== null && overlay !== void 0 && overlay.contains(e.target))) {
|
|
894
891
|
e.preventDefault();
|
|
895
892
|
}
|
|
896
893
|
},
|
|
@@ -1139,7 +1136,7 @@ const TabularModalPage = _ref => {
|
|
|
1139
1136
|
})
|
|
1140
1137
|
}), jsx(CustomViewsSelectorWrapper, {
|
|
1141
1138
|
children: jsx(CustomViewSelector, {
|
|
1142
|
-
margin:
|
|
1139
|
+
margin: "".concat(designTokens$1.spacing30, " 0 0 0"),
|
|
1143
1140
|
customViewLocatorCodes: props.customViewLocatorCodes
|
|
1144
1141
|
})
|
|
1145
1142
|
}), jsx(ModalContentWrapper, {
|
|
@@ -1192,13 +1189,17 @@ const HeaderControlsWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV =
|
|
|
1192
1189
|
target: "etkdonc0",
|
|
1193
1190
|
label: "HeaderControlsWrapper"
|
|
1194
1191
|
})("margin-top:", designTokens$1.spacingS, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1mb3JtLWRldGFpbC1wYWdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QndDIiwiZmlsZSI6ImN1c3RvbS1mb3JtLWRldGFpbC1wYWdlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgUmVhY3RFbGVtZW50LCBSZWFjdE5vZGUsIE1vdXNlRXZlbnQsIEtleWJvYXJkRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBzaGFyZWRNZXNzYWdlcyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL2kxOG4nO1xuaW1wb3J0IHsgZGVzaWduVG9rZW5zIGFzIHVpS2l0RGVzaWduVG9rZW5zIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvZGVzaWduLXN5c3RlbSc7XG5pbXBvcnQgU3BhY2luZ3M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dXNlXG4vLyB0aGVtIGluIHRoZSBjdXN0b20gY29udHJvbHMuXG5DdXN0b21Gb3JtRGV0YWlsUGFnZS5Gb3JtUHJpbWFyeUJ1dHRvbiA9IEZvcm1QcmltYXJ5QnV0dG9uO1xuQ3VzdG9tRm9ybURldGFpbFBhZ2UuRm9ybVNlY29uZGFyeUJ1dHRvbiA9IEZvcm1TZWNvbmRhcnlCdXR0b247XG5DdXN0b21Gb3JtRGV0YWlsUGFnZS5Gb3JtRGVsZXRlQnV0dG9uID0gRm9ybURlbGV0ZUJ1dHRvbjtcbi8vIFRoaXMgaXMgYSBjb252ZW5pZW5jZSBwcm94eSBleHBvcnQgdG8gZXhwb3NlIHByZS1kZWZpbmVkIEludGwgbWVzc2FnZXMgZGVmaW5lZCBpbiB0aGUgYEBjb21tZXJjZXRvb2xzLWZyb250ZW5kL2kxOG5gIHBhY2thZ2UuXG4vLyBUaGUgSW50bCBtZXNzYWdlcyBjYW4gYmUgdXNlZCBmb3IgYnV0dG9uIGxhYmVscy5cbkN1c3RvbUZvcm1EZXRhaWxQYWdlLkludGwgPSBzaGFyZWRNZXNzYWdlcztcblxuZXhwb3J0IGRlZmF1bHQgQ3VzdG9tRm9ybURldGFpbFBhZ2U7XG4iXX0= */"));
|
|
1195
|
-
const getCustomViewsSelectorMargin = hasContentBelow =>
|
|
1192
|
+
const getCustomViewsSelectorMargin = hasContentBelow => {
|
|
1193
|
+
var _context;
|
|
1194
|
+
return _concatInstanceProperty(_context = "".concat(designTokens$1.spacing40, " 0 ")).call(_context, hasContentBelow ? designTokens$1.spacing40 : '0', " 0");
|
|
1195
|
+
};
|
|
1196
1196
|
|
|
1197
1197
|
// NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
|
|
1198
1198
|
// However, we need to explicitly define this otherwise the prop-types babel plugin
|
|
1199
1199
|
// does not recognize the object shape.
|
|
1200
1200
|
|
|
1201
1201
|
const CustomFormDetailPage = _ref => {
|
|
1202
|
+
var _props$title;
|
|
1202
1203
|
let _ref$hideControls = _ref.hideControls,
|
|
1203
1204
|
hideControls = _ref$hideControls === void 0 ? false : _ref$hideControls,
|
|
1204
1205
|
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
@@ -1210,7 +1211,7 @@ const CustomFormDetailPage = _ref => {
|
|
|
1210
1211
|
previousPathLabel: props.previousPathLabel,
|
|
1211
1212
|
onClick: props.onPreviousPathClick
|
|
1212
1213
|
}), props.customTitleRow || jsx(PageHeaderTitle, {
|
|
1213
|
-
title: props.title
|
|
1214
|
+
title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
|
|
1214
1215
|
subtitle: props.subtitle,
|
|
1215
1216
|
titleSize: "big"
|
|
1216
1217
|
}), jsx(CustomViewSelector, {
|
|
@@ -1296,6 +1297,7 @@ InfoDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
|
1296
1297
|
|
|
1297
1298
|
const _excluded$6 = ["hideControls"];
|
|
1298
1299
|
const TabularDetailPage = _ref => {
|
|
1300
|
+
var _props$title;
|
|
1299
1301
|
let _ref$hideControls = _ref.hideControls,
|
|
1300
1302
|
hideControls = _ref$hideControls === void 0 ? false : _ref$hideControls,
|
|
1301
1303
|
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
@@ -1307,7 +1309,7 @@ const TabularDetailPage = _ref => {
|
|
|
1307
1309
|
previousPathLabel: props.previousPathLabel,
|
|
1308
1310
|
onClick: props.onPreviousPathClick
|
|
1309
1311
|
}), props.customTitleRow || jsx(PageHeaderTitle, {
|
|
1310
|
-
title: props.title
|
|
1312
|
+
title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
|
|
1311
1313
|
subtitle: props.subtitle,
|
|
1312
1314
|
titleSize: "big"
|
|
1313
1315
|
}), jsx(ControlsContainter, {
|
|
@@ -1321,7 +1323,7 @@ const TabularDetailPage = _ref => {
|
|
|
1321
1323
|
})]
|
|
1322
1324
|
}), jsx(CustomViewsSelectorWrapper, {
|
|
1323
1325
|
children: jsx(CustomViewSelector, {
|
|
1324
|
-
margin:
|
|
1326
|
+
margin: "".concat(designTokens$1.spacing30, " 0 0 0"),
|
|
1325
1327
|
customViewLocatorCodes: props.customViewLocatorCodes
|
|
1326
1328
|
})
|
|
1327
1329
|
}), jsx(ContentWrapper$2, {
|
|
@@ -1341,7 +1343,7 @@ TabularDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
|
1341
1343
|
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1342
1344
|
TabularDetailPage.Intl = sharedMessages;
|
|
1343
1345
|
|
|
1344
|
-
const PublicPageLayout = /*#__PURE__*/lazy(() => import('./public-page-layout-
|
|
1346
|
+
const PublicPageLayout = /*#__PURE__*/lazy(() => import('./public-page-layout-2fea64b6.esm.js' /* webpackChunkName: "public-page-layout" */));
|
|
1345
1347
|
|
|
1346
1348
|
const MainPageContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
1347
1349
|
target: "ev8m2jf2"
|
|
@@ -1365,8 +1367,9 @@ const MainPageContent = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "pr
|
|
|
1365
1367
|
})("flex:1;flex-basis:0;overflow:auto;margin:", designTokens.marginForPageContent, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1haW4tcGFnZS5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZXlDIiwiZmlsZSI6Im1haW4tcGFnZS5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgYXMgdWlLaXREZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJztcbmltcG9ydCB7IGRlc2lnblRva2VucyBhcyBhcHBLaXREZXNpZ25Ub2tlbnMgfSBmcm9tICcuLi8uLi8uLi90aGVtaW5nJztcblxuZXhwb3J0IGNvbnN0IE1haW5QYWdlQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcbiAgcGFkZGluZzogJHthcHBLaXREZXNpZ25Ub2tlbnMucGFkZGluZ0Zvck1haW5QYWdlSGVhZGVyfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gc3R5bGVkLmhyYFxuICBiYWNrZ3JvdW5kLWNvbG9yOiAke3VpS2l0RGVzaWduVG9rZW5zLmNvbG9yTmV1dHJhbDkwfTtcbiAgaGVpZ2h0OiAxcHg7XG4gIGJvcmRlcjogMDtcbmA7XG5cbi8vIE5PVEU6IGRvIG5vdCBjaGFuZ2UgXCJtYXJnaW5cIiB0byBcInBhZGRpbmdcIiBhcyB0aGlzIGJyZWFrcyBzdGlja3kgRGF0YVRhYmxlIHN0eWxlc1xuZXhwb3J0IGNvbnN0IE1haW5QYWdlQ29udGVudCA9IHN0eWxlZC5kaXZgXG4gIGZsZXg6IDE7XG4gIGZsZXgtYmFzaXM6IDA7XG4gIG92ZXJmbG93OiBhdXRvO1xuICBtYXJnaW46ICR7YXBwS2l0RGVzaWduVG9rZW5zLm1hcmdpbkZvclBhZ2VDb250ZW50fTtcbmA7XG4iXX0= */"));
|
|
1366
1368
|
|
|
1367
1369
|
const _excluded$5 = ["hideControls", "hideDivider"];
|
|
1368
|
-
const headerRowMargin =
|
|
1370
|
+
const headerRowMargin = "".concat(designTokens$1.spacing40, " 0 0 0");
|
|
1369
1371
|
const CustomFormMainPage = _ref => {
|
|
1372
|
+
var _props$title;
|
|
1370
1373
|
let _ref$hideControls = _ref.hideControls,
|
|
1371
1374
|
hideControls = _ref$hideControls === void 0 ? false : _ref$hideControls,
|
|
1372
1375
|
_ref$hideDivider = _ref.hideDivider,
|
|
@@ -1376,7 +1379,7 @@ const CustomFormMainPage = _ref => {
|
|
|
1376
1379
|
return jsxs(PageWrapper, {
|
|
1377
1380
|
children: [jsxs(MainPageContainer, {
|
|
1378
1381
|
children: [props.customTitleRow || jsx(PageHeaderTitle, {
|
|
1379
|
-
title: props.title
|
|
1382
|
+
title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
|
|
1380
1383
|
subtitle: props.subtitle,
|
|
1381
1384
|
titleSize: "big"
|
|
1382
1385
|
}), jsx(CustomViewSelector, {
|
|
@@ -1468,6 +1471,7 @@ InfoMainPage.PageHeaderTitle = PageHeaderTitle;
|
|
|
1468
1471
|
|
|
1469
1472
|
const _excluded$3 = ["hideControls"];
|
|
1470
1473
|
const TabularMainPage = _ref => {
|
|
1474
|
+
var _props$title;
|
|
1471
1475
|
let _ref$hideControls = _ref.hideControls,
|
|
1472
1476
|
hideControls = _ref$hideControls === void 0 ? false : _ref$hideControls,
|
|
1473
1477
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
@@ -1475,7 +1479,7 @@ const TabularMainPage = _ref => {
|
|
|
1475
1479
|
return jsxs(PageWrapper, {
|
|
1476
1480
|
children: [jsxs(TabularPageContainer, {
|
|
1477
1481
|
children: [props.customTitleRow || jsx(PageHeaderTitle, {
|
|
1478
|
-
title: props.title
|
|
1482
|
+
title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
|
|
1479
1483
|
subtitle: props.subtitle,
|
|
1480
1484
|
titleSize: "big"
|
|
1481
1485
|
}), jsx(ControlsContainter, {
|
|
@@ -1489,7 +1493,7 @@ const TabularMainPage = _ref => {
|
|
|
1489
1493
|
})]
|
|
1490
1494
|
}), jsx(CustomViewsSelectorWrapper, {
|
|
1491
1495
|
children: jsx(CustomViewSelector, {
|
|
1492
|
-
margin:
|
|
1496
|
+
margin: "".concat(designTokens$1.spacing30, " 0 0 0"),
|
|
1493
1497
|
customViewLocatorCodes: props.customViewLocatorCodes
|
|
1494
1498
|
})
|
|
1495
1499
|
}), jsx(ContentWrapper$2, {
|
|
@@ -1886,8 +1890,9 @@ const messages$1 = defineMessages({
|
|
|
1886
1890
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$2() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
1887
1891
|
const isIframeReady = iFrameElementRef => {
|
|
1888
1892
|
try {
|
|
1889
|
-
|
|
1890
|
-
|
|
1893
|
+
var _iFrameElementRef$con;
|
|
1894
|
+
return (iFrameElementRef === null || iFrameElementRef === void 0 || (_iFrameElementRef$con = iFrameElementRef.contentWindow) === null || _iFrameElementRef$con === void 0 ? void 0 : _iFrameElementRef$con.document.readyState) === 'complete';
|
|
1895
|
+
} catch (_unused) {
|
|
1891
1896
|
// Trying to access the contentWindow of a cross-origin iFrame will throw an error.
|
|
1892
1897
|
// We are not supposed to even get here because the iFrame must use
|
|
1893
1898
|
// a URL from our very same domain (the custom view is proxied through our http-proxy service).
|
|
@@ -1921,15 +1926,20 @@ const CustomPanelIframe = /*#__PURE__*/_styled("iframe", process.env.NODE_ENV ==
|
|
|
1921
1926
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
1922
1927
|
});
|
|
1923
1928
|
function CustomViewLoader(props) {
|
|
1929
|
+
var _props$customView$typ;
|
|
1924
1930
|
const iFrameElementRef = useRef(null);
|
|
1925
1931
|
const dataLocale = useApplicationContext(context => context.dataLocale);
|
|
1926
|
-
const projectKey = useApplicationContext(context =>
|
|
1932
|
+
const projectKey = useApplicationContext(context => {
|
|
1933
|
+
var _context$project;
|
|
1934
|
+
return (_context$project = context.project) === null || _context$project === void 0 ? void 0 : _context$project.key;
|
|
1935
|
+
});
|
|
1927
1936
|
const featureFlags = useAllFeatureToggles();
|
|
1928
1937
|
const iFrameCommunicationChannel = useRef(new MessageChannel());
|
|
1929
1938
|
const showNotification = useShowNotification();
|
|
1930
1939
|
const intl = useIntl();
|
|
1931
1940
|
const hasSentInitializationMessages = useRef(false);
|
|
1932
1941
|
const sendInitializationMessages = useCallback(() => {
|
|
1942
|
+
var _iFrameElementRef$cur, _context;
|
|
1933
1943
|
// If we have already sent the initialization messages, do not send them again.
|
|
1934
1944
|
// The message can be sent either as a response to the CUSTOM_VIEW_READY message
|
|
1935
1945
|
// or as a result of a setTimeout after 500ms. In any case, this message should be sent only once.
|
|
@@ -1938,12 +1948,12 @@ function CustomViewLoader(props) {
|
|
|
1938
1948
|
}
|
|
1939
1949
|
|
|
1940
1950
|
// Transfer port2 to the iFrame so it can send messages back privately
|
|
1941
|
-
iFrameElementRef.current
|
|
1951
|
+
(_iFrameElementRef$cur = iFrameElementRef.current) === null || _iFrameElementRef$cur === void 0 || (_iFrameElementRef$cur = _iFrameElementRef$cur.contentWindow) === null || _iFrameElementRef$cur === void 0 || _iFrameElementRef$cur.postMessage(CUSTOM_VIEWS_EVENTS_NAMES.CUSTOM_VIEW_BOOTSTRAP, window.location.href, [iFrameCommunicationChannel.current.port2]);
|
|
1942
1952
|
|
|
1943
1953
|
// Send the initialization message to the iFrame
|
|
1944
1954
|
iFrameCommunicationChannel.current.port1.postMessage({
|
|
1945
1955
|
source: CUSTOM_VIEWS_EVENTS_META.HOST_APPLICATION_CODE,
|
|
1946
|
-
destination:
|
|
1956
|
+
destination: _concatInstanceProperty(_context = "".concat(CUSTOM_VIEWS_EVENTS_META.CUSTOM_VIEW_KEY_PREFIX)).call(_context, props.customView.id),
|
|
1947
1957
|
eventName: CUSTOM_VIEWS_EVENTS_NAMES.CUSTOM_VIEW_INITIALIZATION,
|
|
1948
1958
|
eventData: {
|
|
1949
1959
|
context: {
|
|
@@ -2013,31 +2023,31 @@ function CustomViewLoader(props) {
|
|
|
2013
2023
|
window.addEventListener('message', messageFromIFrameHandler);
|
|
2014
2024
|
return () => {
|
|
2015
2025
|
window.removeEventListener('message', messageFromIFrameHandler);
|
|
2016
|
-
communicationChannel
|
|
2026
|
+
communicationChannel === null || communicationChannel === void 0 || communicationChannel.port1.close();
|
|
2017
2027
|
};
|
|
2018
2028
|
}, []);
|
|
2019
2029
|
|
|
2020
2030
|
// Currently we only support custom panels
|
|
2021
2031
|
if (props.customView.type !== 'CustomPanel') {
|
|
2022
|
-
reportErrorToSentry(new Error(
|
|
2032
|
+
reportErrorToSentry(new Error("CustomViewLoader: Provided Custom View has an unsupported type: ".concat(props.customView.type, ". Supported types: ['CustomPanel'].")));
|
|
2023
2033
|
return null;
|
|
2024
2034
|
}
|
|
2025
|
-
const panelSize = props.customView.typeSettings
|
|
2035
|
+
const panelSize = ((_props$customView$typ = props.customView.typeSettings) === null || _props$customView$typ === void 0 || (_props$customView$typ = _props$customView$typ.size) === null || _props$customView$typ === void 0 ? void 0 : _props$customView$typ.toLocaleLowerCase()) || 'large';
|
|
2026
2036
|
const iFrameUrl = [window.location.origin, 'custom-views', props.customView.id, 'projects', projectKey].join('/');
|
|
2027
2037
|
return jsx(ModalPage, {
|
|
2028
2038
|
isOpen: true,
|
|
2029
2039
|
onClose: props.onClose,
|
|
2030
2040
|
size: panelSize === 'small' ? 10 : 30,
|
|
2031
|
-
title:
|
|
2041
|
+
title: "Custom View: ".concat(props.customView.defaultLabel),
|
|
2032
2042
|
hideTopBar: true,
|
|
2033
2043
|
children: jsx(ContentWrapper, {
|
|
2034
2044
|
children: jsx(CustomPanelIframe, {
|
|
2035
|
-
id:
|
|
2036
|
-
title:
|
|
2045
|
+
id: "custom-view-".concat(props.customView.id),
|
|
2046
|
+
title: "Custom View: ".concat(props.customView.defaultLabel),
|
|
2037
2047
|
ref: iFrameElementRef,
|
|
2038
2048
|
src: iFrameUrl,
|
|
2039
2049
|
onLoad: onLoadSuccessHandler
|
|
2040
|
-
},
|
|
2050
|
+
}, "custom-view-".concat(props.customView.id))
|
|
2041
2051
|
})
|
|
2042
2052
|
});
|
|
2043
2053
|
}
|
|
@@ -2148,20 +2158,21 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
2148
2158
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
2149
2159
|
};
|
|
2150
2160
|
const PortalsContainer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2161
|
+
var _props$offsetTop, _props$offsetLeft, _props$offsetLeftOnEx, _props$containerSelec, _props$zIndex, _props$baseModalZInde, _current, _current2;
|
|
2151
2162
|
// Initialize props with default values.
|
|
2152
2163
|
// NOTE: using `defaultProps` with `forwardRef` results in the type declarations
|
|
2153
2164
|
// to ignore the `defaultProps`. Therefore, the default props are typed
|
|
2154
2165
|
// as optional and we initialize the value here with the default values.
|
|
2155
|
-
const offsetTop = props.offsetTop
|
|
2156
|
-
const offsetLeft = props.offsetLeft
|
|
2157
|
-
const offsetLeftOnExpandedMenu = props.offsetLeftOnExpandedMenu
|
|
2158
|
-
const containerSelectorToPreventScrollingOnOpen = props.containerSelectorToPreventScrollingOnOpen
|
|
2159
|
-
const zIndex = props.zIndex
|
|
2160
|
-
const baseModalZIndex = props.baseModalZIndex
|
|
2166
|
+
const offsetTop = (_props$offsetTop = props.offsetTop) !== null && _props$offsetTop !== void 0 ? _props$offsetTop : '0px';
|
|
2167
|
+
const offsetLeft = (_props$offsetLeft = props.offsetLeft) !== null && _props$offsetLeft !== void 0 ? _props$offsetLeft : '0px';
|
|
2168
|
+
const offsetLeftOnExpandedMenu = (_props$offsetLeftOnEx = props.offsetLeftOnExpandedMenu) !== null && _props$offsetLeftOnEx !== void 0 ? _props$offsetLeftOnEx : '0px';
|
|
2169
|
+
const containerSelectorToPreventScrollingOnOpen = (_props$containerSelec = props.containerSelectorToPreventScrollingOnOpen) !== null && _props$containerSelec !== void 0 ? _props$containerSelec : 'main';
|
|
2170
|
+
const zIndex = (_props$zIndex = props.zIndex) !== null && _props$zIndex !== void 0 ? _props$zIndex : 10000;
|
|
2171
|
+
const baseModalZIndex = (_props$baseModalZInde = props.baseModalZIndex) !== null && _props$baseModalZInde !== void 0 ? _props$baseModalZInde : 1000;
|
|
2161
2172
|
const modalWidthTransition = 'width 150ms cubic-bezier(1, 0, 0.58, 1)';
|
|
2162
2173
|
const portalsContainerRef = useRef(null);
|
|
2163
|
-
const globalNotificationsElementDimensions = useObserverElementDimensions(ref
|
|
2164
|
-
const pageNotificationsElementDimensions = useObserverElementDimensions(ref
|
|
2174
|
+
const globalNotificationsElementDimensions = useObserverElementDimensions(ref === null || ref === void 0 || (_current = ref.current) === null || _current === void 0 ? void 0 : _current.notificationsGlobalRef);
|
|
2175
|
+
const pageNotificationsElementDimensions = useObserverElementDimensions(ref === null || ref === void 0 || (_current2 = ref.current) === null || _current2 === void 0 ? void 0 : _current2.notificationsPageRef);
|
|
2165
2176
|
const _useState3 = useState([]),
|
|
2166
2177
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
2167
2178
|
stackingLayers = _useState4[0],
|
package/dist/{custom-views-selector-7be2d0a2.cjs.dev.js → custom-views-selector-1397a063.cjs.dev.js}
RENAMED
|
@@ -32,6 +32,7 @@ var constants = require('@commercetools-frontend/constants');
|
|
|
32
32
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
33
33
|
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
34
34
|
require('@commercetools-uikit/utils');
|
|
35
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
35
36
|
require('@radix-ui/react-dialog');
|
|
36
37
|
require('@commercetools-uikit/card');
|
|
37
38
|
require('@commercetools-uikit/secondary-icon-button');
|
|
@@ -43,6 +44,7 @@ require('lodash/omitBy');
|
|
|
43
44
|
require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
44
45
|
require('@babel/runtime-corejs3/core-js-stable/set-timeout');
|
|
45
46
|
require('@commercetools-uikit/flat-button');
|
|
47
|
+
require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
46
48
|
require('@commercetools-uikit/icon-button');
|
|
47
49
|
require('@commercetools-frontend/assets/images/page-not-found.svg');
|
|
48
50
|
require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
@@ -92,7 +94,7 @@ const useCustomViewLocatorSelector = function () {
|
|
|
92
94
|
});
|
|
93
95
|
});
|
|
94
96
|
return {
|
|
95
|
-
currentCustomViewLocatorCode: customViewLocator
|
|
97
|
+
currentCustomViewLocatorCode: customViewLocator === null || customViewLocator === void 0 ? void 0 : customViewLocator[0]
|
|
96
98
|
};
|
|
97
99
|
};
|
|
98
100
|
|
|
@@ -105,11 +107,12 @@ var messages = reactIntl.defineMessages({
|
|
|
105
107
|
|
|
106
108
|
var FetchCustomViewsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchCustomViewsByLocator" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "customViewLocatorCode" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allCustomViewsInstallationsByLocator" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "locator" }, value: { kind: "Variable", name: { kind: "Name", value: "customViewLocatorCode" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "customView" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "typeSettings" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "size" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "locators" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "oAuthScopes" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 405, source: { body: "query FetchCustomViewsByLocator($customViewLocatorCode: String!) {\n allCustomViewsInstallationsByLocator(locator: $customViewLocatorCode) {\n id\n customView {\n id\n defaultLabel\n labelAllLocales {\n locale\n value\n }\n url\n type\n typeSettings {\n size\n }\n locators\n permissions {\n name\n oAuthScopes\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
107
109
|
const useCustomViewsConnector = _ref => {
|
|
110
|
+
var _enableCustomViews$va, _data$allCustomViewsI;
|
|
108
111
|
let customViewLocatorCode = _ref.customViewLocatorCode;
|
|
109
112
|
const enableCustomViews = reactBroadcast.useFlagVariation(constants.featureFlags.CUSTOM_VIEWS);
|
|
110
113
|
const areCustomViewsEnabled =
|
|
111
114
|
// @ts-ignore In case it's coming from the MC API, it's an object { value: boolean }.
|
|
112
|
-
(enableCustomViews
|
|
115
|
+
((_enableCustomViews$va = enableCustomViews === null || enableCustomViews === void 0 ? void 0 : enableCustomViews.value) !== null && _enableCustomViews$va !== void 0 ? _enableCustomViews$va : enableCustomViews) && process.env.DISABLE_CUSTOM_VIEWS_FEATURE !== 'true';
|
|
113
116
|
const _useMcQuery = applicationShellConnectors.useMcQuery(FetchCustomViewsQuery, {
|
|
114
117
|
variables: {
|
|
115
118
|
customViewLocatorCode
|
|
@@ -123,7 +126,7 @@ const useCustomViewsConnector = _ref => {
|
|
|
123
126
|
error = _useMcQuery.error,
|
|
124
127
|
loading = _useMcQuery.loading;
|
|
125
128
|
return {
|
|
126
|
-
customViews: data
|
|
129
|
+
customViews: (data === null || data === void 0 || (_data$allCustomViewsI = data.allCustomViewsInstallationsByLocator) === null || _data$allCustomViewsI === void 0 ? void 0 : _mapInstanceProperty__default["default"](_data$allCustomViewsI).call(_data$allCustomViewsI, installation => installation.customView)) || [],
|
|
127
130
|
error,
|
|
128
131
|
loading
|
|
129
132
|
};
|
|
@@ -231,7 +234,7 @@ function CustomViewSelector(props) {
|
|
|
231
234
|
const isNotLastItem = index !== customViews.length - 1;
|
|
232
235
|
return jsxRuntime.jsxs(react$1.Fragment, {
|
|
233
236
|
children: [jsxRuntime.jsx(CustomViewSelectorItem, {
|
|
234
|
-
selected: selectedCustomView
|
|
237
|
+
selected: (selectedCustomView === null || selectedCustomView === void 0 ? void 0 : selectedCustomView.id) === customView.id,
|
|
235
238
|
onClick: () => {
|
|
236
239
|
setSelectedCustomView(customView);
|
|
237
240
|
},
|
|
@@ -254,7 +257,7 @@ CustomViewSelector.displayName = 'CustomViewSelector';
|
|
|
254
257
|
const CustomViewSelectorOrNothing = props => {
|
|
255
258
|
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
256
259
|
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
257
|
-
const locatorCode = currentCustomViewLocatorCode
|
|
260
|
+
const locatorCode = currentCustomViewLocatorCode !== null && currentCustomViewLocatorCode !== void 0 ? currentCustomViewLocatorCode : props.customViewLocatorCode;
|
|
258
261
|
if (!locatorCode) {
|
|
259
262
|
return null;
|
|
260
263
|
}
|
|
@@ -32,6 +32,7 @@ var constants = require('@commercetools-frontend/constants');
|
|
|
32
32
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
33
33
|
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
34
34
|
require('@commercetools-uikit/utils');
|
|
35
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
35
36
|
require('@radix-ui/react-dialog');
|
|
36
37
|
require('@commercetools-uikit/card');
|
|
37
38
|
require('@commercetools-uikit/secondary-icon-button');
|
|
@@ -43,6 +44,7 @@ require('lodash/omitBy');
|
|
|
43
44
|
require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
44
45
|
require('@babel/runtime-corejs3/core-js-stable/set-timeout');
|
|
45
46
|
require('@commercetools-uikit/flat-button');
|
|
47
|
+
require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
46
48
|
require('@commercetools-uikit/icon-button');
|
|
47
49
|
require('@commercetools-frontend/assets/images/page-not-found.svg');
|
|
48
50
|
require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
@@ -92,7 +94,7 @@ const useCustomViewLocatorSelector = function () {
|
|
|
92
94
|
});
|
|
93
95
|
});
|
|
94
96
|
return {
|
|
95
|
-
currentCustomViewLocatorCode: customViewLocator
|
|
97
|
+
currentCustomViewLocatorCode: customViewLocator === null || customViewLocator === void 0 ? void 0 : customViewLocator[0]
|
|
96
98
|
};
|
|
97
99
|
};
|
|
98
100
|
|
|
@@ -105,11 +107,12 @@ var messages = reactIntl.defineMessages({
|
|
|
105
107
|
|
|
106
108
|
var FetchCustomViewsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchCustomViewsByLocator" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "customViewLocatorCode" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allCustomViewsInstallationsByLocator" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "locator" }, value: { kind: "Variable", name: { kind: "Name", value: "customViewLocatorCode" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "customView" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "typeSettings" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "size" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "locators" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "oAuthScopes" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 405, source: { body: "query FetchCustomViewsByLocator($customViewLocatorCode: String!) {\n allCustomViewsInstallationsByLocator(locator: $customViewLocatorCode) {\n id\n customView {\n id\n defaultLabel\n labelAllLocales {\n locale\n value\n }\n url\n type\n typeSettings {\n size\n }\n locators\n permissions {\n name\n oAuthScopes\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
107
109
|
const useCustomViewsConnector = _ref => {
|
|
110
|
+
var _enableCustomViews$va, _data$allCustomViewsI;
|
|
108
111
|
let customViewLocatorCode = _ref.customViewLocatorCode;
|
|
109
112
|
const enableCustomViews = reactBroadcast.useFlagVariation(constants.featureFlags.CUSTOM_VIEWS);
|
|
110
113
|
const areCustomViewsEnabled =
|
|
111
114
|
// @ts-ignore In case it's coming from the MC API, it's an object { value: boolean }.
|
|
112
|
-
(enableCustomViews
|
|
115
|
+
((_enableCustomViews$va = enableCustomViews === null || enableCustomViews === void 0 ? void 0 : enableCustomViews.value) !== null && _enableCustomViews$va !== void 0 ? _enableCustomViews$va : enableCustomViews) && process.env.DISABLE_CUSTOM_VIEWS_FEATURE !== 'true';
|
|
113
116
|
const _useMcQuery = applicationShellConnectors.useMcQuery(FetchCustomViewsQuery, {
|
|
114
117
|
variables: {
|
|
115
118
|
customViewLocatorCode
|
|
@@ -123,7 +126,7 @@ const useCustomViewsConnector = _ref => {
|
|
|
123
126
|
error = _useMcQuery.error,
|
|
124
127
|
loading = _useMcQuery.loading;
|
|
125
128
|
return {
|
|
126
|
-
customViews: data
|
|
129
|
+
customViews: (data === null || data === void 0 || (_data$allCustomViewsI = data.allCustomViewsInstallationsByLocator) === null || _data$allCustomViewsI === void 0 ? void 0 : _mapInstanceProperty__default["default"](_data$allCustomViewsI).call(_data$allCustomViewsI, installation => installation.customView)) || [],
|
|
127
130
|
error,
|
|
128
131
|
loading
|
|
129
132
|
};
|
|
@@ -210,7 +213,7 @@ function CustomViewSelector(props) {
|
|
|
210
213
|
const isNotLastItem = index !== customViews.length - 1;
|
|
211
214
|
return jsxRuntime.jsxs(react$1.Fragment, {
|
|
212
215
|
children: [jsxRuntime.jsx(CustomViewSelectorItem, {
|
|
213
|
-
selected: selectedCustomView
|
|
216
|
+
selected: (selectedCustomView === null || selectedCustomView === void 0 ? void 0 : selectedCustomView.id) === customView.id,
|
|
214
217
|
onClick: () => {
|
|
215
218
|
setSelectedCustomView(customView);
|
|
216
219
|
},
|
|
@@ -233,7 +236,7 @@ CustomViewSelector.displayName = 'CustomViewSelector';
|
|
|
233
236
|
const CustomViewSelectorOrNothing = props => {
|
|
234
237
|
const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
|
|
235
238
|
currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
|
|
236
|
-
const locatorCode = currentCustomViewLocatorCode
|
|
239
|
+
const locatorCode = currentCustomViewLocatorCode !== null && currentCustomViewLocatorCode !== void 0 ? currentCustomViewLocatorCode : props.customViewLocatorCode;
|
|
237
240
|
if (!locatorCode) {
|
|
238
241
|
return null;
|
|
239
242
|
}
|