@1771technologies/lytenyte-pro 1.0.2 → 1.0.4

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 (61) hide show
  1. package/dist/+types.d.ts +24 -4
  2. package/dist/cell-selection/cell-selection-driver.js +3 -2
  3. package/dist/cell-selection/cell-style-row.d.ts +2 -2
  4. package/dist/cell-selection/cell-style-row.js +1 -1
  5. package/dist/cell-selection/get-root-cell.js +3 -83
  6. package/dist/cell-selection/index.d.ts +0 -1
  7. package/dist/cell-selection/index.js +0 -1
  8. package/dist/cell-selection/split-cell-selection-rect.d.ts +8 -1
  9. package/dist/cell-selection/split-cell-selection-rect.js +13 -4
  10. package/dist/cell-selection/split-on-pivot.d.ts +3 -0
  11. package/dist/cell-selection/split-on-pivot.js +50 -0
  12. package/dist/cells/cell-editor.js +1 -1
  13. package/dist/cells/cell-spacer.d.ts +3 -0
  14. package/dist/cells/cell-spacer.js +37 -0
  15. package/dist/cells/cell.d.ts +1 -3
  16. package/dist/cells/cell.js +11 -9
  17. package/dist/column-manager/branch.js +1 -1
  18. package/dist/column-manager/leaf.js +1 -1
  19. package/dist/column-manager/move-handle.d.ts +0 -7
  20. package/dist/column-manager/move-handle.js +23 -6
  21. package/dist/filter-tree/leaf.js +3 -1
  22. package/dist/grid-box/+types.d.ts +2 -2
  23. package/dist/grid-box/item.js +3 -3
  24. package/dist/grid-box/use-aggregation-box-items.js +1 -2
  25. package/dist/grid-box/use-column-box-items.d.ts +2 -3
  26. package/dist/grid-box/use-column-box-items.js +3 -3
  27. package/dist/grid-box/use-row-group-box-items.d.ts +3 -3
  28. package/dist/grid-box/use-row-group-box-items.js +41 -5
  29. package/dist/grid.d.ts +1 -1
  30. package/dist/header/resize-handler.js +21 -15
  31. package/dist/license.js +1 -1
  32. package/dist/row-data-source-client/use-client-data-source-paginated.js +154 -164
  33. package/dist/row-data-source-client/use-client-data-source.js +144 -177
  34. package/dist/row-data-source-client/use-client-tree-data-source.js +119 -152
  35. package/dist/row-data-source-server/use-server-data-source.js +102 -120
  36. package/dist/rows/row/row.d.ts +1 -1
  37. package/dist/rows/row/row.js +11 -4
  38. package/dist/rows/rows-sections.js +1 -1
  39. package/dist/sort-manager/+types.d.ts +2 -0
  40. package/dist/sort-manager/hooks/use-sort-row-item.js +6 -6
  41. package/dist/sort-manager/utils/sort-item-to-sort-model.js +5 -0
  42. package/dist/sort-manager/utils/sort-model-to-sort-items.js +2 -1
  43. package/dist/state/+types.d.ts +8 -10
  44. package/dist/state/api/cell-root.d.ts +5 -0
  45. package/dist/state/api/cell-root.js +64 -0
  46. package/dist/state/api/edit-begin.js +5 -9
  47. package/dist/state/api/edit-is-cell-active.d.ts +1 -1
  48. package/dist/state/api/edit-is-cell-active.js +2 -7
  49. package/dist/state/api/focus-cell.js +2 -2
  50. package/dist/state/helpers/column-layout.d.ts +3 -3
  51. package/dist/state/helpers/column-layout.js +9 -15
  52. package/dist/state/helpers/get-full-width-callback.d.ts +1 -1
  53. package/dist/state/helpers/get-full-width-callback.js +2 -0
  54. package/dist/state/helpers/get-span-callback.d.ts +1 -1
  55. package/dist/state/helpers/get-span-callback.js +2 -0
  56. package/dist/state/helpers/row-layout/row-layout.d.ts +5 -4
  57. package/dist/state/helpers/row-layout/row-layout.js +112 -346
  58. package/dist/state/use-lytenyte.js +398 -334
  59. package/dist/viewport/viewport.js +3 -2
  60. package/main.css +27 -3
  61. package/package.json +7 -7
