@noraent/nora-datagrid 1.1.0-beta.3 → 1.1.0-beta.31

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 (131) hide show
  1. package/README.md +103 -0
  2. package/dist/App.d.ts +0 -8
  3. package/dist/DataGrid.d.ts +2 -2
  4. package/dist/buildPackage.json +92 -1
  5. package/dist/common/columns/sizing.d.ts +11 -0
  6. package/dist/common/constants/index.d.ts +2 -2
  7. package/dist/common/constants/selection.d.ts +3 -0
  8. package/dist/common/constants/utils.d.ts +15 -5
  9. package/dist/common/foundation/palette.d.ts +1 -1
  10. package/dist/common/foundation/scale/color/index.d.ts +1 -1
  11. package/dist/common/foundation/scale/index.d.ts +2 -2
  12. package/dist/common/foundation/scale/layout/index.d.ts +1 -1
  13. package/dist/common/styled/assets/components/index.d.ts +1 -1
  14. package/dist/common/styled/assets/components/loading/Loading.d.ts +1 -1
  15. package/dist/common/styled/assets/index.d.ts +1 -1
  16. package/dist/common/styled/index.d.ts +10 -10
  17. package/dist/components/GridBasicRows.d.ts +1 -1
  18. package/dist/components/NoraDataGrid.d.ts +2 -3
  19. package/dist/components/TwoDimensionalVirtualizedList.d.ts +18 -2
  20. package/dist/components/TwoDimensionalVirtualizedList.test.d.ts +1 -0
  21. package/dist/components/body/NoDataComponent.d.ts +1 -1
  22. package/dist/components/body/_styled/index.d.ts +6 -6
  23. package/dist/components/cell/CellMode.d.ts +1 -1
  24. package/dist/components/cell/Checkbox.d.ts +1 -1
  25. package/dist/components/cell/CheckboxAll.d.ts +1 -1
  26. package/dist/components/cell/_styled/index.d.ts +2 -2
  27. package/dist/components/header/VirtualHorizontalHeader.d.ts +2 -2
  28. package/dist/components/ime/IMEComponent.d.ts +1 -1
  29. package/dist/components/virtualized/_components/RenderHeader.d.ts +1 -1
  30. package/dist/components/virtualized/_components/VirtualHeader.d.ts +4 -9
  31. package/dist/components/virtualized/_hooks/useGridVirtualScroller.d.ts +1 -1
  32. package/dist/components/virtualized/_styled/index.d.ts +16 -16
  33. package/dist/components/virtualized/_styled/virtualScrollerStyled.d.ts +4 -4
  34. package/dist/components/virtualized/_utils/scrollPosition.d.ts +2 -0
  35. package/dist/hooks/dimensions/gridDimensionsApi.d.ts +4 -0
  36. package/dist/hooks/dimensions/index.d.ts +1 -0
  37. package/dist/hooks/dimensions/useGridDimensions.d.ts +3 -0
  38. package/dist/hooks/external/useGridEditing.d.ts +15 -0
  39. package/dist/hooks/external/useGridSelection.d.ts +8 -0
  40. package/dist/hooks/external/useGridSort.d.ts +7 -0
  41. package/dist/hooks/external/usePublicTest.d.ts +2 -2
  42. package/dist/hooks/index.d.ts +6 -3
  43. package/dist/hooks/internal/useCellRange.d.ts +1 -1
  44. package/dist/hooks/internal/useInternalPrivateApi.d.ts +2 -2
  45. package/dist/hooks/useGridApiContext.d.ts +1 -1
  46. package/dist/hooks/useGridApiMethod.d.ts +2 -2
  47. package/dist/hooks/useGridApiRef.d.ts +2 -2
  48. package/dist/hooks/useGridInitialization.d.ts +2 -2
  49. package/dist/hooks/useMouseEvent.d.ts +9 -8
  50. package/dist/index.d.ts +3 -3
  51. package/dist/nora_datagrid.cjs.js +7 -0
  52. package/dist/nora_datagrid.es.js +12505 -0
  53. package/dist/provider/GridApiContext.d.ts +1 -1
  54. package/dist/provider/GridStoreContent.d.ts +3 -3
  55. package/dist/provider/ThemeProvider.d.ts +4 -4
  56. package/dist/provider/gridViewPersistence.d.ts +3 -0
  57. package/dist/provider/store.d.ts +2 -2
  58. package/dist/types/classes/index.d.ts +1 -1
  59. package/dist/types/dataGridCoreProps.d.ts +39 -5
  60. package/dist/types/dataGridProps.d.ts +92 -17
  61. package/dist/types/index.d.ts +7 -9
  62. package/dist/types/license/handleVerify.d.ts +1 -1
  63. package/dist/types/license/verifyLicense.d.ts +1 -1
  64. package/dist/types/palette.d.ts +20 -2
  65. package/dist/vite.svg +1 -0
  66. package/package.json +9 -4
  67. package/dist/App.js +0 -298
  68. package/dist/DataGrid.js +0 -193
  69. package/dist/common/constants/defaultProps.js +0 -4
  70. package/dist/common/constants/index.js +0 -2
  71. package/dist/common/constants/path.js +0 -45
  72. package/dist/common/constants/useEnhancedEffect/index.js +0 -1
  73. package/dist/common/constants/useEnhancedEffect/useEnhancedEffect.js +0 -3
  74. package/dist/common/constants/useEventCallback.js +0 -12
  75. package/dist/common/constants/utils.js +0 -208
  76. package/dist/common/foundation/index.js +0 -4
  77. package/dist/common/foundation/palette.js +0 -198
  78. package/dist/common/foundation/scale/color/color.js +0 -46
  79. package/dist/common/foundation/scale/color/index.js +0 -1
  80. package/dist/common/foundation/scale/index.js +0 -2
  81. package/dist/common/foundation/scale/layout/breakpoints.js +0 -6
  82. package/dist/common/foundation/scale/layout/index.js +0 -1
  83. package/dist/common/foundation/scale/layout/size.js +0 -7
  84. package/dist/common/styled/assets/components/index.js +0 -1
  85. package/dist/common/styled/assets/components/loading/Loading.js +0 -2
  86. package/dist/common/styled/assets/index.js +0 -1
  87. package/dist/common/styled/index.js +0 -72
  88. package/dist/components/GridBasicRows.js +0 -88
  89. package/dist/components/NoraDataGrid.js +0 -191
  90. package/dist/components/TwoDimensionalVirtualizedList.js +0 -654
  91. package/dist/components/body/NoDataComponent.js +0 -25
  92. package/dist/components/body/_styled/index.js +0 -27
  93. package/dist/components/cell/CellMode.js +0 -70
  94. package/dist/components/cell/Checkbox.js +0 -48
  95. package/dist/components/cell/CheckboxAll.js +0 -47
  96. package/dist/components/cell/_styled/index.js +0 -8
  97. package/dist/components/header/VirtualHorizontalHeader.js +0 -24
  98. package/dist/components/ime/IMEComponent.js +0 -145
  99. package/dist/components/virtualized/_components/GridVirtualScroller.js +0 -19
  100. package/dist/components/virtualized/_components/RenderHeader.js +0 -7
  101. package/dist/components/virtualized/_components/VirtualHeader.js +0 -131
  102. package/dist/components/virtualized/_hooks/useGridVirtualScroller.js +0 -115
  103. package/dist/components/virtualized/_styled/index.js +0 -339
  104. package/dist/components/virtualized/_styled/virtualScrollerStyled.js +0 -20
  105. package/dist/hooks/external/usePublicTest.js +0 -125
  106. package/dist/hooks/index.js +0 -2
  107. package/dist/hooks/internal/useCellRange.js +0 -275
  108. package/dist/hooks/internal/useInternalPrivateApi.js +0 -330
  109. package/dist/hooks/useGridApiContext.js +0 -10
  110. package/dist/hooks/useGridApiMethod.js +0 -23
  111. package/dist/hooks/useGridApiRef.js +0 -6
  112. package/dist/hooks/useGridInitialization.js +0 -101
  113. package/dist/hooks/useMouseEvent.js +0 -342
  114. package/dist/index.js +0 -3
  115. package/dist/packageInfo.js +0 -2
  116. package/dist/provider/GridApiContext.js +0 -5
  117. package/dist/provider/GridStoreContent.js +0 -69
  118. package/dist/provider/ThemeProvider.js +0 -20
  119. package/dist/provider/store.js +0 -28
  120. package/dist/tsconfig.tsbuildinfo +0 -1
  121. package/dist/types/classes/index.js +0 -1
  122. package/dist/types/classes/styled.js +0 -80
  123. package/dist/types/dataGridCoreEnum.js +0 -7
  124. package/dist/types/dataGridProps.js +0 -43
  125. package/dist/types/index.js +0 -4
  126. package/dist/types/license/handleVerify.js +0 -19
  127. package/dist/types/license/licenseInfo.js +0 -39
  128. package/dist/types/license/verifyLicense.js +0 -124
  129. /package/dist/{components/virtualized/_constants/virtualHeaderConstants.js → common/columns/sizing.test.d.ts} +0 -0
  130. /package/dist/{types/dataGridCoreProps.js → common/foundation/palette.test.d.ts} +0 -0
  131. /package/dist/{types/palette.js → components/ColumnResize.test.d.ts} +0 -0
