@elice/material-runbox 1.260825.0-runboxusability.1 → 1.260825.0-runboxusability.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +7 -2
- package/cjs/components/material-runbox/hooks/index.d.ts +1 -1
- package/cjs/components/material-runbox/hooks/index.js +6 -2
- package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
- package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.js +65 -0
- package/cjs/components/material-runbox/locales/en.json.js +1 -1
- package/cjs/components/material-runbox/locales/ja.json.js +1 -1
- package/cjs/components/material-runbox/locales/ko.json.js +1 -1
- package/cjs/components/material-runbox/locales/th.json.js +1 -1
- package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.js +1 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +4 -3
- package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +6 -3
- package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.js +35 -26
- package/cjs/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +4 -5
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +1 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +1 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +2 -0
- package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +8 -3
- package/es/components/material-runbox/hooks/index.d.ts +1 -1
- package/es/components/material-runbox/hooks/index.js +1 -1
- package/es/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
- package/es/components/material-runbox/hooks/useRunboxNetworkStatus.js +59 -0
- package/es/components/material-runbox/locales/en.json.js +1 -1
- package/es/components/material-runbox/locales/ja.json.js +1 -1
- package/es/components/material-runbox/locales/ko.json.js +1 -1
- package/es/components/material-runbox/locales/th.json.js +1 -1
- package/es/components/material-runbox/status/MaterialRunboxStatusButton.js +1 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +4 -3
- package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +6 -3
- package/es/components/material-runbox/status/MaterialRunboxStatusPopover.js +37 -28
- package/es/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +4 -5
- package/es/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +1 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +1 -0
- package/es/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +3 -1
- package/package.json +5 -5
- package/cjs/components/material-runbox/hooks/useOnlineState.d.ts +0 -12
- package/cjs/components/material-runbox/hooks/useOnlineState.js +0 -50
- package/es/components/material-runbox/hooks/useOnlineState.d.ts +0 -12
- package/es/components/material-runbox/hooks/useOnlineState.js +0 -44
|
@@ -10,24 +10,23 @@ var MaterialRunboxStatusResourceItem = function MaterialRunboxStatusResourceItem
|
|
|
10
10
|
value = _ref.value;
|
|
11
11
|
return jsxs(Stack, {
|
|
12
12
|
direction: "row",
|
|
13
|
-
alignItems: "
|
|
13
|
+
alignItems: "center",
|
|
14
14
|
gap: "0.75rem",
|
|
15
15
|
padding: "0.375rem 0.75rem",
|
|
16
16
|
children: [jsx(Typography, {
|
|
17
17
|
component: "span",
|
|
18
18
|
display: "inline-flex",
|
|
19
|
-
color: "text.
|
|
20
|
-
paddingTop: "0.5rem",
|
|
19
|
+
color: "text.tertiary",
|
|
21
20
|
children: icon
|
|
22
21
|
}), jsxs(Stack, {
|
|
23
22
|
direction: "column",
|
|
24
23
|
children: [jsx(Typography, {
|
|
25
24
|
variant: "body2",
|
|
26
|
-
|
|
25
|
+
color: "text.tertiary",
|
|
27
26
|
children: label
|
|
28
27
|
}), jsx(Typography, {
|
|
29
28
|
variant: "caption",
|
|
30
|
-
color: "text.
|
|
29
|
+
color: "text.tertiary",
|
|
31
30
|
fontFamily: "'JetBrains Mono', monospace",
|
|
32
31
|
children: value
|
|
33
32
|
})]
|
|
@@ -7,7 +7,7 @@ import { useRawEliceIntl } from '@elice/intl';
|
|
|
7
7
|
import { EliceIcon } from '@elice/mui-elements';
|
|
8
8
|
import { useEliceRunboxQuota } from '@elice/runbox-client';
|
|
9
9
|
import { faXmarkLarge } from '@fortawesome/pro-regular-svg-icons';
|
|
10
|
-
import { Popover, Stack, Card, Divider, Button, FormControlLabel, Typography, Checkbox, IconButton } from '@mui/material';
|
|
10
|
+
import { Popover, Fade, Stack, Card, Divider, Button, FormControlLabel, Typography, Checkbox, IconButton } from '@mui/material';
|
|
11
11
|
import { useQuery } from '@tanstack/react-query';
|
|
12
12
|
import { QUOTA_ALMOST_END_MINUTES, QUOTA_PER_SESSION_ALMOST_END_MINUTES } from '../hooks/useRunboxSessionEndWarning.js';
|
|
13
13
|
import MaterialRunboxQuotaAmount from './MaterialRunboxQuotaAmount.js';
|
|
@@ -207,6 +207,7 @@ var MaterialRunboxTimerDetailPopover = function MaterialRunboxTimerDetailPopover
|
|
|
207
207
|
};
|
|
208
208
|
return jsx(Popover, Object.assign({
|
|
209
209
|
open: open,
|
|
210
|
+
TransitionComponent: Fade,
|
|
210
211
|
onClose: onClose
|
|
211
212
|
}, props, {
|
|
212
213
|
children: jsxs(Stack, {
|
|
@@ -217,6 +218,7 @@ var MaterialRunboxTimerDetailPopover = function MaterialRunboxTimerDetailPopover
|
|
|
217
218
|
width: "22rem",
|
|
218
219
|
bgcolor: "background.paper",
|
|
219
220
|
children: [renderHeader(), renderCloseButton(), jsxs(Card, {
|
|
221
|
+
elevation: 0,
|
|
220
222
|
sx: {
|
|
221
223
|
bgcolor: 'background.neutral'
|
|
222
224
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-runbox",
|
|
3
|
-
"version": "1.260825.0-runboxusability.
|
|
3
|
+
"version": "1.260825.0-runboxusability.2",
|
|
4
4
|
"description": "User view and editing components of Elice material runbox",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@elice/api-client": "^1",
|
|
22
22
|
"@elice/intl": "^0",
|
|
23
|
-
"@elice/material-shared-types": "1.260825.0-runboxusability.
|
|
24
|
-
"@elice/material-shared-utils": "1.260825.0-runboxusability.
|
|
23
|
+
"@elice/material-shared-types": "1.260825.0-runboxusability.2",
|
|
24
|
+
"@elice/material-shared-utils": "1.260825.0-runboxusability.2",
|
|
25
25
|
"@elice/mui-elements": "^5",
|
|
26
26
|
"@elice/mui-system": "^5",
|
|
27
27
|
"@elice/mui-x-snackbar": "^5",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@elice/api-client": "1.260529.0",
|
|
53
53
|
"@elice/intl": "0.260526.0",
|
|
54
|
-
"@elice/material-shared-types": "1.260825.0-runboxusability.
|
|
55
|
-
"@elice/material-shared-utils": "1.260825.0-runboxusability.
|
|
54
|
+
"@elice/material-shared-types": "1.260825.0-runboxusability.2",
|
|
55
|
+
"@elice/material-shared-utils": "1.260825.0-runboxusability.2",
|
|
56
56
|
"@elice/mui-elements": "5.251204.0",
|
|
57
57
|
"@elice/mui-system": "5.251204.0",
|
|
58
58
|
"@elice/mui-x-snackbar": "^5.250108.0-controllabel.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whether the browser currently has a network connection.
|
|
3
|
-
*
|
|
4
|
-
* NOTICE: this deliberately does not use `react-use`'s `useNetworkState`.
|
|
5
|
-
* That hook only exists in react-use v17, and consumers of this package do not
|
|
6
|
-
* agree on the major — elice-web still resolves v13, which breaks the build at
|
|
7
|
-
* link time. Reading `navigator.onLine` keeps this working on both.
|
|
8
|
-
*
|
|
9
|
-
* `undefined` means "not known yet" (server render, or no `navigator`), which
|
|
10
|
-
* callers should treat as online rather than as offline.
|
|
11
|
-
*/
|
|
12
|
-
export declare const useOnlineState: () => boolean | undefined;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
|
|
6
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
7
|
-
|
|
8
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
/**
|
|
14
|
-
* Whether the browser currently has a network connection.
|
|
15
|
-
*
|
|
16
|
-
* NOTICE: this deliberately does not use `react-use`'s `useNetworkState`.
|
|
17
|
-
* That hook only exists in react-use v17, and consumers of this package do not
|
|
18
|
-
* agree on the major — elice-web still resolves v13, which breaks the build at
|
|
19
|
-
* link time. Reading `navigator.onLine` keeps this working on both.
|
|
20
|
-
*
|
|
21
|
-
* `undefined` means "not known yet" (server render, or no `navigator`), which
|
|
22
|
-
* callers should treat as online rather than as offline.
|
|
23
|
-
*/
|
|
24
|
-
var useOnlineState = function useOnlineState() {
|
|
25
|
-
var _React$useState = React__default.default.useState(function () {
|
|
26
|
-
return typeof navigator === 'undefined' ? undefined : navigator.onLine;
|
|
27
|
-
}),
|
|
28
|
-
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
29
|
-
online = _React$useState2[0],
|
|
30
|
-
setOnline = _React$useState2[1];
|
|
31
|
-
React__default.default.useEffect(function () {
|
|
32
|
-
var handleOnline = function handleOnline() {
|
|
33
|
-
return setOnline(true);
|
|
34
|
-
};
|
|
35
|
-
var handleOffline = function handleOffline() {
|
|
36
|
-
return setOnline(false);
|
|
37
|
-
};
|
|
38
|
-
window.addEventListener('online', handleOnline);
|
|
39
|
-
window.addEventListener('offline', handleOffline);
|
|
40
|
-
// Catch a change that happened between the initial state and this effect.
|
|
41
|
-
setOnline(navigator.onLine);
|
|
42
|
-
return function () {
|
|
43
|
-
window.removeEventListener('online', handleOnline);
|
|
44
|
-
window.removeEventListener('offline', handleOffline);
|
|
45
|
-
};
|
|
46
|
-
}, []);
|
|
47
|
-
return online;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
exports.useOnlineState = useOnlineState;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whether the browser currently has a network connection.
|
|
3
|
-
*
|
|
4
|
-
* NOTICE: this deliberately does not use `react-use`'s `useNetworkState`.
|
|
5
|
-
* That hook only exists in react-use v17, and consumers of this package do not
|
|
6
|
-
* agree on the major — elice-web still resolves v13, which breaks the build at
|
|
7
|
-
* link time. Reading `navigator.onLine` keeps this working on both.
|
|
8
|
-
*
|
|
9
|
-
* `undefined` means "not known yet" (server render, or no `navigator`), which
|
|
10
|
-
* callers should treat as online rather than as offline.
|
|
11
|
-
*/
|
|
12
|
-
export declare const useOnlineState: () => boolean | undefined;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
/**
|
|
8
|
-
* Whether the browser currently has a network connection.
|
|
9
|
-
*
|
|
10
|
-
* NOTICE: this deliberately does not use `react-use`'s `useNetworkState`.
|
|
11
|
-
* That hook only exists in react-use v17, and consumers of this package do not
|
|
12
|
-
* agree on the major — elice-web still resolves v13, which breaks the build at
|
|
13
|
-
* link time. Reading `navigator.onLine` keeps this working on both.
|
|
14
|
-
*
|
|
15
|
-
* `undefined` means "not known yet" (server render, or no `navigator`), which
|
|
16
|
-
* callers should treat as online rather than as offline.
|
|
17
|
-
*/
|
|
18
|
-
var useOnlineState = function useOnlineState() {
|
|
19
|
-
var _React$useState = React.useState(function () {
|
|
20
|
-
return typeof navigator === 'undefined' ? undefined : navigator.onLine;
|
|
21
|
-
}),
|
|
22
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
23
|
-
online = _React$useState2[0],
|
|
24
|
-
setOnline = _React$useState2[1];
|
|
25
|
-
React.useEffect(function () {
|
|
26
|
-
var handleOnline = function handleOnline() {
|
|
27
|
-
return setOnline(true);
|
|
28
|
-
};
|
|
29
|
-
var handleOffline = function handleOffline() {
|
|
30
|
-
return setOnline(false);
|
|
31
|
-
};
|
|
32
|
-
window.addEventListener('online', handleOnline);
|
|
33
|
-
window.addEventListener('offline', handleOffline);
|
|
34
|
-
// Catch a change that happened between the initial state and this effect.
|
|
35
|
-
setOnline(navigator.onLine);
|
|
36
|
-
return function () {
|
|
37
|
-
window.removeEventListener('online', handleOnline);
|
|
38
|
-
window.removeEventListener('offline', handleOffline);
|
|
39
|
-
};
|
|
40
|
-
}, []);
|
|
41
|
-
return online;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export { useOnlineState };
|