@haniffalab/cherita-react 0.1.12 → 0.2.0-dev.2024-02-12.4d768f57
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/components/dotplot/Dotplot.js +76 -63
- package/dist/components/heatmap/Heatmap.js +66 -56
- package/dist/components/matrixplot/Matrixplot.js +69 -59
- package/dist/components/obs-list/ObsList.js +124 -38
- package/dist/components/obsm-list/ObsmList.js +92 -0
- package/dist/components/scatterplot/Legend.js +58 -0
- package/dist/components/scatterplot/Scatterplot.js +119 -83
- package/dist/components/scatterplot/Toolbox.js +67 -47
- package/dist/components/var-list/VarList.js +221 -53
- package/dist/components/violin/Violin.js +84 -77
- package/dist/constants/constants.js +46 -3
- package/dist/context/DatasetContext.js +118 -28
- package/dist/helpers/color.js +34 -0
- package/dist/helpers/map.js +2 -3
- package/dist/index.js +7 -0
- package/dist/utils/LoadingSpinner.js +38 -0
- package/dist/utils/errors.js +53 -0
- package/dist/utils/requests.js +82 -11
- package/package.json +7 -2
|
@@ -9,6 +9,12 @@ exports.DatasetProvider = DatasetProvider;
|
|
|
9
9
|
exports.useDataset = useDataset;
|
|
10
10
|
exports.useDatasetDispatch = useDatasetDispatch;
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
13
|
+
var _reactQuery = require("@tanstack/react-query");
|
|
14
|
+
var _reactQueryPersistClient = require("@tanstack/react-query-persist-client");
|
|
15
|
+
var _querySyncStoragePersister = require("@tanstack/query-sync-storage-persister");
|
|
16
|
+
var _constants = require("../constants/constants");
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
20
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -30,36 +36,96 @@ var DatasetContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
|
30
36
|
exports.DatasetContext = DatasetContext;
|
|
31
37
|
var DatasetDispatchContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
32
38
|
exports.DatasetDispatchContext = DatasetDispatchContext;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
39
|
+
var queryClient = new _reactQuery.QueryClient({
|
|
40
|
+
defaultOptions: {
|
|
41
|
+
queries: {
|
|
42
|
+
gcTime: 1000 * 60 * 60 * 24 * 7 // store for a week
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
queryCache: new _reactQuery.QueryCache({
|
|
47
|
+
onError: function onError(error, query) {
|
|
48
|
+
console.error(error);
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
// Type of queries to store responses
|
|
53
|
+
var persistKeys = ["obs/cols", "var/names", "obsm/keys"];
|
|
54
|
+
var persistOptions = {
|
|
55
|
+
persister: (0, _querySyncStoragePersister.createSyncStoragePersister)({
|
|
56
|
+
storage: window.localStorage
|
|
57
|
+
}),
|
|
58
|
+
dehydrateOptions: {
|
|
59
|
+
shouldDehydrateQuery: function shouldDehydrateQuery(_ref) {
|
|
60
|
+
var queryKey = _ref.queryKey,
|
|
61
|
+
state = _ref.state;
|
|
62
|
+
if (state.status === "success") {
|
|
63
|
+
return persistKeys.includes(queryKey === null || queryKey === void 0 ? void 0 : queryKey[0]);
|
|
64
|
+
}
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// @TODO: add maxAge and buster (app and api version numbers as busters)
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var initialDataset = {
|
|
72
|
+
obs: {},
|
|
73
|
+
selectedObs: null,
|
|
74
|
+
selectedObsm: null,
|
|
75
|
+
selectedVar: null,
|
|
76
|
+
selectedMultiObs: [],
|
|
77
|
+
selectedMultiVar: [],
|
|
78
|
+
colorEncoding: null,
|
|
79
|
+
controls: {
|
|
80
|
+
colorScale: "Viridis",
|
|
81
|
+
colorAxis: {
|
|
82
|
+
dmin: 0,
|
|
83
|
+
dmax: 1,
|
|
84
|
+
cmin: 0,
|
|
85
|
+
cmax: 1
|
|
86
|
+
},
|
|
87
|
+
standardScale: null,
|
|
88
|
+
meanOnlyExpressed: false,
|
|
89
|
+
expressionCutoff: 0.0
|
|
90
|
+
},
|
|
91
|
+
state: {
|
|
92
|
+
obs: {}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
var initializer = function initializer(initialState) {
|
|
96
|
+
var localObj = (JSON.parse(localStorage.getItem(_constants.LOCAL_STORAGE_KEY)) || {})[initialState.url] || {};
|
|
97
|
+
var keys = _lodash.default.keys(initialState);
|
|
98
|
+
var localValues = _lodash.default.pick(localObj, keys);
|
|
99
|
+
return _lodash.default.assign(initialState, localValues);
|
|
100
|
+
};
|
|
101
|
+
function DatasetProvider(_ref2) {
|
|
102
|
+
var dataset_url = _ref2.dataset_url,
|
|
103
|
+
children = _ref2.children;
|
|
104
|
+
var _useReducer = (0, _react.useReducer)(datasetReducer, _objectSpread({
|
|
105
|
+
url: dataset_url
|
|
106
|
+
}, initialDataset), initializer),
|
|
55
107
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
56
108
|
dataset = _useReducer2[0],
|
|
57
109
|
dispatch = _useReducer2[1];
|
|
110
|
+
(0, _react.useEffect)(function () {
|
|
111
|
+
try {
|
|
112
|
+
localStorage.setItem(_constants.LOCAL_STORAGE_KEY, JSON.stringify(_defineProperty({}, dataset.url, dataset)));
|
|
113
|
+
} catch (err) {
|
|
114
|
+
if (err.code === 22 || err.code === 1014 || err.name === "QuotaExceededError" || err.name === "NS_ERROR_DOM_QUOTA_REACHED") {
|
|
115
|
+
console.log("Browser storage quota exceeded");
|
|
116
|
+
} else {
|
|
117
|
+
console.log(err);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}, [dataset]);
|
|
58
121
|
return /*#__PURE__*/_react.default.createElement(DatasetContext.Provider, {
|
|
59
122
|
value: dataset
|
|
60
123
|
}, /*#__PURE__*/_react.default.createElement(DatasetDispatchContext.Provider, {
|
|
61
124
|
value: dispatch
|
|
62
|
-
},
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement(_reactQueryPersistClient.PersistQueryClientProvider, {
|
|
126
|
+
client: queryClient,
|
|
127
|
+
persistOptions: persistOptions
|
|
128
|
+
}, children)));
|
|
63
129
|
}
|
|
64
130
|
function useDataset() {
|
|
65
131
|
return (0, _react.useContext)(DatasetContext);
|
|
@@ -73,12 +139,24 @@ function datasetReducer(dataset, action) {
|
|
|
73
139
|
{
|
|
74
140
|
return action.dataset;
|
|
75
141
|
}
|
|
142
|
+
case "set.obs":
|
|
143
|
+
{
|
|
144
|
+
return _objectSpread(_objectSpread({}, dataset), {}, {
|
|
145
|
+
obs: action.value
|
|
146
|
+
});
|
|
147
|
+
}
|
|
76
148
|
case "obsSelected":
|
|
77
149
|
{
|
|
78
150
|
return _objectSpread(_objectSpread({}, dataset), {}, {
|
|
79
151
|
selectedObs: action.obs
|
|
80
152
|
});
|
|
81
153
|
}
|
|
154
|
+
case "obsmSelected":
|
|
155
|
+
{
|
|
156
|
+
return _objectSpread(_objectSpread({}, dataset), {}, {
|
|
157
|
+
selectedObsm: action.obsm
|
|
158
|
+
});
|
|
159
|
+
}
|
|
82
160
|
case "varSelected":
|
|
83
161
|
{
|
|
84
162
|
return _objectSpread(_objectSpread({}, dataset), {}, {
|
|
@@ -87,9 +165,15 @@ function datasetReducer(dataset, action) {
|
|
|
87
165
|
}
|
|
88
166
|
case "multiVarSelected":
|
|
89
167
|
{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
})
|
|
168
|
+
if (dataset.selectedMultiVar.find(function (i) {
|
|
169
|
+
return i === action.var;
|
|
170
|
+
})) {
|
|
171
|
+
return dataset;
|
|
172
|
+
} else {
|
|
173
|
+
return _objectSpread(_objectSpread({}, dataset), {}, {
|
|
174
|
+
selectedMultiVar: [].concat(_toConsumableArray(dataset.selectedMultiVar), [action.var])
|
|
175
|
+
});
|
|
176
|
+
}
|
|
93
177
|
}
|
|
94
178
|
case "multiVarDeselected":
|
|
95
179
|
{
|
|
@@ -99,10 +183,16 @@ function datasetReducer(dataset, action) {
|
|
|
99
183
|
})
|
|
100
184
|
});
|
|
101
185
|
}
|
|
102
|
-
case "
|
|
186
|
+
case "set.colorEncoding":
|
|
187
|
+
{
|
|
188
|
+
return _objectSpread(_objectSpread({}, dataset), {}, {
|
|
189
|
+
colorEncoding: action.value
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
case "multiVarReset":
|
|
103
193
|
{
|
|
104
194
|
return _objectSpread(_objectSpread({}, dataset), {}, {
|
|
105
|
-
|
|
195
|
+
selectedMultiVar: []
|
|
106
196
|
});
|
|
107
197
|
}
|
|
108
198
|
case "set.controls.colorScale":
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ColorHelper = void 0;
|
|
7
|
+
var _chromaJs = _interopRequireDefault(require("chroma-js"));
|
|
8
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
|
+
var _constants = require("../constants/constants");
|
|
10
|
+
var _DatasetContext = require("../context/DatasetContext");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
14
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
+
var ColorHelper = /*#__PURE__*/_createClass(function ColorHelper() {
|
|
20
|
+
_classCallCheck(this, ColorHelper);
|
|
21
|
+
_defineProperty(this, "getScale", function (dataset, values) {
|
|
22
|
+
return _chromaJs.default.scale(_constants.CHROMA_COLORSCALES[dataset.controls.colorScale]).domain([_lodash.default.min(values), _lodash.default.max(values)]);
|
|
23
|
+
});
|
|
24
|
+
_defineProperty(this, "getColor", function (dataset, value) {
|
|
25
|
+
var scale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _chromaJs.default.scale();
|
|
26
|
+
if (dataset.colorEncoding === "var") {
|
|
27
|
+
return scale(value).rgb();
|
|
28
|
+
} else if (dataset.colorEncoding === "obs") {
|
|
29
|
+
//console.log(dataset.obs[dataset.selectedObs.name].state[value]["color"]);
|
|
30
|
+
return dataset.obs[dataset.selectedObs.name].state.hasOwnProperty(value) ? dataset.obs[dataset.selectedObs.name].state[value]["color"] : null;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
exports.ColorHelper = ColorHelper;
|
package/dist/helpers/map.js
CHANGED
|
@@ -12,7 +12,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
12
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
13
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
14
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
-
window.deck.log.level = 1;
|
|
16
15
|
var MapHelper = /*#__PURE__*/_createClass(function MapHelper() {
|
|
17
16
|
_classCallCheck(this, MapHelper);
|
|
18
17
|
_defineProperty(this, "fitBounds", function (coords) {
|
|
@@ -30,8 +29,8 @@ var MapHelper = /*#__PURE__*/_createClass(function MapHelper() {
|
|
|
30
29
|
var lonMin = 180;
|
|
31
30
|
var lonMax = -180;
|
|
32
31
|
coords.forEach(function (coord) {
|
|
33
|
-
var RECT_LAT_INDEX =
|
|
34
|
-
var RECT_LON_INDEX =
|
|
32
|
+
var RECT_LAT_INDEX = "0";
|
|
33
|
+
var RECT_LON_INDEX = "1";
|
|
35
34
|
if (coord[RECT_LAT_INDEX] < latMin) latMin = coord[RECT_LAT_INDEX];
|
|
36
35
|
if (coord[RECT_LAT_INDEX] > latMax) latMax = coord[RECT_LAT_INDEX];
|
|
37
36
|
if (coord[RECT_LON_INDEX] < lonMin) lonMin = coord[RECT_LON_INDEX];
|
package/dist/index.js
CHANGED
|
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "ObsColsList", {
|
|
|
51
51
|
return _ObsList.ObsColsList;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "ObsmKeysList", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _ObsmList.ObsmKeysList;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
54
60
|
Object.defineProperty(exports, "PLOTLY_COLORSCALES", {
|
|
55
61
|
enumerable: true,
|
|
56
62
|
get: function get() {
|
|
@@ -100,6 +106,7 @@ Object.defineProperty(exports, "ViolinControls", {
|
|
|
100
106
|
}
|
|
101
107
|
});
|
|
102
108
|
var _ObsList = require("./components/obs-list/ObsList");
|
|
109
|
+
var _ObsmList = require("./components/obsm-list/ObsmList");
|
|
103
110
|
var _VarList = require("./components/var-list/VarList");
|
|
104
111
|
var _Heatmap = require("./components/heatmap/Heatmap");
|
|
105
112
|
var _Dotplot = require("./components/dotplot/Dotplot");
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LoadingSpinner = LoadingSpinner;
|
|
7
|
+
require("bootstrap/dist/css/bootstrap.min.css");
|
|
8
|
+
var _reactBootstrap = require("react-bootstrap");
|
|
9
|
+
function LoadingSpinner(_ref) {
|
|
10
|
+
var _ref$type = _ref.type,
|
|
11
|
+
type = _ref$type === void 0 ? "icon" : _ref$type,
|
|
12
|
+
_ref$text = _ref.text,
|
|
13
|
+
text = _ref$text === void 0 ? "Loading..." : _ref$text;
|
|
14
|
+
if (type === "message") {
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: " h-100 w-100 d-flex z-1 bg-light opacity-75 position-absolute justify-content-center align-items-center "
|
|
17
|
+
}, /*#__PURE__*/React.createElement(_reactBootstrap.Button, {
|
|
18
|
+
variant: "primary",
|
|
19
|
+
disabled: true
|
|
20
|
+
}, /*#__PURE__*/React.createElement(_reactBootstrap.Spinner, {
|
|
21
|
+
as: "span",
|
|
22
|
+
animation: "border",
|
|
23
|
+
size: "sm",
|
|
24
|
+
role: "status",
|
|
25
|
+
"aria-hidden": "true"
|
|
26
|
+
}), text));
|
|
27
|
+
} else {
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: " h-100 w-100 d-flex z-1 bg-light opacity-75 position-absolute justify-content-center align-items-center "
|
|
30
|
+
}, /*#__PURE__*/React.createElement(_reactBootstrap.Spinner, {
|
|
31
|
+
animation: "border",
|
|
32
|
+
variant: "primary",
|
|
33
|
+
role: "status"
|
|
34
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
35
|
+
className: "visually-hidden"
|
|
36
|
+
}, text)));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.parseError = void 0;
|
|
7
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
|
+
var parseError = function parseError(err) {
|
|
14
|
+
if (err === DOMException.TIMEOUT_ERR) {
|
|
15
|
+
return {
|
|
16
|
+
message: "Timeout error",
|
|
17
|
+
name: err
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
switch (err === null || err === void 0 ? void 0 : err.name) {
|
|
21
|
+
case "TypeError":
|
|
22
|
+
return _objectSpread(_objectSpread({}, err), {}, {
|
|
23
|
+
message: "Failed to fetch data from server"
|
|
24
|
+
});
|
|
25
|
+
case "ReadZarrError":
|
|
26
|
+
return _objectSpread(_objectSpread({}, err), {}, {
|
|
27
|
+
message: "Failed to read AnnData-Zarr"
|
|
28
|
+
});
|
|
29
|
+
case "InvalidObs":
|
|
30
|
+
return _objectSpread(_objectSpread({}, err), {}, {
|
|
31
|
+
message: "Observation not found in dataset"
|
|
32
|
+
});
|
|
33
|
+
case "InvalidVar":
|
|
34
|
+
return _objectSpread(_objectSpread({}, err), {}, {
|
|
35
|
+
message: "Feature not found in dataset"
|
|
36
|
+
});
|
|
37
|
+
case "InvalidKey":
|
|
38
|
+
return _objectSpread(_objectSpread({}, err), {}, {
|
|
39
|
+
message: "Key not found in datset"
|
|
40
|
+
});
|
|
41
|
+
case "BadRequest":
|
|
42
|
+
return _objectSpread(_objectSpread({}, err), {}, {
|
|
43
|
+
message: "Invalid request to server"
|
|
44
|
+
});
|
|
45
|
+
case "InternalServerError":
|
|
46
|
+
return _objectSpread(_objectSpread({}, err), {}, {
|
|
47
|
+
message: "Server error"
|
|
48
|
+
});
|
|
49
|
+
default:
|
|
50
|
+
return err;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.parseError = parseError;
|
package/dist/utils/requests.js
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.fetchData = fetchData;
|
|
7
|
-
|
|
8
|
+
exports.useFetch = exports.useDebouncedFetch = void 0;
|
|
9
|
+
var _usehooks = require("@uidotdev/usehooks");
|
|
10
|
+
var _reactQuery = require("@tanstack/react-query");
|
|
11
|
+
var _errors = require("./errors");
|
|
8
12
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
18
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
10
19
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
11
20
|
function fetchData(_x, _x2) {
|
|
@@ -14,15 +23,26 @@ function fetchData(_x, _x2) {
|
|
|
14
23
|
function _fetchData() {
|
|
15
24
|
_fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpoint, params) {
|
|
16
25
|
var signal,
|
|
26
|
+
ms,
|
|
17
27
|
apiUrl,
|
|
28
|
+
controller,
|
|
29
|
+
timeout,
|
|
18
30
|
response,
|
|
19
31
|
_args = arguments;
|
|
20
32
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
21
33
|
while (1) switch (_context.prev = _context.next) {
|
|
22
34
|
case 0:
|
|
23
35
|
signal = _args.length > 2 && _args[2] !== undefined ? _args[2] : null;
|
|
36
|
+
ms = _args.length > 3 && _args[3] !== undefined ? _args[3] : 300000;
|
|
24
37
|
apiUrl = process.env.REACT_APP_API_URL;
|
|
25
|
-
|
|
38
|
+
controller = new AbortController();
|
|
39
|
+
timeout = setTimeout(function () {
|
|
40
|
+
controller.abort(DOMException.TIMEOUT_ERR);
|
|
41
|
+
}, ms || 300000);
|
|
42
|
+
if (signal) signal.addEventListener("abort", function () {
|
|
43
|
+
return controller.abort();
|
|
44
|
+
});
|
|
45
|
+
_context.next = 8;
|
|
26
46
|
return fetch(new URL(endpoint, apiUrl), {
|
|
27
47
|
method: "POST",
|
|
28
48
|
mode: "cors",
|
|
@@ -31,25 +51,76 @@ function _fetchData() {
|
|
|
31
51
|
Accept: "application/json"
|
|
32
52
|
},
|
|
33
53
|
body: JSON.stringify(params),
|
|
34
|
-
signal: signal
|
|
54
|
+
signal: controller.signal
|
|
55
|
+
}).catch(function (err) {
|
|
56
|
+
// Manual check as fetch returns an AbortError regardless of the reason set to the signal
|
|
57
|
+
if (controller.signal.aborted && controller.signal.reason === DOMException.TIMEOUT_ERR) {
|
|
58
|
+
throw DOMException.TIMEOUT_ERR;
|
|
59
|
+
}
|
|
60
|
+
throw err;
|
|
61
|
+
}).finally(function () {
|
|
62
|
+
return clearTimeout(timeout);
|
|
35
63
|
});
|
|
36
|
-
case
|
|
64
|
+
case 8:
|
|
37
65
|
response = _context.sent;
|
|
38
66
|
if (response.ok) {
|
|
39
|
-
_context.next =
|
|
67
|
+
_context.next = 13;
|
|
40
68
|
break;
|
|
41
69
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
70
|
+
_context.next = 12;
|
|
71
|
+
return response.json();
|
|
72
|
+
case 12:
|
|
73
|
+
throw _context.sent;
|
|
74
|
+
case 13:
|
|
75
|
+
_context.next = 15;
|
|
45
76
|
return response.json();
|
|
46
|
-
case
|
|
77
|
+
case 15:
|
|
47
78
|
return _context.abrupt("return", _context.sent);
|
|
48
|
-
case
|
|
79
|
+
case 16:
|
|
49
80
|
case "end":
|
|
50
81
|
return _context.stop();
|
|
51
82
|
}
|
|
52
83
|
}, _callee);
|
|
53
84
|
}));
|
|
54
85
|
return _fetchData.apply(this, arguments);
|
|
55
|
-
}
|
|
86
|
+
}
|
|
87
|
+
var useFetch = function useFetch(endpoint, params) {
|
|
88
|
+
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
89
|
+
var _useQuery = (0, _reactQuery.useQuery)(_objectSpread({
|
|
90
|
+
queryKey: [endpoint, params],
|
|
91
|
+
queryFn: function queryFn(_ref) {
|
|
92
|
+
var signal = _ref.signal;
|
|
93
|
+
return fetchData(endpoint, params, signal);
|
|
94
|
+
}
|
|
95
|
+
}, opts)),
|
|
96
|
+
fetchedData = _useQuery.data,
|
|
97
|
+
isPending = _useQuery.isPending,
|
|
98
|
+
serverError = _useQuery.error;
|
|
99
|
+
return {
|
|
100
|
+
fetchedData: fetchedData,
|
|
101
|
+
isPending: isPending,
|
|
102
|
+
serverError: (0, _errors.parseError)(serverError)
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
exports.useFetch = useFetch;
|
|
106
|
+
var useDebouncedFetch = function useDebouncedFetch(endpoint, params) {
|
|
107
|
+
var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 500;
|
|
108
|
+
var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
109
|
+
var debouncedParams = (0, _usehooks.useDebounce)(params, delay);
|
|
110
|
+
var _useQuery2 = (0, _reactQuery.useQuery)(_objectSpread({
|
|
111
|
+
queryKey: [endpoint, debouncedParams],
|
|
112
|
+
queryFn: function queryFn(_ref2) {
|
|
113
|
+
var signal = _ref2.signal;
|
|
114
|
+
return fetchData(endpoint, debouncedParams, signal);
|
|
115
|
+
}
|
|
116
|
+
}, opts)),
|
|
117
|
+
fetchedData = _useQuery2.data,
|
|
118
|
+
isPending = _useQuery2.isPending,
|
|
119
|
+
serverError = _useQuery2.error;
|
|
120
|
+
return {
|
|
121
|
+
fetchedData: fetchedData,
|
|
122
|
+
isPending: isPending,
|
|
123
|
+
serverError: (0, _errors.parseError)(serverError)
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
exports.useDebouncedFetch = useDebouncedFetch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haniffalab/cherita-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-dev.2024-02-12.4d768f57",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
15
15
|
"@nebula.gl/editor": "^1.0.4",
|
|
16
16
|
"@nebula.gl/layers": "^1.0.4",
|
|
17
|
+
"@tanstack/query-sync-storage-persister": "^5.20.2",
|
|
18
|
+
"@tanstack/react-query": "^5.20.2",
|
|
19
|
+
"@tanstack/react-query-persist-client": "^5.20.2",
|
|
20
|
+
"@uidotdev/usehooks": "^2.4.1",
|
|
17
21
|
"bootstrap": "^5.3.0",
|
|
18
22
|
"chroma-js": "^2.4.2",
|
|
19
23
|
"deck.gl": "^8.9.19",
|
|
@@ -73,5 +77,6 @@
|
|
|
73
77
|
"bugs": {
|
|
74
78
|
"url": "https://github.com/haniffalab/cherita-react/issues"
|
|
75
79
|
},
|
|
76
|
-
"homepage": "https://github.com/haniffalab/cherita-react#readme"
|
|
80
|
+
"homepage": "https://github.com/haniffalab/cherita-react#readme",
|
|
81
|
+
"prereleaseSha": "4d768f575d9a470480c5ca11df01c08dc4ae7918"
|
|
77
82
|
}
|