@noraent/nora-datagrid 0.0.78 → 0.0.80

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 (195) hide show
  1. package/lib/cjs/buildPackage.json +2 -2
  2. package/lib/esm/buildPackage.json +2 -2
  3. package/package.json +2 -2
  4. package/lib/cjs/App.d.ts +0 -10
  5. package/lib/cjs/App.js +0 -198
  6. package/lib/cjs/DataGrid.d.ts +0 -4
  7. package/lib/cjs/DataGrid.js +0 -61
  8. package/lib/cjs/common/constants/defaultProps.d.ts +0 -4
  9. package/lib/cjs/common/constants/defaultProps.js +0 -4
  10. package/lib/cjs/common/constants/index.d.ts +0 -2
  11. package/lib/cjs/common/constants/index.js +0 -2
  12. package/lib/cjs/common/constants/path.d.ts +0 -31
  13. package/lib/cjs/common/constants/path.js +0 -41
  14. package/lib/cjs/common/constants/useEnhancedEffect/index.d.ts +0 -1
  15. package/lib/cjs/common/constants/useEnhancedEffect/index.js +0 -1
  16. package/lib/cjs/common/constants/useEnhancedEffect/useEnhancedEffect.d.ts +0 -3
  17. package/lib/cjs/common/constants/useEnhancedEffect/useEnhancedEffect.js +0 -3
  18. package/lib/cjs/common/constants/useEventCallback.d.ts +0 -3
  19. package/lib/cjs/common/constants/useEventCallback.js +0 -10
  20. package/lib/cjs/common/constants/utils.d.ts +0 -5
  21. package/lib/cjs/common/constants/utils.js +0 -32
  22. package/lib/cjs/common/foundation/index.d.ts +0 -4
  23. package/lib/cjs/common/foundation/index.js +0 -4
  24. package/lib/cjs/common/foundation/scale/color/color.d.ts +0 -44
  25. package/lib/cjs/common/foundation/scale/color/color.js +0 -44
  26. package/lib/cjs/common/foundation/scale/color/index.d.ts +0 -1
  27. package/lib/cjs/common/foundation/scale/color/index.js +0 -1
  28. package/lib/cjs/common/foundation/scale/index.d.ts +0 -2
  29. package/lib/cjs/common/foundation/scale/index.js +0 -2
  30. package/lib/cjs/common/foundation/scale/layout/breakpoints.d.ts +0 -4
  31. package/lib/cjs/common/foundation/scale/layout/breakpoints.js +0 -4
  32. package/lib/cjs/common/foundation/scale/layout/index.d.ts +0 -1
  33. package/lib/cjs/common/foundation/scale/layout/index.js +0 -1
  34. package/lib/cjs/common/foundation/scale/layout/size.d.ts +0 -6
  35. package/lib/cjs/common/foundation/scale/layout/size.js +0 -7
  36. package/lib/cjs/common/styled/assets/components/index.d.ts +0 -1
  37. package/lib/cjs/common/styled/assets/components/index.js +0 -1
  38. package/lib/cjs/common/styled/assets/components/loading/Loading.d.ts +0 -2
  39. package/lib/cjs/common/styled/assets/components/loading/Loading.js +0 -2
  40. package/lib/cjs/common/styled/assets/index.d.ts +0 -1
  41. package/lib/cjs/common/styled/assets/index.js +0 -1
  42. package/lib/cjs/common/styled/index.d.ts +0 -39
  43. package/lib/cjs/common/styled/index.js +0 -67
  44. package/lib/cjs/components/GridBasicRows.d.ts +0 -6
  45. package/lib/cjs/components/GridBasicRows.js +0 -88
  46. package/lib/cjs/components/NoraDataGrid.d.ts +0 -12
  47. package/lib/cjs/components/NoraDataGrid.js +0 -49
  48. package/lib/cjs/components/TwoDimensionalVirtualizedList.d.ts +0 -5
  49. package/lib/cjs/components/TwoDimensionalVirtualizedList.js +0 -539
  50. package/lib/cjs/components/body/NoDataComponent.d.ts +0 -2
  51. package/lib/cjs/components/body/NoDataComponent.js +0 -17
  52. package/lib/cjs/components/body/_styled/index.d.ts +0 -12
  53. package/lib/cjs/components/body/_styled/index.js +0 -26
  54. package/lib/cjs/components/cell/CellMode.d.ts +0 -4
  55. package/lib/cjs/components/cell/CellMode.js +0 -40
  56. package/lib/cjs/components/header/VirtualHorizontalHeader.d.ts +0 -5
  57. package/lib/cjs/components/header/VirtualHorizontalHeader.js +0 -13
  58. package/lib/cjs/components/ime/IMEComponent.d.ts +0 -5
  59. package/lib/cjs/components/ime/IMEComponent.js +0 -110
  60. package/lib/cjs/components/virtualized/_components/VirtualHeader.d.ts +0 -4
  61. package/lib/cjs/components/virtualized/_components/VirtualHeader.js +0 -25
  62. package/lib/cjs/components/virtualized/_constants/virtualHeaderConstants.d.ts +0 -9
  63. package/lib/cjs/components/virtualized/_constants/virtualHeaderConstants.js +0 -1
  64. package/lib/cjs/components/virtualized/_styled/index.d.ts +0 -34
  65. package/lib/cjs/components/virtualized/_styled/index.js +0 -108
  66. package/lib/cjs/hooks/external/usePublicTest.d.ts +0 -3
  67. package/lib/cjs/hooks/external/usePublicTest.js +0 -37
  68. package/lib/cjs/hooks/internal/useCellRange.d.ts +0 -8
  69. package/lib/cjs/hooks/internal/useCellRange.js +0 -118
  70. package/lib/cjs/hooks/internal/useInternalPrivateApi.d.ts +0 -3
  71. package/lib/cjs/hooks/internal/useInternalPrivateApi.js +0 -157
  72. package/lib/cjs/hooks/useGridApiContext.d.ts +0 -4
  73. package/lib/cjs/hooks/useGridApiContext.js +0 -10
  74. package/lib/cjs/hooks/useGridApiMethod.d.ts +0 -3
  75. package/lib/cjs/hooks/useGridApiMethod.js +0 -13
  76. package/lib/cjs/hooks/useGridApiRef.d.ts +0 -3
  77. package/lib/cjs/hooks/useGridApiRef.js +0 -2
  78. package/lib/cjs/hooks/useGridInitialization.d.ts +0 -4
  79. package/lib/cjs/hooks/useGridInitialization.js +0 -63
  80. package/lib/cjs/index.d.ts +0 -4
  81. package/lib/cjs/index.js +0 -2
  82. package/lib/cjs/main.d.ts +0 -0
  83. package/lib/cjs/main.js +0 -9
  84. package/lib/cjs/packageInfo.d.ts +0 -3
  85. package/lib/cjs/packageInfo.js +0 -2
  86. package/lib/cjs/provider/GridApiContext.d.ts +0 -2
  87. package/lib/cjs/provider/GridApiContext.js +0 -5
  88. package/lib/cjs/provider/GridStoreContent.d.ts +0 -10
  89. package/lib/cjs/provider/GridStoreContent.js +0 -99
  90. package/lib/cjs/types/classes/index.d.ts +0 -1
  91. package/lib/cjs/types/classes/index.js +0 -1
  92. package/lib/cjs/types/classes/styled.d.ts +0 -52
  93. package/lib/cjs/types/classes/styled.js +0 -53
  94. package/lib/cjs/types/dataGridCoreEnum.d.ts +0 -6
  95. package/lib/cjs/types/dataGridCoreEnum.js +0 -7
  96. package/lib/cjs/types/dataGridCoreProps.d.ts +0 -51
  97. package/lib/cjs/types/dataGridCoreProps.js +0 -1
  98. package/lib/cjs/types/dataGridProps.d.ts +0 -70
  99. package/lib/cjs/types/dataGridProps.js +0 -52
  100. package/lib/esm/App.d.ts +0 -10
  101. package/lib/esm/App.js +0 -198
  102. package/lib/esm/DataGrid.d.ts +0 -4
  103. package/lib/esm/DataGrid.js +0 -61
  104. package/lib/esm/common/constants/defaultProps.d.ts +0 -4
  105. package/lib/esm/common/constants/defaultProps.js +0 -4
  106. package/lib/esm/common/constants/index.d.ts +0 -2
  107. package/lib/esm/common/constants/index.js +0 -2
  108. package/lib/esm/common/constants/path.d.ts +0 -31
  109. package/lib/esm/common/constants/path.js +0 -41
  110. package/lib/esm/common/constants/useEnhancedEffect/index.d.ts +0 -1
  111. package/lib/esm/common/constants/useEnhancedEffect/index.js +0 -1
  112. package/lib/esm/common/constants/useEnhancedEffect/useEnhancedEffect.d.ts +0 -3
  113. package/lib/esm/common/constants/useEnhancedEffect/useEnhancedEffect.js +0 -3
  114. package/lib/esm/common/constants/useEventCallback.d.ts +0 -3
  115. package/lib/esm/common/constants/useEventCallback.js +0 -10
  116. package/lib/esm/common/constants/utils.d.ts +0 -5
  117. package/lib/esm/common/constants/utils.js +0 -32
  118. package/lib/esm/common/foundation/index.d.ts +0 -4
  119. package/lib/esm/common/foundation/index.js +0 -4
  120. package/lib/esm/common/foundation/scale/color/color.d.ts +0 -44
  121. package/lib/esm/common/foundation/scale/color/color.js +0 -44
  122. package/lib/esm/common/foundation/scale/color/index.d.ts +0 -1
  123. package/lib/esm/common/foundation/scale/color/index.js +0 -1
  124. package/lib/esm/common/foundation/scale/index.d.ts +0 -2
  125. package/lib/esm/common/foundation/scale/index.js +0 -2
  126. package/lib/esm/common/foundation/scale/layout/breakpoints.d.ts +0 -4
  127. package/lib/esm/common/foundation/scale/layout/breakpoints.js +0 -4
  128. package/lib/esm/common/foundation/scale/layout/index.d.ts +0 -1
  129. package/lib/esm/common/foundation/scale/layout/index.js +0 -1
  130. package/lib/esm/common/foundation/scale/layout/size.d.ts +0 -6
  131. package/lib/esm/common/foundation/scale/layout/size.js +0 -7
  132. package/lib/esm/common/styled/assets/components/index.d.ts +0 -1
  133. package/lib/esm/common/styled/assets/components/index.js +0 -1
  134. package/lib/esm/common/styled/assets/components/loading/Loading.d.ts +0 -2
  135. package/lib/esm/common/styled/assets/components/loading/Loading.js +0 -2
  136. package/lib/esm/common/styled/assets/index.d.ts +0 -1
  137. package/lib/esm/common/styled/assets/index.js +0 -1
  138. package/lib/esm/common/styled/index.d.ts +0 -39
  139. package/lib/esm/common/styled/index.js +0 -67
  140. package/lib/esm/components/GridBasicRows.d.ts +0 -6
  141. package/lib/esm/components/GridBasicRows.js +0 -88
  142. package/lib/esm/components/NoraDataGrid.d.ts +0 -12
  143. package/lib/esm/components/NoraDataGrid.js +0 -49
  144. package/lib/esm/components/TwoDimensionalVirtualizedList.d.ts +0 -5
  145. package/lib/esm/components/TwoDimensionalVirtualizedList.js +0 -539
  146. package/lib/esm/components/body/NoDataComponent.d.ts +0 -2
  147. package/lib/esm/components/body/NoDataComponent.js +0 -17
  148. package/lib/esm/components/body/_styled/index.d.ts +0 -12
  149. package/lib/esm/components/body/_styled/index.js +0 -26
  150. package/lib/esm/components/cell/CellMode.d.ts +0 -4
  151. package/lib/esm/components/cell/CellMode.js +0 -40
  152. package/lib/esm/components/header/VirtualHorizontalHeader.d.ts +0 -5
  153. package/lib/esm/components/header/VirtualHorizontalHeader.js +0 -13
  154. package/lib/esm/components/ime/IMEComponent.d.ts +0 -5
  155. package/lib/esm/components/ime/IMEComponent.js +0 -110
  156. package/lib/esm/components/virtualized/_components/VirtualHeader.d.ts +0 -4
  157. package/lib/esm/components/virtualized/_components/VirtualHeader.js +0 -25
  158. package/lib/esm/components/virtualized/_constants/virtualHeaderConstants.d.ts +0 -9
  159. package/lib/esm/components/virtualized/_constants/virtualHeaderConstants.js +0 -1
  160. package/lib/esm/components/virtualized/_styled/index.d.ts +0 -34
  161. package/lib/esm/components/virtualized/_styled/index.js +0 -108
  162. package/lib/esm/hooks/external/usePublicTest.d.ts +0 -3
  163. package/lib/esm/hooks/external/usePublicTest.js +0 -37
  164. package/lib/esm/hooks/internal/useCellRange.d.ts +0 -8
  165. package/lib/esm/hooks/internal/useCellRange.js +0 -118
  166. package/lib/esm/hooks/internal/useInternalPrivateApi.d.ts +0 -3
  167. package/lib/esm/hooks/internal/useInternalPrivateApi.js +0 -157
  168. package/lib/esm/hooks/useGridApiContext.d.ts +0 -4
  169. package/lib/esm/hooks/useGridApiContext.js +0 -10
  170. package/lib/esm/hooks/useGridApiMethod.d.ts +0 -3
  171. package/lib/esm/hooks/useGridApiMethod.js +0 -13
  172. package/lib/esm/hooks/useGridApiRef.d.ts +0 -3
  173. package/lib/esm/hooks/useGridApiRef.js +0 -2
  174. package/lib/esm/hooks/useGridInitialization.d.ts +0 -4
  175. package/lib/esm/hooks/useGridInitialization.js +0 -63
  176. package/lib/esm/index.d.ts +0 -4
  177. package/lib/esm/index.js +0 -2
  178. package/lib/esm/main.d.ts +0 -1
  179. package/lib/esm/main.js +0 -8
  180. package/lib/esm/packageInfo.d.ts +0 -3
  181. package/lib/esm/packageInfo.js +0 -2
  182. package/lib/esm/provider/GridApiContext.d.ts +0 -2
  183. package/lib/esm/provider/GridApiContext.js +0 -5
  184. package/lib/esm/provider/GridStoreContent.d.ts +0 -10
  185. package/lib/esm/provider/GridStoreContent.js +0 -99
  186. package/lib/esm/types/classes/index.d.ts +0 -1
  187. package/lib/esm/types/classes/index.js +0 -1
  188. package/lib/esm/types/classes/styled.d.ts +0 -52
  189. package/lib/esm/types/classes/styled.js +0 -53
  190. package/lib/esm/types/dataGridCoreEnum.d.ts +0 -6
  191. package/lib/esm/types/dataGridCoreEnum.js +0 -7
  192. package/lib/esm/types/dataGridCoreProps.d.ts +0 -51
  193. package/lib/esm/types/dataGridCoreProps.js +0 -1
  194. package/lib/esm/types/dataGridProps.d.ts +0 -70
  195. package/lib/esm/types/dataGridProps.js +0 -52
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noraent/nora-datagrid",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "module": "./lib/esm/index.js",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "private": false,
@@ -19,7 +19,7 @@
19
19
  "lint": "eslint .",
