@longline/aqua-ui 1.0.323 → 1.0.325
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/containers/Anchor/Anchor.js +1 -1
- package/containers/Dock/Dock.js +1 -1
- package/containers/Dock/Dockable.js +1 -1
- package/containers/DragBar/DragBar.js +1 -1
- package/containers/Form/elements/BoxWrapper.js +1 -1
- package/containers/Form/elements/Hint.js +1 -1
- package/containers/Form/elements/SimpleWrapper.js +1 -1
- package/containers/GlassPane/GlassPane.js +1 -1
- package/containers/InfoBox/InfoBox.js +1 -1
- package/containers/InfoBox/elements/Content.js +1 -1
- package/containers/InfoBox/elements/Footer.js +1 -1
- package/containers/InfoBox/elements/Header.js +1 -1
- package/containers/InfoBox/elements/Row.js +1 -1
- package/containers/List/List.js +1 -1
- package/containers/List/ListCell.js +1 -1
- package/containers/List/ListRow.js +1 -1
- package/containers/Message/Message.js +1 -1
- package/containers/Openable/Openable.js +1 -1
- package/containers/PublicRoute/Help.js +1 -1
- package/containers/PublicRoute/PublicRoute.js +1 -1
- package/containers/Tabs/Pane.js +1 -1
- package/containers/Tabs/Tabs.js +1 -1
- package/controls/Chip/Chip.js +1 -1
- package/controls/CircularProgress/CircularProgress.js +1 -1
- package/controls/Dropzone/Dropzone.js +1 -1
- package/controls/Fab/Fab.js +1 -1
- package/controls/Ghost/Ghost.js +1 -1
- package/controls/Gradient/Gradient.js +1 -1
- package/controls/Histogram/Histogram.js +1 -1
- package/controls/Icon/Icon.js +1 -1
- package/controls/Key/Key.js +1 -1
- package/controls/LinearChart/LinearChart.js +1 -1
- package/controls/ListButton/ListButton.js +1 -1
- package/controls/ListView/ListView.js +1 -1
- package/controls/Mouse/Mouse.js +1 -1
- package/controls/PrimaryButton/PrimaryButton.js +1 -1
- package/controls/Progress/Progress.js +1 -1
- package/controls/SecondaryButton/SecondaryButton.js +1 -1
- package/controls/TabBar/Tab.js +1 -1
- package/controls/TabBar/TabBar.js +1 -1
- package/controls/TabBar/Underliner.js +2 -2
- package/controls/TertiaryButton/TertiaryButton.js +1 -1
- package/controls/ToggleButton/ToggleButton.js +1 -1
- package/controls/View/EllipsizedContent.js +1 -1
- package/controls/View/ScrollingContent.js +1 -1
- package/controls/View/View.js +1 -1
- package/inputs/DateInput/Calendar.js +1 -1
- package/inputs/DateInput/DateInput.js +1 -1
- package/inputs/DateInput/Day.js +1 -1
- package/inputs/Dropdown/Dropdown.js +1 -1
- package/inputs/Editor/Editor.js +1 -1
- package/inputs/Input/Input.js +1 -1
- package/inputs/Input/InputWrapper.js +1 -1
- package/inputs/MonthRange/MonthRange.js +1 -1
- package/inputs/Selector/Selector.js +1 -1
- package/inputs/Slider/Slider.js +1 -1
- package/inputs/Textarea/Textarea.js +1 -1
- package/map/Map/Map.js +1 -1
- package/modules/MainMenu/MainMenu.js +1 -1
- package/modules/Public/Public.js +1 -1
- package/modules/Public/elements/Body.js +1 -1
- package/modules/Public/elements/Footer.js +1 -1
- package/modules/Public/elements/Header.js +1 -1
- package/modules/Public/elements/Hint.js +1 -1
- package/modules/Root/Root.js +1 -1
- package/package.json +1 -1
- package/services/Dialog/DialogBackground.js +1 -1
- package/services/Dialog/DialogContent.js +1 -1
- package/services/Dialog/DialogFooter.js +1 -1
- package/services/Dialog/DialogHeader.js +1 -1
- package/services/Dialog/DialogWindow.js +1 -1
- package/services/Dialog/XhrDialog.d.ts +1 -1
- package/services/Dialog/XhrDialog.js +18 -7
|
@@ -101,7 +101,7 @@ var Anchor = function (props) {
|
|
|
101
101
|
React.useEffect(function () {
|
|
102
102
|
updatePosition();
|
|
103
103
|
}, [props.horizontal, props.vertical]);
|
|
104
|
-
return (React.createElement("div", { ref: anchorRef, style: {
|
|
104
|
+
return (React.createElement("div", { "data-testid": "Anchor", ref: anchorRef, style: {
|
|
105
105
|
position: 'absolute',
|
|
106
106
|
left: (_a = props.left) !== null && _a !== void 0 ? _a : 'auto',
|
|
107
107
|
top: (_b = props.top) !== null && _b !== void 0 ? _b : 'auto',
|
package/containers/Dock/Dock.js
CHANGED
|
@@ -27,7 +27,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
27
|
import * as React from 'react';
|
|
28
28
|
import styled, { css } from 'styled-components';
|
|
29
29
|
var DockBase = function (props) {
|
|
30
|
-
return React.createElement("div", { className: props.className, role: "presentation" }, props.children);
|
|
30
|
+
return React.createElement("div", { "data-testid": "Dock", className: props.className, role: "presentation" }, props.children);
|
|
31
31
|
};
|
|
32
32
|
var DockStyled = styled(DockBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Position and size:\n position: absolute;\n left: 0;\n right: ", "px;\n top: ", "px;\n bottom: ", "px;\n box-sizing: border-box;\n // zIndex >= 2 will overlap Mapbox logo.\n z-index: 2;\n\n // Appearance:\n background-color: transparent;\n ", "\n pointer-events: none !important; /* Map will set pointer-events:all to its children. */\n\n // Content:\n display: flex;\n flex-direction: column;\n align-items: end;\n gap: ", "px;\n"], ["\n // Position and size:\n position: absolute;\n left: 0;\n right: ", "px;\n top: ", "px;\n bottom: ", "px;\n box-sizing: border-box;\n // zIndex >= 2 will overlap Mapbox logo.\n z-index: 2;\n\n // Appearance:\n background-color: transparent;\n ", "\n pointer-events: none !important; /* Map will set pointer-events:all to its children. */\n\n // Content:\n display: flex;\n flex-direction: column;\n align-items: end;\n gap: ", "px;\n"
|
|
33
33
|
/**
|
|
@@ -103,7 +103,7 @@ var DockableBase = function (props) {
|
|
|
103
103
|
style.left = "".concat(x + offsetX, "px");
|
|
104
104
|
style.top = "".concat(y + offsetY, "px");
|
|
105
105
|
}
|
|
106
|
-
return (React.createElement("div", { style: style, className: "".concat(props.className, " ").concat(offscreen ? 'offscreen' : ''), ref: containerRef }, props.children));
|
|
106
|
+
return (React.createElement("div", { "data-testid": "Dockable", style: style, className: "".concat(props.className, " ").concat(offscreen ? 'offscreen' : ''), ref: containerRef }, props.children));
|
|
107
107
|
};
|
|
108
108
|
var DockableStyled = styled(DockableBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: white;\n z-index: ", ";\n ", "\n"], ["\n color: white;\n z-index: ", ";\n ", "\n"
|
|
109
109
|
/**
|
|
@@ -71,7 +71,7 @@ var DragBarBase = function (props) {
|
|
|
71
71
|
behavior: props.behavior
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
|
-
return (React.createElement("div", { className: props.className },
|
|
74
|
+
return (React.createElement("div", { "data-testid": "DragBar", className: props.className },
|
|
75
75
|
props.navigation && React.createElement(NavButton, { onClick: function () { return handleNavigate(-props.navigationDelta); } },
|
|
76
76
|
React.createElement(Icon, { url: SVG.Icons.Chevron })),
|
|
77
77
|
React.createElement(Scroller, { onMouseDown: handleMouseDown, ref: scrollerRef },
|
|
@@ -29,7 +29,7 @@ var BoxWrapperBase = function (props) {
|
|
|
29
29
|
clickableChild.focus();
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
return (React.createElement("div", { className: props.className, onClick: handleClick, ref: wrapper },
|
|
32
|
+
return (React.createElement("div", { "data-testid": "BoxWrapper", className: props.className, onClick: handleClick, ref: wrapper },
|
|
33
33
|
props.ghost && React.createElement(Ghost, { style: { position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, zIndex: 100 } }),
|
|
34
34
|
props.label,
|
|
35
35
|
React.createElement(Control, null, props.children),
|
|
@@ -5,7 +5,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
var HintBase = function (props) {
|
|
8
|
-
return React.createElement("div", { tabIndex: -1, className: props.className }, props.children);
|
|
8
|
+
return React.createElement("div", { "data-testid": "Hint", tabIndex: -1, className: props.className }, props.children);
|
|
9
9
|
};
|
|
10
10
|
var Hint = styled(HintBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n user-select: none;\n // Hints don't wrap and are ellipsized:\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n"], ["\n font: ", ";\n color: ", ";\n user-select: none;\n // Hints don't wrap and are ellipsized:\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n"])), function (p) { return p.theme.font.bodySmall; }, function (p) { return p.error ? p.theme.colors.negative : p.theme.colors.font; });
|
|
11
11
|
export { Hint };
|
|
@@ -7,7 +7,7 @@ import styled, { css } from 'styled-components';
|
|
|
7
7
|
import { Label } from './Label';
|
|
8
8
|
import { Hint } from './Hint';
|
|
9
9
|
var SimpleWrapperBase = function (props) {
|
|
10
|
-
return React.createElement("div", { className: props.className },
|
|
10
|
+
return React.createElement("div", { "data-testid": "SimpleWrapper", className: props.className },
|
|
11
11
|
props.label,
|
|
12
12
|
props.children,
|
|
13
13
|
props.hint);
|
|
@@ -42,7 +42,7 @@ var GlassPaneBase = React.memo(function (props) {
|
|
|
42
42
|
return function () { };
|
|
43
43
|
}
|
|
44
44
|
}, [props.animated]);
|
|
45
|
-
return (React.createElement("div", { className: "".concat(props.className, " ").concat(mounted ? 'mounted' : '') }, props.children));
|
|
45
|
+
return (React.createElement("div", { "data-testid": "GlassPane", className: "".concat(props.className, " ").concat(mounted ? 'mounted' : '') }, props.children));
|
|
46
46
|
});
|
|
47
47
|
var GRADIENT_0 = "rgb(255,255,255,0.6)";
|
|
48
48
|
var GRADIENT_1 = "rgb(255,255,255,0.3)";
|
|
@@ -33,7 +33,7 @@ import { InfoBoxRow } from './elements/Row';
|
|
|
33
33
|
* An `InfoBox` is a glass pane with an optional header and footer.
|
|
34
34
|
*/
|
|
35
35
|
var InfoBoxBase = function (props) {
|
|
36
|
-
return React.createElement("div", { className: props.className, role: "region", "aria-label": "Information" },
|
|
36
|
+
return React.createElement("div", { "data-testid": "InfoBox", className: props.className, role: "region", "aria-label": "Information" },
|
|
37
37
|
React.createElement(Content, { header: props.header, padded: props.padded, minHeight: props.minHeight, scroll: props.scroll }, props.children),
|
|
38
38
|
props.footer && React.createElement(Footer, null, props.footer));
|
|
39
39
|
};
|
|
@@ -19,7 +19,7 @@ import { OverlayScrollbarsComponent } from "overlayscrollbars-react";
|
|
|
19
19
|
import { GlassPane } from '../../GlassPane';
|
|
20
20
|
import { Header } from './Header';
|
|
21
21
|
var ContentBase = function (props) {
|
|
22
|
-
return React.createElement("div", { className: props.className },
|
|
22
|
+
return React.createElement("div", { "data-testid": "InfoBox.Content", className: props.className },
|
|
23
23
|
React.createElement(GlassPane, { bordered: true },
|
|
24
24
|
props.header && React.createElement(Header, null, props.header),
|
|
25
25
|
React.createElement(PaneContent, null,
|
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled from "styled-components";
|
|
18
18
|
var FooterBase = function (props) {
|
|
19
|
-
return React.createElement("div", { className: props.className }, props.children);
|
|
19
|
+
return React.createElement("div", { "data-testid": "InfoBox.Footer", className: props.className }, props.children);
|
|
20
20
|
};
|
|
21
21
|
var FooterStyled = styled(FooterBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Position and size:\n position: relative;\n width: 100%;\n padding-top: 8px;\n padding-left: 16px;\n padding-right: 16px;\n box-sizing: border-box;\n \n // Appearance;\n color: ", ";\n font: ", ";\n\n // Content:\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 16px;\n\n // While InfoBox blocks all pointer events, contents inside\n // the footer must receive events:\n & > * {\n pointer-events: all;\n }\n"], ["\n // Position and size:\n position: relative;\n width: 100%;\n padding-top: 8px;\n padding-left: 16px;\n padding-right: 16px;\n box-sizing: border-box;\n \n // Appearance;\n color: ", ";\n font: ", ";\n\n // Content:\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 16px;\n\n // While InfoBox blocks all pointer events, contents inside\n // the footer must receive events:\n & > * {\n pointer-events: all;\n }\n"])), function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.font.bodyMedium; });
|
|
22
22
|
var Footer = function (props) { return React.createElement(FooterStyled, __assign({}, props)); };
|
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled from "styled-components";
|
|
18
18
|
var HeaderBase = function (props) {
|
|
19
|
-
return React.createElement("div", { className: props.className }, props.children);
|
|
19
|
+
return React.createElement("div", { "data-testid": "InfoBox.Header", className: props.className }, props.children);
|
|
20
20
|
};
|
|
21
21
|
var HeaderStyled = styled(HeaderBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Size:\n box-sizing: border-box;\n padding-left: 22px;\n padding-right: 22px;\n padding-top: 12px;\n padding-bottom: 12px;\n\n // Appearance:\n background: ", ";\n color: ", ";\n font: ", ";\n \n // Content:\n display: flex;\n flex-direction: column;\n gap: 3px;\n"], ["\n // Size:\n box-sizing: border-box;\n padding-left: 22px;\n padding-right: 22px;\n padding-top: 12px;\n padding-bottom: 12px;\n\n // Appearance:\n background: ", ";\n color: ", ";\n font: ", ";\n \n // Content:\n display: flex;\n flex-direction: column;\n gap: 3px;\n"])), function (p) { return p.theme.colors.primary[5]; }, function (p) { return p.theme.colors.neutral[100]; }, function (p) { return p.theme.font.headingMedium; });
|
|
22
22
|
var Header = function (props) { return React.createElement(HeaderStyled, __assign({}, props)); };
|
|
@@ -9,7 +9,7 @@ import { Ghost } from '../../../controls/Ghost';
|
|
|
9
9
|
* An `InfoBoxRow` shows a name-value combination, in row format.
|
|
10
10
|
*/
|
|
11
11
|
var InfoBoxRow = function (props) {
|
|
12
|
-
return React.createElement(Wrapper,
|
|
12
|
+
return React.createElement(Wrapper, { "data-testid": "InfoBox.Row" },
|
|
13
13
|
props.ghost === true && React.createElement(Ghost, { style: { position: 'absolute', left: 0, top: '3px', right: 0, bottom: '3px' } }),
|
|
14
14
|
props.ghost !== true && React.createElement(React.Fragment, null,
|
|
15
15
|
React.createElement(Name, null, props.name),
|
package/containers/List/List.js
CHANGED
|
@@ -19,7 +19,7 @@ import { Input } from '../../inputs/Input';
|
|
|
19
19
|
* other code, using the ref, can scroll list items into view.
|
|
20
20
|
*/
|
|
21
21
|
var List = React.forwardRef(function (props, ref) {
|
|
22
|
-
return React.createElement(ListStyled, { className: props.className, tabIndex: -1, "$count": React.Children.count(props.children), "$maxItems": props.maxItems, "$contract": props.contract, "$tall": props.tall },
|
|
22
|
+
return React.createElement(ListStyled, { "data-testid": "List", className: props.className, tabIndex: -1, "$count": React.Children.count(props.children), "$maxItems": props.maxItems, "$contract": props.contract, "$tall": props.tall },
|
|
23
23
|
props.onSearch &&
|
|
24
24
|
React.createElement(SearchBox, { onClick: function (e) { return e.stopPropagation(); } },
|
|
25
25
|
React.createElement(Input, { icon: SVG.Icons.Search, placeholder: props.placeholder, clearable: true, value: props.search, transparent: true, fluid: true, type: "text", onChange: props.onSearch })),
|
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled, { css } from 'styled-components';
|
|
18
18
|
var ListCellBase = function (props) {
|
|
19
|
-
return React.createElement("div", { className: props.className }, props.children);
|
|
19
|
+
return React.createElement("div", { "data-testid": "ListCell", className: props.className }, props.children);
|
|
20
20
|
};
|
|
21
21
|
var ListCellStyled = styled(ListCellBase)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n ", ";\n ", "\n\n // Content alignment:\n text-align: ", ";\n\n // Text is truncated with an ellipsis\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n ", ";\n ", ";\n ", "\n\n // Content alignment:\n text-align: ", ";\n\n // Text is truncated with an ellipsis\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (p) { return p.width && typeof p.width === 'string' && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["width: ", ";"], ["width: ", ";"])), p.width); }, function (p) { return p.width && typeof p.width !== 'string' && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["flex: ", ";"], ["flex: ", ";"])), p.width); }, function (p) { return !p.width && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["flex: 1;"], ["flex: 1;"]))); }, function (p) { return p.align === 'right' ? 'right' : 'left'; });
|
|
22
22
|
var ListCell = function (props) { return React.createElement(ListCellStyled, __assign({}, props)); };
|
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled, { css } from 'styled-components';
|
|
18
18
|
var ListRowBase = function (props) {
|
|
19
|
-
return React.createElement("div", { className: props.className, onClick: props.disabled ? null : function (e) { return props.onClick(e); } }, props.children);
|
|
19
|
+
return React.createElement("div", { "data-testid": "ListRow", className: props.className, onClick: props.disabled ? null : function (e) { return props.onClick(e); } }, props.children);
|
|
20
20
|
};
|
|
21
21
|
var ListRowStyled = styled(ListRowBase)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n padding-left: 16px;\n padding-right: 16px;\n min-height: 42px;\n user-select: none;\n outline: none;\n color: ", ";\n\n // Entire row is clickable:\n cursor: ", ";\n\n // Cells are flex-aligned:\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: ", "px;\n\n // Background color on hover:\n ", "\n\n ", "\n"], ["\n padding-left: 16px;\n padding-right: 16px;\n min-height: 42px;\n user-select: none;\n outline: none;\n color: ", ";\n\n // Entire row is clickable:\n cursor: ", ";\n\n // Cells are flex-aligned:\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: ", "px;\n\n // Background color on hover:\n ", "\n\n ", "\n"])), function (p) { return p.theme.colors.neutral[30]; }, function (p) { return (p.onClick && !p.disabled) ? 'pointer' : 'auto'; }, function (p) { return p.gap; }, function (p) { return !p.disabled && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &:hover {\n background-color: ", ";\n }\n\n // Background color on pressed:\n ", "\n\n ", "\n "], ["\n &:hover {\n background-color: ", ";\n }\n\n // Background color on pressed:\n ", "\n\n ", "\n "])), function (p) { return p.theme.colors.neutral[95]; }, p.onClick && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &:active {\n background-color: rgb(from ", " r g b / 65%) !important;\n color: ", ";\n }\n "], ["\n &:active {\n background-color: rgb(from ", " r g b / 65%) !important;\n color: ", ";\n }\n "])), function (p) { return p.theme.colors.primary[2]; }, function (p) { return p.theme.colors.neutral[100]; }), p.active && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: rgb(from ", " r g b / 45%) !important;\n color: ", ";\n "], ["\n background-color: rgb(from ", " r g b / 45%) !important;\n color: ", ";\n "])), function (p) { return p.theme.colors.primary[2]; }, function (p) { return p.theme.colors.neutral[100]; })); }, function (p) { return p.disabled && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), function (p) { return p.theme.colors.neutral[50]; }); });
|
|
22
22
|
var ListRow = function (props) { return React.createElement(ListRowStyled, __assign({}, props)); };
|
|
@@ -19,7 +19,7 @@ import { NoData } from './NoData';
|
|
|
19
19
|
import { NoFilteredData } from './NoFilteredData';
|
|
20
20
|
import { Error } from './Error';
|
|
21
21
|
var MessageBase = function (props) {
|
|
22
|
-
return React.createElement("div", { className: props.className }, props.children);
|
|
22
|
+
return React.createElement("div", { "data-testid": "Message", className: props.className }, props.children);
|
|
23
23
|
};
|
|
24
24
|
var MessageStyled = styled(MessageBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Position:\n margin: ", ";\n\n // Content:\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n align-items: center;\n gap: 16px;\n\n // Appearance:\n color: ", ";\n user-select: none;\n padding: 16px 16px 16px 16px;\n border-radius: ", "px;\n background-color: ", "; \n line-height: 22px;\n"], ["\n // Position:\n margin: ", ";\n\n // Content:\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n align-items: center;\n gap: 16px;\n\n // Appearance:\n color: ", ";\n user-select: none;\n padding: 16px 16px 16px 16px;\n border-radius: ", "px;\n background-color: ", "; \n line-height: 22px;\n"
|
|
25
25
|
/**
|
|
@@ -55,7 +55,7 @@ var Openable = function (_a) {
|
|
|
55
55
|
React.useEffect(function () {
|
|
56
56
|
update === null || update === void 0 ? void 0 : update();
|
|
57
57
|
}, [props.open]);
|
|
58
|
-
return (React.createElement("div", { ref: toggleRef },
|
|
58
|
+
return (React.createElement("div", { "data-testid": "Openable", ref: toggleRef },
|
|
59
59
|
props.toggle,
|
|
60
60
|
createPortal(React.createElement(Pane, __assign({ "$open": props.open, "$width": width, style: styles.popper }, attributes.popper, { ref: paneRef }), props.open && props.content), // If in fullscreen mode, Openable must portal into fullscreen element,
|
|
61
61
|
// else content will be hidden.
|
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled from 'styled-components';
|
|
18
18
|
var HelpBase = function (props) {
|
|
19
|
-
return (React.createElement("div", { className: props.className },
|
|
19
|
+
return (React.createElement("div", { "data-testid": "Help", className: props.className },
|
|
20
20
|
React.createElement(Body, null,
|
|
21
21
|
React.createElement(Content, null, props.children))));
|
|
22
22
|
};
|
|
@@ -22,7 +22,7 @@ import { SVG } from '../../svg';
|
|
|
22
22
|
import { ParticleGlobe } from '../../modules/ParticleGlobe/ParticleGlobe';
|
|
23
23
|
var PublicRouteBase = function (props) {
|
|
24
24
|
var _a = React.useState(false), showHelp = _a[0], setShowHelp = _a[1];
|
|
25
|
-
return (React.createElement("div", { className: props.className },
|
|
25
|
+
return (React.createElement("div", { "data-testid": "PublicRoute", className: props.className },
|
|
26
26
|
React.createElement(ParticleGlobe, { landmass: 'day', globe: true, glow: 20, trails: 5, pointSize: 1.0, numParticles: 100000, brightness: 0.9, speedFactor: 750, minLifetime: 1000, maxLifetime: 1000, responsive: true }),
|
|
27
27
|
React.createElement(Content, null,
|
|
28
28
|
React.createElement(Help, { active: showHelp },
|
package/containers/Tabs/Pane.js
CHANGED
|
@@ -22,7 +22,7 @@ var PaneBase = function (props) {
|
|
|
22
22
|
// By default, all children are rendered (but hidden when
|
|
23
23
|
// not active). With nohiddenrender enabled, only the active
|
|
24
24
|
// tab is rendered.
|
|
25
|
-
return (React.createElement("div", { className: props.className }, shouldRender() ? props.children : null));
|
|
25
|
+
return (React.createElement("div", { "data-testid": "Tabs.Pane", className: props.className }, shouldRender() ? props.children : null));
|
|
26
26
|
};
|
|
27
27
|
var PaneStyled = styled(PaneBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n display: ", ";\n height: 100%;\n padding-top: ", "px;\n font: ", ";\n"], ["\n position: relative;\n display: flex;\n flex-direction: column;\n display: ", ";\n height: 100%;\n padding-top: ", "px;\n font: ", ";\n"
|
|
28
28
|
/**
|
package/containers/Tabs/Tabs.js
CHANGED
|
@@ -65,7 +65,7 @@ var TabsBase = function (props) {
|
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
return (React.createElement("div", { className: props.className },
|
|
68
|
+
return (React.createElement("div", { "data-testid": "Tabs", className: props.className },
|
|
69
69
|
React.createElement(TabBar, { active: index, onChange: tabClicked, tabWidth: props.tabWidth }, getTabs()),
|
|
70
70
|
React.createElement(Panes, null, getPanes())));
|
|
71
71
|
};
|
package/controls/Chip/Chip.js
CHANGED
|
@@ -38,7 +38,7 @@ var ChipBase = function (props) {
|
|
|
38
38
|
props.onClick(e);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
return (React.createElement("div", { className: props.className, tabIndex: 0, onKeyDown: handleKeyDown, "aria-disabled": props.disabled },
|
|
41
|
+
return (React.createElement("div", { "data-testid": "Chip", className: props.className, tabIndex: 0, onKeyDown: handleKeyDown, "aria-disabled": props.disabled },
|
|
42
42
|
React.createElement("span", { className: "inner", tabIndex: -1 }, props.children),
|
|
43
43
|
React.createElement("button", { type: "button", onClick: props.onClick, "aria-label": "Remove chip", disabled: props.disabled, "aria-disabled": props.disabled },
|
|
44
44
|
React.createElement("svg", null,
|
|
@@ -32,7 +32,7 @@ var CircularProgressBase = function (props) {
|
|
|
32
32
|
var radius = (props.size - props.strokeWidth) / 2;
|
|
33
33
|
var circumference = 2 * Math.PI * radius;
|
|
34
34
|
var offset = circumference * (1 - value / 100);
|
|
35
|
-
return (React.createElement("div", { className: props.className, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": 100 },
|
|
35
|
+
return (React.createElement("div", { "data-testid": "CircularProgress", className: props.className, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": 100 },
|
|
36
36
|
React.createElement("svg", { width: props.size, height: props.size },
|
|
37
37
|
React.createElement("circle", { cx: props.size / 2, cy: props.size / 2, r: radius, fill: "none", strokeDasharray: circumference, strokeDashoffset: offset, strokeLinecap: "round", transform: "rotate(-90 ".concat(props.size / 2, " ").concat(props.size / 2, ")") })),
|
|
38
38
|
React.createElement(Text, null,
|
|
@@ -53,7 +53,7 @@ var DropzoneBase = function (props) {
|
|
|
53
53
|
setHover(false);
|
|
54
54
|
props.onAddFiles(Array.from(e.dataTransfer.files));
|
|
55
55
|
};
|
|
56
|
-
return (React.createElement("button", { type: "button", className: "".concat(props.className, " ").concat(hover ? 'hover' : ''), onClick: handleClick, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onKeyDown: function (e) {
|
|
56
|
+
return (React.createElement("button", { "data-testid": "Dropzone", type: "button", className: "".concat(props.className, " ").concat(hover ? 'hover' : ''), onClick: handleClick, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onKeyDown: function (e) {
|
|
57
57
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
58
58
|
e.preventDefault();
|
|
59
59
|
handleClick();
|
package/controls/Fab/Fab.js
CHANGED
|
@@ -45,7 +45,7 @@ var FabBase = function (props) {
|
|
|
45
45
|
// Call user's click handler if provided:
|
|
46
46
|
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
47
47
|
};
|
|
48
|
-
return (React.createElement("button", { type: "button", className: props.className, onClick: handleClick, onMouseDown: handleMouseDown, title: props.title, disabled: props.disabled, "aria-disabled": props.disabled },
|
|
48
|
+
return (React.createElement("button", { "data-testid": "Fab", type: "button", className: props.className, onClick: handleClick, onMouseDown: handleMouseDown, title: props.title, disabled: props.disabled, "aria-disabled": props.disabled },
|
|
49
49
|
React.createElement(Icon, __assign({}, (typeof props.icon === 'string' ? { url: props.icon } : props.icon))),
|
|
50
50
|
props.children));
|
|
51
51
|
};
|
package/controls/Ghost/Ghost.js
CHANGED
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled, { keyframes } from 'styled-components';
|
|
18
18
|
var GhostBase = function (props) {
|
|
19
|
-
return React.createElement("div", { className: props.className, style: props.style },
|
|
19
|
+
return React.createElement("div", { "data-testid": "Ghost", className: props.className, style: props.style },
|
|
20
20
|
React.createElement(Gradient1, null),
|
|
21
21
|
React.createElement(Gradient2, null));
|
|
22
22
|
};
|
|
@@ -32,7 +32,7 @@ var GradientBase = function (props) {
|
|
|
32
32
|
console.warn("Gradient: Missing or invalid 'gradientStops'");
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
-
return React.createElement("div", { className: props.className });
|
|
35
|
+
return React.createElement("div", { "data-testid": "Gradient", className: props.className });
|
|
36
36
|
};
|
|
37
37
|
var generateGradient = function (stops) {
|
|
38
38
|
return "linear-gradient(to right, ".concat(stops.map(function (gs) { return "".concat(gs.color, " ").concat(gs.pos * 100, "%"); }).join(', '), ")");
|
|
@@ -40,7 +40,7 @@ var HistogramBase = function (p) {
|
|
|
40
40
|
// Abort if bins are all empty.
|
|
41
41
|
if (maxHeight === 0)
|
|
42
42
|
return React.createElement(HistogramNoData, null, p.nodata);
|
|
43
|
-
return (React.createElement("div", { className: p.className },
|
|
43
|
+
return (React.createElement("div", { "data-testid": "Histogram", className: p.className },
|
|
44
44
|
React.createElement(ChartArea, null,
|
|
45
45
|
React.createElement(Indent, null,
|
|
46
46
|
React.createElement(BarArea, null, p.bins.map(function (bin, idx) {
|
package/controls/Icon/Icon.js
CHANGED
|
@@ -36,7 +36,7 @@ var IconBase = function (props) {
|
|
|
36
36
|
if (props.onClick)
|
|
37
37
|
props.onClick(e);
|
|
38
38
|
};
|
|
39
|
-
return (React.createElement("svg", { className: props.className, onClick: handleClick, focusable: "false", role: "img" },
|
|
39
|
+
return (React.createElement("svg", { "data-testid": "Icon", className: props.className, onClick: handleClick, focusable: "false", role: "img" },
|
|
40
40
|
props.title && React.createElement("title", null, props.title),
|
|
41
41
|
React.createElement("use", { xlinkHref: props.url })));
|
|
42
42
|
};
|
package/controls/Key/Key.js
CHANGED
|
@@ -48,7 +48,7 @@ var KeyBase = function (props) {
|
|
|
48
48
|
}
|
|
49
49
|
return { symbol: sym, wide: isWide };
|
|
50
50
|
}, [props.value, isMac]), symbol = _a.symbol, wide = _a.wide;
|
|
51
|
-
return (React.createElement("span", { className: props.className, style: {
|
|
51
|
+
return (React.createElement("span", { "data-testid": "Key", className: props.className, style: {
|
|
52
52
|
maxWidth: wide ? 'auto' : '16px',
|
|
53
53
|
minWidth: wide ? '36px' : 'auto'
|
|
54
54
|
}, "aria-label": props.value },
|
|
@@ -29,7 +29,7 @@ import styled from 'styled-components';
|
|
|
29
29
|
import { Ghost } from '../Ghost';
|
|
30
30
|
var LinearChartBase = function (props) {
|
|
31
31
|
var percentage = Math.round(Math.max(0, Math.min(100, props.value))) + "%";
|
|
32
|
-
return (React.createElement("div", { className: props.className, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(props.value) },
|
|
32
|
+
return (React.createElement("div", { "data-testid": "LinearChart", className: props.className, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(props.value) },
|
|
33
33
|
props.label && React.createElement(Label, null,
|
|
34
34
|
props.ghost && React.createElement(Ghost, { style: { position: 'absolute', left: 0, top: '2px', right: 0, bottom: '2px' } }),
|
|
35
35
|
!props.ghost && props.label),
|
|
@@ -59,7 +59,7 @@ var ListButtonBase = function (props) {
|
|
|
59
59
|
update();
|
|
60
60
|
};
|
|
61
61
|
return (React.createElement(React.Fragment, null,
|
|
62
|
-
React.createElement("div", { ref: buttonRef, style: { display: 'inline-block' } }, React.cloneElement(props.toggle, { onClick: toggleOpen })),
|
|
62
|
+
React.createElement("div", { "data-testid": "ListButton", ref: buttonRef, style: { display: 'inline-block' } }, React.cloneElement(props.toggle, { onClick: toggleOpen })),
|
|
63
63
|
createPortal(React.createElement(Pane, __assign({ "$open": open, "$width": props.width, style: styles.popper }, attributes.popper, { ref: paneRef }), open && React.createElement(List, { maxItems: 6, contract: true }, props.children)), document.body)));
|
|
64
64
|
};
|
|
65
65
|
var Pane = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n width: ", "px;\n z-index: 2500;\n"], ["\n display: ", ";\n width: ", "px;\n z-index: 2500;\n"
|
|
@@ -120,7 +120,7 @@ var ListViewBase = function (props) {
|
|
|
120
120
|
if (props.ghost) {
|
|
121
121
|
return React.createElement(Ghost, __assign({}, otherProps, { columns: columns }));
|
|
122
122
|
}
|
|
123
|
-
return (React.createElement(Table, __assign({}, otherProps, { data: data, columns: columns, sort: sort, reverse: reverse, onSortClick: handleSort, columnsMode: columnsMode, onOpenColumns: handleColumns, onCheck: props.onCheck ? handleCheck : null, onChangeColumns: handleChangeColumns, onCloseColumns: function () { return setColumnsMode(false); }, onResetColumns: handleResetColumns })));
|
|
123
|
+
return (React.createElement(Table, __assign({ "data-testid": "ListView" }, otherProps, { data: data, columns: columns, sort: sort, reverse: reverse, onSortClick: handleSort, columnsMode: columnsMode, onOpenColumns: handleColumns, onCheck: props.onCheck ? handleCheck : null, onChangeColumns: handleChangeColumns, onCloseColumns: function () { return setColumnsMode(false); }, onResetColumns: handleResetColumns })));
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
126
126
|
* A data table with sorting, column management, virtualization, and row selection.
|
package/controls/Mouse/Mouse.js
CHANGED
|
@@ -27,7 +27,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
27
|
import * as React from 'react';
|
|
28
28
|
import styled, { css } from 'styled-components';
|
|
29
29
|
var MouseBase = function (props) {
|
|
30
|
-
return (React.createElement("svg", { className: props.className, viewBox: "3 0 22 29", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" // Hide from assistive tech (for non-interactive icons)
|
|
30
|
+
return (React.createElement("svg", { "data-testid": "Mouse", className: props.className, viewBox: "3 0 22 29", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" // Hide from assistive tech (for non-interactive icons)
|
|
31
31
|
, focusable: "false" },
|
|
32
32
|
React.createElement("path", { d: "M14 1.75623C8.69307 1.75623 4.375 6.07429 4.375 11.3812V18.3812C4.375 23.6882 8.69307 28.0062 14 28.0062C19.3069 28.0062 23.625 23.6882 23.625 18.3812V11.3812C23.625 6.07429 19.3069 1.75623 14 1.75623ZM21.875 11.3812V12.2562H16.625V10.5062C16.625 9.36653 15.8911 8.40403 14.875 8.04199V3.55756C18.806 3.99506 21.875 7.33546 21.875 11.3812ZM14 9.63123C14.4834 9.63123 14.875 10.0239 14.875 10.5062V13.1312C14.875 13.6136 14.4834 14.0062 14 14.0062C13.5166 14.0062 13.125 13.6136 13.125 13.1312V10.5062C13.125 10.0239 13.5166 9.63123 14 9.63123ZM6.125 11.3812C6.125 7.33546 9.19403 3.99389 13.125 3.55779V8.04223C12.1089 8.40427 11.375 9.36677 11.375 10.5065V12.2565H6.125V11.3812ZM14 26.2562C9.65767 26.2562 6.125 22.7236 6.125 18.3812V14.0062H11.5358C11.8978 15.0223 12.8603 15.7562 14 15.7562C15.1397 15.7562 16.1022 15.0223 16.4642 14.0062H21.875V18.3812C21.875 22.7236 18.3423 26.2562 14 26.2562Z", fill: props.color }),
|
|
33
33
|
props.left && React.createElement("path", { className: "left", d: "M13.125 3.55798C9.19403 3.99408 6.125 7.33565 6.125 11.3814V12.2567H11.375V10.5067C11.375 9.36696 12.1089 8.40446 13.125 8.04242V3.55798Z" }),
|
|
@@ -40,7 +40,7 @@ var PrimaryButtonBase = function (props) {
|
|
|
40
40
|
// An IIconProps was provided. Use it as the props for the icon.
|
|
41
41
|
return React.createElement(Icon, __assign({ color: theme.colors.neutral[100] }, props.icon));
|
|
42
42
|
};
|
|
43
|
-
return (React.createElement("button", { className: props.className, type: "button", onClick: props.onClick, title: props.title, "aria-disabled": props.disabled, disabled: props.disabled },
|
|
43
|
+
return (React.createElement("button", { "data-testid": "PrimaryButton", className: props.className, type: "button", onClick: props.onClick, title: props.title, "aria-disabled": props.disabled, disabled: props.disabled },
|
|
44
44
|
icon(),
|
|
45
45
|
props.children));
|
|
46
46
|
};
|
|
@@ -34,7 +34,7 @@ var getClampedValue = function (value) {
|
|
|
34
34
|
return Math.round(Math.min(100, Math.max(0, value)));
|
|
35
35
|
};
|
|
36
36
|
var ProgressBase = function (props) {
|
|
37
|
-
return React.createElement("div", { className: props.className, role: "progressbar", "aria-valuenow": getClampedValue(props.value), "aria-valuemin": 0, "aria-valuemax": 100 },
|
|
37
|
+
return React.createElement("div", { "data-testid": "Progress", className: props.className, role: "progressbar", "aria-valuenow": getClampedValue(props.value), "aria-valuemin": 0, "aria-valuemax": 100 },
|
|
38
38
|
React.createElement(FillOuter, null,
|
|
39
39
|
React.createElement(FillInner, { style: { transform: "scaleX(".concat(getClampedValue(props.value) / 100, ")") } })),
|
|
40
40
|
props.numbered && React.createElement(Value, null, "".concat(getClampedValue(props.value), "%")));
|
|
@@ -29,7 +29,7 @@ import styled, { css, useTheme } from 'styled-components';
|
|
|
29
29
|
import { Icon } from '../Icon';
|
|
30
30
|
var SecondaryButtonBase = function (props) {
|
|
31
31
|
var theme = useTheme();
|
|
32
|
-
return (React.createElement("button", { type: "button", className: props.className, disabled: props.disabled, onClick: props.onClick, title: props.title, "aria-label": props.title },
|
|
32
|
+
return (React.createElement("button", { "data-testid": "SecondaryButton", type: "button", className: props.className, disabled: props.disabled, onClick: props.onClick, title: props.title, "aria-label": props.title },
|
|
33
33
|
React.createElement(Icon, __assign({ color: theme.colors.neutral[100] }, (typeof props.icon === 'string' ? { url: props.icon } : props.icon)))));
|
|
34
34
|
};
|
|
35
35
|
//
|
package/controls/TabBar/Tab.js
CHANGED
|
@@ -32,7 +32,7 @@ var TabBase = React.forwardRef(function (props, ref) {
|
|
|
32
32
|
if (props.onClick)
|
|
33
33
|
props.onClick();
|
|
34
34
|
};
|
|
35
|
-
return (React.createElement("div", { className: props.className, role: "tab", "aria-selected": props.active, ref: ref, onClick: handleClick },
|
|
35
|
+
return (React.createElement("div", { "data-testid": "TabBar.Tab", className: props.className, role: "tab", "aria-selected": props.active, ref: ref, onClick: handleClick },
|
|
36
36
|
props.ghost && React.createElement(Ghost, { style: { position: 'absolute', left: '5px', top: '9px', right: '5px', bottom: '9px', zIndex: 100 } }),
|
|
37
37
|
React.createElement(Content, null,
|
|
38
38
|
props.children,
|
|
@@ -190,7 +190,7 @@ var TabBarBase = function (props) {
|
|
|
190
190
|
setActive(idx);
|
|
191
191
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, idx);
|
|
192
192
|
};
|
|
193
|
-
return (React.createElement("div", { className: props.className, ref: barRef, "aria-orientation": "horizontal" },
|
|
193
|
+
return (React.createElement("div", { "data-testid": "TabBar", className: props.className, ref: barRef, "aria-orientation": "horizontal" },
|
|
194
194
|
React.createElement(Slider, { ref: sliderRef, onMouseDown: handleMouseDown },
|
|
195
195
|
React.Children.map(props.children, function (child, idx) {
|
|
196
196
|
return React.cloneElement(child, {
|
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled from 'styled-components';
|
|
18
18
|
var UnderlinerBase = React.forwardRef(function (props, ref) {
|
|
19
|
-
return React.createElement("div", { className: props.className, ref: ref });
|
|
19
|
+
return React.createElement("div", { "data-testid": "TabBar.Underliner", className: props.className, ref: ref });
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
22
22
|
* Underliner passes a reference to itself back to its parent.
|
|
@@ -25,6 +25,6 @@ var UnderlinerStyled = styled(UnderlinerBase)(templateObject_1 || (templateObjec
|
|
|
25
25
|
var Underliner = React.forwardRef(function (props, ref) {
|
|
26
26
|
return React.createElement(UnderlinerStyled, __assign({ ref: ref }, props));
|
|
27
27
|
});
|
|
28
|
-
Underliner.displayName = "Underliner";
|
|
28
|
+
Underliner.displayName = "TabBar.Underliner";
|
|
29
29
|
export { Underliner };
|
|
30
30
|
var templateObject_1;
|
|
@@ -39,7 +39,7 @@ var TertiaryButtonBase = React.forwardRef(function (props, ref) {
|
|
|
39
39
|
// An IIconProps was provided. Use it as the props for the icon.
|
|
40
40
|
return React.createElement(Icon, __assign({ color: props.primary ? theme.colors.neutral[100] : theme.colors.primary[3] }, props.icon));
|
|
41
41
|
};
|
|
42
|
-
return (React.createElement("button", { ref: ref, className: props.className, type: "button", disabled: props.disabled, onClick: props.onClick },
|
|
42
|
+
return (React.createElement("button", { "data-testid": "TertiaryButton", ref: ref, className: props.className, type: "button", disabled: props.disabled, onClick: props.onClick },
|
|
43
43
|
icon(),
|
|
44
44
|
props.children));
|
|
45
45
|
});
|
|
@@ -28,7 +28,7 @@ import * as React from 'react';
|
|
|
28
28
|
import styled, { css } from 'styled-components';
|
|
29
29
|
import { Icon } from '../Icon';
|
|
30
30
|
var ToggleButtonBase = React.forwardRef(function (props, ref) {
|
|
31
|
-
return React.createElement("button", { className: props.className, ref: ref, type: "button", onClick: props.onClick, title: props.title, disabled: props.disabled, "aria-pressed": props.active, "aria-expanded": props.open, "aria-disabled": props.disabled },
|
|
31
|
+
return React.createElement("button", { "data-testid": "ToggleButton", className: props.className, ref: ref, type: "button", onClick: props.onClick, title: props.title, disabled: props.disabled, "aria-pressed": props.active, "aria-expanded": props.open, "aria-disabled": props.disabled },
|
|
32
32
|
React.createElement(Icon, { url: props.url }));
|
|
33
33
|
});
|
|
34
34
|
var ToggleButtonStyled = styled(ToggleButtonBase).attrs(function (p) {
|
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled from 'styled-components';
|
|
18
18
|
var EllipsizedContentBase = function (props) {
|
|
19
|
-
return React.createElement("div", { className: props.className },
|
|
19
|
+
return React.createElement("div", { "data-testid": "EllipsizedContent", className: props.className },
|
|
20
20
|
React.createElement(Ellipsize, null, !props.ghost && props.children));
|
|
21
21
|
};
|
|
22
22
|
var Ellipsize = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis; \n width: 100%;\n"], ["\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis; \n width: 100%;\n"])));
|
|
@@ -17,7 +17,7 @@ import * as React from 'react';
|
|
|
17
17
|
import styled from 'styled-components';
|
|
18
18
|
import { OverlayScrollbarsComponent } from "overlayscrollbars-react";
|
|
19
19
|
var ScrollingContentBase = function (props) {
|
|
20
|
-
return React.createElement("div", { className: props.className },
|
|
20
|
+
return React.createElement("div", { "data-testid": "ScrollingContent", className: props.className },
|
|
21
21
|
React.createElement(OverlayScrollbarsComponent, { defer: true, options: { scrollbars: { theme: 'os-theme-light', autoHide: 'leave' } }, style: {
|
|
22
22
|
position: "absolute",
|
|
23
23
|
left: 0,
|
package/controls/View/View.js
CHANGED
|
@@ -31,7 +31,7 @@ import { ScrollingContent } from './ScrollingContent';
|
|
|
31
31
|
import { EllipsizedContent } from './EllipsizedContent';
|
|
32
32
|
import { Ghost } from '../Ghost';
|
|
33
33
|
var ViewBase = function (props) {
|
|
34
|
-
return React.createElement("div", { className: props.className },
|
|
34
|
+
return React.createElement("div", { "data-testid": "View", className: props.className },
|
|
35
35
|
props.ghost && React.createElement(Ghost, { style: { position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, zIndex: 100 } }),
|
|
36
36
|
React.createElement(Label, null, props.badge ? (React.createElement(BadgeWrapper, null,
|
|
37
37
|
props.label,
|
|
@@ -48,7 +48,7 @@ var CalendarBase = function (props) {
|
|
|
48
48
|
days.push(React.createElement(Day, { key: start.getTime(), grey: start.getMonth() != props.date.getMonth() || (props.nofuture && start > today), selected: props.selectedDate && isDateEqual(props.selectedDate, start), today: isDateEqual(today, start), day: start.getDate(), onClick: (!props.nofuture || start <= today) ? handleClick.bind(_this, new Date(start.getTime())) : null }));
|
|
49
49
|
start.setDate(start.getDate() + 1);
|
|
50
50
|
}
|
|
51
|
-
return (React.createElement("div", { className: props.className },
|
|
51
|
+
return (React.createElement("div", { "data-testid": "Calendar", className: props.className },
|
|
52
52
|
["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"].map(function (day, index) {
|
|
53
53
|
return React.createElement(DayName, { key: index }, day);
|
|
54
54
|
}),
|
|
@@ -102,7 +102,7 @@ var DateInputBase = function (props) {
|
|
|
102
102
|
}
|
|
103
103
|
]
|
|
104
104
|
}), styles = _c.styles, attributes = _c.attributes, update = _c.update;
|
|
105
|
-
return (React.createElement("div", { tabIndex: -1, className: props.className, onKeyDown: handleKeyDown, ref: wrapperRef },
|
|
105
|
+
return (React.createElement("div", { "data-testid": "DateInput", tabIndex: -1, className: props.className, onKeyDown: handleKeyDown, ref: wrapperRef },
|
|
106
106
|
React.createElement(Selector, { value: value, disabled: props.disabled, ghost: props.ghost, transparent: props.transparent, error: props.error, clearable: props.clearable, noTabIndex: props.noTabIndex, onChange: handleChange, onClear: (!props.disabled && props.clearable && value != null) ? function () { return handleChange(null); } : null, onCalendar: handleToggle }),
|
|
107
107
|
createPortal(React.createElement(Body, { ref: bodyRef, value: value, open: open, transparent: props.transparent, nofuture: props.nofuture, onSelect: handleSelect, styles: styles, attributes: attributes }), document.body)));
|
|
108
108
|
};
|
package/inputs/DateInput/Day.js
CHANGED
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled, { css } from 'styled-components';
|
|
18
18
|
var DayBase = function (props) {
|
|
19
|
-
return React.createElement("div", { className: props.className, onClick: props.onClick }, props.day);
|
|
19
|
+
return React.createElement("div", { "data-testid": "Day", className: props.className, onClick: props.onClick }, props.day);
|
|
20
20
|
};
|
|
21
21
|
var DayStyled = styled(DayBase)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n // Position & size:\n position: relative;\n box-sizing: border-box;\n width: 40px;\n height: 40px;\n z-index: 0; // for selection circle at z=-1\n\n // Appearance:\n cursor: ", ";\n background-color: ", ";\n color: ", ";\n user-select: none;\n outline: none;\n font: ", ";\n\n // Content:\n display: flex;\n align-items: center;\n justify-content: center; \n\n // Unclickable days have no pointer events.\n pointer-events: ", ";\n\n // Circle (only applies to clickable dates):\n &:before {\n content: '';\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n border-radius: 50%;\n opacity: 0;\n } \n\n // Grey dates do not belong to the current month.\n ", "\n\n // Highlight today's date and selected date.\n ", "\n // Selection circles only appear for \n ", "\n ", " \n\n // Hover:\n &:hover {\n color: ", ";\n &:before {\n background-color: ", ";\n opacity: 1;\n }\n }\n"], ["\n // Position & size:\n position: relative;\n box-sizing: border-box;\n width: 40px;\n height: 40px;\n z-index: 0; // for selection circle at z=-1\n\n // Appearance:\n cursor: ", ";\n background-color: ", ";\n color: ", ";\n user-select: none;\n outline: none;\n font: ", ";\n\n // Content:\n display: flex;\n align-items: center;\n justify-content: center; \n\n // Unclickable days have no pointer events.\n pointer-events: ", ";\n\n // Circle (only applies to clickable dates):\n &:before {\n content: '';\n z-index: -1;\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n border-radius: 50%;\n opacity: 0;\n } \n\n // Grey dates do not belong to the current month.\n ", "\n\n // Highlight today's date and selected date.\n ", "\n // Selection circles only appear for \n ", "\n ", " \n\n // Hover:\n &:hover {\n color: ", ";\n &:before {\n background-color: ", ";\n opacity: 1;\n }\n }\n"
|
|
22
22
|
/**
|
|
@@ -419,7 +419,7 @@ var DropdownBase = function (props) {
|
|
|
419
419
|
sameWidth
|
|
420
420
|
]
|
|
421
421
|
}), styles = _d.styles, attributes = _d.attributes, update = _d.update;
|
|
422
|
-
return (React.createElement("div", { className: props.className, tabIndex: props.disabled ? -1 : 0, ref: wrapperRef, onKeyDown: handleKeyDown, onClick: handleClickDropdown },
|
|
422
|
+
return (React.createElement("div", { "data-testid": "Dropdown", className: props.className, tabIndex: props.disabled ? -1 : 0, ref: wrapperRef, onKeyDown: handleKeyDown, onClick: handleClickDropdown },
|
|
423
423
|
React.createElement(Selection, { open: open, error: props.error, disabled: props.disabled, transparent: props.transparent, ghost: props.ghost, multiple: props.multiple, onClick: handleSelectorClicked, onClear: (props.clearable && !showPlaceholder) ? handleClear : null, placeholder: showPlaceholder }, label),
|
|
424
424
|
createPortal(React.createElement(Body, { ref: bodyRef, open: open, transparent: props.transparent, maxItems: props.maxItems, onSearch: props.onSearch ? handleSearch : null, search: search, tall: props.tall, minBodyWidth: props.minBodyWidth, styles: styles, attributes: attributes }, getBodyChildren()), document.body)));
|
|
425
425
|
};
|
package/inputs/Editor/Editor.js
CHANGED
|
@@ -88,7 +88,7 @@ var EditorBase = function (props) {
|
|
|
88
88
|
EditorRegistry.removeEditor(contentEditableRef.current);
|
|
89
89
|
}; }, []);
|
|
90
90
|
return (React.createElement(InputWrapper, { fluid: props.fluid, ghost: props.ghost, error: props.error, disabled: props.disabled, transparent: props.transparent, flex: props.flex },
|
|
91
|
-
React.createElement("div", { className: props.className, ref: wrapperRef },
|
|
91
|
+
React.createElement("div", { "data-testid": "Editor", className: props.className, ref: wrapperRef },
|
|
92
92
|
React.createElement(OverlayScrollbarsComponent, { className: "scroller ".concat(fullscreen ? 'fullscreen' : ''), defer: true, options: { scrollbars: { theme: 'os-theme-dark', autoHide: 'leave' } } },
|
|
93
93
|
!props.disabled && !props.ghost &&
|
|
94
94
|
React.createElement(MenuBar, { allowFullscreen: props.allowFullscreen, codeButtons: props.codeButtons, fullscreen: fullscreen, editor: editor, onToggleFullscreen: handleToggleFullscreen, openAIurl: props.openAIurl, assemblyAIurl: props.assemblyAIurl, authToken: props.authToken }),
|
package/inputs/Input/Input.js
CHANGED
|
@@ -72,7 +72,7 @@ var InputBase = function (props) {
|
|
|
72
72
|
inputRef.current.select();
|
|
73
73
|
};
|
|
74
74
|
return (React.createElement(InputWrapper, { fluid: props.fluid, ghost: props.ghost, error: props.error, disabled: props.disabled, transparent: props.transparent, icon: props.icon, iconPosition: props.iconPosition, onClear: (props.clearable && props.value) ? handleClear : null, onToggleReveal: props.revealable ? handleToggleReveal : null, revealed: revealed, unit: props.unit },
|
|
75
|
-
React.createElement("input", { className: props.className, ref: inputRef, tabIndex: props.noTabIndex ? -1 : 0, value: value, placeholder: props.placeholder, disabled: props.disabled, type: props.type == 'password' ? (revealed ? 'text' : 'password') : props.type, maxLength: props.maxLength, autoComplete: props.autocomplete, onChange: handleChange, onFocus: props.onFocus })));
|
|
75
|
+
React.createElement("input", { "data-testid": "Input", className: props.className, ref: inputRef, tabIndex: props.noTabIndex ? -1 : 0, value: value, placeholder: props.placeholder, disabled: props.disabled, type: props.type == 'password' ? (revealed ? 'text' : 'password') : props.type, maxLength: props.maxLength, autoComplete: props.autocomplete, onChange: handleChange, onFocus: props.onFocus })));
|
|
76
76
|
};
|
|
77
77
|
var InputStyled = styled(InputBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n // Dimensions:\n width: 100%;\n box-sizing: border-box;\n z-index: 0;\n border: none;\n\n outline: solid 3px rebeccapurple;\n background: transparent;\n padding: 0;\n margin: 0;\n outline: none;\n\n // Font\n font: ", ";\n text-align: left;\n color: ", ";\n\n // Define colors for placeholder text.\n &::placeholder {\n color: rgb(from ", " r g b / 50%);\n opacity: 1 !important; /* Firefox applies opacity */\n }\n\n // Focus:\n &:focus {\n &::placeholder {\n color: rgb(from ", " r g b / 30%);\n }\n }\n\n ", "\n\n // Make sure HTML5 validation does not show up.\n &:valid {\n box-shadow: none;\n }\n &:invalid {\n box-shadow: none;\n }\n\n // Turn off number spinners.\n &[type=number]::-webkit-inner-spin-button, \n &[type=number]::-webkit-outer-spin-button { \n -webkit-appearance: none; /* Webkit (Chrome) */\n margin: 0; \n } \n &[type=number] {\n appearance:textfield;\n -moz-appearance:textfield; /* Firefox */\n } \n"], ["\n // Dimensions:\n width: 100%;\n box-sizing: border-box;\n z-index: 0;\n border: none;\n\n outline: solid 3px rebeccapurple;\n background: transparent;\n padding: 0;\n margin: 0;\n outline: none;\n\n // Font\n font: ", ";\n text-align: left;\n color: ", ";\n\n // Define colors for placeholder text.\n &::placeholder {\n color: rgb(from ", " r g b / 50%);\n opacity: 1 !important; /* Firefox applies opacity */\n }\n\n // Focus:\n &:focus {\n &::placeholder {\n color: rgb(from ", " r g b / 30%);\n }\n }\n\n ", "\n\n // Make sure HTML5 validation does not show up.\n &:valid {\n box-shadow: none;\n }\n &:invalid {\n box-shadow: none;\n }\n\n // Turn off number spinners.\n &[type=number]::-webkit-inner-spin-button, \n &[type=number]::-webkit-outer-spin-button { \n -webkit-appearance: none; /* Webkit (Chrome) */\n margin: 0; \n } \n &[type=number] {\n appearance:textfield;\n -moz-appearance:textfield; /* Firefox */\n } \n"])), function (p) { return p.theme.font.bodyMedium; }, function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.theme.colors.primary[3]; }, function (p) { return p.disabled && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.colors.neutral[50]); });
|
|
78
78
|
var Input = function (props) { return React.createElement(InputStyled, __assign({}, props)); };
|
|
@@ -42,7 +42,7 @@ var InputWrapperBase = function (props) {
|
|
|
42
42
|
else if (props.icon != null) {
|
|
43
43
|
icon = (React.createElement(Icon, __assign({ size: 17, color: (_a = props.icon.color) !== null && _a !== void 0 ? _a : theme.colors.primary[3] }, props.icon)));
|
|
44
44
|
}
|
|
45
|
-
return (React.createElement("div", { className: props.className, onClick: props.onClick },
|
|
45
|
+
return (React.createElement("div", { "data-testid": "InputWrapper", className: props.className, onClick: props.onClick },
|
|
46
46
|
props.ghost && React.createElement(Ghost, { style: { position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, zIndex: 100 } }),
|
|
47
47
|
icon && !props.ghost && props.iconPosition == 'left' && icon,
|
|
48
48
|
React.createElement(Content, null, props.children),
|
|
@@ -80,7 +80,7 @@ var MonthRangeBase = function (props) {
|
|
|
80
80
|
}
|
|
81
81
|
]
|
|
82
82
|
}), styles = _c.styles, attributes = _c.attributes, update = _c.update;
|
|
83
|
-
return (React.createElement("div", { tabIndex: -1, className: props.className, onKeyDown: handleKeyDown, ref: wrapperRef },
|
|
83
|
+
return (React.createElement("div", { "data-testid": "MonthRange", tabIndex: -1, className: props.className, onKeyDown: handleKeyDown, ref: wrapperRef },
|
|
84
84
|
React.createElement(Selector, { value: value, disabled: props.disabled, ghost: props.ghost, transparent: props.transparent, error: props.error, clearable: props.clearable, placeholder: props.placeholder, count: props.count, onClear: (!props.disabled && props.clearable && value != null) ? function () { return handleSelect(null); } : null, onCalendar: handleToggle }),
|
|
85
85
|
createPortal(React.createElement(Body, { ref: bodyRef, value: value, open: open, transparent: props.transparent, onSelect: handleSelect, styles: styles, attributes: attributes }), document.body)));
|
|
86
86
|
};
|
|
@@ -61,7 +61,7 @@ var SelectorBase = function (props) {
|
|
|
61
61
|
default: return React.createElement(Checkbox, __assign({}, otherProps));
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
return (React.createElement("label", { className: props.className },
|
|
64
|
+
return (React.createElement("label", { "data-testid": "Selector", className: props.className },
|
|
65
65
|
React.createElement("input", { ref: inputRef, name: props.name, type: props.radio ? "radio" : "checkbox", value: props.value === null ? undefined : props.value, checked: checked === null ? false : checked, disabled: props.disabled, onChange: handleChange }),
|
|
66
66
|
getWidget(),
|
|
67
67
|
React.createElement("span", null, props.label)));
|
package/inputs/Slider/Slider.js
CHANGED
|
@@ -154,7 +154,7 @@ var SliderBase = function (props) {
|
|
|
154
154
|
// Create a number of ticks and return them.
|
|
155
155
|
return Array(props.ticks).fill(0).map(function (t, idx) { return React.createElement(Tick, { key: idx }); });
|
|
156
156
|
};
|
|
157
|
-
return (React.createElement("div", { className: props.className, onMouseDown: handleMouseDown, onKeyDown: handleKeyDown, tabIndex: 0 },
|
|
157
|
+
return (React.createElement("div", { "data-testid": "Slider", className: props.className, onMouseDown: handleMouseDown, onKeyDown: handleKeyDown, tabIndex: 0 },
|
|
158
158
|
React.createElement(Track, { ref: trackRef },
|
|
159
159
|
React.createElement(TrackFill, { "$disabled": props.disabled, "$error": props.error, ref: trackFillRef }),
|
|
160
160
|
props.ticks && props.hideTicks != true && renderTicks(),
|
|
@@ -42,7 +42,7 @@ var TextareaBase = function (props) {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
return (React.createElement(InputWrapper, { fluid: props.fluid, ghost: props.ghost, error: props.error, disabled: props.disabled, transparent: props.transparent, flex: props.flex },
|
|
45
|
-
React.createElement("textarea", { className: props.className, ref: textareaRef, name: props.name, value: value == null ? '' : value, placeholder: props.placeholder, disabled: props.disabled, tabIndex: 0, onChange: handleChange }),
|
|
45
|
+
React.createElement("textarea", { "data-testid": "Textarea", className: props.className, ref: textareaRef, name: props.name, value: value == null ? '' : value, placeholder: props.placeholder, disabled: props.disabled, tabIndex: 0, onChange: handleChange }),
|
|
46
46
|
props.fullscreen &&
|
|
47
47
|
React.createElement(FullscreenToggle, { onClick: toggleFullscreen },
|
|
48
48
|
React.createElement("use", { xlinkHref: SVG.Icons.Fullscreen }))));
|
package/map/Map/Map.js
CHANGED
|
@@ -218,7 +218,7 @@ var MapBase = function (props) {
|
|
|
218
218
|
if (props.onMove)
|
|
219
219
|
props.onMove(e);
|
|
220
220
|
};
|
|
221
|
-
return (React.createElement(GLMap, __assign({}, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: props.minZoom, maxZoom: props.maxZoom, interactiveLayerIds: props.interactiveLayerIds, doubleClickZoom: props.doubleClickZoom, cursor: props.cursor, preserveDrawingBuffer: props.preserveDrawingBuffer, fadeDuration: props.fadeDuration, onMove: handleMove, onMoveEnd: props.onMoveEnd, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, onLoad: handleLoad, onClick: props.onClick, onDblClick: props.onDblClick }),
|
|
221
|
+
return (React.createElement(GLMap, __assign({ "data-testid": "Map" }, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: props.minZoom, maxZoom: props.maxZoom, interactiveLayerIds: props.interactiveLayerIds, doubleClickZoom: props.doubleClickZoom, cursor: props.cursor, preserveDrawingBuffer: props.preserveDrawingBuffer, fadeDuration: props.fadeDuration, onMove: handleMove, onMoveEnd: props.onMoveEnd, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, onLoad: handleLoad, onClick: props.onClick, onDblClick: props.onDblClick }),
|
|
222
222
|
props.clipped && React.createElement(React.Fragment, null,
|
|
223
223
|
React.createElement(Source, { type: "raster", tiles: ["https://api.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/{z}/{x}/{y}.webp?access_token=".concat(props.token)] },
|
|
224
224
|
React.createElement(Layer, { id: "overlay", type: "raster" })),
|
|
@@ -48,7 +48,7 @@ var MainMenuBase = function (props) {
|
|
|
48
48
|
primaryItems.push(child);
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
-
return (React.createElement("div", { className: props.className },
|
|
51
|
+
return (React.createElement("div", { "data-testid": "MainMenu", className: props.className },
|
|
52
52
|
React.createElement(Top, null, primaryItems),
|
|
53
53
|
React.createElement(Bottom, null, secondaryItems)));
|
|
54
54
|
};
|
package/modules/Public/Public.js
CHANGED
|
@@ -20,7 +20,7 @@ var Public = function (props) {
|
|
|
20
20
|
blurToClose: false,
|
|
21
21
|
});
|
|
22
22
|
return (React.createElement(React.Fragment, null,
|
|
23
|
-
React.createElement(Box, { ref: wrapperRef },
|
|
23
|
+
React.createElement(Box, { "data-testid": "Box", ref: wrapperRef },
|
|
24
24
|
React.createElement(Header, { logoUrl: props.logoUrl, logoAspectRatio: props.logoAspectRatio, onClick: props.hint ? function () { return setShowHint(!showHint); } : null, children: props.header }),
|
|
25
25
|
React.createElement(Body, { height: props.height },
|
|
26
26
|
props.hint && React.createElement(Hint, { active: showHint }, props.hint),
|
|
@@ -5,7 +5,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
var BodyBase = function (props) {
|
|
8
|
-
return React.createElement("div", { className: props.className }, props.children);
|
|
8
|
+
return React.createElement("div", { "data-testid": "Body", className: props.className }, props.children);
|
|
9
9
|
};
|
|
10
10
|
var Body = styled(BodyBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n background: #888;\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px; \n padding: 16px;\n box-sizing: border-box;\n color: #FFFFFF;\n overflow: hidden;\n height: ", ";\n"], ["\n position: relative;\n background: #888;\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px; \n padding: 16px;\n box-sizing: border-box;\n color: #FFFFFF;\n overflow: hidden;\n height: ", ";\n"])), function (p) { return p.theme.radius.normal; }, function (p) { return p.theme.radius.normal; }, function (p) { return p.height ? p.height : "auto"; });
|
|
11
11
|
export { Body };
|
|
@@ -5,7 +5,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
var FooterBase = function (props) {
|
|
8
|
-
return React.createElement("div", { className: props.className }, props.children);
|
|
8
|
+
return React.createElement("div", { "data-testid": "Footer", className: props.className }, props.children);
|
|
9
9
|
};
|
|
10
10
|
var Footer = styled(FooterBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-top: 12px;\n display: flex;\n justify-content: center;\n gap: 16px;\n & > *:only-child {\n margin-left: auto;\n margin-right: auto; /* centers the single child */\n } \n padding-left: 17px;\n padding-right: 17px;\n @media (max-width: 400px) {\n flex-direction: column-reverse;\n justify-content: center;\n gap: 8px;\n align-items: center;\n }\n"], ["\n margin-top: 12px;\n display: flex;\n justify-content: center;\n gap: 16px;\n & > *:only-child {\n margin-left: auto;\n margin-right: auto; /* centers the single child */\n } \n padding-left: 17px;\n padding-right: 17px;\n @media (max-width: 400px) {\n flex-direction: column-reverse;\n justify-content: center;\n gap: 8px;\n align-items: center;\n }\n"])));
|
|
11
11
|
export { Footer };
|
|
@@ -6,7 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
import { SVG } from '../../../svg';
|
|
8
8
|
var HeaderBase = function (props) {
|
|
9
|
-
return React.createElement("div", { className: props.className },
|
|
9
|
+
return React.createElement("div", { "data-testid": "Header", className: props.className },
|
|
10
10
|
React.createElement(Logo, { style: { aspectRatio: props.logoAspectRatio } },
|
|
11
11
|
React.createElement("use", { xlinkHref: props.logoUrl })),
|
|
12
12
|
React.createElement(Controls, null,
|
|
@@ -7,7 +7,7 @@ import styled from 'styled-components';
|
|
|
7
7
|
import { OverlayScrollbarsComponent } from "overlayscrollbars-react";
|
|
8
8
|
import { SVG } from '../../../svg';
|
|
9
9
|
var HintBase = function (props) {
|
|
10
|
-
return React.createElement(OverlayScrollbarsComponent, { element: "div", className: props.className, defer: true, options: { scrollbars: { theme: 'os-theme-light', autoHide: 'leave' } } },
|
|
10
|
+
return React.createElement(OverlayScrollbarsComponent, { "data-testid": "Hint", element: "div", className: props.className, defer: true, options: { scrollbars: { theme: 'os-theme-light', autoHide: 'leave' } } },
|
|
11
11
|
props.children,
|
|
12
12
|
React.createElement(Longline, null,
|
|
13
13
|
React.createElement("use", { xlinkHref: SVG.Other.Longline })));
|
package/modules/Root/Root.js
CHANGED
|
@@ -23,7 +23,7 @@ import { Map } from '../../map/Map';
|
|
|
23
23
|
var RootBase = function (props) {
|
|
24
24
|
var navigate = useNavigate();
|
|
25
25
|
var m = useMatches();
|
|
26
|
-
return (React.createElement("div", { className: props.className },
|
|
26
|
+
return (React.createElement("div", { "data-testid": "Root", className: props.className },
|
|
27
27
|
React.createElement(MainMenu, null,
|
|
28
28
|
React.createElement(MainMenu.Item, { icon: SVG.Menu.MapMarker, onClick: function () { return navigate(""); } }, "Map"),
|
|
29
29
|
React.createElement(MainMenu.Item, { icon: SVG.Menu.Company, onClick: function () { return navigate("company"); } }, "Company"),
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
var DialogBackgroundBase = function (props) {
|
|
8
|
-
return React.createElement("div", { className: "".concat(props.className, " ").concat(props.status) });
|
|
8
|
+
return React.createElement("div", { "data-testid": "DialogBackground", className: "".concat(props.className, " ").concat(props.status) });
|
|
9
9
|
};
|
|
10
10
|
var DialogBackground = styled(DialogBackgroundBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: fixed;\n z-index: 2000;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: #00000080;\n opacity: 1;\n\n /* useTransitionState classes */\n transition: opacity 0.5s ease;\n opacity: 0;\n &.preEnter, &.exiting {\n opacity: 0;\n }\n &.entering {\n opacity: 1;\n }\n &.entered {\n opacity: 1;\n } \n"], ["\n position: fixed;\n z-index: 2000;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: #00000080;\n opacity: 1;\n\n /* useTransitionState classes */\n transition: opacity 0.5s ease;\n opacity: 0;\n &.preEnter, &.exiting {\n opacity: 0;\n }\n &.entering {\n opacity: 1;\n }\n &.entered {\n opacity: 1;\n } \n"])));
|
|
11
11
|
DialogBackground.displayName = "DialogBackground";
|
|
@@ -28,7 +28,7 @@ import * as React from 'react';
|
|
|
28
28
|
import styled from 'styled-components';
|
|
29
29
|
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
|
|
30
30
|
var DialogContentBase = function (props) {
|
|
31
|
-
return React.createElement("div", { className: props.className },
|
|
31
|
+
return React.createElement("div", { "data-testid": "Dialog.Content", className: props.className },
|
|
32
32
|
React.createElement(OverlayScrollbarsComponent, { defer: true, options: { scrollbars: { theme: 'os-theme-light', autoHide: 'leave' } }, style: {
|
|
33
33
|
maxHeight: "inherit",
|
|
34
34
|
boxSizing: 'border-box',
|
|
@@ -27,7 +27,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
27
|
import * as React from 'react';
|
|
28
28
|
import styled from 'styled-components';
|
|
29
29
|
var DialogFooterBase = function (props) {
|
|
30
|
-
return React.createElement("div", { className: "".concat(props.className, " footer") }, props.children);
|
|
30
|
+
return React.createElement("div", { "data-testid": "Dialog.Footer", className: "".concat(props.className, " footer") }, props.children);
|
|
31
31
|
};
|
|
32
32
|
var DialogFooterStyled = styled(DialogFooterBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 16px;\n justify-content: ", ";\n padding: 0 20px 0 20px;\n height: 80px;\n background-color: ", ";\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 16px;\n justify-content: ", ";\n padding: 0 20px 0 20px;\n height: 80px;\n background-color: ", ";\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n"
|
|
33
33
|
/**
|
|
@@ -16,7 +16,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import styled from 'styled-components';
|
|
18
18
|
var DialogHeaderBase = function (props) {
|
|
19
|
-
return React.createElement("div", { className: props.className }, props.children);
|
|
19
|
+
return React.createElement("div", { "data-testid": "Dialog.Header", className: props.className }, props.children);
|
|
20
20
|
};
|
|
21
21
|
var DialogHeaderStyled = styled(DialogHeaderBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 24px 20px 24px 20px;\n font: ", ";\n"], ["\n padding: 24px 20px 24px 20px;\n font: ", ";\n"
|
|
22
22
|
/**
|
|
@@ -9,7 +9,7 @@ var DialogWindowBase = React.forwardRef(function (props, ref) {
|
|
|
9
9
|
// Stop any keyboard interaction propagating to parent components.
|
|
10
10
|
ev.stopPropagation();
|
|
11
11
|
};
|
|
12
|
-
return (React.createElement("div", { className: "".concat(props.className, " ").concat(props.status), ref: ref, onKeyDown: handleKeyDown }, props.children));
|
|
12
|
+
return (React.createElement("div", { "data-testid": "DialogWindow", className: "".concat(props.className, " ").concat(props.status), ref: ref, onKeyDown: handleKeyDown }, props.children));
|
|
13
13
|
});
|
|
14
14
|
var DialogWindow = styled(DialogWindowBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: fixed;\n z-index: 3000;\n left: 50%;\n top: 50%;\n transform-origin: center center;\n border-radius: ", "px;\n background-color: ", ";\n box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5);\n\n ", "\n\n // Font:\n font: ", ";\n color: ", "; \n\n /* Dialog window width:\n * Narrower on small screen. */\n width: ", ";\n @media (max-width: ", "px) {\n width: ", ";\n }\n\n /* useTransitionState classes */\n transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.17,.89,.35,1.67);\n opacity: 0;\n &.preEnter, &.exiting {\n opacity: 0;\n transform: translateX(-50%) translateY(-50%) scale(0.8);\n }\n &.entering {\n opacity: 1;\n transform: translateX(-50%) translateY(-50%);\n }\n &.entered {\n opacity: 1;\n transform: translateX(-50%) translateY(-50%);\n }\n\n"], ["\n position: fixed;\n z-index: 3000;\n left: 50%;\n top: 50%;\n transform-origin: center center;\n border-radius: ", "px;\n background-color: ", ";\n box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5);\n\n ", "\n\n // Font:\n font: ", ";\n color: ", "; \n\n /* Dialog window width:\n * Narrower on small screen. */\n width: ", ";\n @media (max-width: ", "px) {\n width: ", ";\n }\n\n /* useTransitionState classes */\n transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.17,.89,.35,1.67);\n opacity: 0;\n &.preEnter, &.exiting {\n opacity: 0;\n transform: translateX(-50%) translateY(-50%) scale(0.8);\n }\n &.entering {\n opacity: 1;\n transform: translateX(-50%) translateY(-50%);\n }\n &.entered {\n opacity: 1;\n transform: translateX(-50%) translateY(-50%);\n }\n\n"])), function (p) { return p.theme.radius.normal; }, function (p) { return p.inverted ? p.theme.colors.primary[3] : p.theme.colors.neutral[100]; }, function (p) { return p.inverted && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .footer {\n background: ", ";\n } \n "], ["\n .footer {\n background: ", ";\n } \n "])), function (p) { return p.theme.colors.primary[5]; }); }, function (p) { return p.theme.font.bodyMedium; }, function (p) { return p.inverted ? p.theme.colors.neutral[100] : p.theme.colors.neutral[10]; }, function (p) {
|
|
15
15
|
if (!p.width)
|
|
@@ -40,7 +40,7 @@ interface IXhrDialogProps {
|
|
|
40
40
|
* A `Dialog.Xhr` is a preset dialog that takes an `error` object from an
|
|
41
41
|
* Axios request. It then displays a human-readable version of this error.
|
|
42
42
|
* An "OK" button is present that calls `onClose`, and, if `onRetry` is set,
|
|
43
|
-
* a "
|
|
43
|
+
* a "RETRY" button.
|
|
44
44
|
*/
|
|
45
45
|
declare const XhrDialog: {
|
|
46
46
|
({ open, title, ...props }: IXhrDialogProps): React.JSX.Element;
|
|
@@ -18,10 +18,11 @@ import { HttpStatusFormatter } from '../../formatters/HttpStatusFormatter/HttpSt
|
|
|
18
18
|
* A `Dialog.Xhr` is a preset dialog that takes an `error` object from an
|
|
19
19
|
* Axios request. It then displays a human-readable version of this error.
|
|
20
20
|
* An "OK" button is present that calls `onClose`, and, if `onRetry` is set,
|
|
21
|
-
* a "
|
|
21
|
+
* a "RETRY" button.
|
|
22
22
|
*/
|
|
23
23
|
var XhrDialog = function (_a) {
|
|
24
|
-
var _b
|
|
24
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
25
|
+
var _j = _a.open, open = _j === void 0 ? false : _j, _k = _a.title, title = _k === void 0 ? "Server error" : _k, props = __rest(_a, ["open", "title"]);
|
|
25
26
|
var getStatusHeader = function () {
|
|
26
27
|
if (props.error.response) {
|
|
27
28
|
var status_1 = React.createElement(HttpStatusFormatter, { type: "title", status: props.error.response.status });
|
|
@@ -49,14 +50,24 @@ var XhrDialog = function (_a) {
|
|
|
49
50
|
return (React.createElement(Dialog, { inverted: props.inverted, open: open, width: props.width, onClose: props.onClose },
|
|
50
51
|
React.createElement(Dialog.Header, null, title),
|
|
51
52
|
React.createElement(Dialog.Content, null,
|
|
52
|
-
props.error && React.createElement("p", { style: { fontWeight: 700 } },
|
|
53
|
+
props.error && React.createElement("p", { style: { fontWeight: 700 } },
|
|
54
|
+
getStatusHeader(),
|
|
55
|
+
((_b = props.error.response) === null || _b === void 0 ? void 0 : _b.status) && " (".concat(props.error.response.status, ")")),
|
|
53
56
|
props.error && React.createElement("p", null, getStatusText()),
|
|
54
|
-
props.error
|
|
57
|
+
(((_e = (_d = (_c = props.error) === null || _c === void 0 ? void 0 : _c.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.message) || ((_h = (_g = (_f = props.error) === null || _f === void 0 ? void 0 : _f.response) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h.errors)) &&
|
|
55
58
|
React.createElement(React.Fragment, null,
|
|
56
|
-
React.createElement("
|
|
57
|
-
|
|
59
|
+
React.createElement("p", null,
|
|
60
|
+
React.createElement("strong", null, "Details")),
|
|
61
|
+
props.error.response.data.errors
|
|
62
|
+
? Object.entries(props.error.response.data.errors).map(function (_a) {
|
|
63
|
+
var field = _a[0], messages = _a[1];
|
|
64
|
+
return React.createElement("ul", { key: field, style: { margin: '0 0', paddingLeft: '20px' } }, messages.map(function (msg, i) {
|
|
65
|
+
return React.createElement("li", { key: i }, msg);
|
|
66
|
+
}));
|
|
67
|
+
})
|
|
68
|
+
: React.createElement("div", null, props.error.response.data.message))),
|
|
58
69
|
React.createElement(Dialog.Footer, null,
|
|
59
|
-
props.onRetry && React.createElement(PrimaryButton, { onClick: props.onRetry }, "
|
|
70
|
+
props.onRetry && React.createElement(PrimaryButton, { onClick: props.onRetry }, "RETRY"),
|
|
60
71
|
React.createElement(PrimaryButton, { onClick: props.onClose }, "OK"))));
|
|
61
72
|
};
|
|
62
73
|
XhrDialog.displayName = "Dialog.Xhr";
|