package/README.md CHANGED
@@ -48,6 +48,109 @@ feature → develop → release/x.x.x → main
48
48
 
49
49
  ## ✨ nora-data-grid v3 개요
50
50
 
51
+ ### 테마 커스텀
52
+
53
+ `createTheme`과 `ThemeProvider`로 grid 전체 폰트, header, 기본 row와 선택 row 스타일을 설정할 수 있습니다.
54
+
55
+ ```tsx
56
+ const gridTheme = createTheme({
57
+ typography: {
58
+ fontFamily: "Pretendard, sans-serif",
59
+ },
60
+ palette: {
61
+ primary: {
62
+ main: "var(--grid-primary)",
63
+ },
64
+ },
65
+ components: {
66
+ HeaderCell: {
67
+ default: {
68
+ backgroundColor: "#f8fafc",
69
+ text: { main: "#334155" },
70
+ typography: { fontSize: 13, fontWeight: 600 },
71
+ },
72
+ },
73
+ Row: {
74
+ default: {
75
+ text: { main: "#475569" },
76
+ typography: { fontSize: 14, fontWeight: 400 },
77
+ },
78
+ selected: {
79
+ background: "#eef2ff",
80
+ borderColor: "#c7d2fe",
81
+ text: { main: "#3730a3" },
82
+ },
83
+ "selected-hover": {
84
+ background: "#e0e7ff",
85
+ },
86
+ },
87
+ },
88
+ });
89
+
90
+ <ThemeProvider theme={gridTheme}>
91
+ <DataGrid {...props} />
92
+ </ThemeProvider>;
93
+ ```
94
+
95
+ `Row.selected.background`을 생략하면 `palette.primary.main`에 10% 투명도를 적용합니다. `primary.main`에는 HEX뿐 아니라 `var(--grid-primary)` 같은 CSS 색상 표현식도 사용할 수 있습니다.
96
+
97
+ ### 컬럼 크기 설정
98
+
99
+ 고정 너비와 반응형 flex 컬럼을 함께 사용할 수 있습니다. `width`, `minWidth`, `maxWidth`의 단위는 px입니다.
100
+
101
+ ```tsx
102
+ const columns = [
103
+ { fieldId: "id", fieldName: "ID", width: 100 },
104
+ { fieldId: "name", fieldName: "이름", flex: 1, minWidth: 120 },
105
+ { fieldId: "description", fieldName: "설명", flex: 2, minWidth: 160, maxWidth: 500 },
106
+ ];
107
+ ```
108
+
109
+ Grid 최초 렌더링 시 전체 폭 또는 콘텐츠에 맞추려면 `autoSizeStrategy`를 사용합니다.
110
+
111
+ ```tsx
112
+ <DataGrid
113
+ columns={columns}
114
+ dataSource={rows}
115
+ autoSizeStrategy={{ type: "fitGridWidth", defaultMinWidth: 80 }}
116
+ />
117
+
118
+ <DataGrid
119
+ columns={columns}
120
+ dataSource={rows}
121
+ autoSizeStrategy={{
122
+ type: "fitCellContents",
123
+ includeHeader: true,
124
+ scaleUpToFitGridWidth: true,
125
+ }}
126
+ />
127
+ ```
128
+
129
+ 원하는 시점에 API로 다시 계산할 수도 있습니다.
130
+
131
+ ```ts
132
+ const gridRef = useGridApiRef();
133
+
134
+ gridRef.current.sizeColumnsToFit({ defaultMinWidth: 80 });
135
+ gridRef.current.autoSizeColumns(["name", "description"], {
136
+ includeHeader: true,
137
+ scaleUpToFitGridWidth: true,
138
+ });
139
+ ```
140
+
141
+ `renderCell`이 문자열이 아닌 커스텀 UI를 반환한다면 측정에 사용할 값을 `getAutoSizeValue`로 지정할 수 있습니다.
142
+
143
+ ```ts
144
+ {
145
+ fieldId: "status",
146
+ fieldName: "상태",
147
+ renderCell: ({ value }) => <StatusChip value={value} />,
148
+ getAutoSizeValue: ({ value }) => String(value),
149
+ }
150
+ ```
151
+
152
+ 사용자가 flex 컬럼의 resize handle을 드래그하면 해당 컬럼은 고정 너비 컬럼으로 전환됩니다. `suppressSizeToFit: true`인 컬럼은 `fitGridWidth` 실행 시 현재 너비를 유지합니다.
153
+
51
154
  ## 🚀 Build Setup
