@nebula.js/stardust 4.9.0 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/esm/dev.js +1785 -1506
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +5 -5
- package/core/esm/index.js.map +1 -1
- package/core/package.json +3 -3
- package/dist/stardust.dev.js +2206 -1654
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +15 -15
- package/dist/stardust.js.map +1 -1
- package/package.json +14 -14
- package/types/index.d.ts +27 -11
package/core/esm/dev.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v4.
|
|
3
|
-
* Copyright (c)
|
|
2
|
+
* @nebula.js/stardust v4.10.0
|
|
3
|
+
* Copyright (c) 2024 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -8,8 +8,8 @@ import * as React from 'react';
|
|
|
8
8
|
import React__default, { useState as useState$1, useEffect as useEffect$1, forwardRef, useMemo as useMemo$1, useImperativeHandle as useImperativeHandle$1, useReducer, useCallback, useLayoutEffect as useLayoutEffect$1, PureComponent, useRef, useContext, createElement, Component } from 'react';
|
|
9
9
|
import ReactDOM from 'react-dom';
|
|
10
10
|
import { CacheProvider, ThemeContext as ThemeContext$2 } from '@emotion/react';
|
|
11
|
-
import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, styled as styled$
|
|
12
|
-
import styled$
|
|
11
|
+
import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, styled as styled$3, Popover, MenuList, MenuItem, ListItemIcon, Divider, OutlinedInput, InputAdornment, Badge, List, ListItem, Button, ButtonBase, CircularProgress, Icon } from '@mui/material';
|
|
12
|
+
import styled$2 from '@emotion/styled';
|
|
13
13
|
|
|
14
14
|
function getDefaultExportFromCjs (x) {
|
|
15
15
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -282,8 +282,9 @@ var runtime = {exports: {}};
|
|
|
282
282
|
throw arg;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
// Be forgiving, per
|
|
286
|
-
// https://
|
|
285
|
+
// Be forgiving, per GeneratorResume behavior specified since ES2015:
|
|
286
|
+
// ES2015 spec, step 3: https://262.ecma-international.org/6.0/#sec-generatorresume
|
|
287
|
+
// Latest spec, step 2: https://tc39.es/ecma262/#sec-generatorresume
|
|
287
288
|
return doneResult();
|
|
288
289
|
}
|
|
289
290
|
context.method = method;
|
|
@@ -343,7 +344,7 @@ var runtime = {exports: {}};
|
|
|
343
344
|
var method = delegate.iterator[methodName];
|
|
344
345
|
if (method === undefined$1) {
|
|
345
346
|
// A .throw or .return when the delegate iterator has no .throw
|
|
346
|
-
// method, or a missing .next
|
|
347
|
+
// method, or a missing .next method, always terminate the
|
|
347
348
|
// yield* loop.
|
|
348
349
|
context.delegate = null;
|
|
349
350
|
|
|
@@ -482,7 +483,7 @@ var runtime = {exports: {}};
|
|
|
482
483
|
};
|
|
483
484
|
};
|
|
484
485
|
function values(iterable) {
|
|
485
|
-
if (iterable
|
|
486
|
+
if (iterable != null) {
|
|
486
487
|
var iteratorMethod = iterable[iteratorSymbol];
|
|
487
488
|
if (iteratorMethod) {
|
|
488
489
|
return iteratorMethod.call(iterable);
|
|
@@ -729,6 +730,20 @@ function _objectSpread2(e) {
|
|
|
729
730
|
}
|
|
730
731
|
return e;
|
|
731
732
|
}
|
|
733
|
+
function _toPrimitive(t, r) {
|
|
734
|
+
if ("object" != typeof t || !t) return t;
|
|
735
|
+
var e = t[Symbol.toPrimitive];
|
|
736
|
+
if (void 0 !== e) {
|
|
737
|
+
var i = e.call(t, r || "default");
|
|
738
|
+
if ("object" != typeof i) return i;
|
|
739
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
740
|
+
}
|
|
741
|
+
return ("string" === r ? String : Number)(t);
|
|
742
|
+
}
|
|
743
|
+
function _toPropertyKey(t) {
|
|
744
|
+
var i = _toPrimitive(t, "string");
|
|
745
|
+
return "symbol" == typeof i ? i : String(i);
|
|
746
|
+
}
|
|
732
747
|
function _defineProperty(obj, key, value) {
|
|
733
748
|
key = _toPropertyKey(key);
|
|
734
749
|
if (key in obj) {
|
|
@@ -784,20 +799,6 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
784
799
|
}
|
|
785
800
|
return target;
|
|
786
801
|
}
|
|
787
|
-
function _toPrimitive(input, hint) {
|
|
788
|
-
if (typeof input !== "object" || input === null) return input;
|
|
789
|
-
var prim = input[Symbol.toPrimitive];
|
|
790
|
-
if (prim !== undefined) {
|
|
791
|
-
var res = prim.call(input, hint || "default");
|
|
792
|
-
if (typeof res !== "object") return res;
|
|
793
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
794
|
-
}
|
|
795
|
-
return (hint === "string" ? String : Number)(input);
|
|
796
|
-
}
|
|
797
|
-
function _toPropertyKey(arg) {
|
|
798
|
-
var key = _toPrimitive(arg, "string");
|
|
799
|
-
return typeof key === "symbol" ? key : String(key);
|
|
800
|
-
}
|
|
801
802
|
|
|
802
803
|
const format = function () {
|
|
803
804
|
let message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
@@ -2819,7 +2820,7 @@ var extend$1 = function extend() {
|
|
|
2819
2820
|
|
|
2820
2821
|
var extend$2 = /*@__PURE__*/getDefaultExportFromCjs(extend$1);
|
|
2821
2822
|
|
|
2822
|
-
var fontSize = "
|
|
2823
|
+
var fontSize = "12px";
|
|
2823
2824
|
var fontFamily = "'Source Sans Pro', 'Arial', 'sans-serif'";
|
|
2824
2825
|
var backgroundColor$1 = "transparent";
|
|
2825
2826
|
var dataColors = {
|
|
@@ -3062,10 +3063,27 @@ var _variables = {
|
|
|
3062
3063
|
};
|
|
3063
3064
|
var type = "dark";
|
|
3064
3065
|
var color$1 = "@B98";
|
|
3066
|
+
var object$1 = {
|
|
3067
|
+
listBox: {
|
|
3068
|
+
backgroundColor: "@B20",
|
|
3069
|
+
title: {
|
|
3070
|
+
main: {
|
|
3071
|
+
color: "@B98",
|
|
3072
|
+
fontSize: "14px",
|
|
3073
|
+
fontWeight: "bold"
|
|
3074
|
+
}
|
|
3075
|
+
},
|
|
3076
|
+
content: {
|
|
3077
|
+
color: "#@B98",
|
|
3078
|
+
fontSize: "12px"
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
};
|
|
3065
3082
|
var darkRawJSON = {
|
|
3066
3083
|
_variables: _variables,
|
|
3067
3084
|
type: type,
|
|
3068
|
-
color: color$1
|
|
3085
|
+
color: color$1,
|
|
3086
|
+
object: object$1
|
|
3069
3087
|
};
|
|
3070
3088
|
|
|
3071
3089
|
var object = {
|
|
@@ -3095,7 +3113,7 @@ function setTheme(t, resolve) {
|
|
|
3095
3113
|
if (t._inherit === false || t._inherit === 'false') {
|
|
3096
3114
|
baseInherit = {};
|
|
3097
3115
|
}
|
|
3098
|
-
const root = extend$2(true, {}, baseRawJSON,
|
|
3116
|
+
const root = extend$2(true, {}, baseRawJSON, baseInherit, colorRawJSON);
|
|
3099
3117
|
// avoid merging known array objects as it could cause issues if they are of different types (pyramid vs class) or length
|
|
3100
3118
|
const rawThemeJSON = extend$2(true, {}, root, {
|
|
3101
3119
|
scales: null,
|
|
@@ -3184,15 +3202,14 @@ function theme$1(resolvedTheme) {
|
|
|
3184
3202
|
},
|
|
3185
3203
|
dataColors() {
|
|
3186
3204
|
/** @interface Theme~DataColorSpecials */
|
|
3187
|
-
return
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
);
|
|
3205
|
+
return /** @lends Theme~DataColorSpecials */{
|
|
3206
|
+
/** @type {string} */
|
|
3207
|
+
primary: resolvedTheme.dataColors.primaryColor,
|
|
3208
|
+
/** @type {string} */
|
|
3209
|
+
nil: resolvedTheme.dataColors.nullColor,
|
|
3210
|
+
/** @type {string} */
|
|
3211
|
+
others: resolvedTheme.dataColors.othersColor
|
|
3212
|
+
};
|
|
3196
3213
|
},
|
|
3197
3214
|
uiColor(c, shift) {
|
|
3198
3215
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -3518,7 +3535,6 @@ function resolveVariables(objTree, variables) {
|
|
|
3518
3535
|
}
|
|
3519
3536
|
});
|
|
3520
3537
|
}
|
|
3521
|
-
|
|
3522
3538
|
styleResolver.resolveRawTheme = raw => {
|
|
3523
3539
|
// TODO - validate format
|
|
3524
3540
|
const c = extend$2(true, {}, raw);
|
|
@@ -3825,65 +3841,14 @@ var m$1 = ReactDOM;
|
|
|
3825
3841
|
client.hydrateRoot = m$1.hydrateRoot;
|
|
3826
3842
|
}
|
|
3827
3843
|
|
|
3828
|
-
function _extends$4() {
|
|
3829
|
-
_extends$4 = Object.assign ? Object.assign.bind() : function (target) {
|
|
3830
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
3831
|
-
var source = arguments[i];
|
|
3832
|
-
for (var key in source) {
|
|
3833
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3834
|
-
target[key] = source[key];
|
|
3835
|
-
}
|
|
3836
|
-
}
|
|
3837
|
-
}
|
|
3838
|
-
return target;
|
|
3839
|
-
};
|
|
3840
|
-
return _extends$4.apply(this, arguments);
|
|
3841
|
-
}
|
|
3842
|
-
|
|
3843
|
-
function isPlainObject(item) {
|
|
3844
|
-
return item !== null && typeof item === 'object' && item.constructor === Object;
|
|
3845
|
-
}
|
|
3846
|
-
function deepClone(source) {
|
|
3847
|
-
if (!isPlainObject(source)) {
|
|
3848
|
-
return source;
|
|
3849
|
-
}
|
|
3850
|
-
const output = {};
|
|
3851
|
-
Object.keys(source).forEach(key => {
|
|
3852
|
-
output[key] = deepClone(source[key]);
|
|
3853
|
-
});
|
|
3854
|
-
return output;
|
|
3855
|
-
}
|
|
3856
|
-
function deepmerge(target, source, options = {
|
|
3857
|
-
clone: true
|
|
3858
|
-
}) {
|
|
3859
|
-
const output = options.clone ? _extends$4({}, target) : target;
|
|
3860
|
-
if (isPlainObject(target) && isPlainObject(source)) {
|
|
3861
|
-
Object.keys(source).forEach(key => {
|
|
3862
|
-
// Avoid prototype pollution
|
|
3863
|
-
if (key === '__proto__') {
|
|
3864
|
-
return;
|
|
3865
|
-
}
|
|
3866
|
-
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
3867
|
-
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
3868
|
-
output[key] = deepmerge(target[key], source[key], options);
|
|
3869
|
-
} else if (options.clone) {
|
|
3870
|
-
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
|
|
3871
|
-
} else {
|
|
3872
|
-
output[key] = source[key];
|
|
3873
|
-
}
|
|
3874
|
-
});
|
|
3875
|
-
}
|
|
3876
|
-
return output;
|
|
3877
|
-
}
|
|
3878
|
-
|
|
3879
3844
|
/**
|
|
3880
3845
|
* WARNING: Don't import this directly.
|
|
3881
|
-
* Use `MuiError` from `@mui/
|
|
3846
|
+
* Use `MuiError` from `@mui-internal/babel-macros/MuiError.macro` instead.
|
|
3882
3847
|
* @param {number} code
|
|
3883
3848
|
*/
|
|
3884
3849
|
function formatMuiErrorMessage(code) {
|
|
3885
3850
|
// Apply babel-plugin-transform-template-literals in loose mode
|
|
3886
|
-
// loose mode is safe
|
|
3851
|
+
// loose mode is safe if we're concatenating primitives
|
|
3887
3852
|
// see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose
|
|
3888
3853
|
/* eslint-disable prefer-template */
|
|
3889
3854
|
let url = 'https://mui.com/production-error/?code=' + code;
|
|
@@ -3896,902 +3861,444 @@ function formatMuiErrorMessage(code) {
|
|
|
3896
3861
|
/* eslint-enable prefer-template */
|
|
3897
3862
|
}
|
|
3898
3863
|
|
|
3899
|
-
|
|
3900
|
-
//
|
|
3901
|
-
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
3902
|
-
// We only handle the first word.
|
|
3903
|
-
function capitalize(string) {
|
|
3904
|
-
if (typeof string !== 'string') {
|
|
3905
|
-
throw new Error(formatMuiErrorMessage(7));
|
|
3906
|
-
}
|
|
3907
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
3908
|
-
}
|
|
3864
|
+
var THEME_ID = '$$material';
|
|
3909
3865
|
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
return acc;
|
|
3866
|
+
function _extends$4() {
|
|
3867
|
+
_extends$4 = Object.assign ? Object.assign.bind() : function (target) {
|
|
3868
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
3869
|
+
var source = arguments[i];
|
|
3870
|
+
for (var key in source) {
|
|
3871
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3872
|
+
target[key] = source[key];
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3920
3875
|
}
|
|
3921
|
-
return
|
|
3922
|
-
acc.apply(this, args);
|
|
3923
|
-
func.apply(this, args);
|
|
3924
|
-
};
|
|
3925
|
-
}, () => {});
|
|
3926
|
-
}
|
|
3927
|
-
|
|
3928
|
-
// Corresponds to 10 frames at 60 Hz.
|
|
3929
|
-
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
|
|
3930
|
-
function debounce(func, wait = 166) {
|
|
3931
|
-
let timeout;
|
|
3932
|
-
function debounced(...args) {
|
|
3933
|
-
const later = () => {
|
|
3934
|
-
// @ts-ignore
|
|
3935
|
-
func.apply(this, args);
|
|
3936
|
-
};
|
|
3937
|
-
clearTimeout(timeout);
|
|
3938
|
-
timeout = setTimeout(later, wait);
|
|
3939
|
-
}
|
|
3940
|
-
debounced.clear = () => {
|
|
3941
|
-
clearTimeout(timeout);
|
|
3876
|
+
return target;
|
|
3942
3877
|
};
|
|
3943
|
-
return
|
|
3878
|
+
return _extends$4.apply(this, arguments);
|
|
3944
3879
|
}
|
|
3945
3880
|
|
|
3946
|
-
function
|
|
3947
|
-
{
|
|
3948
|
-
|
|
3881
|
+
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
3882
|
+
if (source == null) return {};
|
|
3883
|
+
var target = {};
|
|
3884
|
+
var sourceKeys = Object.keys(source);
|
|
3885
|
+
var key, i;
|
|
3886
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
3887
|
+
key = sourceKeys[i];
|
|
3888
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
3889
|
+
target[key] = source[key];
|
|
3949
3890
|
}
|
|
3891
|
+
return target;
|
|
3950
3892
|
}
|
|
3951
3893
|
|
|
3952
|
-
|
|
3953
|
-
var _muiName, _element$type;
|
|
3954
|
-
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
3955
|
-
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
3956
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
3957
|
-
(_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
|
|
3958
|
-
}
|
|
3894
|
+
/*
|
|
3959
3895
|
|
|
3960
|
-
|
|
3961
|
-
return node && node.ownerDocument || document;
|
|
3962
|
-
}
|
|
3896
|
+
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
3963
3897
|
|
|
3964
|
-
|
|
3965
|
-
const doc = ownerDocument(node);
|
|
3966
|
-
return doc.defaultView || window;
|
|
3967
|
-
}
|
|
3898
|
+
high performance StyleSheet for css-in-js systems
|
|
3968
3899
|
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
return () => null;
|
|
3972
|
-
}
|
|
3973
|
-
}
|
|
3900
|
+
- uses multiple style tags behind the scenes for millions of rules
|
|
3901
|
+
- uses `insertRule` for appending in production for *much* faster performance
|
|
3974
3902
|
|
|
3975
|
-
|
|
3976
|
-
* TODO v5: consider making it private
|
|
3977
|
-
*
|
|
3978
|
-
* passes {value} to {ref}
|
|
3979
|
-
*
|
|
3980
|
-
* WARNING: Be sure to only call this inside a callback that is passed as a ref.
|
|
3981
|
-
* Otherwise, make sure to cleanup the previous {ref} if it changes. See
|
|
3982
|
-
* https://github.com/mui/material-ui/issues/13539
|
|
3983
|
-
*
|
|
3984
|
-
* Useful if you want to expose the ref of an inner component to the public API
|
|
3985
|
-
* while still using it inside the component.
|
|
3986
|
-
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
3987
|
-
*/
|
|
3988
|
-
function setRef(ref, value) {
|
|
3989
|
-
if (typeof ref === 'function') {
|
|
3990
|
-
ref(value);
|
|
3991
|
-
} else if (ref) {
|
|
3992
|
-
ref.current = value;
|
|
3993
|
-
}
|
|
3994
|
-
}
|
|
3903
|
+
// usage
|
|
3995
3904
|
|
|
3996
|
-
|
|
3997
|
-
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
3998
|
-
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
3999
|
-
*
|
|
4000
|
-
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
4001
|
-
* and confirm it doesn't apply to your use-case.
|
|
4002
|
-
*/
|
|
4003
|
-
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
4004
|
-
var useEnhancedEffect$1 = useEnhancedEffect;
|
|
3905
|
+
import { StyleSheet } from '@emotion/sheet'
|
|
4005
3906
|
|
|
4006
|
-
let
|
|
4007
|
-
function useGlobalId(idOverride) {
|
|
4008
|
-
const [defaultId, setDefaultId] = React.useState(idOverride);
|
|
4009
|
-
const id = idOverride || defaultId;
|
|
4010
|
-
React.useEffect(() => {
|
|
4011
|
-
if (defaultId == null) {
|
|
4012
|
-
// Fallback to this default id when possible.
|
|
4013
|
-
// Use the incrementing value for client-side rendering only.
|
|
4014
|
-
// We can't use it server-side.
|
|
4015
|
-
// If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
|
|
4016
|
-
globalId += 1;
|
|
4017
|
-
setDefaultId(`mui-${globalId}`);
|
|
4018
|
-
}
|
|
4019
|
-
}, [defaultId]);
|
|
4020
|
-
return id;
|
|
4021
|
-
}
|
|
3907
|
+
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
|
4022
3908
|
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
/**
|
|
4026
|
-
*
|
|
4027
|
-
* @example <div id={useId()} />
|
|
4028
|
-
* @param idOverride
|
|
4029
|
-
* @returns {string}
|
|
4030
|
-
*/
|
|
4031
|
-
function useId(idOverride) {
|
|
4032
|
-
if (maybeReactUseId !== undefined) {
|
|
4033
|
-
const reactId = maybeReactUseId();
|
|
4034
|
-
return idOverride != null ? idOverride : reactId;
|
|
4035
|
-
}
|
|
4036
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
|
|
4037
|
-
return useGlobalId(idOverride);
|
|
4038
|
-
}
|
|
3909
|
+
styleSheet.insert('#box { border: 1px solid red; }')
|
|
3910
|
+
- appends a css rule into the stylesheet
|
|
4039
3911
|
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
3912
|
+
styleSheet.flush()
|
|
3913
|
+
- empties the stylesheet of all its contents
|
|
3914
|
+
|
|
3915
|
+
*/
|
|
3916
|
+
// $FlowFixMe
|
|
3917
|
+
function sheetForTag(tag) {
|
|
3918
|
+
if (tag.sheet) {
|
|
3919
|
+
// $FlowFixMe
|
|
3920
|
+
return tag.sheet;
|
|
3921
|
+
} // this weirdness brought to you by firefox
|
|
3922
|
+
|
|
3923
|
+
/* istanbul ignore next */
|
|
3924
|
+
|
|
3925
|
+
|
|
3926
|
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
3927
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
|
3928
|
+
// $FlowFixMe
|
|
3929
|
+
return document.styleSheets[i];
|
|
3930
|
+
}
|
|
4043
3931
|
}
|
|
4044
3932
|
}
|
|
4045
3933
|
|
|
4046
|
-
function
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
const value = isControlled ? controlled : valueState;
|
|
4058
|
-
const setValueIfUncontrolled = React.useCallback(newValue => {
|
|
4059
|
-
if (!isControlled) {
|
|
4060
|
-
setValue(newValue);
|
|
4061
|
-
}
|
|
4062
|
-
}, []);
|
|
4063
|
-
return [value, setValueIfUncontrolled];
|
|
3934
|
+
function createStyleElement(options) {
|
|
3935
|
+
var tag = document.createElement('style');
|
|
3936
|
+
tag.setAttribute('data-emotion', options.key);
|
|
3937
|
+
|
|
3938
|
+
if (options.nonce !== undefined) {
|
|
3939
|
+
tag.setAttribute('nonce', options.nonce);
|
|
3940
|
+
}
|
|
3941
|
+
|
|
3942
|
+
tag.appendChild(document.createTextNode(''));
|
|
3943
|
+
tag.setAttribute('data-s', '');
|
|
3944
|
+
return tag;
|
|
4064
3945
|
}
|
|
4065
3946
|
|
|
3947
|
+
var StyleSheet = /*#__PURE__*/function () {
|
|
3948
|
+
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
|
3949
|
+
function StyleSheet(options) {
|
|
3950
|
+
var _this = this;
|
|
3951
|
+
|
|
3952
|
+
this._insertTag = function (tag) {
|
|
3953
|
+
var before;
|
|
3954
|
+
|
|
3955
|
+
if (_this.tags.length === 0) {
|
|
3956
|
+
if (_this.insertionPoint) {
|
|
3957
|
+
before = _this.insertionPoint.nextSibling;
|
|
3958
|
+
} else if (_this.prepend) {
|
|
3959
|
+
before = _this.container.firstChild;
|
|
3960
|
+
} else {
|
|
3961
|
+
before = _this.before;
|
|
3962
|
+
}
|
|
3963
|
+
} else {
|
|
3964
|
+
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
_this.container.insertBefore(tag, before);
|
|
3968
|
+
|
|
3969
|
+
_this.tags.push(tag);
|
|
3970
|
+
};
|
|
3971
|
+
|
|
3972
|
+
this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy;
|
|
3973
|
+
this.tags = [];
|
|
3974
|
+
this.ctr = 0;
|
|
3975
|
+
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
3976
|
+
|
|
3977
|
+
this.key = options.key;
|
|
3978
|
+
this.container = options.container;
|
|
3979
|
+
this.prepend = options.prepend;
|
|
3980
|
+
this.insertionPoint = options.insertionPoint;
|
|
3981
|
+
this.before = null;
|
|
3982
|
+
}
|
|
3983
|
+
|
|
3984
|
+
var _proto = StyleSheet.prototype;
|
|
3985
|
+
|
|
3986
|
+
_proto.hydrate = function hydrate(nodes) {
|
|
3987
|
+
nodes.forEach(this._insertTag);
|
|
3988
|
+
};
|
|
3989
|
+
|
|
3990
|
+
_proto.insert = function insert(rule) {
|
|
3991
|
+
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
|
3992
|
+
// it's 1 in dev because we insert source maps that map a single rule to a location
|
|
3993
|
+
// and you can only have one source map per style tag
|
|
3994
|
+
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
3995
|
+
this._insertTag(createStyleElement(this));
|
|
3996
|
+
}
|
|
3997
|
+
|
|
3998
|
+
var tag = this.tags[this.tags.length - 1];
|
|
3999
|
+
|
|
4000
|
+
if (this.isSpeedy) {
|
|
4001
|
+
var sheet = sheetForTag(tag);
|
|
4002
|
+
|
|
4003
|
+
try {
|
|
4004
|
+
// this is the ultrafast version, works across browsers
|
|
4005
|
+
// the big drawback is that the css won't be editable in devtools
|
|
4006
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
4007
|
+
} catch (e) {
|
|
4008
|
+
}
|
|
4009
|
+
} else {
|
|
4010
|
+
tag.appendChild(document.createTextNode(rule));
|
|
4011
|
+
}
|
|
4012
|
+
|
|
4013
|
+
this.ctr++;
|
|
4014
|
+
};
|
|
4015
|
+
|
|
4016
|
+
_proto.flush = function flush() {
|
|
4017
|
+
// $FlowFixMe
|
|
4018
|
+
this.tags.forEach(function (tag) {
|
|
4019
|
+
return tag.parentNode && tag.parentNode.removeChild(tag);
|
|
4020
|
+
});
|
|
4021
|
+
this.tags = [];
|
|
4022
|
+
this.ctr = 0;
|
|
4023
|
+
};
|
|
4024
|
+
|
|
4025
|
+
return StyleSheet;
|
|
4026
|
+
}();
|
|
4027
|
+
|
|
4028
|
+
var MS = '-ms-';
|
|
4029
|
+
var MOZ = '-moz-';
|
|
4030
|
+
var WEBKIT = '-webkit-';
|
|
4031
|
+
|
|
4032
|
+
var COMMENT = 'comm';
|
|
4033
|
+
var RULESET = 'rule';
|
|
4034
|
+
var DECLARATION = 'decl';
|
|
4035
|
+
var IMPORT = '@import';
|
|
4036
|
+
var KEYFRAMES = '@keyframes';
|
|
4037
|
+
var LAYER = '@layer';
|
|
4038
|
+
|
|
4066
4039
|
/**
|
|
4067
|
-
*
|
|
4068
|
-
*
|
|
4040
|
+
* @param {number}
|
|
4041
|
+
* @return {number}
|
|
4069
4042
|
*/
|
|
4043
|
+
var abs = Math.abs;
|
|
4070
4044
|
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4045
|
+
/**
|
|
4046
|
+
* @param {number}
|
|
4047
|
+
* @return {string}
|
|
4048
|
+
*/
|
|
4049
|
+
var from = String.fromCharCode;
|
|
4050
|
+
|
|
4051
|
+
/**
|
|
4052
|
+
* @param {object}
|
|
4053
|
+
* @return {object}
|
|
4054
|
+
*/
|
|
4055
|
+
var assign = Object.assign;
|
|
4056
|
+
|
|
4057
|
+
/**
|
|
4058
|
+
* @param {string} value
|
|
4059
|
+
* @param {number} length
|
|
4060
|
+
* @return {number}
|
|
4061
|
+
*/
|
|
4062
|
+
function hash (value, length) {
|
|
4063
|
+
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
|
|
4080
4064
|
}
|
|
4081
4065
|
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
return React.useMemo(() => {
|
|
4089
|
-
if (refs.every(ref => ref == null)) {
|
|
4090
|
-
return null;
|
|
4091
|
-
}
|
|
4092
|
-
return instance => {
|
|
4093
|
-
refs.forEach(ref => {
|
|
4094
|
-
setRef(ref, instance);
|
|
4095
|
-
});
|
|
4096
|
-
};
|
|
4097
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4098
|
-
}, refs);
|
|
4066
|
+
/**
|
|
4067
|
+
* @param {string} value
|
|
4068
|
+
* @return {string}
|
|
4069
|
+
*/
|
|
4070
|
+
function trim$1 (value) {
|
|
4071
|
+
return value.trim()
|
|
4099
4072
|
}
|
|
4100
4073
|
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
email: true,
|
|
4110
|
-
password: true,
|
|
4111
|
-
number: true,
|
|
4112
|
-
date: true,
|
|
4113
|
-
month: true,
|
|
4114
|
-
week: true,
|
|
4115
|
-
time: true,
|
|
4116
|
-
datetime: true,
|
|
4117
|
-
'datetime-local': true
|
|
4118
|
-
};
|
|
4074
|
+
/**
|
|
4075
|
+
* @param {string} value
|
|
4076
|
+
* @param {RegExp} pattern
|
|
4077
|
+
* @return {string?}
|
|
4078
|
+
*/
|
|
4079
|
+
function match (value, pattern) {
|
|
4080
|
+
return (value = pattern.exec(value)) ? value[0] : value
|
|
4081
|
+
}
|
|
4119
4082
|
|
|
4120
4083
|
/**
|
|
4121
|
-
*
|
|
4122
|
-
*
|
|
4123
|
-
*
|
|
4124
|
-
* @
|
|
4125
|
-
* @returns {boolean}
|
|
4084
|
+
* @param {string} value
|
|
4085
|
+
* @param {(string|RegExp)} pattern
|
|
4086
|
+
* @param {string} replacement
|
|
4087
|
+
* @return {string}
|
|
4126
4088
|
*/
|
|
4127
|
-
function
|
|
4128
|
-
|
|
4129
|
-
type,
|
|
4130
|
-
tagName
|
|
4131
|
-
} = node;
|
|
4132
|
-
if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {
|
|
4133
|
-
return true;
|
|
4134
|
-
}
|
|
4135
|
-
if (tagName === 'TEXTAREA' && !node.readOnly) {
|
|
4136
|
-
return true;
|
|
4137
|
-
}
|
|
4138
|
-
if (node.isContentEditable) {
|
|
4139
|
-
return true;
|
|
4140
|
-
}
|
|
4141
|
-
return false;
|
|
4089
|
+
function replace (value, pattern, replacement) {
|
|
4090
|
+
return value.replace(pattern, replacement)
|
|
4142
4091
|
}
|
|
4143
4092
|
|
|
4144
4093
|
/**
|
|
4145
|
-
*
|
|
4146
|
-
*
|
|
4147
|
-
*
|
|
4148
|
-
* then the modality is keyboard. Otherwise, the modality is not keyboard.
|
|
4149
|
-
* @param {KeyboardEvent} event
|
|
4094
|
+
* @param {string} value
|
|
4095
|
+
* @param {string} search
|
|
4096
|
+
* @return {number}
|
|
4150
4097
|
*/
|
|
4151
|
-
function
|
|
4152
|
-
|
|
4153
|
-
return;
|
|
4154
|
-
}
|
|
4155
|
-
hadKeyboardEvent = true;
|
|
4098
|
+
function indexof (value, search) {
|
|
4099
|
+
return value.indexOf(search)
|
|
4156
4100
|
}
|
|
4157
4101
|
|
|
4158
4102
|
/**
|
|
4159
|
-
*
|
|
4160
|
-
*
|
|
4161
|
-
*
|
|
4162
|
-
* element, and then clicks on a different element, focusing it with a
|
|
4163
|
-
* pointing device, while we still think we're in keyboard modality.
|
|
4103
|
+
* @param {string} value
|
|
4104
|
+
* @param {number} index
|
|
4105
|
+
* @return {number}
|
|
4164
4106
|
*/
|
|
4165
|
-
function
|
|
4166
|
-
|
|
4107
|
+
function charat (value, index) {
|
|
4108
|
+
return value.charCodeAt(index) | 0
|
|
4167
4109
|
}
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
}
|
|
4110
|
+
|
|
4111
|
+
/**
|
|
4112
|
+
* @param {string} value
|
|
4113
|
+
* @param {number} begin
|
|
4114
|
+
* @param {number} end
|
|
4115
|
+
* @return {string}
|
|
4116
|
+
*/
|
|
4117
|
+
function substr (value, begin, end) {
|
|
4118
|
+
return value.slice(begin, end)
|
|
4178
4119
|
}
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4120
|
+
|
|
4121
|
+
/**
|
|
4122
|
+
* @param {string} value
|
|
4123
|
+
* @return {number}
|
|
4124
|
+
*/
|
|
4125
|
+
function strlen (value) {
|
|
4126
|
+
return value.length
|
|
4185
4127
|
}
|
|
4186
|
-
function isFocusVisible(event) {
|
|
4187
|
-
const {
|
|
4188
|
-
target
|
|
4189
|
-
} = event;
|
|
4190
|
-
try {
|
|
4191
|
-
return target.matches(':focus-visible');
|
|
4192
|
-
} catch (error) {
|
|
4193
|
-
// Browsers not implementing :focus-visible will throw a SyntaxError.
|
|
4194
|
-
// We use our own heuristic for those browsers.
|
|
4195
|
-
// Rethrow might be better if it's not the expected error but do we really
|
|
4196
|
-
// want to crash if focus-visible malfunctioned?
|
|
4197
|
-
}
|
|
4198
4128
|
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4129
|
+
/**
|
|
4130
|
+
* @param {any[]} value
|
|
4131
|
+
* @return {number}
|
|
4132
|
+
*/
|
|
4133
|
+
function sizeof (value) {
|
|
4134
|
+
return value.length
|
|
4202
4135
|
}
|
|
4203
|
-
function useIsFocusVisible() {
|
|
4204
|
-
const ref = React.useCallback(node => {
|
|
4205
|
-
if (node != null) {
|
|
4206
|
-
prepare(node.ownerDocument);
|
|
4207
|
-
}
|
|
4208
|
-
}, []);
|
|
4209
|
-
const isFocusVisibleRef = React.useRef(false);
|
|
4210
4136
|
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
// TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).
|
|
4220
|
-
if (isFocusVisibleRef.current) {
|
|
4221
|
-
// To detect a tab/window switch, we look for a blur event followed
|
|
4222
|
-
// rapidly by a visibility change.
|
|
4223
|
-
// If we don't see a visibility change within 100ms, it's probably a
|
|
4224
|
-
// regular focus change.
|
|
4225
|
-
hadFocusVisibleRecently = true;
|
|
4226
|
-
window.clearTimeout(hadFocusVisibleRecentlyTimeout);
|
|
4227
|
-
hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {
|
|
4228
|
-
hadFocusVisibleRecently = false;
|
|
4229
|
-
}, 100);
|
|
4230
|
-
isFocusVisibleRef.current = false;
|
|
4231
|
-
return true;
|
|
4232
|
-
}
|
|
4233
|
-
return false;
|
|
4234
|
-
}
|
|
4137
|
+
/**
|
|
4138
|
+
* @param {any} value
|
|
4139
|
+
* @param {any[]} array
|
|
4140
|
+
* @return {any}
|
|
4141
|
+
*/
|
|
4142
|
+
function append (value, array) {
|
|
4143
|
+
return array.push(value), value
|
|
4144
|
+
}
|
|
4235
4145
|
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
}
|
|
4244
|
-
return false;
|
|
4245
|
-
}
|
|
4246
|
-
return {
|
|
4247
|
-
isFocusVisibleRef,
|
|
4248
|
-
onFocus: handleFocusVisible,
|
|
4249
|
-
onBlur: handleBlurVisible,
|
|
4250
|
-
ref
|
|
4251
|
-
};
|
|
4146
|
+
/**
|
|
4147
|
+
* @param {string[]} array
|
|
4148
|
+
* @param {function} callback
|
|
4149
|
+
* @return {string}
|
|
4150
|
+
*/
|
|
4151
|
+
function combine (array, callback) {
|
|
4152
|
+
return array.map(callback).join('')
|
|
4252
4153
|
}
|
|
4253
4154
|
|
|
4155
|
+
var line = 1;
|
|
4156
|
+
var column = 1;
|
|
4157
|
+
var length = 0;
|
|
4158
|
+
var position = 0;
|
|
4159
|
+
var character = 0;
|
|
4160
|
+
var characters = '';
|
|
4161
|
+
|
|
4254
4162
|
/**
|
|
4255
|
-
*
|
|
4256
|
-
* @param {object}
|
|
4163
|
+
* @param {string} value
|
|
4164
|
+
* @param {object | null} root
|
|
4165
|
+
* @param {object | null} parent
|
|
4166
|
+
* @param {string} type
|
|
4167
|
+
* @param {string[] | string} props
|
|
4168
|
+
* @param {object[] | string} children
|
|
4169
|
+
* @param {number} length
|
|
4170
|
+
*/
|
|
4171
|
+
function node (value, root, parent, type, props, children, length) {
|
|
4172
|
+
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
|
|
4173
|
+
}
|
|
4174
|
+
|
|
4175
|
+
/**
|
|
4176
|
+
* @param {object} root
|
|
4257
4177
|
* @param {object} props
|
|
4258
|
-
* @
|
|
4178
|
+
* @return {object}
|
|
4259
4179
|
*/
|
|
4260
|
-
function
|
|
4261
|
-
|
|
4262
|
-
Object.keys(defaultProps).forEach(propName => {
|
|
4263
|
-
if (propName.toString().match(/^(components|slots)$/)) {
|
|
4264
|
-
output[propName] = _extends$4({}, defaultProps[propName], output[propName]);
|
|
4265
|
-
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
4266
|
-
const defaultSlotProps = defaultProps[propName] || {};
|
|
4267
|
-
const slotProps = props[propName];
|
|
4268
|
-
output[propName] = {};
|
|
4269
|
-
if (!slotProps || !Object.keys(slotProps)) {
|
|
4270
|
-
// Reduce the iteration if the slot props is empty
|
|
4271
|
-
output[propName] = defaultSlotProps;
|
|
4272
|
-
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
|
4273
|
-
// Reduce the iteration if the default slot props is empty
|
|
4274
|
-
output[propName] = slotProps;
|
|
4275
|
-
} else {
|
|
4276
|
-
output[propName] = _extends$4({}, slotProps);
|
|
4277
|
-
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
|
4278
|
-
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
4279
|
-
});
|
|
4280
|
-
}
|
|
4281
|
-
} else if (output[propName] === undefined) {
|
|
4282
|
-
output[propName] = defaultProps[propName];
|
|
4283
|
-
}
|
|
4284
|
-
});
|
|
4285
|
-
return output;
|
|
4180
|
+
function copy (root, props) {
|
|
4181
|
+
return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
|
|
4286
4182
|
}
|
|
4287
4183
|
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
slot => {
|
|
4294
|
-
output[slot] = slots[slot].reduce((acc, key) => {
|
|
4295
|
-
if (key) {
|
|
4296
|
-
const utilityClass = getUtilityClass(key);
|
|
4297
|
-
if (utilityClass !== '') {
|
|
4298
|
-
acc.push(utilityClass);
|
|
4299
|
-
}
|
|
4300
|
-
if (classes && classes[key]) {
|
|
4301
|
-
acc.push(classes[key]);
|
|
4302
|
-
}
|
|
4303
|
-
}
|
|
4304
|
-
return acc;
|
|
4305
|
-
}, []).join(' ');
|
|
4306
|
-
});
|
|
4307
|
-
return output;
|
|
4184
|
+
/**
|
|
4185
|
+
* @return {number}
|
|
4186
|
+
*/
|
|
4187
|
+
function char () {
|
|
4188
|
+
return character
|
|
4308
4189
|
}
|
|
4309
4190
|
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
generate = generator;
|
|
4316
|
-
},
|
|
4317
|
-
generate(componentName) {
|
|
4318
|
-
return generate(componentName);
|
|
4319
|
-
},
|
|
4320
|
-
reset() {
|
|
4321
|
-
generate = defaultGenerator;
|
|
4322
|
-
}
|
|
4323
|
-
};
|
|
4324
|
-
};
|
|
4325
|
-
const ClassNameGenerator = createClassNameGenerator();
|
|
4326
|
-
var ClassNameGenerator$1 = ClassNameGenerator;
|
|
4191
|
+
/**
|
|
4192
|
+
* @return {number}
|
|
4193
|
+
*/
|
|
4194
|
+
function prev () {
|
|
4195
|
+
character = position > 0 ? charat(characters, --position) : 0;
|
|
4327
4196
|
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
checked: 'checked',
|
|
4333
|
-
completed: 'completed',
|
|
4334
|
-
disabled: 'disabled',
|
|
4335
|
-
error: 'error',
|
|
4336
|
-
expanded: 'expanded',
|
|
4337
|
-
focused: 'focused',
|
|
4338
|
-
focusVisible: 'focusVisible',
|
|
4339
|
-
open: 'open',
|
|
4340
|
-
readOnly: 'readOnly',
|
|
4341
|
-
required: 'required',
|
|
4342
|
-
selected: 'selected'
|
|
4343
|
-
};
|
|
4344
|
-
function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
|
|
4345
|
-
const globalStateClass = globalStateClassesMapping[slot];
|
|
4346
|
-
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
|
|
4197
|
+
if (column--, character === 10)
|
|
4198
|
+
column = 1, line--;
|
|
4199
|
+
|
|
4200
|
+
return character
|
|
4347
4201
|
}
|
|
4348
4202
|
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4203
|
+
/**
|
|
4204
|
+
* @return {number}
|
|
4205
|
+
*/
|
|
4206
|
+
function next () {
|
|
4207
|
+
character = position < length ? charat(characters, position++) : 0;
|
|
4208
|
+
|
|
4209
|
+
if (column++, character === 10)
|
|
4210
|
+
column = 1, line++;
|
|
4211
|
+
|
|
4212
|
+
return character
|
|
4355
4213
|
}
|
|
4356
4214
|
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
for (var key in source) {
|
|
4364
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4365
|
-
target[key] = source[key];
|
|
4366
|
-
}
|
|
4367
|
-
}
|
|
4368
|
-
}
|
|
4369
|
-
return target;
|
|
4370
|
-
};
|
|
4371
|
-
return _extends$3.apply(this, arguments);
|
|
4372
|
-
}
|
|
4373
|
-
|
|
4374
|
-
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
4375
|
-
if (source == null) return {};
|
|
4376
|
-
var target = {};
|
|
4377
|
-
var sourceKeys = Object.keys(source);
|
|
4378
|
-
var key, i;
|
|
4379
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
4380
|
-
key = sourceKeys[i];
|
|
4381
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
4382
|
-
target[key] = source[key];
|
|
4383
|
-
}
|
|
4384
|
-
return target;
|
|
4385
|
-
}
|
|
4386
|
-
|
|
4387
|
-
/*
|
|
4388
|
-
|
|
4389
|
-
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
4390
|
-
|
|
4391
|
-
high performance StyleSheet for css-in-js systems
|
|
4392
|
-
|
|
4393
|
-
- uses multiple style tags behind the scenes for millions of rules
|
|
4394
|
-
- uses `insertRule` for appending in production for *much* faster performance
|
|
4395
|
-
|
|
4396
|
-
// usage
|
|
4397
|
-
|
|
4398
|
-
import { StyleSheet } from '@emotion/sheet'
|
|
4399
|
-
|
|
4400
|
-
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
|
4401
|
-
|
|
4402
|
-
styleSheet.insert('#box { border: 1px solid red; }')
|
|
4403
|
-
- appends a css rule into the stylesheet
|
|
4404
|
-
|
|
4405
|
-
styleSheet.flush()
|
|
4406
|
-
- empties the stylesheet of all its contents
|
|
4407
|
-
|
|
4408
|
-
*/
|
|
4409
|
-
// $FlowFixMe
|
|
4410
|
-
function sheetForTag(tag) {
|
|
4411
|
-
if (tag.sheet) {
|
|
4412
|
-
// $FlowFixMe
|
|
4413
|
-
return tag.sheet;
|
|
4414
|
-
} // this weirdness brought to you by firefox
|
|
4415
|
-
|
|
4416
|
-
/* istanbul ignore next */
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
4420
|
-
if (document.styleSheets[i].ownerNode === tag) {
|
|
4421
|
-
// $FlowFixMe
|
|
4422
|
-
return document.styleSheets[i];
|
|
4423
|
-
}
|
|
4424
|
-
}
|
|
4425
|
-
}
|
|
4426
|
-
|
|
4427
|
-
function createStyleElement(options) {
|
|
4428
|
-
var tag = document.createElement('style');
|
|
4429
|
-
tag.setAttribute('data-emotion', options.key);
|
|
4430
|
-
|
|
4431
|
-
if (options.nonce !== undefined) {
|
|
4432
|
-
tag.setAttribute('nonce', options.nonce);
|
|
4433
|
-
}
|
|
4434
|
-
|
|
4435
|
-
tag.appendChild(document.createTextNode(''));
|
|
4436
|
-
tag.setAttribute('data-s', '');
|
|
4437
|
-
return tag;
|
|
4438
|
-
}
|
|
4439
|
-
|
|
4440
|
-
var StyleSheet = /*#__PURE__*/function () {
|
|
4441
|
-
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
|
4442
|
-
function StyleSheet(options) {
|
|
4443
|
-
var _this = this;
|
|
4444
|
-
|
|
4445
|
-
this._insertTag = function (tag) {
|
|
4446
|
-
var before;
|
|
4447
|
-
|
|
4448
|
-
if (_this.tags.length === 0) {
|
|
4449
|
-
if (_this.insertionPoint) {
|
|
4450
|
-
before = _this.insertionPoint.nextSibling;
|
|
4451
|
-
} else if (_this.prepend) {
|
|
4452
|
-
before = _this.container.firstChild;
|
|
4453
|
-
} else {
|
|
4454
|
-
before = _this.before;
|
|
4455
|
-
}
|
|
4456
|
-
} else {
|
|
4457
|
-
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
4458
|
-
}
|
|
4459
|
-
|
|
4460
|
-
_this.container.insertBefore(tag, before);
|
|
4461
|
-
|
|
4462
|
-
_this.tags.push(tag);
|
|
4463
|
-
};
|
|
4464
|
-
|
|
4465
|
-
this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy;
|
|
4466
|
-
this.tags = [];
|
|
4467
|
-
this.ctr = 0;
|
|
4468
|
-
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
4469
|
-
|
|
4470
|
-
this.key = options.key;
|
|
4471
|
-
this.container = options.container;
|
|
4472
|
-
this.prepend = options.prepend;
|
|
4473
|
-
this.insertionPoint = options.insertionPoint;
|
|
4474
|
-
this.before = null;
|
|
4475
|
-
}
|
|
4476
|
-
|
|
4477
|
-
var _proto = StyleSheet.prototype;
|
|
4478
|
-
|
|
4479
|
-
_proto.hydrate = function hydrate(nodes) {
|
|
4480
|
-
nodes.forEach(this._insertTag);
|
|
4481
|
-
};
|
|
4482
|
-
|
|
4483
|
-
_proto.insert = function insert(rule) {
|
|
4484
|
-
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
|
4485
|
-
// it's 1 in dev because we insert source maps that map a single rule to a location
|
|
4486
|
-
// and you can only have one source map per style tag
|
|
4487
|
-
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
4488
|
-
this._insertTag(createStyleElement(this));
|
|
4489
|
-
}
|
|
4490
|
-
|
|
4491
|
-
var tag = this.tags[this.tags.length - 1];
|
|
4492
|
-
|
|
4493
|
-
if (this.isSpeedy) {
|
|
4494
|
-
var sheet = sheetForTag(tag);
|
|
4495
|
-
|
|
4496
|
-
try {
|
|
4497
|
-
// this is the ultrafast version, works across browsers
|
|
4498
|
-
// the big drawback is that the css won't be editable in devtools
|
|
4499
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
4500
|
-
} catch (e) {
|
|
4501
|
-
}
|
|
4502
|
-
} else {
|
|
4503
|
-
tag.appendChild(document.createTextNode(rule));
|
|
4504
|
-
}
|
|
4505
|
-
|
|
4506
|
-
this.ctr++;
|
|
4507
|
-
};
|
|
4508
|
-
|
|
4509
|
-
_proto.flush = function flush() {
|
|
4510
|
-
// $FlowFixMe
|
|
4511
|
-
this.tags.forEach(function (tag) {
|
|
4512
|
-
return tag.parentNode && tag.parentNode.removeChild(tag);
|
|
4513
|
-
});
|
|
4514
|
-
this.tags = [];
|
|
4515
|
-
this.ctr = 0;
|
|
4516
|
-
};
|
|
4517
|
-
|
|
4518
|
-
return StyleSheet;
|
|
4519
|
-
}();
|
|
4520
|
-
|
|
4521
|
-
var MS = '-ms-';
|
|
4522
|
-
var MOZ = '-moz-';
|
|
4523
|
-
var WEBKIT = '-webkit-';
|
|
4524
|
-
|
|
4525
|
-
var COMMENT = 'comm';
|
|
4526
|
-
var RULESET = 'rule';
|
|
4527
|
-
var DECLARATION = 'decl';
|
|
4528
|
-
var IMPORT = '@import';
|
|
4529
|
-
var KEYFRAMES = '@keyframes';
|
|
4530
|
-
var LAYER = '@layer';
|
|
4215
|
+
/**
|
|
4216
|
+
* @return {number}
|
|
4217
|
+
*/
|
|
4218
|
+
function peek () {
|
|
4219
|
+
return charat(characters, position)
|
|
4220
|
+
}
|
|
4531
4221
|
|
|
4532
4222
|
/**
|
|
4533
|
-
* @param {number}
|
|
4534
4223
|
* @return {number}
|
|
4535
4224
|
*/
|
|
4536
|
-
|
|
4225
|
+
function caret () {
|
|
4226
|
+
return position
|
|
4227
|
+
}
|
|
4537
4228
|
|
|
4538
4229
|
/**
|
|
4539
|
-
* @param {number}
|
|
4230
|
+
* @param {number} begin
|
|
4231
|
+
* @param {number} end
|
|
4540
4232
|
* @return {string}
|
|
4541
4233
|
*/
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
* @param {object}
|
|
4546
|
-
* @return {object}
|
|
4547
|
-
*/
|
|
4548
|
-
var assign = Object.assign;
|
|
4234
|
+
function slice (begin, end) {
|
|
4235
|
+
return substr(characters, begin, end)
|
|
4236
|
+
}
|
|
4549
4237
|
|
|
4550
4238
|
/**
|
|
4551
|
-
* @param {
|
|
4552
|
-
* @param {number} length
|
|
4239
|
+
* @param {number} type
|
|
4553
4240
|
* @return {number}
|
|
4554
4241
|
*/
|
|
4555
|
-
function
|
|
4556
|
-
|
|
4242
|
+
function token (type) {
|
|
4243
|
+
switch (type) {
|
|
4244
|
+
// \0 \t \n \r \s whitespace token
|
|
4245
|
+
case 0: case 9: case 10: case 13: case 32:
|
|
4246
|
+
return 5
|
|
4247
|
+
// ! + , / > @ ~ isolate token
|
|
4248
|
+
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
|
4249
|
+
// ; { } breakpoint token
|
|
4250
|
+
case 59: case 123: case 125:
|
|
4251
|
+
return 4
|
|
4252
|
+
// : accompanied token
|
|
4253
|
+
case 58:
|
|
4254
|
+
return 3
|
|
4255
|
+
// " ' ( [ opening delimit token
|
|
4256
|
+
case 34: case 39: case 40: case 91:
|
|
4257
|
+
return 2
|
|
4258
|
+
// ) ] closing delimit token
|
|
4259
|
+
case 41: case 93:
|
|
4260
|
+
return 1
|
|
4261
|
+
}
|
|
4262
|
+
|
|
4263
|
+
return 0
|
|
4557
4264
|
}
|
|
4558
4265
|
|
|
4559
4266
|
/**
|
|
4560
4267
|
* @param {string} value
|
|
4561
|
-
* @return {
|
|
4268
|
+
* @return {any[]}
|
|
4562
4269
|
*/
|
|
4563
|
-
function
|
|
4564
|
-
return value
|
|
4270
|
+
function alloc (value) {
|
|
4271
|
+
return line = column = 1, length = strlen(characters = value), position = 0, []
|
|
4565
4272
|
}
|
|
4566
4273
|
|
|
4567
4274
|
/**
|
|
4568
|
-
* @param {
|
|
4569
|
-
* @
|
|
4570
|
-
* @return {string?}
|
|
4275
|
+
* @param {any} value
|
|
4276
|
+
* @return {any}
|
|
4571
4277
|
*/
|
|
4572
|
-
function
|
|
4573
|
-
return
|
|
4278
|
+
function dealloc (value) {
|
|
4279
|
+
return characters = '', value
|
|
4574
4280
|
}
|
|
4575
4281
|
|
|
4576
4282
|
/**
|
|
4577
|
-
* @param {
|
|
4578
|
-
* @param {(string|RegExp)} pattern
|
|
4579
|
-
* @param {string} replacement
|
|
4283
|
+
* @param {number} type
|
|
4580
4284
|
* @return {string}
|
|
4581
4285
|
*/
|
|
4582
|
-
function
|
|
4583
|
-
return
|
|
4286
|
+
function delimit (type) {
|
|
4287
|
+
return trim$1(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
|
4584
4288
|
}
|
|
4585
4289
|
|
|
4586
4290
|
/**
|
|
4587
|
-
* @param {
|
|
4588
|
-
* @
|
|
4589
|
-
* @return {number}
|
|
4291
|
+
* @param {number} type
|
|
4292
|
+
* @return {string}
|
|
4590
4293
|
*/
|
|
4591
|
-
function
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
*/
|
|
4600
|
-
function charat (value, index) {
|
|
4601
|
-
return value.charCodeAt(index) | 0
|
|
4602
|
-
}
|
|
4603
|
-
|
|
4604
|
-
/**
|
|
4605
|
-
* @param {string} value
|
|
4606
|
-
* @param {number} begin
|
|
4607
|
-
* @param {number} end
|
|
4608
|
-
* @return {string}
|
|
4609
|
-
*/
|
|
4610
|
-
function substr (value, begin, end) {
|
|
4611
|
-
return value.slice(begin, end)
|
|
4612
|
-
}
|
|
4613
|
-
|
|
4614
|
-
/**
|
|
4615
|
-
* @param {string} value
|
|
4616
|
-
* @return {number}
|
|
4617
|
-
*/
|
|
4618
|
-
function strlen (value) {
|
|
4619
|
-
return value.length
|
|
4620
|
-
}
|
|
4621
|
-
|
|
4622
|
-
/**
|
|
4623
|
-
* @param {any[]} value
|
|
4624
|
-
* @return {number}
|
|
4625
|
-
*/
|
|
4626
|
-
function sizeof (value) {
|
|
4627
|
-
return value.length
|
|
4628
|
-
}
|
|
4629
|
-
|
|
4630
|
-
/**
|
|
4631
|
-
* @param {any} value
|
|
4632
|
-
* @param {any[]} array
|
|
4633
|
-
* @return {any}
|
|
4634
|
-
*/
|
|
4635
|
-
function append (value, array) {
|
|
4636
|
-
return array.push(value), value
|
|
4637
|
-
}
|
|
4638
|
-
|
|
4639
|
-
/**
|
|
4640
|
-
* @param {string[]} array
|
|
4641
|
-
* @param {function} callback
|
|
4642
|
-
* @return {string}
|
|
4643
|
-
*/
|
|
4644
|
-
function combine (array, callback) {
|
|
4645
|
-
return array.map(callback).join('')
|
|
4646
|
-
}
|
|
4647
|
-
|
|
4648
|
-
var line = 1;
|
|
4649
|
-
var column = 1;
|
|
4650
|
-
var length = 0;
|
|
4651
|
-
var position = 0;
|
|
4652
|
-
var character = 0;
|
|
4653
|
-
var characters = '';
|
|
4654
|
-
|
|
4655
|
-
/**
|
|
4656
|
-
* @param {string} value
|
|
4657
|
-
* @param {object | null} root
|
|
4658
|
-
* @param {object | null} parent
|
|
4659
|
-
* @param {string} type
|
|
4660
|
-
* @param {string[] | string} props
|
|
4661
|
-
* @param {object[] | string} children
|
|
4662
|
-
* @param {number} length
|
|
4663
|
-
*/
|
|
4664
|
-
function node (value, root, parent, type, props, children, length) {
|
|
4665
|
-
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
|
|
4666
|
-
}
|
|
4667
|
-
|
|
4668
|
-
/**
|
|
4669
|
-
* @param {object} root
|
|
4670
|
-
* @param {object} props
|
|
4671
|
-
* @return {object}
|
|
4672
|
-
*/
|
|
4673
|
-
function copy (root, props) {
|
|
4674
|
-
return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
|
|
4675
|
-
}
|
|
4676
|
-
|
|
4677
|
-
/**
|
|
4678
|
-
* @return {number}
|
|
4679
|
-
*/
|
|
4680
|
-
function char () {
|
|
4681
|
-
return character
|
|
4682
|
-
}
|
|
4683
|
-
|
|
4684
|
-
/**
|
|
4685
|
-
* @return {number}
|
|
4686
|
-
*/
|
|
4687
|
-
function prev () {
|
|
4688
|
-
character = position > 0 ? charat(characters, --position) : 0;
|
|
4689
|
-
|
|
4690
|
-
if (column--, character === 10)
|
|
4691
|
-
column = 1, line--;
|
|
4692
|
-
|
|
4693
|
-
return character
|
|
4694
|
-
}
|
|
4695
|
-
|
|
4696
|
-
/**
|
|
4697
|
-
* @return {number}
|
|
4698
|
-
*/
|
|
4699
|
-
function next () {
|
|
4700
|
-
character = position < length ? charat(characters, position++) : 0;
|
|
4701
|
-
|
|
4702
|
-
if (column++, character === 10)
|
|
4703
|
-
column = 1, line++;
|
|
4704
|
-
|
|
4705
|
-
return character
|
|
4706
|
-
}
|
|
4707
|
-
|
|
4708
|
-
/**
|
|
4709
|
-
* @return {number}
|
|
4710
|
-
*/
|
|
4711
|
-
function peek () {
|
|
4712
|
-
return charat(characters, position)
|
|
4713
|
-
}
|
|
4714
|
-
|
|
4715
|
-
/**
|
|
4716
|
-
* @return {number}
|
|
4717
|
-
*/
|
|
4718
|
-
function caret () {
|
|
4719
|
-
return position
|
|
4720
|
-
}
|
|
4721
|
-
|
|
4722
|
-
/**
|
|
4723
|
-
* @param {number} begin
|
|
4724
|
-
* @param {number} end
|
|
4725
|
-
* @return {string}
|
|
4726
|
-
*/
|
|
4727
|
-
function slice (begin, end) {
|
|
4728
|
-
return substr(characters, begin, end)
|
|
4729
|
-
}
|
|
4730
|
-
|
|
4731
|
-
/**
|
|
4732
|
-
* @param {number} type
|
|
4733
|
-
* @return {number}
|
|
4734
|
-
*/
|
|
4735
|
-
function token (type) {
|
|
4736
|
-
switch (type) {
|
|
4737
|
-
// \0 \t \n \r \s whitespace token
|
|
4738
|
-
case 0: case 9: case 10: case 13: case 32:
|
|
4739
|
-
return 5
|
|
4740
|
-
// ! + , / > @ ~ isolate token
|
|
4741
|
-
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
|
4742
|
-
// ; { } breakpoint token
|
|
4743
|
-
case 59: case 123: case 125:
|
|
4744
|
-
return 4
|
|
4745
|
-
// : accompanied token
|
|
4746
|
-
case 58:
|
|
4747
|
-
return 3
|
|
4748
|
-
// " ' ( [ opening delimit token
|
|
4749
|
-
case 34: case 39: case 40: case 91:
|
|
4750
|
-
return 2
|
|
4751
|
-
// ) ] closing delimit token
|
|
4752
|
-
case 41: case 93:
|
|
4753
|
-
return 1
|
|
4754
|
-
}
|
|
4755
|
-
|
|
4756
|
-
return 0
|
|
4757
|
-
}
|
|
4758
|
-
|
|
4759
|
-
/**
|
|
4760
|
-
* @param {string} value
|
|
4761
|
-
* @return {any[]}
|
|
4762
|
-
*/
|
|
4763
|
-
function alloc (value) {
|
|
4764
|
-
return line = column = 1, length = strlen(characters = value), position = 0, []
|
|
4765
|
-
}
|
|
4766
|
-
|
|
4767
|
-
/**
|
|
4768
|
-
* @param {any} value
|
|
4769
|
-
* @return {any}
|
|
4770
|
-
*/
|
|
4771
|
-
function dealloc (value) {
|
|
4772
|
-
return characters = '', value
|
|
4773
|
-
}
|
|
4774
|
-
|
|
4775
|
-
/**
|
|
4776
|
-
* @param {number} type
|
|
4777
|
-
* @return {string}
|
|
4778
|
-
*/
|
|
4779
|
-
function delimit (type) {
|
|
4780
|
-
return trim$1(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
|
4781
|
-
}
|
|
4782
|
-
|
|
4783
|
-
/**
|
|
4784
|
-
* @param {number} type
|
|
4785
|
-
* @return {string}
|
|
4786
|
-
*/
|
|
4787
|
-
function whitespace (type) {
|
|
4788
|
-
while (character = peek())
|
|
4789
|
-
if (character < 33)
|
|
4790
|
-
next();
|
|
4791
|
-
else
|
|
4792
|
-
break
|
|
4793
|
-
|
|
4794
|
-
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
|
4294
|
+
function whitespace (type) {
|
|
4295
|
+
while (character = peek())
|
|
4296
|
+
if (character < 33)
|
|
4297
|
+
next();
|
|
4298
|
+
else
|
|
4299
|
+
break
|
|
4300
|
+
|
|
4301
|
+
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
|
4795
4302
|
}
|
|
4796
4303
|
|
|
4797
4304
|
/**
|
|
@@ -5642,80 +5149,593 @@ var reactJsxRuntime_production_min = {};
|
|
|
5642
5149
|
* This source code is licensed under the MIT license found in the
|
|
5643
5150
|
* LICENSE file in the root directory of this source tree.
|
|
5644
5151
|
*/
|
|
5645
|
-
var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
5646
|
-
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
|
|
5152
|
+
var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
5153
|
+
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
|
|
5154
|
+
|
|
5155
|
+
{
|
|
5156
|
+
jsxRuntime.exports = reactJsxRuntime_production_min;
|
|
5157
|
+
}
|
|
5158
|
+
|
|
5159
|
+
var jsxRuntimeExports = jsxRuntime.exports;
|
|
5160
|
+
|
|
5161
|
+
let cache$1;
|
|
5162
|
+
if (typeof document === 'object') {
|
|
5163
|
+
cache$1 = createCache({
|
|
5164
|
+
key: 'css',
|
|
5165
|
+
prepend: true
|
|
5166
|
+
});
|
|
5167
|
+
}
|
|
5168
|
+
function StyledEngineProvider(props) {
|
|
5169
|
+
const {
|
|
5170
|
+
injectFirst,
|
|
5171
|
+
children
|
|
5172
|
+
} = props;
|
|
5173
|
+
return injectFirst && cache$1 ? /*#__PURE__*/jsxRuntimeExports.jsx(CacheProvider, {
|
|
5174
|
+
value: cache$1,
|
|
5175
|
+
children: children
|
|
5176
|
+
}) : children;
|
|
5177
|
+
}
|
|
5178
|
+
|
|
5179
|
+
/**
|
|
5180
|
+
* @mui/styled-engine v5.15.4
|
|
5181
|
+
*
|
|
5182
|
+
* @license MIT
|
|
5183
|
+
* This source code is licensed under the MIT license found in the
|
|
5184
|
+
* LICENSE file in the root directory of this source tree.
|
|
5185
|
+
*/
|
|
5186
|
+
function styled$1(tag, options) {
|
|
5187
|
+
const stylesFactory = styled$2(tag, options);
|
|
5188
|
+
return stylesFactory;
|
|
5189
|
+
}
|
|
5190
|
+
|
|
5191
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
5192
|
+
const internal_processStyles = (tag, processor) => {
|
|
5193
|
+
// Emotion attaches all the styles as `__emotion_styles`.
|
|
5194
|
+
// Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
|
|
5195
|
+
if (Array.isArray(tag.__emotion_styles)) {
|
|
5196
|
+
tag.__emotion_styles = processor(tag.__emotion_styles);
|
|
5197
|
+
}
|
|
5198
|
+
};
|
|
5199
|
+
|
|
5200
|
+
function _extends$3() {
|
|
5201
|
+
_extends$3 = Object.assign ? Object.assign.bind() : function (target) {
|
|
5202
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5203
|
+
var source = arguments[i];
|
|
5204
|
+
for (var key in source) {
|
|
5205
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5206
|
+
target[key] = source[key];
|
|
5207
|
+
}
|
|
5208
|
+
}
|
|
5209
|
+
}
|
|
5210
|
+
return target;
|
|
5211
|
+
};
|
|
5212
|
+
return _extends$3.apply(this, arguments);
|
|
5213
|
+
}
|
|
5214
|
+
|
|
5215
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
5216
|
+
if (source == null) return {};
|
|
5217
|
+
var target = {};
|
|
5218
|
+
var sourceKeys = Object.keys(source);
|
|
5219
|
+
var key, i;
|
|
5220
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
5221
|
+
key = sourceKeys[i];
|
|
5222
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
5223
|
+
target[key] = source[key];
|
|
5224
|
+
}
|
|
5225
|
+
return target;
|
|
5226
|
+
}
|
|
5227
|
+
|
|
5228
|
+
function _extends$2() {
|
|
5229
|
+
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
5230
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5231
|
+
var source = arguments[i];
|
|
5232
|
+
for (var key in source) {
|
|
5233
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5234
|
+
target[key] = source[key];
|
|
5235
|
+
}
|
|
5236
|
+
}
|
|
5237
|
+
}
|
|
5238
|
+
return target;
|
|
5239
|
+
};
|
|
5240
|
+
return _extends$2.apply(this, arguments);
|
|
5241
|
+
}
|
|
5242
|
+
|
|
5243
|
+
// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
|
|
5244
|
+
function isPlainObject(item) {
|
|
5245
|
+
if (typeof item !== 'object' || item === null) {
|
|
5246
|
+
return false;
|
|
5247
|
+
}
|
|
5248
|
+
const prototype = Object.getPrototypeOf(item);
|
|
5249
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
|
|
5250
|
+
}
|
|
5251
|
+
function deepClone(source) {
|
|
5252
|
+
if (!isPlainObject(source)) {
|
|
5253
|
+
return source;
|
|
5254
|
+
}
|
|
5255
|
+
const output = {};
|
|
5256
|
+
Object.keys(source).forEach(key => {
|
|
5257
|
+
output[key] = deepClone(source[key]);
|
|
5258
|
+
});
|
|
5259
|
+
return output;
|
|
5260
|
+
}
|
|
5261
|
+
function deepmerge(target, source, options = {
|
|
5262
|
+
clone: true
|
|
5263
|
+
}) {
|
|
5264
|
+
const output = options.clone ? _extends$2({}, target) : target;
|
|
5265
|
+
if (isPlainObject(target) && isPlainObject(source)) {
|
|
5266
|
+
Object.keys(source).forEach(key => {
|
|
5267
|
+
// Avoid prototype pollution
|
|
5268
|
+
if (key === '__proto__') {
|
|
5269
|
+
return;
|
|
5270
|
+
}
|
|
5271
|
+
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
5272
|
+
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
5273
|
+
output[key] = deepmerge(target[key], source[key], options);
|
|
5274
|
+
} else if (options.clone) {
|
|
5275
|
+
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
|
|
5276
|
+
} else {
|
|
5277
|
+
output[key] = source[key];
|
|
5278
|
+
}
|
|
5279
|
+
});
|
|
5280
|
+
}
|
|
5281
|
+
return output;
|
|
5282
|
+
}
|
|
5283
|
+
|
|
5284
|
+
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
5285
|
+
//
|
|
5286
|
+
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
5287
|
+
// We only handle the first word.
|
|
5288
|
+
function capitalize(string) {
|
|
5289
|
+
if (typeof string !== 'string') {
|
|
5290
|
+
throw new Error(formatMuiErrorMessage(7));
|
|
5291
|
+
}
|
|
5292
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
5293
|
+
}
|
|
5294
|
+
|
|
5295
|
+
/**
|
|
5296
|
+
* Safe chained function.
|
|
5297
|
+
*
|
|
5298
|
+
* Will only create a new function if needed,
|
|
5299
|
+
* otherwise will pass back existing functions or null.
|
|
5300
|
+
*/
|
|
5301
|
+
function createChainedFunction(...funcs) {
|
|
5302
|
+
return funcs.reduce((acc, func) => {
|
|
5303
|
+
if (func == null) {
|
|
5304
|
+
return acc;
|
|
5305
|
+
}
|
|
5306
|
+
return function chainedFunction(...args) {
|
|
5307
|
+
acc.apply(this, args);
|
|
5308
|
+
func.apply(this, args);
|
|
5309
|
+
};
|
|
5310
|
+
}, () => {});
|
|
5311
|
+
}
|
|
5312
|
+
|
|
5313
|
+
// Corresponds to 10 frames at 60 Hz.
|
|
5314
|
+
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
|
|
5315
|
+
function debounce(func, wait = 166) {
|
|
5316
|
+
let timeout;
|
|
5317
|
+
function debounced(...args) {
|
|
5318
|
+
const later = () => {
|
|
5319
|
+
// @ts-ignore
|
|
5320
|
+
func.apply(this, args);
|
|
5321
|
+
};
|
|
5322
|
+
clearTimeout(timeout);
|
|
5323
|
+
timeout = setTimeout(later, wait);
|
|
5324
|
+
}
|
|
5325
|
+
debounced.clear = () => {
|
|
5326
|
+
clearTimeout(timeout);
|
|
5327
|
+
};
|
|
5328
|
+
return debounced;
|
|
5329
|
+
}
|
|
5330
|
+
|
|
5331
|
+
function deprecatedPropType(validator, reason) {
|
|
5332
|
+
{
|
|
5333
|
+
return () => null;
|
|
5334
|
+
}
|
|
5335
|
+
}
|
|
5336
|
+
|
|
5337
|
+
function isMuiElement(element, muiNames) {
|
|
5338
|
+
var _muiName, _element$type;
|
|
5339
|
+
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
5340
|
+
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
5341
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
5342
|
+
(_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
|
|
5343
|
+
}
|
|
5344
|
+
|
|
5345
|
+
function ownerDocument(node) {
|
|
5346
|
+
return node && node.ownerDocument || document;
|
|
5347
|
+
}
|
|
5348
|
+
|
|
5349
|
+
function ownerWindow(node) {
|
|
5350
|
+
const doc = ownerDocument(node);
|
|
5351
|
+
return doc.defaultView || window;
|
|
5352
|
+
}
|
|
5353
|
+
|
|
5354
|
+
function requirePropFactory(componentNameInError, Component) {
|
|
5355
|
+
{
|
|
5356
|
+
return () => null;
|
|
5357
|
+
}
|
|
5358
|
+
}
|
|
5359
|
+
|
|
5360
|
+
/**
|
|
5361
|
+
* TODO v5: consider making it private
|
|
5362
|
+
*
|
|
5363
|
+
* passes {value} to {ref}
|
|
5364
|
+
*
|
|
5365
|
+
* WARNING: Be sure to only call this inside a callback that is passed as a ref.
|
|
5366
|
+
* Otherwise, make sure to cleanup the previous {ref} if it changes. See
|
|
5367
|
+
* https://github.com/mui/material-ui/issues/13539
|
|
5368
|
+
*
|
|
5369
|
+
* Useful if you want to expose the ref of an inner component to the public API
|
|
5370
|
+
* while still using it inside the component.
|
|
5371
|
+
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
5372
|
+
*/
|
|
5373
|
+
function setRef(ref, value) {
|
|
5374
|
+
if (typeof ref === 'function') {
|
|
5375
|
+
ref(value);
|
|
5376
|
+
} else if (ref) {
|
|
5377
|
+
ref.current = value;
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5380
|
+
|
|
5381
|
+
/**
|
|
5382
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
5383
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
5384
|
+
*
|
|
5385
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
5386
|
+
* and confirm it doesn't apply to your use-case.
|
|
5387
|
+
*/
|
|
5388
|
+
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
5389
|
+
var useEnhancedEffect$1 = useEnhancedEffect;
|
|
5390
|
+
|
|
5391
|
+
let globalId = 0;
|
|
5392
|
+
function useGlobalId(idOverride) {
|
|
5393
|
+
const [defaultId, setDefaultId] = React.useState(idOverride);
|
|
5394
|
+
const id = idOverride || defaultId;
|
|
5395
|
+
React.useEffect(() => {
|
|
5396
|
+
if (defaultId == null) {
|
|
5397
|
+
// Fallback to this default id when possible.
|
|
5398
|
+
// Use the incrementing value for client-side rendering only.
|
|
5399
|
+
// We can't use it server-side.
|
|
5400
|
+
// If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
|
|
5401
|
+
globalId += 1;
|
|
5402
|
+
setDefaultId(`mui-${globalId}`);
|
|
5403
|
+
}
|
|
5404
|
+
}, [defaultId]);
|
|
5405
|
+
return id;
|
|
5406
|
+
}
|
|
5407
|
+
|
|
5408
|
+
// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
|
|
5409
|
+
const maybeReactUseId = React['useId'.toString()];
|
|
5410
|
+
/**
|
|
5411
|
+
*
|
|
5412
|
+
* @example <div id={useId()} />
|
|
5413
|
+
* @param idOverride
|
|
5414
|
+
* @returns {string}
|
|
5415
|
+
*/
|
|
5416
|
+
function useId(idOverride) {
|
|
5417
|
+
if (maybeReactUseId !== undefined) {
|
|
5418
|
+
const reactId = maybeReactUseId();
|
|
5419
|
+
return idOverride != null ? idOverride : reactId;
|
|
5420
|
+
}
|
|
5421
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
|
|
5422
|
+
return useGlobalId(idOverride);
|
|
5423
|
+
}
|
|
5424
|
+
|
|
5425
|
+
function unsupportedProp(props, propName, componentName, location, propFullName) {
|
|
5426
|
+
{
|
|
5427
|
+
return null;
|
|
5428
|
+
}
|
|
5429
|
+
}
|
|
5430
|
+
|
|
5431
|
+
function useControlled({
|
|
5432
|
+
controlled,
|
|
5433
|
+
default: defaultProp,
|
|
5434
|
+
name,
|
|
5435
|
+
state = 'value'
|
|
5436
|
+
}) {
|
|
5437
|
+
// isControlled is ignored in the hook dependency lists as it should never change.
|
|
5438
|
+
const {
|
|
5439
|
+
current: isControlled
|
|
5440
|
+
} = React.useRef(controlled !== undefined);
|
|
5441
|
+
const [valueState, setValue] = React.useState(defaultProp);
|
|
5442
|
+
const value = isControlled ? controlled : valueState;
|
|
5443
|
+
const setValueIfUncontrolled = React.useCallback(newValue => {
|
|
5444
|
+
if (!isControlled) {
|
|
5445
|
+
setValue(newValue);
|
|
5446
|
+
}
|
|
5447
|
+
}, []);
|
|
5448
|
+
return [value, setValueIfUncontrolled];
|
|
5449
|
+
}
|
|
5450
|
+
|
|
5451
|
+
/**
|
|
5452
|
+
* Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
5453
|
+
* See RFC in https://github.com/reactjs/rfcs/pull/220
|
|
5454
|
+
*/
|
|
5455
|
+
|
|
5456
|
+
function useEventCallback(fn) {
|
|
5457
|
+
const ref = React.useRef(fn);
|
|
5458
|
+
useEnhancedEffect$1(() => {
|
|
5459
|
+
ref.current = fn;
|
|
5460
|
+
});
|
|
5461
|
+
return React.useRef((...args) =>
|
|
5462
|
+
// @ts-expect-error hide `this`
|
|
5463
|
+
(0, ref.current)(...args)).current;
|
|
5464
|
+
}
|
|
5465
|
+
|
|
5466
|
+
function useForkRef(...refs) {
|
|
5467
|
+
/**
|
|
5468
|
+
* This will create a new function if the refs passed to this hook change and are all defined.
|
|
5469
|
+
* This means react will call the old forkRef with `null` and the new forkRef
|
|
5470
|
+
* with the ref. Cleanup naturally emerges from this behavior.
|
|
5471
|
+
*/
|
|
5472
|
+
return React.useMemo(() => {
|
|
5473
|
+
if (refs.every(ref => ref == null)) {
|
|
5474
|
+
return null;
|
|
5475
|
+
}
|
|
5476
|
+
return instance => {
|
|
5477
|
+
refs.forEach(ref => {
|
|
5478
|
+
setRef(ref, instance);
|
|
5479
|
+
});
|
|
5480
|
+
};
|
|
5481
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5482
|
+
}, refs);
|
|
5483
|
+
}
|
|
5484
|
+
|
|
5485
|
+
let hadKeyboardEvent = true;
|
|
5486
|
+
let hadFocusVisibleRecently = false;
|
|
5487
|
+
let hadFocusVisibleRecentlyTimeout;
|
|
5488
|
+
const inputTypesWhitelist = {
|
|
5489
|
+
text: true,
|
|
5490
|
+
search: true,
|
|
5491
|
+
url: true,
|
|
5492
|
+
tel: true,
|
|
5493
|
+
email: true,
|
|
5494
|
+
password: true,
|
|
5495
|
+
number: true,
|
|
5496
|
+
date: true,
|
|
5497
|
+
month: true,
|
|
5498
|
+
week: true,
|
|
5499
|
+
time: true,
|
|
5500
|
+
datetime: true,
|
|
5501
|
+
'datetime-local': true
|
|
5502
|
+
};
|
|
5503
|
+
|
|
5504
|
+
/**
|
|
5505
|
+
* Computes whether the given element should automatically trigger the
|
|
5506
|
+
* `focus-visible` class being added, i.e. whether it should always match
|
|
5507
|
+
* `:focus-visible` when focused.
|
|
5508
|
+
* @param {Element} node
|
|
5509
|
+
* @returns {boolean}
|
|
5510
|
+
*/
|
|
5511
|
+
function focusTriggersKeyboardModality(node) {
|
|
5512
|
+
const {
|
|
5513
|
+
type,
|
|
5514
|
+
tagName
|
|
5515
|
+
} = node;
|
|
5516
|
+
if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {
|
|
5517
|
+
return true;
|
|
5518
|
+
}
|
|
5519
|
+
if (tagName === 'TEXTAREA' && !node.readOnly) {
|
|
5520
|
+
return true;
|
|
5521
|
+
}
|
|
5522
|
+
if (node.isContentEditable) {
|
|
5523
|
+
return true;
|
|
5524
|
+
}
|
|
5525
|
+
return false;
|
|
5526
|
+
}
|
|
5527
|
+
|
|
5528
|
+
/**
|
|
5529
|
+
* Keep track of our keyboard modality state with `hadKeyboardEvent`.
|
|
5530
|
+
* If the most recent user interaction was via the keyboard;
|
|
5531
|
+
* and the key press did not include a meta, alt/option, or control key;
|
|
5532
|
+
* then the modality is keyboard. Otherwise, the modality is not keyboard.
|
|
5533
|
+
* @param {KeyboardEvent} event
|
|
5534
|
+
*/
|
|
5535
|
+
function handleKeyDown(event) {
|
|
5536
|
+
if (event.metaKey || event.altKey || event.ctrlKey) {
|
|
5537
|
+
return;
|
|
5538
|
+
}
|
|
5539
|
+
hadKeyboardEvent = true;
|
|
5540
|
+
}
|
|
5541
|
+
|
|
5542
|
+
/**
|
|
5543
|
+
* If at any point a user clicks with a pointing device, ensure that we change
|
|
5544
|
+
* the modality away from keyboard.
|
|
5545
|
+
* This avoids the situation where a user presses a key on an already focused
|
|
5546
|
+
* element, and then clicks on a different element, focusing it with a
|
|
5547
|
+
* pointing device, while we still think we're in keyboard modality.
|
|
5548
|
+
*/
|
|
5549
|
+
function handlePointerDown() {
|
|
5550
|
+
hadKeyboardEvent = false;
|
|
5551
|
+
}
|
|
5552
|
+
function handleVisibilityChange() {
|
|
5553
|
+
if (this.visibilityState === 'hidden') {
|
|
5554
|
+
// If the tab becomes active again, the browser will handle calling focus
|
|
5555
|
+
// on the element (Safari actually calls it twice).
|
|
5556
|
+
// If this tab change caused a blur on an element with focus-visible,
|
|
5557
|
+
// re-apply the class when the user switches back to the tab.
|
|
5558
|
+
if (hadFocusVisibleRecently) {
|
|
5559
|
+
hadKeyboardEvent = true;
|
|
5560
|
+
}
|
|
5561
|
+
}
|
|
5562
|
+
}
|
|
5563
|
+
function prepare(doc) {
|
|
5564
|
+
doc.addEventListener('keydown', handleKeyDown, true);
|
|
5565
|
+
doc.addEventListener('mousedown', handlePointerDown, true);
|
|
5566
|
+
doc.addEventListener('pointerdown', handlePointerDown, true);
|
|
5567
|
+
doc.addEventListener('touchstart', handlePointerDown, true);
|
|
5568
|
+
doc.addEventListener('visibilitychange', handleVisibilityChange, true);
|
|
5569
|
+
}
|
|
5570
|
+
function isFocusVisible(event) {
|
|
5571
|
+
const {
|
|
5572
|
+
target
|
|
5573
|
+
} = event;
|
|
5574
|
+
try {
|
|
5575
|
+
return target.matches(':focus-visible');
|
|
5576
|
+
} catch (error) {
|
|
5577
|
+
// Browsers not implementing :focus-visible will throw a SyntaxError.
|
|
5578
|
+
// We use our own heuristic for those browsers.
|
|
5579
|
+
// Rethrow might be better if it's not the expected error but do we really
|
|
5580
|
+
// want to crash if focus-visible malfunctioned?
|
|
5581
|
+
}
|
|
5647
5582
|
|
|
5648
|
-
|
|
5649
|
-
|
|
5583
|
+
// No need for validFocusTarget check. The user does that by attaching it to
|
|
5584
|
+
// focusable events only.
|
|
5585
|
+
return hadKeyboardEvent || focusTriggersKeyboardModality(target);
|
|
5650
5586
|
}
|
|
5587
|
+
function useIsFocusVisible() {
|
|
5588
|
+
const ref = React.useCallback(node => {
|
|
5589
|
+
if (node != null) {
|
|
5590
|
+
prepare(node.ownerDocument);
|
|
5591
|
+
}
|
|
5592
|
+
}, []);
|
|
5593
|
+
const isFocusVisibleRef = React.useRef(false);
|
|
5651
5594
|
|
|
5652
|
-
|
|
5595
|
+
/**
|
|
5596
|
+
* Should be called if a blur event is fired
|
|
5597
|
+
*/
|
|
5598
|
+
function handleBlurVisible() {
|
|
5599
|
+
// checking against potential state variable does not suffice if we focus and blur synchronously.
|
|
5600
|
+
// React wouldn't have time to trigger a re-render so `focusVisible` would be stale.
|
|
5601
|
+
// Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.
|
|
5602
|
+
// This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751
|
|
5603
|
+
// TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).
|
|
5604
|
+
if (isFocusVisibleRef.current) {
|
|
5605
|
+
// To detect a tab/window switch, we look for a blur event followed
|
|
5606
|
+
// rapidly by a visibility change.
|
|
5607
|
+
// If we don't see a visibility change within 100ms, it's probably a
|
|
5608
|
+
// regular focus change.
|
|
5609
|
+
hadFocusVisibleRecently = true;
|
|
5610
|
+
window.clearTimeout(hadFocusVisibleRecentlyTimeout);
|
|
5611
|
+
hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {
|
|
5612
|
+
hadFocusVisibleRecently = false;
|
|
5613
|
+
}, 100);
|
|
5614
|
+
isFocusVisibleRef.current = false;
|
|
5615
|
+
return true;
|
|
5616
|
+
}
|
|
5617
|
+
return false;
|
|
5618
|
+
}
|
|
5653
5619
|
|
|
5654
|
-
|
|
5655
|
-
if
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
}
|
|
5620
|
+
/**
|
|
5621
|
+
* Should be called if a blur event is fired
|
|
5622
|
+
*/
|
|
5623
|
+
function handleFocusVisible(event) {
|
|
5624
|
+
if (isFocusVisible(event)) {
|
|
5625
|
+
isFocusVisibleRef.current = true;
|
|
5626
|
+
return true;
|
|
5627
|
+
}
|
|
5628
|
+
return false;
|
|
5629
|
+
}
|
|
5630
|
+
return {
|
|
5631
|
+
isFocusVisibleRef,
|
|
5632
|
+
onFocus: handleFocusVisible,
|
|
5633
|
+
onBlur: handleBlurVisible,
|
|
5634
|
+
ref
|
|
5635
|
+
};
|
|
5670
5636
|
}
|
|
5671
5637
|
|
|
5672
5638
|
/**
|
|
5673
|
-
*
|
|
5674
|
-
*
|
|
5675
|
-
* @
|
|
5676
|
-
*
|
|
5677
|
-
* LICENSE file in the root directory of this source tree.
|
|
5639
|
+
* Add keys, values of `defaultProps` that does not exist in `props`
|
|
5640
|
+
* @param {object} defaultProps
|
|
5641
|
+
* @param {object} props
|
|
5642
|
+
* @returns {object} resolved props
|
|
5678
5643
|
*/
|
|
5679
|
-
function
|
|
5680
|
-
const
|
|
5681
|
-
|
|
5644
|
+
function resolveProps(defaultProps, props) {
|
|
5645
|
+
const output = _extends$2({}, props);
|
|
5646
|
+
Object.keys(defaultProps).forEach(propName => {
|
|
5647
|
+
if (propName.toString().match(/^(components|slots)$/)) {
|
|
5648
|
+
output[propName] = _extends$2({}, defaultProps[propName], output[propName]);
|
|
5649
|
+
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
5650
|
+
const defaultSlotProps = defaultProps[propName] || {};
|
|
5651
|
+
const slotProps = props[propName];
|
|
5652
|
+
output[propName] = {};
|
|
5653
|
+
if (!slotProps || !Object.keys(slotProps)) {
|
|
5654
|
+
// Reduce the iteration if the slot props is empty
|
|
5655
|
+
output[propName] = defaultSlotProps;
|
|
5656
|
+
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
|
5657
|
+
// Reduce the iteration if the default slot props is empty
|
|
5658
|
+
output[propName] = slotProps;
|
|
5659
|
+
} else {
|
|
5660
|
+
output[propName] = _extends$2({}, slotProps);
|
|
5661
|
+
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
|
5662
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
5663
|
+
});
|
|
5664
|
+
}
|
|
5665
|
+
} else if (output[propName] === undefined) {
|
|
5666
|
+
output[propName] = defaultProps[propName];
|
|
5667
|
+
}
|
|
5668
|
+
});
|
|
5669
|
+
return output;
|
|
5682
5670
|
}
|
|
5683
5671
|
|
|
5684
|
-
|
|
5685
|
-
const
|
|
5686
|
-
|
|
5687
|
-
//
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5699
|
-
target[key] = source[key];
|
|
5672
|
+
function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
5673
|
+
const output = {};
|
|
5674
|
+
Object.keys(slots).forEach(
|
|
5675
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
5676
|
+
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
5677
|
+
slot => {
|
|
5678
|
+
output[slot] = slots[slot].reduce((acc, key) => {
|
|
5679
|
+
if (key) {
|
|
5680
|
+
const utilityClass = getUtilityClass(key);
|
|
5681
|
+
if (utilityClass !== '') {
|
|
5682
|
+
acc.push(utilityClass);
|
|
5683
|
+
}
|
|
5684
|
+
if (classes && classes[key]) {
|
|
5685
|
+
acc.push(classes[key]);
|
|
5700
5686
|
}
|
|
5701
5687
|
}
|
|
5688
|
+
return acc;
|
|
5689
|
+
}, []).join(' ');
|
|
5690
|
+
});
|
|
5691
|
+
return output;
|
|
5692
|
+
}
|
|
5693
|
+
|
|
5694
|
+
const defaultGenerator = componentName => componentName;
|
|
5695
|
+
const createClassNameGenerator = () => {
|
|
5696
|
+
let generate = defaultGenerator;
|
|
5697
|
+
return {
|
|
5698
|
+
configure(generator) {
|
|
5699
|
+
generate = generator;
|
|
5700
|
+
},
|
|
5701
|
+
generate(componentName) {
|
|
5702
|
+
return generate(componentName);
|
|
5703
|
+
},
|
|
5704
|
+
reset() {
|
|
5705
|
+
generate = defaultGenerator;
|
|
5702
5706
|
}
|
|
5703
|
-
return target;
|
|
5704
5707
|
};
|
|
5705
|
-
|
|
5708
|
+
};
|
|
5709
|
+
const ClassNameGenerator = createClassNameGenerator();
|
|
5710
|
+
|
|
5711
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
5712
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
5713
|
+
|
|
5714
|
+
const globalStateClassesMapping = {
|
|
5715
|
+
active: 'active',
|
|
5716
|
+
checked: 'checked',
|
|
5717
|
+
completed: 'completed',
|
|
5718
|
+
disabled: 'disabled',
|
|
5719
|
+
error: 'error',
|
|
5720
|
+
expanded: 'expanded',
|
|
5721
|
+
focused: 'focused',
|
|
5722
|
+
focusVisible: 'focusVisible',
|
|
5723
|
+
open: 'open',
|
|
5724
|
+
readOnly: 'readOnly',
|
|
5725
|
+
required: 'required',
|
|
5726
|
+
selected: 'selected'
|
|
5727
|
+
};
|
|
5728
|
+
function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
|
|
5729
|
+
const globalStateClass = globalStateClassesMapping[slot];
|
|
5730
|
+
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
|
|
5706
5731
|
}
|
|
5707
5732
|
|
|
5708
|
-
function
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
key = sourceKeys[i];
|
|
5715
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
5716
|
-
target[key] = source[key];
|
|
5717
|
-
}
|
|
5718
|
-
return target;
|
|
5733
|
+
function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
|
|
5734
|
+
const result = {};
|
|
5735
|
+
slots.forEach(slot => {
|
|
5736
|
+
result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
|
|
5737
|
+
});
|
|
5738
|
+
return result;
|
|
5719
5739
|
}
|
|
5720
5740
|
|
|
5721
5741
|
const _excluded$g = ["values", "unit", "step"];
|
|
@@ -5727,7 +5747,7 @@ const sortBreakpointsValues = values => {
|
|
|
5727
5747
|
// Sort in ascending order
|
|
5728
5748
|
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
5729
5749
|
return breakpointsAsArray.reduce((acc, obj) => {
|
|
5730
|
-
return _extends$
|
|
5750
|
+
return _extends$3({}, acc, {
|
|
5731
5751
|
[obj.key]: obj.val
|
|
5732
5752
|
});
|
|
5733
5753
|
}, {});
|
|
@@ -5749,7 +5769,6 @@ function createBreakpoints(breakpoints) {
|
|
|
5749
5769
|
// desktop
|
|
5750
5770
|
xl: 1536 // large screen
|
|
5751
5771
|
},
|
|
5752
|
-
|
|
5753
5772
|
unit = 'px',
|
|
5754
5773
|
step = 5
|
|
5755
5774
|
} = breakpoints,
|
|
@@ -5785,7 +5804,7 @@ function createBreakpoints(breakpoints) {
|
|
|
5785
5804
|
}
|
|
5786
5805
|
return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
|
|
5787
5806
|
}
|
|
5788
|
-
return _extends$
|
|
5807
|
+
return _extends$3({
|
|
5789
5808
|
keys,
|
|
5790
5809
|
values: sortedValues,
|
|
5791
5810
|
up,
|
|
@@ -5824,7 +5843,6 @@ const values = {
|
|
|
5824
5843
|
// desktop
|
|
5825
5844
|
xl: 1536 // large screen
|
|
5826
5845
|
};
|
|
5827
|
-
|
|
5828
5846
|
const defaultBreakpoints = {
|
|
5829
5847
|
// Sorted ASC by size. That's important.
|
|
5830
5848
|
// It can't be configured as it's used statically for propTypes.
|
|
@@ -6071,8 +6089,6 @@ padding.filterProps = paddingKeys;
|
|
|
6071
6089
|
|
|
6072
6090
|
// The different signatures imply different meaning for their arguments that can't be expressed structurally.
|
|
6073
6091
|
// We express the difference with variable names.
|
|
6074
|
-
/* tslint:disable:unified-signatures */
|
|
6075
|
-
/* tslint:enable:unified-signatures */
|
|
6076
6092
|
|
|
6077
6093
|
function createSpacing(spacingInput = 8) {
|
|
6078
6094
|
// Already transformed.
|
|
@@ -6126,51 +6142,25 @@ function borderTransform(value) {
|
|
|
6126
6142
|
}
|
|
6127
6143
|
return `${value}px solid`;
|
|
6128
6144
|
}
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
const
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
const
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
});
|
|
6149
|
-
const borderLeft = style$1({
|
|
6150
|
-
prop: 'borderLeft',
|
|
6151
|
-
themeKey: 'borders',
|
|
6152
|
-
transform: borderTransform
|
|
6153
|
-
});
|
|
6154
|
-
const borderColor = style$1({
|
|
6155
|
-
prop: 'borderColor',
|
|
6156
|
-
themeKey: 'palette'
|
|
6157
|
-
});
|
|
6158
|
-
const borderTopColor = style$1({
|
|
6159
|
-
prop: 'borderTopColor',
|
|
6160
|
-
themeKey: 'palette'
|
|
6161
|
-
});
|
|
6162
|
-
const borderRightColor = style$1({
|
|
6163
|
-
prop: 'borderRightColor',
|
|
6164
|
-
themeKey: 'palette'
|
|
6165
|
-
});
|
|
6166
|
-
const borderBottomColor = style$1({
|
|
6167
|
-
prop: 'borderBottomColor',
|
|
6168
|
-
themeKey: 'palette'
|
|
6169
|
-
});
|
|
6170
|
-
const borderLeftColor = style$1({
|
|
6171
|
-
prop: 'borderLeftColor',
|
|
6172
|
-
themeKey: 'palette'
|
|
6173
|
-
});
|
|
6145
|
+
function createBorderStyle(prop, transform) {
|
|
6146
|
+
return style$1({
|
|
6147
|
+
prop,
|
|
6148
|
+
themeKey: 'borders',
|
|
6149
|
+
transform
|
|
6150
|
+
});
|
|
6151
|
+
}
|
|
6152
|
+
const border = createBorderStyle('border', borderTransform);
|
|
6153
|
+
const borderTop = createBorderStyle('borderTop', borderTransform);
|
|
6154
|
+
const borderRight = createBorderStyle('borderRight', borderTransform);
|
|
6155
|
+
const borderBottom = createBorderStyle('borderBottom', borderTransform);
|
|
6156
|
+
const borderLeft = createBorderStyle('borderLeft', borderTransform);
|
|
6157
|
+
const borderColor = createBorderStyle('borderColor');
|
|
6158
|
+
const borderTopColor = createBorderStyle('borderTopColor');
|
|
6159
|
+
const borderRightColor = createBorderStyle('borderRightColor');
|
|
6160
|
+
const borderBottomColor = createBorderStyle('borderBottomColor');
|
|
6161
|
+
const borderLeftColor = createBorderStyle('borderLeftColor');
|
|
6162
|
+
const outline = createBorderStyle('outline', borderTransform);
|
|
6163
|
+
const outlineColor = createBorderStyle('outlineColor');
|
|
6174
6164
|
|
|
6175
6165
|
// false positive
|
|
6176
6166
|
// eslint-disable-next-line react/function-component-definition
|
|
@@ -6186,7 +6176,7 @@ const borderRadius$1 = props => {
|
|
|
6186
6176
|
};
|
|
6187
6177
|
borderRadius$1.propTypes = {};
|
|
6188
6178
|
borderRadius$1.filterProps = ['borderRadius'];
|
|
6189
|
-
compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius$1);
|
|
6179
|
+
compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius$1, outline, outlineColor);
|
|
6190
6180
|
|
|
6191
6181
|
// false positive
|
|
6192
6182
|
// eslint-disable-next-line react/function-component-definition
|
|
@@ -6384,6 +6374,13 @@ const defaultSxConfig = {
|
|
|
6384
6374
|
borderLeftColor: {
|
|
6385
6375
|
themeKey: 'palette'
|
|
6386
6376
|
},
|
|
6377
|
+
outline: {
|
|
6378
|
+
themeKey: 'borders',
|
|
6379
|
+
transform: borderTransform
|
|
6380
|
+
},
|
|
6381
|
+
outlineColor: {
|
|
6382
|
+
themeKey: 'palette'
|
|
6383
|
+
},
|
|
6387
6384
|
borderRadius: {
|
|
6388
6385
|
themeKey: 'shape.borderRadius',
|
|
6389
6386
|
style: borderRadius$1
|
|
@@ -6693,7 +6690,6 @@ function unstable_createStyleFunctionSx() {
|
|
|
6693
6690
|
if (!sx) {
|
|
6694
6691
|
return null; // Emotion & styled-components will neglect null
|
|
6695
6692
|
}
|
|
6696
|
-
|
|
6697
6693
|
const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig$1;
|
|
6698
6694
|
|
|
6699
6695
|
/*
|
|
@@ -6749,7 +6745,6 @@ function unstable_createStyleFunctionSx() {
|
|
|
6749
6745
|
}
|
|
6750
6746
|
const styleFunctionSx = unstable_createStyleFunctionSx();
|
|
6751
6747
|
styleFunctionSx.filterProps = ['sx'];
|
|
6752
|
-
var styleFunctionSx$1 = styleFunctionSx;
|
|
6753
6748
|
|
|
6754
6749
|
const _excluded$f = ["breakpoints", "palette", "spacing", "shape"];
|
|
6755
6750
|
function createTheme$1(options = {}, ...args) {
|
|
@@ -6767,16 +6762,16 @@ function createTheme$1(options = {}, ...args) {
|
|
|
6767
6762
|
direction: 'ltr',
|
|
6768
6763
|
components: {},
|
|
6769
6764
|
// Inject component definitions.
|
|
6770
|
-
palette: _extends$
|
|
6765
|
+
palette: _extends$3({
|
|
6771
6766
|
mode: 'light'
|
|
6772
6767
|
}, paletteInput),
|
|
6773
6768
|
spacing,
|
|
6774
|
-
shape: _extends$
|
|
6769
|
+
shape: _extends$3({}, shape$1, shapeInput)
|
|
6775
6770
|
}, other);
|
|
6776
6771
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
|
6777
|
-
muiTheme.unstable_sxConfig = _extends$
|
|
6772
|
+
muiTheme.unstable_sxConfig = _extends$3({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
|
|
6778
6773
|
muiTheme.unstable_sx = function sx(props) {
|
|
6779
|
-
return styleFunctionSx
|
|
6774
|
+
return styleFunctionSx({
|
|
6780
6775
|
sx: props,
|
|
6781
6776
|
theme: this
|
|
6782
6777
|
});
|
|
@@ -6797,7 +6792,7 @@ function useTheme$3(defaultTheme = systemDefaultTheme$1) {
|
|
|
6797
6792
|
return useTheme$4(defaultTheme);
|
|
6798
6793
|
}
|
|
6799
6794
|
|
|
6800
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<
|
|
6795
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
6801
6796
|
|
|
6802
6797
|
const _excluded$e = ["variant"];
|
|
6803
6798
|
function isEmpty$2(string) {
|
|
@@ -6845,10 +6840,17 @@ const getStyleOverrides = (name, theme) => {
|
|
|
6845
6840
|
return null;
|
|
6846
6841
|
};
|
|
6847
6842
|
const transformVariants = variants => {
|
|
6843
|
+
let numOfCallbacks = 0;
|
|
6848
6844
|
const variantsStyles = {};
|
|
6849
6845
|
if (variants) {
|
|
6850
6846
|
variants.forEach(definition => {
|
|
6851
|
-
|
|
6847
|
+
let key = '';
|
|
6848
|
+
if (typeof definition.props === 'function') {
|
|
6849
|
+
key = `callback${numOfCallbacks}`;
|
|
6850
|
+
numOfCallbacks += 1;
|
|
6851
|
+
} else {
|
|
6852
|
+
key = propsToClassKey(definition.props);
|
|
6853
|
+
}
|
|
6852
6854
|
variantsStyles[key] = definition.style;
|
|
6853
6855
|
});
|
|
6854
6856
|
}
|
|
@@ -6866,16 +6868,29 @@ const variantsResolver = (props, styles, variants) => {
|
|
|
6866
6868
|
ownerState = {}
|
|
6867
6869
|
} = props;
|
|
6868
6870
|
const variantsStyles = [];
|
|
6871
|
+
let numOfCallbacks = 0;
|
|
6869
6872
|
if (variants) {
|
|
6870
6873
|
variants.forEach(variant => {
|
|
6871
6874
|
let isMatch = true;
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6875
|
+
if (typeof variant.props === 'function') {
|
|
6876
|
+
const propsToCheck = _extends$3({}, props, ownerState);
|
|
6877
|
+
isMatch = variant.props(propsToCheck);
|
|
6878
|
+
} else {
|
|
6879
|
+
Object.keys(variant.props).forEach(key => {
|
|
6880
|
+
if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
|
|
6881
|
+
isMatch = false;
|
|
6882
|
+
}
|
|
6883
|
+
});
|
|
6884
|
+
}
|
|
6877
6885
|
if (isMatch) {
|
|
6878
|
-
|
|
6886
|
+
if (typeof variant.props === 'function') {
|
|
6887
|
+
variantsStyles.push(styles[`callback${numOfCallbacks}`]);
|
|
6888
|
+
} else {
|
|
6889
|
+
variantsStyles.push(styles[propsToClassKey(variant.props)]);
|
|
6890
|
+
}
|
|
6891
|
+
}
|
|
6892
|
+
if (typeof variant.props === 'function') {
|
|
6893
|
+
numOfCallbacks += 1;
|
|
6879
6894
|
}
|
|
6880
6895
|
});
|
|
6881
6896
|
}
|
|
@@ -6917,8 +6932,8 @@ const muiStyledFunctionResolver = ({
|
|
|
6917
6932
|
defaultTheme,
|
|
6918
6933
|
themeId
|
|
6919
6934
|
}) => {
|
|
6920
|
-
const resolvedStyles = styledArg(_extends$
|
|
6921
|
-
theme: resolveTheme(_extends$
|
|
6935
|
+
const resolvedStyles = styledArg(_extends$3({}, props, {
|
|
6936
|
+
theme: resolveTheme(_extends$3({}, props, {
|
|
6922
6937
|
defaultTheme,
|
|
6923
6938
|
themeId
|
|
6924
6939
|
}))
|
|
@@ -6942,8 +6957,8 @@ function createStyled(input = {}) {
|
|
|
6942
6957
|
slotShouldForwardProp = shouldForwardProp
|
|
6943
6958
|
} = input;
|
|
6944
6959
|
const systemSx = props => {
|
|
6945
|
-
return styleFunctionSx
|
|
6946
|
-
theme: resolveTheme(_extends$
|
|
6960
|
+
return styleFunctionSx(_extends$3({}, props, {
|
|
6961
|
+
theme: resolveTheme(_extends$3({}, props, {
|
|
6947
6962
|
defaultTheme,
|
|
6948
6963
|
themeId
|
|
6949
6964
|
}))
|
|
@@ -6984,7 +6999,7 @@ function createStyled(input = {}) {
|
|
|
6984
6999
|
// for string (html) tag, preserve the behavior in emotion & styled-components.
|
|
6985
7000
|
shouldForwardPropOption = undefined;
|
|
6986
7001
|
}
|
|
6987
|
-
const defaultStyledResolver = styled$
|
|
7002
|
+
const defaultStyledResolver = styled$1(tag, _extends$3({
|
|
6988
7003
|
shouldForwardProp: shouldForwardPropOption,
|
|
6989
7004
|
label
|
|
6990
7005
|
}, options));
|
|
@@ -7050,7 +7065,7 @@ function createStyled(input = {}) {
|
|
|
7050
7065
|
}
|
|
7051
7066
|
if (componentName && overridesResolver) {
|
|
7052
7067
|
expressionsWithDefaultTheme.push(props => {
|
|
7053
|
-
const theme = resolveTheme(_extends$
|
|
7068
|
+
const theme = resolveTheme(_extends$3({}, props, {
|
|
7054
7069
|
defaultTheme,
|
|
7055
7070
|
themeId
|
|
7056
7071
|
}));
|
|
@@ -7058,7 +7073,7 @@ function createStyled(input = {}) {
|
|
|
7058
7073
|
if (styleOverrides) {
|
|
7059
7074
|
const resolvedStyleOverrides = {};
|
|
7060
7075
|
Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
|
|
7061
|
-
resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends$
|
|
7076
|
+
resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends$3({}, props, {
|
|
7062
7077
|
theme
|
|
7063
7078
|
})) : slotStyle;
|
|
7064
7079
|
});
|
|
@@ -7069,7 +7084,7 @@ function createStyled(input = {}) {
|
|
|
7069
7084
|
}
|
|
7070
7085
|
if (componentName && !skipVariantsResolver) {
|
|
7071
7086
|
expressionsWithDefaultTheme.push(props => {
|
|
7072
|
-
const theme = resolveTheme(_extends$
|
|
7087
|
+
const theme = resolveTheme(_extends$3({}, props, {
|
|
7073
7088
|
defaultTheme,
|
|
7074
7089
|
themeId
|
|
7075
7090
|
}));
|
|
@@ -7271,7 +7286,6 @@ function getLuminance(color) {
|
|
|
7271
7286
|
if (color.type !== 'color') {
|
|
7272
7287
|
val /= 255; // normalized
|
|
7273
7288
|
}
|
|
7274
|
-
|
|
7275
7289
|
return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;
|
|
7276
7290
|
});
|
|
7277
7291
|
|
|
@@ -7399,7 +7413,7 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
|
7399
7413
|
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
|
7400
7414
|
if (typeof localTheme === 'function') {
|
|
7401
7415
|
const mergedTheme = localTheme(resolvedTheme);
|
|
7402
|
-
const result = themeId ? _extends$
|
|
7416
|
+
const result = themeId ? _extends$3({}, upperTheme, {
|
|
7403
7417
|
[themeId]: mergedTheme
|
|
7404
7418
|
}) : mergedTheme;
|
|
7405
7419
|
// must return a function for the private theme to NOT merge with the upper theme.
|
|
@@ -7409,9 +7423,9 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
|
7409
7423
|
}
|
|
7410
7424
|
return result;
|
|
7411
7425
|
}
|
|
7412
|
-
return themeId ? _extends$
|
|
7426
|
+
return themeId ? _extends$3({}, upperTheme, {
|
|
7413
7427
|
[themeId]: localTheme
|
|
7414
|
-
}) : _extends$
|
|
7428
|
+
}) : _extends$3({}, upperTheme, localTheme);
|
|
7415
7429
|
}, [themeId, upperTheme, localTheme, isPrivate]);
|
|
7416
7430
|
}
|
|
7417
7431
|
|
|
@@ -7453,7 +7467,7 @@ function adaptV4Theme(inputTheme) {
|
|
|
7453
7467
|
styleOverrides = {}
|
|
7454
7468
|
} = inputTheme,
|
|
7455
7469
|
other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$c);
|
|
7456
|
-
const theme = _extends$
|
|
7470
|
+
const theme = _extends$4({}, other, {
|
|
7457
7471
|
components: {}
|
|
7458
7472
|
});
|
|
7459
7473
|
|
|
@@ -7487,13 +7501,13 @@ function adaptV4Theme(inputTheme) {
|
|
|
7487
7501
|
// theme.mixins.gutters
|
|
7488
7502
|
const breakpoints = createBreakpoints(inputTheme.breakpoints || {});
|
|
7489
7503
|
const spacing = theme.spacing;
|
|
7490
|
-
theme.mixins = _extends$
|
|
7504
|
+
theme.mixins = _extends$4({
|
|
7491
7505
|
gutters: (styles = {}) => {
|
|
7492
|
-
return _extends$
|
|
7506
|
+
return _extends$4({
|
|
7493
7507
|
paddingLeft: spacing(2),
|
|
7494
7508
|
paddingRight: spacing(2)
|
|
7495
7509
|
}, styles, {
|
|
7496
|
-
[breakpoints.up('sm')]: _extends$
|
|
7510
|
+
[breakpoints.up('sm')]: _extends$4({
|
|
7497
7511
|
paddingLeft: spacing(3),
|
|
7498
7512
|
paddingRight: spacing(3)
|
|
7499
7513
|
}, styles[breakpoints.up('sm')])
|
|
@@ -7506,7 +7520,7 @@ function adaptV4Theme(inputTheme) {
|
|
|
7506
7520
|
} = palette,
|
|
7507
7521
|
paletteRest = _objectWithoutPropertiesLoose$1(palette, _excluded2$1);
|
|
7508
7522
|
const finalMode = modeInput || typeInput || 'light';
|
|
7509
|
-
theme.palette = _extends$
|
|
7523
|
+
theme.palette = _extends$4({
|
|
7510
7524
|
// theme.palette.text.hint
|
|
7511
7525
|
text: {
|
|
7512
7526
|
hint: finalMode === 'dark' ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.38)'
|
|
@@ -7518,7 +7532,7 @@ function adaptV4Theme(inputTheme) {
|
|
|
7518
7532
|
}
|
|
7519
7533
|
|
|
7520
7534
|
function createMixins(breakpoints, mixins) {
|
|
7521
|
-
return _extends$
|
|
7535
|
+
return _extends$4({
|
|
7522
7536
|
toolbar: {
|
|
7523
7537
|
minHeight: 56,
|
|
7524
7538
|
[breakpoints.up('xs')]: {
|
|
@@ -7856,7 +7870,7 @@ function createPalette(palette) {
|
|
|
7856
7870
|
lightShade = 300,
|
|
7857
7871
|
darkShade = 700
|
|
7858
7872
|
}) => {
|
|
7859
|
-
color = _extends$
|
|
7873
|
+
color = _extends$4({}, color);
|
|
7860
7874
|
if (!color.main && color[mainShade]) {
|
|
7861
7875
|
color.main = color[mainShade];
|
|
7862
7876
|
}
|
|
@@ -7877,9 +7891,9 @@ function createPalette(palette) {
|
|
|
7877
7891
|
dark: dark$1,
|
|
7878
7892
|
light: light$1
|
|
7879
7893
|
};
|
|
7880
|
-
const paletteOutput = deepmerge(_extends$
|
|
7894
|
+
const paletteOutput = deepmerge(_extends$4({
|
|
7881
7895
|
// A collection of common colors.
|
|
7882
|
-
common: _extends$
|
|
7896
|
+
common: _extends$4({}, common$1),
|
|
7883
7897
|
// prevent mutable object.
|
|
7884
7898
|
// The palette mode, can be light or dark.
|
|
7885
7899
|
mode,
|
|
@@ -7967,7 +7981,7 @@ function createTypography(palette, typography) {
|
|
|
7967
7981
|
other = _objectWithoutPropertiesLoose$1(_ref, _excluded$a);
|
|
7968
7982
|
const coef = fontSize / 14;
|
|
7969
7983
|
const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);
|
|
7970
|
-
const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$
|
|
7984
|
+
const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$4({
|
|
7971
7985
|
fontFamily,
|
|
7972
7986
|
fontWeight,
|
|
7973
7987
|
fontSize: pxToRem(size),
|
|
@@ -7999,7 +8013,7 @@ function createTypography(palette, typography) {
|
|
|
7999
8013
|
letterSpacing: 'inherit'
|
|
8000
8014
|
}
|
|
8001
8015
|
};
|
|
8002
|
-
return deepmerge(_extends$
|
|
8016
|
+
return deepmerge(_extends$4({
|
|
8003
8017
|
htmlFontSize,
|
|
8004
8018
|
pxToRem,
|
|
8005
8019
|
fontFamily,
|
|
@@ -8022,7 +8036,6 @@ function createShadow(...px) {
|
|
|
8022
8036
|
|
|
8023
8037
|
// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss
|
|
8024
8038
|
const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
|
8025
|
-
var shadows$1 = shadows;
|
|
8026
8039
|
|
|
8027
8040
|
const _excluded$9 = ["duration", "easing", "delay"];
|
|
8028
8041
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
|
@@ -8067,8 +8080,8 @@ function getAutoHeightDuration(height) {
|
|
|
8067
8080
|
return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
|
|
8068
8081
|
}
|
|
8069
8082
|
function createTransitions(inputTransitions) {
|
|
8070
|
-
const mergedEasing = _extends$
|
|
8071
|
-
const mergedDuration = _extends$
|
|
8083
|
+
const mergedEasing = _extends$4({}, easing, inputTransitions.easing);
|
|
8084
|
+
const mergedDuration = _extends$4({}, duration, inputTransitions.duration);
|
|
8072
8085
|
const create = (props = ['all'], options = {}) => {
|
|
8073
8086
|
const {
|
|
8074
8087
|
duration: durationOption = mergedDuration.standard,
|
|
@@ -8078,7 +8091,7 @@ function createTransitions(inputTransitions) {
|
|
|
8078
8091
|
_objectWithoutPropertiesLoose$1(options, _excluded$9);
|
|
8079
8092
|
return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
|
|
8080
8093
|
};
|
|
8081
|
-
return _extends$
|
|
8094
|
+
return _extends$4({
|
|
8082
8095
|
getAutoHeightDuration,
|
|
8083
8096
|
create
|
|
8084
8097
|
}, inputTransitions, {
|
|
@@ -8119,16 +8132,16 @@ function createTheme(options = {}, ...args) {
|
|
|
8119
8132
|
mixins: createMixins(systemTheme.breakpoints, mixinsInput),
|
|
8120
8133
|
palette,
|
|
8121
8134
|
// Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
|
|
8122
|
-
shadows: shadows
|
|
8135
|
+
shadows: shadows.slice(),
|
|
8123
8136
|
typography: createTypography(palette, typographyInput),
|
|
8124
8137
|
transitions: createTransitions(transitionsInput),
|
|
8125
|
-
zIndex: _extends$
|
|
8138
|
+
zIndex: _extends$4({}, zIndex$1)
|
|
8126
8139
|
});
|
|
8127
8140
|
muiTheme = deepmerge(muiTheme, other);
|
|
8128
8141
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
|
8129
|
-
muiTheme.unstable_sxConfig = _extends$
|
|
8142
|
+
muiTheme.unstable_sxConfig = _extends$4({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
|
|
8130
8143
|
muiTheme.unstable_sx = function sx(props) {
|
|
8131
|
-
return styleFunctionSx
|
|
8144
|
+
return styleFunctionSx({
|
|
8132
8145
|
sx: props,
|
|
8133
8146
|
theme: this
|
|
8134
8147
|
});
|
|
@@ -8162,7 +8175,6 @@ const styled = createStyled({
|
|
|
8162
8175
|
defaultTheme: defaultTheme$1,
|
|
8163
8176
|
rootShouldForwardProp
|
|
8164
8177
|
});
|
|
8165
|
-
var styled$1 = styled;
|
|
8166
8178
|
|
|
8167
8179
|
const _excluded$7 = ["theme"];
|
|
8168
8180
|
function ThemeProvider(_ref) {
|
|
@@ -8171,7 +8183,7 @@ function ThemeProvider(_ref) {
|
|
|
8171
8183
|
} = _ref,
|
|
8172
8184
|
props = _objectWithoutPropertiesLoose$1(_ref, _excluded$7);
|
|
8173
8185
|
const scopedTheme = themeInput[THEME_ID];
|
|
8174
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$
|
|
8186
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$4({}, props, {
|
|
8175
8187
|
themeId: scopedTheme ? THEME_ID : undefined,
|
|
8176
8188
|
theme: scopedTheme || themeInput
|
|
8177
8189
|
}));
|
|
@@ -8268,6 +8280,7 @@ const colors = {
|
|
|
8268
8280
|
grey90: '#E6E6E6',
|
|
8269
8281
|
grey85: '#D9D9D9',
|
|
8270
8282
|
grey55: '#8C8C8C',
|
|
8283
|
+
grey45: '#737373',
|
|
8271
8284
|
grey30: '#4D4D4D',
|
|
8272
8285
|
grey25: '#404040',
|
|
8273
8286
|
grey20: '#333333',
|
|
@@ -8322,7 +8335,9 @@ const light = {
|
|
|
8322
8335
|
custom: {
|
|
8323
8336
|
focusBorder: colors.blue,
|
|
8324
8337
|
focusOutline: 'rgba(70, 157, 205, 0.3)',
|
|
8325
|
-
inputBackground: 'rgba(255, 255, 255, 1)'
|
|
8338
|
+
inputBackground: 'rgba(255, 255, 255, 1)',
|
|
8339
|
+
disabledBackground: colors.grey45,
|
|
8340
|
+
disabledContrastText: colors.grey100
|
|
8326
8341
|
},
|
|
8327
8342
|
selected: {
|
|
8328
8343
|
main: colors.green,
|
|
@@ -8390,7 +8405,9 @@ const dark = {
|
|
|
8390
8405
|
custom: {
|
|
8391
8406
|
focusBorder: colors.blue,
|
|
8392
8407
|
focusOutline: 'rgba(70, 157, 205, 0.3)',
|
|
8393
|
-
inputBackground: 'rgba(0, 0, 0, 0.2)'
|
|
8408
|
+
inputBackground: 'rgba(0, 0, 0, 0.2)',
|
|
8409
|
+
disabledBackground: colors.grey45,
|
|
8410
|
+
disabledContrastText: colors.grey100
|
|
8394
8411
|
},
|
|
8395
8412
|
selected: {
|
|
8396
8413
|
main: colors.green,
|
|
@@ -8551,8 +8568,8 @@ function create$3(definition) {
|
|
|
8551
8568
|
return cache[key];
|
|
8552
8569
|
}
|
|
8553
8570
|
|
|
8554
|
-
const NEBULA_VERSION_HASH = "
|
|
8555
|
-
ClassNameGenerator
|
|
8571
|
+
const NEBULA_VERSION_HASH = "c1b9" ;
|
|
8572
|
+
ClassNameGenerator.configure(componentName => {
|
|
8556
8573
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
8557
8574
|
});
|
|
8558
8575
|
|
|
@@ -8667,7 +8684,6 @@ function createAppSelections(_ref) {
|
|
|
8667
8684
|
}
|
|
8668
8685
|
}
|
|
8669
8686
|
};
|
|
8670
|
-
|
|
8671
8687
|
await beginSelections();
|
|
8672
8688
|
};
|
|
8673
8689
|
const appModal = {
|
|
@@ -8812,7 +8828,7 @@ function boot(_ref2) {
|
|
|
8812
8828
|
const appRef = React__default.createRef();
|
|
8813
8829
|
const element = document.createElement('div');
|
|
8814
8830
|
element.style.display = 'none';
|
|
8815
|
-
element.setAttribute('data-nebulajs-version', "4.
|
|
8831
|
+
element.setAttribute('data-nebulajs-version', "4.10.0" );
|
|
8816
8832
|
element.setAttribute('data-app-id', app.id);
|
|
8817
8833
|
document.body.appendChild(element);
|
|
8818
8834
|
if (context) {
|
|
@@ -8898,7 +8914,6 @@ const modelStoreMiddleware = _ref => {
|
|
|
8898
8914
|
modelChangedStore.set(model.id, {});
|
|
8899
8915
|
modelChangedStore.dispatch(true); // Force new state to trigger hooks
|
|
8900
8916
|
};
|
|
8901
|
-
|
|
8902
8917
|
const unsubscribe = () => {
|
|
8903
8918
|
model.removeListener('changed', onChanged);
|
|
8904
8919
|
rpcResultStore.clear(model.id);
|
|
@@ -9183,7 +9198,7 @@ function getFontSize(size) {
|
|
|
9183
9198
|
}
|
|
9184
9199
|
return '16px';
|
|
9185
9200
|
}
|
|
9186
|
-
function SvgIcon$
|
|
9201
|
+
function SvgIcon$1(_ref) {
|
|
9187
9202
|
let {
|
|
9188
9203
|
size,
|
|
9189
9204
|
style = {},
|
|
@@ -9233,7 +9248,7 @@ const remove = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
9233
9248
|
}
|
|
9234
9249
|
}]
|
|
9235
9250
|
});
|
|
9236
|
-
var Remove = (props => SvgIcon$
|
|
9251
|
+
var Remove = (props => SvgIcon$1(remove(props)));
|
|
9237
9252
|
|
|
9238
9253
|
const lock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
9239
9254
|
shapes: [{
|
|
@@ -9243,9 +9258,10 @@ const lock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
9243
9258
|
}
|
|
9244
9259
|
}]
|
|
9245
9260
|
});
|
|
9246
|
-
var Lock = (props => SvgIcon$
|
|
9261
|
+
var Lock = (props => SvgIcon$1(lock(props)));
|
|
9247
9262
|
|
|
9248
9263
|
const unlock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
9264
|
+
viewBox: '0 0 12 16',
|
|
9249
9265
|
shapes: [{
|
|
9250
9266
|
type: 'path',
|
|
9251
9267
|
attrs: {
|
|
@@ -9253,7 +9269,7 @@ const unlock = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
9253
9269
|
}
|
|
9254
9270
|
}]
|
|
9255
9271
|
});
|
|
9256
|
-
var Unlock = (props => SvgIcon$
|
|
9272
|
+
var Unlock = (props => SvgIcon$1(unlock(props)));
|
|
9257
9273
|
|
|
9258
9274
|
function isRangeVisible(_ref) {
|
|
9259
9275
|
var lastRenderedStartIndex = _ref.lastRenderedStartIndex,
|
|
@@ -9894,7 +9910,7 @@ const tick = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
9894
9910
|
}
|
|
9895
9911
|
}]
|
|
9896
9912
|
});
|
|
9897
|
-
var Tick = (props => SvgIcon$
|
|
9913
|
+
var Tick = (props => SvgIcon$1(tick(props)));
|
|
9898
9914
|
|
|
9899
9915
|
/**
|
|
9900
9916
|
* @ignore
|
|
@@ -10058,7 +10074,6 @@ const getMaxFreqWidth = _ref2 => {
|
|
|
10058
10074
|
if (frequencyMode === 'P') {
|
|
10059
10075
|
return sizes.freqMinWidth; // because it will never grow beyond "100.0%"
|
|
10060
10076
|
}
|
|
10061
|
-
|
|
10062
10077
|
return sizes.freqMaxWidth;
|
|
10063
10078
|
};
|
|
10064
10079
|
const getSelectedStyle = _ref3 => {
|
|
@@ -10098,7 +10113,7 @@ const ellipsis = {
|
|
|
10098
10113
|
};
|
|
10099
10114
|
const iconWidth = 24; // tick and lock icon width in px
|
|
10100
10115
|
|
|
10101
|
-
const RowColRoot = styled
|
|
10116
|
+
const RowColRoot = styled('div', {
|
|
10102
10117
|
shouldForwardProp: prop => !['checkboxes', 'isGridMode', 'isGridCol', 'dense', 'direction', 'sizes', 'frequencyMode', 'freqHitsValue', 'layout', 'styles'].includes(prop)
|
|
10103
10118
|
})(_ref4 => {
|
|
10104
10119
|
let {
|
|
@@ -10306,7 +10321,7 @@ const classes$b = {
|
|
|
10306
10321
|
checkbox: "".concat(PREFIX$b, "-checkbox"),
|
|
10307
10322
|
dense: "".concat(PREFIX$b, "-dense")
|
|
10308
10323
|
};
|
|
10309
|
-
const StyledCheckbox = styled
|
|
10324
|
+
const StyledCheckbox = styled(Checkbox, {
|
|
10310
10325
|
shouldForwardProp: p => p !== 'styles'
|
|
10311
10326
|
})(_ref => {
|
|
10312
10327
|
let {
|
|
@@ -10403,7 +10418,7 @@ const classes$a = {
|
|
|
10403
10418
|
denseRadioButton: "".concat(PREFIX$a, "-denseRadioButton"),
|
|
10404
10419
|
radioButton: "".concat(PREFIX$a, "-radioButton")
|
|
10405
10420
|
};
|
|
10406
|
-
const StyledRadio = styled
|
|
10421
|
+
const StyledRadio = styled(Radio)(_ref => {
|
|
10407
10422
|
let {
|
|
10408
10423
|
theme,
|
|
10409
10424
|
checked
|
|
@@ -10720,7 +10735,7 @@ function getGridItemSizes(_ref) {
|
|
|
10720
10735
|
}
|
|
10721
10736
|
}
|
|
10722
10737
|
|
|
10723
|
-
const ItemGrid = styled
|
|
10738
|
+
const ItemGrid = styled(Grid, {
|
|
10724
10739
|
shouldForwardProp: prop => !['dataLayout', 'layoutOrder', 'itemPadding', 'cellPaddingRight', 'direction', 'fillHeight'].includes(prop)
|
|
10725
10740
|
})(_ref => {
|
|
10726
10741
|
let {
|
|
@@ -11065,7 +11080,6 @@ function getRowsKeyboardNavigation(_ref) {
|
|
|
11065
11080
|
} else {
|
|
11066
11081
|
return; // propagate to other Esc handler
|
|
11067
11082
|
}
|
|
11068
|
-
|
|
11069
11083
|
break;
|
|
11070
11084
|
case KEYS.HOME:
|
|
11071
11085
|
focusListItems.setFirst(true);
|
|
@@ -11099,7 +11113,6 @@ function getRowsKeyboardNavigation(_ref) {
|
|
|
11099
11113
|
return;
|
|
11100
11114
|
// don't stop propagation since we want to outsource keydown to other handlers.
|
|
11101
11115
|
}
|
|
11102
|
-
|
|
11103
11116
|
if (elementToFocus) {
|
|
11104
11117
|
elementToFocus.focus();
|
|
11105
11118
|
}
|
|
@@ -11265,7 +11278,6 @@ function RowColumn(_ref) {
|
|
|
11265
11278
|
if (!cell) {
|
|
11266
11279
|
return null; // prevent rendering empty rows
|
|
11267
11280
|
}
|
|
11268
|
-
|
|
11269
11281
|
const isGridCol = dataLayout === 'grid' && layoutOrder === 'column';
|
|
11270
11282
|
const label = (_cell$qText = cell === null || cell === void 0 ? void 0 : cell.qText) !== null && _cell$qText !== void 0 ? _cell$qText : '';
|
|
11271
11283
|
// Search highlights. Split up labelText span into several and add the highlighted class to matching sub-strings.
|
|
@@ -11287,12 +11299,13 @@ function RowColumn(_ref) {
|
|
|
11287
11299
|
flexGrow: 1,
|
|
11288
11300
|
paddingLeft: isRtl ? 8 : checkboxes ? 0 : undefined,
|
|
11289
11301
|
paddingRight: checkboxes ? 0 : isRtl ? 8 : 0,
|
|
11290
|
-
justifyContent: valueTextAlign
|
|
11302
|
+
justifyContent: valueTextAlign,
|
|
11303
|
+
textAlign: valueTextAlign
|
|
11291
11304
|
};
|
|
11292
11305
|
const isFirstElement = index === 0;
|
|
11293
|
-
const
|
|
11294
|
-
const
|
|
11295
|
-
const
|
|
11306
|
+
const showLockIcon = isSelected && isLocked;
|
|
11307
|
+
const showTickIcon = !checkboxes && isSelected && !isLocked;
|
|
11308
|
+
const showAnyIcon = !checkboxes && sizePermitsTickOrLock;
|
|
11296
11309
|
const cellPaddingRight = checkboxes || !sizePermitsTickOrLock;
|
|
11297
11310
|
const ariaLabel = getValueLabel({
|
|
11298
11311
|
translator,
|
|
@@ -11388,13 +11401,13 @@ function RowColumn(_ref) {
|
|
|
11388
11401
|
checkboxes: checkboxes,
|
|
11389
11402
|
dense: dense,
|
|
11390
11403
|
showGray: showGray
|
|
11391
|
-
}),
|
|
11404
|
+
}), showAnyIcon && /*#__PURE__*/React__default.createElement(Grid, {
|
|
11392
11405
|
item: true,
|
|
11393
11406
|
className: rowColClasses.icon
|
|
11394
|
-
},
|
|
11407
|
+
}, showLockIcon && /*#__PURE__*/React__default.createElement(Lock, {
|
|
11395
11408
|
style: iconStyles,
|
|
11396
11409
|
size: "small"
|
|
11397
|
-
}),
|
|
11410
|
+
}), showTickIcon && /*#__PURE__*/React__default.createElement(Tick, {
|
|
11398
11411
|
style: iconStyles,
|
|
11399
11412
|
size: "small"
|
|
11400
11413
|
}))));
|
|
@@ -12864,7 +12877,7 @@ function getStyledComponents() {
|
|
|
12864
12877
|
backgroundColor: scrollBarThumbHover
|
|
12865
12878
|
}
|
|
12866
12879
|
});
|
|
12867
|
-
const StyledFixedSizeList = styled$
|
|
12880
|
+
const StyledFixedSizeList = styled$2(FixedSizeList, {
|
|
12868
12881
|
shouldForwardProp: prop => prop !== 'scrollDisabled'
|
|
12869
12882
|
})(_ref => {
|
|
12870
12883
|
let {
|
|
@@ -12874,7 +12887,7 @@ function getStyledComponents() {
|
|
|
12874
12887
|
["&.".concat(classes$9.styledScrollbars)]: getScrollbarStyling(scrollDisabled)
|
|
12875
12888
|
};
|
|
12876
12889
|
});
|
|
12877
|
-
const StyledFixedSizeGrid = styled$
|
|
12890
|
+
const StyledFixedSizeGrid = styled$2(FixedSizeGrid, {
|
|
12878
12891
|
shouldForwardProp: prop => prop !== 'scrollDisabled'
|
|
12879
12892
|
})(_ref2 => {
|
|
12880
12893
|
let {
|
|
@@ -13491,7 +13504,7 @@ function useDataStore(model) {
|
|
|
13491
13504
|
};
|
|
13492
13505
|
}
|
|
13493
13506
|
|
|
13494
|
-
const StyledText = styled
|
|
13507
|
+
const StyledText = styled(Typography, {
|
|
13495
13508
|
shouldForwardProp: p => !['width', 'dense'].includes(p)
|
|
13496
13509
|
})(_ref => {
|
|
13497
13510
|
let {
|
|
@@ -13564,7 +13577,7 @@ const useUtilityClasses = ownerState => {
|
|
|
13564
13577
|
};
|
|
13565
13578
|
return composeClasses(slots, getSvgIconUtilityClass, classes);
|
|
13566
13579
|
};
|
|
13567
|
-
const SvgIconRoot = styled
|
|
13580
|
+
const SvgIconRoot = styled('svg', {
|
|
13568
13581
|
name: 'MuiSvgIcon',
|
|
13569
13582
|
slot: 'Root',
|
|
13570
13583
|
overridesResolver: (props, styles) => {
|
|
@@ -13622,7 +13635,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
13622
13635
|
} = props,
|
|
13623
13636
|
other = _objectWithoutPropertiesLoose$1(props, _excluded$5);
|
|
13624
13637
|
const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
|
|
13625
|
-
const ownerState = _extends$
|
|
13638
|
+
const ownerState = _extends$4({}, props, {
|
|
13626
13639
|
color,
|
|
13627
13640
|
component,
|
|
13628
13641
|
fontSize,
|
|
@@ -13636,7 +13649,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
13636
13649
|
more.viewBox = viewBox;
|
|
13637
13650
|
}
|
|
13638
13651
|
const classes = useUtilityClasses(ownerState);
|
|
13639
|
-
return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$
|
|
13652
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$4({
|
|
13640
13653
|
as: component,
|
|
13641
13654
|
className: clsx(classes.root, className),
|
|
13642
13655
|
focusable: "false",
|
|
@@ -13652,18 +13665,17 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
13652
13665
|
}));
|
|
13653
13666
|
});
|
|
13654
13667
|
SvgIcon.muiName = 'SvgIcon';
|
|
13655
|
-
var SvgIcon$1 = SvgIcon;
|
|
13656
13668
|
|
|
13657
13669
|
function createSvgIcon(path, displayName) {
|
|
13658
13670
|
function Component(props, ref) {
|
|
13659
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon
|
|
13671
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon, _extends$4({
|
|
13660
13672
|
"data-testid": `${displayName}Icon`,
|
|
13661
13673
|
ref: ref
|
|
13662
13674
|
}, props, {
|
|
13663
13675
|
children: path
|
|
13664
13676
|
}));
|
|
13665
13677
|
}
|
|
13666
|
-
Component.muiName = SvgIcon
|
|
13678
|
+
Component.muiName = SvgIcon.muiName;
|
|
13667
13679
|
return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
|
|
13668
13680
|
}
|
|
13669
13681
|
|
|
@@ -13671,7 +13683,7 @@ function createSvgIcon(path, displayName) {
|
|
|
13671
13683
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13672
13684
|
const unstable_ClassNameGenerator = {
|
|
13673
13685
|
configure: generator => {
|
|
13674
|
-
ClassNameGenerator
|
|
13686
|
+
ClassNameGenerator.configure(generator);
|
|
13675
13687
|
}
|
|
13676
13688
|
};
|
|
13677
13689
|
|
|
@@ -13728,12 +13740,11 @@ Object.defineProperty(Close, "__esModule", {
|
|
|
13728
13740
|
var default_1 = Close.default = void 0;
|
|
13729
13741
|
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
13730
13742
|
var _jsxRuntime = jsxRuntimeExports;
|
|
13731
|
-
|
|
13743
|
+
default_1 = Close.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
13732
13744
|
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
13733
13745
|
}), 'Close');
|
|
13734
|
-
default_1 = Close.default = _default;
|
|
13735
13746
|
|
|
13736
|
-
const RootContainer = styled
|
|
13747
|
+
const RootContainer = styled(Paper)(_ref => {
|
|
13737
13748
|
let {
|
|
13738
13749
|
theme,
|
|
13739
13750
|
left
|
|
@@ -13747,11 +13758,11 @@ const RootContainer = styled$1(Paper)(_ref => {
|
|
|
13747
13758
|
left
|
|
13748
13759
|
};
|
|
13749
13760
|
});
|
|
13750
|
-
const LeftItem = styled
|
|
13761
|
+
const LeftItem = styled('div')(() => ({
|
|
13751
13762
|
paddingLeft: '6px',
|
|
13752
13763
|
flexGrow: 1
|
|
13753
13764
|
}));
|
|
13754
|
-
const RightItem = styled
|
|
13765
|
+
const RightItem = styled('div')(_ref2 => {
|
|
13755
13766
|
let {
|
|
13756
13767
|
dense
|
|
13757
13768
|
} = _ref2;
|
|
@@ -13760,7 +13771,7 @@ const RightItem = styled$1('div')(_ref2 => {
|
|
|
13760
13771
|
alignItems: "".concat(dense ? 'center' : 'flex-start')
|
|
13761
13772
|
};
|
|
13762
13773
|
});
|
|
13763
|
-
const SmallCloseIcon = styled
|
|
13774
|
+
const SmallCloseIcon = styled(default_1)(() => ({
|
|
13764
13775
|
fontSize: '14px'
|
|
13765
13776
|
}));
|
|
13766
13777
|
function ListBoxFooter(_ref3) {
|
|
@@ -13909,7 +13920,7 @@ function deduceFrequencyMode(pages) {
|
|
|
13909
13920
|
|
|
13910
13921
|
const _excluded$4 = ["isLoadingData"];
|
|
13911
13922
|
const DEFAULT_MIN_BATCH_SIZE = 100;
|
|
13912
|
-
const StyledWrapper = styled$
|
|
13923
|
+
const StyledWrapper = styled$3('div')(() => ({
|
|
13913
13924
|
["& .screenReaderOnly"]: {
|
|
13914
13925
|
position: 'absolute',
|
|
13915
13926
|
height: 0,
|
|
@@ -14158,7 +14169,6 @@ function ListBox(_ref) {
|
|
|
14158
14169
|
if (s.scrollPosition === 'overflowEnd') {
|
|
14159
14170
|
return; // Do keyScroll.reset() in fetchData() to avoid scrolling to top.
|
|
14160
14171
|
}
|
|
14161
|
-
|
|
14162
14172
|
keyScroll.reset();
|
|
14163
14173
|
}, [keyScroll.state.up, keyScroll.state.down, keyScroll.state.scrollPosition]);
|
|
14164
14174
|
const {
|
|
@@ -14426,7 +14436,7 @@ const Item = React__default.forwardRef((_ref, ref) => {
|
|
|
14426
14436
|
"aria-expanded": ariaExpanded,
|
|
14427
14437
|
"aria-controls": "moreMenuList",
|
|
14428
14438
|
"data-testid": btnId
|
|
14429
|
-
}, hasSvgIconShape && SvgIcon$
|
|
14439
|
+
}, hasSvgIconShape && SvgIcon$1(item.getSvgIconShape()), addAnchor && /*#__PURE__*/React__default.createElement("div", {
|
|
14430
14440
|
ref: ref,
|
|
14431
14441
|
style: {
|
|
14432
14442
|
bottom: -spacing,
|
|
@@ -14455,11 +14465,12 @@ const clearSelections = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
14455
14465
|
}
|
|
14456
14466
|
}]
|
|
14457
14467
|
});
|
|
14458
|
-
var ClearSelections = (props => SvgIcon$
|
|
14468
|
+
var ClearSelections = (props => SvgIcon$1(clearSelections(props)));
|
|
14459
14469
|
|
|
14460
14470
|
function useDefaultSelectionActions(_ref) {
|
|
14461
14471
|
let {
|
|
14462
14472
|
api,
|
|
14473
|
+
layout,
|
|
14463
14474
|
onConfirm = () => {},
|
|
14464
14475
|
onCancel = () => {},
|
|
14465
14476
|
onKeyDeactivate = () => {}
|
|
@@ -14471,14 +14482,14 @@ function useDefaultSelectionActions(_ref) {
|
|
|
14471
14482
|
key: 'clear',
|
|
14472
14483
|
type: 'icon-button',
|
|
14473
14484
|
label: translator.get('Selection.Clear'),
|
|
14474
|
-
enabled: () => api.canClear(),
|
|
14485
|
+
enabled: () => api.canClear(layout),
|
|
14475
14486
|
action: () => api.clear(),
|
|
14476
14487
|
getSvgIconShape: clearSelections
|
|
14477
14488
|
}, {
|
|
14478
14489
|
key: 'cancel',
|
|
14479
14490
|
type: 'icon-button',
|
|
14480
14491
|
label: translator.get('Selection.Cancel'),
|
|
14481
|
-
enabled: () => api.canCancel(),
|
|
14492
|
+
enabled: () => api.canCancel(layout),
|
|
14482
14493
|
action: () => {
|
|
14483
14494
|
onCancel();
|
|
14484
14495
|
api.cancel();
|
|
@@ -14493,7 +14504,7 @@ function useDefaultSelectionActions(_ref) {
|
|
|
14493
14504
|
key: 'confirm',
|
|
14494
14505
|
type: 'icon-button',
|
|
14495
14506
|
label: translator.get('Selection.Confirm'),
|
|
14496
|
-
enabled: () => api.canConfirm(),
|
|
14507
|
+
enabled: () => api.canConfirm(layout),
|
|
14497
14508
|
action: () => {
|
|
14498
14509
|
onConfirm();
|
|
14499
14510
|
api.confirm();
|
|
@@ -14514,7 +14525,7 @@ const ActionsToolbarMoreElement = {
|
|
|
14514
14525
|
const classes$8 = {
|
|
14515
14526
|
icon: "".concat(PREFIX$8, "-icon")
|
|
14516
14527
|
};
|
|
14517
|
-
const StyledPopover$1 = styled
|
|
14528
|
+
const StyledPopover$1 = styled(Popover)(_ref => {
|
|
14518
14529
|
let {
|
|
14519
14530
|
theme
|
|
14520
14531
|
} = _ref;
|
|
@@ -14549,7 +14560,7 @@ function MoreItem(_ref2) {
|
|
|
14549
14560
|
tabindex: "0"
|
|
14550
14561
|
}, hasSvgIconShape && /*#__PURE__*/React__default.createElement(ListItemIcon, {
|
|
14551
14562
|
className: classes$8.icon
|
|
14552
|
-
}, SvgIcon$
|
|
14563
|
+
}, SvgIcon$1(item.getSvgIconShape())), /*#__PURE__*/React__default.createElement(Typography, {
|
|
14553
14564
|
noWrap: true
|
|
14554
14565
|
}, item.label)) : null;
|
|
14555
14566
|
}
|
|
@@ -14598,7 +14609,7 @@ const More$1 = React__default.forwardRef((_ref3, ref) => {
|
|
|
14598
14609
|
}), /*#__PURE__*/React__default.createElement(MenuList, {
|
|
14599
14610
|
id: "moreMenuList"
|
|
14600
14611
|
}, actions.map((item, ix) =>
|
|
14601
|
-
|
|
14612
|
+
/*#__PURE__*/
|
|
14602
14613
|
// eslint-disable-next-line react/no-array-index-key
|
|
14603
14614
|
React__default.createElement(MoreItem, {
|
|
14604
14615
|
key: ix,
|
|
@@ -14628,7 +14639,8 @@ function getActionsKeyDownHandler(_ref) {
|
|
|
14628
14639
|
keyboardNavigation,
|
|
14629
14640
|
focusHandler,
|
|
14630
14641
|
getEnabledButton,
|
|
14631
|
-
selections
|
|
14642
|
+
selections,
|
|
14643
|
+
isRtl
|
|
14632
14644
|
} = _ref;
|
|
14633
14645
|
const handleActionsKeyDown = evt => {
|
|
14634
14646
|
const {
|
|
@@ -14647,7 +14659,8 @@ function getActionsKeyDownHandler(_ref) {
|
|
|
14647
14659
|
const isActionButton = target.classList.contains('njs-cell-action');
|
|
14648
14660
|
if (isActionButton) {
|
|
14649
14661
|
const index = getActionButtonIndex(target);
|
|
14650
|
-
|
|
14662
|
+
let pressedLeft = [KEYS.ARROW_LEFT, KEYS.ARROW_DOWN].includes(keyCode);
|
|
14663
|
+
pressedLeft = isRtl ? !pressedLeft : pressedLeft; // invert direction when using RTL
|
|
14651
14664
|
focusButton(pressedLeft ? index - 1 : index + 1);
|
|
14652
14665
|
}
|
|
14653
14666
|
evt.stopPropagation();
|
|
@@ -14686,7 +14699,7 @@ const classes$7 = {
|
|
|
14686
14699
|
item: "".concat(PREFIX$7, "-item"),
|
|
14687
14700
|
itemSpacing: "".concat(PREFIX$7, "-itemSpacing")
|
|
14688
14701
|
};
|
|
14689
|
-
const StyledPopover = styled
|
|
14702
|
+
const StyledPopover = styled(Popover)(_ref => {
|
|
14690
14703
|
let {
|
|
14691
14704
|
theme
|
|
14692
14705
|
} = _ref;
|
|
@@ -14752,6 +14765,7 @@ function ActionsToolbar(_ref3) {
|
|
|
14752
14765
|
onConfirm: () => {},
|
|
14753
14766
|
onCancel: () => {}
|
|
14754
14767
|
},
|
|
14768
|
+
extraItems,
|
|
14755
14769
|
more: more$1 = {
|
|
14756
14770
|
enabled: false,
|
|
14757
14771
|
actions: [],
|
|
@@ -14766,10 +14780,13 @@ function ActionsToolbar(_ref3) {
|
|
|
14766
14780
|
focusHandler = null,
|
|
14767
14781
|
actionsRefMock = null,
|
|
14768
14782
|
// for testing
|
|
14769
|
-
|
|
14770
|
-
autoConfirm = false
|
|
14783
|
+
isRtl,
|
|
14784
|
+
autoConfirm = false,
|
|
14785
|
+
layout
|
|
14771
14786
|
} = _ref3;
|
|
14772
|
-
const defaultSelectionActions = useDefaultSelectionActions(selections)
|
|
14787
|
+
const defaultSelectionActions = useDefaultSelectionActions(_objectSpread2(_objectSpread2({}, selections), {}, {
|
|
14788
|
+
layout
|
|
14789
|
+
}));
|
|
14773
14790
|
const {
|
|
14774
14791
|
translator,
|
|
14775
14792
|
keyboardNavigation
|
|
@@ -14795,8 +14812,9 @@ function ActionsToolbar(_ref3) {
|
|
|
14795
14812
|
keyboardNavigation,
|
|
14796
14813
|
focusHandler,
|
|
14797
14814
|
getEnabledButton,
|
|
14798
|
-
selections
|
|
14799
|
-
|
|
14815
|
+
selections,
|
|
14816
|
+
isRtl
|
|
14817
|
+
}), [keyboardNavigation, focusHandler, getEnabledButton, selections, isRtl]);
|
|
14800
14818
|
useEffect$1(() => () => {
|
|
14801
14819
|
setShowMoreItems(false);
|
|
14802
14820
|
}, [popover.show, show, selections.show]);
|
|
@@ -14804,11 +14822,11 @@ function ActionsToolbar(_ref3) {
|
|
|
14804
14822
|
if (!focusHandler) return;
|
|
14805
14823
|
const focusFirst = () => {
|
|
14806
14824
|
const enabledButton = getEnabledButton(false);
|
|
14807
|
-
enabledButton
|
|
14825
|
+
enabledButton === null || enabledButton === void 0 || enabledButton.focus();
|
|
14808
14826
|
};
|
|
14809
14827
|
const focusLast = () => {
|
|
14810
14828
|
const enabledButton = getEnabledButton(true);
|
|
14811
|
-
enabledButton
|
|
14829
|
+
enabledButton === null || enabledButton === void 0 || enabledButton.focus();
|
|
14812
14830
|
};
|
|
14813
14831
|
focusHandler.on('focus_toolbar_first', focusFirst);
|
|
14814
14832
|
focusHandler.on('focus_toolbar_last', focusLast);
|
|
@@ -14842,7 +14860,6 @@ function ActionsToolbar(_ref3) {
|
|
|
14842
14860
|
const showActions = newActions.length > 0;
|
|
14843
14861
|
const showMore = moreActions.length > 0;
|
|
14844
14862
|
const showDivider = showActions && selections.show || showMore && selections.show;
|
|
14845
|
-
const isRtl = direction === 'rtl';
|
|
14846
14863
|
const Actions = /*#__PURE__*/React__default.createElement(Grid, {
|
|
14847
14864
|
ref: actionsRef,
|
|
14848
14865
|
onKeyDown: handleActionsKeyDown,
|
|
@@ -14854,7 +14871,11 @@ function ActionsToolbar(_ref3) {
|
|
|
14854
14871
|
sx: {
|
|
14855
14872
|
flexDirection: isRtl ? 'row-reverse' : 'row'
|
|
14856
14873
|
}
|
|
14857
|
-
},
|
|
14874
|
+
}, (extraItems === null || extraItems === void 0 ? void 0 : extraItems.length) && /*#__PURE__*/React__default.createElement(ActionsGroup, {
|
|
14875
|
+
className: "actions-toolbar-extra-actions",
|
|
14876
|
+
actions: extraItems,
|
|
14877
|
+
isRtl: isRtl
|
|
14878
|
+
}), showActions && /*#__PURE__*/React__default.createElement(ActionsGroup, {
|
|
14858
14879
|
actions: newActions
|
|
14859
14880
|
}), showMore && /*#__PURE__*/React__default.createElement(ActionsGroup, {
|
|
14860
14881
|
id: "actions-toolbar-show-more",
|
|
@@ -14913,11 +14934,11 @@ const search = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
14913
14934
|
}
|
|
14914
14935
|
}]
|
|
14915
14936
|
});
|
|
14916
|
-
var SearchIcon = (props => SvgIcon$
|
|
14937
|
+
var SearchIcon = (props => SvgIcon$1(search(props)));
|
|
14917
14938
|
|
|
14918
14939
|
const TREE_PATH = '/qListObjectDef';
|
|
14919
14940
|
const WILDCARD = '**';
|
|
14920
|
-
const StyledOutlinedInput = styled
|
|
14941
|
+
const StyledOutlinedInput = styled(OutlinedInput, {
|
|
14921
14942
|
shouldForwardProp: p => !['styles', 'dense', 'isRtl'].includes(p)
|
|
14922
14943
|
})(_ref => {
|
|
14923
14944
|
let {
|
|
@@ -14943,6 +14964,7 @@ const StyledOutlinedInput = styled$1(OutlinedInput, {
|
|
|
14943
14964
|
fontSize: 14,
|
|
14944
14965
|
borderRadius: 0,
|
|
14945
14966
|
backgroundColor: styles.search.backgroundColor,
|
|
14967
|
+
backdropFilter: styles.background.backgroundImage ? styles.search.backdropFilter : undefined,
|
|
14946
14968
|
paddingLeft: "".concat(CELL_PADDING_LEFT, "px"),
|
|
14947
14969
|
flexDirection: isRtl ? 'row-reverse' : 'row',
|
|
14948
14970
|
'& fieldset': {
|
|
@@ -14950,6 +14972,9 @@ const StyledOutlinedInput = styled$1(OutlinedInput, {
|
|
|
14950
14972
|
borderWidth: '1px 0 1px 0',
|
|
14951
14973
|
borderRadius: 0
|
|
14952
14974
|
},
|
|
14975
|
+
'&.Mui-focused fieldset': {
|
|
14976
|
+
borderColor: "".concat(styles.search.highlightBorderColor, " !important")
|
|
14977
|
+
},
|
|
14953
14978
|
'& .MuiInputBase-root': _objectSpread2({}, styles.search),
|
|
14954
14979
|
'& *': {
|
|
14955
14980
|
color: styles.search.color
|
|
@@ -14957,9 +14982,6 @@ const StyledOutlinedInput = styled$1(OutlinedInput, {
|
|
|
14957
14982
|
'& input': {
|
|
14958
14983
|
color: styles.search.color,
|
|
14959
14984
|
textAlign: isRtl ? 'right' : 'left'
|
|
14960
|
-
},
|
|
14961
|
-
'&.Mui-focused fieldset.OutlinedInput-notchedOutline': {
|
|
14962
|
-
borderColor: "".concat(styles.search.highlightBorderColor, " !important")
|
|
14963
14985
|
}
|
|
14964
14986
|
}, denseProps);
|
|
14965
14987
|
});
|
|
@@ -15055,7 +15077,7 @@ function ListBoxSearch(_ref2) {
|
|
|
15055
15077
|
};
|
|
15056
15078
|
function focusRow(container) {
|
|
15057
15079
|
const row = (container === null || container === void 0 ? void 0 : container.querySelector('.last-focused')) || (container === null || container === void 0 ? void 0 : container.querySelector('[role="row"]:first-child'));
|
|
15058
|
-
row.setAttribute('tabIndex', 0);
|
|
15080
|
+
row === null || row === void 0 || row.setAttribute('tabIndex', 0);
|
|
15059
15081
|
row === null || row === void 0 || row.focus();
|
|
15060
15082
|
}
|
|
15061
15083
|
const onKeyDown = async e => {
|
|
@@ -16727,7 +16749,6 @@ class Color {
|
|
|
16727
16749
|
this._lumi = 0.299 * this._r + 0.587 * this._g + 0.114 * this._b; // option 2
|
|
16728
16750
|
// this._lumi = Math.sqrt( 0.241 * this._r * this._r + 0.691 * this._g * this._g + 0.068 * this._b * this._b ); // option 3
|
|
16729
16751
|
}
|
|
16730
|
-
|
|
16731
16752
|
return this._lumi;
|
|
16732
16753
|
}
|
|
16733
16754
|
|
|
@@ -17286,7 +17307,7 @@ function resolveBgImage(bgComp, app) {
|
|
|
17286
17307
|
function resolveBgColor(comp, theme, objectType) {
|
|
17287
17308
|
const bgColor = comp === null || comp === void 0 ? void 0 : comp.bgColor;
|
|
17288
17309
|
if (bgColor && theme) {
|
|
17289
|
-
if (bgColor.useExpression) {
|
|
17310
|
+
if (bgColor.useExpression || bgColor.useColorExpression) {
|
|
17290
17311
|
return theme.validateColor(bgColor.colorExpression);
|
|
17291
17312
|
}
|
|
17292
17313
|
}
|
|
@@ -17381,24 +17402,25 @@ function getOverridesAsObject() {
|
|
|
17381
17402
|
return overrides;
|
|
17382
17403
|
}
|
|
17383
17404
|
function getSelectionColors(_ref) {
|
|
17384
|
-
var _overrides$theme, _theme$palette, _overrides$theme$cont, _overrides$theme2, _overrides$selections,
|
|
17405
|
+
var _overrides$theme, _theme$palette, _overrides$theme$cont, _overrides$theme2, _overrides$selections, _theme$palette2, _theme$palette3, _theme$palette4, _theme$palette5, _theme$palette6, _theme$palette7, _theme$palette8, _theme$palette9, _theme$palette10, _theme$palette11;
|
|
17385
17406
|
let {
|
|
17407
|
+
getColorPickerColor,
|
|
17386
17408
|
theme,
|
|
17387
17409
|
getListboxStyle,
|
|
17388
17410
|
overrides,
|
|
17389
17411
|
checkboxes
|
|
17390
17412
|
} = _ref;
|
|
17391
|
-
const componentContentTextColor = (_overrides$theme = overrides.theme) === null || _overrides$theme === void 0 || (_overrides$theme = _overrides$theme.content) === null || _overrides$theme === void 0
|
|
17392
|
-
const desiredTextColor = componentContentTextColor || getListboxStyle('content', 'color') || ((_theme$palette = theme.palette) === null || _theme$palette === void 0 ? void 0 : _theme$palette.text.primary);
|
|
17413
|
+
const componentContentTextColor = (_overrides$theme = overrides.theme) === null || _overrides$theme === void 0 || (_overrides$theme = _overrides$theme.content) === null || _overrides$theme === void 0 ? void 0 : _overrides$theme.fontColor;
|
|
17414
|
+
const desiredTextColor = getColorPickerColor(componentContentTextColor) || getListboxStyle('content', 'color') || ((_theme$palette = theme.palette) === null || _theme$palette === void 0 ? void 0 : _theme$palette.text.primary);
|
|
17393
17415
|
const useContrastTextColor = !checkboxes && ((_overrides$theme$cont = (_overrides$theme2 = overrides.theme) === null || _overrides$theme2 === void 0 || (_overrides$theme2 = _overrides$theme2.content) === null || _overrides$theme2 === void 0 ? void 0 : _overrides$theme2.useContrastColor) !== null && _overrides$theme$cont !== void 0 ? _overrides$theme$cont : true);
|
|
17394
17416
|
|
|
17395
17417
|
// Background colors
|
|
17396
17418
|
const selectionColors = ((_overrides$selections = overrides.selections) === null || _overrides$selections === void 0 ? void 0 : _overrides$selections.colors) || {};
|
|
17397
|
-
const selected = (
|
|
17398
|
-
const alternative = (
|
|
17399
|
-
const excluded = (
|
|
17400
|
-
const selectedExcluded = (
|
|
17401
|
-
const possible = (
|
|
17419
|
+
const selected = getColorPickerColor(selectionColors.selected) || ((_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 ? void 0 : _theme$palette2.selected.main) || '#009845';
|
|
17420
|
+
const alternative = getColorPickerColor(selectionColors.alternative) || ((_theme$palette3 = theme.palette) === null || _theme$palette3 === void 0 ? void 0 : _theme$palette3.selected.alternative) || '#E4E4E4';
|
|
17421
|
+
const excluded = getColorPickerColor(selectionColors.excluded) || ((_theme$palette4 = theme.palette) === null || _theme$palette4 === void 0 ? void 0 : _theme$palette4.selected.excluded) || '#A9A9A9';
|
|
17422
|
+
const selectedExcluded = getColorPickerColor(selectionColors.selectedExcluded) || ((_theme$palette5 = theme.palette) === null || _theme$palette5 === void 0 ? void 0 : _theme$palette5.selected.selectedExcluded) || '#A9A9A9';
|
|
17423
|
+
const possible = getColorPickerColor(selectionColors.possible) || getListboxStyle('', 'backgroundColor') || ((_theme$palette6 = theme.palette) === null || _theme$palette6 === void 0 ? void 0 : _theme$palette6.selected.possible) || '#FFFFFF';
|
|
17402
17424
|
|
|
17403
17425
|
// Font colors
|
|
17404
17426
|
let selectedContrast = desiredTextColor || ((_theme$palette7 = theme.palette) === null || _theme$palette7 === void 0 ? void 0 : _theme$palette7.selected.selectedContrastText);
|
|
@@ -17442,8 +17464,7 @@ function getBackgroundColor(_ref2) {
|
|
|
17442
17464
|
bgColor
|
|
17443
17465
|
}, themeApi, 'listBox');
|
|
17444
17466
|
} else {
|
|
17445
|
-
|
|
17446
|
-
color = (_themeApi$getColorPic = themeApi.getColorPickerColor(bgColor, true)) === null || _themeApi$getColorPic === void 0 ? void 0 : _themeApi$getColorPic.color;
|
|
17467
|
+
color = themeApi.getColorPickerColor(bgColor === null || bgColor === void 0 ? void 0 : bgColor.color, false);
|
|
17447
17468
|
}
|
|
17448
17469
|
return color;
|
|
17449
17470
|
}
|
|
@@ -17452,6 +17473,11 @@ function getSearchColor(getListboxStyle) {
|
|
|
17452
17473
|
const color = getContrastingColor('#fff', desiredTextColor);
|
|
17453
17474
|
return color;
|
|
17454
17475
|
}
|
|
17476
|
+
function getSearchBGColor(bgCol, getListboxStyle) {
|
|
17477
|
+
const searchBgColorObj = new Color(getListboxStyle('', 'backgroundColor'));
|
|
17478
|
+
searchBgColorObj.setAlpha(0.7);
|
|
17479
|
+
return searchBgColorObj.isInvalid() ? bgCol : searchBgColorObj.toRGBA();
|
|
17480
|
+
}
|
|
17455
17481
|
function getStyles(_ref3) {
|
|
17456
17482
|
var _themeOverrides$heade, _themeOverrides$backg, _themeOverrides$heade2, _themeOverrides$conte, _themeOverrides$heade3, _themeOverrides$heade4, _themeOverrides$conte2, _themeOverrides$conte3;
|
|
17457
17483
|
let {
|
|
@@ -17463,14 +17489,16 @@ function getStyles(_ref3) {
|
|
|
17463
17489
|
} = _ref3;
|
|
17464
17490
|
const overrides = getOverridesAsObject(components);
|
|
17465
17491
|
const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
|
|
17492
|
+
const getColorPickerColor = c => (c === null || c === void 0 ? void 0 : c.index) > 0 || c !== null && c !== void 0 && c.color ? themeApi.getColorPickerColor(c, false) : undefined;
|
|
17466
17493
|
const selections = getSelectionColors({
|
|
17494
|
+
getColorPickerColor,
|
|
17467
17495
|
theme,
|
|
17468
17496
|
getListboxStyle,
|
|
17469
17497
|
overrides,
|
|
17470
17498
|
checkboxes
|
|
17471
17499
|
});
|
|
17472
17500
|
const themeOverrides = overrides.theme || {};
|
|
17473
|
-
const headerColor = ((_themeOverrides$heade = themeOverrides.header) === null || _themeOverrides$heade === void 0
|
|
17501
|
+
const headerColor = getColorPickerColor((_themeOverrides$heade = themeOverrides.header) === null || _themeOverrides$heade === void 0 ? void 0 : _themeOverrides$heade.fontColor) || getListboxStyle('title.main', 'color');
|
|
17474
17502
|
const bgComponentColor = getBackgroundColor({
|
|
17475
17503
|
themeApi,
|
|
17476
17504
|
themeOverrides
|
|
@@ -17478,7 +17506,8 @@ function getStyles(_ref3) {
|
|
|
17478
17506
|
const bgImage = (_themeOverrides$backg = themeOverrides.background) !== null && _themeOverrides$backg !== void 0 && _themeOverrides$backg.image ? resolveBgImage({
|
|
17479
17507
|
bgImage: themeOverrides.background.image
|
|
17480
17508
|
}, app) : undefined;
|
|
17481
|
-
const
|
|
17509
|
+
const bgColor = bgComponentColor || getListboxStyle('', 'backgroundColor') || theme.palette.background.default;
|
|
17510
|
+
const searchBgColor = getSearchBGColor(bgColor, getListboxStyle);
|
|
17482
17511
|
const searchColor = getSearchColor(getListboxStyle);
|
|
17483
17512
|
const headerFontStyle = ((_themeOverrides$heade2 = themeOverrides.header) === null || _themeOverrides$heade2 === void 0 ? void 0 : _themeOverrides$heade2.fontStyle) || {};
|
|
17484
17513
|
const contentFontStyle = ((_themeOverrides$conte = themeOverrides.content) === null || _themeOverrides$conte === void 0 ? void 0 : _themeOverrides$conte.fontStyle) || {};
|
|
@@ -17487,7 +17516,7 @@ function getStyles(_ref3) {
|
|
|
17487
17516
|
const getWithFallback = (value, trueValue, falseValue) => value === true && trueValue || value === false && falseValue || undefined;
|
|
17488
17517
|
return {
|
|
17489
17518
|
background: {
|
|
17490
|
-
backgroundColor:
|
|
17519
|
+
backgroundColor: bgColor,
|
|
17491
17520
|
backgroundImage: bgImage !== null && bgImage !== void 0 && bgImage.url && !(bgImage !== null && bgImage !== void 0 && bgImage.url.startsWith('url(')) ? "url('".concat(bgImage.url, "')") : undefined,
|
|
17492
17521
|
backgroundRepeat: 'no-repeat',
|
|
17493
17522
|
backgroundSize: bgImage === null || bgImage === void 0 ? void 0 : bgImage.size,
|
|
@@ -17513,8 +17542,9 @@ function getStyles(_ref3) {
|
|
|
17513
17542
|
search: {
|
|
17514
17543
|
color: searchColor,
|
|
17515
17544
|
borderColor: theme.palette.divider,
|
|
17516
|
-
highlightBorderColor: theme.palette.
|
|
17517
|
-
backgroundColor: searchBgColor
|
|
17545
|
+
highlightBorderColor: theme.palette.custom.focusBorder,
|
|
17546
|
+
backgroundColor: searchBgColor,
|
|
17547
|
+
backdropFilter: 'blur(8px)'
|
|
17518
17548
|
},
|
|
17519
17549
|
selections
|
|
17520
17550
|
};
|
|
@@ -17627,9 +17657,11 @@ function ListBoxPopover(_ref) {
|
|
|
17627
17657
|
anchorEl: alignTo.current,
|
|
17628
17658
|
anchorOrigin: anchorOrigin,
|
|
17629
17659
|
transformOrigin: transformOrigin,
|
|
17630
|
-
|
|
17631
|
-
|
|
17632
|
-
|
|
17660
|
+
slotProps: {
|
|
17661
|
+
paper: {
|
|
17662
|
+
style: {
|
|
17663
|
+
minWidth: '250px'
|
|
17664
|
+
}
|
|
17633
17665
|
}
|
|
17634
17666
|
}
|
|
17635
17667
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
@@ -17663,6 +17695,7 @@ function ListBoxPopover(_ref) {
|
|
|
17663
17695
|
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
17664
17696
|
item: true
|
|
17665
17697
|
}, /*#__PURE__*/React__default.createElement(ActionsToolbar, {
|
|
17698
|
+
layout: layout,
|
|
17666
17699
|
more: {
|
|
17667
17700
|
enabled: !isLocked,
|
|
17668
17701
|
actions: listboxSelectionToolbarItems,
|
|
@@ -17780,7 +17813,6 @@ function OneField(_ref) {
|
|
|
17780
17813
|
segments.forEach((s, i) => {
|
|
17781
17814
|
s.offset = i ? segments[i - 1].offset + segments[i - 1].ratio : 0; // eslint-disable-line
|
|
17782
17815
|
});
|
|
17783
|
-
|
|
17784
17816
|
let Header = null;
|
|
17785
17817
|
let Icon = null;
|
|
17786
17818
|
let SegmentsIndicator = null;
|
|
@@ -17887,13 +17919,13 @@ const downArrow = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
17887
17919
|
}
|
|
17888
17920
|
}]
|
|
17889
17921
|
});
|
|
17890
|
-
var DownArrow = (props => SvgIcon$
|
|
17922
|
+
var DownArrow = (props => SvgIcon$1(downArrow(props)));
|
|
17891
17923
|
|
|
17892
17924
|
const PREFIX$6 = 'MultiState';
|
|
17893
17925
|
const classes$6 = {
|
|
17894
17926
|
item: "".concat(PREFIX$6, "-item")
|
|
17895
17927
|
};
|
|
17896
|
-
const StyledGrid$5 = styled
|
|
17928
|
+
const StyledGrid$5 = styled(Grid)(_ref => {
|
|
17897
17929
|
let {
|
|
17898
17930
|
theme
|
|
17899
17931
|
} = _ref;
|
|
@@ -17993,7 +18025,7 @@ function MultiState(_ref2) {
|
|
|
17993
18025
|
variant: "contained",
|
|
17994
18026
|
fullWidth: true
|
|
17995
18027
|
}, clearAllStates)), field.states.map((s, ix) =>
|
|
17996
|
-
|
|
18028
|
+
/*#__PURE__*/
|
|
17997
18029
|
// eslint-disable-next-line react/no-array-index-key
|
|
17998
18030
|
React__default.createElement(ListItem, {
|
|
17999
18031
|
key: ix,
|
|
@@ -18058,7 +18090,7 @@ const classes$5 = {
|
|
|
18058
18090
|
item: "".concat(PREFIX$5, "-item"),
|
|
18059
18091
|
badge: "".concat(PREFIX$5, "-badge")
|
|
18060
18092
|
};
|
|
18061
|
-
const StyledGrid$4 = styled
|
|
18093
|
+
const StyledGrid$4 = styled(Grid)(_ref => {
|
|
18062
18094
|
let {
|
|
18063
18095
|
theme
|
|
18064
18096
|
} = _ref;
|
|
@@ -18171,7 +18203,7 @@ function More(_ref2) {
|
|
|
18171
18203
|
}, /*#__PURE__*/React__default.createElement(List, {
|
|
18172
18204
|
dense: true
|
|
18173
18205
|
}, items.map((s, ix) =>
|
|
18174
|
-
|
|
18206
|
+
/*#__PURE__*/
|
|
18175
18207
|
// eslint-disable-next-line react/no-array-index-key
|
|
18176
18208
|
React__default.createElement(ListItem, {
|
|
18177
18209
|
key: ix,
|
|
@@ -18327,7 +18359,7 @@ const selectionsBack = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
18327
18359
|
}
|
|
18328
18360
|
}]
|
|
18329
18361
|
});
|
|
18330
|
-
var SelectionsBack = (props => SvgIcon$
|
|
18362
|
+
var SelectionsBack = (props => SvgIcon$1(selectionsBack(props)));
|
|
18331
18363
|
|
|
18332
18364
|
const selectionsForward = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
18333
18365
|
shapes: [{
|
|
@@ -18337,7 +18369,7 @@ const selectionsForward = props => _objectSpread2(_objectSpread2({}, props), {},
|
|
|
18337
18369
|
}
|
|
18338
18370
|
}]
|
|
18339
18371
|
});
|
|
18340
|
-
var SelectionsForward = (props => SvgIcon$
|
|
18372
|
+
var SelectionsForward = (props => SvgIcon$1(selectionsForward(props)));
|
|
18341
18373
|
|
|
18342
18374
|
const patchAlternateState = (currentSelectionsModel, currentSelectionsLayout, appLayout) => {
|
|
18343
18375
|
const states = [...(appLayout.qStateNames || [])].map(s => ({
|
|
@@ -18861,16 +18893,6 @@ class AutoSizer extends Component {
|
|
|
18861
18893
|
}
|
|
18862
18894
|
}
|
|
18863
18895
|
|
|
18864
|
-
const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
18865
|
-
shapes: [{
|
|
18866
|
-
type: 'path',
|
|
18867
|
-
attrs: {
|
|
18868
|
-
d: 'M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z'
|
|
18869
|
-
}
|
|
18870
|
-
}]
|
|
18871
|
-
});
|
|
18872
|
-
var DrillDownIcon = (props => SvgIcon$2(drillDown(props)));
|
|
18873
|
-
|
|
18874
18896
|
function removeInnnerTabStops(container) {
|
|
18875
18897
|
container === null || container === void 0 || container.querySelectorAll('[tabIndex="0"]').forEach(elm => {
|
|
18876
18898
|
elm.setAttribute('tabIndex', -1);
|
|
@@ -18924,14 +18946,17 @@ function useTempKeyboard(_ref) {
|
|
|
18924
18946
|
const lastSelectedRow = c === null || c === void 0 ? void 0 : c.querySelector('.value.last-focused');
|
|
18925
18947
|
const firstRowElement = c === null || c === void 0 ? void 0 : c.querySelector('.value.selector, .value');
|
|
18926
18948
|
const confirmButton = c === null || c === void 0 ? void 0 : c.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
|
|
18927
|
-
const
|
|
18949
|
+
const unlockCoverButton = c === null || c === void 0 ? void 0 : c.querySelector('#listbox-unlock-button');
|
|
18950
|
+
const elementToFocus = searchField || lastSelectedRow || firstRowElement || unlockCoverButton || confirmButton;
|
|
18928
18951
|
elementToFocus === null || elementToFocus === void 0 || elementToFocus.setAttribute('tabIndex', 0);
|
|
18929
18952
|
elementToFocus === null || elementToFocus === void 0 || elementToFocus.focus();
|
|
18930
18953
|
},
|
|
18931
18954
|
focusSelection() {
|
|
18955
|
+
const unlockCoverButton = document.querySelector('#listbox-unlock-button');
|
|
18932
18956
|
const confirmButton = document.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
|
|
18933
|
-
|
|
18934
|
-
|
|
18957
|
+
const btnToFocus = unlockCoverButton || confirmButton;
|
|
18958
|
+
btnToFocus === null || btnToFocus === void 0 || btnToFocus.setAttribute('tabIndex', 0);
|
|
18959
|
+
btnToFocus === null || btnToFocus === void 0 || btnToFocus.focus();
|
|
18935
18960
|
}
|
|
18936
18961
|
};
|
|
18937
18962
|
return keyboard;
|
|
@@ -19011,7 +19036,6 @@ function getListboxContainerKeyboardNavigation(_ref) {
|
|
|
19011
19036
|
if (!event.target.classList.contains('listbox-container')) {
|
|
19012
19037
|
break; // don't mess with keydown handlers within the listbox (e.g. row seletion)
|
|
19013
19038
|
}
|
|
19014
|
-
|
|
19015
19039
|
keyboard.focus();
|
|
19016
19040
|
prevent();
|
|
19017
19041
|
break;
|
|
@@ -19088,18 +19112,79 @@ function getListboxContainerKeyboardNavigation(_ref) {
|
|
|
19088
19112
|
};
|
|
19089
19113
|
}
|
|
19090
19114
|
|
|
19115
|
+
const StyledDiv = styled('div')(() => ({
|
|
19116
|
+
display: 'flex',
|
|
19117
|
+
width: '100%',
|
|
19118
|
+
height: '100%',
|
|
19119
|
+
alignItems: 'center',
|
|
19120
|
+
justifyContent: 'center'
|
|
19121
|
+
}));
|
|
19122
|
+
function ListBoxError(_ref) {
|
|
19123
|
+
let {
|
|
19124
|
+
text
|
|
19125
|
+
} = _ref;
|
|
19126
|
+
const {
|
|
19127
|
+
translator: translatorDynamic
|
|
19128
|
+
} = useContext(InstanceContext);
|
|
19129
|
+
return /*#__PURE__*/React__default.createElement(StyledDiv, null, translatorDynamic.get(text));
|
|
19130
|
+
}
|
|
19131
|
+
|
|
19132
|
+
function isDirectQueryEnabled(_ref) {
|
|
19133
|
+
let {
|
|
19134
|
+
appLayout
|
|
19135
|
+
} = _ref;
|
|
19136
|
+
const isDQ = !!(appLayout !== null && appLayout !== void 0 && appLayout.qIsDirectQueryMode);
|
|
19137
|
+
return isDQ;
|
|
19138
|
+
}
|
|
19139
|
+
|
|
19140
|
+
function getContainerPadding(_ref) {
|
|
19141
|
+
let {
|
|
19142
|
+
isGridMode,
|
|
19143
|
+
dense,
|
|
19144
|
+
height,
|
|
19145
|
+
layoutOrder
|
|
19146
|
+
} = _ref;
|
|
19147
|
+
let containerPadding;
|
|
19148
|
+
if (isGridMode) {
|
|
19149
|
+
const itemHeight = getItemHeight({
|
|
19150
|
+
isGridMode,
|
|
19151
|
+
dense
|
|
19152
|
+
});
|
|
19153
|
+
let paddingY;
|
|
19154
|
+
if (itemHeight > height) {
|
|
19155
|
+
paddingY = '0px';
|
|
19156
|
+
} else {
|
|
19157
|
+
paddingY = '2px';
|
|
19158
|
+
}
|
|
19159
|
+
containerPadding = layoutOrder === 'row' ? "".concat(paddingY, " 4px") : "".concat(paddingY, " 6px ").concat(paddingY, " 4px");
|
|
19160
|
+
} else {
|
|
19161
|
+
containerPadding = undefined;
|
|
19162
|
+
}
|
|
19163
|
+
return containerPadding;
|
|
19164
|
+
}
|
|
19165
|
+
|
|
19166
|
+
const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
19167
|
+
shapes: [{
|
|
19168
|
+
type: 'path',
|
|
19169
|
+
attrs: {
|
|
19170
|
+
d: 'M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z'
|
|
19171
|
+
}
|
|
19172
|
+
}]
|
|
19173
|
+
});
|
|
19174
|
+
var DrillDownIcon = (props => SvgIcon$1(drillDown(props)));
|
|
19175
|
+
|
|
19091
19176
|
function showToolbarDetached(_ref) {
|
|
19092
19177
|
var _titleRef$current$cli, _titleRef$current, _titleRef$current2, _titleRef$current3;
|
|
19093
19178
|
let {
|
|
19094
19179
|
containerRect,
|
|
19095
19180
|
titleRef,
|
|
19096
19181
|
iconsWidth,
|
|
19097
|
-
|
|
19098
|
-
|
|
19182
|
+
paddingLeft,
|
|
19183
|
+
paddingRight
|
|
19099
19184
|
} = _ref;
|
|
19100
19185
|
const containerWidth = containerRect.width;
|
|
19101
19186
|
const preventTruncation = 2;
|
|
19102
|
-
const padding =
|
|
19187
|
+
const padding = paddingLeft + paddingRight;
|
|
19103
19188
|
const contentWidth = ((_titleRef$current$cli = titleRef === null || titleRef === void 0 || (_titleRef$current = titleRef.current) === null || _titleRef$current === void 0 ? void 0 : _titleRef$current.clientWidth) !== null && _titleRef$current$cli !== void 0 ? _titleRef$current$cli : 0) + iconsWidth + padding + preventTruncation;
|
|
19104
19189
|
const actionToolbarWidth = 128;
|
|
19105
19190
|
const notSufficientSpace = containerWidth < contentWidth + actionToolbarWidth;
|
|
@@ -19115,15 +19200,18 @@ function getListboxActionProps(_ref) {
|
|
|
19115
19200
|
containerRef,
|
|
19116
19201
|
isLocked,
|
|
19117
19202
|
listboxSelectionToolbarItems,
|
|
19203
|
+
extraItems,
|
|
19118
19204
|
selections,
|
|
19119
19205
|
keyboard
|
|
19120
19206
|
} = _ref;
|
|
19121
19207
|
return {
|
|
19208
|
+
isDetached,
|
|
19122
19209
|
show: showToolbar && !isDetached,
|
|
19123
19210
|
popover: {
|
|
19124
19211
|
show: showToolbar && isDetached,
|
|
19125
19212
|
anchorEl: containerRef.current
|
|
19126
19213
|
},
|
|
19214
|
+
extraItems,
|
|
19127
19215
|
more: {
|
|
19128
19216
|
enabled: !isLocked,
|
|
19129
19217
|
actions: listboxSelectionToolbarItems,
|
|
@@ -19148,56 +19236,293 @@ function getListboxActionProps(_ref) {
|
|
|
19148
19236
|
};
|
|
19149
19237
|
}
|
|
19150
19238
|
|
|
19151
|
-
const
|
|
19152
|
-
|
|
19153
|
-
|
|
19154
|
-
|
|
19155
|
-
alignItems: 'center',
|
|
19156
|
-
justifyContent: 'center'
|
|
19157
|
-
}));
|
|
19158
|
-
function ListBoxError(_ref) {
|
|
19239
|
+
const iconStyle = {
|
|
19240
|
+
fontSize: '12px'
|
|
19241
|
+
};
|
|
19242
|
+
const UnlockButton = styled(ButtonBase)(_ref => {
|
|
19159
19243
|
let {
|
|
19160
|
-
|
|
19244
|
+
theme,
|
|
19245
|
+
isLoading
|
|
19161
19246
|
} = _ref;
|
|
19162
|
-
|
|
19163
|
-
|
|
19164
|
-
|
|
19165
|
-
|
|
19166
|
-
|
|
19167
|
-
|
|
19168
|
-
|
|
19247
|
+
return {
|
|
19248
|
+
position: 'absolute',
|
|
19249
|
+
top: 0,
|
|
19250
|
+
left: 0,
|
|
19251
|
+
height: 48,
|
|
19252
|
+
zIndex: 2,
|
|
19253
|
+
// so it goes on top of action buttons
|
|
19254
|
+
background: theme.palette.custom.disabledBackground,
|
|
19255
|
+
opacity: 1,
|
|
19256
|
+
color: theme.palette.custom.disabledContrastText,
|
|
19257
|
+
width: '100%',
|
|
19258
|
+
display: 'flex',
|
|
19259
|
+
justifyContent: isLoading ? 'center' : 'flex-start',
|
|
19260
|
+
paddingLeft: 16,
|
|
19261
|
+
paddingRight: 16,
|
|
19262
|
+
borderRadius: 0,
|
|
19263
|
+
'& *, & p': {
|
|
19264
|
+
color: theme.palette.custom.disabledContrastText
|
|
19265
|
+
},
|
|
19266
|
+
'& i': {
|
|
19267
|
+
padding: "".concat(ICON_PADDING, "px")
|
|
19268
|
+
}
|
|
19269
|
+
};
|
|
19270
|
+
});
|
|
19271
|
+
const StyledGridHeader = styled(Grid, {
|
|
19272
|
+
shouldForwardProp: p => !['styles', 'isRtl'].includes(p)
|
|
19273
|
+
})(_ref2 => {
|
|
19169
19274
|
let {
|
|
19170
|
-
|
|
19171
|
-
|
|
19172
|
-
|
|
19173
|
-
return
|
|
19275
|
+
styles,
|
|
19276
|
+
isRtl
|
|
19277
|
+
} = _ref2;
|
|
19278
|
+
return _objectSpread2(_objectSpread2({
|
|
19279
|
+
flexDirection: isRtl ? 'row-reverse' : 'row',
|
|
19280
|
+
wrap: 'nowrap',
|
|
19281
|
+
minHeight: 32,
|
|
19282
|
+
alignContent: 'center'
|
|
19283
|
+
}, styles.header), {}, {
|
|
19284
|
+
'& *': {
|
|
19285
|
+
color: styles.header.color
|
|
19286
|
+
}
|
|
19287
|
+
});
|
|
19288
|
+
});
|
|
19289
|
+
const HeaderTitle = styled(Typography)(_ref3 => {
|
|
19290
|
+
let {
|
|
19291
|
+
styles
|
|
19292
|
+
} = _ref3;
|
|
19293
|
+
return _objectSpread2(_objectSpread2({}, styles.header), {}, {
|
|
19294
|
+
display: 'block',
|
|
19295
|
+
// needed for text-overflow to work
|
|
19296
|
+
alignItems: 'center',
|
|
19297
|
+
paddingRight: '1px' // make place for italic font style
|
|
19298
|
+
});
|
|
19299
|
+
});
|
|
19300
|
+
function UnlockCoverButton(_ref4) {
|
|
19301
|
+
let {
|
|
19302
|
+
translator,
|
|
19303
|
+
toggleLock,
|
|
19304
|
+
keyboard,
|
|
19305
|
+
isLoading
|
|
19306
|
+
} = _ref4;
|
|
19307
|
+
const fontSize = '14px';
|
|
19308
|
+
const unLockText = translator.get('SelectionToolbar.ClickToUnlock');
|
|
19309
|
+
const component = /*#__PURE__*/React__default.createElement(UnlockButton, {
|
|
19310
|
+
title: unLockText,
|
|
19311
|
+
tabIndex: keyboard.enabled ? 0 : -1,
|
|
19312
|
+
onClick: toggleLock,
|
|
19313
|
+
"data-testid": "listbox-unlock-button",
|
|
19314
|
+
id: "listbox-unlock-button",
|
|
19315
|
+
isLoading: isLoading
|
|
19316
|
+
}, isLoading ? /*#__PURE__*/React__default.createElement(CircularProgress, {
|
|
19317
|
+
size: 16,
|
|
19318
|
+
variant: "indeterminate",
|
|
19319
|
+
color: "primary"
|
|
19320
|
+
}) : /*#__PURE__*/React__default.createElement(Lock, {
|
|
19321
|
+
disableRipple: true,
|
|
19322
|
+
style: iconStyle
|
|
19323
|
+
}), !isLoading && /*#__PURE__*/React__default.createElement(Typography, {
|
|
19324
|
+
fontSize: fontSize
|
|
19325
|
+
}, unLockText));
|
|
19326
|
+
return component;
|
|
19174
19327
|
}
|
|
19175
19328
|
|
|
19176
|
-
|
|
19329
|
+
// ms that needs to pass before the lock button can be toggled again
|
|
19330
|
+
const lockTimeFrameMs = 500;
|
|
19331
|
+
let lastTime = 0;
|
|
19332
|
+
function getToggleLock(_ref) {
|
|
19177
19333
|
let {
|
|
19178
|
-
|
|
19179
|
-
|
|
19180
|
-
|
|
19181
|
-
|
|
19334
|
+
isLocked,
|
|
19335
|
+
setLocked,
|
|
19336
|
+
settingLockedState,
|
|
19337
|
+
model,
|
|
19338
|
+
setSettingLockedState
|
|
19182
19339
|
} = _ref;
|
|
19183
|
-
|
|
19184
|
-
|
|
19185
|
-
const
|
|
19186
|
-
|
|
19187
|
-
|
|
19340
|
+
return () => {
|
|
19341
|
+
const now = new Date();
|
|
19342
|
+
const curTime = now - lastTime;
|
|
19343
|
+
if (curTime < lockTimeFrameMs) {
|
|
19344
|
+
return Promise.resolve();
|
|
19345
|
+
}
|
|
19346
|
+
if (settingLockedState) {
|
|
19347
|
+
return () => {};
|
|
19348
|
+
}
|
|
19349
|
+
setSettingLockedState(true);
|
|
19350
|
+
lastTime = now;
|
|
19351
|
+
const func = isLocked ? model.unlock : model.lock;
|
|
19352
|
+
setLocked(!isLocked);
|
|
19353
|
+
return func.call(model, '/qListObjectDef').catch(() => {
|
|
19354
|
+
setLocked(isLocked); // revert to the layout value
|
|
19355
|
+
}).finally(() => {
|
|
19356
|
+
setTimeout(() => {
|
|
19357
|
+
setSettingLockedState(false);
|
|
19358
|
+
}, 0);
|
|
19188
19359
|
});
|
|
19189
|
-
|
|
19190
|
-
|
|
19191
|
-
|
|
19192
|
-
|
|
19193
|
-
|
|
19360
|
+
};
|
|
19361
|
+
}
|
|
19362
|
+
function ListBoxHeader(_ref2) {
|
|
19363
|
+
var _layout$qListObject, _layout$qListObject3;
|
|
19364
|
+
let {
|
|
19365
|
+
layout,
|
|
19366
|
+
translator,
|
|
19367
|
+
styles,
|
|
19368
|
+
isRtl,
|
|
19369
|
+
showLock,
|
|
19370
|
+
selectDisabled,
|
|
19371
|
+
showSearchIcon,
|
|
19372
|
+
isDrillDown,
|
|
19373
|
+
constraints,
|
|
19374
|
+
onShowSearch,
|
|
19375
|
+
classes,
|
|
19376
|
+
containerRect,
|
|
19377
|
+
isPopover,
|
|
19378
|
+
showToolbar,
|
|
19379
|
+
showDetachedToolbarOnly,
|
|
19380
|
+
containerRef,
|
|
19381
|
+
model,
|
|
19382
|
+
selectionState,
|
|
19383
|
+
isDirectQuery,
|
|
19384
|
+
selections,
|
|
19385
|
+
keyboard,
|
|
19386
|
+
autoConfirm
|
|
19387
|
+
} = _ref2;
|
|
19388
|
+
const [isToolbarDetached, setIsToolbarDetached] = useState$1(showDetachedToolbarOnly);
|
|
19389
|
+
const [isLocked, setLocked] = useState$1(layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 || (_layout$qListObject = _layout$qListObject.qDimensionInfo) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qLocked);
|
|
19390
|
+
const [settingLockedState, setSettingLockedState] = useState$1(false);
|
|
19391
|
+
useEffect$1(() => {
|
|
19392
|
+
var _layout$qListObject2;
|
|
19393
|
+
setLocked(layout === null || layout === void 0 || (_layout$qListObject2 = layout.qListObject) === null || _layout$qListObject2 === void 0 || (_layout$qListObject2 = _layout$qListObject2.qDimensionInfo) === null || _layout$qListObject2 === void 0 ? void 0 : _layout$qListObject2.qLocked);
|
|
19394
|
+
}, [layout === null || layout === void 0 || (_layout$qListObject3 = layout.qListObject) === null || _layout$qListObject3 === void 0 || (_layout$qListObject3 = _layout$qListObject3.qDimensionInfo) === null || _layout$qListObject3 === void 0 ? void 0 : _layout$qListObject3.qLocked]);
|
|
19395
|
+
const titleRef = useRef(null);
|
|
19396
|
+
const showUnlock = showLock && isLocked;
|
|
19397
|
+
const showLockIcon = !showLock && isLocked; // shows instead of the cover button when field/dim is locked.
|
|
19398
|
+
const showLeftIcon = showSearchIcon || showLockIcon || isDrillDown; // the left-most icon outside of the actions/selections toolbar.
|
|
19399
|
+
|
|
19400
|
+
const paddingLeft = CELL_PADDING_LEFT - (showLeftIcon ? ICON_PADDING : 0);
|
|
19401
|
+
const paddingRight = isRtl ? CELL_PADDING_LEFT - (showLeftIcon ? ICON_PADDING : 0) : HEADER_PADDING_RIGHT;
|
|
19402
|
+
|
|
19403
|
+
// Calculate explicit width for icons container. Search and lock cannot exist combined.
|
|
19404
|
+
const iconsWidth = (showSearchIcon ? BUTTON_ICON_WIDTH : 0) + (showLockIcon ? BUTTON_ICON_WIDTH : 0) + (isDrillDown ? BUTTON_ICON_WIDTH : 0);
|
|
19405
|
+
const toggleLock = getToggleLock({
|
|
19406
|
+
isLocked,
|
|
19407
|
+
setLocked,
|
|
19408
|
+
settingLockedState,
|
|
19409
|
+
setSettingLockedState,
|
|
19410
|
+
model
|
|
19411
|
+
});
|
|
19412
|
+
const listboxSelectionToolbarItems = createListboxSelectionToolbar({
|
|
19413
|
+
layout,
|
|
19414
|
+
model,
|
|
19415
|
+
translator,
|
|
19416
|
+
selectionState,
|
|
19417
|
+
isDirectQuery
|
|
19418
|
+
});
|
|
19419
|
+
const extraItems = isLocked || !showLock ? undefined : [{
|
|
19420
|
+
key: 'lock',
|
|
19421
|
+
type: undefined,
|
|
19422
|
+
label: translator.get('SelectionToolbar.ClickToLock'),
|
|
19423
|
+
getSvgIconShape: unlock,
|
|
19424
|
+
enabled: () => !settingLockedState && !selectDisabled() && hasSelections(layout),
|
|
19425
|
+
action: toggleLock
|
|
19426
|
+
}];
|
|
19427
|
+
const searchIconComp = constraints !== null && constraints !== void 0 && constraints.active ? /*#__PURE__*/React__default.createElement(SearchIcon, {
|
|
19428
|
+
title: translator.get('Listbox.Search'),
|
|
19429
|
+
size: "large",
|
|
19430
|
+
style: _objectSpread2(_objectSpread2({}, iconStyle), {}, {
|
|
19431
|
+
padding: "".concat(ICON_PADDING, "px")
|
|
19432
|
+
})
|
|
19433
|
+
}) : /*#__PURE__*/React__default.createElement(IconButton, {
|
|
19434
|
+
onClick: onShowSearch,
|
|
19435
|
+
tabIndex: -1,
|
|
19436
|
+
title: translator.get('Listbox.Search'),
|
|
19437
|
+
size: "large",
|
|
19438
|
+
disableRipple: true,
|
|
19439
|
+
"data-testid": "search-toggle-btn"
|
|
19440
|
+
}, /*#__PURE__*/React__default.createElement(SearchIcon, {
|
|
19441
|
+
style: iconStyle
|
|
19442
|
+
}));
|
|
19443
|
+
useEffect$1(() => {
|
|
19444
|
+
if (!titleRef.current || !containerRect) {
|
|
19445
|
+
return;
|
|
19194
19446
|
}
|
|
19195
|
-
|
|
19196
|
-
|
|
19197
|
-
|
|
19447
|
+
const mustShowDetached = showToolbarDetached({
|
|
19448
|
+
containerRect,
|
|
19449
|
+
titleRef,
|
|
19450
|
+
iconsWidth,
|
|
19451
|
+
paddingLeft,
|
|
19452
|
+
paddingRight
|
|
19453
|
+
});
|
|
19454
|
+
const isDetached = showDetachedToolbarOnly || mustShowDetached;
|
|
19455
|
+
setIsToolbarDetached(isDetached);
|
|
19456
|
+
}, [iconsWidth, paddingLeft, paddingRight, titleRef.current, showDetachedToolbarOnly, Object.entries(containerRect || {}).sort().join(',')]);
|
|
19457
|
+
const toolbarProps = getListboxActionProps({
|
|
19458
|
+
isDetached: isPopover ? false : isToolbarDetached,
|
|
19459
|
+
showToolbar,
|
|
19460
|
+
containerRef,
|
|
19461
|
+
isLocked,
|
|
19462
|
+
extraItems,
|
|
19463
|
+
listboxSelectionToolbarItems,
|
|
19464
|
+
selections,
|
|
19465
|
+
keyboard,
|
|
19466
|
+
autoConfirm
|
|
19467
|
+
});
|
|
19468
|
+
const actionsToolbar = /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$5({
|
|
19469
|
+
isRtl: isRtl,
|
|
19470
|
+
layout: layout
|
|
19471
|
+
}, toolbarProps));
|
|
19472
|
+
if (showDetachedToolbarOnly) {
|
|
19473
|
+
return actionsToolbar;
|
|
19198
19474
|
}
|
|
19199
19475
|
|
|
19200
|
-
|
|
19476
|
+
// Always show a lock symbol when locked and showLock is false
|
|
19477
|
+
const lockedIconComp = showLockIcon ? /*#__PURE__*/React__default.createElement(Lock, {
|
|
19478
|
+
size: "large",
|
|
19479
|
+
style: _objectSpread2(_objectSpread2({}, iconStyle), {}, {
|
|
19480
|
+
padding: "".concat(ICON_PADDING, "px")
|
|
19481
|
+
})
|
|
19482
|
+
}) : undefined;
|
|
19483
|
+
return /*#__PURE__*/React__default.createElement(StyledGridHeader, {
|
|
19484
|
+
item: true,
|
|
19485
|
+
container: true,
|
|
19486
|
+
styles: styles,
|
|
19487
|
+
isRtl: isRtl,
|
|
19488
|
+
marginY: 1,
|
|
19489
|
+
paddingLeft: "".concat(paddingLeft, "px"),
|
|
19490
|
+
paddingRight: "".concat(paddingRight, "px"),
|
|
19491
|
+
className: "header-container"
|
|
19492
|
+
}, showUnlock && /*#__PURE__*/React__default.createElement(UnlockCoverButton, {
|
|
19493
|
+
isLoading: settingLockedState,
|
|
19494
|
+
translator: translator,
|
|
19495
|
+
toggleLock: toggleLock,
|
|
19496
|
+
keyboard: keyboard
|
|
19497
|
+
}), showLeftIcon && /*#__PURE__*/React__default.createElement(Grid, {
|
|
19498
|
+
item: true,
|
|
19499
|
+
container: true,
|
|
19500
|
+
alignItems: "center",
|
|
19501
|
+
width: iconsWidth,
|
|
19502
|
+
className: "header-action-container"
|
|
19503
|
+
}, lockedIconComp || showSearchIcon && searchIconComp, isDrillDown && /*#__PURE__*/React__default.createElement(DrillDownIcon, {
|
|
19504
|
+
tabIndex: -1,
|
|
19505
|
+
title: translator.get('Listbox.DrillDown'),
|
|
19506
|
+
style: _objectSpread2(_objectSpread2({}, iconStyle), {}, {
|
|
19507
|
+
padding: "".concat(ICON_PADDING, "px")
|
|
19508
|
+
})
|
|
19509
|
+
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
19510
|
+
item: true,
|
|
19511
|
+
xs: true,
|
|
19512
|
+
minWidth: 0 // needed to text-overflow see: https://css-tricks.com/flexbox-truncated-text/
|
|
19513
|
+
,
|
|
19514
|
+
justifyContent: isRtl ? 'flex-end' : 'flex-start',
|
|
19515
|
+
className: classes.listBoxHeader
|
|
19516
|
+
}, /*#__PURE__*/React__default.createElement(HeaderTitle, {
|
|
19517
|
+
variant: "h6",
|
|
19518
|
+
noWrap: true,
|
|
19519
|
+
ref: titleRef,
|
|
19520
|
+
title: layout.title,
|
|
19521
|
+
styles: styles
|
|
19522
|
+
}, layout.title)), /*#__PURE__*/React__default.createElement(Grid, {
|
|
19523
|
+
item: true,
|
|
19524
|
+
display: "flex"
|
|
19525
|
+
}, actionsToolbar));
|
|
19201
19526
|
}
|
|
19202
19527
|
|
|
19203
19528
|
const PREFIX$4 = 'ListBoxInline';
|
|
@@ -19206,7 +19531,7 @@ const classes$4 = {
|
|
|
19206
19531
|
screenReaderOnly: "".concat(PREFIX$4, "-screenReaderOnly"),
|
|
19207
19532
|
listboxWrapper: "".concat(PREFIX$4, "-listboxWrapper")
|
|
19208
19533
|
};
|
|
19209
|
-
const StyledGrid$3 = styled
|
|
19534
|
+
const StyledGrid$3 = styled(Grid, {
|
|
19210
19535
|
shouldForwardProp: p => !['containerPadding', 'isGridMode', 'styles'].includes(p)
|
|
19211
19536
|
})(_ref => {
|
|
19212
19537
|
let {
|
|
@@ -19241,48 +19566,20 @@ const StyledGrid$3 = styled$1(Grid, {
|
|
|
19241
19566
|
}
|
|
19242
19567
|
});
|
|
19243
19568
|
});
|
|
19244
|
-
const
|
|
19245
|
-
shouldForwardProp: p => !['styles', 'isRtl'].includes(p)
|
|
19246
|
-
})(_ref2 => {
|
|
19247
|
-
let {
|
|
19248
|
-
styles,
|
|
19249
|
-
isRtl
|
|
19250
|
-
} = _ref2;
|
|
19251
|
-
return _objectSpread2(_objectSpread2({
|
|
19252
|
-
flexDirection: isRtl ? 'row-reverse' : 'row',
|
|
19253
|
-
wrap: 'nowrap',
|
|
19254
|
-
minHeight: 32,
|
|
19255
|
-
alignContent: 'center'
|
|
19256
|
-
}, styles.header), {}, {
|
|
19257
|
-
'& *': {
|
|
19258
|
-
// Assign the styles color as defaul color for all elements in the header
|
|
19259
|
-
color: styles.header.color
|
|
19260
|
-
}
|
|
19261
|
-
});
|
|
19262
|
-
});
|
|
19263
|
-
const Title = styled$1(Typography)(_ref3 => {
|
|
19264
|
-
let {
|
|
19265
|
-
styles
|
|
19266
|
-
} = _ref3;
|
|
19267
|
-
return _objectSpread2(_objectSpread2({}, styles.header), {}, {
|
|
19268
|
-
paddingRight: '1px' // make place for italic font style
|
|
19269
|
-
});
|
|
19270
|
-
});
|
|
19271
|
-
|
|
19272
|
-
const isModal = _ref4 => {
|
|
19569
|
+
const isModal = _ref2 => {
|
|
19273
19570
|
var _app$isInModalSelecti, _app$isInModalSelecti2;
|
|
19274
19571
|
let {
|
|
19275
19572
|
app,
|
|
19276
19573
|
appSelections
|
|
19277
|
-
} =
|
|
19574
|
+
} = _ref2;
|
|
19278
19575
|
return (_app$isInModalSelecti = (_app$isInModalSelecti2 = app.isInModalSelection) === null || _app$isInModalSelecti2 === void 0 ? void 0 : _app$isInModalSelecti2.call(app)) !== null && _app$isInModalSelecti !== void 0 ? _app$isInModalSelecti : appSelections.isInModal();
|
|
19279
19576
|
};
|
|
19280
|
-
function ListBoxInline(
|
|
19281
|
-
var _layout$qListObject, _layout$qListObject2, _layoutOptions$dense, _containerRef$current;
|
|
19577
|
+
function ListBoxInline(_ref3) {
|
|
19578
|
+
var _layout$qListObject, _layout$qListObject2, _layout$title, _layoutOptions$dense, _containerRef$current;
|
|
19282
19579
|
let {
|
|
19283
19580
|
options,
|
|
19284
19581
|
layout
|
|
19285
|
-
} =
|
|
19582
|
+
} = _ref3;
|
|
19286
19583
|
const {
|
|
19287
19584
|
app,
|
|
19288
19585
|
direction,
|
|
@@ -19303,6 +19600,7 @@ function ListBoxInline(_ref5) {
|
|
|
19303
19600
|
renderedCallback,
|
|
19304
19601
|
toolbar = true,
|
|
19305
19602
|
isPopover = false,
|
|
19603
|
+
showLock = false,
|
|
19306
19604
|
components
|
|
19307
19605
|
} = options;
|
|
19308
19606
|
|
|
@@ -19318,9 +19616,6 @@ function ListBoxInline(_ref5) {
|
|
|
19318
19616
|
return [ref, setRef];
|
|
19319
19617
|
};
|
|
19320
19618
|
const theme = useTheme$1();
|
|
19321
|
-
const unlock = useCallback(() => {
|
|
19322
|
-
model.unlock('/qListObjectDef');
|
|
19323
|
-
}, [model]);
|
|
19324
19619
|
const {
|
|
19325
19620
|
translator,
|
|
19326
19621
|
keyboardNavigation,
|
|
@@ -19357,7 +19652,6 @@ function ListBoxInline(_ref5) {
|
|
|
19357
19652
|
stop: 0
|
|
19358
19653
|
});
|
|
19359
19654
|
const [appSelections] = useAppSelections(app);
|
|
19360
|
-
const titleRef = useRef(null);
|
|
19361
19655
|
const [selectionState$1] = useState$1(() => selectionState());
|
|
19362
19656
|
const keyboard = useTempKeyboard({
|
|
19363
19657
|
containerRef,
|
|
@@ -19369,7 +19663,6 @@ function ListBoxInline(_ref5) {
|
|
|
19369
19663
|
}), [app, appSelections]);
|
|
19370
19664
|
const isInvalid = layout === null || layout === void 0 ? void 0 : layout.qListObject.qDimensionInfo.qError;
|
|
19371
19665
|
const errorText = isInvalid && constraints.active ? 'Visualization.Invalid.Dimension' : 'Visualization.Incomplete';
|
|
19372
|
-
const [isToolbarDetached, setIsToolbarDetached] = useState$1(false);
|
|
19373
19666
|
const {
|
|
19374
19667
|
handleKeyDown,
|
|
19375
19668
|
handleOnMouseEnter,
|
|
@@ -19386,8 +19679,6 @@ function ListBoxInline(_ref5) {
|
|
|
19386
19679
|
constraints,
|
|
19387
19680
|
isModal: isModalMode
|
|
19388
19681
|
}), [keyboard, hovering, updateKeyScroll, containerRef, currentScrollIndex, app, appSelections, constraints, isModalMode]);
|
|
19389
|
-
const showDetachedToolbarOnly = toolbar && ((layout === null || layout === void 0 ? void 0 : layout.title) === '' || (layout === null || layout === void 0 ? void 0 : layout.showTitle) === false) && !isPopover;
|
|
19390
|
-
const showToolbarWithTitle = toolbar && (layout === null || layout === void 0 ? void 0 : layout.title) !== '' && (layout === null || layout === void 0 ? void 0 : layout.showTitle) !== false || isPopover;
|
|
19391
19682
|
useEffect$1(() => {
|
|
19392
19683
|
document.addEventListener('keydown', globalKeyDown);
|
|
19393
19684
|
return () => {
|
|
@@ -19395,6 +19686,9 @@ function ListBoxInline(_ref5) {
|
|
|
19395
19686
|
};
|
|
19396
19687
|
}, [globalKeyDown]);
|
|
19397
19688
|
useEffect$1(() => {
|
|
19689
|
+
if (search === true) {
|
|
19690
|
+
setShowSearch(true);
|
|
19691
|
+
}
|
|
19398
19692
|
const show = () => {
|
|
19399
19693
|
setShowToolbar(true);
|
|
19400
19694
|
};
|
|
@@ -19405,6 +19699,7 @@ function ListBoxInline(_ref5) {
|
|
|
19405
19699
|
}
|
|
19406
19700
|
};
|
|
19407
19701
|
if (isPopover) {
|
|
19702
|
+
// When isPopover, toolbar == false will be ignored.
|
|
19408
19703
|
if (!selections.isActive()) {
|
|
19409
19704
|
selections.begin('/qListObjectDef');
|
|
19410
19705
|
selections.on('activated', show);
|
|
@@ -19412,7 +19707,7 @@ function ListBoxInline(_ref5) {
|
|
|
19412
19707
|
}
|
|
19413
19708
|
setShowToolbar(isPopover);
|
|
19414
19709
|
}
|
|
19415
|
-
if (selections) {
|
|
19710
|
+
if (toolbar && selections) {
|
|
19416
19711
|
if (!selections.isModal()) {
|
|
19417
19712
|
selections.on('activated', show);
|
|
19418
19713
|
selections.on('deactivated', hide);
|
|
@@ -19425,7 +19720,7 @@ function ListBoxInline(_ref5) {
|
|
|
19425
19720
|
selections.removeListener('deactivated', hide);
|
|
19426
19721
|
}
|
|
19427
19722
|
};
|
|
19428
|
-
}, [selections, isPopover]);
|
|
19723
|
+
}, [toolbar, selections, isPopover]);
|
|
19429
19724
|
useEffect$1(() => {
|
|
19430
19725
|
if (!searchContainer || !searchContainer.current) {
|
|
19431
19726
|
return;
|
|
@@ -19442,64 +19737,31 @@ function ListBoxInline(_ref5) {
|
|
|
19442
19737
|
autoConfirm = false,
|
|
19443
19738
|
layoutOptions = {}
|
|
19444
19739
|
} = layout !== null && layout !== void 0 ? layout : {};
|
|
19445
|
-
const
|
|
19446
|
-
const
|
|
19447
|
-
const showSearchOrLockIcon = isLocked || showSearchIcon;
|
|
19740
|
+
const isLocked = layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 || (_layout$qListObject = _layout$qListObject.qDimensionInfo) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qLocked;
|
|
19741
|
+
const showSearchIcon = searchEnabled !== false && search === 'toggle' && !isLocked;
|
|
19448
19742
|
const isDrillDown = (layout === null || layout === void 0 || (_layout$qListObject2 = layout.qListObject) === null || _layout$qListObject2 === void 0 || (_layout$qListObject2 = _layout$qListObject2.qDimensionInfo) === null || _layout$qListObject2 === void 0 ? void 0 : _layout$qListObject2.qGrouping) === 'H';
|
|
19449
|
-
const
|
|
19450
|
-
const
|
|
19743
|
+
const canShowTitle = (layout === null || layout === void 0 || (_layout$title = layout.title) === null || _layout$title === void 0 ? void 0 : _layout$title.length) && (layout === null || layout === void 0 ? void 0 : layout.showTitle) !== false;
|
|
19744
|
+
const showDetachedToolbarOnly = toolbar && !canShowTitle && !isPopover;
|
|
19745
|
+
const showAttachedToolbar = toolbar && canShowTitle || isPopover;
|
|
19451
19746
|
const isRtl = direction === 'rtl';
|
|
19452
|
-
const headerPaddingLeft = CELL_PADDING_LEFT - (showSearchOrLockIcon ? ICON_PADDING : 0);
|
|
19453
|
-
const headerPaddingRight = isRtl ? CELL_PADDING_LEFT - (showIcons ? ICON_PADDING : 0) : HEADER_PADDING_RIGHT;
|
|
19454
|
-
useEffect$1(() => {
|
|
19455
|
-
if (!titleRef.current || !containerRect) {
|
|
19456
|
-
return;
|
|
19457
|
-
}
|
|
19458
|
-
const isDetached = showToolbarDetached({
|
|
19459
|
-
containerRect,
|
|
19460
|
-
titleRef,
|
|
19461
|
-
iconsWidth,
|
|
19462
|
-
headerPaddingLeft,
|
|
19463
|
-
headerPaddingRight
|
|
19464
|
-
});
|
|
19465
|
-
setIsToolbarDetached(isDetached);
|
|
19466
|
-
}, [titleRef.current, containerRect]);
|
|
19467
19747
|
if (!model || !layout || !translator) {
|
|
19468
19748
|
return null;
|
|
19469
19749
|
}
|
|
19470
|
-
const listboxSelectionToolbarItems = createListboxSelectionToolbar({
|
|
19471
|
-
layout,
|
|
19472
|
-
model,
|
|
19473
|
-
translator,
|
|
19474
|
-
selectionState: selectionState$1,
|
|
19475
|
-
isDirectQuery
|
|
19476
|
-
});
|
|
19477
19750
|
const showSearchToggle = search === 'toggle' && showSearch;
|
|
19478
|
-
const searchVisible =
|
|
19751
|
+
const searchVisible = search === true || showSearchToggle && !selectDisabled() && searchEnabled !== false;
|
|
19479
19752
|
const dense = (_layoutOptions$dense = layoutOptions.dense) !== null && _layoutOptions$dense !== void 0 ? _layoutOptions$dense : false;
|
|
19480
|
-
const
|
|
19753
|
+
const handleShowSearch = () => {
|
|
19481
19754
|
const newValue = !showSearch;
|
|
19482
19755
|
setShowSearch(newValue);
|
|
19483
19756
|
};
|
|
19484
19757
|
const onCtrlF = () => {
|
|
19485
19758
|
if (search === 'toggle') {
|
|
19486
|
-
|
|
19759
|
+
handleShowSearch();
|
|
19487
19760
|
} else {
|
|
19488
19761
|
const input = searchContainer.current.querySelector('input');
|
|
19489
19762
|
input === null || input === void 0 || input.focus();
|
|
19490
19763
|
}
|
|
19491
19764
|
};
|
|
19492
|
-
const getActionToolbarProps = isDetached => _objectSpread2(_objectSpread2({}, getListboxActionProps({
|
|
19493
|
-
isDetached: isPopover ? false : isDetached,
|
|
19494
|
-
showToolbar,
|
|
19495
|
-
containerRef,
|
|
19496
|
-
isLocked,
|
|
19497
|
-
listboxSelectionToolbarItems,
|
|
19498
|
-
selections,
|
|
19499
|
-
keyboard
|
|
19500
|
-
})), {}, {
|
|
19501
|
-
autoConfirm
|
|
19502
|
-
});
|
|
19503
19765
|
const shouldAutoFocus = searchVisible && search === 'toggle';
|
|
19504
19766
|
|
|
19505
19767
|
// Add a container padding for grid mode to harmonize with the grid item margins (should sum to 8px).
|
|
@@ -19510,49 +19772,35 @@ function ListBoxInline(_ref5) {
|
|
|
19510
19772
|
height: (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.clientHeight,
|
|
19511
19773
|
layoutOrder: layoutOptions.layoutOrder
|
|
19512
19774
|
});
|
|
19513
|
-
const searchIconComp = constraints !== null && constraints !== void 0 && constraints.active ? /*#__PURE__*/React__default.createElement(SearchIcon, {
|
|
19514
|
-
title: translator.get('Listbox.Search'),
|
|
19515
|
-
size: "large",
|
|
19516
|
-
style: {
|
|
19517
|
-
fontSize: '12px',
|
|
19518
|
-
padding: '7px'
|
|
19519
|
-
}
|
|
19520
|
-
}) : /*#__PURE__*/React__default.createElement(IconButton, {
|
|
19521
|
-
onClick: onShowSearch,
|
|
19522
|
-
tabIndex: -1,
|
|
19523
|
-
title: translator.get('Listbox.Search'),
|
|
19524
|
-
size: "large",
|
|
19525
|
-
disableRipple: true,
|
|
19526
|
-
"data-testid": "search-toggle-btn"
|
|
19527
|
-
}, /*#__PURE__*/React__default.createElement(SearchIcon, {
|
|
19528
|
-
style: {
|
|
19529
|
-
fontSize: '12px'
|
|
19530
|
-
}
|
|
19531
|
-
}));
|
|
19532
|
-
const lockIconComp = selectDisabled() ? /*#__PURE__*/React__default.createElement(Lock, {
|
|
19533
|
-
size: "large",
|
|
19534
|
-
style: {
|
|
19535
|
-
fontSize: '12px',
|
|
19536
|
-
padding: '7px'
|
|
19537
|
-
}
|
|
19538
|
-
}) : /*#__PURE__*/React__default.createElement(IconButton, {
|
|
19539
|
-
title: translator.get('SelectionToolbar.ClickToUnlock'),
|
|
19540
|
-
tabIndex: -1,
|
|
19541
|
-
onClick: unlock,
|
|
19542
|
-
size: "large"
|
|
19543
|
-
}, /*#__PURE__*/React__default.createElement(Lock, {
|
|
19544
|
-
disableRipple: true,
|
|
19545
|
-
style: {
|
|
19546
|
-
fontSize: '12px'
|
|
19547
|
-
}
|
|
19548
|
-
}));
|
|
19549
19775
|
if (isInvalid) {
|
|
19550
19776
|
renderedCallback === null || renderedCallback === void 0 || renderedCallback();
|
|
19551
19777
|
}
|
|
19552
|
-
const listBoxMinHeight =
|
|
19553
|
-
|
|
19554
|
-
|
|
19555
|
-
|
|
19778
|
+
const listBoxMinHeight = showAttachedToolbar ? DENSE_ROW_HEIGHT + SCROLL_BAR_WIDTH : 0;
|
|
19779
|
+
const listBoxHeader = /*#__PURE__*/React__default.createElement(ListBoxHeader, {
|
|
19780
|
+
selectDisabled: selectDisabled,
|
|
19781
|
+
showSearchIcon: showSearchIcon,
|
|
19782
|
+
isDrillDown: isDrillDown,
|
|
19783
|
+
onShowSearch: handleShowSearch,
|
|
19784
|
+
isPopover: isPopover,
|
|
19785
|
+
showToolbar: showToolbar,
|
|
19786
|
+
isDirectQuery: isDirectQuery,
|
|
19787
|
+
autoConfirm: autoConfirm,
|
|
19788
|
+
showDetachedToolbarOnly: showDetachedToolbarOnly,
|
|
19789
|
+
layout: layout,
|
|
19790
|
+
translator: translator,
|
|
19791
|
+
styles: styles,
|
|
19792
|
+
isRtl: isRtl,
|
|
19793
|
+
showLock: showLock,
|
|
19794
|
+
constraints: constraints,
|
|
19795
|
+
classes: classes$4,
|
|
19796
|
+
containerRect: containerRect,
|
|
19797
|
+
containerRef: containerRef,
|
|
19798
|
+
model: model,
|
|
19799
|
+
selectionState: selectionState$1,
|
|
19800
|
+
selections: selections,
|
|
19801
|
+
keyboard: keyboard
|
|
19802
|
+
});
|
|
19803
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showDetachedToolbarOnly && listBoxHeader, /*#__PURE__*/React__default.createElement(StyledGrid$3, {
|
|
19556
19804
|
className: "listbox-container",
|
|
19557
19805
|
container: true,
|
|
19558
19806
|
tabIndex: keyboard.enabled ? -1 : undefined,
|
|
@@ -19573,45 +19821,7 @@ function ListBoxInline(_ref5) {
|
|
|
19573
19821
|
},
|
|
19574
19822
|
isGridMode: isGridMode,
|
|
19575
19823
|
"aria-label": keyboard.active ? translator.get('Listbox.ScreenReaderInstructions') : ''
|
|
19576
|
-
},
|
|
19577
|
-
item: true,
|
|
19578
|
-
container: true,
|
|
19579
|
-
styles: styles,
|
|
19580
|
-
isRtl: isRtl,
|
|
19581
|
-
marginY: 1,
|
|
19582
|
-
paddingLeft: "".concat(headerPaddingLeft, "px"),
|
|
19583
|
-
paddingRight: "".concat(headerPaddingRight, "px")
|
|
19584
|
-
}, showIcons && /*#__PURE__*/React__default.createElement(Grid, {
|
|
19585
|
-
item: true,
|
|
19586
|
-
container: true,
|
|
19587
|
-
alignItems: "center",
|
|
19588
|
-
width: iconsWidth
|
|
19589
|
-
}, isLocked ? lockIconComp : showSearchIcon && searchIconComp, isDrillDown && /*#__PURE__*/React__default.createElement(DrillDownIcon, {
|
|
19590
|
-
tabIndex: -1,
|
|
19591
|
-
title: translator.get('Listbox.DrillDown'),
|
|
19592
|
-
size: "large",
|
|
19593
|
-
style: {
|
|
19594
|
-
fontSize: '12px'
|
|
19595
|
-
}
|
|
19596
|
-
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
19597
|
-
item: true,
|
|
19598
|
-
xs: true,
|
|
19599
|
-
minWidth: 0 // needed to text-overflow see: https://css-tricks.com/flexbox-truncated-text/
|
|
19600
|
-
,
|
|
19601
|
-
justifyContent: isRtl ? 'flex-end' : 'flex-start',
|
|
19602
|
-
className: classes$4.listBoxHeader
|
|
19603
|
-
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
19604
|
-
variant: "h6",
|
|
19605
|
-
noWrap: true,
|
|
19606
|
-
ref: titleRef,
|
|
19607
|
-
title: layout.title,
|
|
19608
|
-
styles: styles
|
|
19609
|
-
}, layout.title)), /*#__PURE__*/React__default.createElement(Grid, {
|
|
19610
|
-
item: true,
|
|
19611
|
-
display: "flex"
|
|
19612
|
-
}, /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$5({
|
|
19613
|
-
direction: direction
|
|
19614
|
-
}, getActionToolbarProps(isToolbarDetached))))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
19824
|
+
}, showAttachedToolbar && listBoxHeader, /*#__PURE__*/React__default.createElement(Grid, {
|
|
19615
19825
|
item: true,
|
|
19616
19826
|
container: true,
|
|
19617
19827
|
direction: "column",
|
|
@@ -19634,7 +19844,7 @@ function ListBoxInline(_ref5) {
|
|
|
19634
19844
|
wildCardSearch: wildCardSearch,
|
|
19635
19845
|
searchEnabled: searchEnabled,
|
|
19636
19846
|
direction: direction,
|
|
19637
|
-
hide: showSearchIcon &&
|
|
19847
|
+
hide: showSearchIcon && handleShowSearch,
|
|
19638
19848
|
styles: styles
|
|
19639
19849
|
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
19640
19850
|
item: true,
|
|
@@ -19642,11 +19852,11 @@ function ListBoxInline(_ref5) {
|
|
|
19642
19852
|
className: classes$4.listboxWrapper
|
|
19643
19853
|
}, isInvalid ? /*#__PURE__*/React__default.createElement(ListBoxError, {
|
|
19644
19854
|
text: errorText
|
|
19645
|
-
}) : /*#__PURE__*/React__default.createElement(AutoSizer, null,
|
|
19855
|
+
}) : /*#__PURE__*/React__default.createElement(AutoSizer, null, _ref4 => {
|
|
19646
19856
|
let {
|
|
19647
19857
|
height,
|
|
19648
19858
|
width
|
|
19649
|
-
} =
|
|
19859
|
+
} = _ref4;
|
|
19650
19860
|
return /*#__PURE__*/React__default.createElement(ListBox, {
|
|
19651
19861
|
model: model,
|
|
19652
19862
|
app: app,
|
|
@@ -19688,10 +19898,10 @@ function ListBoxInline(_ref5) {
|
|
|
19688
19898
|
})))));
|
|
19689
19899
|
}
|
|
19690
19900
|
const ListBoxInlineMemoed = React__default.memo(ListBoxInline);
|
|
19691
|
-
function IsolateUseLayoutWrapper(
|
|
19901
|
+
function IsolateUseLayoutWrapper(_ref5) {
|
|
19692
19902
|
let {
|
|
19693
19903
|
options = {}
|
|
19694
|
-
} =
|
|
19904
|
+
} = _ref5;
|
|
19695
19905
|
const {
|
|
19696
19906
|
model
|
|
19697
19907
|
} = options;
|
|
@@ -19720,24 +19930,26 @@ function useExistingModel(_ref) {
|
|
|
19720
19930
|
throw new Error("Option \"".concat(usedForbiddenOptions.join(', '), "\" is not applicable for existing objects."));
|
|
19721
19931
|
}
|
|
19722
19932
|
useEffect$1(() => {
|
|
19723
|
-
|
|
19724
|
-
|
|
19725
|
-
|
|
19726
|
-
setModel(modelFromStore);
|
|
19727
|
-
} else {
|
|
19728
|
-
const m = await app.getObject(qId);
|
|
19729
|
-
modelStore.set(m.id, m);
|
|
19730
|
-
m.once('closed', () => {
|
|
19731
|
-
modelStore.clear(m.id);
|
|
19732
|
-
});
|
|
19733
|
-
setModel(m);
|
|
19933
|
+
function storeModel(m) {
|
|
19934
|
+
if (modelStore.get(m.id)) {
|
|
19935
|
+
return;
|
|
19734
19936
|
}
|
|
19937
|
+
// Nebula gets the model from this store in some of its
|
|
19938
|
+
// core functions, so it must always be stored here.
|
|
19939
|
+
modelStore.set(m.id, m);
|
|
19940
|
+
m.once('closed', () => {
|
|
19941
|
+
modelStore.clear(m.id);
|
|
19942
|
+
});
|
|
19735
19943
|
}
|
|
19736
|
-
|
|
19737
|
-
|
|
19738
|
-
|
|
19739
|
-
fetchObject();
|
|
19944
|
+
async function fetchObject(modelId) {
|
|
19945
|
+
const m = modelStore.get(modelId) || (await app.getObject(modelId));
|
|
19946
|
+
return m;
|
|
19740
19947
|
}
|
|
19948
|
+
const p = Promise.resolve(sessionModel || fetchObject(qId));
|
|
19949
|
+
p.then(m => {
|
|
19950
|
+
storeModel(m);
|
|
19951
|
+
setModel(m);
|
|
19952
|
+
});
|
|
19741
19953
|
}, []);
|
|
19742
19954
|
return model;
|
|
19743
19955
|
}
|
|
@@ -20143,7 +20355,6 @@ function ListBoxWrapper(_ref) {
|
|
|
20143
20355
|
frequencyMode: getFrequencyModeLetter(options.frequencyMode) // stick to letter option hereafter
|
|
20144
20356
|
});
|
|
20145
20357
|
}
|
|
20146
|
-
|
|
20147
20358
|
const [changeCount, setChangeCount] = useState$1(0);
|
|
20148
20359
|
useEffect$1(() => {
|
|
20149
20360
|
if (changeCount) {
|
|
@@ -20545,7 +20756,6 @@ async function populateData(_ref, halo) {
|
|
|
20545
20756
|
{
|
|
20546
20757
|
console.warn('Attempting to add fields to an object without a specified data target'); // eslint-disable-line no-console
|
|
20547
20758
|
}
|
|
20548
|
-
|
|
20549
20759
|
return;
|
|
20550
20760
|
}
|
|
20551
20761
|
const {
|
|
@@ -20644,7 +20854,6 @@ const getValue = (data, reference, defaultValue) => {
|
|
|
20644
20854
|
if (step === '') {
|
|
20645
20855
|
continue; // eslint-disable-line no-continue
|
|
20646
20856
|
}
|
|
20647
|
-
|
|
20648
20857
|
if (dataContainer[step] === undefined || dataContainer[step] === null) {
|
|
20649
20858
|
return defaultValue;
|
|
20650
20859
|
}
|
|
@@ -20814,7 +21023,6 @@ function copyPropertyOrSetDefault(propertyName, source, target, defaultValue) {
|
|
|
20814
21023
|
function getOthersLabel() {
|
|
20815
21024
|
return 'Others'; // TODO: translator.get('properties.dimensionLimits.others')
|
|
20816
21025
|
}
|
|
20817
|
-
|
|
20818
21026
|
function createDefaultDimension(dimensionDef, dimensionProperties) {
|
|
20819
21027
|
const def = extend$2(true, {}, dimensionProperties, dimensionDef);
|
|
20820
21028
|
if (!utils.getValue(def, 'qOtherTotalSpec.qOtherCounted')) {
|
|
@@ -21340,7 +21548,6 @@ const getDefaultExportPropertiesFn = path => {
|
|
|
21340
21548
|
}
|
|
21341
21549
|
return undefined; // TODO: add listbox and other
|
|
21342
21550
|
};
|
|
21343
|
-
|
|
21344
21551
|
const getExportPropertiesFnc = qae => {
|
|
21345
21552
|
if (qae.exportProperties) {
|
|
21346
21553
|
return qae.exportProperties;
|
|
@@ -21355,7 +21562,6 @@ const getDefaultImportPropertiesFnc = path => {
|
|
|
21355
21562
|
}
|
|
21356
21563
|
return undefined; // TODO: add listbox and other
|
|
21357
21564
|
};
|
|
21358
|
-
|
|
21359
21565
|
const getImportPropertiesFnc = qae => {
|
|
21360
21566
|
if (qae.importProperties) {
|
|
21361
21567
|
return qae.importProperties;
|
|
@@ -21455,7 +21661,7 @@ const warning = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
21455
21661
|
}
|
|
21456
21662
|
}]
|
|
21457
21663
|
});
|
|
21458
|
-
var WarningTriangle = (props => SvgIcon$
|
|
21664
|
+
var WarningTriangle = (props => SvgIcon$1(warning(props)));
|
|
21459
21665
|
|
|
21460
21666
|
/* eslint-disable react/no-array-index-key */
|
|
21461
21667
|
function DescriptionRow(_ref) {
|
|
@@ -21594,7 +21800,7 @@ const classes$3 = {
|
|
|
21594
21800
|
front: "".concat(PREFIX$3, "-front"),
|
|
21595
21801
|
back: "".concat(PREFIX$3, "-back")
|
|
21596
21802
|
};
|
|
21597
|
-
const Root = styled
|
|
21803
|
+
const Root = styled('div')(_ref => {
|
|
21598
21804
|
let {
|
|
21599
21805
|
theme
|
|
21600
21806
|
} = _ref;
|
|
@@ -21649,7 +21855,7 @@ const PREFIX$2 = 'LongRunningQuery';
|
|
|
21649
21855
|
const classes$2 = {
|
|
21650
21856
|
stripes: "".concat(PREFIX$2, "-stripes")
|
|
21651
21857
|
};
|
|
21652
|
-
const StyledGrid$2 = styled
|
|
21858
|
+
const StyledGrid$2 = styled(Grid)(() => ({
|
|
21653
21859
|
["& .".concat(classes$2.stripes)]: {
|
|
21654
21860
|
'&::before': {
|
|
21655
21861
|
position: 'absolute',
|
|
@@ -21775,7 +21981,7 @@ const classes$1 = {
|
|
|
21775
21981
|
containerStyle: "".concat(PREFIX$1, "-containerStyle"),
|
|
21776
21982
|
containerTitleStyle: "".concat(PREFIX$1, "-containerTitleStyle")
|
|
21777
21983
|
};
|
|
21778
|
-
const StyledGrid$1 = styled
|
|
21984
|
+
const StyledGrid$1 = styled(Grid)(_ref => {
|
|
21779
21985
|
let {
|
|
21780
21986
|
theme
|
|
21781
21987
|
} = _ref;
|
|
@@ -21859,7 +22065,8 @@ function Header(_ref2) {
|
|
|
21859
22065
|
show: showPopoverToolbar,
|
|
21860
22066
|
anchorEl
|
|
21861
22067
|
},
|
|
21862
|
-
focusHandler: focusHandler
|
|
22068
|
+
focusHandler: focusHandler,
|
|
22069
|
+
layout: layout
|
|
21863
22070
|
});
|
|
21864
22071
|
return /*#__PURE__*/React__default.createElement(StyledGrid$1, {
|
|
21865
22072
|
ref: containerRef,
|
|
@@ -21894,7 +22101,7 @@ const PREFIX = 'Footer';
|
|
|
21894
22101
|
const classes = {
|
|
21895
22102
|
itemStyle: "".concat(PREFIX, "-itemStyle")
|
|
21896
22103
|
};
|
|
21897
|
-
const StyledGrid = styled
|
|
22104
|
+
const StyledGrid = styled(Grid)(_ref => {
|
|
21898
22105
|
let {
|
|
21899
22106
|
theme
|
|
21900
22107
|
} = _ref;
|
|
@@ -23393,7 +23600,6 @@ function flushMacro(hooks) {
|
|
|
23393
23600
|
hooks.macro = null;
|
|
23394
23601
|
maybeEndChain(hooks); // eslint-disable-line no-use-before-define
|
|
23395
23602
|
}
|
|
23396
|
-
|
|
23397
23603
|
function maybeEndChain(hooks) {
|
|
23398
23604
|
if (hooks.pendingPromises.length || hooks.micro || hooks.macro) {
|
|
23399
23605
|
return;
|
|
@@ -23538,11 +23744,17 @@ function useState(initial) {
|
|
|
23538
23744
|
}
|
|
23539
23745
|
|
|
23540
23746
|
/**
|
|
23747
|
+
* Callback function that should return a function that in turns gets
|
|
23748
|
+
* called before the hook runs again or when the component is destroyed.
|
|
23749
|
+
* For example to remove any listeners added in the callback itself.
|
|
23541
23750
|
* @typedef {function():(void | function():void)} EffectCallback
|
|
23542
23751
|
*/
|
|
23543
23752
|
|
|
23544
23753
|
/**
|
|
23545
23754
|
* Triggers a callback function when a dependent value changes.
|
|
23755
|
+
*
|
|
23756
|
+
* Omitting the dependency array will have the hook run on each update
|
|
23757
|
+
* and an empty dependency array runs only once.
|
|
23546
23758
|
* @entry
|
|
23547
23759
|
* @param {EffectCallback} effect - The callback.
|
|
23548
23760
|
* @param {Array<any>=} deps - The dependencies that should trigger the callback.
|
|
@@ -23555,6 +23767,15 @@ function useState(initial) {
|
|
|
23555
23767
|
* console.log('unmounted');
|
|
23556
23768
|
* };
|
|
23557
23769
|
* }, []);
|
|
23770
|
+
*
|
|
23771
|
+
* useEffect(() => {
|
|
23772
|
+
* const clickHandler = () => { console.log('click') };
|
|
23773
|
+
* const button = element.querySelector('.button');
|
|
23774
|
+
* button.addEventListener('click', clickHandler);
|
|
23775
|
+
* return () => {
|
|
23776
|
+
* button.removeEventListener('click', clickHandler);
|
|
23777
|
+
* };
|
|
23778
|
+
* }, []);
|
|
23558
23779
|
*/
|
|
23559
23780
|
function useEffect(cb, deps) {
|
|
23560
23781
|
{
|
|
@@ -23614,17 +23835,20 @@ function useMemo(fn, deps) {
|
|
|
23614
23835
|
|
|
23615
23836
|
/**
|
|
23616
23837
|
* Runs a callback function when a dependent changes.
|
|
23838
|
+
*
|
|
23839
|
+
* Useful for async operations that otherwise cause no side effects.
|
|
23840
|
+
* Do not add for example listeners withing the callback as there is no teardown function.
|
|
23617
23841
|
* @entry
|
|
23618
23842
|
* @template P
|
|
23619
23843
|
* @param {function():Promise<P>} factory - The factory function that calls the promise.
|
|
23620
23844
|
* @param {Array<any>=} deps - The dependencies.
|
|
23621
|
-
* @returns {Array<P,Error>} The resolved value
|
|
23845
|
+
* @returns {Array<P,Error>} The resolved value or rejected error
|
|
23622
23846
|
* @example
|
|
23623
23847
|
* import { usePromise } from '@nebula.js/stardust';
|
|
23624
23848
|
* import { useModel } from '@nebula.js/stardust';
|
|
23625
23849
|
* // ...
|
|
23626
23850
|
* const model = useModel();
|
|
23627
|
-
* const [resolved, rejected] = usePromise(() => model.getLayout(), []);
|
|
23851
|
+
* const [resolved, rejected] = usePromise(() => model.getLayout(), [model]);
|
|
23628
23852
|
*/
|
|
23629
23853
|
function usePromise(p, deps) {
|
|
23630
23854
|
const [obj, setObj] = useState(() => ({
|
|
@@ -24930,7 +25154,6 @@ const resolveValue = (data, reference, defaultValue) => {
|
|
|
24930
25154
|
if (steps[i] === '') {
|
|
24931
25155
|
continue; // eslint-disable-line no-continue
|
|
24932
25156
|
}
|
|
24933
|
-
|
|
24934
25157
|
if (typeof dataContainer[steps[i]] === 'undefined') {
|
|
24935
25158
|
return defaultValue;
|
|
24936
25159
|
}
|
|
@@ -25406,7 +25629,6 @@ function viz() {
|
|
|
25406
25629
|
// resize() {},
|
|
25407
25630
|
// show() {},
|
|
25408
25631
|
};
|
|
25409
|
-
|
|
25410
25632
|
return api;
|
|
25411
25633
|
}
|
|
25412
25634
|
|
|
@@ -25512,7 +25734,6 @@ async function createSessionObject(_ref, halo) {
|
|
|
25512
25734
|
};
|
|
25513
25735
|
// console.error(e); // eslint-disable-line
|
|
25514
25736
|
}
|
|
25515
|
-
|
|
25516
25737
|
const model = await halo.app.createSessionObject(mergedProps);
|
|
25517
25738
|
if (children.length > 0) {
|
|
25518
25739
|
await model.setFullPropertyTree({
|
|
@@ -25591,7 +25812,6 @@ async function createObject(_ref, halo, generateOnly) {
|
|
|
25591
25812
|
}
|
|
25592
25813
|
// console.error(e); // eslint-disable-line
|
|
25593
25814
|
}
|
|
25594
|
-
|
|
25595
25815
|
if (!generateOnly) {
|
|
25596
25816
|
const model = await halo.app.createObject(mergedProps);
|
|
25597
25817
|
if (children.length > 0) {
|
|
@@ -26003,15 +26223,14 @@ function flagsFn () {
|
|
|
26003
26223
|
* @interface Flags
|
|
26004
26224
|
*/
|
|
26005
26225
|
|
|
26006
|
-
return
|
|
26007
|
-
|
|
26008
|
-
|
|
26009
|
-
|
|
26010
|
-
|
|
26011
|
-
|
|
26012
|
-
|
|
26013
|
-
|
|
26014
|
-
);
|
|
26226
|
+
return /** @lends Flags */{
|
|
26227
|
+
/**
|
|
26228
|
+
* Checks whether the specified flag is enabled.
|
|
26229
|
+
* @param {string} flag - The value flag to check.
|
|
26230
|
+
* @returns {boolean} True if the specified flag is enabled, false otherwise.
|
|
26231
|
+
*/
|
|
26232
|
+
isEnabled: f => flags[f] === true
|
|
26233
|
+
};
|
|
26015
26234
|
}
|
|
26016
26235
|
|
|
26017
26236
|
var iterator;
|
|
@@ -26458,6 +26677,7 @@ try {
|
|
|
26458
26677
|
|
|
26459
26678
|
// A linked list to keep track of recently-used-ness
|
|
26460
26679
|
const Yallist = yallist;
|
|
26680
|
+
|
|
26461
26681
|
const MAX = Symbol('max');
|
|
26462
26682
|
const LENGTH = Symbol('length');
|
|
26463
26683
|
const LENGTH_CALCULATOR = Symbol('lengthCalculator');
|
|
@@ -26468,6 +26688,7 @@ const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');
|
|
|
26468
26688
|
const LRU_LIST = Symbol('lruList');
|
|
26469
26689
|
const CACHE = Symbol('cache');
|
|
26470
26690
|
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');
|
|
26691
|
+
|
|
26471
26692
|
const naiveLength = () => 1;
|
|
26472
26693
|
|
|
26473
26694
|
// lruList is a yallist where the head is the youngest
|
|
@@ -26479,18 +26700,23 @@ const naiveLength = () => 1;
|
|
|
26479
26700
|
// cache is a Map (or PseudoMap) that matches the keys to
|
|
26480
26701
|
// the Yallist.Node object.
|
|
26481
26702
|
class LRUCache {
|
|
26482
|
-
constructor(options) {
|
|
26483
|
-
if (typeof options === 'number')
|
|
26484
|
-
max: options
|
|
26485
|
-
|
|
26486
|
-
if (!options)
|
|
26487
|
-
|
|
26703
|
+
constructor (options) {
|
|
26704
|
+
if (typeof options === 'number')
|
|
26705
|
+
options = { max: options };
|
|
26706
|
+
|
|
26707
|
+
if (!options)
|
|
26708
|
+
options = {};
|
|
26709
|
+
|
|
26710
|
+
if (options.max && (typeof options.max !== 'number' || options.max < 0))
|
|
26711
|
+
throw new TypeError('max must be a non-negative number')
|
|
26488
26712
|
// Kind of weird to have a default max of Infinity, but oh well.
|
|
26489
26713
|
this[MAX] = options.max || Infinity;
|
|
26714
|
+
|
|
26490
26715
|
const lc = options.length || naiveLength;
|
|
26491
|
-
this[LENGTH_CALCULATOR] = typeof lc !== 'function' ? naiveLength : lc;
|
|
26716
|
+
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc;
|
|
26492
26717
|
this[ALLOW_STALE] = options.stale || false;
|
|
26493
|
-
if (options.maxAge && typeof options.maxAge !== 'number')
|
|
26718
|
+
if (options.maxAge && typeof options.maxAge !== 'number')
|
|
26719
|
+
throw new TypeError('maxAge must be a number')
|
|
26494
26720
|
this[MAX_AGE] = options.maxAge || 0;
|
|
26495
26721
|
this[DISPOSE] = options.dispose;
|
|
26496
26722
|
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
|
|
@@ -26499,32 +26725,40 @@ class LRUCache {
|
|
|
26499
26725
|
}
|
|
26500
26726
|
|
|
26501
26727
|
// resize the cache when the max changes.
|
|
26502
|
-
set max(mL) {
|
|
26503
|
-
if (typeof mL !== 'number' || mL < 0)
|
|
26728
|
+
set max (mL) {
|
|
26729
|
+
if (typeof mL !== 'number' || mL < 0)
|
|
26730
|
+
throw new TypeError('max must be a non-negative number')
|
|
26731
|
+
|
|
26504
26732
|
this[MAX] = mL || Infinity;
|
|
26505
26733
|
trim(this);
|
|
26506
26734
|
}
|
|
26507
|
-
get max() {
|
|
26508
|
-
return this[MAX]
|
|
26735
|
+
get max () {
|
|
26736
|
+
return this[MAX]
|
|
26509
26737
|
}
|
|
26510
|
-
|
|
26738
|
+
|
|
26739
|
+
set allowStale (allowStale) {
|
|
26511
26740
|
this[ALLOW_STALE] = !!allowStale;
|
|
26512
26741
|
}
|
|
26513
|
-
get allowStale() {
|
|
26514
|
-
return this[ALLOW_STALE]
|
|
26742
|
+
get allowStale () {
|
|
26743
|
+
return this[ALLOW_STALE]
|
|
26515
26744
|
}
|
|
26516
|
-
|
|
26517
|
-
|
|
26745
|
+
|
|
26746
|
+
set maxAge (mA) {
|
|
26747
|
+
if (typeof mA !== 'number')
|
|
26748
|
+
throw new TypeError('maxAge must be a non-negative number')
|
|
26749
|
+
|
|
26518
26750
|
this[MAX_AGE] = mA;
|
|
26519
26751
|
trim(this);
|
|
26520
26752
|
}
|
|
26521
|
-
get maxAge() {
|
|
26522
|
-
return this[MAX_AGE]
|
|
26753
|
+
get maxAge () {
|
|
26754
|
+
return this[MAX_AGE]
|
|
26523
26755
|
}
|
|
26524
26756
|
|
|
26525
26757
|
// resize the cache when the lengthCalculator changes.
|
|
26526
|
-
set lengthCalculator(lC) {
|
|
26527
|
-
if (typeof lC !== 'function')
|
|
26758
|
+
set lengthCalculator (lC) {
|
|
26759
|
+
if (typeof lC !== 'function')
|
|
26760
|
+
lC = naiveLength;
|
|
26761
|
+
|
|
26528
26762
|
if (lC !== this[LENGTH_CALCULATOR]) {
|
|
26529
26763
|
this[LENGTH_CALCULATOR] = lC;
|
|
26530
26764
|
this[LENGTH] = 0;
|
|
@@ -26535,16 +26769,12 @@ class LRUCache {
|
|
|
26535
26769
|
}
|
|
26536
26770
|
trim(this);
|
|
26537
26771
|
}
|
|
26538
|
-
get lengthCalculator() {
|
|
26539
|
-
|
|
26540
|
-
}
|
|
26541
|
-
get
|
|
26542
|
-
|
|
26543
|
-
|
|
26544
|
-
get itemCount() {
|
|
26545
|
-
return this[LRU_LIST].length;
|
|
26546
|
-
}
|
|
26547
|
-
rforEach(fn, thisp) {
|
|
26772
|
+
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
|
|
26773
|
+
|
|
26774
|
+
get length () { return this[LENGTH] }
|
|
26775
|
+
get itemCount () { return this[LRU_LIST].length }
|
|
26776
|
+
|
|
26777
|
+
rforEach (fn, thisp) {
|
|
26548
26778
|
thisp = thisp || this;
|
|
26549
26779
|
for (let walker = this[LRU_LIST].tail; walker !== null;) {
|
|
26550
26780
|
const prev = walker.prev;
|
|
@@ -26552,7 +26782,8 @@ class LRUCache {
|
|
|
26552
26782
|
walker = prev;
|
|
26553
26783
|
}
|
|
26554
26784
|
}
|
|
26555
|
-
|
|
26785
|
+
|
|
26786
|
+
forEach (fn, thisp) {
|
|
26556
26787
|
thisp = thisp || this;
|
|
26557
26788
|
for (let walker = this[LRU_LIST].head; walker !== null;) {
|
|
26558
26789
|
const next = walker.next;
|
|
@@ -26560,49 +26791,65 @@ class LRUCache {
|
|
|
26560
26791
|
walker = next;
|
|
26561
26792
|
}
|
|
26562
26793
|
}
|
|
26563
|
-
|
|
26564
|
-
|
|
26794
|
+
|
|
26795
|
+
keys () {
|
|
26796
|
+
return this[LRU_LIST].toArray().map(k => k.key)
|
|
26565
26797
|
}
|
|
26566
|
-
|
|
26567
|
-
|
|
26798
|
+
|
|
26799
|
+
values () {
|
|
26800
|
+
return this[LRU_LIST].toArray().map(k => k.value)
|
|
26568
26801
|
}
|
|
26569
|
-
|
|
26570
|
-
|
|
26802
|
+
|
|
26803
|
+
reset () {
|
|
26804
|
+
if (this[DISPOSE] &&
|
|
26805
|
+
this[LRU_LIST] &&
|
|
26806
|
+
this[LRU_LIST].length) {
|
|
26571
26807
|
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));
|
|
26572
26808
|
}
|
|
26809
|
+
|
|
26573
26810
|
this[CACHE] = new Map(); // hash of items by key
|
|
26574
26811
|
this[LRU_LIST] = new Yallist(); // list of items in order of use recency
|
|
26575
26812
|
this[LENGTH] = 0; // length of items in the list
|
|
26576
26813
|
}
|
|
26577
26814
|
|
|
26578
|
-
dump() {
|
|
26579
|
-
return this[LRU_LIST].map(hit =>
|
|
26580
|
-
|
|
26581
|
-
|
|
26582
|
-
|
|
26583
|
-
|
|
26815
|
+
dump () {
|
|
26816
|
+
return this[LRU_LIST].map(hit =>
|
|
26817
|
+
isStale(this, hit) ? false : {
|
|
26818
|
+
k: hit.key,
|
|
26819
|
+
v: hit.value,
|
|
26820
|
+
e: hit.now + (hit.maxAge || 0)
|
|
26821
|
+
}).toArray().filter(h => h)
|
|
26584
26822
|
}
|
|
26585
|
-
|
|
26586
|
-
|
|
26823
|
+
|
|
26824
|
+
dumpLru () {
|
|
26825
|
+
return this[LRU_LIST]
|
|
26587
26826
|
}
|
|
26588
|
-
|
|
26827
|
+
|
|
26828
|
+
set (key, value, maxAge) {
|
|
26589
26829
|
maxAge = maxAge || this[MAX_AGE];
|
|
26590
|
-
|
|
26830
|
+
|
|
26831
|
+
if (maxAge && typeof maxAge !== 'number')
|
|
26832
|
+
throw new TypeError('maxAge must be a number')
|
|
26833
|
+
|
|
26591
26834
|
const now = maxAge ? Date.now() : 0;
|
|
26592
26835
|
const len = this[LENGTH_CALCULATOR](value, key);
|
|
26836
|
+
|
|
26593
26837
|
if (this[CACHE].has(key)) {
|
|
26594
26838
|
if (len > this[MAX]) {
|
|
26595
26839
|
del(this, this[CACHE].get(key));
|
|
26596
|
-
return false
|
|
26840
|
+
return false
|
|
26597
26841
|
}
|
|
26842
|
+
|
|
26598
26843
|
const node = this[CACHE].get(key);
|
|
26599
26844
|
const item = node.value;
|
|
26600
26845
|
|
|
26601
26846
|
// dispose of the old one before overwriting
|
|
26602
26847
|
// split out into 2 ifs for better coverage tracking
|
|
26603
26848
|
if (this[DISPOSE]) {
|
|
26604
|
-
if (!this[NO_DISPOSE_ON_SET])
|
|
26849
|
+
if (!this[NO_DISPOSE_ON_SET])
|
|
26850
|
+
this[DISPOSE](key, item.value);
|
|
26605
26851
|
}
|
|
26852
|
+
|
|
26606
26853
|
item.now = now;
|
|
26607
26854
|
item.maxAge = maxAge;
|
|
26608
26855
|
item.value = value;
|
|
@@ -26610,44 +26857,57 @@ class LRUCache {
|
|
|
26610
26857
|
item.length = len;
|
|
26611
26858
|
this.get(key);
|
|
26612
26859
|
trim(this);
|
|
26613
|
-
return true
|
|
26860
|
+
return true
|
|
26614
26861
|
}
|
|
26862
|
+
|
|
26615
26863
|
const hit = new Entry(key, value, len, now, maxAge);
|
|
26616
26864
|
|
|
26617
26865
|
// oversized objects fall out of cache automatically.
|
|
26618
26866
|
if (hit.length > this[MAX]) {
|
|
26619
|
-
if (this[DISPOSE])
|
|
26620
|
-
|
|
26867
|
+
if (this[DISPOSE])
|
|
26868
|
+
this[DISPOSE](key, value);
|
|
26869
|
+
|
|
26870
|
+
return false
|
|
26621
26871
|
}
|
|
26872
|
+
|
|
26622
26873
|
this[LENGTH] += hit.length;
|
|
26623
26874
|
this[LRU_LIST].unshift(hit);
|
|
26624
26875
|
this[CACHE].set(key, this[LRU_LIST].head);
|
|
26625
26876
|
trim(this);
|
|
26626
|
-
return true
|
|
26877
|
+
return true
|
|
26627
26878
|
}
|
|
26628
|
-
|
|
26629
|
-
|
|
26879
|
+
|
|
26880
|
+
has (key) {
|
|
26881
|
+
if (!this[CACHE].has(key)) return false
|
|
26630
26882
|
const hit = this[CACHE].get(key).value;
|
|
26631
|
-
return !isStale(this, hit)
|
|
26883
|
+
return !isStale(this, hit)
|
|
26632
26884
|
}
|
|
26633
|
-
|
|
26634
|
-
|
|
26885
|
+
|
|
26886
|
+
get (key) {
|
|
26887
|
+
return get(this, key, true)
|
|
26635
26888
|
}
|
|
26636
|
-
|
|
26637
|
-
|
|
26889
|
+
|
|
26890
|
+
peek (key) {
|
|
26891
|
+
return get(this, key, false)
|
|
26638
26892
|
}
|
|
26639
|
-
|
|
26893
|
+
|
|
26894
|
+
pop () {
|
|
26640
26895
|
const node = this[LRU_LIST].tail;
|
|
26641
|
-
if (!node)
|
|
26896
|
+
if (!node)
|
|
26897
|
+
return null
|
|
26898
|
+
|
|
26642
26899
|
del(this, node);
|
|
26643
|
-
return node.value
|
|
26900
|
+
return node.value
|
|
26644
26901
|
}
|
|
26645
|
-
|
|
26902
|
+
|
|
26903
|
+
del (key) {
|
|
26646
26904
|
del(this, this[CACHE].get(key));
|
|
26647
26905
|
}
|
|
26648
|
-
|
|
26906
|
+
|
|
26907
|
+
load (arr) {
|
|
26649
26908
|
// reset the cache
|
|
26650
26909
|
this.reset();
|
|
26910
|
+
|
|
26651
26911
|
const now = Date.now();
|
|
26652
26912
|
// A previous serialized cache has the most recent items first
|
|
26653
26913
|
for (let l = arr.length - 1; l >= 0; l--) {
|
|
@@ -26655,7 +26915,8 @@ class LRUCache {
|
|
|
26655
26915
|
const expiresAt = hit.e || 0;
|
|
26656
26916
|
if (expiresAt === 0)
|
|
26657
26917
|
// the item was created without expiration in a non aged cache
|
|
26658
|
-
this.set(hit.k, hit.v);
|
|
26918
|
+
this.set(hit.k, hit.v);
|
|
26919
|
+
else {
|
|
26659
26920
|
const maxAge = expiresAt - now;
|
|
26660
26921
|
// dont add already expired items
|
|
26661
26922
|
if (maxAge > 0) {
|
|
@@ -26664,34 +26925,44 @@ class LRUCache {
|
|
|
26664
26925
|
}
|
|
26665
26926
|
}
|
|
26666
26927
|
}
|
|
26667
|
-
|
|
26928
|
+
|
|
26929
|
+
prune () {
|
|
26668
26930
|
this[CACHE].forEach((value, key) => get(this, key, false));
|
|
26669
26931
|
}
|
|
26670
26932
|
}
|
|
26933
|
+
|
|
26671
26934
|
const get = (self, key, doUse) => {
|
|
26672
26935
|
const node = self[CACHE].get(key);
|
|
26673
26936
|
if (node) {
|
|
26674
26937
|
const hit = node.value;
|
|
26675
26938
|
if (isStale(self, hit)) {
|
|
26676
26939
|
del(self, node);
|
|
26677
|
-
if (!self[ALLOW_STALE])
|
|
26940
|
+
if (!self[ALLOW_STALE])
|
|
26941
|
+
return undefined
|
|
26678
26942
|
} else {
|
|
26679
26943
|
if (doUse) {
|
|
26680
|
-
if (self[UPDATE_AGE_ON_GET])
|
|
26944
|
+
if (self[UPDATE_AGE_ON_GET])
|
|
26945
|
+
node.value.now = Date.now();
|
|
26681
26946
|
self[LRU_LIST].unshiftNode(node);
|
|
26682
26947
|
}
|
|
26683
26948
|
}
|
|
26684
|
-
return hit.value
|
|
26949
|
+
return hit.value
|
|
26685
26950
|
}
|
|
26686
26951
|
};
|
|
26952
|
+
|
|
26687
26953
|
const isStale = (self, hit) => {
|
|
26688
|
-
if (!hit || !hit.maxAge && !self[MAX_AGE])
|
|
26954
|
+
if (!hit || (!hit.maxAge && !self[MAX_AGE]))
|
|
26955
|
+
return false
|
|
26956
|
+
|
|
26689
26957
|
const diff = Date.now() - hit.now;
|
|
26690
|
-
return hit.maxAge ? diff > hit.maxAge
|
|
26958
|
+
return hit.maxAge ? diff > hit.maxAge
|
|
26959
|
+
: self[MAX_AGE] && (diff > self[MAX_AGE])
|
|
26691
26960
|
};
|
|
26961
|
+
|
|
26692
26962
|
const trim = self => {
|
|
26693
26963
|
if (self[LENGTH] > self[MAX]) {
|
|
26694
|
-
for (let walker = self[LRU_LIST].tail;
|
|
26964
|
+
for (let walker = self[LRU_LIST].tail;
|
|
26965
|
+
self[LENGTH] > self[MAX] && walker !== null;) {
|
|
26695
26966
|
// We know that we're about to delete this one, and also
|
|
26696
26967
|
// what the next least recently used key will be, so just
|
|
26697
26968
|
// go ahead and set it now.
|
|
@@ -26701,17 +26972,21 @@ const trim = self => {
|
|
|
26701
26972
|
}
|
|
26702
26973
|
}
|
|
26703
26974
|
};
|
|
26975
|
+
|
|
26704
26976
|
const del = (self, node) => {
|
|
26705
26977
|
if (node) {
|
|
26706
26978
|
const hit = node.value;
|
|
26707
|
-
if (self[DISPOSE])
|
|
26979
|
+
if (self[DISPOSE])
|
|
26980
|
+
self[DISPOSE](hit.key, hit.value);
|
|
26981
|
+
|
|
26708
26982
|
self[LENGTH] -= hit.length;
|
|
26709
26983
|
self[CACHE].delete(hit.key);
|
|
26710
26984
|
self[LRU_LIST].removeNode(node);
|
|
26711
26985
|
}
|
|
26712
26986
|
};
|
|
26987
|
+
|
|
26713
26988
|
class Entry {
|
|
26714
|
-
constructor(key, value, length, now, maxAge) {
|
|
26989
|
+
constructor (key, value, length, now, maxAge) {
|
|
26715
26990
|
this.key = key;
|
|
26716
26991
|
this.value = value;
|
|
26717
26992
|
this.length = length;
|
|
@@ -26719,14 +26994,18 @@ class Entry {
|
|
|
26719
26994
|
this.maxAge = maxAge || 0;
|
|
26720
26995
|
}
|
|
26721
26996
|
}
|
|
26997
|
+
|
|
26722
26998
|
const forEachStep = (self, fn, node, thisp) => {
|
|
26723
26999
|
let hit = node.value;
|
|
26724
27000
|
if (isStale(self, hit)) {
|
|
26725
27001
|
del(self, node);
|
|
26726
|
-
if (!self[ALLOW_STALE])
|
|
27002
|
+
if (!self[ALLOW_STALE])
|
|
27003
|
+
hit = undefined;
|
|
26727
27004
|
}
|
|
26728
|
-
if (hit)
|
|
27005
|
+
if (hit)
|
|
27006
|
+
fn.call(thisp, hit.value, hit.key, self);
|
|
26729
27007
|
};
|
|
27008
|
+
|
|
26730
27009
|
var lruCache = LRUCache;
|
|
26731
27010
|
|
|
26732
27011
|
// parse out just the options we care about
|
|
@@ -27933,7 +28212,6 @@ async function load(name, version, _ref, loader) {
|
|
|
27933
28212
|
{
|
|
27934
28213
|
console.warn(e); // eslint-disable-line no-console
|
|
27935
28214
|
}
|
|
27936
|
-
|
|
27937
28215
|
throw new Error("Failed to load visualization: '".concat(sKey, "'"));
|
|
27938
28216
|
});
|
|
27939
28217
|
}
|
|
@@ -28066,7 +28344,6 @@ function create(_ref) {
|
|
|
28066
28344
|
{
|
|
28067
28345
|
console.warn("Visualization ".concat(name, " is not registered. Adding it now.")); // eslint-disable-line no-console
|
|
28068
28346
|
}
|
|
28069
|
-
|
|
28070
28347
|
this.register({
|
|
28071
28348
|
name,
|
|
28072
28349
|
version
|
|
@@ -28077,7 +28354,6 @@ function create(_ref) {
|
|
|
28077
28354
|
{
|
|
28078
28355
|
console.warn("Version ".concat(version, " of ").concat(name, " is not registered. Falling back to version ").concat(versionToUse)); // eslint-disable-line no-console
|
|
28079
28356
|
}
|
|
28080
|
-
|
|
28081
28357
|
version = versionToUse;
|
|
28082
28358
|
}
|
|
28083
28359
|
return tc[name].get(version) || p.get(typeInfo);
|
|
@@ -28155,7 +28431,7 @@ const DEFAULT_SNAPSHOT_CONFIG = /** @lends SnapshotConfiguration */{
|
|
|
28155
28431
|
|
|
28156
28432
|
/**
|
|
28157
28433
|
* @interface Configuration
|
|
28158
|
-
* @property {LoadType
|
|
28434
|
+
* @property {Function(LoadType):Promise<Visualization>=} load Fallback load function for missing types
|
|
28159
28435
|
* @property {Context=} context Settings for the rendering instance
|
|
28160
28436
|
* @property {Array<TypeInfo>=} types Visualization types to register
|
|
28161
28437
|
* @property {Array<ThemeInfo>=} themes Themes to register
|
|
@@ -28313,7 +28589,6 @@ function nuked() {
|
|
|
28313
28589
|
translator: locale.translator,
|
|
28314
28590
|
nebbie: null // actual value is set further down
|
|
28315
28591
|
};
|
|
28316
|
-
|
|
28317
28592
|
const halo = {
|
|
28318
28593
|
app,
|
|
28319
28594
|
root,
|
|
@@ -28475,7 +28750,6 @@ function nuked() {
|
|
|
28475
28750
|
{
|
|
28476
28751
|
console.error('Already mounted'); // eslint-disable-line no-console
|
|
28477
28752
|
}
|
|
28478
|
-
|
|
28479
28753
|
return;
|
|
28480
28754
|
}
|
|
28481
28755
|
selectionsComponentReference = mount({
|
|
@@ -28577,6 +28851,7 @@ function nuked() {
|
|
|
28577
28851
|
* @param {FrequencyMode=} [options.frequencyMode=none] Show frequency none|value|percent|relative
|
|
28578
28852
|
* @param {boolean=} [options.histogram=false] Show histogram bar (not applicable for existing objects)
|
|
28579
28853
|
* @param {SearchMode=} [options.search=true] Show the search bar permanently, using the toggle button or when in selection: false|true|toggle
|
|
28854
|
+
* @param {boolean=} [options.showLock=false] Show the button for toggling locked state.
|
|
28580
28855
|
* @param {boolean=} [options.toolbar=true] Show the toolbar
|
|
28581
28856
|
* @param {boolean=} [options.checkboxes=false] Show values as checkboxes instead of as fields (not applicable for existing objects)
|
|
28582
28857
|
* @param {boolean=} [options.dense=false] Reduces padding and text size (not applicable for existing objects)
|
|
@@ -28739,6 +29014,8 @@ function SessionMock() {
|
|
|
28739
29014
|
};
|
|
28740
29015
|
}
|
|
28741
29016
|
|
|
29017
|
+
/* eslint-disable no-underscore-dangle */
|
|
29018
|
+
|
|
28742
29019
|
// To cover test
|
|
28743
29020
|
// eslint-disable-next-line no-undef
|
|
28744
29021
|
const crt = globalThis.crypto || {
|
|
@@ -28750,7 +29027,7 @@ const crt = globalThis.crypto || {
|
|
|
28750
29027
|
function uuidv4() {
|
|
28751
29028
|
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (c ^ crt.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
|
|
28752
29029
|
}
|
|
28753
|
-
function CreateSessionObjectMock() {
|
|
29030
|
+
function CreateSessionObjectMock(session) {
|
|
28754
29031
|
return props => {
|
|
28755
29032
|
const properties = extend$2({}, props);
|
|
28756
29033
|
properties.qInfo = properties.qInfo || {};
|
|
@@ -28761,15 +29038,17 @@ function CreateSessionObjectMock() {
|
|
|
28761
29038
|
delete properties._mock;
|
|
28762
29039
|
layout = extend$2({}, properties, mockedInclusions);
|
|
28763
29040
|
}
|
|
28764
|
-
return Promise.resolve(
|
|
29041
|
+
return Promise.resolve({
|
|
28765
29042
|
on: () => {},
|
|
28766
29043
|
once: () => {},
|
|
28767
29044
|
getLayout: () => Promise.resolve(layout),
|
|
28768
29045
|
getProperties: () => Promise.resolve(properties),
|
|
28769
29046
|
getEffectiveProperties: () => Promise.resolve(properties),
|
|
28770
29047
|
removeListener: () => {},
|
|
28771
|
-
id: properties.qInfo.qId
|
|
28772
|
-
|
|
29048
|
+
id: properties.qInfo.qId,
|
|
29049
|
+
properties,
|
|
29050
|
+
session
|
|
29051
|
+
});
|
|
28773
29052
|
};
|
|
28774
29053
|
}
|
|
28775
29054
|
|
|
@@ -28990,7 +29269,7 @@ function GetAppLayoutMock() {
|
|
|
28990
29269
|
function fromGenericObjects(genericObjects) {
|
|
28991
29270
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
28992
29271
|
const session = new SessionMock();
|
|
28993
|
-
const createSessionObject = new CreateSessionObjectMock();
|
|
29272
|
+
const createSessionObject = new CreateSessionObjectMock(session);
|
|
28994
29273
|
const getObject = new GetObjectMock(genericObjects, options);
|
|
28995
29274
|
const getAppLayout = new GetAppLayoutMock();
|
|
28996
29275
|
const app = {
|