@ai-matrx/design-system 0.28.0 → 0.31.0
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 +71 -0
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/host.d.cts +1 -1
- package/dist/data-table/host.d.ts +1 -1
- package/dist/data-table/index.cjs +39 -7
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +3 -3
- package/dist/data-table/index.d.ts +3 -3
- package/dist/data-table/index.js +39 -7
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/spreadsheet.cjs +37 -6
- package/dist/data-table/spreadsheet.cjs.map +1 -1
- package/dist/data-table/spreadsheet.d.cts +46 -1
- package/dist/data-table/spreadsheet.d.ts +46 -1
- package/dist/data-table/spreadsheet.js +37 -6
- package/dist/data-table/spreadsheet.js.map +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +2 -2
- package/dist/data-table/types.d.ts +2 -2
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/index.cjs +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/{types-D9JBR6ZU.d.ts → types-CFmCZXVn.d.ts} +24 -1
- package/dist/{types-jQddSUnj.d.cts → types-CYkwg9jR.d.cts} +24 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-
|
|
4
|
-
export { A as AnyOfColumnSearch, B as BOOLEAN_TRUE_COLOR, k as CELL_TINT_CLASS, l as COLOR_RULE_OPS, m as COLOR_RULE_OP_LABELS, n as CellEditType, o as CellEditsMap, p as ChoiceColorLookup, q as ColorBy, r as ColorRule, s as ColorRuleOp, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, E as EMPTY_TABLE_STYLE, t as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, u as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, v as MatrxDataTableDetailConfig, w as MatrxDataTableEditConfig, x as MatrxDataTableEmptyState, y as MatrxDataTableExpandedDetailConfig, z as MatrxDataTableFacetsConfig, D as MatrxDataTableFilterUi, F as MatrxDataTableGroupingConfig, G as MatrxDataTableHierarchyConfig, H as MatrxDataTableHierarchyMove, I as MatrxDataTableMobileCardControls, J as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, K as MatrxDataTableSelectionConfig, N as MatrxDataTableSourceProcessing, O as MatrxDataTableSpreadsheetConfig, P as MatrxDataTableStyleConfig, Q as MatrxDataTableToolbar, R as MatrxDataTableUrlStateConfig, U as MatrxDataTableVirtualizeConfig, V as MatrxDataTableWindowConfig, W as MatrxTablePagination, X as OPS_WITH_VALUE, Y as ROW_TINT_CLASS, Z as STYLE_COLORS, _ as STYLE_COLOR_LABELS, $ as SWATCH_CLASS, a0 as SortDirection, S as SortState, a1 as StyleColor, a2 as StylePath, a3 as StyleTarget, a4 as TABLE_STYLE_METADATA_KEY, a5 as TABLE_STYLE_VERSION, a6 as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a7 as TableSearchRole, a8 as TableSearchScope, a9 as TableStyle, aa as TableViewQuery, ab as TextFilterMode, ac as ToolbarFacet, ad as applyStylePath, ae as colorForChoice, af as evaluateRule, ag as inferTableSearchRole, ah as isStyleColor, ai as parseTableStyle, aj as rankTableSearchRows, ak as resolveCellColor, al as resolveRowColor, am as resolveTableSearchScopes, an as stylePath, ao as tableStyleFromMetadata, ap as tableStyleIsEmpty } from '../types-
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-CYkwg9jR.cjs';
|
|
4
|
+
export { A as AnyOfColumnSearch, B as BOOLEAN_TRUE_COLOR, k as CELL_TINT_CLASS, l as COLOR_RULE_OPS, m as COLOR_RULE_OP_LABELS, n as CellEditType, o as CellEditsMap, p as ChoiceColorLookup, q as ColorBy, r as ColorRule, s as ColorRuleOp, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, E as EMPTY_TABLE_STYLE, t as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, u as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, v as MatrxDataTableDetailConfig, w as MatrxDataTableEditConfig, x as MatrxDataTableEmptyState, y as MatrxDataTableExpandedDetailConfig, z as MatrxDataTableFacetsConfig, D as MatrxDataTableFilterUi, F as MatrxDataTableGroupingConfig, G as MatrxDataTableHierarchyConfig, H as MatrxDataTableHierarchyMove, I as MatrxDataTableMobileCardControls, J as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, K as MatrxDataTableSelectionConfig, N as MatrxDataTableSourceProcessing, O as MatrxDataTableSpreadsheetConfig, P as MatrxDataTableStyleConfig, Q as MatrxDataTableToolbar, R as MatrxDataTableUrlStateConfig, U as MatrxDataTableVirtualizeConfig, V as MatrxDataTableWindowConfig, W as MatrxTablePagination, X as OPS_WITH_VALUE, Y as ROW_TINT_CLASS, Z as STYLE_COLORS, _ as STYLE_COLOR_LABELS, $ as SWATCH_CLASS, a0 as SortDirection, S as SortState, a1 as StyleColor, a2 as StylePath, a3 as StyleTarget, a4 as TABLE_STYLE_METADATA_KEY, a5 as TABLE_STYLE_VERSION, a6 as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a7 as TableSearchRole, a8 as TableSearchScope, a9 as TableStyle, aa as TableViewQuery, ab as TextFilterMode, ac as ToolbarFacet, ad as applyStylePath, ae as colorForChoice, af as evaluateRule, ag as inferTableSearchRole, ah as isStyleColor, ai as parseTableStyle, aj as rankTableSearchRows, ak as resolveCellColor, al as resolveRowColor, am as resolveTableSearchScopes, an as stylePath, ao as tableStyleFromMetadata, ap as tableStyleIsEmpty } from '../types-CYkwg9jR.cjs';
|
|
5
5
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.cjs';
|
|
6
6
|
import { CopyControlProps } from './copy-types.cjs';
|
|
7
7
|
export { AgentPayloadInput } from './copy-types.cjs';
|
|
@@ -21,7 +21,7 @@ export { DEFAULT_OVERSCAN, ScrollToIndexInput, VariableWindowInput, WindowInput,
|
|
|
21
21
|
export { CoverageInput, CoverageResult, CoverageScope, PARTIAL_BADGE, UNKNOWN_TOTAL_BADGE, describeCoverage } from './coverage.cjs';
|
|
22
22
|
export { CellPatch, FillRect, FillRequest, FillResult, FillSkip, SeriesDetection, SeriesKind, detectSeries, fillDown, fillRange, fillTargetFor, tileIndex } from './fill.cjs';
|
|
23
23
|
export { DEFAULT_UNDO_DEPTH, UndoEntry, UndoStack, canRedo, canUndo, createUndoStack, popRedo, popUndo, pushUndo, undoEntryFor } from './cell-undo.cjs';
|
|
24
|
-
export { SpreadsheetCellProps, SpreadsheetGrid, SpreadsheetGridOptions, SpreadsheetIntent, useSpreadsheetGrid } from './spreadsheet.cjs';
|
|
24
|
+
export { SpreadsheetCellProps, SpreadsheetGrid, SpreadsheetGridOptions, SpreadsheetIntent, SpreadsheetPastePlan, useSpreadsheetGrid } from './spreadsheet.cjs';
|
|
25
25
|
export { PasteCell, PastePlan, cellClipboardText, gridToTsv, isSingleCell, parseClipboardGrid, planPaste, storedValuesEqual } from './grid-clipboard.cjs';
|
|
26
26
|
export { CellAddress, CellRange, GridKeyAction, GridMove, RangeBounds, allRange, boundsContain, cellDomKey, cellsInRange, classifyGridKey, columnRange, directClickKinds, isDirectClickEditor, isSingleCellRange, moveSelection, rangeBounds, rangeRows, rangeSize, rowRange, sameCell } from './grid-selection.cjs';
|
|
27
27
|
import '../content-transfer.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-
|
|
4
|
-
export { A as AnyOfColumnSearch, B as BOOLEAN_TRUE_COLOR, k as CELL_TINT_CLASS, l as COLOR_RULE_OPS, m as COLOR_RULE_OP_LABELS, n as CellEditType, o as CellEditsMap, p as ChoiceColorLookup, q as ColorBy, r as ColorRule, s as ColorRuleOp, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, E as EMPTY_TABLE_STYLE, t as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, u as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, v as MatrxDataTableDetailConfig, w as MatrxDataTableEditConfig, x as MatrxDataTableEmptyState, y as MatrxDataTableExpandedDetailConfig, z as MatrxDataTableFacetsConfig, D as MatrxDataTableFilterUi, F as MatrxDataTableGroupingConfig, G as MatrxDataTableHierarchyConfig, H as MatrxDataTableHierarchyMove, I as MatrxDataTableMobileCardControls, J as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, K as MatrxDataTableSelectionConfig, N as MatrxDataTableSourceProcessing, O as MatrxDataTableSpreadsheetConfig, P as MatrxDataTableStyleConfig, Q as MatrxDataTableToolbar, R as MatrxDataTableUrlStateConfig, U as MatrxDataTableVirtualizeConfig, V as MatrxDataTableWindowConfig, W as MatrxTablePagination, X as OPS_WITH_VALUE, Y as ROW_TINT_CLASS, Z as STYLE_COLORS, _ as STYLE_COLOR_LABELS, $ as SWATCH_CLASS, a0 as SortDirection, S as SortState, a1 as StyleColor, a2 as StylePath, a3 as StyleTarget, a4 as TABLE_STYLE_METADATA_KEY, a5 as TABLE_STYLE_VERSION, a6 as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a7 as TableSearchRole, a8 as TableSearchScope, a9 as TableStyle, aa as TableViewQuery, ab as TextFilterMode, ac as ToolbarFacet, ad as applyStylePath, ae as colorForChoice, af as evaluateRule, ag as inferTableSearchRole, ah as isStyleColor, ai as parseTableStyle, aj as rankTableSearchRows, ak as resolveCellColor, al as resolveRowColor, am as resolveTableSearchScopes, an as stylePath, ao as tableStyleFromMetadata, ap as tableStyleIsEmpty } from '../types-
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-CFmCZXVn.js';
|
|
4
|
+
export { A as AnyOfColumnSearch, B as BOOLEAN_TRUE_COLOR, k as CELL_TINT_CLASS, l as COLOR_RULE_OPS, m as COLOR_RULE_OP_LABELS, n as CellEditType, o as CellEditsMap, p as ChoiceColorLookup, q as ColorBy, r as ColorRule, s as ColorRuleOp, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, E as EMPTY_TABLE_STYLE, t as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, u as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, v as MatrxDataTableDetailConfig, w as MatrxDataTableEditConfig, x as MatrxDataTableEmptyState, y as MatrxDataTableExpandedDetailConfig, z as MatrxDataTableFacetsConfig, D as MatrxDataTableFilterUi, F as MatrxDataTableGroupingConfig, G as MatrxDataTableHierarchyConfig, H as MatrxDataTableHierarchyMove, I as MatrxDataTableMobileCardControls, J as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, K as MatrxDataTableSelectionConfig, N as MatrxDataTableSourceProcessing, O as MatrxDataTableSpreadsheetConfig, P as MatrxDataTableStyleConfig, Q as MatrxDataTableToolbar, R as MatrxDataTableUrlStateConfig, U as MatrxDataTableVirtualizeConfig, V as MatrxDataTableWindowConfig, W as MatrxTablePagination, X as OPS_WITH_VALUE, Y as ROW_TINT_CLASS, Z as STYLE_COLORS, _ as STYLE_COLOR_LABELS, $ as SWATCH_CLASS, a0 as SortDirection, S as SortState, a1 as StyleColor, a2 as StylePath, a3 as StyleTarget, a4 as TABLE_STYLE_METADATA_KEY, a5 as TABLE_STYLE_VERSION, a6 as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a7 as TableSearchRole, a8 as TableSearchScope, a9 as TableStyle, aa as TableViewQuery, ab as TextFilterMode, ac as ToolbarFacet, ad as applyStylePath, ae as colorForChoice, af as evaluateRule, ag as inferTableSearchRole, ah as isStyleColor, ai as parseTableStyle, aj as rankTableSearchRows, ak as resolveCellColor, al as resolveRowColor, am as resolveTableSearchScopes, an as stylePath, ao as tableStyleFromMetadata, ap as tableStyleIsEmpty } from '../types-CFmCZXVn.js';
|
|
5
5
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.js';
|
|
6
6
|
import { CopyControlProps } from './copy-types.js';
|
|
7
7
|
export { AgentPayloadInput } from './copy-types.js';
|
|
@@ -21,7 +21,7 @@ export { DEFAULT_OVERSCAN, ScrollToIndexInput, VariableWindowInput, WindowInput,
|
|
|
21
21
|
export { CoverageInput, CoverageResult, CoverageScope, PARTIAL_BADGE, UNKNOWN_TOTAL_BADGE, describeCoverage } from './coverage.js';
|
|
22
22
|
export { CellPatch, FillRect, FillRequest, FillResult, FillSkip, SeriesDetection, SeriesKind, detectSeries, fillDown, fillRange, fillTargetFor, tileIndex } from './fill.js';
|
|
23
23
|
export { DEFAULT_UNDO_DEPTH, UndoEntry, UndoStack, canRedo, canUndo, createUndoStack, popRedo, popUndo, pushUndo, undoEntryFor } from './cell-undo.js';
|
|
24
|
-
export { SpreadsheetCellProps, SpreadsheetGrid, SpreadsheetGridOptions, SpreadsheetIntent, useSpreadsheetGrid } from './spreadsheet.js';
|
|
24
|
+
export { SpreadsheetCellProps, SpreadsheetGrid, SpreadsheetGridOptions, SpreadsheetIntent, SpreadsheetPastePlan, useSpreadsheetGrid } from './spreadsheet.js';
|
|
25
25
|
export { PasteCell, PastePlan, cellClipboardText, gridToTsv, isSingleCell, parseClipboardGrid, planPaste, storedValuesEqual } from './grid-clipboard.js';
|
|
26
26
|
export { CellAddress, CellRange, GridKeyAction, GridMove, RangeBounds, allRange, boundsContain, cellDomKey, cellsInRange, classifyGridKey, columnRange, directClickKinds, isDirectClickEditor, isSingleCellRange, moveSelection, rangeBounds, rangeRows, rangeSize, rowRange, sameCell } from './grid-selection.js';
|
|
27
27
|
import '../content-transfer.js';
|
package/dist/data-table/index.js
CHANGED
|
@@ -8409,7 +8409,7 @@ function useSpreadsheetGrid(options) {
|
|
|
8409
8409
|
} catch {
|
|
8410
8410
|
reason = void 0;
|
|
8411
8411
|
}
|
|
8412
|
-
if (reason) refusals.push({ columnId: patch.columnId, reason });
|
|
8412
|
+
if (reason) refusals.push({ rowId: patch.rowId, columnId: patch.columnId, reason, value: patch.value });
|
|
8413
8413
|
else accepted.push(patch);
|
|
8414
8414
|
}
|
|
8415
8415
|
return { accepted, refusals };
|
|
@@ -8488,6 +8488,7 @@ function useSpreadsheetGrid(options) {
|
|
|
8488
8488
|
if (rowId === void 0 || columnId2 === void 0) continue;
|
|
8489
8489
|
if (!current.isColumnWritable(columnId2)) {
|
|
8490
8490
|
skipped.push({
|
|
8491
|
+
rowId,
|
|
8491
8492
|
columnId: columnId2,
|
|
8492
8493
|
reason: current.columnRefusal?.(columnId2) ?? `${columnId2} cannot be cleared.`
|
|
8493
8494
|
});
|
|
@@ -8651,18 +8652,33 @@ function useSpreadsheetGrid(options) {
|
|
|
8651
8652
|
if (startRow === -1 || startCol === -1) return;
|
|
8652
8653
|
const patches = [];
|
|
8653
8654
|
const skipped = [];
|
|
8654
|
-
let
|
|
8655
|
+
let pastRightEdge = 0;
|
|
8656
|
+
const overflow = [];
|
|
8655
8657
|
for (let r = 0; r < block.length; r += 1) {
|
|
8656
8658
|
const line = block[r] ?? [];
|
|
8659
|
+
const rowId = rowIds[startRow + r];
|
|
8660
|
+
if (rowId === void 0) {
|
|
8661
|
+
const beyond = {};
|
|
8662
|
+
for (let c = 0; c < line.length; c += 1) {
|
|
8663
|
+
const columnId2 = columnIds[startCol + c];
|
|
8664
|
+
if (columnId2 === void 0) {
|
|
8665
|
+
pastRightEdge += 1;
|
|
8666
|
+
continue;
|
|
8667
|
+
}
|
|
8668
|
+
beyond[columnId2] = line[c] ?? "";
|
|
8669
|
+
}
|
|
8670
|
+
overflow.push(beyond);
|
|
8671
|
+
continue;
|
|
8672
|
+
}
|
|
8657
8673
|
for (let c = 0; c < line.length; c += 1) {
|
|
8658
|
-
const rowId = rowIds[startRow + r];
|
|
8659
8674
|
const columnId2 = columnIds[startCol + c];
|
|
8660
|
-
if (
|
|
8661
|
-
|
|
8675
|
+
if (columnId2 === void 0) {
|
|
8676
|
+
pastRightEdge += 1;
|
|
8662
8677
|
continue;
|
|
8663
8678
|
}
|
|
8664
8679
|
if (!current.isColumnWritable(columnId2)) {
|
|
8665
8680
|
skipped.push({
|
|
8681
|
+
rowId,
|
|
8666
8682
|
columnId: columnId2,
|
|
8667
8683
|
reason: current.columnRefusal?.(columnId2) ?? `${columnId2} cannot take a pasted value.`
|
|
8668
8684
|
});
|
|
@@ -8672,9 +8688,24 @@ function useSpreadsheetGrid(options) {
|
|
|
8672
8688
|
}
|
|
8673
8689
|
}
|
|
8674
8690
|
const screened = screenPatches(patches);
|
|
8691
|
+
const refusals = [...skipped, ...screened.refusals];
|
|
8692
|
+
if (current.onPastePlan) {
|
|
8693
|
+
const accepted = screened.accepted;
|
|
8694
|
+
current.onPastePlan({
|
|
8695
|
+
accepted,
|
|
8696
|
+
refusals,
|
|
8697
|
+
overflow,
|
|
8698
|
+
pastRightEdge,
|
|
8699
|
+
apply: async () => {
|
|
8700
|
+
await applyPatches(accepted, "paste", "Pasted");
|
|
8701
|
+
}
|
|
8702
|
+
});
|
|
8703
|
+
return;
|
|
8704
|
+
}
|
|
8675
8705
|
void applyPatches(screened.accepted, "paste", "Pasted");
|
|
8706
|
+
const outside = pastRightEdge + overflow.reduce((n2, row) => n2 + Object.keys(row).length, 0);
|
|
8676
8707
|
const tail = outside > 0 ? ` ${outside} landed past the edge of the table and were ignored.` : "";
|
|
8677
|
-
announceSkips(
|
|
8708
|
+
announceSkips(refusals, `Pasted ${screened.accepted.length} cells.${tail}`);
|
|
8678
8709
|
},
|
|
8679
8710
|
[range, rowIds, columnIds, applyPatches, announceSkips, screenPatches]
|
|
8680
8711
|
);
|
|
@@ -13107,7 +13138,8 @@ function MatrxDataTableCore({
|
|
|
13107
13138
|
...spreadsheet.paste === void 0 ? {} : { paste: spreadsheet.paste },
|
|
13108
13139
|
notify: spreadsheet.notify ?? ((message) => toast.success(message)),
|
|
13109
13140
|
onEditRequest: (address, seed) => requestCellEditRef.current(address, seed),
|
|
13110
|
-
...spreadsheet.validateCell ? { validateCell: spreadsheet.validateCell } : {}
|
|
13141
|
+
...spreadsheet.validateCell ? { validateCell: spreadsheet.validateCell } : {},
|
|
13142
|
+
...spreadsheet.onPastePlan ? { onPastePlan: spreadsheet.onPastePlan } : {}
|
|
13111
13143
|
} : null
|
|
13112
13144
|
);
|
|
13113
13145
|
const sheetRef = useRef15(sheet);
|