52
155
 
53
156
  ### install
package/dist/App.d.ts CHANGED
@@ -1,10 +1,2 @@
1
1
  declare function App(): import("react/jsx-runtime").JSX.Element;
2
- export declare const initialItemsData: () => {
3
- id: number;
4
- columns: {
5
- id: string;
6
- width: number;
7
- content: string;
8
- }[];
9
- }[];
10
2
  export default App;
@@ -1,3 +1,3 @@
1
+ import { DataGridBasicPropsModel } from './types/dataGridProps';
1
2
  import * as React from "react";
2
- import { DataGridBasicPropsModel } from "./types/dataGridProps";
3
- export declare const DataGrid: React.NamedExoticComponent<import("./types/dataGridCoreProps").DeepOmitStartsWith<Pick<DataGridBasicPropsModel, "columns" | "dataSource">, "__"> & Partial<import("./types/dataGridProps").DataGridOptionPropsModel> & React.RefAttributes<HTMLDivElement>>;
3
+ export declare const DataGrid: React.NamedExoticComponent<import('./types/dataGridCoreProps').DeepOmitStartsWith<Pick<DataGridBasicPropsModel, "columns" | "dataSource">, "__"> & Partial<import('./types/dataGridProps').DataGridOptionPropsModel> & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,94 @@
1
1
  {
2
- "version": "배포시 버전 표시"
2
+ "name": "@noraent/nora-datagrid",
3
+ "version": "1.1.0-beta.31",
4
+ "module": "./dist/nora_datagrid.es.js",
5
+ "main": "./dist/nora_datagrid.cjs.js",
6
+ "private": false,
7
+ "files": [
8
+ "dist/"
9
+ ],
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/nora_datagrid.es.js",
14
+ "require": "./dist/nora_datagrid.cjs.js"
15
+ }
16
+ },
17
+ "type": "module",
18
+ "sideEffects": false,
19
+ "scripts": {
20
+ "start": "vite --mode on-local",
21
+ "build:local": "tsc -b && vite build --mode on-local",
22
+ "build:dev": "tsc -b && vite build --mode dev",
23
+ "build:production": "tsc -b && vite build --mode production",
24
+ "clean": "pnpm run clean:build && rimraf ./node_modules",
25
+ "clean:build": "rimraf ./dist",
26
+ "lint": "eslint .",
27
+ "preview": "vite preview",
28
+ "test": "vitest run",
29
+ "tsc-build": "tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json && npm run vite-build && npm run copy-scss",
30
+ "vite-build": "tsc -b && vite build --mode production",
31
+ "publish:npm": "rm -rf dist && mkdir dist && npm run vite-build && npm run copy-package",
32
+ "copy-package": "cp package.json dist/buildPackage.json && cp package.json lib/cjs/buildPackage.json&& cp package.json lib/esm/buildPackage.json ",
33
+ "copy-scss": "cpx \"src/**/*.scss\" lib/cjs && cpx \"src/**/*.scss\" lib/esm"
34
+ },
35
+ "dependencies": {
36
+ "@emotion/css": "^11.13.5",
37
+ "@noraent/nora-datagrid": "file:",
38
+ "jose": "^6.1.0",
39
+ "lodash": "^4.17.21",
40
+ "rimraf": "^6.0.1",
41
+ "sass-embedded": "^1.87.0"
42
+ },
43
+ "peerDependencies": {
44
+ "@emotion/react": "^11.14.0",
45
+ "@emotion/styled": "^11.14.0",
46
+ "react": "^18.0.0 || ^19.0.0",
47
+ "react-dom": "^18.0.0 || ^19.0.0"
48
+ },
49
+ "devDependencies": {
50
+ "@babel/cli": "^7.27.2",
51
+ "@babel/preset-react": "^7.27.1",
52
+ "@eslint/js": "^9.9.0",
53
+ "@mui/material": "^7.3.4",
54
+ "@mui/x-charts": "^8.27.0",
55
+ "@testing-library/react": "^16.3.3",
56
+ "@types/lodash": "^4.17.16",
57
+ "@types/node": "^22.15.14",
58
+ "@types/react": "^19.0.0",
59
+ "@types/react-dom": "^19.0.0",
60
+ "@vitejs/plugin-react": "^4.3.4",
61
+ "cpx": "^1.5.0",
62
+ "eslint": "^9.9.0",
63
+ "eslint-plugin-react-hooks": "^5.1.0-rc.0",
64
+ "eslint-plugin-react-refresh": "^0.4.9",
65
+ "flatqueue": "^3.0.0",
66
+ "globals": "^15.9.0",
67
+ "jsdom": "^26.1.0",
68
+ "react": "^19.0.0",
69
+ "react-dom": "^19.0.0",
70
+ "terser": "^5.39.0",
71
+ "typescript": "~5.8.3",
72
+ "typescript-eslint": "^8.24.1",
73
+ "vite": "^6.2.0",
74
+ "vite-plugin-dts": "^4.5.3",
75
+ "vite-plugin-svgr": "^4.3.0",
76
+ "vite-tsconfig-paths": "^5.1.4",
77
+ "vitest": "^3.2.4"
78
+ },
79
+ "peerDependenciesMeta": {
80
+ "@emotion/react": {
81
+ "optional": true
82
+ },
83
+ "@emotion/styled": {
84
+ "optional": true
85
+ }
86
+ },
87
+ "babel": {
88
+ "presets": [
89
+ "@babel/preset-env",
90
+ "@babel/preset-react"
91
+ ]
92
+ },
93
+ "packageManager": "pnpm@10.6.5+sha512.cdf928fca20832cd59ec53826492b7dc25dc524d4370b6b4adbf65803d32efaa6c1c88147c0ae4e8d579a6c9eec715757b50d4fa35eea179d868eada4ed043af"
3
94
  }
