@flamingo-stack/openframe-frontend-core 0.0.846 → 0.0.848
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/build/export-map.json +1 -1
- package/dist/{case-study-card-DJOHIHYU.cjs → case-study-card-X2HKPKT7.cjs} +5 -5
- package/dist/{chunk-N2A24FDF.cjs → chunk-2V6FCVUL.cjs} +955 -932
- package/dist/{chunk-CNMXP77I.cjs → chunk-36DUCHI7.cjs} +4 -4
- package/dist/{chunk-J2IXYCEH.cjs → chunk-3W4ASAXN.cjs} +15 -15
- package/dist/{chunk-6LDL3UZE.cjs → chunk-4YBS4HIO.cjs} +20 -20
- package/dist/{chunk-QK2A334V.cjs → chunk-5HOWR4TG.cjs} +12 -12
- package/dist/{chunk-2FUTZKLB.cjs → chunk-74Z34I2C.cjs} +6 -6
- package/dist/{chunk-PV3NKXWS.cjs → chunk-7DW3LZ52.cjs} +57 -57
- package/dist/{chunk-ZTO7KNYV.cjs → chunk-7LE4HWHA.cjs} +35 -35
- package/dist/{chunk-URP6GYTD.cjs → chunk-7YJQTQPV.cjs} +56 -56
- package/dist/{chunk-4R4HAFXI.cjs → chunk-ALRYVZ3E.cjs} +6 -6
- package/dist/{chunk-57JYB3E2.cjs → chunk-C3WZXOZJ.cjs} +3 -3
- package/dist/{chunk-SSSI2RBV.cjs → chunk-FNQWL4W4.cjs} +14 -14
- package/dist/{chunk-J2ZSGOUC.cjs → chunk-GASFYPGH.cjs} +27 -27
- package/dist/{chunk-3V5JWG27.cjs → chunk-GG466XFQ.cjs} +2 -2
- package/dist/{chunk-XCVH5BCZ.cjs → chunk-GRCOEICK.cjs} +6 -6
- package/dist/{chunk-5GBLXY5F.cjs → chunk-HTYJUMFB.cjs} +7 -7
- package/dist/{chunk-HBDLJUI3.cjs → chunk-I3YRYS23.cjs} +5 -5
- package/dist/{chunk-HPXET3LH.cjs → chunk-IIUZE73M.cjs} +27 -27
- package/dist/{chunk-WCK5T3UD.cjs → chunk-IKOL6NJY.cjs} +101 -69
- package/dist/{chunk-DGQDGCQH.cjs → chunk-INA2FX2N.cjs} +2 -2
- package/dist/{chunk-PQDCSZ3W.cjs → chunk-IUZVOQXP.cjs} +85 -85
- package/dist/{chunk-BIOSHDXQ.cjs → chunk-MDLT6D46.cjs} +61 -61
- package/dist/{chunk-DEEQSVLX.cjs → chunk-MWYEROAP.cjs} +90 -90
- package/dist/{chunk-D5DMWXF2.cjs → chunk-NYT6IBIX.cjs} +4 -4
- package/dist/{chunk-TBOWFTEN.cjs → chunk-O4BXHCMK.cjs} +22 -22
- package/dist/{chunk-YC52LSPP.cjs → chunk-OCJXOSIH.cjs} +40 -40
- package/dist/{chunk-3TOWCFIK.cjs → chunk-PMUCEUFQ.cjs} +13 -1
- package/dist/{chunk-BZZE4KIV.cjs → chunk-QUSCSYHJ.cjs} +135 -135
- package/dist/{chunk-744JXTDP.cjs → chunk-SA2NNWIJ.cjs} +23 -23
- package/dist/{chunk-BHOVF4KP.cjs → chunk-SOSIXRQ3.cjs} +2 -2
- package/dist/{chunk-PZNWIJRZ.cjs → chunk-TIVPOVIM.cjs} +2 -2
- package/dist/{chunk-FLW4WULE.cjs → chunk-U7UBYJEZ.cjs} +17 -61
- package/dist/{chunk-Y2OEC7UW.cjs → chunk-VW4446JR.cjs} +40 -40
- package/dist/{chunk-NFNSPLGC.cjs → chunk-W7OFAROY.cjs} +14 -9
- package/dist/{chunk-RAJ5FYFL.cjs → chunk-Y2ZWWIUA.cjs} +14 -14
- package/dist/{chunk-MPVOPSU6.cjs → chunk-Y4BG7SPX.cjs} +96 -96
- package/dist/{chunk-SIFRIUPW.cjs → chunk-YAW7CHLV.cjs} +340 -354
- package/dist/{chunk-ABL5OBSF.cjs → chunk-YXKAHQYS.cjs} +294 -249
- package/dist/{chunk-SWF6TNZ3.cjs → chunk-ZGEWT3SF.cjs} +2 -2
- package/dist/{chunk-5SZ4ILU3.cjs → chunk-ZZDFMUEU.cjs} +3 -3
- package/dist/{cloud-tenants-XEUUMABT.cjs → cloud-tenants-YAZHLPOQ.cjs} +21 -21
- package/dist/components/case-studies/index.cjs +36 -36
- package/dist/components/chat/chat-composer.d.ts.map +1 -1
- package/dist/components/chat/chat-composer.js +4 -3
- package/dist/components/chat/chat-container.d.ts.map +1 -1
- package/dist/components/chat/chat-container.js +2 -2
- package/dist/components/chat/entity-cards/design-doc-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/design-doc-card.js +5 -17
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.js +4 -7
- package/dist/components/chat/index.cjs +15 -15
- package/dist/components/contact/index.cjs +22 -22
- package/dist/components/docs/index.cjs +25 -25
- package/dist/components/embeds/index.cjs +22 -22
- package/dist/components/faq/index.cjs +23 -23
- package/dist/components/features/index.cjs +21 -21
- package/dist/components/features/status-filter-component.d.ts +7 -1
- package/dist/components/features/status-filter-component.d.ts.map +1 -1
- package/dist/components/features/status-filter-component.js +9 -3
- package/dist/components/help-center-pages/index.cjs +140 -140
- package/dist/components/index.cjs +137 -135
- package/dist/components/layout/back-button.d.ts +7 -1
- package/dist/components/layout/back-button.d.ts.map +1 -1
- package/dist/components/layout/back-button.js +34 -2
- package/dist/components/loading/unified-skeleton.d.ts +6 -1
- package/dist/components/loading/unified-skeleton.d.ts.map +1 -1
- package/dist/components/loading/unified-skeleton.js +13 -1
- package/dist/components/meeting-scheduler/index.cjs +119 -119
- package/dist/components/navigation/index.cjs +24 -24
- package/dist/components/onboarding-guides/index.cjs +24 -24
- package/dist/components/product-demo/index.cjs +33 -33
- package/dist/components/related-content/index.cjs +11 -11
- package/dist/components/tickets/index.cjs +28 -28
- package/dist/components/ui/file-manager/file-manager-table.d.ts.map +1 -1
- package/dist/components/ui/file-manager/file-manager-table.js +63 -85
- package/dist/components/ui/file-manager/index.cjs +87 -109
- package/dist/components/ui/index.cjs +23 -21
- package/dist/components/ui/markdown/engine.d.ts +5 -4
- package/dist/components/ui/markdown/engine.d.ts.map +1 -1
- package/dist/components/ui/markdown/engine.js +15 -15
- package/dist/components/ui/people-cell.d.ts +9 -2
- package/dist/components/ui/people-cell.d.ts.map +1 -1
- package/dist/components/ui/people-cell.js +39 -23
- package/dist/components/ui/progress-bar.d.ts +6 -0
- package/dist/components/ui/progress-bar.d.ts.map +1 -1
- package/dist/components/ui/progress-bar.js +2 -0
- package/dist/components/ui/tag.d.ts +8 -0
- package/dist/components/ui/tag.d.ts.map +1 -1
- package/dist/components/ui/tag.js +5 -0
- package/dist/{devices-7YDIHVVP.cjs → devices-IZROCLFK.cjs} +22 -22
- package/dist/embed-shims/index.cjs +3 -3
- package/dist/embed-shims/next-image.cjs +3 -3
- package/dist/{embeddable-chat-Z3S37SSM.cjs → embeddable-chat-ETW6S22E.cjs} +94 -94
- package/dist/hooks/index.cjs +6 -6
- package/dist/index.cjs +30 -32
- package/dist/{knowledge-SQVPQSKM.cjs → knowledge-4IRWLTNW.cjs} +22 -22
- package/dist/{logs-M5DFGUBC.cjs → logs-EFDGY5IO.cjs} +28 -28
- package/dist/{policies-T3VQEJUD.cjs → policies-3KEXZ5BP.cjs} +25 -25
- package/dist/{remote-session-EE6477O3.cjs → remote-session-NT4NG7EF.cjs} +10 -10
- package/dist/{scripts-JFRFJKPH.cjs → scripts-PCGTZLZL.cjs} +28 -28
- package/dist/{software-update-E7W3AAIY.cjs → software-update-YCDNVFJE.cjs} +25 -25
- package/dist/{tickets-board-44HO3LR4.cjs → tickets-board-7FLGQEHF.cjs} +10 -10
- package/dist/types/design-doc.d.ts +45 -8
- package/dist/types/design-doc.d.ts.map +1 -1
- package/dist/utils/design-doc-readiness.d.ts +17 -15
- package/dist/utils/design-doc-readiness.d.ts.map +1 -1
- package/dist/utils/design-doc-readiness.js +5 -11
- package/dist/utils/index.cjs +5 -11
- package/package.json +1 -1
- package/src/components/chat/chat-composer.tsx +10 -3
- package/src/components/chat/chat-container.tsx +6 -4
- package/src/components/chat/entity-cards/design-doc-card.tsx +12 -17
- package/src/components/chat/entity-cards/dispatch.tsx +7 -10
- package/src/components/features/status-filter-component.tsx +15 -0
- package/src/components/layout/back-button.tsx +54 -2
- package/src/components/loading/unified-skeleton.tsx +18 -2
- package/src/components/ui/file-manager/file-manager-table.tsx +10 -45
- package/src/components/ui/markdown/engine.tsx +21 -30
- package/src/components/ui/people-cell.tsx +53 -17
- package/src/components/ui/progress-bar.tsx +8 -0
- package/src/components/ui/tag.tsx +14 -0
- package/src/types/design-doc.ts +59 -10
- package/src/utils/design-doc-readiness.ts +22 -23
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useMemo } from "react";
|
|
4
4
|
import { cn } from "../../../utils/cn.js";
|
|
5
5
|
import { Checkbox } from "../checkbox.js";
|
|
6
6
|
import { LoadingItems, useLoadingScope } from "../loading-scope.js";
|
|
@@ -36,99 +36,77 @@ function FileManagerTable({
|
|
|
36
36
|
const someSelected = useMemo(() => {
|
|
37
37
|
return selectedFiles.length > 0 && selectedFiles.length < files.length;
|
|
38
38
|
}, [files.length, selectedFiles.length]);
|
|
39
|
-
const containerRef = useRef(null);
|
|
40
|
-
const [measuredHeight, setTableHeight] = useState(null);
|
|
41
|
-
const tableHeight = loading || files.length === 0 ? null : measuredHeight;
|
|
42
|
-
useLayoutEffect(() => {
|
|
43
|
-
if (loading || files.length === 0) return void 0;
|
|
44
|
-
const handleResize = () => {
|
|
45
|
-
const node = containerRef.current;
|
|
46
|
-
if (!node) return;
|
|
47
|
-
const rect = node.getBoundingClientRect();
|
|
48
|
-
const availableHeight = window.innerHeight - rect.top;
|
|
49
|
-
setTableHeight(availableHeight > 0 ? availableHeight : null);
|
|
50
|
-
};
|
|
51
|
-
handleResize();
|
|
52
|
-
window.addEventListener("resize", handleResize);
|
|
53
|
-
window.addEventListener("scroll", handleResize, true);
|
|
54
|
-
const resizeObserver = new ResizeObserver(handleResize);
|
|
55
|
-
const parent = containerRef.current?.parentElement;
|
|
56
|
-
if (parent) {
|
|
57
|
-
resizeObserver.observe(parent);
|
|
58
|
-
} else if (containerRef.current) {
|
|
59
|
-
resizeObserver.observe(containerRef.current);
|
|
60
|
-
}
|
|
61
|
-
return () => {
|
|
62
|
-
window.removeEventListener("resize", handleResize);
|
|
63
|
-
window.removeEventListener("scroll", handleResize, true);
|
|
64
|
-
resizeObserver.disconnect();
|
|
65
|
-
};
|
|
66
|
-
}, [loading, files.length]);
|
|
67
39
|
const handleSelectAll = (checked) => {
|
|
68
40
|
onSelectAll?.(checked);
|
|
69
41
|
};
|
|
70
42
|
if (!loading && files.length === 0) {
|
|
71
43
|
return /* @__PURE__ */ jsx(FileManagerEmpty, {});
|
|
72
44
|
}
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
45
|
+
return (
|
|
46
|
+
// The height its parent gives it, both forms: the rows scroll inside, under the header. Not
|
|
47
|
+
// the window's: whatever is below the parent (a docked composer, a page's padding) would
|
|
48
|
+
// hide the last rows under it. A parent of no definite height lets the table grow with its rows.
|
|
49
|
+
// `overflow-hidden` rounds the header and the rows at the border's inner curve: a child rounded
|
|
50
|
+
// to the frame's own radius sits 1px inside it and leaves a sliver of the frame's fill at each
|
|
51
|
+
// corner. Nothing floats out of the table (the row menu is portalled).
|
|
52
|
+
/* @__PURE__ */ jsxs(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
className: cn("flex h-full flex-col overflow-hidden rounded-lg border border-ods-border bg-ods-bg", className),
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsxs("div", { className: "flex h-12 items-center border-b border-ods-border bg-ods-bg-surface px-4", children: [
|
|
58
|
+
showCheckboxes && /* @__PURE__ */ jsx(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: FILE_MANAGER_CHECKBOX_CELL_CLASS,
|
|
62
|
+
inert: loading || void 0,
|
|
63
|
+
"aria-hidden": loading || void 0,
|
|
64
|
+
children: /* @__PURE__ */ jsx(
|
|
65
|
+
Checkbox,
|
|
66
|
+
{
|
|
67
|
+
checked: allSelected || someSelected,
|
|
68
|
+
onCheckedChange: handleSelectAll,
|
|
69
|
+
boxClassName: FILE_MANAGER_CHECKBOX_BOX_CLASS
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx("div", { className: cn(FILE_MANAGER_NAME_CELL_CLASS, HEADER_LABEL_CLASS), children: "NAME" }),
|
|
75
|
+
/* @__PURE__ */ jsx("div", { className: cn(FILE_MANAGER_SIZE_CELL_BOX_CLASS, HEADER_LABEL_CLASS), children: "SIZE" }),
|
|
76
|
+
/* @__PURE__ */ jsx("div", { className: cn(FILE_MANAGER_MODIFIED_CELL_BOX_CLASS, HEADER_LABEL_CLASS), children: "EDITED" }),
|
|
77
|
+
/* @__PURE__ */ jsx("div", { className: FILE_MANAGER_ACTIONS_CELL_BOX_CLASS })
|
|
78
|
+
] }),
|
|
79
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 divide-y divide-ods-border overflow-auto", children: loading ? (
|
|
80
|
+
// A folder listing has no page size: a typical folder's rows, each the row's own loading form.
|
|
81
|
+
/* @__PURE__ */ jsx(LoadingItems, { count: FILE_MANAGER_SKELETON_ROWS, children: () => /* @__PURE__ */ jsx(FileManagerTableRow, { loading: true, showCheckbox: showCheckboxes, showPath: isSearchResult, "data-loading-item": true }) })
|
|
82
|
+
) : files.map((file) => /* @__PURE__ */ jsx(
|
|
83
|
+
FileManagerTableRow,
|
|
83
84
|
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
file,
|
|
86
|
+
isSelected: selectedFiles.includes(file.id),
|
|
87
|
+
showCheckbox: showCheckboxes,
|
|
88
|
+
showPath: isSearchResult,
|
|
89
|
+
onSelect: (selected) => onSelectFile?.(file.id, selected),
|
|
90
|
+
onClick: () => {
|
|
91
|
+
if (isSearchResult) {
|
|
92
|
+
onFileClick?.(file);
|
|
93
|
+
} else if (file.type === "folder") {
|
|
94
|
+
onFolderOpen?.(file);
|
|
93
95
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 divide-y divide-ods-border overflow-auto rounded-b-lg", children: loading ? (
|
|
103
|
-
// A folder listing has no page size: a typical folder's rows, each the row's own loading form.
|
|
104
|
-
/* @__PURE__ */ jsx(LoadingItems, { count: FILE_MANAGER_SKELETON_ROWS, children: () => /* @__PURE__ */ jsx(FileManagerTableRow, { loading: true, showCheckbox: showCheckboxes, showPath: isSearchResult, "data-loading-item": true }) })
|
|
105
|
-
) : files.map((file) => /* @__PURE__ */ jsx(
|
|
106
|
-
FileManagerTableRow,
|
|
107
|
-
{
|
|
108
|
-
file,
|
|
109
|
-
isSelected: selectedFiles.includes(file.id),
|
|
110
|
-
showCheckbox: showCheckboxes,
|
|
111
|
-
showPath: isSearchResult,
|
|
112
|
-
onSelect: (selected) => onSelectFile?.(file.id, selected),
|
|
113
|
-
onClick: () => {
|
|
114
|
-
if (isSearchResult) {
|
|
115
|
-
onFileClick?.(file);
|
|
116
|
-
} else if (file.type === "folder") {
|
|
117
|
-
onFolderOpen?.(file);
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
onDoubleClick: () => {
|
|
121
|
-
if (file.type === "folder" && !isSearchResult) {
|
|
122
|
-
onFolderOpen?.(file);
|
|
123
|
-
}
|
|
96
|
+
},
|
|
97
|
+
onDoubleClick: () => {
|
|
98
|
+
if (file.type === "folder" && !isSearchResult) {
|
|
99
|
+
onFolderOpen?.(file);
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
onActionClick: (action) => onFileAction?.(action, file.id),
|
|
103
|
+
"data-loading-item": true
|
|
124
104
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
]
|
|
131
|
-
}
|
|
105
|
+
file.id
|
|
106
|
+
)) })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
)
|
|
132
110
|
);
|
|
133
111
|
}
|
|
134
112
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkZZDFMUEUcjs = require('../../../chunk-ZZDFMUEU.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkZGEWT3SFcjs = require('../../../chunk-ZGEWT3SF.cjs');
|
|
8
8
|
require('../../../chunk-N3MBQRCQ.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ var _chunk2XCORRJVcjs = require('../../../chunk-2XCORRJV.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkPMUCEUFQcjs = require('../../../chunk-PMUCEUFQ.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkFCZAUK4Dcjs = require('../../../chunk-FCZAUK4D.cjs');
|
|
@@ -316,7 +316,7 @@ function FileManagerTableRow(props) {
|
|
|
316
316
|
..._chunk63A4GZMBcjs.loadingItemProps.call(void 0, props),
|
|
317
317
|
children: [
|
|
318
318
|
showCheckbox && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: FILE_MANAGER_CHECKBOX_CELL_CLASS, "data-no-row-click": true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
319
|
-
|
|
319
|
+
_chunkZZDFMUEUcjs.Checkbox,
|
|
320
320
|
{
|
|
321
321
|
checked: isSelected,
|
|
322
322
|
onCheckedChange: handleCheckboxChange,
|
|
@@ -382,19 +382,19 @@ function FileManagerTableRowSkeleton({
|
|
|
382
382
|
...markers
|
|
383
383
|
}) {
|
|
384
384
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { "aria-hidden": "true", inert: true, className: _chunk63A4GZMBcjs.cn.call(void 0, FILE_MANAGER_ROW_FRAME_CLASS, className), ...markers, children: [
|
|
385
|
-
showCheckbox && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: FILE_MANAGER_CHECKBOX_CELL_CLASS, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
385
|
+
showCheckbox && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: FILE_MANAGER_CHECKBOX_CELL_CLASS, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZZDFMUEUcjs.Checkbox, { loading: true, boxClassName: FILE_MANAGER_CHECKBOX_BOX_CLASS }) }),
|
|
386
386
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: FILE_MANAGER_NAME_CELL_CLASS, children: [
|
|
387
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
387
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: _chunk63A4GZMBcjs.cn.call(void 0, ROW_FILE_ICON_CLASS, "shrink-0 rounded") }),
|
|
388
388
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col", children: [
|
|
389
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
390
|
-
showPath && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
389
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.TextLineSkeleton, { type: "h6", className: "w-32" }),
|
|
390
|
+
showPath && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.TextLineSkeleton, { type: "h6", className: "w-48" })
|
|
391
391
|
] })
|
|
392
392
|
] }),
|
|
393
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: SIZE_CELL_CLASS, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
394
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: MODIFIED_CELL_CLASS, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
393
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: SIZE_CELL_CLASS, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.TextLineSkeleton, { type: "h6", className: "w-16" }) }),
|
|
394
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: MODIFIED_CELL_CLASS, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.TextLineSkeleton, { type: "h6", className: "w-24" }) }),
|
|
395
395
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: ACTIONS_CELL_CLASS, children: [
|
|
396
396
|
rowMenuButton(),
|
|
397
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
397
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPMUCEUFQcjs.UnifiedSkeleton, { className: _chunk63A4GZMBcjs.cn.call(void 0, ROW_ICON_BUTTON_CLASS, "rounded") })
|
|
398
398
|
] })
|
|
399
399
|
] });
|
|
400
400
|
}
|
|
@@ -423,99 +423,77 @@ function FileManagerTable({
|
|
|
423
423
|
const someSelected = _react.useMemo.call(void 0, () => {
|
|
424
424
|
return selectedFiles.length > 0 && selectedFiles.length < files.length;
|
|
425
425
|
}, [files.length, selectedFiles.length]);
|
|
426
|
-
const containerRef = _react.useRef.call(void 0, null);
|
|
427
|
-
const [measuredHeight, setTableHeight] = _react.useState.call(void 0, null);
|
|
428
|
-
const tableHeight = loading || files.length === 0 ? null : measuredHeight;
|
|
429
|
-
_react.useLayoutEffect.call(void 0, () => {
|
|
430
|
-
if (loading || files.length === 0) return void 0;
|
|
431
|
-
const handleResize = () => {
|
|
432
|
-
const node = containerRef.current;
|
|
433
|
-
if (!node) return;
|
|
434
|
-
const rect = node.getBoundingClientRect();
|
|
435
|
-
const availableHeight = window.innerHeight - rect.top;
|
|
436
|
-
setTableHeight(availableHeight > 0 ? availableHeight : null);
|
|
437
|
-
};
|
|
438
|
-
handleResize();
|
|
439
|
-
window.addEventListener("resize", handleResize);
|
|
440
|
-
window.addEventListener("scroll", handleResize, true);
|
|
441
|
-
const resizeObserver = new ResizeObserver(handleResize);
|
|
442
|
-
const parent = _optionalChain([containerRef, 'access', _7 => _7.current, 'optionalAccess', _8 => _8.parentElement]);
|
|
443
|
-
if (parent) {
|
|
444
|
-
resizeObserver.observe(parent);
|
|
445
|
-
} else if (containerRef.current) {
|
|
446
|
-
resizeObserver.observe(containerRef.current);
|
|
447
|
-
}
|
|
448
|
-
return () => {
|
|
449
|
-
window.removeEventListener("resize", handleResize);
|
|
450
|
-
window.removeEventListener("scroll", handleResize, true);
|
|
451
|
-
resizeObserver.disconnect();
|
|
452
|
-
};
|
|
453
|
-
}, [loading, files.length]);
|
|
454
426
|
const handleSelectAll = (checked) => {
|
|
455
|
-
_optionalChain([onSelectAll, 'optionalCall',
|
|
427
|
+
_optionalChain([onSelectAll, 'optionalCall', _7 => _7(checked)]);
|
|
456
428
|
};
|
|
457
429
|
if (!loading && files.length === 0) {
|
|
458
430
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileManagerEmpty, {});
|
|
459
431
|
}
|
|
460
|
-
return
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
432
|
+
return (
|
|
433
|
+
// The height its parent gives it, both forms: the rows scroll inside, under the header. Not
|
|
434
|
+
// the window's: whatever is below the parent (a docked composer, a page's padding) would
|
|
435
|
+
// hide the last rows under it. A parent of no definite height lets the table grow with its rows.
|
|
436
|
+
// `overflow-hidden` rounds the header and the rows at the border's inner curve: a child rounded
|
|
437
|
+
// to the frame's own radius sits 1px inside it and leaves a sliver of the frame's fill at each
|
|
438
|
+
// corner. Nothing floats out of the table (the row menu is portalled).
|
|
439
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
440
|
+
"div",
|
|
441
|
+
{
|
|
442
|
+
className: _chunk63A4GZMBcjs.cn.call(void 0, "flex h-full flex-col overflow-hidden rounded-lg border border-ods-border bg-ods-bg", className),
|
|
443
|
+
children: [
|
|
444
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-12 items-center border-b border-ods-border bg-ods-bg-surface px-4", children: [
|
|
445
|
+
showCheckboxes && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
446
|
+
"div",
|
|
447
|
+
{
|
|
448
|
+
className: FILE_MANAGER_CHECKBOX_CELL_CLASS,
|
|
449
|
+
inert: loading || void 0,
|
|
450
|
+
"aria-hidden": loading || void 0,
|
|
451
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
452
|
+
_chunkZZDFMUEUcjs.Checkbox,
|
|
453
|
+
{
|
|
454
|
+
checked: allSelected || someSelected,
|
|
455
|
+
onCheckedChange: handleSelectAll,
|
|
456
|
+
boxClassName: FILE_MANAGER_CHECKBOX_BOX_CLASS
|
|
457
|
+
}
|
|
458
|
+
)
|
|
459
|
+
}
|
|
460
|
+
),
|
|
461
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk63A4GZMBcjs.cn.call(void 0, FILE_MANAGER_NAME_CELL_CLASS, HEADER_LABEL_CLASS), children: "NAME" }),
|
|
462
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk63A4GZMBcjs.cn.call(void 0, FILE_MANAGER_SIZE_CELL_BOX_CLASS, HEADER_LABEL_CLASS), children: "SIZE" }),
|
|
463
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk63A4GZMBcjs.cn.call(void 0, FILE_MANAGER_MODIFIED_CELL_BOX_CLASS, HEADER_LABEL_CLASS), children: "EDITED" }),
|
|
464
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: FILE_MANAGER_ACTIONS_CELL_BOX_CLASS })
|
|
465
|
+
] }),
|
|
466
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 divide-y divide-ods-border overflow-auto", children: loading ? (
|
|
467
|
+
// A folder listing has no page size: a typical folder's rows, each the row's own loading form.
|
|
468
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk63A4GZMBcjs.LoadingItems, { count: FILE_MANAGER_SKELETON_ROWS, children: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileManagerTableRow, { loading: true, showCheckbox: showCheckboxes, showPath: isSearchResult, "data-loading-item": true }) })
|
|
469
|
+
) : files.map((file) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
470
|
+
FileManagerTableRow,
|
|
470
471
|
{
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
472
|
+
file,
|
|
473
|
+
isSelected: selectedFiles.includes(file.id),
|
|
474
|
+
showCheckbox: showCheckboxes,
|
|
475
|
+
showPath: isSearchResult,
|
|
476
|
+
onSelect: (selected) => _optionalChain([onSelectFile, 'optionalCall', _8 => _8(file.id, selected)]),
|
|
477
|
+
onClick: () => {
|
|
478
|
+
if (isSearchResult) {
|
|
479
|
+
_optionalChain([onFileClick, 'optionalCall', _9 => _9(file)]);
|
|
480
|
+
} else if (file.type === "folder") {
|
|
481
|
+
_optionalChain([onFolderOpen, 'optionalCall', _10 => _10(file)]);
|
|
480
482
|
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 divide-y divide-ods-border overflow-auto rounded-b-lg", children: loading ? (
|
|
490
|
-
// A folder listing has no page size: a typical folder's rows, each the row's own loading form.
|
|
491
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk63A4GZMBcjs.LoadingItems, { count: FILE_MANAGER_SKELETON_ROWS, children: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileManagerTableRow, { loading: true, showCheckbox: showCheckboxes, showPath: isSearchResult, "data-loading-item": true }) })
|
|
492
|
-
) : files.map((file) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
493
|
-
FileManagerTableRow,
|
|
494
|
-
{
|
|
495
|
-
file,
|
|
496
|
-
isSelected: selectedFiles.includes(file.id),
|
|
497
|
-
showCheckbox: showCheckboxes,
|
|
498
|
-
showPath: isSearchResult,
|
|
499
|
-
onSelect: (selected) => _optionalChain([onSelectFile, 'optionalCall', _10 => _10(file.id, selected)]),
|
|
500
|
-
onClick: () => {
|
|
501
|
-
if (isSearchResult) {
|
|
502
|
-
_optionalChain([onFileClick, 'optionalCall', _11 => _11(file)]);
|
|
503
|
-
} else if (file.type === "folder") {
|
|
504
|
-
_optionalChain([onFolderOpen, 'optionalCall', _12 => _12(file)]);
|
|
505
|
-
}
|
|
506
|
-
},
|
|
507
|
-
onDoubleClick: () => {
|
|
508
|
-
if (file.type === "folder" && !isSearchResult) {
|
|
509
|
-
_optionalChain([onFolderOpen, 'optionalCall', _13 => _13(file)]);
|
|
510
|
-
}
|
|
483
|
+
},
|
|
484
|
+
onDoubleClick: () => {
|
|
485
|
+
if (file.type === "folder" && !isSearchResult) {
|
|
486
|
+
_optionalChain([onFolderOpen, 'optionalCall', _11 => _11(file)]);
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
onActionClick: (action) => _optionalChain([onFileAction, 'optionalCall', _12 => _12(action, file.id)]),
|
|
490
|
+
"data-loading-item": true
|
|
511
491
|
},
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
]
|
|
518
|
-
}
|
|
492
|
+
file.id
|
|
493
|
+
)) })
|
|
494
|
+
]
|
|
495
|
+
}
|
|
496
|
+
)
|
|
519
497
|
);
|
|
520
498
|
}
|
|
521
499
|
|
|
@@ -591,8 +569,8 @@ function FileManager({
|
|
|
591
569
|
return items;
|
|
592
570
|
}, [currentPath]);
|
|
593
571
|
const handleBreadcrumbClick = (path) => {
|
|
594
|
-
_optionalChain([onBreadcrumbClick, 'optionalCall',
|
|
595
|
-
_optionalChain([onNavigate, 'optionalCall',
|
|
572
|
+
_optionalChain([onBreadcrumbClick, 'optionalCall', _13 => _13(path)]);
|
|
573
|
+
_optionalChain([onNavigate, 'optionalCall', _14 => _14(path)]);
|
|
596
574
|
};
|
|
597
575
|
const handleFolderOpen = (file) => {
|
|
598
576
|
let newPath;
|
|
@@ -612,14 +590,14 @@ function FileManager({
|
|
|
612
590
|
newPath = currentPath + separator + file.name;
|
|
613
591
|
}
|
|
614
592
|
}
|
|
615
|
-
_optionalChain([onFolderOpen, 'optionalCall',
|
|
616
|
-
_optionalChain([onNavigate, 'optionalCall',
|
|
593
|
+
_optionalChain([onFolderOpen, 'optionalCall', _15 => _15(file)]);
|
|
594
|
+
_optionalChain([onNavigate, 'optionalCall', _16 => _16(newPath)]);
|
|
617
595
|
};
|
|
618
596
|
const handleSelectAll = (selected) => {
|
|
619
|
-
_optionalChain([onSelectAll, 'optionalCall',
|
|
597
|
+
_optionalChain([onSelectAll, 'optionalCall', _17 => _17(selected)]);
|
|
620
598
|
};
|
|
621
599
|
const handleSelectFile = (fileId, selected) => {
|
|
622
|
-
_optionalChain([onSelectFile, 'optionalCall',
|
|
600
|
+
_optionalChain([onSelectFile, 'optionalCall', _18 => _18(fileId, selected)]);
|
|
623
601
|
};
|
|
624
602
|
return (
|
|
625
603
|
// One tree in both forms (nothing remounts when the folder answers); the region says it is loading, once.
|
|
@@ -637,21 +615,21 @@ function FileManager({
|
|
|
637
615
|
{
|
|
638
616
|
canPaste,
|
|
639
617
|
hasSelection: selectedFiles.length > 0,
|
|
640
|
-
onNewFolder: () => _optionalChain([onFileAction, 'optionalCall',
|
|
641
|
-
onPaste: () => _optionalChain([onFileAction, 'optionalCall',
|
|
642
|
-
onCopy: () => _optionalChain([onFileAction, 'optionalCall',
|
|
643
|
-
onCut: () => _optionalChain([onFileAction, 'optionalCall',
|
|
644
|
-
onUpload: () => _optionalChain([onFileAction, 'optionalCall',
|
|
618
|
+
onNewFolder: () => _optionalChain([onFileAction, 'optionalCall', _19 => _19("new-folder")]),
|
|
619
|
+
onPaste: () => _optionalChain([onFileAction, 'optionalCall', _20 => _20("paste")]),
|
|
620
|
+
onCopy: () => _optionalChain([onFileAction, 'optionalCall', _21 => _21("copy")]),
|
|
621
|
+
onCut: () => _optionalChain([onFileAction, 'optionalCall', _22 => _22("cut")]),
|
|
622
|
+
onUpload: () => _optionalChain([onFileAction, 'optionalCall', _23 => _23("upload")]),
|
|
645
623
|
onSelectAll: () => handleSelectAll(true)
|
|
646
624
|
}
|
|
647
625
|
)
|
|
648
626
|
] }),
|
|
649
627
|
showSearch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
650
|
-
|
|
628
|
+
_chunkZGEWT3SFcjs.Input,
|
|
651
629
|
{
|
|
652
630
|
userValue: true,
|
|
653
631
|
value: searchQuery,
|
|
654
|
-
onChange: (e) => _optionalChain([onSearch, 'optionalCall',
|
|
632
|
+
onChange: (e) => _optionalChain([onSearch, 'optionalCall', _24 => _24(e.target.value)]),
|
|
655
633
|
placeholder: "Search...",
|
|
656
634
|
disabled: disableSearch,
|
|
657
635
|
startAdornment: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ74QE57Tcjs.SearchIcon, {}),
|