@@ -11,8 +11,9 @@ export const Viewport = forwardRef(function Viewport({ children, style, ...props
11
11
  const width = ctx.grid.state.widthTotal.useValue();
12
12
  const height = ctx.grid.state.heightTotal.useValue();
13
13
  const rtl = ctx.grid.state.rtl.useValue();
14
+ const cellSelectionMode = ctx.grid.state.cellSelectionMode.useValue();
14
15
  const focused = useFocusTracking(vp, ctx.grid.internal.focusActive);
15
- return (_jsxs(_Fragment, { children: [_jsxs("div", { tabIndex: 0, ...props, onKeyDown: (e) => {
16
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { tabIndex: 0, ...props, "data-ln-has-cell-selection": cellSelectionMode !== "none", onKeyDown: (e) => {
16
17
  handleSkipInner(e);
17
18
  props.onKeyDown?.(e);
18
19
  if (e.defaultPrevented || e.shiftKey)
@@ -26,7 +27,7 @@ export const Viewport = forwardRef(function Viewport({ children, style, ...props
26
27
  columnCount: ctx.grid.state.columnMeta.get().columnsVisible.length,
27
28
  focusActive: ctx.grid.internal.focusActive,
28
29
  id: ctx.grid.state.gridId.get(),
29
- layout: ctx.grid.internal.layout.get(),
30
+ getRootCell: ctx.grid.api.cellRoot,
30
31
  rtl: ctx.grid.state.rtl.get(),
31
32
  scrollIntoView: ctx.grid.api.scrollIntoView,
32
33
  });
package/main.css CHANGED
@@ -160,6 +160,10 @@
160
160
  }
161
161
 
162
162
  .lng-grid {
163
+ [data-ln-has-cell-selection="true"] [data-ln-cell="true"]:focus-visible {
164
+ outline: none;
165
+ }
166
+
163
167
  [data-ln-cell="true"] {
164
168
  border-bottom: 1px solid var(--lng1771-gray-20);
165
169
  border-right: 1px solid transparent;
@@ -228,7 +232,8 @@
228
232
  inset-inline-start: 0px;
229
233
  width: 100%;
230
234
  height: 1px;
231
- background-color: var(--lng1771-gray-50);
235
+ background-color: var(--lng1771-gray-40);
236
+ z-index: 5;
232
237
  }
233
238
  }
234
239
 
@@ -241,7 +246,8 @@
241
246
  inset-inline-start: 0px;
242
247
  width: 100%;
243
248
  height: 1px;
244
- background-color: var(--lng1771-gray-50);
249
+ background-color: var(--lng1771-gray-40);
250
+ z-index: 5;
245
251
  }
246
252
  }
247
253
 
@@ -313,7 +319,25 @@
313
319
  }
314
320
  }
315
321
 
316
- [data-ln-cell-selection-rect] {
322
+ [data-ln-cell-selection-rect]:not([data-ln-cell-selection-is-unit="true"]) {
317
323
  background-color: var(--lng1771-primary-30);
324
+ box-sizing: border-box;
325
+
326
+ &[data-ln-cell-selection-border-top="true"] {
327
+ border-top: 1px solid var(--lng1771-primary-50);
328
+ }
329
+ &[data-ln-cell-selection-border-bottom="true"] {
330
+ border-bottom: 1px solid var(--lng1771-primary-50);
331
+ }
332
+ &[data-ln-cell-selection-border-start="true"] {
333
+ border-inline-start: 1px solid var(--lng1771-primary-50);
334
+ }
335
+ &[data-ln-cell-selection-border-end="true"] {
336
+ border-inline-end: 1px solid var(--lng1771-primary-50);
337
+ }
338
+ }
339
+ [data-ln-cell-selection-rect][data-ln-cell-selection-is-unit="true"] {
340
+ outline: 1px solid var(--lng1771-primary-50);
341
+ outline-offset: -1px;
318
342
  }
319
343
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@1771technologies/lytenyte-pro",
3
3
  "description": "Blazingly fast headless React data grid with 100s of features.",
4
- "version": "1.0.2",
4
+ "version": "1.0.4",
5
5
  "type": "module",
6
6
  "license": "COMMERCIAL",
7
7
  "files": [
@@ -49,12 +49,12 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@1771technologies/atom": "^1.0.2",
52
- "@1771technologies/lytenyte-core": "1.0.2",
53
- "@1771technologies/lytenyte-dom-utils": "1.0.1",
54
- "@1771technologies/lytenyte-shared": "1.0.1",
55
- "@1771technologies/lytenyte-js-utils": "1.0.1",
56
- "@1771technologies/lytenyte-react-hooks": "1.0.1",
57
- "@1771technologies/lytenyte-dragon": "1.0.1"
52
+ "@1771technologies/lytenyte-core": "1.0.4",
53
+ "@1771technologies/lytenyte-shared": "1.0.4",
54
+ "@1771technologies/lytenyte-dom-utils": "1.0.4",
55
+ "@1771technologies/lytenyte-dragon": "1.0.4",
56
+ "@1771technologies/lytenyte-js-utils": "1.0.4",
57
+ "@1771technologies/lytenyte-react-hooks": "1.0.4"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": "^18.0.0 || ^19.0.0",