@@ -0,0 +1,11 @@
1
+ import { DataGridColumns, DataGridPrivateColumnModel, DataGridPrivateDataSourceModel, FitCellContentsOptions, FitGridWidthOptions } from '../../types/dataGridCoreProps';
2
+ export declare const CHECKBOX_COLUMN_WIDTH = 40;
3
+ export declare const GRID_SCROLLBAR_SIZE = 14;
4
+ export declare function normalizeColumnWidth(width: string | number | undefined): number;
5
+ export declare function getColumnWidth(column: Pick<DataGridPrivateColumnModel, "width" | "__computedWidth">): number;
6
+ export declare function clampColumnWidth(column: DataGridPrivateColumnModel, width: number, defaultMinWidth?: number): number;
7
+ export declare function resizeColumn(columns: DataGridColumns, columnIndex: number, requestedWidth: number): DataGridColumns;
8
+ export declare function resolveFlexColumnWidths(columns: DataGridColumns, availableWidth: number): DataGridColumns;
9
+ export declare function fitColumnsToGridWidth(columns: DataGridColumns, availableWidth: number, options?: FitGridWidthOptions): DataGridColumns;
10
+ export declare function fitColumnsToCellContents(columns: DataGridColumns, rows: DataGridPrivateDataSourceModel[], options?: FitCellContentsOptions, fieldIds?: string[], root?: HTMLElement | null, availableWidth?: number): DataGridColumns;
11
+ export declare function haveSameComputedWidths(left: DataGridColumns, right: DataGridColumns): boolean;
@@ -1,2 +1,2 @@
1
- export * from "./defaultProps";
2
- export * from "./useEventCallback";
1
+ export * from './defaultProps';
2
+ export * from './useEventCallback';
@@ -0,0 +1,3 @@
1
+ import { DataGridPrivateDataSourceModel } from '../../types/dataGridCoreProps';
2
+ export declare function getSelectionSet(selectionList: readonly string[]): ReadonlySet<string>;
3
+ export declare function filterRowsBySelection(rows: DataGridPrivateDataSourceModel[], selectionList: readonly string[]): DataGridPrivateDataSourceModel[];
@@ -1,4 +1,6 @@
1
- import React from "react";
1
+ import { default as React } from 'react';
2
+ import { DataGridDataSource } from '../../types';
3
+ import { GridSortModel } from '../../types/dataGridCoreProps';
2
4
  /**
3
5
  * 첫 마운트시 실행 되지 않습니다.
4
6
  * 업데이트시 실행하고 싶다면 사용해주세요.
@@ -31,10 +33,18 @@ export default useUpdateEffect;
31
33
  export declare function range(from: number, to: number): number[];
32
34
  export declare function adjustSaturation(hex: string, amount: number): string;
33
35
  /**
34
- * HEX 색상에 투명도(alpha) 적용
35
- * @param hex - '#RRGGBB' 형식
36
+ * 색상에 투명도(alpha) 적용
37
+ * @param color - HEX 색상 또는 CSS 색상 표현식
36
38
  * @param opacity - 0 ~ 1 (투명도)
37
- * @returns 'rgba(r,g,b,a)' 문자열
39
+ * @returns HEX는 rgba(), 그 외 CSS 색상은 color-mix() 문자열
38
40
  */
