@commercetools-frontend/application-components 22.17.1 → 22.18.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 +320 -245
- package/dist/commercetools-frontend-application-components.cjs.prod.js +243 -186
- package/dist/commercetools-frontend-application-components.esm.js +319 -247
- package/dist/declarations/src/components/dialogs/confirmation-dialog/confirmation-dialog.d.ts +8 -4
- package/dist/declarations/src/components/dialogs/confirmation-dialog/index.d.ts +1 -1
- package/dist/declarations/src/components/dialogs/form-dialog/form-dialog.d.ts +8 -4
- package/dist/declarations/src/components/dialogs/form-dialog/index.d.ts +1 -1
- package/dist/declarations/src/components/dialogs/info-dialog/index.d.ts +1 -1
- package/dist/declarations/src/components/dialogs/info-dialog/info-dialog.d.ts +7 -3
- package/dist/declarations/src/components/dialogs/internals/dialog-container.d.ts +2 -1
- package/dist/declarations/src/components/dialogs/internals/dialog-header.d.ts +6 -2
- package/dist/declarations/src/components/project-stamp/messages.d.ts +19 -0
- package/dist/declarations/src/components/project-stamp/project-stamp.d.ts +9 -0
- package/dist/declarations/src/index.d.ts +1 -0
- package/dist/declarations/src/theming.d.ts +1 -44
- package/dist/public-page-layout-684509fb.esm.js +108 -0
- package/dist/{public-page-layout-d750ebd8.cjs.prod.js → public-page-layout-6cc4616e.cjs.prod.js} +4 -36
- package/dist/public-page-layout-eae1f3c9.cjs.dev.js +126 -0
- package/package.json +26 -25
- package/dist/public-page-layout-a43c4d79.esm.js +0 -140
- package/dist/public-page-layout-bf34534e.cjs.dev.js +0 -158
|
@@ -18,7 +18,6 @@ var Text = require('@commercetools-uikit/text');
|
|
|
18
18
|
var utils = require('@commercetools-uikit/utils');
|
|
19
19
|
var react = require('@emotion/react');
|
|
20
20
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
21
|
-
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
22
21
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
23
22
|
var react$1 = require('react');
|
|
24
23
|
var _styled = require('@emotion/styled/base');
|
|
@@ -38,6 +37,7 @@ var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instan
|
|
|
38
37
|
var sentry = require('@commercetools-frontend/sentry');
|
|
39
38
|
var AccessibleButton = require('@commercetools-uikit/accessible-button');
|
|
40
39
|
var Constraints = require('@commercetools-uikit/constraints');
|
|
40
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
41
41
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
42
42
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
43
43
|
var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
|
|
@@ -48,6 +48,9 @@ var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/insta
|
|
|
48
48
|
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
49
49
|
var PageNotFoundSVG = require('@commercetools-frontend/assets/images/page-not-found.svg');
|
|
50
50
|
var FailedAuthorizationSVG = require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
51
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
52
|
+
var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/values');
|
|
53
|
+
var Stamp = require('@commercetools-uikit/stamp');
|
|
51
54
|
var useResizeObserver = require('@react-hook/resize-observer');
|
|
52
55
|
var hooks = require('@commercetools-uikit/hooks');
|
|
53
56
|
|
|
@@ -62,7 +65,6 @@ var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_O
|
|
|
62
65
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
63
66
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
64
67
|
var Text__default = /*#__PURE__*/_interopDefault(Text);
|
|
65
|
-
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
66
68
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
67
69
|
var Modal__default = /*#__PURE__*/_interopDefault(Modal);
|
|
68
70
|
var Card__default = /*#__PURE__*/_interopDefault(Card);
|
|
@@ -75,6 +77,7 @@ var omitBy__default = /*#__PURE__*/_interopDefault(omitBy);
|
|
|
75
77
|
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
76
78
|
var AccessibleButton__default = /*#__PURE__*/_interopDefault(AccessibleButton);
|
|
77
79
|
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
80
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
78
81
|
var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
|
|
79
82
|
var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
|
|
80
83
|
var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
|
|
@@ -82,83 +85,22 @@ var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceP
|
|
|
82
85
|
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
83
86
|
var PageNotFoundSVG__default = /*#__PURE__*/_interopDefault(PageNotFoundSVG);
|
|
84
87
|
var FailedAuthorizationSVG__default = /*#__PURE__*/_interopDefault(FailedAuthorizationSVG);
|
|
88
|
+
var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
|
|
89
|
+
var Stamp__default = /*#__PURE__*/_interopDefault(Stamp);
|
|
85
90
|
var useResizeObserver__default = /*#__PURE__*/_interopDefault(useResizeObserver);
|
|
86
91
|
|
|
87
92
|
// NOTE: This string will be replaced on build time with the package version.
|
|
88
|
-
var version = "22.
|
|
89
|
-
|
|
90
|
-
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10;
|
|
91
|
-
const appKitSpacing55 = '40px';
|
|
92
|
-
// TODO: move to uikit?
|
|
93
|
-
const colorAccent10 = 'hsl(195, 35.2941176471%, 10%)';
|
|
94
|
-
const colorAccent20 = 'hsl(195, 35.2941176471%, 20%)';
|
|
95
|
-
const colorAccent90 = 'hsl(195, 35.2941176471%, 90%)';
|
|
96
|
-
const newShadow1 = '0px 2px 5px 0px rgba(0, 0, 0, 0.15)';
|
|
97
|
-
const themesOverrides = {
|
|
98
|
-
default: {
|
|
99
|
-
colorForPageHeaderBottomBorder: designSystem.designTokens.colorNeutral90,
|
|
100
|
-
colorForNavbarIcon: colorAccent90,
|
|
101
|
-
colorForNavbarIconWhenActive: designSystem.designTokens.colorSurface,
|
|
102
|
-
colorForNavbarLink: designSystem.designTokens.colorNeutral,
|
|
103
|
-
colorForNavbarLinkWhenActive: designSystem.designTokens.colorSurface,
|
|
104
|
-
colorForNavbarLinkWhenHovered: designSystem.designTokens.colorSurface,
|
|
105
|
-
backgroundColorForMainPageDivider: designSystem.designTokens.colorNeutral90,
|
|
106
|
-
backgroundColorForNavbar: colorAccent10,
|
|
107
|
-
backgroundColorForNavbarWhenActive: colorAccent20,
|
|
108
|
-
backgroundColorForNavbarWhenHovered: colorAccent20,
|
|
109
|
-
backgroundColorForPageHeader: designSystem.designTokens.colorSurface,
|
|
110
|
-
backgroundColorForTabularMainPageContent: designSystem.designTokens.colorSurface,
|
|
111
|
-
backgroundColorForUserMenuItemWhenHovered: designSystem.designTokens.colorNeutral95,
|
|
112
|
-
borderBottomForTabularPageHeader: "1px solid ".concat(designSystem.designTokens.colorNeutral90),
|
|
113
|
-
borderColorForDialogDivider: designSystem.designTokens.colorNeutral90,
|
|
114
|
-
borderColorForModalPageHeaderDivider: designSystem.designTokens.colorNeutral90,
|
|
115
|
-
borderColorForModalTopBarWhenSurface: designSystem.designTokens.colorSurface,
|
|
116
|
-
fontSizeForNavbarLink: designSystem.designTokens.fontSize20,
|
|
117
|
-
fontWeightForNavbarLink: designSystem.designTokens.fontWeight400,
|
|
118
|
-
fontWeightForNavbarLinkWhenActive: designSystem.designTokens.fontWeight600,
|
|
119
|
-
fontWeightForNavbarLinkWhenHovered: designSystem.designTokens.fontWeight600,
|
|
120
|
-
heightForTab: '2px',
|
|
121
|
-
lineHeightForNavbarLink: designSystem.designTokens.lineHeight20,
|
|
122
|
-
marginBottomForPageTopBar: designSystem.designTokens.spacing40,
|
|
123
|
-
marginForCustomViewsSelectorAsTabular: "0 ".concat(appKitSpacing55),
|
|
124
|
-
marginForDialogContainerContents: _concatInstanceProperty__default["default"](_context = "".concat(designSystem.designTokens.spacing30, " 0 ")).call(_context, designSystem.designTokens.spacing50, " 0"),
|
|
125
|
-
marginForModalPageHeader: "0 ".concat(appKitSpacing55),
|
|
126
|
-
marginForUserMenuItem: "".concat(designSystem.designTokens.spacing10, " 0"),
|
|
127
|
-
marginLeftForModalPageHeaderControls: designSystem.designTokens.spacing50,
|
|
128
|
-
marginRightForAppbar: appKitSpacing55,
|
|
129
|
-
marginTopForDialogFooter: designSystem.designTokens.spacing50,
|
|
130
|
-
marginForPageContent: _concatInstanceProperty__default["default"](_context2 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context2, appKitSpacing55),
|
|
131
|
-
marginForModalsPageContent: _concatInstanceProperty__default["default"](_context3 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context3, appKitSpacing55),
|
|
132
|
-
marginTopForPageSubtitle: designSystem.designTokens.spacing20,
|
|
133
|
-
marginTopForTabControls: designSystem.designTokens.spacing40,
|
|
134
|
-
paddingForDetailPageHeader: _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context5, appKitSpacing55, " ")).call(_context4, designSystem.designTokens.spacing40),
|
|
135
|
-
paddingForDialogContainer: _concatInstanceProperty__default["default"](_context6 = "".concat(designSystem.designTokens.spacing20, " ")).call(_context6, designSystem.designTokens.spacing30),
|
|
136
|
-
paddingForDialogContent: "".concat(designSystem.designTokens.spacing40, " 0 0"),
|
|
137
|
-
paddingForMainPageHeader: _concatInstanceProperty__default["default"](_context7 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context7, appKitSpacing55, " 0"),
|
|
138
|
-
paddingForModalPageHeader: _concatInstanceProperty__default["default"](_context8 = "".concat(designSystem.designTokens.spacing40, " 0 ")).call(_context8, designSystem.designTokens.spacing40),
|
|
139
|
-
paddingForModalTopBar: _concatInstanceProperty__default["default"](_context9 = "".concat(designSystem.designTokens.spacing40, " ")).call(_context9, appKitSpacing55, " 0"),
|
|
140
|
-
paddingForTabularPageHeader: _concatInstanceProperty__default["default"](_context10 = "".concat(designSystem.designTokens.spacing40, " ")).call(_context10, appKitSpacing55, " 0"),
|
|
141
|
-
paddingLeftForTabAsFirst: designSystem.designTokens.spacing30,
|
|
142
|
-
shadowForAppbar: newShadow1,
|
|
143
|
-
shadowForNavbar: 'none',
|
|
144
|
-
widthForDialogAsMedium: designSystem.designTokens.constraint9,
|
|
145
|
-
widthForDialogAsLarge: designSystem.designTokens.constraint13,
|
|
146
|
-
widthForPageLayoutContentColumn: "calc(".concat(designSystem.designTokens.constraint16, " / 2)")
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
const designTokens = designSystem.transformTokensToCssVarsReferences(themesOverrides.default, {
|
|
150
|
-
includeDefaultValue: false
|
|
151
|
-
});
|
|
93
|
+
var version = "22.18.0";
|
|
152
94
|
|
|
153
|
-
const getBottomBorderStyles = background => /*#__PURE__*/react.css(":after{content:'';position:absolute;bottom:0;left:0;right:0;height:
|
|
154
|
-
var _ref$
|
|
95
|
+
const getBottomBorderStyles = background => /*#__PURE__*/react.css(":after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;border-radius:", designSystem.designTokens.borderRadius2, ";background-color:", background, ";transition:background-color ", designSystem.designTokens.transitionEaseinout150Ms, ";}" + ("" ), "" );
|
|
96
|
+
var _ref$8 = {
|
|
155
97
|
name: "1u0tiat",
|
|
156
98
|
styles: "&[aria-disabled='true']{cursor:not-allowed;opacity:0.5;&:active{pointer-events:none;}}"
|
|
157
99
|
} ;
|
|
158
|
-
const getLinkStyles = (isActive, isDisabled) => [/*#__PURE__*/react.css("font-size:", designSystem.designTokens.
|
|
100
|
+
const getLinkStyles = (isActive, isDisabled) => [/*#__PURE__*/react.css("font-size:", designSystem.designTokens.fontSize30, ";padding:", designSystem.designTokens.spacingS, " ", designSystem.designTokens.spacingM, ";position:relative;text-align:center;display:inline-block;color:inherit;text-decoration:inherit;&:first-of-type{padding-left:", designSystem.designTokens.spacing30, ";}", getBottomBorderStyles('transparent'), ";" + ("" ), "" ), isActive && /*#__PURE__*/react.css(getBottomBorderStyles(designSystem.designTokens.colorPrimary), " & h4{color:", designSystem.designTokens.colorPrimary, "!important;}" + ("" ), "" ), isDisabled && _ref$8, !isActive && !isDisabled && /*#__PURE__*/react.css(":hover,:focus,:active{& h4{color:", designSystem.designTokens.colorPrimary, "!important;}}" + ("" ), "" )];
|
|
159
101
|
|
|
160
|
-
function ownKeys$
|
|
161
|
-
function _objectSpread$
|
|
102
|
+
function ownKeys$8(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; }
|
|
103
|
+
function _objectSpread$8(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$8(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$8(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
162
104
|
const pathWithoutSearch$1 = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
163
105
|
const warnIfMissingContent = props => {
|
|
164
106
|
Boolean(props.intlMessage) || Boolean(props.label);
|
|
@@ -190,7 +132,7 @@ const TabHeader = props => {
|
|
|
190
132
|
label = intl.formatMessage(props.intlMessage);
|
|
191
133
|
}
|
|
192
134
|
warnIfMissingContent(props);
|
|
193
|
-
return jsxRuntime.jsx(reactRouterDom.Link, _objectSpread$
|
|
135
|
+
return jsxRuntime.jsx(reactRouterDom.Link, _objectSpread$8(_objectSpread$8({
|
|
194
136
|
role: "tab",
|
|
195
137
|
"aria-selected": isActive,
|
|
196
138
|
to: props.to,
|
|
@@ -211,13 +153,12 @@ TabHeader.defaultProps = defaultProps$j;
|
|
|
211
153
|
|
|
212
154
|
const getConstraintForGridStyle = size => {
|
|
213
155
|
switch (size) {
|
|
214
|
-
case 'm':
|
|
215
|
-
return designTokens.widthForDialogAsMedium;
|
|
216
156
|
case 7:
|
|
217
157
|
return designSystem.designTokens.constraint7;
|
|
218
158
|
case 8:
|
|
219
159
|
return designSystem.designTokens.constraint8;
|
|
220
160
|
case 9:
|
|
161
|
+
case 'm':
|
|
221
162
|
return designSystem.designTokens.constraint9;
|
|
222
163
|
case 10:
|
|
223
164
|
return designSystem.designTokens.constraint10;
|
|
@@ -226,11 +167,10 @@ const getConstraintForGridStyle = size => {
|
|
|
226
167
|
case 12:
|
|
227
168
|
return designSystem.designTokens.constraint12;
|
|
228
169
|
case 13:
|
|
170
|
+
case 'l':
|
|
229
171
|
return designSystem.designTokens.constraint13;
|
|
230
172
|
case 16:
|
|
231
173
|
return designSystem.designTokens.constraint16;
|
|
232
|
-
case 'l':
|
|
233
|
-
return designTokens.widthForDialogAsLarge;
|
|
234
174
|
case 'scale':
|
|
235
175
|
return designSystem.designTokens.constraintScale;
|
|
236
176
|
default:
|
|
@@ -249,13 +189,13 @@ const getModalContentStyles = props => {
|
|
|
249
189
|
const getOverlayStyles$1 = props => /*#__PURE__*/react.css("display:flex;position:absolute;z-index:", typeof props.zIndex === 'number' ? // Use `!important` to overwrite the default value assigned by the Stacking Layer System.
|
|
250
190
|
"".concat(props.zIndex, " !important") : 'auto', ";top:0;width:100%;height:100%;background-color:rgba(32, 62, 72, 0.5);opacity:1;" + ("" ), "" );
|
|
251
191
|
|
|
252
|
-
function ownKeys$
|
|
253
|
-
function _objectSpread$
|
|
192
|
+
function ownKeys$7(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
193
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
254
194
|
const getDefaultParentSelector$1 = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
|
|
255
195
|
const getOverlayElement$1 = (props, contentElement) =>
|
|
256
196
|
// Assign the `data-role` to the overlay container, which is used as
|
|
257
197
|
// the CSS selector in the `<PortalsContainer>`.
|
|
258
|
-
jsxRuntime.jsx("div", _objectSpread$
|
|
198
|
+
jsxRuntime.jsx("div", _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
259
199
|
"data-role": "dialog-overlay",
|
|
260
200
|
children: contentElement
|
|
261
201
|
}));
|
|
@@ -270,7 +210,7 @@ const defaultProps$i = {
|
|
|
270
210
|
const GridArea = /*#__PURE__*/_styled__default["default"]("div", {
|
|
271
211
|
target: "elx55gk0"
|
|
272
212
|
} )("grid-area:", props => props.name, ";" + ("" ));
|
|
273
|
-
var _ref$
|
|
213
|
+
var _ref$7 = {
|
|
274
214
|
name: "1daj17f",
|
|
275
215
|
styles: "display:flex;flex-direction:column;align-items:stretch;height:100%;min-height:0"
|
|
276
216
|
} ;
|
|
@@ -278,45 +218,48 @@ var _ref2$3 = {
|
|
|
278
218
|
name: "1187q51",
|
|
279
219
|
styles: "display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;overflow:hidden"
|
|
280
220
|
} ;
|
|
281
|
-
const DialogContainer = props =>
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
css:
|
|
313
|
-
children:
|
|
221
|
+
const DialogContainer = props => {
|
|
222
|
+
utils.useWarning(typeof props.title === 'string' || typeof props.title !== 'string' && Boolean(props['aria-label']), 'app-kit/DialogHeader: "aria-label" prop is required when the "title" prop is not a string.');
|
|
223
|
+
return jsxRuntime.jsx(react.ClassNames, {
|
|
224
|
+
children: _ref3 => {
|
|
225
|
+
let makeClassName = _ref3.css;
|
|
226
|
+
return jsxRuntime.jsxs(Modal__default["default"], {
|
|
227
|
+
isOpen: props.isOpen,
|
|
228
|
+
onRequestClose: props.onClose,
|
|
229
|
+
shouldCloseOnOverlayClick: Boolean(props.onClose),
|
|
230
|
+
shouldCloseOnEsc: Boolean(props.onClose),
|
|
231
|
+
overlayElement: getOverlayElement$1,
|
|
232
|
+
overlayClassName: makeClassName(getOverlayStyles$1(props)),
|
|
233
|
+
className: makeClassName(getModalContentStyles(props)),
|
|
234
|
+
contentLabel: typeof props.title === 'string' ? props.title : props['aria-label'],
|
|
235
|
+
parentSelector: props.getParentSelector,
|
|
236
|
+
ariaHideApp: false,
|
|
237
|
+
children: [jsxRuntime.jsx(GridArea, {
|
|
238
|
+
name: "top"
|
|
239
|
+
}), jsxRuntime.jsx(GridArea, {
|
|
240
|
+
name: "left"
|
|
241
|
+
}), jsxRuntime.jsx(GridArea, {
|
|
242
|
+
name: "right"
|
|
243
|
+
}), jsxRuntime.jsx(GridArea, {
|
|
244
|
+
name: "bottom"
|
|
245
|
+
}), jsxRuntime.jsx(GridArea, {
|
|
246
|
+
name: "main",
|
|
247
|
+
css: _ref2$3,
|
|
248
|
+
children: jsxRuntime.jsx(Card__default["default"]
|
|
249
|
+
// 1. For the min-height: https://stackoverflow.com/questions/28636832/firefox-overflow-y-not-working-with-nested-flexbox/28639686#28639686
|
|
250
|
+
// 2. For the actual "> div" container with the content, we need to use normal pointer events so that clicking on it does not close the dialog.
|
|
251
|
+
, {
|
|
252
|
+
css: /*#__PURE__*/react.css("min-height:0;padding:", designSystem.designTokens.spacing20, " ", designSystem.designTokens.spacing30, ";>div{display:flex;flex-direction:column;height:100%;pointer-events:auto;min-height:0;}" + ("" ), "" ),
|
|
253
|
+
children: jsxRuntime.jsx("div", {
|
|
254
|
+
css: _ref$7,
|
|
255
|
+
children: props.children
|
|
256
|
+
})
|
|
314
257
|
})
|
|
315
|
-
})
|
|
316
|
-
})
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
258
|
+
})]
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
};
|
|
320
263
|
DialogContainer.propTypes = {};
|
|
321
264
|
DialogContainer.displayName = 'DialogContainer';
|
|
322
265
|
DialogContainer.defaultProps = defaultProps$i;
|
|
@@ -324,15 +267,25 @@ DialogContainer.defaultProps = defaultProps$i;
|
|
|
324
267
|
// The overflow should be "auto", to make the container scrollable
|
|
325
268
|
const DialogContent = /*#__PURE__*/_styled__default["default"]("div", {
|
|
326
269
|
target: "eo6zkz80"
|
|
327
|
-
} )("border-top:1px solid ", designTokens.
|
|
270
|
+
} )("border-top:1px solid ", designSystem.designTokens.colorNeutral90, ";padding:", designSystem.designTokens.spacing40, " 0 0;flex:1;overflow:auto;" + ("" ));
|
|
328
271
|
|
|
272
|
+
const TextTitle = props => jsxRuntime.jsx(Text__default["default"].Headline, {
|
|
273
|
+
as: "h3",
|
|
274
|
+
title: props.title,
|
|
275
|
+
truncate: true,
|
|
276
|
+
children: props.title
|
|
277
|
+
});
|
|
278
|
+
TextTitle.propTypes = {};
|
|
329
279
|
const Title$1 = props => {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
280
|
+
if (typeof props.title === 'string') {
|
|
281
|
+
return jsxRuntime.jsx(TextTitle, {
|
|
282
|
+
title: props.title
|
|
283
|
+
});
|
|
284
|
+
} else {
|
|
285
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
286
|
+
children: props.title
|
|
287
|
+
});
|
|
288
|
+
}
|
|
336
289
|
};
|
|
337
290
|
const DialogHeader = props => jsxRuntime.jsx("div", {
|
|
338
291
|
css: /*#__PURE__*/react.css("flex:0 1 auto;display:flex;flex-direction:column;margin-bottom:", designSystem.designTokens.spacing30, ";" + ("" ), "" ),
|
|
@@ -359,6 +312,7 @@ const InfoDialog = props => jsxRuntime.jsxs(DialogContainer, {
|
|
|
359
312
|
size: props.size,
|
|
360
313
|
zIndex: props.zIndex,
|
|
361
314
|
title: props.title,
|
|
315
|
+
"aria-label": props['aria-label'],
|
|
362
316
|
getParentSelector: props.getParentSelector,
|
|
363
317
|
children: [jsxRuntime.jsx(DialogHeader, {
|
|
364
318
|
title: props.title,
|
|
@@ -370,12 +324,16 @@ const InfoDialog = props => jsxRuntime.jsxs(DialogContainer, {
|
|
|
370
324
|
InfoDialog.propTypes = {};
|
|
371
325
|
InfoDialog.displayName = 'InfoDialog';
|
|
372
326
|
|
|
327
|
+
// Allow consumers who want to use a custom title to reuse the same title styles
|
|
328
|
+
// as the default dialog title.
|
|
329
|
+
InfoDialog.TextTitle = TextTitle;
|
|
330
|
+
|
|
373
331
|
function filterDataAttributes(obj) {
|
|
374
332
|
return omitBy__default["default"](obj, (_value, key) => !_startsWithInstanceProperty__default["default"](key).call(key, 'data-'));
|
|
375
333
|
}
|
|
376
334
|
|
|
377
|
-
function ownKeys$
|
|
378
|
-
function _objectSpread$
|
|
335
|
+
function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
336
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$6(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
379
337
|
const defaultProps$h = {
|
|
380
338
|
isPrimaryButtonDisabled: false,
|
|
381
339
|
dataAttributesPrimaryButton: {},
|
|
@@ -385,16 +343,16 @@ const getFormattedLabel = (label, intl) => typeof label === 'string' ? label : i
|
|
|
385
343
|
const DialogFooter = props => {
|
|
386
344
|
const intl = reactIntl.useIntl();
|
|
387
345
|
return jsxRuntime.jsx("div", {
|
|
388
|
-
css: /*#__PURE__*/react.css("margin-top:", designTokens.
|
|
346
|
+
css: /*#__PURE__*/react.css("margin-top:", designSystem.designTokens.spacing50, ";" + ("" ), "" ),
|
|
389
347
|
children: jsxRuntime.jsxs(Spacings__default["default"].Inline, {
|
|
390
348
|
scale: "m",
|
|
391
349
|
alignItems: "center",
|
|
392
350
|
justifyContent: "flex-end",
|
|
393
|
-
children: [jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$
|
|
351
|
+
children: [jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$6({
|
|
394
352
|
label: getFormattedLabel(props.labelSecondary, intl),
|
|
395
353
|
onClick: props.onCancel,
|
|
396
354
|
iconLeft: props.iconLeftSecondaryButton
|
|
397
|
-
}, filterDataAttributes(props.dataAttributesSecondaryButton))), jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$
|
|
355
|
+
}, filterDataAttributes(props.dataAttributesSecondaryButton))), jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$6({
|
|
398
356
|
label: getFormattedLabel(props.labelPrimary, intl),
|
|
399
357
|
onClick: props.onConfirm,
|
|
400
358
|
isDisabled: props.isPrimaryButtonDisabled
|
|
@@ -416,6 +374,7 @@ const ConfirmationDialog = props => jsxRuntime.jsxs(DialogContainer, {
|
|
|
416
374
|
size: props.size,
|
|
417
375
|
zIndex: props.zIndex,
|
|
418
376
|
title: props.title,
|
|
377
|
+
"aria-label": props['aria-label'],
|
|
419
378
|
getParentSelector: props.getParentSelector,
|
|
420
379
|
children: [jsxRuntime.jsx(DialogHeader, {
|
|
421
380
|
title: props.title,
|
|
@@ -438,6 +397,9 @@ ConfirmationDialog.defaultProps = defaultProps$g;
|
|
|
438
397
|
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
439
398
|
// The Intl messages can be used for button labels.
|
|
440
399
|
ConfirmationDialog.Intl = i18n.sharedMessages;
|
|
400
|
+
// Allow consumers who want to use a custom title to reuse the same title styles
|
|
401
|
+
// as the default dialog title.
|
|
402
|
+
ConfirmationDialog.TextTitle = TextTitle;
|
|
441
403
|
|
|
442
404
|
const defaultProps$f = {
|
|
443
405
|
labelSecondary: i18n.sharedMessages.cancel,
|
|
@@ -449,6 +411,7 @@ const FormDialog = props => jsxRuntime.jsxs(DialogContainer, {
|
|
|
449
411
|
size: props.size,
|
|
450
412
|
zIndex: props.zIndex,
|
|
451
413
|
title: props.title,
|
|
414
|
+
"aria-label": props['aria-label'],
|
|
452
415
|
getParentSelector: props.getParentSelector,
|
|
453
416
|
children: [jsxRuntime.jsx(DialogHeader, {
|
|
454
417
|
title: props.title,
|
|
@@ -472,8 +435,11 @@ FormDialog.defaultProps = defaultProps$f;
|
|
|
472
435
|
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
473
436
|
// The Intl messages can be used for button labels.
|
|
474
437
|
FormDialog.Intl = i18n.sharedMessages;
|
|
438
|
+
// Allow consumers who want to use a custom title to reuse the same title styles
|
|
439
|
+
// as the default dialog title.
|
|
440
|
+
FormDialog.TextTitle = TextTitle;
|
|
475
441
|
|
|
476
|
-
const messages$
|
|
442
|
+
const messages$5 = reactIntl.defineMessages({
|
|
477
443
|
back: {
|
|
478
444
|
id: 'Components.ModalPage.TopBar.Back',
|
|
479
445
|
defaultMessage: 'Go Back'
|
|
@@ -502,19 +468,19 @@ const LargeIconWrapper = props => jsxRuntime.jsx("span", {
|
|
|
502
468
|
LargeIconWrapper.propTypes = {};
|
|
503
469
|
const defaultProps$e = {
|
|
504
470
|
color: 'surface',
|
|
505
|
-
previousPathLabel: messages$
|
|
471
|
+
previousPathLabel: messages$5.back,
|
|
506
472
|
hidePathLabel: false
|
|
507
473
|
};
|
|
508
|
-
var _ref$
|
|
474
|
+
var _ref$6 = {
|
|
509
475
|
name: "uvw8rn",
|
|
510
476
|
styles: "display:flex;overflow:hidden;button:first-of-type svg{height:12px!important;width:12px!important;}"
|
|
511
477
|
} ;
|
|
512
478
|
const ModalPageTopBar = props => {
|
|
513
479
|
const intl = reactIntl.useIntl();
|
|
514
480
|
return jsxRuntime.jsxs("div", {
|
|
515
|
-
css: /*#__PURE__*/react.css("position:relative;display:flex;align-items:center;justify-content:space-between;padding:", designTokens.
|
|
481
|
+
css: /*#__PURE__*/react.css("position:relative;display:flex;align-items:center;justify-content:space-between;padding:", designSystem.designTokens.spacing40, " ", designSystem.designTokens.spacing55, " 0;background-color:", designSystem.designTokens.colorSurface, ";border-bottom:1px solid ", designSystem.designTokens.colorSurface, ";& *+*{margin-left:", designSystem.designTokens.spacingS, ";}p{font-size:12px!important;}" + ("" ), "" ),
|
|
516
482
|
children: [jsxRuntime.jsxs("div", {
|
|
517
|
-
css: _ref$
|
|
483
|
+
css: _ref$6,
|
|
518
484
|
children: [!props.hidePathLabel && jsxRuntime.jsx(FlatButton__default["default"], {
|
|
519
485
|
tone: "primary",
|
|
520
486
|
label: typeof props.previousPathLabel === 'string' ? props.previousPathLabel : intl.formatMessage(props.previousPathLabel),
|
|
@@ -535,7 +501,7 @@ const ModalPageTopBar = props => {
|
|
|
535
501
|
})]
|
|
536
502
|
})]
|
|
537
503
|
}), props.onClose && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
|
|
538
|
-
label: intl.formatMessage(messages$
|
|
504
|
+
label: intl.formatMessage(messages$5.close),
|
|
539
505
|
onClick: props.onClose,
|
|
540
506
|
icon: jsxRuntime.jsx(LargeIconWrapper, {
|
|
541
507
|
children: jsxRuntime.jsx(icons.CloseIcon, {})
|
|
@@ -585,19 +551,19 @@ var _ref2$1 = {
|
|
|
585
551
|
} ;
|
|
586
552
|
const getAfterOpenOverlayAnimation = () => _ref2$1;
|
|
587
553
|
const getBeforeCloseContainerAnimation = props => /*#__PURE__*/react.css("transform:translate3d(\n ", props.size !== 'scale' ? stylesBySize[props.size].width : '30px', ",\n ,\n 0,\n 0\n )!important;" + ("" ), "" );
|
|
588
|
-
var _ref$
|
|
554
|
+
var _ref$5 = {
|
|
589
555
|
name: "728dx5",
|
|
590
556
|
styles: "opacity:0!important"
|
|
591
557
|
} ;
|
|
592
|
-
const getBeforeCloseOverlayAnimation = () => _ref$
|
|
558
|
+
const getBeforeCloseOverlayAnimation = () => _ref$5;
|
|
593
559
|
|
|
594
|
-
function ownKeys$
|
|
595
|
-
function _objectSpread$
|
|
560
|
+
function ownKeys$5(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
561
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$5(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
596
562
|
const getDefaultParentSelector = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
|
|
597
563
|
const getOverlayElement = (props, contentElement) =>
|
|
598
564
|
// Assign the `data-role` to the overlay container, which is used as
|
|
599
565
|
// the CSS selector in the `<PortalsContainer>`.
|
|
600
|
-
jsxRuntime.jsx("div", _objectSpread$
|
|
566
|
+
jsxRuntime.jsx("div", _objectSpread$5(_objectSpread$5({}, props), {}, {
|
|
601
567
|
"data-role": "modal-overlay",
|
|
602
568
|
children: contentElement
|
|
603
569
|
}));
|
|
@@ -686,7 +652,7 @@ ModalPage.propTypes = {};
|
|
|
686
652
|
ModalPage.displayName = 'ModalPage';
|
|
687
653
|
ModalPage.defaultProps = defaultProps$d;
|
|
688
654
|
|
|
689
|
-
const messages$
|
|
655
|
+
const messages$4 = reactIntl.defineMessages({
|
|
690
656
|
loadError: {
|
|
691
657
|
id: 'CustomViewLoader.error.load',
|
|
692
658
|
defaultMessage: 'We could not load the Custom View. Please contact your administrator to check its configuration.'
|
|
@@ -747,7 +713,7 @@ function CustomViewLoader(props) {
|
|
|
747
713
|
showNotification({
|
|
748
714
|
domain: constants.DOMAINS.PAGE,
|
|
749
715
|
kind: constants.NOTIFICATION_KINDS_PAGE.error,
|
|
750
|
-
text: intl.formatMessage(messages$
|
|
716
|
+
text: intl.formatMessage(messages$4.loadError)
|
|
751
717
|
});
|
|
752
718
|
return;
|
|
753
719
|
}
|
|
@@ -810,7 +776,7 @@ function CustomViewLoader(props) {
|
|
|
810
776
|
}
|
|
811
777
|
CustomViewLoader.propTypes = {};
|
|
812
778
|
|
|
813
|
-
var messages$
|
|
779
|
+
var messages$3 = reactIntl.defineMessages({
|
|
814
780
|
title: {
|
|
815
781
|
id: 'CustomViewsSelector.title',
|
|
816
782
|
defaultMessage: 'Custom Views:'
|
|
@@ -841,8 +807,8 @@ const useCustomViewsConnector = _ref => {
|
|
|
841
807
|
};
|
|
842
808
|
};
|
|
843
809
|
|
|
844
|
-
function ownKeys$
|
|
845
|
-
function _objectSpread$
|
|
810
|
+
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; }
|
|
811
|
+
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; }
|
|
846
812
|
const COMPONENT_HEIGHT = '52px';
|
|
847
813
|
const Wrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
848
814
|
target: "e16cb3zv3"
|
|
@@ -917,7 +883,7 @@ function CustomViewSelector(props) {
|
|
|
917
883
|
color: "neutral60"
|
|
918
884
|
}), jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
919
885
|
tone: "secondary",
|
|
920
|
-
intlMessage: messages$
|
|
886
|
+
intlMessage: messages$3.title
|
|
921
887
|
})]
|
|
922
888
|
}), _mapInstanceProperty__default["default"](customViews).call(customViews, (customView, index) => {
|
|
923
889
|
const isNotLastItem = index !== customViews.length - 1;
|
|
@@ -947,7 +913,7 @@ const CustomViewSelectorOrNothing = props => {
|
|
|
947
913
|
if (!props.customViewLocatorCode) {
|
|
948
914
|
return null;
|
|
949
915
|
}
|
|
950
|
-
return jsxRuntime.jsx(CustomViewSelector, _objectSpread$
|
|
916
|
+
return jsxRuntime.jsx(CustomViewSelector, _objectSpread$4(_objectSpread$4({}, props), {}, {
|
|
951
917
|
customViewLocatorCode: props.customViewLocatorCode
|
|
952
918
|
}));
|
|
953
919
|
};
|
|
@@ -959,7 +925,7 @@ const defaultProps$c = {
|
|
|
959
925
|
};
|
|
960
926
|
const SubtitleWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
961
927
|
target: "epaiodd0"
|
|
962
|
-
} )("margin-top:", designTokens.
|
|
928
|
+
} )("margin-top:", designSystem.designTokens.spacing20, ";" + ("" ));
|
|
963
929
|
const Title = props => {
|
|
964
930
|
switch (props.titleSize) {
|
|
965
931
|
case 'big':
|
|
@@ -1007,12 +973,12 @@ Subtitle.propTypes = {};
|
|
|
1007
973
|
Subtitle.defaultProps = {
|
|
1008
974
|
truncate: false
|
|
1009
975
|
};
|
|
1010
|
-
var _ref$
|
|
976
|
+
var _ref$4 = {
|
|
1011
977
|
name: "d3v9zr",
|
|
1012
978
|
styles: "overflow:hidden"
|
|
1013
979
|
} ;
|
|
1014
980
|
const PageHeaderTitle = props => jsxRuntime.jsxs("div", {
|
|
1015
|
-
css: _ref$
|
|
981
|
+
css: _ref$4,
|
|
1016
982
|
children: [jsxRuntime.jsx(Title, {
|
|
1017
983
|
title: props.title,
|
|
1018
984
|
titleSize: props.titleSize,
|
|
@@ -1028,9 +994,9 @@ PageHeaderTitle.defaultProps = defaultProps$c;
|
|
|
1028
994
|
|
|
1029
995
|
const PageHeader = props => {
|
|
1030
996
|
return jsxRuntime.jsxs("div", {
|
|
1031
|
-
css: /*#__PURE__*/react.css("margin:", designTokens.
|
|
997
|
+
css: /*#__PURE__*/react.css("margin:0 ", designSystem.designTokens.spacing55, ";padding:", designSystem.designTokens.spacing40, " 0 ", designSystem.designTokens.spacing40, ";border-bottom:1px solid ", designSystem.designTokens.colorNeutral90, ";" + ("" ), "" ),
|
|
1032
998
|
children: [jsxRuntime.jsxs("div", {
|
|
1033
|
-
css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;&>*+*{margin-left:", designTokens.
|
|
999
|
+
css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;&>*+*{margin-left:", designSystem.designTokens.spacing50, ";}" + ("" ), "" ),
|
|
1034
1000
|
children: [jsxRuntime.jsx(PageHeaderTitle, {
|
|
1035
1001
|
title: props.title,
|
|
1036
1002
|
titleSize: "big",
|
|
@@ -1046,12 +1012,30 @@ const PageHeader = props => {
|
|
|
1046
1012
|
PageHeader.propTypes = {};
|
|
1047
1013
|
PageHeader.displayName = 'PageHeader';
|
|
1048
1014
|
|
|
1015
|
+
var _context, _context2, _context3, _context4, _context5;
|
|
1016
|
+
|
|
1017
|
+
// We keep these tokens as they are related to page layout components which should have
|
|
1018
|
+
// a slightly different layout (margins/paddings) when used within a Custom View panel.
|
|
1019
|
+
// https://github.com/commercetools/merchant-center-application-kit/pull/3353
|
|
1020
|
+
const themesOverrides = {
|
|
1021
|
+
default: {
|
|
1022
|
+
marginForCustomViewsSelectorAsTabular: "0 ".concat(designSystem.designTokens.spacing55),
|
|
1023
|
+
marginForPageContent: _concatInstanceProperty__default["default"](_context = "".concat(designSystem.designTokens.spacing50, " ")).call(_context, designSystem.designTokens.spacing55),
|
|
1024
|
+
paddingForDetailPageHeader: _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context3, designSystem.designTokens.spacing55, " ")).call(_context2, designSystem.designTokens.spacing40),
|
|
1025
|
+
paddingForMainPageHeader: _concatInstanceProperty__default["default"](_context4 = "".concat(designSystem.designTokens.spacing50, " ")).call(_context4, designSystem.designTokens.spacing55, " 0"),
|
|
1026
|
+
paddingForTabularPageHeader: _concatInstanceProperty__default["default"](_context5 = "".concat(designSystem.designTokens.spacing40, " ")).call(_context5, designSystem.designTokens.spacing55, " 0")
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1029
|
+
const designTokens = designSystem.transformTokensToCssVarsReferences(themesOverrides.default, {
|
|
1030
|
+
includeDefaultValue: false
|
|
1031
|
+
});
|
|
1032
|
+
|
|
1049
1033
|
const ContentWrapper$1 = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1050
1034
|
target: "e1b7jwn02"
|
|
1051
1035
|
} )("flex:1;flex-basis:0;overflow:auto;margin:", designTokens.marginForPageContent, ";" + ("" ));
|
|
1052
1036
|
const ModalContentWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1053
1037
|
target: "e1b7jwn01"
|
|
1054
|
-
} )("flex:1;flex-basis:0;overflow:auto;margin:", designTokens.
|
|
1038
|
+
} )("flex:1;flex-basis:0;overflow:auto;margin:", designSystem.designTokens.spacing50, " ", designSystem.designTokens.spacing55, ";" + ("" ));
|
|
1055
1039
|
const PageWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1056
1040
|
target: "e1b7jwn00"
|
|
1057
1041
|
} )({
|
|
@@ -1080,8 +1064,8 @@ const InfoModalPage = props => jsxRuntime.jsxs(ModalPage, {
|
|
|
1080
1064
|
InfoModalPage.propTypes = {};
|
|
1081
1065
|
InfoModalPage.displayName = 'InfoModalPage';
|
|
1082
1066
|
|
|
1083
|
-
function ownKeys$
|
|
1084
|
-
function _objectSpread$
|
|
1067
|
+
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; }
|
|
1068
|
+
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; }
|
|
1085
1069
|
const primaryDefaultProps = {
|
|
1086
1070
|
label: i18n.sharedMessages.confirm,
|
|
1087
1071
|
isDisabled: false,
|
|
@@ -1093,7 +1077,7 @@ const useFormattedLabel = label => {
|
|
|
1093
1077
|
};
|
|
1094
1078
|
const FormPrimaryButton = props => {
|
|
1095
1079
|
const label = useFormattedLabel(props.label);
|
|
1096
|
-
return jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$
|
|
1080
|
+
return jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$3({
|
|
1097
1081
|
label: label,
|
|
1098
1082
|
onClick: props.onClick,
|
|
1099
1083
|
isDisabled: props.isDisabled
|
|
@@ -1109,7 +1093,7 @@ const secondaryDefaultProps = {
|
|
|
1109
1093
|
};
|
|
1110
1094
|
const FormSecondaryButton = props => {
|
|
1111
1095
|
const label = useFormattedLabel(props.label);
|
|
1112
|
-
return jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$
|
|
1096
|
+
return jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$3({
|
|
1113
1097
|
label: label,
|
|
1114
1098
|
onClick: props.onClick,
|
|
1115
1099
|
isDisabled: props.isDisabled,
|
|
@@ -1126,7 +1110,7 @@ const deleteDefaultProps = {
|
|
|
1126
1110
|
};
|
|
1127
1111
|
const FormDeleteButton = props => {
|
|
1128
1112
|
const label = useFormattedLabel(props.label);
|
|
1129
|
-
return jsxRuntime.jsx(IconButton__default["default"], _objectSpread$
|
|
1113
|
+
return jsxRuntime.jsx(IconButton__default["default"], _objectSpread$3({
|
|
1130
1114
|
icon: jsxRuntime.jsx(icons.BinLinearIcon, {}),
|
|
1131
1115
|
label: label,
|
|
1132
1116
|
onClick: props.onClick,
|
|
@@ -1233,7 +1217,7 @@ const TabControls = /*#__PURE__*/_styled__default["default"]("div", {
|
|
|
1233
1217
|
target: "elpldre2"
|
|
1234
1218
|
} )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
|
|
1235
1219
|
const ControlsContainter = props => jsxRuntime.jsxs("div", {
|
|
1236
|
-
css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;margin-top:", designTokens.
|
|
1220
|
+
css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;margin-top:", designSystem.designTokens.spacing40, ";" + ("" ), "" ),
|
|
1237
1221
|
children: [jsxRuntime.jsx(TabControls, {
|
|
1238
1222
|
role: "tablist",
|
|
1239
1223
|
children: props.tabControls
|
|
@@ -1242,7 +1226,7 @@ const ControlsContainter = props => jsxRuntime.jsxs("div", {
|
|
|
1242
1226
|
ControlsContainter.propTypes = {};
|
|
1243
1227
|
ControlsContainter.displayName = 'ControlsContainter';
|
|
1244
1228
|
const TabularPageContainer = props => jsxRuntime.jsx("div", {
|
|
1245
|
-
css: /*#__PURE__*/react.css("background-color:",
|
|
1229
|
+
css: /*#__PURE__*/react.css("background-color:", designSystem.designTokens.colorSurface, ";padding:", designTokens.paddingForTabularPageHeader, ";border-bottom:1px solid ", designSystem.designTokens.colorNeutral90, ";" + ("" ), "" ),
|
|
1246
1230
|
children: props.children
|
|
1247
1231
|
});
|
|
1248
1232
|
TabularPageContainer.propTypes = {};
|
|
@@ -1315,12 +1299,12 @@ TabularModalPage.Intl = i18n.sharedMessages;
|
|
|
1315
1299
|
|
|
1316
1300
|
const defaultProps$8 = {
|
|
1317
1301
|
color: 'surface',
|
|
1318
|
-
previousPathLabel: messages$
|
|
1302
|
+
previousPathLabel: messages$5.back
|
|
1319
1303
|
};
|
|
1320
1304
|
const PageTopBar = props => {
|
|
1321
1305
|
const intl = reactIntl.useIntl();
|
|
1322
1306
|
return jsxRuntime.jsx("div", {
|
|
1323
|
-
css: /*#__PURE__*/react.css("position:relative;display:flex;align-items:center;justify-content:space-between;margin-bottom:", designTokens.
|
|
1307
|
+
css: /*#__PURE__*/react.css("position:relative;display:flex;align-items:center;justify-content:space-between;margin-bottom:", designSystem.designTokens.spacing40, ";background-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ),
|
|
1324
1308
|
children: jsxRuntime.jsx(FlatButton__default["default"], {
|
|
1325
1309
|
tone: "primary",
|
|
1326
1310
|
label: typeof props.previousPathLabel === 'string' ? props.previousPathLabel : intl.formatMessage(props.previousPathLabel),
|
|
@@ -1338,7 +1322,7 @@ PageTopBar.defaultProps = defaultProps$8;
|
|
|
1338
1322
|
|
|
1339
1323
|
const DetailPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1340
1324
|
target: "etkdonc1"
|
|
1341
|
-
} )("background-color:", designTokens.
|
|
1325
|
+
} )("background-color:", designSystem.designTokens.colorSurface, ";padding:", designTokens.paddingForDetailPageHeader, ";border-bottom:1px ", designSystem.designTokens.colorNeutral90, " solid;" + ("" ));
|
|
1342
1326
|
const HeaderControlsWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1343
1327
|
target: "etkdonc0"
|
|
1344
1328
|
} )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
|
|
@@ -1499,14 +1483,14 @@ TabularDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
|
1499
1483
|
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1500
1484
|
TabularDetailPage.Intl = i18n.sharedMessages;
|
|
1501
1485
|
|
|
1502
|
-
const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-
|
|
1486
|
+
const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-6cc4616e.cjs.prod.js' /* webpackChunkName: "public-page-layout" */); }));
|
|
1503
1487
|
|
|
1504
1488
|
const MainPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1505
1489
|
target: "ev8m2jf2"
|
|
1506
1490
|
} )("padding:", designTokens.paddingForMainPageHeader, ";" + ("" ));
|
|
1507
1491
|
const Divider = /*#__PURE__*/_styled__default["default"]("hr", {
|
|
1508
1492
|
target: "ev8m2jf1"
|
|
1509
|
-
} )("background-color:", designTokens.
|
|
1493
|
+
} )("background-color:", designSystem.designTokens.colorNeutral90, ";height:1px;border:0;" + ("" ));
|
|
1510
1494
|
|
|
1511
1495
|
// NOTE: do not change "margin" to "padding" as this breaks sticky DataTable styles
|
|
1512
1496
|
const MainPageContent = /*#__PURE__*/_styled__default["default"]("div", {
|
|
@@ -1646,7 +1630,7 @@ const TabularMainPage = props => {
|
|
|
1646
1630
|
customViewLocatorCode: currentCustomViewLocatorCode
|
|
1647
1631
|
})
|
|
1648
1632
|
}), jsxRuntime.jsx(ContentWrapper$1, {
|
|
1649
|
-
css: /*#__PURE__*/react.css("background-color:", designTokens.
|
|
1633
|
+
css: /*#__PURE__*/react.css("background-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ),
|
|
1650
1634
|
children: props.children
|
|
1651
1635
|
})]
|
|
1652
1636
|
});
|
|
@@ -1665,7 +1649,7 @@ TabularMainPage.PageHeaderTitle = PageHeaderTitle;
|
|
|
1665
1649
|
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1666
1650
|
TabularMainPage.Intl = i18n.sharedMessages;
|
|
1667
1651
|
|
|
1668
|
-
var _ref$
|
|
1652
|
+
var _ref$3 = {
|
|
1669
1653
|
name: "zl1inp",
|
|
1670
1654
|
styles: "display:flex;justify-content:center"
|
|
1671
1655
|
} ;
|
|
@@ -1693,7 +1677,7 @@ const MaintenancePageLayout = props => jsxRuntime.jsx("div", {
|
|
|
1693
1677
|
}), jsxRuntime.jsx(Text__default["default"].Body, {
|
|
1694
1678
|
children: props.paragraph1
|
|
1695
1679
|
}), props.bodyContent && jsxRuntime.jsx("div", {
|
|
1696
|
-
css: _ref$
|
|
1680
|
+
css: _ref$3,
|
|
1697
1681
|
children: props.bodyContent
|
|
1698
1682
|
}), props.paragraph2 && jsxRuntime.jsx(Text__default["default"].Body, {
|
|
1699
1683
|
children: props.paragraph2
|
|
@@ -1704,7 +1688,7 @@ const MaintenancePageLayout = props => jsxRuntime.jsx("div", {
|
|
|
1704
1688
|
MaintenancePageLayout.propTypes = {};
|
|
1705
1689
|
MaintenancePageLayout.displayName = 'MaintenancePageLayout';
|
|
1706
1690
|
|
|
1707
|
-
var messages$
|
|
1691
|
+
var messages$2 = reactIntl.defineMessages({
|
|
1708
1692
|
title: {
|
|
1709
1693
|
id: 'PageNotFound.title',
|
|
1710
1694
|
defaultMessage: 'We could not find what you are looking for'
|
|
@@ -1715,8 +1699,8 @@ var messages$1 = reactIntl.defineMessages({
|
|
|
1715
1699
|
}
|
|
1716
1700
|
});
|
|
1717
1701
|
|
|
1718
|
-
function ownKeys$
|
|
1719
|
-
function _objectSpread$
|
|
1702
|
+
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; }
|
|
1703
|
+
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; }
|
|
1720
1704
|
const getLink = msg => jsxRuntime.jsx("a", {
|
|
1721
1705
|
href: constants.SUPPORT_PORTAL_URL,
|
|
1722
1706
|
target: "_blank",
|
|
@@ -1727,9 +1711,9 @@ const PageNotFound = () => {
|
|
|
1727
1711
|
const intl = reactIntl.useIntl();
|
|
1728
1712
|
return jsxRuntime.jsx(MaintenancePageLayout, {
|
|
1729
1713
|
imageSrc: PageNotFoundSVG__default["default"],
|
|
1730
|
-
title: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
1731
|
-
label: intl.formatMessage(messages$
|
|
1732
|
-
paragraph1: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
1714
|
+
title: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages$2.title)),
|
|
1715
|
+
label: intl.formatMessage(messages$2.title),
|
|
1716
|
+
paragraph1: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2(_objectSpread$2({}, messages$2.paragraph1), {}, {
|
|
1733
1717
|
values: {
|
|
1734
1718
|
a: getLink
|
|
1735
1719
|
}
|
|
@@ -1738,7 +1722,7 @@ const PageNotFound = () => {
|
|
|
1738
1722
|
};
|
|
1739
1723
|
PageNotFound.displayName = 'PageNotFound';
|
|
1740
1724
|
|
|
1741
|
-
var messages = reactIntl.defineMessages({
|
|
1725
|
+
var messages$1 = reactIntl.defineMessages({
|
|
1742
1726
|
title: {
|
|
1743
1727
|
id: 'PageUnauthorized.title',
|
|
1744
1728
|
defaultMessage: 'We could not find what you are looking for'
|
|
@@ -1753,8 +1737,8 @@ var messages = reactIntl.defineMessages({
|
|
|
1753
1737
|
}
|
|
1754
1738
|
});
|
|
1755
1739
|
|
|
1756
|
-
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1757
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1740
|
+
function ownKeys$1(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; }
|
|
1741
|
+
function _objectSpread$1(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$1(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$1(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1758
1742
|
const getSupportUrlLink = msg => jsxRuntime.jsx("a", {
|
|
1759
1743
|
href: constants.SUPPORT_PORTAL_URL,
|
|
1760
1744
|
target: "_blank",
|
|
@@ -1765,10 +1749,10 @@ const PageUnauthorized = () => {
|
|
|
1765
1749
|
const intl = reactIntl.useIntl();
|
|
1766
1750
|
return jsxRuntime.jsx(MaintenancePageLayout, {
|
|
1767
1751
|
imageSrc: FailedAuthorizationSVG__default["default"],
|
|
1768
|
-
title: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread({}, messages.title)),
|
|
1769
|
-
label: intl.formatMessage(messages.title),
|
|
1770
|
-
paragraph1: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread({}, messages.paragraph1)),
|
|
1771
|
-
paragraph2: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread(_objectSpread({}, messages.paragraph2), {}, {
|
|
1752
|
+
title: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages$1.title)),
|
|
1753
|
+
label: intl.formatMessage(messages$1.title),
|
|
1754
|
+
paragraph1: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages$1.paragraph1)),
|
|
1755
|
+
paragraph2: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1(_objectSpread$1({}, messages$1.paragraph2), {}, {
|
|
1772
1756
|
values: {
|
|
1773
1757
|
a: getSupportUrlLink
|
|
1774
1758
|
}
|
|
@@ -1867,13 +1851,13 @@ const defaultProps$1 = {
|
|
|
1867
1851
|
};
|
|
1868
1852
|
PageContentWide.defaultProps = defaultProps$1;
|
|
1869
1853
|
|
|
1870
|
-
var _ref$
|
|
1854
|
+
var _ref$2 = {
|
|
1871
1855
|
name: "1d3w5wq",
|
|
1872
1856
|
styles: "width:100%"
|
|
1873
1857
|
} ;
|
|
1874
1858
|
function PageContentFull(props) {
|
|
1875
1859
|
return jsxRuntime.jsx("div", {
|
|
1876
|
-
css: _ref$
|
|
1860
|
+
css: _ref$2,
|
|
1877
1861
|
children: jsxRuntime.jsx("section", {
|
|
1878
1862
|
children: props.children
|
|
1879
1863
|
})
|
|
@@ -1892,7 +1876,7 @@ const ContentWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
|
1892
1876
|
} )("flex:1;flex-basis:0;margin:", designTokens.marginForPageContent, ";overflow:auto;" + ("" ));
|
|
1893
1877
|
const HeaderWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1894
1878
|
target: "e18jo6y40"
|
|
1895
|
-
} )("padding:", designSystem.designTokens.spacing40, " 40px;border-bottom:1px solid ", designTokens.
|
|
1879
|
+
} )("padding:", designSystem.designTokens.spacing40, " 40px;border-bottom:1px solid ", designSystem.designTokens.colorNeutral90, ";" + ("" ));
|
|
1896
1880
|
function Drawer(props) {
|
|
1897
1881
|
const intl = reactIntl.useIntl();
|
|
1898
1882
|
return jsxRuntime.jsxs(ModalPage, {
|
|
@@ -1918,7 +1902,7 @@ function Drawer(props) {
|
|
|
1918
1902
|
children: props.subtitle
|
|
1919
1903
|
})
|
|
1920
1904
|
}), props.onClose && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
|
|
1921
|
-
label: intl.formatMessage(messages$
|
|
1905
|
+
label: intl.formatMessage(messages$5.close),
|
|
1922
1906
|
onClick: props.onClose,
|
|
1923
1907
|
icon: jsxRuntime.jsx(LargeIconWrapper, {
|
|
1924
1908
|
children: jsxRuntime.jsx(icons.CloseIcon, {})
|
|
@@ -1959,6 +1943,78 @@ Drawer.FormSecondaryButton = FormSecondaryButton;
|
|
|
1959
1943
|
// The Intl messages can be used for button labels.
|
|
1960
1944
|
Drawer.Intl = i18n.sharedMessages;
|
|
1961
1945
|
|
|
1946
|
+
var messages = reactIntl.defineMessages({
|
|
1947
|
+
ProjectProduction: {
|
|
1948
|
+
id: 'ProjectStamp.production',
|
|
1949
|
+
defaultMessage: 'Production'
|
|
1950
|
+
},
|
|
1951
|
+
ProjectSuspended: {
|
|
1952
|
+
id: 'ProjectStamp.suspended',
|
|
1953
|
+
defaultMessage: 'Suspended'
|
|
1954
|
+
},
|
|
1955
|
+
ProjectExpired: {
|
|
1956
|
+
id: 'ProjectStamp.expired',
|
|
1957
|
+
defaultMessage: 'Trial expired'
|
|
1958
|
+
},
|
|
1959
|
+
ProjectWillExpire: {
|
|
1960
|
+
id: 'ProjectStamp.willExpire',
|
|
1961
|
+
defaultMessage: '{daysLeft, select, 0 {Trial ends today} 1 {Trial ends in 1 day} other {Trial ends in {daysLeft} days}}'
|
|
1962
|
+
}
|
|
1963
|
+
});
|
|
1964
|
+
|
|
1965
|
+
const _excluded = ["values"];
|
|
1966
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1967
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1968
|
+
function CustomStamp(props) {
|
|
1969
|
+
const intl = reactIntl.useIntl();
|
|
1970
|
+
const _props$label = props.label,
|
|
1971
|
+
values = _valuesInstanceProperty__default["default"](_props$label),
|
|
1972
|
+
message = _objectWithoutProperties(_props$label, _excluded);
|
|
1973
|
+
return jsxRuntime.jsx(Stamp__default["default"], {
|
|
1974
|
+
tone: props.tone,
|
|
1975
|
+
isCondensed: true,
|
|
1976
|
+
label: intl.formatMessage(message, values || {}),
|
|
1977
|
+
icon: props.icon
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1980
|
+
CustomStamp.propTypes = {};
|
|
1981
|
+
var _ref$1 = {
|
|
1982
|
+
name: "ph6b5m",
|
|
1983
|
+
styles: "height:18px;svg{height:18px;width:12px;}"
|
|
1984
|
+
} ;
|
|
1985
|
+
const IsProduction = () => jsxRuntime.jsx(CustomStamp, {
|
|
1986
|
+
tone: "positive",
|
|
1987
|
+
label: messages.ProjectProduction,
|
|
1988
|
+
icon: jsxRuntime.jsx("div", {
|
|
1989
|
+
css: _ref$1,
|
|
1990
|
+
children: jsxRuntime.jsx(icons.DotIcon, {
|
|
1991
|
+
color: "primary"
|
|
1992
|
+
})
|
|
1993
|
+
})
|
|
1994
|
+
});
|
|
1995
|
+
const IsSuspended = () => jsxRuntime.jsx(CustomStamp, {
|
|
1996
|
+
tone: "critical",
|
|
1997
|
+
label: messages.ProjectSuspended
|
|
1998
|
+
});
|
|
1999
|
+
const IsExpired = () => jsxRuntime.jsx(CustomStamp, {
|
|
2000
|
+
tone: "critical",
|
|
2001
|
+
label: messages.ProjectExpired
|
|
2002
|
+
});
|
|
2003
|
+
const WillExpire = props => jsxRuntime.jsx(CustomStamp, {
|
|
2004
|
+
tone: "information",
|
|
2005
|
+
label: _objectSpread(_objectSpread({}, messages.ProjectWillExpire), {}, {
|
|
2006
|
+
values: {
|
|
2007
|
+
daysLeft: props.daysLeft
|
|
2008
|
+
}
|
|
2009
|
+
})
|
|
2010
|
+
});
|
|
2011
|
+
const ProjectStamp = {
|
|
2012
|
+
IsProduction,
|
|
2013
|
+
IsSuspended,
|
|
2014
|
+
IsExpired,
|
|
2015
|
+
WillExpire
|
|
2016
|
+
};
|
|
2017
|
+
|
|
1962
2018
|
const useObserverElementDimensions = element => {
|
|
1963
2019
|
const _useState = react$1.useState({
|
|
1964
2020
|
height: 0,
|
|
@@ -2095,6 +2151,7 @@ exports.PageContentWide = PageContentWide;
|
|
|
2095
2151
|
exports.PageNotFound = PageNotFound;
|
|
2096
2152
|
exports.PageUnauthorized = PageUnauthorized;
|
|
2097
2153
|
exports.PortalsContainer = PortalsContainer;
|
|
2154
|
+
exports.ProjectStamp = ProjectStamp;
|
|
2098
2155
|
exports.PublicPageLayout = PublicPageLayout;
|
|
2099
2156
|
exports.TabHeader = TabHeader;
|
|
2100
2157
|
exports.TabularDetailPage = TabularDetailPage;
|