@commercetools-frontend/application-components 22.2.0 → 22.3.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 +125 -286
- package/dist/commercetools-frontend-application-components.cjs.prod.js +117 -267
- package/dist/commercetools-frontend-application-components.esm.js +125 -286
- package/dist/declarations/src/components/detail-pages/custom-form-detail-page/custom-form-detail-page.d.ts +5 -5
- package/dist/declarations/src/components/detail-pages/form-detail-page/form-detail-page.d.ts +2 -2
- package/dist/declarations/src/components/detail-pages/info-detail-page/info-detail-page.d.ts +2 -2
- package/dist/declarations/src/components/detail-pages/tabular-detail-page/tabular-detail-page.d.ts +5 -5
- package/dist/declarations/src/components/dialogs/confirmation-dialog/confirmation-dialog.d.ts +1 -1
- package/dist/declarations/src/components/dialogs/form-dialog/form-dialog.d.ts +1 -1
- package/dist/declarations/src/components/dialogs/info-dialog/info-dialog.d.ts +1 -1
- package/dist/declarations/src/components/dialogs/internals/dialog-container.d.ts +1 -1
- package/dist/declarations/src/components/dialogs/internals/dialog-footer.d.ts +1 -1
- package/dist/declarations/src/components/dialogs/internals/dialog-header.d.ts +1 -1
- package/dist/declarations/src/components/dialogs/internals/dialog.styles.d.ts +3 -2
- package/dist/declarations/src/components/internals/default-form-buttons.d.ts +3 -3
- package/dist/declarations/src/components/internals/page-header-title.d.ts +1 -1
- package/dist/declarations/src/components/internals/page-header.d.ts +1 -1
- package/dist/declarations/src/components/internals/page-top-bar.d.ts +1 -1
- package/dist/declarations/src/components/internals/tabular-page.d.ts +2 -2
- package/dist/declarations/src/components/main-pages/custom-form-main-page/custom-form-main-page.d.ts +5 -5
- package/dist/declarations/src/components/main-pages/form-main-page/form-main-page.d.ts +2 -2
- package/dist/declarations/src/components/main-pages/info-main-page/info-main-page.d.ts +2 -2
- package/dist/declarations/src/components/main-pages/tabular-main-page/tabular-main-page.d.ts +5 -5
- package/dist/declarations/src/components/maintenance-page-layout/maintenance-page-layout.d.ts +1 -1
- package/dist/declarations/src/components/modal-pages/custom-form-modal-page/custom-form-modal-page.d.ts +4 -4
- package/dist/declarations/src/components/modal-pages/form-modal-page/form-modal-page.d.ts +1 -1
- package/dist/declarations/src/components/modal-pages/info-modal-page/info-modal-page.d.ts +1 -1
- package/dist/declarations/src/components/modal-pages/internals/modal-page-top-bar.d.ts +1 -1
- package/dist/declarations/src/components/modal-pages/internals/modal-page.d.ts +1 -1
- package/dist/declarations/src/components/modal-pages/internals/modal-page.styles.d.ts +7 -6
- package/dist/declarations/src/components/modal-pages/tabular-modal-page/tabular-modal-page.d.ts +4 -4
- package/dist/declarations/src/components/page-content-containers/page-content-full/page-content-full.d.ts +1 -1
- package/dist/declarations/src/components/page-content-containers/page-content-narrow/page-content-narrow.d.ts +1 -1
- package/dist/declarations/src/components/page-content-containers/page-content-wide/page-content-wide.d.ts +1 -1
- package/dist/declarations/src/components/page-not-found/page-not-found.d.ts +1 -1
- package/dist/declarations/src/components/page-unauthorized/page-unauthorized.d.ts +1 -1
- package/dist/declarations/src/components/tab-header/tab-header.d.ts +1 -1
- package/dist/{public-page-layout-c90a4de4.cjs.prod.js → public-page-layout-5d02cff6.cjs.prod.js} +3 -10
- package/dist/{public-page-layout-0956bc6c.cjs.dev.js → public-page-layout-697e0764.cjs.dev.js} +3 -10
- package/dist/{public-page-layout-857b0af3.esm.js → public-page-layout-8490a9a8.esm.js} +3 -10
- package/package.json +26 -12
|
@@ -75,11 +75,11 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
|
|
|
75
75
|
var useResizeObserver__default = /*#__PURE__*/_interopDefault(useResizeObserver);
|
|
76
76
|
|
|
77
77
|
// NOTE: This string will be replaced on build time with the package version.
|
|
78
|
-
var version = "22.
|
|
78
|
+
var version = "22.3.0";
|
|
79
79
|
|
|
80
80
|
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11, _context12;
|
|
81
|
-
const appKitSpacing55 = '40px';
|
|
82
|
-
|
|
81
|
+
const appKitSpacing55 = '40px';
|
|
82
|
+
// TODO: move to uikit?
|
|
83
83
|
const colorAccent10 = 'hsl(195, 35.2941176471%, 10%)';
|
|
84
84
|
const colorAccent20 = 'hsl(195, 35.2941176471%, 20%)';
|
|
85
85
|
const colorAccent90 = 'hsl(195, 35.2941176471%, 90%)';
|
|
@@ -187,35 +187,26 @@ const designTokens = designSystem.transformTokensToCssVarsReferences(themesOverr
|
|
|
187
187
|
});
|
|
188
188
|
|
|
189
189
|
const getBottomBorderStyles = background => /*#__PURE__*/react.css(":after{content:'';position:absolute;bottom:0;left:0;right:0;height:", designTokens.heightForTab, ";border-radius:", designSystem.designTokens.borderRadius2, ";background-color:", background, ";transition:background-color ", designSystem.designTokens.transitionEaseinout150Ms, ";}" + ("" ), "" );
|
|
190
|
-
|
|
191
190
|
var _ref$7 = {
|
|
192
191
|
name: "1u0tiat",
|
|
193
192
|
styles: "&[aria-disabled='true']{cursor:not-allowed;opacity:0.5;&:active{pointer-events:none;}}"
|
|
194
193
|
} ;
|
|
195
|
-
|
|
196
194
|
const getLinkStyles = (isActive, isDisabled) => [/*#__PURE__*/react.css("font-size:", designSystem.designTokens.fontSizeDefault, ";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:", designTokens.paddingLeftForTabAsFirst, ";}", getBottomBorderStyles('transparent'), ";" + ("" ), "" ), isActive && /*#__PURE__*/react.css(getBottomBorderStyles(designSystem.designTokens.colorPrimary), " & h4{color:", designSystem.designTokens.colorPrimary, "!important;}" + ("" ), "" ), isDisabled && _ref$7, !isActive && !isDisabled && /*#__PURE__*/react.css(":hover,:focus,:active{& h4{color:", designSystem.designTokens.colorPrimary, "!important;}}" + ("" ), "" )];
|
|
197
195
|
|
|
198
196
|
function ownKeys$6(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
199
|
-
|
|
200
197
|
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$6(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
201
|
-
|
|
202
198
|
const pathWithoutSearch = path => typeof path === 'string' ? path.split('?')[0] : path.pathname;
|
|
203
|
-
|
|
204
199
|
const warnIfMissingContent = props => {
|
|
205
200
|
Boolean(props.intlMessage) || Boolean(props.label);
|
|
206
201
|
};
|
|
207
|
-
|
|
208
202
|
const getDisabledLinkAtributes = isDisabled => isDisabled ? {
|
|
209
203
|
tabIndex: -1,
|
|
210
204
|
'aria-disabled': true
|
|
211
205
|
} : {};
|
|
212
|
-
|
|
213
206
|
const TabLabel = _ref => {
|
|
214
207
|
let children = _ref.children;
|
|
215
|
-
|
|
216
208
|
const _useTheme = designSystem.useTheme(),
|
|
217
|
-
|
|
218
|
-
|
|
209
|
+
theme = _useTheme.theme;
|
|
219
210
|
if (theme === 'default') {
|
|
220
211
|
return jsxRuntime.jsx(Text__default["default"].Subheadline, {
|
|
221
212
|
as: "h4",
|
|
@@ -223,14 +214,12 @@ const TabLabel = _ref => {
|
|
|
223
214
|
children: children
|
|
224
215
|
});
|
|
225
216
|
}
|
|
226
|
-
|
|
227
217
|
return jsxRuntime.jsx(Text__default["default"].Headline, {
|
|
228
218
|
as: "h3",
|
|
229
219
|
truncate: true,
|
|
230
220
|
children: children
|
|
231
221
|
});
|
|
232
222
|
};
|
|
233
|
-
|
|
234
223
|
const TabHeader = props => {
|
|
235
224
|
const intl = reactIntl.useIntl();
|
|
236
225
|
const location = reactRouterDom.useLocation();
|
|
@@ -242,11 +231,9 @@ const TabHeader = props => {
|
|
|
242
231
|
}));
|
|
243
232
|
const isDisabled = props.isDisabled;
|
|
244
233
|
let label = props.label;
|
|
245
|
-
|
|
246
234
|
if (props.intlMessage) {
|
|
247
235
|
label = intl.formatMessage(props.intlMessage);
|
|
248
236
|
}
|
|
249
|
-
|
|
250
237
|
warnIfMissingContent(props);
|
|
251
238
|
return jsxRuntime.jsx(reactRouterDom.Link, _objectSpread$6(_objectSpread$6({
|
|
252
239
|
role: "tab",
|
|
@@ -271,44 +258,34 @@ const getConstraintForGridStyle = size => {
|
|
|
271
258
|
switch (size) {
|
|
272
259
|
case 'm':
|
|
273
260
|
return designTokens.widthForDialogAsMedium;
|
|
274
|
-
|
|
275
261
|
case 7:
|
|
276
262
|
return designSystem.designTokens.constraint7;
|
|
277
|
-
|
|
278
263
|
case 8:
|
|
279
264
|
return designSystem.designTokens.constraint8;
|
|
280
|
-
|
|
281
265
|
case 9:
|
|
282
266
|
return designSystem.designTokens.constraint9;
|
|
283
|
-
|
|
284
267
|
case 10:
|
|
285
268
|
return designSystem.designTokens.constraint10;
|
|
286
|
-
|
|
287
269
|
case 11:
|
|
288
270
|
return designSystem.designTokens.constraint11;
|
|
289
|
-
|
|
290
271
|
case 12:
|
|
291
272
|
return designSystem.designTokens.constraint12;
|
|
292
|
-
|
|
293
273
|
case 13:
|
|
294
274
|
return designSystem.designTokens.constraint13;
|
|
295
|
-
|
|
296
275
|
case 'l':
|
|
297
276
|
return designTokens.widthForDialogAsLarge;
|
|
298
|
-
|
|
299
277
|
case 'scale':
|
|
300
278
|
return designSystem.designTokens.constraintScale;
|
|
301
|
-
|
|
302
279
|
default:
|
|
303
280
|
return designSystem.designTokens.constraintScale;
|
|
304
281
|
}
|
|
305
282
|
};
|
|
306
|
-
|
|
307
283
|
const getModalContentStyles = props => {
|
|
308
284
|
const sizeConstraint = getConstraintForGridStyle(props.size);
|
|
309
|
-
const gridStyle = props.size === 'scale' ? /*#__PURE__*/react.css("grid:[row1-start] 'top top top' minmax(\n ", designSystem.designTokens.spacingXl, ",\n 1fr\n ) [row1-end] [row2-start] 'left main right' minmax(0, 100%) [row2-end] [row3-start] 'bottom bottom bottom' minmax(\n ", designSystem.designTokens.spacingXl, ",\n 1fr\n ) [row3-end]/", designSystem.designTokens.spacingXl, " 1fr ", designSystem.designTokens.spacingXl, ";" + ("" ), "" ) : /*#__PURE__*/react.css("grid:[row1-start] 'top top top' minmax(\n ", designSystem.designTokens.spacingXl, ",\n 1fr\n ) [row1-end] [row2-start] 'left main right' minmax(0, 100%) [row2-end] [row3-start] 'bottom bottom bottom' minmax(\n ", designSystem.designTokens.spacingXl, ",\n 1fr\n ) [row3-end]/minmax(", designSystem.designTokens.spacingXl, ", 1fr) ", sizeConstraint, " minmax(", designSystem.designTokens.spacingXl, ", 1fr);" + ("" ), "" );
|
|
310
|
-
// and triggers the modal to close, we need to turn off the pointer events.
|
|
285
|
+
const gridStyle = props.size === 'scale' ? /*#__PURE__*/react.css("grid:[row1-start] 'top top top' minmax(\n ", designSystem.designTokens.spacingXl, ",\n 1fr\n ) [row1-end] [row2-start] 'left main right' minmax(0, 100%) [row2-end] [row3-start] 'bottom bottom bottom' minmax(\n ", designSystem.designTokens.spacingXl, ",\n 1fr\n ) [row3-end]/", designSystem.designTokens.spacingXl, " 1fr ", designSystem.designTokens.spacingXl, ";" + ("" ), "" ) : /*#__PURE__*/react.css("grid:[row1-start] 'top top top' minmax(\n ", designSystem.designTokens.spacingXl, ",\n 1fr\n ) [row1-end] [row2-start] 'left main right' minmax(0, 100%) [row2-end] [row3-start] 'bottom bottom bottom' minmax(\n ", designSystem.designTokens.spacingXl, ",\n 1fr\n ) [row3-end]/minmax(", designSystem.designTokens.spacingXl, ", 1fr) ", sizeConstraint, " minmax(", designSystem.designTokens.spacingXl, ", 1fr);" + ("" ), "" );
|
|
311
286
|
|
|
287
|
+
// To ensure that the mouse click on the overlay surface goes "through"
|
|
288
|
+
// and triggers the modal to close, we need to turn off the pointer events.
|
|
312
289
|
const baseStyles = /*#__PURE__*/react.css("display:grid;height:100%;width:100%;outline:none;pointer-events:none;", gridStyle, ";" + ("" ), "" );
|
|
313
290
|
return baseStyles;
|
|
314
291
|
};
|
|
@@ -316,18 +293,15 @@ const getOverlayStyles$1 = props => /*#__PURE__*/react.css("display:flex;positio
|
|
|
316
293
|
"".concat(props.zIndex, " !important") : 'auto', ";top:0;width:100%;height:100%;background-color:rgba(32, 62, 72, 0.5);opacity:1;" + ("" ), "" );
|
|
317
294
|
|
|
318
295
|
function ownKeys$5(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
319
|
-
|
|
320
296
|
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$5(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
321
|
-
|
|
322
297
|
const getDefaultParentSelector$1 = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
|
|
323
|
-
|
|
324
|
-
|
|
298
|
+
const getOverlayElement$1 = (props, contentElement) =>
|
|
299
|
+
// Assign the `data-role` to the overlay container, which is used as
|
|
325
300
|
// the CSS selector in the `<PortalsContainer>`.
|
|
326
301
|
jsxRuntime.jsx("div", _objectSpread$5(_objectSpread$5({}, props), {}, {
|
|
327
302
|
"data-role": "dialog-overlay",
|
|
328
303
|
children: contentElement
|
|
329
304
|
}));
|
|
330
|
-
|
|
331
305
|
const defaultProps$h = {
|
|
332
306
|
// TODO: t-shirt sizes are deprecated but we need to keep using them for
|
|
333
307
|
// backwards compatibility and to help with styling migration
|
|
@@ -336,31 +310,25 @@ const defaultProps$h = {
|
|
|
336
310
|
size: 'l',
|
|
337
311
|
getParentSelector: getDefaultParentSelector$1
|
|
338
312
|
};
|
|
339
|
-
|
|
340
313
|
const GridArea = /*#__PURE__*/_styled__default["default"]("div", {
|
|
341
314
|
target: "elx55gk0"
|
|
342
315
|
} )("grid-area:", props => props.name, ";" + ("" ));
|
|
343
|
-
|
|
344
316
|
var _ref3$1 = {
|
|
345
317
|
name: "13udsys",
|
|
346
318
|
styles: "height:100%"
|
|
347
319
|
} ;
|
|
348
|
-
|
|
349
320
|
const sizeStyles = props => {
|
|
350
321
|
if (props.size === 'scale') return _ref3$1;
|
|
351
322
|
return /*#__PURE__*/react.css("" , "" );
|
|
352
323
|
};
|
|
353
|
-
|
|
354
324
|
var _ref$6 = {
|
|
355
325
|
name: "1daj17f",
|
|
356
326
|
styles: "display:flex;flex-direction:column;align-items:stretch;height:100%;min-height:0"
|
|
357
327
|
} ;
|
|
358
|
-
|
|
359
328
|
var _ref2$3 = {
|
|
360
329
|
name: "1187q51",
|
|
361
330
|
styles: "display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;overflow:hidden"
|
|
362
331
|
} ;
|
|
363
|
-
|
|
364
332
|
const DialogContainer = props => jsxRuntime.jsx(react.ClassNames, {
|
|
365
333
|
children: _ref4 => {
|
|
366
334
|
let makeClassName = _ref4.css;
|
|
@@ -386,7 +354,8 @@ const DialogContainer = props => jsxRuntime.jsx(react.ClassNames, {
|
|
|
386
354
|
}), jsxRuntime.jsx(GridArea, {
|
|
387
355
|
name: "main",
|
|
388
356
|
css: _ref2$3,
|
|
389
|
-
children: jsxRuntime.jsx(Card__default["default"]
|
|
357
|
+
children: jsxRuntime.jsx(Card__default["default"]
|
|
358
|
+
// 1. For the min-height: https://stackoverflow.com/questions/28636832/firefox-overflow-y-not-working-with-nested-flexbox/28639686#28639686
|
|
390
359
|
// 2. For the scale size, we want the card to stretch to 100% height
|
|
391
360
|
// 3. 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.
|
|
392
361
|
, {
|
|
@@ -400,19 +369,18 @@ const DialogContainer = props => jsxRuntime.jsx(react.ClassNames, {
|
|
|
400
369
|
});
|
|
401
370
|
}
|
|
402
371
|
});
|
|
403
|
-
|
|
404
372
|
DialogContainer.propTypes = {};
|
|
405
373
|
DialogContainer.displayName = 'DialogContainer';
|
|
406
374
|
DialogContainer.defaultProps = defaultProps$h;
|
|
407
375
|
|
|
376
|
+
// The overflow should be "auto", to make the container scrollable
|
|
408
377
|
const DialogContent = /*#__PURE__*/_styled__default["default"]("div", {
|
|
409
378
|
target: "eo6zkz80"
|
|
410
379
|
} )("border-top:1px solid ", designTokens.borderColorForDialogDivider, ";padding:", designTokens.paddingForDialogContent, ";flex:1;overflow:auto;" + ("" ));
|
|
411
380
|
|
|
412
381
|
const Title$1 = props => {
|
|
413
382
|
const _useTheme = designSystem.useTheme(),
|
|
414
|
-
|
|
415
|
-
|
|
383
|
+
theme = _useTheme.theme;
|
|
416
384
|
if (theme === 'default') {
|
|
417
385
|
return jsxRuntime.jsx(Text__default["default"].Subheadline, {
|
|
418
386
|
as: "h4",
|
|
@@ -421,7 +389,6 @@ const Title$1 = props => {
|
|
|
421
389
|
children: props.title
|
|
422
390
|
});
|
|
423
391
|
}
|
|
424
|
-
|
|
425
392
|
return jsxRuntime.jsx(Text__default["default"].Headline, {
|
|
426
393
|
as: "h3",
|
|
427
394
|
title: props.title,
|
|
@@ -429,7 +396,6 @@ const Title$1 = props => {
|
|
|
429
396
|
children: props.title
|
|
430
397
|
});
|
|
431
398
|
};
|
|
432
|
-
|
|
433
399
|
const DialogHeader = props => jsxRuntime.jsx("div", {
|
|
434
400
|
css: /*#__PURE__*/react.css("flex:0 1 auto;display:flex;flex-direction:column;margin-bottom:", designSystem.designTokens.spacing30, ";" + ("" ), "" ),
|
|
435
401
|
children: jsxRuntime.jsxs(Spacings__default["default"].Inline, {
|
|
@@ -446,7 +412,6 @@ const DialogHeader = props => jsxRuntime.jsx("div", {
|
|
|
446
412
|
})]
|
|
447
413
|
})
|
|
448
414
|
});
|
|
449
|
-
|
|
450
415
|
DialogHeader.propTypes = {};
|
|
451
416
|
DialogHeader.displayName = 'DialogHeader';
|
|
452
417
|
|
|
@@ -464,7 +429,6 @@ const InfoDialog = props => jsxRuntime.jsxs(DialogContainer, {
|
|
|
464
429
|
children: props.children
|
|
465
430
|
})]
|
|
466
431
|
});
|
|
467
|
-
|
|
468
432
|
InfoDialog.propTypes = {};
|
|
469
433
|
InfoDialog.displayName = 'InfoDialog';
|
|
470
434
|
|
|
@@ -473,16 +437,13 @@ function filterDataAttributes(obj) {
|
|
|
473
437
|
}
|
|
474
438
|
|
|
475
439
|
function ownKeys$4(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
476
|
-
|
|
477
440
|
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
478
441
|
const defaultProps$g = {
|
|
479
442
|
isPrimaryButtonDisabled: false,
|
|
480
443
|
dataAttributesPrimaryButton: {},
|
|
481
444
|
dataAttributesSecondaryButton: {}
|
|
482
445
|
};
|
|
483
|
-
|
|
484
446
|
const getFormattedLabel = (label, intl) => typeof label === 'string' ? label : intl.formatMessage(label);
|
|
485
|
-
|
|
486
447
|
const DialogFooter = props => {
|
|
487
448
|
const intl = reactIntl.useIntl();
|
|
488
449
|
return jsxRuntime.jsx("div", {
|
|
@@ -503,7 +464,6 @@ const DialogFooter = props => {
|
|
|
503
464
|
})
|
|
504
465
|
});
|
|
505
466
|
};
|
|
506
|
-
|
|
507
467
|
DialogFooter.propTypes = {};
|
|
508
468
|
DialogFooter.displayName = 'DialogFooter';
|
|
509
469
|
DialogFooter.defaultProps = defaultProps$g;
|
|
@@ -512,7 +472,6 @@ const defaultProps$f = {
|
|
|
512
472
|
labelSecondary: i18n.sharedMessages.cancel,
|
|
513
473
|
labelPrimary: i18n.sharedMessages.confirm
|
|
514
474
|
};
|
|
515
|
-
|
|
516
475
|
const ConfirmationDialog = props => jsxRuntime.jsxs(DialogContainer, {
|
|
517
476
|
isOpen: props.isOpen,
|
|
518
477
|
onClose: props.onClose,
|
|
@@ -535,19 +494,17 @@ const ConfirmationDialog = props => jsxRuntime.jsxs(DialogContainer, {
|
|
|
535
494
|
dataAttributesPrimaryButton: props.dataAttributesPrimaryButton
|
|
536
495
|
})]
|
|
537
496
|
});
|
|
538
|
-
|
|
539
497
|
ConfirmationDialog.propTypes = {};
|
|
540
498
|
ConfirmationDialog.displayName = 'ConfirmationDialog';
|
|
541
|
-
ConfirmationDialog.defaultProps = defaultProps$f;
|
|
499
|
+
ConfirmationDialog.defaultProps = defaultProps$f;
|
|
500
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
542
501
|
// The Intl messages can be used for button labels.
|
|
543
|
-
|
|
544
502
|
ConfirmationDialog.Intl = i18n.sharedMessages;
|
|
545
503
|
|
|
546
504
|
const defaultProps$e = {
|
|
547
505
|
labelSecondary: i18n.sharedMessages.cancel,
|
|
548
506
|
labelPrimary: i18n.sharedMessages.save
|
|
549
507
|
};
|
|
550
|
-
|
|
551
508
|
const FormDialog = props => jsxRuntime.jsxs(DialogContainer, {
|
|
552
509
|
isOpen: props.isOpen,
|
|
553
510
|
onClose: props.onClose,
|
|
@@ -571,27 +528,23 @@ const FormDialog = props => jsxRuntime.jsxs(DialogContainer, {
|
|
|
571
528
|
iconLeftSecondaryButton: props.iconLeftSecondaryButton
|
|
572
529
|
})]
|
|
573
530
|
});
|
|
574
|
-
|
|
575
531
|
FormDialog.propTypes = {};
|
|
576
532
|
FormDialog.displayName = 'FormDialog';
|
|
577
|
-
FormDialog.defaultProps = defaultProps$e;
|
|
533
|
+
FormDialog.defaultProps = defaultProps$e;
|
|
534
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
578
535
|
// The Intl messages can be used for button labels.
|
|
579
|
-
|
|
580
536
|
FormDialog.Intl = i18n.sharedMessages;
|
|
581
537
|
|
|
582
538
|
const defaultProps$d = {
|
|
583
539
|
titleSize: 'small',
|
|
584
540
|
truncate: false
|
|
585
541
|
};
|
|
586
|
-
|
|
587
542
|
const SubtitleWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
588
543
|
target: "epaiodd0"
|
|
589
544
|
} )("margin-top:", designTokens.marginTopForPageSubtitle, ";" + ("" ));
|
|
590
|
-
|
|
591
545
|
const Title = props => {
|
|
592
546
|
const _useTheme = designSystem.useTheme(),
|
|
593
|
-
|
|
594
|
-
|
|
547
|
+
themedValue = _useTheme.themedValue;
|
|
595
548
|
switch (props.titleSize) {
|
|
596
549
|
case 'big':
|
|
597
550
|
return jsxRuntime.jsx(Text__default["default"].Headline, {
|
|
@@ -600,7 +553,6 @@ const Title = props => {
|
|
|
600
553
|
truncate: props.truncate,
|
|
601
554
|
children: props.title
|
|
602
555
|
});
|
|
603
|
-
|
|
604
556
|
default:
|
|
605
557
|
return jsxRuntime.jsx(Text__default["default"].Subheadline, {
|
|
606
558
|
as: "h4",
|
|
@@ -610,21 +562,17 @@ const Title = props => {
|
|
|
610
562
|
});
|
|
611
563
|
}
|
|
612
564
|
};
|
|
613
|
-
|
|
614
565
|
const Subtitle = props => {
|
|
615
566
|
const _useTheme2 = designSystem.useTheme(),
|
|
616
|
-
|
|
617
|
-
|
|
567
|
+
themedValue = _useTheme2.themedValue;
|
|
618
568
|
if (!props.subtitle) {
|
|
619
569
|
return null;
|
|
620
570
|
}
|
|
621
|
-
|
|
622
571
|
if ( /*#__PURE__*/react$1.isValidElement(props.subtitle)) {
|
|
623
572
|
return jsxRuntime.jsx(SubtitleWrapper, {
|
|
624
573
|
children: props.subtitle
|
|
625
574
|
});
|
|
626
575
|
}
|
|
627
|
-
|
|
628
576
|
return jsxRuntime.jsx(SubtitleWrapper, {
|
|
629
577
|
children: jsxRuntime.jsx(Text__default["default"].Body, {
|
|
630
578
|
title: typeof props.subtitle === 'string' ? props.subtitle : undefined,
|
|
@@ -634,17 +582,14 @@ const Subtitle = props => {
|
|
|
634
582
|
})
|
|
635
583
|
});
|
|
636
584
|
};
|
|
637
|
-
|
|
638
585
|
Subtitle.propTypes = {};
|
|
639
586
|
Subtitle.defaultProps = {
|
|
640
587
|
truncate: false
|
|
641
588
|
};
|
|
642
|
-
|
|
643
589
|
var _ref$5 = {
|
|
644
590
|
name: "d3v9zr",
|
|
645
591
|
styles: "overflow:hidden"
|
|
646
592
|
} ;
|
|
647
|
-
|
|
648
593
|
const PageHeaderTitle = props => jsxRuntime.jsxs("div", {
|
|
649
594
|
css: _ref$5,
|
|
650
595
|
children: [jsxRuntime.jsx(Title, {
|
|
@@ -656,15 +601,13 @@ const PageHeaderTitle = props => jsxRuntime.jsxs("div", {
|
|
|
656
601
|
truncate: props.truncate
|
|
657
602
|
})]
|
|
658
603
|
});
|
|
659
|
-
|
|
660
604
|
PageHeaderTitle.propTypes = {};
|
|
661
605
|
PageHeaderTitle.displayName = 'PageHeaderTitle';
|
|
662
606
|
PageHeaderTitle.defaultProps = defaultProps$d;
|
|
663
607
|
|
|
664
608
|
const PageHeader = props => {
|
|
665
609
|
const _useTheme = designSystem.useTheme(),
|
|
666
|
-
|
|
667
|
-
|
|
610
|
+
themedValue = _useTheme.themedValue;
|
|
668
611
|
return jsxRuntime.jsxs("div", {
|
|
669
612
|
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, ";}" + ("" ), "" ),
|
|
670
613
|
children: [jsxRuntime.jsx(PageHeaderTitle, {
|
|
@@ -675,7 +618,6 @@ const PageHeader = props => {
|
|
|
675
618
|
}), props.children]
|
|
676
619
|
});
|
|
677
620
|
};
|
|
678
|
-
|
|
679
621
|
PageHeader.propTypes = {};
|
|
680
622
|
PageHeader.displayName = 'PageHeader';
|
|
681
623
|
|
|
@@ -700,39 +642,34 @@ const messages$2 = reactIntl.defineMessages({
|
|
|
700
642
|
}
|
|
701
643
|
});
|
|
702
644
|
|
|
645
|
+
// Component to have a larger clickable surface
|
|
703
646
|
var _ref2$2 = {
|
|
704
647
|
name: "1rxhroq",
|
|
705
648
|
styles: "display:flex;align-items:center;justify-content:center;&::after{content:'';position:absolute;height:35px;width:48px;top:0;right:0;}"
|
|
706
649
|
} ;
|
|
707
|
-
|
|
708
|
-
// Component to have a larger clickable surface
|
|
709
650
|
const LargeIconWrapper = props => jsxRuntime.jsx("span", {
|
|
710
651
|
css: _ref2$2,
|
|
711
652
|
children: /*#__PURE__*/react$1.cloneElement(props.children, {
|
|
712
653
|
size: props.size
|
|
713
654
|
})
|
|
714
|
-
});
|
|
655
|
+
});
|
|
656
|
+
|
|
657
|
+
// NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
|
|
715
658
|
// However, we need to explicitly define this otherwise the prop-types babel plugin
|
|
716
659
|
// does not recognize the object shape.
|
|
717
|
-
|
|
718
|
-
|
|
719
660
|
LargeIconWrapper.propTypes = {};
|
|
720
661
|
const defaultProps$c = {
|
|
721
662
|
color: 'surface',
|
|
722
663
|
previousPathLabel: messages$2.back
|
|
723
664
|
};
|
|
724
|
-
|
|
725
665
|
var _ref$4 = {
|
|
726
666
|
name: "uvw8rn",
|
|
727
667
|
styles: "display:flex;overflow:hidden;button:first-of-type svg{height:12px!important;width:12px!important;}"
|
|
728
668
|
} ;
|
|
729
|
-
|
|
730
669
|
const ModalPageTopBar = props => {
|
|
731
670
|
const intl = reactIntl.useIntl();
|
|
732
|
-
|
|
733
671
|
const _useTheme = designSystem.useTheme(),
|
|
734
|
-
|
|
735
|
-
|
|
672
|
+
themedValue = _useTheme.themedValue;
|
|
736
673
|
return jsxRuntime.jsxs("div", {
|
|
737
674
|
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;}" + ("" ), "" ),
|
|
738
675
|
children: [jsxRuntime.jsxs("div", {
|
|
@@ -766,7 +703,6 @@ const ModalPageTopBar = props => {
|
|
|
766
703
|
})]
|
|
767
704
|
});
|
|
768
705
|
};
|
|
769
|
-
|
|
770
706
|
ModalPageTopBar.propTypes = {};
|
|
771
707
|
ModalPageTopBar.displayName = 'ModalPageTopBar';
|
|
772
708
|
ModalPageTopBar.defaultProps = defaultProps$c;
|
|
@@ -775,62 +711,50 @@ const TRANSITION_DURATION = 200;
|
|
|
775
711
|
const getContainerStyles = _props => /*#__PURE__*/react.css("position:absolute;top:0;right:0;height:100%;width:100%;display:flex;flex-direction:column;background-color:", designSystem.customProperties.colorSurface, ";box-shadow:", designSystem.customProperties.shadow4, ",", designSystem.customProperties.shadow6, ";outline:0;transform:translate3d(30px, 0, 0);transition:transform ", TRANSITION_DURATION, "ms ease;" + ("" ), "" );
|
|
776
712
|
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.
|
|
777
713
|
"".concat(props.zIndex, " !important") : 'auto', ";top:0;left:0;width:100%;height:100%;background-color:rgba(32, 62, 72, 0.5);opacity:0;transition:opacity ", TRANSITION_DURATION, "ms ease;" + ("" ), "" );
|
|
778
|
-
|
|
779
714
|
var _ref4 = {
|
|
780
715
|
name: "1ffv7m4",
|
|
781
716
|
styles: "transform:translate3d(0, 0, 0)!important"
|
|
782
717
|
} ;
|
|
783
|
-
|
|
784
718
|
const getAfterOpenContainerAnimation = () => _ref4;
|
|
785
|
-
|
|
786
719
|
var _ref3 = {
|
|
787
720
|
name: "1d9ftqx",
|
|
788
721
|
styles: "opacity:1!important"
|
|
789
722
|
} ;
|
|
790
|
-
|
|
791
723
|
const getAfterOpenOverlayAnimation = () => _ref3;
|
|
792
|
-
|
|
793
724
|
var _ref2$1 = {
|
|
794
725
|
name: "110wxen",
|
|
795
726
|
styles: "transform:translate3d(30px, 0, 0)!important"
|
|
796
727
|
} ;
|
|
797
|
-
|
|
798
728
|
const getBeforeCloseContainerAnimation = () => _ref2$1;
|
|
799
|
-
|
|
800
729
|
var _ref$3 = {
|
|
801
730
|
name: "728dx5",
|
|
802
731
|
styles: "opacity:0!important"
|
|
803
732
|
} ;
|
|
804
|
-
|
|
805
733
|
const getBeforeCloseOverlayAnimation = () => _ref$3;
|
|
806
734
|
|
|
807
735
|
function ownKeys$3(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
808
|
-
|
|
809
736
|
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
810
|
-
|
|
811
737
|
const getDefaultParentSelector = () => document.querySelector("#".concat(constants.PORTALS_CONTAINER_ID));
|
|
812
|
-
|
|
813
|
-
|
|
738
|
+
const getOverlayElement = (props, contentElement) =>
|
|
739
|
+
// Assign the `data-role` to the overlay container, which is used as
|
|
814
740
|
// the CSS selector in the `<PortalsContainer>`.
|
|
815
741
|
jsxRuntime.jsx("div", _objectSpread$3(_objectSpread$3({}, props), {}, {
|
|
816
742
|
"data-role": "modal-overlay",
|
|
817
743
|
children: contentElement
|
|
818
|
-
}));
|
|
744
|
+
}));
|
|
745
|
+
|
|
746
|
+
// NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
|
|
819
747
|
// However, we need to explicitly define this otherwise the prop-types babel plugin
|
|
820
748
|
// does not recognize the object shape.
|
|
821
|
-
|
|
822
|
-
|
|
823
749
|
const defaultProps$b = {
|
|
824
750
|
getParentSelector: getDefaultParentSelector,
|
|
825
751
|
shouldDelayOnClose: true
|
|
826
752
|
};
|
|
827
|
-
|
|
828
753
|
const ModalPage = props => {
|
|
829
754
|
const _useState = react$1.useState(false),
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
755
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
756
|
+
forceClose = _useState2[0],
|
|
757
|
+
setForceClose = _useState2[1];
|
|
834
758
|
const closingTimer = react$1.useRef();
|
|
835
759
|
react$1.useEffect(() => {
|
|
836
760
|
if (props.isOpen === true) setForceClose(false);
|
|
@@ -852,13 +776,11 @@ const ModalPage = props => {
|
|
|
852
776
|
}, TRANSITION_DURATION);
|
|
853
777
|
return;
|
|
854
778
|
}
|
|
855
|
-
|
|
856
779
|
onClose && onClose(event);
|
|
857
780
|
}, [onClose, props.shouldDelayOnClose]);
|
|
858
781
|
return jsxRuntime.jsx(react.ClassNames, {
|
|
859
782
|
children: _ref => {
|
|
860
783
|
var _props$afterOpenStyle;
|
|
861
|
-
|
|
862
784
|
let makeClassName = _ref.css;
|
|
863
785
|
return jsxRuntime.jsxs(Modal__default["default"], {
|
|
864
786
|
isOpen: forceClose === true ? false : props.isOpen,
|
|
@@ -878,7 +800,8 @@ const ModalPage = props => {
|
|
|
878
800
|
},
|
|
879
801
|
contentLabel: props.title,
|
|
880
802
|
parentSelector: props.getParentSelector,
|
|
881
|
-
ariaHideApp: false
|
|
803
|
+
ariaHideApp: false
|
|
804
|
+
// Adjust this value if the (beforeClose) animation duration is changed
|
|
882
805
|
,
|
|
883
806
|
closeTimeoutMS: TRANSITION_DURATION,
|
|
884
807
|
style: {
|
|
@@ -897,7 +820,6 @@ const ModalPage = props => {
|
|
|
897
820
|
}
|
|
898
821
|
});
|
|
899
822
|
};
|
|
900
|
-
|
|
901
823
|
ModalPage.propTypes = {};
|
|
902
824
|
ModalPage.displayName = 'ModalPage';
|
|
903
825
|
ModalPage.defaultProps = defaultProps$b;
|
|
@@ -919,24 +841,20 @@ const InfoModalPage = props => jsxRuntime.jsxs(ModalPage, {
|
|
|
919
841
|
children: props.children
|
|
920
842
|
})]
|
|
921
843
|
});
|
|
922
|
-
|
|
923
844
|
InfoModalPage.propTypes = {};
|
|
924
845
|
InfoModalPage.displayName = 'InfoModalPage';
|
|
925
846
|
|
|
926
847
|
function ownKeys$2(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
927
|
-
|
|
928
848
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
929
849
|
const primaryDefaultProps = {
|
|
930
850
|
label: i18n.sharedMessages.confirm,
|
|
931
851
|
isDisabled: false,
|
|
932
852
|
dataAttributes: {}
|
|
933
853
|
};
|
|
934
|
-
|
|
935
854
|
const useFormattedLabel = label => {
|
|
936
855
|
const intl = reactIntl.useIntl();
|
|
937
856
|
return typeof label === 'string' ? label : intl.formatMessage(label);
|
|
938
857
|
};
|
|
939
|
-
|
|
940
858
|
const FormPrimaryButton = props => {
|
|
941
859
|
const label = useFormattedLabel(props.label);
|
|
942
860
|
return jsxRuntime.jsx(PrimaryButton__default["default"], _objectSpread$2({
|
|
@@ -945,7 +863,6 @@ const FormPrimaryButton = props => {
|
|
|
945
863
|
isDisabled: props.isDisabled
|
|
946
864
|
}, filterDataAttributes(props.dataAttributes)));
|
|
947
865
|
};
|
|
948
|
-
|
|
949
866
|
FormPrimaryButton.propTypes = {};
|
|
950
867
|
FormPrimaryButton.displayName = 'FormPrimaryButton';
|
|
951
868
|
FormPrimaryButton.defaultProps = primaryDefaultProps;
|
|
@@ -954,7 +871,6 @@ const secondaryDefaultProps = {
|
|
|
954
871
|
isDisabled: false,
|
|
955
872
|
dataAttributes: {}
|
|
956
873
|
};
|
|
957
|
-
|
|
958
874
|
const FormSecondaryButton = props => {
|
|
959
875
|
const label = useFormattedLabel(props.label);
|
|
960
876
|
return jsxRuntime.jsx(SecondaryButton__default["default"], _objectSpread$2({
|
|
@@ -964,7 +880,6 @@ const FormSecondaryButton = props => {
|
|
|
964
880
|
iconLeft: props.iconLeft
|
|
965
881
|
}, filterDataAttributes(props.dataAttributes)));
|
|
966
882
|
};
|
|
967
|
-
|
|
968
883
|
FormSecondaryButton.propTypes = {};
|
|
969
884
|
FormSecondaryButton.displayName = 'FormSecondaryButton';
|
|
970
885
|
FormSecondaryButton.defaultProps = secondaryDefaultProps;
|
|
@@ -973,7 +888,6 @@ const deleteDefaultProps = {
|
|
|
973
888
|
isDisabled: false,
|
|
974
889
|
dataAttributes: {}
|
|
975
890
|
};
|
|
976
|
-
|
|
977
891
|
const FormDeleteButton = props => {
|
|
978
892
|
const label = useFormattedLabel(props.label);
|
|
979
893
|
return jsxRuntime.jsx(IconButton__default["default"], _objectSpread$2({
|
|
@@ -983,7 +897,6 @@ const FormDeleteButton = props => {
|
|
|
983
897
|
isDisabled: props.isDisabled
|
|
984
898
|
}, filterDataAttributes(props.dataAttributes)));
|
|
985
899
|
};
|
|
986
|
-
|
|
987
900
|
FormDeleteButton.propTypes = {};
|
|
988
901
|
FormDeleteButton.displayName = 'FormDeleteButton';
|
|
989
902
|
FormDeleteButton.defaultProps = deleteDefaultProps;
|
|
@@ -1009,22 +922,20 @@ const CustomFormModalPage = props => jsxRuntime.jsxs(ModalPage, {
|
|
|
1009
922
|
children: props.children
|
|
1010
923
|
})]
|
|
1011
924
|
});
|
|
1012
|
-
|
|
1013
925
|
CustomFormModalPage.propTypes = {};
|
|
1014
|
-
CustomFormModalPage.displayName = 'CustomFormModalPage';
|
|
926
|
+
CustomFormModalPage.displayName = 'CustomFormModalPage';
|
|
927
|
+
// Static export of pre-configured form control buttons to easily re-use
|
|
1015
928
|
// them in the custom controls.
|
|
1016
|
-
|
|
1017
929
|
CustomFormModalPage.FormPrimaryButton = FormPrimaryButton;
|
|
1018
930
|
CustomFormModalPage.FormSecondaryButton = FormSecondaryButton;
|
|
1019
|
-
CustomFormModalPage.FormDeleteButton = FormDeleteButton;
|
|
931
|
+
CustomFormModalPage.FormDeleteButton = FormDeleteButton;
|
|
932
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1020
933
|
// The Intl messages can be used for button labels.
|
|
1021
|
-
|
|
1022
934
|
CustomFormModalPage.Intl = i18n.sharedMessages;
|
|
1023
935
|
|
|
1024
936
|
const defaultProps$a = {
|
|
1025
937
|
hideControls: false
|
|
1026
938
|
};
|
|
1027
|
-
|
|
1028
939
|
const FormModalPage = props => jsxRuntime.jsx(CustomFormModalPage, {
|
|
1029
940
|
title: props.title,
|
|
1030
941
|
subtitle: props.subtitle,
|
|
@@ -1053,18 +964,16 @@ const FormModalPage = props => jsxRuntime.jsx(CustomFormModalPage, {
|
|
|
1053
964
|
}),
|
|
1054
965
|
children: props.children
|
|
1055
966
|
});
|
|
1056
|
-
|
|
1057
967
|
FormModalPage.propTypes = {};
|
|
1058
968
|
FormModalPage.displayName = 'FormModalPage';
|
|
1059
|
-
FormModalPage.defaultProps = defaultProps$a;
|
|
969
|
+
FormModalPage.defaultProps = defaultProps$a;
|
|
970
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1060
971
|
// The Intl messages can be used for button labels.
|
|
1061
|
-
|
|
1062
972
|
FormModalPage.Intl = i18n.sharedMessages;
|
|
1063
973
|
|
|
1064
974
|
const TabControls = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1065
975
|
target: "elpldre1"
|
|
1066
976
|
} )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
|
|
1067
|
-
|
|
1068
977
|
const ControlsContainter = props => jsxRuntime.jsxs("div", {
|
|
1069
978
|
css: /*#__PURE__*/react.css("display:flex;align-items:flex-end;justify-content:space-between;margin-top:", designTokens.marginTopForTabControls, ";" + ("" ), "" ),
|
|
1070
979
|
children: [jsxRuntime.jsx(TabControls, {
|
|
@@ -1072,22 +981,18 @@ const ControlsContainter = props => jsxRuntime.jsxs("div", {
|
|
|
1072
981
|
children: props.tabControls
|
|
1073
982
|
}), props.formControls]
|
|
1074
983
|
});
|
|
1075
|
-
|
|
1076
984
|
ControlsContainter.propTypes = {};
|
|
1077
985
|
ControlsContainter.displayName = 'ControlsContainter';
|
|
1078
|
-
|
|
1079
986
|
const TabularPageContainer = props => jsxRuntime.jsx("div", {
|
|
1080
987
|
css: /*#__PURE__*/react.css("background-color:", props.color === 'surface' ? designSystem.designTokens.colorSurface : designTokens.backgroundColorForPageHeader, ";padding:", designTokens.paddingForTabularPageHeader, ";border-bottom:", designTokens.borderBottomForTabularPageHeader, ";" + ("" ), "" ),
|
|
1081
988
|
children: props.children
|
|
1082
989
|
});
|
|
1083
|
-
|
|
1084
990
|
TabularPageContainer.propTypes = {};
|
|
1085
991
|
TabularPageContainer.displayName = 'TabularPageContainer';
|
|
1086
992
|
const defaultProps$9 = {
|
|
1087
993
|
color: 'surface'
|
|
1088
994
|
};
|
|
1089
995
|
TabularPageContainer.defaultProps = defaultProps$9;
|
|
1090
|
-
|
|
1091
996
|
const FormControlsContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1092
997
|
target: "elpldre0"
|
|
1093
998
|
} )("margin-bottom:", designSystem.designTokens.spacingM, ";" + ("" ));
|
|
@@ -1095,11 +1000,9 @@ const FormControlsContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
|
1095
1000
|
const defaultProps$8 = {
|
|
1096
1001
|
hideControls: false
|
|
1097
1002
|
};
|
|
1098
|
-
|
|
1099
1003
|
const TabularModalPage = props => {
|
|
1100
1004
|
const _useTheme = designSystem.useTheme(),
|
|
1101
|
-
|
|
1102
|
-
|
|
1005
|
+
themedValue = _useTheme.themedValue;
|
|
1103
1006
|
return jsxRuntime.jsxs(ModalPage, {
|
|
1104
1007
|
title: props.title,
|
|
1105
1008
|
isOpen: props.isOpen,
|
|
@@ -1132,24 +1035,22 @@ const TabularModalPage = props => {
|
|
|
1132
1035
|
})]
|
|
1133
1036
|
});
|
|
1134
1037
|
};
|
|
1135
|
-
|
|
1136
1038
|
TabularModalPage.propTypes = {};
|
|
1137
1039
|
TabularModalPage.displayName = 'TabularModalPage';
|
|
1138
|
-
TabularModalPage.defaultProps = defaultProps$8;
|
|
1040
|
+
TabularModalPage.defaultProps = defaultProps$8;
|
|
1041
|
+
// Static export of pre-configured form control buttons to easily re-use
|
|
1139
1042
|
// them in the custom controls.
|
|
1140
|
-
|
|
1141
1043
|
TabularModalPage.FormPrimaryButton = FormPrimaryButton;
|
|
1142
1044
|
TabularModalPage.FormSecondaryButton = FormSecondaryButton;
|
|
1143
|
-
TabularModalPage.FormDeleteButton = FormDeleteButton;
|
|
1045
|
+
TabularModalPage.FormDeleteButton = FormDeleteButton;
|
|
1046
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1144
1047
|
// The Intl messages can be used for button labels.
|
|
1145
|
-
|
|
1146
1048
|
TabularModalPage.Intl = i18n.sharedMessages;
|
|
1147
1049
|
|
|
1148
1050
|
const defaultProps$7 = {
|
|
1149
1051
|
color: 'surface',
|
|
1150
1052
|
previousPathLabel: messages$2.back
|
|
1151
1053
|
};
|
|
1152
|
-
|
|
1153
1054
|
const PageTopBar = props => {
|
|
1154
1055
|
const intl = reactIntl.useIntl();
|
|
1155
1056
|
return jsxRuntime.jsx("div", {
|
|
@@ -1165,7 +1066,6 @@ const PageTopBar = props => {
|
|
|
1165
1066
|
})
|
|
1166
1067
|
});
|
|
1167
1068
|
};
|
|
1168
|
-
|
|
1169
1069
|
PageTopBar.propTypes = {};
|
|
1170
1070
|
PageTopBar.displayName = 'PageTopBar';
|
|
1171
1071
|
PageTopBar.defaultProps = defaultProps$7;
|
|
@@ -1173,18 +1073,16 @@ PageTopBar.defaultProps = defaultProps$7;
|
|
|
1173
1073
|
const DetailPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1174
1074
|
target: "etkdonc1"
|
|
1175
1075
|
} )("background-color:", designTokens.backgroundColorForPageHeader, ";padding:", designTokens.paddingForDetailPageHeader, ";border-bottom:1px ", designTokens.colorForPageHeaderBottomBorder, " solid;" + ("" ));
|
|
1176
|
-
|
|
1177
1076
|
const HeaderControlsWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1178
1077
|
target: "etkdonc0"
|
|
1179
|
-
} )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
|
|
1078
|
+
} )("margin-top:", designSystem.designTokens.spacingS, ";" + ("" ));
|
|
1079
|
+
|
|
1080
|
+
// NOTE: the `MessageDescriptor` type is exposed by `react-intl`.
|
|
1180
1081
|
// However, we need to explicitly define this otherwise the prop-types babel plugin
|
|
1181
1082
|
// does not recognize the object shape.
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
1083
|
const defaultProps$6 = {
|
|
1185
1084
|
hideControls: false
|
|
1186
1085
|
};
|
|
1187
|
-
|
|
1188
1086
|
const CustomFormDetailPage = props => {
|
|
1189
1087
|
var _props$title;
|
|
1190
1088
|
return jsxRuntime.jsxs(PageWrapper, {
|
|
@@ -1208,26 +1106,24 @@ const CustomFormDetailPage = props => {
|
|
|
1208
1106
|
})]
|
|
1209
1107
|
});
|
|
1210
1108
|
};
|
|
1211
|
-
|
|
1212
1109
|
CustomFormDetailPage.propTypes = {};
|
|
1213
1110
|
CustomFormDetailPage.displayName = 'CustomFormDetailPage';
|
|
1214
|
-
CustomFormDetailPage.defaultProps = defaultProps$6;
|
|
1111
|
+
CustomFormDetailPage.defaultProps = defaultProps$6;
|
|
1112
|
+
// Static export of pre-configured page header title component to easily
|
|
1215
1113
|
// use as part of a custom title row
|
|
1216
|
-
|
|
1217
|
-
|
|
1114
|
+
CustomFormDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
1115
|
+
// Static export of pre-configured form control buttons to easily re-use
|
|
1218
1116
|
// them in the custom controls.
|
|
1219
|
-
|
|
1220
1117
|
CustomFormDetailPage.FormPrimaryButton = FormPrimaryButton;
|
|
1221
1118
|
CustomFormDetailPage.FormSecondaryButton = FormSecondaryButton;
|
|
1222
|
-
CustomFormDetailPage.FormDeleteButton = FormDeleteButton;
|
|
1119
|
+
CustomFormDetailPage.FormDeleteButton = FormDeleteButton;
|
|
1120
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1223
1121
|
// The Intl messages can be used for button labels.
|
|
1224
|
-
|
|
1225
1122
|
CustomFormDetailPage.Intl = i18n.sharedMessages;
|
|
1226
1123
|
|
|
1227
1124
|
const defaultProps$5 = {
|
|
1228
1125
|
hideControls: false
|
|
1229
1126
|
};
|
|
1230
|
-
|
|
1231
1127
|
const FormDetailPage = props => jsxRuntime.jsx(CustomFormDetailPage, {
|
|
1232
1128
|
title: props.title,
|
|
1233
1129
|
subtitle: props.subtitle,
|
|
@@ -1251,17 +1147,16 @@ const FormDetailPage = props => jsxRuntime.jsx(CustomFormDetailPage, {
|
|
|
1251
1147
|
}),
|
|
1252
1148
|
children: props.children
|
|
1253
1149
|
});
|
|
1254
|
-
|
|
1255
1150
|
FormDetailPage.propTypes = {};
|
|
1256
1151
|
FormDetailPage.displayName = 'FormDetailPage';
|
|
1257
|
-
FormDetailPage.defaultProps = defaultProps$5;
|
|
1152
|
+
FormDetailPage.defaultProps = defaultProps$5;
|
|
1153
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1258
1154
|
// The Intl messages can be used for button labels.
|
|
1259
1155
|
// Static export of pre-configured page header title component to easily
|
|
1260
1156
|
// use as part of a custom title row
|
|
1261
|
-
|
|
1262
|
-
|
|
1157
|
+
FormDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
1158
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1263
1159
|
// The Intl messages can be used for button labels.
|
|
1264
|
-
|
|
1265
1160
|
FormDetailPage.Intl = i18n.sharedMessages;
|
|
1266
1161
|
|
|
1267
1162
|
const InfoDetailPage = props => jsxRuntime.jsx(CustomFormDetailPage, {
|
|
@@ -1272,17 +1167,15 @@ const InfoDetailPage = props => jsxRuntime.jsx(CustomFormDetailPage, {
|
|
|
1272
1167
|
onPreviousPathClick: props.onPreviousPathClick,
|
|
1273
1168
|
children: props.children
|
|
1274
1169
|
});
|
|
1275
|
-
|
|
1276
1170
|
InfoDetailPage.propTypes = {};
|
|
1277
|
-
InfoDetailPage.displayName = 'InfoDetailPage';
|
|
1171
|
+
InfoDetailPage.displayName = 'InfoDetailPage';
|
|
1172
|
+
// Static export of pre-configured page header title component to easily
|
|
1278
1173
|
// use as part of a custom title row
|
|
1279
|
-
|
|
1280
1174
|
InfoDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
1281
1175
|
|
|
1282
1176
|
const defaultProps$4 = {
|
|
1283
1177
|
hideControls: false
|
|
1284
1178
|
};
|
|
1285
|
-
|
|
1286
1179
|
const TabularDetailPage = props => {
|
|
1287
1180
|
var _props$title;
|
|
1288
1181
|
return jsxRuntime.jsxs(PageWrapper, {
|
|
@@ -1310,24 +1203,21 @@ const TabularDetailPage = props => {
|
|
|
1310
1203
|
})]
|
|
1311
1204
|
});
|
|
1312
1205
|
};
|
|
1313
|
-
|
|
1314
1206
|
TabularDetailPage.propTypes = {};
|
|
1315
1207
|
TabularDetailPage.displayName = 'TabularDetailPage';
|
|
1316
|
-
TabularDetailPage.defaultProps = defaultProps$4;
|
|
1208
|
+
TabularDetailPage.defaultProps = defaultProps$4;
|
|
1209
|
+
// Static export of pre-configured form control buttons to easily re-use
|
|
1317
1210
|
// them in the custom controls.
|
|
1318
|
-
|
|
1319
1211
|
TabularDetailPage.FormPrimaryButton = FormPrimaryButton;
|
|
1320
1212
|
TabularDetailPage.FormSecondaryButton = FormSecondaryButton;
|
|
1321
|
-
TabularDetailPage.FormDeleteButton = FormDeleteButton;
|
|
1213
|
+
TabularDetailPage.FormDeleteButton = FormDeleteButton;
|
|
1214
|
+
// Static export of pre-configured page header title component to easily
|
|
1322
1215
|
// use as part of a custom title row
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1216
|
+
TabularDetailPage.PageHeaderTitle = PageHeaderTitle;
|
|
1217
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1326
1218
|
TabularDetailPage.Intl = i18n.sharedMessages;
|
|
1327
1219
|
|
|
1328
|
-
const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-
|
|
1329
|
-
/* webpackChunkName: "public-page-layout" */
|
|
1330
|
-
); }));
|
|
1220
|
+
const PublicPageLayout = /*#__PURE__*/react$1.lazy(() => Promise.resolve().then(function () { return require('./public-page-layout-5d02cff6.cjs.prod.js' /* webpackChunkName: "public-page-layout" */); }));
|
|
1331
1221
|
|
|
1332
1222
|
const MainPageContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1333
1223
|
target: "ev8m2jf2"
|
|
@@ -1343,7 +1233,6 @@ const defaultProps$3 = {
|
|
|
1343
1233
|
hideControls: false,
|
|
1344
1234
|
hideDivider: false
|
|
1345
1235
|
};
|
|
1346
|
-
|
|
1347
1236
|
const CustomFormMainPage = props => {
|
|
1348
1237
|
var _props$title;
|
|
1349
1238
|
return jsxRuntime.jsxs(PageWrapper, {
|
|
@@ -1364,26 +1253,27 @@ const CustomFormMainPage = props => {
|
|
|
1364
1253
|
})]
|
|
1365
1254
|
});
|
|
1366
1255
|
};
|
|
1367
|
-
|
|
1368
1256
|
CustomFormMainPage.propTypes = {};
|
|
1369
1257
|
CustomFormMainPage.displayName = 'CustomFormMainPage';
|
|
1370
|
-
CustomFormMainPage.defaultProps = defaultProps$3;
|
|
1258
|
+
CustomFormMainPage.defaultProps = defaultProps$3;
|
|
1259
|
+
|
|
1260
|
+
// Static export of pre-configured page header title component to easily
|
|
1371
1261
|
// use as part of a custom title row
|
|
1262
|
+
CustomFormMainPage.PageHeaderTitle = PageHeaderTitle;
|
|
1372
1263
|
|
|
1373
|
-
|
|
1264
|
+
// Static export of pre-configured form control buttons to easily re-use
|
|
1374
1265
|
// them in the custom controls.
|
|
1375
|
-
|
|
1376
1266
|
CustomFormMainPage.FormPrimaryButton = FormPrimaryButton;
|
|
1377
1267
|
CustomFormMainPage.FormSecondaryButton = FormSecondaryButton;
|
|
1378
|
-
CustomFormMainPage.FormDeleteButton = FormDeleteButton;
|
|
1379
|
-
// The Intl messages can be used for button labels.
|
|
1268
|
+
CustomFormMainPage.FormDeleteButton = FormDeleteButton;
|
|
1380
1269
|
|
|
1270
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1271
|
+
// The Intl messages can be used for button labels.
|
|
1381
1272
|
CustomFormMainPage.Intl = i18n.sharedMessages;
|
|
1382
1273
|
|
|
1383
1274
|
const defaultProps$2 = {
|
|
1384
1275
|
hideControls: false
|
|
1385
1276
|
};
|
|
1386
|
-
|
|
1387
1277
|
const FormMainPage = props => {
|
|
1388
1278
|
return jsxRuntime.jsx(CustomFormMainPage, {
|
|
1389
1279
|
title: props.title,
|
|
@@ -1407,21 +1297,21 @@ const FormMainPage = props => {
|
|
|
1407
1297
|
children: props.children
|
|
1408
1298
|
});
|
|
1409
1299
|
};
|
|
1410
|
-
|
|
1411
1300
|
FormMainPage.propTypes = {};
|
|
1412
1301
|
FormMainPage.displayName = 'FormMainPage';
|
|
1413
|
-
FormMainPage.defaultProps = defaultProps$2;
|
|
1302
|
+
FormMainPage.defaultProps = defaultProps$2;
|
|
1303
|
+
|
|
1304
|
+
// Static export of pre-configured page header title component to easily
|
|
1414
1305
|
// use as part of a custom title row
|
|
1306
|
+
FormMainPage.PageHeaderTitle = PageHeaderTitle;
|
|
1415
1307
|
|
|
1416
|
-
|
|
1308
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1417
1309
|
// The Intl messages can be used for button labels.
|
|
1418
|
-
|
|
1419
1310
|
FormMainPage.Intl = i18n.sharedMessages;
|
|
1420
1311
|
|
|
1421
1312
|
const InfoMainPage = props => {
|
|
1422
1313
|
const _useTheme = designSystem.useTheme(),
|
|
1423
|
-
|
|
1424
|
-
|
|
1314
|
+
themedValue = _useTheme.themedValue;
|
|
1425
1315
|
return jsxRuntime.jsx(CustomFormMainPage, {
|
|
1426
1316
|
title: props.title,
|
|
1427
1317
|
subtitle: props.subtitle,
|
|
@@ -1430,17 +1320,15 @@ const InfoMainPage = props => {
|
|
|
1430
1320
|
children: props.children
|
|
1431
1321
|
});
|
|
1432
1322
|
};
|
|
1433
|
-
|
|
1434
1323
|
InfoMainPage.propTypes = {};
|
|
1435
|
-
InfoMainPage.displayName = 'InfoMainPage';
|
|
1324
|
+
InfoMainPage.displayName = 'InfoMainPage';
|
|
1325
|
+
// Static export of pre-configured page header title component to easily
|
|
1436
1326
|
// use as part of a custom title row
|
|
1437
|
-
|
|
1438
1327
|
InfoMainPage.PageHeaderTitle = PageHeaderTitle;
|
|
1439
1328
|
|
|
1440
1329
|
const defaultProps$1 = {
|
|
1441
1330
|
hideControls: false
|
|
1442
1331
|
};
|
|
1443
|
-
|
|
1444
1332
|
const TabularMainPage = props => {
|
|
1445
1333
|
var _props$title;
|
|
1446
1334
|
return jsxRuntime.jsxs(PageWrapper, {
|
|
@@ -1465,31 +1353,28 @@ const TabularMainPage = props => {
|
|
|
1465
1353
|
})]
|
|
1466
1354
|
});
|
|
1467
1355
|
};
|
|
1468
|
-
|
|
1469
1356
|
TabularMainPage.propTypes = {};
|
|
1470
1357
|
TabularMainPage.displayName = 'TabularMainPage';
|
|
1471
|
-
TabularMainPage.defaultProps = defaultProps$1;
|
|
1358
|
+
TabularMainPage.defaultProps = defaultProps$1;
|
|
1359
|
+
// Static export of pre-configured form control buttons to easily re-use
|
|
1472
1360
|
// them in the custom controls.
|
|
1473
|
-
|
|
1474
1361
|
TabularMainPage.FormPrimaryButton = FormPrimaryButton;
|
|
1475
1362
|
TabularMainPage.FormSecondaryButton = FormSecondaryButton;
|
|
1476
|
-
TabularMainPage.FormDeleteButton = FormDeleteButton;
|
|
1363
|
+
TabularMainPage.FormDeleteButton = FormDeleteButton;
|
|
1364
|
+
// Static export of pre-configured page header title component to easily
|
|
1477
1365
|
// use as part of a custom title row
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1366
|
+
TabularMainPage.PageHeaderTitle = PageHeaderTitle;
|
|
1367
|
+
// This is a convenience proxy export to expose pre-defined Intl messages defined in the `@commercetools-frontend/i18n` package.
|
|
1481
1368
|
TabularMainPage.Intl = i18n.sharedMessages;
|
|
1482
1369
|
|
|
1483
1370
|
var _ref$2 = {
|
|
1484
1371
|
name: "zl1inp",
|
|
1485
1372
|
styles: "display:flex;justify-content:center"
|
|
1486
1373
|
} ;
|
|
1487
|
-
|
|
1488
1374
|
var _ref2 = {
|
|
1489
1375
|
name: "10lgefo",
|
|
1490
1376
|
styles: "display:grid;align-items:center;justify-content:center;height:100%;white-space:pre-wrap;text-align:center"
|
|
1491
1377
|
} ;
|
|
1492
|
-
|
|
1493
1378
|
const MaintenancePageLayout = props => jsxRuntime.jsx("div", {
|
|
1494
1379
|
css: _ref2,
|
|
1495
1380
|
children: jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
@@ -1515,7 +1400,6 @@ const MaintenancePageLayout = props => jsxRuntime.jsx("div", {
|
|
|
1515
1400
|
})
|
|
1516
1401
|
})
|
|
1517
1402
|
});
|
|
1518
|
-
|
|
1519
1403
|
MaintenancePageLayout.propTypes = {};
|
|
1520
1404
|
MaintenancePageLayout.displayName = 'MaintenancePageLayout';
|
|
1521
1405
|
|
|
@@ -1531,16 +1415,13 @@ var messages$1 = reactIntl.defineMessages({
|
|
|
1531
1415
|
});
|
|
1532
1416
|
|
|
1533
1417
|
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1534
|
-
|
|
1535
1418
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1536
|
-
|
|
1537
1419
|
const getLink = msg => jsxRuntime.jsx("a", {
|
|
1538
1420
|
href: constants.SUPPORT_PORTAL_URL,
|
|
1539
1421
|
target: "_blank",
|
|
1540
1422
|
rel: "noopener noreferrer",
|
|
1541
1423
|
children: msg
|
|
1542
1424
|
});
|
|
1543
|
-
|
|
1544
1425
|
const PageNotFound = () => {
|
|
1545
1426
|
const intl = reactIntl.useIntl();
|
|
1546
1427
|
return jsxRuntime.jsx(MaintenancePageLayout, {
|
|
@@ -1554,7 +1435,6 @@ const PageNotFound = () => {
|
|
|
1554
1435
|
}))
|
|
1555
1436
|
});
|
|
1556
1437
|
};
|
|
1557
|
-
|
|
1558
1438
|
PageNotFound.displayName = 'PageNotFound';
|
|
1559
1439
|
|
|
1560
1440
|
var messages = reactIntl.defineMessages({
|
|
@@ -1573,16 +1453,13 @@ var messages = reactIntl.defineMessages({
|
|
|
1573
1453
|
});
|
|
1574
1454
|
|
|
1575
1455
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1576
|
-
|
|
1577
1456
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1578
|
-
|
|
1579
1457
|
const getSupportUrlLink = msg => jsxRuntime.jsx("a", {
|
|
1580
1458
|
href: constants.SUPPORT_PORTAL_URL,
|
|
1581
1459
|
target: "_blank",
|
|
1582
1460
|
rel: "noopener noreferrer",
|
|
1583
1461
|
children: msg
|
|
1584
1462
|
});
|
|
1585
|
-
|
|
1586
1463
|
const PageUnauthorized = () => {
|
|
1587
1464
|
const intl = reactIntl.useIntl();
|
|
1588
1465
|
return jsxRuntime.jsx(MaintenancePageLayout, {
|
|
@@ -1605,18 +1482,15 @@ const Content$1 = /*#__PURE__*/_styled__default["default"]("section", {
|
|
|
1605
1482
|
name: "1sxg93g",
|
|
1606
1483
|
styles: "grid-area:content"
|
|
1607
1484
|
} );
|
|
1608
|
-
|
|
1609
1485
|
const Container$1 = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1610
1486
|
target: "e1jvhtw80"
|
|
1611
1487
|
} )({
|
|
1612
1488
|
name: "1vpm32e",
|
|
1613
1489
|
styles: "display:grid;grid-template-areas:'. content .';grid-template-columns:1fr minmax(400px, 742px) 1fr;width:100%"
|
|
1614
1490
|
} );
|
|
1615
|
-
|
|
1616
1491
|
function PageContentNarrow(props) {
|
|
1617
1492
|
const _useTheme = designSystem.useTheme(),
|
|
1618
|
-
|
|
1619
|
-
|
|
1493
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
1620
1494
|
if (!isNewTheme) return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1621
1495
|
children: props.children
|
|
1622
1496
|
});
|
|
@@ -1626,7 +1500,6 @@ function PageContentNarrow(props) {
|
|
|
1626
1500
|
})
|
|
1627
1501
|
});
|
|
1628
1502
|
}
|
|
1629
|
-
|
|
1630
1503
|
PageContentNarrow.propTypes = {};
|
|
1631
1504
|
|
|
1632
1505
|
const Content = /*#__PURE__*/_styled__default["default"]("section", {
|
|
@@ -1635,49 +1508,40 @@ const Content = /*#__PURE__*/_styled__default["default"]("section", {
|
|
|
1635
1508
|
switch (props.columns) {
|
|
1636
1509
|
case '1/1':
|
|
1637
1510
|
return '1fr 1fr';
|
|
1638
|
-
|
|
1639
1511
|
case '2/1':
|
|
1640
1512
|
return '2fr 1fr';
|
|
1641
|
-
|
|
1642
1513
|
default:
|
|
1643
1514
|
return '1fr';
|
|
1644
1515
|
}
|
|
1645
1516
|
}, ";gap:", props => props.gapSize === '10' ? designSystem.designTokens.spacing50 : designSystem.designTokens.spacing70, ";width:100%;" + ("" ));
|
|
1646
|
-
|
|
1647
1517
|
const LeftContentColumn = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1648
1518
|
target: "e1dg479f3"
|
|
1649
1519
|
} )({
|
|
1650
1520
|
name: "1ibwnup",
|
|
1651
1521
|
styles: "grid-area:left-column"
|
|
1652
1522
|
} );
|
|
1653
|
-
|
|
1654
1523
|
const RightContentColumn = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1655
1524
|
target: "e1dg479f2"
|
|
1656
1525
|
} )({
|
|
1657
1526
|
name: "hjfyry",
|
|
1658
1527
|
styles: "grid-area:right-column"
|
|
1659
1528
|
} );
|
|
1660
|
-
|
|
1661
1529
|
const RightColumnContentWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1662
1530
|
target: "e1dg479f1"
|
|
1663
1531
|
} )("top:0;position:", props => props.columns === '2/1' ? 'sticky' : 'static', ";" + ("" ));
|
|
1664
|
-
|
|
1665
1532
|
const Container = /*#__PURE__*/_styled__default["default"]("div", {
|
|
1666
1533
|
target: "e1dg479f0"
|
|
1667
1534
|
} )({
|
|
1668
1535
|
name: "5phl7w",
|
|
1669
1536
|
styles: "display:grid;grid-template-areas:'. content .';grid-template-columns:1fr minmax(800px, 1200px) 1fr;width:100%"
|
|
1670
1537
|
} );
|
|
1671
|
-
|
|
1672
1538
|
function PageContentWide(props) {
|
|
1673
1539
|
const _useTheme = designSystem.useTheme(props.themeParentSelector),
|
|
1674
|
-
|
|
1675
|
-
|
|
1540
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
1676
1541
|
const _Children$toArray = react$1.Children.toArray(props.children),
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1542
|
+
_Children$toArray2 = _slicedToArray(_Children$toArray, 2),
|
|
1543
|
+
leftChild = _Children$toArray2[0],
|
|
1544
|
+
rightChild = _Children$toArray2[1];
|
|
1681
1545
|
utils.useWarning(props.columns !== '1' || !Boolean(rightChild), 'PageContentWide: This component only renders its first children when using a single column but you provided more that one.');
|
|
1682
1546
|
if (!isNewTheme) return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1683
1547
|
children: props.children
|
|
@@ -1701,7 +1565,6 @@ function PageContentWide(props) {
|
|
|
1701
1565
|
})
|
|
1702
1566
|
});
|
|
1703
1567
|
}
|
|
1704
|
-
|
|
1705
1568
|
PageContentWide.propTypes = {};
|
|
1706
1569
|
const defaultProps = {
|
|
1707
1570
|
columns: '1',
|
|
@@ -1713,7 +1576,6 @@ var _ref$1 = {
|
|
|
1713
1576
|
name: "1d3w5wq",
|
|
1714
1577
|
styles: "width:100%"
|
|
1715
1578
|
} ;
|
|
1716
|
-
|
|
1717
1579
|
function PageContentFull(props) {
|
|
1718
1580
|
return jsxRuntime.jsx("div", {
|
|
1719
1581
|
css: _ref$1,
|
|
@@ -1722,21 +1584,18 @@ function PageContentFull(props) {
|
|
|
1722
1584
|
})
|
|
1723
1585
|
});
|
|
1724
1586
|
}
|
|
1725
|
-
|
|
1726
1587
|
PageContentFull.propTypes = {};
|
|
1727
1588
|
|
|
1728
1589
|
// The width of each indentation level.
|
|
1729
1590
|
const indentationSize = '48px';
|
|
1730
|
-
|
|
1731
1591
|
const useObserverElementDimensions = element => {
|
|
1732
1592
|
const _useState = react$1.useState({
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1593
|
+
height: 0,
|
|
1594
|
+
width: 0
|
|
1595
|
+
}),
|
|
1596
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1597
|
+
dimensions = _useState2[0],
|
|
1598
|
+
setDimensions = _useState2[1];
|
|
1740
1599
|
useResizeObserver__default["default"](element, entry => {
|
|
1741
1600
|
setDimensions({
|
|
1742
1601
|
height: entry.contentRect.height,
|
|
@@ -1744,17 +1603,15 @@ const useObserverElementDimensions = element => {
|
|
|
1744
1603
|
});
|
|
1745
1604
|
});
|
|
1746
1605
|
return dimensions;
|
|
1747
|
-
};
|
|
1748
|
-
|
|
1606
|
+
};
|
|
1749
1607
|
|
|
1608
|
+
// All modal components expect to be rendered inside this container.
|
|
1750
1609
|
var _ref = {
|
|
1751
1610
|
name: "qk9kof",
|
|
1752
1611
|
styles: "display:flex;height:1px;margin-top:-1px"
|
|
1753
1612
|
} ;
|
|
1754
|
-
|
|
1755
1613
|
const PortalsContainer = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
1756
1614
|
var _props$offsetTop, _props$offsetLeft, _props$offsetLeftOnEx, _props$containerSelec, _props$zIndex, _props$baseModalZInde, _current, _current2;
|
|
1757
|
-
|
|
1758
1615
|
// Initialize props with default values.
|
|
1759
1616
|
// NOTE: using `defaultProps` with `forwardRef` results in the type declarations
|
|
1760
1617
|
// to ignore the `defaultProps`. Therefore, the default props are typed
|
|
@@ -1768,54 +1625,48 @@ const PortalsContainer = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
|
1768
1625
|
const portalsContainerRef = react$1.useRef(null);
|
|
1769
1626
|
const globalNotificationsElementDimensions = useObserverElementDimensions(ref === null || ref === void 0 ? void 0 : (_current = ref.current) === null || _current === void 0 ? void 0 : _current.notificationsGlobalRef);
|
|
1770
1627
|
const pageNotificationsElementDimensions = useObserverElementDimensions(ref === null || ref === void 0 ? void 0 : (_current2 = ref.current) === null || _current2 === void 0 ? void 0 : _current2.notificationsPageRef);
|
|
1771
|
-
|
|
1772
1628
|
const _useState3 = react$1.useState([]),
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1629
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1630
|
+
stackingLayers = _useState4[0],
|
|
1631
|
+
setStackingLayers = _useState4[1];
|
|
1632
|
+
// The mutation observer gets triggered every time a child node gets added or
|
|
1776
1633
|
// removed from the portals container.
|
|
1777
1634
|
// The stacking layers are then re-calculated.
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
1635
|
hooks.useMutationObserver(portalsContainerRef, mutationList => {
|
|
1781
1636
|
var _context;
|
|
1782
|
-
|
|
1783
1637
|
// We expect only a single element in the mutation list as we configured the
|
|
1784
1638
|
// observer to only listen to `childList` changes.
|
|
1785
1639
|
const _mutationList = _slicedToArray(mutationList, 1),
|
|
1786
|
-
|
|
1787
|
-
|
|
1640
|
+
mutationEvent = _mutationList[0];
|
|
1788
1641
|
let indentationLevel = 0;
|
|
1789
1642
|
const nextStackingLevels = [];
|
|
1790
|
-
|
|
1791
1643
|
_forEachInstanceProperty__default["default"](_context = mutationEvent.target.childNodes).call(_context, (node, index) => {
|
|
1792
1644
|
if (node instanceof HTMLElement) {
|
|
1793
1645
|
const stackingLevel = index + 1;
|
|
1794
1646
|
node.dataset.level = String(stackingLevel);
|
|
1795
1647
|
const overlayNode = node.firstChild;
|
|
1796
|
-
|
|
1797
1648
|
if (overlayNode instanceof HTMLElement) {
|
|
1798
1649
|
if (overlayNode.dataset.role === 'modal-overlay') {
|
|
1799
1650
|
indentationLevel += 1;
|
|
1800
1651
|
}
|
|
1801
1652
|
}
|
|
1802
|
-
|
|
1803
1653
|
nextStackingLevels.push({
|
|
1804
1654
|
stackingLevel,
|
|
1805
1655
|
indentationLevel
|
|
1806
1656
|
});
|
|
1807
1657
|
}
|
|
1808
1658
|
});
|
|
1809
|
-
|
|
1810
1659
|
setStackingLayers(nextStackingLevels);
|
|
1811
1660
|
}, {
|
|
1812
1661
|
// Only subscribe to changes to the child nodes of the portals container.
|
|
1813
1662
|
childList: true
|
|
1814
1663
|
});
|
|
1815
1664
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1816
|
-
children: [jsxRuntime.jsx(react.Global
|
|
1665
|
+
children: [jsxRuntime.jsx(react.Global
|
|
1666
|
+
// Apply some global styles, based on the `.ReactModal__Body--open` class.
|
|
1817
1667
|
, {
|
|
1818
|
-
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, ");}" + ("" ), "" ),
|
|
1668
|
+
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, ");}" + ("" ), "" ),
|
|
1669
|
+
// Apply styles for stacking layers.
|
|
1819
1670
|
..._mapInstanceProperty__default["default"](stackingLayers).call(stackingLayers,
|
|
1820
1671
|
/**
|
|
1821
1672
|
* Every "overlay" container gets assigned a sequential `z-index` level.
|
|
@@ -1825,7 +1676,8 @@ const PortalsContainer = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
|
1825
1676
|
stackingLayer => /*#__PURE__*/react.css("#", constants.PORTALS_CONTAINER_ID, " .ReactModalPortal[data-level='", stackingLayer.stackingLevel, "'] [data-role$='overlay']{z-index:calc(\n ", baseModalZIndex, " + ", stackingLayer.stackingLevel, "\n );}#", constants.PORTALS_CONTAINER_ID, " .ReactModalPortal[data-level='", stackingLayer.stackingLevel, "'] [data-role='modal-overlay'] [role='dialog']{width:calc(\n 100% -\n (", indentationSize, " * ", stackingLayer.indentationLevel, ")\n );}" + ("" ), "" )), "" ]
|
|
1826
1677
|
}), jsxRuntime.jsx("div", {
|
|
1827
1678
|
id: constants.PORTALS_CONTAINER_ID,
|
|
1828
|
-
ref: portalsContainerRef
|
|
1679
|
+
ref: portalsContainerRef
|
|
1680
|
+
// The container needs a height in order to be tabbable: https://reactjs/react-modal#774
|
|
1829
1681
|
,
|
|
1830
1682
|
css: _ref
|
|
1831
1683
|
})]
|
|
@@ -1835,12 +1687,10 @@ PortalsContainer.displayName = 'PortalsContainer';
|
|
|
1835
1687
|
|
|
1836
1688
|
const useModalState = function () {
|
|
1837
1689
|
let isInitiallyOpen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
1838
|
-
|
|
1839
1690
|
const _useState = react$1.useState(isInitiallyOpen),
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1691
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1692
|
+
isModalOpen = _useState2[0],
|
|
1693
|
+
setIsModalOpen = _useState2[1];
|
|
1844
1694
|
const openModal = react$1.useCallback(() => setIsModalOpen(true), []);
|
|
1845
1695
|
const closeModal = react$1.useCallback(() => setIsModalOpen(false), []);
|
|
1846
1696
|
return {
|