@commercetools-frontend/application-components 22.13.0 → 22.13.2

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.
@@ -34,15 +34,16 @@ var SecondaryButton = require('@commercetools-uikit/secondary-button');
34
34
  var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
35
35
  var omitBy = require('lodash/omitBy');
36
36
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
37
- var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
38
37
  var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
39
38
  var sentry = require('@commercetools-frontend/sentry');
39
+ var AccessibleButton = require('@commercetools-uikit/accessible-button');
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 IconButton = require('@commercetools-uikit/icon-button');
43
+ var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
44
44
  var FlatButton = require('@commercetools-uikit/flat-button');
45
45
  var reactBroadcast = require('@flopflip/react-broadcast');
46
+ var IconButton = require('@commercetools-uikit/icon-button');
46
47
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
47
48
  var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
48
49
  var PageNotFoundSVG = require('@commercetools-frontend/assets/images/page-not-found.svg');
@@ -71,11 +72,12 @@ var PrimaryButton__default = /*#__PURE__*/_interopDefault(PrimaryButton);
71
72
  var SecondaryButton__default = /*#__PURE__*/_interopDefault(SecondaryButton);
72
73
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
73
74
  var omitBy__default = /*#__PURE__*/_interopDefault(omitBy);
74
- var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
75
75
  var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
76
+ var AccessibleButton__default = /*#__PURE__*/_interopDefault(AccessibleButton);
76
77
  var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
77
- var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
78
+ var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
78
79
  var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
80
+ var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
79
81
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
80
82
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
81
83
  var PageNotFoundSVG__default = /*#__PURE__*/_interopDefault(PageNotFoundSVG);
