@ai-matrx/design-system 0.43.0 → 0.44.1
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 +30 -0
- package/dist/content-transfer.cjs +39 -0
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.js +39 -0
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/data-row-inspector.cjs +39 -0
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +41 -2
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +39 -0
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +43 -4
- package/dist/data-table/data-row-window.js.map +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 +59 -0
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +2 -2
- package/dist/data-table/index.d.ts +2 -2
- package/dist/data-table/index.js +96 -37
- 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/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- 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 +47 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +52 -7
- package/dist/index.js.map +1 -1
- package/dist/{types-CUR8Hbt5.d.ts → types-Bzzzed5d.d.ts} +24 -1
- package/dist/{types-CqU57qk8.d.cts → types-cvgKRetM.d.cts} +24 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-cvgKRetM.cjs';
|
|
2
2
|
import '../content-transfer.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-Bzzzed5d.js';
|
|
2
2
|
import '../content-transfer.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode, MouseEventHandler } from 'react';
|
|
3
3
|
import { CopyControlProps } from './copy-types.cjs';
|
|
4
4
|
export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.cjs';
|
|
5
|
-
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-cvgKRetM.cjs';
|
|
6
6
|
import { MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.cjs';
|
|
7
7
|
export { MatrxTableMenuItem, MatrxTableMenuSection } from './menu-targets.cjs';
|
|
8
8
|
import '../content-transfer.cjs';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode, MouseEventHandler } from 'react';
|
|
3
3
|
import { CopyControlProps } from './copy-types.js';
|
|
4
4
|
export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.js';
|
|
5
|
-
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-Bzzzed5d.js';
|
|
6
6
|
import { MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.js';
|
|
7
7
|
export { MatrxTableMenuItem, MatrxTableMenuSection } from './menu-targets.js';
|
|
8
8
|
import '../content-transfer.js';
|
|
@@ -1658,6 +1658,15 @@ function useIsMobile() {
|
|
|
1658
1658
|
return isMobile;
|
|
1659
1659
|
}
|
|
1660
1660
|
|
|
1661
|
+
// src/layer-front.ts
|
|
1662
|
+
var LAYER_FRONT_EVENT = "matrx:layer-front";
|
|
1663
|
+
function announceLayerFront(element) {
|
|
1664
|
+
if (typeof document === "undefined") return;
|
|
1665
|
+
document.dispatchEvent(
|
|
1666
|
+
new CustomEvent(LAYER_FRONT_EVENT, { detail: { element } })
|
|
1667
|
+
);
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1661
1670
|
// src/dialog.tsx
|
|
1662
1671
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1663
1672
|
var DialogWindowedByDefaultContext = React11.createContext(false);
|
|
@@ -1728,6 +1737,8 @@ var DialogContent = React11.forwardRef(
|
|
|
1728
1737
|
dismissOnOutsideClick = false,
|
|
1729
1738
|
onInteractOutside,
|
|
1730
1739
|
onEscapeKeyDown,
|
|
1740
|
+
onPointerDownCapture,
|
|
1741
|
+
onFocusCapture,
|
|
1731
1742
|
style,
|
|
1732
1743
|
...props
|
|
1733
1744
|
}, ref) => {
|
|
@@ -1740,6 +1751,24 @@ var DialogContent = React11.forwardRef(
|
|
|
1740
1751
|
const [containerEl, setContainerEl] = React11.useState(
|
|
1741
1752
|
null
|
|
1742
1753
|
);
|
|
1754
|
+
const stacks = windowed && windowedByDefault;
|
|
1755
|
+
const [behind, setBehind] = React11.useState(false);
|
|
1756
|
+
React11.useEffect(() => {
|
|
1757
|
+
if (!stacks || !containerEl) return;
|
|
1758
|
+
const onFront = (event) => {
|
|
1759
|
+
const element = event.detail?.element ?? null;
|
|
1760
|
+
if (element && (element === containerEl || containerEl.contains(element))) return;
|
|
1761
|
+
setBehind(true);
|
|
1762
|
+
};
|
|
1763
|
+
document.addEventListener(LAYER_FRONT_EVENT, onFront);
|
|
1764
|
+
announceLayerFront(containerEl);
|
|
1765
|
+
return () => document.removeEventListener(LAYER_FRONT_EVENT, onFront);
|
|
1766
|
+
}, [stacks, containerEl]);
|
|
1767
|
+
const bringToFront = () => {
|
|
1768
|
+
if (!stacks || !containerEl) return;
|
|
1769
|
+
setBehind(false);
|
|
1770
|
+
announceLayerFront(containerEl);
|
|
1771
|
+
};
|
|
1743
1772
|
const [offset, setOffset] = React11.useState({ x: 0, y: 0 });
|
|
1744
1773
|
const dragRef = React11.useRef(null);
|
|
1745
1774
|
const handle = React11.useMemo(() => {
|
|
@@ -1798,10 +1827,20 @@ var DialogContent = React11.forwardRef(
|
|
|
1798
1827
|
// z=1000); staying below that boundary makes a newly focused window
|
|
1799
1828
|
// usable without coupling the two systems.
|
|
1800
1829
|
!isModal && !windowedByDefault && "z-[900]",
|
|
1830
|
+
// Another layer came to the front after this window (layer-front.ts).
|
|
1831
|
+
stacks && behind && "z-[999]",
|
|
1801
1832
|
// Without an overlay the card needs its own separation from the page.
|
|
1802
1833
|
windowed && "shadow-2xl ring-1 ring-border/60"
|
|
1803
1834
|
),
|
|
1804
1835
|
style: windowed && (offset.x !== 0 || offset.y !== 0) ? { ...style, translate: `${offset.x}px ${offset.y}px` } : style,
|
|
1836
|
+
onPointerDownCapture: (event) => {
|
|
1837
|
+
onPointerDownCapture?.(event);
|
|
1838
|
+
if (behind) bringToFront();
|
|
1839
|
+
},
|
|
1840
|
+
onFocusCapture: (event) => {
|
|
1841
|
+
onFocusCapture?.(event);
|
|
1842
|
+
if (behind) bringToFront();
|
|
1843
|
+
},
|
|
1805
1844
|
onInteractOutside: (event) => {
|
|
1806
1845
|
onInteractOutside?.(event);
|
|
1807
1846
|
if (windowed && !dismissOnOutsideClick) event.preventDefault();
|
|
@@ -13845,6 +13884,26 @@ function MatrxDataTableCore({
|
|
|
13845
13884
|
);
|
|
13846
13885
|
const sheetRef = (0, import_react21.useRef)(sheet);
|
|
13847
13886
|
sheetRef.current = sheet;
|
|
13887
|
+
const onSheetSelectionRef = (0, import_react21.useRef)(spreadsheet?.onSelectionChange);
|
|
13888
|
+
onSheetSelectionRef.current = spreadsheet?.onSelectionChange;
|
|
13889
|
+
const sheetSelectionKey = sheet.range ? `${sheet.range.anchor.rowId}\0${sheet.range.anchor.fieldName}\0${sheet.range.focus.rowId}\0${sheet.range.focus.fieldName}\0${sheet.bounds ? `${sheet.bounds.r0}:${sheet.bounds.r1}:${sheet.bounds.c0}:${sheet.bounds.c1}` : ""}` : "";
|
|
13890
|
+
(0, import_react21.useEffect)(() => {
|
|
13891
|
+
const tell = onSheetSelectionRef.current;
|
|
13892
|
+
if (!tell) return;
|
|
13893
|
+
const current = sheetRef.current;
|
|
13894
|
+
if (!current.range) {
|
|
13895
|
+
tell(null);
|
|
13896
|
+
return;
|
|
13897
|
+
}
|
|
13898
|
+
const { rowIds, columnIds: columnIds2 } = current.selectionAddresses();
|
|
13899
|
+
tell({
|
|
13900
|
+
active: { rowId: current.range.focus.rowId, columnId: current.range.focus.fieldName },
|
|
13901
|
+
rowIds,
|
|
13902
|
+
columnIds: columnIds2,
|
|
13903
|
+
cellCount: rowIds.length * columnIds2.length,
|
|
13904
|
+
tsv: current.selectionTsv()
|
|
13905
|
+
});
|
|
13906
|
+
}, [sheetSelectionKey]);
|
|
13848
13907
|
const searchValueRef = (0, import_react21.useRef)(searchValue);
|
|
13849
13908
|
searchValueRef.current = searchValue;
|
|
13850
13909
|
const facetsEnabled = Boolean(facets && facets.enabled !== false);
|