@osdk/react-components 0.2.0-beta.10 → 0.2.0-beta.11
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.
- package/CHANGELOG.md +6 -0
- package/build/browser/object-table/DefaultCellRenderer.js +5 -2
- package/build/browser/object-table/DefaultCellRenderer.js.map +1 -1
- package/build/browser/object-table/EditableCell.js +16 -6
- package/build/browser/object-table/EditableCell.js.map +1 -1
- package/build/browser/object-table/EditableCell.module.css +30 -2
- package/build/browser/object-table/EditableCell.module.css.js +2 -1
- package/build/browser/object-table/ObjectTable.js +9 -22
- package/build/browser/object-table/ObjectTable.js.map +1 -1
- package/build/browser/object-table/ObjectTableApi.js.map +1 -1
- package/build/browser/object-table/Table.js +23 -15
- package/build/browser/object-table/Table.js.map +1 -1
- package/build/browser/object-table/Table.module.css +0 -8
- package/build/browser/object-table/Table.module.css.js +1 -2
- package/build/browser/object-table/TableBody.js +8 -2
- package/build/browser/object-table/TableBody.js.map +1 -1
- package/build/browser/object-table/TableCell.module.css +0 -8
- package/build/browser/object-table/TableEditContainer.js +79 -0
- package/build/browser/object-table/TableEditContainer.js.map +1 -0
- package/build/browser/object-table/TableEditContainer.module.css +44 -0
- package/build/browser/object-table/TableEditContainer.module.css.js +9 -0
- package/build/browser/object-table/TableRow.js +12 -4
- package/build/browser/object-table/TableRow.js.map +1 -1
- package/build/browser/object-table/TableRow.module.css +2 -1
- package/build/browser/object-table/hooks/__tests__/useEditableTable.test.js +292 -0
- package/build/browser/object-table/hooks/__tests__/useEditableTable.test.js.map +1 -0
- package/build/browser/object-table/hooks/useEditableTable.js +20 -11
- package/build/browser/object-table/hooks/useEditableTable.js.map +1 -1
- package/build/browser/object-table/hooks/useObjectTableData.js +0 -5
- package/build/browser/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/browser/object-table/utils/getCellId.js +0 -7
- package/build/browser/object-table/utils/getCellId.js.map +1 -1
- package/build/browser/object-table/utils/types.js.map +1 -1
- package/build/browser/public/experimental.js.map +1 -1
- package/build/browser/styles.css +79 -19
- package/build/cjs/public/experimental.cjs +179 -90
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/experimental.css +96 -57
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/cjs/public/experimental.d.cts +40 -18
- package/build/esm/object-table/DefaultCellRenderer.js +5 -2
- package/build/esm/object-table/DefaultCellRenderer.js.map +1 -1
- package/build/esm/object-table/EditableCell.js +16 -6
- package/build/esm/object-table/EditableCell.js.map +1 -1
- package/build/esm/object-table/EditableCell.module.css +30 -2
- package/build/esm/object-table/ObjectTable.js +9 -22
- package/build/esm/object-table/ObjectTable.js.map +1 -1
- package/build/esm/object-table/ObjectTableApi.js.map +1 -1
- package/build/esm/object-table/Table.js +23 -15
- package/build/esm/object-table/Table.js.map +1 -1
- package/build/esm/object-table/Table.module.css +0 -8
- package/build/esm/object-table/TableBody.js +8 -2
- package/build/esm/object-table/TableBody.js.map +1 -1
- package/build/esm/object-table/TableCell.module.css +0 -8
- package/build/esm/object-table/TableEditContainer.js +79 -0
- package/build/esm/object-table/TableEditContainer.js.map +1 -0
- package/build/esm/object-table/TableEditContainer.module.css +44 -0
- package/build/esm/object-table/TableRow.js +12 -4
- package/build/esm/object-table/TableRow.js.map +1 -1
- package/build/esm/object-table/TableRow.module.css +2 -1
- package/build/esm/object-table/hooks/__tests__/useEditableTable.test.js +292 -0
- package/build/esm/object-table/hooks/__tests__/useEditableTable.test.js.map +1 -0
- package/build/esm/object-table/hooks/useEditableTable.js +20 -11
- package/build/esm/object-table/hooks/useEditableTable.js.map +1 -1
- package/build/esm/object-table/hooks/useObjectTableData.js +0 -5
- package/build/esm/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/esm/object-table/utils/getCellId.js +0 -7
- package/build/esm/object-table/utils/getCellId.js.map +1 -1
- package/build/esm/object-table/utils/types.js.map +1 -1
- package/build/esm/public/experimental.js.map +1 -1
- package/build/types/object-table/DefaultCellRenderer.d.ts +2 -2
- package/build/types/object-table/DefaultCellRenderer.d.ts.map +1 -1
- package/build/types/object-table/EditableCell.d.ts +18 -6
- package/build/types/object-table/EditableCell.d.ts.map +1 -1
- package/build/types/object-table/ObjectTable.d.ts +1 -1
- package/build/types/object-table/ObjectTable.d.ts.map +1 -1
- package/build/types/object-table/ObjectTableApi.d.ts +16 -6
- package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
- package/build/types/object-table/Table.d.ts +5 -10
- package/build/types/object-table/Table.d.ts.map +1 -1
- package/build/types/object-table/TableBody.d.ts +4 -1
- package/build/types/object-table/TableBody.d.ts.map +1 -1
- package/build/types/object-table/TableEditContainer.d.ts +9 -0
- package/build/types/object-table/TableEditContainer.d.ts.map +1 -0
- package/build/types/object-table/TableRow.d.ts +5 -1
- package/build/types/object-table/TableRow.d.ts.map +1 -1
- package/build/types/object-table/hooks/__tests__/useEditableTable.test.d.ts.map +1 -0
- package/build/types/object-table/hooks/useEditableTable.d.ts +4 -9
- package/build/types/object-table/hooks/useEditableTable.d.ts.map +1 -1
- package/build/types/object-table/utils/getCellId.d.ts +0 -1
- package/build/types/object-table/utils/getCellId.d.ts.map +1 -1
- package/build/types/object-table/utils/types.d.ts +25 -3
- package/build/types/object-table/utils/types.d.ts.map +1 -1
- package/build/types/public/experimental.d.ts +1 -1
- package/build/types/public/experimental.d.ts.map +1 -1
- package/package.json +5 -5
- package/build/browser/object-table/__tests__/useEditableTable.test.js +0 -197
- package/build/browser/object-table/__tests__/useEditableTable.test.js.map +0 -1
- package/build/esm/object-table/__tests__/useEditableTable.test.js +0 -197
- package/build/esm/object-table/__tests__/useEditableTable.test.js.map +0 -1
- package/build/types/object-table/__tests__/useEditableTable.test.d.ts.map +0 -1
- /package/build/types/object-table/{__tests__ → hooks/__tests__}/useEditableTable.test.d.ts +0 -0
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { act, renderHook } from "@testing-library/react";
|
|
18
|
-
import { describe, expect, it, vi } from "vitest";
|
|
19
|
-
import { useEditableTable } from "../hooks/useEditableTable.js";
|
|
20
|
-
import { getCellId } from "../utils/getCellId.js";
|
|
21
|
-
describe("useEditableTable", () => {
|
|
22
|
-
it("adds cell to cellEdits when edited", () => {
|
|
23
|
-
const onCellValueChanged = vi.fn();
|
|
24
|
-
const {
|
|
25
|
-
result
|
|
26
|
-
} = renderHook(() => useEditableTable({
|
|
27
|
-
onCellValueChanged
|
|
28
|
-
}));
|
|
29
|
-
const cellIdentifier = {
|
|
30
|
-
rowId: "row-1",
|
|
31
|
-
columnId: "col-1"
|
|
32
|
-
};
|
|
33
|
-
const cellId = getCellId(cellIdentifier);
|
|
34
|
-
act(() => {
|
|
35
|
-
result.current.handleCellEdit(cellId, {
|
|
36
|
-
newValue: "new value",
|
|
37
|
-
oldValue: "old value"
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
expect(result.current.cellEdits).toEqual({
|
|
41
|
-
[cellId]: {
|
|
42
|
-
newValue: "new value",
|
|
43
|
-
oldValue: "old value"
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
expect(onCellValueChanged).toHaveBeenCalledWith(cellIdentifier, {
|
|
47
|
-
newValue: "new value",
|
|
48
|
-
oldValue: "old value"
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
it("removes cell from cellEdits when edited back to original value", () => {
|
|
52
|
-
const onCellValueChanged = vi.fn();
|
|
53
|
-
const {
|
|
54
|
-
result
|
|
55
|
-
} = renderHook(() => useEditableTable({
|
|
56
|
-
onCellValueChanged
|
|
57
|
-
}));
|
|
58
|
-
const cellId = getCellId({
|
|
59
|
-
rowId: "row-1",
|
|
60
|
-
columnId: "col-1"
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// First edit
|
|
64
|
-
act(() => {
|
|
65
|
-
result.current.handleCellEdit(cellId, {
|
|
66
|
-
newValue: "new value",
|
|
67
|
-
oldValue: "original"
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
expect(result.current.cellEdits).toEqual({
|
|
71
|
-
[cellId]: {
|
|
72
|
-
newValue: "new value",
|
|
73
|
-
oldValue: "original"
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// Edit back to original
|
|
78
|
-
act(() => {
|
|
79
|
-
result.current.handleCellEdit(cellId, {
|
|
80
|
-
newValue: "original",
|
|
81
|
-
oldValue: "original"
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
// Should remove the cell from cellEdits
|
|
86
|
-
expect(result.current.cellEdits).toEqual({});
|
|
87
|
-
});
|
|
88
|
-
it("handles multiple cell edits", () => {
|
|
89
|
-
const {
|
|
90
|
-
result
|
|
91
|
-
} = renderHook(() => useEditableTable({}));
|
|
92
|
-
const cellId1 = getCellId({
|
|
93
|
-
rowId: "row-1",
|
|
94
|
-
columnId: "col-1"
|
|
95
|
-
});
|
|
96
|
-
const cellId2 = getCellId({
|
|
97
|
-
rowId: "row-2",
|
|
98
|
-
columnId: "col-2"
|
|
99
|
-
});
|
|
100
|
-
const cellId3 = getCellId({
|
|
101
|
-
rowId: "row-3",
|
|
102
|
-
columnId: "col-3"
|
|
103
|
-
});
|
|
104
|
-
act(() => {
|
|
105
|
-
result.current.handleCellEdit(cellId1, {
|
|
106
|
-
newValue: "new1",
|
|
107
|
-
oldValue: "old1"
|
|
108
|
-
});
|
|
109
|
-
result.current.handleCellEdit(cellId2, {
|
|
110
|
-
newValue: "new2",
|
|
111
|
-
oldValue: "old2"
|
|
112
|
-
});
|
|
113
|
-
result.current.handleCellEdit(cellId3, {
|
|
114
|
-
newValue: "new3",
|
|
115
|
-
oldValue: "old3"
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
expect(Object.keys(result.current.cellEdits).length).toBe(3);
|
|
119
|
-
|
|
120
|
-
// Edit one back to original
|
|
121
|
-
act(() => {
|
|
122
|
-
result.current.handleCellEdit(cellId2, {
|
|
123
|
-
newValue: "old2",
|
|
124
|
-
oldValue: "old2"
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
expect(Object.keys(result.current.cellEdits).length).toBe(2);
|
|
128
|
-
expect(result.current.cellEdits[cellId2]).toBeUndefined();
|
|
129
|
-
});
|
|
130
|
-
it("clears all edits", () => {
|
|
131
|
-
const {
|
|
132
|
-
result
|
|
133
|
-
} = renderHook(() => useEditableTable({}));
|
|
134
|
-
const cellId1 = getCellId({
|
|
135
|
-
rowId: "row-1",
|
|
136
|
-
columnId: "col-1"
|
|
137
|
-
});
|
|
138
|
-
const cellId2 = getCellId({
|
|
139
|
-
rowId: "row-2",
|
|
140
|
-
columnId: "col-2"
|
|
141
|
-
});
|
|
142
|
-
act(() => {
|
|
143
|
-
result.current.handleCellEdit(cellId1, {
|
|
144
|
-
newValue: "new1",
|
|
145
|
-
oldValue: "old1"
|
|
146
|
-
});
|
|
147
|
-
result.current.handleCellEdit(cellId2, {
|
|
148
|
-
newValue: "new2",
|
|
149
|
-
oldValue: "old2"
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
act(() => {
|
|
153
|
-
result.current.clearEdits();
|
|
154
|
-
});
|
|
155
|
-
expect(result.current.cellEdits).toEqual({});
|
|
156
|
-
});
|
|
157
|
-
it("handles submit edits", async () => {
|
|
158
|
-
const onSubmitEdits = vi.fn();
|
|
159
|
-
const {
|
|
160
|
-
result
|
|
161
|
-
} = renderHook(() => useEditableTable({
|
|
162
|
-
onSubmitEdits
|
|
163
|
-
}));
|
|
164
|
-
const cellId1 = getCellId({
|
|
165
|
-
rowId: "row-1",
|
|
166
|
-
columnId: "col-1"
|
|
167
|
-
});
|
|
168
|
-
const cellId2 = getCellId({
|
|
169
|
-
rowId: "row-2",
|
|
170
|
-
columnId: "col-2"
|
|
171
|
-
});
|
|
172
|
-
act(() => {
|
|
173
|
-
result.current.handleCellEdit(cellId1, {
|
|
174
|
-
newValue: "new1",
|
|
175
|
-
oldValue: "old1"
|
|
176
|
-
});
|
|
177
|
-
result.current.handleCellEdit(cellId2, {
|
|
178
|
-
newValue: "new2",
|
|
179
|
-
oldValue: "old2"
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
await act(async () => {
|
|
183
|
-
await result.current.handleSubmitEdits();
|
|
184
|
-
});
|
|
185
|
-
expect(onSubmitEdits).toHaveBeenCalledWith({
|
|
186
|
-
[cellId1]: {
|
|
187
|
-
newValue: "new1",
|
|
188
|
-
oldValue: "old1"
|
|
189
|
-
},
|
|
190
|
-
[cellId2]: {
|
|
191
|
-
newValue: "new2",
|
|
192
|
-
oldValue: "old2"
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
//# sourceMappingURL=useEditableTable.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useEditableTable.test.js","names":["act","renderHook","describe","expect","it","vi","useEditableTable","getCellId","onCellValueChanged","fn","result","cellIdentifier","rowId","columnId","cellId","current","handleCellEdit","newValue","oldValue","cellEdits","toEqual","toHaveBeenCalledWith","cellId1","cellId2","cellId3","Object","keys","length","toBe","toBeUndefined","clearEdits","onSubmitEdits","handleSubmitEdits"],"sources":["useEditableTable.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { act, renderHook } from \"@testing-library/react\";\nimport { describe, expect, it, vi } from \"vitest\";\nimport { useEditableTable } from \"../hooks/useEditableTable.js\";\nimport { getCellId } from \"../utils/getCellId.js\";\n\ndescribe(\"useEditableTable\", () => {\n it(\"adds cell to cellEdits when edited\", () => {\n const onCellValueChanged = vi.fn();\n const { result } = renderHook(() =>\n useEditableTable({ onCellValueChanged })\n );\n const cellIdentifier = { rowId: \"row-1\", columnId: \"col-1\" };\n const cellId = getCellId(cellIdentifier);\n\n act(() => {\n result.current.handleCellEdit(cellId, {\n newValue: \"new value\",\n oldValue: \"old value\",\n });\n });\n\n expect(result.current.cellEdits).toEqual({\n [cellId]: { newValue: \"new value\", oldValue: \"old value\" },\n });\n expect(onCellValueChanged).toHaveBeenCalledWith(\n cellIdentifier,\n { newValue: \"new value\", oldValue: \"old value\" },\n );\n });\n\n it(\"removes cell from cellEdits when edited back to original value\", () => {\n const onCellValueChanged = vi.fn();\n const { result } = renderHook(() =>\n useEditableTable({ onCellValueChanged })\n );\n const cellIdentifier = { rowId: \"row-1\", columnId: \"col-1\" };\n const cellId = getCellId(cellIdentifier);\n\n // First edit\n act(() => {\n result.current.handleCellEdit(cellId, {\n newValue: \"new value\",\n oldValue: \"original\",\n });\n });\n\n expect(result.current.cellEdits).toEqual({\n [cellId]: { newValue: \"new value\", oldValue: \"original\" },\n });\n\n // Edit back to original\n act(() => {\n result.current.handleCellEdit(cellId, {\n newValue: \"original\",\n oldValue: \"original\",\n });\n });\n\n // Should remove the cell from cellEdits\n expect(result.current.cellEdits).toEqual({});\n });\n\n it(\"handles multiple cell edits\", () => {\n const { result } = renderHook(() => useEditableTable({}));\n const cellId1 = getCellId({ rowId: \"row-1\", columnId: \"col-1\" });\n const cellId2 = getCellId({ rowId: \"row-2\", columnId: \"col-2\" });\n const cellId3 = getCellId({ rowId: \"row-3\", columnId: \"col-3\" });\n\n act(() => {\n result.current.handleCellEdit(cellId1, {\n newValue: \"new1\",\n oldValue: \"old1\",\n });\n result.current.handleCellEdit(cellId2, {\n newValue: \"new2\",\n oldValue: \"old2\",\n });\n result.current.handleCellEdit(cellId3, {\n newValue: \"new3\",\n oldValue: \"old3\",\n });\n });\n\n expect(Object.keys(result.current.cellEdits).length).toBe(3);\n\n // Edit one back to original\n act(() => {\n result.current.handleCellEdit(cellId2, {\n newValue: \"old2\",\n oldValue: \"old2\",\n });\n });\n\n expect(Object.keys(result.current.cellEdits).length).toBe(2);\n expect(result.current.cellEdits[cellId2]).toBeUndefined();\n });\n\n it(\"clears all edits\", () => {\n const { result } = renderHook(() => useEditableTable({}));\n const cellId1 = getCellId({ rowId: \"row-1\", columnId: \"col-1\" });\n const cellId2 = getCellId({ rowId: \"row-2\", columnId: \"col-2\" });\n\n act(() => {\n result.current.handleCellEdit(cellId1, {\n newValue: \"new1\",\n oldValue: \"old1\",\n });\n result.current.handleCellEdit(cellId2, {\n newValue: \"new2\",\n oldValue: \"old2\",\n });\n });\n\n act(() => {\n result.current.clearEdits();\n });\n\n expect(result.current.cellEdits).toEqual({});\n });\n\n it(\"handles submit edits\", async () => {\n const onSubmitEdits = vi.fn();\n const { result } = renderHook(() => useEditableTable({ onSubmitEdits }));\n const cellId1 = getCellId({ rowId: \"row-1\", columnId: \"col-1\" });\n const cellId2 = getCellId({ rowId: \"row-2\", columnId: \"col-2\" });\n\n act(() => {\n result.current.handleCellEdit(cellId1, {\n newValue: \"new1\",\n oldValue: \"old1\",\n });\n result.current.handleCellEdit(cellId2, {\n newValue: \"new2\",\n oldValue: \"old2\",\n });\n });\n\n await act(async () => {\n await result.current.handleSubmitEdits();\n });\n\n expect(onSubmitEdits).toHaveBeenCalledWith({\n [cellId1]: { newValue: \"new1\", oldValue: \"old1\" },\n [cellId2]: { newValue: \"new2\", oldValue: \"old2\" },\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,GAAG,EAAEC,UAAU,QAAQ,wBAAwB;AACxD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,EAAE,QAAQ,QAAQ;AACjD,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,SAAS,QAAQ,uBAAuB;AAEjDL,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EACjCE,EAAE,CAAC,oCAAoC,EAAE,MAAM;IAC7C,MAAMI,kBAAkB,GAAGH,EAAE,CAACI,EAAE,CAAC,CAAC;IAClC,MAAM;MAAEC;IAAO,CAAC,GAAGT,UAAU,CAAC,MAC5BK,gBAAgB,CAAC;MAAEE;IAAmB,CAAC,CACzC,CAAC;IACD,MAAMG,cAAc,GAAG;MAAEC,KAAK,EAAE,OAAO;MAAEC,QAAQ,EAAE;IAAQ,CAAC;IAC5D,MAAMC,MAAM,GAAGP,SAAS,CAACI,cAAc,CAAC;IAExCX,GAAG,CAAC,MAAM;MACRU,MAAM,CAACK,OAAO,CAACC,cAAc,CAACF,MAAM,EAAE;QACpCG,QAAQ,EAAE,WAAW;QACrBC,QAAQ,EAAE;MACZ,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFf,MAAM,CAACO,MAAM,CAACK,OAAO,CAACI,SAAS,CAAC,CAACC,OAAO,CAAC;MACvC,CAACN,MAAM,GAAG;QAAEG,QAAQ,EAAE,WAAW;QAAEC,QAAQ,EAAE;MAAY;IAC3D,CAAC,CAAC;IACFf,MAAM,CAACK,kBAAkB,CAAC,CAACa,oBAAoB,CAC7CV,cAAc,EACd;MAAEM,QAAQ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ACK,OAAO,CAACC,cAAc,CAACM,OAAO,EAAE;QACrCL,QAAQ,EAAE,MAAM;QAChBC,QAAQ,EAAE;MACZ,CAAC,CAAC;MACFR,MAAM,CAACK,OAAO,CAACC,cAAc,CAACO,OAAO,EAAE;QACrCN,QAAQ,EAAE,MAAM;QAChBC,QAAQ,EAAE;MACZ,CAAC,CAAC;IACJ,CAAC,CAAC;IAEF,MAAMlB,GAAG,CAAC,YAAY;MACpB,MAAMU,MAAM,CAACK,OAAO,CAACiB,iBAAiB,CAAC,CAAC;IAC1C,CAAC,CAAC;IAEF7B,MAAM,CAAC4B,aAAa,CAAC,CAACV,oBAAoB,CAAC;MACzC,CAACC,OAAO,GAAG;QAAEL,QAAQ,EAAE,MAAM;QAAEC,QAAQ,EAAE;MAAO,CAAC;MACjD,CAACK,OAAO,GAAG;QAAEN,QAAQ,EAAE,MAAM;QAAEC,QAAQ,EAAE;MAAO;IAClD,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { act, renderHook } from "@testing-library/react";
|
|
18
|
-
import { describe, expect, it, vi } from "vitest";
|
|
19
|
-
import { useEditableTable } from "../hooks/useEditableTable.js";
|
|
20
|
-
import { getCellId } from "../utils/getCellId.js";
|
|
21
|
-
describe("useEditableTable", () => {
|
|
22
|
-
it("adds cell to cellEdits when edited", () => {
|
|
23
|
-
const onCellValueChanged = vi.fn();
|
|
24
|
-
const {
|
|
25
|
-
result
|
|
26
|
-
} = renderHook(() => useEditableTable({
|
|
27
|
-
onCellValueChanged
|
|
28
|
-
}));
|
|
29
|
-
const cellIdentifier = {
|
|
30
|
-
rowId: "row-1",
|
|
31
|
-
columnId: "col-1"
|
|
32
|
-
};
|
|
33
|
-
const cellId = getCellId(cellIdentifier);
|
|
34
|
-
act(() => {
|
|
35
|
-
result.current.handleCellEdit(cellId, {
|
|
36
|
-
newValue: "new value",
|
|
37
|
-
oldValue: "old value"
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
expect(result.current.cellEdits).toEqual({
|
|
41
|
-
[cellId]: {
|
|
42
|
-
newValue: "new value",
|
|
43
|
-
oldValue: "old value"
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
expect(onCellValueChanged).toHaveBeenCalledWith(cellIdentifier, {
|
|
47
|
-
newValue: "new value",
|
|
48
|
-
oldValue: "old value"
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
it("removes cell from cellEdits when edited back to original value", () => {
|
|
52
|
-
const onCellValueChanged = vi.fn();
|
|
53
|
-
const {
|
|
54
|
-
result
|
|
55
|
-
} = renderHook(() => useEditableTable({
|
|
56
|
-
onCellValueChanged
|
|
57
|
-
}));
|
|
58
|
-
const cellId = getCellId({
|
|
59
|
-
rowId: "row-1",
|
|
60
|
-
columnId: "col-1"
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// First edit
|
|
64
|
-
act(() => {
|
|
65
|
-
result.current.handleCellEdit(cellId, {
|
|
66
|
-
newValue: "new value",
|
|
67
|
-
oldValue: "original"
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
expect(result.current.cellEdits).toEqual({
|
|
71
|
-
[cellId]: {
|
|
72
|
-
newValue: "new value",
|
|
73
|
-
oldValue: "original"
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// Edit back to original
|
|
78
|
-
act(() => {
|
|
79
|
-
result.current.handleCellEdit(cellId, {
|
|
80
|
-
newValue: "original",
|
|
81
|
-
oldValue: "original"
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
// Should remove the cell from cellEdits
|
|
86
|
-
expect(result.current.cellEdits).toEqual({});
|
|
87
|
-
});
|
|
88
|
-
it("handles multiple cell edits", () => {
|
|
89
|
-
const {
|
|
90
|
-
result
|
|
91
|
-
} = renderHook(() => useEditableTable({}));
|
|
92
|
-
const cellId1 = getCellId({
|
|
93
|
-
rowId: "row-1",
|
|
94
|
-
columnId: "col-1"
|
|
95
|
-
});
|
|
96
|
-
const cellId2 = getCellId({
|
|
97
|
-
rowId: "row-2",
|
|
98
|
-
columnId: "col-2"
|
|
99
|
-
});
|
|
100
|
-
const cellId3 = getCellId({
|
|
101
|
-
rowId: "row-3",
|
|
102
|
-
columnId: "col-3"
|
|
103
|
-
});
|
|
104
|
-
act(() => {
|
|
105
|
-
result.current.handleCellEdit(cellId1, {
|
|
106
|
-
newValue: "new1",
|
|
107
|
-
oldValue: "old1"
|
|
108
|
-
});
|
|
109
|
-
result.current.handleCellEdit(cellId2, {
|
|
110
|
-
newValue: "new2",
|
|
111
|
-
oldValue: "old2"
|
|
112
|
-
});
|
|
113
|
-
result.current.handleCellEdit(cellId3, {
|
|
114
|
-
newValue: "new3",
|
|
115
|
-
oldValue: "old3"
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
expect(Object.keys(result.current.cellEdits).length).toBe(3);
|
|
119
|
-
|
|
120
|
-
// Edit one back to original
|
|
121
|
-
act(() => {
|
|
122
|
-
result.current.handleCellEdit(cellId2, {
|
|
123
|
-
newValue: "old2",
|
|
124
|
-
oldValue: "old2"
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
expect(Object.keys(result.current.cellEdits).length).toBe(2);
|
|
128
|
-
expect(result.current.cellEdits[cellId2]).toBeUndefined();
|
|
129
|
-
});
|
|
130
|
-
it("clears all edits", () => {
|
|
131
|
-
const {
|
|
132
|
-
result
|
|
133
|
-
} = renderHook(() => useEditableTable({}));
|
|
134
|
-
const cellId1 = getCellId({
|
|
135
|
-
rowId: "row-1",
|
|
136
|
-
columnId: "col-1"
|
|
137
|
-
});
|
|
138
|
-
const cellId2 = getCellId({
|
|
139
|
-
rowId: "row-2",
|
|
140
|
-
columnId: "col-2"
|
|
141
|
-
});
|
|
142
|
-
act(() => {
|
|
143
|
-
result.current.handleCellEdit(cellId1, {
|
|
144
|
-
newValue: "new1",
|
|
145
|
-
oldValue: "old1"
|
|
146
|
-
});
|
|
147
|
-
result.current.handleCellEdit(cellId2, {
|
|
148
|
-
newValue: "new2",
|
|
149
|
-
oldValue: "old2"
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
act(() => {
|
|
153
|
-
result.current.clearEdits();
|
|
154
|
-
});
|
|
155
|
-
expect(result.current.cellEdits).toEqual({});
|
|
156
|
-
});
|
|
157
|
-
it("handles submit edits", async () => {
|
|
158
|
-
const onSubmitEdits = vi.fn();
|
|
159
|
-
const {
|
|
160
|
-
result
|
|
161
|
-
} = renderHook(() => useEditableTable({
|
|
162
|
-
onSubmitEdits
|
|
163
|
-
}));
|
|
164
|
-
const cellId1 = getCellId({
|
|
165
|
-
rowId: "row-1",
|
|
166
|
-
columnId: "col-1"
|
|
167
|
-
});
|
|
168
|
-
const cellId2 = getCellId({
|
|
169
|
-
rowId: "row-2",
|
|
170
|
-
columnId: "col-2"
|
|
171
|
-
});
|
|
172
|
-
act(() => {
|
|
173
|
-
result.current.handleCellEdit(cellId1, {
|
|
174
|
-
newValue: "new1",
|
|
175
|
-
oldValue: "old1"
|
|
176
|
-
});
|
|
177
|
-
result.current.handleCellEdit(cellId2, {
|
|
178
|
-
newValue: "new2",
|
|
179
|
-
oldValue: "old2"
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
await act(async () => {
|
|
183
|
-
await result.current.handleSubmitEdits();
|
|
184
|
-
});
|
|
185
|
-
expect(onSubmitEdits).toHaveBeenCalledWith({
|
|
186
|
-
[cellId1]: {
|
|
187
|
-
newValue: "new1",
|
|
188
|
-
oldValue: "old1"
|
|
189
|
-
},
|
|
190
|
-
[cellId2]: {
|
|
191
|
-
newValue: "new2",
|
|
192
|
-
oldValue: "old2"
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
//# sourceMappingURL=useEditableTable.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useEditableTable.test.js","names":["act","renderHook","describe","expect","it","vi","useEditableTable","getCellId","onCellValueChanged","fn","result","cellIdentifier","rowId","columnId","cellId","current","handleCellEdit","newValue","oldValue","cellEdits","toEqual","toHaveBeenCalledWith","cellId1","cellId2","cellId3","Object","keys","length","toBe","toBeUndefined","clearEdits","onSubmitEdits","handleSubmitEdits"],"sources":["useEditableTable.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { act, renderHook } from \"@testing-library/react\";\nimport { describe, expect, it, vi } from \"vitest\";\nimport { useEditableTable } from \"../hooks/useEditableTable.js\";\nimport { getCellId } from \"../utils/getCellId.js\";\n\ndescribe(\"useEditableTable\", () => {\n it(\"adds cell to cellEdits when edited\", () => {\n const onCellValueChanged = vi.fn();\n const { result } = renderHook(() =>\n useEditableTable({ onCellValueChanged })\n );\n const cellIdentifier = { rowId: \"row-1\", columnId: \"col-1\" };\n const cellId = getCellId(cellIdentifier);\n\n act(() => {\n result.current.handleCellEdit(cellId, {\n newValue: \"new value\",\n oldValue: \"old value\",\n });\n });\n\n expect(result.current.cellEdits).toEqual({\n [cellId]: { newValue: \"new value\", oldValue: \"old value\" },\n });\n expect(onCellValueChanged).toHaveBeenCalledWith(\n cellIdentifier,\n { newValue: \"new value\", oldValue: \"old value\" },\n );\n });\n\n it(\"removes cell from cellEdits when edited back to original value\", () => {\n const onCellValueChanged = vi.fn();\n const { result } = renderHook(() =>\n useEditableTable({ onCellValueChanged })\n );\n const cellIdentifier = { rowId: \"row-1\", columnId: \"col-1\" };\n const cellId = getCellId(cellIdentifier);\n\n // First edit\n act(() => {\n result.current.handleCellEdit(cellId, {\n newValue: \"new value\",\n oldValue: \"original\",\n });\n });\n\n expect(result.current.cellEdits).toEqual({\n [cellId]: { newValue: \"new value\", oldValue: \"original\" },\n });\n\n // Edit back to original\n act(() => {\n result.current.handleCellEdit(cellId, {\n newValue: \"original\",\n oldValue: \"original\",\n });\n });\n\n // Should remove the cell from cellEdits\n expect(result.current.cellEdits).toEqual({});\n });\n\n it(\"handles multiple cell edits\", () => {\n const { result } = renderHook(() => useEditableTable({}));\n const cellId1 = getCellId({ rowId: \"row-1\", columnId: \"col-1\" });\n const cellId2 = getCellId({ rowId: \"row-2\", columnId: \"col-2\" });\n const cellId3 = getCellId({ rowId: \"row-3\", columnId: \"col-3\" });\n\n act(() => {\n result.current.handleCellEdit(cellId1, {\n newValue: \"new1\",\n oldValue: \"old1\",\n });\n result.current.handleCellEdit(cellId2, {\n newValue: \"new2\",\n oldValue: \"old2\",\n });\n result.current.handleCellEdit(cellId3, {\n newValue: \"new3\",\n oldValue: \"old3\",\n });\n });\n\n expect(Object.keys(result.current.cellEdits).length).toBe(3);\n\n // Edit one back to original\n act(() => {\n result.current.handleCellEdit(cellId2, {\n newValue: \"old2\",\n oldValue: \"old2\",\n });\n });\n\n expect(Object.keys(result.current.cellEdits).length).toBe(2);\n expect(result.current.cellEdits[cellId2]).toBeUndefined();\n });\n\n it(\"clears all edits\", () => {\n const { result } = renderHook(() => useEditableTable({}));\n const cellId1 = getCellId({ rowId: \"row-1\", columnId: \"col-1\" });\n const cellId2 = getCellId({ rowId: \"row-2\", columnId: \"col-2\" });\n\n act(() => {\n result.current.handleCellEdit(cellId1, {\n newValue: \"new1\",\n oldValue: \"old1\",\n });\n result.current.handleCellEdit(cellId2, {\n newValue: \"new2\",\n oldValue: \"old2\",\n });\n });\n\n act(() => {\n result.current.clearEdits();\n });\n\n expect(result.current.cellEdits).toEqual({});\n });\n\n it(\"handles submit edits\", async () => {\n const onSubmitEdits = vi.fn();\n const { result } = renderHook(() => useEditableTable({ onSubmitEdits }));\n const cellId1 = getCellId({ rowId: \"row-1\", columnId: \"col-1\" });\n const cellId2 = getCellId({ rowId: \"row-2\", columnId: \"col-2\" });\n\n act(() => {\n result.current.handleCellEdit(cellId1, {\n newValue: \"new1\",\n oldValue: \"old1\",\n });\n result.current.handleCellEdit(cellId2, {\n newValue: \"new2\",\n oldValue: \"old2\",\n });\n });\n\n await act(async () => {\n await result.current.handleSubmitEdits();\n });\n\n expect(onSubmitEdits).toHaveBeenCalledWith({\n [cellId1]: { newValue: \"new1\", oldValue: \"old1\" },\n [cellId2]: { newValue: \"new2\", oldValue: \"old2\" },\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,GAAG,EAAEC,UAAU,QAAQ,wBAAwB;AACxD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,EAAE,QAAQ,QAAQ;AACjD,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,SAAS,QAAQ,uBAAuB;AAEjDL,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EACjCE,EAA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MACjD,CAACK,OAAO,GAAG;QAAEN,QAAQ,EAAE,MAAM;QAAEC,QAAQ,EAAE;MAAO;IAClD,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"","names":[],"sources":["../../../../src/object-table/__tests__/useEditableTable.test.ts"],"version":3,"file":"useEditableTable.test.d.ts"}
|
|
File without changes
|