@@ -83,7 +85,7 @@ var FailedAuthorizationSVG__default = /*#__PURE__*/_interopDefault(FailedAuthori
83
85
  var useResizeObserver__default = /*#__PURE__*/_interopDefault(useResizeObserver);
84
86
 
85
87
  // NOTE: This string will be replaced on build time with the package version.
86
- var version = "22.13.0";
88
+ var version = "22.13.2";
87
89
 
88
90
  var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
89
91
  const appKitSpacing55 = '40px';
@@ -118,6 +120,7 @@ const themesOverrides = {
118
120
  heightForTab: '2px',
119
121
  lineHeightForNavbarLink: designSystem.designTokens.lineHeight20,
120
122
  marginBottomForPageTopBar: designSystem.designTokens.spacing40,
123
+ marginForCustomViewsSelectorAsTabular: "0 ".concat(appKitSpacing55),
121
124
  marginForDialogContainerContents: _concatInstanceProperty__default["default"](_context = "".concat(designSystem.designTokens.spacing30, " 0 ")).call(_context, designSystem.designTokens.spacing50, " 0"),
122
125
  marginForModalPageHeader: "0 ".concat(appKitSpacing55),
123
126
  marginForUserMenuItem: "".concat(designSystem.designTokens.spacing10, " 0"),
@@ -478,160 +481,6 @@ FormDialog.defaultProps = defaultProps$f;
478
481
  // The Intl messages can be used for button labels.
479
482
  FormDialog.Intl = i18n.sharedMessages;
480
483
 
481
- const defaultProps$e = {
482
- titleSize: 'small',
483
- truncate: false
484
- };
485
- const SubtitleWrapper = /*#__PURE__*/_styled__default["default"]("div", {
486
- target: "epaiodd0"
487
- } )("margin-top:", designTokens.marginTopForPageSubtitle, ";" + ("" ));
488
- const Title = props => {
489
- switch (props.titleSize) {
490
- case 'big':
491
- return jsxRuntime.jsx(Text__default["default"].Headline, {
492
- as: "h1",
493
- title: props.title,
494
- truncate: props.truncate,
495
- children: props.title
496
- });
497
- case 'medium':
498
- return jsxRuntime.jsx(Text__default["default"].Headline, {
499
- as: "h2",
500
- title: props.title,
501
- truncate: props.truncate,
502
- children: props.title
503
- });
504
- default:
505
- return jsxRuntime.jsx(Text__default["default"].Subheadline, {
506
- as: "h4",
507
- title: props.title,
508
- truncate: props.truncate,
509
- children: props.title
510
- });
511
- }
512
- };
513
- const Subtitle = props => {
514
- if (!props.subtitle) {
515
- return null;
516
- }
517
- if ( /*#__PURE__*/react$1.isValidElement(props.subtitle)) {
518
- return jsxRuntime.jsx(SubtitleWrapper, {
519
- children: props.subtitle
520
- });
521
- }
522
- return jsxRuntime.jsx(SubtitleWrapper, {
523
- children: jsxRuntime.jsx(Text__default["default"].Body, {
524
- title: typeof props.subtitle === 'string' ? props.subtitle : undefined,
525
- truncate: props.truncate,
526
- tone: "secondary",
527
- children: props.subtitle
528
- })
529
- });
530
- };
531
- Subtitle.propTypes = {};
532
- Subtitle.defaultProps = {
533
- truncate: false
534
- };
535
- var _ref$5 = {
536
- name: "d3v9zr",
537
- styles: "overflow:hidden"
538
- } ;
539
- const PageHeaderTitle = props => jsxRuntime.jsxs("div", {
540
- css: _ref$5,
541
- children: [jsxRuntime.jsx(Title, {
542
- title: props.title,
543
- titleSize: props.titleSize,
544
- truncate: props.truncate
545
- }), jsxRuntime.jsx(Subtitle, {
546
- subtitle: props.subtitle,
547
- truncate: props.truncate
548
- })]
549
- });
550
- PageHeaderTitle.propTypes = {};
551
- PageHeaderTitle.displayName = 'PageHeaderTitle';
552
- PageHeaderTitle.defaultProps = defaultProps$e;
553
-
554
- const PageHeader = props => {
555
- return jsxRuntime.jsxs("div", {
556
- css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;margin:", designTokens.marginForModalPageHeader, ";padding:", designTokens.paddingForModalPageHeader, ";border-bottom:1px solid ", designTokens.borderColorForModalPageHeaderDivider, ";&>*+*{margin-left:", designTokens.marginLeftForModalPageHeaderControls, ";}" + ("" ), "" ),
557
- children: [jsxRuntime.jsx(PageHeaderTitle, {
558
- title: props.title,
559
- titleSize: "big",
560
- subtitle: props.subtitle,
561
- truncate: true
562
- }), props.children]
563
- });
564
- };
565
- PageHeader.propTypes = {};
566
- PageHeader.displayName = 'PageHeader';
567
-
568
- const ContentWrapper$1 = /*#__PURE__*/_styled__default["default"]("div", {
569
- target: "e1b7jwn01"
570
- } )("flex:1;flex-basis:0;margin:", designTokens.marginForPageContent, ";overflow:auto;" + ("" ));
571
- const PageWrapper = /*#__PURE__*/_styled__default["default"]("div", {
572
- target: "e1b7jwn00"
573
- } )({
574
- name: "kdbhus",
575
- styles: "height:100%;display:flex;flex-direction:column"
576
- } );
577
-
578
- function ownKeys$4(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; }
579
- function _objectSpread$4(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$4(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$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
580
- const primaryDefaultProps = {
581
- label: i18n.sharedMessages.confirm,
582
- isDisabled: false,
583
- dataAttributes: {}
584
- };
585
- const useFormattedLabel = label => {
586
- const intl = reactIntl.useIntl();
587
- return typeof label === 'string' ? label : intl.formatMessage(label);
588
- };
589
- const FormPrimaryButton = props => {
590
- const label = useFormattedLabel(props.label);
591
- return jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$4({
592
- label: label,
593
- onClick: props.onClick,
594
- isDisabled: props.isDisabled
595
- }, filterDataAttributes(props.dataAttributes)));
596
- };
597
- FormPrimaryButton.propTypes = {};
598
- FormPrimaryButton.displayName = 'FormPrimaryButton';
599
- FormPrimaryButton.defaultProps = primaryDefaultProps;
600
- const secondaryDefaultProps = {
601
- label: i18n.sharedMessages.cancel,
602
- isDisabled: false,
603
- dataAttributes: {}
604
- };
605
- const FormSecondaryButton = props => {
606
- const label = useFormattedLabel(props.label);
607
- return jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$4({
608
- label: label,
609
- onClick: props.onClick,
610
- isDisabled: props.isDisabled,
611
- iconLeft: props.iconLeft
612
- }, filterDataAttributes(props.dataAttributes)));
613
- };
614
- FormSecondaryButton.propTypes = {};
615
- FormSecondaryButton.displayName = 'FormSecondaryButton';
616
- FormSecondaryButton.defaultProps = secondaryDefaultProps;
617
- const deleteDefaultProps = {
618
- label: i18n.sharedMessages.delete,
619
- isDisabled: false,
620
- dataAttributes: {}
621
- };
622
- const FormDeleteButton = props => {
623
- const label = useFormattedLabel(props.label);
624
- return jsxRuntime.jsx(IconButton__default["default"], _objectSpread$4({
625
- icon: jsxRuntime.jsx(icons.BinLinearIcon, {}),
626
- label: label,
627
- onClick: props.onClick,
628
- isDisabled: props.isDisabled
629
- }, filterDataAttributes(props.dataAttributes)));
630
- };
631
- FormDeleteButton.propTypes = {};
632
- FormDeleteButton.displayName = 'FormDeleteButton';
633
- FormDeleteButton.defaultProps = deleteDefaultProps;
634
-
635
484
  const messages$4 = reactIntl.defineMessages({
636
485
  back: {
637
486
  id: 'Components.ModalPage.TopBar.Back',
@@ -659,12 +508,12 @@ const LargeIconWrapper = props => jsxRuntime.jsx("span", {
659
508
  // However, we need to explicitly define this otherwise the prop-types babel plugin
660
509
  // does not recognize the object shape.
661
510
  LargeIconWrapper.propTypes = {};
662
- const defaultProps$d = {
511
+ const defaultProps$e = {
663
512
  color: 'surface',
664
513
  previousPathLabel: messages$4.back,
665
514
  hidePathLabel: false
666
515
  };
667
- var _ref$4 = {
516
+ var _ref$5 = {
668
517
  name: "uvw8rn",
669
518
  styles: "display:flex;overflow:hidden;button:first-of-type svg{height:12px!important;width:12px!important;}"
670
519
  } ;
@@ -673,7 +522,7 @@ const ModalPageTopBar = props => {
673
522
  return jsxRuntime.jsxs("div", {
674
523
  css: /*#__PURE__*/react.css("position:relative;display:flex;align-items:center;justify-content:space-between;padding:", designTokens.paddingForModalTopBar, ";background-color:", props.color === 'neutral' ? designTokens.backgroundColorForPageHeader : designSystem.designTokens.colorSurface, ";border-bottom:1px solid ", props.color === 'neutral' ? designSystem.designTokens.colorSurface : designTokens.borderColorForModalTopBarWhenSurface, ";& *+*{margin-left:", designSystem.designTokens.spacingS, ";}p{font-size:12px!important;}" + ("" ), "" ),
675
524
  children: [jsxRuntime.jsxs("div", {
676
- css: _ref$4,
525
+ css: _ref$5,
677
526
  children: [!props.hidePathLabel && jsxRuntime.jsx(FlatButton__default["default"], {
678
527
  tone: "primary",
679
528
  label: typeof props.previousPathLabel === 'string' ? props.previousPathLabel : intl.formatMessage(props.previousPathLabel),
@@ -705,96 +554,150 @@ const ModalPageTopBar = props => {
705
554
  };
706
555
  ModalPageTopBar.propTypes = {};
707
556
  ModalPageTopBar.displayName = 'ModalPageTopBar';
708
- ModalPageTopBar.defaultProps = defaultProps$d;
709
-
710
- const defaultProps$c = {
711
- size: 10,
712
- hideControls: false,
713
- onPrimaryButtonClick: () => {},
714
- onSecondaryButtonClick: () => {}
715
- };
716
- const ContentWrapper = /*#__PURE__*/_styled__default["default"]("div", {
717
- target: "e18jo6y41"
718
- } )("height:100%;padding:", designSystem.designTokens.spacing50, ";" + ("" ));
719
- const HeaderWrapper = /*#__PURE__*/_styled__default["default"]("div", {
720
- target: "e18jo6y40"
721
- } )("padding:", designSystem.designTokens.spacing40, " 40px;border-bottom:1px solid ", designTokens.borderColorForModalPageHeaderDivider, ";" + ("" ));
722
- function Drawer(props) {
723
- const intl = reactIntl.useIntl();
724
- return jsxRuntime.jsxs(ModalPage, {
725
- isOpen: props.isOpen,
726
- hidePathLabel: true,
727
- hideTopBar: true,
728
- onClose: props.onClose,
729
- size: props.size,
730
- title: props.title,
731
- afterOpenStyles: props.afterOpenStyles,
732
- customViewLocatorCode: props.customViewLocatorCode,
733
- getParentSelector: props.getParentSelector,
734
- shouldDelayOnClose: props.shouldDelayOnClose,
735
- topBarColor: props.topBarColor,
736
- zIndex: props.zIndex,
737
- children: [jsxRuntime.jsx(HeaderWrapper, {
738
- children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
739
- children: [jsxRuntime.jsxs(Spacings__default["default"].Inline, {
740
- justifyContent: "space-between",
741
- children: [jsxRuntime.jsx(PageHeaderTitle, {
742
- title: props.title,
743
- titleSize: "medium",
744
- subtitle: props.subtitle && jsxRuntime.jsx(Text__default["default"].Detail, {
745
- children: props.subtitle
746
- })
747
- }), props.onClose && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
748
- label: intl.formatMessage(messages$4.close),
749
- onClick: props.onClose,
750
- icon: jsxRuntime.jsx(LargeIconWrapper, {
751
- children: jsxRuntime.jsx(icons.CloseIcon, {})
752
- }),
753
- size: "big"
754
- })]
755
- }), jsxRuntime.jsxs(Spacings__default["default"].Inline, {
756
- justifyContent: "flex-end",
757
- children: [!props.hideControls && props.formControls && props.formControls, !props.hideControls && !props.formControls && jsxRuntime.jsxs(jsxRuntime.Fragment, {
758
- children: [jsxRuntime.jsx(FormSecondaryButton, {
759
- label: props.labelSecondaryButton,
760
- onClick: props.onSecondaryButtonClick,
761
- isDisabled: props.isSecondaryButtonDisabled,
762
- dataAttributes: props.dataAttributesSecondaryButton,
763
- iconLeft: props.iconLeftSecondaryButton
764
- }), jsxRuntime.jsx(FormPrimaryButton, {
765
- label: props.labelPrimaryButton,
766
- onClick: props.onPrimaryButtonClick,
767
- isDisabled: props.isPrimaryButtonDisabled,
768
- dataAttributes: props.dataAttributesPrimaryButton
769
- })]
770
- })]
771
- })]
772
- })
773
- }), jsxRuntime.jsx(ContentWrapper, {
774
- children: props.children
775
- })]
776
- });
777
- }
778
- Drawer.propTypes = {};
779
- Drawer.displayName = 'Drawer';
780
- Drawer.defaultProps = defaultProps$c;
781
- // Static export of pre-configured form control buttons to easily re-use
782
- // them in the custom controls.
783
- Drawer.FormPrimaryButton = FormPrimaryButton;
784
- Drawer.FormSecondaryButton = FormSecondaryButton;
785
- // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
786
- // The Intl messages can be used for button labels.
787
- Drawer.Intl = i18n.sharedMessages;
557
+ ModalPageTopBar.defaultProps = defaultProps$e;
788
558
 
789
- const messages$3 = reactIntl.defineMessages({
790
- loadError: {
791
- id: 'CustomViewLoader.error.load',
792
- defaultMessage: 'We could not load the Custom View. Please contact your administrator to check its configuration.'
559
+ const stylesBySize = {
560
+ '10': {
561
+ width: '600px',
562
+ transitionTime: 200
563
+ },
564
+ '20': {
565
+ width: '900px',
566
+ transitionTime: 200
567
+ },
568
+ '30': {
569
+ width: '1200px',
570
+ transitionTime: 200
571
+ },
572
+ scale: {
573
+ width: '100%',
574
+ transitionTime: 300
793
575
  }
794
- });
795
-
796
- const isIframeReady = iFrameElementRef => {
797
- try {
576
+ };
577
+ const getContainerStyles = props => /*#__PURE__*/react.css("position:absolute;top:0;right:0;height:100%;width:", props.size !== 'scale' ? "".concat(stylesBySize[props.size].width, " !important") : stylesBySize.scale.width, ";display:flex;flex-direction:column;background-color:", designSystem.customProperties.colorSurface, ";box-shadow:0px 0px 40px 0px rgba(0, 0, 0, 0.1);outline:0;transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n 0,\n 0\n );transition:transform ", stylesBySize[props.size].transitionTime, "ms ease;" + ("" ), "" );
578
+ const getOverlayStyles = props => /*#__PURE__*/react.css("position:absolute;z-index:", typeof props.zIndex === 'number' ? // Use `!important` to overwrite the default value assigned by the Stacking Layer System.
579
+ "".concat(props.zIndex, " !important") : 'auto', ";top:0;left:0;width:100%;height:100%;background-color:hsla(195, 35%, 20%, 0.05);opacity:0;transition:transform ", stylesBySize[props.size].transitionTime, "ms ease;" + ("" ), "" );
580
+ var _ref3 = {
581
+ name: "1ffv7m4",
582
+ styles: "transform:translate3d(0, 0, 0)!important"
583
+ } ;
584
+ const getAfterOpenContainerAnimation = () => _ref3;
585
+ var _ref2$1 = {
586
+ name: "1d9ftqx",
587
+ styles: "opacity:1!important"
588
+ } ;
589
+ const getAfterOpenOverlayAnimation = () => _ref2$1;
590
+ const getBeforeCloseContainerAnimation = props => /*#__PURE__*/react.css("transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n ,\n 0,\n 0\n )!important;" + ("" ), "" );
591
+ var _ref$4 = {
592
+ name: "728dx5",
593
+ styles: "opacity:0!important"
594
+ } ;
595
+ const getBeforeCloseOverlayAnimation = () => _ref$4;
596
+
597
+ function ownKeys$4(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; }
598
+ function _objectSpread$4(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$4(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$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
599
+ const getDefaultParentSelector = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
600
+ const getOverlayElement = (props, contentElement) =>
601
+ // Assign the `data-role` to the overlay container, which is used as
602
+ // the CSS selector in the `<PortalsContainer>`.
603
+ jsxRuntime.jsx("div", _objectSpread$4(_objectSpread$4({}, props), {}, {
604
+ "data-role": "modal-overlay",
605
+ children: contentElement
606
+ }));
607
+
608
+ // NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
609
+ // However, we need to explicitly define this otherwise the prop-types babel plugin
610
+ // does not recognize the object shape.
611
+ const defaultProps$d = {
612
+ size: 'scale',
613
+ getParentSelector: getDefaultParentSelector,
614
+ shouldDelayOnClose: true
615
+ };
616
+ const ModalPage = props => {
617
+ const _useState = react$1.useState(false),
618
+ _useState2 = _slicedToArray(_useState, 2),
619
+ forceClose = _useState2[0],
620
+ setForceClose = _useState2[1];
621
+ const closingTimer = react$1.useRef();
622
+ react$1.useEffect(() => {
623
+ if (props.isOpen === true) setForceClose(false);
624
+ return () => {
625
+ if (closingTimer.current) {
626
+ clearTimeout(closingTimer.current);
627
+ }
628
+ };
629
+ }, [props.isOpen]);
630
+ const onClose = props.onClose;
631
+ const TRANSITION_DURATION = stylesBySize[props.size].transitionTime;
632
+ const handleClose = react$1.useCallback(event => {
633
+ if (props.shouldDelayOnClose) {
634
+ // In this case we want the closing animation to be shown
635
+ // and therefore we need wait for it to be completed
636
+ // before calling `onClose`.
637
+ setForceClose(true);
638
+ closingTimer.current = _setTimeout__default["default"](() => {
639
+ onClose && onClose(event);
640
+ }, TRANSITION_DURATION);
641
+ return;
642
+ }
643
+ onClose && onClose(event);
644
+ }, [onClose, props.shouldDelayOnClose, TRANSITION_DURATION]);
645
+ return jsxRuntime.jsx(react.ClassNames, {
646
+ children: _ref => {
647
+ var _props$afterOpenStyle;
648
+ let makeClassName = _ref.css;
649
+ return jsxRuntime.jsxs(Modal__default["default"], {
650
+ isOpen: forceClose === true ? false : props.isOpen,
651
+ onRequestClose: handleClose,
652
+ shouldCloseOnOverlayClick: Boolean(props.onClose),
653
+ shouldCloseOnEsc: Boolean(props.onClose),
654
+ overlayElement: getOverlayElement,
655
+ overlayClassName: {
656
+ base: makeClassName(getOverlayStyles(props)),
657
+ afterOpen: makeClassName(getAfterOpenOverlayAnimation()),
658
+ beforeClose: makeClassName(getBeforeCloseOverlayAnimation())
659
+ },
660
+ className: {
661
+ base: makeClassName(getContainerStyles(props)),
662
+ afterOpen: typeof props.afterOpenStyles === 'string' ? props.afterOpenStyles : makeClassName((_props$afterOpenStyle = props.afterOpenStyles) !== null && _props$afterOpenStyle !== void 0 ? _props$afterOpenStyle : getAfterOpenContainerAnimation()),
663
+ beforeClose: makeClassName(getBeforeCloseContainerAnimation(props))
664
+ },
665
+ contentLabel: props.title,
666
+ parentSelector: props.getParentSelector,
667
+ ariaHideApp: false
668
+ // Adjust this value if the (beforeClose) animation duration is changed
669
+ ,
670
+ closeTimeoutMS: TRANSITION_DURATION,
671
+ style: {
672
+ // stylelint-disable-next-line selector-type-no-unknown
673
+ overlay: {
674
+ zIndex: props.zIndex
675
+ }
676
+ },
677
+ children: [!props.hideTopBar && jsxRuntime.jsx(ModalPageTopBar, {
678
+ color: props.topBarColor,
679
+ onClose: handleClose,
680
+ currentPathLabel: props.currentPathLabel,
681
+ previousPathLabel: props.previousPathLabel,
682
+ hidePathLabel: props.hidePathLabel
683
+ }), props.children]
684
+ });
685
+ }
686
+ });
687
+ };
688
+ ModalPage.propTypes = {};
689
+ ModalPage.displayName = 'ModalPage';
690
+ ModalPage.defaultProps = defaultProps$d;
691
+
692
+ const messages$3 = reactIntl.defineMessages({
693
+ loadError: {
694
+ id: 'CustomViewLoader.error.load',
695
+ defaultMessage: 'We could not load the Custom View. Please contact your administrator to check its configuration.'
696
+ }
697
+ });
698
+
699
+ const isIframeReady = iFrameElementRef => {
700
+ try {
798
701
  var _iFrameElementRef$con;
799
702
  return (iFrameElementRef === null || iFrameElementRef === void 0 || (_iFrameElementRef$con = iFrameElementRef.contentWindow) === null || _iFrameElementRef$con === void 0 ? void 0 : _iFrameElementRef$con.document.readyState) === 'complete';
800
703
  } catch {
@@ -804,6 +707,9 @@ const isIframeReady = iFrameElementRef => {
804
707
  return false;
805
708
  }
806
709
  };
710
+ const ContentWrapper$2 = /*#__PURE__*/_styled__default["default"]("div", {
711
+ target: "ewwxuwo1"
712
+ } )("height:100%;padding:", designSystem.designTokens.spacing40, " 40px;" + ("" ));
807
713
  const CustomPanelIframe = /*#__PURE__*/_styled__default["default"]("iframe", {
808
714
  target: "ewwxuwo0"
809
715
  } )({
@@ -881,18 +787,21 @@ function CustomViewLoader(props) {
881
787
  }
882
788
  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';
883
789
  const iFrameUrl = [window.location.origin, 'custom-views', props.customView.id, 'projects', projectKey].join('/');
884
- return jsxRuntime.jsx(Drawer, {
790
+ return jsxRuntime.jsx(ModalPage, {
885
791
  isOpen: true,
886
- title: "Custom View: ".concat(props.customView.defaultLabel),
887
792
  onClose: props.onClose,
888
793
  size: panelSize === 'small' ? 10 : 30,
889
- children: jsxRuntime.jsx(CustomPanelIframe, {
890
- id: "custom-view-".concat(props.customView.id),
891
- title: "Custom View: ".concat(props.customView.defaultLabel),
892
- ref: iFrameElementRef,
893
- src: iFrameUrl,
894
- onLoad: onLoadSuccessHandler
895
- }, "custom-view-".concat(props.customView.id))
794
+ title: "Custom View: ".concat(props.customView.defaultLabel),
795
+ hidePathLabel: true,
796
+ children: jsxRuntime.jsx(ContentWrapper$2, {
797
+ children: jsxRuntime.jsx(CustomPanelIframe, {
798
+ id: "custom-view-".concat(props.customView.id),
799
+ title: "Custom View: ".concat(props.customView.defaultLabel),
800
+ ref: iFrameElementRef,
801
+ src: iFrameUrl,
802
+ onLoad: onLoadSuccessHandler
803
+ }, "custom-view-".concat(props.customView.id))
804
+ })
896
805
  });
897
806
  }
898
807
  CustomViewLoader.propTypes = {};
@@ -930,13 +839,39 @@ const useCustomViewsConnector = _ref => {
930
839
 
931
840
  function ownKeys$3(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; }
932
841
  function _objectSpread$3(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$3(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$3(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
933
- const COMPONENT_HEIGHT = '56px';
842
+ const COMPONENT_HEIGHT = '52px';
934
843
  const Wrapper = /*#__PURE__*/_styled__default["default"]("div", {
935
- target: "e16cb3zv1"
936
- } )("height:", props => props.shouldRender ? COMPONENT_HEIGHT : '0', ";overflow:hidden;transition:height 0.3s ease-in-out;" + ("" ));
844
+ target: "e16cb3zv3"
845
+ } )("height:", props => props.shouldRender ? COMPONENT_HEIGHT : '0', ";overflow:hidden;transition:margin 0.3s ease-in-out,height 0.3s ease-in-out;margin:", props => props.shouldRender ? props.margin : '0', ";" + ("" ));
937
846
  const Container$2 = /*#__PURE__*/_styled__default["default"]("div", {
847
+ target: "e16cb3zv2"
848
+ } )("background-color:", designSystem.designTokens.colorNeutral98, ";padding:10px ", designSystem.designTokens.spacing30, ";border:1px solid ", designSystem.designTokens.colorNeutral95, ";border-radius:", designSystem.designTokens.borderRadius8, ";" + ("" ));
849
+ const hoverAndSelectedStateStyles = /*#__PURE__*/react.css("box-shadow:", designSystem.designTokens.shadow1, ";background-color:", designSystem.designTokens.colorSurface, ";color:", designSystem.designTokens.colorPrimary30, ";" + ("" ), "" );
850
+ const CustomViewSelectorItem = props => {
851
+ return jsxRuntime.jsx(AccessibleButton__default["default"], {
852
+ css: /*#__PURE__*/react.css("display:flex;align-items:center;padding:", designSystem.designTokens.spacing20, " ", designSystem.designTokens.spacing25, ";height:30px;border-radius:", designSystem.designTokens.borderRadius6, ";color:", designSystem.designTokens.colorPrimary, ";", props.selected && hoverAndSelectedStateStyles, " :hover{", hoverAndSelectedStateStyles, ";}" + ("" ), "" ),
853
+ onClick: props.onClick,
854
+ label: props.label,
855
+ children: jsxRuntime.jsx(Text__default["default"].Detail, {
856
+ tone: "inherit",
857
+ fontWeight: props.selected ? 'bold' : 'regular',
858
+ children: props.label
859
+ })
860
+ });
861
+ };
862
+ CustomViewSelectorItem.propTypes = {};
863
+ const SelectorLabel = /*#__PURE__*/_styled__default["default"]("div", {
864
+ target: "e16cb3zv1"
865
+ } )({
866
+ name: "1i68o0s",
867
+ styles: "display:flex;align-items:center;gap:6px;div{font-weight:300;}"
868
+ } );
869
+ const Separator = /*#__PURE__*/_styled__default["default"]("span", {
938
870
  target: "e16cb3zv0"
939
- } )("background-color:", designSystem.designTokens.colorAccent98, ";padding:", designSystem.designTokens.spacing25, " ", designSystem.designTokens.spacing60, ";" + ("" ));
871
+ } )({
872
+ name: "1lsblg0",
873
+ styles: "width:1px;height:18px;background-color:#cccccc"
874
+ } );
940
875
  function CustomViewSelector(props) {
941
876
  const _useState = react$1.useState(null),
942
877
  _useState2 = _slicedToArray(_useState, 2),
@@ -964,30 +899,34 @@ function CustomViewSelector(props) {
964
899
  }
965
900
  return jsxRuntime.jsx(Wrapper, {
966
901
  shouldRender: customViews.length > 0,
902
+ margin: props.margin || '0',
967
903
  children: jsxRuntime.jsx(Container$2, {
968
904
  children: jsxRuntime.jsxs(Constraints__default["default"].Horizontal, {
969
905
  max: "scale",
970
906
  children: [jsxRuntime.jsxs(Spacings__default["default"].Inline, {
971
- scale: "m",
972
- justifyContent: "flex-end",
907
+ scale: "s",
908
+ justifyContent: "flex-start",
973
909
  alignItems: "center",
974
- children: [jsxRuntime.jsxs(Spacings__default["default"].Inline, {
975
- scale: "xs",
976
- alignItems: "center",
977
- children: [jsxRuntime.jsx(icons.SidebarCollapseIcon, {
910
+ children: [jsxRuntime.jsxs(SelectorLabel, {
911
+ children: [jsxRuntime.jsx(icons.WindowEyeIcon, {
978
912
  size: "medium",
979
913
  color: "neutral60"
980
914
  }), jsxRuntime.jsx(Text__default["default"].Detail, {
981
915
  tone: "secondary",
982
916
  intlMessage: messages$2.title
983
917
  })]
984
- }), _mapInstanceProperty__default["default"](customViews).call(customViews, customView => jsxRuntime.jsx(SecondaryButton__default["default"], {
985
- label: customView.defaultLabel,
986
- size: "medium",
987
- onClick: () => {
988
- setSelectedCustomView(customView);
989
- }
990
- }, customView.id))]
918
+ }), _mapInstanceProperty__default["default"](customViews).call(customViews, (customView, index) => {
919
+ const isNotLastItem = index !== customViews.length - 1;
920
+ return jsxRuntime.jsxs(react$1.Fragment, {
921
+ children: [jsxRuntime.jsx(CustomViewSelectorItem, {
922
+ selected: (selectedCustomView === null || selectedCustomView === void 0 ? void 0 : selectedCustomView.id) === customView.id,
923
+ onClick: () => {
924
+ setSelectedCustomView(customView);
925
+ },
926
+ label: customView.defaultLabel
927
+ }), isNotLastItem && jsxRuntime.jsx(Separator, {})]
928
+ }, customView.id);
929
+ })]
991
930
  }), selectedCustomView && jsxRuntime.jsx(CustomViewLoader, {
992
931
  customView: selectedCustomView,
993
932
  onClose: () => {
@@ -999,6 +938,7 @@ function CustomViewSelector(props) {
999
938
  });
1000
939
  }
1001
940
  CustomViewSelector.propTypes = {};
941
+ CustomViewSelector.displayName = 'CustomViewSelector';
1002
942
  const CustomViewSelectorOrNothing = props => {
1003
943
  if (!props.customViewLocatorCode) {
1004
944
  return null;
@@ -1009,140 +949,108 @@ const CustomViewSelectorOrNothing = props => {
1009
949
  };
1010
950
  CustomViewSelectorOrNothing.propTypes = {};
1011
951
 
1012
- const stylesBySize = {
1013
- '10': {
1014
- width: '600px',
1015
- transitionTime: 200
1016
- },
1017
- '20': {
1018
- width: '900px',
1019
- transitionTime: 200
1020
- },
1021
- '30': {
1022
- width: '1200px',
1023
- transitionTime: 200
1024
- },
1025
- scale: {
1026
- width: '100%',
1027
- transitionTime: 300
1028
- }
1029
- };
1030
- const getContainerStyles = props => /*#__PURE__*/react.css("position:absolute;top:0;right:0;height:100%;width:", props.size !== 'scale' ? "".concat(stylesBySize[props.size].width, " !important") : stylesBySize.scale.width, ";display:flex;flex-direction:column;background-color:", designSystem.customProperties.colorSurface, ";box-shadow:0px 0px 40px 0px rgba(0, 0, 0, 0.1);outline:0;transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n 0,\n 0\n );transition:transform ", stylesBySize[props.size].transitionTime, "ms ease;" + ("" ), "" );
1031
- const getOverlayStyles = props => /*#__PURE__*/react.css("position:absolute;z-index:", typeof props.zIndex === 'number' ? // Use `!important` to overwrite the default value assigned by the Stacking Layer System.
1032
- "".concat(props.zIndex, " !important") : 'auto', ";top:0;left:0;width:100%;height:100%;background-color:hsla(195, 35%, 20%, 0.05);opacity:0;transition:transform ", stylesBySize[props.size].transitionTime, "ms ease;" + ("" ), "" );
1033
- var _ref3 = {
1034
- name: "1ffv7m4",
1035
- styles: "transform:translate3d(0, 0, 0)!important"
1036
- } ;
1037
- const getAfterOpenContainerAnimation = () => _ref3;
1038
- var _ref2$1 = {
1039
- name: "1d9ftqx",
1040
- styles: "opacity:1!important"
1041
- } ;
1042
- const getAfterOpenOverlayAnimation = () => _ref2$1;
1043
- const getBeforeCloseContainerAnimation = props => /*#__PURE__*/react.css("transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n ,\n 0,\n 0\n )!important;" + ("" ), "" );
1044
- var _ref$3 = {
1045
- name: "728dx5",
1046
- styles: "opacity:0!important"
1047
- } ;
1048
- const getBeforeCloseOverlayAnimation = () => _ref$3;
1049
-
1050
- function ownKeys$2(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; }
1051
- function _objectSpread$2(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$2(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$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1052
- const getDefaultParentSelector = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
1053
- const getOverlayElement = (props, contentElement) =>
1054
- // Assign the `data-role` to the overlay container, which is used as
1055
- // the CSS selector in the `<PortalsContainer>`.
1056
- jsxRuntime.jsx("div", _objectSpread$2(_objectSpread$2({}, props), {}, {
1057
- "data-role": "modal-overlay",
1058
- children: contentElement
1059
- }));
1060
-
1061
- // NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
1062
- // However, we need to explicitly define this otherwise the prop-types babel plugin
1063
- // does not recognize the object shape.
1064
- const defaultProps$b = {
1065
- size: 'scale',
1066
- getParentSelector: getDefaultParentSelector,
1067
- shouldDelayOnClose: true
952
+ const defaultProps$c = {
953
+ titleSize: 'small',
954
+ truncate: false
1068
955
  };
1069
- const ModalPage = props => {
1070
- const _useState = react$1.useState(false),
1071
- _useState2 = _slicedToArray(_useState, 2),
1072
- forceClose = _useState2[0],
1073
- setForceClose = _useState2[1];
1074
- const closingTimer = react$1.useRef();
1075
- react$1.useEffect(() => {
1076
- if (props.isOpen === true) setForceClose(false);
1077
- return () => {
1078
- if (closingTimer.current) {
1079
- clearTimeout(closingTimer.current);
1080
- }
1081
- };
1082
- }, [props.isOpen]);
1083
- const onClose = props.onClose;
1084
- const TRANSITION_DURATION = stylesBySize[props.size].transitionTime;
1085
- const handleClose = react$1.useCallback(event => {
1086
- if (props.shouldDelayOnClose) {
1087
- // In this case we want the closing animation to be shown
1088
- // and therefore we need wait for it to be completed
1089
- // before calling `onClose`.
1090
- setForceClose(true);
1091
- closingTimer.current = _setTimeout__default["default"](() => {
1092
- onClose && onClose(event);
1093
- }, TRANSITION_DURATION);
1094
- return;
1095
- }
1096
- onClose && onClose(event);
1097
- }, [onClose, props.shouldDelayOnClose, TRANSITION_DURATION]);
1098
- return jsxRuntime.jsx(react.ClassNames, {
1099
- children: _ref => {
1100
- var _props$afterOpenStyle;
1101
- let makeClassName = _ref.css;
1102
- return jsxRuntime.jsxs(Modal__default["default"], {
1103
- isOpen: forceClose === true ? false : props.isOpen,
1104
- onRequestClose: handleClose,
1105
- shouldCloseOnOverlayClick: Boolean(props.onClose),
1106
- shouldCloseOnEsc: Boolean(props.onClose),
1107
- overlayElement: getOverlayElement,
1108
- overlayClassName: {
1109
- base: makeClassName(getOverlayStyles(props)),
1110
- afterOpen: makeClassName(getAfterOpenOverlayAnimation()),
1111
- beforeClose: makeClassName(getBeforeCloseOverlayAnimation())
1112
- },
1113
- className: {
1114
- base: makeClassName(getContainerStyles(props)),
1115
- afterOpen: typeof props.afterOpenStyles === 'string' ? props.afterOpenStyles : makeClassName((_props$afterOpenStyle = props.afterOpenStyles) !== null && _props$afterOpenStyle !== void 0 ? _props$afterOpenStyle : getAfterOpenContainerAnimation()),
1116
- beforeClose: makeClassName(getBeforeCloseContainerAnimation(props))
1117
- },
1118
- contentLabel: props.title,
1119
- parentSelector: props.getParentSelector,
1120
- ariaHideApp: false
1121
- // Adjust this value if the (beforeClose) animation duration is changed
1122
- ,
1123
- closeTimeoutMS: TRANSITION_DURATION,
1124
- style: {
1125
- // stylelint-disable-next-line selector-type-no-unknown
1126
- overlay: {
1127
- zIndex: props.zIndex
1128
- }
1129
- },
1130
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1131
- customViewLocatorCode: props.customViewLocatorCode
1132
- }), !props.hideTopBar && jsxRuntime.jsx(ModalPageTopBar, {
1133
- color: props.topBarColor,
1134
- onClose: handleClose,
1135
- currentPathLabel: props.currentPathLabel,
1136
- previousPathLabel: props.previousPathLabel,
1137
- hidePathLabel: props.hidePathLabel
1138
- }), props.children]
956
+ const SubtitleWrapper = /*#__PURE__*/_styled__default["default"]("div", {
957
+ target: "epaiodd0"
958
+ } )("margin-top:", designTokens.marginTopForPageSubtitle, ";" + ("" ));
959
+ const Title = props => {
960
+ switch (props.titleSize) {
961
+ case 'big':
962
+ return jsxRuntime.jsx(Text__default["default"].Headline, {
963
+ as: "h1",
964
+ title: props.title,
965
+ truncate: props.truncate,
966
+ children: props.title
967
+ });
968
+ case 'medium':
969
+ return jsxRuntime.jsx(Text__default["default"].Headline, {
970
+ as: "h2",
971
+ title: props.title,
972
+ truncate: props.truncate,
973
+ children: props.title
974
+ });
975
+ default:
976
+ return jsxRuntime.jsx(Text__default["default"].Subheadline, {
977
+ as: "h4",
978
+ title: props.title,
979
+ truncate: props.truncate,
980
+ children: props.title
1139
981
  });
1140
- }
982
+ }
983
+ };
984
+ const Subtitle = props => {
985
+ if (!props.subtitle) {
986
+ return null;
987
+ }
988
+ if ( /*#__PURE__*/react$1.isValidElement(props.subtitle)) {
989
+ return jsxRuntime.jsx(SubtitleWrapper, {
990
+ children: props.subtitle
991
+ });
992
+ }
993
+ return jsxRuntime.jsx(SubtitleWrapper, {
994
+ children: jsxRuntime.jsx(Text__default["default"].Body, {
995
+ title: typeof props.subtitle === 'string' ? props.subtitle : undefined,
996
+ truncate: props.truncate,
997
+ tone: "secondary",
998
+ children: props.subtitle
999
+ })
1141
1000
  });
1142
1001
  };
1143
- ModalPage.propTypes = {};
1144
- ModalPage.displayName = 'ModalPage';
1145
- ModalPage.defaultProps = defaultProps$b;
1002
+ Subtitle.propTypes = {};
1003
+ Subtitle.defaultProps = {
1004
+ truncate: false
1005
+ };
1006
+ var _ref$3 = {
1007
+ name: "d3v9zr",
1008
+ styles: "overflow:hidden"
1009
+ } ;
1010
+ const PageHeaderTitle = props => jsxRuntime.jsxs("div", {
1011
+ css: _ref$3,
1012
+ children: [jsxRuntime.jsx(Title, {
1013
+ title: props.title,
1014
+ titleSize: props.titleSize,
1015
+ truncate: props.truncate
1016
+ }), jsxRuntime.jsx(Subtitle, {
1017
+ subtitle: props.subtitle,
1018
+ truncate: props.truncate
1019
+ })]
1020
+ });
1021
+ PageHeaderTitle.propTypes = {};
1022
+ PageHeaderTitle.displayName = 'PageHeaderTitle';
1023
+ PageHeaderTitle.defaultProps = defaultProps$c;
1024
+
1025
+ const PageHeader = props => {
1026
+ return jsxRuntime.jsxs("div", {
1027
+ css: /*#__PURE__*/react.css("margin:", designTokens.marginForModalPageHeader, ";padding:", designTokens.paddingForModalPageHeader, ";border-bottom:1px solid ", designTokens.borderColorForModalPageHeaderDivider, ";" + ("" ), "" ),
1028
+ children: [jsxRuntime.jsxs("div", {
1029
+ css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;&>*+*{margin-left:", designTokens.marginLeftForModalPageHeaderControls, ";}" + ("" ), "" ),
1030
+ children: [jsxRuntime.jsx(PageHeaderTitle, {
1031
+ title: props.title,
1032
+ titleSize: "big",
1033
+ subtitle: props.subtitle,
1034
+ truncate: true
1035
+ }), props.children]
1036
+ }), jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1037
+ margin: "".concat(designSystem.designTokens.spacing40, " 0 0 0"),
1038
+ customViewLocatorCode: props.customViewLocatorCode
1039
+ })]
1040
+ });
1041
+ };
1042
+ PageHeader.propTypes = {};
1043
+ PageHeader.displayName = 'PageHeader';
1044
+
1045
+ const ContentWrapper$1 = /*#__PURE__*/_styled__default["default"]("div", {
1046
+ target: "e1b7jwn01"
1047
+ } )("flex:1;flex-basis:0;margin:", designTokens.marginForPageContent, ";overflow:auto;" + ("" ));
1048
+ const PageWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1049
+ target: "e1b7jwn00"
1050
+ } )({
1051
+ name: "kdbhus",
1052
+ styles: "height:100%;display:flex;flex-direction:column"
1053
+ } );
1146
1054
 
1147
1055
  const InfoModalPage = props => jsxRuntime.jsxs(ModalPage, {
1148
1056
  title: props.title,
@@ -1154,10 +1062,10 @@ const InfoModalPage = props => jsxRuntime.jsxs(ModalPage, {
1154
1062
  shouldDelayOnClose: props.shouldDelayOnClose,
1155
1063
  getParentSelector: props.getParentSelector,
1156
1064
  afterOpenStyles: props.afterOpenStyles,
1157
- customViewLocatorCode: props.customViewLocatorCode,
1158
1065
  children: [jsxRuntime.jsx(PageHeader, {
1159
1066
  title: props.title,
1160
- subtitle: props.subtitle
1067
+ subtitle: props.subtitle,
1068
+ customViewLocatorCode: props.customViewLocatorCode
1161
1069
  }), jsxRuntime.jsx(ContentWrapper$1, {
1162
1070
  children: props.children
1163
1071
  })]
@@ -1165,6 +1073,63 @@ const InfoModalPage = props => jsxRuntime.jsxs(ModalPage, {
1165
1073
  InfoModalPage.propTypes = {};
1166
1074
  InfoModalPage.displayName = 'InfoModalPage';
1167
1075
 
1076
+ function ownKeys$2(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; }
1077
+ function _objectSpread$2(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$2(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$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1078
+ const primaryDefaultProps = {
1079
+ label: i18n.sharedMessages.confirm,
1080
+ isDisabled: false,
1081
+ dataAttributes: {}
1082
+ };
1083
+ const useFormattedLabel = label => {
1084
+ const intl = reactIntl.useIntl();
1085
+ return typeof label === 'string' ? label : intl.formatMessage(label);
1086
+ };
1087
+ const FormPrimaryButton = props => {
1088
+ const label = useFormattedLabel(props.label);
1089
+ return jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$2({
1090
+ label: label,
1091
+ onClick: props.onClick,
1092
+ isDisabled: props.isDisabled
1093
+ }, filterDataAttributes(props.dataAttributes)));
1094
+ };
1095
+ FormPrimaryButton.propTypes = {};
1096
+ FormPrimaryButton.displayName = 'FormPrimaryButton';
1097
+ FormPrimaryButton.defaultProps = primaryDefaultProps;
1098
+ const secondaryDefaultProps = {
1099
+ label: i18n.sharedMessages.cancel,
1100
+ isDisabled: false,
1101
+ dataAttributes: {}
1102
+ };
1103
+ const FormSecondaryButton = props => {
1104
+ const label = useFormattedLabel(props.label);
1105
+ return jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$2({
1106
+ label: label,
1107
+ onClick: props.onClick,
1108
+ isDisabled: props.isDisabled,
1109
+ iconLeft: props.iconLeft
1110
+ }, filterDataAttributes(props.dataAttributes)));
1111
+ };
1112
+ FormSecondaryButton.propTypes = {};
1113
+ FormSecondaryButton.displayName = 'FormSecondaryButton';
1114
+ FormSecondaryButton.defaultProps = secondaryDefaultProps;
1115
+ const deleteDefaultProps = {
1116
+ label: i18n.sharedMessages.delete,
1117
+ isDisabled: false,
1118
+ dataAttributes: {}
1119
+ };
1120
+ const FormDeleteButton = props => {
1121
+ const label = useFormattedLabel(props.label);
1122
+ return jsxRuntime.jsx(IconButton__default["default"], _objectSpread$2({
1123
+ icon: jsxRuntime.jsx(icons.BinLinearIcon, {}),
1124
+ label: label,
1125
+ onClick: props.onClick,
1126
+ isDisabled: props.isDisabled
1127
+ }, filterDataAttributes(props.dataAttributes)));
1128
+ };
1129
+ FormDeleteButton.propTypes = {};
1130
+ FormDeleteButton.displayName = 'FormDeleteButton';
1131
+ FormDeleteButton.defaultProps = deleteDefaultProps;
1132
+
1168
1133
  const CustomFormModalPage = props => jsxRuntime.jsxs(ModalPage, {
1169
1134
  title: props.title,
1170
1135
  isOpen: props.isOpen,
@@ -1175,10 +1140,10 @@ const CustomFormModalPage = props => jsxRuntime.jsxs(ModalPage, {
1175
1140
  getParentSelector: props.getParentSelector,
1176
1141
  shouldDelayOnClose: props.shouldDelayOnClose,
1177
1142
  afterOpenStyles: props.afterOpenStyles,
1178
- customViewLocatorCode: props.customViewLocatorCode,
1179
1143
  children: [jsxRuntime.jsx(PageHeader, {
1180
1144
  title: props.title,
1181
1145
  subtitle: props.subtitle,
1146
+ customViewLocatorCode: props.customViewLocatorCode,
1182
1147
  children: !props.hideControls && props.formControls && jsxRuntime.jsx(Spacings__default["default"].Inline, {
1183
1148
  alignItems: "flex-end",
1184
1149
  children: props.formControls
@@ -1198,7 +1163,7 @@ CustomFormModalPage.FormDeleteButton = FormDeleteButton;
1198
1163
  // The Intl messages can be used for button labels.
1199
1164
  CustomFormModalPage.Intl = i18n.sharedMessages;
1200
1165
 
1201
- const defaultProps$a = {
1166
+ const defaultProps$b = {
1202
1167
  hideControls: false
1203
1168
  };
1204
1169
  const FormModalPage = props => jsxRuntime.jsx(CustomFormModalPage, {
@@ -1232,7 +1197,7 @@ const FormModalPage = props => jsxRuntime.jsx(CustomFormModalPage, {
1232
1197
  });
1233
1198
  FormModalPage.propTypes = {};
1234
1199
  FormModalPage.displayName = 'FormModalPage';
1235
- FormModalPage.defaultProps = defaultProps$a;
1200
+ FormModalPage.defaultProps = defaultProps$b;
1236
1201
  // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
1237
1202
  // The Intl messages can be used for button labels.
1238
1203
  FormModalPage.Intl = i18n.sharedMessages;
@@ -1258,7 +1223,7 @@ const useCustomViewLocatorSelector = function () {
1258
1223
  };
1259
1224
 
1260
1225
  const TabControls = /*#__PURE__*/_styled__default["default"]("div", {
1261
- target: "elpldre1"
1226
+ target: "elpldre2"
1262
1227
  } )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
1263
1228
  const ControlsContainter = props => jsxRuntime.jsxs("div", {
1264
1229
  css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;margin-top:", designTokens.marginTopForTabControls, ";" + ("" ), "" ),
@@ -1275,15 +1240,18 @@ const TabularPageContainer = props => jsxRuntime.jsx("div", {
1275
1240
  });
1276
1241
  TabularPageContainer.propTypes = {};
1277
1242
  TabularPageContainer.displayName = 'TabularPageContainer';
1278
- const defaultProps$9 = {
1243
+ const defaultProps$a = {
1279
1244
  color: 'surface'
1280
1245
  };
1281
- TabularPageContainer.defaultProps = defaultProps$9;
1246
+ TabularPageContainer.defaultProps = defaultProps$a;
1282
1247
  const FormControlsContainer = /*#__PURE__*/_styled__default["default"]("div", {
1283
- target: "elpldre0"
1248
+ target: "elpldre1"
1284
1249
  } )("margin-bottom:", designSystem.designTokens.spacingM, ";" + ("" ));
1250
+ const CustomViewsSelectorWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1251
+ target: "elpldre0"
1252
+ } )("margin:", designTokens.marginForCustomViewsSelectorAsTabular, ";" + ("" ));
1285
1253
 
1286
- const defaultProps$8 = {
1254
+ const defaultProps$9 = {
1287
1255
  hideControls: false
1288
1256
  };
1289
1257
  const TabularModalPage = props => {
@@ -1300,7 +1268,6 @@ const TabularModalPage = props => {
1300
1268
  getParentSelector: props.getParentSelector,
1301
1269
  shouldDelayOnClose: props.shouldDelayOnClose,
1302
1270
  afterOpenStyles: props.afterOpenStyles,
1303
- customViewLocatorCode: currentCustomViewLocatorCode,
1304
1271
  children: [jsxRuntime.jsxs(TabularPageContainer, {
1305
1272
  color: "neutral",
1306
1273
  children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
@@ -1317,6 +1284,11 @@ const TabularModalPage = props => {
1317
1284
  })
1318
1285
  })
1319
1286
  })]
1287
+ }), jsxRuntime.jsx(CustomViewsSelectorWrapper, {
1288
+ children: jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1289
+ margin: "".concat(designSystem.designTokens.spacing30, " 0 0 0"),
1290
+ customViewLocatorCode: currentCustomViewLocatorCode
1291
+ })
1320
1292
  }), jsxRuntime.jsx(ContentWrapper$1, {
1321
1293
  children: props.children
1322
1294
  })]
@@ -1324,7 +1296,7 @@ const TabularModalPage = props => {
1324
1296
  };
1325
1297
  TabularModalPage.propTypes = {};
1326
1298
  TabularModalPage.displayName = 'TabularModalPage';
1327
- TabularModalPage.defaultProps = defaultProps$8;
1299
+ TabularModalPage.defaultProps = defaultProps$9;
1328
1300
  // Static export of pre-configured form control buttons to easily re-use
1329
1301
  // them in the custom controls.
1330
1302
  TabularModalPage.FormPrimaryButton = FormPrimaryButton;
@@ -1334,7 +1306,7 @@ TabularModalPage.FormDeleteButton = FormDeleteButton;
1334
1306
  // The Intl messages can be used for button labels.
1335
1307
  TabularModalPage.Intl = i18n.sharedMessages;
1336
1308
 
1337
- const defaultProps$7 = {
1309
+ const defaultProps$8 = {
1338
1310
  color: 'surface',
1339
1311
  previousPathLabel: messages$4.back
1340
1312
  };
@@ -1355,7 +1327,7 @@ const PageTopBar = props => {
1355
1327
  };
1356
1328
  PageTopBar.propTypes = {};
1357
1329
  PageTopBar.displayName = 'PageTopBar';
1358
- PageTopBar.defaultProps = defaultProps$7;
1330
+ PageTopBar.defaultProps = defaultProps$8;
1359
1331
 
1360
1332
  const DetailPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
1361
1333
  target: "etkdonc1"
@@ -1363,19 +1335,21 @@ const DetailPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
1363
1335
  const HeaderControlsWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1364
1336
  target: "etkdonc0"
1365
1337
  } )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
1338
+ const getCustomViewsSelectorMargin = hasContentBelow => {
1339
+ var _context;
1340
+ return _concatInstanceProperty__default["default"](_context = "".concat(designSystem.designTokens.spacing40, " 0 ")).call(_context, hasContentBelow ? designSystem.designTokens.spacing40 : '0', " 0");
1341
+ };
1366
1342
 
1367
1343
  // NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
1368
1344
  // However, we need to explicitly define this otherwise the prop-types babel plugin
1369
1345
  // does not recognize the object shape.
1370
- const defaultProps$6 = {
1346
+ const defaultProps$7 = {
1371
1347
  hideControls: false
1372
1348
  };
1373
1349
  const CustomFormDetailPage = props => {
1374
1350
  var _props$title;
1375
1351
  return jsxRuntime.jsxs(PageWrapper, {
1376
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1377
- customViewLocatorCode: props.customViewLocatorCode
1378
- }), jsxRuntime.jsxs(DetailPageContainer, {
1352
+ children: [jsxRuntime.jsxs(DetailPageContainer, {
1379
1353
  children: [jsxRuntime.jsx(PageTopBar, {
1380
1354
  color: "neutral",
1381
1355
  previousPathLabel: props.previousPathLabel,
@@ -1384,6 +1358,9 @@ const CustomFormDetailPage = props => {
1384
1358
  title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
1385
1359
  subtitle: props.subtitle,
1386
1360
  titleSize: "big"
1361
+ }), jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1362
+ margin: getCustomViewsSelectorMargin(!props.hideControls && !!props.formControls),
1363
+ customViewLocatorCode: props.customViewLocatorCode
1387
1364
  }), !props.hideControls && props.formControls && jsxRuntime.jsx(HeaderControlsWrapper, {
1388
1365
  children: jsxRuntime.jsx(Spacings__default["default"].Inline, {
1389
1366
  justifyContent: "flex-end",
@@ -1397,7 +1374,7 @@ const CustomFormDetailPage = props => {
1397
1374
  };
1398
1375
  CustomFormDetailPage.propTypes = {};
1399
1376
  CustomFormDetailPage.displayName = 'CustomFormDetailPage';
1400
- CustomFormDetailPage.defaultProps = defaultProps$6;
1377
+ CustomFormDetailPage.defaultProps = defaultProps$7;
1401
1378
  // Static export of pre-configured page header title component to easily
1402
1379
  // use as part of a custom title row
1403
1380
  CustomFormDetailPage.PageHeaderTitle = PageHeaderTitle;
@@ -1410,7 +1387,7 @@ CustomFormDetailPage.FormDeleteButton = FormDeleteButton;
1410
1387
  // The Intl messages can be used for button labels.
1411
1388
  CustomFormDetailPage.Intl = i18n.sharedMessages;
1412
1389
 
1413
- const defaultProps$5 = {
1390
+ const defaultProps$6 = {
1414
1391
  hideControls: false
1415
1392
  };
1416
1393
  const FormDetailPage = props => jsxRuntime.jsx(CustomFormDetailPage, {
@@ -1439,7 +1416,7 @@ const FormDetailPage = props => jsxRuntime.jsx(CustomFormDetailPage, {
1439
1416
  });
1440
1417
  FormDetailPage.propTypes = {};
1441
1418
  FormDetailPage.displayName = 'FormDetailPage';
1442
- FormDetailPage.defaultProps = defaultProps$5;
1419
+ FormDetailPage.defaultProps = defaultProps$6;
1443
1420
  // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
1444
1421
  // The Intl messages can be used for button labels.
1445
1422
  // Static export of pre-configured page header title component to easily
@@ -1464,7 +1441,7 @@ InfoDetailPage.displayName = 'InfoDetailPage';
1464
1441
  // use as part of a custom title row
1465
1442
  InfoDetailPage.PageHeaderTitle = PageHeaderTitle;
1466
1443
 
1467
- const defaultProps$4 = {
1444
+ const defaultProps$5 = {
1468
1445
  hideControls: false
1469
1446
  };
1470
1447
  const TabularDetailPage = props => {
@@ -1472,9 +1449,7 @@ const TabularDetailPage = props => {
1472
1449
  const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
1473
1450
  currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
1474
1451
  return jsxRuntime.jsxs(PageWrapper, {
1475
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1476
- customViewLocatorCode: currentCustomViewLocatorCode
1477
- }), jsxRuntime.jsxs(TabularPageContainer, {
1452
+ children: [jsxRuntime.jsxs(TabularPageContainer, {
1478
1453
  color: "neutral",
1479
1454
  children: [jsxRuntime.jsx(PageTopBar, {
1480
1455
  color: "neutral",
@@ -1493,6 +1468,11 @@ const TabularDetailPage = props => {
1493
1468
  })
1494
1469
  })
1495
1470
  })]
1471
+ }), jsxRuntime.jsx(CustomViewsSelectorWrapper, {
1472
+ children: jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1473
+ margin: "".concat(designSystem.designTokens.spacing30, " 0 0 0"),
1474
+ customViewLocatorCode: currentCustomViewLocatorCode
1475
+ })
1496
1476
  }), jsxRuntime.jsx(ContentWrapper$1, {
1497
1477
  children: props.children
1498
1478
  })]
@@ -1500,7 +1480,7 @@ const TabularDetailPage = props => {
1500
1480
  };
1501
1481
  TabularDetailPage.propTypes = {};
1502
1482
  TabularDetailPage.displayName = 'TabularDetailPage';
1503
- TabularDetailPage.defaultProps = defaultProps$4;
1483
+ TabularDetailPage.defaultProps = defaultProps$5;
1504
1484
  // Static export of pre-configured form control buttons to easily re-use
1505
1485
  // them in the custom controls.
1506
1486
  TabularDetailPage.FormPrimaryButton = FormPrimaryButton;
@@ -1512,7 +1492,7 @@ TabularDetailPage.PageHeaderTitle = PageHeaderTitle;
1512
1492
  // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
1513
1493
  TabularDetailPage.Intl = i18n.sharedMessages;
1514
1494
 
1515
- const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-295bf2b5.cjs.prod.js' /* webpackChunkName: "public-page-layout" */); }));
1495
+ const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-f84502f6.cjs.prod.js' /* webpackChunkName: "public-page-layout" */); }));
1516
1496
 
1517
1497
  const MainPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
1518
1498
  target: "ev8m2jf2"
@@ -1524,35 +1504,40 @@ const MainPageContent = /*#__PURE__*/_styled__default["default"]("div", {
1524
1504
  target: "ev8m2jf0"
1525
1505
  } )("flex:1;flex-basis:0;overflow:auto;margin:", designTokens.marginForPageContent, ";" + ("" ));
1526
1506
 
1527
- const defaultProps$3 = {
1528
- hideControls: false,
1529
- hideDivider: false
1530
- };
1507
+ const headerRowMargin = "".concat(designSystem.designTokens.spacing40, " 0 0 0");
1531
1508
  const CustomFormMainPage = props => {
1532
1509
  var _props$title;
1533
1510
  return jsxRuntime.jsxs(PageWrapper, {
1534
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1535
- customViewLocatorCode: props.customViewLocatorCode
1536
- }), jsxRuntime.jsx(MainPageContainer, {
1537
- children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
1538
- scale: "l",
1539
- children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
1540
- title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
1541
- subtitle: props.subtitle,
1542
- titleSize: "big"
1543
- }), !props.hideControls && props.formControls && jsxRuntime.jsx(Spacings__default["default"].Inline, {
1511
+ children: [jsxRuntime.jsxs(MainPageContainer, {
1512
+ children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
1513
+ title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
1514
+ subtitle: props.subtitle,
1515
+ titleSize: "big"
1516
+ }), jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1517
+ margin: headerRowMargin,
1518
+ customViewLocatorCode: props.customViewLocatorCode
1519
+ }), !props.hideControls && props.formControls && jsxRuntime.jsx("div", {
1520
+ css: /*#__PURE__*/react.css("margin:", headerRowMargin, ";" + ("" ), "" ),
1521
+ children: jsxRuntime.jsx(Spacings__default["default"].Inline, {
1544
1522
  justifyContent: "flex-end",
1545
1523
  children: props.formControls
1546
- }), !props.hideDivider && jsxRuntime.jsx(Divider, {})]
1547
- })
1524
+ })
1525
+ }), !props.hideDivider && jsxRuntime.jsx("div", {
1526
+ css: /*#__PURE__*/react.css("&>", Divider, "{margin:", headerRowMargin, ";}" + ("" ), "" ),
1527
+ children: jsxRuntime.jsx(Divider, {})
1528
+ })]
1548
1529
  }), jsxRuntime.jsx(MainPageContent, {
1549
1530
  children: props.children
1550
1531
  })]
1551
1532
  });
1552
1533
  };
1553
1534
  CustomFormMainPage.propTypes = {};
1535
+ const defaultProps$4 = {
1536
+ hideControls: false,
1537
+ hideDivider: false
1538
+ };
1554
1539
  CustomFormMainPage.displayName = 'CustomFormMainPage';
1555
- CustomFormMainPage.defaultProps = defaultProps$3;
1540
+ CustomFormMainPage.defaultProps = defaultProps$4;
1556
1541
 
1557
1542
  // Static export of pre-configured page header title component to easily
1558
1543
  // use as part of a custom title row
@@ -1568,7 +1553,7 @@ CustomFormMainPage.FormDeleteButton = FormDeleteButton;
1568
1553
  // The Intl messages can be used for button labels.
1569
1554
  CustomFormMainPage.Intl = i18n.sharedMessages;
1570
1555
 
1571
- const defaultProps$2 = {
1556
+ const defaultProps$3 = {
1572
1557
  hideControls: false
1573
1558
  };
1574
1559
  const FormMainPage = props => {
@@ -1597,7 +1582,7 @@ const FormMainPage = props => {
1597
1582
  };
1598
1583
  FormMainPage.propTypes = {};
1599
1584
  FormMainPage.displayName = 'FormMainPage';
1600
- FormMainPage.defaultProps = defaultProps$2;
1585
+ FormMainPage.defaultProps = defaultProps$3;
1601
1586
 
1602
1587
  // Static export of pre-configured page header title component to easily
1603
1588
  // use as part of a custom title row
@@ -1623,7 +1608,7 @@ InfoMainPage.displayName = 'InfoMainPage';
1623
1608
  // use as part of a custom title row
1624
1609
  InfoMainPage.PageHeaderTitle = PageHeaderTitle;
1625
1610
 
1626
- const defaultProps$1 = {
1611
+ const defaultProps$2 = {
1627
1612
  hideControls: false
1628
1613
  };
1629
1614
  const TabularMainPage = props => {
@@ -1631,9 +1616,7 @@ const TabularMainPage = props => {
1631
1616
  const _useCustomViewLocator = useCustomViewLocatorSelector(props.customViewLocatorCodes),
1632
1617
  currentCustomViewLocatorCode = _useCustomViewLocator.currentCustomViewLocatorCode;
1633
1618
  return jsxRuntime.jsxs(PageWrapper, {
1634
- children: [jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1635
- customViewLocatorCode: currentCustomViewLocatorCode
1636
- }), jsxRuntime.jsxs(TabularPageContainer, {
1619
+ children: [jsxRuntime.jsxs(TabularPageContainer, {
1637
1620
  color: "surface",
1638
1621
  children: [props.customTitleRow || jsxRuntime.jsx(PageHeaderTitle, {
1639
1622
  title: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : '',
@@ -1648,6 +1631,11 @@ const TabularMainPage = props => {
1648
1631
  })
1649
1632
  })
1650
1633
  })]
1634
+ }), jsxRuntime.jsx(CustomViewsSelectorWrapper, {
1635
+ children: jsxRuntime.jsx(CustomViewSelectorOrNothing, {
1636
+ margin: "".concat(designSystem.designTokens.spacing30, " 0 0 0"),
1637
+ customViewLocatorCode: currentCustomViewLocatorCode
1638
+ })
1651
1639
  }), jsxRuntime.jsx(ContentWrapper$1, {
1652
1640
  css: /*#__PURE__*/react.css("background-color:", designTokens.backgroundColorForTabularMainPageContent, ";" + ("" ), "" ),
1653
1641
  children: props.children
@@ -1656,7 +1644,7 @@ const TabularMainPage = props => {
1656
1644
  };
1657
1645
  TabularMainPage.propTypes = {};
1658
1646
  TabularMainPage.displayName = 'TabularMainPage';
1659
- TabularMainPage.defaultProps = defaultProps$1;
1647
+ TabularMainPage.defaultProps = defaultProps$2;
1660
1648
  // Static export of pre-configured form control buttons to easily re-use
1661
1649
  // them in the custom controls.
1662
1650
  TabularMainPage.FormPrimaryButton = FormPrimaryButton;
@@ -1864,11 +1852,11 @@ function PageContentWide(props) {
1864
1852
  });
1865
1853
  }
1866
1854
  PageContentWide.propTypes = {};
1867
- const defaultProps = {
1855
+ const defaultProps$1 = {
1868
1856
  columns: '1',
1869
1857
  gapSize: '20'
1870
1858
  };
1871
- PageContentWide.defaultProps = defaultProps;
1859
+ PageContentWide.defaultProps = defaultProps$1;
1872
1860
 
1873
1861
  var _ref$1 = {
1874
1862
  name: "1d3w5wq",
@@ -1884,6 +1872,84 @@ function PageContentFull(props) {
1884
1872
  }
1885
1873
  PageContentFull.propTypes = {};
1886
1874
 
1875
+ const defaultProps = {
1876
+ size: 10,
1877
+ hideControls: false,
1878
+ onPrimaryButtonClick: () => {},
1879
+ onSecondaryButtonClick: () => {}
1880
+ };
1881
+ const ContentWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1882
+ target: "e18jo6y41"
1883
+ } )("height:100%;padding:", designSystem.designTokens.spacing50, ";" + ("" ));
1884
+ const HeaderWrapper = /*#__PURE__*/_styled__default["default"]("div", {
1885
+ target: "e18jo6y40"
1886
+ } )("padding:", designSystem.designTokens.spacing40, " 40px;border-bottom:1px solid ", designTokens.borderColorForModalPageHeaderDivider, ";" + ("" ));
1887
+ function Drawer(props) {
1888
+ const intl = reactIntl.useIntl();
1889
+ return jsxRuntime.jsxs(ModalPage, {
1890
+ isOpen: props.isOpen,
1891
+ hidePathLabel: true,
1892
+ hideTopBar: true,
1893
+ onClose: props.onClose,
1894
+ size: props.size,
1895
+ title: props.title,
1896
+ afterOpenStyles: props.afterOpenStyles,
1897
+ getParentSelector: props.getParentSelector,
1898
+ shouldDelayOnClose: props.shouldDelayOnClose,
1899
+ topBarColor: props.topBarColor,
1900
+ zIndex: props.zIndex,
1901
+ children: [jsxRuntime.jsx(HeaderWrapper, {
1902
+ children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
1903
+ children: [jsxRuntime.jsxs(Spacings__default["default"].Inline, {
1904
+ justifyContent: "space-between",
1905
+ children: [jsxRuntime.jsx(PageHeaderTitle, {
1906
+ title: props.title,
1907
+ titleSize: "medium",
1908
+ subtitle: props.subtitle && jsxRuntime.jsx(Text__default["default"].Detail, {
1909
+ children: props.subtitle
1910
+ })
1911
+ }), props.onClose && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
1912
+ label: intl.formatMessage(messages$4.close),
1913
+ onClick: props.onClose,
1914
+ icon: jsxRuntime.jsx(LargeIconWrapper, {
1915
+ children: jsxRuntime.jsx(icons.CloseIcon, {})
1916
+ }),
1917
+ size: "big"
1918
+ })]
1919
+ }), jsxRuntime.jsxs(Spacings__default["default"].Inline, {
1920
+ justifyContent: "flex-end",
1921
+ children: [!props.hideControls && props.formControls && props.formControls, !props.hideControls && !props.formControls && jsxRuntime.jsxs(jsxRuntime.Fragment, {
1922
+ children: [jsxRuntime.jsx(FormSecondaryButton, {
1923
+ label: props.labelSecondaryButton,
1924
+ onClick: props.onSecondaryButtonClick,
1925
+ isDisabled: props.isSecondaryButtonDisabled,
1926
+ dataAttributes: props.dataAttributesSecondaryButton,
1927
+ iconLeft: props.iconLeftSecondaryButton
1928
+ }), jsxRuntime.jsx(FormPrimaryButton, {
1929
+ label: props.labelPrimaryButton,
1930
+ onClick: props.onPrimaryButtonClick,
1931
+ isDisabled: props.isPrimaryButtonDisabled,
1932
+ dataAttributes: props.dataAttributesPrimaryButton
1933
+ })]
1934
+ })]
1935
+ })]
1936
+ })
1937
+ }), jsxRuntime.jsx(ContentWrapper, {
1938
+ children: props.children
1939
+ })]
1940
+ });
1941
+ }
1942
+ Drawer.propTypes = {};
1943
+ Drawer.displayName = 'Drawer';
1944
+ Drawer.defaultProps = defaultProps;
1945
+ // Static export of pre-configured form control buttons to easily re-use
1946
+ // them in the custom controls.
1947
+ Drawer.FormPrimaryButton = FormPrimaryButton;
1948
+ Drawer.FormSecondaryButton = FormSecondaryButton;
1949
+ // This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
1950
+ // The Intl messages can be used for button labels.
1951
+ Drawer.Intl = i18n.sharedMessages;
1952
+
1887
1953
  // The width of each indentation level.
1888
1954
  const indentationSize = '48px';
1889
1955
  const useObserverElementDimensions = element => {
@@ -1920,6 +1986,7 @@ const PortalsContainer = /*#__PURE__*/react$1.forwardRef((props, ref) => {
1920
1986
  const containerSelectorToPreventScrollingOnOpen = (_props$containerSelec = props.containerSelectorToPreventScrollingOnOpen) !== null && _props$containerSelec !== void 0 ? _props$containerSelec : 'main';
1921
1987
  const zIndex = (_props$zIndex = props.zIndex) !== null && _props$zIndex !== void 0 ? _props$zIndex : 10000;
1922
1988
  const baseModalZIndex = (_props$baseModalZInde = props.baseModalZIndex) !== null && _props$baseModalZInde !== void 0 ? _props$baseModalZInde : 1000;
1989
+ const modalWidthTransition = 'width 150ms cubic-bezier(1, 0, 0.58, 1)';
1923
1990
  const portalsContainerRef = react$1.useRef(null);
1924
1991
  const globalNotificationsElementDimensions = useObserverElementDimensions(ref === null || ref === void 0 || (_current = ref.current) === null || _current === void 0 ? void 0 : _current.notificationsGlobalRef);
1925
1992
  const pageNotificationsElementDimensions = useObserverElementDimensions(ref === null || ref === void 0 || (_current2 = ref.current) === null || _current2 === void 0 ? void 0 : _current2.notificationsPageRef);
@@ -1963,7 +2030,7 @@ const PortalsContainer = /*#__PURE__*/react$1.forwardRef((props, ref) => {
1963
2030
  children: [jsxRuntime.jsx(react.Global
1964
2031
  // Apply some global styles, based on the `.ReactModal__Body--open` class.
1965
2032
  , {
1966
- styles: [/*#__PURE__*/react.css(".ReactModal__Body--open ", containerSelectorToPreventScrollingOnOpen, "{overflow:hidden;}.ReactModal__Body--open #", constants.PORTALS_CONTAINER_ID, "{position:fixed;height:calc(\n 100% - ", offsetTop, " -\n ", globalNotificationsElementDimensions.height, "px -\n ", pageNotificationsElementDimensions.height, "px\n );width:calc(100% - ", offsetLeft, ");top:calc(\n ", offsetTop, " +\n ", globalNotificationsElementDimensions.height, "px +\n ", pageNotificationsElementDimensions.height, "px\n );right:0;bottom:0;z-index:", zIndex, ";}.ReactModal__Body--open.body__menu-open #", constants.PORTALS_CONTAINER_ID, "{width:calc(100% - ", offsetLeftOnExpandedMenu, ");}" + ("" ), "" ),
2033
+ styles: [/*#__PURE__*/react.css(".ReactModal__Body--open ", containerSelectorToPreventScrollingOnOpen, "{overflow:hidden;}.ReactModal__Body--open #", constants.PORTALS_CONTAINER_ID, "{position:fixed;height:calc(\n 100% - ", offsetTop, " -\n ", globalNotificationsElementDimensions.height, "px -\n ", pageNotificationsElementDimensions.height, "px\n );width:calc(100% - ", offsetLeft, ");top:calc(\n ", offsetTop, " +\n ", globalNotificationsElementDimensions.height, "px +\n ", pageNotificationsElementDimensions.height, "px\n );right:0;bottom:0;z-index:", zIndex, ";transition:", modalWidthTransition, ";}.ReactModal__Body--open.body__menu-open #", constants.PORTALS_CONTAINER_ID, "{width:calc(100% - ", offsetLeftOnExpandedMenu, ");transition:", modalWidthTransition, ";}" + ("" ), "" ),
1967
2034
  // Apply styles for stacking layers.
1968
2035
  ..._mapInstanceProperty__default["default"](stackingLayers).call(stackingLayers,
1969
2036
  /**