@dxos/plugin-sheet 0.7.2-main.f1adc9f → 0.7.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/dist/lib/browser/{SheetContainer-DBDIZU6U.mjs → SheetContainer-YAMIOFC6.mjs} +3 -4
- package/dist/lib/browser/{SheetContainer-DBDIZU6U.mjs.map → SheetContainer-YAMIOFC6.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-IXA5HC36.mjs → chunk-QHQFM7LV.mjs} +22 -48
- package/dist/lib/browser/{chunk-IXA5HC36.mjs.map → chunk-QHQFM7LV.mjs.map} +4 -4
- package/dist/lib/browser/index.mjs +13 -8
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/{SheetContainer-3373SORI.cjs → SheetContainer-BSDHHYXE.cjs} +15 -16
- package/dist/lib/node/{SheetContainer-3373SORI.cjs.map → SheetContainer-BSDHHYXE.cjs.map} +3 -3
- package/dist/lib/node/{chunk-TS6IBEPZ.cjs → chunk-J5ZFWMOD.cjs} +10 -34
- package/dist/lib/node/{chunk-TS6IBEPZ.cjs.map → chunk-J5ZFWMOD.cjs.map} +4 -4
- package/dist/lib/node/index.cjs +15 -10
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/{SheetContainer-CH2RYBXJ.mjs → SheetContainer-T47T2NYJ.mjs} +3 -4
- package/dist/lib/node-esm/{SheetContainer-CH2RYBXJ.mjs.map → SheetContainer-T47T2NYJ.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-7F3BRKP7.mjs → chunk-6GSTEN7N.mjs} +22 -48
- package/dist/lib/node-esm/{chunk-7F3BRKP7.mjs.map → chunk-6GSTEN7N.mjs.map} +4 -4
- package/dist/lib/node-esm/index.mjs +13 -8
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/SheetPlugin.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +0 -1
- package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +0 -2
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
- package/package.json +37 -39
- package/src/SheetPlugin.tsx +13 -5
- package/src/components/GridSheet/GridSheet.stories.tsx +0 -2
- package/src/components/GridSheet/GridSheet.tsx +3 -12
- package/src/components/SheetContainer/SheetContainer.stories.tsx +2 -44
- package/src/components/Toolbar/Toolbar.tsx +1 -7
- package/src/components/index.ts +0 -1
- package/src/integrations/thread-ranges.ts +0 -2
- package/dist/types/src/components/SheetObjectSettings.d.ts +0 -7
- package/dist/types/src/components/SheetObjectSettings.d.ts.map +0 -1
- package/dist/types/src/testing/playwright/playwright.config.d.ts +0 -3
- package/dist/types/src/testing/playwright/playwright.config.d.ts.map +0 -1
- package/dist/types/src/testing/playwright/sheet-manager.d.ts +0 -24
- package/dist/types/src/testing/playwright/sheet-manager.d.ts.map +0 -1
- package/dist/types/src/testing/playwright/sheet.spec.d.ts +0 -2
- package/dist/types/src/testing/playwright/sheet.spec.d.ts.map +0 -1
- package/src/components/SheetObjectSettings.tsx +0 -38
- package/src/testing/playwright/playwright.config.ts +0 -18
- package/src/testing/playwright/sheet-manager.ts +0 -91
- package/src/testing/playwright/sheet.spec.ts +0 -78
|
@@ -977,9 +977,9 @@ var SheetProvider = ({ children, graph, sheet, readonly, ignoreAttention, onInfo
|
|
|
977
977
|
};
|
|
978
978
|
|
|
979
979
|
// packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx
|
|
980
|
-
import
|
|
980
|
+
import React4, { useCallback as useCallback4, useMemo as useMemo2, useRef, useState as useState4 } from "react";
|
|
981
981
|
import { useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
|
|
982
|
-
import { DropdownMenu, Icon, useTranslation as
|
|
982
|
+
import { DropdownMenu, Icon, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
983
983
|
import { useAttention } from "@dxos/react-ui-attention";
|
|
984
984
|
import { closestCell, defaultSizeRow, editorKeys, Grid as Grid2, GridCellEditor } from "@dxos/react-ui-grid";
|
|
985
985
|
|
|
@@ -1038,28 +1038,8 @@ var RangeList = ({ sheet }) => {
|
|
|
1038
1038
|
})))));
|
|
1039
1039
|
};
|
|
1040
1040
|
|
|
1041
|
-
// packages/plugins/plugin-sheet/src/components/SheetObjectSettings.tsx
|
|
1042
|
-
import React4 from "react";
|
|
1043
|
-
import { SPACE_PLUGIN } from "@dxos/plugin-space/meta";
|
|
1044
|
-
import { Input, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
1045
|
-
var SheetObjectSettings = ({ sheet }) => {
|
|
1046
|
-
const { t } = useTranslation2(SPACE_PLUGIN);
|
|
1047
|
-
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement("div", {
|
|
1048
|
-
role: "form",
|
|
1049
|
-
className: "flex flex-col w-full p-2 gap-1"
|
|
1050
|
-
}, /* @__PURE__ */ React4.createElement(Input.Root, null, /* @__PURE__ */ React4.createElement(Input.Label, null, t("name label")), /* @__PURE__ */ React4.createElement(Input.TextInput, {
|
|
1051
|
-
placeholder: t("name placeholder"),
|
|
1052
|
-
value: sheet.name ?? "",
|
|
1053
|
-
onChange: (event) => {
|
|
1054
|
-
sheet.name = event.target.value;
|
|
1055
|
-
}
|
|
1056
|
-
}))), /* @__PURE__ */ React4.createElement(RangeList, {
|
|
1057
|
-
sheet
|
|
1058
|
-
}));
|
|
1059
|
-
};
|
|
1060
|
-
|
|
1061
1041
|
// packages/plugins/plugin-sheet/src/components/index.ts
|
|
1062
|
-
var SheetContainer = lazy(() => import("./SheetContainer-
|
|
1042
|
+
var SheetContainer = lazy(() => import("./SheetContainer-T47T2NYJ.mjs"));
|
|
1063
1043
|
|
|
1064
1044
|
// packages/plugins/plugin-sheet/src/integrations/thread-ranges.ts
|
|
1065
1045
|
var completeCellRangeToThreadCursor = (range) => {
|
|
@@ -1097,9 +1077,6 @@ var useUpdateFocusedCellOnThreadSelection = (grid) => {
|
|
|
1097
1077
|
...range.to,
|
|
1098
1078
|
plane: "grid"
|
|
1099
1079
|
}, true);
|
|
1100
|
-
return {
|
|
1101
|
-
data: true
|
|
1102
|
-
};
|
|
1103
1080
|
}
|
|
1104
1081
|
}
|
|
1105
1082
|
}, [
|
|
@@ -1371,7 +1348,7 @@ var sheetColDefault = {
|
|
|
1371
1348
|
}
|
|
1372
1349
|
};
|
|
1373
1350
|
var GridSheet = () => {
|
|
1374
|
-
const { t } =
|
|
1351
|
+
const { t } = useTranslation2(SHEET_PLUGIN);
|
|
1375
1352
|
const { id, model, editing, setCursor, setRange, cursor, cursorFallbackRange, activeRefs, ignoreAttention } = useSheetContext();
|
|
1376
1353
|
const [dxGrid, setDxGrid] = useState4(null);
|
|
1377
1354
|
const [extraplanarFocus, setExtraplanarFocus] = useState4(null);
|
|
@@ -1631,14 +1608,14 @@ var GridSheet = () => {
|
|
|
1631
1608
|
]);
|
|
1632
1609
|
useUpdateFocusedCellOnThreadSelection(dxGrid);
|
|
1633
1610
|
useSelectThreadOnCellFocus();
|
|
1634
|
-
return /* @__PURE__ */
|
|
1611
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
1635
1612
|
role: "none",
|
|
1636
1613
|
className: "relative min-bs-0"
|
|
1637
|
-
}, /* @__PURE__ */
|
|
1614
|
+
}, /* @__PURE__ */ React4.createElement(GridCellEditor, {
|
|
1638
1615
|
getCellContent,
|
|
1639
1616
|
extension,
|
|
1640
1617
|
onBlur: handleBlur
|
|
1641
|
-
}), /* @__PURE__ */
|
|
1618
|
+
}), /* @__PURE__ */ React4.createElement(Grid2.Content, {
|
|
1642
1619
|
initialCells,
|
|
1643
1620
|
limitColumns: DEFAULT_COLUMNS,
|
|
1644
1621
|
limitRows: DEFAULT_ROWS,
|
|
@@ -1658,35 +1635,32 @@ var GridSheet = () => {
|
|
|
1658
1635
|
className: "[--dx-grid-base:var(--surface-bg)] [&_.dx-grid]:border-bs [&_.dx-grid]:absolute [&_.dx-grid]:inset-0 [&_.dx-grid]:border-separator",
|
|
1659
1636
|
activeRefs,
|
|
1660
1637
|
ref: setDxGrid
|
|
1661
|
-
}), /* @__PURE__ */
|
|
1638
|
+
}), /* @__PURE__ */ React4.createElement(DropdownMenu.Root, {
|
|
1662
1639
|
modal: false,
|
|
1663
1640
|
open: !!contextMenuOpen,
|
|
1664
1641
|
onOpenChange: (nextOpen) => setContextMenuOpen(nextOpen ? inertPosition : null)
|
|
1665
|
-
}, /* @__PURE__ */
|
|
1642
|
+
}, /* @__PURE__ */ React4.createElement(DropdownMenu.VirtualTrigger, {
|
|
1666
1643
|
virtualRef: contextMenuAnchorRef
|
|
1667
|
-
}), /* @__PURE__ */
|
|
1644
|
+
}), /* @__PURE__ */ React4.createElement(DropdownMenu.Content, {
|
|
1668
1645
|
side: contextMenuAxis === "col" ? "bottom" : "right",
|
|
1669
1646
|
sideOffset: 4,
|
|
1670
1647
|
collisionPadding: 8
|
|
1671
|
-
}, /* @__PURE__ */
|
|
1672
|
-
onClick: () => handleAxisMenuAction("insert-before")
|
|
1673
|
-
|
|
1674
|
-
}, /* @__PURE__ */ React5.createElement(Icon, {
|
|
1648
|
+
}, /* @__PURE__ */ React4.createElement(DropdownMenu.Viewport, null, /* @__PURE__ */ React4.createElement(DropdownMenu.Item, {
|
|
1649
|
+
onClick: () => handleAxisMenuAction("insert-before")
|
|
1650
|
+
}, /* @__PURE__ */ React4.createElement(Icon, {
|
|
1675
1651
|
size: 5,
|
|
1676
1652
|
icon: contextMenuAxis === "col" ? "ph--columns-plus-left--regular" : "ph--rows-plus-top--regular"
|
|
1677
|
-
}), /* @__PURE__ */
|
|
1678
|
-
onClick: () => handleAxisMenuAction("insert-after")
|
|
1679
|
-
|
|
1680
|
-
}, /* @__PURE__ */ React5.createElement(Icon, {
|
|
1653
|
+
}), /* @__PURE__ */ React4.createElement("span", null, t(`add ${contextMenuAxis} before label`))), /* @__PURE__ */ React4.createElement(DropdownMenu.Item, {
|
|
1654
|
+
onClick: () => handleAxisMenuAction("insert-after")
|
|
1655
|
+
}, /* @__PURE__ */ React4.createElement(Icon, {
|
|
1681
1656
|
size: 5,
|
|
1682
1657
|
icon: contextMenuAxis === "col" ? "ph--columns-plus-right--regular" : "ph--rows-plus-bottom--regular"
|
|
1683
|
-
}), /* @__PURE__ */
|
|
1684
|
-
onClick: () => handleAxisMenuAction("drop")
|
|
1685
|
-
|
|
1686
|
-
}, /* @__PURE__ */ React5.createElement(Icon, {
|
|
1658
|
+
}), /* @__PURE__ */ React4.createElement("span", null, t(`add ${contextMenuAxis} after label`))), /* @__PURE__ */ React4.createElement(DropdownMenu.Item, {
|
|
1659
|
+
onClick: () => handleAxisMenuAction("drop")
|
|
1660
|
+
}, /* @__PURE__ */ React4.createElement(Icon, {
|
|
1687
1661
|
size: 5,
|
|
1688
1662
|
icon: "ph--backspace--regular"
|
|
1689
|
-
}), /* @__PURE__ */
|
|
1663
|
+
}), /* @__PURE__ */ React4.createElement("span", null, t(`delete ${contextMenuAxis} label`)))), /* @__PURE__ */ React4.createElement(DropdownMenu.Arrow, null))));
|
|
1690
1664
|
};
|
|
1691
1665
|
|
|
1692
1666
|
export {
|
|
@@ -1697,7 +1671,7 @@ export {
|
|
|
1697
1671
|
useSheetContext,
|
|
1698
1672
|
SheetProvider,
|
|
1699
1673
|
GridSheet,
|
|
1700
|
-
|
|
1674
|
+
RangeList,
|
|
1701
1675
|
SheetContainer
|
|
1702
1676
|
};
|
|
1703
|
-
//# sourceMappingURL=chunk-
|
|
1677
|
+
//# sourceMappingURL=chunk-6GSTEN7N.mjs.map
|