@vitessce/feature-list 3.8.9 → 3.8.13

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 CHANGED
@@ -8916,11 +8916,6 @@ const { tss } = createTss({
8916
8916
  "usePlugin": useMuiThemeStyleOverridesPlugin
8917
8917
  });
8918
8918
  const useStyles$3 = tss.create({});
8919
- function chainPropTypes(propType1, propType2) {
8920
- return function validate(...args) {
8921
- return propType1(...args) || propType2(...args);
8922
- };
8923
- }
8924
8919
  const memoTheme = unstable_memoTheme;
8925
8920
  ({
8926
8921
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -8939,413 +8934,87 @@ const memoTheme = unstable_memoTheme;
8939
8934
  function useDefaultProps(params) {
8940
8935
  return useDefaultProps$1(params);
8941
8936
  }
8942
- function _extends$1() {
8943
- return _extends$1 = Object.assign ? Object.assign.bind() : function(n) {
8944
- for (var e = 1; e < arguments.length; e++) {
8945
- var t = arguments[e];
8946
- for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
8947
- }
8948
- return n;
8949
- }, _extends$1.apply(null, arguments);
8950
- }
8951
- function _objectWithoutPropertiesLoose$1(r2, e) {
8952
- if (null == r2) return {};
8953
- var t = {};
8954
- for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
8955
- if (-1 !== e.indexOf(n)) continue;
8956
- t[n] = r2[n];
8957
- }
8958
- return t;
8959
- }
8960
- function _setPrototypeOf$1(t, e) {
8961
- return _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
8962
- return t2.__proto__ = e2, t2;
8963
- }, _setPrototypeOf$1(t, e);
8964
- }
8965
- function _inheritsLoose(t, o) {
8966
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf$1(t, o);
8967
- }
8968
- const TransitionGroupContext = React__default.createContext(null);
8969
- function _assertThisInitialized$1(e) {
8970
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8971
- return e;
8937
+ function getSvgIconUtilityClass(slot) {
8938
+ return generateUtilityClass("MuiSvgIcon", slot);
8972
8939
  }
8973
- function getChildMapping(children2, mapFn) {
8974
- var mapper = function mapper2(child) {
8975
- return mapFn && isValidElement(child) ? mapFn(child) : child;
8940
+ generateUtilityClasses("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
8941
+ const useUtilityClasses$5 = (ownerState) => {
8942
+ const {
8943
+ color: color2,
8944
+ fontSize,
8945
+ classes
8946
+ } = ownerState;
8947
+ const slots = {
8948
+ root: ["root", color2 !== "inherit" && `color${capitalize(color2)}`, `fontSize${capitalize(fontSize)}`]
8976
8949
  };
8977
- var result = /* @__PURE__ */ Object.create(null);
8978
- if (children2) Children.map(children2, function(c) {
8979
- return c;
8980
- }).forEach(function(child) {
8981
- result[child.key] = mapper(child);
8982
- });
8983
- return result;
8984
- }
8985
- function mergeChildMappings(prev2, next2) {
8986
- prev2 = prev2 || {};
8987
- next2 = next2 || {};
8988
- function getValueForKey(key) {
8989
- return key in next2 ? next2[key] : prev2[key];
8990
- }
8991
- var nextKeysPending = /* @__PURE__ */ Object.create(null);
8992
- var pendingKeys = [];
8993
- for (var prevKey in prev2) {
8994
- if (prevKey in next2) {
8995
- if (pendingKeys.length) {
8996
- nextKeysPending[prevKey] = pendingKeys;
8997
- pendingKeys = [];
8998
- }
8999
- } else {
9000
- pendingKeys.push(prevKey);
9001
- }
9002
- }
9003
- var i;
9004
- var childMapping = {};
9005
- for (var nextKey in next2) {
9006
- if (nextKeysPending[nextKey]) {
9007
- for (i = 0; i < nextKeysPending[nextKey].length; i++) {
9008
- var pendingNextKey = nextKeysPending[nextKey][i];
9009
- childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
9010
- }
9011
- }
9012
- childMapping[nextKey] = getValueForKey(nextKey);
9013
- }
9014
- for (i = 0; i < pendingKeys.length; i++) {
9015
- childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
9016
- }
9017
- return childMapping;
9018
- }
9019
- function getProp(child, prop, props) {
9020
- return props[prop] != null ? props[prop] : child.props[prop];
9021
- }
9022
- function getInitialChildMapping(props, onExited) {
9023
- return getChildMapping(props.children, function(child) {
9024
- return cloneElement(child, {
9025
- onExited: onExited.bind(null, child),
9026
- in: true,
9027
- appear: getProp(child, "appear", props),
9028
- enter: getProp(child, "enter", props),
9029
- exit: getProp(child, "exit", props)
9030
- });
9031
- });
9032
- }
9033
- function getNextChildMapping(nextProps, prevChildMapping, onExited) {
9034
- var nextChildMapping = getChildMapping(nextProps.children);
9035
- var children2 = mergeChildMappings(prevChildMapping, nextChildMapping);
9036
- Object.keys(children2).forEach(function(key) {
9037
- var child = children2[key];
9038
- if (!isValidElement(child)) return;
9039
- var hasPrev = key in prevChildMapping;
9040
- var hasNext = key in nextChildMapping;
9041
- var prevChild = prevChildMapping[key];
9042
- var isLeaving = isValidElement(prevChild) && !prevChild.props.in;
9043
- if (hasNext && (!hasPrev || isLeaving)) {
9044
- children2[key] = cloneElement(child, {
9045
- onExited: onExited.bind(null, child),
9046
- in: true,
9047
- exit: getProp(child, "exit", nextProps),
9048
- enter: getProp(child, "enter", nextProps)
9049
- });
9050
- } else if (!hasNext && hasPrev && !isLeaving) {
9051
- children2[key] = cloneElement(child, {
9052
- in: false
9053
- });
9054
- } else if (hasNext && hasPrev && isValidElement(prevChild)) {
9055
- children2[key] = cloneElement(child, {
9056
- onExited: onExited.bind(null, child),
9057
- in: prevChild.props.in,
9058
- exit: getProp(child, "exit", nextProps),
9059
- enter: getProp(child, "enter", nextProps)
9060
- });
9061
- }
9062
- });
9063
- return children2;
9064
- }
9065
- var values = Object.values || function(obj) {
9066
- return Object.keys(obj).map(function(k) {
9067
- return obj[k];
9068
- });
8950
+ return composeClasses(slots, getSvgIconUtilityClass, classes);
9069
8951
  };
9070
- var defaultProps = {
9071
- component: "div",
9072
- childFactory: function childFactory(child) {
9073
- return child;
8952
+ const SvgIconRoot = styled("svg", {
8953
+ name: "MuiSvgIcon",
8954
+ slot: "Root",
8955
+ overridesResolver: (props, styles) => {
8956
+ const {
8957
+ ownerState
8958
+ } = props;
8959
+ return [styles.root, ownerState.color !== "inherit" && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];
9074
8960
  }
9075
- };
9076
- var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
9077
- _inheritsLoose(TransitionGroup2, _React$Component);
9078
- function TransitionGroup2(props, context) {
9079
- var _this;
9080
- _this = _React$Component.call(this, props, context) || this;
9081
- var handleExited = _this.handleExited.bind(_assertThisInitialized$1(_this));
9082
- _this.state = {
9083
- contextValue: {
9084
- isMounting: true
8961
+ })(memoTheme(({
8962
+ theme
8963
+ }) => {
8964
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
8965
+ return {
8966
+ userSelect: "none",
8967
+ width: "1em",
8968
+ height: "1em",
8969
+ display: "inline-block",
8970
+ flexShrink: 0,
8971
+ transition: (_d = (_a = theme.transitions) == null ? void 0 : _a.create) == null ? void 0 : _d.call(_a, "fill", {
8972
+ duration: (_c = (_b = (theme.vars ?? theme).transitions) == null ? void 0 : _b.duration) == null ? void 0 : _c.shorter
8973
+ }),
8974
+ variants: [
8975
+ {
8976
+ props: (props) => !props.hasSvgAsChild,
8977
+ style: {
8978
+ // the <svg> will define the property that has `currentColor`
8979
+ // for example heroicons uses fill="none" and stroke="currentColor"
8980
+ fill: "currentColor"
8981
+ }
9085
8982
  },
9086
- handleExited,
9087
- firstRender: true
9088
- };
9089
- return _this;
9090
- }
9091
- var _proto = TransitionGroup2.prototype;
9092
- _proto.componentDidMount = function componentDidMount() {
9093
- this.mounted = true;
9094
- this.setState({
9095
- contextValue: {
9096
- isMounting: false
9097
- }
9098
- });
9099
- };
9100
- _proto.componentWillUnmount = function componentWillUnmount() {
9101
- this.mounted = false;
9102
- };
9103
- TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
9104
- var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
9105
- return {
9106
- children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
9107
- firstRender: false
9108
- };
9109
- };
9110
- _proto.handleExited = function handleExited(child, node2) {
9111
- var currentChildMapping = getChildMapping(this.props.children);
9112
- if (child.key in currentChildMapping) return;
9113
- if (child.props.onExited) {
9114
- child.props.onExited(node2);
9115
- }
9116
- if (this.mounted) {
9117
- this.setState(function(state) {
9118
- var children2 = _extends$1({}, state.children);
9119
- delete children2[child.key];
9120
- return {
9121
- children: children2
9122
- };
9123
- });
9124
- }
9125
- };
9126
- _proto.render = function render() {
9127
- var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose$1(_this$props, ["component", "childFactory"]);
9128
- var contextValue = this.state.contextValue;
9129
- var children2 = values(this.state.children).map(childFactory2);
9130
- delete props.appear;
9131
- delete props.enter;
9132
- delete props.exit;
9133
- if (Component === null) {
9134
- return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
9135
- value: contextValue
9136
- }, children2);
9137
- }
9138
- return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
9139
- value: contextValue
9140
- }, /* @__PURE__ */ React__default.createElement(Component, props, children2));
9141
- };
9142
- return TransitionGroup2;
9143
- }(React__default.Component);
9144
- TransitionGroup.propTypes = {
9145
- /**
9146
- * `<TransitionGroup>` renders a `<div>` by default. You can change this
9147
- * behavior by providing a `component` prop.
9148
- * If you use React v16+ and would like to avoid a wrapping `<div>` element
9149
- * you can pass in `component={null}`. This is useful if the wrapping div
9150
- * borks your css styles.
9151
- */
9152
- component: PropTypes.any,
9153
- /**
9154
- * A set of `<Transition>` components, that are toggled `in` and out as they
9155
- * leave. the `<TransitionGroup>` will inject specific transition props, so
9156
- * remember to spread them through if you are wrapping the `<Transition>` as
9157
- * with our `<Fade>` example.
9158
- *
9159
- * While this component is meant for multiple `Transition` or `CSSTransition`
9160
- * children, sometimes you may want to have a single transition child with
9161
- * content that you want to be transitioned out and in when you change it
9162
- * (e.g. routes, images etc.) In that case you can change the `key` prop of
9163
- * the transition child as you change its content, this will cause
9164
- * `TransitionGroup` to transition the child out and back in.
9165
- */
9166
- children: PropTypes.node,
9167
- /**
9168
- * A convenience prop that enables or disables appear animations
9169
- * for all children. Note that specifying this will override any defaults set
9170
- * on individual children Transitions.
9171
- */
9172
- appear: PropTypes.bool,
9173
- /**
9174
- * A convenience prop that enables or disables enter animations
9175
- * for all children. Note that specifying this will override any defaults set
9176
- * on individual children Transitions.
9177
- */
9178
- enter: PropTypes.bool,
9179
- /**
9180
- * A convenience prop that enables or disables exit animations
9181
- * for all children. Note that specifying this will override any defaults set
9182
- * on individual children Transitions.
9183
- */
9184
- exit: PropTypes.bool,
9185
- /**
9186
- * You may need to apply reactive updates to a child as it is exiting.
9187
- * This is generally done by using `cloneElement` however in the case of an exiting
9188
- * child the element has already been removed and not accessible to the consumer.
9189
- *
9190
- * If you do need to update a child as it leaves you can provide a `childFactory`
9191
- * to wrap every child, even the ones that are leaving.
9192
- *
9193
- * @type Function(child: ReactElement) -> ReactElement
9194
- */
9195
- childFactory: PropTypes.func
9196
- };
9197
- TransitionGroup.defaultProps = defaultProps;
9198
- const UNINITIALIZED = {};
9199
- function useLazyRef(init, initArg) {
9200
- const ref = React.useRef(UNINITIALIZED);
9201
- if (ref.current === UNINITIALIZED) {
9202
- ref.current = init(initArg);
9203
- }
9204
- return ref;
9205
- }
9206
- const EMPTY$1 = [];
9207
- function useOnMount(fn) {
9208
- React.useEffect(fn, EMPTY$1);
9209
- }
9210
- class Timeout {
9211
- constructor() {
9212
- __publicField(this, "currentId", null);
9213
- __publicField(this, "clear", () => {
9214
- if (this.currentId !== null) {
9215
- clearTimeout(this.currentId);
9216
- this.currentId = null;
9217
- }
9218
- });
9219
- __publicField(this, "disposeEffect", () => {
9220
- return this.clear;
9221
- });
9222
- }
9223
- static create() {
9224
- return new Timeout();
9225
- }
9226
- /**
9227
- * Executes `fn` after `delay`, clearing any previously scheduled call.
9228
- */
9229
- start(delay, fn) {
9230
- this.clear();
9231
- this.currentId = setTimeout(() => {
9232
- this.currentId = null;
9233
- fn();
9234
- }, delay);
9235
- }
9236
- }
9237
- function useTimeout() {
9238
- const timeout = useLazyRef(Timeout.create).current;
9239
- useOnMount(timeout.disposeEffect);
9240
- return timeout;
9241
- }
9242
- function isClassComponent(elementType) {
9243
- const {
9244
- prototype = {}
9245
- } = elementType;
9246
- return Boolean(prototype.isReactComponent);
9247
- }
9248
- function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {
9249
- const propValue = props[propName];
9250
- const safePropName = propFullName || propName;
9251
- if (propValue == null || // When server-side rendering React doesn't warn either.
9252
- // This is not an accurate check for SSR.
9253
- // This is only in place for emotion compat.
9254
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
9255
- typeof window === "undefined") {
9256
- return null;
9257
- }
9258
- let warningHint;
9259
- if (typeof propValue === "function" && !isClassComponent(propValue)) {
9260
- warningHint = "Did you accidentally provide a plain function component instead?";
9261
- }
9262
- if (warningHint !== void 0) {
9263
- return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element type that can hold a ref. ${warningHint} For more information see https://mui.com/r/caveat-with-refs-guide`);
9264
- }
9265
- return null;
9266
- }
9267
- const elementTypeAcceptingRef$1 = chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);
9268
- function getSvgIconUtilityClass(slot) {
9269
- return generateUtilityClass("MuiSvgIcon", slot);
9270
- }
9271
- generateUtilityClasses("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
9272
- const useUtilityClasses$5 = (ownerState) => {
9273
- const {
9274
- color: color2,
9275
- fontSize,
9276
- classes
9277
- } = ownerState;
9278
- const slots = {
9279
- root: ["root", color2 !== "inherit" && `color${capitalize(color2)}`, `fontSize${capitalize(fontSize)}`]
9280
- };
9281
- return composeClasses(slots, getSvgIconUtilityClass, classes);
9282
- };
9283
- const SvgIconRoot = styled("svg", {
9284
- name: "MuiSvgIcon",
9285
- slot: "Root",
9286
- overridesResolver: (props, styles) => {
9287
- const {
9288
- ownerState
9289
- } = props;
9290
- return [styles.root, ownerState.color !== "inherit" && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];
9291
- }
9292
- })(memoTheme(({
9293
- theme
9294
- }) => {
9295
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
9296
- return {
9297
- userSelect: "none",
9298
- width: "1em",
9299
- height: "1em",
9300
- display: "inline-block",
9301
- flexShrink: 0,
9302
- transition: (_d = (_a = theme.transitions) == null ? void 0 : _a.create) == null ? void 0 : _d.call(_a, "fill", {
9303
- duration: (_c = (_b = (theme.vars ?? theme).transitions) == null ? void 0 : _b.duration) == null ? void 0 : _c.shorter
9304
- }),
9305
- variants: [
9306
- {
9307
- props: (props) => !props.hasSvgAsChild,
9308
- style: {
9309
- // the <svg> will define the property that has `currentColor`
9310
- // for example heroicons uses fill="none" and stroke="currentColor"
9311
- fill: "currentColor"
9312
- }
9313
- },
9314
- {
9315
- props: {
9316
- fontSize: "inherit"
9317
- },
9318
- style: {
9319
- fontSize: "inherit"
9320
- }
9321
- },
9322
- {
9323
- props: {
9324
- fontSize: "small"
9325
- },
9326
- style: {
9327
- fontSize: ((_f = (_e = theme.typography) == null ? void 0 : _e.pxToRem) == null ? void 0 : _f.call(_e, 20)) || "1.25rem"
9328
- }
9329
- },
9330
- {
9331
- props: {
9332
- fontSize: "medium"
9333
- },
9334
- style: {
9335
- fontSize: ((_h = (_g = theme.typography) == null ? void 0 : _g.pxToRem) == null ? void 0 : _h.call(_g, 24)) || "1.5rem"
9336
- }
9337
- },
9338
- {
9339
- props: {
9340
- fontSize: "large"
9341
- },
9342
- style: {
9343
- fontSize: ((_j = (_i = theme.typography) == null ? void 0 : _i.pxToRem) == null ? void 0 : _j.call(_i, 35)) || "2.1875rem"
9344
- }
9345
- },
9346
- // TODO v5 deprecate color prop, v6 remove for sx
9347
- ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color2]) => {
9348
- var _a2, _b2;
8983
+ {
8984
+ props: {
8985
+ fontSize: "inherit"
8986
+ },
8987
+ style: {
8988
+ fontSize: "inherit"
8989
+ }
8990
+ },
8991
+ {
8992
+ props: {
8993
+ fontSize: "small"
8994
+ },
8995
+ style: {
8996
+ fontSize: ((_f = (_e = theme.typography) == null ? void 0 : _e.pxToRem) == null ? void 0 : _f.call(_e, 20)) || "1.25rem"
8997
+ }
8998
+ },
8999
+ {
9000
+ props: {
9001
+ fontSize: "medium"
9002
+ },
9003
+ style: {
9004
+ fontSize: ((_h = (_g = theme.typography) == null ? void 0 : _g.pxToRem) == null ? void 0 : _h.call(_g, 24)) || "1.5rem"
9005
+ }
9006
+ },
9007
+ {
9008
+ props: {
9009
+ fontSize: "large"
9010
+ },
9011
+ style: {
9012
+ fontSize: ((_j = (_i = theme.typography) == null ? void 0 : _i.pxToRem) == null ? void 0 : _j.call(_i, 35)) || "2.1875rem"
9013
+ }
9014
+ },
9015
+ // TODO v5 deprecate color prop, v6 remove for sx
9016
+ ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color2]) => {
9017
+ var _a2, _b2;
9349
9018
  return {
9350
9019
  props: {
9351
9020
  color: color2
@@ -9678,6 +9347,337 @@ function mergeSlotProps$1(externalSlotProps, defaultSlotProps) {
9678
9347
  }
9679
9348
  };
9680
9349
  }
9350
+ function chainPropTypes(propType1, propType2) {
9351
+ return function validate(...args) {
9352
+ return propType1(...args) || propType2(...args);
9353
+ };
9354
+ }
9355
+ function _extends$1() {
9356
+ return _extends$1 = Object.assign ? Object.assign.bind() : function(n) {
9357
+ for (var e = 1; e < arguments.length; e++) {
9358
+ var t = arguments[e];
9359
+ for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
9360
+ }
9361
+ return n;
9362
+ }, _extends$1.apply(null, arguments);
9363
+ }
9364
+ function _objectWithoutPropertiesLoose$1(r2, e) {
9365
+ if (null == r2) return {};
9366
+ var t = {};
9367
+ for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
9368
+ if (-1 !== e.indexOf(n)) continue;
9369
+ t[n] = r2[n];
9370
+ }
9371
+ return t;
9372
+ }
9373
+ function _setPrototypeOf$1(t, e) {
9374
+ return _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
9375
+ return t2.__proto__ = e2, t2;
9376
+ }, _setPrototypeOf$1(t, e);
9377
+ }
9378
+ function _inheritsLoose(t, o) {
9379
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf$1(t, o);
9380
+ }
9381
+ const TransitionGroupContext = React__default.createContext(null);
9382
+ function _assertThisInitialized$1(e) {
9383
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
9384
+ return e;
9385
+ }
9386
+ function getChildMapping(children2, mapFn) {
9387
+ var mapper = function mapper2(child) {
9388
+ return mapFn && isValidElement(child) ? mapFn(child) : child;
9389
+ };
9390
+ var result = /* @__PURE__ */ Object.create(null);
9391
+ if (children2) Children.map(children2, function(c) {
9392
+ return c;
9393
+ }).forEach(function(child) {
9394
+ result[child.key] = mapper(child);
9395
+ });
9396
+ return result;
9397
+ }
9398
+ function mergeChildMappings(prev2, next2) {
9399
+ prev2 = prev2 || {};
9400
+ next2 = next2 || {};
9401
+ function getValueForKey(key) {
9402
+ return key in next2 ? next2[key] : prev2[key];
9403
+ }
9404
+ var nextKeysPending = /* @__PURE__ */ Object.create(null);
9405
+ var pendingKeys = [];
9406
+ for (var prevKey in prev2) {
9407
+ if (prevKey in next2) {
9408
+ if (pendingKeys.length) {
9409
+ nextKeysPending[prevKey] = pendingKeys;
9410
+ pendingKeys = [];
9411
+ }
9412
+ } else {
9413
+ pendingKeys.push(prevKey);
9414
+ }
9415
+ }
9416
+ var i;
9417
+ var childMapping = {};
9418
+ for (var nextKey in next2) {
9419
+ if (nextKeysPending[nextKey]) {
9420
+ for (i = 0; i < nextKeysPending[nextKey].length; i++) {
9421
+ var pendingNextKey = nextKeysPending[nextKey][i];
9422
+ childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
9423
+ }
9424
+ }
9425
+ childMapping[nextKey] = getValueForKey(nextKey);
9426
+ }
9427
+ for (i = 0; i < pendingKeys.length; i++) {
9428
+ childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
9429
+ }
9430
+ return childMapping;
9431
+ }
9432
+ function getProp(child, prop, props) {
9433
+ return props[prop] != null ? props[prop] : child.props[prop];
9434
+ }
9435
+ function getInitialChildMapping(props, onExited) {
9436
+ return getChildMapping(props.children, function(child) {
9437
+ return cloneElement(child, {
9438
+ onExited: onExited.bind(null, child),
9439
+ in: true,
9440
+ appear: getProp(child, "appear", props),
9441
+ enter: getProp(child, "enter", props),
9442
+ exit: getProp(child, "exit", props)
9443
+ });
9444
+ });
9445
+ }
9446
+ function getNextChildMapping(nextProps, prevChildMapping, onExited) {
9447
+ var nextChildMapping = getChildMapping(nextProps.children);
9448
+ var children2 = mergeChildMappings(prevChildMapping, nextChildMapping);
9449
+ Object.keys(children2).forEach(function(key) {
9450
+ var child = children2[key];
9451
+ if (!isValidElement(child)) return;
9452
+ var hasPrev = key in prevChildMapping;
9453
+ var hasNext = key in nextChildMapping;
9454
+ var prevChild = prevChildMapping[key];
9455
+ var isLeaving = isValidElement(prevChild) && !prevChild.props.in;
9456
+ if (hasNext && (!hasPrev || isLeaving)) {
9457
+ children2[key] = cloneElement(child, {
9458
+ onExited: onExited.bind(null, child),
9459
+ in: true,
9460
+ exit: getProp(child, "exit", nextProps),
9461
+ enter: getProp(child, "enter", nextProps)
9462
+ });
9463
+ } else if (!hasNext && hasPrev && !isLeaving) {
9464
+ children2[key] = cloneElement(child, {
9465
+ in: false
9466
+ });
9467
+ } else if (hasNext && hasPrev && isValidElement(prevChild)) {
9468
+ children2[key] = cloneElement(child, {
9469
+ onExited: onExited.bind(null, child),
9470
+ in: prevChild.props.in,
9471
+ exit: getProp(child, "exit", nextProps),
9472
+ enter: getProp(child, "enter", nextProps)
9473
+ });
9474
+ }
9475
+ });
9476
+ return children2;
9477
+ }
9478
+ var values = Object.values || function(obj) {
9479
+ return Object.keys(obj).map(function(k) {
9480
+ return obj[k];
9481
+ });
9482
+ };
9483
+ var defaultProps = {
9484
+ component: "div",
9485
+ childFactory: function childFactory(child) {
9486
+ return child;
9487
+ }
9488
+ };
9489
+ var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
9490
+ _inheritsLoose(TransitionGroup2, _React$Component);
9491
+ function TransitionGroup2(props, context) {
9492
+ var _this;
9493
+ _this = _React$Component.call(this, props, context) || this;
9494
+ var handleExited = _this.handleExited.bind(_assertThisInitialized$1(_this));
9495
+ _this.state = {
9496
+ contextValue: {
9497
+ isMounting: true
9498
+ },
9499
+ handleExited,
9500
+ firstRender: true
9501
+ };
9502
+ return _this;
9503
+ }
9504
+ var _proto = TransitionGroup2.prototype;
9505
+ _proto.componentDidMount = function componentDidMount() {
9506
+ this.mounted = true;
9507
+ this.setState({
9508
+ contextValue: {
9509
+ isMounting: false
9510
+ }
9511
+ });
9512
+ };
9513
+ _proto.componentWillUnmount = function componentWillUnmount() {
9514
+ this.mounted = false;
9515
+ };
9516
+ TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
9517
+ var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
9518
+ return {
9519
+ children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
9520
+ firstRender: false
9521
+ };
9522
+ };
9523
+ _proto.handleExited = function handleExited(child, node2) {
9524
+ var currentChildMapping = getChildMapping(this.props.children);
9525
+ if (child.key in currentChildMapping) return;
9526
+ if (child.props.onExited) {
9527
+ child.props.onExited(node2);
9528
+ }
9529
+ if (this.mounted) {
9530
+ this.setState(function(state) {
9531
+ var children2 = _extends$1({}, state.children);
9532
+ delete children2[child.key];
9533
+ return {
9534
+ children: children2
9535
+ };
9536
+ });
9537
+ }
9538
+ };
9539
+ _proto.render = function render() {
9540
+ var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose$1(_this$props, ["component", "childFactory"]);
9541
+ var contextValue = this.state.contextValue;
9542
+ var children2 = values(this.state.children).map(childFactory2);
9543
+ delete props.appear;
9544
+ delete props.enter;
9545
+ delete props.exit;
9546
+ if (Component === null) {
9547
+ return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
9548
+ value: contextValue
9549
+ }, children2);
9550
+ }
9551
+ return /* @__PURE__ */ React__default.createElement(TransitionGroupContext.Provider, {
9552
+ value: contextValue
9553
+ }, /* @__PURE__ */ React__default.createElement(Component, props, children2));
9554
+ };
9555
+ return TransitionGroup2;
9556
+ }(React__default.Component);
9557
+ TransitionGroup.propTypes = {
9558
+ /**
9559
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
9560
+ * behavior by providing a `component` prop.
9561
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
9562
+ * you can pass in `component={null}`. This is useful if the wrapping div
9563
+ * borks your css styles.
9564
+ */
9565
+ component: PropTypes.any,
9566
+ /**
9567
+ * A set of `<Transition>` components, that are toggled `in` and out as they
9568
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
9569
+ * remember to spread them through if you are wrapping the `<Transition>` as
9570
+ * with our `<Fade>` example.
9571
+ *
9572
+ * While this component is meant for multiple `Transition` or `CSSTransition`
9573
+ * children, sometimes you may want to have a single transition child with
9574
+ * content that you want to be transitioned out and in when you change it
9575
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
9576
+ * the transition child as you change its content, this will cause
9577
+ * `TransitionGroup` to transition the child out and back in.
9578
+ */
9579
+ children: PropTypes.node,
9580
+ /**
9581
+ * A convenience prop that enables or disables appear animations
9582
+ * for all children. Note that specifying this will override any defaults set
9583
+ * on individual children Transitions.
9584
+ */
9585
+ appear: PropTypes.bool,
9586
+ /**
9587
+ * A convenience prop that enables or disables enter animations
9588
+ * for all children. Note that specifying this will override any defaults set
9589
+ * on individual children Transitions.
9590
+ */
9591
+ enter: PropTypes.bool,
9592
+ /**
9593
+ * A convenience prop that enables or disables exit animations
9594
+ * for all children. Note that specifying this will override any defaults set
9595
+ * on individual children Transitions.
9596
+ */
9597
+ exit: PropTypes.bool,
9598
+ /**
9599
+ * You may need to apply reactive updates to a child as it is exiting.
9600
+ * This is generally done by using `cloneElement` however in the case of an exiting
9601
+ * child the element has already been removed and not accessible to the consumer.
9602
+ *
9603
+ * If you do need to update a child as it leaves you can provide a `childFactory`
9604
+ * to wrap every child, even the ones that are leaving.
9605
+ *
9606
+ * @type Function(child: ReactElement) -> ReactElement
9607
+ */
9608
+ childFactory: PropTypes.func
9609
+ };
9610
+ TransitionGroup.defaultProps = defaultProps;
9611
+ const UNINITIALIZED = {};
9612
+ function useLazyRef(init, initArg) {
9613
+ const ref = React.useRef(UNINITIALIZED);
9614
+ if (ref.current === UNINITIALIZED) {
9615
+ ref.current = init(initArg);
9616
+ }
9617
+ return ref;
9618
+ }
9619
+ const EMPTY$1 = [];
9620
+ function useOnMount(fn) {
9621
+ React.useEffect(fn, EMPTY$1);
9622
+ }
9623
+ class Timeout {
9624
+ constructor() {
9625
+ __publicField(this, "currentId", null);
9626
+ __publicField(this, "clear", () => {
9627
+ if (this.currentId !== null) {
9628
+ clearTimeout(this.currentId);
9629
+ this.currentId = null;
9630
+ }
9631
+ });
9632
+ __publicField(this, "disposeEffect", () => {
9633
+ return this.clear;
9634
+ });
9635
+ }
9636
+ static create() {
9637
+ return new Timeout();
9638
+ }
9639
+ /**
9640
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
9641
+ */
9642
+ start(delay, fn) {
9643
+ this.clear();
9644
+ this.currentId = setTimeout(() => {
9645
+ this.currentId = null;
9646
+ fn();
9647
+ }, delay);
9648
+ }
9649
+ }
9650
+ function useTimeout() {
9651
+ const timeout = useLazyRef(Timeout.create).current;
9652
+ useOnMount(timeout.disposeEffect);
9653
+ return timeout;
9654
+ }
9655
+ function isClassComponent(elementType) {
9656
+ const {
9657
+ prototype = {}
9658
+ } = elementType;
9659
+ return Boolean(prototype.isReactComponent);
9660
+ }
9661
+ function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {
9662
+ const propValue = props[propName];
9663
+ const safePropName = propFullName || propName;
9664
+ if (propValue == null || // When server-side rendering React doesn't warn either.
9665
+ // This is not an accurate check for SSR.
9666
+ // This is only in place for emotion compat.
9667
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
9668
+ typeof window === "undefined") {
9669
+ return null;
9670
+ }
9671
+ let warningHint;
9672
+ if (typeof propValue === "function" && !isClassComponent(propValue)) {
9673
+ warningHint = "Did you accidentally provide a plain function component instead?";
9674
+ }
9675
+ if (warningHint !== void 0) {
9676
+ return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element type that can hold a ref. ${warningHint} For more information see https://mui.com/r/caveat-with-refs-guide`);
9677
+ }
9678
+ return null;
9679
+ }
9680
+ const elementTypeAcceptingRef$1 = chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);
9681
9681
  function isHostComponent(element) {
9682
9682
  return typeof element === "string";
9683
9683
  }
@@ -21265,7 +21265,7 @@ function FeatureList(props) {
21265
21265
  const selectedVisibleKeys = selectionArray.map((s) => s.key).filter(
21266
21266
  (key) => searchResults.includes(key)
21267
21267
  );
21268
- const newSelection = [...selectedHiddenKeys, ...selectedVisibleKeys].filter(Boolean);
21268
+ const newSelection = enableMultiSelect ? [...selectedHiddenKeys, ...selectedVisibleKeys].filter(Boolean) : selectionArray.map((s) => s.key).filter(Boolean);
21269
21269
  if (newSelection.length > 0) {
21270
21270
  setGeneSelection(newSelection);
21271
21271
  } else {
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureList.d.ts","sourceRoot":"","sources":["../src/FeatureList.js"],"names":[],"mappings":"AAkBA,oEA8HC"}
1
+ {"version":3,"file":"FeatureList.d.ts","sourceRoot":"","sources":["../src/FeatureList.js"],"names":[],"mappings":"AAkBA,oEAiIC"}
@@ -36,8 +36,8 @@ export default function FeatureList(props) {
36
36
  ? selection
37
37
  : [selection];
38
38
  const selectedVisibleKeys = selectionArray.map(s => s.key).filter(key => searchResults.includes(key));
39
- const newSelection = [...selectedHiddenKeys, ...selectedVisibleKeys]
40
- .filter(Boolean);
39
+ const newSelection = enableMultiSelect ? ([...selectedHiddenKeys, ...selectedVisibleKeys]
40
+ .filter(Boolean)) : selectionArray.map(s => s.key).filter(Boolean);
41
41
  if (newSelection.length > 0) {
42
42
  setGeneSelection(newSelection);
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/feature-list",
3
- "version": "3.8.9",
3
+ "version": "3.8.13",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -21,10 +21,10 @@
21
21
  "react-virtualized": "^9.22.6",
22
22
  "uuid": "^9.0.0",
23
23
  "react-aria": "^3.28.0",
24
- "@vitessce/styles": "3.8.9",
25
- "@vitessce/constants-internal": "3.8.9",
26
- "@vitessce/utils": "3.8.9",
27
- "@vitessce/vit-s": "3.8.9"
24
+ "@vitessce/styles": "3.8.13",
25
+ "@vitessce/constants-internal": "3.8.13",
26
+ "@vitessce/utils": "3.8.13",
27
+ "@vitessce/vit-s": "3.8.13"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@testing-library/jest-dom": "^6.6.3",
@@ -63,8 +63,11 @@ export default function FeatureList(props) {
63
63
  const selectedVisibleKeys = selectionArray.map(s => s.key).filter(
64
64
  key => searchResults.includes(key),
65
65
  );
66
- const newSelection = [...selectedHiddenKeys, ...selectedVisibleKeys]
67
- .filter(Boolean);
66
+
67
+ const newSelection = enableMultiSelect ? (
68
+ [...selectedHiddenKeys, ...selectedVisibleKeys]
69
+ .filter(Boolean)
70
+ ) : selectionArray.map(s => s.key).filter(Boolean);
68
71
 
69
72
  if (newSelection.length > 0) {
70
73
  setGeneSelection(newSelection);