@abraca/nuxt 2.61.0 → 2.63.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/module.json +1 -1
- package/dist/runtime/components/ADocRenderer.d.vue.ts +8 -0
- package/dist/runtime/components/ADocRenderer.vue +3 -1
- package/dist/runtime/components/ADocRenderer.vue.d.ts +8 -0
- package/dist/runtime/components/AEditor.vue +194 -6
- package/dist/runtime/components/ANodePanel.d.vue.ts +9 -0
- package/dist/runtime/components/ANodePanel.vue +15 -3
- package/dist/runtime/components/ANodePanel.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/AChecklistRenderer.vue +9 -6
- package/dist/runtime/components/renderers/AGalleryRenderer.vue +45 -41
- package/dist/runtime/components/renderers/AKanbanRenderer.vue +11 -6
- package/dist/runtime/components/renderers/AOutlineRenderer.vue +10 -7
- package/dist/runtime/components/renderers/AProseRenderer.d.vue.ts +2 -0
- package/dist/runtime/components/renderers/AProseRenderer.vue +2 -1
- package/dist/runtime/components/renderers/AProseRenderer.vue.d.ts +2 -0
- package/dist/runtime/composables/useRendererSurface.d.ts +38 -0
- package/dist/runtime/composables/useRendererSurface.js +14 -0
- package/dist/runtime/extensions/file-drop.d.ts +17 -2
- package/dist/runtime/extensions/file-drop.js +16 -6
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -34,6 +34,13 @@ type __VLS_Props = {
|
|
|
34
34
|
label?: string;
|
|
35
35
|
meta?: Record<string, unknown>;
|
|
36
36
|
} | null;
|
|
37
|
+
/**
|
|
38
|
+
* Forward to editor-type renderers (`doc`/`prose` → <AEditor>): show the
|
|
39
|
+
* built-in sub-page list (<ADocSubPageList>) below the body. Default: true.
|
|
40
|
+
* Set false to render a plain document with no child-page section. Ignored by
|
|
41
|
+
* structured renderers (kanban/table/…) which have no sub-page list.
|
|
42
|
+
*/
|
|
43
|
+
showSubPages?: boolean;
|
|
37
44
|
};
|
|
38
45
|
declare var __VLS_1: {}, __VLS_23: {
|
|
39
46
|
error: string;
|
|
@@ -46,6 +53,7 @@ type __VLS_Slots = {} & {
|
|
|
46
53
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
47
54
|
editable: boolean;
|
|
48
55
|
breadcrumbMenu: boolean;
|
|
56
|
+
showSubPages: boolean;
|
|
49
57
|
canvasClass: string;
|
|
50
58
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
59
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -14,7 +14,8 @@ const props = defineProps({
|
|
|
14
14
|
editorClass: { type: String, required: false },
|
|
15
15
|
rendererClass: { type: String, required: false },
|
|
16
16
|
canvasClass: { type: String, required: false, default: "flex flex-col w-full h-[70vh] min-h-[420px]" },
|
|
17
|
-
entry: { type: [Object, null], required: false }
|
|
17
|
+
entry: { type: [Object, null], required: false },
|
|
18
|
+
showSubPages: { type: Boolean, required: false, default: true }
|
|
18
19
|
});
|
|
19
20
|
const abra = useAbracadabra();
|
|
20
21
|
const { resolveEntry, findDocSpaceId, getProviderForDoc, connectSpace, connections } = useSpaceConnections();
|
|
@@ -122,6 +123,7 @@ const wrapperClass = computed(
|
|
|
122
123
|
:child-provider="childProvider"
|
|
123
124
|
:editable="effectiveEditable"
|
|
124
125
|
:breadcrumb-menu="breadcrumbMenu"
|
|
126
|
+
:show-sub-pages="docTypeDef.hasEditor ? showSubPages : void 0"
|
|
125
127
|
:class="resolvedClass"
|
|
126
128
|
/>
|
|
127
129
|
</div>
|
|
@@ -34,6 +34,13 @@ type __VLS_Props = {
|
|
|
34
34
|
label?: string;
|
|
35
35
|
meta?: Record<string, unknown>;
|
|
36
36
|
} | null;
|
|
37
|
+
/**
|
|
38
|
+
* Forward to editor-type renderers (`doc`/`prose` → <AEditor>): show the
|
|
39
|
+
* built-in sub-page list (<ADocSubPageList>) below the body. Default: true.
|
|
40
|
+
* Set false to render a plain document with no child-page section. Ignored by
|
|
41
|
+
* structured renderers (kanban/table/…) which have no sub-page list.
|
|
42
|
+
*/
|
|
43
|
+
showSubPages?: boolean;
|
|
37
44
|
};
|
|
38
45
|
declare var __VLS_1: {}, __VLS_23: {
|
|
39
46
|
error: string;
|
|
@@ -46,6 +53,7 @@ type __VLS_Slots = {} & {
|
|
|
46
53
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
47
54
|
editable: boolean;
|
|
48
55
|
breadcrumbMenu: boolean;
|
|
56
|
+
showSubPages: boolean;
|
|
49
57
|
canvasClass: string;
|
|
50
58
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
59
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -25,6 +25,8 @@ import { useProviderRole } from "../composables/useProviderRole";
|
|
|
25
25
|
import { DOC_DRAG_MIME, isDocDrag, parseDocDragPayload, isDescendantInMap } from "../utils/docDragDrop";
|
|
26
26
|
import { useEditorToolbar } from "../composables/useEditorToolbar";
|
|
27
27
|
import { useEditorSuggestions } from "../composables/useEditorSuggestions";
|
|
28
|
+
import { useOfflineUploadQueue } from "../composables/useOfflineUploadQueue";
|
|
29
|
+
import { useFileBlobStore } from "../composables/useFileBlobStore";
|
|
28
30
|
import { useEditorDragHandle } from "../composables/useEditorDragHandle";
|
|
29
31
|
import { useEditorEmojis } from "../composables/useEditorEmojis";
|
|
30
32
|
import { useEditorMentions } from "../composables/useEditorMentions";
|
|
@@ -54,7 +56,7 @@ const props = defineProps({
|
|
|
54
56
|
const viewMode = ref("rich");
|
|
55
57
|
const emit = defineEmits(["ready", "update", "rename", "updateMeta"]);
|
|
56
58
|
const model = defineModel({ type: null });
|
|
57
|
-
const { doc, provider, registry, effectiveRole } = useNuxtApp().$abracadabra;
|
|
59
|
+
const { doc, provider, registry, effectiveRole, client } = useNuxtApp().$abracadabra;
|
|
58
60
|
const { connections, getProviderForDoc, getDocForDoc } = useSpaceConnections();
|
|
59
61
|
const ownerProvider = computed(() => getProviderForDoc(props.docId) ?? provider.value);
|
|
60
62
|
const ownerDoc = shallowRef(getDocForDoc(props.docId) ?? doc.value);
|
|
@@ -173,6 +175,14 @@ watchEffect(() => {
|
|
|
173
175
|
avatar: u.color ? { alt: u.name, style: { borderColor: u.color, borderWidth: "2px", borderStyle: "solid" } } : { alt: u.name }
|
|
174
176
|
}));
|
|
175
177
|
});
|
|
178
|
+
watchEffect(() => {
|
|
179
|
+
const isReady = ready.value;
|
|
180
|
+
const editorInstance = editorRef.value;
|
|
181
|
+
if (!isReady || !editorInstance) return;
|
|
182
|
+
const fileDropStore = editorInstance.editor?.storage?.fileDrop;
|
|
183
|
+
if (!fileDropStore) return;
|
|
184
|
+
fileDropStore.onFiles = effectiveEditable.value ? uploadAndInsertFiles : null;
|
|
185
|
+
});
|
|
176
186
|
let metaInitDone = false;
|
|
177
187
|
function handleMetaUpdate(patch) {
|
|
178
188
|
writeTreeMeta(patch);
|
|
@@ -275,8 +285,22 @@ function deduplicateMetaFields(ed) {
|
|
|
275
285
|
deletions.push({ from, to: from + child.nodeSize });
|
|
276
286
|
return;
|
|
277
287
|
}
|
|
278
|
-
|
|
279
|
-
if (!identity || identity === ":::")
|
|
288
|
+
let identity = a.metaKey || `${a.startKey ?? ""}:${a.endKey ?? ""}:${a.latKey ?? ""}:${a.lngKey ?? ""}`;
|
|
289
|
+
if (!identity || identity === ":::") {
|
|
290
|
+
identity = "struct:" + JSON.stringify([
|
|
291
|
+
a.fieldType,
|
|
292
|
+
a.fieldLabel,
|
|
293
|
+
a.metaKey,
|
|
294
|
+
a.startKey,
|
|
295
|
+
a.endKey,
|
|
296
|
+
a.latKey,
|
|
297
|
+
a.lngKey,
|
|
298
|
+
a.allDayKey,
|
|
299
|
+
a.unit,
|
|
300
|
+
a.options,
|
|
301
|
+
a.presets
|
|
302
|
+
]);
|
|
303
|
+
}
|
|
280
304
|
if (seen.has(identity)) {
|
|
281
305
|
const from = metaPos + 1 + childOffset;
|
|
282
306
|
deletions.push({ from, to: from + child.nodeSize });
|
|
@@ -455,10 +479,8 @@ watchEffect((onCleanup) => {
|
|
|
455
479
|
};
|
|
456
480
|
function onUpdate({ transaction }) {
|
|
457
481
|
const isRemote = !!transaction?.getMeta?.("y-sync$")?.isChangeOrigin;
|
|
458
|
-
if (isRemote) {
|
|
459
|
-
deduplicateMetaFields(ed);
|
|
460
|
-
}
|
|
461
482
|
initDocumentMeta(ed);
|
|
483
|
+
deduplicateMetaFields(ed);
|
|
462
484
|
if (isRemote || !initialSyncDone) {
|
|
463
485
|
if (headerTimer) {
|
|
464
486
|
clearTimeout(headerTimer);
|
|
@@ -504,6 +526,63 @@ function insertNode(editor, type, attrs, content) {
|
|
|
504
526
|
return editor.chain().focus().insertContent(node);
|
|
505
527
|
}
|
|
506
528
|
const { pickDoc } = useDocLinkPick();
|
|
529
|
+
const { enqueue: enqueueUpload } = useOfflineUploadQueue();
|
|
530
|
+
const { putBlob: cacheBlobLocally } = useFileBlobStore();
|
|
531
|
+
async function uploadOne(file) {
|
|
532
|
+
try {
|
|
533
|
+
const meta = await client.value?.upload(props.docId, file, file.name);
|
|
534
|
+
if (meta?.id) {
|
|
535
|
+
try {
|
|
536
|
+
await cacheBlobLocally(props.docId, meta.id, file, file.name);
|
|
537
|
+
} catch {
|
|
538
|
+
}
|
|
539
|
+
return meta.id;
|
|
540
|
+
}
|
|
541
|
+
} catch (e) {
|
|
542
|
+
if (import.meta.dev) console.warn("[AEditor] upload failed, queueing offline:", e);
|
|
543
|
+
}
|
|
544
|
+
try {
|
|
545
|
+
const queued = await enqueueUpload(props.docId, file);
|
|
546
|
+
return queued.id;
|
|
547
|
+
} catch {
|
|
548
|
+
return null;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
async function uploadAndInsertFiles(files, pos) {
|
|
552
|
+
const ed = editorRef.value?.editor;
|
|
553
|
+
if (!ed || !effectiveEditable.value || !files.length) return;
|
|
554
|
+
let at = typeof pos === "number" ? pos : ed.state.selection.to;
|
|
555
|
+
for (const file of files) {
|
|
556
|
+
const uploadId = await uploadOne(file);
|
|
557
|
+
if (!uploadId) continue;
|
|
558
|
+
const attrs = { uploadId, docId: props.docId, filename: file.name, mimeType: file.type };
|
|
559
|
+
const sizeBefore = ed.state.doc.content.size;
|
|
560
|
+
const target = Math.max(0, Math.min(at, ed.state.doc.content.size));
|
|
561
|
+
try {
|
|
562
|
+
ed.chain().insertContentAt(target, { type: "fileBlock", attrs }).run();
|
|
563
|
+
} catch {
|
|
564
|
+
}
|
|
565
|
+
if (ed.state.doc.content.size === sizeBefore) {
|
|
566
|
+
try {
|
|
567
|
+
ed.chain().insertContentAt(ed.state.doc.content.size, { type: "fileBlock", attrs }).run();
|
|
568
|
+
} catch {
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
at = ed.state.selection.to;
|
|
572
|
+
}
|
|
573
|
+
ed.commands.focus();
|
|
574
|
+
}
|
|
575
|
+
function pickFiles(accept) {
|
|
576
|
+
return new Promise((resolve) => {
|
|
577
|
+
if (!import.meta.client) return resolve([]);
|
|
578
|
+
const input = document.createElement("input");
|
|
579
|
+
input.type = "file";
|
|
580
|
+
input.multiple = true;
|
|
581
|
+
if (accept) input.accept = accept;
|
|
582
|
+
input.addEventListener("change", () => resolve(Array.from(input.files ?? [])), { once: true });
|
|
583
|
+
input.click();
|
|
584
|
+
});
|
|
585
|
+
}
|
|
507
586
|
const editorHandlers = {
|
|
508
587
|
// Slash → pick a document → embed it as a block. `execute` returns a chain
|
|
509
588
|
// synchronously (the dispatcher .run()s it); the actual insert happens async
|
|
@@ -536,6 +615,29 @@ const editorHandlers = {
|
|
|
536
615
|
execute: (editor, item) => editor.chain().focus().insertMetaField(item.attrs),
|
|
537
616
|
isActive: () => false
|
|
538
617
|
},
|
|
618
|
+
// Slash → native file picker → upload → fileBlock. Like docEmbed, `execute`
|
|
619
|
+
// returns a chain synchronously (the dispatcher .run()s it) while the picker
|
|
620
|
+
// + upload resolve async and do the real insert via uploadAndInsertFiles.
|
|
621
|
+
imageUpload: {
|
|
622
|
+
canExecute: () => true,
|
|
623
|
+
execute: (editor) => {
|
|
624
|
+
pickFiles("image/*").then((files) => {
|
|
625
|
+
if (files.length) uploadAndInsertFiles(files);
|
|
626
|
+
});
|
|
627
|
+
return editor.chain().focus();
|
|
628
|
+
},
|
|
629
|
+
isActive: () => false
|
|
630
|
+
},
|
|
631
|
+
fileUpload: {
|
|
632
|
+
canExecute: () => true,
|
|
633
|
+
execute: (editor) => {
|
|
634
|
+
pickFiles().then((files) => {
|
|
635
|
+
if (files.length) uploadAndInsertFiles(files);
|
|
636
|
+
});
|
|
637
|
+
return editor.chain().focus();
|
|
638
|
+
},
|
|
639
|
+
isActive: () => false
|
|
640
|
+
},
|
|
539
641
|
divider: {
|
|
540
642
|
canExecute: () => true,
|
|
541
643
|
execute: (editor) => insertNode(editor, "divider", { label: "" }),
|
|
@@ -637,6 +739,92 @@ const editorHandlers = {
|
|
|
637
739
|
}
|
|
638
740
|
]),
|
|
639
741
|
isActive: (editor) => editor.isActive("timeline")
|
|
742
|
+
},
|
|
743
|
+
// ── Structural component blocks ──────────────────────────────────────────────
|
|
744
|
+
// The slash menu's "Components" group and the `table` insert item advertise
|
|
745
|
+
// these kinds, but UEditorSuggestionMenu.onSelect silently no-ops when no
|
|
746
|
+
// handler exists for the kind — so selecting Callout/Collapsible/Accordion/…
|
|
747
|
+
// did nothing. Each seeds a schema-valid subtree (content specs: callout/
|
|
748
|
+
// collapsible/card/steps = block+, accordion = accordionItem+, tabs =
|
|
749
|
+
// tabsItem+, codeGroup = codeBlock+, fieldGroup = field+, codeTree = atom).
|
|
750
|
+
callout: {
|
|
751
|
+
canExecute: () => true,
|
|
752
|
+
execute: (editor) => insertNode(editor, "callout", { type: "note" }, [{ type: "paragraph" }]),
|
|
753
|
+
isActive: (editor) => editor.isActive("callout")
|
|
754
|
+
},
|
|
755
|
+
collapsible: {
|
|
756
|
+
canExecute: () => true,
|
|
757
|
+
execute: (editor) => insertNode(editor, "collapsible", { label: "Details" }, [{ type: "paragraph" }]),
|
|
758
|
+
isActive: (editor) => editor.isActive("collapsible")
|
|
759
|
+
},
|
|
760
|
+
accordion: {
|
|
761
|
+
canExecute: () => true,
|
|
762
|
+
execute: (editor) => insertNode(editor, "accordion", {}, [
|
|
763
|
+
{ type: "accordionItem", attrs: { label: "Section 1", icon: "" }, content: [{ type: "paragraph" }] },
|
|
764
|
+
{ type: "accordionItem", attrs: { label: "Section 2", icon: "" }, content: [{ type: "paragraph" }] }
|
|
765
|
+
]),
|
|
766
|
+
isActive: (editor) => editor.isActive("accordion")
|
|
767
|
+
},
|
|
768
|
+
tabs: {
|
|
769
|
+
canExecute: () => true,
|
|
770
|
+
execute: (editor) => insertNode(editor, "tabs", {}, [
|
|
771
|
+
{ type: "tabsItem", attrs: { label: "Tab 1", icon: "" }, content: [{ type: "paragraph" }] },
|
|
772
|
+
{ type: "tabsItem", attrs: { label: "Tab 2", icon: "" }, content: [{ type: "paragraph" }] }
|
|
773
|
+
]),
|
|
774
|
+
isActive: (editor) => editor.isActive("tabs")
|
|
775
|
+
},
|
|
776
|
+
card: {
|
|
777
|
+
canExecute: () => true,
|
|
778
|
+
execute: (editor) => insertNode(editor, "card", { title: "" }, [{ type: "paragraph" }]),
|
|
779
|
+
isActive: (editor) => editor.isActive("card")
|
|
780
|
+
},
|
|
781
|
+
steps: {
|
|
782
|
+
canExecute: () => true,
|
|
783
|
+
execute: (editor) => insertNode(editor, "steps", {}, [
|
|
784
|
+
{ type: "heading", attrs: { level: 3 }, content: [{ type: "text", text: "First step" }] },
|
|
785
|
+
{ type: "paragraph" },
|
|
786
|
+
{ type: "heading", attrs: { level: 3 }, content: [{ type: "text", text: "Second step" }] },
|
|
787
|
+
{ type: "paragraph" }
|
|
788
|
+
]),
|
|
789
|
+
isActive: (editor) => editor.isActive("steps")
|
|
790
|
+
},
|
|
791
|
+
codeGroup: {
|
|
792
|
+
canExecute: () => true,
|
|
793
|
+
execute: (editor) => insertNode(editor, "codeGroup", {}, [
|
|
794
|
+
{ type: "codeBlock", attrs: { language: "ts" }, content: [{ type: "text", text: 'const hello = "world"' }] },
|
|
795
|
+
{ type: "codeBlock", attrs: { language: "js" }, content: [{ type: "text", text: 'const hello = "world"' }] }
|
|
796
|
+
]),
|
|
797
|
+
isActive: (editor) => editor.isActive("codeGroup")
|
|
798
|
+
},
|
|
799
|
+
codePreview: {
|
|
800
|
+
canExecute: () => true,
|
|
801
|
+
execute: (editor) => insertNode(editor, "codePreview", {}, [
|
|
802
|
+
{ type: "codeBlock", attrs: { language: "html" }, content: [{ type: "text", text: "<button>Click me</button>" }] }
|
|
803
|
+
]),
|
|
804
|
+
isActive: (editor) => editor.isActive("codePreview")
|
|
805
|
+
},
|
|
806
|
+
codeTree: {
|
|
807
|
+
canExecute: () => true,
|
|
808
|
+
execute: (editor) => insertNode(editor, "codeTree", {
|
|
809
|
+
files: JSON.stringify([
|
|
810
|
+
{ name: "src", children: [{ name: "index.ts", content: 'export const hello = "world"\n' }] },
|
|
811
|
+
{ name: "README.md", content: "# Project\n" }
|
|
812
|
+
])
|
|
813
|
+
}),
|
|
814
|
+
isActive: (editor) => editor.isActive("codeTree")
|
|
815
|
+
},
|
|
816
|
+
fieldGroup: {
|
|
817
|
+
canExecute: () => true,
|
|
818
|
+
execute: (editor) => insertNode(editor, "fieldGroup", {}, [
|
|
819
|
+
{ type: "field", attrs: { name: "name", type: "string", required: false }, content: [{ type: "paragraph" }] },
|
|
820
|
+
{ type: "field", attrs: { name: "description", type: "string", required: false }, content: [{ type: "paragraph" }] }
|
|
821
|
+
]),
|
|
822
|
+
isActive: (editor) => editor.isActive("fieldGroup")
|
|
823
|
+
},
|
|
824
|
+
table: {
|
|
825
|
+
canExecute: (editor) => editor.can?.().insertTable?.({ rows: 3, cols: 3, withHeaderRow: true }) ?? true,
|
|
826
|
+
execute: (editor) => editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }),
|
|
827
|
+
isActive: (editor) => editor.isActive("table")
|
|
640
828
|
}
|
|
641
829
|
};
|
|
642
830
|
const _mentionItems = computed(
|
|
@@ -35,6 +35,14 @@ type __VLS_Props = {
|
|
|
35
35
|
* meta/type patches all follow `panelEditable`.
|
|
36
36
|
*/
|
|
37
37
|
editable?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the Chat tab requires write access on the doc. Default `true`.
|
|
40
|
+
*
|
|
41
|
+
* The server gates `messages:send` on `role.can_write()` (Editor and above),
|
|
42
|
+
* so a viewer/observer offered a chat tab gets a compose box whose every send
|
|
43
|
+
* is rejected. Set `false` to keep chat visible read-only for such roles.
|
|
44
|
+
*/
|
|
45
|
+
chatRequiresWrite?: boolean;
|
|
38
46
|
};
|
|
39
47
|
declare var __VLS_11: {
|
|
40
48
|
nodeId: string | null;
|
|
@@ -54,6 +62,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
54
62
|
}>, {
|
|
55
63
|
initialTab: "editor" | "properties" | "chat" | "settings" | "serverSettings" | string;
|
|
56
64
|
editable: boolean;
|
|
65
|
+
chatRequiresWrite: boolean;
|
|
57
66
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
58
67
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
59
68
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,6 +7,7 @@ import { useChildTree } from "../composables/useChildTree";
|
|
|
7
7
|
import { useSpaceConnections } from "../composables/useSpaceConnections";
|
|
8
8
|
import { useDocumentPermissions } from "../composables/useDocumentPermissions";
|
|
9
9
|
import { useProviderRole } from "../composables/useProviderRole";
|
|
10
|
+
import { provideRendererSurface } from "../composables/useRendererSurface";
|
|
10
11
|
import { useAbraLocale } from "../composables/useAbraLocale";
|
|
11
12
|
import { useDocSlugs } from "../composables/useDocSlugs";
|
|
12
13
|
import { useResizableWidth } from "../composables/useResizableWidth";
|
|
@@ -28,7 +29,8 @@ const props = defineProps({
|
|
|
28
29
|
initialTab: { type: String, required: false, default: "editor" },
|
|
29
30
|
tabs: { type: Array, required: false },
|
|
30
31
|
docHref: { type: Function, required: false },
|
|
31
|
-
editable: { type: Boolean, required: false, default: true }
|
|
32
|
+
editable: { type: Boolean, required: false, default: true },
|
|
33
|
+
chatRequiresWrite: { type: Boolean, required: false, default: true }
|
|
32
34
|
});
|
|
33
35
|
const emit = defineEmits(["close"]);
|
|
34
36
|
const open = computed({
|
|
@@ -78,6 +80,7 @@ const { canWrite: roleCanWrite } = useDocumentPermissions(providerRole);
|
|
|
78
80
|
const panelEditable = computed(
|
|
79
81
|
() => props.editable !== false && (!providerRole.value || roleCanWrite.value)
|
|
80
82
|
);
|
|
83
|
+
provideRendererSurface("panel");
|
|
81
84
|
const resolvedLabel = computed(() => entry.value?.label || props.nodeLabel || "");
|
|
82
85
|
const currentType = computed(() => entry.value?.type ?? "doc");
|
|
83
86
|
const { getDocUrl } = useDocSlugs();
|
|
@@ -141,7 +144,14 @@ const _runtimeFeatures = computed(() => {
|
|
|
141
144
|
});
|
|
142
145
|
const showChatTab = computed(() => {
|
|
143
146
|
if (props.tabs && !props.tabs.includes("chat")) return false;
|
|
144
|
-
|
|
147
|
+
if (!_runtimeFeatures.value?.chat) return false;
|
|
148
|
+
if (props.chatRequiresWrite && providerRole.value && !roleCanWrite.value) return false;
|
|
149
|
+
return true;
|
|
150
|
+
});
|
|
151
|
+
watch(showChatTab, (visible) => {
|
|
152
|
+
if (!visible && activeTab.value === "chat") {
|
|
153
|
+
activeTab.value = usesPageRenderer.value ? "pageType" : "editor";
|
|
154
|
+
}
|
|
145
155
|
});
|
|
146
156
|
const showEditorTab = computed(() => !props.tabs || props.tabs.includes("editor"));
|
|
147
157
|
const showPropertiesTab = computed(() => !!props.tabs && props.tabs.includes("properties"));
|
|
@@ -387,9 +397,11 @@ const addFieldMenuItems = computed(
|
|
|
387
397
|
<!-- Page-type tab — the registered renderer for non-'doc' types
|
|
388
398
|
(kanban / table / calendar / …). Now its own slot, so the editor
|
|
389
399
|
tab below always exposes the underlying prose. -->
|
|
400
|
+
<!-- `relative`: the anchor a full-bleed renderer pins itself to when
|
|
401
|
+
it reads `useRendererSurface()` and sees it is embedded. -->
|
|
390
402
|
<div
|
|
391
403
|
v-show="activeTab === 'pageType'"
|
|
392
|
-
class="flex flex-col flex-1 min-h-0"
|
|
404
|
+
class="relative flex flex-col flex-1 min-h-0"
|
|
393
405
|
>
|
|
394
406
|
<component
|
|
395
407
|
:is="docTypeDef.component"
|
|
@@ -35,6 +35,14 @@ type __VLS_Props = {
|
|
|
35
35
|
* meta/type patches all follow `panelEditable`.
|
|
36
36
|
*/
|
|
37
37
|
editable?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the Chat tab requires write access on the doc. Default `true`.
|
|
40
|
+
*
|
|
41
|
+
* The server gates `messages:send` on `role.can_write()` (Editor and above),
|
|
42
|
+
* so a viewer/observer offered a chat tab gets a compose box whose every send
|
|
43
|
+
* is rejected. Set `false` to keep chat visible read-only for such roles.
|
|
44
|
+
*/
|
|
45
|
+
chatRequiresWrite?: boolean;
|
|
38
46
|
};
|
|
39
47
|
declare var __VLS_11: {
|
|
40
48
|
nodeId: string | null;
|
|
@@ -54,6 +62,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
54
62
|
}>, {
|
|
55
63
|
initialTab: "editor" | "properties" | "chat" | "settings" | "serverSettings" | string;
|
|
56
64
|
editable: boolean;
|
|
65
|
+
chatRequiresWrite: boolean;
|
|
57
66
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
58
67
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
59
68
|
declare const _default: typeof __VLS_export;
|
|
@@ -614,14 +614,16 @@ defineExpose({ connectedUsers });
|
|
|
614
614
|
tag="div"
|
|
615
615
|
class="space-y-0.5"
|
|
616
616
|
>
|
|
617
|
-
|
|
617
|
+
<!-- Wrapper element is the TransitionGroup child (UContextMenu renders a
|
|
618
|
+
fragment root that Vue can't FLIP-animate). -->
|
|
619
|
+
<div
|
|
618
620
|
v-for="item in visibleItems"
|
|
619
621
|
:key="item.id"
|
|
620
|
-
:items="itemMenuItems(item)"
|
|
621
622
|
>
|
|
622
|
-
<
|
|
623
|
-
|
|
624
|
-
|
|
623
|
+
<UContextMenu :items="itemMenuItems(item)">
|
|
624
|
+
<div
|
|
625
|
+
:ref="(el) => rowRefs[item.id] = el"
|
|
626
|
+
tabindex="-1"
|
|
625
627
|
class="group flex items-center gap-1.5 py-1 pr-1 rounded-(--ui-radius) hover:bg-(--ui-bg-elevated) relative focus:outline-none"
|
|
626
628
|
:class="{
|
|
627
629
|
'border-t-2 border-(--ui-primary)': dragOverId === item.id,
|
|
@@ -798,7 +800,8 @@ defineExpose({ connectedUsers });
|
|
|
798
800
|
</UTooltip>
|
|
799
801
|
</div>
|
|
800
802
|
</div>
|
|
801
|
-
|
|
803
|
+
</UContextMenu>
|
|
804
|
+
</div>
|
|
802
805
|
</TransitionGroup>
|
|
803
806
|
</div>
|
|
804
807
|
</div>
|
|
@@ -283,50 +283,54 @@ defineExpose({ connectedUsers });
|
|
|
283
283
|
:class="galleryColumns ? '' : gridClass"
|
|
284
284
|
:style="gridStyle"
|
|
285
285
|
>
|
|
286
|
-
|
|
286
|
+
<!-- Wrapper element is the TransitionGroup child (UContextMenu renders a
|
|
287
|
+
non-element/fragment root that Vue can't FLIP-animate — the wrapper
|
|
288
|
+
gives each item a single real element to move). -->
|
|
289
|
+
<div
|
|
287
290
|
v-for="item in items"
|
|
288
291
|
:key="item.id"
|
|
289
|
-
:items="editable ? itemMenuItems(item) : []"
|
|
290
292
|
>
|
|
291
|
-
<
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
<
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
293
|
+
<UContextMenu :items="editable ? itemMenuItems(item) : []">
|
|
294
|
+
<AGalleryItemCard
|
|
295
|
+
:item="item"
|
|
296
|
+
:gallery-aspect="galleryAspect"
|
|
297
|
+
:card-style="cardStyle"
|
|
298
|
+
:show-labels="showLabels"
|
|
299
|
+
:is-dragging="dragId === item.id"
|
|
300
|
+
:is-drag-over="dragOverId === item.id"
|
|
301
|
+
:focusers="itemFocusers(item.id)"
|
|
302
|
+
:can-write="editable"
|
|
303
|
+
:rename-id="renameId"
|
|
304
|
+
:rename-value="renameValue"
|
|
305
|
+
:data-drag-id="item.id"
|
|
306
|
+
@update:rename-value="renameValue = $event"
|
|
307
|
+
@commit-rename="commitRename"
|
|
308
|
+
@cancel-rename="renameId = null"
|
|
309
|
+
@pointerdown="editable && handlePointerDown($event, item.id)"
|
|
310
|
+
@pointerenter="onItemPointerEnter(item.id)"
|
|
311
|
+
@pointerleave="onItemPointerLeave"
|
|
312
|
+
@click="openLightbox(item)"
|
|
313
|
+
@dblclick.stop="editable && startRename(item.id, item.label)"
|
|
314
|
+
>
|
|
315
|
+
<template #actions>
|
|
316
|
+
<UDropdownMenu
|
|
317
|
+
v-if="editable"
|
|
318
|
+
:items="itemMenuItems(item)"
|
|
319
|
+
:content="{ align: 'start' }"
|
|
320
|
+
>
|
|
321
|
+
<UButton
|
|
322
|
+
icon="i-lucide-ellipsis"
|
|
323
|
+
size="xs"
|
|
324
|
+
variant="ghost"
|
|
325
|
+
color="neutral"
|
|
326
|
+
class="opacity-0 group-hover:opacity-100 shrink-0"
|
|
327
|
+
@click.stop
|
|
328
|
+
/>
|
|
329
|
+
</UDropdownMenu>
|
|
330
|
+
</template>
|
|
331
|
+
</AGalleryItemCard>
|
|
332
|
+
</UContextMenu>
|
|
333
|
+
</div>
|
|
330
334
|
</TransitionGroup>
|
|
331
335
|
</div>
|
|
332
336
|
|
|
@@ -825,14 +825,18 @@ defineExpose({ connectedUsers });
|
|
|
825
825
|
tag="div"
|
|
826
826
|
class="p-2 space-y-1.5 min-h-16"
|
|
827
827
|
>
|
|
828
|
-
|
|
828
|
+
<!-- Wrapper element is the TransitionGroup child + FLIP target
|
|
829
|
+
(UContextMenu renders a fragment root Vue can't animate). It
|
|
830
|
+
carries data-drag-id so the self-contained FLIP animates and
|
|
831
|
+
the [data-flipping] suppression targets the transition child. -->
|
|
832
|
+
<div
|
|
829
833
|
v-for="card in tree.childrenOf(col.id)"
|
|
830
834
|
:key="card.id"
|
|
831
|
-
:
|
|
835
|
+
:data-drag-id="card.id"
|
|
832
836
|
>
|
|
833
|
-
<
|
|
834
|
-
|
|
835
|
-
|
|
837
|
+
<UContextMenu :items="canWrite ? cardMenuItems(card, col.id) : []">
|
|
838
|
+
<div
|
|
839
|
+
class="group bg-(--ui-bg) rounded border text-sm cursor-pointer hover:border-(--ui-primary) transition-colors relative overflow-hidden"
|
|
836
840
|
:class="{
|
|
837
841
|
'opacity-30': dragCardId === card.id,
|
|
838
842
|
'border-t-2 border-t-(--ui-primary)': dragOverCardId === card.id,
|
|
@@ -966,7 +970,8 @@ defineExpose({ connectedUsers });
|
|
|
966
970
|
</UBadge>
|
|
967
971
|
</div>
|
|
968
972
|
</div>
|
|
969
|
-
|
|
973
|
+
</UContextMenu>
|
|
974
|
+
</div>
|
|
970
975
|
</TransitionGroup>
|
|
971
976
|
|
|
972
977
|
<!-- Add card -->
|
|
@@ -413,15 +413,17 @@ defineExpose({ connectedUsers });
|
|
|
413
413
|
tag="div"
|
|
414
414
|
class="space-y-0.5"
|
|
415
415
|
>
|
|
416
|
-
|
|
416
|
+
<!-- Wrapper element is the TransitionGroup child (UContextMenu renders a
|
|
417
|
+
fragment root that Vue can't FLIP-animate). -->
|
|
418
|
+
<div
|
|
417
419
|
v-for="item in flatItems"
|
|
418
420
|
:key="item.id"
|
|
419
|
-
:items="editable ? itemMenuItems(item) : []"
|
|
420
421
|
>
|
|
421
|
-
<
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
422
|
+
<UContextMenu :items="editable ? itemMenuItems(item) : []">
|
|
423
|
+
<div
|
|
424
|
+
:ref="(el) => rowRefs[item.id] = el"
|
|
425
|
+
tabindex="-1"
|
|
426
|
+
class="group flex items-center gap-1.5 py-1 rounded-(--ui-radius) hover:bg-(--ui-bg-elevated) relative focus:outline-none"
|
|
425
427
|
:class="{
|
|
426
428
|
'border-t-2 border-(--ui-primary)': dragOverId === item.id,
|
|
427
429
|
'opacity-30': dragId === item.id,
|
|
@@ -540,7 +542,8 @@ defineExpose({ connectedUsers });
|
|
|
540
542
|
</UTooltip>
|
|
541
543
|
</div>
|
|
542
544
|
</div>
|
|
543
|
-
|
|
545
|
+
</UContextMenu>
|
|
546
|
+
</div>
|
|
544
547
|
</TransitionGroup>
|
|
545
548
|
</div>
|
|
546
549
|
</div>
|
|
@@ -7,6 +7,8 @@ type __VLS_Props = {
|
|
|
7
7
|
parentType?: string;
|
|
8
8
|
metaSchema?: MetaField[];
|
|
9
9
|
editable?: boolean;
|
|
10
|
+
/** Forwarded to <AEditor> — show the built-in sub-page list. Default: true. */
|
|
11
|
+
showSubPages?: boolean;
|
|
10
12
|
};
|
|
11
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, Record<PropertyKey, unknown>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
14
|
rename: (label: string) => any;
|
|
@@ -7,7 +7,8 @@ const props = defineProps({
|
|
|
7
7
|
docMeta: { type: Object, required: false },
|
|
8
8
|
parentType: { type: String, required: false },
|
|
9
9
|
metaSchema: { type: Array, required: false },
|
|
10
|
-
editable: { type: Boolean, required: false }
|
|
10
|
+
editable: { type: Boolean, required: false },
|
|
11
|
+
showSubPages: { type: Boolean, required: false }
|
|
11
12
|
});
|
|
12
13
|
const emit = defineEmits(["ready", "update", "rename", "updateMeta"]);
|
|
13
14
|
const editorRef = ref(null);
|
|
@@ -7,6 +7,8 @@ type __VLS_Props = {
|
|
|
7
7
|
parentType?: string;
|
|
8
8
|
metaSchema?: MetaField[];
|
|
9
9
|
editable?: boolean;
|
|
10
|
+
/** Forwarded to <AEditor> — show the built-in sub-page list. Default: true. */
|
|
11
|
+
showSubPages?: boolean;
|
|
10
12
|
};
|
|
11
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, Record<PropertyKey, unknown>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
14
|
rename: (label: string) => any;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Where a page-type renderer is currently mounted.
|
|
4
|
+
*
|
|
5
|
+
* - `page` — the renderer IS the route. It may fill the viewport.
|
|
6
|
+
* - `panel` — inside a slideover (`<ANodePanel>`) or any bounded container.
|
|
7
|
+
* - `window` — inside a floating/tiled window managed by the host app.
|
|
8
|
+
*/
|
|
9
|
+
export type RendererSurface = 'page' | 'panel' | 'window';
|
|
10
|
+
/**
|
|
11
|
+
* Declare the surface every renderer mounted below this component lives on.
|
|
12
|
+
* `<ANodePanel>` calls this with `'panel'`; a host that mounts renderers in
|
|
13
|
+
* floating windows should call it with `'window'`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function provideRendererSurface(surface: MaybeRefOrGetter<RendererSurface>): void;
|
|
16
|
+
/**
|
|
17
|
+
* Read the surface the current renderer is mounted on. Defaults to `'page'`,
|
|
18
|
+
* so a renderer that never sees a provider behaves exactly as it always has.
|
|
19
|
+
*
|
|
20
|
+
* A renderer that fills the VIEWPORT (`position: fixed`, `100dvh`, a global
|
|
21
|
+
* scroll lock, a full-bleed canvas) must not do so when it is embedded — a
|
|
22
|
+
* fixed root escapes its container and takes over the screen from inside a
|
|
23
|
+
* slideover. Branch on `isEmbedded` and pin to the container instead:
|
|
24
|
+
*
|
|
25
|
+
* ```vue
|
|
26
|
+
* const { isEmbedded } = useRendererSurface()
|
|
27
|
+
* <div :class="isEmbedded ? 'absolute inset-0 [contain:layout_paint]' : 'fixed inset-0'">
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* Paint containment on the embedded root makes it the containing block for its
|
|
31
|
+
* own `position: fixed` descendants too, so nested overlays (toolbars, docks,
|
|
32
|
+
* popovers) stay inside the panel without touching their own styles.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useRendererSurface(): {
|
|
35
|
+
surface: ComputedRef<RendererSurface>;
|
|
36
|
+
isPage: ComputedRef<boolean>;
|
|
37
|
+
isEmbedded: ComputedRef<boolean>;
|
|
38
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { computed, inject, provide, toRef } from "vue";
|
|
2
|
+
const RENDERER_SURFACE_KEY = Symbol("abracadabra:renderer-surface");
|
|
3
|
+
export function provideRendererSurface(surface) {
|
|
4
|
+
provide(RENDERER_SURFACE_KEY, toRef(surface));
|
|
5
|
+
}
|
|
6
|
+
export function useRendererSurface() {
|
|
7
|
+
const injected = inject(RENDERER_SURFACE_KEY, null);
|
|
8
|
+
const surface = computed(() => injected?.value ?? "page");
|
|
9
|
+
return {
|
|
10
|
+
surface,
|
|
11
|
+
isPage: computed(() => surface.value === "page"),
|
|
12
|
+
isEmbedded: computed(() => surface.value !== "page")
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { Extension } from '@tiptap/core';
|
|
2
2
|
export interface FileDropOptions {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Fallback handler for dropped/pasted files. A per-editor handler set on
|
|
5
|
+
* `editor.storage.fileDrop.onFiles` takes precedence (that is how <AEditor>
|
|
6
|
+
* wires uploads with the doc's own id + client). When NEITHER is set the
|
|
7
|
+
* extension leaves the drop/paste alone (no preventDefault) so it isn't
|
|
8
|
+
* silently swallowed.
|
|
9
|
+
*/
|
|
10
|
+
onFiles?: (files: File[], pos?: number) => void;
|
|
4
11
|
}
|
|
5
|
-
export
|
|
12
|
+
export interface FileDropStorage {
|
|
13
|
+
/**
|
|
14
|
+
* Per-editor file handler. Set imperatively by the host (e.g. <AEditor>)
|
|
15
|
+
* once the editor exists; cleared (null) for read-only docs so drops aren't
|
|
16
|
+
* captured there. Wins over the static `onFiles` option.
|
|
17
|
+
*/
|
|
18
|
+
onFiles: ((files: File[], pos?: number) => void) | null;
|
|
19
|
+
}
|
|
20
|
+
export declare const FileDrop: Extension<FileDropOptions, FileDropStorage>;
|
|
6
21
|
export default FileDrop;
|
|
@@ -6,12 +6,16 @@ function hasDraggedFiles(event) {
|
|
|
6
6
|
export const FileDrop = Extension.create({
|
|
7
7
|
name: "fileDrop",
|
|
8
8
|
addOptions() {
|
|
9
|
-
return { onFiles:
|
|
10
|
-
|
|
9
|
+
return { onFiles: void 0 };
|
|
10
|
+
},
|
|
11
|
+
addStorage() {
|
|
12
|
+
return { onFiles: null };
|
|
11
13
|
},
|
|
12
14
|
addProseMirrorPlugins() {
|
|
15
|
+
const editor = this.editor;
|
|
13
16
|
const options = this.options;
|
|
14
17
|
let dragCounter = 0;
|
|
18
|
+
const resolveHandler = () => editor.storage.fileDrop?.onFiles ?? options.onFiles ?? null;
|
|
15
19
|
return [
|
|
16
20
|
new Plugin({
|
|
17
21
|
key: new PluginKey("fileDrop"),
|
|
@@ -19,6 +23,7 @@ export const FileDrop = Extension.create({
|
|
|
19
23
|
handleDOMEvents: {
|
|
20
24
|
dragenter(view, event) {
|
|
21
25
|
if (!hasDraggedFiles(event)) return false;
|
|
26
|
+
if (!resolveHandler()) return false;
|
|
22
27
|
dragCounter++;
|
|
23
28
|
view.dom.classList.add("file-drop-active");
|
|
24
29
|
return false;
|
|
@@ -32,19 +37,22 @@ export const FileDrop = Extension.create({
|
|
|
32
37
|
},
|
|
33
38
|
dragover(_view, event) {
|
|
34
39
|
if (!hasDraggedFiles(event)) return false;
|
|
40
|
+
if (!resolveHandler()) return false;
|
|
35
41
|
event.preventDefault();
|
|
36
42
|
event.dataTransfer.dropEffect = "copy";
|
|
37
43
|
return false;
|
|
38
44
|
},
|
|
39
45
|
drop(view, event) {
|
|
40
|
-
dragCounter = 0;
|
|
41
|
-
view.dom.classList.remove("file-drop-active");
|
|
42
46
|
const de = event;
|
|
43
47
|
const files = Array.from(de.dataTransfer?.files ?? []);
|
|
44
48
|
if (!files.length) return false;
|
|
49
|
+
const onFiles = resolveHandler();
|
|
50
|
+
if (!onFiles) return false;
|
|
51
|
+
dragCounter = 0;
|
|
52
|
+
view.dom.classList.remove("file-drop-active");
|
|
45
53
|
event.preventDefault();
|
|
46
54
|
const dropPos = view.posAtCoords({ left: de.clientX, top: de.clientY })?.pos;
|
|
47
|
-
|
|
55
|
+
onFiles(files, dropPos);
|
|
48
56
|
return true;
|
|
49
57
|
},
|
|
50
58
|
paste(_view, event) {
|
|
@@ -52,8 +60,10 @@ export const FileDrop = Extension.create({
|
|
|
52
60
|
const items = Array.from(ce.clipboardData?.items ?? []);
|
|
53
61
|
const files = items.filter((item) => item.kind === "file").map((item) => item.getAsFile()).filter((f) => f !== null);
|
|
54
62
|
if (!files.length) return false;
|
|
63
|
+
const onFiles = resolveHandler();
|
|
64
|
+
if (!onFiles) return false;
|
|
55
65
|
event.preventDefault();
|
|
56
|
-
|
|
66
|
+
onFiles(files);
|
|
57
67
|
return true;
|
|
58
68
|
}
|
|
59
69
|
}
|