@ai-matrx/design-system 0.35.0 → 0.37.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 +48 -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 +63 -7
- 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 +63 -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 +18 -0
- package/dist/data-table/spreadsheet.cjs.map +1 -1
- package/dist/data-table/spreadsheet.d.cts +5 -0
- package/dist/data-table/spreadsheet.d.ts +5 -0
- package/dist/data-table/spreadsheet.js +18 -0
- 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 +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/{types-Cxm5XK0L.d.ts → types-B8vwElPz.d.ts} +25 -1
- package/dist/{types-kiV-CAuZ.d.cts → types-BuMHbFjs.d.cts} +25 -1
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { as as LAYERED_FILTER_OPERATORS, at as LAYERED_FILTER_OPERATOR_LABELS, au as LayeredFilterField, av as LayeredFilterOperator, L as LayeredFilterRule, aw as columnFiltersToLayeredRules, ax as completeLayeredFilterRules, ay as decodeLayeredFilterRules, az as encodeLayeredFilterRules, aA as isCompleteLayeredFilterRule, aB as isLayeredFilterOperator, aC as layeredFilterMatchesValue, aD as layeredFilterNeedsValue, aE as layeredFilterRuleSummary, aF as operatorsForLayeredField } from '../types-
|
|
1
|
+
export { as as LAYERED_FILTER_OPERATORS, at as LAYERED_FILTER_OPERATOR_LABELS, au as LayeredFilterField, av as LayeredFilterOperator, L as LayeredFilterRule, aw as columnFiltersToLayeredRules, ax as completeLayeredFilterRules, ay as decodeLayeredFilterRules, az as encodeLayeredFilterRules, aA as isCompleteLayeredFilterRule, aB as isLayeredFilterOperator, aC as layeredFilterMatchesValue, aD as layeredFilterNeedsValue, aE as layeredFilterRuleSummary, aF as operatorsForLayeredField } from '../types-BuMHbFjs.cjs';
|
|
2
2
|
import '../content-transfer.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { as as LAYERED_FILTER_OPERATORS, at as LAYERED_FILTER_OPERATOR_LABELS, au as LayeredFilterField, av as LayeredFilterOperator, L as LayeredFilterRule, aw as columnFiltersToLayeredRules, ax as completeLayeredFilterRules, ay as decodeLayeredFilterRules, az as encodeLayeredFilterRules, aA as isCompleteLayeredFilterRule, aB as isLayeredFilterOperator, aC as layeredFilterMatchesValue, aD as layeredFilterNeedsValue, aE as layeredFilterRuleSummary, aF as operatorsForLayeredField } from '../types-
|
|
1
|
+
export { as as LAYERED_FILTER_OPERATORS, at as LAYERED_FILTER_OPERATOR_LABELS, au as LayeredFilterField, av as LayeredFilterOperator, L as LayeredFilterRule, aw as columnFiltersToLayeredRules, ax as completeLayeredFilterRules, ay as decodeLayeredFilterRules, az as encodeLayeredFilterRules, aA as isCompleteLayeredFilterRule, aB as isLayeredFilterOperator, aC as layeredFilterMatchesValue, aD as layeredFilterNeedsValue, aE as layeredFilterRuleSummary, aF as operatorsForLayeredField } from '../types-B8vwElPz.js';
|
|
2
2
|
import '../content-transfer.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResolvedFilterKind } from './infer-filter.cjs';
|
|
2
|
-
import { e as MatrxDataTableQueryState, M as MatrxColumnDef } from '../types-
|
|
2
|
+
import { e as MatrxDataTableQueryState, M as MatrxColumnDef } from '../types-BuMHbFjs.cjs';
|
|
3
3
|
import '../content-transfer.cjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResolvedFilterKind } from './infer-filter.js';
|
|
2
|
-
import { e as MatrxDataTableQueryState, M as MatrxColumnDef } from '../types-
|
|
2
|
+
import { e as MatrxDataTableQueryState, M as MatrxColumnDef } from '../types-B8vwElPz.js';
|
|
3
3
|
import '../content-transfer.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -634,6 +634,19 @@ function targetsAnEditor(target) {
|
|
|
634
634
|
if (!element) return false;
|
|
635
635
|
return element.closest("input, textarea, select, [contenteditable='true']") !== null;
|
|
636
636
|
}
|
|
637
|
+
function camePastAPortal(target, host) {
|
|
638
|
+
if (typeof Element === "undefined") return false;
|
|
639
|
+
const element = target instanceof Element ? target : null;
|
|
640
|
+
const owner = host instanceof Element ? host : null;
|
|
641
|
+
if (!element || !owner) return false;
|
|
642
|
+
return !owner.contains(element);
|
|
643
|
+
}
|
|
644
|
+
function camePastAPortalIntoTheContainer(target) {
|
|
645
|
+
if (typeof Element === "undefined") return false;
|
|
646
|
+
const element = target instanceof Element ? target : null;
|
|
647
|
+
if (!element) return false;
|
|
648
|
+
return element.closest('[data-matrx-table-spreadsheet="true"]') === null;
|
|
649
|
+
}
|
|
637
650
|
var NOTHING = [];
|
|
638
651
|
function useSpreadsheetGrid(options) {
|
|
639
652
|
const [range, setRange] = (0, import_react.useState)(null);
|
|
@@ -806,6 +819,7 @@ function useSpreadsheetGrid(options) {
|
|
|
806
819
|
const current = optionsRef.current;
|
|
807
820
|
if (!current) return;
|
|
808
821
|
if (targetsAnEditor(event.target)) return;
|
|
822
|
+
if (camePastAPortalIntoTheContainer(event.target)) return;
|
|
809
823
|
const accel = event.metaKey || event.ctrlKey;
|
|
810
824
|
if (accel && (event.key === "z" || event.key === "Z")) {
|
|
811
825
|
event.preventDefault();
|
|
@@ -892,6 +906,7 @@ function useSpreadsheetGrid(options) {
|
|
|
892
906
|
const onCopy = (0, import_react.useCallback)(
|
|
893
907
|
(event) => {
|
|
894
908
|
if (!optionsRef.current || !range || targetsAnEditor(event.target)) return;
|
|
909
|
+
if (camePastAPortalIntoTheContainer(event.target)) return;
|
|
895
910
|
const text = selectionAsTsv();
|
|
896
911
|
if (!text) return;
|
|
897
912
|
event.preventDefault();
|
|
@@ -902,6 +917,7 @@ function useSpreadsheetGrid(options) {
|
|
|
902
917
|
const onCut = (0, import_react.useCallback)(
|
|
903
918
|
(event) => {
|
|
904
919
|
if (!optionsRef.current || !range || targetsAnEditor(event.target)) return;
|
|
920
|
+
if (camePastAPortalIntoTheContainer(event.target)) return;
|
|
905
921
|
const text = selectionAsTsv();
|
|
906
922
|
if (!text) return;
|
|
907
923
|
event.preventDefault();
|
|
@@ -914,6 +930,7 @@ function useSpreadsheetGrid(options) {
|
|
|
914
930
|
(event) => {
|
|
915
931
|
const current = optionsRef.current;
|
|
916
932
|
if (!current || current.paste === false || !range || targetsAnEditor(event.target)) return;
|
|
933
|
+
if (camePastAPortalIntoTheContainer(event.target)) return;
|
|
917
934
|
const text = event.clipboardData?.getData("text/plain") ?? "";
|
|
918
935
|
if (!text) return;
|
|
919
936
|
event.preventDefault();
|
|
@@ -997,6 +1014,7 @@ function useSpreadsheetGrid(options) {
|
|
|
997
1014
|
...inFillPreview ? { "data-matrx-cell-fill-preview": "true" } : {},
|
|
998
1015
|
onMouseDown: (event) => {
|
|
999
1016
|
if (event.button !== 0) return;
|
|
1017
|
+
if (camePastAPortal(event.target ?? null, event.currentTarget)) return;
|
|
1000
1018
|
event.preventDefault();
|
|
1001
1019
|
const origin = event.currentTarget;
|
|
1002
1020
|
if (typeof HTMLElement !== "undefined" && origin instanceof HTMLElement) {
|