39
- export declare function alpha(hex: string, opacity: number): string;
41
+ export declare function alpha(color: string, opacity: number): string;
40
42
  export declare function deepMerge<T>(target: T, source: Partial<T>): T;
43
+ export declare function toNumberWidth(width: string | number | undefined): number;
44
+ export declare const sorting: (dataSource: DataGridDataSource, newSort: GridSortModel) => {
45
+ __ariaRowindex: number;
46
+ __dataRowindex: number;
47
+ __uuid: string;
48
+ __originalRowindex: number;
49
+ height?: number;
50
+ }[];
@@ -1,4 +1,4 @@
1
- import { ColorMode, ComponentColors, DeepRequired, GridTheme, GridThemeOptions } from "../../types/palette";
1
+ import { ColorMode, ComponentColors, DeepRequired, GridTheme, GridThemeOptions } from '../../types/palette';
2
2
  declare const lightPalette: GridTheme["palette"];
3
3
  declare const darkPalette: GridTheme["palette"];
4
4
  declare const darkCustomVars: {
@@ -1 +1 @@
1
- export * from "./color";
1
+ export * from './color';
@@ -1,2 +1,2 @@
1
- export * as layout from "./layout";
2
- export * as color from "./color";
1
+ export * as layout from './layout';
2
+ export * as color from './color';
@@ -1 +1 @@
1
- export * from "./size";
1
+ export * from './size';
@@ -1 +1 @@
1
- export * from "./loading/Loading";
1
+ export * from './loading/Loading';
@@ -1,2 +1,2 @@
1
- import Loading from "../../svg/loading/Loading.svg?react";
1
+ import { default as Loading } from '../../svg/loading/Loading.svg?react';
2
2
  export { Loading as LoadingSvg };
@@ -1 +1 @@
1
- export * from "./components";
1
+ export * from './components';
@@ -5,19 +5,19 @@
5
5
  * 가이드가 아니므로 참고용으로만 활용해 주세요.
6
6
  * 디자인 시스템을 개발할경우 색상이나 사이즈 처리 등 가이드로 사용하기에는 다소 부족한 부분이 있을 수 있습니다. 부득이하게 개발이 필요한 경우 해당부분을 고려하여 개발 해주세요.
7
7
  */
8
- export declare const StyledButton: import("@emotion/styled").StyledComponent<any, {}, {
9
- ref?: import("react").Ref<any> | undefined;
8
+ export declare const StyledButton: import('@emotion/styled').StyledComponent<any, {}, {
9
+ ref?: import('react').Ref<any> | undefined;
10
10
  }>;
11
- export declare const StyledSubTitle: import("@emotion/styled").StyledComponent<any, {}, {
12
- ref?: import("react").Ref<any> | undefined;
11
+ export declare const StyledSubTitle: import('@emotion/styled').StyledComponent<any, {}, {
12
+ ref?: import('react').Ref<any> | undefined;
13
13
  }>;
14
- export declare const StyledNoneContent: import("@emotion/styled").StyledComponent<any, {}, {
15
- ref?: import("react").Ref<any> | undefined;
14
+ export declare const StyledNoneContent: import('@emotion/styled').StyledComponent<any, {}, {
15
+ ref?: import('react').Ref<any> | undefined;
16
16
  }>;
17
- export declare const Typography: import("@emotion/styled").StyledComponent<any, {}, {
18
- ref?: import("react").Ref<any> | undefined;
17
+ export declare const Typography: import('@emotion/styled').StyledComponent<any, {}, {
18
+ ref?: import('react').Ref<any> | undefined;
19
19
  }>;
20
- export declare const Spinner: import("@emotion/styled").StyledComponent<any, {}, {
21
- ref?: import("react").Ref<any> | undefined;
20
+ export declare const Spinner: import('@emotion/styled').StyledComponent<any, {}, {
21
+ ref?: import('react').Ref<any> | undefined;
22
22
  }>;
23
23
  export declare const spin: string;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode } from 'react';
2
2
  declare function GridBasicRows(props: GridMainProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default GridBasicRows;
4
4
  interface GridMainProps {
@@ -1,6 +1,5 @@
1
- /** @jsxImportSource @emotion/react */
2
- import React, { ReactNode } from "react";
3
- import { Interpolation, Theme } from "@emotion/react";
1
+ import { default as React, ReactNode } from 'react';
2
+ import { Interpolation, Theme } from '@emotion/react';
4
3
  export declare const NoraDataGrid: React.ForwardRefExoticComponent<NoraDataGridMainProps & React.RefAttributes<HTMLDivElement>> & {
5
4
  Title: typeof NoraDataGridTitle;
6
5
  Body: React.ForwardRefExoticComponent<NoraDataGridMainProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,21 @@
1
- import React from "react";
2
- import { DataGridPrivateColumnModel, DataGridPrivateDataSourceModel } from "../types/dataGridCoreProps";
1
+ import { default as React, ReactNode } from 'react';
2
+ import { DataGridPrivateColumnModel, DataGridPrivateDataSourceModel } from '../types/dataGridCoreProps';
3
+ import { DataGridPrivateApiModel, GirdApiCommon } from '../types/dataGridProps';
3
4
  export declare const initialWindowHeight = 500;
5
+ interface VirtualListProps {
6
+ children: (props: {
7
+ visibleItems: Array<DataGridPrivateDataSourceModel>;
8
+ startColumnIndex: number;
9
+ cumulativeWidths: number[];
10
+ columnEndIndex: number;
11
+ windowSize: {
12
+ width: number;
13
+ height: number;
14
+ };
15
+ }) => ReactNode;
16
+ imeRef: React.RefObject<HTMLTextAreaElement | null>;
17
+ }
18
+ export declare const DynamicVirtualScroll: React.FC<VirtualListProps>;
4
19
  export declare const VirtualItem: React.MemoExoticComponent<({ column, row, rowIndex, }: {
5
20
  column: DataGridPrivateColumnModel;
6
21
  row: DataGridPrivateDataSourceModel;
@@ -9,6 +24,7 @@ export declare const VirtualItem: React.MemoExoticComponent<({ column, row, rowI
9
24
  export declare const TwoDimensionalVirtualizedList: React.MemoExoticComponent<({ imeRef }: {
10
25
  imeRef: React.RefObject<HTMLTextAreaElement | null>;
11
26
  }) => import("react/jsx-runtime").JSX.Element>;
27
+ export declare const computeCellClass: (gridRef: React.RefObject<GirdApiCommon<DataGridPrivateApiModel>>, fieldId: string, ariaRowindex: number) => string;
12
28
  declare const _default: React.MemoExoticComponent<React.MemoExoticComponent<({ imeRef }: {
13
29
  imeRef: React.RefObject<HTMLTextAreaElement | null>;
14
30
  }) => import("react/jsx-runtime").JSX.Element>>;
@@ -1,2 +1,2 @@
1
- declare const _default: import("react").MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
1
+ declare const _default: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
2
2
  export default _default;
@@ -1,9 +1,9 @@
1
- export declare const NoDataContent: import("@emotion/styled").StyledComponent<any, {}, {
2
- ref?: import("react").Ref<any> | undefined;
1
+ export declare const NoDataContent: import('@emotion/styled').StyledComponent<any, {}, {
2
+ ref?: import('react').Ref<any> | undefined;
3
3
  }>;
4
- export declare const NoDataTitle: import("@emotion/styled").StyledComponent<any, {}, {
5
- ref?: import("react").Ref<any> | undefined;
4
+ export declare const NoDataTitle: import('@emotion/styled').StyledComponent<any, {}, {
5
+ ref?: import('react').Ref<any> | undefined;
6
6
  }>;
7
- export declare const ErrorIconBox: import("@emotion/styled").StyledComponent<any, {}, {
8
- ref?: import("react").Ref<any> | undefined;
7
+ export declare const ErrorIconBox: import('@emotion/styled').StyledComponent<any, {}, {
8
+ ref?: import('react').Ref<any> | undefined;
9
9
  }>;
@@ -1,3 +1,3 @@
1
- import { GridCellPrams } from "../../types/dataGridCoreProps";
1
+ import { GridCellPrams } from '../../types/dataGridCoreProps';
2
2
  declare const CellMode: (props: GridCellPrams) => string | import("react/jsx-runtime").JSX.Element;
3
3
  export default CellMode;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import { default as React } from 'react';
2
2
  declare const _default: React.MemoExoticComponent<({ rowUUID, isHidden }: {
3
3
  rowUUID: string;
4
4
  isHidden: boolean;
@@ -1,3 +1,3 @@
1
- import React from "react";
1
+ import { default as React } from 'react';
2
2
  declare const _default: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- export declare const CheckboxCon: import("@emotion/styled").StyledComponent<any, {}, {
2
- ref?: import("react").Ref<any> | undefined;
1
+ export declare const CheckboxCon: import('@emotion/styled').StyledComponent<any, {}, {
2
+ ref?: import('react').Ref<any> | undefined;
3
3
  }>;
@@ -1,5 +1,5 @@
1
- import { VirtualHeaderProps } from "../virtualized/_constants/virtualHeaderConstants";
2
- declare const _default: import("react").MemoExoticComponent<(props: VirtualHeaderProps & {
1
+ import { VirtualHeaderProps } from '../virtualized/_constants/virtualHeaderConstants';
2
+ declare const _default: import('react').MemoExoticComponent<(props: VirtualHeaderProps & {
3
3
  offsetLeft: number;
4
4
  }) => import("react/jsx-runtime").JSX.Element>;
5
5
  export default _default;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import { default as React } from 'react';
2
2
  declare const _default: React.NamedExoticComponent<{
3
3
  defaultValue: string;
4
4
  } & React.RefAttributes<HTMLDivElement | HTMLTextAreaElement>>;
@@ -1,3 +1,3 @@
1
- import { DataGridColumnModelType } from "../../../types/dataGridCoreProps";
1
+ import { DataGridColumnModelType } from '../../../types/dataGridCoreProps';
2
2
  declare const RenderHeader: (props: DataGridColumnModelType) => import("react/jsx-runtime").JSX.Element;
3
3
  export default RenderHeader;
@@ -1,11 +1,6 @@
1
- import React from "react";
2
- import { VirtualHeaderProps } from "../_constants/virtualHeaderConstants";
3
- import { DataGridDataSource, GridSortModel } from "../../../types/dataGridCoreProps";
1
+ import { default as React } from 'react';
2
+ import { VirtualHeaderProps } from '../_constants/virtualHeaderConstants';
3
+ import { sorting } from '../../../common/constants/utils';
4
4
  declare const VirtualHeader: React.FC<VirtualHeaderProps>;
5
- export declare const sorting: (dataSource: DataGridDataSource, newSort: GridSortModel) => {
6
- __ariaRowindex: number;
7
- __dataRowindex: number;
8
- __uuid: string;
9
- height?: number;
10
- }[];
5
+ export { sorting };
11
6
  export default VirtualHeader;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import { default as React } from 'react';
2
2
  export declare const useGridVirtualScroller: () => {
3
3
  getRows: () => React.ReactNode[];
4
4
  getScrollerProps: () => {
@@ -1,47 +1,47 @@
1
- import React from "react";
2
- export declare const RawTableRow: import("@emotion/styled").StyledComponent<any, {}, {
1
+ import { default as React } from 'react';
2
+ export declare const RawTableRow: import('@emotion/styled').StyledComponent<any, {}, {
3
3
  ref?: React.Ref<any> | undefined;
4
4
  }>;
5
5
  export declare const TableRow: React.NamedExoticComponent<any>;
6
- export declare const Skeleton: import("@emotion/styled").StyledComponent<any, {}, {
6
+ export declare const Skeleton: import('@emotion/styled').StyledComponent<any, {}, {
7
7
  ref?: React.Ref<any> | undefined;
8
8
  }>;
9
- export declare const TableBody: import("@emotion/styled").StyledComponent<any, {}, {
9
+ export declare const TableBody: import('@emotion/styled').StyledComponent<any, {}, {
10
10
  ref?: React.Ref<any> | undefined;
11
11
  }>;
12
- export declare const TableCell: import("@emotion/styled").StyledComponent<any, {}, {
12
+ export declare const TableCell: import('@emotion/styled').StyledComponent<any, {}, {
13
13
  ref?: React.Ref<any> | undefined;
14
14
  }>;
15
- export declare const Input: import("@emotion/styled").StyledComponent<any, {}, {
15
+ export declare const Input: import('@emotion/styled').StyledComponent<any, {}, {
16
16
  ref?: React.Ref<any> | undefined;
17
17
  }>;
18
- export declare const TableHeaderRoot: import("@emotion/styled").StyledComponent<any, {}, {
18
+ export declare const TableHeaderRoot: import('@emotion/styled').StyledComponent<any, {}, {
19
19
  ref?: React.Ref<any> | undefined;
20
20
  }>;
21
- export declare const ResizeBox: import("@emotion/styled").StyledComponent<any, {}, {
21
+ export declare const ResizeBox: import('@emotion/styled').StyledComponent<any, {}, {
22
22
  ref?: React.Ref<any> | undefined;
23
23
  }>;
24
- export declare const RightScrollBar: import("@emotion/styled").StyledComponent<any, {}, {
24
+ export declare const RightScrollBar: import('@emotion/styled').StyledComponent<any, {}, {
25
25
  ref?: React.Ref<any> | undefined;
26
26
  }>;
27
- export declare const BottomScrollBar: import("@emotion/styled").StyledComponent<any, {}, {
27
+ export declare const BottomScrollBar: import('@emotion/styled').StyledComponent<any, {}, {
28
28
  ref?: React.Ref<any> | undefined;
29
29
  }>;
30
- export declare const HeaderStyled: import("@emotion/styled").StyledComponent<any, {}, {
30
+ export declare const HeaderStyled: import('@emotion/styled').StyledComponent<any, {}, {
31
31
  ref?: React.Ref<any> | undefined;
32
32
  }>;
33
- export declare const SortContentStyled: import("@emotion/styled").StyledComponent<any, {}, {
33
+ export declare const SortContentStyled: import('@emotion/styled').StyledComponent<any, {}, {
34
34
  ref?: React.Ref<any> | undefined;
35
35
  }>;
36
- export declare const SortButton: import("@emotion/styled").StyledComponent<any, {}, {
36
+ export declare const SortButton: import('@emotion/styled').StyledComponent<any, {}, {
37
37
  ref?: React.Ref<any> | undefined;
38
38
  }>;
39
- export declare const NoraDataGridStyled: import("@emotion/styled").StyledComponent<any, {}, {
39
+ export declare const NoraDataGridStyled: import('@emotion/styled').StyledComponent<any, {}, {
40
40
  ref?: React.Ref<any> | undefined;
41
41
  }>;
42
- export declare const NoraDataGridBodyStyled: import("@emotion/styled").StyledComponent<any, {}, {
42
+ export declare const NoraDataGridBodyStyled: import('@emotion/styled').StyledComponent<any, {}, {
43
43
  ref?: React.Ref<any> | undefined;
44
44
  }>;
45
- export declare const WatermarStyled: import("@emotion/styled").StyledComponent<any, {}, {
45
+ export declare const WatermarStyled: import('@emotion/styled').StyledComponent<any, {}, {
46
46
  ref?: React.Ref<any> | undefined;
47
47
  }>;
@@ -1,6 +1,6 @@
1
- export declare const Scroller: import("@emotion/styled").StyledComponent<any, {}, {
2
- ref?: import("react").Ref<any> | undefined;
1
+ export declare const Scroller: import('@emotion/styled').StyledComponent<any, {}, {
2
+ ref?: import('react').Ref<any> | undefined;
3
3
  }>;
4
- export declare const RenderZone: import("@emotion/styled").StyledComponent<any, {}, {
5
- ref?: import("react").Ref<any> | undefined;
4
+ export declare const RenderZone: import('@emotion/styled').StyledComponent<any, {}, {
5
+ ref?: import('react').Ref<any> | undefined;
6
6
  }>;
@@ -0,0 +1,2 @@
1
+ export declare const clampScrollOffset: (value: number, max: number) => number;
2
+ export declare const mapScrollOffset: (value: number, sourceMax: number, targetMax: number) => number;
@@ -0,0 +1,4 @@
1
+ export interface GridDimensions {
2
+ rowWidth: number;
3
+ rowHeight: number;
4
+ }
@@ -0,0 +1 @@
1
+ export type { GridDimensions } from './gridDimensionsApi';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { DataGridPrivateApi, GirdApiCommon } from '../../types/dataGridProps';
3
+ export declare function useGridDimensions(apiRef: React.RefObject<GirdApiCommon<DataGridPrivateApi>>): void;
@@ -0,0 +1,15 @@
1
+ export declare function useGridEditing(): {
2
+ cellFocus: {
3
+ id: number;
4
+ field: string;
5
+ } | null;
6
+ currentEditingCell: {
7
+ [rowId: number]: {
8
+ rowId: number;
9
+ field: string;
10
+ };
11
+ };
12
+ startEdit: (rowId: number, fieldId: string) => void;
13
+ stopEdit: (rowId?: number, fieldId?: string) => void;
14
+ updateCellValue: (rowId: number, fieldId: string, value: any) => void;
15
+ };
@@ -0,0 +1,8 @@
1
+ export declare function useGridSelection(): {
2
+ selectionList: string[];
3
+ selectionMode: "multiple" | "single";
4
+ setSelectionList: (nextSelectionList: string[]) => void;
5
+ clearSelection: () => void;
6
+ toggleRow: (rowUUID: string) => string[];
7
+ emitSelectionChange: (nextRows: any[], prevRows: any[]) => void;
8
+ };
@@ -0,0 +1,7 @@
1
+ import { GridSortModel } from '../../types/dataGridCoreProps';
2
+ export declare function useGridSort(): {
3
+ sortModel: GridSortModel;
4
+ setSortModel: (nextSortModel: GridSortModel) => void;
5
+ toggleSort: (fieldId: string) => GridSortModel;
6
+ clearSort: () => void;
7
+ };