react-os-shell 3.14.2 → 3.15.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/dist/{Browser-XFQRBIF2.js → Browser-MGPP32VZ.js} +4 -4
- package/dist/{Browser-XFQRBIF2.js.map → Browser-MGPP32VZ.js.map} +1 -1
- package/dist/{Documents-GEBFR23U.js → Documents-GUAZ2I6C.js} +3 -3
- package/dist/{Documents-GEBFR23U.js.map → Documents-GUAZ2I6C.js.map} +1 -1
- package/dist/Files-4OWK6XKC.js +12 -0
- package/dist/{Files-PZ3XY3QV.js.map → Files-4OWK6XKC.js.map} +1 -1
- package/dist/{Notepad-QLWMRFXJ.js → Notepad-DTOSYSHN.js} +3 -3
- package/dist/{Notepad-QLWMRFXJ.js.map → Notepad-DTOSYSHN.js.map} +1 -1
- package/dist/Preview-XSJH2DJX.js +8 -0
- package/dist/{Preview-XSENQ2JX.js.map → Preview-XSJH2DJX.js.map} +1 -1
- package/dist/{Spreadsheet-VE2FEXFK.js → Spreadsheet-M552BN3Q.js} +4 -4
- package/dist/{Spreadsheet-VE2FEXFK.js.map → Spreadsheet-M552BN3Q.js.map} +1 -1
- package/dist/apps/index.d.ts +13 -14
- package/dist/apps/index.js +12 -12
- package/dist/{chunk-GYAP4IBA.js → chunk-72RLGQXP.js} +4 -4
- package/dist/{chunk-GYAP4IBA.js.map → chunk-72RLGQXP.js.map} +1 -1
- package/dist/{chunk-FKZTCOOQ.js → chunk-BK3ZZRRD.js} +3 -3
- package/dist/{chunk-FKZTCOOQ.js.map → chunk-BK3ZZRRD.js.map} +1 -1
- package/dist/{chunk-7E7UQYFL.js → chunk-CTEIE7ZI.js} +3 -3
- package/dist/{chunk-7E7UQYFL.js.map → chunk-CTEIE7ZI.js.map} +1 -1
- package/dist/{chunk-ATLWPGXH.js → chunk-DARFRWON.js} +4 -4
- package/dist/{chunk-ATLWPGXH.js.map → chunk-DARFRWON.js.map} +1 -1
- package/dist/{chunk-6GVIP3TJ.js → chunk-F4YQYEJQ.js} +3 -3
- package/dist/{chunk-6GVIP3TJ.js.map → chunk-F4YQYEJQ.js.map} +1 -1
- package/dist/{chunk-7GSHFSWI.js → chunk-Q2T2FDU3.js} +3 -3
- package/dist/{chunk-7GSHFSWI.js.map → chunk-Q2T2FDU3.js.map} +1 -1
- package/dist/index.d.ts +107 -87
- package/dist/index.js +124 -46
- package/dist/index.js.map +1 -1
- package/dist/{types-BHVq95fp.d.ts → types-CVECHskm.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/Files-PZ3XY3QV.js +0 -12
- package/dist/Preview-XSENQ2JX.js +0 -8
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { subscribePomo, getPomoSnapshot } from './chunk-KHKPAF5R.js';
|
|
2
2
|
export { setShellTodoProvider } from './chunk-KHKPAF5R.js';
|
|
3
|
-
import { PREVIEW_OPENED_EVENT, publishDesktopFolders, requestFilesTrashView, FolderGlyph, openPreviewFile, requestFilesDesktopFolderView, FileIconTile, hashGradient } from './chunk-
|
|
4
|
-
export { Breadcrumbs } from './chunk-
|
|
3
|
+
import { PREVIEW_OPENED_EVENT, publishDesktopFolders, requestFilesTrashView, FolderGlyph, openPreviewFile, requestFilesDesktopFolderView, FileIconTile, hashGradient } from './chunk-72RLGQXP.js';
|
|
4
|
+
export { Breadcrumbs } from './chunk-72RLGQXP.js';
|
|
5
5
|
import { SidebarLayout } from './chunk-YG45DAUT.js';
|
|
6
6
|
export { SidebarLayout } from './chunk-YG45DAUT.js';
|
|
7
7
|
import { playNotification, playStartup, soundsEnabled, getSoundConfig, SOUND_PACK_KEYS, SOUND_PACKS, SOUND_TYPES, SOUND_TYPE_LABELS, setSoundForType, previewSound, setAllSounds, playLogout } from './chunk-D7PYW2QS.js';
|
|
8
|
-
import { setPdfPreview } from './chunk-
|
|
9
|
-
export { ImageAnnotator_default as ImageAnnotator } from './chunk-
|
|
8
|
+
import { setPdfPreview } from './chunk-F4YQYEJQ.js';
|
|
9
|
+
export { ImageAnnotator_default as ImageAnnotator } from './chunk-F4YQYEJQ.js';
|
|
10
10
|
import { toast_default } from './chunk-VENYVK3L.js';
|
|
11
11
|
export { toast_default as toast } from './chunk-VENYVK3L.js';
|
|
12
|
-
import { EditableGrid } from './chunk-
|
|
13
|
-
export { EditableGrid } from './chunk-
|
|
12
|
+
import { EditableGrid } from './chunk-BK3ZZRRD.js';
|
|
13
|
+
export { EditableGrid } from './chunk-BK3ZZRRD.js';
|
|
14
14
|
import { useAuth, useShellAuth } from './chunk-ADJ3CERD.js';
|
|
15
15
|
export { ShellAuthProvider, setShellAuthBridge, useShellAuth } from './chunk-ADJ3CERD.js';
|
|
16
|
-
import { APP_VERSION, VERSION } from './chunk-
|
|
17
|
-
export { VERSION } from './chunk-
|
|
16
|
+
import { APP_VERSION, VERSION } from './chunk-Q2T2FDU3.js';
|
|
17
|
+
export { VERSION } from './chunk-Q2T2FDU3.js';
|
|
18
18
|
import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, WINDOW_REGISTRY, isPageEntry, Modal, useShellPrefs, useIsMobile, ModalActions, useModalActive, client_default, LoadingSpinner, CancelButton, setWindowPosition, ThumbCard, activateModal } from './chunk-ZGLERMDX.js';
|
|
19
19
|
export { CancelButton, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, ShellPrefsProvider, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowTitle, commitExposeHighlight, exitExposeMode, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useLocalStoragePrefs, useModalActive, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-ZGLERMDX.js';
|
|
20
20
|
export { ConfirmProvider, confirm, confirmDestructive, prompt } from './chunk-UBN4IUDE.js';
|
|
@@ -5907,8 +5907,13 @@ function EntityList(props) {
|
|
|
5907
5907
|
footerExtra,
|
|
5908
5908
|
sentinelRef,
|
|
5909
5909
|
isFetchingNextPage,
|
|
5910
|
-
saveDefaultPerms
|
|
5910
|
+
saveDefaultPerms,
|
|
5911
|
+
exportEndpoint,
|
|
5912
|
+
exportFilename = "export.csv",
|
|
5913
|
+
contextActions
|
|
5911
5914
|
} = props;
|
|
5915
|
+
const [menu, setMenu] = useState(null);
|
|
5916
|
+
const hasMenu = !!exportEndpoint || !!contextActions;
|
|
5912
5917
|
const toggleItem = (item) => {
|
|
5913
5918
|
setSelected((prev) => {
|
|
5914
5919
|
const next = new Set(prev);
|
|
@@ -5929,6 +5934,48 @@ function EntityList(props) {
|
|
|
5929
5934
|
});
|
|
5930
5935
|
};
|
|
5931
5936
|
const focusIdx = useTableNav(items, onRowClick, toggleItem, toggleAll, selectRange);
|
|
5937
|
+
const handleRowContextMenu = (e, item) => {
|
|
5938
|
+
if (!hasMenu) return;
|
|
5939
|
+
e.preventDefault();
|
|
5940
|
+
const id = getRowId(item);
|
|
5941
|
+
if (!selected.has(id)) setSelected(/* @__PURE__ */ new Set([id]));
|
|
5942
|
+
setMenu({ x: e.clientX, y: e.clientY });
|
|
5943
|
+
};
|
|
5944
|
+
const selectedItems = items.filter((i) => selected.has(getRowId(i)));
|
|
5945
|
+
const colsParam = () => {
|
|
5946
|
+
const labelByKey = new Map(columns.map((c) => [c.key, c.label]));
|
|
5947
|
+
try {
|
|
5948
|
+
const raw = localStorage.getItem(`col-config-${tableId}`);
|
|
5949
|
+
if (raw) {
|
|
5950
|
+
const parsed = JSON.parse(raw);
|
|
5951
|
+
const cols = parsed.filter((c) => !c.hidden && c.key !== "_select" && labelByKey.has(c.key)).map((c) => `${c.key}|${labelByKey.get(c.key)}`);
|
|
5952
|
+
if (cols.length) return cols.join(",");
|
|
5953
|
+
}
|
|
5954
|
+
} catch {
|
|
5955
|
+
}
|
|
5956
|
+
return columns.filter((c) => !c.defaultHidden).map((c) => `${c.key}|${c.label}`).join(",");
|
|
5957
|
+
};
|
|
5958
|
+
const exportSelected = async () => {
|
|
5959
|
+
setMenu(null);
|
|
5960
|
+
const ids = [...selected];
|
|
5961
|
+
if (!ids.length || !exportEndpoint) return;
|
|
5962
|
+
const p = new URLSearchParams({ ids: ids.join(",") });
|
|
5963
|
+
const cols = colsParam();
|
|
5964
|
+
if (cols) p.set("cols", cols);
|
|
5965
|
+
const sep = exportEndpoint.includes("?") ? "&" : "?";
|
|
5966
|
+
try {
|
|
5967
|
+
const res = await client_default.get(`${exportEndpoint}${sep}${p}`, { responseType: "blob" });
|
|
5968
|
+
const url = window.URL.createObjectURL(new Blob([res.data], { type: "text/csv" }));
|
|
5969
|
+
const a = document.createElement("a");
|
|
5970
|
+
a.href = url;
|
|
5971
|
+
a.download = exportFilename;
|
|
5972
|
+
a.click();
|
|
5973
|
+
window.URL.revokeObjectURL(url);
|
|
5974
|
+
toast_default.success(`Exported ${ids.length} ${ids.length === 1 ? "row" : "rows"}.`);
|
|
5975
|
+
} catch {
|
|
5976
|
+
toast_default.error("CSV export failed.");
|
|
5977
|
+
}
|
|
5978
|
+
};
|
|
5932
5979
|
if (isLoading) return /* @__PURE__ */ jsx(LoadingSpinner, {});
|
|
5933
5980
|
if (items.length === 0) return /* @__PURE__ */ jsx(Fragment, { children: emptyState });
|
|
5934
5981
|
const allSelected = items.length > 0 && selected.size === items.length;
|
|
@@ -5965,44 +6012,75 @@ function EntityList(props) {
|
|
|
5965
6012
|
/* @__PURE__ */ jsx("div", { ref: sentinelRef }),
|
|
5966
6013
|
isFetchingNextPage && /* @__PURE__ */ jsx("div", { className: "text-center py-3", children: /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-500", children: "Loading more..." }) })
|
|
5967
6014
|
] }) : void 0;
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
{
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
6015
|
+
const actions = menu && contextActions ? contextActions(selectedItems) : [];
|
|
6016
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col mb-1 bg-white rounded-lg shadow overflow-hidden", children: [
|
|
6017
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ jsx(
|
|
6018
|
+
ResizableTable,
|
|
6019
|
+
{
|
|
6020
|
+
tableId,
|
|
6021
|
+
columns: fullColumns,
|
|
6022
|
+
sort,
|
|
6023
|
+
onSort,
|
|
6024
|
+
footer,
|
|
6025
|
+
afterBody,
|
|
6026
|
+
saveDefaultPerms,
|
|
6027
|
+
children: (cols) => /* @__PURE__ */ jsx("tbody", { className: "divide-y divide-gray-100", children: items.map((item, rowIdx) => {
|
|
6028
|
+
const id = getRowId(item);
|
|
6029
|
+
return /* @__PURE__ */ jsx(
|
|
6030
|
+
"tr",
|
|
6031
|
+
{
|
|
6032
|
+
"data-row-idx": rowIdx,
|
|
6033
|
+
className: `cursor-pointer ${focusIdx === rowIdx ? "bg-blue-50 ring-1 ring-inset ring-blue-300" : selected.has(id) ? "bg-blue-50 hover:bg-blue-100" : "hover:bg-gray-50"} ${getRowClassName?.(item) ?? ""}`,
|
|
6034
|
+
onClick: () => onRowClick(item),
|
|
6035
|
+
onContextMenu: hasMenu ? (e) => handleRowContextMenu(e, item) : void 0,
|
|
6036
|
+
onMouseEnter: onRowHover ? () => onRowHover(item) : void 0,
|
|
6037
|
+
children: cols.map((col) => /* @__PURE__ */ jsx("td", { className: "px-4 py-3 whitespace-nowrap text-sm overflow-hidden", children: col.key === "_select" ? /* @__PURE__ */ jsx(
|
|
6038
|
+
"input",
|
|
6039
|
+
{
|
|
6040
|
+
type: "checkbox",
|
|
6041
|
+
checked: selected.has(id),
|
|
6042
|
+
onClick: (e) => {
|
|
6043
|
+
e.stopPropagation();
|
|
6044
|
+
toggleItem(item);
|
|
6045
|
+
},
|
|
6046
|
+
readOnly: true,
|
|
6047
|
+
className: "h-3.5 w-3.5 rounded border-gray-300 text-blue-600"
|
|
6048
|
+
}
|
|
6049
|
+
) : renderCell(item, col.key) }, col.key))
|
|
6050
|
+
},
|
|
6051
|
+
id
|
|
6052
|
+
);
|
|
6053
|
+
}) })
|
|
6054
|
+
}
|
|
6055
|
+
) }),
|
|
6056
|
+
menu && /* @__PURE__ */ jsxs(PopupMenu, { portal: true, style: { left: menu.x, top: menu.y }, onClose: () => setMenu(null), minWidth: 210, children: [
|
|
6057
|
+
/* @__PURE__ */ jsxs(PopupMenuLabel, { children: [
|
|
6058
|
+
selected.size,
|
|
6059
|
+
" selected"
|
|
6060
|
+
] }),
|
|
6061
|
+
exportEndpoint && /* @__PURE__ */ jsx(PopupMenuItem, { onClick: exportSelected, children: "Export selected to CSV" }),
|
|
6062
|
+
actions.map((a, i) => /* @__PURE__ */ jsxs("div", { children: [
|
|
6063
|
+
a.divider && /* @__PURE__ */ jsx(PopupMenuDivider, {}),
|
|
6064
|
+
/* @__PURE__ */ jsx(
|
|
6065
|
+
PopupMenuItem,
|
|
5982
6066
|
{
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
onClick: () =>
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
},
|
|
6001
|
-
id
|
|
6002
|
-
);
|
|
6003
|
-
}) })
|
|
6004
|
-
}
|
|
6005
|
-
) }) });
|
|
6067
|
+
danger: a.danger,
|
|
6068
|
+
disabled: a.disabled,
|
|
6069
|
+
onClick: () => {
|
|
6070
|
+
setMenu(null);
|
|
6071
|
+
a.onClick(selectedItems);
|
|
6072
|
+
},
|
|
6073
|
+
children: a.label
|
|
6074
|
+
}
|
|
6075
|
+
)
|
|
6076
|
+
] }, i)),
|
|
6077
|
+
/* @__PURE__ */ jsx(PopupMenuDivider, {}),
|
|
6078
|
+
/* @__PURE__ */ jsx(PopupMenuItem, { onClick: () => {
|
|
6079
|
+
setMenu(null);
|
|
6080
|
+
setSelected(/* @__PURE__ */ new Set());
|
|
6081
|
+
}, children: "Clear selection" })
|
|
6082
|
+
] })
|
|
6083
|
+
] });
|
|
6006
6084
|
}
|
|
6007
6085
|
function Kanban({
|
|
6008
6086
|
items,
|