react-open-source-grid 1.7.23 → 1.7.25

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.
Files changed (73) hide show
  1. package/dist/lib/index.cjs +152 -190
  2. package/dist/lib/index.js +150 -188
  3. package/package.json +8 -37
  4. package/dist/404.html +0 -23
  5. package/dist/CNAME +0 -1
  6. package/dist/assets/components/AccessibilityDemo.d.ts +0 -8
  7. package/dist/assets/components/ApiReferencePage.d.ts +0 -2
  8. package/dist/assets/components/BenchmarkDemo.d.ts +0 -2
  9. package/dist/assets/components/CellRenderersDemo.d.ts +0 -16
  10. package/dist/assets/components/CodeBlock.d.ts +0 -10
  11. package/dist/assets/components/ColumnFiltersDemo.d.ts +0 -5
  12. package/dist/assets/components/CompleteApiReferencePage.d.ts +0 -2
  13. package/dist/assets/components/ContextMenuDemo.d.ts +0 -12
  14. package/dist/assets/components/DemoGridPage.d.ts +0 -2
  15. package/dist/assets/components/DensityModeDemo.d.ts +0 -12
  16. package/dist/assets/components/FacetedSearchDemo.d.ts +0 -8
  17. package/dist/assets/components/FeatureGallery.d.ts +0 -2
  18. package/dist/assets/components/FilteredSearchDemo.d.ts +0 -7
  19. package/dist/assets/components/GridApiDemoPage.d.ts +0 -2
  20. package/dist/assets/components/InfiniteScrollDemo.d.ts +0 -13
  21. package/dist/assets/components/LayoutPersistenceDemo.d.ts +0 -2
  22. package/dist/assets/components/LiveMarketDemo.d.ts +0 -18
  23. package/dist/assets/components/MarketDataExamples.d.ts +0 -42
  24. package/dist/assets/components/RowDraggingDemo.d.ts +0 -3
  25. package/dist/assets/components/RowPinningDemo.d.ts +0 -12
  26. package/dist/assets/components/ThemesDemo.d.ts +0 -17
  27. package/dist/assets/components/TooltipDemo.d.ts +0 -1
  28. package/dist/assets/components/TreeDataDemo.d.ts +0 -3
  29. package/dist/assets/components/VirtualScrollDemo.d.ts +0 -13
  30. package/dist/assets/index-BzDbdtZY.css +0 -1
  31. package/dist/assets/index-DHtd8tTR.js +0 -2273
  32. package/dist/assets/index.js +0 -1
  33. package/dist/assets/layoutPersistence-C509RwQB.js +0 -1
  34. package/dist/docs/ACCESSIBILITY_VPAT.pdf +0 -0
  35. package/dist/index.html +0 -105
  36. package/dist/lib/App.d.ts +0 -3
  37. package/dist/lib/components/AccessibilityDemo.d.ts +0 -8
  38. package/dist/lib/components/AdvancedEditorsDemo.d.ts +0 -15
  39. package/dist/lib/components/ApiReferencePage.d.ts +0 -2
  40. package/dist/lib/components/BenchmarkDemo.d.ts +0 -2
  41. package/dist/lib/components/CellRenderersDemo.d.ts +0 -16
  42. package/dist/lib/components/ChartsDemo.d.ts +0 -9
  43. package/dist/lib/components/CodeBlock.d.ts +0 -16
  44. package/dist/lib/components/ColumnFiltersDemo.d.ts +0 -5
  45. package/dist/lib/components/CompleteApiReferencePage.d.ts +0 -2
  46. package/dist/lib/components/ContextMenuDemo.d.ts +0 -12
  47. package/dist/lib/components/DemoGridPage.d.ts +0 -3
  48. package/dist/lib/components/DensityModeDemo.d.ts +0 -12
  49. package/dist/lib/components/FacetedSearchDemo.d.ts +0 -8
  50. package/dist/lib/components/FeatureGallery.d.ts +0 -2
  51. package/dist/lib/components/FilteredSearchDemo.d.ts +0 -7
  52. package/dist/lib/components/GridApiDemoPage.d.ts +0 -2
  53. package/dist/lib/components/GroupByDemo.d.ts +0 -3
  54. package/dist/lib/components/HomePage.d.ts +0 -1
  55. package/dist/lib/components/HorizontalScrollBugDemo.d.ts +0 -2
  56. package/dist/lib/components/InfiniteScrollDemo.d.ts +0 -13
  57. package/dist/lib/components/LayoutPersistenceDemo.d.ts +0 -2
  58. package/dist/lib/components/LiveMarketDemo.d.ts +0 -18
  59. package/dist/lib/components/MarketDataExamples.d.ts +0 -42
  60. package/dist/lib/components/MasterDetailDemo.d.ts +0 -2
  61. package/dist/lib/components/PivotDemo.d.ts +0 -8
  62. package/dist/lib/components/RowDraggingDemo.d.ts +0 -3
  63. package/dist/lib/components/RowPinningDemo.d.ts +0 -12
  64. package/dist/lib/components/ServerSideFeaturesDemo.d.ts +0 -10
  65. package/dist/lib/components/ThemesDemo.d.ts +0 -17
  66. package/dist/lib/components/TooltipDemo.d.ts +0 -1
  67. package/dist/lib/components/TreeDataDemo.d.ts +0 -3
  68. package/dist/lib/components/VirtualScrollDemo.d.ts +0 -13
  69. package/dist/lib/main.d.ts +0 -1
  70. package/dist/logo.png +0 -0
  71. package/dist/robots.txt +0 -11
  72. package/dist/sitemap.xml +0 -180
  73. package/dist/vite.svg +0 -1
