superdoc 2.27.0 → 2.28.0-next.10
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/chunks/{create-super-doc-ui-DpVh2nQH.cjs → create-super-doc-ui-B4c55pFy.cjs} +575 -86
- package/dist/chunks/{create-super-doc-ui-cHUUipYM.es.js → create-super-doc-ui-C4Ka5Ph3.es.js} +570 -87
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +11 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +46 -46
- package/dist/document-api/src/contract/operation-registry.d.ts +4 -0
- package/dist/document-api/src/export/export.d.ts +3 -1
- package/dist/document-api/src/export/export.types.d.ts +8 -0
- package/dist/document-api/src/get-node/get-node.d.ts +10 -4
- package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +2 -0
- package/dist/document-api/src/index.d.ts +5 -4
- package/dist/document-api/src/replace/replace.d.ts +4 -1
- package/dist/document-api/src/styles/apply.d.ts +26 -2
- package/dist/document-api/src/styles/index.d.ts +3 -3
- package/dist/document-api/src/styles/schema.d.ts +3 -1
- package/dist/document-api/src/styles/validation.d.ts +10 -9
- package/dist/document-api/src/types/mutation-plan.types.d.ts +13 -4
- package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
- package/dist/document-api/src/types/track-changes.types.d.ts +10 -2
- package/dist/layout-engine/contracts/src/index.d.ts +3 -1
- package/dist/layout-engine/contracts/src/resolved-layout.d.ts +1 -0
- package/dist/layout-engine/contracts/src/run-helpers.d.ts +7 -0
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/review-markers.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableCell.d.ts +1 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/shared/common/list-marker-utils.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/core/SuperDoc.d.ts +2 -6
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +2 -0
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -0
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +1 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -2
- package/dist/superdoc/src/core/extensions/types.d.ts +14 -3
- package/dist/superdoc/src/core/helpers/resolve-docx-export.d.ts +6 -0
- package/dist/superdoc/src/core/types/index.d.ts +35 -1
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +0 -8
- package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +3 -1
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +0 -1
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +0 -2
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +1 -0
- package/dist/superdoc/src/public/export-types.d.ts +3 -0
- package/dist/superdoc/src/public/ui/entity-at.d.ts +1 -0
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +0 -13
- package/dist/superdoc/src/public/ui/style-match-patch.d.ts +7 -0
- package/dist/superdoc/src/public/ui/types.d.ts +20 -2
- package/dist/superdoc/src/public/ui.d.cts +18 -0
- package/dist/superdoc/src/public/ui.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +3 -57
- package/dist/superdoc/src/stores/superdoc-store.d.ts +9 -171
- package/dist/superdoc.cjs +476 -216
- package/dist/superdoc.es.js +473 -215
- package/dist/word-layout/src/types.d.ts +1 -0
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +42 -42
- package/package.json +2 -2
- package/dist/footnote-table-order.docx +0 -0
- package/dist/images/altText_add.svg +0 -3
- package/dist/images/altText_disclaimer.svg +0 -3
- package/dist/images/altText_done.svg +0 -3
- package/dist/images/altText_spinner.svg +0 -30
- package/dist/images/altText_warning.svg +0 -3
- package/dist/images/annotation-check.svg +0 -11
- package/dist/images/annotation-comment.svg +0 -16
- package/dist/images/annotation-help.svg +0 -26
- package/dist/images/annotation-insert.svg +0 -10
- package/dist/images/annotation-key.svg +0 -11
- package/dist/images/annotation-newparagraph.svg +0 -11
- package/dist/images/annotation-noicon.svg +0 -7
- package/dist/images/annotation-note.svg +0 -42
- package/dist/images/annotation-paperclip.svg +0 -6
- package/dist/images/annotation-paragraph.svg +0 -16
- package/dist/images/annotation-pushpin.svg +0 -7
- package/dist/images/checkmark.svg +0 -5
- package/dist/images/comment-actionsButton.svg +0 -3
- package/dist/images/comment-closeButton.svg +0 -3
- package/dist/images/comment-editButton.svg +0 -8
- package/dist/images/comment-popup-editButton.svg +0 -5
- package/dist/images/cursor-editorFreeHighlight.svg +0 -6
- package/dist/images/cursor-editorFreeText.svg +0 -3
- package/dist/images/cursor-editorInk.svg +0 -4
- package/dist/images/cursor-editorTextHighlight.svg +0 -8
- package/dist/images/editor-toolbar-delete.svg +0 -5
- package/dist/images/editor-toolbar-edit.svg +0 -3
- package/dist/images/findbarButton-next.svg +0 -3
- package/dist/images/findbarButton-previous.svg +0 -3
- package/dist/images/gv-toolbarButton-download.svg +0 -3
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/loading.svg +0 -1
- package/dist/images/messageBar_closingButton.svg +0 -3
- package/dist/images/messageBar_info.svg +0 -3
- package/dist/images/messageBar_warning.svg +0 -3
- package/dist/images/pages_closeButton.svg +0 -3
- package/dist/images/pages_selected.svg +0 -7
- package/dist/images/pages_viewArrow.svg +0 -3
- package/dist/images/pages_viewButton.svg +0 -3
- package/dist/images/secondaryToolbarButton-documentProperties.svg +0 -3
- package/dist/images/secondaryToolbarButton-firstPage.svg +0 -3
- package/dist/images/secondaryToolbarButton-handTool.svg +0 -3
- package/dist/images/secondaryToolbarButton-lastPage.svg +0 -3
- package/dist/images/secondaryToolbarButton-rotateCcw.svg +0 -3
- package/dist/images/secondaryToolbarButton-rotateCw.svg +0 -3
- package/dist/images/secondaryToolbarButton-scrollHorizontal.svg +0 -3
- package/dist/images/secondaryToolbarButton-scrollPage.svg +0 -3
- package/dist/images/secondaryToolbarButton-scrollVertical.svg +0 -3
- package/dist/images/secondaryToolbarButton-scrollWrapped.svg +0 -3
- package/dist/images/secondaryToolbarButton-selectTool.svg +0 -3
- package/dist/images/secondaryToolbarButton-spreadEven.svg +0 -3
- package/dist/images/secondaryToolbarButton-spreadNone.svg +0 -3
- package/dist/images/secondaryToolbarButton-spreadOdd.svg +0 -3
- package/dist/images/toolbarButton-bookmark.svg +0 -3
- package/dist/images/toolbarButton-currentOutlineItem.svg +0 -3
- package/dist/images/toolbarButton-download.svg +0 -4
- package/dist/images/toolbarButton-editorFreeText.svg +0 -5
- package/dist/images/toolbarButton-editorHighlight.svg +0 -6
- package/dist/images/toolbarButton-editorInk.svg +0 -4
- package/dist/images/toolbarButton-editorSignature.svg +0 -6
- package/dist/images/toolbarButton-editorStamp.svg +0 -8
- package/dist/images/toolbarButton-menuArrow.svg +0 -3
- package/dist/images/toolbarButton-openFile.svg +0 -3
- package/dist/images/toolbarButton-pageDown.svg +0 -3
- package/dist/images/toolbarButton-pageUp.svg +0 -3
- package/dist/images/toolbarButton-presentationMode.svg +0 -3
- package/dist/images/toolbarButton-print.svg +0 -3
- package/dist/images/toolbarButton-search.svg +0 -3
- package/dist/images/toolbarButton-secondaryToolbarToggle.svg +0 -3
- package/dist/images/toolbarButton-viewAttachments.svg +0 -3
- package/dist/images/toolbarButton-viewLayers.svg +0 -3
- package/dist/images/toolbarButton-viewOutline.svg +0 -3
- package/dist/images/toolbarButton-viewThumbnail.svg +0 -3
- package/dist/images/toolbarButton-viewsManagerToggle.svg +0 -3
- package/dist/images/toolbarButton-zoomIn.svg +0 -3
- package/dist/images/toolbarButton-zoomOut.svg +0 -3
- package/dist/images/treeitem-collapsed.svg +0 -1
- package/dist/images/treeitem-expanded.svg +0 -1
- package/dist/superdoc/src/helpers/floor.d.ts +0 -1
- package/dist/superdoc/src/index.d.cts +0 -18
- package/dist/superdoc/src/index.d.ts +0 -14
- package/dist-cdn/footnote-table-order.docx +0 -0
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
|
|
3
3
|
const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
4
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
4
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-B4c55pFy.cjs");
|
|
5
5
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
6
6
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
7
7
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-BUdjGKyl.cjs");
|
|
@@ -260,7 +260,7 @@ var v_click_outside_default = {
|
|
|
260
260
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
261
261
|
function getSuperdocVersion() {
|
|
262
262
|
try {
|
|
263
|
-
return "2.
|
|
263
|
+
return "2.28.0-next.10";
|
|
264
264
|
} catch {
|
|
265
265
|
return "unknown";
|
|
266
266
|
}
|
|
@@ -5464,7 +5464,8 @@ function resolveWebsocketFamily(family, candidate) {
|
|
|
5464
5464
|
roomMode,
|
|
5465
5465
|
serverUrl,
|
|
5466
5466
|
...params ? { params } : {},
|
|
5467
|
-
...token ? { token } : {}
|
|
5467
|
+
...token ? { token } : {},
|
|
5468
|
+
...family === "hocuspocus" && candidate.retry !== void 0 ? { retry: candidate.retry } : {}
|
|
5468
5469
|
}
|
|
5469
5470
|
};
|
|
5470
5471
|
}
|
|
@@ -7187,16 +7188,6 @@ function createDefaultV2Integration() {
|
|
|
7187
7188
|
return createStubV2Integration();
|
|
7188
7189
|
}
|
|
7189
7190
|
}
|
|
7190
|
-
/**
|
|
7191
|
-
* Backwards-compatible alias. The v2 branch no longer reads any customer
|
|
7192
|
-
* config; the parameter is ignored and retained only so existing call sites do
|
|
7193
|
-
* not need to change in lockstep with this internalization.
|
|
7194
|
-
*
|
|
7195
|
-
* @returns {SuperDocV2Integration}
|
|
7196
|
-
*/
|
|
7197
|
-
function resolveV2Integration() {
|
|
7198
|
-
return createDefaultV2Integration();
|
|
7199
|
-
}
|
|
7200
7191
|
//#endregion
|
|
7201
7192
|
//#region src/helpers/interaction-trace.js
|
|
7202
7193
|
function safeTraceCollector() {
|
|
@@ -7755,6 +7746,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
7755
7746
|
const instantSidebarAlignmentInstanceId = require__plugin_vue_export_helper.ref(null);
|
|
7756
7747
|
const pendingComment = require__plugin_vue_export_helper.ref(null);
|
|
7757
7748
|
const pendingV2CommentTarget = require__plugin_vue_export_helper.shallowRef(null);
|
|
7749
|
+
let pendingCommentRequest = 0;
|
|
7758
7750
|
const isViewingMode = require__plugin_vue_export_helper.computed(() => viewingVisibility.documentMode === "viewing");
|
|
7759
7751
|
const shouldRenderReviewInViewing = require__plugin_vue_export_helper.computed(() => {
|
|
7760
7752
|
if (!isViewingMode.value) return true;
|
|
@@ -7762,6 +7754,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
7762
7754
|
});
|
|
7763
7755
|
const v2CommentsAdapter = require__plugin_vue_export_helper.shallowRef(null);
|
|
7764
7756
|
const setV2CommentsAdapter = (adapter) => {
|
|
7757
|
+
if (v2CommentsAdapter.value !== (adapter ?? null)) pendingCommentRequest += 1;
|
|
7765
7758
|
v2CommentsAdapter.value = adapter ?? null;
|
|
7766
7759
|
};
|
|
7767
7760
|
const getV2CommentsAdapter = (superdoc) => {
|
|
@@ -8620,26 +8613,41 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8620
8613
|
}
|
|
8621
8614
|
if (typeof currentSelection !== "function") return null;
|
|
8622
8615
|
try {
|
|
8623
|
-
|
|
8616
|
+
const snapshot = currentSelection();
|
|
8617
|
+
return typeof snapshot?.then === "function" ? Promise.resolve(snapshot).catch(() => null) : snapshot;
|
|
8624
8618
|
} catch {
|
|
8625
8619
|
return null;
|
|
8626
8620
|
}
|
|
8627
8621
|
};
|
|
8628
8622
|
const showAddComment = (superdoc, targetClientY = null) => {
|
|
8623
|
+
const request = ++pendingCommentRequest;
|
|
8624
|
+
const editor = superdoc?.activeEditor;
|
|
8629
8625
|
const v2Adapter = getV2CommentsAdapter(superdoc);
|
|
8630
|
-
const
|
|
8631
|
-
const
|
|
8632
|
-
|
|
8633
|
-
|
|
8626
|
+
const ownsRequest = () => pendingCommentRequest === request;
|
|
8627
|
+
const emitPending = (snapshot) => {
|
|
8628
|
+
if (!ownsRequest()) return;
|
|
8629
|
+
superdoc.emit("comments-update", {
|
|
8630
|
+
type: COMMENT_EVENTS.PENDING,
|
|
8631
|
+
pendingSelection: superdoc?.activeEditor === editor ? snapshot : null
|
|
8632
|
+
});
|
|
8634
8633
|
};
|
|
8635
|
-
superdoc.emit("comments-update", event);
|
|
8636
8634
|
if (v2Adapter) {
|
|
8637
8635
|
const cap = v2Adapter.getCapabilityState?.();
|
|
8638
8636
|
if (cap && cap.canWrite === false) return {
|
|
8639
8637
|
ok: false,
|
|
8640
8638
|
reason: cap.reason
|
|
8641
8639
|
};
|
|
8642
|
-
return Promise.resolve(v2Adapter.captureCurrentSelection?.(
|
|
8640
|
+
return Promise.resolve(v2Adapter.captureCurrentSelection?.({ beforeReady: (snapshot) => {
|
|
8641
|
+
if (superdoc?.activeEditor === editor && getV2CommentsAdapter(superdoc) === v2Adapter) emitPending(snapshot);
|
|
8642
|
+
} })).then((capture) => {
|
|
8643
|
+
if (!ownsRequest()) return {
|
|
8644
|
+
ok: false,
|
|
8645
|
+
reason: "pending-comment-superseded"
|
|
8646
|
+
};
|
|
8647
|
+
if (superdoc?.activeEditor !== editor || getV2CommentsAdapter(superdoc) !== v2Adapter) return {
|
|
8648
|
+
ok: false,
|
|
8649
|
+
reason: "document-replaced"
|
|
8650
|
+
};
|
|
8643
8651
|
if (!capture?.ok) return {
|
|
8644
8652
|
ok: false,
|
|
8645
8653
|
reason: capture?.reason ?? "editing-range-required",
|
|
@@ -8668,25 +8676,52 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8668
8676
|
detail: err?.message ?? String(err)
|
|
8669
8677
|
}));
|
|
8670
8678
|
}
|
|
8671
|
-
const
|
|
8672
|
-
|
|
8673
|
-
if (
|
|
8674
|
-
|
|
8675
|
-
selection
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8679
|
+
const pendingSelection = getPendingSelectionSnapshot(superdoc, superdocStore.activeSelection);
|
|
8680
|
+
const asyncSnapshot = typeof pendingSelection?.then === "function";
|
|
8681
|
+
if (!asyncSnapshot) emitPending(pendingSelection);
|
|
8682
|
+
const showLegacyPending = (selection) => {
|
|
8683
|
+
selection.selectionBounds = { ...selection.selectionBounds };
|
|
8684
|
+
if (superdocStore.selectionPosition?.source && superdocStore.selectionPosition.source !== "pdf") superdocStore.selectionPosition.source = null;
|
|
8685
|
+
pendingComment.value = getPendingComment({
|
|
8686
|
+
selection,
|
|
8687
|
+
documentId: selection.documentId,
|
|
8688
|
+
parentCommentId: null
|
|
8689
|
+
});
|
|
8690
|
+
if (!superdoc.config.isInternal) pendingComment.value.isInternal = false;
|
|
8691
|
+
if (superdoc.activeEditor?.commands) superdoc.activeEditor.commands.insertComment({
|
|
8692
|
+
...pendingComment.value.getValues(),
|
|
8693
|
+
commentId: "pending",
|
|
8694
|
+
skipEmit: true
|
|
8695
|
+
});
|
|
8696
|
+
if (pendingComment.value.selection.source === "document-editor" && superdocStore.selectionPosition) superdocStore.selectionPosition.source = DOCUMENT_EDITOR_SELECTION_SOURCE;
|
|
8697
|
+
requestInstantSidebarAlignment(targetClientY, "pending");
|
|
8698
|
+
setActiveFloatingCommentInstance(null);
|
|
8699
|
+
activeComment.value = pendingComment.value.commentId;
|
|
8700
|
+
return { ok: true };
|
|
8701
|
+
};
|
|
8702
|
+
if (asyncSnapshot) {
|
|
8703
|
+
const selection = { ...superdocStore.activeSelection };
|
|
8704
|
+
selection.selectionBounds = { ...selection.selectionBounds };
|
|
8705
|
+
return pendingSelection.then((snapshot) => {
|
|
8706
|
+
if (!ownsRequest()) return {
|
|
8707
|
+
ok: false,
|
|
8708
|
+
reason: "pending-comment-superseded"
|
|
8709
|
+
};
|
|
8710
|
+
emitPending(snapshot);
|
|
8711
|
+
if (!ownsRequest()) return {
|
|
8712
|
+
ok: false,
|
|
8713
|
+
reason: "pending-comment-superseded"
|
|
8714
|
+
};
|
|
8715
|
+
return superdoc?.activeEditor === editor ? showLegacyPending(selection) : {
|
|
8716
|
+
ok: false,
|
|
8717
|
+
reason: "document-replaced"
|
|
8718
|
+
};
|
|
8719
|
+
});
|
|
8720
|
+
}
|
|
8721
|
+
return ownsRequest() ? showLegacyPending({ ...superdocStore.activeSelection }) : {
|
|
8722
|
+
ok: false,
|
|
8723
|
+
reason: "pending-comment-superseded"
|
|
8724
|
+
};
|
|
8690
8725
|
};
|
|
8691
8726
|
/**
|
|
8692
8727
|
* Get the numeric position value for sorting a comment by document order.
|
|
@@ -8841,7 +8876,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8841
8876
|
*
|
|
8842
8877
|
* @returns {void}
|
|
8843
8878
|
*/
|
|
8844
|
-
const
|
|
8879
|
+
const resetPendingCommentState = (superdoc, clearViewingSelection = true) => {
|
|
8845
8880
|
const hadPending = !!pendingComment.value;
|
|
8846
8881
|
currentCommentText.value = "";
|
|
8847
8882
|
currentCommentMentions.value = [];
|
|
@@ -8850,13 +8885,17 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8850
8885
|
superdocStore.selectionPosition = null;
|
|
8851
8886
|
if (hadPending) clearActiveCommentSelection();
|
|
8852
8887
|
if (isV2EditorActive(superdoc)) {
|
|
8853
|
-
if (hadPending && isViewingMode.value) try {
|
|
8888
|
+
if (hadPending && clearViewingSelection && isViewingMode.value) try {
|
|
8854
8889
|
superdoc?.activeEditor?.host?.getHandles?.()?.selection?.clear?.();
|
|
8855
8890
|
} catch {}
|
|
8856
8891
|
return;
|
|
8857
8892
|
}
|
|
8858
8893
|
superdoc?.activeEditor?.commands?.removeComment({ commentId: "pending" });
|
|
8859
8894
|
};
|
|
8895
|
+
const removePendingComment = (superdoc) => {
|
|
8896
|
+
pendingCommentRequest += 1;
|
|
8897
|
+
resetPendingCommentState(superdoc);
|
|
8898
|
+
};
|
|
8860
8899
|
const getV2CreatedComment = ({ outcome, reconciled, documentId }) => {
|
|
8861
8900
|
const createdId = normalizeCommentId(outcome?.createdCommentId);
|
|
8862
8901
|
if (!createdId) return reconciled?.added ?? null;
|
|
@@ -8874,6 +8913,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8874
8913
|
const v2Adapter = !skipEditorUpdate && !isHydration ? getV2CommentsAdapter(superdoc) : null;
|
|
8875
8914
|
if (v2Adapter && !comment.trackedChange) {
|
|
8876
8915
|
const submittedPendingComment = pendingComment.value;
|
|
8916
|
+
const submittedPendingRequest = pendingCommentRequest;
|
|
8877
8917
|
const text = normalizeV2CommentDraftText(submittedPendingComment ? currentCommentText.value : comment.commentText);
|
|
8878
8918
|
const mentions = pendingComment.value ? currentCommentMentions.value : comment.mentions ?? [];
|
|
8879
8919
|
const target = pendingComment.value ? pendingV2CommentTarget.value : null;
|
|
@@ -8922,9 +8962,11 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8922
8962
|
documentId: v2Adapter.documentId
|
|
8923
8963
|
});
|
|
8924
8964
|
const hadPendingComment = submittedPendingComment != null && pendingComment.value?.commentId === submittedPendingComment.commentId;
|
|
8925
|
-
|
|
8965
|
+
const ownsSubmittedRequest = pendingCommentRequest === submittedPendingRequest;
|
|
8966
|
+
if (hadPendingComment) if (ownsSubmittedRequest) removePendingComment(superdoc);
|
|
8967
|
+
else resetPendingCommentState(superdoc, false);
|
|
8926
8968
|
const createdId = created?.commentId ?? null;
|
|
8927
|
-
if (hadPendingComment && createdId) {
|
|
8969
|
+
if (hadPendingComment && ownsSubmittedRequest && createdId) {
|
|
8928
8970
|
setActiveComment(superdoc, createdId);
|
|
8929
8971
|
setActiveFloatingCommentInstance(createdId);
|
|
8930
8972
|
}
|
|
@@ -9021,6 +9063,8 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9021
9063
|
rejected: true,
|
|
9022
9064
|
comment: comment.getValues(),
|
|
9023
9065
|
reason: outcome?.reason ?? "v2-delete-failed",
|
|
9066
|
+
...outcome?.code !== void 0 ? { code: outcome.code } : {},
|
|
9067
|
+
...outcome?.detail !== void 0 ? { detail: outcome.detail } : {},
|
|
9024
9068
|
...outcome?.committed ? { committed: true } : {}
|
|
9025
9069
|
});
|
|
9026
9070
|
return outcome;
|
|
@@ -12255,11 +12299,11 @@ function useUiFontFamily() {
|
|
|
12255
12299
|
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
12256
12300
|
var _hoisted_1$31 = { class: "comments-dropdown" };
|
|
12257
12301
|
var _hoisted_2$24 = ["onClick"];
|
|
12258
|
-
var _hoisted_3$
|
|
12302
|
+
var _hoisted_3$21 = {
|
|
12259
12303
|
key: 0,
|
|
12260
12304
|
class: "comments-dropdown__option-icon"
|
|
12261
12305
|
};
|
|
12262
|
-
var _hoisted_4$
|
|
12306
|
+
var _hoisted_4$15 = ["innerHTML"];
|
|
12263
12307
|
var _hoisted_5$11 = { class: "comments-dropdown__option-label" };
|
|
12264
12308
|
var _sfc_main$38 = {
|
|
12265
12309
|
__name: "CommentsDropdown",
|
|
@@ -12400,10 +12444,10 @@ var _sfc_main$38 = {
|
|
|
12400
12444
|
key: option.key,
|
|
12401
12445
|
class: require__plugin_vue_export_helper.normalizeClass(["comments-dropdown__option", { "sd-disabled": option.disabled }]),
|
|
12402
12446
|
onClick: ($event) => onOptionClick(option)
|
|
12403
|
-
}, [hasIcon(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$
|
|
12447
|
+
}, [hasIcon(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$21, [option.iconString ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", {
|
|
12404
12448
|
key: 0,
|
|
12405
12449
|
innerHTML: option.iconString
|
|
12406
|
-
}, null, 8, _hoisted_4$
|
|
12450
|
+
}, null, 8, _hoisted_4$15)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.unref(OptionIcon), {
|
|
12407
12451
|
key: 1,
|
|
12408
12452
|
option
|
|
12409
12453
|
}, null, 8, ["option"]))])) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$11, require__plugin_vue_export_helper.toDisplayString(option.label), 1)], 10, _hoisted_2$24);
|
|
@@ -12416,8 +12460,8 @@ var CommentsDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._
|
|
|
12416
12460
|
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
12417
12461
|
var _hoisted_1$30 = { class: "sd-comment-option" };
|
|
12418
12462
|
var _hoisted_2$23 = ["innerHTML"];
|
|
12419
|
-
var _hoisted_3$
|
|
12420
|
-
var _hoisted_4$
|
|
12463
|
+
var _hoisted_3$20 = { class: "sd-option-state" };
|
|
12464
|
+
var _hoisted_4$14 = ["innerHTML"];
|
|
12421
12465
|
var _sfc_main$37 = {
|
|
12422
12466
|
__name: "InternalDropdown",
|
|
12423
12467
|
props: {
|
|
@@ -12490,11 +12534,11 @@ var _sfc_main$37 = {
|
|
|
12490
12534
|
class: "sd-active-icon",
|
|
12491
12535
|
innerHTML: activeIcon.value
|
|
12492
12536
|
}, null, 8, _hoisted_2$23),
|
|
12493
|
-
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$
|
|
12537
|
+
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$20, require__plugin_vue_export_helper.toDisplayString(getState.value), 1),
|
|
12494
12538
|
require__plugin_vue_export_helper.createElementVNode("div", {
|
|
12495
12539
|
class: "sd-dropdown-caret",
|
|
12496
12540
|
innerHTML: require__plugin_vue_export_helper.unref(superdocIcons).caretDown
|
|
12497
|
-
}, null, 8, _hoisted_4$
|
|
12541
|
+
}, null, 8, _hoisted_4$14)
|
|
12498
12542
|
])]),
|
|
12499
12543
|
_: 1
|
|
12500
12544
|
}, 8, ["disabled", "content-style"])], 4);
|
|
@@ -12653,7 +12697,7 @@ var isAllowed = (permission, role, isInternal, context = {}) => {
|
|
|
12653
12697
|
//#region src/components/general/Avatar.vue
|
|
12654
12698
|
var _hoisted_1$29 = { class: "user-container" };
|
|
12655
12699
|
var _hoisted_2$22 = ["src"];
|
|
12656
|
-
var _hoisted_3$
|
|
12700
|
+
var _hoisted_3$19 = {
|
|
12657
12701
|
key: 1,
|
|
12658
12702
|
class: "user-bg"
|
|
12659
12703
|
};
|
|
@@ -12678,7 +12722,7 @@ var _sfc_main$36 = {
|
|
|
12678
12722
|
key: 0,
|
|
12679
12723
|
class: "user-bg",
|
|
12680
12724
|
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
12681
|
-
}, null, 8, _hoisted_2$22)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$
|
|
12725
|
+
}, null, 8, _hoisted_2$22)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$19, require__plugin_vue_export_helper.toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))]);
|
|
12682
12726
|
};
|
|
12683
12727
|
}
|
|
12684
12728
|
};
|
|
@@ -12687,8 +12731,8 @@ var Avatar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue
|
|
|
12687
12731
|
//#region src/components/CommentsLayer/CommentHeader.vue
|
|
12688
12732
|
var _hoisted_1$28 = { class: "card-section comment-header" };
|
|
12689
12733
|
var _hoisted_2$21 = { class: "comment-header-left" };
|
|
12690
|
-
var _hoisted_3$
|
|
12691
|
-
var _hoisted_4$
|
|
12734
|
+
var _hoisted_3$18 = { class: "user-info" };
|
|
12735
|
+
var _hoisted_4$13 = { class: "user-name" };
|
|
12692
12736
|
var _hoisted_5$10 = {
|
|
12693
12737
|
key: 0,
|
|
12694
12738
|
class: "imported-tag"
|
|
@@ -12948,7 +12992,7 @@ var _sfc_main$35 = {
|
|
|
12948
12992
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$28, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_2$21, [require__plugin_vue_export_helper.createVNode(Avatar_default, {
|
|
12949
12993
|
user: getCurrentUser.value,
|
|
12950
12994
|
class: "avatar"
|
|
12951
|
-
}, null, 8, ["user"]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$
|
|
12995
|
+
}, null, 8, ["user"]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$18, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$13, [require__plugin_vue_export_helper.createTextVNode(require__plugin_vue_export_helper.toDisplayString(getCurrentUser.value.name), 1), isImported.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_5$10, "IMPORTED")) : require__plugin_vue_export_helper.createCommentVNode("", true)]), props.comment.createdTime ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_6$8, require__plugin_vue_export_helper.toDisplayString(require__plugin_vue_export_helper.unref(formatDate)(props.comment.createdTime)), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)])]), require__plugin_vue_export_helper.createElementVNode("div", { class: require__plugin_vue_export_helper.normalizeClass(["overflow-menu", { "is-visible": props.isActive }]) }, [
|
|
12952
12996
|
allowResolve.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
12953
12997
|
key: 0,
|
|
12954
12998
|
class: require__plugin_vue_export_helper.normalizeClass(["overflow-menu__icon", { "sd-is-disabled": Boolean(__props.resolveDisabledReason) }]),
|
|
@@ -12999,12 +13043,12 @@ var CommentHeader_default = /*#__PURE__*/ require__plugin_vue_export_helper._plu
|
|
|
12999
13043
|
//#region src/components/CommentsLayer/CommentInput.vue
|
|
13000
13044
|
var _hoisted_1$27 = { class: "input-section" };
|
|
13001
13045
|
var _hoisted_2$20 = { class: "comment-composer" };
|
|
13002
|
-
var _hoisted_3$
|
|
13046
|
+
var _hoisted_3$17 = [
|
|
13003
13047
|
"aria-expanded",
|
|
13004
13048
|
"aria-controls",
|
|
13005
13049
|
"aria-activedescendant"
|
|
13006
13050
|
];
|
|
13007
|
-
var _hoisted_4$
|
|
13051
|
+
var _hoisted_4$12 = [
|
|
13008
13052
|
"id",
|
|
13009
13053
|
"aria-selected",
|
|
13010
13054
|
"data-sd-comment-mention-option",
|
|
@@ -13194,7 +13238,7 @@ var _sfc_main$34 = {
|
|
|
13194
13238
|
onKeydown,
|
|
13195
13239
|
onFocus: _cache[1] || (_cache[1] = ($event) => handleFocusChange(true)),
|
|
13196
13240
|
onBlur: _cache[2] || (_cache[2] = ($event) => handleFocusChange(false))
|
|
13197
|
-
}, null, 40, _hoisted_3$
|
|
13241
|
+
}, null, 40, _hoisted_3$17), [[require__plugin_vue_export_helper.vModelText, commentDraft.value]]), mentionListOpen.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
13198
13242
|
key: 0,
|
|
13199
13243
|
id: mentionListId,
|
|
13200
13244
|
class: "comment-mention-list",
|
|
@@ -13210,7 +13254,7 @@ var _sfc_main$34 = {
|
|
|
13210
13254
|
"aria-selected": index === highlightedMentionIndex.value,
|
|
13211
13255
|
"data-sd-comment-mention-option": userKey(user),
|
|
13212
13256
|
onMousedown: require__plugin_vue_export_helper.withModifiers(($event) => selectMention(user), ["prevent"])
|
|
13213
|
-
}, [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$9, require__plugin_vue_export_helper.toDisplayString(displayName(user)), 1), user.email ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_6$7, require__plugin_vue_export_helper.toDisplayString(user.email), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)], 42, _hoisted_4$
|
|
13257
|
+
}, [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$9, require__plugin_vue_export_helper.toDisplayString(displayName(user)), 1), user.email ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_6$7, require__plugin_vue_export_helper.toDisplayString(user.email), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)], 42, _hoisted_4$12);
|
|
13214
13258
|
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 2)]);
|
|
13215
13259
|
};
|
|
13216
13260
|
}
|
|
@@ -13337,98 +13381,108 @@ var _hoisted_2$19 = {
|
|
|
13337
13381
|
key: 0,
|
|
13338
13382
|
class: "existing-internal-input"
|
|
13339
13383
|
};
|
|
13340
|
-
var _hoisted_3$
|
|
13341
|
-
var _hoisted_4$
|
|
13342
|
-
|
|
13343
|
-
|
|
13384
|
+
var _hoisted_3$16 = { class: "new-comment-input-wrapper" };
|
|
13385
|
+
var _hoisted_4$11 = {
|
|
13386
|
+
key: 1,
|
|
13387
|
+
class: "tracked-change-decision-alert",
|
|
13388
|
+
role: "alert"
|
|
13389
|
+
};
|
|
13390
|
+
var _hoisted_5$8 = { class: "reply-actions" };
|
|
13391
|
+
var _hoisted_6$6 = ["disabled"];
|
|
13392
|
+
var _hoisted_7$4 = {
|
|
13344
13393
|
key: 0,
|
|
13345
13394
|
class: "resolved-badge"
|
|
13346
13395
|
};
|
|
13347
|
-
var
|
|
13348
|
-
var
|
|
13396
|
+
var _hoisted_8$4 = ["innerHTML"];
|
|
13397
|
+
var _hoisted_9$3 = {
|
|
13349
13398
|
key: 1,
|
|
13350
13399
|
class: "existing-internal-input"
|
|
13351
13400
|
};
|
|
13352
|
-
var
|
|
13401
|
+
var _hoisted_10$3 = {
|
|
13402
|
+
key: 2,
|
|
13403
|
+
class: "tracked-change-decision-alert",
|
|
13404
|
+
role: "alert"
|
|
13405
|
+
};
|
|
13406
|
+
var _hoisted_11$3 = {
|
|
13353
13407
|
key: 0,
|
|
13354
13408
|
class: "card-section comment-body"
|
|
13355
13409
|
};
|
|
13356
|
-
var
|
|
13357
|
-
var
|
|
13358
|
-
var
|
|
13359
|
-
var
|
|
13410
|
+
var _hoisted_12$2 = ["data-track-change-semantic-color-key"];
|
|
13411
|
+
var _hoisted_13$2 = { key: 0 };
|
|
13412
|
+
var _hoisted_14$2 = { class: "change-type tracked-change-label" };
|
|
13413
|
+
var _hoisted_15$2 = {
|
|
13360
13414
|
key: 0,
|
|
13361
13415
|
class: "tracked-change-detail-lines"
|
|
13362
13416
|
};
|
|
13363
|
-
var
|
|
13417
|
+
var _hoisted_16$2 = {
|
|
13364
13418
|
key: 0,
|
|
13365
13419
|
class: "tracked-change-text"
|
|
13366
13420
|
};
|
|
13367
|
-
var
|
|
13421
|
+
var _hoisted_17$2 = {
|
|
13368
13422
|
key: 1,
|
|
13369
13423
|
class: "change-type"
|
|
13370
13424
|
};
|
|
13371
|
-
var
|
|
13372
|
-
var
|
|
13373
|
-
var _hoisted_18$2 = { class: "tracked-change-text is-inserted" };
|
|
13374
|
-
var _hoisted_19$1 = { key: 2 };
|
|
13425
|
+
var _hoisted_18$2 = { class: "change-type" };
|
|
13426
|
+
var _hoisted_19$1 = { key: 1 };
|
|
13375
13427
|
var _hoisted_20$1 = { class: "tracked-change-text is-inserted" };
|
|
13376
|
-
var _hoisted_21$1 = { key:
|
|
13377
|
-
var _hoisted_22$1 = {
|
|
13378
|
-
var _hoisted_23$1 = { key:
|
|
13379
|
-
var _hoisted_24 = { key:
|
|
13380
|
-
var _hoisted_25 = {
|
|
13381
|
-
var _hoisted_26 = { key:
|
|
13382
|
-
var _hoisted_27 = { class: "tracked-change-text
|
|
13383
|
-
var _hoisted_28 = {
|
|
13384
|
-
var _hoisted_29 = {
|
|
13385
|
-
var _hoisted_30 = {
|
|
13386
|
-
var _hoisted_31 = { key:
|
|
13387
|
-
var _hoisted_32 = {
|
|
13388
|
-
var _hoisted_33 = { key:
|
|
13389
|
-
var _hoisted_34 = { class: "tracked-change-text is-
|
|
13390
|
-
var _hoisted_35 =
|
|
13391
|
-
var _hoisted_36 =
|
|
13392
|
-
var _hoisted_37 =
|
|
13428
|
+
var _hoisted_21$1 = { key: 2 };
|
|
13429
|
+
var _hoisted_22$1 = { class: "tracked-change-text is-inserted" };
|
|
13430
|
+
var _hoisted_23$1 = { key: 3 };
|
|
13431
|
+
var _hoisted_24 = { key: 4 };
|
|
13432
|
+
var _hoisted_25 = { key: 5 };
|
|
13433
|
+
var _hoisted_26 = { key: 6 };
|
|
13434
|
+
var _hoisted_27 = { class: "tracked-change-text" };
|
|
13435
|
+
var _hoisted_28 = { key: 7 };
|
|
13436
|
+
var _hoisted_29 = { class: "tracked-change-text is-deleted" };
|
|
13437
|
+
var _hoisted_30 = { class: "tracked-change-text is-inserted" };
|
|
13438
|
+
var _hoisted_31 = { key: 8 };
|
|
13439
|
+
var _hoisted_32 = { key: 9 };
|
|
13440
|
+
var _hoisted_33 = { key: 10 };
|
|
13441
|
+
var _hoisted_34 = { class: "tracked-change-text is-deleted" };
|
|
13442
|
+
var _hoisted_35 = { key: 11 };
|
|
13443
|
+
var _hoisted_36 = { class: "tracked-change-text is-inserted" };
|
|
13444
|
+
var _hoisted_37 = ["data-track-change-image-preview-role"];
|
|
13445
|
+
var _hoisted_38 = ["src", "alt"];
|
|
13446
|
+
var _hoisted_39 = {
|
|
13393
13447
|
key: 1,
|
|
13394
13448
|
class: "card-section comment-body"
|
|
13395
13449
|
};
|
|
13396
|
-
var
|
|
13397
|
-
var
|
|
13450
|
+
var _hoisted_40 = ["innerHTML"];
|
|
13451
|
+
var _hoisted_41 = {
|
|
13398
13452
|
key: 1,
|
|
13399
13453
|
class: "comment"
|
|
13400
13454
|
};
|
|
13401
|
-
var
|
|
13455
|
+
var _hoisted_42 = {
|
|
13402
13456
|
key: 2,
|
|
13403
13457
|
class: "reply-expanded"
|
|
13404
13458
|
};
|
|
13405
|
-
var
|
|
13406
|
-
var
|
|
13407
|
-
var
|
|
13408
|
-
var
|
|
13459
|
+
var _hoisted_43 = { class: "reply-input-wrapper" };
|
|
13460
|
+
var _hoisted_44 = { class: "reply-actions" };
|
|
13461
|
+
var _hoisted_45 = ["onClick"];
|
|
13462
|
+
var _hoisted_46 = [
|
|
13409
13463
|
"onClick",
|
|
13410
13464
|
"disabled",
|
|
13411
13465
|
"data-disabled-reason"
|
|
13412
13466
|
];
|
|
13413
|
-
var
|
|
13414
|
-
var
|
|
13467
|
+
var _hoisted_47 = { class: "collapsed-avatars" };
|
|
13468
|
+
var _hoisted_48 = {
|
|
13415
13469
|
key: 3,
|
|
13416
13470
|
class: "comment-separator"
|
|
13417
13471
|
};
|
|
13418
|
-
var
|
|
13419
|
-
key:
|
|
13472
|
+
var _hoisted_49 = {
|
|
13473
|
+
key: 3,
|
|
13420
13474
|
class: "tracked-change-decision-alert",
|
|
13421
13475
|
role: "alert"
|
|
13422
13476
|
};
|
|
13423
|
-
var
|
|
13424
|
-
var
|
|
13425
|
-
var
|
|
13477
|
+
var _hoisted_50 = { class: "tracked-change-decision-alert__message" };
|
|
13478
|
+
var _hoisted_51 = ["disabled", "data-disabled-reason"];
|
|
13479
|
+
var _hoisted_52 = {
|
|
13426
13480
|
key: 1,
|
|
13427
13481
|
class: "reply-expanded"
|
|
13428
13482
|
};
|
|
13429
|
-
var
|
|
13430
|
-
var
|
|
13431
|
-
var
|
|
13483
|
+
var _hoisted_53 = { class: "reply-input-wrapper" };
|
|
13484
|
+
var _hoisted_54 = { class: "reply-actions" };
|
|
13485
|
+
var _hoisted_55 = ["disabled", "data-disabled-reason"];
|
|
13432
13486
|
var commentEditSessions = /* @__PURE__ */ new WeakMap();
|
|
13433
13487
|
var _sfc_main$33 = {
|
|
13434
13488
|
__name: "CommentDialog",
|
|
@@ -13508,6 +13562,7 @@ var _sfc_main$33 = {
|
|
|
13508
13562
|
};
|
|
13509
13563
|
};
|
|
13510
13564
|
const CLICK_OUTSIDE_IGNORED_SELECTORS = [
|
|
13565
|
+
".superdoc__tools [data-id=\"is-tool\"]",
|
|
13511
13566
|
".comments-dropdown__option-label",
|
|
13512
13567
|
".comments-dropdown__menu",
|
|
13513
13568
|
".comments-dropdown__option",
|
|
@@ -13681,12 +13736,17 @@ var _sfc_main$33 = {
|
|
|
13681
13736
|
const isReplying = require__plugin_vue_export_helper.ref(false);
|
|
13682
13737
|
const isSubmittingReply = require__plugin_vue_export_helper.ref(false);
|
|
13683
13738
|
const isSubmittingNewComment = require__plugin_vue_export_helper.ref(false);
|
|
13739
|
+
const commentSaveFailure = require__plugin_vue_export_helper.ref("");
|
|
13740
|
+
const commentSaveFailureMessage = (outcome, hasDraft = true) => {
|
|
13741
|
+
return `Your comment could not be saved${outcome?.detail === "document-mode-read-only" ? " because the document or connection is read-only" : outcome?.code === "PERMISSION_DENIED" ? " because you do not have permission" : ""}.${hasDraft ? " Your draft is still here. Try again or cancel." : " Try again."}`;
|
|
13742
|
+
};
|
|
13684
13743
|
const startReply = () => {
|
|
13685
13744
|
if (commentsAreReadOnly()) return readOnlyMutationOutcome();
|
|
13686
13745
|
if (isV2WriteDisabled.value) return {
|
|
13687
13746
|
ok: false,
|
|
13688
13747
|
reason: v2WriteCapability.value?.reason ?? "v2-write-unavailable"
|
|
13689
13748
|
};
|
|
13749
|
+
commentSaveFailure.value = "";
|
|
13690
13750
|
isReplying.value = true;
|
|
13691
13751
|
require__plugin_vue_export_helper.nextTick(() => {
|
|
13692
13752
|
commentInput.value?.focus?.();
|
|
@@ -13936,6 +13996,7 @@ var _sfc_main$33 = {
|
|
|
13936
13996
|
reason: "reply-submit-in-flight"
|
|
13937
13997
|
};
|
|
13938
13998
|
isSubmittingReply.value = true;
|
|
13999
|
+
commentSaveFailure.value = "";
|
|
13939
14000
|
try {
|
|
13940
14001
|
const parentCommentId = getV2ExistingReplyParentId(props.comment);
|
|
13941
14002
|
const trackedChangeTarget = getV2TrackedChangeCommentTarget(props.comment);
|
|
@@ -13947,6 +14008,7 @@ var _sfc_main$33 = {
|
|
|
13947
14008
|
...trackedChangeTarget ? { trackedChangeTarget } : {}
|
|
13948
14009
|
});
|
|
13949
14010
|
if (!outcome?.ok) {
|
|
14011
|
+
commentSaveFailure.value = commentSaveFailureMessage(outcome);
|
|
13950
14012
|
require__plugin_vue_export_helper.nextTick(() => emit("resize"));
|
|
13951
14013
|
return outcome;
|
|
13952
14014
|
}
|
|
@@ -13965,6 +14027,7 @@ var _sfc_main$33 = {
|
|
|
13965
14027
|
reason: "comment-submit-in-flight"
|
|
13966
14028
|
};
|
|
13967
14029
|
isSubmittingNewComment.value = true;
|
|
14030
|
+
commentSaveFailure.value = "";
|
|
13968
14031
|
}
|
|
13969
14032
|
const options = {
|
|
13970
14033
|
documentId: props.comment.fileId,
|
|
@@ -13980,7 +14043,10 @@ var _sfc_main$33 = {
|
|
|
13980
14043
|
Promise.resolve().then(() => addComment({
|
|
13981
14044
|
superdoc: proxy.$superdoc,
|
|
13982
14045
|
comment
|
|
13983
|
-
})).
|
|
14046
|
+
})).then((outcome) => {
|
|
14047
|
+
if (isPendingNewComment.value && outcome?.ok === false) commentSaveFailure.value = commentSaveFailureMessage(outcome);
|
|
14048
|
+
}).catch((err) => {
|
|
14049
|
+
commentSaveFailure.value = commentSaveFailureMessage();
|
|
13984
14050
|
console.error("[SuperDoc] addComment failed", err);
|
|
13985
14051
|
}).finally(() => {
|
|
13986
14052
|
isSubmittingNewComment.value = false;
|
|
@@ -14018,15 +14084,8 @@ var _sfc_main$33 = {
|
|
|
14018
14084
|
const v2WriteCapability = require__plugin_vue_export_helper.computed(() => {
|
|
14019
14085
|
v2CapabilityRevision.value;
|
|
14020
14086
|
if (!v2CommentsAdapter.value) return null;
|
|
14021
|
-
const documentMode = commentsStore.viewingVisibility.documentMode;
|
|
14022
14087
|
const command = isPendingNewComment.value ? "comments.createFromSelection" : null;
|
|
14023
|
-
|
|
14024
|
-
if (documentMode === "viewing" && !isPendingNewComment.value) return {
|
|
14025
|
-
...capability ?? {},
|
|
14026
|
-
canWrite: false,
|
|
14027
|
-
reason: "review-surface-read-only"
|
|
14028
|
-
};
|
|
14029
|
-
return capability;
|
|
14088
|
+
return v2CommentsAdapter.value.getCapabilityState?.(command) ?? null;
|
|
14030
14089
|
});
|
|
14031
14090
|
const isV2WriteDisabled = require__plugin_vue_export_helper.computed(() => {
|
|
14032
14091
|
if (!isV2Mode.value) return false;
|
|
@@ -14212,10 +14271,15 @@ var _sfc_main$33 = {
|
|
|
14212
14271
|
});
|
|
14213
14272
|
v1TrackedChangeDecisionApplied = Boolean(outcome?.ok) && outcome.success !== false;
|
|
14214
14273
|
} else if (isV2Mode.value && v2CommentsAdapter.value) {
|
|
14215
|
-
|
|
14274
|
+
const outcome = await commentsStore.resolveCommentV2({
|
|
14216
14275
|
superdoc: proxy.$superdoc,
|
|
14217
14276
|
commentId: props.comment.commentId
|
|
14218
|
-
})
|
|
14277
|
+
});
|
|
14278
|
+
if (!outcome?.ok) {
|
|
14279
|
+
commentSaveFailure.value = commentSaveFailureMessage(outcome, false);
|
|
14280
|
+
return outcome;
|
|
14281
|
+
}
|
|
14282
|
+
commentSaveFailure.value = "";
|
|
14219
14283
|
} else props.comment.resolveComment({
|
|
14220
14284
|
id: superdocStore.user.id,
|
|
14221
14285
|
email: superdocStore.user.email,
|
|
@@ -14244,17 +14308,22 @@ var _sfc_main$33 = {
|
|
|
14244
14308
|
reason: "resolve-disabled"
|
|
14245
14309
|
};
|
|
14246
14310
|
if (!isV2Mode.value || !v2CommentsAdapter.value) return;
|
|
14247
|
-
|
|
14311
|
+
const outcome = await commentsStore.reopenCommentV2({
|
|
14248
14312
|
superdoc: proxy.$superdoc,
|
|
14249
14313
|
commentId: props.comment.commentId
|
|
14250
|
-
})
|
|
14314
|
+
});
|
|
14315
|
+
if (!outcome?.ok) {
|
|
14316
|
+
commentSaveFailure.value = commentSaveFailureMessage(outcome, false);
|
|
14317
|
+
return outcome;
|
|
14318
|
+
}
|
|
14319
|
+
commentSaveFailure.value = "";
|
|
14251
14320
|
require__plugin_vue_export_helper.nextTick(() => {
|
|
14252
14321
|
commentsStore.lastUpdate = /* @__PURE__ */ new Date();
|
|
14253
14322
|
commentsStore.setActiveComment(proxy.$superdoc, activeComment.value);
|
|
14254
14323
|
proxy.$superdoc.focus?.();
|
|
14255
14324
|
});
|
|
14256
14325
|
};
|
|
14257
|
-
const handleOverflowSelect = (value, comment) => {
|
|
14326
|
+
const handleOverflowSelect = async (value, comment) => {
|
|
14258
14327
|
if (commentsAreReadOnly()) return readOnlyMutationOutcome();
|
|
14259
14328
|
switch (value) {
|
|
14260
14329
|
case "edit":
|
|
@@ -14273,10 +14342,13 @@ var _sfc_main$33 = {
|
|
|
14273
14342
|
});
|
|
14274
14343
|
break;
|
|
14275
14344
|
case "delete":
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14345
|
+
{
|
|
14346
|
+
const outcome = await deleteComment({
|
|
14347
|
+
superdoc: proxy.$superdoc,
|
|
14348
|
+
commentId: comment.commentId
|
|
14349
|
+
});
|
|
14350
|
+
commentSaveFailure.value = outcome?.ok ? "" : commentSaveFailureMessage(outcome, false);
|
|
14351
|
+
}
|
|
14280
14352
|
break;
|
|
14281
14353
|
}
|
|
14282
14354
|
};
|
|
@@ -14297,8 +14369,12 @@ var _sfc_main$33 = {
|
|
|
14297
14369
|
commentId: comment.commentId,
|
|
14298
14370
|
text: draft
|
|
14299
14371
|
});
|
|
14300
|
-
if (!outcome?.ok) return outcome;
|
|
14301
14372
|
if (session?.owner !== editSessionOwner || commentEditSessions.get(commentsStore) !== session || session.submission !== submission || proxy.$superdoc.activeEditor !== editor || editor.v2Comments !== adapter || adapter.documentId !== documentId || editor.doc !== document || props.comment !== thread || editingCommentId.value !== comment.commentId || currentCommentText.value !== draft) return outcome;
|
|
14373
|
+
if (!outcome?.ok) {
|
|
14374
|
+
commentSaveFailure.value = commentSaveFailureMessage(outcome);
|
|
14375
|
+
return outcome;
|
|
14376
|
+
}
|
|
14377
|
+
commentSaveFailure.value = "";
|
|
14302
14378
|
retireOwnEditSession();
|
|
14303
14379
|
editingCommentId.value = null;
|
|
14304
14380
|
removePendingComment(proxy.$superdoc);
|
|
@@ -14330,6 +14406,7 @@ var _sfc_main$33 = {
|
|
|
14330
14406
|
return typeof timestamp === "string" ? new Date(timestamp).getTime() : timestamp;
|
|
14331
14407
|
};
|
|
14332
14408
|
const handleCancel = (comment) => {
|
|
14409
|
+
commentSaveFailure.value = "";
|
|
14333
14410
|
retireOwnEditSession();
|
|
14334
14411
|
editingCommentId.value = null;
|
|
14335
14412
|
isReplying.value = false;
|
|
@@ -14417,7 +14494,7 @@ var _sfc_main$33 = {
|
|
|
14417
14494
|
comment: props.comment,
|
|
14418
14495
|
"is-pending-input": true
|
|
14419
14496
|
}, null, 8, ["config", "comment"]),
|
|
14420
|
-
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$
|
|
14497
|
+
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$16, [require__plugin_vue_export_helper.createVNode(CommentInput_default, {
|
|
14421
14498
|
ref_key: "commentInput",
|
|
14422
14499
|
ref: commentInput,
|
|
14423
14500
|
users: usersFiltered.value,
|
|
@@ -14429,26 +14506,28 @@ var _sfc_main$33 = {
|
|
|
14429
14506
|
"config",
|
|
14430
14507
|
"comment"
|
|
14431
14508
|
])]),
|
|
14432
|
-
require__plugin_vue_export_helper.
|
|
14509
|
+
commentSaveFailure.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("p", _hoisted_4$11, require__plugin_vue_export_helper.toDisplayString(commentSaveFailure.value), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
14510
|
+
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_5$8, [require__plugin_vue_export_helper.createElementVNode("button", {
|
|
14433
14511
|
class: "sd-button reply-btn-cancel",
|
|
14434
14512
|
onClick: require__plugin_vue_export_helper.withModifiers(handleCancel, ["stop", "prevent"])
|
|
14435
14513
|
}, "Cancel"), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
14436
14514
|
class: require__plugin_vue_export_helper.normalizeClass(["sd-button primary reply-btn-primary", { "sd-is-disabled": !hasTextContent.value || isSubmittingNewComment.value }]),
|
|
14437
14515
|
onClick: require__plugin_vue_export_helper.withModifiers(handleAddComment, ["stop", "prevent"]),
|
|
14438
14516
|
disabled: !hasTextContent.value || isSubmittingNewComment.value
|
|
14439
|
-
}, " Comment ", 10,
|
|
14517
|
+
}, " Comment ", 10, _hoisted_6$6)])
|
|
14440
14518
|
], 64)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 1 }, [
|
|
14441
|
-
resolvedBadgeLabel.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
14519
|
+
resolvedBadgeLabel.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_7$4, [require__plugin_vue_export_helper.createElementVNode("span", {
|
|
14442
14520
|
class: "resolved-badge__icon",
|
|
14443
14521
|
innerHTML: require__plugin_vue_export_helper.unref(superdocIcons).markDone
|
|
14444
|
-
}, null, 8,
|
|
14445
|
-
shouldShowInternalExternal.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
14522
|
+
}, null, 8, _hoisted_8$4), require__plugin_vue_export_helper.createTextVNode(" " + require__plugin_vue_export_helper.toDisplayString(resolvedBadgeLabel.value), 1)])) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
14523
|
+
shouldShowInternalExternal.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_9$3, [require__plugin_vue_export_helper.createVNode(InternalDropdown_default, {
|
|
14446
14524
|
onClick: _cache[1] || (_cache[1] = require__plugin_vue_export_helper.withModifiers(() => {}, ["stop", "prevent"])),
|
|
14447
14525
|
class: "sd-internal-dropdown",
|
|
14448
14526
|
"is-disabled": isInternalDropdownDisabled.value,
|
|
14449
14527
|
state: __props.comment.isInternal ? "internal" : "external",
|
|
14450
14528
|
onSelect: handleInternalExternalSelect
|
|
14451
14529
|
}, null, 8, ["is-disabled", "state"])])) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
14530
|
+
commentSaveFailure.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("p", _hoisted_10$3, require__plugin_vue_export_helper.toDisplayString(commentSaveFailure.value), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
14452
14531
|
(require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, null, require__plugin_vue_export_helper.renderList(visibleComments.value, (comment, index) => {
|
|
14453
14532
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
14454
14533
|
key: comment.commentId,
|
|
@@ -14480,27 +14559,27 @@ var _sfc_main$33 = {
|
|
|
14480
14559
|
"write-disabled-reason",
|
|
14481
14560
|
"onOverflowSelect"
|
|
14482
14561
|
]),
|
|
14483
|
-
comment.trackedChange ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
14562
|
+
comment.trackedChange ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_11$3, [
|
|
14484
14563
|
require__plugin_vue_export_helper.createElementVNode("div", {
|
|
14485
14564
|
class: require__plugin_vue_export_helper.normalizeClass(["tracked-change", index === 0 ? bodyOverflowClass.value : void 0]),
|
|
14486
14565
|
"data-track-change-semantic-color-key": comment.semanticColorKey ?? void 0,
|
|
14487
14566
|
ref_for: true,
|
|
14488
14567
|
ref: index === 0 ? setParentBodyRef : void 0
|
|
14489
|
-
}, [comment.trackedChangeLabel ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
14568
|
+
}, [comment.trackedChangeLabel ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_13$2, [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_14$2, require__plugin_vue_export_helper.toDisplayString(comment.trackedChangeLabel), 1), comment.trackedChangeDetailLines && comment.trackedChangeDetailLines.length ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_15$2, [(require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, null, require__plugin_vue_export_helper.renderList(comment.trackedChangeDetailLines, (line, lineIndex) => {
|
|
14490
14569
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
14491
14570
|
key: lineIndex,
|
|
14492
14571
|
class: "tracked-change-detail-line"
|
|
14493
14572
|
}, [
|
|
14494
|
-
line.excerpt ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span",
|
|
14495
|
-
line.excerpt ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span",
|
|
14496
|
-
require__plugin_vue_export_helper.createElementVNode("span",
|
|
14573
|
+
line.excerpt ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_16$2, "\"" + require__plugin_vue_export_helper.toDisplayString(line.excerpt) + "\"", 1)) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
14574
|
+
line.excerpt ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_17$2, " — ")) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
14575
|
+
require__plugin_vue_export_helper.createElementVNode("span", _hoisted_18$2, require__plugin_vue_export_helper.toDisplayString(line.label), 1)
|
|
14497
14576
|
]);
|
|
14498
|
-
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)])) : comment.trackedChangeDisplayType === "hyperlinkAdded" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
14577
|
+
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)])) : comment.trackedChangeDisplayType === "hyperlinkAdded" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_19$1, [_cache[2] || (_cache[2] = require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Added hyperlink ", -1)), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_20$1, "\"" + require__plugin_vue_export_helper.toDisplayString(comment.trackedChangeText) + "\"", 1)])) : comment.trackedChangeDisplayType === "hyperlinkModified" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_21$1, [_cache[3] || (_cache[3] = require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Changed hyperlink to ", -1)), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_22$1, "\"" + require__plugin_vue_export_helper.toDisplayString(comment.trackedChangeText) + "\"", 1)])) : comment.trackedChangeDisplayType === "paragraphSplit" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_23$1, [..._cache[4] || (_cache[4] = [require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Added new line", -1)])])) : comment.trackedChangeDisplayType === "tableInsert" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_24, [..._cache[5] || (_cache[5] = [require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Added table", -1)])])) : comment.trackedChangeDisplayType === "tableDelete" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_25, [..._cache[6] || (_cache[6] = [require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Deleted table", -1)])])) : comment.trackedChangeType === "trackFormat" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_26, [_cache[7] || (_cache[7] = require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Format: ", -1)), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_27, require__plugin_vue_export_helper.toDisplayString(comment.trackedChangeText), 1)])) : comment.trackedChangeType === "both" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_28, [
|
|
14499
14578
|
_cache[8] || (_cache[8] = require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Replaced ", -1)),
|
|
14500
|
-
require__plugin_vue_export_helper.createElementVNode("span",
|
|
14579
|
+
require__plugin_vue_export_helper.createElementVNode("span", _hoisted_29, "\"" + require__plugin_vue_export_helper.toDisplayString(comment.deletedText) + "\"", 1),
|
|
14501
14580
|
_cache[9] || (_cache[9] = require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, " with ", -1)),
|
|
14502
|
-
require__plugin_vue_export_helper.createElementVNode("span",
|
|
14503
|
-
])) : comment.deletedText && comment.deletedText === "\n" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
14581
|
+
require__plugin_vue_export_helper.createElementVNode("span", _hoisted_30, "\"" + require__plugin_vue_export_helper.toDisplayString(comment.trackedChangeText) + "\"", 1)
|
|
14582
|
+
])) : comment.deletedText && comment.deletedText === "\n" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_31, [..._cache[10] || (_cache[10] = [require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Deleted line break", -1)])])) : comment.trackedChangeText && comment.trackedChangeText === "\n" ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_32, [..._cache[11] || (_cache[11] = [require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Added line break", -1)])])) : comment.deletedText ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_33, [_cache[12] || (_cache[12] = require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Deleted ", -1)), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_34, "\"" + require__plugin_vue_export_helper.toDisplayString(comment.deletedText) + "\"", 1)])) : comment.trackedChangeText ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_35, [_cache[13] || (_cache[13] = require__plugin_vue_export_helper.createElementVNode("span", { class: "change-type" }, "Added ", -1)), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_36, "\"" + require__plugin_vue_export_helper.toDisplayString(comment.trackedChangeText) + "\"", 1)])) : require__plugin_vue_export_helper.createCommentVNode("", true), comment.trackedChangeImagePreview?.src ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
14504
14583
|
key: 12,
|
|
14505
14584
|
class: "tracked-change-image-preview",
|
|
14506
14585
|
"data-track-change-image-preview-role": comment.trackedChangeImagePreview.role ?? void 0
|
|
@@ -14511,7 +14590,7 @@ var _sfc_main$33 = {
|
|
|
14511
14590
|
style: require__plugin_vue_export_helper.normalizeStyle(trackedChangeImagePreviewStyle(comment.trackedChangeImagePreview)),
|
|
14512
14591
|
loading: "lazy",
|
|
14513
14592
|
decoding: "async"
|
|
14514
|
-
}, null, 12,
|
|
14593
|
+
}, null, 12, _hoisted_38)], 8, _hoisted_37)) : require__plugin_vue_export_helper.createCommentVNode("", true)], 10, _hoisted_12$2),
|
|
14515
14594
|
shouldTruncate.value && isTextOverflowing.value && index === 0 ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
14516
14595
|
key: 0,
|
|
14517
14596
|
class: "show-more-toggle",
|
|
@@ -14523,29 +14602,29 @@ var _sfc_main$33 = {
|
|
|
14523
14602
|
onClick: require__plugin_vue_export_helper.withModifiers(toggleTruncation, ["stop", "prevent"])
|
|
14524
14603
|
}, " Show less ")) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
14525
14604
|
])) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
14526
|
-
!comment.trackedChange ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
14605
|
+
!comment.trackedChange ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_39, [
|
|
14527
14606
|
!require__plugin_vue_export_helper.unref(isDebugging) && !isEditingThisComment.value(comment) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
14528
14607
|
key: 0,
|
|
14529
14608
|
class: require__plugin_vue_export_helper.normalizeClass(["comment", index === 0 ? bodyOverflowClass.value : void 0]),
|
|
14530
14609
|
ref_for: true,
|
|
14531
14610
|
ref: index === 0 ? setParentBodyRef : void 0,
|
|
14532
14611
|
innerHTML: renderedCommentTexts.value.get(comment.commentId)
|
|
14533
|
-
}, null, 10,
|
|
14612
|
+
}, null, 10, _hoisted_40)) : require__plugin_vue_export_helper.unref(isDebugging) && !isEditingThisComment.value(comment) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_41, require__plugin_vue_export_helper.toDisplayString(require__plugin_vue_export_helper.unref(editorCommentPositions)[comment.importedId !== void 0 ? comment.importedId : comment.commentId]?.bounds), 1)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_42, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_43, [require__plugin_vue_export_helper.createVNode(CommentInput_default, {
|
|
14534
14613
|
ref_for: true,
|
|
14535
14614
|
ref: setEditCommentInputRef(comment.commentId),
|
|
14536
14615
|
users: [],
|
|
14537
14616
|
config: require__plugin_vue_export_helper.unref(getConfig),
|
|
14538
14617
|
"include-header": false,
|
|
14539
14618
|
comment
|
|
14540
|
-
}, null, 8, ["config", "comment"])]), require__plugin_vue_export_helper.createElementVNode("div",
|
|
14619
|
+
}, null, 8, ["config", "comment"])]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_44, [require__plugin_vue_export_helper.createElementVNode("button", {
|
|
14541
14620
|
class: "sd-button reply-btn-cancel",
|
|
14542
14621
|
onClick: require__plugin_vue_export_helper.withModifiers(($event) => handleCancel(comment), ["stop", "prevent"])
|
|
14543
|
-
}, "Cancel", 8,
|
|
14622
|
+
}, "Cancel", 8, _hoisted_45), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
14544
14623
|
class: require__plugin_vue_export_helper.normalizeClass(["sd-button primary reply-btn-primary", { "sd-is-disabled": !hasTextContent.value || isV2WriteDisabled.value }]),
|
|
14545
14624
|
onClick: require__plugin_vue_export_helper.withModifiers(($event) => handleCommentUpdate(comment), ["stop", "prevent"]),
|
|
14546
14625
|
disabled: !hasTextContent.value || isV2WriteDisabled.value,
|
|
14547
14626
|
"data-disabled-reason": isV2WriteDisabled.value ? v2WriteCapability.value?.reason ?? null : null
|
|
14548
|
-
}, " Update ", 10,
|
|
14627
|
+
}, " Update ", 10, _hoisted_46)])])),
|
|
14549
14628
|
shouldTruncate.value && isTextOverflowing.value && index === 0 && !isEditingThisComment.value(comment) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
14550
14629
|
key: 3,
|
|
14551
14630
|
class: "show-more-toggle",
|
|
@@ -14560,29 +14639,29 @@ var _sfc_main$33 = {
|
|
|
14560
14639
|
shouldCollapseThread.value && index === 0 ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 2 }, [_cache[14] || (_cache[14] = require__plugin_vue_export_helper.createElementVNode("div", { class: "comment-separator" }, null, -1)), require__plugin_vue_export_helper.createElementVNode("div", {
|
|
14561
14640
|
class: "collapsed-replies",
|
|
14562
14641
|
onClick: require__plugin_vue_export_helper.withModifiers(expandThread, ["stop", "prevent"])
|
|
14563
|
-
}, [require__plugin_vue_export_helper.createElementVNode("div",
|
|
14642
|
+
}, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_47, [(require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, null, require__plugin_vue_export_helper.renderList(collapsedReplyAuthors.value, (author) => {
|
|
14564
14643
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(Avatar_default, {
|
|
14565
14644
|
key: author.email || author.name,
|
|
14566
14645
|
user: author,
|
|
14567
14646
|
class: "mini-avatar"
|
|
14568
14647
|
}, null, 8, ["user"]);
|
|
14569
14648
|
}), 128))]), require__plugin_vue_export_helper.createElementVNode("span", null, require__plugin_vue_export_helper.toDisplayString(collapsedReplyCount.value) + " more " + require__plugin_vue_export_helper.toDisplayString(collapsedReplyCount.value === 1 ? "reply" : "replies"), 1)])], 64)) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
14570
|
-
showSeparator.value(index) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
14649
|
+
showSeparator.value(index) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_48)) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
14571
14650
|
]);
|
|
14572
14651
|
}), 128)),
|
|
14573
|
-
trackedChangeDecisionFailure.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
14652
|
+
trackedChangeDecisionFailure.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_49, [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_50, require__plugin_vue_export_helper.toDisplayString(trackedChangeDecisionFailureMessage.value), 1), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
14574
14653
|
type: "button",
|
|
14575
14654
|
class: "sd-button tracked-change-decision-alert__retry",
|
|
14576
14655
|
onClick: require__plugin_vue_export_helper.withModifiers(retryTrackedChangeDecision, ["stop", "prevent"])
|
|
14577
14656
|
}, " Retry ")])) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
14578
|
-
showInputSection.value && !require__plugin_vue_export_helper.unref(getConfig).readOnly ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key:
|
|
14657
|
+
showInputSection.value && !require__plugin_vue_export_helper.unref(getConfig).readOnly ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 4 }, [!isReplying.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("button", {
|
|
14579
14658
|
key: 0,
|
|
14580
14659
|
type: "button",
|
|
14581
14660
|
class: require__plugin_vue_export_helper.normalizeClass(["reply-pill", { "sd-is-disabled": isV2WriteDisabled.value }]),
|
|
14582
14661
|
onClick: require__plugin_vue_export_helper.withModifiers(startReply, ["stop", "prevent"]),
|
|
14583
14662
|
disabled: isV2WriteDisabled.value,
|
|
14584
14663
|
"data-disabled-reason": isV2WriteDisabled.value ? v2WriteCapability.value?.reason ?? null : null
|
|
14585
|
-
}, " Reply or add others with @ ", 10,
|
|
14664
|
+
}, " Reply or add others with @ ", 10, _hoisted_51)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_52, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_53, [require__plugin_vue_export_helper.createVNode(CommentInput_default, {
|
|
14586
14665
|
ref_key: "commentInput",
|
|
14587
14666
|
ref: commentInput,
|
|
14588
14667
|
users: usersFiltered.value,
|
|
@@ -14593,7 +14672,7 @@ var _sfc_main$33 = {
|
|
|
14593
14672
|
"users",
|
|
14594
14673
|
"config",
|
|
14595
14674
|
"comment"
|
|
14596
|
-
])]), require__plugin_vue_export_helper.createElementVNode("div",
|
|
14675
|
+
])]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_54, [require__plugin_vue_export_helper.createElementVNode("button", {
|
|
14597
14676
|
class: "sd-button reply-btn-cancel",
|
|
14598
14677
|
onClick: require__plugin_vue_export_helper.withModifiers(handleCancel, ["stop", "prevent"])
|
|
14599
14678
|
}, "Cancel"), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
@@ -14601,12 +14680,12 @@ var _sfc_main$33 = {
|
|
|
14601
14680
|
onClick: require__plugin_vue_export_helper.withModifiers(handleAddComment, ["stop", "prevent"]),
|
|
14602
14681
|
disabled: !hasTextContent.value || isV2WriteDisabled.value || isSubmittingReply.value,
|
|
14603
14682
|
"data-disabled-reason": v2ReplyDisabledReason.value
|
|
14604
|
-
}, " Reply ", 10,
|
|
14683
|
+
}, " Reply ", 10, _hoisted_55)])]))], 64)) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
14605
14684
|
], 64))], 14, _hoisted_1$26)), [[_directive_click_outside, handleClickOutside]]);
|
|
14606
14685
|
};
|
|
14607
14686
|
}
|
|
14608
14687
|
};
|
|
14609
|
-
var CommentDialog_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$33, [["__scopeId", "data-v-
|
|
14688
|
+
var CommentDialog_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$33, [["__scopeId", "data-v-f8b79c74"]]);
|
|
14610
14689
|
//#endregion
|
|
14611
14690
|
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
14612
14691
|
var _hoisted_1$25 = [
|
|
@@ -14756,7 +14835,7 @@ var ReviewDirectoryListItem_default = /*#__PURE__*/ require__plugin_vue_export_h
|
|
|
14756
14835
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
14757
14836
|
var _hoisted_1$24 = ["aria-busy"];
|
|
14758
14837
|
var _hoisted_2$18 = { key: 0 };
|
|
14759
|
-
var _hoisted_3$
|
|
14838
|
+
var _hoisted_3$15 = { key: 1 };
|
|
14760
14839
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
14761
14840
|
var _sfc_main$31 = {
|
|
14762
14841
|
__name: "commentsList",
|
|
@@ -14900,7 +14979,7 @@ var _sfc_main$31 = {
|
|
|
14900
14979
|
"total",
|
|
14901
14980
|
"tab-index"
|
|
14902
14981
|
]);
|
|
14903
|
-
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true), shouldShowResolvedComments.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_3$
|
|
14982
|
+
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true), shouldShowResolvedComments.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_3$15, [_cache[2] || (_cache[2] = require__plugin_vue_export_helper.createElementVNode("div", { class: "comment-title" }, "Resolved", -1)), (require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, null, require__plugin_vue_export_helper.renderList(resolvedCommentDisplayItems.value, (item, index) => {
|
|
14904
14983
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(ReviewDirectoryListItem_default, {
|
|
14905
14984
|
key: item.id,
|
|
14906
14985
|
item,
|
|
@@ -15331,6 +15410,80 @@ var composeAuthorColorResolver = (config) => {
|
|
|
15331
15410
|
};
|
|
15332
15411
|
};
|
|
15333
15412
|
//#endregion
|
|
15413
|
+
//#region ../document-api/src/errors.ts
|
|
15414
|
+
/**
|
|
15415
|
+
* Structured validation error thrown by document-api execute* functions.
|
|
15416
|
+
*
|
|
15417
|
+
* Consumers should prefer checking `error.code` over `instanceof` for resilience
|
|
15418
|
+
* across package boundaries and bundling scenarios.
|
|
15419
|
+
*/
|
|
15420
|
+
var DocumentApiValidationError = class DocumentApiValidationError extends Error {
|
|
15421
|
+
constructor(code, message, details) {
|
|
15422
|
+
super(message);
|
|
15423
|
+
this.name = "DocumentApiValidationError";
|
|
15424
|
+
this.code = code;
|
|
15425
|
+
this.details = details;
|
|
15426
|
+
Object.setPrototypeOf(this, DocumentApiValidationError.prototype);
|
|
15427
|
+
}
|
|
15428
|
+
};
|
|
15429
|
+
//#endregion
|
|
15430
|
+
//#region ../document-api/src/export/export.types.ts
|
|
15431
|
+
/** Canonical tracked-change export modes accepted by every public export surface. */
|
|
15432
|
+
var SD_EXPORT_MODES = [
|
|
15433
|
+
"review-preserving",
|
|
15434
|
+
"final",
|
|
15435
|
+
"original"
|
|
15436
|
+
];
|
|
15437
|
+
/** Default mode for modeful DOCX export. */
|
|
15438
|
+
var DEFAULT_SD_EXPORT_MODE = "review-preserving";
|
|
15439
|
+
var SD_COMMENT_EXPORT_POLICIES = [
|
|
15440
|
+
"preserve",
|
|
15441
|
+
"resolve",
|
|
15442
|
+
"remove"
|
|
15443
|
+
];
|
|
15444
|
+
var SD_CONTENT_CONTROL_EXPORT_POLICIES = ["preserve", "flatten"];
|
|
15445
|
+
//#endregion
|
|
15446
|
+
//#region ../document-api/src/export/export.ts
|
|
15447
|
+
/**
|
|
15448
|
+
* Export namespace: engine-agnostic public API and adapter contract.
|
|
15449
|
+
*
|
|
15450
|
+
* Validates the requested mode at the public boundary so an invalid mode fails
|
|
15451
|
+
* closed with `INVALID_INPUT` before any document work happens, then delegates
|
|
15452
|
+
* byte production and degradation reporting to the engine adapter.
|
|
15453
|
+
*/
|
|
15454
|
+
function resolveMode$1(input) {
|
|
15455
|
+
if (input != null && !require_create_super_doc_ui.isRecord(input)) throw new DocumentApiValidationError("INVALID_INPUT", "export.toDocx input must be an object.");
|
|
15456
|
+
const raw = input?.mode;
|
|
15457
|
+
if (raw === void 0) return DEFAULT_SD_EXPORT_MODE;
|
|
15458
|
+
if (typeof raw !== "string" || !SD_EXPORT_MODES.includes(raw)) throw new DocumentApiValidationError("INVALID_INPUT", `export.toDocx mode must be one of: ${SD_EXPORT_MODES.join(", ")}.`, {
|
|
15459
|
+
mode: raw,
|
|
15460
|
+
allowedModes: [...SD_EXPORT_MODES]
|
|
15461
|
+
});
|
|
15462
|
+
return raw;
|
|
15463
|
+
}
|
|
15464
|
+
function resolveDocxExportPolicies(input = {}) {
|
|
15465
|
+
if (!require_create_super_doc_ui.isRecord(input)) throw new DocumentApiValidationError("INVALID_INPUT", "DOCX export input must be an object.");
|
|
15466
|
+
const mode = resolveMode$1(input);
|
|
15467
|
+
const policies = input.policies;
|
|
15468
|
+
if (policies !== void 0 && !require_create_super_doc_ui.isRecord(policies)) throw new DocumentApiValidationError("INVALID_INPUT", "DOCX export policies must be an object.");
|
|
15469
|
+
const allowed = {
|
|
15470
|
+
trackedChanges: SD_EXPORT_MODES,
|
|
15471
|
+
comments: SD_COMMENT_EXPORT_POLICIES,
|
|
15472
|
+
contentControls: SD_CONTENT_CONTROL_EXPORT_POLICIES
|
|
15473
|
+
};
|
|
15474
|
+
for (const [key, value] of Object.entries(policies ?? {})) if (!Object.prototype.hasOwnProperty.call(allowed, key) || value !== void 0 && !allowed[key].includes(value)) throw new DocumentApiValidationError("INVALID_INPUT", `Unsupported DOCX export policy: ${key}.`, {
|
|
15475
|
+
policy: key,
|
|
15476
|
+
value
|
|
15477
|
+
});
|
|
15478
|
+
const requested = policies;
|
|
15479
|
+
if (input.mode !== void 0 && requested?.trackedChanges !== void 0 && mode !== requested.trackedChanges) throw new DocumentApiValidationError("INVALID_INPUT", "mode conflicts with policies.trackedChanges.");
|
|
15480
|
+
return {
|
|
15481
|
+
trackedChanges: requested?.trackedChanges ?? mode,
|
|
15482
|
+
comments: requested?.comments ?? "preserve",
|
|
15483
|
+
contentControls: requested?.contentControls ?? "preserve"
|
|
15484
|
+
};
|
|
15485
|
+
}
|
|
15486
|
+
//#endregion
|
|
15334
15487
|
//#region ../document-api/src/permission-ranges/permission-ranges.ts
|
|
15335
15488
|
function editorKey(editor) {
|
|
15336
15489
|
return editor.id?.trim() ? editor.id : editor.email?.trim() || void 0;
|
|
@@ -19026,11 +19179,11 @@ var _hoisted_2$16 = {
|
|
|
19026
19179
|
key: 1,
|
|
19027
19180
|
class: "link-title"
|
|
19028
19181
|
};
|
|
19029
|
-
var _hoisted_3$
|
|
19182
|
+
var _hoisted_3$14 = {
|
|
19030
19183
|
key: 2,
|
|
19031
19184
|
class: "link-title"
|
|
19032
19185
|
};
|
|
19033
|
-
var _hoisted_4$
|
|
19186
|
+
var _hoisted_4$10 = {
|
|
19034
19187
|
key: 3,
|
|
19035
19188
|
class: "link-title"
|
|
19036
19189
|
};
|
|
@@ -19289,7 +19442,7 @@ var _sfc_main$26 = {
|
|
|
19289
19442
|
};
|
|
19290
19443
|
return (_ctx, _cache) => {
|
|
19291
19444
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", { class: require__plugin_vue_export_helper.normalizeClass(["link-input-ctn", { "high-contrast": require__plugin_vue_export_helper.unref(isHighContrastMode) }]) }, [
|
|
19292
|
-
isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$20, "Page anchor")) : isViewingMode.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_2$16, "Link details")) : isEditing.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_3$
|
|
19445
|
+
isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$20, "Page anchor")) : isViewingMode.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_2$16, "Link details")) : isEditing.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_3$14, "Edit link")) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_4$10, "Add link")),
|
|
19293
19446
|
__props.showInput && !isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_5$7, [
|
|
19294
19447
|
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_6$5, [_cache[5] || (_cache[5] = require__plugin_vue_export_helper.createElementVNode("div", { class: "input-icon text-input-icon" }, "T", -1)), require__plugin_vue_export_helper.withDirectives(require__plugin_vue_export_helper.createElementVNode("input", {
|
|
19295
19448
|
type: "text",
|
|
@@ -20090,6 +20243,28 @@ function useLinkPopover({ getSurfaceManager, getActiveEditor, getUi, getActivati
|
|
|
20090
20243
|
};
|
|
20091
20244
|
}
|
|
20092
20245
|
//#endregion
|
|
20246
|
+
//#region src/core/helpers/resolve-docx-export.ts
|
|
20247
|
+
function resolveV2DocxExportOptions(options = {}) {
|
|
20248
|
+
const policies = resolveDocxExportPolicies({ policies: options.policies });
|
|
20249
|
+
if (options.isFinalDoc !== void 0) {
|
|
20250
|
+
if (typeof options.isFinalDoc !== "boolean") throw new DocumentApiValidationError("INVALID_INPUT", "isFinalDoc must be a boolean.");
|
|
20251
|
+
const legacy = options.isFinalDoc ? "final" : "review-preserving";
|
|
20252
|
+
if (options.policies?.trackedChanges !== void 0 && policies.trackedChanges !== legacy) throw new DocumentApiValidationError("INVALID_INPUT", "isFinalDoc conflicts with policies.trackedChanges.");
|
|
20253
|
+
policies.trackedChanges = legacy;
|
|
20254
|
+
}
|
|
20255
|
+
if (options.commentsType !== void 0) {
|
|
20256
|
+
if (options.commentsType !== "external" && options.commentsType !== "clean") throw new DocumentApiValidationError("INVALID_INPUT", "commentsType must be external or clean.");
|
|
20257
|
+
const legacy = options.commentsType === "clean" ? "remove" : "preserve";
|
|
20258
|
+
if (options.policies?.comments !== void 0 && policies.comments !== legacy) throw new DocumentApiValidationError("INVALID_INPUT", "commentsType conflicts with policies.comments.");
|
|
20259
|
+
policies.comments = legacy;
|
|
20260
|
+
}
|
|
20261
|
+
return {
|
|
20262
|
+
mode: policies.trackedChanges,
|
|
20263
|
+
commentExportMode: policies.comments === "remove" ? "strip" : policies.comments,
|
|
20264
|
+
contentControlExportMode: policies.contentControls
|
|
20265
|
+
};
|
|
20266
|
+
}
|
|
20267
|
+
//#endregion
|
|
20093
20268
|
//#region src/core/editor-runtime/v2/v2-editor-runtime-adapter.ts
|
|
20094
20269
|
var DEFAULT_V2_LEGACY_PROJECTION = Object.freeze({
|
|
20095
20270
|
editorVersion: 2,
|
|
@@ -20729,7 +20904,7 @@ function createV2EditorRuntimeAdapter(options) {
|
|
|
20729
20904
|
save: () => host.save(),
|
|
20730
20905
|
exportDocx: (options) => host.save({
|
|
20731
20906
|
format: "docx",
|
|
20732
|
-
|
|
20907
|
+
...resolveV2DocxExportOptions(options)
|
|
20733
20908
|
}),
|
|
20734
20909
|
async setZoom(percent) {
|
|
20735
20910
|
const result = host.setZoom(percent);
|
|
@@ -21390,7 +21565,7 @@ var FOCUSABLE_SELECTOR = [
|
|
|
21390
21565
|
//#region src/components/surfaces/SurfaceDialog.vue
|
|
21391
21566
|
var _hoisted_1$19 = ["aria-labelledby", "aria-label"];
|
|
21392
21567
|
var _hoisted_2$15 = ["id"];
|
|
21393
|
-
var _hoisted_3$
|
|
21568
|
+
var _hoisted_3$13 = { class: "sd-surface-dialog__content" };
|
|
21394
21569
|
var _sfc_main$24 = {
|
|
21395
21570
|
__name: "SurfaceDialog",
|
|
21396
21571
|
props: {
|
|
@@ -21522,7 +21697,7 @@ var _sfc_main$24 = {
|
|
|
21522
21697
|
key: 0,
|
|
21523
21698
|
id: titleId.value,
|
|
21524
21699
|
class: "sd-surface-dialog__title"
|
|
21525
|
-
}, require__plugin_vue_export_helper.toDisplayString(__props.surface.request.title), 9, _hoisted_2$15)) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$
|
|
21700
|
+
}, require__plugin_vue_export_helper.toDisplayString(__props.surface.request.title), 9, _hoisted_2$15)) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$13, [__props.surface.render ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(SurfaceExternalMount_default, {
|
|
21526
21701
|
key: 0,
|
|
21527
21702
|
"surface-id": __props.surface.id,
|
|
21528
21703
|
mode: "dialog",
|
|
@@ -21545,7 +21720,7 @@ var SurfaceDialog_default = /*#__PURE__*/ require__plugin_vue_export_helper._plu
|
|
|
21545
21720
|
//#region src/components/surfaces/SurfaceFloating.vue
|
|
21546
21721
|
var _hoisted_1$18 = ["aria-labelledby", "aria-label"];
|
|
21547
21722
|
var _hoisted_2$14 = ["id"];
|
|
21548
|
-
var _hoisted_3$
|
|
21723
|
+
var _hoisted_3$12 = { class: "sd-surface-floating__content" };
|
|
21549
21724
|
var _sfc_main$23 = {
|
|
21550
21725
|
__name: "SurfaceFloating",
|
|
21551
21726
|
props: { surface: {
|
|
@@ -21677,7 +21852,7 @@ var _sfc_main$23 = {
|
|
|
21677
21852
|
key: 0,
|
|
21678
21853
|
id: titleId.value,
|
|
21679
21854
|
class: "sd-surface-floating__title"
|
|
21680
|
-
}, require__plugin_vue_export_helper.toDisplayString(__props.surface.request.title), 9, _hoisted_2$14)) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$
|
|
21855
|
+
}, require__plugin_vue_export_helper.toDisplayString(__props.surface.request.title), 9, _hoisted_2$14)) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$12, [__props.surface.render ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(SurfaceExternalMount_default, {
|
|
21681
21856
|
key: 0,
|
|
21682
21857
|
"surface-id": __props.surface.id,
|
|
21683
21858
|
mode: "floating",
|
|
@@ -21925,8 +22100,8 @@ var SurfaceHost_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugi
|
|
|
21925
22100
|
//#region src/SuperDoc.vue
|
|
21926
22101
|
var _hoisted_1$17 = ["data-superdoc-ui-owner"];
|
|
21927
22102
|
var _hoisted_2$13 = ["innerHTML"];
|
|
21928
|
-
var _hoisted_3$
|
|
21929
|
-
var _hoisted_4$
|
|
22103
|
+
var _hoisted_3$11 = { class: "superdoc__document document" };
|
|
22104
|
+
var _hoisted_4$9 = { class: "floating-comments" };
|
|
21930
22105
|
var TRACKED_CHANGE_CARRIERS_RESTAMPED_EVENT = "superdoc:v2-tracked-change-carriers-restamped";
|
|
21931
22106
|
var UNAVAILABLE_COMMAND_RESULT = false;
|
|
21932
22107
|
var V2_SELECTION_TOOLBAR_SYNC_RETRY_FRAMES = 3;
|
|
@@ -21984,7 +22159,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21984
22159
|
const { proxy } = require__plugin_vue_export_helper.getCurrentInstance();
|
|
21985
22160
|
commentsStore.proxy = proxy;
|
|
21986
22161
|
const documentOpenTelemetry = createDocumentOpenTelemetry(proxy.$superdoc.config);
|
|
21987
|
-
const resolvedEditorIntegration =
|
|
22162
|
+
const resolvedEditorIntegration = createDefaultV2Integration();
|
|
21988
22163
|
const V2DocumentEditor = require__plugin_vue_export_helper.markRaw(resolvedEditorIntegration.EditorComponent);
|
|
21989
22164
|
const V2Ruler = resolvedEditorIntegration.RulerComponent ? require__plugin_vue_export_helper.markRaw(resolvedEditorIntegration.RulerComponent) : null;
|
|
21990
22165
|
const floatingComments = require__plugin_vue_export_helper.computed(() => {
|
|
@@ -22130,6 +22305,10 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22130
22305
|
return layers.value.getBoundingClientRect().top + top * zoom;
|
|
22131
22306
|
};
|
|
22132
22307
|
const handleCommentToolClick = async () => {
|
|
22308
|
+
if (isV2Mode.value) {
|
|
22309
|
+
cancelScheduledV2DomSelectionSync();
|
|
22310
|
+
if (applyCurrentV2DomSelection()?.ok === false) return;
|
|
22311
|
+
}
|
|
22133
22312
|
if ((await showAddComment(proxy.$superdoc, getPendingCommentTargetClientY()))?.ok === false) return;
|
|
22134
22313
|
if (!isV2Mode.value) return;
|
|
22135
22314
|
const pendingPosition = buildV2PendingPositionEntry();
|
|
@@ -22402,10 +22581,9 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22402
22581
|
return host.save(saveOptions);
|
|
22403
22582
|
});
|
|
22404
22583
|
const exportV2Docx = async (options = {}) => {
|
|
22405
|
-
const commentExportMode = options?.commentsType === "clean" ? "strip" : "preserve";
|
|
22406
22584
|
const bytes = await saveV2Bytes({
|
|
22407
22585
|
format: "docx",
|
|
22408
|
-
|
|
22586
|
+
...resolveV2DocxExportOptions(options)
|
|
22409
22587
|
});
|
|
22410
22588
|
return new Blob([bytes], { type: DOCX });
|
|
22411
22589
|
};
|
|
@@ -22680,6 +22858,9 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22680
22858
|
subscribe: (listener) => v2ReviewWindowController.subscribe?.(listener) ?? (() => void 0)
|
|
22681
22859
|
},
|
|
22682
22860
|
extensions: createV2ExtensionsFacet(host),
|
|
22861
|
+
get visuals() {
|
|
22862
|
+
return typeof host?.getHostVisuals === "function" ? host.getHostVisuals() : null;
|
|
22863
|
+
},
|
|
22683
22864
|
fonts: fonts ?? host?.getFontRuntime?.() ?? null,
|
|
22684
22865
|
/**
|
|
22685
22866
|
* The v2 active-editor facade explicitly does NOT carry v1 commands /
|
|
@@ -22845,7 +23026,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22845
23026
|
const result = handles?.selection?.applyDomSelection?.(selection);
|
|
22846
23027
|
if (!result?.ok || result.mode !== "range") {
|
|
22847
23028
|
clearV2SelectionToolbarState();
|
|
22848
|
-
return;
|
|
23029
|
+
return { ok: false };
|
|
22849
23030
|
}
|
|
22850
23031
|
v2DomMirroredRange.value = true;
|
|
22851
23032
|
v2HasRangeSelection.value = true;
|
|
@@ -23307,7 +23488,8 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23307
23488
|
return;
|
|
23308
23489
|
}
|
|
23309
23490
|
const collaborationException = createCollaborationException(reason, documentId);
|
|
23310
|
-
const
|
|
23491
|
+
const baseMessage = collaborationException?.error.message ?? getV2EditorFailureMessage(reason);
|
|
23492
|
+
const message = reason === "collaboration-config-invalid" && detail ? `${baseMessage} ${detail}` : baseMessage;
|
|
23311
23493
|
const workerFailure = payload?.workerFailure && typeof payload.workerFailure === "object" ? payload.workerFailure : null;
|
|
23312
23494
|
setV2EditorFailure(documentId, {
|
|
23313
23495
|
reason,
|
|
@@ -23323,7 +23505,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23323
23505
|
};
|
|
23324
23506
|
if (reason === "collaboration-v1-config-unsupported" || reason === "collaboration-room-format-unsupported" || reason === "collaboration-room-format-conflict" || reason === "collaboration-room-corrupt" || reason === "collaboration-v2-room-missing" || reason === "collaboration-v2-room-already-exists" || reason === "collaboration-v2-room-initializing" || reason === "collaboration-v2-room-bootstrap-stalled" || reason === "collaboration-open-intent-invalid" || reason === "collaboration-config-invalid") console.warn(`[SuperDoc] ${message}`, logContext);
|
|
23325
23507
|
else console.error(`[SuperDoc] ${message}`, logContext);
|
|
23326
|
-
proxy.$superdoc.emit("exception", collaborationException
|
|
23508
|
+
proxy.$superdoc.emit("exception", collaborationException && reason !== "collaboration-config-invalid" ? collaborationException : {
|
|
23327
23509
|
error: new Error(message),
|
|
23328
23510
|
code: reason,
|
|
23329
23511
|
...documentId ? { documentId } : {},
|
|
@@ -23497,6 +23679,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23497
23679
|
emitCommentPositionsInViewing: isViewingMode() && shouldRenderCommentsInViewing.value,
|
|
23498
23680
|
enableCommentsInViewing: isViewingCommentsVisible.value,
|
|
23499
23681
|
contentControlsChrome: proxy.$superdoc.uiConfig.contentControls.options.chrome,
|
|
23682
|
+
commentHighlights: proxy.$superdoc.uiConfig.comments.highlights,
|
|
23500
23683
|
resolveTrackedChangeColor: composeAuthorColorResolver(proxy.$superdoc.config.modules?.trackChanges?.authorColors)
|
|
23501
23684
|
} : void 0,
|
|
23502
23685
|
permissionResolver: createTrackedChangePermissionResolver(proxy.$superdoc)
|
|
@@ -24405,7 +24588,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24405
24588
|
}, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
24406
24589
|
class: "superdoc__tools-icon",
|
|
24407
24590
|
innerHTML: require__plugin_vue_export_helper.unref(superdocIcons).comment
|
|
24408
|
-
}, null, 8, _hoisted_2$13)], 32)], 4)) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$
|
|
24591
|
+
}, null, 8, _hoisted_2$13)], 32)], 4)) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$11, [
|
|
24409
24592
|
isCommentsEnabled.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
24410
24593
|
key: 0,
|
|
24411
24594
|
class: "superdoc__selection-layer selection-layer",
|
|
@@ -24533,7 +24716,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24533
24716
|
ref_key: "rightSidebarRef",
|
|
24534
24717
|
ref: rightSidebarRef,
|
|
24535
24718
|
class: "superdoc__right-sidebar right-sidebar"
|
|
24536
|
-
}, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$
|
|
24719
|
+
}, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$9, [require__plugin_vue_export_helper.unref(hasInitializedLocations) && (floatingComments.value.length > 0 || require__plugin_vue_export_helper.unref(pendingComment)) ? (require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 0 }, require__plugin_vue_export_helper.renderList(require__plugin_vue_export_helper.unref(documentsWithConverations), (doc) => {
|
|
24537
24720
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(FloatingComments_default, {
|
|
24538
24721
|
parent: layers.value,
|
|
24539
24722
|
"current-document": doc
|
|
@@ -24551,7 +24734,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24551
24734
|
], 46, _hoisted_1$17);
|
|
24552
24735
|
};
|
|
24553
24736
|
}
|
|
24554
|
-
}, [["__scopeId", "data-v-
|
|
24737
|
+
}, [["__scopeId", "data-v-f2db957f"]]);
|
|
24555
24738
|
//#endregion
|
|
24556
24739
|
//#region src/core/create-app.js
|
|
24557
24740
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -38013,6 +38196,11 @@ var COMMENT_POLICY_FIELDS = Object.freeze([
|
|
|
38013
38196
|
"allowResolve",
|
|
38014
38197
|
"permissionResolver"
|
|
38015
38198
|
]);
|
|
38199
|
+
function withoutSwitches(options) {
|
|
38200
|
+
if (!("panel" in options) && !("highlights" in options)) return options;
|
|
38201
|
+
const { panel: _panel, highlights: _highlights, ...rest } = options;
|
|
38202
|
+
return rest;
|
|
38203
|
+
}
|
|
38016
38204
|
/**
|
|
38017
38205
|
* Drop policy fields from a presentation options bag.
|
|
38018
38206
|
*/
|
|
@@ -38357,8 +38545,9 @@ function normalizeUiConfig(config = {}) {
|
|
|
38357
38545
|
}
|
|
38358
38546
|
},
|
|
38359
38547
|
comments: {
|
|
38360
|
-
enabled: explicit("comments") ?? (!allDisabled && config.modules?.comments !== false),
|
|
38361
|
-
|
|
38548
|
+
enabled: (explicit("comments") ?? (!allDisabled && config.modules?.comments !== false)) && options("comments").panel !== false,
|
|
38549
|
+
highlights: options("comments").highlights !== false,
|
|
38550
|
+
options: allDisabled ? {} : normalizeCommentsUiConfig(withoutCommentPolicy(withoutSwitches(options("comments")))) || {}
|
|
38362
38551
|
},
|
|
38363
38552
|
contextMenu: {
|
|
38364
38553
|
enabled: explicit("contextMenu") ?? (!allDisabled && config.disableContextMenu !== true),
|
|
@@ -39038,8 +39227,8 @@ var _hoisted_1$15 = [
|
|
|
39038
39227
|
"aria-disabled"
|
|
39039
39228
|
];
|
|
39040
39229
|
var _hoisted_2$11 = ["data-item"];
|
|
39041
|
-
var _hoisted_3$
|
|
39042
|
-
var _hoisted_4$
|
|
39230
|
+
var _hoisted_3$10 = ["data-item"];
|
|
39231
|
+
var _hoisted_4$8 = {
|
|
39043
39232
|
key: 1,
|
|
39044
39233
|
class: "sd-button-label"
|
|
39045
39234
|
};
|
|
@@ -39260,7 +39449,7 @@ var _sfc_main$19 = {
|
|
|
39260
39449
|
"color",
|
|
39261
39450
|
"icon",
|
|
39262
39451
|
"name"
|
|
39263
|
-
])) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.unref(label) && !require__plugin_vue_export_helper.unref(hideLabel) && !require__plugin_vue_export_helper.unref(inlineTextInputVisible) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_4$
|
|
39452
|
+
])) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.unref(label) && !require__plugin_vue_export_helper.unref(hideLabel) && !require__plugin_vue_export_helper.unref(inlineTextInputVisible) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_4$8, require__plugin_vue_export_helper.toDisplayString(require__plugin_vue_export_helper.unref(label)), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)], 8, _hoisted_3$10)) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
39264
39453
|
isSplit.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
39265
39454
|
key: 1,
|
|
39266
39455
|
class: "sd-toolbar-button__caret",
|
|
@@ -39364,8 +39553,8 @@ var ToolbarSeparator_default = /*#__PURE__*/ require__plugin_vue_export_helper._
|
|
|
39364
39553
|
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue
|
|
39365
39554
|
var _hoisted_1$13 = { class: "toolbar-dropdown" };
|
|
39366
39555
|
var _hoisted_2$10 = ["data-superdoc-ui-owner"];
|
|
39367
|
-
var _hoisted_3$
|
|
39368
|
-
var _hoisted_4$
|
|
39556
|
+
var _hoisted_3$9 = ["onClick"];
|
|
39557
|
+
var _hoisted_4$7 = {
|
|
39369
39558
|
key: 0,
|
|
39370
39559
|
class: "toolbar-dropdown-option__icon"
|
|
39371
39560
|
};
|
|
@@ -39754,7 +39943,7 @@ var _sfc_main$17 = {
|
|
|
39754
39943
|
}), [isRenderOption(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.unref(RenderOption), {
|
|
39755
39944
|
key: 0,
|
|
39756
39945
|
option
|
|
39757
|
-
}, null, 8, ["option"])) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 1 }, [hasIcon(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_4$
|
|
39946
|
+
}, null, 8, ["option"])) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 1 }, [hasIcon(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_4$7, [require__plugin_vue_export_helper.createVNode(require__plugin_vue_export_helper.unref(OptionIcon), { option }, null, 8, ["option"])])) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$5, require__plugin_vue_export_helper.toDisplayString(option.label), 1)], 64))], 16, _hoisted_3$9);
|
|
39758
39947
|
}), 128))], 16, _hoisted_2$10)) : require__plugin_vue_export_helper.createCommentVNode("", true)]),
|
|
39759
39948
|
_: 3
|
|
39760
39949
|
})], 8, ["to"]))]);
|
|
@@ -39997,12 +40186,12 @@ var _hoisted_2$9 = [
|
|
|
39997
40186
|
"aria-activedescendant",
|
|
39998
40187
|
"data-item"
|
|
39999
40188
|
];
|
|
40000
|
-
var _hoisted_3$
|
|
40189
|
+
var _hoisted_3$8 = [
|
|
40001
40190
|
"data-item",
|
|
40002
40191
|
"aria-label",
|
|
40003
40192
|
"disabled"
|
|
40004
40193
|
];
|
|
40005
|
-
var _hoisted_4$
|
|
40194
|
+
var _hoisted_4$6 = ["innerHTML"];
|
|
40006
40195
|
var _hoisted_5$4 = [
|
|
40007
40196
|
"data-superdoc-ui-owner",
|
|
40008
40197
|
"id",
|
|
@@ -40470,7 +40659,7 @@ var _sfc_main$15 = {
|
|
|
40470
40659
|
}, [require__plugin_vue_export_helper.createElementVNode("span", {
|
|
40471
40660
|
class: "sd-dropdown-caret",
|
|
40472
40661
|
innerHTML: caretIcon.value
|
|
40473
|
-
}, null, 8, _hoisted_4$
|
|
40662
|
+
}, null, 8, _hoisted_4$6)], 40, _hoisted_3$8),
|
|
40474
40663
|
(require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.Teleport, { to: "body" }, [isOpen.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
40475
40664
|
key: 0,
|
|
40476
40665
|
ref_key: "popupRef",
|
|
@@ -40817,8 +41006,8 @@ var _hoisted_1$11 = [
|
|
|
40817
41006
|
"data-item-id"
|
|
40818
41007
|
];
|
|
40819
41008
|
var _hoisted_2$8 = { key: 0 };
|
|
40820
|
-
var _hoisted_3$
|
|
40821
|
-
var _hoisted_4$
|
|
41009
|
+
var _hoisted_3$7 = { key: 0 };
|
|
41010
|
+
var _hoisted_4$5 = { key: 0 };
|
|
40822
41011
|
var _hoisted_5$3 = { key: 0 };
|
|
40823
41012
|
var _hoisted_6$2 = { key: 0 };
|
|
40824
41013
|
var _sfc_main$11 = {
|
|
@@ -41222,7 +41411,7 @@ var _sfc_main$11 = {
|
|
|
41222
41411
|
onTabOut: _cache[1] || (_cache[1] = ($event) => handleFontSizeTabOut($event)),
|
|
41223
41412
|
onEditorHandoff: handleEditorHandoff
|
|
41224
41413
|
}, null, 8, ["item", "ui-font-family"])]),
|
|
41225
|
-
default: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createElementVNode("div", null, [require__plugin_vue_export_helper.createTextVNode(require__plugin_vue_export_helper.toDisplayString(item.tooltip) + " ", 1), item.disabled.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$
|
|
41414
|
+
default: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createElementVNode("div", null, [require__plugin_vue_export_helper.createTextVNode(require__plugin_vue_export_helper.toDisplayString(item.tooltip) + " ", 1), item.disabled.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$7, "(disabled)")) : require__plugin_vue_export_helper.createCommentVNode("", true)])]),
|
|
41226
41415
|
_: 2
|
|
41227
41416
|
}, 1032, ["disabled", "content-style"])) : isDropdown(item) && item.nestedOptions?.value?.length ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(ToolbarDropdown_default, {
|
|
41228
41417
|
key: 3,
|
|
@@ -41259,7 +41448,7 @@ var _sfc_main$11 = {
|
|
|
41259
41448
|
"onTextSubmit",
|
|
41260
41449
|
"onMainClick"
|
|
41261
41450
|
])]),
|
|
41262
|
-
default: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createElementVNode("div", null, [require__plugin_vue_export_helper.createTextVNode(require__plugin_vue_export_helper.toDisplayString(item.tooltip) + " ", 1), item.disabled.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_4$
|
|
41451
|
+
default: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createElementVNode("div", null, [require__plugin_vue_export_helper.createTextVNode(require__plugin_vue_export_helper.toDisplayString(item.tooltip) + " ", 1), item.disabled.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_4$5, "(disabled)")) : require__plugin_vue_export_helper.createCommentVNode("", true)])]),
|
|
41263
41452
|
_: 2
|
|
41264
41453
|
}, 1032, ["disabled", "content-style"])]),
|
|
41265
41454
|
_: 2
|
|
@@ -41492,9 +41681,6 @@ var TABLE_ACTION_COMMAND_MAP = {
|
|
|
41492
41681
|
fixTables: "table-fix"
|
|
41493
41682
|
};
|
|
41494
41683
|
var TABLE_ACTION_COMMAND_IDS = Object.values(TABLE_ACTION_COMMAND_MAP);
|
|
41495
|
-
[.../* @__PURE__ */ new Set([...Object.values(HEADLESS_ITEM_MAP), ...TABLE_ACTION_COMMAND_IDS])];
|
|
41496
|
-
var NON_HEADLESS_EXECUTE_ITEM_NAMES = /* @__PURE__ */ new Set(["link"]);
|
|
41497
|
-
new Set(Object.keys(HEADLESS_ITEM_MAP).filter((itemName) => !NON_HEADLESS_EXECUTE_ITEM_NAMES.has(itemName)));
|
|
41498
41684
|
//#endregion
|
|
41499
41685
|
//#region src/internal/toolbar/built-in/Toolbar.vue
|
|
41500
41686
|
var _hoisted_1$10 = ["data-superdoc-ui-owner"];
|
|
@@ -41627,7 +41813,13 @@ var Toolbar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vu
|
|
|
41627
41813
|
proxy.$toolbar.pendingSelectionCapture = pendingSelectionCapture;
|
|
41628
41814
|
};
|
|
41629
41815
|
const handleCommand = ({ item, argument, option }) => {
|
|
41630
|
-
|
|
41816
|
+
const commandId = resolveToolbarCommandId(item?.name?.value);
|
|
41817
|
+
if (!(item?.type === "button" && !item.isCustomToolbarItem && [
|
|
41818
|
+
"bold",
|
|
41819
|
+
"italic",
|
|
41820
|
+
"underline",
|
|
41821
|
+
"strikethrough"
|
|
41822
|
+
].includes(commandId) && proxy.$toolbar.snapshot?.commands?.[commandId]?.source === "builtin")) restoreSelection();
|
|
41631
41823
|
proxy.$toolbar.emitCommand({
|
|
41632
41824
|
item,
|
|
41633
41825
|
argument,
|
|
@@ -41705,7 +41897,7 @@ var Toolbar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vu
|
|
|
41705
41897
|
], 40, _hoisted_1$10);
|
|
41706
41898
|
};
|
|
41707
41899
|
}
|
|
41708
|
-
}, [["__scopeId", "data-v-
|
|
41900
|
+
}, [["__scopeId", "data-v-9554df11"]]);
|
|
41709
41901
|
//#endregion
|
|
41710
41902
|
//#region src/internal/toolbar/built-in/font-options.js
|
|
41711
41903
|
/**
|
|
@@ -42133,8 +42325,8 @@ var numberedStyleButtons = [
|
|
|
42133
42325
|
//#region src/internal/toolbar/built-in/DocumentMode.vue
|
|
42134
42326
|
var _hoisted_1$7 = ["onClick", "onKeydown"];
|
|
42135
42327
|
var _hoisted_2$7 = { class: "document-mode-column icon-column" };
|
|
42136
|
-
var _hoisted_3$
|
|
42137
|
-
var _hoisted_4$
|
|
42328
|
+
var _hoisted_3$6 = ["innerHTML"];
|
|
42329
|
+
var _hoisted_4$4 = { class: "document-mode-column text-column" };
|
|
42138
42330
|
var _hoisted_5$2 = { class: "document-mode-type" };
|
|
42139
42331
|
var _hoisted_6$1 = { class: "document-mode-description" };
|
|
42140
42332
|
var _sfc_main$7 = {
|
|
@@ -42197,7 +42389,7 @@ var _sfc_main$7 = {
|
|
|
42197
42389
|
}, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_2$7, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
42198
42390
|
class: "icon-column__icon",
|
|
42199
42391
|
innerHTML: option.icon
|
|
42200
|
-
}, null, 8, _hoisted_3$
|
|
42392
|
+
}, null, 8, _hoisted_3$6)]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$4, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_5$2, require__plugin_vue_export_helper.toDisplayString(option.label), 1), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_6$1, require__plugin_vue_export_helper.toDisplayString(option.description), 1)])], 42, _hoisted_1$7);
|
|
42201
42393
|
}), 256))], 2);
|
|
42202
42394
|
};
|
|
42203
42395
|
}
|
|
@@ -42214,6 +42406,12 @@ var _hoisted_2$6 = [
|
|
|
42214
42406
|
"onKeydown",
|
|
42215
42407
|
"aria-label"
|
|
42216
42408
|
];
|
|
42409
|
+
var _hoisted_3$5 = [
|
|
42410
|
+
"title",
|
|
42411
|
+
"aria-label",
|
|
42412
|
+
"onClick"
|
|
42413
|
+
];
|
|
42414
|
+
var _hoisted_4$3 = ["innerHTML"];
|
|
42217
42415
|
/**
|
|
42218
42416
|
* Built-in linked-styles (quick format) dropdown list.
|
|
42219
42417
|
*
|
|
@@ -42221,7 +42419,9 @@ var _hoisted_2$6 = [
|
|
|
42221
42419
|
* (`StyleCatalogItem`: `id`, `name`, optional `preview.css`, visibility), passed
|
|
42222
42420
|
* in via the `styles` array. Selecting a style emits the catalogue item; the
|
|
42223
42421
|
* toolbar controller normalizes it to a style id and routes the apply through
|
|
42224
|
-
* the shared `linked-style` command (`styles.paragraph.setStyle`).
|
|
42422
|
+
* the shared `linked-style` command (`styles.paragraph.setStyle`). Each row also
|
|
42423
|
+
* carries an "Update to match selection" action that emits `update` with the
|
|
42424
|
+
* item; the toolbar routes it through `ui.styles.updateToMatchSelection`. The rendered
|
|
42225
42425
|
* control stays faithful to the legacy DOM contract
|
|
42226
42426
|
* (`data-item="btn-linkedStyles-option"`, keyboard navigation) and makes no
|
|
42227
42427
|
* v1-only shape assumptions.
|
|
@@ -42236,9 +42436,13 @@ var _sfc_main$6 = {
|
|
|
42236
42436
|
selectedOption: {
|
|
42237
42437
|
type: String,
|
|
42238
42438
|
default: null
|
|
42439
|
+
},
|
|
42440
|
+
updateLabel: {
|
|
42441
|
+
type: String,
|
|
42442
|
+
default: "Update to match selection"
|
|
42239
42443
|
}
|
|
42240
42444
|
},
|
|
42241
|
-
emits: ["select"],
|
|
42445
|
+
emits: ["select", "update"],
|
|
42242
42446
|
setup(__props, { emit: __emit }) {
|
|
42243
42447
|
const emit = __emit;
|
|
42244
42448
|
const styleRefs = require__plugin_vue_export_helper.ref([]);
|
|
@@ -42246,6 +42450,9 @@ var _sfc_main$6 = {
|
|
|
42246
42450
|
const select = (style) => {
|
|
42247
42451
|
emit("select", style);
|
|
42248
42452
|
};
|
|
42453
|
+
const update = (style) => {
|
|
42454
|
+
emit("update", style);
|
|
42455
|
+
};
|
|
42249
42456
|
const moveToNextStyle = (index) => {
|
|
42250
42457
|
if (index === styleRefs.value.length - 1) return;
|
|
42251
42458
|
const nextItem = styleRefs.value[index + 1];
|
|
@@ -42305,12 +42512,23 @@ var _sfc_main$6 = {
|
|
|
42305
42512
|
class: "style-name",
|
|
42306
42513
|
"data-item": "btn-linkedStyles-option",
|
|
42307
42514
|
style: require__plugin_vue_export_helper.normalizeStyle(previewStyle(style))
|
|
42308
|
-
}, require__plugin_vue_export_helper.toDisplayString(styleLabel(style)), 5)
|
|
42515
|
+
}, require__plugin_vue_export_helper.toDisplayString(styleLabel(style)), 5), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
42516
|
+
type: "button",
|
|
42517
|
+
class: "style-update",
|
|
42518
|
+
"data-item": "btn-linkedStyles-update",
|
|
42519
|
+
title: props.updateLabel,
|
|
42520
|
+
"aria-label": `${props.updateLabel}: ${styleLabel(style)}`,
|
|
42521
|
+
onClick: require__plugin_vue_export_helper.withModifiers(($event) => update(style), ["stop"]),
|
|
42522
|
+
onKeydown: _cache[0] || (_cache[0] = require__plugin_vue_export_helper.withModifiers(() => {}, ["stop"]))
|
|
42523
|
+
}, [require__plugin_vue_export_helper.createElementVNode("span", {
|
|
42524
|
+
class: "style-update-icon",
|
|
42525
|
+
innerHTML: require__plugin_vue_export_helper.unref(toolbarIcons).paintbrush
|
|
42526
|
+
}, null, 8, _hoisted_4$3)], 40, _hoisted_3$5)], 42, _hoisted_2$6);
|
|
42309
42527
|
}), 128))]);
|
|
42310
42528
|
};
|
|
42311
42529
|
}
|
|
42312
42530
|
};
|
|
42313
|
-
var LinkedStyle_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$6, [["__scopeId", "data-v-
|
|
42531
|
+
var LinkedStyle_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$6, [["__scopeId", "data-v-b5a32523"]]);
|
|
42314
42532
|
//#endregion
|
|
42315
42533
|
//#region src/internal/toolbar/built-in/AIWriter.vue
|
|
42316
42534
|
var _hoisted_1$5 = ["placeholder"];
|
|
@@ -44516,10 +44734,18 @@ var makeDefaultItems = ({ superToolbar, toolbarIcons, toolbarTexts, toolbarFonts
|
|
|
44516
44734
|
argument: styleId
|
|
44517
44735
|
});
|
|
44518
44736
|
};
|
|
44737
|
+
const handleUpdate = (style) => {
|
|
44738
|
+
closeDropdown(linkedStyles);
|
|
44739
|
+
const styleId = typeof style === "string" ? style : style?.id ?? null;
|
|
44740
|
+
if (!styleId) return;
|
|
44741
|
+
superToolbar.updateLinkedStyleToMatchSelection?.(styleId);
|
|
44742
|
+
};
|
|
44519
44743
|
const activeStyleId = superToolbar.getActiveLinkedStyleId?.() ?? null;
|
|
44520
44744
|
return require__plugin_vue_export_helper.h("div", {}, [require__plugin_vue_export_helper.h(LinkedStyle_default, {
|
|
44521
44745
|
styles: superToolbar.getLinkedStyleOptions?.() ?? [],
|
|
44522
44746
|
onSelect: handleSelect,
|
|
44747
|
+
onUpdate: handleUpdate,
|
|
44748
|
+
updateLabel: toolbarTexts.updateLinkedStyle,
|
|
44523
44749
|
selectedOption: activeStyleId
|
|
44524
44750
|
})]);
|
|
44525
44751
|
}
|
|
@@ -44778,7 +45004,8 @@ var toolbarTexts = {
|
|
|
44778
45004
|
documentEditingModeDescription: "Edit document directly",
|
|
44779
45005
|
documentSuggestingModeDescription: "Edits become suggestions",
|
|
44780
45006
|
documentViewingModeDescription: "View clean version of document only",
|
|
44781
|
-
linkedStyles: "Linked styles"
|
|
45007
|
+
linkedStyles: "Linked styles",
|
|
45008
|
+
updateLinkedStyle: "Update to match selection"
|
|
44782
45009
|
};
|
|
44783
45010
|
//#endregion
|
|
44784
45011
|
//#region src/internal/toolbar/built-in/general.js
|
|
@@ -45270,12 +45497,16 @@ var BuiltInToolbar = class extends require_eventemitter3.import_eventemitter3.de
|
|
|
45270
45497
|
return this._linkedStyleOptions.value;
|
|
45271
45498
|
}
|
|
45272
45499
|
#refreshLinkedStyleOptions() {
|
|
45273
|
-
this.ui?.styles?.getCatalog?.({ includePreview: true });
|
|
45500
|
+
const allStyles = this.ui?.styles?.getCatalog?.({ includePreview: true });
|
|
45274
45501
|
const options = (this.ui?.styles?.getCatalog?.({
|
|
45275
45502
|
view: "quickGallery",
|
|
45276
45503
|
includePreview: true
|
|
45277
45504
|
}))?.items ?? this.ui?.styles?.getQuickGallery?.() ?? [];
|
|
45278
|
-
|
|
45505
|
+
const activeStyleId = this.ui?.styles?.getActiveParagraphStyle?.()?.styleId;
|
|
45506
|
+
const activeStyle = activeStyleId && !options.some((style) => style.id === activeStyleId) ? allStyles?.styles?.find((style) => style.id === activeStyleId && (style.type === "paragraph" || style.type === "linked")) : null;
|
|
45507
|
+
const nextOptions = activeStyle ? [activeStyle, ...options] : options;
|
|
45508
|
+
const previousOptions = this._linkedStyleOptions.value;
|
|
45509
|
+
if (nextOptions.length !== previousOptions.length || nextOptions.some((style, index) => style !== previousOptions[index])) this._linkedStyleOptions.value = nextOptions;
|
|
45279
45510
|
}
|
|
45280
45511
|
/**
|
|
45281
45512
|
* The stable style id active across the current selection's paragraph(s), or
|
|
@@ -45285,6 +45516,17 @@ var BuiltInToolbar = class extends require_eventemitter3.import_eventemitter3.de
|
|
|
45285
45516
|
getActiveLinkedStyleId() {
|
|
45286
45517
|
return this.ui?.styles?.getActiveParagraphStyle?.()?.styleId ?? null;
|
|
45287
45518
|
}
|
|
45519
|
+
async updateLinkedStyleToMatchSelection(styleId) {
|
|
45520
|
+
if (!styleId || typeof this.ui?.styles?.updateToMatchSelection !== "function") return null;
|
|
45521
|
+
try {
|
|
45522
|
+
return await this.ui.styles.updateToMatchSelection({ styleId });
|
|
45523
|
+
} catch (error) {
|
|
45524
|
+
this.#emitCommandException(error, "linkedStyles");
|
|
45525
|
+
return null;
|
|
45526
|
+
} finally {
|
|
45527
|
+
this.updateToolbarState();
|
|
45528
|
+
}
|
|
45529
|
+
}
|
|
45288
45530
|
/**
|
|
45289
45531
|
* Compatibility hook: `SuperDoc` calls this when the active editor changes.
|
|
45290
45532
|
* The shared controller already tracks selection/transaction state, so this
|
|
@@ -46224,7 +46466,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46224
46466
|
}
|
|
46225
46467
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46226
46468
|
this.colorIndex = 0;
|
|
46227
|
-
this.version = "2.
|
|
46469
|
+
this.version = "2.28.0-next.10";
|
|
46228
46470
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46229
46471
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
46230
46472
|
this.colors = this.config.colors ?? [];
|
|
@@ -46940,7 +47182,8 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46940
47182
|
...syncTimeoutOption,
|
|
46941
47183
|
...target.serverUrl ? { serverUrl: target.serverUrl } : {},
|
|
46942
47184
|
...target.params ? { params: target.params } : {},
|
|
46943
|
-
...target.token ? { token: target.token } : {}
|
|
47185
|
+
...target.token ? { token: target.token } : {},
|
|
47186
|
+
...target.retry !== void 0 ? { retry: target.retry } : {}
|
|
46944
47187
|
};
|
|
46945
47188
|
return {
|
|
46946
47189
|
providerType: "y-websocket",
|
|
@@ -48177,12 +48420,13 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
48177
48420
|
* Export the superdoc to a file
|
|
48178
48421
|
* @param params - Export configuration
|
|
48179
48422
|
*/
|
|
48180
|
-
async export({ exportType = ["docx"], commentsType
|
|
48423
|
+
async export({ exportType = ["docx"], commentsType, exportedName, additionalFiles = [], additionalFileNames = [], isFinalDoc, policies, triggerDownload = true, fieldsHighlightColor = null } = {}) {
|
|
48181
48424
|
if (!Array.isArray(exportType) || exportType.length !== 1 || exportType[0] !== "docx") throw new TypeError("SuperDoc.export() only supports exportType: [\"docx\"].");
|
|
48182
48425
|
const baseFileName = exportedName ? cleanName(exportedName) : cleanName(this.config.title);
|
|
48183
48426
|
const docxFiles = await this.exportEditorsToDOCX({
|
|
48184
48427
|
commentsType,
|
|
48185
48428
|
isFinalDoc,
|
|
48429
|
+
policies,
|
|
48186
48430
|
fieldsHighlightColor
|
|
48187
48431
|
});
|
|
48188
48432
|
const blobsToZip = [...additionalFiles];
|
|
@@ -48268,7 +48512,12 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
48268
48512
|
* Export editors to DOCX format.
|
|
48269
48513
|
* @param [options]
|
|
48270
48514
|
*/
|
|
48271
|
-
async exportEditorsToDOCX({ commentsType, isFinalDoc, fieldsHighlightColor } = {}) {
|
|
48515
|
+
async exportEditorsToDOCX({ commentsType, isFinalDoc, policies, fieldsHighlightColor } = {}) {
|
|
48516
|
+
if (policies !== void 0) resolveV2DocxExportOptions({
|
|
48517
|
+
policies,
|
|
48518
|
+
commentsType,
|
|
48519
|
+
isFinalDoc
|
|
48520
|
+
});
|
|
48272
48521
|
const uiStoreHydrated = this.config?.modules?.comments !== false;
|
|
48273
48522
|
let legacyComments;
|
|
48274
48523
|
let legacyCommentsComputed = false;
|
|
@@ -48288,7 +48537,13 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
48288
48537
|
};
|
|
48289
48538
|
this.on("exception", rememberBridgedExportError);
|
|
48290
48539
|
try {
|
|
48291
|
-
const
|
|
48540
|
+
const documents = this.#requireSuperdocStore("exportEditorsToDOCX").documents;
|
|
48541
|
+
if (policies !== void 0 && documents.some((doc) => {
|
|
48542
|
+
if (doc.type !== "application/vnd.openxmlformats-officedocument.wordprocessingml.document") return false;
|
|
48543
|
+
const editor = doc.getEditor?.();
|
|
48544
|
+
return editor?.editorVersion !== 2 || typeof editor.exportDocx !== "function";
|
|
48545
|
+
})) throw new Error("Independent DOCX export policies require a mounted V2 exporter for every document.");
|
|
48546
|
+
const docxPromises = documents.map(async (doc) => {
|
|
48292
48547
|
if (!doc || doc.type !== "application/vnd.openxmlformats-officedocument.wordprocessingml.document") return null;
|
|
48293
48548
|
const editor = typeof doc.getEditor === "function" ? doc.getEditor() : null;
|
|
48294
48549
|
const fallbackDocx = () => {
|
|
@@ -48305,6 +48560,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
48305
48560
|
const exported = await editor.exportDocx(isV2Editor ? {
|
|
48306
48561
|
isFinalDoc,
|
|
48307
48562
|
commentsType,
|
|
48563
|
+
policies,
|
|
48308
48564
|
fieldsHighlightColor
|
|
48309
48565
|
} : {
|
|
48310
48566
|
isFinalDoc,
|
|
@@ -48633,7 +48889,11 @@ function defineSuperDocExtension(extension) {
|
|
|
48633
48889
|
return extension;
|
|
48634
48890
|
}
|
|
48635
48891
|
//#endregion
|
|
48636
|
-
|
|
48892
|
+
//#region src/public/index.ts
|
|
48893
|
+
/** URL to the blank DOCX template. */
|
|
48894
|
+
var BlankDOCX = require_blank_docx.blank_default;
|
|
48895
|
+
//#endregion
|
|
48896
|
+
exports.BlankDOCX = BlankDOCX;
|
|
48637
48897
|
exports.DOCX = DOCX;
|
|
48638
48898
|
exports.DocumentLoadError = DocumentLoadError;
|
|
48639
48899
|
exports.HTML = HTML;
|