@vitessce/feature-list 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2746 -344
- package/dist-tsc/FeatureList.d.ts.map +1 -1
- package/dist-tsc/FeatureList.js +34 -19
- package/dist-tsc/FeatureListOptions.d.ts +2 -0
- package/dist-tsc/FeatureListOptions.d.ts.map +1 -0
- package/dist-tsc/FeatureListOptions.js +23 -0
- package/dist-tsc/FeatureListSubscriber.d.ts +4 -2
- package/dist-tsc/FeatureListSubscriber.d.ts.map +1 -1
- package/dist-tsc/FeatureListSubscriber.js +18 -7
- package/dist-tsc/constants.d.ts +3 -0
- package/dist-tsc/constants.d.ts.map +1 -0
- package/dist-tsc/constants.js +5 -0
- package/dist-tsc/selectable-table/SelectableTable.js +1 -1
- package/dist-tsc/selectable-table/SelectableTable.test.js +1 -1
- package/dist-tsc/selectable-table/styles.d.ts +1 -1
- package/dist-tsc/selectable-table/styles.d.ts.map +1 -1
- package/dist-tsc/selectable-table/styles.js +2 -2
- package/package.json +9 -9
- package/src/FeatureList.js +44 -24
- package/src/FeatureListOptions.js +101 -0
- package/src/FeatureListSubscriber.js +37 -10
- package/src/constants.js +6 -0
- package/src/selectable-table/SelectableTable.js +1 -1
- package/src/selectable-table/SelectableTable.test.jsx +1 -1
- package/src/selectable-table/styles.js +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React__default, { Children, isValidElement, cloneElement, useState, useEffect, useCallback, useMemo } from "react";
|
|
3
|
+
import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordination, useFeatureLabelsData, useObsFeatureMatrixIndices, useReady, useUrls, TitleInfo } from "@vitessce/vit-s";
|
|
4
|
+
import * as ReactDOM from "react-dom";
|
|
5
|
+
import ReactDOM__default from "react-dom";
|
|
4
6
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
5
7
|
function getDefaultExportFromCjs(x) {
|
|
6
8
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -47,7 +49,7 @@ var reactJsxRuntime_development = {};
|
|
|
47
49
|
*/
|
|
48
50
|
{
|
|
49
51
|
(function() {
|
|
50
|
-
var
|
|
52
|
+
var React2 = React__default;
|
|
51
53
|
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
52
54
|
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
53
55
|
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
@@ -73,7 +75,7 @@ var reactJsxRuntime_development = {};
|
|
|
73
75
|
}
|
|
74
76
|
return null;
|
|
75
77
|
}
|
|
76
|
-
var ReactSharedInternals =
|
|
78
|
+
var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
77
79
|
function error(format) {
|
|
78
80
|
{
|
|
79
81
|
{
|
|
@@ -459,7 +461,7 @@ var reactJsxRuntime_development = {};
|
|
|
459
461
|
}
|
|
460
462
|
}
|
|
461
463
|
}
|
|
462
|
-
function checkPropTypes2(typeSpecs,
|
|
464
|
+
function checkPropTypes2(typeSpecs, values2, location, componentName, element) {
|
|
463
465
|
{
|
|
464
466
|
var has2 = Function.call.bind(hasOwnProperty2);
|
|
465
467
|
for (var typeSpecName in typeSpecs) {
|
|
@@ -471,7 +473,7 @@ var reactJsxRuntime_development = {};
|
|
|
471
473
|
err.name = "Invariant Violation";
|
|
472
474
|
throw err;
|
|
473
475
|
}
|
|
474
|
-
error$1 = typeSpecs[typeSpecName](
|
|
476
|
+
error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
475
477
|
} catch (ex) {
|
|
476
478
|
error$1 = ex;
|
|
477
479
|
}
|
|
@@ -665,10 +667,10 @@ var reactJsxRuntime_development = {};
|
|
|
665
667
|
}
|
|
666
668
|
}
|
|
667
669
|
if (type && type.defaultProps) {
|
|
668
|
-
var
|
|
669
|
-
for (propName in
|
|
670
|
+
var defaultProps2 = type.defaultProps;
|
|
671
|
+
for (propName in defaultProps2) {
|
|
670
672
|
if (props[propName] === void 0) {
|
|
671
|
-
props[propName] =
|
|
673
|
+
props[propName] = defaultProps2[propName];
|
|
672
674
|
}
|
|
673
675
|
}
|
|
674
676
|
}
|
|
@@ -701,7 +703,7 @@ var reactJsxRuntime_development = {};
|
|
|
701
703
|
{
|
|
702
704
|
propTypesMisspellWarningShown = false;
|
|
703
705
|
}
|
|
704
|
-
function
|
|
706
|
+
function isValidElement2(object) {
|
|
705
707
|
{
|
|
706
708
|
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
707
709
|
}
|
|
@@ -768,11 +770,11 @@ var reactJsxRuntime_development = {};
|
|
|
768
770
|
if (isArray2(node)) {
|
|
769
771
|
for (var i = 0; i < node.length; i++) {
|
|
770
772
|
var child2 = node[i];
|
|
771
|
-
if (
|
|
773
|
+
if (isValidElement2(child2)) {
|
|
772
774
|
validateExplicitKey(child2, parentType);
|
|
773
775
|
}
|
|
774
776
|
}
|
|
775
|
-
} else if (
|
|
777
|
+
} else if (isValidElement2(node)) {
|
|
776
778
|
if (node._store) {
|
|
777
779
|
node._store.validated = true;
|
|
778
780
|
}
|
|
@@ -783,7 +785,7 @@ var reactJsxRuntime_development = {};
|
|
|
783
785
|
var iterator2 = iteratorFn.call(node);
|
|
784
786
|
var step;
|
|
785
787
|
while (!(step = iterator2.next()).done) {
|
|
786
|
-
if (
|
|
788
|
+
if (isValidElement2(step.value)) {
|
|
787
789
|
validateExplicitKey(step.value, parentType);
|
|
788
790
|
}
|
|
789
791
|
}
|
|
@@ -1252,7 +1254,7 @@ function commaNumber(n) {
|
|
|
1252
1254
|
const nf = new Intl.NumberFormat("en-US");
|
|
1253
1255
|
return nf.format(n);
|
|
1254
1256
|
}
|
|
1255
|
-
function capitalize(word) {
|
|
1257
|
+
function capitalize$1(word) {
|
|
1256
1258
|
return word ? word.charAt(0).toUpperCase() + word.slice(1) : "";
|
|
1257
1259
|
}
|
|
1258
1260
|
function getNextScope(prevScopes) {
|
|
@@ -1521,7 +1523,7 @@ function constant(value) {
|
|
|
1521
1523
|
return value;
|
|
1522
1524
|
};
|
|
1523
1525
|
}
|
|
1524
|
-
var defineProperty$
|
|
1526
|
+
var defineProperty$2 = function() {
|
|
1525
1527
|
try {
|
|
1526
1528
|
var func = getNative(Object, "defineProperty");
|
|
1527
1529
|
func({}, "", {});
|
|
@@ -1529,9 +1531,9 @@ var defineProperty$1 = function() {
|
|
|
1529
1531
|
} catch (e) {
|
|
1530
1532
|
}
|
|
1531
1533
|
}();
|
|
1532
|
-
const defineProperty$
|
|
1533
|
-
var baseSetToString = !defineProperty$
|
|
1534
|
-
return defineProperty$
|
|
1534
|
+
const defineProperty$3 = defineProperty$2;
|
|
1535
|
+
var baseSetToString = !defineProperty$3 ? identity : function(func, string) {
|
|
1536
|
+
return defineProperty$3(func, "toString", {
|
|
1535
1537
|
"configurable": true,
|
|
1536
1538
|
"enumerable": false,
|
|
1537
1539
|
"value": constant(string),
|
|
@@ -1586,8 +1588,8 @@ function isIndex(value, length) {
|
|
|
1586
1588
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
1587
1589
|
}
|
|
1588
1590
|
function baseAssignValue(object, key, value) {
|
|
1589
|
-
if (key == "__proto__" && defineProperty$
|
|
1590
|
-
defineProperty$
|
|
1591
|
+
if (key == "__proto__" && defineProperty$3) {
|
|
1592
|
+
defineProperty$3(object, key, {
|
|
1591
1593
|
"configurable": true,
|
|
1592
1594
|
"enumerable": true,
|
|
1593
1595
|
"value": value,
|
|
@@ -2031,10 +2033,10 @@ function get$1(object, path, defaultValue) {
|
|
|
2031
2033
|
var result = object == null ? void 0 : baseGet(object, path);
|
|
2032
2034
|
return result === void 0 ? defaultValue : result;
|
|
2033
2035
|
}
|
|
2034
|
-
function arrayPush(array,
|
|
2035
|
-
var index2 = -1, length =
|
|
2036
|
+
function arrayPush(array, values2) {
|
|
2037
|
+
var index2 = -1, length = values2.length, offset = array.length;
|
|
2036
2038
|
while (++index2 < length) {
|
|
2037
|
-
array[offset + index2] =
|
|
2039
|
+
array[offset + index2] = values2[index2];
|
|
2038
2040
|
}
|
|
2039
2041
|
return array;
|
|
2040
2042
|
}
|
|
@@ -2368,11 +2370,11 @@ function setCacheAdd(value) {
|
|
|
2368
2370
|
function setCacheHas(value) {
|
|
2369
2371
|
return this.__data__.has(value);
|
|
2370
2372
|
}
|
|
2371
|
-
function SetCache(
|
|
2372
|
-
var index2 = -1, length =
|
|
2373
|
+
function SetCache(values2) {
|
|
2374
|
+
var index2 = -1, length = values2 == null ? 0 : values2.length;
|
|
2373
2375
|
this.__data__ = new MapCache();
|
|
2374
2376
|
while (++index2 < length) {
|
|
2375
|
-
this.add(
|
|
2377
|
+
this.add(values2[index2]);
|
|
2376
2378
|
}
|
|
2377
2379
|
}
|
|
2378
2380
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
@@ -2752,21 +2754,21 @@ function arrayIncludesWith(array, value, comparator2) {
|
|
|
2752
2754
|
return false;
|
|
2753
2755
|
}
|
|
2754
2756
|
var LARGE_ARRAY_SIZE$1 = 200;
|
|
2755
|
-
function baseDifference(array,
|
|
2756
|
-
var index2 = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength =
|
|
2757
|
+
function baseDifference(array, values2, iteratee, comparator2) {
|
|
2758
|
+
var index2 = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values2.length;
|
|
2757
2759
|
if (!length) {
|
|
2758
2760
|
return result;
|
|
2759
2761
|
}
|
|
2760
2762
|
if (iteratee) {
|
|
2761
|
-
|
|
2763
|
+
values2 = arrayMap(values2, baseUnary(iteratee));
|
|
2762
2764
|
}
|
|
2763
2765
|
if (comparator2) {
|
|
2764
2766
|
includes = arrayIncludesWith;
|
|
2765
2767
|
isCommon = false;
|
|
2766
|
-
} else if (
|
|
2768
|
+
} else if (values2.length >= LARGE_ARRAY_SIZE$1) {
|
|
2767
2769
|
includes = cacheHas;
|
|
2768
2770
|
isCommon = false;
|
|
2769
|
-
|
|
2771
|
+
values2 = new SetCache(values2);
|
|
2770
2772
|
}
|
|
2771
2773
|
outer:
|
|
2772
2774
|
while (++index2 < length) {
|
|
@@ -2775,19 +2777,19 @@ function baseDifference(array, values, iteratee, comparator2) {
|
|
|
2775
2777
|
if (isCommon && computed === computed) {
|
|
2776
2778
|
var valuesIndex = valuesLength;
|
|
2777
2779
|
while (valuesIndex--) {
|
|
2778
|
-
if (
|
|
2780
|
+
if (values2[valuesIndex] === computed) {
|
|
2779
2781
|
continue outer;
|
|
2780
2782
|
}
|
|
2781
2783
|
}
|
|
2782
2784
|
result.push(value);
|
|
2783
|
-
} else if (!includes(
|
|
2785
|
+
} else if (!includes(values2, computed, comparator2)) {
|
|
2784
2786
|
result.push(value);
|
|
2785
2787
|
}
|
|
2786
2788
|
}
|
|
2787
2789
|
return result;
|
|
2788
2790
|
}
|
|
2789
|
-
var difference = baseRest(function(array,
|
|
2790
|
-
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(
|
|
2791
|
+
var difference = baseRest(function(array, values2) {
|
|
2792
|
+
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : [];
|
|
2791
2793
|
});
|
|
2792
2794
|
const difference$1 = difference;
|
|
2793
2795
|
function arrayEvery(array, predicate) {
|
|
@@ -2818,8 +2820,8 @@ function isEqual(value, other) {
|
|
|
2818
2820
|
return baseIsEqual(value, other);
|
|
2819
2821
|
}
|
|
2820
2822
|
var INFINITY = 1 / 0;
|
|
2821
|
-
var createSet = !(Set$2 && 1 / setToArray(new Set$2([, -0]))[1] == INFINITY) ? noop : function(
|
|
2822
|
-
return new Set$2(
|
|
2823
|
+
var createSet = !(Set$2 && 1 / setToArray(new Set$2([, -0]))[1] == INFINITY) ? noop : function(values2) {
|
|
2824
|
+
return new Set$2(values2);
|
|
2823
2825
|
};
|
|
2824
2826
|
const createSet$1 = createSet;
|
|
2825
2827
|
var LARGE_ARRAY_SIZE = 200;
|
|
@@ -6584,9 +6586,9 @@ ZodLiteral.create = (value, params) => {
|
|
|
6584
6586
|
...processCreateParams(params)
|
|
6585
6587
|
});
|
|
6586
6588
|
};
|
|
6587
|
-
function createZodEnum(
|
|
6589
|
+
function createZodEnum(values2, params) {
|
|
6588
6590
|
return new ZodEnum({
|
|
6589
|
-
values,
|
|
6591
|
+
values: values2,
|
|
6590
6592
|
typeName: ZodFirstPartyTypeKind.ZodEnum,
|
|
6591
6593
|
...processCreateParams(params)
|
|
6592
6594
|
});
|
|
@@ -6639,11 +6641,11 @@ class ZodEnum extends ZodType {
|
|
|
6639
6641
|
}
|
|
6640
6642
|
return enumValues;
|
|
6641
6643
|
}
|
|
6642
|
-
extract(
|
|
6643
|
-
return ZodEnum.create(
|
|
6644
|
+
extract(values2) {
|
|
6645
|
+
return ZodEnum.create(values2);
|
|
6644
6646
|
}
|
|
6645
|
-
exclude(
|
|
6646
|
-
return ZodEnum.create(this.options.filter((opt) => !
|
|
6647
|
+
exclude(values2) {
|
|
6648
|
+
return ZodEnum.create(this.options.filter((opt) => !values2.includes(opt)));
|
|
6647
6649
|
}
|
|
6648
6650
|
}
|
|
6649
6651
|
ZodEnum.create = createZodEnum;
|
|
@@ -6675,9 +6677,9 @@ class ZodNativeEnum extends ZodType {
|
|
|
6675
6677
|
return this._def.values;
|
|
6676
6678
|
}
|
|
6677
6679
|
}
|
|
6678
|
-
ZodNativeEnum.create = (
|
|
6680
|
+
ZodNativeEnum.create = (values2, params) => {
|
|
6679
6681
|
return new ZodNativeEnum({
|
|
6680
|
-
values,
|
|
6682
|
+
values: values2,
|
|
6681
6683
|
typeName: ZodFirstPartyTypeKind.ZodNativeEnum,
|
|
6682
6684
|
...processCreateParams(params)
|
|
6683
6685
|
});
|
|
@@ -7605,7 +7607,7 @@ function upgradeFrom1_0_0(config) {
|
|
|
7605
7607
|
const { coordinationSpace } = newConfig;
|
|
7606
7608
|
function replaceLayerType(layerType, cSpace) {
|
|
7607
7609
|
const isRaster = layerType === "raster";
|
|
7608
|
-
cSpace[`spatial${capitalize(layerType)}Layer${isRaster ? "s" : ""}`] = {};
|
|
7610
|
+
cSpace[`spatial${capitalize$1(layerType)}Layer${isRaster ? "s" : ""}`] = {};
|
|
7609
7611
|
Object.entries(cSpace.spatialLayers).forEach(([scope, layers]) => {
|
|
7610
7612
|
if (Array.isArray(layers) && layers.find((layer) => layer.type === layerType)) {
|
|
7611
7613
|
const typedLayers = layers.filter((layer) => layer.type === layerType).map((layer) => {
|
|
@@ -7613,9 +7615,9 @@ function upgradeFrom1_0_0(config) {
|
|
|
7613
7615
|
delete newLayer.type;
|
|
7614
7616
|
return newLayer;
|
|
7615
7617
|
});
|
|
7616
|
-
cSpace[`spatial${capitalize(layerType)}Layer${isRaster ? "s" : ""}`][scope] = isRaster ? typedLayers : typedLayers[0];
|
|
7618
|
+
cSpace[`spatial${capitalize$1(layerType)}Layer${isRaster ? "s" : ""}`][scope] = isRaster ? typedLayers : typedLayers[0];
|
|
7617
7619
|
} else {
|
|
7618
|
-
cSpace[`spatial${capitalize(layerType)}Layer${isRaster ? "s" : ""}`][scope] = null;
|
|
7620
|
+
cSpace[`spatial${capitalize$1(layerType)}Layer${isRaster ? "s" : ""}`][scope] = null;
|
|
7619
7621
|
}
|
|
7620
7622
|
});
|
|
7621
7623
|
}
|
|
@@ -7631,7 +7633,7 @@ function upgradeFrom1_0_0(config) {
|
|
|
7631
7633
|
function replaceCoordinationScope(layerType, cScopes) {
|
|
7632
7634
|
const isRaster = layerType === "raster";
|
|
7633
7635
|
if (["spatial", "layerController"].includes(newComponent.component) || newComponent.component === "description" && isRaster) {
|
|
7634
|
-
cScopes[`spatial${capitalize(layerType)}Layer${isRaster ? "s" : ""}`] = cScopes.spatialLayers;
|
|
7636
|
+
cScopes[`spatial${capitalize$1(layerType)}Layer${isRaster ? "s" : ""}`] = cScopes.spatialLayers;
|
|
7635
7637
|
}
|
|
7636
7638
|
}
|
|
7637
7639
|
if (newComponent.coordinationScopes && newComponent.coordinationScopes.spatialLayers) {
|
|
@@ -10193,6 +10195,10 @@ const FileType$1 = {
|
|
|
10193
10195
|
ANNDATA_EXPRESSION_MATRIX_ZARR: "anndata-expression-matrix.zarr"
|
|
10194
10196
|
};
|
|
10195
10197
|
const CoordinationType$1 = {
|
|
10198
|
+
// Meta coordination scopes
|
|
10199
|
+
META_COORDINATION_SCOPES: "metaCoordinationScopes",
|
|
10200
|
+
META_COORDINATION_SCOPES_BY: "metaCoordinationScopesBy",
|
|
10201
|
+
// Other coordination scopes
|
|
10196
10202
|
DATASET: "dataset",
|
|
10197
10203
|
// Entity types
|
|
10198
10204
|
OBS_TYPE: "obsType",
|
|
@@ -15796,7 +15802,7 @@ var json2csv_umd = { exports: {} };
|
|
|
15796
15802
|
return _assertThisInitialized2(self2);
|
|
15797
15803
|
}
|
|
15798
15804
|
function _toArray(arr) {
|
|
15799
|
-
return
|
|
15805
|
+
return _arrayWithHoles2(arr) || _iterableToArray2(arr) || _nonIterableRest2();
|
|
15800
15806
|
}
|
|
15801
15807
|
function _toConsumableArray2(arr) {
|
|
15802
15808
|
return _arrayWithoutHoles2(arr) || _iterableToArray2(arr) || _nonIterableSpread2();
|
|
@@ -15808,7 +15814,7 @@ var json2csv_umd = { exports: {} };
|
|
|
15808
15814
|
return arr2;
|
|
15809
15815
|
}
|
|
15810
15816
|
}
|
|
15811
|
-
function
|
|
15817
|
+
function _arrayWithHoles2(arr) {
|
|
15812
15818
|
if (Array.isArray(arr))
|
|
15813
15819
|
return arr;
|
|
15814
15820
|
}
|
|
@@ -15819,7 +15825,7 @@ var json2csv_umd = { exports: {} };
|
|
|
15819
15825
|
function _nonIterableSpread2() {
|
|
15820
15826
|
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
15821
15827
|
}
|
|
15822
|
-
function
|
|
15828
|
+
function _nonIterableRest2() {
|
|
15823
15829
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
15824
15830
|
}
|
|
15825
15831
|
var _endianness;
|
|
@@ -16185,7 +16191,7 @@ var json2csv_umd = { exports: {} };
|
|
|
16185
16191
|
return result === void 0 ? defaultValue : result;
|
|
16186
16192
|
}
|
|
16187
16193
|
var lodash_get = get3;
|
|
16188
|
-
function
|
|
16194
|
+
function getProp2(obj, path, defaultValue) {
|
|
16189
16195
|
return obj[path] === void 0 ? defaultValue : obj[path];
|
|
16190
16196
|
}
|
|
16191
16197
|
function setProp(obj, path, value) {
|
|
@@ -16232,7 +16238,7 @@ var json2csv_umd = { exports: {} };
|
|
|
16232
16238
|
}, "");
|
|
16233
16239
|
}
|
|
16234
16240
|
var utils = {
|
|
16235
|
-
getProp,
|
|
16241
|
+
getProp: getProp2,
|
|
16236
16242
|
setProp,
|
|
16237
16243
|
unsetProp,
|
|
16238
16244
|
fastJoin,
|
|
@@ -17339,19 +17345,19 @@ function rgbSpline(spline) {
|
|
|
17339
17345
|
return (t2) => [r2(t2), g(t2), b(t2)];
|
|
17340
17346
|
};
|
|
17341
17347
|
}
|
|
17342
|
-
function basis(
|
|
17348
|
+
function basis(values2) {
|
|
17343
17349
|
function innerBasis(t1, v0, v1, v2, v3) {
|
|
17344
17350
|
const t2 = t1 * t1;
|
|
17345
17351
|
const t3 = t2 * t1;
|
|
17346
17352
|
return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;
|
|
17347
17353
|
}
|
|
17348
|
-
const n =
|
|
17354
|
+
const n = values2.length - 1;
|
|
17349
17355
|
return (t2) => {
|
|
17350
17356
|
const i = t2 <= 0 ? t2 = 0 : t2 >= 1 ? (t2 = 1, n - 1) : Math.floor(t2 * n);
|
|
17351
|
-
const v1 =
|
|
17352
|
-
const v2 =
|
|
17353
|
-
const v0 = i > 0 ?
|
|
17354
|
-
const v3 = i < n - 1 ?
|
|
17357
|
+
const v1 = values2[i];
|
|
17358
|
+
const v2 = values2[i + 1];
|
|
17359
|
+
const v0 = i > 0 ? values2[i - 1] : 2 * v1 - v2;
|
|
17360
|
+
const v3 = i < n - 1 ? values2[i + 2] : 2 * v2 - v1;
|
|
17355
17361
|
return innerBasis((t2 - i / n) * n, v0, v1, v2, v3);
|
|
17356
17362
|
};
|
|
17357
17363
|
}
|
|
@@ -17486,6 +17492,11 @@ var grey = {
|
|
|
17486
17492
|
A700: "#616161"
|
|
17487
17493
|
};
|
|
17488
17494
|
const grey$1 = grey;
|
|
17495
|
+
function chainPropTypes(propType1, propType2) {
|
|
17496
|
+
return function validate() {
|
|
17497
|
+
return propType1.apply(void 0, arguments) || propType2.apply(void 0, arguments);
|
|
17498
|
+
};
|
|
17499
|
+
}
|
|
17489
17500
|
function _extends$2() {
|
|
17490
17501
|
_extends$2 = Object.assign ? Object.assign.bind() : function(target) {
|
|
17491
17502
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -17531,7 +17542,7 @@ function deepmerge(target, source) {
|
|
|
17531
17542
|
return output;
|
|
17532
17543
|
}
|
|
17533
17544
|
var propTypes = { exports: {} };
|
|
17534
|
-
var reactIs$
|
|
17545
|
+
var reactIs$2 = { exports: {} };
|
|
17535
17546
|
var reactIs_development$1 = {};
|
|
17536
17547
|
/** @license React v16.13.1
|
|
17537
17548
|
* react-is.development.js
|
|
@@ -17689,15 +17700,15 @@ var reactIs_development$1 = {};
|
|
|
17689
17700
|
})();
|
|
17690
17701
|
}
|
|
17691
17702
|
{
|
|
17692
|
-
reactIs$
|
|
17703
|
+
reactIs$2.exports = reactIs_development$1;
|
|
17693
17704
|
}
|
|
17694
|
-
var reactIsExports$1 = reactIs$
|
|
17705
|
+
var reactIsExports$1 = reactIs$2.exports;
|
|
17695
17706
|
/*
|
|
17696
17707
|
object-assign
|
|
17697
17708
|
(c) Sindre Sorhus
|
|
17698
17709
|
@license MIT
|
|
17699
17710
|
*/
|
|
17700
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
17711
|
+
var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
|
|
17701
17712
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
17702
17713
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
17703
17714
|
function toObject(val) {
|
|
@@ -17749,8 +17760,8 @@ var objectAssign = shouldUseNative() ? Object.assign : function(target, source)
|
|
|
17749
17760
|
to[key] = from[key];
|
|
17750
17761
|
}
|
|
17751
17762
|
}
|
|
17752
|
-
if (getOwnPropertySymbols) {
|
|
17753
|
-
symbols = getOwnPropertySymbols(from);
|
|
17763
|
+
if (getOwnPropertySymbols$1) {
|
|
17764
|
+
symbols = getOwnPropertySymbols$1(from);
|
|
17754
17765
|
for (var i = 0; i < symbols.length; i++) {
|
|
17755
17766
|
if (propIsEnumerable.call(from, symbols[i])) {
|
|
17756
17767
|
to[symbols[i]] = from[symbols[i]];
|
|
@@ -17780,7 +17791,7 @@ var printWarning$1 = function() {
|
|
|
17780
17791
|
}
|
|
17781
17792
|
};
|
|
17782
17793
|
}
|
|
17783
|
-
function checkPropTypes$1(typeSpecs,
|
|
17794
|
+
function checkPropTypes$1(typeSpecs, values2, location, componentName, getStack) {
|
|
17784
17795
|
{
|
|
17785
17796
|
for (var typeSpecName in typeSpecs) {
|
|
17786
17797
|
if (has$1(typeSpecs, typeSpecName)) {
|
|
@@ -17793,7 +17804,7 @@ function checkPropTypes$1(typeSpecs, values, location, componentName, getStack)
|
|
|
17793
17804
|
err.name = "Invariant Violation";
|
|
17794
17805
|
throw err;
|
|
17795
17806
|
}
|
|
17796
|
-
error = typeSpecs[typeSpecName](
|
|
17807
|
+
error = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
|
|
17797
17808
|
} catch (ex) {
|
|
17798
17809
|
error = ex;
|
|
17799
17810
|
}
|
|
@@ -17841,7 +17852,7 @@ var printWarning = function() {
|
|
|
17841
17852
|
function emptyFunctionThatReturnsNull() {
|
|
17842
17853
|
return null;
|
|
17843
17854
|
}
|
|
17844
|
-
var factoryWithTypeCheckers = function(
|
|
17855
|
+
var factoryWithTypeCheckers = function(isValidElement2, throwOnDirectAccess) {
|
|
17845
17856
|
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
17846
17857
|
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
17847
17858
|
function getIteratorFn(maybeIterable) {
|
|
@@ -17969,7 +17980,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
17969
17980
|
function createElementTypeChecker() {
|
|
17970
17981
|
function validate(props, propName, componentName, location, propFullName) {
|
|
17971
17982
|
var propValue = props[propName];
|
|
17972
|
-
if (!
|
|
17983
|
+
if (!isValidElement2(propValue)) {
|
|
17973
17984
|
var propType = getPropType(propValue);
|
|
17974
17985
|
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
17975
17986
|
}
|
|
@@ -18157,7 +18168,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
18157
18168
|
if (Array.isArray(propValue)) {
|
|
18158
18169
|
return propValue.every(isNode);
|
|
18159
18170
|
}
|
|
18160
|
-
if (propValue === null ||
|
|
18171
|
+
if (propValue === null || isValidElement2(propValue)) {
|
|
18161
18172
|
return true;
|
|
18162
18173
|
}
|
|
18163
18174
|
var iteratorFn = getIteratorFn(propValue);
|
|
@@ -18262,7 +18273,44 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
18262
18273
|
}
|
|
18263
18274
|
var propTypesExports = propTypes.exports;
|
|
18264
18275
|
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
18265
|
-
function
|
|
18276
|
+
function isClassComponent(elementType) {
|
|
18277
|
+
var _elementType$prototyp = elementType.prototype, prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp;
|
|
18278
|
+
return Boolean(prototype.isReactComponent);
|
|
18279
|
+
}
|
|
18280
|
+
function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {
|
|
18281
|
+
var propValue = props[propName];
|
|
18282
|
+
var safePropName = propFullName || propName;
|
|
18283
|
+
if (propValue == null) {
|
|
18284
|
+
return null;
|
|
18285
|
+
}
|
|
18286
|
+
var warningHint;
|
|
18287
|
+
if (typeof propValue === "function" && !isClassComponent(propValue)) {
|
|
18288
|
+
warningHint = "Did you accidentally provide a plain function component instead?";
|
|
18289
|
+
}
|
|
18290
|
+
if (warningHint !== void 0) {
|
|
18291
|
+
return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an element type that can hold a ref. ".concat(warningHint, " ") + "For more information see https://mui.com/r/caveat-with-refs-guide");
|
|
18292
|
+
}
|
|
18293
|
+
return null;
|
|
18294
|
+
}
|
|
18295
|
+
const elementTypeAcceptingRef$1 = chainPropTypes(propTypesExports.elementType, elementTypeAcceptingRef);
|
|
18296
|
+
function _toPrimitive(input, hint) {
|
|
18297
|
+
if (_typeof$3(input) !== "object" || input === null)
|
|
18298
|
+
return input;
|
|
18299
|
+
var prim = input[Symbol.toPrimitive];
|
|
18300
|
+
if (prim !== void 0) {
|
|
18301
|
+
var res = prim.call(input, hint || "default");
|
|
18302
|
+
if (_typeof$3(res) !== "object")
|
|
18303
|
+
return res;
|
|
18304
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
18305
|
+
}
|
|
18306
|
+
return (hint === "string" ? String : Number)(input);
|
|
18307
|
+
}
|
|
18308
|
+
function _toPropertyKey(arg) {
|
|
18309
|
+
var key = _toPrimitive(arg, "string");
|
|
18310
|
+
return _typeof$3(key) === "symbol" ? key : String(key);
|
|
18311
|
+
}
|
|
18312
|
+
function _defineProperty$1(obj, key, value) {
|
|
18313
|
+
key = _toPropertyKey(key);
|
|
18266
18314
|
if (key in obj) {
|
|
18267
18315
|
Object.defineProperty(obj, key, {
|
|
18268
18316
|
value,
|
|
@@ -18277,7 +18325,7 @@ function _defineProperty(obj, key, value) {
|
|
|
18277
18325
|
}
|
|
18278
18326
|
var specialProperty = "exact-prop: ";
|
|
18279
18327
|
function exactProp(propTypes2) {
|
|
18280
|
-
return _extends$2({}, propTypes2, _defineProperty({}, specialProperty, function(props) {
|
|
18328
|
+
return _extends$2({}, propTypes2, _defineProperty$1({}, specialProperty, function(props) {
|
|
18281
18329
|
var unsupportedProps = Object.keys(props).filter(function(prop) {
|
|
18282
18330
|
return !propTypes2.hasOwnProperty(prop);
|
|
18283
18331
|
});
|
|
@@ -18289,7 +18337,7 @@ function exactProp(propTypes2) {
|
|
|
18289
18337
|
return null;
|
|
18290
18338
|
}));
|
|
18291
18339
|
}
|
|
18292
|
-
var reactIs = { exports: {} };
|
|
18340
|
+
var reactIs$1 = { exports: {} };
|
|
18293
18341
|
var reactIs_development = {};
|
|
18294
18342
|
/** @license React v17.0.2
|
|
18295
18343
|
* react-is.development.js
|
|
@@ -18481,9 +18529,9 @@ var reactIs_development = {};
|
|
|
18481
18529
|
})();
|
|
18482
18530
|
}
|
|
18483
18531
|
{
|
|
18484
|
-
reactIs.exports = reactIs_development;
|
|
18532
|
+
reactIs$1.exports = reactIs_development;
|
|
18485
18533
|
}
|
|
18486
|
-
var reactIsExports = reactIs.exports;
|
|
18534
|
+
var reactIsExports = reactIs$1.exports;
|
|
18487
18535
|
var fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
|
18488
18536
|
function getFunctionName(fn) {
|
|
18489
18537
|
var match = "".concat(fn).match(fnNameMatchRegex);
|
|
@@ -18520,6 +18568,8 @@ function getDisplayName(Component) {
|
|
|
18520
18568
|
}
|
|
18521
18569
|
return void 0;
|
|
18522
18570
|
}
|
|
18571
|
+
var refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);
|
|
18572
|
+
const refType$1 = refType;
|
|
18523
18573
|
function clamp(value) {
|
|
18524
18574
|
var min = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
18525
18575
|
var max = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
|
@@ -18545,10 +18595,10 @@ function hexToRgb(color) {
|
|
|
18545
18595
|
}
|
|
18546
18596
|
function hslToRgb(color) {
|
|
18547
18597
|
color = decomposeColor(color);
|
|
18548
|
-
var _color = color,
|
|
18549
|
-
var h =
|
|
18550
|
-
var s =
|
|
18551
|
-
var l =
|
|
18598
|
+
var _color = color, values2 = _color.values;
|
|
18599
|
+
var h = values2[0];
|
|
18600
|
+
var s = values2[1] / 100;
|
|
18601
|
+
var l = values2[2] / 100;
|
|
18552
18602
|
var a = s * Math.min(l, 1 - l);
|
|
18553
18603
|
var f = function f2(n) {
|
|
18554
18604
|
var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (n + h / 30) % 12;
|
|
@@ -18558,7 +18608,7 @@ function hslToRgb(color) {
|
|
|
18558
18608
|
var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];
|
|
18559
18609
|
if (color.type === "hsla") {
|
|
18560
18610
|
type += "a";
|
|
18561
|
-
rgb.push(
|
|
18611
|
+
rgb.push(values2[3]);
|
|
18562
18612
|
}
|
|
18563
18613
|
return recomposeColor({
|
|
18564
18614
|
type,
|
|
@@ -18577,27 +18627,27 @@ function decomposeColor(color) {
|
|
|
18577
18627
|
if (["rgb", "rgba", "hsl", "hsla"].indexOf(type) === -1) {
|
|
18578
18628
|
throw new Error("Material-UI: Unsupported `".concat(color, "` color.\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."));
|
|
18579
18629
|
}
|
|
18580
|
-
var
|
|
18581
|
-
|
|
18630
|
+
var values2 = color.substring(marker + 1, color.length - 1).split(",");
|
|
18631
|
+
values2 = values2.map(function(value) {
|
|
18582
18632
|
return parseFloat(value);
|
|
18583
18633
|
});
|
|
18584
18634
|
return {
|
|
18585
18635
|
type,
|
|
18586
|
-
values
|
|
18636
|
+
values: values2
|
|
18587
18637
|
};
|
|
18588
18638
|
}
|
|
18589
18639
|
function recomposeColor(color) {
|
|
18590
18640
|
var type = color.type;
|
|
18591
|
-
var
|
|
18641
|
+
var values2 = color.values;
|
|
18592
18642
|
if (type.indexOf("rgb") !== -1) {
|
|
18593
|
-
|
|
18643
|
+
values2 = values2.map(function(n, i) {
|
|
18594
18644
|
return i < 3 ? parseInt(n, 10) : n;
|
|
18595
18645
|
});
|
|
18596
18646
|
} else if (type.indexOf("hsl") !== -1) {
|
|
18597
|
-
|
|
18598
|
-
|
|
18647
|
+
values2[1] = "".concat(values2[1], "%");
|
|
18648
|
+
values2[2] = "".concat(values2[2], "%");
|
|
18599
18649
|
}
|
|
18600
|
-
return "".concat(type, "(").concat(
|
|
18650
|
+
return "".concat(type, "(").concat(values2.join(", "), ")");
|
|
18601
18651
|
}
|
|
18602
18652
|
function getContrastRatio(foreground, background) {
|
|
18603
18653
|
var lumA = getLuminance(foreground);
|
|
@@ -18613,6 +18663,15 @@ function getLuminance(color) {
|
|
|
18613
18663
|
});
|
|
18614
18664
|
return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
|
|
18615
18665
|
}
|
|
18666
|
+
function alpha(color, value) {
|
|
18667
|
+
color = decomposeColor(color);
|
|
18668
|
+
value = clamp(value);
|
|
18669
|
+
if (color.type === "rgb" || color.type === "hsl") {
|
|
18670
|
+
color.type += "a";
|
|
18671
|
+
}
|
|
18672
|
+
color.values[3] = value;
|
|
18673
|
+
return recomposeColor(color);
|
|
18674
|
+
}
|
|
18616
18675
|
function darken(color, coefficient) {
|
|
18617
18676
|
color = decomposeColor(color);
|
|
18618
18677
|
coefficient = clamp(coefficient);
|
|
@@ -18637,6 +18696,19 @@ function lighten(color, coefficient) {
|
|
|
18637
18696
|
}
|
|
18638
18697
|
return recomposeColor(color);
|
|
18639
18698
|
}
|
|
18699
|
+
function _defineProperty(obj, key, value) {
|
|
18700
|
+
if (key in obj) {
|
|
18701
|
+
Object.defineProperty(obj, key, {
|
|
18702
|
+
value,
|
|
18703
|
+
enumerable: true,
|
|
18704
|
+
configurable: true,
|
|
18705
|
+
writable: true
|
|
18706
|
+
});
|
|
18707
|
+
} else {
|
|
18708
|
+
obj[key] = value;
|
|
18709
|
+
}
|
|
18710
|
+
return obj;
|
|
18711
|
+
}
|
|
18640
18712
|
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
18641
18713
|
if (source == null)
|
|
18642
18714
|
return {};
|
|
@@ -18669,9 +18741,23 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
18669
18741
|
}
|
|
18670
18742
|
return target;
|
|
18671
18743
|
}
|
|
18744
|
+
function _extends$1() {
|
|
18745
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
18746
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
18747
|
+
var source = arguments[i];
|
|
18748
|
+
for (var key in source) {
|
|
18749
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
18750
|
+
target[key] = source[key];
|
|
18751
|
+
}
|
|
18752
|
+
}
|
|
18753
|
+
}
|
|
18754
|
+
return target;
|
|
18755
|
+
};
|
|
18756
|
+
return _extends$1.apply(this, arguments);
|
|
18757
|
+
}
|
|
18672
18758
|
var keys = ["xs", "sm", "md", "lg", "xl"];
|
|
18673
18759
|
function createBreakpoints(breakpoints) {
|
|
18674
|
-
var _breakpoints$values = breakpoints.values,
|
|
18760
|
+
var _breakpoints$values = breakpoints.values, values2 = _breakpoints$values === void 0 ? {
|
|
18675
18761
|
xs: 0,
|
|
18676
18762
|
sm: 600,
|
|
18677
18763
|
md: 960,
|
|
@@ -18679,12 +18765,12 @@ function createBreakpoints(breakpoints) {
|
|
|
18679
18765
|
xl: 1920
|
|
18680
18766
|
} : _breakpoints$values, _breakpoints$unit = breakpoints.unit, unit = _breakpoints$unit === void 0 ? "px" : _breakpoints$unit, _breakpoints$step = breakpoints.step, step = _breakpoints$step === void 0 ? 5 : _breakpoints$step, other = _objectWithoutProperties(breakpoints, ["values", "unit", "step"]);
|
|
18681
18767
|
function up(key) {
|
|
18682
|
-
var value = typeof
|
|
18768
|
+
var value = typeof values2[key] === "number" ? values2[key] : key;
|
|
18683
18769
|
return "@media (min-width:".concat(value).concat(unit, ")");
|
|
18684
18770
|
}
|
|
18685
18771
|
function down(key) {
|
|
18686
18772
|
var endIndex = keys.indexOf(key) + 1;
|
|
18687
|
-
var upperbound =
|
|
18773
|
+
var upperbound = values2[keys[endIndex]];
|
|
18688
18774
|
if (endIndex === keys.length) {
|
|
18689
18775
|
return up("xs");
|
|
18690
18776
|
}
|
|
@@ -18696,7 +18782,7 @@ function createBreakpoints(breakpoints) {
|
|
|
18696
18782
|
if (endIndex === keys.length - 1) {
|
|
18697
18783
|
return up(start);
|
|
18698
18784
|
}
|
|
18699
|
-
return "@media (min-width:".concat(typeof
|
|
18785
|
+
return "@media (min-width:".concat(typeof values2[start] === "number" ? values2[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values2[keys[endIndex + 1]] === "number" ? values2[keys[endIndex + 1]] : end) - step / 100).concat(unit, ")");
|
|
18700
18786
|
}
|
|
18701
18787
|
function only(key) {
|
|
18702
18788
|
return between(key, key);
|
|
@@ -18709,11 +18795,11 @@ function createBreakpoints(breakpoints) {
|
|
|
18709
18795
|
console.warn(["Material-UI: The `theme.breakpoints.width` utility is deprecated because it's redundant.", "Use the `theme.breakpoints.values` instead."].join("\n"));
|
|
18710
18796
|
}
|
|
18711
18797
|
}
|
|
18712
|
-
return
|
|
18798
|
+
return values2[key];
|
|
18713
18799
|
}
|
|
18714
|
-
return _extends$
|
|
18800
|
+
return _extends$1({
|
|
18715
18801
|
keys,
|
|
18716
|
-
values,
|
|
18802
|
+
values: values2,
|
|
18717
18803
|
up,
|
|
18718
18804
|
down,
|
|
18719
18805
|
between,
|
|
@@ -18723,17 +18809,17 @@ function createBreakpoints(breakpoints) {
|
|
|
18723
18809
|
}
|
|
18724
18810
|
function createMixins(breakpoints, spacing, mixins) {
|
|
18725
18811
|
var _toolbar;
|
|
18726
|
-
return _extends$
|
|
18812
|
+
return _extends$1({
|
|
18727
18813
|
gutters: function gutters() {
|
|
18728
|
-
var
|
|
18814
|
+
var styles8 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
18729
18815
|
console.warn(["Material-UI: theme.mixins.gutters() is deprecated.", "You can use the source of the mixin directly:", "\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n"));
|
|
18730
|
-
return _extends$
|
|
18816
|
+
return _extends$1({
|
|
18731
18817
|
paddingLeft: spacing(2),
|
|
18732
18818
|
paddingRight: spacing(2)
|
|
18733
|
-
},
|
|
18819
|
+
}, styles8, _defineProperty({}, breakpoints.up("sm"), _extends$1({
|
|
18734
18820
|
paddingLeft: spacing(3),
|
|
18735
18821
|
paddingRight: spacing(3)
|
|
18736
|
-
},
|
|
18822
|
+
}, styles8[breakpoints.up("sm")])));
|
|
18737
18823
|
},
|
|
18738
18824
|
toolbar: (_toolbar = {
|
|
18739
18825
|
minHeight: 56
|
|
@@ -18864,7 +18950,7 @@ function createPalette(palette) {
|
|
|
18864
18950
|
var mainShade = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 500;
|
|
18865
18951
|
var lightShade = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 300;
|
|
18866
18952
|
var darkShade = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 700;
|
|
18867
|
-
color = _extends$
|
|
18953
|
+
color = _extends$1({}, color);
|
|
18868
18954
|
if (!color.main && color[mainShade]) {
|
|
18869
18955
|
color.main = color[mainShade];
|
|
18870
18956
|
}
|
|
@@ -18890,7 +18976,7 @@ function createPalette(palette) {
|
|
|
18890
18976
|
console.error("Material-UI: The palette type `".concat(type, "` is not supported."));
|
|
18891
18977
|
}
|
|
18892
18978
|
}
|
|
18893
|
-
var paletteOutput = deepmerge(_extends$
|
|
18979
|
+
var paletteOutput = deepmerge(_extends$1({
|
|
18894
18980
|
// A collection of common colors.
|
|
18895
18981
|
common: common$1,
|
|
18896
18982
|
// The palette type, can be light or dark.
|
|
@@ -18955,7 +19041,7 @@ function createTypography(palette, typography) {
|
|
|
18955
19041
|
return "".concat(size2 / htmlFontSize * coef, "rem");
|
|
18956
19042
|
};
|
|
18957
19043
|
var buildVariant = function buildVariant2(fontWeight, size2, lineHeight, letterSpacing, casing) {
|
|
18958
|
-
return _extends$
|
|
19044
|
+
return _extends$1({
|
|
18959
19045
|
fontFamily,
|
|
18960
19046
|
fontWeight,
|
|
18961
19047
|
fontSize: pxToRem(size2),
|
|
@@ -18980,7 +19066,7 @@ function createTypography(palette, typography) {
|
|
|
18980
19066
|
caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
|
|
18981
19067
|
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)
|
|
18982
19068
|
};
|
|
18983
|
-
return deepmerge(_extends$
|
|
19069
|
+
return deepmerge(_extends$1({
|
|
18984
19070
|
htmlFontSize,
|
|
18985
19071
|
pxToRem,
|
|
18986
19072
|
round: roundWithDeprecationWarning,
|
|
@@ -19010,6 +19096,87 @@ var shape = {
|
|
|
19010
19096
|
const shape$1 = shape;
|
|
19011
19097
|
var responsivePropType = PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]);
|
|
19012
19098
|
const responsivePropType$1 = responsivePropType;
|
|
19099
|
+
function _arrayLikeToArray$1(arr, len) {
|
|
19100
|
+
if (len == null || len > arr.length)
|
|
19101
|
+
len = arr.length;
|
|
19102
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
19103
|
+
arr2[i] = arr[i];
|
|
19104
|
+
}
|
|
19105
|
+
return arr2;
|
|
19106
|
+
}
|
|
19107
|
+
function _arrayWithoutHoles$1(arr) {
|
|
19108
|
+
if (Array.isArray(arr))
|
|
19109
|
+
return _arrayLikeToArray$1(arr);
|
|
19110
|
+
}
|
|
19111
|
+
function _iterableToArray$1(iter) {
|
|
19112
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
19113
|
+
return Array.from(iter);
|
|
19114
|
+
}
|
|
19115
|
+
function _unsupportedIterableToArray$1(o, minLen) {
|
|
19116
|
+
if (!o)
|
|
19117
|
+
return;
|
|
19118
|
+
if (typeof o === "string")
|
|
19119
|
+
return _arrayLikeToArray$1(o, minLen);
|
|
19120
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
19121
|
+
if (n === "Object" && o.constructor)
|
|
19122
|
+
n = o.constructor.name;
|
|
19123
|
+
if (n === "Map" || n === "Set")
|
|
19124
|
+
return Array.from(o);
|
|
19125
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
19126
|
+
return _arrayLikeToArray$1(o, minLen);
|
|
19127
|
+
}
|
|
19128
|
+
function _nonIterableSpread$1() {
|
|
19129
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19130
|
+
}
|
|
19131
|
+
function _toConsumableArray$1(arr) {
|
|
19132
|
+
return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1();
|
|
19133
|
+
}
|
|
19134
|
+
function _typeof$2(obj) {
|
|
19135
|
+
"@babel/helpers - typeof";
|
|
19136
|
+
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
19137
|
+
return typeof obj2;
|
|
19138
|
+
} : function(obj2) {
|
|
19139
|
+
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
19140
|
+
}, _typeof$2(obj);
|
|
19141
|
+
}
|
|
19142
|
+
function _arrayWithHoles(arr) {
|
|
19143
|
+
if (Array.isArray(arr))
|
|
19144
|
+
return arr;
|
|
19145
|
+
}
|
|
19146
|
+
function _iterableToArrayLimit(arr, i) {
|
|
19147
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
19148
|
+
if (_i == null)
|
|
19149
|
+
return;
|
|
19150
|
+
var _arr = [];
|
|
19151
|
+
var _n = true;
|
|
19152
|
+
var _d = false;
|
|
19153
|
+
var _s, _e;
|
|
19154
|
+
try {
|
|
19155
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
19156
|
+
_arr.push(_s.value);
|
|
19157
|
+
if (i && _arr.length === i)
|
|
19158
|
+
break;
|
|
19159
|
+
}
|
|
19160
|
+
} catch (err) {
|
|
19161
|
+
_d = true;
|
|
19162
|
+
_e = err;
|
|
19163
|
+
} finally {
|
|
19164
|
+
try {
|
|
19165
|
+
if (!_n && _i["return"] != null)
|
|
19166
|
+
_i["return"]();
|
|
19167
|
+
} finally {
|
|
19168
|
+
if (_d)
|
|
19169
|
+
throw _e;
|
|
19170
|
+
}
|
|
19171
|
+
}
|
|
19172
|
+
return _arr;
|
|
19173
|
+
}
|
|
19174
|
+
function _nonIterableRest() {
|
|
19175
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19176
|
+
}
|
|
19177
|
+
function _slicedToArray(arr, i) {
|
|
19178
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
|
|
19179
|
+
}
|
|
19013
19180
|
var spacingKeys = ["m", "mt", "mr", "mb", "ml", "mx", "my", "p", "pt", "pr", "pb", "pl", "px", "py", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY"];
|
|
19014
19181
|
function createUnarySpacing(theme) {
|
|
19015
19182
|
var themeSpacing = theme.spacing || 8;
|
|
@@ -19263,6 +19430,20 @@ function createGenerateClassName() {
|
|
|
19263
19430
|
return "".concat(seedPrefix).concat(suffix);
|
|
19264
19431
|
};
|
|
19265
19432
|
}
|
|
19433
|
+
function getThemeProps(params) {
|
|
19434
|
+
var theme = params.theme, name = params.name, props = params.props;
|
|
19435
|
+
if (!theme || !theme.props || !theme.props[name]) {
|
|
19436
|
+
return props;
|
|
19437
|
+
}
|
|
19438
|
+
var defaultProps2 = theme.props[name];
|
|
19439
|
+
var propName;
|
|
19440
|
+
for (propName in defaultProps2) {
|
|
19441
|
+
if (props[propName] === void 0) {
|
|
19442
|
+
props[propName] = defaultProps2[propName];
|
|
19443
|
+
}
|
|
19444
|
+
}
|
|
19445
|
+
return props;
|
|
19446
|
+
}
|
|
19266
19447
|
var isProduction = false;
|
|
19267
19448
|
function warning(condition, message) {
|
|
19268
19449
|
if (!isProduction) {
|
|
@@ -19279,50 +19460,12 @@ function warning(condition, message) {
|
|
|
19279
19460
|
}
|
|
19280
19461
|
}
|
|
19281
19462
|
}
|
|
19282
|
-
|
|
19283
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
19284
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
19285
|
-
var source = arguments[i];
|
|
19286
|
-
for (var key in source) {
|
|
19287
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
19288
|
-
target[key] = source[key];
|
|
19289
|
-
}
|
|
19290
|
-
}
|
|
19291
|
-
}
|
|
19292
|
-
return target;
|
|
19293
|
-
};
|
|
19294
|
-
return _extends$1.apply(this, arguments);
|
|
19295
|
-
}
|
|
19296
|
-
var _typeof$2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
19463
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
19297
19464
|
return typeof obj;
|
|
19298
19465
|
} : function(obj) {
|
|
19299
19466
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
19300
19467
|
};
|
|
19301
|
-
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$
|
|
19302
|
-
function _typeof$1(obj) {
|
|
19303
|
-
"@babel/helpers - typeof";
|
|
19304
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
19305
|
-
return typeof obj2;
|
|
19306
|
-
} : function(obj2) {
|
|
19307
|
-
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
19308
|
-
}, _typeof$1(obj);
|
|
19309
|
-
}
|
|
19310
|
-
function _toPrimitive(input, hint) {
|
|
19311
|
-
if (_typeof$1(input) !== "object" || input === null)
|
|
19312
|
-
return input;
|
|
19313
|
-
var prim = input[Symbol.toPrimitive];
|
|
19314
|
-
if (prim !== void 0) {
|
|
19315
|
-
var res = prim.call(input, hint || "default");
|
|
19316
|
-
if (_typeof$1(res) !== "object")
|
|
19317
|
-
return res;
|
|
19318
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
19319
|
-
}
|
|
19320
|
-
return (hint === "string" ? String : Number)(input);
|
|
19321
|
-
}
|
|
19322
|
-
function _toPropertyKey(arg) {
|
|
19323
|
-
var key = _toPrimitive(arg, "string");
|
|
19324
|
-
return _typeof$1(key) === "symbol" ? key : String(key);
|
|
19325
|
-
}
|
|
19468
|
+
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === "object" && document.nodeType === 9;
|
|
19326
19469
|
function _defineProperties(target, props) {
|
|
19327
19470
|
for (var i = 0; i < props.length; i++) {
|
|
19328
19471
|
var descriptor = props[i];
|
|
@@ -19343,19 +19486,19 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
19343
19486
|
});
|
|
19344
19487
|
return Constructor;
|
|
19345
19488
|
}
|
|
19346
|
-
function _setPrototypeOf(o, p) {
|
|
19347
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
19489
|
+
function _setPrototypeOf$1(o, p) {
|
|
19490
|
+
_setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
19348
19491
|
o2.__proto__ = p2;
|
|
19349
19492
|
return o2;
|
|
19350
19493
|
};
|
|
19351
|
-
return _setPrototypeOf(o, p);
|
|
19494
|
+
return _setPrototypeOf$1(o, p);
|
|
19352
19495
|
}
|
|
19353
|
-
function _inheritsLoose(subClass, superClass) {
|
|
19496
|
+
function _inheritsLoose$1(subClass, superClass) {
|
|
19354
19497
|
subClass.prototype = Object.create(superClass.prototype);
|
|
19355
19498
|
subClass.prototype.constructor = subClass;
|
|
19356
|
-
_setPrototypeOf(subClass, superClass);
|
|
19499
|
+
_setPrototypeOf$1(subClass, superClass);
|
|
19357
19500
|
}
|
|
19358
|
-
function _assertThisInitialized(self2) {
|
|
19501
|
+
function _assertThisInitialized$1(self2) {
|
|
19359
19502
|
if (self2 === void 0) {
|
|
19360
19503
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19361
19504
|
}
|
|
@@ -19562,7 +19705,7 @@ var BaseStyleRule = /* @__PURE__ */ function() {
|
|
|
19562
19705
|
return BaseStyleRule2;
|
|
19563
19706
|
}();
|
|
19564
19707
|
var StyleRule = /* @__PURE__ */ function(_BaseStyleRule) {
|
|
19565
|
-
_inheritsLoose(StyleRule2, _BaseStyleRule);
|
|
19708
|
+
_inheritsLoose$1(StyleRule2, _BaseStyleRule);
|
|
19566
19709
|
function StyleRule2(key, style, options) {
|
|
19567
19710
|
var _this;
|
|
19568
19711
|
_this = _BaseStyleRule.call(this, key, style, options) || this;
|
|
@@ -19570,7 +19713,7 @@ var StyleRule = /* @__PURE__ */ function(_BaseStyleRule) {
|
|
|
19570
19713
|
if (selector) {
|
|
19571
19714
|
_this.selectorText = selector;
|
|
19572
19715
|
} else if (scoped !== false) {
|
|
19573
|
-
_this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);
|
|
19716
|
+
_this.id = generateId(_assertThisInitialized$1(_assertThisInitialized$1(_this)), sheet);
|
|
19574
19717
|
_this.selectorText = "." + escape(_this.id);
|
|
19575
19718
|
}
|
|
19576
19719
|
return _this;
|
|
@@ -19600,7 +19743,7 @@ var StyleRule = /* @__PURE__ */ function(_BaseStyleRule) {
|
|
|
19600
19743
|
_proto2.toString = function toString2(options) {
|
|
19601
19744
|
var sheet = this.options.sheet;
|
|
19602
19745
|
var link = sheet ? sheet.options.link : false;
|
|
19603
|
-
var opts2 = link ? _extends$
|
|
19746
|
+
var opts2 = link ? _extends$2({}, options, {
|
|
19604
19747
|
allowEmpty: true
|
|
19605
19748
|
}) : options;
|
|
19606
19749
|
return toCss(this.selectorText, this.style, opts2);
|
|
@@ -19639,7 +19782,7 @@ var defaultToStringOptions = {
|
|
|
19639
19782
|
};
|
|
19640
19783
|
var atRegExp = /@([\w-]+)/;
|
|
19641
19784
|
var ConditionalRule = /* @__PURE__ */ function() {
|
|
19642
|
-
function ConditionalRule2(key,
|
|
19785
|
+
function ConditionalRule2(key, styles8, options) {
|
|
19643
19786
|
this.type = "conditional";
|
|
19644
19787
|
this.isProcessed = false;
|
|
19645
19788
|
this.key = key;
|
|
@@ -19647,11 +19790,11 @@ var ConditionalRule = /* @__PURE__ */ function() {
|
|
|
19647
19790
|
this.at = atMatch ? atMatch[1] : "unknown";
|
|
19648
19791
|
this.query = options.name || "@" + this.at;
|
|
19649
19792
|
this.options = options;
|
|
19650
|
-
this.rules = new RuleList(_extends$
|
|
19793
|
+
this.rules = new RuleList(_extends$2({}, options, {
|
|
19651
19794
|
parent: this
|
|
19652
19795
|
}));
|
|
19653
|
-
for (var name in
|
|
19654
|
-
this.rules.add(name,
|
|
19796
|
+
for (var name in styles8) {
|
|
19797
|
+
this.rules.add(name, styles8[name]);
|
|
19655
19798
|
}
|
|
19656
19799
|
this.rules.process();
|
|
19657
19800
|
}
|
|
@@ -19694,8 +19837,8 @@ var ConditionalRule = /* @__PURE__ */ function() {
|
|
|
19694
19837
|
}();
|
|
19695
19838
|
var keyRegExp = /@media|@supports\s+/;
|
|
19696
19839
|
var pluginConditionalRule = {
|
|
19697
|
-
onCreateRule: function onCreateRule2(key,
|
|
19698
|
-
return keyRegExp.test(key) ? new ConditionalRule(key,
|
|
19840
|
+
onCreateRule: function onCreateRule2(key, styles8, options) {
|
|
19841
|
+
return keyRegExp.test(key) ? new ConditionalRule(key, styles8, options) : null;
|
|
19699
19842
|
}
|
|
19700
19843
|
};
|
|
19701
19844
|
var defaultToStringOptions$1 = {
|
|
@@ -19719,11 +19862,11 @@ var KeyframesRule = /* @__PURE__ */ function() {
|
|
|
19719
19862
|
this.options = options;
|
|
19720
19863
|
var scoped = options.scoped, sheet = options.sheet, generateId = options.generateId;
|
|
19721
19864
|
this.id = scoped === false ? this.name : escape(generateId(this, sheet));
|
|
19722
|
-
this.rules = new RuleList(_extends$
|
|
19865
|
+
this.rules = new RuleList(_extends$2({}, options, {
|
|
19723
19866
|
parent: this
|
|
19724
19867
|
}));
|
|
19725
19868
|
for (var name in frames) {
|
|
19726
|
-
this.rules.add(name, frames[name], _extends$
|
|
19869
|
+
this.rules.add(name, frames[name], _extends$2({}, options, {
|
|
19727
19870
|
parent: this
|
|
19728
19871
|
}));
|
|
19729
19872
|
}
|
|
@@ -19800,7 +19943,7 @@ var pluginKeyframesRule = {
|
|
|
19800
19943
|
}
|
|
19801
19944
|
};
|
|
19802
19945
|
var KeyframeRule = /* @__PURE__ */ function(_BaseStyleRule) {
|
|
19803
|
-
_inheritsLoose(KeyframeRule2, _BaseStyleRule);
|
|
19946
|
+
_inheritsLoose$1(KeyframeRule2, _BaseStyleRule);
|
|
19804
19947
|
function KeyframeRule2() {
|
|
19805
19948
|
return _BaseStyleRule.apply(this, arguments) || this;
|
|
19806
19949
|
}
|
|
@@ -19808,7 +19951,7 @@ var KeyframeRule = /* @__PURE__ */ function(_BaseStyleRule) {
|
|
|
19808
19951
|
_proto.toString = function toString2(options) {
|
|
19809
19952
|
var sheet = this.options.sheet;
|
|
19810
19953
|
var link = sheet ? sheet.options.link : false;
|
|
19811
|
-
var opts2 = link ? _extends$
|
|
19954
|
+
var opts2 = link ? _extends$2({}, options, {
|
|
19812
19955
|
allowEmpty: true
|
|
19813
19956
|
}) : options;
|
|
19814
19957
|
return toCss(this.key, this.style, opts2);
|
|
@@ -19932,7 +20075,7 @@ var RuleList = /* @__PURE__ */ function() {
|
|
|
19932
20075
|
var _proto = RuleList2.prototype;
|
|
19933
20076
|
_proto.add = function add(name, decl, ruleOptions) {
|
|
19934
20077
|
var _this$options = this.options, parent = _this$options.parent, sheet = _this$options.sheet, jss2 = _this$options.jss, Renderer = _this$options.Renderer, generateId = _this$options.generateId, scoped = _this$options.scoped;
|
|
19935
|
-
var options = _extends$
|
|
20078
|
+
var options = _extends$2({
|
|
19936
20079
|
classes: this.classes,
|
|
19937
20080
|
parent,
|
|
19938
20081
|
sheet,
|
|
@@ -19968,7 +20111,7 @@ var RuleList = /* @__PURE__ */ function() {
|
|
|
19968
20111
|
}
|
|
19969
20112
|
var options = ruleOptions;
|
|
19970
20113
|
if (oldIndex !== -1)
|
|
19971
|
-
options = _extends$
|
|
20114
|
+
options = _extends$2({}, ruleOptions, {
|
|
19972
20115
|
index: oldIndex
|
|
19973
20116
|
});
|
|
19974
20117
|
return this.add(name, decl, options);
|
|
@@ -20076,12 +20219,12 @@ var RuleList = /* @__PURE__ */ function() {
|
|
|
20076
20219
|
return RuleList2;
|
|
20077
20220
|
}();
|
|
20078
20221
|
var StyleSheet = /* @__PURE__ */ function() {
|
|
20079
|
-
function StyleSheet2(
|
|
20222
|
+
function StyleSheet2(styles8, options) {
|
|
20080
20223
|
this.attached = false;
|
|
20081
20224
|
this.deployed = false;
|
|
20082
20225
|
this.classes = {};
|
|
20083
20226
|
this.keyframes = {};
|
|
20084
|
-
this.options = _extends$
|
|
20227
|
+
this.options = _extends$2({}, options, {
|
|
20085
20228
|
sheet: this,
|
|
20086
20229
|
parent: this,
|
|
20087
20230
|
classes: this.classes,
|
|
@@ -20091,8 +20234,8 @@ var StyleSheet = /* @__PURE__ */ function() {
|
|
|
20091
20234
|
this.renderer = new options.Renderer(this);
|
|
20092
20235
|
}
|
|
20093
20236
|
this.rules = new RuleList(this.options);
|
|
20094
|
-
for (var name in
|
|
20095
|
-
this.rules.add(name,
|
|
20237
|
+
for (var name in styles8) {
|
|
20238
|
+
this.rules.add(name, styles8[name]);
|
|
20096
20239
|
}
|
|
20097
20240
|
this.rules.process();
|
|
20098
20241
|
}
|
|
@@ -20168,10 +20311,10 @@ var StyleSheet = /* @__PURE__ */ function() {
|
|
|
20168
20311
|
this.renderer.insertRule(rule);
|
|
20169
20312
|
}
|
|
20170
20313
|
};
|
|
20171
|
-
_proto.addRules = function addRules(
|
|
20314
|
+
_proto.addRules = function addRules(styles8, options) {
|
|
20172
20315
|
var added = [];
|
|
20173
|
-
for (var name in
|
|
20174
|
-
var rule = this.addRule(name,
|
|
20316
|
+
for (var name in styles8) {
|
|
20317
|
+
var rule = this.addRule(name, styles8[name], options);
|
|
20175
20318
|
if (rule)
|
|
20176
20319
|
added.push(rule);
|
|
20177
20320
|
}
|
|
@@ -20700,7 +20843,7 @@ var Jss = /* @__PURE__ */ function() {
|
|
|
20700
20843
|
this.options.createGenerateId = options.createGenerateId;
|
|
20701
20844
|
}
|
|
20702
20845
|
if (options.id) {
|
|
20703
|
-
this.options.id = _extends$
|
|
20846
|
+
this.options.id = _extends$2({}, this.options.id, options.id);
|
|
20704
20847
|
}
|
|
20705
20848
|
if (options.createGenerateId || options.id) {
|
|
20706
20849
|
this.generateId = this.options.createGenerateId(this.options.id);
|
|
@@ -20714,7 +20857,7 @@ var Jss = /* @__PURE__ */ function() {
|
|
|
20714
20857
|
this.use.apply(this, options.plugins);
|
|
20715
20858
|
return this;
|
|
20716
20859
|
};
|
|
20717
|
-
_proto.createStyleSheet = function createStyleSheet(
|
|
20860
|
+
_proto.createStyleSheet = function createStyleSheet(styles8, options) {
|
|
20718
20861
|
if (options === void 0) {
|
|
20719
20862
|
options = {};
|
|
20720
20863
|
}
|
|
@@ -20722,7 +20865,7 @@ var Jss = /* @__PURE__ */ function() {
|
|
|
20722
20865
|
if (typeof index2 !== "number") {
|
|
20723
20866
|
index2 = sheets.index === 0 ? 0 : sheets.index + 1;
|
|
20724
20867
|
}
|
|
20725
|
-
var sheet = new StyleSheet(
|
|
20868
|
+
var sheet = new StyleSheet(styles8, _extends$2({}, options, {
|
|
20726
20869
|
jss: this,
|
|
20727
20870
|
generateId: options.generateId || this.generateId,
|
|
20728
20871
|
insertionPoint: this.options.insertionPoint,
|
|
@@ -20747,7 +20890,7 @@ var Jss = /* @__PURE__ */ function() {
|
|
|
20747
20890
|
if (typeof name === "object") {
|
|
20748
20891
|
return this.createRule(void 0, name, style);
|
|
20749
20892
|
}
|
|
20750
|
-
var ruleOptions = _extends$
|
|
20893
|
+
var ruleOptions = _extends$2({}, options, {
|
|
20751
20894
|
name,
|
|
20752
20895
|
jss: this,
|
|
20753
20896
|
Renderer: this.options.Renderer
|
|
@@ -20779,10 +20922,10 @@ var createJss = function createJss2(options) {
|
|
|
20779
20922
|
return new Jss(options);
|
|
20780
20923
|
};
|
|
20781
20924
|
var hasCSSTOMSupport = typeof CSS === "object" && CSS != null && "number" in CSS;
|
|
20782
|
-
function getDynamicStyles(
|
|
20925
|
+
function getDynamicStyles(styles8) {
|
|
20783
20926
|
var to = null;
|
|
20784
|
-
for (var key in
|
|
20785
|
-
var value =
|
|
20927
|
+
for (var key in styles8) {
|
|
20928
|
+
var value = styles8[key];
|
|
20786
20929
|
var type = typeof value;
|
|
20787
20930
|
if (type === "function") {
|
|
20788
20931
|
if (!to)
|
|
@@ -20852,17 +20995,17 @@ const functions = functionPlugin;
|
|
|
20852
20995
|
var at = "@global";
|
|
20853
20996
|
var atPrefix = "@global ";
|
|
20854
20997
|
var GlobalContainerRule = /* @__PURE__ */ function() {
|
|
20855
|
-
function GlobalContainerRule2(key,
|
|
20998
|
+
function GlobalContainerRule2(key, styles8, options) {
|
|
20856
20999
|
this.type = "global";
|
|
20857
21000
|
this.at = at;
|
|
20858
21001
|
this.isProcessed = false;
|
|
20859
21002
|
this.key = key;
|
|
20860
21003
|
this.options = options;
|
|
20861
|
-
this.rules = new RuleList(_extends$
|
|
21004
|
+
this.rules = new RuleList(_extends$1({}, options, {
|
|
20862
21005
|
parent: this
|
|
20863
21006
|
}));
|
|
20864
|
-
for (var selector in
|
|
20865
|
-
this.rules.add(selector,
|
|
21007
|
+
for (var selector in styles8) {
|
|
21008
|
+
this.rules.add(selector, styles8[selector]);
|
|
20866
21009
|
}
|
|
20867
21010
|
this.rules.process();
|
|
20868
21011
|
}
|
|
@@ -20898,7 +21041,7 @@ var GlobalPrefixedRule = /* @__PURE__ */ function() {
|
|
|
20898
21041
|
this.key = key;
|
|
20899
21042
|
this.options = options;
|
|
20900
21043
|
var selector = key.substr(atPrefix.length);
|
|
20901
|
-
this.rule = options.jss.createRule(selector, style, _extends$
|
|
21044
|
+
this.rule = options.jss.createRule(selector, style, _extends$1({}, options, {
|
|
20902
21045
|
parent: this
|
|
20903
21046
|
}));
|
|
20904
21047
|
}
|
|
@@ -20925,7 +21068,7 @@ function handleNestedGlobalContainerRule(rule, sheet) {
|
|
|
20925
21068
|
if (!rules)
|
|
20926
21069
|
return;
|
|
20927
21070
|
for (var name in rules) {
|
|
20928
|
-
sheet.addRule(name, rules[name], _extends$
|
|
21071
|
+
sheet.addRule(name, rules[name], _extends$1({}, options, {
|
|
20929
21072
|
selector: addScope(name, rule.selector)
|
|
20930
21073
|
}));
|
|
20931
21074
|
}
|
|
@@ -20937,21 +21080,21 @@ function handlePrefixedGlobalRule(rule, sheet) {
|
|
|
20937
21080
|
if (prop[0] !== "@" || prop.substr(0, at.length) !== at)
|
|
20938
21081
|
continue;
|
|
20939
21082
|
var selector = addScope(prop.substr(at.length), rule.selector);
|
|
20940
|
-
sheet.addRule(selector, style[prop], _extends$
|
|
21083
|
+
sheet.addRule(selector, style[prop], _extends$1({}, options, {
|
|
20941
21084
|
selector
|
|
20942
21085
|
}));
|
|
20943
21086
|
delete style[prop];
|
|
20944
21087
|
}
|
|
20945
21088
|
}
|
|
20946
21089
|
function jssGlobal() {
|
|
20947
|
-
function onCreateRule8(name,
|
|
21090
|
+
function onCreateRule8(name, styles8, options) {
|
|
20948
21091
|
if (!name)
|
|
20949
21092
|
return null;
|
|
20950
21093
|
if (name === at) {
|
|
20951
|
-
return new GlobalContainerRule(name,
|
|
21094
|
+
return new GlobalContainerRule(name, styles8, options);
|
|
20952
21095
|
}
|
|
20953
21096
|
if (name[0] === "@" && name.substr(0, atPrefix.length) === atPrefix) {
|
|
20954
|
-
return new GlobalPrefixedRule(name,
|
|
21097
|
+
return new GlobalPrefixedRule(name, styles8, options);
|
|
20955
21098
|
}
|
|
20956
21099
|
var parent = options.parent;
|
|
20957
21100
|
if (parent) {
|
|
@@ -21006,12 +21149,12 @@ function jssNested() {
|
|
|
21006
21149
|
}
|
|
21007
21150
|
function getOptions(rule, container, prevOptions) {
|
|
21008
21151
|
if (prevOptions)
|
|
21009
|
-
return _extends$
|
|
21152
|
+
return _extends$2({}, prevOptions, {
|
|
21010
21153
|
index: prevOptions.index + 1
|
|
21011
21154
|
});
|
|
21012
21155
|
var nestingLevel = rule.options.nestingLevel;
|
|
21013
21156
|
nestingLevel = nestingLevel === void 0 ? 1 : nestingLevel + 1;
|
|
21014
|
-
var options = _extends$
|
|
21157
|
+
var options = _extends$2({}, rule.options, {
|
|
21015
21158
|
nestingLevel,
|
|
21016
21159
|
index: container.indexOf(rule) + 1
|
|
21017
21160
|
// We don't need the parent name to be set options for chlid.
|
|
@@ -21039,11 +21182,11 @@ function jssNested() {
|
|
|
21039
21182
|
selector = selector.replace(refRegExp, replaceRef3);
|
|
21040
21183
|
var name = styleRule.key + "-" + prop;
|
|
21041
21184
|
if ("replaceRule" in container) {
|
|
21042
|
-
container.replaceRule(name, style[prop], _extends$
|
|
21185
|
+
container.replaceRule(name, style[prop], _extends$2({}, options, {
|
|
21043
21186
|
selector
|
|
21044
21187
|
}));
|
|
21045
21188
|
} else {
|
|
21046
|
-
container.addRule(name, style[prop], _extends$
|
|
21189
|
+
container.addRule(name, style[prop], _extends$2({}, options, {
|
|
21047
21190
|
selector
|
|
21048
21191
|
}));
|
|
21049
21192
|
}
|
|
@@ -21813,7 +21956,7 @@ function mergeClasses() {
|
|
|
21813
21956
|
if (!newClasses) {
|
|
21814
21957
|
return baseClasses;
|
|
21815
21958
|
}
|
|
21816
|
-
var nextClasses = _extends$
|
|
21959
|
+
var nextClasses = _extends$1({}, baseClasses);
|
|
21817
21960
|
{
|
|
21818
21961
|
if (typeof newClasses === "string") {
|
|
21819
21962
|
console.error(["Material-UI: The value `".concat(newClasses, "` ") + "provided to the classes prop of ".concat(getDisplayName(Component), " is incorrect."), "You might want to use the className prop instead."].join("\n"));
|
|
@@ -21854,15 +21997,15 @@ var multiKeyStore = {
|
|
|
21854
21997
|
}
|
|
21855
21998
|
};
|
|
21856
21999
|
const multiKeyStore$1 = multiKeyStore;
|
|
21857
|
-
var ThemeContext =
|
|
22000
|
+
var ThemeContext = React__default.createContext(null);
|
|
21858
22001
|
{
|
|
21859
22002
|
ThemeContext.displayName = "ThemeContext";
|
|
21860
22003
|
}
|
|
21861
22004
|
const ThemeContext$1 = ThemeContext;
|
|
21862
22005
|
function useTheme() {
|
|
21863
|
-
var theme =
|
|
22006
|
+
var theme = React__default.useContext(ThemeContext$1);
|
|
21864
22007
|
{
|
|
21865
|
-
|
|
22008
|
+
React__default.useDebugValue(theme);
|
|
21866
22009
|
}
|
|
21867
22010
|
return theme;
|
|
21868
22011
|
}
|
|
@@ -21877,15 +22020,15 @@ var defaultOptions = {
|
|
|
21877
22020
|
sheetsManager,
|
|
21878
22021
|
sheetsRegistry: null
|
|
21879
22022
|
};
|
|
21880
|
-
var StylesContext =
|
|
22023
|
+
var StylesContext = React__default.createContext(defaultOptions);
|
|
21881
22024
|
{
|
|
21882
22025
|
StylesContext.displayName = "StylesContext";
|
|
21883
22026
|
}
|
|
21884
22027
|
var injectFirstNode;
|
|
21885
22028
|
function StylesProvider(props) {
|
|
21886
22029
|
var children = props.children, _props$injectFirst = props.injectFirst, injectFirst = _props$injectFirst === void 0 ? false : _props$injectFirst, _props$disableGenerat = props.disableGeneration, disableGeneration = _props$disableGenerat === void 0 ? false : _props$disableGenerat, localOptions = _objectWithoutProperties(props, ["children", "injectFirst", "disableGeneration"]);
|
|
21887
|
-
var outerOptions =
|
|
21888
|
-
var context = _extends$
|
|
22030
|
+
var outerOptions = React__default.useContext(StylesContext);
|
|
22031
|
+
var context = _extends$1({}, outerOptions, {
|
|
21889
22032
|
disableGeneration
|
|
21890
22033
|
}, localOptions);
|
|
21891
22034
|
{
|
|
@@ -21914,7 +22057,7 @@ function StylesProvider(props) {
|
|
|
21914
22057
|
insertionPoint: injectFirstNode
|
|
21915
22058
|
});
|
|
21916
22059
|
}
|
|
21917
|
-
return /* @__PURE__ */
|
|
22060
|
+
return /* @__PURE__ */ React__default.createElement(StylesContext.Provider, {
|
|
21918
22061
|
value: context
|
|
21919
22062
|
}, children);
|
|
21920
22063
|
}
|
|
@@ -21990,15 +22133,15 @@ const noopTheme$1 = noopTheme;
|
|
|
21990
22133
|
function getStylesCreator(stylesOrCreator) {
|
|
21991
22134
|
var themingEnabled = typeof stylesOrCreator === "function";
|
|
21992
22135
|
{
|
|
21993
|
-
if (_typeof$
|
|
22136
|
+
if (_typeof$2(stylesOrCreator) !== "object" && !themingEnabled) {
|
|
21994
22137
|
console.error(["Material-UI: The `styles` argument provided is invalid.", "You need to provide a function generating the styles or a styles object."].join("\n"));
|
|
21995
22138
|
}
|
|
21996
22139
|
}
|
|
21997
22140
|
return {
|
|
21998
22141
|
create: function create2(theme, name) {
|
|
21999
|
-
var
|
|
22142
|
+
var styles8;
|
|
22000
22143
|
try {
|
|
22001
|
-
|
|
22144
|
+
styles8 = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;
|
|
22002
22145
|
} catch (err) {
|
|
22003
22146
|
{
|
|
22004
22147
|
if (themingEnabled === true && theme === noopTheme$1) {
|
|
@@ -22008,10 +22151,10 @@ function getStylesCreator(stylesOrCreator) {
|
|
|
22008
22151
|
throw err;
|
|
22009
22152
|
}
|
|
22010
22153
|
if (!name || !theme.overrides || !theme.overrides[name]) {
|
|
22011
|
-
return
|
|
22154
|
+
return styles8;
|
|
22012
22155
|
}
|
|
22013
22156
|
var overrides = theme.overrides[name];
|
|
22014
|
-
var stylesWithOverrides = _extends$
|
|
22157
|
+
var stylesWithOverrides = _extends$1({}, styles8);
|
|
22015
22158
|
Object.keys(overrides).forEach(function(key) {
|
|
22016
22159
|
{
|
|
22017
22160
|
if (!stylesWithOverrides[key]) {
|
|
@@ -22072,7 +22215,7 @@ function attach(_ref2, props) {
|
|
|
22072
22215
|
};
|
|
22073
22216
|
multiKeyStore$1.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);
|
|
22074
22217
|
}
|
|
22075
|
-
var options = _extends$
|
|
22218
|
+
var options = _extends$1({}, stylesCreator.options, stylesOptions, {
|
|
22076
22219
|
theme,
|
|
22077
22220
|
flip: typeof stylesOptions.flip === "boolean" ? stylesOptions.flip : theme.direction === "rtl"
|
|
22078
22221
|
});
|
|
@@ -22083,9 +22226,9 @@ function attach(_ref2, props) {
|
|
|
22083
22226
|
if (stylesOptions.sheetsCache) {
|
|
22084
22227
|
staticSheet = multiKeyStore$1.get(stylesOptions.sheetsCache, stylesCreator, theme);
|
|
22085
22228
|
}
|
|
22086
|
-
var
|
|
22229
|
+
var styles8 = stylesCreator.create(theme, name);
|
|
22087
22230
|
if (!staticSheet) {
|
|
22088
|
-
staticSheet = stylesOptions.jss.createStyleSheet(
|
|
22231
|
+
staticSheet = stylesOptions.jss.createStyleSheet(styles8, _extends$1({
|
|
22089
22232
|
link: false
|
|
22090
22233
|
}, options));
|
|
22091
22234
|
staticSheet.attach();
|
|
@@ -22097,10 +22240,10 @@ function attach(_ref2, props) {
|
|
|
22097
22240
|
sheetsRegistry.add(staticSheet);
|
|
22098
22241
|
}
|
|
22099
22242
|
sheetManager.staticSheet = staticSheet;
|
|
22100
|
-
sheetManager.dynamicStyles = getDynamicStyles(
|
|
22243
|
+
sheetManager.dynamicStyles = getDynamicStyles(styles8);
|
|
22101
22244
|
}
|
|
22102
22245
|
if (sheetManager.dynamicStyles) {
|
|
22103
|
-
var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends$
|
|
22246
|
+
var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends$1({
|
|
22104
22247
|
link: true
|
|
22105
22248
|
}, options));
|
|
22106
22249
|
dynamicSheet.update(props);
|
|
@@ -22146,17 +22289,17 @@ function detach(_ref4) {
|
|
|
22146
22289
|
}
|
|
22147
22290
|
}
|
|
22148
22291
|
}
|
|
22149
|
-
function useSynchronousEffect(func,
|
|
22150
|
-
var key =
|
|
22292
|
+
function useSynchronousEffect(func, values2) {
|
|
22293
|
+
var key = React__default.useRef([]);
|
|
22151
22294
|
var output;
|
|
22152
|
-
var currentKey =
|
|
22295
|
+
var currentKey = React__default.useMemo(function() {
|
|
22153
22296
|
return {};
|
|
22154
|
-
},
|
|
22297
|
+
}, values2);
|
|
22155
22298
|
if (key.current !== currentKey) {
|
|
22156
22299
|
key.current = currentKey;
|
|
22157
22300
|
output = func();
|
|
22158
22301
|
}
|
|
22159
|
-
|
|
22302
|
+
React__default.useEffect(
|
|
22160
22303
|
function() {
|
|
22161
22304
|
return function() {
|
|
22162
22305
|
if (output) {
|
|
@@ -22182,9 +22325,9 @@ function makeStyles$1(stylesOrCreator) {
|
|
|
22182
22325
|
var useStyles2 = function useStyles3() {
|
|
22183
22326
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
22184
22327
|
var theme = useTheme() || defaultTheme2;
|
|
22185
|
-
var stylesOptions = _extends$
|
|
22186
|
-
var instance =
|
|
22187
|
-
var shouldUpdate =
|
|
22328
|
+
var stylesOptions = _extends$1({}, React__default.useContext(StylesContext), stylesOptions2);
|
|
22329
|
+
var instance = React__default.useRef();
|
|
22330
|
+
var shouldUpdate = React__default.useRef();
|
|
22188
22331
|
useSynchronousEffect(function() {
|
|
22189
22332
|
var current = {
|
|
22190
22333
|
name,
|
|
@@ -22200,7 +22343,7 @@ function makeStyles$1(stylesOrCreator) {
|
|
|
22200
22343
|
detach(current);
|
|
22201
22344
|
};
|
|
22202
22345
|
}, [theme, stylesCreator]);
|
|
22203
|
-
|
|
22346
|
+
React__default.useEffect(function() {
|
|
22204
22347
|
if (shouldUpdate.current) {
|
|
22205
22348
|
update(instance.current, props);
|
|
22206
22349
|
}
|
|
@@ -22208,7 +22351,7 @@ function makeStyles$1(stylesOrCreator) {
|
|
|
22208
22351
|
});
|
|
22209
22352
|
var classes = getClasses(instance.current, props.classes, Component);
|
|
22210
22353
|
{
|
|
22211
|
-
|
|
22354
|
+
React__default.useDebugValue(classes);
|
|
22212
22355
|
}
|
|
22213
22356
|
return classes;
|
|
22214
22357
|
};
|
|
@@ -22237,71 +22380,2205 @@ const clsx_m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
22237
22380
|
clsx,
|
|
22238
22381
|
default: clsx
|
|
22239
22382
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
22383
|
+
var reactIs = reactIsExports$1;
|
|
22384
|
+
var REACT_STATICS = {
|
|
22385
|
+
childContextTypes: true,
|
|
22386
|
+
contextType: true,
|
|
22387
|
+
contextTypes: true,
|
|
22388
|
+
defaultProps: true,
|
|
22389
|
+
displayName: true,
|
|
22390
|
+
getDefaultProps: true,
|
|
22391
|
+
getDerivedStateFromError: true,
|
|
22392
|
+
getDerivedStateFromProps: true,
|
|
22393
|
+
mixins: true,
|
|
22394
|
+
propTypes: true,
|
|
22395
|
+
type: true
|
|
22396
|
+
};
|
|
22397
|
+
var KNOWN_STATICS = {
|
|
22398
|
+
name: true,
|
|
22399
|
+
length: true,
|
|
22400
|
+
prototype: true,
|
|
22401
|
+
caller: true,
|
|
22402
|
+
callee: true,
|
|
22403
|
+
arguments: true,
|
|
22404
|
+
arity: true
|
|
22405
|
+
};
|
|
22406
|
+
var FORWARD_REF_STATICS = {
|
|
22407
|
+
"$$typeof": true,
|
|
22408
|
+
render: true,
|
|
22409
|
+
defaultProps: true,
|
|
22410
|
+
displayName: true,
|
|
22411
|
+
propTypes: true
|
|
22412
|
+
};
|
|
22413
|
+
var MEMO_STATICS = {
|
|
22414
|
+
"$$typeof": true,
|
|
22415
|
+
compare: true,
|
|
22416
|
+
defaultProps: true,
|
|
22417
|
+
displayName: true,
|
|
22418
|
+
propTypes: true,
|
|
22419
|
+
type: true
|
|
22420
|
+
};
|
|
22421
|
+
var TYPE_STATICS = {};
|
|
22422
|
+
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
22423
|
+
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
22424
|
+
function getStatics(component) {
|
|
22425
|
+
if (reactIs.isMemo(component)) {
|
|
22426
|
+
return MEMO_STATICS;
|
|
22427
|
+
}
|
|
22428
|
+
return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
|
|
22429
|
+
}
|
|
22430
|
+
var defineProperty$1 = Object.defineProperty;
|
|
22431
|
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
22432
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
22433
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
22434
|
+
var getPrototypeOf$1 = Object.getPrototypeOf;
|
|
22435
|
+
var objectPrototype = Object.prototype;
|
|
22436
|
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
22437
|
+
if (typeof sourceComponent !== "string") {
|
|
22438
|
+
if (objectPrototype) {
|
|
22439
|
+
var inheritedComponent = getPrototypeOf$1(sourceComponent);
|
|
22440
|
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
22441
|
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
22442
|
+
}
|
|
22443
|
+
}
|
|
22444
|
+
var keys2 = getOwnPropertyNames(sourceComponent);
|
|
22445
|
+
if (getOwnPropertySymbols) {
|
|
22446
|
+
keys2 = keys2.concat(getOwnPropertySymbols(sourceComponent));
|
|
22447
|
+
}
|
|
22448
|
+
var targetStatics = getStatics(targetComponent);
|
|
22449
|
+
var sourceStatics = getStatics(sourceComponent);
|
|
22450
|
+
for (var i = 0; i < keys2.length; ++i) {
|
|
22451
|
+
var key = keys2[i];
|
|
22452
|
+
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
22453
|
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
22454
|
+
try {
|
|
22455
|
+
defineProperty$1(targetComponent, key, descriptor);
|
|
22456
|
+
} catch (e) {
|
|
22457
|
+
}
|
|
22458
|
+
}
|
|
22459
|
+
}
|
|
22460
|
+
}
|
|
22461
|
+
return targetComponent;
|
|
22462
|
+
}
|
|
22463
|
+
var hoistNonReactStatics_cjs = hoistNonReactStatics;
|
|
22464
|
+
const hoistNonReactStatics$1 = /* @__PURE__ */ getDefaultExportFromCjs(hoistNonReactStatics_cjs);
|
|
22465
|
+
var withStyles$1 = function withStyles(stylesOrCreator) {
|
|
22466
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
22467
|
+
return function(Component) {
|
|
22468
|
+
var defaultTheme2 = options.defaultTheme, _options$withTheme = options.withTheme, withTheme = _options$withTheme === void 0 ? false : _options$withTheme, name = options.name, stylesOptions = _objectWithoutProperties(options, ["defaultTheme", "withTheme", "name"]);
|
|
22469
|
+
{
|
|
22470
|
+
if (Component === void 0) {
|
|
22471
|
+
throw new Error(["You are calling withStyles(styles)(Component) with an undefined component.", "You may have forgotten to import it."].join("\n"));
|
|
22472
|
+
}
|
|
22473
|
+
}
|
|
22474
|
+
var classNamePrefix = name;
|
|
22475
|
+
{
|
|
22476
|
+
if (!name) {
|
|
22477
|
+
var displayName = getDisplayName(Component);
|
|
22478
|
+
if (displayName !== void 0) {
|
|
22479
|
+
classNamePrefix = displayName;
|
|
22480
|
+
}
|
|
22481
|
+
}
|
|
22482
|
+
}
|
|
22483
|
+
var useStyles2 = makeStyles$1(stylesOrCreator, _extends$1({
|
|
22484
|
+
defaultTheme: defaultTheme2,
|
|
22485
|
+
Component,
|
|
22486
|
+
name: name || Component.displayName,
|
|
22487
|
+
classNamePrefix
|
|
22488
|
+
}, stylesOptions));
|
|
22489
|
+
var WithStyles = /* @__PURE__ */ React__default.forwardRef(function WithStyles2(props, ref) {
|
|
22490
|
+
props.classes;
|
|
22491
|
+
var innerRef = props.innerRef, other = _objectWithoutProperties(props, ["classes", "innerRef"]);
|
|
22492
|
+
var classes = useStyles2(_extends$1({}, Component.defaultProps, props));
|
|
22493
|
+
var theme;
|
|
22494
|
+
var more = other;
|
|
22495
|
+
if (typeof name === "string" || withTheme) {
|
|
22496
|
+
theme = useTheme() || defaultTheme2;
|
|
22497
|
+
if (name) {
|
|
22498
|
+
more = getThemeProps({
|
|
22499
|
+
theme,
|
|
22500
|
+
name,
|
|
22501
|
+
props: other
|
|
22502
|
+
});
|
|
22503
|
+
}
|
|
22504
|
+
if (withTheme && !more.theme) {
|
|
22505
|
+
more.theme = theme;
|
|
22506
|
+
}
|
|
22507
|
+
}
|
|
22508
|
+
return /* @__PURE__ */ React__default.createElement(Component, _extends$1({
|
|
22509
|
+
ref: innerRef || ref,
|
|
22510
|
+
classes
|
|
22511
|
+
}, more));
|
|
22512
|
+
});
|
|
22513
|
+
WithStyles.propTypes = {
|
|
22514
|
+
/**
|
|
22515
|
+
* Override or extend the styles applied to the component.
|
|
22516
|
+
*/
|
|
22517
|
+
classes: PropTypes.object,
|
|
22518
|
+
/**
|
|
22519
|
+
* Use that prop to pass a ref to the decorated component.
|
|
22520
|
+
* @deprecated
|
|
22521
|
+
*/
|
|
22522
|
+
innerRef: chainPropTypes(PropTypes.oneOfType([PropTypes.func, PropTypes.object]), function(props) {
|
|
22523
|
+
if (props.innerRef == null) {
|
|
22524
|
+
return null;
|
|
22525
|
+
}
|
|
22526
|
+
return null;
|
|
22527
|
+
})
|
|
22528
|
+
};
|
|
22529
|
+
{
|
|
22530
|
+
WithStyles.displayName = "WithStyles(".concat(getDisplayName(Component), ")");
|
|
22531
|
+
}
|
|
22532
|
+
hoistNonReactStatics$1(WithStyles, Component);
|
|
22533
|
+
{
|
|
22534
|
+
WithStyles.Naked = Component;
|
|
22535
|
+
WithStyles.options = options;
|
|
22536
|
+
WithStyles.useStyles = useStyles2;
|
|
22537
|
+
}
|
|
22538
|
+
return WithStyles;
|
|
22539
|
+
};
|
|
22540
|
+
};
|
|
22541
|
+
const withStylesWithoutDefault = withStyles$1;
|
|
22240
22542
|
var defaultTheme = createTheme();
|
|
22241
22543
|
const defaultTheme$1 = defaultTheme;
|
|
22242
22544
|
function makeStyles(stylesOrCreator) {
|
|
22243
22545
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
22244
|
-
return makeStyles$1(stylesOrCreator, _extends$
|
|
22546
|
+
return makeStyles$1(stylesOrCreator, _extends$1({
|
|
22245
22547
|
defaultTheme: defaultTheme$1
|
|
22246
22548
|
}, options));
|
|
22247
22549
|
}
|
|
22248
|
-
|
|
22249
|
-
|
|
22250
|
-
|
|
22251
|
-
|
|
22252
|
-
|
|
22253
|
-
|
|
22254
|
-
|
|
22550
|
+
function withStyles2(stylesOrCreator, options) {
|
|
22551
|
+
return withStylesWithoutDefault(stylesOrCreator, _extends$1({
|
|
22552
|
+
defaultTheme: defaultTheme$1
|
|
22553
|
+
}, options));
|
|
22554
|
+
}
|
|
22555
|
+
function capitalize(string) {
|
|
22556
|
+
if (typeof string !== "string") {
|
|
22557
|
+
throw new Error("Material-UI: capitalize(string) expects a string argument.");
|
|
22255
22558
|
}
|
|
22256
|
-
|
|
22257
|
-
})(interopRequireDefault);
|
|
22258
|
-
var interopRequireDefaultExports = interopRequireDefault.exports;
|
|
22259
|
-
var AutoSizer = {};
|
|
22260
|
-
var interopRequireWildcard = { exports: {} };
|
|
22261
|
-
var _typeof = { exports: {} };
|
|
22262
|
-
var hasRequired_typeof;
|
|
22263
|
-
function require_typeof() {
|
|
22264
|
-
if (hasRequired_typeof)
|
|
22265
|
-
return _typeof.exports;
|
|
22266
|
-
hasRequired_typeof = 1;
|
|
22267
|
-
(function(module2) {
|
|
22268
|
-
function _typeof2(obj) {
|
|
22269
|
-
"@babel/helpers - typeof";
|
|
22270
|
-
return module2.exports = _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
22271
|
-
return typeof obj2;
|
|
22272
|
-
} : function(obj2) {
|
|
22273
|
-
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
22274
|
-
}, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _typeof2(obj);
|
|
22275
|
-
}
|
|
22276
|
-
module2.exports = _typeof2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
22277
|
-
})(_typeof);
|
|
22278
|
-
return _typeof.exports;
|
|
22559
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
22279
22560
|
}
|
|
22280
|
-
var
|
|
22281
|
-
|
|
22282
|
-
|
|
22283
|
-
|
|
22284
|
-
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
|
|
22288
|
-
|
|
22289
|
-
|
|
22290
|
-
|
|
22291
|
-
|
|
22292
|
-
|
|
22293
|
-
|
|
22294
|
-
|
|
22561
|
+
var styles$7 = function styles(theme) {
|
|
22562
|
+
return {
|
|
22563
|
+
/* Styles applied to the root element. */
|
|
22564
|
+
root: {
|
|
22565
|
+
userSelect: "none",
|
|
22566
|
+
width: "1em",
|
|
22567
|
+
height: "1em",
|
|
22568
|
+
display: "inline-block",
|
|
22569
|
+
fill: "currentColor",
|
|
22570
|
+
flexShrink: 0,
|
|
22571
|
+
fontSize: theme.typography.pxToRem(24),
|
|
22572
|
+
transition: theme.transitions.create("fill", {
|
|
22573
|
+
duration: theme.transitions.duration.shorter
|
|
22574
|
+
})
|
|
22575
|
+
},
|
|
22576
|
+
/* Styles applied to the root element if `color="primary"`. */
|
|
22577
|
+
colorPrimary: {
|
|
22578
|
+
color: theme.palette.primary.main
|
|
22579
|
+
},
|
|
22580
|
+
/* Styles applied to the root element if `color="secondary"`. */
|
|
22581
|
+
colorSecondary: {
|
|
22582
|
+
color: theme.palette.secondary.main
|
|
22583
|
+
},
|
|
22584
|
+
/* Styles applied to the root element if `color="action"`. */
|
|
22585
|
+
colorAction: {
|
|
22586
|
+
color: theme.palette.action.active
|
|
22587
|
+
},
|
|
22588
|
+
/* Styles applied to the root element if `color="error"`. */
|
|
22589
|
+
colorError: {
|
|
22590
|
+
color: theme.palette.error.main
|
|
22591
|
+
},
|
|
22592
|
+
/* Styles applied to the root element if `color="disabled"`. */
|
|
22593
|
+
colorDisabled: {
|
|
22594
|
+
color: theme.palette.action.disabled
|
|
22595
|
+
},
|
|
22596
|
+
/* Styles applied to the root element if `fontSize="inherit"`. */
|
|
22597
|
+
fontSizeInherit: {
|
|
22598
|
+
fontSize: "inherit"
|
|
22599
|
+
},
|
|
22600
|
+
/* Styles applied to the root element if `fontSize="small"`. */
|
|
22601
|
+
fontSizeSmall: {
|
|
22602
|
+
fontSize: theme.typography.pxToRem(20)
|
|
22603
|
+
},
|
|
22604
|
+
/* Styles applied to the root element if `fontSize="large"`. */
|
|
22605
|
+
fontSizeLarge: {
|
|
22606
|
+
fontSize: theme.typography.pxToRem(35)
|
|
22295
22607
|
}
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
|
|
22301
|
-
|
|
22302
|
-
|
|
22303
|
-
|
|
22304
|
-
|
|
22608
|
+
};
|
|
22609
|
+
};
|
|
22610
|
+
var SvgIcon = /* @__PURE__ */ React.forwardRef(function SvgIcon2(props, ref) {
|
|
22611
|
+
var children = props.children, classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? "inherit" : _props$color, _props$component = props.component, Component = _props$component === void 0 ? "svg" : _props$component, _props$fontSize = props.fontSize, fontSize = _props$fontSize === void 0 ? "medium" : _props$fontSize, htmlColor = props.htmlColor, titleAccess = props.titleAccess, _props$viewBox = props.viewBox, viewBox = _props$viewBox === void 0 ? "0 0 24 24" : _props$viewBox, other = _objectWithoutProperties(props, ["children", "classes", "className", "color", "component", "fontSize", "htmlColor", "titleAccess", "viewBox"]);
|
|
22612
|
+
return /* @__PURE__ */ React.createElement(Component, _extends$1({
|
|
22613
|
+
className: clsx(classes.root, className, color !== "inherit" && classes["color".concat(capitalize(color))], fontSize !== "default" && fontSize !== "medium" && classes["fontSize".concat(capitalize(fontSize))]),
|
|
22614
|
+
focusable: "false",
|
|
22615
|
+
viewBox,
|
|
22616
|
+
color: htmlColor,
|
|
22617
|
+
"aria-hidden": titleAccess ? void 0 : true,
|
|
22618
|
+
role: titleAccess ? "img" : void 0,
|
|
22619
|
+
ref
|
|
22620
|
+
}, other), children, titleAccess ? /* @__PURE__ */ React.createElement("title", null, titleAccess) : null);
|
|
22621
|
+
});
|
|
22622
|
+
SvgIcon.propTypes = {
|
|
22623
|
+
// ----------------------------- Warning --------------------------------
|
|
22624
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
22625
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
22626
|
+
// ----------------------------------------------------------------------
|
|
22627
|
+
/**
|
|
22628
|
+
* Node passed into the SVG element.
|
|
22629
|
+
*/
|
|
22630
|
+
children: PropTypes.node,
|
|
22631
|
+
/**
|
|
22632
|
+
* Override or extend the styles applied to the component.
|
|
22633
|
+
* See [CSS API](#css) below for more details.
|
|
22634
|
+
*/
|
|
22635
|
+
classes: PropTypes.object,
|
|
22636
|
+
/**
|
|
22637
|
+
* @ignore
|
|
22638
|
+
*/
|
|
22639
|
+
className: PropTypes.string,
|
|
22640
|
+
/**
|
|
22641
|
+
* The color of the component. It supports those theme colors that make sense for this component.
|
|
22642
|
+
* You can use the `htmlColor` prop to apply a color attribute to the SVG element.
|
|
22643
|
+
*/
|
|
22644
|
+
color: PropTypes.oneOf(["action", "disabled", "error", "inherit", "primary", "secondary"]),
|
|
22645
|
+
/**
|
|
22646
|
+
* The component used for the root node.
|
|
22647
|
+
* Either a string to use a HTML element or a component.
|
|
22648
|
+
*/
|
|
22649
|
+
component: PropTypes.elementType,
|
|
22650
|
+
/**
|
|
22651
|
+
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
|
22652
|
+
*/
|
|
22653
|
+
fontSize: chainPropTypes(PropTypes.oneOf(["default", "inherit", "large", "medium", "small"]), function(props) {
|
|
22654
|
+
var fontSize = props.fontSize;
|
|
22655
|
+
if (fontSize === "default") {
|
|
22656
|
+
throw new Error('Material-UI: `fontSize="default"` is deprecated. Use `fontSize="medium"` instead.');
|
|
22657
|
+
}
|
|
22658
|
+
return null;
|
|
22659
|
+
}),
|
|
22660
|
+
/**
|
|
22661
|
+
* Applies a color attribute to the SVG element.
|
|
22662
|
+
*/
|
|
22663
|
+
htmlColor: PropTypes.string,
|
|
22664
|
+
/**
|
|
22665
|
+
* The shape-rendering attribute. The behavior of the different options is described on the
|
|
22666
|
+
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
|
22667
|
+
* If you are having issues with blurry icons you should investigate this property.
|
|
22668
|
+
*/
|
|
22669
|
+
shapeRendering: PropTypes.string,
|
|
22670
|
+
/**
|
|
22671
|
+
* Provides a human-readable title for the element that contains it.
|
|
22672
|
+
* https://www.w3.org/TR/SVG-access/#Equivalent
|
|
22673
|
+
*/
|
|
22674
|
+
titleAccess: PropTypes.string,
|
|
22675
|
+
/**
|
|
22676
|
+
* Allows you to redefine what the coordinates without units mean inside an SVG element.
|
|
22677
|
+
* For example, if the SVG element is 500 (width) by 200 (height),
|
|
22678
|
+
* and you pass viewBox="0 0 50 20",
|
|
22679
|
+
* this means that the coordinates inside the SVG will go from the top left corner (0,0)
|
|
22680
|
+
* to bottom right (50,20) and each unit will be worth 10px.
|
|
22681
|
+
*/
|
|
22682
|
+
viewBox: PropTypes.string
|
|
22683
|
+
};
|
|
22684
|
+
SvgIcon.muiName = "SvgIcon";
|
|
22685
|
+
const SvgIcon$1 = withStyles2(styles$7, {
|
|
22686
|
+
name: "MuiSvgIcon"
|
|
22687
|
+
})(SvgIcon);
|
|
22688
|
+
function createSvgIcon(path, displayName) {
|
|
22689
|
+
var Component = function Component2(props, ref) {
|
|
22690
|
+
return /* @__PURE__ */ React__default.createElement(SvgIcon$1, _extends$1({
|
|
22691
|
+
ref
|
|
22692
|
+
}, props), path);
|
|
22693
|
+
};
|
|
22694
|
+
{
|
|
22695
|
+
Component.displayName = "".concat(displayName, "Icon");
|
|
22696
|
+
}
|
|
22697
|
+
Component.muiName = SvgIcon$1.muiName;
|
|
22698
|
+
return /* @__PURE__ */ React__default.memo(/* @__PURE__ */ React__default.forwardRef(Component));
|
|
22699
|
+
}
|
|
22700
|
+
function deprecatedPropType(validator, reason) {
|
|
22701
|
+
return function(props, propName, componentName, location, propFullName) {
|
|
22702
|
+
var componentNameSafe = componentName || "<<anonymous>>";
|
|
22703
|
+
var propFullNameSafe = propFullName || propName;
|
|
22704
|
+
if (typeof props[propName] !== "undefined") {
|
|
22705
|
+
return new Error("The ".concat(location, " `").concat(propFullNameSafe, "` of ") + "`".concat(componentNameSafe, "` is deprecated. ").concat(reason));
|
|
22706
|
+
}
|
|
22707
|
+
return null;
|
|
22708
|
+
};
|
|
22709
|
+
}
|
|
22710
|
+
function setRef(ref, value) {
|
|
22711
|
+
if (typeof ref === "function") {
|
|
22712
|
+
ref(value);
|
|
22713
|
+
} else if (ref) {
|
|
22714
|
+
ref.current = value;
|
|
22715
|
+
}
|
|
22716
|
+
}
|
|
22717
|
+
function useControlled(_ref) {
|
|
22718
|
+
var controlled = _ref.controlled, defaultProp = _ref.default, name = _ref.name, _ref$state = _ref.state, state = _ref$state === void 0 ? "value" : _ref$state;
|
|
22719
|
+
var _React$useRef = React.useRef(controlled !== void 0), isControlled = _React$useRef.current;
|
|
22720
|
+
var _React$useState = React.useState(defaultProp), valueState = _React$useState[0], setValue = _React$useState[1];
|
|
22721
|
+
var value = isControlled ? controlled : valueState;
|
|
22722
|
+
{
|
|
22723
|
+
React.useEffect(function() {
|
|
22724
|
+
if (isControlled !== (controlled !== void 0)) {
|
|
22725
|
+
console.error(["Material-UI: A component is changing the ".concat(isControlled ? "" : "un", "controlled ").concat(state, " state of ").concat(name, " to be ").concat(isControlled ? "un" : "", "controlled."), "Elements should not switch from uncontrolled to controlled (or vice versa).", "Decide between using a controlled or uncontrolled ".concat(name, " ") + "element for the lifetime of the component.", "The nature of the state is determined during the first render, it's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n"));
|
|
22726
|
+
}
|
|
22727
|
+
}, [controlled]);
|
|
22728
|
+
var _React$useRef2 = React.useRef(defaultProp), defaultValue = _React$useRef2.current;
|
|
22729
|
+
React.useEffect(function() {
|
|
22730
|
+
if (!isControlled && defaultValue !== defaultProp) {
|
|
22731
|
+
console.error(["Material-UI: A component is changing the default ".concat(state, " state of an uncontrolled ").concat(name, " after being initialized. ") + "To suppress this warning opt to use a controlled ".concat(name, ".")].join("\n"));
|
|
22732
|
+
}
|
|
22733
|
+
}, [JSON.stringify(defaultProp)]);
|
|
22734
|
+
}
|
|
22735
|
+
var setValueIfUncontrolled = React.useCallback(function(newValue) {
|
|
22736
|
+
if (!isControlled) {
|
|
22737
|
+
setValue(newValue);
|
|
22738
|
+
}
|
|
22739
|
+
}, []);
|
|
22740
|
+
return [value, setValueIfUncontrolled];
|
|
22741
|
+
}
|
|
22742
|
+
var useEnhancedEffect$1 = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
22743
|
+
function useEventCallback(fn) {
|
|
22744
|
+
var ref = React.useRef(fn);
|
|
22745
|
+
useEnhancedEffect$1(function() {
|
|
22746
|
+
ref.current = fn;
|
|
22747
|
+
});
|
|
22748
|
+
return React.useCallback(function() {
|
|
22749
|
+
return ref.current.apply(void 0, arguments);
|
|
22750
|
+
}, []);
|
|
22751
|
+
}
|
|
22752
|
+
function useForkRef(refA, refB) {
|
|
22753
|
+
return React.useMemo(function() {
|
|
22754
|
+
if (refA == null && refB == null) {
|
|
22755
|
+
return null;
|
|
22756
|
+
}
|
|
22757
|
+
return function(refValue) {
|
|
22758
|
+
setRef(refA, refValue);
|
|
22759
|
+
setRef(refB, refValue);
|
|
22760
|
+
};
|
|
22761
|
+
}, [refA, refB]);
|
|
22762
|
+
}
|
|
22763
|
+
var hadKeyboardEvent = true;
|
|
22764
|
+
var hadFocusVisibleRecently = false;
|
|
22765
|
+
var hadFocusVisibleRecentlyTimeout = null;
|
|
22766
|
+
var inputTypesWhitelist = {
|
|
22767
|
+
text: true,
|
|
22768
|
+
search: true,
|
|
22769
|
+
url: true,
|
|
22770
|
+
tel: true,
|
|
22771
|
+
email: true,
|
|
22772
|
+
password: true,
|
|
22773
|
+
number: true,
|
|
22774
|
+
date: true,
|
|
22775
|
+
month: true,
|
|
22776
|
+
week: true,
|
|
22777
|
+
time: true,
|
|
22778
|
+
datetime: true,
|
|
22779
|
+
"datetime-local": true
|
|
22780
|
+
};
|
|
22781
|
+
function focusTriggersKeyboardModality(node) {
|
|
22782
|
+
var type = node.type, tagName = node.tagName;
|
|
22783
|
+
if (tagName === "INPUT" && inputTypesWhitelist[type] && !node.readOnly) {
|
|
22784
|
+
return true;
|
|
22785
|
+
}
|
|
22786
|
+
if (tagName === "TEXTAREA" && !node.readOnly) {
|
|
22787
|
+
return true;
|
|
22788
|
+
}
|
|
22789
|
+
if (node.isContentEditable) {
|
|
22790
|
+
return true;
|
|
22791
|
+
}
|
|
22792
|
+
return false;
|
|
22793
|
+
}
|
|
22794
|
+
function handleKeyDown(event) {
|
|
22795
|
+
if (event.metaKey || event.altKey || event.ctrlKey) {
|
|
22796
|
+
return;
|
|
22797
|
+
}
|
|
22798
|
+
hadKeyboardEvent = true;
|
|
22799
|
+
}
|
|
22800
|
+
function handlePointerDown() {
|
|
22801
|
+
hadKeyboardEvent = false;
|
|
22802
|
+
}
|
|
22803
|
+
function handleVisibilityChange() {
|
|
22804
|
+
if (this.visibilityState === "hidden") {
|
|
22805
|
+
if (hadFocusVisibleRecently) {
|
|
22806
|
+
hadKeyboardEvent = true;
|
|
22807
|
+
}
|
|
22808
|
+
}
|
|
22809
|
+
}
|
|
22810
|
+
function prepare(doc) {
|
|
22811
|
+
doc.addEventListener("keydown", handleKeyDown, true);
|
|
22812
|
+
doc.addEventListener("mousedown", handlePointerDown, true);
|
|
22813
|
+
doc.addEventListener("pointerdown", handlePointerDown, true);
|
|
22814
|
+
doc.addEventListener("touchstart", handlePointerDown, true);
|
|
22815
|
+
doc.addEventListener("visibilitychange", handleVisibilityChange, true);
|
|
22816
|
+
}
|
|
22817
|
+
function isFocusVisible(event) {
|
|
22818
|
+
var target = event.target;
|
|
22819
|
+
try {
|
|
22820
|
+
return target.matches(":focus-visible");
|
|
22821
|
+
} catch (error) {
|
|
22822
|
+
}
|
|
22823
|
+
return hadKeyboardEvent || focusTriggersKeyboardModality(target);
|
|
22824
|
+
}
|
|
22825
|
+
function handleBlurVisible() {
|
|
22826
|
+
hadFocusVisibleRecently = true;
|
|
22827
|
+
window.clearTimeout(hadFocusVisibleRecentlyTimeout);
|
|
22828
|
+
hadFocusVisibleRecentlyTimeout = window.setTimeout(function() {
|
|
22829
|
+
hadFocusVisibleRecently = false;
|
|
22830
|
+
}, 100);
|
|
22831
|
+
}
|
|
22832
|
+
function useIsFocusVisible() {
|
|
22833
|
+
var ref = React.useCallback(function(instance) {
|
|
22834
|
+
var node = ReactDOM.findDOMNode(instance);
|
|
22835
|
+
if (node != null) {
|
|
22836
|
+
prepare(node.ownerDocument);
|
|
22837
|
+
}
|
|
22838
|
+
}, []);
|
|
22839
|
+
{
|
|
22840
|
+
React.useDebugValue(isFocusVisible);
|
|
22841
|
+
}
|
|
22842
|
+
return {
|
|
22843
|
+
isFocusVisible,
|
|
22844
|
+
onBlurVisible: handleBlurVisible,
|
|
22845
|
+
ref
|
|
22846
|
+
};
|
|
22847
|
+
}
|
|
22848
|
+
function _setPrototypeOf(o, p) {
|
|
22849
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
22850
|
+
o2.__proto__ = p2;
|
|
22851
|
+
return o2;
|
|
22852
|
+
};
|
|
22853
|
+
return _setPrototypeOf(o, p);
|
|
22854
|
+
}
|
|
22855
|
+
function _inheritsLoose(subClass, superClass) {
|
|
22856
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
22857
|
+
subClass.prototype.constructor = subClass;
|
|
22858
|
+
_setPrototypeOf(subClass, superClass);
|
|
22859
|
+
}
|
|
22860
|
+
const TransitionGroupContext = React__default.createContext(null);
|
|
22861
|
+
function _assertThisInitialized(self2) {
|
|
22862
|
+
if (self2 === void 0) {
|
|
22863
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
22864
|
+
}
|
|
22865
|
+
return self2;
|
|
22866
|
+
}
|
|
22867
|
+
function getChildMapping(children, mapFn) {
|
|
22868
|
+
var mapper = function mapper2(child2) {
|
|
22869
|
+
return mapFn && isValidElement(child2) ? mapFn(child2) : child2;
|
|
22870
|
+
};
|
|
22871
|
+
var result = /* @__PURE__ */ Object.create(null);
|
|
22872
|
+
if (children)
|
|
22873
|
+
Children.map(children, function(c) {
|
|
22874
|
+
return c;
|
|
22875
|
+
}).forEach(function(child2) {
|
|
22876
|
+
result[child2.key] = mapper(child2);
|
|
22877
|
+
});
|
|
22878
|
+
return result;
|
|
22879
|
+
}
|
|
22880
|
+
function mergeChildMappings(prev, next) {
|
|
22881
|
+
prev = prev || {};
|
|
22882
|
+
next = next || {};
|
|
22883
|
+
function getValueForKey(key) {
|
|
22884
|
+
return key in next ? next[key] : prev[key];
|
|
22885
|
+
}
|
|
22886
|
+
var nextKeysPending = /* @__PURE__ */ Object.create(null);
|
|
22887
|
+
var pendingKeys = [];
|
|
22888
|
+
for (var prevKey in prev) {
|
|
22889
|
+
if (prevKey in next) {
|
|
22890
|
+
if (pendingKeys.length) {
|
|
22891
|
+
nextKeysPending[prevKey] = pendingKeys;
|
|
22892
|
+
pendingKeys = [];
|
|
22893
|
+
}
|
|
22894
|
+
} else {
|
|
22895
|
+
pendingKeys.push(prevKey);
|
|
22896
|
+
}
|
|
22897
|
+
}
|
|
22898
|
+
var i;
|
|
22899
|
+
var childMapping = {};
|
|
22900
|
+
for (var nextKey in next) {
|
|
22901
|
+
if (nextKeysPending[nextKey]) {
|
|
22902
|
+
for (i = 0; i < nextKeysPending[nextKey].length; i++) {
|
|
22903
|
+
var pendingNextKey = nextKeysPending[nextKey][i];
|
|
22904
|
+
childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
|
|
22905
|
+
}
|
|
22906
|
+
}
|
|
22907
|
+
childMapping[nextKey] = getValueForKey(nextKey);
|
|
22908
|
+
}
|
|
22909
|
+
for (i = 0; i < pendingKeys.length; i++) {
|
|
22910
|
+
childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
|
|
22911
|
+
}
|
|
22912
|
+
return childMapping;
|
|
22913
|
+
}
|
|
22914
|
+
function getProp(child2, prop, props) {
|
|
22915
|
+
return props[prop] != null ? props[prop] : child2.props[prop];
|
|
22916
|
+
}
|
|
22917
|
+
function getInitialChildMapping(props, onExited) {
|
|
22918
|
+
return getChildMapping(props.children, function(child2) {
|
|
22919
|
+
return cloneElement(child2, {
|
|
22920
|
+
onExited: onExited.bind(null, child2),
|
|
22921
|
+
in: true,
|
|
22922
|
+
appear: getProp(child2, "appear", props),
|
|
22923
|
+
enter: getProp(child2, "enter", props),
|
|
22924
|
+
exit: getProp(child2, "exit", props)
|
|
22925
|
+
});
|
|
22926
|
+
});
|
|
22927
|
+
}
|
|
22928
|
+
function getNextChildMapping(nextProps, prevChildMapping, onExited) {
|
|
22929
|
+
var nextChildMapping = getChildMapping(nextProps.children);
|
|
22930
|
+
var children = mergeChildMappings(prevChildMapping, nextChildMapping);
|
|
22931
|
+
Object.keys(children).forEach(function(key) {
|
|
22932
|
+
var child2 = children[key];
|
|
22933
|
+
if (!isValidElement(child2))
|
|
22934
|
+
return;
|
|
22935
|
+
var hasPrev = key in prevChildMapping;
|
|
22936
|
+
var hasNext = key in nextChildMapping;
|
|
22937
|
+
var prevChild = prevChildMapping[key];
|
|
22938
|
+
var isLeaving = isValidElement(prevChild) && !prevChild.props.in;
|
|
22939
|
+
if (hasNext && (!hasPrev || isLeaving)) {
|
|
22940
|
+
children[key] = cloneElement(child2, {
|
|
22941
|
+
onExited: onExited.bind(null, child2),
|
|
22942
|
+
in: true,
|
|
22943
|
+
exit: getProp(child2, "exit", nextProps),
|
|
22944
|
+
enter: getProp(child2, "enter", nextProps)
|
|
22945
|
+
});
|
|
22946
|
+
} else if (!hasNext && hasPrev && !isLeaving) {
|
|
22947
|
+
children[key] = cloneElement(child2, {
|
|
22948
|
+
in: false
|
|
22949
|
+
});
|
|
22950
|
+
} else if (hasNext && hasPrev && isValidElement(prevChild)) {
|
|
22951
|
+
children[key] = cloneElement(child2, {
|
|
22952
|
+
onExited: onExited.bind(null, child2),
|
|
22953
|
+
in: prevChild.props.in,
|
|
22954
|
+
exit: getProp(child2, "exit", nextProps),
|
|
22955
|
+
enter: getProp(child2, "enter", nextProps)
|
|
22956
|
+
});
|
|
22957
|
+
}
|
|
22958
|
+
});
|
|
22959
|
+
return children;
|
|
22960
|
+
}
|
|
22961
|
+
var values = Object.values || function(obj) {
|
|
22962
|
+
return Object.keys(obj).map(function(k) {
|
|
22963
|
+
return obj[k];
|
|
22964
|
+
});
|
|
22965
|
+
};
|
|
22966
|
+
var defaultProps = {
|
|
22967
|
+
component: "div",
|
|
22968
|
+
childFactory: function childFactory(child2) {
|
|
22969
|
+
return child2;
|
|
22970
|
+
}
|
|
22971
|
+
};
|
|
22972
|
+
var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
|
|
22973
|
+
_inheritsLoose(TransitionGroup2, _React$Component);
|
|
22974
|
+
function TransitionGroup2(props, context) {
|
|
22975
|
+
var _this;
|
|
22976
|
+
_this = _React$Component.call(this, props, context) || this;
|
|
22977
|
+
var handleExited = _this.handleExited.bind(_assertThisInitialized(_this));
|
|
22978
|
+
_this.state = {
|
|
22979
|
+
contextValue: {
|
|
22980
|
+
isMounting: true
|
|
22981
|
+
},
|
|
22982
|
+
handleExited,
|
|
22983
|
+
firstRender: true
|
|
22984
|
+
};
|
|
22985
|
+
return _this;
|
|
22986
|
+
}
|
|
22987
|
+
var _proto = TransitionGroup2.prototype;
|
|
22988
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
22989
|
+
this.mounted = true;
|
|
22990
|
+
this.setState({
|
|
22991
|
+
contextValue: {
|
|
22992
|
+
isMounting: false
|
|
22993
|
+
}
|
|
22994
|
+
});
|
|
22995
|
+
};
|
|
22996
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
22997
|
+
this.mounted = false;
|
|
22998
|
+
};
|
|
22999
|
+
TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
|
|
23000
|
+
var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
|
|
23001
|
+
return {
|
|
23002
|
+
children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
|
|
23003
|
+
firstRender: false
|
|
23004
|
+
};
|
|
23005
|
+
};
|
|
23006
|
+
_proto.handleExited = function handleExited(child2, node) {
|
|
23007
|
+
var currentChildMapping = getChildMapping(this.props.children);
|
|
23008
|
+
if (child2.key in currentChildMapping)
|
|
23009
|
+
return;
|
|
23010
|
+
if (child2.props.onExited) {
|
|
23011
|
+
child2.props.onExited(node);
|
|
23012
|
+
}
|
|
23013
|
+
if (this.mounted) {
|
|
23014
|
+
this.setState(function(state) {
|
|
23015
|
+
var children = _extends$1({}, state.children);
|
|
23016
|
+
delete children[child2.key];
|
|
23017
|
+
return {
|
|
23018
|
+
children
|
|
23019
|
+
};
|
|
23020
|
+
});
|
|
23021
|
+
}
|
|
23022
|
+
};
|
|
23023
|
+
_proto.render = function render() {
|
|
23024
|
+
var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose$1(_this$props, ["component", "childFactory"]);
|
|
23025
|
+
var contextValue = this.state.contextValue;
|
|
23026
|
+
var children = values(this.state.children).map(childFactory2);
|
|
23027
|
+
delete props.appear;
|
|
23028
|
+
delete props.enter;
|
|
23029
|
+
delete props.exit;
|
|
23030
|
+
if (Component === null) {
|
|
23031
|
+
return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
|
|
23032
|
+
value: contextValue
|
|
23033
|
+
}, children);
|
|
23034
|
+
}
|
|
23035
|
+
return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
|
|
23036
|
+
value: contextValue
|
|
23037
|
+
}, /* @__PURE__ */ React__default.createElement(Component, props, children));
|
|
23038
|
+
};
|
|
23039
|
+
return TransitionGroup2;
|
|
23040
|
+
}(React__default.Component);
|
|
23041
|
+
TransitionGroup.propTypes = {
|
|
23042
|
+
/**
|
|
23043
|
+
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
|
23044
|
+
* behavior by providing a `component` prop.
|
|
23045
|
+
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
|
23046
|
+
* you can pass in `component={null}`. This is useful if the wrapping div
|
|
23047
|
+
* borks your css styles.
|
|
23048
|
+
*/
|
|
23049
|
+
component: PropTypes.any,
|
|
23050
|
+
/**
|
|
23051
|
+
* A set of `<Transition>` components, that are toggled `in` and out as they
|
|
23052
|
+
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
|
23053
|
+
* remember to spread them through if you are wrapping the `<Transition>` as
|
|
23054
|
+
* with our `<Fade>` example.
|
|
23055
|
+
*
|
|
23056
|
+
* While this component is meant for multiple `Transition` or `CSSTransition`
|
|
23057
|
+
* children, sometimes you may want to have a single transition child with
|
|
23058
|
+
* content that you want to be transitioned out and in when you change it
|
|
23059
|
+
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
|
23060
|
+
* the transition child as you change its content, this will cause
|
|
23061
|
+
* `TransitionGroup` to transition the child out and back in.
|
|
23062
|
+
*/
|
|
23063
|
+
children: PropTypes.node,
|
|
23064
|
+
/**
|
|
23065
|
+
* A convenience prop that enables or disables appear animations
|
|
23066
|
+
* for all children. Note that specifying this will override any defaults set
|
|
23067
|
+
* on individual children Transitions.
|
|
23068
|
+
*/
|
|
23069
|
+
appear: PropTypes.bool,
|
|
23070
|
+
/**
|
|
23071
|
+
* A convenience prop that enables or disables enter animations
|
|
23072
|
+
* for all children. Note that specifying this will override any defaults set
|
|
23073
|
+
* on individual children Transitions.
|
|
23074
|
+
*/
|
|
23075
|
+
enter: PropTypes.bool,
|
|
23076
|
+
/**
|
|
23077
|
+
* A convenience prop that enables or disables exit animations
|
|
23078
|
+
* for all children. Note that specifying this will override any defaults set
|
|
23079
|
+
* on individual children Transitions.
|
|
23080
|
+
*/
|
|
23081
|
+
exit: PropTypes.bool,
|
|
23082
|
+
/**
|
|
23083
|
+
* You may need to apply reactive updates to a child as it is exiting.
|
|
23084
|
+
* This is generally done by using `cloneElement` however in the case of an exiting
|
|
23085
|
+
* child the element has already been removed and not accessible to the consumer.
|
|
23086
|
+
*
|
|
23087
|
+
* If you do need to update a child as it leaves you can provide a `childFactory`
|
|
23088
|
+
* to wrap every child, even the ones that are leaving.
|
|
23089
|
+
*
|
|
23090
|
+
* @type Function(child: ReactElement) -> ReactElement
|
|
23091
|
+
*/
|
|
23092
|
+
childFactory: PropTypes.func
|
|
23093
|
+
};
|
|
23094
|
+
TransitionGroup.defaultProps = defaultProps;
|
|
23095
|
+
const TransitionGroup$1 = TransitionGroup;
|
|
23096
|
+
var useEnhancedEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
|
|
23097
|
+
function Ripple(props) {
|
|
23098
|
+
var classes = props.classes, _props$pulsate = props.pulsate, pulsate = _props$pulsate === void 0 ? false : _props$pulsate, rippleX = props.rippleX, rippleY = props.rippleY, rippleSize = props.rippleSize, inProp = props.in, _props$onExited = props.onExited, onExited = _props$onExited === void 0 ? function() {
|
|
23099
|
+
} : _props$onExited, timeout = props.timeout;
|
|
23100
|
+
var _React$useState = React.useState(false), leaving = _React$useState[0], setLeaving = _React$useState[1];
|
|
23101
|
+
var rippleClassName = clsx(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);
|
|
23102
|
+
var rippleStyles = {
|
|
23103
|
+
width: rippleSize,
|
|
23104
|
+
height: rippleSize,
|
|
23105
|
+
top: -(rippleSize / 2) + rippleY,
|
|
23106
|
+
left: -(rippleSize / 2) + rippleX
|
|
23107
|
+
};
|
|
23108
|
+
var childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);
|
|
23109
|
+
var handleExited = useEventCallback(onExited);
|
|
23110
|
+
useEnhancedEffect(function() {
|
|
23111
|
+
if (!inProp) {
|
|
23112
|
+
setLeaving(true);
|
|
23113
|
+
var timeoutId = setTimeout(handleExited, timeout);
|
|
23114
|
+
return function() {
|
|
23115
|
+
clearTimeout(timeoutId);
|
|
23116
|
+
};
|
|
23117
|
+
}
|
|
23118
|
+
return void 0;
|
|
23119
|
+
}, [handleExited, inProp, timeout]);
|
|
23120
|
+
return /* @__PURE__ */ React.createElement("span", {
|
|
23121
|
+
className: rippleClassName,
|
|
23122
|
+
style: rippleStyles
|
|
23123
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
23124
|
+
className: childClassName
|
|
23125
|
+
}));
|
|
23126
|
+
}
|
|
23127
|
+
Ripple.propTypes = {
|
|
23128
|
+
/**
|
|
23129
|
+
* Override or extend the styles applied to the component.
|
|
23130
|
+
* See [CSS API](#css) below for more details.
|
|
23131
|
+
*/
|
|
23132
|
+
classes: PropTypes.object.isRequired,
|
|
23133
|
+
/**
|
|
23134
|
+
* @ignore - injected from TransitionGroup
|
|
23135
|
+
*/
|
|
23136
|
+
in: PropTypes.bool,
|
|
23137
|
+
/**
|
|
23138
|
+
* @ignore - injected from TransitionGroup
|
|
23139
|
+
*/
|
|
23140
|
+
onExited: PropTypes.func,
|
|
23141
|
+
/**
|
|
23142
|
+
* If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
|
|
23143
|
+
*/
|
|
23144
|
+
pulsate: PropTypes.bool,
|
|
23145
|
+
/**
|
|
23146
|
+
* Diameter of the ripple.
|
|
23147
|
+
*/
|
|
23148
|
+
rippleSize: PropTypes.number,
|
|
23149
|
+
/**
|
|
23150
|
+
* Horizontal position of the ripple center.
|
|
23151
|
+
*/
|
|
23152
|
+
rippleX: PropTypes.number,
|
|
23153
|
+
/**
|
|
23154
|
+
* Vertical position of the ripple center.
|
|
23155
|
+
*/
|
|
23156
|
+
rippleY: PropTypes.number,
|
|
23157
|
+
/**
|
|
23158
|
+
* exit delay
|
|
23159
|
+
*/
|
|
23160
|
+
timeout: PropTypes.number.isRequired
|
|
23161
|
+
};
|
|
23162
|
+
var DURATION = 550;
|
|
23163
|
+
var DELAY_RIPPLE = 80;
|
|
23164
|
+
var styles$6 = function styles2(theme) {
|
|
23165
|
+
return {
|
|
23166
|
+
/* Styles applied to the root element. */
|
|
23167
|
+
root: {
|
|
23168
|
+
overflow: "hidden",
|
|
23169
|
+
pointerEvents: "none",
|
|
23170
|
+
position: "absolute",
|
|
23171
|
+
zIndex: 0,
|
|
23172
|
+
top: 0,
|
|
23173
|
+
right: 0,
|
|
23174
|
+
bottom: 0,
|
|
23175
|
+
left: 0,
|
|
23176
|
+
borderRadius: "inherit"
|
|
23177
|
+
},
|
|
23178
|
+
/* Styles applied to the internal `Ripple` components `ripple` class. */
|
|
23179
|
+
ripple: {
|
|
23180
|
+
opacity: 0,
|
|
23181
|
+
position: "absolute"
|
|
23182
|
+
},
|
|
23183
|
+
/* Styles applied to the internal `Ripple` components `rippleVisible` class. */
|
|
23184
|
+
rippleVisible: {
|
|
23185
|
+
opacity: 0.3,
|
|
23186
|
+
transform: "scale(1)",
|
|
23187
|
+
animation: "$enter ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut)
|
|
23188
|
+
},
|
|
23189
|
+
/* Styles applied to the internal `Ripple` components `ripplePulsate` class. */
|
|
23190
|
+
ripplePulsate: {
|
|
23191
|
+
animationDuration: "".concat(theme.transitions.duration.shorter, "ms")
|
|
23192
|
+
},
|
|
23193
|
+
/* Styles applied to the internal `Ripple` components `child` class. */
|
|
23194
|
+
child: {
|
|
23195
|
+
opacity: 1,
|
|
23196
|
+
display: "block",
|
|
23197
|
+
width: "100%",
|
|
23198
|
+
height: "100%",
|
|
23199
|
+
borderRadius: "50%",
|
|
23200
|
+
backgroundColor: "currentColor"
|
|
23201
|
+
},
|
|
23202
|
+
/* Styles applied to the internal `Ripple` components `childLeaving` class. */
|
|
23203
|
+
childLeaving: {
|
|
23204
|
+
opacity: 0,
|
|
23205
|
+
animation: "$exit ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut)
|
|
23206
|
+
},
|
|
23207
|
+
/* Styles applied to the internal `Ripple` components `childPulsate` class. */
|
|
23208
|
+
childPulsate: {
|
|
23209
|
+
position: "absolute",
|
|
23210
|
+
left: 0,
|
|
23211
|
+
top: 0,
|
|
23212
|
+
animation: "$pulsate 2500ms ".concat(theme.transitions.easing.easeInOut, " 200ms infinite")
|
|
23213
|
+
},
|
|
23214
|
+
"@keyframes enter": {
|
|
23215
|
+
"0%": {
|
|
23216
|
+
transform: "scale(0)",
|
|
23217
|
+
opacity: 0.1
|
|
23218
|
+
},
|
|
23219
|
+
"100%": {
|
|
23220
|
+
transform: "scale(1)",
|
|
23221
|
+
opacity: 0.3
|
|
23222
|
+
}
|
|
23223
|
+
},
|
|
23224
|
+
"@keyframes exit": {
|
|
23225
|
+
"0%": {
|
|
23226
|
+
opacity: 1
|
|
23227
|
+
},
|
|
23228
|
+
"100%": {
|
|
23229
|
+
opacity: 0
|
|
23230
|
+
}
|
|
23231
|
+
},
|
|
23232
|
+
"@keyframes pulsate": {
|
|
23233
|
+
"0%": {
|
|
23234
|
+
transform: "scale(1)"
|
|
23235
|
+
},
|
|
23236
|
+
"50%": {
|
|
23237
|
+
transform: "scale(0.92)"
|
|
23238
|
+
},
|
|
23239
|
+
"100%": {
|
|
23240
|
+
transform: "scale(1)"
|
|
23241
|
+
}
|
|
23242
|
+
}
|
|
23243
|
+
};
|
|
23244
|
+
};
|
|
23245
|
+
var TouchRipple = /* @__PURE__ */ React.forwardRef(function TouchRipple2(props, ref) {
|
|
23246
|
+
var _props$center = props.center, centerProp = _props$center === void 0 ? false : _props$center, classes = props.classes, className = props.className, other = _objectWithoutProperties(props, ["center", "classes", "className"]);
|
|
23247
|
+
var _React$useState = React.useState([]), ripples = _React$useState[0], setRipples = _React$useState[1];
|
|
23248
|
+
var nextKey = React.useRef(0);
|
|
23249
|
+
var rippleCallback = React.useRef(null);
|
|
23250
|
+
React.useEffect(function() {
|
|
23251
|
+
if (rippleCallback.current) {
|
|
23252
|
+
rippleCallback.current();
|
|
23253
|
+
rippleCallback.current = null;
|
|
23254
|
+
}
|
|
23255
|
+
}, [ripples]);
|
|
23256
|
+
var ignoringMouseDown = React.useRef(false);
|
|
23257
|
+
var startTimer = React.useRef(null);
|
|
23258
|
+
var startTimerCommit = React.useRef(null);
|
|
23259
|
+
var container = React.useRef(null);
|
|
23260
|
+
React.useEffect(function() {
|
|
23261
|
+
return function() {
|
|
23262
|
+
clearTimeout(startTimer.current);
|
|
23263
|
+
};
|
|
23264
|
+
}, []);
|
|
23265
|
+
var startCommit = React.useCallback(function(params) {
|
|
23266
|
+
var pulsate2 = params.pulsate, rippleX = params.rippleX, rippleY = params.rippleY, rippleSize = params.rippleSize, cb = params.cb;
|
|
23267
|
+
setRipples(function(oldRipples) {
|
|
23268
|
+
return [].concat(_toConsumableArray$1(oldRipples), [/* @__PURE__ */ React.createElement(Ripple, {
|
|
23269
|
+
key: nextKey.current,
|
|
23270
|
+
classes,
|
|
23271
|
+
timeout: DURATION,
|
|
23272
|
+
pulsate: pulsate2,
|
|
23273
|
+
rippleX,
|
|
23274
|
+
rippleY,
|
|
23275
|
+
rippleSize
|
|
23276
|
+
})]);
|
|
23277
|
+
});
|
|
23278
|
+
nextKey.current += 1;
|
|
23279
|
+
rippleCallback.current = cb;
|
|
23280
|
+
}, [classes]);
|
|
23281
|
+
var start = React.useCallback(function() {
|
|
23282
|
+
var event = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23283
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
23284
|
+
var cb = arguments.length > 2 ? arguments[2] : void 0;
|
|
23285
|
+
var _options$pulsate = options.pulsate, pulsate2 = _options$pulsate === void 0 ? false : _options$pulsate, _options$center = options.center, center = _options$center === void 0 ? centerProp || options.pulsate : _options$center, _options$fakeElement = options.fakeElement, fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;
|
|
23286
|
+
if (event.type === "mousedown" && ignoringMouseDown.current) {
|
|
23287
|
+
ignoringMouseDown.current = false;
|
|
23288
|
+
return;
|
|
23289
|
+
}
|
|
23290
|
+
if (event.type === "touchstart") {
|
|
23291
|
+
ignoringMouseDown.current = true;
|
|
23292
|
+
}
|
|
23293
|
+
var element = fakeElement ? null : container.current;
|
|
23294
|
+
var rect = element ? element.getBoundingClientRect() : {
|
|
23295
|
+
width: 0,
|
|
23296
|
+
height: 0,
|
|
23297
|
+
left: 0,
|
|
23298
|
+
top: 0
|
|
23299
|
+
};
|
|
23300
|
+
var rippleX;
|
|
23301
|
+
var rippleY;
|
|
23302
|
+
var rippleSize;
|
|
23303
|
+
if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
|
|
23304
|
+
rippleX = Math.round(rect.width / 2);
|
|
23305
|
+
rippleY = Math.round(rect.height / 2);
|
|
23306
|
+
} else {
|
|
23307
|
+
var _ref = event.touches ? event.touches[0] : event, clientX = _ref.clientX, clientY = _ref.clientY;
|
|
23308
|
+
rippleX = Math.round(clientX - rect.left);
|
|
23309
|
+
rippleY = Math.round(clientY - rect.top);
|
|
23310
|
+
}
|
|
23311
|
+
if (center) {
|
|
23312
|
+
rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3);
|
|
23313
|
+
if (rippleSize % 2 === 0) {
|
|
23314
|
+
rippleSize += 1;
|
|
23315
|
+
}
|
|
23316
|
+
} else {
|
|
23317
|
+
var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;
|
|
23318
|
+
var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;
|
|
23319
|
+
rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));
|
|
23320
|
+
}
|
|
23321
|
+
if (event.touches) {
|
|
23322
|
+
if (startTimerCommit.current === null) {
|
|
23323
|
+
startTimerCommit.current = function() {
|
|
23324
|
+
startCommit({
|
|
23325
|
+
pulsate: pulsate2,
|
|
23326
|
+
rippleX,
|
|
23327
|
+
rippleY,
|
|
23328
|
+
rippleSize,
|
|
23329
|
+
cb
|
|
23330
|
+
});
|
|
23331
|
+
};
|
|
23332
|
+
startTimer.current = setTimeout(function() {
|
|
23333
|
+
if (startTimerCommit.current) {
|
|
23334
|
+
startTimerCommit.current();
|
|
23335
|
+
startTimerCommit.current = null;
|
|
23336
|
+
}
|
|
23337
|
+
}, DELAY_RIPPLE);
|
|
23338
|
+
}
|
|
23339
|
+
} else {
|
|
23340
|
+
startCommit({
|
|
23341
|
+
pulsate: pulsate2,
|
|
23342
|
+
rippleX,
|
|
23343
|
+
rippleY,
|
|
23344
|
+
rippleSize,
|
|
23345
|
+
cb
|
|
23346
|
+
});
|
|
23347
|
+
}
|
|
23348
|
+
}, [centerProp, startCommit]);
|
|
23349
|
+
var pulsate = React.useCallback(function() {
|
|
23350
|
+
start({}, {
|
|
23351
|
+
pulsate: true
|
|
23352
|
+
});
|
|
23353
|
+
}, [start]);
|
|
23354
|
+
var stop = React.useCallback(function(event, cb) {
|
|
23355
|
+
clearTimeout(startTimer.current);
|
|
23356
|
+
if (event.type === "touchend" && startTimerCommit.current) {
|
|
23357
|
+
event.persist();
|
|
23358
|
+
startTimerCommit.current();
|
|
23359
|
+
startTimerCommit.current = null;
|
|
23360
|
+
startTimer.current = setTimeout(function() {
|
|
23361
|
+
stop(event, cb);
|
|
23362
|
+
});
|
|
23363
|
+
return;
|
|
23364
|
+
}
|
|
23365
|
+
startTimerCommit.current = null;
|
|
23366
|
+
setRipples(function(oldRipples) {
|
|
23367
|
+
if (oldRipples.length > 0) {
|
|
23368
|
+
return oldRipples.slice(1);
|
|
23369
|
+
}
|
|
23370
|
+
return oldRipples;
|
|
23371
|
+
});
|
|
23372
|
+
rippleCallback.current = cb;
|
|
23373
|
+
}, []);
|
|
23374
|
+
React.useImperativeHandle(ref, function() {
|
|
23375
|
+
return {
|
|
23376
|
+
pulsate,
|
|
23377
|
+
start,
|
|
23378
|
+
stop
|
|
23379
|
+
};
|
|
23380
|
+
}, [pulsate, start, stop]);
|
|
23381
|
+
return /* @__PURE__ */ React.createElement("span", _extends$1({
|
|
23382
|
+
className: clsx(classes.root, className),
|
|
23383
|
+
ref: container
|
|
23384
|
+
}, other), /* @__PURE__ */ React.createElement(TransitionGroup$1, {
|
|
23385
|
+
component: null,
|
|
23386
|
+
exit: true
|
|
23387
|
+
}, ripples));
|
|
23388
|
+
});
|
|
23389
|
+
TouchRipple.propTypes = {
|
|
23390
|
+
/**
|
|
23391
|
+
* If `true`, the ripple starts at the center of the component
|
|
23392
|
+
* rather than at the point of interaction.
|
|
23393
|
+
*/
|
|
23394
|
+
center: PropTypes.bool,
|
|
23395
|
+
/**
|
|
23396
|
+
* Override or extend the styles applied to the component.
|
|
23397
|
+
* See [CSS API](#css) below for more details.
|
|
23398
|
+
*/
|
|
23399
|
+
classes: PropTypes.object.isRequired,
|
|
23400
|
+
/**
|
|
23401
|
+
* @ignore
|
|
23402
|
+
*/
|
|
23403
|
+
className: PropTypes.string
|
|
23404
|
+
};
|
|
23405
|
+
const TouchRipple$1 = withStyles2(styles$6, {
|
|
23406
|
+
flip: false,
|
|
23407
|
+
name: "MuiTouchRipple"
|
|
23408
|
+
})(/* @__PURE__ */ React.memo(TouchRipple));
|
|
23409
|
+
var styles$5 = {
|
|
23410
|
+
/* Styles applied to the root element. */
|
|
23411
|
+
root: {
|
|
23412
|
+
display: "inline-flex",
|
|
23413
|
+
alignItems: "center",
|
|
23414
|
+
justifyContent: "center",
|
|
23415
|
+
position: "relative",
|
|
23416
|
+
WebkitTapHighlightColor: "transparent",
|
|
23417
|
+
backgroundColor: "transparent",
|
|
23418
|
+
// Reset default value
|
|
23419
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
23420
|
+
outline: 0,
|
|
23421
|
+
border: 0,
|
|
23422
|
+
margin: 0,
|
|
23423
|
+
// Remove the margin in Safari
|
|
23424
|
+
borderRadius: 0,
|
|
23425
|
+
padding: 0,
|
|
23426
|
+
// Remove the padding in Firefox
|
|
23427
|
+
cursor: "pointer",
|
|
23428
|
+
userSelect: "none",
|
|
23429
|
+
verticalAlign: "middle",
|
|
23430
|
+
"-moz-appearance": "none",
|
|
23431
|
+
// Reset
|
|
23432
|
+
"-webkit-appearance": "none",
|
|
23433
|
+
// Reset
|
|
23434
|
+
textDecoration: "none",
|
|
23435
|
+
// So we take precedent over the style of a native <a /> element.
|
|
23436
|
+
color: "inherit",
|
|
23437
|
+
"&::-moz-focus-inner": {
|
|
23438
|
+
borderStyle: "none"
|
|
23439
|
+
// Remove Firefox dotted outline.
|
|
23440
|
+
},
|
|
23441
|
+
"&$disabled": {
|
|
23442
|
+
pointerEvents: "none",
|
|
23443
|
+
// Disable link interactions
|
|
23444
|
+
cursor: "default"
|
|
23445
|
+
},
|
|
23446
|
+
"@media print": {
|
|
23447
|
+
colorAdjust: "exact"
|
|
23448
|
+
}
|
|
23449
|
+
},
|
|
23450
|
+
/* Pseudo-class applied to the root element if `disabled={true}`. */
|
|
23451
|
+
disabled: {},
|
|
23452
|
+
/* Pseudo-class applied to the root element if keyboard focused. */
|
|
23453
|
+
focusVisible: {}
|
|
23454
|
+
};
|
|
23455
|
+
var ButtonBase = /* @__PURE__ */ React.forwardRef(function ButtonBase2(props, ref) {
|
|
23456
|
+
var action = props.action, buttonRefProp = props.buttonRef, _props$centerRipple = props.centerRipple, centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple, children = props.children, classes = props.classes, className = props.className, _props$component = props.component, component = _props$component === void 0 ? "button" : _props$component, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$disableRipple = props.disableRipple, disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple, _props$disableTouchRi = props.disableTouchRipple, disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi, _props$focusRipple = props.focusRipple, focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple, focusVisibleClassName = props.focusVisibleClassName, onBlur = props.onBlur, onClick = props.onClick, onFocus = props.onFocus, onFocusVisible = props.onFocusVisible, onKeyDown = props.onKeyDown, onKeyUp = props.onKeyUp, onMouseDown = props.onMouseDown, onMouseLeave = props.onMouseLeave, onMouseUp = props.onMouseUp, onTouchEnd = props.onTouchEnd, onTouchMove = props.onTouchMove, onTouchStart = props.onTouchStart, onDragLeave = props.onDragLeave, _props$tabIndex = props.tabIndex, tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, TouchRippleProps = props.TouchRippleProps, _props$type = props.type, type = _props$type === void 0 ? "button" : _props$type, other = _objectWithoutProperties(props, ["action", "buttonRef", "centerRipple", "children", "classes", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "onBlur", "onClick", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "onDragLeave", "tabIndex", "TouchRippleProps", "type"]);
|
|
23457
|
+
var buttonRef = React.useRef(null);
|
|
23458
|
+
function getButtonNode() {
|
|
23459
|
+
return ReactDOM.findDOMNode(buttonRef.current);
|
|
23460
|
+
}
|
|
23461
|
+
var rippleRef = React.useRef(null);
|
|
23462
|
+
var _React$useState = React.useState(false), focusVisible = _React$useState[0], setFocusVisible = _React$useState[1];
|
|
23463
|
+
if (disabled && focusVisible) {
|
|
23464
|
+
setFocusVisible(false);
|
|
23465
|
+
}
|
|
23466
|
+
var _useIsFocusVisible = useIsFocusVisible(), isFocusVisible2 = _useIsFocusVisible.isFocusVisible, onBlurVisible = _useIsFocusVisible.onBlurVisible, focusVisibleRef = _useIsFocusVisible.ref;
|
|
23467
|
+
React.useImperativeHandle(action, function() {
|
|
23468
|
+
return {
|
|
23469
|
+
focusVisible: function focusVisible2() {
|
|
23470
|
+
setFocusVisible(true);
|
|
23471
|
+
buttonRef.current.focus();
|
|
23472
|
+
}
|
|
23473
|
+
};
|
|
23474
|
+
}, []);
|
|
23475
|
+
React.useEffect(function() {
|
|
23476
|
+
if (focusVisible && focusRipple && !disableRipple) {
|
|
23477
|
+
rippleRef.current.pulsate();
|
|
23478
|
+
}
|
|
23479
|
+
}, [disableRipple, focusRipple, focusVisible]);
|
|
23480
|
+
function useRippleHandler(rippleAction, eventCallback) {
|
|
23481
|
+
var skipRippleAction = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : disableTouchRipple;
|
|
23482
|
+
return useEventCallback(function(event) {
|
|
23483
|
+
if (eventCallback) {
|
|
23484
|
+
eventCallback(event);
|
|
23485
|
+
}
|
|
23486
|
+
var ignore = skipRippleAction;
|
|
23487
|
+
if (!ignore && rippleRef.current) {
|
|
23488
|
+
rippleRef.current[rippleAction](event);
|
|
23489
|
+
}
|
|
23490
|
+
return true;
|
|
23491
|
+
});
|
|
23492
|
+
}
|
|
23493
|
+
var handleMouseDown = useRippleHandler("start", onMouseDown);
|
|
23494
|
+
var handleDragLeave = useRippleHandler("stop", onDragLeave);
|
|
23495
|
+
var handleMouseUp = useRippleHandler("stop", onMouseUp);
|
|
23496
|
+
var handleMouseLeave = useRippleHandler("stop", function(event) {
|
|
23497
|
+
if (focusVisible) {
|
|
23498
|
+
event.preventDefault();
|
|
23499
|
+
}
|
|
23500
|
+
if (onMouseLeave) {
|
|
23501
|
+
onMouseLeave(event);
|
|
23502
|
+
}
|
|
23503
|
+
});
|
|
23504
|
+
var handleTouchStart = useRippleHandler("start", onTouchStart);
|
|
23505
|
+
var handleTouchEnd = useRippleHandler("stop", onTouchEnd);
|
|
23506
|
+
var handleTouchMove = useRippleHandler("stop", onTouchMove);
|
|
23507
|
+
var handleBlur = useRippleHandler("stop", function(event) {
|
|
23508
|
+
if (focusVisible) {
|
|
23509
|
+
onBlurVisible(event);
|
|
23510
|
+
setFocusVisible(false);
|
|
23511
|
+
}
|
|
23512
|
+
if (onBlur) {
|
|
23513
|
+
onBlur(event);
|
|
23514
|
+
}
|
|
23515
|
+
}, false);
|
|
23516
|
+
var handleFocus = useEventCallback(function(event) {
|
|
23517
|
+
if (!buttonRef.current) {
|
|
23518
|
+
buttonRef.current = event.currentTarget;
|
|
23519
|
+
}
|
|
23520
|
+
if (isFocusVisible2(event)) {
|
|
23521
|
+
setFocusVisible(true);
|
|
23522
|
+
if (onFocusVisible) {
|
|
23523
|
+
onFocusVisible(event);
|
|
23524
|
+
}
|
|
23525
|
+
}
|
|
23526
|
+
if (onFocus) {
|
|
23527
|
+
onFocus(event);
|
|
23528
|
+
}
|
|
23529
|
+
});
|
|
23530
|
+
var isNonNativeButton = function isNonNativeButton2() {
|
|
23531
|
+
var button = getButtonNode();
|
|
23532
|
+
return component && component !== "button" && !(button.tagName === "A" && button.href);
|
|
23533
|
+
};
|
|
23534
|
+
var keydownRef = React.useRef(false);
|
|
23535
|
+
var handleKeyDown2 = useEventCallback(function(event) {
|
|
23536
|
+
if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === " ") {
|
|
23537
|
+
keydownRef.current = true;
|
|
23538
|
+
event.persist();
|
|
23539
|
+
rippleRef.current.stop(event, function() {
|
|
23540
|
+
rippleRef.current.start(event);
|
|
23541
|
+
});
|
|
23542
|
+
}
|
|
23543
|
+
if (event.target === event.currentTarget && isNonNativeButton() && event.key === " ") {
|
|
23544
|
+
event.preventDefault();
|
|
23545
|
+
}
|
|
23546
|
+
if (onKeyDown) {
|
|
23547
|
+
onKeyDown(event);
|
|
23548
|
+
}
|
|
23549
|
+
if (event.target === event.currentTarget && isNonNativeButton() && event.key === "Enter" && !disabled) {
|
|
23550
|
+
event.preventDefault();
|
|
23551
|
+
if (onClick) {
|
|
23552
|
+
onClick(event);
|
|
23553
|
+
}
|
|
23554
|
+
}
|
|
23555
|
+
});
|
|
23556
|
+
var handleKeyUp = useEventCallback(function(event) {
|
|
23557
|
+
if (focusRipple && event.key === " " && rippleRef.current && focusVisible && !event.defaultPrevented) {
|
|
23558
|
+
keydownRef.current = false;
|
|
23559
|
+
event.persist();
|
|
23560
|
+
rippleRef.current.stop(event, function() {
|
|
23561
|
+
rippleRef.current.pulsate(event);
|
|
23562
|
+
});
|
|
23563
|
+
}
|
|
23564
|
+
if (onKeyUp) {
|
|
23565
|
+
onKeyUp(event);
|
|
23566
|
+
}
|
|
23567
|
+
if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === " " && !event.defaultPrevented) {
|
|
23568
|
+
onClick(event);
|
|
23569
|
+
}
|
|
23570
|
+
});
|
|
23571
|
+
var ComponentProp = component;
|
|
23572
|
+
if (ComponentProp === "button" && other.href) {
|
|
23573
|
+
ComponentProp = "a";
|
|
23574
|
+
}
|
|
23575
|
+
var buttonProps = {};
|
|
23576
|
+
if (ComponentProp === "button") {
|
|
23577
|
+
buttonProps.type = type;
|
|
23578
|
+
buttonProps.disabled = disabled;
|
|
23579
|
+
} else {
|
|
23580
|
+
if (ComponentProp !== "a" || !other.href) {
|
|
23581
|
+
buttonProps.role = "button";
|
|
23582
|
+
}
|
|
23583
|
+
buttonProps["aria-disabled"] = disabled;
|
|
23584
|
+
}
|
|
23585
|
+
var handleUserRef = useForkRef(buttonRefProp, ref);
|
|
23586
|
+
var handleOwnRef = useForkRef(focusVisibleRef, buttonRef);
|
|
23587
|
+
var handleRef = useForkRef(handleUserRef, handleOwnRef);
|
|
23588
|
+
var _React$useState2 = React.useState(false), mountedState = _React$useState2[0], setMountedState = _React$useState2[1];
|
|
23589
|
+
React.useEffect(function() {
|
|
23590
|
+
setMountedState(true);
|
|
23591
|
+
}, []);
|
|
23592
|
+
var enableTouchRipple = mountedState && !disableRipple && !disabled;
|
|
23593
|
+
{
|
|
23594
|
+
React.useEffect(function() {
|
|
23595
|
+
if (enableTouchRipple && !rippleRef.current) {
|
|
23596
|
+
console.error(["Material-UI: The `component` prop provided to ButtonBase is invalid.", "Please make sure the children prop is rendered in this custom component."].join("\n"));
|
|
23597
|
+
}
|
|
23598
|
+
}, [enableTouchRipple]);
|
|
23599
|
+
}
|
|
23600
|
+
return /* @__PURE__ */ React.createElement(ComponentProp, _extends$1({
|
|
23601
|
+
className: clsx(classes.root, className, focusVisible && [classes.focusVisible, focusVisibleClassName], disabled && classes.disabled),
|
|
23602
|
+
onBlur: handleBlur,
|
|
23603
|
+
onClick,
|
|
23604
|
+
onFocus: handleFocus,
|
|
23605
|
+
onKeyDown: handleKeyDown2,
|
|
23606
|
+
onKeyUp: handleKeyUp,
|
|
23607
|
+
onMouseDown: handleMouseDown,
|
|
23608
|
+
onMouseLeave: handleMouseLeave,
|
|
23609
|
+
onMouseUp: handleMouseUp,
|
|
23610
|
+
onDragLeave: handleDragLeave,
|
|
23611
|
+
onTouchEnd: handleTouchEnd,
|
|
23612
|
+
onTouchMove: handleTouchMove,
|
|
23613
|
+
onTouchStart: handleTouchStart,
|
|
23614
|
+
ref: handleRef,
|
|
23615
|
+
tabIndex: disabled ? -1 : tabIndex
|
|
23616
|
+
}, buttonProps, other), children, enableTouchRipple ? (
|
|
23617
|
+
/* TouchRipple is only needed client-side, x2 boost on the server. */
|
|
23618
|
+
/* @__PURE__ */ React.createElement(TouchRipple$1, _extends$1({
|
|
23619
|
+
ref: rippleRef,
|
|
23620
|
+
center: centerRipple
|
|
23621
|
+
}, TouchRippleProps))
|
|
23622
|
+
) : null);
|
|
23623
|
+
});
|
|
23624
|
+
ButtonBase.propTypes = {
|
|
23625
|
+
// ----------------------------- Warning --------------------------------
|
|
23626
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
23627
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
23628
|
+
// ----------------------------------------------------------------------
|
|
23629
|
+
/**
|
|
23630
|
+
* A ref for imperative actions.
|
|
23631
|
+
* It currently only supports `focusVisible()` action.
|
|
23632
|
+
*/
|
|
23633
|
+
action: refType$1,
|
|
23634
|
+
/**
|
|
23635
|
+
* @ignore
|
|
23636
|
+
*
|
|
23637
|
+
* Use that prop to pass a ref to the native button component.
|
|
23638
|
+
* @deprecated Use `ref` instead.
|
|
23639
|
+
*/
|
|
23640
|
+
buttonRef: deprecatedPropType(refType$1, "Use `ref` instead."),
|
|
23641
|
+
/**
|
|
23642
|
+
* If `true`, the ripples will be centered.
|
|
23643
|
+
* They won't start at the cursor interaction position.
|
|
23644
|
+
*/
|
|
23645
|
+
centerRipple: PropTypes.bool,
|
|
23646
|
+
/**
|
|
23647
|
+
* The content of the component.
|
|
23648
|
+
*/
|
|
23649
|
+
children: PropTypes.node,
|
|
23650
|
+
/**
|
|
23651
|
+
* Override or extend the styles applied to the component.
|
|
23652
|
+
* See [CSS API](#css) below for more details.
|
|
23653
|
+
*/
|
|
23654
|
+
classes: PropTypes.object,
|
|
23655
|
+
/**
|
|
23656
|
+
* @ignore
|
|
23657
|
+
*/
|
|
23658
|
+
className: PropTypes.string,
|
|
23659
|
+
/**
|
|
23660
|
+
* The component used for the root node.
|
|
23661
|
+
* Either a string to use a HTML element or a component.
|
|
23662
|
+
*/
|
|
23663
|
+
component: elementTypeAcceptingRef$1,
|
|
23664
|
+
/**
|
|
23665
|
+
* If `true`, the base button will be disabled.
|
|
23666
|
+
*/
|
|
23667
|
+
disabled: PropTypes.bool,
|
|
23668
|
+
/**
|
|
23669
|
+
* If `true`, the ripple effect will be disabled.
|
|
23670
|
+
*
|
|
23671
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
23672
|
+
* to highlight the element by applying separate styles with the `focusVisibleClassName`.
|
|
23673
|
+
*/
|
|
23674
|
+
disableRipple: PropTypes.bool,
|
|
23675
|
+
/**
|
|
23676
|
+
* If `true`, the touch ripple effect will be disabled.
|
|
23677
|
+
*/
|
|
23678
|
+
disableTouchRipple: PropTypes.bool,
|
|
23679
|
+
/**
|
|
23680
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
|
23681
|
+
*/
|
|
23682
|
+
focusRipple: PropTypes.bool,
|
|
23683
|
+
/**
|
|
23684
|
+
* This prop can help identify which element has keyboard focus.
|
|
23685
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
23686
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
23687
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).
|
|
23688
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
23689
|
+
* if needed.
|
|
23690
|
+
*/
|
|
23691
|
+
focusVisibleClassName: PropTypes.string,
|
|
23692
|
+
/**
|
|
23693
|
+
* @ignore
|
|
23694
|
+
*/
|
|
23695
|
+
href: PropTypes.string,
|
|
23696
|
+
/**
|
|
23697
|
+
* @ignore
|
|
23698
|
+
*/
|
|
23699
|
+
onBlur: PropTypes.func,
|
|
23700
|
+
/**
|
|
23701
|
+
* @ignore
|
|
23702
|
+
*/
|
|
23703
|
+
onClick: PropTypes.func,
|
|
23704
|
+
/**
|
|
23705
|
+
* @ignore
|
|
23706
|
+
*/
|
|
23707
|
+
onDragLeave: PropTypes.func,
|
|
23708
|
+
/**
|
|
23709
|
+
* @ignore
|
|
23710
|
+
*/
|
|
23711
|
+
onFocus: PropTypes.func,
|
|
23712
|
+
/**
|
|
23713
|
+
* Callback fired when the component is focused with a keyboard.
|
|
23714
|
+
* We trigger a `onFocus` callback too.
|
|
23715
|
+
*/
|
|
23716
|
+
onFocusVisible: PropTypes.func,
|
|
23717
|
+
/**
|
|
23718
|
+
* @ignore
|
|
23719
|
+
*/
|
|
23720
|
+
onKeyDown: PropTypes.func,
|
|
23721
|
+
/**
|
|
23722
|
+
* @ignore
|
|
23723
|
+
*/
|
|
23724
|
+
onKeyUp: PropTypes.func,
|
|
23725
|
+
/**
|
|
23726
|
+
* @ignore
|
|
23727
|
+
*/
|
|
23728
|
+
onMouseDown: PropTypes.func,
|
|
23729
|
+
/**
|
|
23730
|
+
* @ignore
|
|
23731
|
+
*/
|
|
23732
|
+
onMouseLeave: PropTypes.func,
|
|
23733
|
+
/**
|
|
23734
|
+
* @ignore
|
|
23735
|
+
*/
|
|
23736
|
+
onMouseUp: PropTypes.func,
|
|
23737
|
+
/**
|
|
23738
|
+
* @ignore
|
|
23739
|
+
*/
|
|
23740
|
+
onTouchEnd: PropTypes.func,
|
|
23741
|
+
/**
|
|
23742
|
+
* @ignore
|
|
23743
|
+
*/
|
|
23744
|
+
onTouchMove: PropTypes.func,
|
|
23745
|
+
/**
|
|
23746
|
+
* @ignore
|
|
23747
|
+
*/
|
|
23748
|
+
onTouchStart: PropTypes.func,
|
|
23749
|
+
/**
|
|
23750
|
+
* @ignore
|
|
23751
|
+
*/
|
|
23752
|
+
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
23753
|
+
/**
|
|
23754
|
+
* Props applied to the `TouchRipple` element.
|
|
23755
|
+
*/
|
|
23756
|
+
TouchRippleProps: PropTypes.object,
|
|
23757
|
+
/**
|
|
23758
|
+
* @ignore
|
|
23759
|
+
*/
|
|
23760
|
+
type: PropTypes.oneOfType([PropTypes.oneOf(["button", "reset", "submit"]), PropTypes.string])
|
|
23761
|
+
};
|
|
23762
|
+
const ButtonBase$1 = withStyles2(styles$5, {
|
|
23763
|
+
name: "MuiButtonBase"
|
|
23764
|
+
})(ButtonBase);
|
|
23765
|
+
var styles$4 = function styles3(theme) {
|
|
23766
|
+
return {
|
|
23767
|
+
/* Styles applied to the root element. */
|
|
23768
|
+
root: {
|
|
23769
|
+
textAlign: "center",
|
|
23770
|
+
flex: "0 0 auto",
|
|
23771
|
+
fontSize: theme.typography.pxToRem(24),
|
|
23772
|
+
padding: 12,
|
|
23773
|
+
borderRadius: "50%",
|
|
23774
|
+
overflow: "visible",
|
|
23775
|
+
// Explicitly set the default value to solve a bug on IE 11.
|
|
23776
|
+
color: theme.palette.action.active,
|
|
23777
|
+
transition: theme.transitions.create("background-color", {
|
|
23778
|
+
duration: theme.transitions.duration.shortest
|
|
23779
|
+
}),
|
|
23780
|
+
"&:hover": {
|
|
23781
|
+
backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
23782
|
+
// Reset on touch devices, it doesn't add specificity
|
|
23783
|
+
"@media (hover: none)": {
|
|
23784
|
+
backgroundColor: "transparent"
|
|
23785
|
+
}
|
|
23786
|
+
},
|
|
23787
|
+
"&$disabled": {
|
|
23788
|
+
backgroundColor: "transparent",
|
|
23789
|
+
color: theme.palette.action.disabled
|
|
23790
|
+
}
|
|
23791
|
+
},
|
|
23792
|
+
/* Styles applied to the root element if `edge="start"`. */
|
|
23793
|
+
edgeStart: {
|
|
23794
|
+
marginLeft: -12,
|
|
23795
|
+
"$sizeSmall&": {
|
|
23796
|
+
marginLeft: -3
|
|
23797
|
+
}
|
|
23798
|
+
},
|
|
23799
|
+
/* Styles applied to the root element if `edge="end"`. */
|
|
23800
|
+
edgeEnd: {
|
|
23801
|
+
marginRight: -12,
|
|
23802
|
+
"$sizeSmall&": {
|
|
23803
|
+
marginRight: -3
|
|
23804
|
+
}
|
|
23805
|
+
},
|
|
23806
|
+
/* Styles applied to the root element if `color="inherit"`. */
|
|
23807
|
+
colorInherit: {
|
|
23808
|
+
color: "inherit"
|
|
23809
|
+
},
|
|
23810
|
+
/* Styles applied to the root element if `color="primary"`. */
|
|
23811
|
+
colorPrimary: {
|
|
23812
|
+
color: theme.palette.primary.main,
|
|
23813
|
+
"&:hover": {
|
|
23814
|
+
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
|
23815
|
+
// Reset on touch devices, it doesn't add specificity
|
|
23816
|
+
"@media (hover: none)": {
|
|
23817
|
+
backgroundColor: "transparent"
|
|
23818
|
+
}
|
|
23819
|
+
}
|
|
23820
|
+
},
|
|
23821
|
+
/* Styles applied to the root element if `color="secondary"`. */
|
|
23822
|
+
colorSecondary: {
|
|
23823
|
+
color: theme.palette.secondary.main,
|
|
23824
|
+
"&:hover": {
|
|
23825
|
+
backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),
|
|
23826
|
+
// Reset on touch devices, it doesn't add specificity
|
|
23827
|
+
"@media (hover: none)": {
|
|
23828
|
+
backgroundColor: "transparent"
|
|
23829
|
+
}
|
|
23830
|
+
}
|
|
23831
|
+
},
|
|
23832
|
+
/* Pseudo-class applied to the root element if `disabled={true}`. */
|
|
23833
|
+
disabled: {},
|
|
23834
|
+
/* Styles applied to the root element if `size="small"`. */
|
|
23835
|
+
sizeSmall: {
|
|
23836
|
+
padding: 3,
|
|
23837
|
+
fontSize: theme.typography.pxToRem(18)
|
|
23838
|
+
},
|
|
23839
|
+
/* Styles applied to the children container element. */
|
|
23840
|
+
label: {
|
|
23841
|
+
width: "100%",
|
|
23842
|
+
display: "flex",
|
|
23843
|
+
alignItems: "inherit",
|
|
23844
|
+
justifyContent: "inherit"
|
|
23845
|
+
}
|
|
23846
|
+
};
|
|
23847
|
+
};
|
|
23848
|
+
var IconButton = /* @__PURE__ */ React.forwardRef(function IconButton2(props, ref) {
|
|
23849
|
+
var _props$edge = props.edge, edge = _props$edge === void 0 ? false : _props$edge, children = props.children, classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? "default" : _props$color, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$disableFocusRi = props.disableFocusRipple, disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi, _props$size = props.size, size2 = _props$size === void 0 ? "medium" : _props$size, other = _objectWithoutProperties(props, ["edge", "children", "classes", "className", "color", "disabled", "disableFocusRipple", "size"]);
|
|
23850
|
+
return /* @__PURE__ */ React.createElement(ButtonBase$1, _extends$1({
|
|
23851
|
+
className: clsx(classes.root, className, color !== "default" && classes["color".concat(capitalize(color))], disabled && classes.disabled, size2 === "small" && classes["size".concat(capitalize(size2))], {
|
|
23852
|
+
"start": classes.edgeStart,
|
|
23853
|
+
"end": classes.edgeEnd
|
|
23854
|
+
}[edge]),
|
|
23855
|
+
centerRipple: true,
|
|
23856
|
+
focusRipple: !disableFocusRipple,
|
|
23857
|
+
disabled,
|
|
23858
|
+
ref
|
|
23859
|
+
}, other), /* @__PURE__ */ React.createElement("span", {
|
|
23860
|
+
className: classes.label
|
|
23861
|
+
}, children));
|
|
23862
|
+
});
|
|
23863
|
+
IconButton.propTypes = {
|
|
23864
|
+
/**
|
|
23865
|
+
* The icon element.
|
|
23866
|
+
*/
|
|
23867
|
+
children: chainPropTypes(PropTypes.node, function(props) {
|
|
23868
|
+
var found = React.Children.toArray(props.children).some(function(child2) {
|
|
23869
|
+
return /* @__PURE__ */ React.isValidElement(child2) && child2.props.onClick;
|
|
23870
|
+
});
|
|
23871
|
+
if (found) {
|
|
23872
|
+
return new Error(["Material-UI: You are providing an onClick event listener to a child of a button element.", "Firefox will never trigger the event.", "You should move the onClick listener to the parent button element.", "https://github.com/mui-org/material-ui/issues/13957"].join("\n"));
|
|
23873
|
+
}
|
|
23874
|
+
return null;
|
|
23875
|
+
}),
|
|
23876
|
+
/**
|
|
23877
|
+
* Override or extend the styles applied to the component.
|
|
23878
|
+
* See [CSS API](#css) below for more details.
|
|
23879
|
+
*/
|
|
23880
|
+
classes: PropTypes.object.isRequired,
|
|
23881
|
+
/**
|
|
23882
|
+
* @ignore
|
|
23883
|
+
*/
|
|
23884
|
+
className: PropTypes.string,
|
|
23885
|
+
/**
|
|
23886
|
+
* The color of the component. It supports those theme colors that make sense for this component.
|
|
23887
|
+
*/
|
|
23888
|
+
color: PropTypes.oneOf(["default", "inherit", "primary", "secondary"]),
|
|
23889
|
+
/**
|
|
23890
|
+
* If `true`, the button will be disabled.
|
|
23891
|
+
*/
|
|
23892
|
+
disabled: PropTypes.bool,
|
|
23893
|
+
/**
|
|
23894
|
+
* If `true`, the keyboard focus ripple will be disabled.
|
|
23895
|
+
*/
|
|
23896
|
+
disableFocusRipple: PropTypes.bool,
|
|
23897
|
+
/**
|
|
23898
|
+
* If `true`, the ripple effect will be disabled.
|
|
23899
|
+
*/
|
|
23900
|
+
disableRipple: PropTypes.bool,
|
|
23901
|
+
/**
|
|
23902
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
23903
|
+
* side (this is often helpful for aligning the left or right
|
|
23904
|
+
* side of the icon with content above or below, without ruining the border
|
|
23905
|
+
* size and shape).
|
|
23906
|
+
*/
|
|
23907
|
+
edge: PropTypes.oneOf(["start", "end", false]),
|
|
23908
|
+
/**
|
|
23909
|
+
* The size of the button.
|
|
23910
|
+
* `small` is equivalent to the dense button styling.
|
|
23911
|
+
*/
|
|
23912
|
+
size: PropTypes.oneOf(["small", "medium"])
|
|
23913
|
+
};
|
|
23914
|
+
const IconButton$1 = withStyles2(styles$4, {
|
|
23915
|
+
name: "MuiIconButton"
|
|
23916
|
+
})(IconButton);
|
|
23917
|
+
var FormControlContext = React.createContext();
|
|
23918
|
+
{
|
|
23919
|
+
FormControlContext.displayName = "FormControlContext";
|
|
23920
|
+
}
|
|
23921
|
+
const FormControlContext$1 = FormControlContext;
|
|
23922
|
+
function useFormControl() {
|
|
23923
|
+
return React.useContext(FormControlContext$1);
|
|
23924
|
+
}
|
|
23925
|
+
var styles$3 = {
|
|
23926
|
+
root: {
|
|
23927
|
+
padding: 9
|
|
23928
|
+
},
|
|
23929
|
+
checked: {},
|
|
23930
|
+
disabled: {},
|
|
23931
|
+
input: {
|
|
23932
|
+
cursor: "inherit",
|
|
23933
|
+
position: "absolute",
|
|
23934
|
+
opacity: 0,
|
|
23935
|
+
width: "100%",
|
|
23936
|
+
height: "100%",
|
|
23937
|
+
top: 0,
|
|
23938
|
+
left: 0,
|
|
23939
|
+
margin: 0,
|
|
23940
|
+
padding: 0,
|
|
23941
|
+
zIndex: 1
|
|
23942
|
+
}
|
|
23943
|
+
};
|
|
23944
|
+
var SwitchBase = /* @__PURE__ */ React.forwardRef(function SwitchBase2(props, ref) {
|
|
23945
|
+
var autoFocus = props.autoFocus, checkedProp = props.checked, checkedIcon = props.checkedIcon, classes = props.classes, className = props.className, defaultChecked = props.defaultChecked, disabledProp = props.disabled, icon = props.icon, id = props.id, inputProps = props.inputProps, inputRef = props.inputRef, name = props.name, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, readOnly = props.readOnly, required = props.required, tabIndex = props.tabIndex, type = props.type, value = props.value, other = _objectWithoutProperties(props, ["autoFocus", "checked", "checkedIcon", "classes", "className", "defaultChecked", "disabled", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"]);
|
|
23946
|
+
var _useControlled = useControlled({
|
|
23947
|
+
controlled: checkedProp,
|
|
23948
|
+
default: Boolean(defaultChecked),
|
|
23949
|
+
name: "SwitchBase",
|
|
23950
|
+
state: "checked"
|
|
23951
|
+
}), _useControlled2 = _slicedToArray(_useControlled, 2), checked = _useControlled2[0], setCheckedState = _useControlled2[1];
|
|
23952
|
+
var muiFormControl = useFormControl();
|
|
23953
|
+
var handleFocus = function handleFocus2(event) {
|
|
23954
|
+
if (onFocus) {
|
|
23955
|
+
onFocus(event);
|
|
23956
|
+
}
|
|
23957
|
+
if (muiFormControl && muiFormControl.onFocus) {
|
|
23958
|
+
muiFormControl.onFocus(event);
|
|
23959
|
+
}
|
|
23960
|
+
};
|
|
23961
|
+
var handleBlur = function handleBlur2(event) {
|
|
23962
|
+
if (onBlur) {
|
|
23963
|
+
onBlur(event);
|
|
23964
|
+
}
|
|
23965
|
+
if (muiFormControl && muiFormControl.onBlur) {
|
|
23966
|
+
muiFormControl.onBlur(event);
|
|
23967
|
+
}
|
|
23968
|
+
};
|
|
23969
|
+
var handleInputChange = function handleInputChange2(event) {
|
|
23970
|
+
var newChecked = event.target.checked;
|
|
23971
|
+
setCheckedState(newChecked);
|
|
23972
|
+
if (onChange) {
|
|
23973
|
+
onChange(event, newChecked);
|
|
23974
|
+
}
|
|
23975
|
+
};
|
|
23976
|
+
var disabled = disabledProp;
|
|
23977
|
+
if (muiFormControl) {
|
|
23978
|
+
if (typeof disabled === "undefined") {
|
|
23979
|
+
disabled = muiFormControl.disabled;
|
|
23980
|
+
}
|
|
23981
|
+
}
|
|
23982
|
+
var hasLabelFor = type === "checkbox" || type === "radio";
|
|
23983
|
+
return /* @__PURE__ */ React.createElement(IconButton$1, _extends$1({
|
|
23984
|
+
component: "span",
|
|
23985
|
+
className: clsx(classes.root, className, checked && classes.checked, disabled && classes.disabled),
|
|
23986
|
+
disabled,
|
|
23987
|
+
tabIndex: null,
|
|
23988
|
+
role: void 0,
|
|
23989
|
+
onFocus: handleFocus,
|
|
23990
|
+
onBlur: handleBlur,
|
|
23991
|
+
ref
|
|
23992
|
+
}, other), /* @__PURE__ */ React.createElement("input", _extends$1({
|
|
23993
|
+
autoFocus,
|
|
23994
|
+
checked: checkedProp,
|
|
23995
|
+
defaultChecked,
|
|
23996
|
+
className: classes.input,
|
|
23997
|
+
disabled,
|
|
23998
|
+
id: hasLabelFor && id,
|
|
23999
|
+
name,
|
|
24000
|
+
onChange: handleInputChange,
|
|
24001
|
+
readOnly,
|
|
24002
|
+
ref: inputRef,
|
|
24003
|
+
required,
|
|
24004
|
+
tabIndex,
|
|
24005
|
+
type,
|
|
24006
|
+
value
|
|
24007
|
+
}, inputProps)), checked ? checkedIcon : icon);
|
|
24008
|
+
});
|
|
24009
|
+
SwitchBase.propTypes = {
|
|
24010
|
+
/**
|
|
24011
|
+
* If `true`, the `input` element will be focused during the first mount.
|
|
24012
|
+
*/
|
|
24013
|
+
autoFocus: PropTypes.bool,
|
|
24014
|
+
/**
|
|
24015
|
+
* If `true`, the component is checked.
|
|
24016
|
+
*/
|
|
24017
|
+
checked: PropTypes.bool,
|
|
24018
|
+
/**
|
|
24019
|
+
* The icon to display when the component is checked.
|
|
24020
|
+
*/
|
|
24021
|
+
checkedIcon: PropTypes.node.isRequired,
|
|
24022
|
+
/**
|
|
24023
|
+
* Override or extend the styles applied to the component.
|
|
24024
|
+
* See [CSS API](#css) below for more details.
|
|
24025
|
+
*/
|
|
24026
|
+
classes: PropTypes.object.isRequired,
|
|
24027
|
+
/**
|
|
24028
|
+
* @ignore
|
|
24029
|
+
*/
|
|
24030
|
+
className: PropTypes.string,
|
|
24031
|
+
/**
|
|
24032
|
+
* @ignore
|
|
24033
|
+
*/
|
|
24034
|
+
defaultChecked: PropTypes.bool,
|
|
24035
|
+
/**
|
|
24036
|
+
* If `true`, the switch will be disabled.
|
|
24037
|
+
*/
|
|
24038
|
+
disabled: PropTypes.bool,
|
|
24039
|
+
/**
|
|
24040
|
+
* The icon to display when the component is unchecked.
|
|
24041
|
+
*/
|
|
24042
|
+
icon: PropTypes.node.isRequired,
|
|
24043
|
+
/**
|
|
24044
|
+
* The id of the `input` element.
|
|
24045
|
+
*/
|
|
24046
|
+
id: PropTypes.string,
|
|
24047
|
+
/**
|
|
24048
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
24049
|
+
*/
|
|
24050
|
+
inputProps: PropTypes.object,
|
|
24051
|
+
/**
|
|
24052
|
+
* Pass a ref to the `input` element.
|
|
24053
|
+
*/
|
|
24054
|
+
inputRef: refType$1,
|
|
24055
|
+
/*
|
|
24056
|
+
* @ignore
|
|
24057
|
+
*/
|
|
24058
|
+
name: PropTypes.string,
|
|
24059
|
+
/**
|
|
24060
|
+
* @ignore
|
|
24061
|
+
*/
|
|
24062
|
+
onBlur: PropTypes.func,
|
|
24063
|
+
/**
|
|
24064
|
+
* Callback fired when the state is changed.
|
|
24065
|
+
*
|
|
24066
|
+
* @param {object} event The event source of the callback.
|
|
24067
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
24068
|
+
*/
|
|
24069
|
+
onChange: PropTypes.func,
|
|
24070
|
+
/**
|
|
24071
|
+
* @ignore
|
|
24072
|
+
*/
|
|
24073
|
+
onFocus: PropTypes.func,
|
|
24074
|
+
/**
|
|
24075
|
+
* It prevents the user from changing the value of the field
|
|
24076
|
+
* (not from interacting with the field).
|
|
24077
|
+
*/
|
|
24078
|
+
readOnly: PropTypes.bool,
|
|
24079
|
+
/**
|
|
24080
|
+
* If `true`, the `input` element will be required.
|
|
24081
|
+
*/
|
|
24082
|
+
required: PropTypes.bool,
|
|
24083
|
+
/**
|
|
24084
|
+
* @ignore
|
|
24085
|
+
*/
|
|
24086
|
+
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
24087
|
+
/**
|
|
24088
|
+
* The input component prop `type`.
|
|
24089
|
+
*/
|
|
24090
|
+
type: PropTypes.string.isRequired,
|
|
24091
|
+
/**
|
|
24092
|
+
* The value of the component.
|
|
24093
|
+
*/
|
|
24094
|
+
value: PropTypes.any
|
|
24095
|
+
};
|
|
24096
|
+
const SwitchBase$1 = withStyles2(styles$3, {
|
|
24097
|
+
name: "PrivateSwitchBase"
|
|
24098
|
+
})(SwitchBase);
|
|
24099
|
+
const CheckBoxOutlineBlankIcon = createSvgIcon(/* @__PURE__ */ React.createElement("path", {
|
|
24100
|
+
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
|
24101
|
+
}), "CheckBoxOutlineBlank");
|
|
24102
|
+
const CheckBoxIcon = createSvgIcon(/* @__PURE__ */ React.createElement("path", {
|
|
24103
|
+
d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
24104
|
+
}), "CheckBox");
|
|
24105
|
+
const IndeterminateCheckBoxIcon = createSvgIcon(/* @__PURE__ */ React.createElement("path", {
|
|
24106
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
|
|
24107
|
+
}), "IndeterminateCheckBox");
|
|
24108
|
+
var styles$2 = function styles4(theme) {
|
|
24109
|
+
return {
|
|
24110
|
+
/* Styles applied to the root element. */
|
|
24111
|
+
root: {
|
|
24112
|
+
color: theme.palette.text.secondary
|
|
24113
|
+
},
|
|
24114
|
+
/* Pseudo-class applied to the root element if `checked={true}`. */
|
|
24115
|
+
checked: {},
|
|
24116
|
+
/* Pseudo-class applied to the root element if `disabled={true}`. */
|
|
24117
|
+
disabled: {},
|
|
24118
|
+
/* Pseudo-class applied to the root element if `indeterminate={true}`. */
|
|
24119
|
+
indeterminate: {},
|
|
24120
|
+
/* Styles applied to the root element if `color="primary"`. */
|
|
24121
|
+
colorPrimary: {
|
|
24122
|
+
"&$checked": {
|
|
24123
|
+
color: theme.palette.primary.main,
|
|
24124
|
+
"&:hover": {
|
|
24125
|
+
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
|
24126
|
+
// Reset on touch devices, it doesn't add specificity
|
|
24127
|
+
"@media (hover: none)": {
|
|
24128
|
+
backgroundColor: "transparent"
|
|
24129
|
+
}
|
|
24130
|
+
}
|
|
24131
|
+
},
|
|
24132
|
+
"&$disabled": {
|
|
24133
|
+
color: theme.palette.action.disabled
|
|
24134
|
+
}
|
|
24135
|
+
},
|
|
24136
|
+
/* Styles applied to the root element if `color="secondary"`. */
|
|
24137
|
+
colorSecondary: {
|
|
24138
|
+
"&$checked": {
|
|
24139
|
+
color: theme.palette.secondary.main,
|
|
24140
|
+
"&:hover": {
|
|
24141
|
+
backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),
|
|
24142
|
+
// Reset on touch devices, it doesn't add specificity
|
|
24143
|
+
"@media (hover: none)": {
|
|
24144
|
+
backgroundColor: "transparent"
|
|
24145
|
+
}
|
|
24146
|
+
}
|
|
24147
|
+
},
|
|
24148
|
+
"&$disabled": {
|
|
24149
|
+
color: theme.palette.action.disabled
|
|
24150
|
+
}
|
|
24151
|
+
}
|
|
24152
|
+
};
|
|
24153
|
+
};
|
|
24154
|
+
var defaultCheckedIcon = /* @__PURE__ */ React.createElement(CheckBoxIcon, null);
|
|
24155
|
+
var defaultIcon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, null);
|
|
24156
|
+
var defaultIndeterminateIcon = /* @__PURE__ */ React.createElement(IndeterminateCheckBoxIcon, null);
|
|
24157
|
+
var Checkbox = /* @__PURE__ */ React.forwardRef(function Checkbox2(props, ref) {
|
|
24158
|
+
var _props$checkedIcon = props.checkedIcon, checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon, classes = props.classes, _props$color = props.color, color = _props$color === void 0 ? "secondary" : _props$color, _props$icon = props.icon, iconProp = _props$icon === void 0 ? defaultIcon : _props$icon, _props$indeterminate = props.indeterminate, indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate, _props$indeterminateI = props.indeterminateIcon, indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI, inputProps = props.inputProps, _props$size = props.size, size2 = _props$size === void 0 ? "medium" : _props$size, other = _objectWithoutProperties(props, ["checkedIcon", "classes", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size"]);
|
|
24159
|
+
var icon = indeterminate ? indeterminateIconProp : iconProp;
|
|
24160
|
+
var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;
|
|
24161
|
+
return /* @__PURE__ */ React.createElement(SwitchBase$1, _extends$1({
|
|
24162
|
+
type: "checkbox",
|
|
24163
|
+
classes: {
|
|
24164
|
+
root: clsx(classes.root, classes["color".concat(capitalize(color))], indeterminate && classes.indeterminate),
|
|
24165
|
+
checked: classes.checked,
|
|
24166
|
+
disabled: classes.disabled
|
|
24167
|
+
},
|
|
24168
|
+
color,
|
|
24169
|
+
inputProps: _extends$1({
|
|
24170
|
+
"data-indeterminate": indeterminate
|
|
24171
|
+
}, inputProps),
|
|
24172
|
+
icon: /* @__PURE__ */ React.cloneElement(icon, {
|
|
24173
|
+
fontSize: icon.props.fontSize === void 0 && size2 === "small" ? size2 : icon.props.fontSize
|
|
24174
|
+
}),
|
|
24175
|
+
checkedIcon: /* @__PURE__ */ React.cloneElement(indeterminateIcon, {
|
|
24176
|
+
fontSize: indeterminateIcon.props.fontSize === void 0 && size2 === "small" ? size2 : indeterminateIcon.props.fontSize
|
|
24177
|
+
}),
|
|
24178
|
+
ref
|
|
24179
|
+
}, other));
|
|
24180
|
+
});
|
|
24181
|
+
Checkbox.propTypes = {
|
|
24182
|
+
// ----------------------------- Warning --------------------------------
|
|
24183
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
24184
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
24185
|
+
// ----------------------------------------------------------------------
|
|
24186
|
+
/**
|
|
24187
|
+
* If `true`, the component is checked.
|
|
24188
|
+
*/
|
|
24189
|
+
checked: PropTypes.bool,
|
|
24190
|
+
/**
|
|
24191
|
+
* The icon to display when the component is checked.
|
|
24192
|
+
*/
|
|
24193
|
+
checkedIcon: PropTypes.node,
|
|
24194
|
+
/**
|
|
24195
|
+
* Override or extend the styles applied to the component.
|
|
24196
|
+
* See [CSS API](#css) below for more details.
|
|
24197
|
+
*/
|
|
24198
|
+
classes: PropTypes.object,
|
|
24199
|
+
/**
|
|
24200
|
+
* The color of the component. It supports those theme colors that make sense for this component.
|
|
24201
|
+
*/
|
|
24202
|
+
color: PropTypes.oneOf(["default", "primary", "secondary"]),
|
|
24203
|
+
/**
|
|
24204
|
+
* If `true`, the checkbox will be disabled.
|
|
24205
|
+
*/
|
|
24206
|
+
disabled: PropTypes.bool,
|
|
24207
|
+
/**
|
|
24208
|
+
* If `true`, the ripple effect will be disabled.
|
|
24209
|
+
*/
|
|
24210
|
+
disableRipple: PropTypes.bool,
|
|
24211
|
+
/**
|
|
24212
|
+
* The icon to display when the component is unchecked.
|
|
24213
|
+
*/
|
|
24214
|
+
icon: PropTypes.node,
|
|
24215
|
+
/**
|
|
24216
|
+
* The id of the `input` element.
|
|
24217
|
+
*/
|
|
24218
|
+
id: PropTypes.string,
|
|
24219
|
+
/**
|
|
24220
|
+
* If `true`, the component appears indeterminate.
|
|
24221
|
+
* This does not set the native input element to indeterminate due
|
|
24222
|
+
* to inconsistent behavior across browsers.
|
|
24223
|
+
* However, we set a `data-indeterminate` attribute on the input.
|
|
24224
|
+
*/
|
|
24225
|
+
indeterminate: PropTypes.bool,
|
|
24226
|
+
/**
|
|
24227
|
+
* The icon to display when the component is indeterminate.
|
|
24228
|
+
*/
|
|
24229
|
+
indeterminateIcon: PropTypes.node,
|
|
24230
|
+
/**
|
|
24231
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
24232
|
+
*/
|
|
24233
|
+
inputProps: PropTypes.object,
|
|
24234
|
+
/**
|
|
24235
|
+
* Pass a ref to the `input` element.
|
|
24236
|
+
*/
|
|
24237
|
+
inputRef: refType$1,
|
|
24238
|
+
/**
|
|
24239
|
+
* Callback fired when the state is changed.
|
|
24240
|
+
*
|
|
24241
|
+
* @param {object} event The event source of the callback.
|
|
24242
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
24243
|
+
*/
|
|
24244
|
+
onChange: PropTypes.func,
|
|
24245
|
+
/**
|
|
24246
|
+
* If `true`, the `input` element will be required.
|
|
24247
|
+
*/
|
|
24248
|
+
required: PropTypes.bool,
|
|
24249
|
+
/**
|
|
24250
|
+
* The size of the checkbox.
|
|
24251
|
+
* `small` is equivalent to the dense checkbox styling.
|
|
24252
|
+
*/
|
|
24253
|
+
size: PropTypes.oneOf(["medium", "small"]),
|
|
24254
|
+
/**
|
|
24255
|
+
* The value of the component. The DOM API casts this to a string.
|
|
24256
|
+
* The browser uses "on" as the default value.
|
|
24257
|
+
*/
|
|
24258
|
+
value: PropTypes.any
|
|
24259
|
+
};
|
|
24260
|
+
const Checkbox$1 = withStyles2(styles$2, {
|
|
24261
|
+
name: "MuiCheckbox"
|
|
24262
|
+
})(Checkbox);
|
|
24263
|
+
var TableContext = React.createContext();
|
|
24264
|
+
{
|
|
24265
|
+
TableContext.displayName = "TableContext";
|
|
24266
|
+
}
|
|
24267
|
+
const TableContext$1 = TableContext;
|
|
24268
|
+
var Tablelvl2Context = React.createContext();
|
|
24269
|
+
{
|
|
24270
|
+
Tablelvl2Context.displayName = "Tablelvl2Context";
|
|
24271
|
+
}
|
|
24272
|
+
const Tablelvl2Context$1 = Tablelvl2Context;
|
|
24273
|
+
var styles$1 = function styles5(theme) {
|
|
24274
|
+
return {
|
|
24275
|
+
/* Styles applied to the root element. */
|
|
24276
|
+
root: _extends$1({}, theme.typography.body2, {
|
|
24277
|
+
display: "table-cell",
|
|
24278
|
+
verticalAlign: "inherit",
|
|
24279
|
+
// Workaround for a rendering bug with spanned columns in Chrome 62.0.
|
|
24280
|
+
// Removes the alpha (sets it to 1), and lightens or darkens the theme color.
|
|
24281
|
+
borderBottom: "1px solid\n ".concat(theme.palette.type === "light" ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)),
|
|
24282
|
+
textAlign: "left",
|
|
24283
|
+
padding: 16
|
|
24284
|
+
}),
|
|
24285
|
+
/* Styles applied to the root element if `variant="head"` or `context.table.head`. */
|
|
24286
|
+
head: {
|
|
24287
|
+
color: theme.palette.text.primary,
|
|
24288
|
+
lineHeight: theme.typography.pxToRem(24),
|
|
24289
|
+
fontWeight: theme.typography.fontWeightMedium
|
|
24290
|
+
},
|
|
24291
|
+
/* Styles applied to the root element if `variant="body"` or `context.table.body`. */
|
|
24292
|
+
body: {
|
|
24293
|
+
color: theme.palette.text.primary
|
|
24294
|
+
},
|
|
24295
|
+
/* Styles applied to the root element if `variant="footer"` or `context.table.footer`. */
|
|
24296
|
+
footer: {
|
|
24297
|
+
color: theme.palette.text.secondary,
|
|
24298
|
+
lineHeight: theme.typography.pxToRem(21),
|
|
24299
|
+
fontSize: theme.typography.pxToRem(12)
|
|
24300
|
+
},
|
|
24301
|
+
/* Styles applied to the root element if `size="small"`. */
|
|
24302
|
+
sizeSmall: {
|
|
24303
|
+
padding: "6px 24px 6px 16px",
|
|
24304
|
+
"&:last-child": {
|
|
24305
|
+
paddingRight: 16
|
|
24306
|
+
},
|
|
24307
|
+
"&$paddingCheckbox": {
|
|
24308
|
+
width: 24,
|
|
24309
|
+
// prevent the checkbox column from growing
|
|
24310
|
+
padding: "0 12px 0 16px",
|
|
24311
|
+
"&:last-child": {
|
|
24312
|
+
paddingLeft: 12,
|
|
24313
|
+
paddingRight: 16
|
|
24314
|
+
},
|
|
24315
|
+
"& > *": {
|
|
24316
|
+
padding: 0
|
|
24317
|
+
}
|
|
24318
|
+
}
|
|
24319
|
+
},
|
|
24320
|
+
/* Styles applied to the root element if `padding="checkbox"`. */
|
|
24321
|
+
paddingCheckbox: {
|
|
24322
|
+
width: 48,
|
|
24323
|
+
// prevent the checkbox column from growing
|
|
24324
|
+
padding: "0 0 0 4px",
|
|
24325
|
+
"&:last-child": {
|
|
24326
|
+
paddingLeft: 0,
|
|
24327
|
+
paddingRight: 4
|
|
24328
|
+
}
|
|
24329
|
+
},
|
|
24330
|
+
/* Styles applied to the root element if `padding="none"`. */
|
|
24331
|
+
paddingNone: {
|
|
24332
|
+
padding: 0,
|
|
24333
|
+
"&:last-child": {
|
|
24334
|
+
padding: 0
|
|
24335
|
+
}
|
|
24336
|
+
},
|
|
24337
|
+
/* Styles applied to the root element if `align="left"`. */
|
|
24338
|
+
alignLeft: {
|
|
24339
|
+
textAlign: "left"
|
|
24340
|
+
},
|
|
24341
|
+
/* Styles applied to the root element if `align="center"`. */
|
|
24342
|
+
alignCenter: {
|
|
24343
|
+
textAlign: "center"
|
|
24344
|
+
},
|
|
24345
|
+
/* Styles applied to the root element if `align="right"`. */
|
|
24346
|
+
alignRight: {
|
|
24347
|
+
textAlign: "right",
|
|
24348
|
+
flexDirection: "row-reverse"
|
|
24349
|
+
},
|
|
24350
|
+
/* Styles applied to the root element if `align="justify"`. */
|
|
24351
|
+
alignJustify: {
|
|
24352
|
+
textAlign: "justify"
|
|
24353
|
+
},
|
|
24354
|
+
/* Styles applied to the root element if `context.table.stickyHeader={true}`. */
|
|
24355
|
+
stickyHeader: {
|
|
24356
|
+
position: "sticky",
|
|
24357
|
+
top: 0,
|
|
24358
|
+
left: 0,
|
|
24359
|
+
zIndex: 2,
|
|
24360
|
+
backgroundColor: theme.palette.background.default
|
|
24361
|
+
}
|
|
24362
|
+
};
|
|
24363
|
+
};
|
|
24364
|
+
var TableCell = /* @__PURE__ */ React.forwardRef(function TableCell2(props, ref) {
|
|
24365
|
+
var _props$align = props.align, align = _props$align === void 0 ? "inherit" : _props$align, classes = props.classes, className = props.className, component = props.component, paddingProp = props.padding, scopeProp = props.scope, sizeProp = props.size, sortDirection = props.sortDirection, variantProp = props.variant, other = _objectWithoutProperties(props, ["align", "classes", "className", "component", "padding", "scope", "size", "sortDirection", "variant"]);
|
|
24366
|
+
var table = React.useContext(TableContext$1);
|
|
24367
|
+
var tablelvl2 = React.useContext(Tablelvl2Context$1);
|
|
24368
|
+
var isHeadCell = tablelvl2 && tablelvl2.variant === "head";
|
|
24369
|
+
var role;
|
|
24370
|
+
var Component;
|
|
24371
|
+
if (component) {
|
|
24372
|
+
Component = component;
|
|
24373
|
+
role = isHeadCell ? "columnheader" : "cell";
|
|
24374
|
+
} else {
|
|
24375
|
+
Component = isHeadCell ? "th" : "td";
|
|
24376
|
+
}
|
|
24377
|
+
var scope = scopeProp;
|
|
24378
|
+
if (!scope && isHeadCell) {
|
|
24379
|
+
scope = "col";
|
|
24380
|
+
}
|
|
24381
|
+
var padding = paddingProp || (table && table.padding ? table.padding : "normal");
|
|
24382
|
+
var size2 = sizeProp || (table && table.size ? table.size : "medium");
|
|
24383
|
+
var variant = variantProp || tablelvl2 && tablelvl2.variant;
|
|
24384
|
+
var ariaSort = null;
|
|
24385
|
+
if (sortDirection) {
|
|
24386
|
+
ariaSort = sortDirection === "asc" ? "ascending" : "descending";
|
|
24387
|
+
}
|
|
24388
|
+
return /* @__PURE__ */ React.createElement(Component, _extends$1({
|
|
24389
|
+
ref,
|
|
24390
|
+
className: clsx(classes.root, classes[variant], className, align !== "inherit" && classes["align".concat(capitalize(align))], padding !== "normal" && classes["padding".concat(capitalize(padding))], size2 !== "medium" && classes["size".concat(capitalize(size2))], variant === "head" && table && table.stickyHeader && classes.stickyHeader),
|
|
24391
|
+
"aria-sort": ariaSort,
|
|
24392
|
+
role,
|
|
24393
|
+
scope
|
|
24394
|
+
}, other));
|
|
24395
|
+
});
|
|
24396
|
+
TableCell.propTypes = {
|
|
24397
|
+
/**
|
|
24398
|
+
* Set the text-align on the table cell content.
|
|
24399
|
+
*
|
|
24400
|
+
* Monetary or generally number fields **should be right aligned** as that allows
|
|
24401
|
+
* you to add them up quickly in your head without having to worry about decimals.
|
|
24402
|
+
*/
|
|
24403
|
+
align: PropTypes.oneOf(["center", "inherit", "justify", "left", "right"]),
|
|
24404
|
+
/**
|
|
24405
|
+
* The table cell contents.
|
|
24406
|
+
*/
|
|
24407
|
+
children: PropTypes.node,
|
|
24408
|
+
/**
|
|
24409
|
+
* Override or extend the styles applied to the component.
|
|
24410
|
+
* See [CSS API](#css) below for more details.
|
|
24411
|
+
*/
|
|
24412
|
+
classes: PropTypes.object,
|
|
24413
|
+
/**
|
|
24414
|
+
* @ignore
|
|
24415
|
+
*/
|
|
24416
|
+
className: PropTypes.string,
|
|
24417
|
+
/**
|
|
24418
|
+
* The component used for the root node.
|
|
24419
|
+
* Either a string to use a HTML element or a component.
|
|
24420
|
+
*/
|
|
24421
|
+
component: PropTypes.elementType,
|
|
24422
|
+
/**
|
|
24423
|
+
* Sets the padding applied to the cell.
|
|
24424
|
+
* By default, the Table parent component set the value (`normal`).
|
|
24425
|
+
* `default` is deprecated, use `normal` instead.
|
|
24426
|
+
*/
|
|
24427
|
+
padding: chainPropTypes(PropTypes.oneOf(["normal", "checkbox", "none", "default"]), function(props) {
|
|
24428
|
+
if (props.padding === "default") {
|
|
24429
|
+
return new Error('Material-UI: padding="default" was renamed to padding="normal" for consistency.');
|
|
24430
|
+
}
|
|
24431
|
+
return null;
|
|
24432
|
+
}),
|
|
24433
|
+
/**
|
|
24434
|
+
* Set scope attribute.
|
|
24435
|
+
*/
|
|
24436
|
+
scope: PropTypes.string,
|
|
24437
|
+
/**
|
|
24438
|
+
* Specify the size of the cell.
|
|
24439
|
+
* By default, the Table parent component set the value (`medium`).
|
|
24440
|
+
*/
|
|
24441
|
+
size: PropTypes.oneOf(["medium", "small"]),
|
|
24442
|
+
/**
|
|
24443
|
+
* Set aria-sort direction.
|
|
24444
|
+
*/
|
|
24445
|
+
sortDirection: PropTypes.oneOf(["asc", "desc", false]),
|
|
24446
|
+
/**
|
|
24447
|
+
* Specify the cell type.
|
|
24448
|
+
* By default, the TableHead, TableBody or TableFooter parent component set the value.
|
|
24449
|
+
*/
|
|
24450
|
+
variant: PropTypes.oneOf(["body", "footer", "head"])
|
|
24451
|
+
};
|
|
24452
|
+
const TableCell$1 = withStyles2(styles$1, {
|
|
24453
|
+
name: "MuiTableCell"
|
|
24454
|
+
})(TableCell);
|
|
24455
|
+
var styles6 = function styles7(theme) {
|
|
24456
|
+
return {
|
|
24457
|
+
/* Styles applied to the root element. */
|
|
24458
|
+
root: {
|
|
24459
|
+
color: "inherit",
|
|
24460
|
+
display: "table-row",
|
|
24461
|
+
verticalAlign: "middle",
|
|
24462
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
24463
|
+
outline: 0,
|
|
24464
|
+
"&$hover:hover": {
|
|
24465
|
+
backgroundColor: theme.palette.action.hover
|
|
24466
|
+
},
|
|
24467
|
+
"&$selected, &$selected:hover": {
|
|
24468
|
+
backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity)
|
|
24469
|
+
}
|
|
24470
|
+
},
|
|
24471
|
+
/* Pseudo-class applied to the root element if `selected={true}`. */
|
|
24472
|
+
selected: {},
|
|
24473
|
+
/* Pseudo-class applied to the root element if `hover={true}`. */
|
|
24474
|
+
hover: {},
|
|
24475
|
+
/* Styles applied to the root element if table variant="head". */
|
|
24476
|
+
head: {},
|
|
24477
|
+
/* Styles applied to the root element if table variant="footer". */
|
|
24478
|
+
footer: {}
|
|
24479
|
+
};
|
|
24480
|
+
};
|
|
24481
|
+
var defaultComponent = "tr";
|
|
24482
|
+
var TableRow = /* @__PURE__ */ React.forwardRef(function TableRow2(props, ref) {
|
|
24483
|
+
var classes = props.classes, className = props.className, _props$component = props.component, Component = _props$component === void 0 ? defaultComponent : _props$component, _props$hover = props.hover, hover = _props$hover === void 0 ? false : _props$hover, _props$selected = props.selected, selected = _props$selected === void 0 ? false : _props$selected, other = _objectWithoutProperties(props, ["classes", "className", "component", "hover", "selected"]);
|
|
24484
|
+
var tablelvl2 = React.useContext(Tablelvl2Context$1);
|
|
24485
|
+
return /* @__PURE__ */ React.createElement(Component, _extends$1({
|
|
24486
|
+
ref,
|
|
24487
|
+
className: clsx(classes.root, className, tablelvl2 && {
|
|
24488
|
+
"head": classes.head,
|
|
24489
|
+
"footer": classes.footer
|
|
24490
|
+
}[tablelvl2.variant], hover && classes.hover, selected && classes.selected),
|
|
24491
|
+
role: Component === defaultComponent ? null : "row"
|
|
24492
|
+
}, other));
|
|
24493
|
+
});
|
|
24494
|
+
TableRow.propTypes = {
|
|
24495
|
+
/**
|
|
24496
|
+
* Should be valid <tr> children such as `TableCell`.
|
|
24497
|
+
*/
|
|
24498
|
+
children: PropTypes.node,
|
|
24499
|
+
/**
|
|
24500
|
+
* Override or extend the styles applied to the component.
|
|
24501
|
+
* See [CSS API](#css) below for more details.
|
|
24502
|
+
*/
|
|
24503
|
+
classes: PropTypes.object.isRequired,
|
|
24504
|
+
/**
|
|
24505
|
+
* @ignore
|
|
24506
|
+
*/
|
|
24507
|
+
className: PropTypes.string,
|
|
24508
|
+
/**
|
|
24509
|
+
* The component used for the root node.
|
|
24510
|
+
* Either a string to use a HTML element or a component.
|
|
24511
|
+
*/
|
|
24512
|
+
component: PropTypes.elementType,
|
|
24513
|
+
/**
|
|
24514
|
+
* If `true`, the table row will shade on hover.
|
|
24515
|
+
*/
|
|
24516
|
+
hover: PropTypes.bool,
|
|
24517
|
+
/**
|
|
24518
|
+
* If `true`, the table row will have the selected shading.
|
|
24519
|
+
*/
|
|
24520
|
+
selected: PropTypes.bool
|
|
24521
|
+
};
|
|
24522
|
+
const TableRow$1 = withStyles2(styles6, {
|
|
24523
|
+
name: "MuiTableRow"
|
|
24524
|
+
})(TableRow);
|
|
24525
|
+
var AutoSizer$1 = {};
|
|
24526
|
+
var interopRequireDefault = { exports: {} };
|
|
24527
|
+
(function(module2) {
|
|
24528
|
+
function _interopRequireDefault(obj) {
|
|
24529
|
+
return obj && obj.__esModule ? obj : {
|
|
24530
|
+
"default": obj
|
|
24531
|
+
};
|
|
24532
|
+
}
|
|
24533
|
+
module2.exports = _interopRequireDefault, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
24534
|
+
})(interopRequireDefault);
|
|
24535
|
+
var interopRequireDefaultExports = interopRequireDefault.exports;
|
|
24536
|
+
var AutoSizer = {};
|
|
24537
|
+
var interopRequireWildcard = { exports: {} };
|
|
24538
|
+
var _typeof = { exports: {} };
|
|
24539
|
+
var hasRequired_typeof;
|
|
24540
|
+
function require_typeof() {
|
|
24541
|
+
if (hasRequired_typeof)
|
|
24542
|
+
return _typeof.exports;
|
|
24543
|
+
hasRequired_typeof = 1;
|
|
24544
|
+
(function(module2) {
|
|
24545
|
+
function _typeof2(obj) {
|
|
24546
|
+
"@babel/helpers - typeof";
|
|
24547
|
+
return module2.exports = _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
24548
|
+
return typeof obj2;
|
|
24549
|
+
} : function(obj2) {
|
|
24550
|
+
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
24551
|
+
}, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _typeof2(obj);
|
|
24552
|
+
}
|
|
24553
|
+
module2.exports = _typeof2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
24554
|
+
})(_typeof);
|
|
24555
|
+
return _typeof.exports;
|
|
24556
|
+
}
|
|
24557
|
+
var hasRequiredInteropRequireWildcard;
|
|
24558
|
+
function requireInteropRequireWildcard() {
|
|
24559
|
+
if (hasRequiredInteropRequireWildcard)
|
|
24560
|
+
return interopRequireWildcard.exports;
|
|
24561
|
+
hasRequiredInteropRequireWildcard = 1;
|
|
24562
|
+
(function(module2) {
|
|
24563
|
+
var _typeof2 = require_typeof()["default"];
|
|
24564
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
24565
|
+
if (typeof WeakMap !== "function")
|
|
24566
|
+
return null;
|
|
24567
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
24568
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
24569
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache2(nodeInterop2) {
|
|
24570
|
+
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
24571
|
+
})(nodeInterop);
|
|
24572
|
+
}
|
|
24573
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
24574
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
24575
|
+
return obj;
|
|
24576
|
+
}
|
|
24577
|
+
if (obj === null || _typeof2(obj) !== "object" && typeof obj !== "function") {
|
|
24578
|
+
return {
|
|
24579
|
+
"default": obj
|
|
24580
|
+
};
|
|
24581
|
+
}
|
|
22305
24582
|
var cache2 = _getRequireWildcardCache(nodeInterop);
|
|
22306
24583
|
if (cache2 && cache2.has(obj)) {
|
|
22307
24584
|
return cache2.get(obj);
|
|
@@ -22693,7 +24970,7 @@ function requireAutoSizer() {
|
|
|
22693
24970
|
var _assertThisInitialized2 = _interopRequireDefault(requireAssertThisInitialized());
|
|
22694
24971
|
var _inherits2 = _interopRequireDefault(requireInherits());
|
|
22695
24972
|
var _defineProperty2 = _interopRequireDefault(requireDefineProperty());
|
|
22696
|
-
var
|
|
24973
|
+
var React2 = _interopRequireWildcard(React__default);
|
|
22697
24974
|
var _detectElementResize = _interopRequireDefault(requireDetectElementResize());
|
|
22698
24975
|
var _propTypes = _interopRequireDefault(propTypesExports);
|
|
22699
24976
|
var _class, _temp;
|
|
@@ -22810,7 +25087,7 @@ function requireAutoSizer() {
|
|
|
22810
25087
|
outerStyle.width = 0;
|
|
22811
25088
|
childParams.width = width;
|
|
22812
25089
|
}
|
|
22813
|
-
return
|
|
25090
|
+
return React2.createElement("div", {
|
|
22814
25091
|
className,
|
|
22815
25092
|
ref: this._setRef,
|
|
22816
25093
|
style: _objectSpread({}, outerStyle, {}, style)
|
|
@@ -22818,7 +25095,7 @@ function requireAutoSizer() {
|
|
|
22818
25095
|
}
|
|
22819
25096
|
}]);
|
|
22820
25097
|
return AutoSizer3;
|
|
22821
|
-
}(
|
|
25098
|
+
}(React2.Component), (0, _defineProperty2["default"])(_class, "propTypes", {
|
|
22822
25099
|
/** Function responsible for rendering children.*/
|
|
22823
25100
|
"children": _propTypes["default"].func.isRequired,
|
|
22824
25101
|
/** Optional custom CSS class name to attach to root AutoSizer element. */
|
|
@@ -23077,12 +25354,12 @@ function requireDefaultHeaderRowRenderer() {
|
|
|
23077
25354
|
value: true
|
|
23078
25355
|
});
|
|
23079
25356
|
exports2["default"] = defaultHeaderRowRenderer2;
|
|
23080
|
-
var
|
|
25357
|
+
var React2 = _interopRequireWildcard(React__default);
|
|
23081
25358
|
var _types = requireTypes$1();
|
|
23082
25359
|
var _propTypes = _interopRequireDefault(propTypesExports);
|
|
23083
25360
|
function defaultHeaderRowRenderer2(_ref) {
|
|
23084
25361
|
var className = _ref.className, columns = _ref.columns, style = _ref.style;
|
|
23085
|
-
return
|
|
25362
|
+
return React2.createElement("div", {
|
|
23086
25363
|
className,
|
|
23087
25364
|
role: "row",
|
|
23088
25365
|
style
|
|
@@ -23137,7 +25414,7 @@ function requireSortIndicator() {
|
|
|
23137
25414
|
exports2["default"] = SortIndicator2;
|
|
23138
25415
|
var _clsx = _interopRequireDefault(require$$10);
|
|
23139
25416
|
var _propTypes = _interopRequireDefault(propTypesExports);
|
|
23140
|
-
var
|
|
25417
|
+
var React2 = _interopRequireWildcard(React__default);
|
|
23141
25418
|
var _SortDirection = _interopRequireDefault(requireSortDirection());
|
|
23142
25419
|
function SortIndicator2(_ref) {
|
|
23143
25420
|
var sortDirection = _ref.sortDirection;
|
|
@@ -23145,16 +25422,16 @@ function requireSortIndicator() {
|
|
|
23145
25422
|
"ReactVirtualized__Table__sortableHeaderIcon--ASC": sortDirection === _SortDirection["default"].ASC,
|
|
23146
25423
|
"ReactVirtualized__Table__sortableHeaderIcon--DESC": sortDirection === _SortDirection["default"].DESC
|
|
23147
25424
|
});
|
|
23148
|
-
return
|
|
25425
|
+
return React2.createElement("svg", {
|
|
23149
25426
|
className: classNames,
|
|
23150
25427
|
width: 18,
|
|
23151
25428
|
height: 18,
|
|
23152
25429
|
viewBox: "0 0 24 24"
|
|
23153
|
-
}, sortDirection === _SortDirection["default"].ASC ?
|
|
25430
|
+
}, sortDirection === _SortDirection["default"].ASC ? React2.createElement("path", {
|
|
23154
25431
|
d: "M7 14l5-5 5 5z"
|
|
23155
|
-
}) :
|
|
25432
|
+
}) : React2.createElement("path", {
|
|
23156
25433
|
d: "M7 10l5 5 5-5z"
|
|
23157
|
-
}),
|
|
25434
|
+
}), React2.createElement("path", {
|
|
23158
25435
|
d: "M0 0h24v24H0z",
|
|
23159
25436
|
fill: "none"
|
|
23160
25437
|
}));
|
|
@@ -23177,20 +25454,20 @@ function requireDefaultHeaderRenderer() {
|
|
|
23177
25454
|
value: true
|
|
23178
25455
|
});
|
|
23179
25456
|
exports2["default"] = defaultHeaderRenderer2;
|
|
23180
|
-
var
|
|
25457
|
+
var React2 = _interopRequireWildcard(React__default);
|
|
23181
25458
|
var _SortIndicator = _interopRequireDefault(requireSortIndicator());
|
|
23182
25459
|
var _types = requireTypes$1();
|
|
23183
25460
|
var _propTypes = _interopRequireDefault(propTypesExports);
|
|
23184
25461
|
function defaultHeaderRenderer2(_ref) {
|
|
23185
25462
|
var dataKey = _ref.dataKey, label = _ref.label, sortBy = _ref.sortBy, sortDirection = _ref.sortDirection;
|
|
23186
25463
|
var showSortIndicator = sortBy === dataKey;
|
|
23187
|
-
var children = [
|
|
25464
|
+
var children = [React2.createElement("span", {
|
|
23188
25465
|
className: "ReactVirtualized__Table__headerTruncatedText",
|
|
23189
25466
|
key: "label",
|
|
23190
25467
|
title: typeof label === "string" ? label : null
|
|
23191
25468
|
}, label)];
|
|
23192
25469
|
if (showSortIndicator) {
|
|
23193
|
-
children.push(
|
|
25470
|
+
children.push(React2.createElement(_SortIndicator["default"], {
|
|
23194
25471
|
key: "SortIndicator",
|
|
23195
25472
|
sortDirection
|
|
23196
25473
|
}));
|
|
@@ -23240,7 +25517,7 @@ function requireDefaultRowRenderer() {
|
|
|
23240
25517
|
});
|
|
23241
25518
|
exports2["default"] = defaultRowRenderer2;
|
|
23242
25519
|
var _extends2 = _interopRequireDefault(require_extends());
|
|
23243
|
-
var
|
|
25520
|
+
var React2 = _interopRequireWildcard(React__default);
|
|
23244
25521
|
var _types = requireTypes$1();
|
|
23245
25522
|
var _propTypes = _interopRequireDefault(propTypesExports);
|
|
23246
25523
|
function defaultRowRenderer2(_ref) {
|
|
@@ -23297,7 +25574,7 @@ function requireDefaultRowRenderer() {
|
|
|
23297
25574
|
};
|
|
23298
25575
|
}
|
|
23299
25576
|
}
|
|
23300
|
-
return
|
|
25577
|
+
return React2.createElement("div", (0, _extends2["default"])({}, a11yProps, {
|
|
23301
25578
|
className,
|
|
23302
25579
|
key,
|
|
23303
25580
|
role: "row",
|
|
@@ -23327,7 +25604,7 @@ function requireColumn() {
|
|
|
23327
25604
|
var _inherits2 = _interopRequireDefault(requireInherits());
|
|
23328
25605
|
var _defineProperty2 = _interopRequireDefault(requireDefineProperty());
|
|
23329
25606
|
var _propTypes = _interopRequireDefault(propTypesExports);
|
|
23330
|
-
var
|
|
25607
|
+
var React2 = _interopRequireWildcard(React__default);
|
|
23331
25608
|
var _defaultHeaderRenderer = _interopRequireDefault(requireDefaultHeaderRenderer());
|
|
23332
25609
|
var _defaultCellRenderer = _interopRequireDefault(requireDefaultCellRenderer());
|
|
23333
25610
|
var _defaultCellDataGetter = _interopRequireDefault(requireDefaultCellDataGetter());
|
|
@@ -23339,7 +25616,7 @@ function requireColumn() {
|
|
|
23339
25616
|
return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Column3).apply(this, arguments));
|
|
23340
25617
|
}
|
|
23341
25618
|
return Column3;
|
|
23342
|
-
}(
|
|
25619
|
+
}(React2.Component);
|
|
23343
25620
|
exports2["default"] = Column2;
|
|
23344
25621
|
(0, _defineProperty2["default"])(Column2, "defaultProps", {
|
|
23345
25622
|
cellDataGetter: _defaultCellDataGetter["default"],
|
|
@@ -23497,7 +25774,7 @@ function requireTypes() {
|
|
|
23497
25774
|
value: true
|
|
23498
25775
|
});
|
|
23499
25776
|
types.bpfrpt_proptype_VisibleCellRange = types.bpfrpt_proptype_Alignment = types.bpfrpt_proptype_OverscanIndicesGetter = types.bpfrpt_proptype_OverscanIndices = types.bpfrpt_proptype_OverscanIndicesGetterParams = types.bpfrpt_proptype_RenderedSection = types.bpfrpt_proptype_ScrollbarPresenceChange = types.bpfrpt_proptype_Scroll = types.bpfrpt_proptype_NoContentRenderer = types.bpfrpt_proptype_CellSize = types.bpfrpt_proptype_CellSizeGetter = types.bpfrpt_proptype_CellRangeRenderer = types.bpfrpt_proptype_CellRangeRendererParams = types.bpfrpt_proptype_StyleCache = types.bpfrpt_proptype_CellCache = types.bpfrpt_proptype_CellRenderer = types.bpfrpt_proptype_CellRendererParams = types.bpfrpt_proptype_CellPosition = void 0;
|
|
23500
|
-
_interopRequireWildcard(
|
|
25777
|
+
_interopRequireWildcard(React__default);
|
|
23501
25778
|
var _ScalingCellSizeAndPositionManager = _interopRequireDefault(requireScalingCellSizeAndPositionManager());
|
|
23502
25779
|
var _propTypes = _interopRequireDefault(propTypesExports);
|
|
23503
25780
|
var bpfrpt_proptype_CellPosition = {
|
|
@@ -24459,7 +26736,7 @@ function requireGrid$1() {
|
|
|
24459
26736
|
var _assertThisInitialized2 = _interopRequireDefault(requireAssertThisInitialized());
|
|
24460
26737
|
var _inherits2 = _interopRequireDefault(requireInherits());
|
|
24461
26738
|
var _defineProperty2 = _interopRequireDefault(requireDefineProperty());
|
|
24462
|
-
var
|
|
26739
|
+
var React2 = _interopRequireWildcard(React__default);
|
|
24463
26740
|
var _clsx = _interopRequireDefault(require$$10);
|
|
24464
26741
|
var _calculateSizeAndPositionDataAndUpdateScrollOffset = _interopRequireDefault(requireCalculateSizeAndPositionDataAndUpdateScrollOffset());
|
|
24465
26742
|
var _ScalingCellSizeAndPositionManager = _interopRequireDefault(requireScalingCellSizeAndPositionManager());
|
|
@@ -24934,7 +27211,7 @@ function requireGrid$1() {
|
|
|
24934
27211
|
gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? "hidden" : "auto";
|
|
24935
27212
|
var childrenToDisplay = this._childrenToDisplay;
|
|
24936
27213
|
var showNoContentRenderer = childrenToDisplay.length === 0 && height > 0 && width > 0;
|
|
24937
|
-
return
|
|
27214
|
+
return React2.createElement("div", (0, _extends2["default"])({
|
|
24938
27215
|
ref: this._setScrollingContainerRef
|
|
24939
27216
|
}, containerProps, {
|
|
24940
27217
|
"aria-label": this.props["aria-label"],
|
|
@@ -24945,7 +27222,7 @@ function requireGrid$1() {
|
|
|
24945
27222
|
role,
|
|
24946
27223
|
style: _objectSpread({}, gridStyle, {}, style),
|
|
24947
27224
|
tabIndex
|
|
24948
|
-
}), childrenToDisplay.length > 0 &&
|
|
27225
|
+
}), childrenToDisplay.length > 0 && React2.createElement("div", {
|
|
24949
27226
|
className: "ReactVirtualized__Grid__innerScrollContainer",
|
|
24950
27227
|
role: containerRole,
|
|
24951
27228
|
style: _objectSpread({
|
|
@@ -25403,7 +27680,7 @@ function requireGrid$1() {
|
|
|
25403
27680
|
}
|
|
25404
27681
|
}]);
|
|
25405
27682
|
return Grid3;
|
|
25406
|
-
}(
|
|
27683
|
+
}(React2.PureComponent), (0, _defineProperty2["default"])(_class, "propTypes", {
|
|
25407
27684
|
"aria-label": _propTypes["default"].string.isRequired,
|
|
25408
27685
|
"aria-readonly": _propTypes["default"].bool,
|
|
25409
27686
|
/**
|
|
@@ -25739,8 +28016,8 @@ function requireTable() {
|
|
|
25739
28016
|
var _clsx = _interopRequireDefault(require$$10);
|
|
25740
28017
|
var _Column = _interopRequireDefault(requireColumn());
|
|
25741
28018
|
var _propTypes = _interopRequireDefault(propTypesExports);
|
|
25742
|
-
var
|
|
25743
|
-
var _reactDom =
|
|
28019
|
+
var React2 = _interopRequireWildcard(React__default);
|
|
28020
|
+
var _reactDom = ReactDOM__default;
|
|
25744
28021
|
var _Grid2 = _interopRequireWildcard(requireGrid());
|
|
25745
28022
|
var _defaultRowRenderer = _interopRequireDefault(requireDefaultRowRenderer());
|
|
25746
28023
|
var _defaultHeaderRowRenderer = _interopRequireDefault(requireDefaultHeaderRowRenderer());
|
|
@@ -25912,16 +28189,16 @@ function requireTable() {
|
|
|
25912
28189
|
index: -1
|
|
25913
28190
|
}) : rowStyle;
|
|
25914
28191
|
this._cachedColumnStyles = [];
|
|
25915
|
-
|
|
28192
|
+
React2.Children.toArray(children).forEach(function(column, index2) {
|
|
25916
28193
|
var flexStyles = _this2._getFlexStyleForColumn(column, column.props.style);
|
|
25917
28194
|
_this2._cachedColumnStyles[index2] = _objectSpread({
|
|
25918
28195
|
overflow: "hidden"
|
|
25919
28196
|
}, flexStyles);
|
|
25920
28197
|
});
|
|
25921
|
-
return
|
|
28198
|
+
return React2.createElement("div", {
|
|
25922
28199
|
"aria-label": this.props["aria-label"],
|
|
25923
28200
|
"aria-labelledby": this.props["aria-labelledby"],
|
|
25924
|
-
"aria-colcount":
|
|
28201
|
+
"aria-colcount": React2.Children.toArray(children).length,
|
|
25925
28202
|
"aria-rowcount": this.props.rowCount,
|
|
25926
28203
|
className: (0, _clsx["default"])("ReactVirtualized__Table", className),
|
|
25927
28204
|
id,
|
|
@@ -25936,7 +28213,7 @@ function requireTable() {
|
|
|
25936
28213
|
paddingRight: scrollbarWidth,
|
|
25937
28214
|
width
|
|
25938
28215
|
}, rowStyleObject)
|
|
25939
|
-
}),
|
|
28216
|
+
}), React2.createElement(_Grid2["default"], (0, _extends2["default"])({}, this.props, {
|
|
25940
28217
|
"aria-readonly": null,
|
|
25941
28218
|
autoContainerWidth: true,
|
|
25942
28219
|
className: (0, _clsx["default"])("ReactVirtualized__Table__Grid", gridClassName),
|
|
@@ -25987,7 +28264,7 @@ function requireTable() {
|
|
|
25987
28264
|
};
|
|
25988
28265
|
var style = this._cachedColumnStyles[columnIndex];
|
|
25989
28266
|
var title = typeof renderedCell === "string" ? renderedCell : null;
|
|
25990
|
-
return
|
|
28267
|
+
return React2.createElement("div", {
|
|
25991
28268
|
"aria-colindex": columnIndex + 1,
|
|
25992
28269
|
"aria-describedby": id,
|
|
25993
28270
|
className: (0, _clsx["default"])("ReactVirtualized__Table__rowColumn", className),
|
|
@@ -26048,7 +28325,7 @@ function requireTable() {
|
|
|
26048
28325
|
if (sortBy === dataKey) {
|
|
26049
28326
|
headerAriaSort = sortDirection === _SortDirection["default"].ASC ? "ascending" : "descending";
|
|
26050
28327
|
}
|
|
26051
|
-
return
|
|
28328
|
+
return React2.createElement("div", {
|
|
26052
28329
|
"aria-label": headerAriaLabel,
|
|
26053
28330
|
"aria-sort": headerAriaSort,
|
|
26054
28331
|
className: classNames,
|
|
@@ -26077,7 +28354,7 @@ function requireTable() {
|
|
|
26077
28354
|
var rowData = rowGetter({
|
|
26078
28355
|
index: index2
|
|
26079
28356
|
});
|
|
26080
|
-
var columns =
|
|
28357
|
+
var columns = React2.Children.toArray(children).map(function(column, columnIndex) {
|
|
26081
28358
|
return _this3._createColumn({
|
|
26082
28359
|
column,
|
|
26083
28360
|
columnIndex,
|
|
@@ -26135,7 +28412,7 @@ function requireTable() {
|
|
|
26135
28412
|
value: function _getHeaderColumns() {
|
|
26136
28413
|
var _this4 = this;
|
|
26137
28414
|
var _this$props4 = this.props, children = _this$props4.children, disableHeader = _this$props4.disableHeader;
|
|
26138
|
-
var items = disableHeader ? [] :
|
|
28415
|
+
var items = disableHeader ? [] : React2.Children.toArray(children);
|
|
26139
28416
|
return items.map(function(column, index2) {
|
|
26140
28417
|
return _this4._createHeader({
|
|
26141
28418
|
column,
|
|
@@ -26189,7 +28466,7 @@ function requireTable() {
|
|
|
26189
28466
|
}
|
|
26190
28467
|
}]);
|
|
26191
28468
|
return Table3;
|
|
26192
|
-
}(
|
|
28469
|
+
}(React2.PureComponent);
|
|
26193
28470
|
exports2["default"] = Table2;
|
|
26194
28471
|
(0, _defineProperty2["default"])(Table2, "defaultProps", {
|
|
26195
28472
|
disableHeader: false,
|
|
@@ -26226,7 +28503,7 @@ function requireTable() {
|
|
|
26226
28503
|
autoHeight: _propTypes["default"].bool,
|
|
26227
28504
|
/** One or more Columns describing the data displayed in this row */
|
|
26228
28505
|
children: function children(props) {
|
|
26229
|
-
var children2 =
|
|
28506
|
+
var children2 = React2.Children.toArray(props.children);
|
|
26230
28507
|
for (var i = 0; i < children2.length; i++) {
|
|
26231
28508
|
var childType = children2[i].type;
|
|
26232
28509
|
if (childType !== _Column["default"] && !(childType.prototype instanceof _Column["default"])) {
|
|
@@ -26534,10 +28811,10 @@ const useStyles$1 = makeStyles((theme) => ({
|
|
|
26534
28811
|
backgroundClip: "unset"
|
|
26535
28812
|
}
|
|
26536
28813
|
},
|
|
26537
|
-
|
|
28814
|
+
tableRadio: {
|
|
26538
28815
|
borderRadius: "50%"
|
|
26539
28816
|
},
|
|
26540
|
-
|
|
28817
|
+
tableCheckbox: {
|
|
26541
28818
|
borderRadius: "2px"
|
|
26542
28819
|
}
|
|
26543
28820
|
}));
|
|
@@ -26650,7 +28927,7 @@ function SelectableTable(props) {
|
|
|
26650
28927
|
{
|
|
26651
28928
|
id: `${inputUuid}_${data[index2][idKey]}`,
|
|
26652
28929
|
type: "checkbox",
|
|
26653
|
-
className: clsx(classes.radioOrCheckbox, isCheckingMultiple ? classes.
|
|
28930
|
+
className: clsx(classes.radioOrCheckbox, isCheckingMultiple ? classes.tableCheckbox : classes.tableRadio),
|
|
26654
28931
|
name: inputUuid,
|
|
26655
28932
|
value: data[index2][idKey],
|
|
26656
28933
|
onChange: handleInputChange,
|
|
@@ -26686,6 +28963,11 @@ function SelectableTable(props) {
|
|
|
26686
28963
|
}
|
|
26687
28964
|
) }) });
|
|
26688
28965
|
}
|
|
28966
|
+
const FEATURELIST_SORT_OPTIONS = [
|
|
28967
|
+
"alphabetical",
|
|
28968
|
+
"original"
|
|
28969
|
+
];
|
|
28970
|
+
const ALT_COLNAME = "Alternate ID";
|
|
26689
28971
|
const useStyles = makeStyles(() => ({
|
|
26690
28972
|
searchBar: {
|
|
26691
28973
|
marginBottom: "4px",
|
|
@@ -26699,17 +28981,20 @@ function FeatureList(props) {
|
|
|
26699
28981
|
hasColorEncoding,
|
|
26700
28982
|
geneList = [],
|
|
26701
28983
|
featureLabelsMap,
|
|
26702
|
-
featureType,
|
|
26703
28984
|
geneSelection = [],
|
|
26704
28985
|
geneFilter = null,
|
|
26705
28986
|
setGeneSelection,
|
|
26706
28987
|
enableMultiSelect,
|
|
26707
|
-
|
|
26708
|
-
|
|
28988
|
+
showFeatureTable,
|
|
28989
|
+
featureListSort,
|
|
28990
|
+
featureListSortKey,
|
|
28991
|
+
hasFeatureLabels,
|
|
28992
|
+
primaryColumnName
|
|
26709
28993
|
} = props;
|
|
26710
28994
|
const classes = useStyles();
|
|
26711
28995
|
const [searchTerm, setSearchTerm] = useState("");
|
|
26712
28996
|
const [searchResults, setSearchResults] = useState(geneList);
|
|
28997
|
+
const selectableTableSortKey = featureListSortKey === "featureIndex" ? "key" : "name";
|
|
26713
28998
|
useEffect(() => {
|
|
26714
28999
|
const results = geneList.filter((gene) => {
|
|
26715
29000
|
var _a;
|
|
@@ -26730,25 +29015,43 @@ function FeatureList(props) {
|
|
|
26730
29015
|
}
|
|
26731
29016
|
}
|
|
26732
29017
|
}
|
|
26733
|
-
|
|
26734
|
-
(gene) => (
|
|
26735
|
-
|
|
26736
|
-
|
|
26737
|
-
|
|
26738
|
-
|
|
26739
|
-
|
|
26740
|
-
|
|
26741
|
-
|
|
26742
|
-
|
|
29018
|
+
const data = useMemo(() => {
|
|
29019
|
+
const preSortedData = searchResults.filter((gene) => geneFilter ? geneFilter.includes(gene) : true).map(
|
|
29020
|
+
(gene) => ({
|
|
29021
|
+
key: gene,
|
|
29022
|
+
name: (featureLabelsMap == null ? void 0 : featureLabelsMap.get(gene)) || gene,
|
|
29023
|
+
value: geneSelection ? geneSelection.includes(gene) : false
|
|
29024
|
+
})
|
|
29025
|
+
);
|
|
29026
|
+
if (preSortedData && featureListSort === "alphabetical" && preSortedData.length > 0) {
|
|
29027
|
+
return preSortedData.sort(
|
|
29028
|
+
(a, b) => a[selectableTableSortKey].localeCompare(b[selectableTableSortKey])
|
|
29029
|
+
);
|
|
29030
|
+
}
|
|
29031
|
+
return preSortedData;
|
|
29032
|
+
}, [
|
|
29033
|
+
featureListSort,
|
|
29034
|
+
selectableTableSortKey,
|
|
29035
|
+
searchResults,
|
|
29036
|
+
geneFilter,
|
|
29037
|
+
featureLabelsMap,
|
|
29038
|
+
geneSelection
|
|
29039
|
+
]);
|
|
26743
29040
|
const handleChange = (event) => {
|
|
26744
29041
|
setSearchTerm(event.target.value);
|
|
26745
29042
|
};
|
|
26746
|
-
const columns =
|
|
26747
|
-
|
|
26748
|
-
|
|
26749
|
-
|
|
26750
|
-
|
|
26751
|
-
|
|
29043
|
+
const [columns, columnLabels] = useMemo(() => {
|
|
29044
|
+
if (showFeatureTable && hasFeatureLabels) {
|
|
29045
|
+
return [
|
|
29046
|
+
["name", "key"],
|
|
29047
|
+
[primaryColumnName, ALT_COLNAME]
|
|
29048
|
+
];
|
|
29049
|
+
}
|
|
29050
|
+
return [
|
|
29051
|
+
["name"],
|
|
29052
|
+
[primaryColumnName]
|
|
29053
|
+
];
|
|
29054
|
+
}, [showFeatureTable, primaryColumnName, hasFeatureLabels]);
|
|
26752
29055
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
26753
29056
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26754
29057
|
"input",
|
|
@@ -26777,6 +29080,81 @@ function FeatureList(props) {
|
|
|
26777
29080
|
)
|
|
26778
29081
|
] });
|
|
26779
29082
|
}
|
|
29083
|
+
function FeatureListOptions(props) {
|
|
29084
|
+
const {
|
|
29085
|
+
children,
|
|
29086
|
+
featureListSort,
|
|
29087
|
+
setFeatureListSort,
|
|
29088
|
+
featureListSortKey,
|
|
29089
|
+
setFeatureListSortKey,
|
|
29090
|
+
showFeatureTable,
|
|
29091
|
+
setShowFeatureTable,
|
|
29092
|
+
hasFeatureLabels,
|
|
29093
|
+
primaryColumnName
|
|
29094
|
+
} = props;
|
|
29095
|
+
function handleFeatureListSortChange(event) {
|
|
29096
|
+
setFeatureListSort(event.target.value);
|
|
29097
|
+
}
|
|
29098
|
+
function handleFeatureListSortKeyChange(event) {
|
|
29099
|
+
setFeatureListSortKey(event.target.value);
|
|
29100
|
+
}
|
|
29101
|
+
function handleShowTableChange(event) {
|
|
29102
|
+
setShowFeatureTable(event.target.checked);
|
|
29103
|
+
}
|
|
29104
|
+
const classes = usePlotOptionsStyles();
|
|
29105
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(OptionsContainer, { children: [
|
|
29106
|
+
children,
|
|
29107
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
29108
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, htmlFor: "feature-list-sort-option-select", children: "Sort Ordering" }),
|
|
29109
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29110
|
+
OptionSelect,
|
|
29111
|
+
{
|
|
29112
|
+
className: classes.select,
|
|
29113
|
+
value: featureListSort,
|
|
29114
|
+
onChange: handleFeatureListSortChange,
|
|
29115
|
+
inputProps: {
|
|
29116
|
+
id: "feature-list-sort-option-select"
|
|
29117
|
+
},
|
|
29118
|
+
children: FEATURELIST_SORT_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: option, children: option }, option))
|
|
29119
|
+
}
|
|
29120
|
+
) })
|
|
29121
|
+
] }),
|
|
29122
|
+
hasFeatureLabels ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
29123
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
29124
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, htmlFor: "feature-list-sort-key-select", children: "Sort Key" }),
|
|
29125
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29126
|
+
OptionSelect,
|
|
29127
|
+
{
|
|
29128
|
+
className: classes.select,
|
|
29129
|
+
disabled: featureListSort === "original",
|
|
29130
|
+
value: featureListSortKey,
|
|
29131
|
+
onChange: handleFeatureListSortKeyChange,
|
|
29132
|
+
inputProps: {
|
|
29133
|
+
id: "feature-list-sort-key-select"
|
|
29134
|
+
},
|
|
29135
|
+
children: hasFeatureLabels ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
29136
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "featureLabels", children: primaryColumnName }),
|
|
29137
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "featureIndex", children: ALT_COLNAME })
|
|
29138
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "featureIndex", children: primaryColumnName })
|
|
29139
|
+
}
|
|
29140
|
+
) })
|
|
29141
|
+
] }),
|
|
29142
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
|
|
29143
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, children: "Show Alternate IDs" }),
|
|
29144
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29145
|
+
Checkbox$1,
|
|
29146
|
+
{
|
|
29147
|
+
className: classes.tableCheckbox,
|
|
29148
|
+
checked: showFeatureTable,
|
|
29149
|
+
onChange: handleShowTableChange,
|
|
29150
|
+
name: "feature-list-show-table",
|
|
29151
|
+
color: "default"
|
|
29152
|
+
}
|
|
29153
|
+
) })
|
|
29154
|
+
] })
|
|
29155
|
+
] }) : null
|
|
29156
|
+
] });
|
|
29157
|
+
}
|
|
26780
29158
|
function FeatureListSubscriber(props) {
|
|
26781
29159
|
const {
|
|
26782
29160
|
coordinationScopes,
|
|
@@ -26786,7 +29164,8 @@ function FeatureListSubscriber(props) {
|
|
|
26786
29164
|
title: titleOverride,
|
|
26787
29165
|
enableMultiSelect = false,
|
|
26788
29166
|
showTable = false,
|
|
26789
|
-
sort: sort2 = "alphabetical"
|
|
29167
|
+
sort: sort2 = "alphabetical",
|
|
29168
|
+
sortKey = null
|
|
26790
29169
|
} = props;
|
|
26791
29170
|
const loaders = useLoaders();
|
|
26792
29171
|
const [{
|
|
@@ -26802,21 +29181,18 @@ function FeatureListSubscriber(props) {
|
|
|
26802
29181
|
setObsColorEncoding: setCellColorEncoding
|
|
26803
29182
|
}] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.FEATURE_LIST], coordinationScopes);
|
|
26804
29183
|
const variablesLabel = variablesLabelOverride || featureType;
|
|
26805
|
-
const title = titleOverride || `${capitalize(variablesLabel)} List`;
|
|
26806
|
-
const [
|
|
26807
|
-
const [{ featureLabelsMap }, featureLabelsStatus] = useFeatureLabelsData(
|
|
29184
|
+
const title = titleOverride || `${capitalize$1(variablesLabel)} List`;
|
|
29185
|
+
const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(
|
|
26808
29186
|
loaders,
|
|
26809
29187
|
dataset,
|
|
26810
|
-
addUrl,
|
|
26811
29188
|
false,
|
|
26812
29189
|
{},
|
|
26813
29190
|
{},
|
|
26814
29191
|
{ featureType }
|
|
26815
29192
|
);
|
|
26816
|
-
const [{ featureIndex }, matrixIndicesStatus] = useObsFeatureMatrixIndices(
|
|
29193
|
+
const [{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls] = useObsFeatureMatrixIndices(
|
|
26817
29194
|
loaders,
|
|
26818
29195
|
dataset,
|
|
26819
|
-
addUrl,
|
|
26820
29196
|
true,
|
|
26821
29197
|
{ featureType }
|
|
26822
29198
|
);
|
|
@@ -26824,12 +29200,22 @@ function FeatureListSubscriber(props) {
|
|
|
26824
29200
|
featureLabelsStatus,
|
|
26825
29201
|
matrixIndicesStatus
|
|
26826
29202
|
]);
|
|
29203
|
+
const urls = useUrls([
|
|
29204
|
+
featureLabelsUrls,
|
|
29205
|
+
obsFeatureMatrixUrls
|
|
29206
|
+
]);
|
|
26827
29207
|
const geneList = featureIndex || [];
|
|
26828
29208
|
const numGenes = geneList.length;
|
|
29209
|
+
const hasFeatureLabels = Boolean(featureLabelsMap);
|
|
26829
29210
|
function setGeneSelectionAndColorEncoding(newSelection) {
|
|
26830
29211
|
setGeneSelection(newSelection);
|
|
26831
29212
|
setCellColorEncoding("geneSelection");
|
|
26832
29213
|
}
|
|
29214
|
+
const [showFeatureTable, setShowFeatureTable] = useState(showTable);
|
|
29215
|
+
const [featureListSort, setFeatureListSort] = useState(sort2);
|
|
29216
|
+
const [featureListSortKey, setFeatureListSortKey] = useState(null);
|
|
29217
|
+
const initialSortKey = sortKey || (hasFeatureLabels ? "featureLabels" : "featureIndex");
|
|
29218
|
+
const primaryColumnName = `${capitalize$1(featureType)} ID`;
|
|
26833
29219
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26834
29220
|
TitleInfo,
|
|
26835
29221
|
{
|
|
@@ -26840,13 +29226,27 @@ function FeatureListSubscriber(props) {
|
|
|
26840
29226
|
removeGridComponent,
|
|
26841
29227
|
isReady,
|
|
26842
29228
|
urls,
|
|
29229
|
+
options: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29230
|
+
FeatureListOptions,
|
|
29231
|
+
{
|
|
29232
|
+
featureListSort,
|
|
29233
|
+
setFeatureListSort,
|
|
29234
|
+
featureListSortKey: featureListSortKey || initialSortKey,
|
|
29235
|
+
setFeatureListSortKey,
|
|
29236
|
+
showFeatureTable,
|
|
29237
|
+
setShowFeatureTable,
|
|
29238
|
+
hasFeatureLabels: Boolean(featureLabelsMap),
|
|
29239
|
+
primaryColumnName
|
|
29240
|
+
}
|
|
29241
|
+
),
|
|
26843
29242
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26844
29243
|
FeatureList,
|
|
26845
29244
|
{
|
|
26846
29245
|
hasColorEncoding: cellColorEncoding === "geneSelection",
|
|
26847
|
-
|
|
29246
|
+
showFeatureTable,
|
|
26848
29247
|
geneList,
|
|
26849
|
-
|
|
29248
|
+
featureListSort,
|
|
29249
|
+
featureListSortKey: featureListSortKey || initialSortKey,
|
|
26850
29250
|
featureLabelsMap,
|
|
26851
29251
|
featureType,
|
|
26852
29252
|
geneSelection,
|
|
@@ -26854,7 +29254,9 @@ function FeatureListSubscriber(props) {
|
|
|
26854
29254
|
setGeneSelection: setGeneSelectionAndColorEncoding,
|
|
26855
29255
|
setGeneFilter,
|
|
26856
29256
|
setGeneHighlight,
|
|
26857
|
-
enableMultiSelect
|
|
29257
|
+
enableMultiSelect,
|
|
29258
|
+
hasFeatureLabels: Boolean(featureLabelsMap),
|
|
29259
|
+
primaryColumnName
|
|
26858
29260
|
}
|
|
26859
29261
|
)
|
|
26860
29262
|
}
|