20
20
  "preview": "vite preview",
21
21
  "test": "jest",
22
- "tsc-build": "tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json && npm run vite-build && npm run copy-scss",
22
+ "tsc-build": "npm run vite-build && npm run copy-scss",
23
23
  "vite-build": "tsc -b && vite build --mode production",
24
24
  "publish:npm": "rm -rf dist && mkdir dist && npm run vite-build && npm run copy-package",
25
25
  "copy-package": "cp package.json dist/buildPackage.json && cp package.json lib/cjs/buildPackage.json&& cp package.json lib/esm/buildPackage.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noraent/nora-datagrid",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "module": "./lib/esm/index.js",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "private": false,
@@ -19,7 +19,7 @@
19
19
  "lint": "eslint .",
20
20
  "preview": "vite preview",
21
21
  "test": "jest",
22
- "tsc-build": "tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json && npm run vite-build && npm run copy-scss",
22
+ "tsc-build": "npm run vite-build && npm run copy-scss",
23
23
  "vite-build": "tsc -b && vite build --mode production",
24
24
  "publish:npm": "rm -rf dist && mkdir dist && npm run vite-build && npm run copy-package",
25
25
  "copy-package": "cp package.json dist/buildPackage.json && cp package.json lib/cjs/buildPackage.json&& cp package.json lib/esm/buildPackage.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noraent/nora-datagrid",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "module": "./lib/esm/index.js",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "private": false,
