@vitessce/feature-list 3.2.0 → 3.2.1
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import React__default, { Children, isValidElement, cloneElement, useState, useEffect, useCallback, useMemo,
|
|
2
|
+
import React__default, { Children, isValidElement, cloneElement, useState, useEffect, useCallback, useMemo, useContext, useRef } from "react";
|
|
3
3
|
import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordination, useFeatureLabelsData, useObsFeatureMatrixIndices, useReady, useUrls, TitleInfo } from "@vitessce/vit-s";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
import ReactDOM__default from "react-dom";
|
|
@@ -29303,6 +29303,132 @@ function FeatureList(props) {
|
|
|
29303
29303
|
)
|
|
29304
29304
|
] });
|
|
29305
29305
|
}
|
|
29306
|
+
const $b5e257d569688ac6$var$defaultContext = {
|
|
29307
|
+
prefix: String(Math.round(Math.random() * 1e10)),
|
|
29308
|
+
current: 0
|
|
29309
|
+
};
|
|
29310
|
+
const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.createContext($b5e257d569688ac6$var$defaultContext);
|
|
29311
|
+
const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.createContext(false);
|
|
29312
|
+
let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
29313
|
+
let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
|
|
29314
|
+
function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
|
|
29315
|
+
let ctx = useContext($b5e257d569688ac6$var$SSRContext);
|
|
29316
|
+
let ref = useRef(null);
|
|
29317
|
+
if (ref.current === null && !isDisabled) {
|
|
29318
|
+
var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
|
|
29319
|
+
let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = React__default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
|
|
29320
|
+
if (currentOwner) {
|
|
29321
|
+
let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
|
|
29322
|
+
if (prevComponentValue == null)
|
|
29323
|
+
$b5e257d569688ac6$var$componentIds.set(currentOwner, {
|
|
29324
|
+
id: ctx.current,
|
|
29325
|
+
state: currentOwner.memoizedState
|
|
29326
|
+
});
|
|
29327
|
+
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
29328
|
+
ctx.current = prevComponentValue.id;
|
|
29329
|
+
$b5e257d569688ac6$var$componentIds.delete(currentOwner);
|
|
29330
|
+
}
|
|
29331
|
+
}
|
|
29332
|
+
ref.current = ++ctx.current;
|
|
29333
|
+
}
|
|
29334
|
+
return ref.current;
|
|
29335
|
+
}
|
|
29336
|
+
function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
|
|
29337
|
+
let ctx = useContext($b5e257d569688ac6$var$SSRContext);
|
|
29338
|
+
if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
|
|
29339
|
+
console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
29340
|
+
let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
|
|
29341
|
+
let prefix2 = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
29342
|
+
return defaultId || `${prefix2}-${counter}`;
|
|
29343
|
+
}
|
|
29344
|
+
function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
|
|
29345
|
+
let id = React__default.useId();
|
|
29346
|
+
let [didSSR] = useState($b5e257d569688ac6$export$535bd6ca7f90a273());
|
|
29347
|
+
let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
|
|
29348
|
+
return defaultId || `${prefix2}-${id}`;
|
|
29349
|
+
}
|
|
29350
|
+
const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
|
|
29351
|
+
function $b5e257d569688ac6$var$getSnapshot() {
|
|
29352
|
+
return false;
|
|
29353
|
+
}
|
|
29354
|
+
function $b5e257d569688ac6$var$getServerSnapshot() {
|
|
29355
|
+
return true;
|
|
29356
|
+
}
|
|
29357
|
+
function $b5e257d569688ac6$var$subscribe(onStoreChange) {
|
|
29358
|
+
return () => {
|
|
29359
|
+
};
|
|
29360
|
+
}
|
|
29361
|
+
function $b5e257d569688ac6$export$535bd6ca7f90a273() {
|
|
29362
|
+
if (typeof React__default["useSyncExternalStore"] === "function")
|
|
29363
|
+
return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
|
|
29364
|
+
return useContext($b5e257d569688ac6$var$IsSSRContext);
|
|
29365
|
+
}
|
|
29366
|
+
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
|
|
29367
|
+
};
|
|
29368
|
+
let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
|
|
29369
|
+
function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
29370
|
+
let [value, setValue] = useState(defaultId);
|
|
29371
|
+
let nextId = useRef(null);
|
|
29372
|
+
let res = $b5e257d569688ac6$export$619500959fc48b26(value);
|
|
29373
|
+
let updateValue = useCallback((val) => {
|
|
29374
|
+
nextId.current = val;
|
|
29375
|
+
}, []);
|
|
29376
|
+
$bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
|
|
29377
|
+
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
29378
|
+
let r2 = res;
|
|
29379
|
+
return () => {
|
|
29380
|
+
$bdb11010cef70236$var$idsUpdaterMap.delete(r2);
|
|
29381
|
+
};
|
|
29382
|
+
}, [
|
|
29383
|
+
res
|
|
29384
|
+
]);
|
|
29385
|
+
useEffect(() => {
|
|
29386
|
+
let newId = nextId.current;
|
|
29387
|
+
if (newId) {
|
|
29388
|
+
nextId.current = null;
|
|
29389
|
+
setValue(newId);
|
|
29390
|
+
}
|
|
29391
|
+
});
|
|
29392
|
+
return res;
|
|
29393
|
+
}
|
|
29394
|
+
let $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
|
|
29395
|
+
let $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
|
|
29396
|
+
function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
29397
|
+
if (typeof window === "undefined")
|
|
29398
|
+
return;
|
|
29399
|
+
let onTransitionStart = (e) => {
|
|
29400
|
+
let transitions2 = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
29401
|
+
if (!transitions2) {
|
|
29402
|
+
transitions2 = /* @__PURE__ */ new Set();
|
|
29403
|
+
$bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions2);
|
|
29404
|
+
e.target.addEventListener("transitioncancel", onTransitionEnd);
|
|
29405
|
+
}
|
|
29406
|
+
transitions2.add(e.propertyName);
|
|
29407
|
+
};
|
|
29408
|
+
let onTransitionEnd = (e) => {
|
|
29409
|
+
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
29410
|
+
if (!properties)
|
|
29411
|
+
return;
|
|
29412
|
+
properties.delete(e.propertyName);
|
|
29413
|
+
if (properties.size === 0) {
|
|
29414
|
+
e.target.removeEventListener("transitioncancel", onTransitionEnd);
|
|
29415
|
+
$bbed8b41f857bcc0$var$transitionsByElement.delete(e.target);
|
|
29416
|
+
}
|
|
29417
|
+
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
29418
|
+
for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)
|
|
29419
|
+
cb();
|
|
29420
|
+
$bbed8b41f857bcc0$var$transitionCallbacks.clear();
|
|
29421
|
+
}
|
|
29422
|
+
};
|
|
29423
|
+
document.body.addEventListener("transitionrun", onTransitionStart);
|
|
29424
|
+
document.body.addEventListener("transitionend", onTransitionEnd);
|
|
29425
|
+
}
|
|
29426
|
+
if (typeof document !== "undefined") {
|
|
29427
|
+
if (document.readyState !== "loading")
|
|
29428
|
+
$bbed8b41f857bcc0$var$setupGlobalEvents();
|
|
29429
|
+
else
|
|
29430
|
+
document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
|
|
29431
|
+
}
|
|
29306
29432
|
function FeatureListOptions(props) {
|
|
29307
29433
|
const {
|
|
29308
29434
|
children,
|
|
@@ -29315,7 +29441,7 @@ function FeatureListOptions(props) {
|
|
|
29315
29441
|
hasFeatureLabels,
|
|
29316
29442
|
primaryColumnName
|
|
29317
29443
|
} = props;
|
|
29318
|
-
const featureListId =
|
|
29444
|
+
const featureListId = $bdb11010cef70236$export$f680877a34711e37();
|
|
29319
29445
|
function handleFeatureListSortChange(event) {
|
|
29320
29446
|
setFeatureListSort(event.target.value);
|
|
29321
29447
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureListOptions.d.ts","sourceRoot":"","sources":["../src/FeatureListOptions.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FeatureListOptions.d.ts","sourceRoot":"","sources":["../src/FeatureListOptions.js"],"names":[],"mappings":"AAOA,oEAqGC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useId } from 'react-aria';
|
|
3
4
|
import { OptionsContainer, OptionSelect, usePlotOptionsStyles } from '@vitessce/vit-s';
|
|
4
5
|
import { TableCell, TableRow, Checkbox } from '@material-ui/core';
|
|
5
6
|
import { FEATURELIST_SORT_OPTIONS, ALT_COLNAME } from './constants.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/feature-list",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
22
|
"react-virtualized": "^9.22.2",
|
|
23
23
|
"uuid": "^9.0.0",
|
|
24
|
-
"
|
|
25
|
-
"@vitessce/
|
|
26
|
-
"@vitessce/
|
|
24
|
+
"react-aria": "^3.28.0",
|
|
25
|
+
"@vitessce/constants-internal": "3.2.1",
|
|
26
|
+
"@vitessce/utils": "3.2.1",
|
|
27
|
+
"@vitessce/vit-s": "3.2.1"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"@testing-library/jest-dom": "^5.16.4",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useId } from 'react-aria';
|
|
2
3
|
import { OptionsContainer, OptionSelect, usePlotOptionsStyles } from '@vitessce/vit-s';
|
|
3
4
|
import { TableCell, TableRow, Checkbox } from '@material-ui/core';
|
|
4
5
|
import { FEATURELIST_SORT_OPTIONS, ALT_COLNAME } from './constants.js';
|