@teselagen/ui 0.5.23-beta.5 → 0.5.23-beta.7

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/index.cjs.js CHANGED
@@ -47166,11 +47166,10 @@ const EditableCell = /* @__PURE__ */ __name(({
47166
47166
  }, dataTest), {
47167
47167
  autoFocus: true,
47168
47168
  onKeyDown: (e2) => {
47169
+ e2.stopPropagation();
47169
47170
  if (e2.key === "Enter") {
47170
47171
  e2.target.blur();
47171
- e2.stopPropagation();
47172
47172
  } else if (e2.key === "Escape") {
47173
- e2.stopPropagation();
47174
47173
  cancelEdit();
47175
47174
  }
47176
47175
  },
@@ -49069,7 +49068,7 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
49069
49068
  if (editingCell === cellId)
49070
49069
  return;
49071
49070
  if (pressedKey) {
49072
- setEditableCellValue(pressedKey);
49071
+ setEditableCellValue("");
49073
49072
  } else {
49074
49073
  const [rowId, path2] = cellId.split(":");
49075
49074
  const entityIdToEntity = getEntityIdToEntity(entities);
@@ -50391,10 +50390,12 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
50391
50390
  acc[index2] = expandedEntityIdMap[rowId];
50392
50391
  return acc;
50393
50392
  }, {});
50394
- let children = maybeChildren;
50395
- if (children && typeof children === "function") {
50396
- children = children(props);
50397
- }
50393
+ const children = React$1.useMemo(() => {
50394
+ if (maybeChildren && typeof maybeChildren === "function") {
50395
+ return maybeChildren(props);
50396
+ }
50397
+ return maybeChildren;
50398
+ }, [maybeChildren, props]);
50398
50399
  const showHeader = (withTitle || withSearch || children) && !noHeader;
50399
50400
  const toggleFullscreenButton = /* @__PURE__ */ React$1.createElement(
50400
50401
  core.Button,
package/index.es.js CHANGED
@@ -47148,11 +47148,10 @@ const EditableCell = /* @__PURE__ */ __name(({
47148
47148
  }, dataTest), {
47149
47149
  autoFocus: true,
47150
47150
  onKeyDown: (e2) => {
47151
+ e2.stopPropagation();
47151
47152
  if (e2.key === "Enter") {
47152
47153
  e2.target.blur();
47153
- e2.stopPropagation();
47154
47154
  } else if (e2.key === "Escape") {
47155
- e2.stopPropagation();
47156
47155
  cancelEdit();
47157
47156
  }
47158
47157
  },
@@ -49051,7 +49050,7 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
49051
49050
  if (editingCell === cellId)
49052
49051
  return;
49053
49052
  if (pressedKey) {
49054
- setEditableCellValue(pressedKey);
49053
+ setEditableCellValue("");
49055
49054
  } else {
49056
49055
  const [rowId, path2] = cellId.split(":");
49057
49056
  const entityIdToEntity = getEntityIdToEntity(entities);
@@ -50373,10 +50372,12 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
50373
50372
  acc[index2] = expandedEntityIdMap[rowId];
50374
50373
  return acc;
50375
50374
  }, {});
50376
- let children = maybeChildren;
50377
- if (children && typeof children === "function") {
50378
- children = children(props);
50379
- }
50375
+ const children = useMemo(() => {
50376
+ if (maybeChildren && typeof maybeChildren === "function") {
50377
+ return maybeChildren(props);
50378
+ }
50379
+ return maybeChildren;
50380
+ }, [maybeChildren, props]);
50380
50381
  const showHeader = (withTitle || withSearch || children) && !noHeader;
50381
50382
  const toggleFullscreenButton = /* @__PURE__ */ React__default.createElement(
50382
50383
  Button,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ui",
3
- "version": "0.5.23-beta.5",
3
+ "version": "0.5.23-beta.7",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -12,6 +12,9 @@
12
12
  "dependencies": {
13
13
  "@teselagen/file-utils": "0.3.16",
14
14
  "@teselagen/bounce-loader": "0.3.11",
15
+ "@blueprintjs/core": "3.52.0",
16
+ "@blueprintjs/datetime": "3.23.19",
17
+ "@blueprintjs/select": "3.18.11",
15
18
  "@dnd-kit/core": "^6.1.0",
16
19
  "@dnd-kit/modifiers": "^7.0.0",
17
20
  "@dnd-kit/sortable": "^8.0.0",
@@ -36,14 +39,14 @@
36
39
  "nanoid": "^4.0.0",
37
40
  "papaparse": "^5.3.2",
38
41
  "qs": "^6.9.6",
39
- "react": "^18.2.0",
42
+ "react": "^18.3.1",
40
43
  "react-color": "^2.19.3",
41
- "react-dom": "^18.2.0",
44
+ "react-dom": "^18.3.1",
42
45
  "react-dropzone": "^11.4.2",
43
46
  "react-markdown": "8.0.7",
44
47
  "react-redux": "^8.0.5",
45
48
  "react-rnd": "^10.2.4",
46
- "react-router-dom": "^4.3.1",
49
+ "react-router-dom": "4",
47
50
  "react-transition-group": "^2.4.0",
48
51
  "recompose": "npm:react-recompose@0.31.1",
49
52
  "redux": "^4.1.2",
@@ -28,11 +28,10 @@ export const EditableCell = ({
28
28
  {...dataTest}
29
29
  autoFocus
30
30
  onKeyDown={e => {
31
+ e.stopPropagation();
31
32
  if (e.key === "Enter") {
32
33
  e.target.blur();
33
- e.stopPropagation();
34
34
  } else if (e.key === "Escape") {
35
- e.stopPropagation();
36
35
  cancelEdit();
37
36
  }
38
37
  }}
@@ -1051,7 +1051,7 @@ const DataTable = ({
1051
1051
  //check if the cell is already selected and editing and if so, don't change it
1052
1052
  if (editingCell === cellId) return;
1053
1053
  if (pressedKey) {
1054
- setEditableCellValue(pressedKey);
1054
+ setEditableCellValue("");
1055
1055
  } else {
1056
1056
  const [rowId, path] = cellId.split(":");
1057
1057
  const entityIdToEntity = getEntityIdToEntity(entities);
@@ -2494,10 +2494,14 @@ const DataTable = ({
2494
2494
  acc[index] = expandedEntityIdMap[rowId];
2495
2495
  return acc;
2496
2496
  }, {});
2497
- let children = maybeChildren;
2498
- if (children && typeof children === "function") {
2499
- children = children(props);
2500
- }
2497
+
2498
+ const children = useMemo(() => {
2499
+ if (maybeChildren && typeof maybeChildren === "function") {
2500
+ return maybeChildren(props);
2501
+ }
2502
+ return maybeChildren;
2503
+ }, [maybeChildren, props]);
2504
+
2501
2505
  const showHeader = (withTitle || withSearch || children) && !noHeader;
2502
2506
  const toggleFullscreenButton = (
2503
2507
  <Button