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
@@ -2832,6 +2832,7 @@ var GridBody = ({
2832
2832
  }
2833
2833
  const isSelected = selectedRows.has(row.id);
2834
2834
  const isFocused = (focusState == null ? void 0 : focusState.rowIndex) === rowIndex;
2835
+ const isRowEditing = editState.rowId === row.id;
2835
2836
  const isLoadingRow = row._loading === true;
2836
2837
  const isDragEnabled = (dragRowConfig == null ? void 0 : dragRowConfig.enabled) && !isLoadingRow;
2837
2838
  const showDragHandle = isDragEnabled && dragRowConfig.showDragHandle !== false;
@@ -2851,7 +2852,8 @@ var GridBody = ({
2851
2852
  borderBottom: "var(--grid-border-width, 1px) solid var(--grid-border)",
2852
2853
  backgroundColor: isLoadingRow ? "var(--grid-bg-alt)" : isSelected ? "var(--grid-selected)" : isFocused ? "var(--grid-active)" : "var(--grid-bg)",
2853
2854
  cursor: isLoadingRow ? "wait" : isDragEnabled ? "grab" : "pointer",
2854
- transition: "background-color 0.15s ease"
2855
+ transition: "background-color 0.15s ease",
2856
+ ...isRowEditing ? { position: "relative", zIndex: 100 } : {}
2855
2857
  },
2856
2858
  onMouseEnter: (e) => !isSelected && !isLoadingRow && (e.currentTarget.style.backgroundColor = "var(--grid-hover)"),
2857
2859
  onMouseLeave: (e) => !isSelected && !isLoadingRow && (e.currentTarget.style.backgroundColor = "var(--grid-bg)"),
@@ -2937,7 +2939,8 @@ var GridBody = ({
2937
2939
  flexShrink: 0,
2938
2940
  outline: isCellFocused ? "2px solid var(--grid-primary)" : "none",
2939
2941
  outlineOffset: "-2px",
2940
- color: "var(--grid-text)"
2942
+ color: "var(--grid-text)",
2943
+ ...isEditing ? { position: "relative", zIndex: 1e3 } : {}
2941
2944
  },
2942
2945
  onDoubleClick: () => handleCellDoubleClick(row, field, cellValue),
2943
2946
  onContextMenu: (e) => onContextMenu == null ? void 0 : onContextMenu(e, row, column, rowIndex, columnIndex),
@@ -4276,6 +4279,7 @@ var ExportMenu = ({
4276
4279
 
4277
4280
  // src/components/DataGrid/ColumnFilters.tsx
4278
4281
  var import_react15 = __toESM(require("react"), 1);
4282
+ var import_react_dom2 = __toESM(require("react-dom"), 1);
4279
4283
 
4280
4284
  // src/components/DataGrid/AdvancedFilterBuilder.tsx
4281
4285
  var import_react14 = __toESM(require("react"), 1);
@@ -4594,7 +4598,7 @@ var AdvancedFilterBuilder = ({
4594
4598
  borderRadius: "var(--grid-border-radius, 8px)",
4595
4599
  border: "1px solid var(--grid-border)",
4596
4600
  padding: "16px",
4597
- zIndex: 1001,
4601
+ zIndex: 10001,
4598
4602
  display: "flex",
4599
4603
  flexDirection: "column",
4600
4604
  overflowY: "auto"
@@ -4850,7 +4854,7 @@ var TextFilterMenu = ({ filterValue, onApplyFilter, onClose, anchorEl, showAdvan
4850
4854
  borderRadius: "var(--grid-border-radius, 8px)",
4851
4855
  border: "var(--grid-border-width, 1px) solid var(--grid-border)",
4852
4856
  padding: "16px",
4853
- zIndex: 1e3
4857
+ zIndex: 1e4
4854
4858
  },
4855
4859
  onClick: (e) => e.stopPropagation()
4856
4860
  },
@@ -4972,7 +4976,7 @@ var NumberFilterMenu = ({ filterValue, onApplyFilter, onClose, anchorEl, showAdv
4972
4976
  borderRadius: "var(--grid-border-radius, 8px)",
4973
4977
  border: "1px solid var(--grid-border)",
4974
4978
  padding: "16px",
4975
- zIndex: 1e3
4979
+ zIndex: 1e4
4976
4980
  },
4977
4981
  onClick: (e) => e.stopPropagation()
4978
4982
  },
@@ -5088,7 +5092,7 @@ var DateFilterMenu = ({ filterValue, onApplyFilter, onClose, anchorEl, showAdvan
5088
5092
  borderRadius: "var(--grid-border-radius, 8px)",
5089
5093
  border: "1px solid var(--grid-border)",
5090
5094
  padding: "16px",
5091
- zIndex: 1e3
5095
+ zIndex: 1e4
5092
5096
  },
5093
5097
  onClick: (e) => e.stopPropagation()
5094
5098
  },
@@ -5213,7 +5217,7 @@ var SetFilterMenu = ({ column, filterValue, onApplyFilter, onClose, rows, anchor
5213
5217
  borderRadius: "var(--grid-border-radius, 8px)",
5214
5218
  border: "1px solid var(--grid-border)",
5215
5219
  padding: "16px",
5216
- zIndex: 1e3,
5220
+ zIndex: 1e4,
5217
5221
  display: "flex",
5218
5222
  flexDirection: "column"
5219
5223
  },
@@ -5569,8 +5573,8 @@ var ColumnFilters = ({
5569
5573
  )
5570
5574
  )
5571
5575
  ),
5572
- openFilterMenu === field && renderFilterMenu(column),
5573
- advancedFilterField === field && renderAdvancedFilterMenu(column)
5576
+ openFilterMenu === field && import_react_dom2.default.createPortal(renderFilterMenu(column), document.body),
5577
+ advancedFilterField === field && import_react_dom2.default.createPortal(renderAdvancedFilterMenu(column), document.body)
5574
5578
  );
5575
5579
  })));
5576
5580
  };
@@ -6518,7 +6522,7 @@ var useContextMenu = ({
6518
6522
 
6519
6523
  // src/components/DataGrid/Tooltip.tsx
6520
6524
  var import_react19 = __toESM(require("react"), 1);
6521
- var import_react_dom2 = require("react-dom");
6525
+ var import_react_dom3 = require("react-dom");
6522
6526
  var Tooltip = ({
6523
6527
  state,
6524
6528
  maxWidth = 300,
@@ -6689,7 +6693,7 @@ var Tooltip = ({
6689
6693
  }
6690
6694
  )
6691
6695
  );
6692
- return (0, import_react_dom2.createPortal)(tooltipElement, document.body);
6696
+ return (0, import_react_dom3.createPortal)(tooltipElement, document.body);
6693
6697
  };
6694
6698
 
6695
6699
  // src/components/DataGrid/useTooltip.tsx
@@ -6735,7 +6739,7 @@ var useTooltip = ({ config = {} } = {}) => {
6735
6739
  const target = event.currentTarget;
6736
6740
  const rect = target.getBoundingClientRect();
6737
6741
  const tooltipContent = typeof content === "string" ? { content } : content;
6738
- showTimeoutRef.current = setTimeout(() => {
6742
+ showTimeoutRef.current = window.setTimeout(() => {
6739
6743
  if (isHoveringRef.current) {
6740
6744
  setTooltipState({
6741
6745
  isVisible: true,
@@ -6752,7 +6756,7 @@ var useTooltip = ({ config = {} } = {}) => {
6752
6756
  clearTimeouts();
6753
6757
  isHoveringRef.current = false;
6754
6758
  if (hideDelay > 0) {
6755
- hideTimeoutRef.current = setTimeout(() => {
6759
+ hideTimeoutRef.current = window.setTimeout(() => {
6756
6760
  setTooltipState((prev) => ({
6757
6761
  ...prev,
6758
6762
  isVisible: false
@@ -7790,7 +7794,7 @@ var useScreenReaderAnnouncements = () => {
7790
7794
  clearTimeout(timeoutRef.current);
7791
7795
  }
7792
7796
  if (delay > 0) {
7793
- timeoutRef.current = setTimeout(() => {
7797
+ timeoutRef.current = window.setTimeout(() => {
7794
7798
  announcementRef.current = message;
7795
7799
  }, delay);
7796
7800
  } else {
@@ -10000,60 +10004,6 @@ var FacetedSearch = ({
10000
10004
 
10001
10005
  // src/components/DataGrid/FilteredSearchBar.tsx
10002
10006
  var import_react27 = __toESM(require("react"), 1);
10003
-
10004
- // node_modules/uuid/dist/esm-node/rng.js
10005
- var import_crypto = __toESM(require("crypto"));
10006
- var rnds8Pool = new Uint8Array(256);
10007
- var poolPtr = rnds8Pool.length;
10008
- function rng() {
10009
- if (poolPtr > rnds8Pool.length - 16) {
10010
- import_crypto.default.randomFillSync(rnds8Pool);
10011
- poolPtr = 0;
10012
- }
10013
- return rnds8Pool.slice(poolPtr, poolPtr += 16);
10014
- }
10015
-
10016
- // node_modules/uuid/dist/esm-node/regex.js
10017
- 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;
10018
-
10019
- // node_modules/uuid/dist/esm-node/validate.js
10020
- function validate(uuid) {
10021
- return typeof uuid === "string" && regex_default.test(uuid);
10022
- }
10023
- var validate_default = validate;
10024
-
10025
- // node_modules/uuid/dist/esm-node/stringify.js
10026
- var byteToHex = [];
10027
- for (let i = 0; i < 256; ++i) {
10028
- byteToHex.push((i + 256).toString(16).substr(1));
10029
- }
10030
- function stringify(arr, offset = 0) {
10031
- 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();
10032
- if (!validate_default(uuid)) {
10033
- throw TypeError("Stringified UUID is invalid");
10034
- }
10035
- return uuid;
10036
- }
10037
- var stringify_default = stringify;
10038
-
10039
- // node_modules/uuid/dist/esm-node/v4.js
10040
- function v4(options, buf, offset) {
10041
- options = options || {};
10042
- const rnds = options.random || (options.rng || rng)();
10043
- rnds[6] = rnds[6] & 15 | 64;
10044
- rnds[8] = rnds[8] & 63 | 128;
10045
- if (buf) {
10046
- offset = offset || 0;
10047
- for (let i = 0; i < 16; ++i) {
10048
- buf[offset + i] = rnds[i];
10049
- }
10050
- return buf;
10051
- }
10052
- return stringify_default(rnds);
10053
- }
10054
- var v4_default = v4;
10055
-
10056
- // src/components/DataGrid/FilteredSearchBar.tsx
10057
10007
  var FilteredSearchBar = ({
10058
10008
  filters,
10059
10009
  onSearch,
@@ -10089,7 +10039,7 @@ var FilteredSearchBar = ({
10089
10039
  const filter = filters.find((f) => f.field === field);
10090
10040
  if (!filter || tokens.length >= maxTokens) return;
10091
10041
  const newToken = {
10092
- id: `${field}-${v4_default()}`,
10042
+ id: `${field}-${crypto.randomUUID()}`,
10093
10043
  field,
10094
10044
  label: filter.label,
10095
10045
  value,
@@ -12303,7 +12253,7 @@ function useMarketData(options) {
12303
12253
  );
12304
12254
  console.log(`Reconnecting in ${delay}ms... (attempt ${reconnectCountRef.current + 1})`);
12305
12255
  setConnectionState("reconnecting");
12306
- reconnectTimeoutRef.current = setTimeout(() => {
12256
+ reconnectTimeoutRef.current = window.setTimeout(() => {
12307
12257
  reconnectCountRef.current++;
12308
12258
  reconnectDelayRef.current *= 2;
12309
12259
  setConnectionState("reconnecting");
@@ -12594,7 +12544,7 @@ var WebSocketMockFeed = class {
12594
12544
  console.log(`Mock feed started with ${this.config.symbols.length} symbols`);
12595
12545
  this.config.symbols.forEach((symbol) => {
12596
12546
  const interval = 1e3 / this.config.updateFrequency;
12597
- const intervalId = setInterval(() => {
12547
+ const intervalId = window.setInterval(() => {
12598
12548
  this.updateSymbol(symbol);
12599
12549
  }, interval);
12600
12550
  this.updateIntervals.set(symbol, intervalId);
@@ -13095,20 +13045,20 @@ function usePopupPosition(anchorRef, popupRef, isOpen, placement = "auto") {
13095
13045
  }
13096
13046
  switch (actualPlacement) {
13097
13047
  case "bottom":
13098
- top = anchorRect.bottom + window.scrollY;
13099
- left = anchorRect.left + window.scrollX;
13048
+ top = anchorRect.bottom;
13049
+ left = anchorRect.left;
13100
13050
  break;
13101
13051
  case "top":
13102
- top = anchorRect.top + window.scrollY - popupRect.height;
13103
- left = anchorRect.left + window.scrollX;
13052
+ top = anchorRect.top - popupRect.height;
13053
+ left = anchorRect.left;
13104
13054
  break;
13105
13055
  case "right":
13106
- top = anchorRect.top + window.scrollY;
13107
- left = anchorRect.right + window.scrollX;
13056
+ top = anchorRect.top;
13057
+ left = anchorRect.right;
13108
13058
  break;
13109
13059
  case "left":
13110
- top = anchorRect.top + window.scrollY;
13111
- left = anchorRect.left + window.scrollX - popupRect.width;
13060
+ top = anchorRect.top;
13061
+ left = anchorRect.left - popupRect.width;
13112
13062
  break;
13113
13063
  }
13114
13064
  const margin = 8;
@@ -13118,11 +13068,11 @@ function usePopupPosition(anchorRef, popupRef, isOpen, placement = "auto") {
13118
13068
  if (left < margin) {
13119
13069
  left = margin;
13120
13070
  }
13121
- if (top + popupRect.height > viewportHeight + window.scrollY) {
13122
- top = viewportHeight + window.scrollY - popupRect.height - margin;
13071
+ if (top + popupRect.height > viewportHeight) {
13072
+ top = viewportHeight - popupRect.height - margin;
13123
13073
  }
13124
- if (top < window.scrollY + margin) {
13125
- top = window.scrollY + margin;
13074
+ if (top < margin) {
13075
+ top = margin;
13126
13076
  }
13127
13077
  popup.style.top = `${top}px`;
13128
13078
  popup.style.left = `${left}px`;
@@ -13139,7 +13089,7 @@ function debounce2(func, wait) {
13139
13089
  if (timeout) {
13140
13090
  clearTimeout(timeout);
13141
13091
  }
13142
- timeout = setTimeout(later, wait);
13092
+ timeout = window.setTimeout(later, wait);
13143
13093
  };
13144
13094
  }
13145
13095
  function formatNumber(value, decimals = 0, thousandsSeparator = ",", decimalSeparator = ".") {
@@ -13167,6 +13117,7 @@ function filterOptions(options, searchQuery) {
13167
13117
 
13168
13118
  // src/editors/RichSelectEditor.tsx
13169
13119
  var import_react37 = __toESM(require("react"), 1);
13120
+ var import_react_dom4 = __toESM(require("react-dom"), 1);
13170
13121
  function RichSelectEditor(props) {
13171
13122
  const {
13172
13123
  value,
@@ -13323,31 +13274,34 @@ function RichSelectEditor(props) {
13323
13274
  },
13324
13275
  "\xD7"
13325
13276
  ), /* @__PURE__ */ import_react37.default.createElement("span", { className: "editor-dropdown-icon", "aria-hidden": "true" }, "\u25BC"))),
13326
- isOpen && /* @__PURE__ */ import_react37.default.createElement(
13327
- "div",
13328
- {
13329
- ref: dropdownRef,
13330
- id: "richselect-dropdown",
13331
- className: "editor-dropdown",
13332
- role: "listbox",
13333
- style: { maxHeight: maxDropdownHeight }
13334
- },
13335
- filteredOptions.length === 0 ? /* @__PURE__ */ import_react37.default.createElement("div", { className: "editor-dropdown-empty" }, "No options found") : filteredOptions.map((option, index) => /* @__PURE__ */ import_react37.default.createElement(
13277
+ isOpen && import_react_dom4.default.createPortal(
13278
+ /* @__PURE__ */ import_react37.default.createElement(
13336
13279
  "div",
13337
13280
  {
13338
- key: option.value,
13339
- ref: (el) => {
13340
- optionRefs.current[index] = el;
13341
- },
13342
- className: `editor-dropdown-option ${option.value === value ? "selected" : ""} ${option.disabled ? "disabled" : ""} ${index === focusedIndex ? "focused" : ""}`,
13343
- role: "option",
13344
- "aria-selected": option.value === value,
13345
- "aria-disabled": option.disabled,
13346
- onClick: () => handleSelectOption(option),
13347
- onMouseEnter: () => !option.disabled && setFocusedIndex(index)
13281
+ ref: dropdownRef,
13282
+ id: "richselect-dropdown",
13283
+ className: "editor-dropdown",
13284
+ role: "listbox",
13285
+ style: { maxHeight: maxDropdownHeight }
13348
13286
  },
13349
- renderLabel(option)
13350
- ))
13287
+ filteredOptions.length === 0 ? /* @__PURE__ */ import_react37.default.createElement("div", { className: "editor-dropdown-empty" }, "No options found") : filteredOptions.map((option, index) => /* @__PURE__ */ import_react37.default.createElement(
13288
+ "div",
13289
+ {
13290
+ key: option.value,
13291
+ ref: (el) => {
13292
+ optionRefs.current[index] = el;
13293
+ },
13294
+ className: `editor-dropdown-option ${option.value === value ? "selected" : ""} ${option.disabled ? "disabled" : ""} ${index === focusedIndex ? "focused" : ""}`,
13295
+ role: "option",
13296
+ "aria-selected": option.value === value,
13297
+ "aria-disabled": option.disabled,
13298
+ onClick: () => handleSelectOption(option),
13299
+ onMouseEnter: () => !option.disabled && setFocusedIndex(index)
13300
+ },
13301
+ renderLabel(option)
13302
+ ))
13303
+ ),
13304
+ document.body
13351
13305
  )
13352
13306
  );
13353
13307
  }
@@ -13355,6 +13309,7 @@ RichSelectEditor.displayName = "RichSelectEditor";
13355
13309
 
13356
13310
  // src/editors/DateEditor.tsx
13357
13311
  var import_react38 = __toESM(require("react"), 1);
13312
+ var import_react_dom5 = __toESM(require("react-dom"), 1);
13358
13313
  function DateEditor(props) {
13359
13314
  const {
13360
13315
  value,
@@ -13474,53 +13429,56 @@ function DateEditor(props) {
13474
13429
  autoComplete: "off"
13475
13430
  }
13476
13431
  ), /* @__PURE__ */ import_react38.default.createElement("span", { className: "editor-calendar-icon", "aria-hidden": "true" }, "\u{1F4C5}")),
13477
- isOpen && /* @__PURE__ */ import_react38.default.createElement("div", { ref: calendarRef, className: "editor-dropdown editor-calendar" }, /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-header" }, /* @__PURE__ */ import_react38.default.createElement(
13478
- "button",
13479
- {
13480
- type: "button",
13481
- className: "editor-calendar-nav",
13482
- onClick: handlePrevMonth,
13483
- "aria-label": "Previous month"
13484
- },
13485
- "\u2039"
13486
- ), /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-title" }, viewDate.toLocaleDateString("en-US", {
13487
- month: "long",
13488
- year: "numeric"
13489
- })), /* @__PURE__ */ import_react38.default.createElement(
13490
- "button",
13491
- {
13492
- type: "button",
13493
- className: "editor-calendar-nav",
13494
- onClick: handleNextMonth,
13495
- "aria-label": "Next month"
13496
- },
13497
- "\u203A"
13498
- )), /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-weekdays" }, ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((day) => /* @__PURE__ */ import_react38.default.createElement("div", { key: day, className: "editor-calendar-weekday" }, day))), /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-days" }, calendarDays.map((day, index) => /* @__PURE__ */ import_react38.default.createElement(
13499
- "button",
13500
- {
13501
- key: index,
13502
- type: "button",
13503
- className: `editor-calendar-day ${day.className}`,
13504
- onClick: () => day.date && handleSelectDate(day.date),
13505
- disabled: day.disabled,
13506
- "aria-label": day.date ? day.date.toDateString() : ""
13507
- },
13508
- day.label
13509
- ))), showTime && /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-time" }, /* @__PURE__ */ import_react38.default.createElement(
13510
- "input",
13511
- {
13512
- type: "time",
13513
- className: "editor-time-input",
13514
- value: parsedValue ? `${String(parsedValue.getHours()).padStart(2, "0")}:${String(
13515
- parsedValue.getMinutes()
13516
- ).padStart(2, "0")}` : "00:00",
13517
- onChange: (e) => {
13518
- const [hours, minutes] = e.target.value.split(":").map(Number);
13519
- handleTimeChange(hours, minutes);
13432
+ isOpen && import_react_dom5.default.createPortal(
13433
+ /* @__PURE__ */ import_react38.default.createElement("div", { ref: calendarRef, className: "editor-dropdown editor-calendar" }, /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-header" }, /* @__PURE__ */ import_react38.default.createElement(
13434
+ "button",
13435
+ {
13436
+ type: "button",
13437
+ className: "editor-calendar-nav",
13438
+ onClick: handlePrevMonth,
13439
+ "aria-label": "Previous month"
13520
13440
  },
13521
- "aria-label": "Time input"
13522
- }
13523
- )))
13441
+ "\u2039"
13442
+ ), /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-title" }, viewDate.toLocaleDateString("en-US", {
13443
+ month: "long",
13444
+ year: "numeric"
13445
+ })), /* @__PURE__ */ import_react38.default.createElement(
13446
+ "button",
13447
+ {
13448
+ type: "button",
13449
+ className: "editor-calendar-nav",
13450
+ onClick: handleNextMonth,
13451
+ "aria-label": "Next month"
13452
+ },
13453
+ "\u203A"
13454
+ )), /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-weekdays" }, ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((day) => /* @__PURE__ */ import_react38.default.createElement("div", { key: day, className: "editor-calendar-weekday" }, day))), /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-days" }, calendarDays.map((day, index) => /* @__PURE__ */ import_react38.default.createElement(
13455
+ "button",
13456
+ {
13457
+ key: index,
13458
+ type: "button",
13459
+ className: `editor-calendar-day ${day.className}`,
13460
+ onClick: () => day.date && handleSelectDate(day.date),
13461
+ disabled: day.disabled,
13462
+ "aria-label": day.date ? day.date.toDateString() : ""
13463
+ },
13464
+ day.label
13465
+ ))), showTime && /* @__PURE__ */ import_react38.default.createElement("div", { className: "editor-calendar-time" }, /* @__PURE__ */ import_react38.default.createElement(
13466
+ "input",
13467
+ {
13468
+ type: "time",
13469
+ className: "editor-time-input",
13470
+ value: parsedValue ? `${String(parsedValue.getHours()).padStart(2, "0")}:${String(
13471
+ parsedValue.getMinutes()
13472
+ ).padStart(2, "0")}` : "00:00",
13473
+ onChange: (e) => {
13474
+ const [hours, minutes] = e.target.value.split(":").map(Number);
13475
+ handleTimeChange(hours, minutes);
13476
+ },
13477
+ "aria-label": "Time input"
13478
+ }
13479
+ ))),
13480
+ document.body
13481
+ )
13524
13482
  );
13525
13483
  }
13526
13484
  DateEditor.displayName = "DateEditor";
@@ -13777,6 +13735,7 @@ NumericEditor.displayName = "NumericEditor";
13777
13735
 
13778
13736
  // src/editors/MultiSelectEditor.tsx
13779
13737
  var import_react40 = __toESM(require("react"), 1);
13738
+ var import_react_dom6 = __toESM(require("react-dom"), 1);
13780
13739
  function MultiSelectEditor(props) {
13781
13740
  const {
13782
13741
  value = [],
@@ -13944,45 +13903,48 @@ function MultiSelectEditor(props) {
13944
13903
  ),
13945
13904
  /* @__PURE__ */ import_react40.default.createElement("span", { className: "editor-dropdown-icon", "aria-hidden": "true" }, "\u25BC")
13946
13905
  ),
13947
- isOpen && /* @__PURE__ */ import_react40.default.createElement(
13948
- "div",
13949
- {
13950
- ref: dropdownRef,
13951
- id: "multiselect-dropdown",
13952
- className: "editor-dropdown",
13953
- role: "listbox",
13954
- "aria-multiselectable": "true",
13955
- style: { maxHeight: maxDropdownHeight }
13956
- },
13957
- filteredOptions.length === 0 ? /* @__PURE__ */ import_react40.default.createElement("div", { className: "editor-dropdown-empty" }, "No options found") : filteredOptions.map((option, index) => {
13958
- const isSelected = selectedValues.includes(option.value);
13959
- return /* @__PURE__ */ import_react40.default.createElement(
13960
- "div",
13961
- {
13962
- key: option.value,
13963
- className: `editor-dropdown-option editor-multiselect-option ${isSelected ? "selected" : ""} ${option.disabled ? "disabled" : ""} ${index === focusedIndex ? "focused" : ""}`,
13964
- role: "option",
13965
- "aria-selected": isSelected,
13966
- "aria-disabled": option.disabled,
13967
- onClick: () => handleToggleOption(option),
13968
- onMouseEnter: () => !option.disabled && setFocusedIndex(index)
13969
- },
13970
- /* @__PURE__ */ import_react40.default.createElement(
13971
- "input",
13906
+ isOpen && import_react_dom6.default.createPortal(
13907
+ /* @__PURE__ */ import_react40.default.createElement(
13908
+ "div",
13909
+ {
13910
+ ref: dropdownRef,
13911
+ id: "multiselect-dropdown",
13912
+ className: "editor-dropdown",
13913
+ role: "listbox",
13914
+ "aria-multiselectable": "true",
13915
+ style: { maxHeight: maxDropdownHeight }
13916
+ },
13917
+ filteredOptions.length === 0 ? /* @__PURE__ */ import_react40.default.createElement("div", { className: "editor-dropdown-empty" }, "No options found") : filteredOptions.map((option, index) => {
13918
+ const isSelected = selectedValues.includes(option.value);
13919
+ return /* @__PURE__ */ import_react40.default.createElement(
13920
+ "div",
13972
13921
  {
13973
- type: "checkbox",
13974
- className: "editor-multiselect-checkbox",
13975
- checked: isSelected,
13976
- onChange: () => {
13977
- },
13978
- disabled: option.disabled,
13979
- tabIndex: -1,
13980
- "aria-hidden": "true"
13981
- }
13982
- ),
13983
- /* @__PURE__ */ import_react40.default.createElement("div", { className: "editor-option-content" }, option.icon && /* @__PURE__ */ import_react40.default.createElement("span", { className: "editor-option-icon" }, option.icon), /* @__PURE__ */ import_react40.default.createElement("span", { className: "editor-option-label" }, option.label))
13984
- );
13985
- })
13922
+ key: option.value,
13923
+ className: `editor-dropdown-option editor-multiselect-option ${isSelected ? "selected" : ""} ${option.disabled ? "disabled" : ""} ${index === focusedIndex ? "focused" : ""}`,
13924
+ role: "option",
13925
+ "aria-selected": isSelected,
13926
+ "aria-disabled": option.disabled,
13927
+ onClick: () => handleToggleOption(option),
13928
+ onMouseEnter: () => !option.disabled && setFocusedIndex(index)
13929
+ },
13930
+ /* @__PURE__ */ import_react40.default.createElement(
13931
+ "input",
13932
+ {
13933
+ type: "checkbox",
13934
+ className: "editor-multiselect-checkbox",
13935
+ checked: isSelected,
13936
+ onChange: () => {
13937
+ },
13938
+ disabled: option.disabled,
13939
+ tabIndex: -1,
13940
+ "aria-hidden": "true"
13941
+ }
13942
+ ),
13943
+ /* @__PURE__ */ import_react40.default.createElement("div", { className: "editor-option-content" }, option.icon && /* @__PURE__ */ import_react40.default.createElement("span", { className: "editor-option-icon" }, option.icon), /* @__PURE__ */ import_react40.default.createElement("span", { className: "editor-option-label" }, option.label))
13944
+ );
13945
+ })
13946
+ ),
13947
+ document.body
13986
13948
  )
13987
13949
  );
13988
13950
  }