@opengeoweb/shared 2.0.1 → 2.1.3
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/lib/components/AlertBanner/AlertBanner.stories.d.ts +8 -1
- package/lib/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +5 -1
- package/lib/components/CustomSlider/CustomSlider.d.ts +4 -13
- package/lib/components/CustomSlider/CustomSlider.stories.d.ts +12 -0
- package/lib/components/DraggableDialog/DraggableDialog.d.ts +16 -0
- package/lib/components/DraggableDialog/DraggableDialog.spec.d.ts +1 -0
- package/lib/components/DraggableDialog/DraggableDialog.stories.d.ts +6 -0
- package/lib/components/DraggableDialog/index.d.ts +1 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.d.ts +26 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.spec.d.ts +1 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.stories.d.ts +5 -0
- package/lib/components/ErrorBoundary/index.d.ts +1 -0
- package/lib/components/StatusTag/StatusTag.stories.d.ts +8 -1
- package/lib/components/UserMenu/CheatSheet/CheatSheet.stories.d.ts +8 -0
- package/lib/components/UserMenu/UserMenu.stories.d.ts +8 -0
- package/lib/components/components.stories.d.ts +1 -3
- package/lib/components/index.d.ts +2 -0
- package/package.json +5 -5
- package/shared.esm.js +338 -67
- package/shared.umd.js +228 -62
package/shared.umd.js
CHANGED
|
@@ -42,6 +42,22 @@
|
|
|
42
42
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
43
43
|
PERFORMANCE OF THIS SOFTWARE.
|
|
44
44
|
***************************************************************************** */
|
|
45
|
+
/* global Reflect, Promise */
|
|
46
|
+
|
|
47
|
+
var extendStatics = function(d, b) {
|
|
48
|
+
extendStatics = Object.setPrototypeOf ||
|
|
49
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
50
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
51
|
+
return extendStatics(d, b);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
function __extends(d, b) {
|
|
55
|
+
if (typeof b !== "function" && b !== null)
|
|
56
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
57
|
+
extendStatics(d, b);
|
|
58
|
+
function __() { this.constructor = d; }
|
|
59
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
60
|
+
}
|
|
45
61
|
|
|
46
62
|
var __assign = function() {
|
|
47
63
|
__assign = Object.assign || function __assign(t) {
|
|
@@ -139,7 +155,7 @@
|
|
|
139
155
|
}, content));
|
|
140
156
|
};
|
|
141
157
|
|
|
142
|
-
var useStyles$
|
|
158
|
+
var useStyles$e = core.makeStyles(function () {
|
|
143
159
|
return {
|
|
144
160
|
dialogHeader: {
|
|
145
161
|
zIndex: 1,
|
|
@@ -171,7 +187,7 @@
|
|
|
171
187
|
content = _e === void 0 ? null : _e,
|
|
172
188
|
other = __rest(_a, ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content"]);
|
|
173
189
|
|
|
174
|
-
var classes = useStyles$
|
|
190
|
+
var classes = useStyles$e();
|
|
175
191
|
|
|
176
192
|
other.catchOnCancel;
|
|
177
193
|
var rest = __rest(other, ["catchOnCancel"]); // remove unwanted props
|
|
@@ -208,7 +224,8 @@
|
|
|
208
224
|
onClick: function onClick() {
|
|
209
225
|
return onClose('CANCELLED');
|
|
210
226
|
},
|
|
211
|
-
autoFocus: true
|
|
227
|
+
autoFocus: true,
|
|
228
|
+
disableRipple: true
|
|
212
229
|
}, cancelLabel), /*#__PURE__*/React__namespace.createElement(core.Button, {
|
|
213
230
|
"data-testid": "conformationDialog-confirm",
|
|
214
231
|
color: "secondary",
|
|
@@ -483,7 +500,7 @@
|
|
|
483
500
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
484
501
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
485
502
|
* */
|
|
486
|
-
var useStyles$
|
|
503
|
+
var useStyles$d = core.makeStyles(function () {
|
|
487
504
|
return {
|
|
488
505
|
title: {
|
|
489
506
|
fontSize: '14px',
|
|
@@ -553,7 +570,7 @@
|
|
|
553
570
|
info = _c === void 0 ? '' : _c,
|
|
554
571
|
_d = _a.dataTestId,
|
|
555
572
|
dataTestId = _d === void 0 ? 'alert-banner' : _d;
|
|
556
|
-
var classes = useStyles$
|
|
573
|
+
var classes = useStyles$d();
|
|
557
574
|
return /*#__PURE__*/React__namespace.createElement(lab.Alert, {
|
|
558
575
|
"data-testid": dataTestId,
|
|
559
576
|
severity: severity,
|
|
@@ -581,7 +598,7 @@
|
|
|
581
598
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
582
599
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
583
600
|
* */
|
|
584
|
-
var useStyles$
|
|
601
|
+
var useStyles$c = core.makeStyles(function () {
|
|
585
602
|
return {
|
|
586
603
|
wrapper: {
|
|
587
604
|
height: '100vh',
|
|
@@ -598,7 +615,7 @@
|
|
|
598
615
|
var AppLayout = function AppLayout(_a) {
|
|
599
616
|
var header = _a.header,
|
|
600
617
|
children = _a.children;
|
|
601
|
-
var classes = useStyles$
|
|
618
|
+
var classes = useStyles$c();
|
|
602
619
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
603
620
|
className: classes.wrapper
|
|
604
621
|
}, header, /*#__PURE__*/React__default["default"].createElement("main", {
|
|
@@ -624,7 +641,7 @@
|
|
|
624
641
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
625
642
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
626
643
|
* */
|
|
627
|
-
var useStyles$
|
|
644
|
+
var useStyles$b = core.makeStyles(function (theme) {
|
|
628
645
|
var _a;
|
|
629
646
|
|
|
630
647
|
return {
|
|
@@ -661,7 +678,7 @@
|
|
|
661
678
|
userMenu = _a.userMenu,
|
|
662
679
|
_b = _a.title,
|
|
663
680
|
title = _b === void 0 ? 'GeoWeb' : _b;
|
|
664
|
-
var classes = useStyles$
|
|
681
|
+
var classes = useStyles$b();
|
|
665
682
|
return /*#__PURE__*/React__default["default"].createElement("header", {
|
|
666
683
|
className: classes.header
|
|
667
684
|
}, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
|
|
@@ -745,7 +762,7 @@
|
|
|
745
762
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
746
763
|
* */
|
|
747
764
|
|
|
748
|
-
var useStyles$
|
|
765
|
+
var useStyles$a = function useStyles(isRightAligned) {
|
|
749
766
|
return core.makeStyles(function () {
|
|
750
767
|
return {
|
|
751
768
|
icon: __assign(__assign({
|
|
@@ -759,7 +776,7 @@
|
|
|
759
776
|
left: 10,
|
|
760
777
|
transform: 'rotate(90deg)'
|
|
761
778
|
}), {
|
|
762
|
-
zIndex:
|
|
779
|
+
zIndex: 1
|
|
763
780
|
})
|
|
764
781
|
};
|
|
765
782
|
});
|
|
@@ -768,7 +785,7 @@
|
|
|
768
785
|
var ResizeHandle = function ResizeHandle(_a) {
|
|
769
786
|
var isRightAligned = _a.isRightAligned;
|
|
770
787
|
var theme = core.useTheme();
|
|
771
|
-
var styles = useStyles$
|
|
788
|
+
var styles = useStyles$a(isRightAligned)();
|
|
772
789
|
return /*#__PURE__*/React__default["default"].createElement(core.SvgIcon, {
|
|
773
790
|
className: styles.icon,
|
|
774
791
|
"data-testid": "resizeHandle"
|
|
@@ -853,6 +870,81 @@
|
|
|
853
870
|
}, props), children);
|
|
854
871
|
};
|
|
855
872
|
|
|
873
|
+
/**
|
|
874
|
+
* ErrorBoundary
|
|
875
|
+
* Wrap this component around parts of your application. It will catch any uncaught errors and display an alert, and allows you to continue using the rest of your application.
|
|
876
|
+
*
|
|
877
|
+
* @example
|
|
878
|
+
* ``` <ErrorBoundary><ExampleComponent /></ErrorBoundary> ```
|
|
879
|
+
*/
|
|
880
|
+
|
|
881
|
+
var ErrorBoundary =
|
|
882
|
+
/** @class */
|
|
883
|
+
function (_super) {
|
|
884
|
+
__extends(ErrorBoundary, _super);
|
|
885
|
+
|
|
886
|
+
function ErrorBoundary(props) {
|
|
887
|
+
var _this = _super.call(this, props) || this;
|
|
888
|
+
|
|
889
|
+
_this.state = {
|
|
890
|
+
error: null,
|
|
891
|
+
errorInfo: null
|
|
892
|
+
};
|
|
893
|
+
return _this;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
ErrorBoundary.getDerivedStateFromError = function (error) {
|
|
897
|
+
return {
|
|
898
|
+
error: error
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
ErrorBoundary.prototype.componentDidCatch = function (error, errorInfo) {
|
|
903
|
+
var onError = this.props.onError;
|
|
904
|
+
this.setState({
|
|
905
|
+
error: error,
|
|
906
|
+
errorInfo: errorInfo
|
|
907
|
+
});
|
|
908
|
+
onError(error, errorInfo);
|
|
909
|
+
};
|
|
910
|
+
|
|
911
|
+
ErrorBoundary.prototype.render = function () {
|
|
912
|
+
var _a = this.state,
|
|
913
|
+
error = _a.error,
|
|
914
|
+
errorInfo = _a.errorInfo;
|
|
915
|
+
var children = this.props.children;
|
|
916
|
+
|
|
917
|
+
if (error) {
|
|
918
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
919
|
+
style: {
|
|
920
|
+
whiteSpace: 'pre-wrap'
|
|
921
|
+
}
|
|
922
|
+
}, /*#__PURE__*/React__namespace.createElement(AlertBanner, {
|
|
923
|
+
severity: "error",
|
|
924
|
+
title: "Woops, an error has occurred. Please report the error shown below and reload the page if needed.",
|
|
925
|
+
info: /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("br", null), error.toString(), /*#__PURE__*/React__namespace.createElement("br", null), errorInfo && errorInfo.componentStack, /*#__PURE__*/React__namespace.createElement("br", null), /*#__PURE__*/React__namespace.createElement("br", null), /*#__PURE__*/React__namespace.createElement(core.Link, {
|
|
926
|
+
underline: "always",
|
|
927
|
+
style: {
|
|
928
|
+
cursor: 'pointer'
|
|
929
|
+
},
|
|
930
|
+
onClick: function onClick() {
|
|
931
|
+
return window.location.reload();
|
|
932
|
+
}
|
|
933
|
+
}, "Reload page"))
|
|
934
|
+
}));
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
return children;
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
ErrorBoundary.defaultProps = {
|
|
941
|
+
onError: function onError() {
|
|
942
|
+
return null;
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
return ErrorBoundary;
|
|
946
|
+
}(React__namespace.Component);
|
|
947
|
+
|
|
856
948
|
/* *
|
|
857
949
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
858
950
|
* you may not use this file except in compliance with the License.
|
|
@@ -869,7 +961,7 @@
|
|
|
869
961
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
870
962
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
871
963
|
* */
|
|
872
|
-
var useStyles$
|
|
964
|
+
var useStyles$9 = core.makeStyles(function (theme) {
|
|
873
965
|
return {
|
|
874
966
|
container: {
|
|
875
967
|
position: 'absolute',
|
|
@@ -917,7 +1009,7 @@
|
|
|
917
1009
|
} : _d,
|
|
918
1010
|
children = _a.children,
|
|
919
1011
|
initials = _a.initials;
|
|
920
|
-
var classes = useStyles$
|
|
1012
|
+
var classes = useStyles$9();
|
|
921
1013
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(core.IconButton, {
|
|
922
1014
|
"data-testid": "userButton",
|
|
923
1015
|
onClick: onToggle,
|
|
@@ -997,7 +1089,7 @@
|
|
|
997
1089
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
998
1090
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
999
1091
|
* */
|
|
1000
|
-
var useStyles$
|
|
1092
|
+
var useStyles$8 = core.makeStyles(function (theme) {
|
|
1001
1093
|
return {
|
|
1002
1094
|
footer: {
|
|
1003
1095
|
boxShadow: theme.shadows[1],
|
|
@@ -1010,7 +1102,7 @@
|
|
|
1010
1102
|
}); // drag handles will be handled by DraggableResizable/Resizable
|
|
1011
1103
|
|
|
1012
1104
|
var ToolFooter = function ToolFooter() {
|
|
1013
|
-
var classes = useStyles$
|
|
1105
|
+
var classes = useStyles$8();
|
|
1014
1106
|
return /*#__PURE__*/React__default["default"].createElement("footer", {
|
|
1015
1107
|
className: classes.footer
|
|
1016
1108
|
});
|
|
@@ -1077,7 +1169,7 @@
|
|
|
1077
1169
|
}
|
|
1078
1170
|
};
|
|
1079
1171
|
|
|
1080
|
-
var useStyles$
|
|
1172
|
+
var useStyles$7 = core.makeStyles(function (theme) {
|
|
1081
1173
|
return {
|
|
1082
1174
|
header: {
|
|
1083
1175
|
boxShadow: theme.shadows[1],
|
|
@@ -1127,7 +1219,7 @@
|
|
|
1127
1219
|
_d = _a.className,
|
|
1128
1220
|
className = _d === void 0 ? '' : _d;
|
|
1129
1221
|
var styles = getStyle(size);
|
|
1130
|
-
var classes = useStyles$
|
|
1222
|
+
var classes = useStyles$7({
|
|
1131
1223
|
styles: styles,
|
|
1132
1224
|
isDraggable: isDraggable
|
|
1133
1225
|
});
|
|
@@ -1162,7 +1254,7 @@
|
|
|
1162
1254
|
variant: "h2",
|
|
1163
1255
|
className: classes.title
|
|
1164
1256
|
}, title), size === 'xxs' && /*#__PURE__*/React__default["default"].createElement(core.IconButton, {
|
|
1165
|
-
"data-testid": "dragBtn",
|
|
1257
|
+
"data-testid": "dragBtn-xxs",
|
|
1166
1258
|
className: classes.iconDragHorizontal,
|
|
1167
1259
|
disableRipple: true,
|
|
1168
1260
|
size: "small"
|
|
@@ -1194,7 +1286,7 @@
|
|
|
1194
1286
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1195
1287
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
1196
1288
|
* */
|
|
1197
|
-
var useStyles$
|
|
1289
|
+
var useStyles$6 = core.makeStyles(function () {
|
|
1198
1290
|
return {
|
|
1199
1291
|
container: {
|
|
1200
1292
|
overflow: 'hidden',
|
|
@@ -1234,7 +1326,7 @@
|
|
|
1234
1326
|
headerClassName = _h === void 0 ? '' : _h,
|
|
1235
1327
|
props = __rest(_a, ["title", "size", "children", "onClose", "isResizable", "isDraggable", "maxHeight", "elevation", "headerClassName"]);
|
|
1236
1328
|
|
|
1237
|
-
var classes = useStyles$
|
|
1329
|
+
var classes = useStyles$6();
|
|
1238
1330
|
return /*#__PURE__*/React__default["default"].createElement(core.Paper, __assign({
|
|
1239
1331
|
elevation: elevation,
|
|
1240
1332
|
className: classes.container
|
|
@@ -1436,7 +1528,7 @@
|
|
|
1436
1528
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1437
1529
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
1438
1530
|
* */
|
|
1439
|
-
var useStyles$
|
|
1531
|
+
var useStyles$5 = core.makeStyles(function (theme) {
|
|
1440
1532
|
return {
|
|
1441
1533
|
icon: {
|
|
1442
1534
|
backgroundColor: theme.palette.geowebColors.textInputField["default"].rgba,
|
|
@@ -1476,7 +1568,7 @@
|
|
|
1476
1568
|
var _b = _a.type,
|
|
1477
1569
|
type = _b === void 0 ? 'text' : _b,
|
|
1478
1570
|
children = _a.children;
|
|
1479
|
-
var classes = useStyles$
|
|
1571
|
+
var classes = useStyles$5();
|
|
1480
1572
|
|
|
1481
1573
|
if (type === 'divider') {
|
|
1482
1574
|
return /*#__PURE__*/React__default["default"].createElement(core.Typography, {
|
|
@@ -1526,7 +1618,7 @@
|
|
|
1526
1618
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1527
1619
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
1528
1620
|
* */
|
|
1529
|
-
var useStyles$
|
|
1621
|
+
var useStyles$4 = core.makeStyles(function (theme) {
|
|
1530
1622
|
return {
|
|
1531
1623
|
icon: {
|
|
1532
1624
|
fill: theme.palette.geowebColors.typographyAndIcons.text
|
|
@@ -1534,7 +1626,7 @@
|
|
|
1534
1626
|
};
|
|
1535
1627
|
});
|
|
1536
1628
|
var OptionIcon = function OptionIcon() {
|
|
1537
|
-
var classes = useStyles$
|
|
1629
|
+
var classes = useStyles$4();
|
|
1538
1630
|
return /*#__PURE__*/React__default["default"].createElement(core.SvgIcon, {
|
|
1539
1631
|
viewBox: "0 0 12 11",
|
|
1540
1632
|
style: {
|
|
@@ -1557,7 +1649,7 @@
|
|
|
1557
1649
|
}))));
|
|
1558
1650
|
};
|
|
1559
1651
|
var CommandIcon = function CommandIcon() {
|
|
1560
|
-
var classes = useStyles$
|
|
1652
|
+
var classes = useStyles$4();
|
|
1561
1653
|
return /*#__PURE__*/React__default["default"].createElement(core.SvgIcon, {
|
|
1562
1654
|
viewBox: "0 0 12 12",
|
|
1563
1655
|
style: {
|
|
@@ -1580,7 +1672,7 @@
|
|
|
1580
1672
|
}))));
|
|
1581
1673
|
};
|
|
1582
1674
|
var ArrowLeftIcon = function ArrowLeftIcon() {
|
|
1583
|
-
var classes = useStyles$
|
|
1675
|
+
var classes = useStyles$4();
|
|
1584
1676
|
return /*#__PURE__*/React__default["default"].createElement(core.SvgIcon, {
|
|
1585
1677
|
viewBox: "0 0 12 6",
|
|
1586
1678
|
style: {
|
|
@@ -1604,7 +1696,7 @@
|
|
|
1604
1696
|
}))));
|
|
1605
1697
|
};
|
|
1606
1698
|
var ArrowRightIcon = function ArrowRightIcon() {
|
|
1607
|
-
var classes = useStyles$
|
|
1699
|
+
var classes = useStyles$4();
|
|
1608
1700
|
return /*#__PURE__*/React__default["default"].createElement(core.SvgIcon, {
|
|
1609
1701
|
viewBox: "0 0 12 6",
|
|
1610
1702
|
style: {
|
|
@@ -1628,7 +1720,7 @@
|
|
|
1628
1720
|
}))));
|
|
1629
1721
|
};
|
|
1630
1722
|
var ArrowDownIcon = function ArrowDownIcon() {
|
|
1631
|
-
var classes = useStyles$
|
|
1723
|
+
var classes = useStyles$4();
|
|
1632
1724
|
return /*#__PURE__*/React__default["default"].createElement(core.SvgIcon, {
|
|
1633
1725
|
viewBox: "0 0 6 12",
|
|
1634
1726
|
style: {
|
|
@@ -1651,7 +1743,7 @@
|
|
|
1651
1743
|
}))));
|
|
1652
1744
|
};
|
|
1653
1745
|
var ArrowUpIcon = function ArrowUpIcon() {
|
|
1654
|
-
var classes = useStyles$
|
|
1746
|
+
var classes = useStyles$4();
|
|
1655
1747
|
return /*#__PURE__*/React__default["default"].createElement(core.SvgIcon, {
|
|
1656
1748
|
viewBox: "0 0 6 11",
|
|
1657
1749
|
style: {
|
|
@@ -1805,7 +1897,7 @@
|
|
|
1805
1897
|
});
|
|
1806
1898
|
});
|
|
1807
1899
|
};
|
|
1808
|
-
var useStyles$
|
|
1900
|
+
var useStyles$3 = core.makeStyles(function () {
|
|
1809
1901
|
return {
|
|
1810
1902
|
row: {
|
|
1811
1903
|
minHeight: 56
|
|
@@ -1825,7 +1917,7 @@
|
|
|
1825
1917
|
var ShortcutList = function ShortcutList(_a) {
|
|
1826
1918
|
var _b = _a.platform,
|
|
1827
1919
|
platform = _b === void 0 ? 'windows' : _b;
|
|
1828
|
-
var classes = useStyles$
|
|
1920
|
+
var classes = useStyles$3();
|
|
1829
1921
|
var rows = getShortcutList(shortcuts, platform);
|
|
1830
1922
|
return /*#__PURE__*/React__default["default"].createElement(core.List, {
|
|
1831
1923
|
"data-testid": "list-" + platform
|
|
@@ -1862,7 +1954,7 @@
|
|
|
1862
1954
|
}, value === index && children);
|
|
1863
1955
|
};
|
|
1864
1956
|
|
|
1865
|
-
var useStyles$
|
|
1957
|
+
var useStyles$2 = core.makeStyles(function () {
|
|
1866
1958
|
return {
|
|
1867
1959
|
container: {
|
|
1868
1960
|
margin: '0px 20px'
|
|
@@ -1874,7 +1966,7 @@
|
|
|
1874
1966
|
});
|
|
1875
1967
|
|
|
1876
1968
|
var CheatSheet = function CheatSheet() {
|
|
1877
|
-
var classes = useStyles$
|
|
1969
|
+
var classes = useStyles$2();
|
|
1878
1970
|
|
|
1879
1971
|
var _a = __read(React__default["default"].useState(0), 2),
|
|
1880
1972
|
activeTab = _a[0],
|
|
@@ -1907,7 +1999,7 @@
|
|
|
1907
1999
|
})));
|
|
1908
2000
|
};
|
|
1909
2001
|
|
|
1910
|
-
var useStyles = core.makeStyles(function () {
|
|
2002
|
+
var useStyles$1 = core.makeStyles(function () {
|
|
1911
2003
|
return {
|
|
1912
2004
|
backdrop: {
|
|
1913
2005
|
zIndex: 1
|
|
@@ -1916,7 +2008,7 @@
|
|
|
1916
2008
|
});
|
|
1917
2009
|
|
|
1918
2010
|
var UserMenuItemCheatSheet = function UserMenuItemCheatSheet() {
|
|
1919
|
-
var classes = useStyles();
|
|
2011
|
+
var classes = useStyles$1();
|
|
1920
2012
|
|
|
1921
2013
|
var _a = __read(React__default["default"].useState(false), 2),
|
|
1922
2014
|
open = _a[0],
|
|
@@ -2115,23 +2207,15 @@
|
|
|
2115
2207
|
})(core.Slider);
|
|
2116
2208
|
var CustomSlider = function CustomSlider(_a) {
|
|
2117
2209
|
var value = _a.value,
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
orientation = _c === void 0 ? 'vertical' : _c,
|
|
2124
|
-
max = _a.max,
|
|
2125
|
-
min = _a.min,
|
|
2126
|
-
step = _a.step,
|
|
2127
|
-
_d = _a.marks,
|
|
2128
|
-
marks = _d === void 0 ? [] : _d,
|
|
2129
|
-
_e = _a.disabled,
|
|
2130
|
-
disabled = _e === void 0 ? false : _e,
|
|
2131
|
-
ThumbComponent = _a.ThumbComponent; // Add custom class (for bold text) to label adjacent to thumb component.
|
|
2210
|
+
_b = _a.orientation,
|
|
2211
|
+
orientation = _b === void 0 ? 'vertical' : _b,
|
|
2212
|
+
_c = _a.shouldAutoFocus,
|
|
2213
|
+
shouldAutoFocus = _c === void 0 ? false : _c,
|
|
2214
|
+
props = __rest(_a, ["value", "orientation", "shouldAutoFocus"]); // Add custom class (for bold text) to label adjacent to thumb component.
|
|
2132
2215
|
// Material UI doesn't support highlighing only adjacent label
|
|
2133
2216
|
// when track is highlighted everywhere below selected value.
|
|
2134
2217
|
|
|
2218
|
+
|
|
2135
2219
|
var element = React__namespace.useRef(null);
|
|
2136
2220
|
var themeContext = theme.useThemeContext();
|
|
2137
2221
|
React__namespace.useEffect(function () {
|
|
@@ -2145,21 +2229,99 @@
|
|
|
2145
2229
|
rest.forEach(function (element) {
|
|
2146
2230
|
return element.classList.remove('selectedLabel');
|
|
2147
2231
|
});
|
|
2148
|
-
}, [value, themeContext.isDark]);
|
|
2149
|
-
|
|
2232
|
+
}, [value, themeContext.isDark]); // autofocus
|
|
2233
|
+
|
|
2234
|
+
React__namespace.useEffect(function () {
|
|
2235
|
+
if (shouldAutoFocus && element.current) {
|
|
2236
|
+
var thumb = element.current.querySelector('.MuiSlider-thumb');
|
|
2237
|
+
thumb.focus();
|
|
2238
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2239
|
+
|
|
2240
|
+
}, []);
|
|
2241
|
+
return /*#__PURE__*/React__namespace.createElement(CustomSliderComponent, __assign({
|
|
2150
2242
|
ref: element,
|
|
2151
|
-
"data-testid": dataTestId,
|
|
2152
|
-
orientation: orientation,
|
|
2153
2243
|
value: value,
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2244
|
+
orientation: orientation
|
|
2245
|
+
}, props));
|
|
2246
|
+
};
|
|
2247
|
+
|
|
2248
|
+
var Z_INDEX_TOP = 600;
|
|
2249
|
+
var Z_INDEX_BOTTOM = 550;
|
|
2250
|
+
var useStyles = core.makeStyles(function (theme) {
|
|
2251
|
+
return core.createStyles({
|
|
2252
|
+
draggableDialog: function draggableDialog(props) {
|
|
2253
|
+
return {
|
|
2254
|
+
width: props.dialogWidth ? props.dialogWidth : '90%',
|
|
2255
|
+
position: 'absolute',
|
|
2256
|
+
top: props.dialogTop ? props.dialogTop : '2%',
|
|
2257
|
+
left: '5%',
|
|
2258
|
+
maxWidth: '90%',
|
|
2259
|
+
maxHeight: props.dialogMaxHeight ? props.dialogMaxHeight : '95%',
|
|
2260
|
+
display: 'flex',
|
|
2261
|
+
flexDirection: 'column',
|
|
2262
|
+
overflow: 'hidden',
|
|
2263
|
+
zIndex: props.zIndex
|
|
2264
|
+
};
|
|
2265
|
+
},
|
|
2266
|
+
dialogContent: {
|
|
2267
|
+
marginTop: '40px',
|
|
2268
|
+
overflowY: 'scroll'
|
|
2269
|
+
},
|
|
2270
|
+
dialogHeader: function dialogHeader(props) {
|
|
2271
|
+
return {
|
|
2272
|
+
position: 'absolute',
|
|
2273
|
+
display: 'flex',
|
|
2274
|
+
justifyContent: 'space-between',
|
|
2275
|
+
alignItems: 'center',
|
|
2276
|
+
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)',
|
|
2277
|
+
width: '100%',
|
|
2278
|
+
backgroundColor: '#ffffff',
|
|
2279
|
+
zIndex: props.zIndex + 10
|
|
2280
|
+
};
|
|
2281
|
+
},
|
|
2282
|
+
iconClose: {
|
|
2283
|
+
padding: theme.spacing(1)
|
|
2284
|
+
},
|
|
2285
|
+
iconDrag: {
|
|
2286
|
+
padding: theme.spacing(1)
|
|
2287
|
+
}
|
|
2162
2288
|
});
|
|
2289
|
+
});
|
|
2290
|
+
|
|
2291
|
+
var DraggableDialog = function DraggableDialog(_a) {
|
|
2292
|
+
var handleClose = _a.handleClose,
|
|
2293
|
+
title = _a.title,
|
|
2294
|
+
children = _a.children,
|
|
2295
|
+
_b = _a.dialogStyling,
|
|
2296
|
+
dialogStyling = _b === void 0 ? {} : _b,
|
|
2297
|
+
_c = _a.zIndex,
|
|
2298
|
+
zIndex = _c === void 0 ? Z_INDEX_TOP : _c;
|
|
2299
|
+
var classes = useStyles(__assign(__assign({}, dialogStyling), {
|
|
2300
|
+
zIndex: zIndex
|
|
2301
|
+
}));
|
|
2302
|
+
return /*#__PURE__*/React__namespace.createElement(Draggable__default["default"], {
|
|
2303
|
+
handle: "strong",
|
|
2304
|
+
bounds: "body"
|
|
2305
|
+
}, /*#__PURE__*/React__namespace.createElement(core.Paper, {
|
|
2306
|
+
"data-testid": title,
|
|
2307
|
+
className: classes.draggableDialog,
|
|
2308
|
+
elevation: 24
|
|
2309
|
+
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
2310
|
+
className: classes.dialogHeader
|
|
2311
|
+
}, /*#__PURE__*/React__namespace.createElement("strong", null, /*#__PURE__*/React__namespace.createElement(core.IconButton, {
|
|
2312
|
+
"data-testid": "dragDialog",
|
|
2313
|
+
size: "small",
|
|
2314
|
+
className: classes.iconDrag
|
|
2315
|
+
}, /*#__PURE__*/React__namespace.createElement(icons.DragIndicator, null))), /*#__PURE__*/React__namespace.createElement(core.Typography, {
|
|
2316
|
+
variant: "subtitle1"
|
|
2317
|
+
}, title), /*#__PURE__*/React__namespace.createElement(core.IconButton, {
|
|
2318
|
+
"data-testid": "closeDialog",
|
|
2319
|
+
size: "small",
|
|
2320
|
+
onClick: handleClose,
|
|
2321
|
+
className: classes.iconClose
|
|
2322
|
+
}, /*#__PURE__*/React__namespace.createElement(icons.Close, null))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
2323
|
+
className: classes.dialogContent
|
|
2324
|
+
}, children)));
|
|
2163
2325
|
};
|
|
2164
2326
|
|
|
2165
2327
|
/* *
|
|
@@ -2203,6 +2365,8 @@
|
|
|
2203
2365
|
exports.ConfirmationServiceProvider = ConfirmationServiceProvider;
|
|
2204
2366
|
exports.CustomSlider = CustomSlider;
|
|
2205
2367
|
exports.Draggable = DraggableComponent$1;
|
|
2368
|
+
exports.DraggableDialog = DraggableDialog;
|
|
2369
|
+
exports.ErrorBoundary = ErrorBoundary;
|
|
2206
2370
|
exports.HIDDEN_INPUT_HELPER_IS_DRAFT = HIDDEN_INPUT_HELPER_IS_DRAFT;
|
|
2207
2371
|
exports.Resizable = ResizeComponent;
|
|
2208
2372
|
exports.StatusTag = StatusTag;
|
|
@@ -2213,6 +2377,8 @@
|
|
|
2213
2377
|
exports.UserMenu = UserMenu;
|
|
2214
2378
|
exports.UserMenuItemCheatSheet = UserMenuItemCheatSheet;
|
|
2215
2379
|
exports.UserMenuItemTheme = MenuItemTheme;
|
|
2380
|
+
exports.Z_INDEX_BOTTOM = Z_INDEX_BOTTOM;
|
|
2381
|
+
exports.Z_INDEX_TOP = Z_INDEX_TOP;
|
|
2216
2382
|
exports.getAxiosErrorMessage = getAxiosErrorMessage;
|
|
2217
2383
|
exports.getInitials = getInitials;
|
|
2218
2384
|
exports.isAxiosError = isAxiosError;
|