package/dist/lib/index.js CHANGED
@@ -2410,6 +2410,7 @@ var GridBody = ({
2410
2410
  }
2411
2411
  const isSelected = selectedRows.has(row.id);
2412
2412
  const isFocused = (focusState == null ? void 0 : focusState.rowIndex) === rowIndex;
2413
+ const isRowEditing = editState.rowId === row.id;
2413
2414
  const isLoadingRow = row._loading === true;
2414
2415
  const isDragEnabled = (dragRowConfig == null ? void 0 : dragRowConfig.enabled) && !isLoadingRow;
2415
2416
  const showDragHandle = isDragEnabled && dragRowConfig.showDragHandle !== false;
@@ -2429,7 +2430,8 @@ var GridBody = ({
2429
2430
  borderBottom: "var(--grid-border-width, 1px) solid var(--grid-border)",
2430
2431
  backgroundColor: isLoadingRow ? "var(--grid-bg-alt)" : isSelected ? "var(--grid-selected)" : isFocused ? "var(--grid-active)" : "var(--grid-bg)",
2431
2432
  cursor: isLoadingRow ? "wait" : isDragEnabled ? "grab" : "pointer",
2432
- transition: "background-color 0.15s ease"
2433
+ transition: "background-color 0.15s ease",
2434
+ ...isRowEditing ? { position: "relative", zIndex: 100 } : {}
2433
2435
  },
2434
2436
  onMouseEnter: (e) => !isSelected && !isLoadingRow && (e.currentTarget.style.backgroundColor = "var(--grid-hover)"),
2435
2437
  onMouseLeave: (e) => !isSelected && !isLoadingRow && (e.currentTarget.style.backgroundColor = "var(--grid-bg)"),
@@ -2515,7 +2517,8 @@ var GridBody = ({
2515
2517
  flexShrink: 0,
2516
2518
  outline: isCellFocused ? "2px solid var(--grid-primary)" : "none",
2517
2519
  outlineOffset: "-2px",
2518
- color: "var(--grid-text)"
2520
+ color: "var(--grid-text)",
2521
+ ...isEditing ? { position: "relative", zIndex: 1e3 } : {}
2519
2522
  },
2520
2523
  onDoubleClick: () => handleCellDoubleClick(row, field, cellValue),
2521
2524
  onContextMenu: (e) => onContextMenu == null ? void 0 : onContextMenu(e, row, column, rowIndex, columnIndex),
@@ -3854,6 +3857,7 @@ var ExportMenu = ({
3854
3857
 
3855
3858
  // src/components/DataGrid/ColumnFilters.tsx
3856
3859
  import React15, { useState as useState8, useEffect as useEffect4 } from "react";
3860
+ import ReactDOM from "react-dom";
3857
3861
 
3858
3862
  // src/components/DataGrid/AdvancedFilterBuilder.tsx
3859
3863
  import React14, { useState as useState7 } from "react";
@@ -4172,7 +4176,7 @@ var AdvancedFilterBuilder = ({
4172
4176
  borderRadius: "var(--grid-border-radius, 8px)",
4173
4177
  border: "1px solid var(--grid-border)",
4174
4178
  padding: "16px",
4175
- zIndex: 1001,
4179
+ zIndex: 10001,
4176
4180
  display: "flex",
4177
4181
  flexDirection: "column",
4178
4182
  overflowY: "auto"
@@ -4428,7 +4432,7 @@ var TextFilterMenu = ({ filterValue, onApplyFilter, onClose, anchorEl, showAdvan
4428
4432
  borderRadius: "var(--grid-border-radius, 8px)",
4429
4433
  border: "var(--grid-border-width, 1px) solid var(--grid-border)",
4430
4434
  padding: "16px",
4431
- zIndex: 1e3
4435
+ zIndex: 1e4
4432
4436
  },
4433
4437
  onClick: (e) => e.stopPropagation()
4434
4438
  },
@@ -4550,7 +4554,7 @@ var NumberFilterMenu = ({ filterValue, onApplyFilter, onClose, anchorEl, showAdv
4550
4554
  borderRadius: "var(--grid-border-radius, 8px)",
4551
4555
  border: "1px solid var(--grid-border)",
4552
4556
  padding: "16px",
4553
- zIndex: 1e3
4557
+ zIndex: 1e4
4554
4558
  },
4555
4559
  onClick: (e) => e.stopPropagation()
4556
4560
  },
@@ -4666,7 +4670,7 @@ var DateFilterMenu = ({ filterValue, onApplyFilter, onClose, anchorEl, showAdvan
4666
4670
  borderRadius: "var(--grid-border-radius, 8px)",
4667
4671
  border: "1px solid var(--grid-border)",
4668
4672
  padding: "16px",
4669
- zIndex: 1e3
4673
+ zIndex: 1e4
4670
4674
  },
4671
4675
  onClick: (e) => e.stopPropagation()
4672
4676
  },
@@ -4791,7 +4795,7 @@ var SetFilterMenu = ({ column, filterValue, onApplyFilter, onClose, rows, anchor
4791
4795
  borderRadius: "var(--grid-border-radius, 8px)",
4792
4796
  border: "1px solid var(--grid-border)",
4793
4797
  padding: "16px",
4794
- zIndex: 1e3,
4798
+ zIndex: 1e4,
4795
4799
  display: "flex",
4796
4800
  flexDirection: "column"
4797
4801
  },
@@ -5147,8 +5151,8 @@ var ColumnFilters = ({
5147
5151
  )
5148
5152
  )
5149
5153
  ),
5150
- openFilterMenu === field && renderFilterMenu(column),
5151
- advancedFilterField === field && renderAdvancedFilterMenu(column)
5154
+ openFilterMenu === field && ReactDOM.createPortal(renderFilterMenu(column), document.body),
5155
+ advancedFilterField === field && ReactDOM.createPortal(renderAdvancedFilterMenu(column), document.body)
5152
5156
  );
5153
5157
  })));
5154
5158
  };
@@ -6313,7 +6317,7 @@ var useTooltip = ({ config = {} } = {}) => {
6313
6317
  const target = event.currentTarget;
6314
6318
  const rect = target.getBoundingClientRect();
6315
6319
  const tooltipContent = typeof content === "string" ? { content } : content;
6316
- showTimeoutRef.current = setTimeout(() => {
6320
+ showTimeoutRef.current = window.setTimeout(() => {
6317
6321
  if (isHoveringRef.current) {
6318
6322
  setTooltipState({
6319
6323
  isVisible: true,
@@ -6330,7 +6334,7 @@ var useTooltip = ({ config = {} } = {}) => {
6330
6334
  clearTimeouts();
6331
6335
  isHoveringRef.current = false;
6332
6336
  if (hideDelay > 0) {
6333
- hideTimeoutRef.current = setTimeout(() => {
6337
+ hideTimeoutRef.current = window.setTimeout(() => {
6334
6338
  setTooltipState((prev) => ({
6335
6339
  ...prev,
6336
6340
  isVisible: false
@@ -7365,7 +7369,7 @@ var useScreenReaderAnnouncements = () => {
7365
7369
  clearTimeout(timeoutRef.current);
7366
7370
  }
7367
7371
  if (delay > 0) {
7368
- timeoutRef.current = setTimeout(() => {
7372
+ timeoutRef.current = window.setTimeout(() => {
7369
7373
  announcementRef.current = message;
7370
7374
  }, delay);
7371
7375
  } else {
@@ -9575,60 +9579,6 @@ var FacetedSearch = ({
9575
9579
 
9576
9580
  // src/components/DataGrid/FilteredSearchBar.tsx
9577
9581
  import React24, { useState as useState16, useRef as useRef11, useEffect as useEffect10 } from "react";
9578
-
9579
- // node_modules/uuid/dist/esm-node/rng.js
9580
- import crypto from "crypto";
9581
- var rnds8Pool = new Uint8Array(256);
9582
- var poolPtr = rnds8Pool.length;
9583
- function rng() {
9584
- if (poolPtr > rnds8Pool.length - 16) {
9585
- crypto.randomFillSync(rnds8Pool);
9586
- poolPtr = 0;
9587
- }
9588
- return rnds8Pool.slice(poolPtr, poolPtr += 16);
9589
- }
9590
-
9591
- // node_modules/uuid/dist/esm-node/regex.js
9592
- var regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
9593
-
9594
- // node_modules/uuid/dist/esm-node/validate.js
9595
- function validate(uuid) {
9596
- return typeof uuid === "string" && regex_default.test(uuid);
9597
- }
9598
- var validate_default = validate;
9599
-
9600
- // node_modules/uuid/dist/esm-node/stringify.js
9601
- var byteToHex = [];
9602
- for (let i = 0; i < 256; ++i) {
9603
- byteToHex.push((i + 256).toString(16).substr(1));
9604
- }
9605
- function stringify(arr, offset = 0) {
9606
- const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
9607
- if (!validate_default(uuid)) {
9608
- throw TypeError("Stringified UUID is invalid");
9609
- }
9610
- return uuid;
9611
- }
9612
- var stringify_default = stringify;
9613
-
9614
- // node_modules/uuid/dist/esm-node/v4.js
9615
- function v4(options, buf, offset) {
9616
- options = options || {};
9617
- const rnds = options.random || (options.rng || rng)();
9618
- rnds[6] = rnds[6] & 15 | 64;
9619
- rnds[8] = rnds[8] & 63 | 128;
9620
- if (buf) {
9621
- offset = offset || 0;
9622
- for (let i = 0; i < 16; ++i) {
9623
- buf[offset + i] = rnds[i];
9624
- }
9625
- return buf;
9626
- }
9627
- return stringify_default(rnds);
9628
- }
9629
- var v4_default = v4;
9630
-
9631
- // src/components/DataGrid/FilteredSearchBar.tsx
9632
9582
  var FilteredSearchBar = ({
9633
9583
  filters,
9634
9584
  onSearch,
@@ -9664,7 +9614,7 @@ var FilteredSearchBar = ({
9664
9614
  const filter = filters.find((f) => f.field === field);
9665
9615
  if (!filter || tokens.length >= maxTokens) return;
9666
9616
  const newToken = {
9667
- id: `${field}-${v4_default()}`,
9617
+ id: `${field}-${crypto.randomUUID()}`,
9668
9618
  field,
9669
9619
  label: filter.label,
9670
9620
  value,
@@ -11875,7 +11825,7 @@ function useMarketData(options) {
11875
11825
  );
11876
11826
  console.log(`Reconnecting in ${delay}ms... (attempt ${reconnectCountRef.current + 1})`);
11877
11827
  setConnectionState("reconnecting");
11878
- reconnectTimeoutRef.current = setTimeout(() => {
11828
+ reconnectTimeoutRef.current = window.setTimeout(() => {
11879
11829
  reconnectCountRef.current++;
11880
11830
  reconnectDelayRef.current *= 2;
11881
11831
  setConnectionState("reconnecting");
@@ -12166,7 +12116,7 @@ var WebSocketMockFeed = class {
12166
12116
  console.log(`Mock feed started with ${this.config.symbols.length} symbols`);
12167
12117
  this.config.symbols.forEach((symbol) => {
12168
12118
  const interval = 1e3 / this.config.updateFrequency;
12169
- const intervalId = setInterval(() => {
12119
+ const intervalId = window.setInterval(() => {
12170
12120
  this.updateSymbol(symbol);
12171
12121
  }, interval);
12172
12122
  this.updateIntervals.set(symbol, intervalId);
@@ -12667,20 +12617,20 @@ function usePopupPosition(anchorRef, popupRef, isOpen, placement = "auto") {
12667
12617
  }
12668
12618
  switch (actualPlacement) {
12669
12619
  case "bottom":
12670
- top = anchorRect.bottom + window.scrollY;
12671
- left = anchorRect.left + window.scrollX;
12620
+ top = anchorRect.bottom;
12621
+ left = anchorRect.left;
12672
12622
  break;
12673
12623
  case "top":
12674
- top = anchorRect.top + window.scrollY - popupRect.height;
12675
- left = anchorRect.left + window.scrollX;
12624
+ top = anchorRect.top - popupRect.height;
12625
+ left = anchorRect.left;
12676
12626
  break;
12677
12627
  case "right":
12678
- top = anchorRect.top + window.scrollY;
12679
- left = anchorRect.right + window.scrollX;
12628
+ top = anchorRect.top;
12629
+ left = anchorRect.right;
12680
12630
  break;
12681
12631
  case "left":
12682
- top = anchorRect.top + window.scrollY;
12683
- left = anchorRect.left + window.scrollX - popupRect.width;
12632
+ top = anchorRect.top;
12633
+ left = anchorRect.left - popupRect.width;
12684
12634
  break;
12685
12635
  }
12686
12636
  const margin = 8;
@@ -12690,11 +12640,11 @@ function usePopupPosition(anchorRef, popupRef, isOpen, placement = "auto") {
12690
12640
  if (left < margin) {
12691
12641
  left = margin;
12692
12642
  }
12693
- if (top + popupRect.height > viewportHeight + window.scrollY) {
12694
- top = viewportHeight + window.scrollY - popupRect.height - margin;
12643
+ if (top + popupRect.height > viewportHeight) {
12644
+ top = viewportHeight - popupRect.height - margin;
12695
12645
  }
12696
- if (top < window.scrollY + margin) {
12697
- top = window.scrollY + margin;
12646
+ if (top < margin) {
12647
+ top = margin;
12698
12648
  }
12699
12649
  popup.style.top = `${top}px`;
12700
12650
  popup.style.left = `${left}px`;
@@ -12711,7 +12661,7 @@ function debounce2(func, wait) {
12711
12661
  if (timeout) {
12712
12662
  clearTimeout(timeout);
12713
12663
  }
12714
- timeout = setTimeout(later, wait);
12664
+ timeout = window.setTimeout(later, wait);
12715
12665
  };
12716
12666
  }
12717
12667
  function formatNumber(value, decimals = 0, thousandsSeparator = ",", decimalSeparator = ".") {
@@ -12739,6 +12689,7 @@ function filterOptions(options, searchQuery) {
12739
12689
 
12740
12690
  // src/editors/RichSelectEditor.tsx
12741
12691
  import React32, { useState as useState21, useRef as useRef16, useEffect as useEffect15, useMemo as useMemo9 } from "react";
12692
+ import ReactDOM2 from "react-dom";
12742
12693
  function RichSelectEditor(props) {
12743
12694
  const {
12744
12695
  value,
@@ -12895,31 +12846,34 @@ function RichSelectEditor(props) {
12895
12846
  },
12896
12847
  "\xD7"
12897
12848
  ), /* @__PURE__ */ React32.createElement("span", { className: "editor-dropdown-icon", "aria-hidden": "true" }, "\u25BC"))),
12898
- isOpen && /* @__PURE__ */ React32.createElement(
12899
- "div",
12900
- {
12901
- ref: dropdownRef,
12902
- id: "richselect-dropdown",
12903
- className: "editor-dropdown",
12904
- role: "listbox",
12905
- style: { maxHeight: maxDropdownHeight }
12906
- },
12907
- filteredOptions.length === 0 ? /* @__PURE__ */ React32.createElement("div", { className: "editor-dropdown-empty" }, "No options found") : filteredOptions.map((option, index) => /* @__PURE__ */ React32.createElement(
12849
+ isOpen && ReactDOM2.createPortal(
12850
+ /* @__PURE__ */ React32.createElement(
12908
12851
  "div",
12909
12852
  {
12910
- key: option.value,
12911
- ref: (el) => {
12912
- optionRefs.current[index] = el;
12913
- },
12914
- className: `editor-dropdown-option ${option.value === value ? "selected" : ""} ${option.disabled ? "disabled" : ""} ${index === focusedIndex ? "focused" : ""}`,
12915
- role: "option",
12916
- "aria-selected": option.value === value,
12917
- "aria-disabled": option.disabled,
12918
- onClick: () => handleSelectOption(option),
12919
- onMouseEnter: () => !option.disabled && setFocusedIndex(index)
12853
+ ref: dropdownRef,
12854
+ id: "richselect-dropdown",
12855
+ className: "editor-dropdown",
12856
+ role: "listbox",
12857
+ style: { maxHeight: maxDropdownHeight }
12920
12858
  },
12921
- renderLabel(option)
12922
- ))
12859
+ filteredOptions.length === 0 ? /* @__PURE__ */ React32.createElement("div", { className: "editor-dropdown-empty" }, "No options found") : filteredOptions.map((option, index) => /* @__PURE__ */ React32.createElement(
12860
+ "div",
12861
+ {
12862
+ key: option.value,
12863
+ ref: (el) => {
12864
+ optionRefs.current[index] = el;
12865
+ },
12866
+ className: `editor-dropdown-option ${option.value === value ? "selected" : ""} ${option.disabled ? "disabled" : ""} ${index === focusedIndex ? "focused" : ""}`,
12867
+ role: "option",
12868
+ "aria-selected": option.value === value,
12869
+ "aria-disabled": option.disabled,
12870
+ onClick: () => handleSelectOption(option),
12871
+ onMouseEnter: () => !option.disabled && setFocusedIndex(index)
12872
+ },
12873
+ renderLabel(option)
12874
+ ))
12875
+ ),
12876
+ document.body
12923
12877
  )
12924
12878
  );
12925
12879
  }
@@ -12927,6 +12881,7 @@ RichSelectEditor.displayName = "RichSelectEditor";
12927
12881
 
12928
12882
  // src/editors/DateEditor.tsx
12929
12883
  import React33, { useState as useState22, useRef as useRef17, useMemo as useMemo10 } from "react";
12884
+ import ReactDOM3 from "react-dom";
12930
12885
  function DateEditor(props) {
12931
12886
  const {
12932
12887
  value,
@@ -13046,53 +13001,56 @@ function DateEditor(props) {
13046
13001
  autoComplete: "off"
13047
13002
  }
13048
13003
  ), /* @__PURE__ */ React33.createElement("span", { className: "editor-calendar-icon", "aria-hidden": "true" }, "\u{1F4C5}")),
13049
- isOpen && /* @__PURE__ */ React33.createElement("div", { ref: calendarRef, className: "editor-dropdown editor-calendar" }, /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-header" }, /* @__PURE__ */ React33.createElement(
13050
- "button",
13051
- {
13052
- type: "button",
13053
- className: "editor-calendar-nav",
13054
- onClick: handlePrevMonth,
13055
- "aria-label": "Previous month"
13056
- },
13057
- "\u2039"
13058
- ), /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-title" }, viewDate.toLocaleDateString("en-US", {
13059
- month: "long",
13060
- year: "numeric"
13061
- })), /* @__PURE__ */ React33.createElement(
13062
- "button",
13063
- {
13064
- type: "button",
13065
- className: "editor-calendar-nav",
13066
- onClick: handleNextMonth,
13067
- "aria-label": "Next month"
13068
- },
13069
- "\u203A"
13070
- )), /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-weekdays" }, ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((day) => /* @__PURE__ */ React33.createElement("div", { key: day, className: "editor-calendar-weekday" }, day))), /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-days" }, calendarDays.map((day, index) => /* @__PURE__ */ React33.createElement(
13071
- "button",
13072
- {
13073
- key: index,
13074
- type: "button",
13075
- className: `editor-calendar-day ${day.className}`,
13076
- onClick: () => day.date && handleSelectDate(day.date),
13077
- disabled: day.disabled,
13078
- "aria-label": day.date ? day.date.toDateString() : ""
13079
- },
13080
- day.label
13081
- ))), showTime && /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-time" }, /* @__PURE__ */ React33.createElement(
13082
- "input",
13083
- {
13084
- type: "time",
13085
- className: "editor-time-input",
13086
- value: parsedValue ? `${String(parsedValue.getHours()).padStart(2, "0")}:${String(
13087
- parsedValue.getMinutes()
13088
- ).padStart(2, "0")}` : "00:00",
13089
- onChange: (e) => {
13090
- const [hours, minutes] = e.target.value.split(":").map(Number);
13091
- handleTimeChange(hours, minutes);
13004
+ isOpen && ReactDOM3.createPortal(
13005
+ /* @__PURE__ */ React33.createElement("div", { ref: calendarRef, className: "editor-dropdown editor-calendar" }, /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-header" }, /* @__PURE__ */ React33.createElement(
13006
+ "button",
13007
+ {
13008
+ type: "button",
13009
+ className: "editor-calendar-nav",
13010
+ onClick: handlePrevMonth,
13011
+ "aria-label": "Previous month"
13092
13012
  },
13093
- "aria-label": "Time input"
13094
- }
13095
- )))
13013
+ "\u2039"
13014
+ ), /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-title" }, viewDate.toLocaleDateString("en-US", {
13015
+ month: "long",
13016
+ year: "numeric"
13017
+ })), /* @__PURE__ */ React33.createElement(
13018
+ "button",
13019
+ {
13020
+ type: "button",
13021
+ className: "editor-calendar-nav",
13022
+ onClick: handleNextMonth,
13023
+ "aria-label": "Next month"
13024
+ },
13025
+ "\u203A"
13026
+ )), /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-weekdays" }, ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((day) => /* @__PURE__ */ React33.createElement("div", { key: day, className: "editor-calendar-weekday" }, day))), /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-days" }, calendarDays.map((day, index) => /* @__PURE__ */ React33.createElement(
13027
+ "button",
13028
+ {
13029
+ key: index,
13030
+ type: "button",
13031
+ className: `editor-calendar-day ${day.className}`,
13032
+ onClick: () => day.date && handleSelectDate(day.date),
13033
+ disabled: day.disabled,
13034
+ "aria-label": day.date ? day.date.toDateString() : ""
13035
+ },
13036
+ day.label
13037
+ ))), showTime && /* @__PURE__ */ React33.createElement("div", { className: "editor-calendar-time" }, /* @__PURE__ */ React33.createElement(
13038
+ "input",
13039
+ {
13040
+ type: "time",
13041
+ className: "editor-time-input",
13042
+ value: parsedValue ? `${String(parsedValue.getHours()).padStart(2, "0")}:${String(
13043
+ parsedValue.getMinutes()
13044
+ ).padStart(2, "0")}` : "00:00",
13045
+ onChange: (e) => {
13046
+ const [hours, minutes] = e.target.value.split(":").map(Number);
13047
+ handleTimeChange(hours, minutes);
13048
+ },
13049
+ "aria-label": "Time input"
13050
+ }
13051
+ ))),
13052
+ document.body
13053
+ )
13096
13054
  );
13097
13055
  }
13098
13056
  DateEditor.displayName = "DateEditor";
@@ -13349,6 +13307,7 @@ NumericEditor.displayName = "NumericEditor";
13349
13307
 
13350
13308
  // src/editors/MultiSelectEditor.tsx
13351
13309
  import React35, { useState as useState24, useRef as useRef18, useMemo as useMemo11 } from "react";
13310
+ import ReactDOM4 from "react-dom";
13352
13311
  function MultiSelectEditor(props) {
13353
13312
  const {
13354
13313
  value = [],
@@ -13516,45 +13475,48 @@ function MultiSelectEditor(props) {
13516
13475
  ),
13517
13476
  /* @__PURE__ */ React35.createElement("span", { className: "editor-dropdown-icon", "aria-hidden": "true" }, "\u25BC")
13518
13477
  ),
13519
- isOpen && /* @__PURE__ */ React35.createElement(
13520
- "div",
13521
- {
13522
- ref: dropdownRef,
13523
- id: "multiselect-dropdown",
13524
- className: "editor-dropdown",
13525
- role: "listbox",
13526
- "aria-multiselectable": "true",
13527
- style: { maxHeight: maxDropdownHeight }
13528
- },
13529
- filteredOptions.length === 0 ? /* @__PURE__ */ React35.createElement("div", { className: "editor-dropdown-empty" }, "No options found") : filteredOptions.map((option, index) => {
13530
- const isSelected = selectedValues.includes(option.value);
13531
- return /* @__PURE__ */ React35.createElement(
13532
- "div",
13533
- {
13534
- key: option.value,
13535
- className: `editor-dropdown-option editor-multiselect-option ${isSelected ? "selected" : ""} ${option.disabled ? "disabled" : ""} ${index === focusedIndex ? "focused" : ""}`,
13536
- role: "option",
13537
- "aria-selected": isSelected,
13538
- "aria-disabled": option.disabled,
13539
- onClick: () => handleToggleOption(option),
13540
- onMouseEnter: () => !option.disabled && setFocusedIndex(index)
13541
- },
13542
- /* @__PURE__ */ React35.createElement(
13543
- "input",
13478
+ isOpen && ReactDOM4.createPortal(
13479
+ /* @__PURE__ */ React35.createElement(
13480
+ "div",
13481
+ {
13482
+ ref: dropdownRef,
13483
+ id: "multiselect-dropdown",
13484
+ className: "editor-dropdown",
13485
+ role: "listbox",
13486
+ "aria-multiselectable": "true",
13487
+ style: { maxHeight: maxDropdownHeight }
13488
+ },
13489
+ filteredOptions.length === 0 ? /* @__PURE__ */ React35.createElement("div", { className: "editor-dropdown-empty" }, "No options found") : filteredOptions.map((option, index) => {
13490
+ const isSelected = selectedValues.includes(option.value);
13491
+ return /* @__PURE__ */ React35.createElement(
13492
+ "div",
13544
13493
  {
13545
- type: "checkbox",
13546
- className: "editor-multiselect-checkbox",
13547
- checked: isSelected,
13548
- onChange: () => {
13549
- },
13550
- disabled: option.disabled,
13551
- tabIndex: -1,
13552
- "aria-hidden": "true"
13553
- }
13554
- ),
13555
- /* @__PURE__ */ React35.createElement("div", { className: "editor-option-content" }, option.icon && /* @__PURE__ */ React35.createElement("span", { className: "editor-option-icon" }, option.icon), /* @__PURE__ */ React35.createElement("span", { className: "editor-option-label" }, option.label))
13556
- );
13557
- })
13494
+ key: option.value,
13495
+ className: `editor-dropdown-option editor-multiselect-option ${isSelected ? "selected" : ""} ${option.disabled ? "disabled" : ""} ${index === focusedIndex ? "focused" : ""}`,
13496
+ role: "option",
13497
+ "aria-selected": isSelected,
13498
+ "aria-disabled": option.disabled,
13499
+ onClick: () => handleToggleOption(option),
13500
+ onMouseEnter: () => !option.disabled && setFocusedIndex(index)
13501
+ },
13502
+ /* @__PURE__ */ React35.createElement(
13503
+ "input",
13504
+ {
13505
+ type: "checkbox",
13506
+ className: "editor-multiselect-checkbox",
13507
+ checked: isSelected,
13508
+ onChange: () => {
13509
+ },
13510
+ disabled: option.disabled,
13511
+ tabIndex: -1,
13512
+ "aria-hidden": "true"
13513
+ }
13514
+ ),
13515
+ /* @__PURE__ */ React35.createElement("div", { className: "editor-option-content" }, option.icon && /* @__PURE__ */ React35.createElement("span", { className: "editor-option-icon" }, option.icon), /* @__PURE__ */ React35.createElement("span", { className: "editor-option-label" }, option.label))
13516
+ );
13517
+ })
13518
+ ),
13519
+ document.body
13558
13520
  )
13559
13521
  );
13560
13522
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-open-source-grid",
3
3
  "private": false,
4
- "version": "1.7.23",
4
+ "version": "1.7.25",
5
5
  "type": "module",
6
6
  "description": "A high-performance React DataGrid component with advanced features like virtual scrolling, infinite scrolling, tree data, market data mode, integrated charts with context menu, and more",
7
7
  "main": "./dist/lib/index.cjs",
@@ -12,9 +12,7 @@
12
12
  ".": {
13
13
  "types": "./dist/lib/index.d.ts",
14
14
  "import": "./dist/lib/index.js",
15
- "require": "./dist/lib/index.cjs",
16
- "browser": "./dist/lib/index.js",
17
- "default": "./dist/lib/index.js"
15
+ "require": "./dist/lib/index.cjs"
18
16
  },
19
17
  "./package.json": "./package.json",
20
18
  "./dist/*": "./dist/*",
@@ -47,66 +45,39 @@
47
45
  },
48
46
  "homepage": "https://bhushanpoojary.github.io/react-open-source-datagrid",
49
47
  "scripts": {
50
- "dev": "vite",
51
48
  "build:lib": "tsup src/index.ts --format cjs,esm --out-dir dist/lib --clean && tsc -p tsconfig.build.json",
52
- "build": "npm run build:lib && vite build",
49
+ "build": "npm run build:lib",
53
50
  "lint": "eslint .",
54
- "preview": "vite preview",
55
51
  "postbuild": "node ./scripts/generate-types-entry.cjs",
56
- "predeploy": "npm run build",
57
- "deploy": "gh-pages -d dist",
58
- "test": "npm run test:playwright && npm run test:cypress",
59
- "test:playwright": "playwright test",
60
- "test:playwright:ui": "playwright test --ui",
61
- "test:playwright:report": "playwright show-report",
62
- "test:cypress": "start-server-and-test dev http://localhost:5173 cypress:run",
63
- "test:cypress:open": "start-server-and-test dev http://localhost:5173 cypress:open",
64
- "cypress:run": "cypress run",
65
- "cypress:open": "cypress open",
66
- "test:component": "cypress run --component",
67
- "test:e2e": "start-server-and-test dev http://localhost:5173 cypress:run:e2e",
68
- "cypress:run:e2e": "cypress run --e2e",
69
52
  "prepare": "npm run build:lib && node ./scripts/generate-types-entry.cjs && husky install"
70
53
  },
71
54
  "dependencies": {
72
- "@types/react-syntax-highlighter": "^15.5.13",
73
55
  "exceljs": "^4.4.0",
74
56
  "html-to-image": "^1.11.11",
75
- "react": "^19.2.0",
76
- "react-dom": "^19.2.0",
77
- "react-router-dom": "^7.9.6",
78
- "react-syntax-highlighter": "^16.1.0",
79
57
  "recharts": "^2.10.3"
80
58
  },
59
+ "peerDependencies": {
60
+ "react": "^18.0.0 || ^19.0.0",
61
+ "react-dom": "^18.0.0 || ^19.0.0"
62
+ },
81
63
  "devDependencies": {
82
64
  "@eslint/js": "^9.39.1",
83
- "@playwright/test": "^1.48.2",
84
65
  "@types/node": "^24.10.1",
85
66
  "@types/react": "^19.2.5",
86
67
  "@types/react-dom": "^19.2.3",
87
- "@types/react-router-dom": "^5.3.3",
88
- "@types/uuid": "^10.0.0",
89
- "@vitejs/plugin-react": "^5.1.1",
90
- "cypress": "^13.16.1",
91
68
  "eslint": "^9.39.1",
92
69
  "eslint-plugin-react-hooks": "^7.0.1",
93
70
  "eslint-plugin-react-refresh": "^0.4.24",
94
- "gh-pages": "^6.3.0",
95
71
  "globals": "^16.5.0",
96
72
  "husky": "^8.0.0",
97
73
  "lint-staged": "^16.2.7",
98
- "start-server-and-test": "^2.1.3",
99
74
  "tsup": "^8.5.1",
100
75
  "typescript": "~5.9.3",
101
- "typescript-eslint": "^8.46.4",
102
- "vite": "npm:rolldown-vite@7.2.5"
76
+ "typescript-eslint": "^8.46.4"
103
77
  },
104
78
  "lint-staged": {
105
79
  "*.{js,jsx,ts,tsx}": [
106
80
  "npm run lint"
107
81
  ]
108
- },
109
- "overrides": {
110
- "vite": "npm:rolldown-vite@7.2.5"
111
82
  }
112
83
  }
package/dist/404.html DELETED
@@ -1,23 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Redirecting...</title>
6
- <script>
7
- (function () {
8
- var l = window.location;
9
- // If we already came through the redirect, don't loop
10
- if (l.search.indexOf('from404=1') !== -1) {
11
- return;
12
- }
13
- var path = l.pathname + l.search + l.hash;
14
- // Always go to root, encoding the original path
15
- var redirectUrl = '/?from404=1&path=' + encodeURIComponent(path);
16
- l.replace(redirectUrl);
17
- })();
18
- </script>
19
- </head>
20
- <body>
21
- Redirecting...
22
- </body>
23
- </html>
package/dist/CNAME DELETED
@@ -1 +0,0 @@
1
- reactdatagrid.dev
@@ -1,8 +0,0 @@
1
- /**
2
- * AccessibilityDemo.tsx
3
- *
4
- * Comprehensive demonstration of DataGrid accessibility features
5
- * including keyboard navigation, ARIA support, and screen reader compatibility.
6
- */
7
- import React from 'react';
8
- export declare const AccessibilityDemo: React.FC;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const ApiReferencePage: React.FC;
@@ -1,2 +0,0 @@
1
- export declare const BenchmarkDemo: () => import("react/jsx-runtime").JSX.Element;
2
- export default BenchmarkDemo;