@vuu-ui/vuu-table-extras 2.3.0 → 3.0.0-beta.2
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/cjs/packages/vuu-table-extras/src/cell-renderers/dropdown-cell/DropdownCell.js +3 -0
- package/cjs/packages/vuu-table-extras/src/cell-renderers/dropdown-cell/DropdownCell.js.map +1 -1
- package/cjs/packages/vuu-table-extras/src/csv-upload/CsvUpload.js +62 -48
- package/cjs/packages/vuu-table-extras/src/csv-upload/CsvUpload.js.map +1 -1
- package/cjs/packages/vuu-table-extras/src/csv-upload/data-upload-preview/DataUploadPreview.css.js +6 -0
- package/cjs/packages/vuu-table-extras/src/csv-upload/data-upload-preview/DataUploadPreview.css.js.map +1 -0
- package/cjs/packages/vuu-table-extras/src/csv-upload/data-upload-preview/DataUploadPreview.js +118 -0
- package/cjs/packages/vuu-table-extras/src/csv-upload/data-upload-preview/DataUploadPreview.js.map +1 -0
- package/cjs/packages/vuu-table-extras/src/csv-upload/data-upload-preview/useDataUploadPreview.js +76 -0
- package/cjs/packages/vuu-table-extras/src/csv-upload/data-upload-preview/useDataUploadPreview.js.map +1 -0
- package/cjs/packages/vuu-table-extras/src/csv-upload/parse/csv-upload-utils.js +1 -44
- package/cjs/packages/vuu-table-extras/src/csv-upload/parse/csv-upload-utils.js.map +1 -1
- package/cjs/packages/vuu-table-extras/src/csv-upload/useCsvUpload.js +154 -66
- package/cjs/packages/vuu-table-extras/src/csv-upload/useCsvUpload.js.map +1 -1
- package/cjs/packages/vuu-table-extras/src/index.js +6 -2
- package/cjs/packages/vuu-table-extras/src/index.js.map +1 -1
- package/cjs/packages/vuu-table-extras/src/inline-add-row/InlineAddRow.css.js +6 -0
- package/cjs/packages/vuu-table-extras/src/inline-add-row/InlineAddRow.css.js.map +1 -0
- package/cjs/packages/vuu-table-extras/src/inline-add-row/InlineAddRow.js +44 -0
- package/cjs/packages/vuu-table-extras/src/inline-add-row/InlineAddRow.js.map +1 -0
- package/cjs/packages/vuu-table-extras/src/inline-add-row/useInlineAddRow.js +137 -0
- package/cjs/packages/vuu-table-extras/src/inline-add-row/useInlineAddRow.js.map +1 -0
- package/cjs/packages/vuu-table-extras/src/table-footer/TableFooter.css.js +1 -1
- package/cjs/packages/vuu-table-extras/src/table-footer/TableFooter.js +5 -2
- package/cjs/packages/vuu-table-extras/src/table-footer/TableFooter.js.map +1 -1
- package/esm/packages/vuu-table-extras/src/cell-renderers/dropdown-cell/DropdownCell.js +3 -0
- package/esm/packages/vuu-table-extras/src/cell-renderers/dropdown-cell/DropdownCell.js.map +1 -1
- package/esm/packages/vuu-table-extras/src/csv-upload/CsvUpload.js +63 -49
- package/esm/packages/vuu-table-extras/src/csv-upload/CsvUpload.js.map +1 -1
- package/esm/packages/vuu-table-extras/src/csv-upload/data-upload-preview/DataUploadPreview.css.js +4 -0
- package/esm/packages/vuu-table-extras/src/csv-upload/data-upload-preview/DataUploadPreview.css.js.map +1 -0
- package/esm/packages/vuu-table-extras/src/csv-upload/data-upload-preview/DataUploadPreview.js +116 -0
- package/esm/packages/vuu-table-extras/src/csv-upload/data-upload-preview/DataUploadPreview.js.map +1 -0
- package/esm/packages/vuu-table-extras/src/csv-upload/data-upload-preview/useDataUploadPreview.js +73 -0
- package/esm/packages/vuu-table-extras/src/csv-upload/data-upload-preview/useDataUploadPreview.js.map +1 -0
- package/esm/packages/vuu-table-extras/src/csv-upload/parse/csv-upload-utils.js +2 -43
- package/esm/packages/vuu-table-extras/src/csv-upload/parse/csv-upload-utils.js.map +1 -1
- package/esm/packages/vuu-table-extras/src/csv-upload/useCsvUpload.js +157 -69
- package/esm/packages/vuu-table-extras/src/csv-upload/useCsvUpload.js.map +1 -1
- package/esm/packages/vuu-table-extras/src/index.js +3 -1
- package/esm/packages/vuu-table-extras/src/index.js.map +1 -1
- package/esm/packages/vuu-table-extras/src/inline-add-row/InlineAddRow.css.js +4 -0
- package/esm/packages/vuu-table-extras/src/inline-add-row/InlineAddRow.css.js.map +1 -0
- package/esm/packages/vuu-table-extras/src/inline-add-row/InlineAddRow.js +42 -0
- package/esm/packages/vuu-table-extras/src/inline-add-row/InlineAddRow.js.map +1 -0
- package/esm/packages/vuu-table-extras/src/inline-add-row/useInlineAddRow.js +135 -0
- package/esm/packages/vuu-table-extras/src/inline-add-row/useInlineAddRow.js.map +1 -0
- package/esm/packages/vuu-table-extras/src/table-footer/TableFooter.css.js +1 -1
- package/esm/packages/vuu-table-extras/src/table-footer/TableFooter.js +5 -2
- package/esm/packages/vuu-table-extras/src/table-footer/TableFooter.js.map +1 -1
- package/package.json +12 -11
- package/types/csv-upload/CsvUpload.d.ts +9 -1
- package/types/csv-upload/data-upload-preview/DataUploadPreview.d.ts +10 -0
- package/types/csv-upload/data-upload-preview/useDataUploadPreview.d.ts +17 -0
- package/types/csv-upload/index.d.ts +2 -2
- package/types/csv-upload/useCsvUpload.d.ts +6 -3
- package/types/index.d.ts +1 -0
- package/types/inline-add-row/InlineAddRow.d.ts +3 -0
- package/types/inline-add-row/index.d.ts +2 -0
- package/types/inline-add-row/useInlineAddRow.d.ts +57 -0
- package/types/table-footer/TableFooter.d.ts +3 -2
- package/cjs/packages/vuu-table-extras/src/csv-upload/useCsvUploadSessionPreview.js +0 -73
- package/cjs/packages/vuu-table-extras/src/csv-upload/useCsvUploadSessionPreview.js.map +0 -1
- package/esm/packages/vuu-table-extras/src/csv-upload/useCsvUploadSessionPreview.js +0 -71
- package/esm/packages/vuu-table-extras/src/csv-upload/useCsvUploadSessionPreview.js.map +0 -1
- package/types/csv-upload/useCsvUploadSessionPreview.d.ts +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CalculatedColumnPanel } from './calculated-column/CalculatedColumnPanel.js';
|
|
2
2
|
export { CsvUpload } from './csv-upload/CsvUpload.js';
|
|
3
3
|
export { useCsvUpload } from './csv-upload/useCsvUpload.js';
|
|
4
|
-
export {
|
|
4
|
+
export { DataUploadPreview } from './csv-upload/data-upload-preview/DataUploadPreview.js';
|
|
5
5
|
export { validateCsvAgainstSchema } from './csv-upload/parse/csv-schema-validation.js';
|
|
6
6
|
export { parseCsv } from './csv-upload/parse/csv-parse.js';
|
|
7
7
|
export { CsvParseErrorEnum, CsvValidationErrorEnum } from './csv-upload/parse/csv-errors.js';
|
|
@@ -35,6 +35,8 @@ export { useColumnSettings } from './column-settings-panel/useColumnSettings.js'
|
|
|
35
35
|
export { DataSourceStats } from './datasource-stats/DatasourceStats.js';
|
|
36
36
|
export { FreezeControl } from './freeze-control/FreezeControl.js';
|
|
37
37
|
export { FrozenBanner } from './freeze-control/FrozenBanner.js';
|
|
38
|
+
export { InlineAddRow } from './inline-add-row/InlineAddRow.js';
|
|
39
|
+
export { useInlineAddRow } from './inline-add-row/useInlineAddRow.js';
|
|
38
40
|
export { TabbedTableConfigPanel } from './tabbed-table-config-panel/TabbedTableConfigPanel.js';
|
|
39
41
|
export { TabbedTableSettingsAction } from './tabbed-table-config-panel/TabbedTableSettingsAction.js';
|
|
40
42
|
export { TableFooter, TableFooterTray } from './table-footer/TableFooter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var inlineAddRowCss = ".vuuInlineAddRow {\n --row-borderColor: transparent;\n\n display: flex;\n height: var(--row-height, var(--salt-size-base));\n padding: 0 var(--table-selection-bookend-width, 4px);\n position: relative;\n\n .vuuTableCell {\n height: 100%;\n }\n}\n";
|
|
2
|
+
|
|
3
|
+
export { inlineAddRowCss as default };
|
|
4
|
+
//# sourceMappingURL=InlineAddRow.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineAddRow.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useComponentCssInjection } from '@salt-ds/styles';
|
|
3
|
+
import { useWindow } from '@salt-ds/window';
|
|
4
|
+
import { Row } from '@vuu-ui/vuu-table';
|
|
5
|
+
import cx from 'clsx';
|
|
6
|
+
import { useInlineAddRow } from './useInlineAddRow.js';
|
|
7
|
+
import inlineAddRowCss from './InlineAddRow.css.js';
|
|
8
|
+
|
|
9
|
+
const classBase = "vuuInlineAddRow";
|
|
10
|
+
const InlineAddRow = ({
|
|
11
|
+
ariaRowIndex,
|
|
12
|
+
className,
|
|
13
|
+
columns,
|
|
14
|
+
style
|
|
15
|
+
}) => {
|
|
16
|
+
const targetWindow = useWindow();
|
|
17
|
+
useComponentCssInjection({
|
|
18
|
+
testId: "vuu-inline-add-row",
|
|
19
|
+
css: inlineAddRowCss,
|
|
20
|
+
window: targetWindow
|
|
21
|
+
});
|
|
22
|
+
const { containerRef, dataRow, draftRevision, inlineAddColumns } = useInlineAddRow({
|
|
23
|
+
columns
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsx("div", { className: cx(classBase, className), ref: containerRef, children: /* @__PURE__ */ jsx(
|
|
26
|
+
Row,
|
|
27
|
+
{
|
|
28
|
+
ariaRowIndex,
|
|
29
|
+
columns: inlineAddColumns,
|
|
30
|
+
dataRow,
|
|
31
|
+
offset: 0,
|
|
32
|
+
searchPattern: "",
|
|
33
|
+
showBookends: false,
|
|
34
|
+
style,
|
|
35
|
+
virtualColSpan: 0
|
|
36
|
+
},
|
|
37
|
+
draftRevision
|
|
38
|
+
) });
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { InlineAddRow };
|
|
42
|
+
//# sourceMappingURL=InlineAddRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineAddRow.js","sources":["../../../../../../../packages/vuu-table-extras/src/inline-add-row/InlineAddRow.tsx"],"sourcesContent":["import { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { Row } from \"@vuu-ui/vuu-table\";\nimport type { BaseRowProps } from \"@vuu-ui/vuu-table-types\";\nimport cx from \"clsx\";\nimport { useInlineAddRow } from \"./useInlineAddRow\";\n\nimport inlineAddRowCss from \"./InlineAddRow.css\";\n\nconst classBase = \"vuuInlineAddRow\";\n\nexport type InlineAddRowProps = BaseRowProps;\n\nexport const InlineAddRow = ({\n ariaRowIndex,\n className,\n columns,\n style,\n}: InlineAddRowProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-inline-add-row\",\n css: inlineAddRowCss,\n window: targetWindow,\n });\n\n const { containerRef, dataRow, draftRevision, inlineAddColumns } =\n useInlineAddRow({\n columns,\n });\n\n return (\n <div className={cx(classBase, className)} ref={containerRef}>\n <Row\n ariaRowIndex={ariaRowIndex}\n columns={inlineAddColumns}\n dataRow={dataRow}\n key={draftRevision}\n offset={0}\n searchPattern=\"\"\n showBookends={false}\n style={style}\n virtualColSpan={0}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AASA,MAAM,SAAY,GAAA,iBAAA;AAIX,MAAM,eAAe,CAAC;AAAA,EAC3B,YAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAyB,KAAA;AACvB,EAAA,MAAM,eAAe,SAAU,EAAA;AAC/B,EAAyB,wBAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,oBAAA;AAAA,IACR,GAAK,EAAA,eAAA;AAAA,IACL,MAAQ,EAAA;AAAA,GACT,CAAA;AAED,EAAA,MAAM,EAAE,YAAc,EAAA,OAAA,EAAS,aAAe,EAAA,gBAAA,KAC5C,eAAgB,CAAA;AAAA,IACd;AAAA,GACD,CAAA;AAEH,EACE,uBAAA,GAAA,CAAC,SAAI,SAAW,EAAA,EAAA,CAAG,WAAW,SAAS,CAAA,EAAG,KAAK,YAC7C,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,YAAA;AAAA,MACA,OAAS,EAAA,gBAAA;AAAA,MACT,OAAA;AAAA,MAEA,MAAQ,EAAA,CAAA;AAAA,MACR,aAAc,EAAA,EAAA;AAAA,MACd,YAAc,EAAA,KAAA;AAAA,MACd,KAAA;AAAA,MACA,cAAgB,EAAA;AAAA,KAAA;AAAA,IALX;AAAA,GAOT,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { useEditSession, withDataRowEditErrors, EditSession } from '@vuu-ui/vuu-data-editing';
|
|
2
|
+
import { isDataValueEditable, getCellRenderer, isNotHidden } from '@vuu-ui/vuu-utils';
|
|
3
|
+
import { useRef, useMemo, useCallback, useSyncExternalStore, useEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
const createSyntheticDataRow = (newRowState, columns) => withDataRowEditErrors(
|
|
6
|
+
{
|
|
7
|
+
...newRowState.values,
|
|
8
|
+
childCount: 0,
|
|
9
|
+
depth: 1,
|
|
10
|
+
hasColumn: (name) => columns.some((column) => column.name === name),
|
|
11
|
+
index: -1,
|
|
12
|
+
isExpanded: false,
|
|
13
|
+
isLeaf: true,
|
|
14
|
+
isSelected: false,
|
|
15
|
+
key: EditSession.newRowKey,
|
|
16
|
+
renderIndex: -1
|
|
17
|
+
},
|
|
18
|
+
newRowState.errors
|
|
19
|
+
);
|
|
20
|
+
const useInlineAddRow = ({ columns }) => {
|
|
21
|
+
const editSession = useEditSession(true);
|
|
22
|
+
const containerRef = useRef(null);
|
|
23
|
+
const inlineAddColumns = useMemo(
|
|
24
|
+
() => columns.map((column) => {
|
|
25
|
+
const editable = isDataValueEditable(column, "insert");
|
|
26
|
+
const inlineAddColumn = { ...column, editable };
|
|
27
|
+
return {
|
|
28
|
+
...inlineAddColumn,
|
|
29
|
+
CellRenderer: editable ? getCellRenderer(inlineAddColumn) : void 0
|
|
30
|
+
};
|
|
31
|
+
}),
|
|
32
|
+
[columns]
|
|
33
|
+
);
|
|
34
|
+
const visibleColumns = useMemo(
|
|
35
|
+
() => inlineAddColumns.filter(isNotHidden),
|
|
36
|
+
[inlineAddColumns]
|
|
37
|
+
);
|
|
38
|
+
const visibleInsertColumns = useMemo(
|
|
39
|
+
() => visibleColumns.filter((column) => isDataValueEditable(column, "insert")),
|
|
40
|
+
[visibleColumns]
|
|
41
|
+
);
|
|
42
|
+
const subscribeToNewRow = useCallback(
|
|
43
|
+
(onStoreChange) => {
|
|
44
|
+
editSession.on("newRow", onStoreChange);
|
|
45
|
+
return () => editSession.removeListener("newRow", onStoreChange);
|
|
46
|
+
},
|
|
47
|
+
[editSession]
|
|
48
|
+
);
|
|
49
|
+
const newRowState = useSyncExternalStore(
|
|
50
|
+
subscribeToNewRow,
|
|
51
|
+
() => editSession.newRowState,
|
|
52
|
+
() => editSession.newRowState
|
|
53
|
+
);
|
|
54
|
+
const dataRow = useMemo(
|
|
55
|
+
() => createSyntheticDataRow(newRowState, inlineAddColumns),
|
|
56
|
+
[inlineAddColumns, newRowState]
|
|
57
|
+
);
|
|
58
|
+
const previousValuesRef = useRef(newRowState.values);
|
|
59
|
+
const focusEditor = useCallback((index) => {
|
|
60
|
+
const cell = containerRef.current?.querySelectorAll("[data-field]")[index];
|
|
61
|
+
cell?.querySelector("input, button, [tabindex]")?.focus();
|
|
62
|
+
}, []);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
editSession.configureNewRow(visibleInsertColumns.map(({ name }) => name));
|
|
65
|
+
}, [editSession, visibleInsertColumns]);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
visibleInsertColumns.filter(
|
|
68
|
+
(column) => column.serverDataType === "boolean" && newRowState.values[column.name] === void 0
|
|
69
|
+
).forEach((column) => {
|
|
70
|
+
editSession.setNewRowValue(column.name, false);
|
|
71
|
+
});
|
|
72
|
+
}, [editSession, newRowState.values, visibleInsertColumns]);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
const firstInvalidIndex = visibleColumns.findIndex(
|
|
75
|
+
({ name }) => newRowState.errors[name] !== void 0
|
|
76
|
+
);
|
|
77
|
+
if (firstInvalidIndex !== -1) {
|
|
78
|
+
focusEditor(firstInvalidIndex);
|
|
79
|
+
}
|
|
80
|
+
}, [focusEditor, newRowState.errors, visibleColumns]);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
const previousValues = previousValuesRef.current;
|
|
83
|
+
previousValuesRef.current = newRowState.values;
|
|
84
|
+
if (Object.keys(previousValues).length > 0 && Object.keys(newRowState.values).length === 0 && Object.keys(newRowState.errors).length === 0) {
|
|
85
|
+
const firstEditableIndex = visibleColumns.findIndex(
|
|
86
|
+
(column) => isDataValueEditable(column, "insert")
|
|
87
|
+
);
|
|
88
|
+
if (firstEditableIndex !== -1) {
|
|
89
|
+
requestAnimationFrame(() => focusEditor(firstEditableIndex));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, [focusEditor, newRowState.errors, newRowState.values, visibleColumns]);
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
const container = containerRef.current;
|
|
95
|
+
if (!container) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const handleCommit = (event) => {
|
|
99
|
+
const target = event.target;
|
|
100
|
+
if (!(target instanceof Element)) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const cell = target.closest("[data-field]");
|
|
104
|
+
const cells = container.querySelectorAll("[data-field]");
|
|
105
|
+
const currentIndex = Array.from(cells).indexOf(cell ?? container);
|
|
106
|
+
const firstInvalidIndex = visibleColumns.findIndex(
|
|
107
|
+
({ name }) => editSession.newRowState.errors[name] !== void 0
|
|
108
|
+
);
|
|
109
|
+
const firstEditableIndex = visibleColumns.findIndex(
|
|
110
|
+
(column) => isDataValueEditable(column, "insert")
|
|
111
|
+
);
|
|
112
|
+
const nextEditableIndex = visibleColumns.findIndex(
|
|
113
|
+
(column, index) => index > currentIndex && isDataValueEditable(column, "insert")
|
|
114
|
+
);
|
|
115
|
+
if (firstInvalidIndex !== -1) {
|
|
116
|
+
requestAnimationFrame(() => focusEditor(firstInvalidIndex));
|
|
117
|
+
} else if (nextEditableIndex !== -1) {
|
|
118
|
+
focusEditor(nextEditableIndex);
|
|
119
|
+
} else if (firstEditableIndex !== -1) {
|
|
120
|
+
requestAnimationFrame(() => focusEditor(firstEditableIndex));
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
container.addEventListener("vuu-commit", handleCommit);
|
|
124
|
+
return () => container.removeEventListener("vuu-commit", handleCommit);
|
|
125
|
+
}, [editSession, focusEditor, visibleColumns]);
|
|
126
|
+
return {
|
|
127
|
+
containerRef,
|
|
128
|
+
dataRow,
|
|
129
|
+
draftRevision: newRowState.draftRevision,
|
|
130
|
+
inlineAddColumns
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export { useInlineAddRow };
|
|
135
|
+
//# sourceMappingURL=useInlineAddRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInlineAddRow.js","sources":["../../../../../../../packages/vuu-table-extras/src/inline-add-row/useInlineAddRow.ts"],"sourcesContent":["import {\n EditSession,\n useEditSession,\n withDataRowEditErrors,\n type NewRowState,\n} from \"@vuu-ui/vuu-data-editing\";\nimport type { DataRow, RuntimeColumnDescriptor } from \"@vuu-ui/vuu-table-types\";\nimport {\n getCellRenderer,\n isDataValueEditable,\n isNotHidden,\n} from \"@vuu-ui/vuu-utils\";\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useSyncExternalStore,\n} from \"react\";\n\nconst createSyntheticDataRow = (\n newRowState: NewRowState,\n columns: RuntimeColumnDescriptor[],\n): DataRow =>\n withDataRowEditErrors(\n {\n ...newRowState.values,\n childCount: 0,\n depth: 1,\n hasColumn: (name: string) =>\n columns.some((column) => column.name === name),\n index: -1,\n isExpanded: false,\n isLeaf: true,\n isSelected: false,\n key: EditSession.newRowKey,\n renderIndex: -1,\n } as DataRow,\n newRowState.errors,\n );\n\nexport interface UseInlineAddRowProps {\n columns: RuntimeColumnDescriptor[];\n}\n\nexport const useInlineAddRow = ({ columns }: UseInlineAddRowProps) => {\n const editSession = useEditSession(true);\n const containerRef = useRef<HTMLDivElement>(null);\n const inlineAddColumns = useMemo(\n () =>\n columns.map((column) => {\n const editable = isDataValueEditable(column, \"insert\");\n const inlineAddColumn = { ...column, editable };\n return {\n ...inlineAddColumn,\n CellRenderer: editable ? getCellRenderer(inlineAddColumn) : undefined,\n };\n }),\n [columns],\n );\n const visibleColumns = useMemo(\n () => inlineAddColumns.filter(isNotHidden),\n [inlineAddColumns],\n );\n const visibleInsertColumns = useMemo(\n () =>\n visibleColumns.filter((column) => isDataValueEditable(column, \"insert\")),\n [visibleColumns],\n );\n const subscribeToNewRow = useCallback(\n (onStoreChange: () => void) => {\n editSession.on(\"newRow\", onStoreChange);\n return () => editSession.removeListener(\"newRow\", onStoreChange);\n },\n [editSession],\n );\n const newRowState = useSyncExternalStore(\n subscribeToNewRow,\n () => editSession.newRowState,\n () => editSession.newRowState,\n );\n const dataRow = useMemo(\n () => createSyntheticDataRow(newRowState, inlineAddColumns),\n [inlineAddColumns, newRowState],\n );\n const previousValuesRef = useRef(newRowState.values);\n\n const focusEditor = useCallback((index: number) => {\n const cell =\n containerRef.current?.querySelectorAll<HTMLElement>(\"[data-field]\")[\n index\n ];\n cell?.querySelector<HTMLElement>(\"input, button, [tabindex]\")?.focus();\n }, []);\n\n useEffect(() => {\n editSession.configureNewRow(visibleInsertColumns.map(({ name }) => name));\n }, [editSession, visibleInsertColumns]);\n\n useEffect(() => {\n visibleInsertColumns\n .filter(\n (column) =>\n column.serverDataType === \"boolean\" &&\n newRowState.values[column.name] === undefined,\n )\n .forEach((column) => {\n editSession.setNewRowValue(column.name, false);\n });\n }, [editSession, newRowState.values, visibleInsertColumns]);\n\n useEffect(() => {\n const firstInvalidIndex = visibleColumns.findIndex(\n ({ name }) => newRowState.errors[name] !== undefined,\n );\n if (firstInvalidIndex !== -1) {\n focusEditor(firstInvalidIndex);\n }\n }, [focusEditor, newRowState.errors, visibleColumns]);\n\n useEffect(() => {\n const previousValues = previousValuesRef.current;\n previousValuesRef.current = newRowState.values;\n if (\n Object.keys(previousValues).length > 0 &&\n Object.keys(newRowState.values).length === 0 &&\n Object.keys(newRowState.errors).length === 0\n ) {\n const firstEditableIndex = visibleColumns.findIndex((column) =>\n isDataValueEditable(column, \"insert\"),\n );\n if (firstEditableIndex !== -1) {\n requestAnimationFrame(() => focusEditor(firstEditableIndex));\n }\n }\n }, [focusEditor, newRowState.errors, newRowState.values, visibleColumns]);\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container) {\n return;\n }\n\n const handleCommit = (event: Event) => {\n const target = event.target;\n if (!(target instanceof Element)) {\n return;\n }\n const cell = target.closest<HTMLElement>(\"[data-field]\");\n const cells = container.querySelectorAll<HTMLElement>(\"[data-field]\");\n const currentIndex = Array.from(cells).indexOf(cell ?? container);\n const firstInvalidIndex = visibleColumns.findIndex(\n ({ name }) => editSession.newRowState.errors[name] !== undefined,\n );\n const firstEditableIndex = visibleColumns.findIndex((column) =>\n isDataValueEditable(column, \"insert\"),\n );\n const nextEditableIndex = visibleColumns.findIndex(\n (column, index) =>\n index > currentIndex && isDataValueEditable(column, \"insert\"),\n );\n if (firstInvalidIndex !== -1) {\n requestAnimationFrame(() => focusEditor(firstInvalidIndex));\n } else if (nextEditableIndex !== -1) {\n focusEditor(nextEditableIndex);\n } else if (firstEditableIndex !== -1) {\n requestAnimationFrame(() => focusEditor(firstEditableIndex));\n }\n };\n\n container.addEventListener(\"vuu-commit\", handleCommit);\n return () => container.removeEventListener(\"vuu-commit\", handleCommit);\n }, [editSession, focusEditor, visibleColumns]);\n\n return {\n containerRef,\n dataRow,\n draftRevision: newRowState.draftRevision,\n inlineAddColumns,\n };\n};\n"],"names":[],"mappings":";;;;AAoBA,MAAM,sBAAA,GAAyB,CAC7B,WAAA,E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BAAuB,CAAI,CAAA,EAAA;AACpC,QAAsB,qBAAA,CAAA,MAAM,WAAY,CAAA,kBAAkB,CAAC,CAAA;AAAA;AAC7D,KACF;AAEA,IAAU,SAAA,CAAA,gBAAA,CAAiB,cAAc,YAAY,CAAA;AACrD,IAAA,OAAO,MAAM,SAAA,CAAU,mBAAoB,CAAA,YAAA,EAAc,YAAY,CAAA;AAAA,GACpE,EAAA,CAAC,WAAa,EAAA,WAAA,EAAa,cAAc,CAAC,CAAA;AAE7C,EAAO,OAAA;AAAA,IACL,YAAA;AAAA,IACA,OAAA;AAAA,IACA,eAAe,WAAY,CAAA,aAAA;AAAA,IAC3B;AAAA,GACF;AACF;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var tableFooterCss = ".vuuTableFooter {\n
|
|
1
|
+
var tableFooterCss = ".vuuTableFooter {\n background-color: var(--salt-container-secondary-background);\n display: grid;\n --table-footer-height: var(--vuuTableFooter-height, 32px);\n flex: 0 0 var(--table-footer-height);\n grid-template-areas: \"panel-start panel-center panel-end\";\n grid-template-columns: 1fr 1fr 1fr;\n grid-template-rows: auto;\n\n height: var(--table-footer-height);\n\n .vuuTableFooterTray {\n align-items: center;\n display: flex;\n gap: var(--salt-spacing-100);\n margin: 0 var(--salt-spacing-200);\n\n &.vuuTableFooterTray-center {\n grid-area: panel-center;\n justify-self: center;\n }\n &.vuuTableFooterTray-end {\n grid-area: panel-end;\n justify-self: end;\n }\n }\n}\n";
|
|
2
2
|
|
|
3
3
|
export { tableFooterCss as default };
|
|
4
4
|
//# sourceMappingURL=TableFooter.css.js.map
|
|
@@ -5,8 +5,11 @@ import { useWindow } from '@salt-ds/window';
|
|
|
5
5
|
import tableFooterCss from './TableFooter.css.js';
|
|
6
6
|
|
|
7
7
|
const classBase = "vuuTableFooter";
|
|
8
|
-
const TableFooterTray = ({ children }) => {
|
|
9
|
-
return /* @__PURE__ */ jsx("div", { className: `${classBase}Tray`,
|
|
8
|
+
const TableFooterTray = ({ children, position = "end" }) => {
|
|
9
|
+
return /* @__PURE__ */ jsx("div", { className: cx(`${classBase}Tray`, {
|
|
10
|
+
[`${classBase}Tray-center`]: position === "center",
|
|
11
|
+
[`${classBase}Tray-end`]: position === "end"
|
|
12
|
+
}), children });
|
|
10
13
|
};
|
|
11
14
|
const TableFooter = ({
|
|
12
15
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFooter.js","sources":["../../../../../../../packages/vuu-table-extras/src/table-footer/TableFooter.tsx"],"sourcesContent":["import cx from \"clsx\";\nimport { HTMLAttributes, ReactNode } from \"react\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\n\nimport tableFooterCss from \"./TableFooter.css\";\n\nexport interface TableFooterProps extends HTMLAttributes<HTMLDivElement> {\n onInvokeAction?: (action: string) => void;\n tooltrayActions?: ReactNode;\n}\n\nconst classBase = \"vuuTableFooter\";\n\nexport const TableFooterTray = ({ children }: { children: ReactNode }) => {\n return <div className={`${classBase}Tray`}>{children}</div>;\n};\n\nexport const TableFooter = ({\n children,\n className,\n onInvokeAction,\n tooltrayActions,\n ...htmlAttributes\n}: TableFooterProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-table-footer\",\n css: tableFooterCss,\n window: targetWindow,\n });\n\n return (\n <div {...htmlAttributes} className={cx(classBase, className)}>\n {children}\n {tooltrayActions ? (\n <div className={`${classBase}-tooltray`}>{tooltrayActions}</div>\n ) : null}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAYA,MAAM,SAAY,GAAA,gBAAA;AAEX,MAAM,
|
|
1
|
+
{"version":3,"file":"TableFooter.js","sources":["../../../../../../../packages/vuu-table-extras/src/table-footer/TableFooter.tsx"],"sourcesContent":["import cx from \"clsx\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\n\nimport tableFooterCss from \"./TableFooter.css\";\n\nexport interface TableFooterProps extends HTMLAttributes<HTMLDivElement> {\n onInvokeAction?: (action: string) => void;\n tooltrayActions?: ReactNode;\n}\n\nconst classBase = \"vuuTableFooter\";\n\nexport const TableFooterTray = ({ children, position = 'end' }: { children: ReactNode, position?: 'center' | 'end' }) => {\n return <div className={cx(`${classBase}Tray`, {\n [`${classBase}Tray-center`]: position === 'center',\n [`${classBase}Tray-end`]: position === 'end'\n })}>{children}</div>;\n};\n\nexport const TableFooter = ({\n children,\n className,\n onInvokeAction,\n tooltrayActions,\n ...htmlAttributes\n}: TableFooterProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-table-footer\",\n css: tableFooterCss,\n window: targetWindow,\n });\n\n return (\n <div {...htmlAttributes} className={cx(classBase, className)}>\n {children}\n {tooltrayActions ? (\n <div className={`${classBase}-tooltray`}>{tooltrayActions}</div>\n ) : null}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAYA,MAAM,SAAY,GAAA,gBAAA;AAEX,MAAM,kBAAkB,CAAC,EAAE,QAAU,EAAA,QAAA,GAAW,OAAkE,KAAA;AACvH,EAAA,2BAAQ,KAAI,EAAA,EAAA,SAAA,EAAW,EAAG,CAAA,CAAA,EAAG,SAAS,CAAQ,IAAA,CAAA,EAAA;AAAA,IAC5C,CAAC,CAAA,EAAG,SAAS,CAAA,WAAA,CAAa,GAAG,QAAa,KAAA,QAAA;AAAA,IAC1C,CAAC,CAAA,EAAG,SAAS,CAAA,QAAA,CAAU,GAAG,QAAa,KAAA;AAAA,GACxC,GAAI,QAAS,EAAA,CAAA;AAChB;AAEO,MAAM,cAAc,CAAC;AAAA,EAC1B,QAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,GAAG;AACL,CAAwB,KAAA;AACtB,EAAA,MAAM,eAAe,SAAU,EAAA;AAC/B,EAAyB,wBAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,kBAAA;AAAA,IACR,GAAK,EAAA,cAAA;AAAA,IACL,MAAQ,EAAA;AAAA,GACT,CAAA;AAED,EACE,uBAAA,IAAA,CAAC,SAAK,GAAG,cAAA,EAAgB,WAAW,EAAG,CAAA,SAAA,EAAW,SAAS,CACxD,EAAA,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,eAAA,uBACE,KAAI,EAAA,EAAA,SAAA,EAAW,GAAG,SAAS,CAAA,SAAA,CAAA,EAAc,2BAAgB,CACxD,GAAA;AAAA,GACN,EAAA,CAAA;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "3.0.0-beta.2",
|
|
3
3
|
"author": "heswell",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@vuu-ui/vuu-filter-types": "
|
|
7
|
-
"@vuu-ui/vuu-protocol-types": "
|
|
6
|
+
"@vuu-ui/vuu-filter-types": "3.0.0-beta.2",
|
|
7
|
+
"@vuu-ui/vuu-protocol-types": "3.0.0-beta.2"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@vuu-ui/vuu-codemirror": "
|
|
11
|
-
"@vuu-ui/vuu-data-
|
|
12
|
-
"@vuu-ui/vuu-data-
|
|
13
|
-
"@vuu-ui/vuu-
|
|
14
|
-
"@vuu-ui/vuu-
|
|
15
|
-
"@vuu-ui/vuu-
|
|
16
|
-
"@vuu-ui/vuu-
|
|
17
|
-
"@vuu-ui/vuu-
|
|
10
|
+
"@vuu-ui/vuu-codemirror": "3.0.0-beta.2",
|
|
11
|
+
"@vuu-ui/vuu-data-editing": "3.0.0-beta.2",
|
|
12
|
+
"@vuu-ui/vuu-data-react": "3.0.0-beta.2",
|
|
13
|
+
"@vuu-ui/vuu-data-types": "3.0.0-beta.2",
|
|
14
|
+
"@vuu-ui/vuu-table-types": "3.0.0-beta.2",
|
|
15
|
+
"@vuu-ui/vuu-popups": "3.0.0-beta.2",
|
|
16
|
+
"@vuu-ui/vuu-table": "3.0.0-beta.2",
|
|
17
|
+
"@vuu-ui/vuu-utils": "3.0.0-beta.2",
|
|
18
|
+
"@vuu-ui/vuu-ui-controls": "3.0.0-beta.2",
|
|
18
19
|
"@lezer/lr": "1.4.2",
|
|
19
20
|
"@salt-ds/core": "1.54.1",
|
|
20
21
|
"@salt-ds/lab": "1.0.0-alpha.83",
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { DataSource } from "@vuu-ui/vuu-data-types";
|
|
3
|
+
import type { EditSession } from "@vuu-ui/vuu-data-editing";
|
|
3
4
|
import type { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
4
5
|
import type { CsvParseError, CsvParseOptions } from "./parse/csv-parse";
|
|
5
6
|
import type { CsvValidationStructuredError } from "./parse/csv-schema-validation";
|
|
6
7
|
import type { CsvUploadTableData } from "./parse/csv-upload-utils";
|
|
7
8
|
export type CsvUploadImportedResult = {
|
|
8
|
-
|
|
9
|
+
tableData: CsvUploadTableData;
|
|
10
|
+
};
|
|
11
|
+
export type CsvUploadPreviewResult = {
|
|
12
|
+
dataSource: DataSource;
|
|
13
|
+
editSession: EditSession;
|
|
9
14
|
tableData: CsvUploadTableData;
|
|
10
15
|
};
|
|
11
16
|
export type CsvUploadErrors = {
|
|
@@ -32,10 +37,12 @@ export type CsvUploadPhase = "idle" | "processing" | "preview-ready" | "importin
|
|
|
32
37
|
export interface CsvUploadProps {
|
|
33
38
|
children?: ReactNode;
|
|
34
39
|
dataSource: DataSource;
|
|
40
|
+
embedded?: boolean;
|
|
35
41
|
onImportSessionStarted?: (dataSource: DataSource) => void;
|
|
36
42
|
onImportSessionEnded?: (result: CsvUploadSessionEndResult) => void;
|
|
37
43
|
onError?: (result: CsvUploadErrorResult | undefined) => void;
|
|
38
44
|
onImported?: (result: CsvUploadImportedResult) => void;
|
|
45
|
+
onPreview?: (result: CsvUploadPreviewResult) => void;
|
|
39
46
|
onProcessingStarted?: () => void;
|
|
40
47
|
dialogTitle?: string;
|
|
41
48
|
maxRows?: number;
|
|
@@ -43,5 +50,6 @@ export interface CsvUploadProps {
|
|
|
43
50
|
onClose?: () => void;
|
|
44
51
|
open?: boolean;
|
|
45
52
|
parseOptions?: CsvParseOptions;
|
|
53
|
+
importMode?: "direct" | "preview";
|
|
46
54
|
}
|
|
47
55
|
export declare const CsvUpload: (props: CsvUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TableSchema } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import { type EditSession } from "@vuu-ui/vuu-data-editing";
|
|
3
|
+
import type { HTMLAttributes } from "react";
|
|
4
|
+
export interface DataUploadPreviewProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
5
|
+
editSession: EditSession;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
saveLabel?: string;
|
|
8
|
+
tableSchema: TableSchema;
|
|
9
|
+
}
|
|
10
|
+
export declare const DataUploadPreview: ({ className, editSession, onClose, saveLabel, tableSchema, ...htmlAttributes }: DataUploadPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DataSource } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import type { EditSession } from "@vuu-ui/vuu-data-editing";
|
|
3
|
+
export interface UseDataUploadPreviewProps {
|
|
4
|
+
dataSource: DataSource;
|
|
5
|
+
editSession: EditSession;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const getSessionDataSource: (editSession: EditSession) => DataSource;
|
|
9
|
+
export declare const useDataUploadPreview: ({ dataSource, editSession, onClose, }: UseDataUploadPreviewProps) => {
|
|
10
|
+
canCancel: boolean;
|
|
11
|
+
canSave: boolean;
|
|
12
|
+
hasSelection: boolean;
|
|
13
|
+
onCancel: () => Promise<void>;
|
|
14
|
+
onDelete: () => Promise<void>;
|
|
15
|
+
onSave: (force?: boolean) => Promise<void>;
|
|
16
|
+
sessionError: string | undefined;
|
|
17
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CsvUpload, type CsvUploadError, type CsvUploadProps, type CsvUploadErrorResult, type CsvUploadErrors, type CsvUploadPhase, type CsvUploadImportedResult, type CsvUploadSessionEndReason, type CsvUploadSessionEndResult, type CsvUploadSessionTable, } from "./CsvUpload";
|
|
1
|
+
export { CsvUpload, type CsvUploadError, type CsvUploadProps, type CsvUploadErrorResult, type CsvUploadErrors, type CsvUploadPhase, type CsvUploadImportedResult, type CsvUploadPreviewResult, type CsvUploadSessionEndReason, type CsvUploadSessionEndResult, type CsvUploadSessionTable, } from "./CsvUpload";
|
|
2
2
|
export { useCsvUpload, type CsvUploadHookProps, type UseCsvUploadReturn, } from "./useCsvUpload";
|
|
3
|
-
export {
|
|
3
|
+
export { DataUploadPreview, type DataUploadPreviewProps, } from "./data-upload-preview/DataUploadPreview";
|
|
4
4
|
export { validateCsvAgainstSchema, type CsvValidationOptions, type CsvValidationResult, } from "./parse/csv-schema-validation";
|
|
5
5
|
export { parseCsv, type CsvParseOptions, type CsvParseResult, } from "./parse/csv-parse";
|
|
6
6
|
export { CsvValidationErrorEnum, CsvParseErrorEnum, type CsvError, type CsvErrorMap, type CsvStructuredError, type CsvValidationError, type CsvValidationErrorMap, type CsvValidationErrorType, type CsvValidationStructuredError, type CsvParseError, type CsvParseErrorMap, } from "./parse/csv-errors";
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import type { DataSource, TableSchema } from "@vuu-ui/vuu-data-types";
|
|
2
2
|
import { type CsvParseOptions } from "./parse/csv-parse";
|
|
3
3
|
import { type CsvValidationResult } from "./parse/csv-schema-validation";
|
|
4
|
-
import type { CsvUploadErrorResult, CsvUploadImportedResult, CsvUploadSessionEndResult, CsvUploadSessionTable } from "./CsvUpload";
|
|
4
|
+
import type { CsvUploadErrorResult, CsvUploadImportedResult, CsvUploadPreviewResult, CsvUploadSessionEndResult, CsvUploadSessionTable } from "./CsvUpload";
|
|
5
5
|
export interface CsvUploadHookProps {
|
|
6
6
|
dataSource: DataSource;
|
|
7
|
+
importMode?: "direct" | "preview";
|
|
7
8
|
maxRows?: number;
|
|
8
9
|
onImportSessionEnded?: (result: CsvUploadSessionEndResult) => void;
|
|
9
10
|
onImportSessionStarted?: (dataSource: DataSource) => void;
|
|
10
11
|
onError?: (result: CsvUploadErrorResult | undefined) => void;
|
|
11
12
|
onImported?: (result: CsvUploadImportedResult) => void;
|
|
13
|
+
onPreview?: (result: CsvUploadPreviewResult) => void;
|
|
12
14
|
onProcessingStarted?: () => void;
|
|
13
15
|
parseOptions?: CsvParseOptions;
|
|
14
16
|
}
|
|
15
17
|
export type UseCsvUploadReturn = {
|
|
16
18
|
canImport: boolean;
|
|
17
|
-
|
|
19
|
+
cancelImport: () => Promise<void>;
|
|
20
|
+
importData: () => Promise<boolean>;
|
|
18
21
|
isImporting: boolean;
|
|
19
22
|
isProcessingFile: boolean;
|
|
20
23
|
onDrop: (_event: React.DragEvent<HTMLDivElement>, files: File[]) => void;
|
|
@@ -23,4 +26,4 @@ export type UseCsvUploadReturn = {
|
|
|
23
26
|
schema: TableSchema | undefined;
|
|
24
27
|
validation: CsvValidationResult | undefined;
|
|
25
28
|
};
|
|
26
|
-
export declare const useCsvUpload: ({ dataSource, onImportSessionEnded, onImportSessionStarted, onError, onImported, onProcessingStarted, maxRows, parseOptions, }: CsvUploadHookProps) => UseCsvUploadReturn;
|
|
29
|
+
export declare const useCsvUpload: ({ dataSource, importMode, onImportSessionEnded, onImportSessionStarted, onError, onImported, onPreview, onProcessingStarted, maxRows, parseOptions, }: CsvUploadHookProps) => UseCsvUploadReturn;
|
package/types/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { useColumnSettings } from "./column-settings-panel/useColumnSettings";
|
|
|
17
17
|
export { DataSourceStats, type DataSourceStatsProps, } from "./datasource-stats/DatasourceStats";
|
|
18
18
|
export { FreezeControl } from "./freeze-control/FreezeControl";
|
|
19
19
|
export { FrozenBanner } from "./freeze-control/FrozenBanner";
|
|
20
|
+
export * from "./inline-add-row";
|
|
20
21
|
export { TabbedTableConfigPanel } from "./tabbed-table-config-panel/TabbedTableConfigPanel";
|
|
21
22
|
export { TabbedTableSettingsAction } from "./tabbed-table-config-panel/TabbedTableSettingsAction";
|
|
22
23
|
export { TableFooter, TableFooterTray } from "./table-footer/TableFooter";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { DataRow, RuntimeColumnDescriptor } from "@vuu-ui/vuu-table-types";
|
|
2
|
+
export interface UseInlineAddRowProps {
|
|
3
|
+
columns: RuntimeColumnDescriptor[];
|
|
4
|
+
}
|
|
5
|
+
export declare const useInlineAddRow: ({ columns }: UseInlineAddRowProps) => {
|
|
6
|
+
containerRef: import("react").RefObject<HTMLDivElement | null>;
|
|
7
|
+
dataRow: DataRow;
|
|
8
|
+
draftRevision: number;
|
|
9
|
+
inlineAddColumns: {
|
|
10
|
+
CellRenderer: import("react").FunctionComponent<import("@vuu-ui/vuu-table-types").TableCellRendererProps> | undefined;
|
|
11
|
+
editable: boolean;
|
|
12
|
+
align?: "left" | "right";
|
|
13
|
+
ariaColIndex: number;
|
|
14
|
+
HeaderCellContentRenderer?: import("react").FunctionComponent<Omit<import("@vuu-ui/vuu-table-types").HeaderCellProps, "id" | "index">>;
|
|
15
|
+
HeaderCellLabelRenderer?: import("react").FunctionComponent<Omit<import("@vuu-ui/vuu-table-types").HeaderCellProps, "id" | "index">>;
|
|
16
|
+
canStretch?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
clientSideEditValidationCheck?: import("@vuu-ui/vuu-data-types").DataValueValidationChecker;
|
|
19
|
+
draggable?: boolean;
|
|
20
|
+
filter?: import("@vuu-ui/vuu-filter-types").Filter;
|
|
21
|
+
flex?: number;
|
|
22
|
+
heading?: [...string[]];
|
|
23
|
+
isGroup?: boolean;
|
|
24
|
+
isSystemColumn?: boolean;
|
|
25
|
+
label: string;
|
|
26
|
+
marginLeft?: number;
|
|
27
|
+
moving?: boolean;
|
|
28
|
+
originalIdx?: number;
|
|
29
|
+
pinnedOffset?: number;
|
|
30
|
+
pinnedWidth?: number;
|
|
31
|
+
resizeable?: boolean;
|
|
32
|
+
resizing?: boolean;
|
|
33
|
+
sortable?: boolean;
|
|
34
|
+
sorted?: import("@vuu-ui/vuu-table-types").ColumnSort;
|
|
35
|
+
valueFormatter: import("@vuu-ui/vuu-table-types").ValueFormatter;
|
|
36
|
+
width: number;
|
|
37
|
+
aggregate?: import("@vuu-ui/vuu-protocol-types").VuuAggType;
|
|
38
|
+
allowColumnHeaderMenu?: false;
|
|
39
|
+
colHeaderContentRenderer?: string;
|
|
40
|
+
colHeaderLabelRenderer?: string;
|
|
41
|
+
getIcon?: (row: DataRow) => string | undefined;
|
|
42
|
+
groupable?: boolean;
|
|
43
|
+
hidden?: boolean;
|
|
44
|
+
locked?: Exclude<import("@vuu-ui/vuu-table-types").PinLocation, "left"> | false;
|
|
45
|
+
maxWidth?: number;
|
|
46
|
+
minWidth?: number;
|
|
47
|
+
pin?: import("@vuu-ui/vuu-table-types").PinLocation | false;
|
|
48
|
+
removeable?: boolean;
|
|
49
|
+
selected?: boolean;
|
|
50
|
+
source?: "client" | "server";
|
|
51
|
+
status?: import("@salt-ds/core").ValidationStatus;
|
|
52
|
+
editableBulk?: import("@vuu-ui/vuu-data-types").BulkEdit;
|
|
53
|
+
name: string;
|
|
54
|
+
serverDataType?: import("@vuu-ui/vuu-protocol-types").VuuColumnDataType;
|
|
55
|
+
type?: import("@vuu-ui/vuu-data-types").DataValueType;
|
|
56
|
+
}[];
|
|
57
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from "react";
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
export interface TableFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
onInvokeAction?: (action: string) => void;
|
|
4
4
|
tooltrayActions?: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export declare const TableFooterTray: ({ children }: {
|
|
6
|
+
export declare const TableFooterTray: ({ children, position }: {
|
|
7
7
|
children: ReactNode;
|
|
8
|
+
position?: "center" | "end";
|
|
8
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export declare const TableFooter: ({ children, className, onInvokeAction, tooltrayActions, ...htmlAttributes }: TableFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
|
|
6
|
-
const useCsvUploadSessionPreview = (sessionTable) => {
|
|
7
|
-
const { VuuDataSource, getServerAPI } = vuuUtils.useData();
|
|
8
|
-
const [previewConfig, setPreviewConfig] = react.useState();
|
|
9
|
-
const [previewDataSource, setPreviewDataSource] = react.useState();
|
|
10
|
-
const [previewError, setPreviewError] = react.useState();
|
|
11
|
-
const [isLoadingPreview, setIsLoadingPreview] = react.useState(false);
|
|
12
|
-
react.useEffect(() => {
|
|
13
|
-
let cancelled = false;
|
|
14
|
-
if (!sessionTable) {
|
|
15
|
-
setPreviewDataSource(void 0);
|
|
16
|
-
setPreviewConfig(void 0);
|
|
17
|
-
setPreviewError(void 0);
|
|
18
|
-
setIsLoadingPreview(false);
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const loadSessionTablePreview = async () => {
|
|
22
|
-
setIsLoadingPreview(true);
|
|
23
|
-
setPreviewError(void 0);
|
|
24
|
-
try {
|
|
25
|
-
const server = await getServerAPI();
|
|
26
|
-
const schema = await server.getTableSchema(sessionTable);
|
|
27
|
-
if (cancelled) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const columnDescriptors = schema.columns.map(
|
|
31
|
-
({ name, serverDataType }) => name === "vuuMsg" ? { name, serverDataType, width: 300, label: "Error" } : { name, serverDataType }
|
|
32
|
-
);
|
|
33
|
-
setPreviewConfig({
|
|
34
|
-
columns: columnDescriptors,
|
|
35
|
-
zebraStripes: true,
|
|
36
|
-
rowSeparators: true,
|
|
37
|
-
columnSeparators: true
|
|
38
|
-
});
|
|
39
|
-
setPreviewDataSource(
|
|
40
|
-
new VuuDataSource({
|
|
41
|
-
columns: columnDescriptors.map(({ name }) => name),
|
|
42
|
-
table: sessionTable
|
|
43
|
-
})
|
|
44
|
-
);
|
|
45
|
-
} catch (error) {
|
|
46
|
-
if (!cancelled) {
|
|
47
|
-
setPreviewDataSource(void 0);
|
|
48
|
-
setPreviewConfig(void 0);
|
|
49
|
-
setPreviewError(
|
|
50
|
-
`Failed to load session table preview: ${String(error)}`
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
} finally {
|
|
54
|
-
if (!cancelled) {
|
|
55
|
-
setIsLoadingPreview(false);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
loadSessionTablePreview();
|
|
60
|
-
return () => {
|
|
61
|
-
cancelled = true;
|
|
62
|
-
};
|
|
63
|
-
}, [VuuDataSource, getServerAPI, sessionTable]);
|
|
64
|
-
return {
|
|
65
|
-
isLoadingPreview,
|
|
66
|
-
previewConfig,
|
|
67
|
-
previewDataSource,
|
|
68
|
-
previewError
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
exports.useCsvUploadSessionPreview = useCsvUploadSessionPreview;
|
|
73
|
-
//# sourceMappingURL=useCsvUploadSessionPreview.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCsvUploadSessionPreview.js","sources":["../../../../../../../packages/vuu-table-extras/src/csv-upload/useCsvUploadSessionPreview.ts"],"sourcesContent":["import type { DataSource } from \"@vuu-ui/vuu-data-types\";\nimport { useData } from \"@vuu-ui/vuu-utils\";\nimport type { ColumnDescriptor, TableConfig } from \"@vuu-ui/vuu-table-types\";\nimport { useEffect, useState } from \"react\";\nimport type { CsvUploadSessionTable } from \"./CsvUpload\";\n\nexport type UseCsvUploadSessionPreviewReturn = {\n isLoadingPreview: boolean;\n previewConfig: TableConfig | undefined;\n previewDataSource: DataSource | undefined;\n previewError: string | undefined;\n};\n\nexport const useCsvUploadSessionPreview = (\n sessionTable: CsvUploadSessionTable | undefined,\n): UseCsvUploadSessionPreviewReturn => {\n const { VuuDataSource, getServerAPI } = useData();\n const [previewConfig, setPreviewConfig] = useState<TableConfig | undefined>();\n const [previewDataSource, setPreviewDataSource] = useState<\n DataSource | undefined\n >();\n const [previewError, setPreviewError] = useState<string | undefined>();\n const [isLoadingPreview, setIsLoadingPreview] = useState(false);\n\n useEffect(() => {\n let cancelled = false;\n\n if (!sessionTable) {\n setPreviewDataSource(undefined);\n setPreviewConfig(undefined);\n setPreviewError(undefined);\n setIsLoadingPreview(false);\n return;\n }\n\n const loadSessionTablePreview = async () => {\n setIsLoadingPreview(true);\n setPreviewError(undefined);\n\n try {\n const server = await getServerAPI();\n const schema = await server.getTableSchema(sessionTable);\n\n if (cancelled) {\n return;\n }\n\n const columnDescriptors: ColumnDescriptor[] = schema.columns.map(\n ({ name, serverDataType }) =>\n name === \"vuuMsg\"\n ? { name, serverDataType, width: 300, label: \"Error\" }\n : { name, serverDataType },\n );\n\n setPreviewConfig({\n columns: columnDescriptors,\n zebraStripes: true,\n rowSeparators: true,\n columnSeparators: true,\n });\n setPreviewDataSource(\n new VuuDataSource({\n columns: columnDescriptors.map(({ name }) => name),\n table: sessionTable,\n }),\n );\n } catch (error) {\n if (!cancelled) {\n setPreviewDataSource(undefined);\n setPreviewConfig(undefined);\n setPreviewError(\n `Failed to load session table preview: ${String(error)}`,\n );\n }\n } finally {\n if (!cancelled) {\n setIsLoadingPreview(false);\n }\n }\n };\n\n loadSessionTablePreview();\n\n return () => {\n cancelled = true;\n };\n }, [VuuDataSource, getServerAPI, sessionTable]);\n\n return {\n isLoadingPreview,\n previewConfig,\n previewDataSource,\n previewError,\n };\n};\n"],"names":["useData","useState","useEffect"],"mappings":";;;;;AAaa,MAAA,0BAAA,GAA6B,CACxC,YACqC,KAAA;AACrC,EAAA,MAAM,EAAE,aAAA,EAAe,YAAa,EAAA,GAAIA,gBAAQ,EAAA;AAChD,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CAAA,GAAIC,cAAkC,EAAA;AAC5E,EAAA,MAAM,CAAC,iBAAA,EAAmB,oBAAoB,CAAA,GAAIA,cAEhD,EAAA;AACF,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAIA,cAA6B,EAAA;AACrE,EAAA,MAAM,CAAC,gBAAA,EAAkB,mBAAmB,CAAA,GAAIA,eAAS,KAAK,CAAA;AAE9D,EAAAC,eAAA,CAAU,MAAM;AACd,IAAA,IAAI,SAAY,GAAA,KAAA;AAEhB,IAAA,IAAI,CAAC,YAAc,EAAA;AACjB,MAAA,oBAAA,CAAqB,KAAS,CAAA,CAAA;AAC9B,MAAA,gBAAA,CAAiB,KAAS,CAAA,CAAA;AAC1B,MAAA,eAAA,CAAgB,KAAS,CAAA,CAAA;AACzB,MAAA,mBAAA,CAAoB,KAAK,CAAA;AACzB,MAAA;AAAA;AAGF,IAAA,MAAM,0BAA0B,YAAY;AAC1C,MAAA,mBAAA,CAAoB,IAAI,CAAA;AACxB,MAAA,eAAA,CAAgB,KAAS,CAAA,CAAA;AAEzB,MAAI,IAAA;AACF,QAAM,MAAA,MAAA,GAAS,MAAM,YAAa,EAAA;AAClC,QAAA,MAAM,MAAS,GAAA,MAAM,MAAO,CAAA,cAAA,CAAe,YAAY,CAAA;AAEvD,QAAA,IAAI,SAAW,EAAA;AACb,UAAA;AAAA;AAGF,QAAM,MAAA,iBAAA,GAAwC,OAAO,OAAQ,CAAA,GAAA;AAAA,UAC3D,CAAC,EAAE,IAAA,EAAM,cAAe,EAAA,KACtB,SAAS,QAC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