@@ -19,7 +19,7 @@
19
19
  "lint": "eslint .",
20
20
  "preview": "vite preview",
21
21
  "test": "jest",
22
- "tsc-build": "tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json && npm run vite-build && npm run copy-scss",
22
+ "tsc-build": "npm run vite-build && npm run copy-scss",
23
23
  "vite-build": "tsc -b && vite build --mode production",
24
24
  "publish:npm": "rm -rf dist && mkdir dist && npm run vite-build && npm run copy-package",
25
25
  "copy-package": "cp package.json dist/buildPackage.json && cp package.json lib/cjs/buildPackage.json&& cp package.json lib/esm/buildPackage.json",
package/lib/cjs/App.d.ts DELETED
@@ -1,10 +0,0 @@
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
- export default App;
package/lib/cjs/App.js DELETED
@@ -1,198 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
- import { useEffect, useState } from "react";
12
- import { DataGrid } from "./DataGrid";
13
- import { useGridApiRef } from "./hooks/useGridApiRef";
14
- const RenderCell = (params) => {
15
- useEffect(() => {
16
- const tt = () => __awaiter(void 0, void 0, void 0, function* () {
17
- let tt = 0;
18
- for (let i = 0; i < 1; i++) {
19
- tt += 233300 * i;
20
- }
21
- Array.from({ length: 1 }, (_, i) => {
22
- return {
23
- id: i,
24
- code: `${tt} -test-${i}`,
25
- name: `name-${i} `,
26
- note: `note-${i}`,
27
- date: new Date(),
28
- currency4: `test-${i}`,
29
- };
30
- });
31
- });
32
- requestIdleCallback(() => {
33
- tt();
34
- });
35
- }, []);
36
- return (_jsxs("div", { style: { background: "green" }, children: [_jsx("button", { onClick: () => {
37
- params.gridRef.current.setRowHeight(1, 100);
38
- }, children: "??" }), params.value] }));
39
- };
40
- const RenderEditCell = (params) => {
41
- return (_jsx(_Fragment, { children: _jsx("input", Object.assign({}, params, { style: { background: "yellow" } })) }));
42
- };
43
- const columns = [
44
- {
45
- fieldId: "code",
46
- fieldName: "코드",
47
- },
48
- {
49
- fieldId: "name",
50
- fieldName: "이름",
51
- width: 120,
52
- renderCell: RenderCell,
53
- renderEditCell: RenderEditCell,
54
- },
55
- {
56
- fieldId: "currency",
57
- fieldName: "성명",
58
- width: 120,
59
- renderCell: RenderCell,
60
- renderEditCell: RenderEditCell,
61
- },
62
- {
63
- fieldId: "currency4",
64
- fieldName: "국가",
65
- width: "120",
66
- },
67
- {
68
- fieldId: "currency5",
69
- fieldName: "구매링크",
70
- width: "120",
71
- },
72
- {
73
- fieldId: "currency6",
74
- fieldName: "카드",
75
- width: "130",
76
- },
77
- {
78
- fieldId: "currency7",
79
- fieldName: "카드번호",
80
- width: "120",
81
- },
82
- {
83
- fieldId: "currency8",
84
- fieldName: "currency8",
85
- width: "140",
86
- },
87
- {
88
- fieldId: "currency9",
89
- fieldName: "currency9",
90
- width: "120",
91
- },
92
- {
93
- fieldId: "currency10",
94
- fieldName: "currency10",
95
- width: "130",
96
- },
97
- {
98
- fieldId: "currency11",
99
- fieldName: "currency11",
100
- width: "120",
101
- },
102
- {
103
- fieldId: "currency12",
104
- fieldName: "currency12",
105
- width: "120",
106
- },
107
- {
108
- fieldId: "currency13",
109
- fieldName: "Currency13",
110
- width: "120",
111
- },
112
- {
113
- fieldId: "currency14",
114
- fieldName: "currency14",
115
- width: "120",
116
- },
117
- {
118
- fieldId: "currency15",
119
- fieldName: "currency15",
120
- width: "120",
121
- },
122
- {
123
- fieldId: "currency16",
124
- fieldName: "Currency16",
125
- width: "120",
126
- },
127
- {
128
- fieldId: "currency17",
129
- fieldName: "currency17",
130
- width: "120",
131
- },
132
- {
133
- fieldId: "currency18",
134
- fieldName: "currency18",
135
- width: "120",
136
- },
137
- {
138
- fieldId: "currency19",
139
- fieldName: "currency19",
140
- width: "120",
141
- },
142
- {
143
- fieldId: "currency19",
144
- fieldName: "Currency19",
145
- width: "120",
146
- },
147
- {
148
- fieldId: "currency20",
149
- fieldName: "currency20",
150
- width: "120",
151
- },
152
- {
153
- fieldId: "currency21",
154
- fieldName: "currency21",
155
- width: "120",
156
- },
157
- ];
158
- function App() {
159
- const ref = useGridApiRef();
160
- const [dataSource, setDataSource] = useState([]);
161
- const handleDataSource = () => {
162
- const data = Array.from({ length: 1000 }, (_, i) => {
163
- return {
164
- id: i,
165
- code: `test-${i}`,
166
- name: `name-${i}`,
167
- note: `note-${i}`,
168
- date: new Date(),
169
- currency4: `test=${i}`,
170
- };
171
- });
172
- requestIdleCallback(() => {
173
- setDataSource(data);
174
- });
175
- };
176
- useEffect(() => {
177
- handleDataSource();
178
- }, []);
179
- return (_jsxs(_Fragment, { children: [_jsx("button", { onClick: () => {
180
- ref.current.scrollToRowIndex(414);
181
- }, children: "414 \uC774\uB3D9" }), _jsx("button", { onClick: () => {
182
- ref.current.scrollToRowIndex(1000000);
183
- }, children: "1000000 \uC774\uB3D9" }), _jsx("button", { onClick: () => {
184
- handleDataSource();
185
- }, children: "\uB370\uC774\uD130 set" }), _jsx("button", { onClick: () => {
186
- }, children: "\uD558" }), _jsx("div", { style: { width: "1200px", height: "600px" }, children: _jsx(DataGrid, { gridRef: ref, columns: columns, dataSource: dataSource }) }), _jsx("button", { children: "dd" })] }));
187
- }
188
- export const initialItemsData = () => Array.from({ length: 10 }, (_, i) => {
189
- return {
190
- id: i,
191
- columns: Array.from({ length: 20 }, (_, j) => ({
192
- id: `${i}-${j}`,
193
- width: 150,
194
- content: `Cell ${i}-${j}-`,
195
- })),
196
- };
197
- });
198
- export default App;
@@ -1,4 +0,0 @@
1
- import * as React from "react";
2
- import { DataGridBasicPropsModel } from "./types/dataGridProps";
3
- import "./app.scss";
4
- export declare const DataGrid: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("./types/dataGridCoreProps").DeepOmitStartsWith<Pick<DataGridBasicPropsModel, "columns" | "dataSource">, "__"> & Partial<import("./types/dataGridProps").DataGridOptionPropsModel> & React.RefAttributes<HTMLDivElement>>>;
@@ -1,61 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { useGridInitialization } from "./hooks/useGridInitialization";
4
- import { GridApiContext } from "./provider/GridApiContext";
5
- import { NoraDataGrid } from "./components/NoraDataGrid";
6
- import "./app.scss";
7
- import { TwoDimensionalVirtualizedList } from "./components/TwoDimensionalVirtualizedList";
8
- import { GridStoreContentProvider } from "./provider/GridStoreContent";
9
- import useUpdateEffect from "./common/constants/utils";
10
- import { packageJsonExpr } from "./packageInfo";
11
- import { Spinner, StyledNoneContent, Typography } from "./common/styled";
12
- console.info(`%c
13
- ███╗ ██╗ ██████╗ ██████╗ █████╗
14
- ████╗ ██║██╔═══██╗██╔══██╗██╔══██╗
15
- ██╔██╗ ██║██║ ██║██████╔╝███████║
16
- ██║╚██╗██║██║ ██║██╔══██╗██╔══██║
17
- ██║ ╚████║╚██████╔╝██║ ██║██║ ██║
18
- ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
19
-
20
- ██████╗ █████╗ ████████╗ █████╗ ██████╗ ██████╗ ██╗██████╗
21
- ██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗ ██╔════╝ ██╔══██╗██║██╔══██╗
22
- ██║ ██║███████║ ██║ ███████║█████╗██║ ███╗██████╔╝██║██║ ██║
23
- ██║ ██║██╔══██║ ██║ ██╔══██║╚════╝██║ ██║██╔══██╗██║██║ ██║
24
- ██████╔╝██║ ██║ ██║ ██║ ██║ ╚██████╔╝██║ ██║██║██████╔╝
25
- ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═════╝ Beta3(v${packageJsonExpr.version})
26
- `, "color:#22577A");
27
- const DataGridMaster = React.forwardRef((props, _ref) => {
28
- const { gridRef } = props;
29
- const apiRef = useGridInitialization(gridRef, props);
30
- const containerRef = React.useRef(null);
31
- const [isPending, startTransition] = React.useTransition();
32
- React.useEffect(() => {
33
- startTransition(() => {
34
- apiRef.current.setGridContainer(containerRef);
35
- apiRef.current.setInitialStore(props);
36
- apiRef.current.initHeightCache();
37
- });
38
- }, []);
39
- const prevProps = React.useRef(null);
40
- useUpdateEffect(() => {
41
- startTransition(() => {
42
- if (prevProps.current) {
43
- Object.keys(props).forEach((key) => {
44
- var _a;
45
- const typedKey = key;
46
- if (prevProps.current && ((_a = prevProps.current) === null || _a === void 0 ? void 0 : _a[typedKey]) !== props[typedKey]) {
47
- const basicStore = apiRef.current.setBasicStore(props);
48
- apiRef.current.store.original[typedKey] = basicStore[typedKey];
49
- apiRef.current.store.state[typedKey] = basicStore[typedKey];
50
- if (key === "dataSource") {
51
- apiRef.current.initHeightCache();
52
- }
53
- }
54
- });
55
- }
56
- prevProps.current = props;
57
- });
58
- }, [props]);
59
- return (_jsx(_Fragment, { children: _jsx(GridApiContext.Provider, { value: apiRef, children: _jsx(GridStoreContentProvider, { value: apiRef, children: _jsxs(NoraDataGrid, { ref: containerRef, children: [_jsx(NoraDataGrid.Title, {}), _jsxs(NoraDataGrid.Body, { children: [isPending && (_jsxs(StyledNoneContent, { children: [_jsx(Spinner, {}), _jsx(Typography, { style: { marginTop: "8px", fontSize: "14px" }, children: "\uB85C\uB529\uC911" })] })), !isPending && apiRef.current.store && _jsx(TwoDimensionalVirtualizedList, {})] })] }) }) }) }));
60
- });
61
- export const DataGrid = React.memo(DataGridMaster);
@@ -1,4 +0,0 @@
1
- export declare const defaultProps: {
2
- height: number;
3
- width: number;
4
- };
@@ -1,4 +0,0 @@
1
- export const defaultProps = {
2
- height: 32,
3
- width: 20,
4
- };
@@ -1,2 +0,0 @@
1
- export * from "./defaultProps";
2
- export * from "./useEventCallback";
@@ -1,2 +0,0 @@
1
- export * from "./defaultProps";
2
- export * from "./useEventCallback";
@@ -1,31 +0,0 @@
1
- export declare const GUIDE_PATH: {
2
- path: string;
3
- GUIDE: {
4
- path: string;
5
- GETTING_STARTED: {
6
- pathname: string;
7
- path: string;
8
- };
9
- VALIDATION: {
10
- pathname: string;
11
- path: string;
12
- icon: string;
13
- REACT_HOOK_FORM_VALIDATION: {
14
- pathname: string;
15
- path: string;
16
- };
17
- REACT_HOOK_FORM_AND_ZOD_VALIDATION: {
18
- pathname: string;
19
- path: string;
20
- };
21
- };
22
- };
23
- };
24
- export declare const buildGuidePath: (...paths: string[]) => string;
25
- export declare const buildFullPath: (path: string) => string;
26
- export interface PathNode {
27
- path: string;
28
- pathname?: string;
29
- icon?: string;
30
- [key: string]: PathNode | string | undefined;
31
- }
@@ -1,41 +0,0 @@
1
- export const GUIDE_PATH = {
2
- path: "/",
3
- GUIDE: {
4
- path: "guide",
5
- GETTING_STARTED: {
6
- pathname: "시작하기",
7
- path: "getting-started",
8
- },
9
- VALIDATION: {
10
- pathname: "유요성 검증 가이드",
11
- path: "validation",
12
- icon: "🚀",
13
- REACT_HOOK_FORM_VALIDATION: {
14
- pathname: "react-hook-form을 통한 유효성 검증",
15
- path: "react-hook-form",
16
- },
17
- REACT_HOOK_FORM_AND_ZOD_VALIDATION: {
18
- pathname: "ZOD를 통한 유효성 검증",
19
- path: "zod",
20
- },
21
- },
22
- },
23
- };
24
- export const buildGuidePath = (...paths) => `/${paths.join("/")}`;
25
- export const buildFullPath = (path) => {
26
- const tracePath = (target, currentPath = "") => {
27
- for (const key in target) {
28
- if (target[key] && typeof target[key] === "object") {
29
- const newPath = currentPath ? `${currentPath}/${target[key].path}` : target[key].path;
30
- if (target[key].path === path) {
31
- return newPath;
32
- }
33
- const nestedPath = tracePath(target[key], newPath);
34
- if (nestedPath)
35
- return nestedPath;
36
- }
37
- }
38
- return "";
39
- };
40
- return "/" + tracePath(GUIDE_PATH);
41
- };
@@ -1 +0,0 @@
1
- export { default } from './useEnhancedEffect';
@@ -1 +0,0 @@
1
- export { default } from './useEnhancedEffect';
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- declare const useEnhancedEffect: typeof React.useEffect;
3
- export default useEnhancedEffect;
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- const useEnhancedEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
3
- export default useEnhancedEffect;
@@ -1,3 +0,0 @@
1
- declare function useEventCallback<Fn extends (...args: any[]) => any = (...args: unknown[]) => unknown>(fn: Fn): Fn;
2
- declare function useEventCallback<Args extends unknown[], Return>(fn: (...args: Args) => Return): (...args: Args) => Return;
3
- export default useEventCallback;
@@ -1,10 +0,0 @@
1
- import * as React from "react";
2
- import useEnhancedEffect from "./useEnhancedEffect/index";
3
- function useEventCallback(fn) {
4
- const ref = React.useRef(fn);
5
- useEnhancedEffect(() => {
6
- ref.current = fn;
7
- });
8
- return React.useRef((...args) => (0, ref.current)(...args)).current;
9
- }
10
- export default useEventCallback;
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- declare function useUpdateEffect(callback: React.EffectCallback, deps: React.DependencyList): void;
3
- export declare function useDeepCompareEffect<T>(callback: () => void | (() => void), dependencies: T[]): void;
4
- export declare function useDeepCompareMemo<T>(factory: () => T, deps: any[]): T;
5
- export default useUpdateEffect;
@@ -1,32 +0,0 @@
1
- import React from "react";
2
- import _ from "lodash";
3
- function useUpdateEffect(callback, deps) {
4
- const hasMounted = React.useRef(false);
5
- React.useEffect(() => {
6
- if (hasMounted.current) {
7
- callback();
8
- }
9
- else {
10
- hasMounted.current = true;
11
- }
12
- }, deps);
13
- }
14
- export function useDeepCompareEffect(callback, dependencies) {
15
- const previousDependenciesRef = React.useRef();
16
- React.useEffect(() => {
17
- if (!_.isEqual(previousDependenciesRef.current, dependencies)) {
18
- previousDependenciesRef.current = _.cloneDeep(dependencies);
19
- return callback();
20
- }
21
- }, [callback]);
22
- }
23
- export function useDeepCompareMemo(factory, deps) {
24
- const depsRef = React.useRef();
25
- const valueRef = React.useRef();
26
- if (!_.isEqual(depsRef.current, deps)) {
27
- valueRef.current = factory();
28
- depsRef.current = _.cloneDeep(deps);
29
- }
30
- return valueRef.current;
31
- }
32
- export default useUpdateEffect;
@@ -1,4 +0,0 @@
1
- import * as $scale from "./scale";
2
- export declare const foundation: {
3
- $scale: typeof $scale;
4
- };
@@ -1,4 +0,0 @@
1
- import * as $scale from "./scale";
2
- export const foundation = {
3
- $scale,
4
- };
@@ -1,44 +0,0 @@
1
- export declare const white = "#FFFFFF";
2
- export declare const black = "#000000";
3
- export declare const primary0 = "#";
4
- export declare const primary5 = "#";
5
- export declare const primary10 = "#";
6
- export declare const primary15 = "#";
7
- export declare const primary20 = "#";
8
- export declare const primary25 = "#";
9
- export declare const primary30 = "#";
10
- export declare const primary35 = "#";
11
- export declare const primary40 = "#";
12
- export declare const primary45 = "#3CCC39";
13
- export declare const primary50 = "#";
14
- export declare const primary55 = "#";
15
- export declare const primary60 = "#";
16
- export declare const primary65 = "#";
17
- export declare const primary70 = "#";
18
- export declare const primary75 = "#";
19
- export declare const primary80 = "#";
20
- export declare const primary85 = "#";
21
- export declare const primary90 = "#";
22
- export declare const primary95 = "#";
23
- export declare const primary100 = "#";
24
- export declare const gray0 = "#000000";
25
- export declare const gray5 = "#0C0C0C";
26
- export declare const gray10 = "#191919";
27
- export declare const gray15 = "#252626";
28
- export declare const gray20 = "#323233";
29
- export declare const gray25 = "#3F3F40";
30
- export declare const gray30 = "#555353";
31
- export declare const gray35 = "#58595A";
32
- export declare const gray40 = "#646567";
33
- export declare const gray45 = "#717274";
34
- export declare const gray50 = "#7E7F80";
35
- export declare const gray55 = "#8A8B8D";
36
- export declare const gray60 = "#8b99a6";
37
- export declare const gray65 = "#A3A5A7";
38
- export declare const gray70 = "#B0B2B4";
39
- export declare const gray75 = "#BDBEC1";
40
- export declare const gray80 = "#C9CBCE";
41
- export declare const gray85 = "#D7DBE0";
42
- export declare const gray90 = "#DBE1EA";
43
- export declare const gray95 = "#eef3fa";
44
- export declare const gray100 = "#FAFBFD";
@@ -1,44 +0,0 @@
1
- export const white = "#FFFFFF";
2
- export const black = "#000000";
3
- export const primary0 = "#";
4
- export const primary5 = "#";
5
- export const primary10 = "#";
6
- export const primary15 = "#";
7
- export const primary20 = "#";
8
- export const primary25 = "#";
9
- export const primary30 = "#";
10
- export const primary35 = "#";
11
- export const primary40 = "#";
12
- export const primary45 = "#3CCC39";
13
- export const primary50 = "#";
14
- export const primary55 = "#";
15
- export const primary60 = "#";
16
- export const primary65 = "#";
17
- export const primary70 = "#";
18
- export const primary75 = "#";
19
- export const primary80 = "#";
20
- export const primary85 = "#";
21
- export const primary90 = "#";
22
- export const primary95 = "#";
23
- export const primary100 = "#";
24
- export const gray0 = "#000000";
25
- export const gray5 = "#0C0C0C";
26
- export const gray10 = "#191919";
27
- export const gray15 = "#252626";
28
- export const gray20 = "#323233";
29
- export const gray25 = "#3F3F40";
30
- export const gray30 = "#555353";
31
- export const gray35 = "#58595A";
32
- export const gray40 = "#646567";
33
- export const gray45 = "#717274";
34
- export const gray50 = "#7E7F80";
35
- export const gray55 = "#8A8B8D";
36
- export const gray60 = "#8b99a6";
37
- export const gray65 = "#A3A5A7";
38
- export const gray70 = "#B0B2B4";
39
- export const gray75 = "#BDBEC1";
40
- export const gray80 = "#C9CBCE";
41
- export const gray85 = "#D7DBE0";
42
- export const gray90 = "#DBE1EA";
43
- export const gray95 = "#eef3fa";
44
- export const gray100 = "#FAFBFD";
@@ -1 +0,0 @@
1
- export * from "./color";
@@ -1 +0,0 @@
1
- export * from "./color";
@@ -1,2 +0,0 @@
1
- export * as layout from "./layout";
2
- export * as color from "./color";
@@ -1,2 +0,0 @@
1
- export * as layout from "./layout";
2
- export * as color from "./color";
@@ -1,4 +0,0 @@
1
- export declare const xl = "1536px";
2
- export declare const lg = "1200px";
3
- export declare const md = "900px";
4
- export declare const sm = "600px";
@@ -1,4 +0,0 @@
1
- export const xl = "1536px";
2
- export const lg = "1200px";
3
- export const md = "900px";
4
- export const sm = "600px";
@@ -1 +0,0 @@
1
- export * from "./size";
@@ -1 +0,0 @@
1
- export * from "./size";
@@ -1,6 +0,0 @@
1
- export declare const tabletContentMaxWidth = "900px";
2
- export declare const tabletContentMinWidth = "600px";
3
- export declare const tabletContentPadding = "12px";
4
- export declare const pcContentMaxWidth = "1536px";
5
- export declare const pcContentMinWidth = "1200px";
6
- export declare const pcContentPadding = "24px";
@@ -1,7 +0,0 @@
1
- import { lg, md, sm, xl } from "./breakpoints";
2
- export const tabletContentMaxWidth = md;
3
- export const tabletContentMinWidth = sm;
4
- export const tabletContentPadding = "12px";
5
- export const pcContentMaxWidth = xl;
6
- export const pcContentMinWidth = lg;
7
- export const pcContentPadding = "24px";
@@ -1 +0,0 @@
1
- export * from "./loading/Loading";