@harbour-enterprises/superdoc 0.12.17 → 0.12.19
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/{super-editor.es-C5seifML.es.js → super-editor.es-C_GbwRpZ.es.js} +116 -54
- package/dist/chunks/{super-editor.es-bzN38eJ6.cjs → super-editor.es-DmWvNj76.cjs} +116 -54
- package/dist/core/SuperDoc.d.ts +15 -0
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/style.css +28 -28
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DOKQJqK4.js → converter-DhgEAlTO.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CeXxI7BH.js → docx-zipper-BSaSIAeQ.js} +1 -1
- package/dist/super-editor/chunks/{editor-BDrgQZvS.js → editor-BfaGq_P9.js} +7 -5
- package/dist/super-editor/chunks/{toolbar-Syznaamh.js → toolbar-DSWq6Fuv.js} +2 -2
- package/dist/super-editor/components/toolbar/defaultItems.d.ts +1 -1
- package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts +5 -0
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/toolbarTexts.d.ts +51 -0
- package/dist/super-editor/components/toolbar/toolbarTexts.d.ts.map +1 -0
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts +10 -4
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +116 -55
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +7 -4
- package/dist/superdoc.es.js +8 -5
- package/dist/superdoc.umd.js +122 -57
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -30664,7 +30664,7 @@
|
|
|
30664
30664
|
return;
|
|
30665
30665
|
}
|
|
30666
30666
|
}
|
|
30667
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.
|
|
30667
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.19") {
|
|
30668
30668
|
const customLocation = "docProps/custom.xml";
|
|
30669
30669
|
if (!docx[customLocation]) {
|
|
30670
30670
|
docx[customLocation] = generateCustomXml();
|
|
@@ -31130,7 +31130,7 @@
|
|
|
31130
31130
|
function generateCustomXml() {
|
|
31131
31131
|
return DEFAULT_CUSTOM_XML;
|
|
31132
31132
|
}
|
|
31133
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.
|
|
31133
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.19") {
|
|
31134
31134
|
return {
|
|
31135
31135
|
type: "element",
|
|
31136
31136
|
name: "property",
|
|
@@ -47698,7 +47698,8 @@
|
|
|
47698
47698
|
numbering: {},
|
|
47699
47699
|
isHeaderOrFooter: false,
|
|
47700
47700
|
lastSelection: null,
|
|
47701
|
-
|
|
47701
|
+
suppressDefaultDocxStyles: false,
|
|
47702
|
+
jsonOverride: false,
|
|
47702
47703
|
onBeforeCreate: () => null,
|
|
47703
47704
|
onCreate: () => null,
|
|
47704
47705
|
onUpdate: () => null,
|
|
@@ -48027,7 +48028,7 @@
|
|
|
48027
48028
|
* @returns {void}
|
|
48028
48029
|
*/
|
|
48029
48030
|
initDefaultStyles(element = this.element) {
|
|
48030
|
-
if (this.options.isHeadless || this.options.
|
|
48031
|
+
if (this.options.isHeadless || this.options.suppressDefaultDocxStyles) return;
|
|
48031
48032
|
const proseMirror = element?.querySelector(".ProseMirror");
|
|
48032
48033
|
const { pageSize, pageMargins } = this.converter.pageStyles ?? {};
|
|
48033
48034
|
if (!proseMirror || !pageSize || !pageMargins) {
|
|
@@ -48284,7 +48285,7 @@
|
|
|
48284
48285
|
* @returns {Object | void} Migration results
|
|
48285
48286
|
*/
|
|
48286
48287
|
processCollaborationMigrations() {
|
|
48287
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
48288
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.19");
|
|
48288
48289
|
if (!this.options.ydoc) return;
|
|
48289
48290
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
48290
48291
|
let docVersion = metaMap.get("version");
|
|
@@ -48601,6 +48602,7 @@
|
|
|
48601
48602
|
doc2 = createDocument(this.converter, this.schema, this);
|
|
48602
48603
|
doc2 = __privateMethod$1(this, _Editor_instances, prepareDocumentForImport_fn).call(this, doc2);
|
|
48603
48604
|
if (this.options.html) doc2 = __privateMethod$1(this, _Editor_instances, createDocFromHTML_fn).call(this, this.options.html);
|
|
48605
|
+
else if (this.options.jsonOverride) doc2 = this.schema.nodeFromJSON(this.options.jsonOverride);
|
|
48604
48606
|
if (fragment) doc2 = yXmlFragmentToProseMirrorRootNode(fragment, this.schema);
|
|
48605
48607
|
}
|
|
48606
48608
|
} else if (mode === "text" || mode === "html") {
|
|
@@ -72252,6 +72254,7 @@ ${style2}
|
|
|
72252
72254
|
const makeDefaultItems = ({
|
|
72253
72255
|
superToolbar,
|
|
72254
72256
|
toolbarIcons: toolbarIcons2,
|
|
72257
|
+
toolbarTexts: toolbarTexts2,
|
|
72255
72258
|
toolbarFonts,
|
|
72256
72259
|
hideButtons,
|
|
72257
72260
|
availableWidth,
|
|
@@ -72263,12 +72266,12 @@ ${style2}
|
|
|
72263
72266
|
name: "bold",
|
|
72264
72267
|
command: "toggleBold",
|
|
72265
72268
|
icon: toolbarIcons2.bold,
|
|
72266
|
-
tooltip:
|
|
72269
|
+
tooltip: toolbarTexts2.bold
|
|
72267
72270
|
});
|
|
72268
72271
|
const fontButton = useToolbarItem({
|
|
72269
72272
|
type: "dropdown",
|
|
72270
72273
|
name: "fontFamily",
|
|
72271
|
-
tooltip:
|
|
72274
|
+
tooltip: toolbarTexts2.fontFamily,
|
|
72272
72275
|
command: "setFontFamily",
|
|
72273
72276
|
defaultLabel: "Arial",
|
|
72274
72277
|
label: "Arial",
|
|
@@ -72292,7 +72295,7 @@ ${style2}
|
|
|
72292
72295
|
outline: "none"
|
|
72293
72296
|
},
|
|
72294
72297
|
name: "ai",
|
|
72295
|
-
tooltip:
|
|
72298
|
+
tooltip: toolbarTexts2.ai,
|
|
72296
72299
|
icon: toolbarIcons2.ai,
|
|
72297
72300
|
hideLabel: true,
|
|
72298
72301
|
hasCaret: false,
|
|
@@ -72338,7 +72341,7 @@ ${style2}
|
|
|
72338
72341
|
minWidth: "50px",
|
|
72339
72342
|
markName: "textStyle",
|
|
72340
72343
|
labelAttr: "fontSize",
|
|
72341
|
-
tooltip:
|
|
72344
|
+
tooltip: toolbarTexts2.fontSize,
|
|
72342
72345
|
hasCaret: true,
|
|
72343
72346
|
hasInlineTextInput: false,
|
|
72344
72347
|
inlineTextInputVisible: true,
|
|
@@ -72380,14 +72383,14 @@ ${style2}
|
|
|
72380
72383
|
name: "italic",
|
|
72381
72384
|
command: "toggleItalic",
|
|
72382
72385
|
icon: toolbarIcons2.italic,
|
|
72383
|
-
tooltip:
|
|
72386
|
+
tooltip: toolbarTexts2.italic
|
|
72384
72387
|
});
|
|
72385
72388
|
const underline = useToolbarItem({
|
|
72386
72389
|
type: "button",
|
|
72387
72390
|
name: "underline",
|
|
72388
72391
|
command: "toggleUnderline",
|
|
72389
72392
|
icon: toolbarIcons2.underline,
|
|
72390
|
-
tooltip:
|
|
72393
|
+
tooltip: toolbarTexts2.underline
|
|
72391
72394
|
});
|
|
72392
72395
|
const highlight = useToolbarItem({
|
|
72393
72396
|
type: "dropdown",
|
|
@@ -72396,7 +72399,7 @@ ${style2}
|
|
|
72396
72399
|
hideLabel: true,
|
|
72397
72400
|
markName: "highlight",
|
|
72398
72401
|
labelAttr: "color",
|
|
72399
|
-
tooltip:
|
|
72402
|
+
tooltip: toolbarTexts2.highlight,
|
|
72400
72403
|
command: "setHighlight",
|
|
72401
72404
|
noArgumentCommand: "unsetHighlight",
|
|
72402
72405
|
suppressActiveHighlight: true,
|
|
@@ -72419,7 +72422,7 @@ ${style2}
|
|
|
72419
72422
|
hideLabel: true,
|
|
72420
72423
|
markName: "textStyle",
|
|
72421
72424
|
labelAttr: "color",
|
|
72422
|
-
tooltip:
|
|
72425
|
+
tooltip: toolbarTexts2.color,
|
|
72423
72426
|
command: "setColor",
|
|
72424
72427
|
suppressActiveHighlight: true,
|
|
72425
72428
|
options: [
|
|
@@ -72439,7 +72442,7 @@ ${style2}
|
|
|
72439
72442
|
type: "dropdown",
|
|
72440
72443
|
name: "search",
|
|
72441
72444
|
icon: toolbarIcons2.search,
|
|
72442
|
-
tooltip:
|
|
72445
|
+
tooltip: toolbarTexts2.search,
|
|
72443
72446
|
group: "right",
|
|
72444
72447
|
inputRef: searchRef,
|
|
72445
72448
|
options: [
|
|
@@ -72466,7 +72469,7 @@ ${style2}
|
|
|
72466
72469
|
name: "link",
|
|
72467
72470
|
markName: "link",
|
|
72468
72471
|
icon: toolbarIcons2.link,
|
|
72469
|
-
tooltip:
|
|
72472
|
+
tooltip: toolbarTexts2.link,
|
|
72470
72473
|
options: [
|
|
72471
72474
|
{
|
|
72472
72475
|
type: "render",
|
|
@@ -72519,7 +72522,7 @@ ${style2}
|
|
|
72519
72522
|
name: "image",
|
|
72520
72523
|
command: "startImageUpload",
|
|
72521
72524
|
icon: toolbarIcons2.image,
|
|
72522
|
-
tooltip:
|
|
72525
|
+
tooltip: toolbarTexts2.image,
|
|
72523
72526
|
disabled: false
|
|
72524
72527
|
});
|
|
72525
72528
|
const tableItem = useToolbarItem({
|
|
@@ -72528,7 +72531,7 @@ ${style2}
|
|
|
72528
72531
|
icon: toolbarIcons2.table,
|
|
72529
72532
|
hideLabel: true,
|
|
72530
72533
|
labelAttr: "table",
|
|
72531
|
-
tooltip:
|
|
72534
|
+
tooltip: toolbarTexts2.table,
|
|
72532
72535
|
command: "insertTable",
|
|
72533
72536
|
suppressActiveHighlight: true,
|
|
72534
72537
|
options: [
|
|
@@ -72566,69 +72569,69 @@ ${style2}
|
|
|
72566
72569
|
});
|
|
72567
72570
|
const tableActionsOptions = [
|
|
72568
72571
|
{
|
|
72569
|
-
label:
|
|
72572
|
+
label: toolbarTexts2.addRowBefore,
|
|
72570
72573
|
command: "addRowBefore",
|
|
72571
72574
|
icon: toolbarIcons2.addRowBefore,
|
|
72572
72575
|
props: { "data-item": "btn-tableActions-option" }
|
|
72573
72576
|
},
|
|
72574
72577
|
{
|
|
72575
|
-
label:
|
|
72578
|
+
label: toolbarTexts2.addRowAfter,
|
|
72576
72579
|
command: "addRowAfter",
|
|
72577
72580
|
icon: toolbarIcons2.addRowAfter,
|
|
72578
72581
|
props: { "data-item": "btn-tableActions-option" }
|
|
72579
72582
|
},
|
|
72580
72583
|
{
|
|
72581
|
-
label:
|
|
72584
|
+
label: toolbarTexts2.addColumnBefore,
|
|
72582
72585
|
command: "addColumnBefore",
|
|
72583
72586
|
icon: toolbarIcons2.addColumnBefore,
|
|
72584
72587
|
props: { "data-item": "btn-tableActions-option" }
|
|
72585
72588
|
},
|
|
72586
72589
|
{
|
|
72587
|
-
label:
|
|
72590
|
+
label: toolbarTexts2.addColumnAfter,
|
|
72588
72591
|
command: "addColumnAfter",
|
|
72589
72592
|
icon: toolbarIcons2.addColumnAfter,
|
|
72590
72593
|
bottomBorder: true,
|
|
72591
72594
|
props: { "data-item": "btn-tableActions-option" }
|
|
72592
72595
|
},
|
|
72593
72596
|
{
|
|
72594
|
-
label:
|
|
72597
|
+
label: toolbarTexts2.deleteRow,
|
|
72595
72598
|
command: "deleteRow",
|
|
72596
72599
|
icon: toolbarIcons2.deleteRow,
|
|
72597
72600
|
props: { "data-item": "btn-tableActions-option" }
|
|
72598
72601
|
},
|
|
72599
72602
|
{
|
|
72600
|
-
label:
|
|
72603
|
+
label: toolbarTexts2.deleteColumn,
|
|
72601
72604
|
command: "deleteColumn",
|
|
72602
72605
|
icon: toolbarIcons2.deleteColumn,
|
|
72603
72606
|
props: { "data-item": "btn-tableActions-option" }
|
|
72604
72607
|
},
|
|
72605
72608
|
{
|
|
72606
|
-
label:
|
|
72609
|
+
label: toolbarTexts2.deleteTable,
|
|
72607
72610
|
command: "deleteTable",
|
|
72608
72611
|
icon: toolbarIcons2.deleteTable,
|
|
72609
72612
|
props: { "data-item": "btn-tableActions-option" }
|
|
72610
72613
|
},
|
|
72611
72614
|
{
|
|
72612
|
-
label:
|
|
72615
|
+
label: toolbarTexts2.transparentBorders,
|
|
72613
72616
|
command: "deleteCellAndTableBorders",
|
|
72614
72617
|
icon: toolbarIcons2.deleteBorders,
|
|
72615
72618
|
bottomBorder: true,
|
|
72616
72619
|
props: { "data-item": "btn-tableActions-option" }
|
|
72617
72620
|
},
|
|
72618
72621
|
{
|
|
72619
|
-
label:
|
|
72622
|
+
label: toolbarTexts2.mergeCells,
|
|
72620
72623
|
command: "mergeCells",
|
|
72621
72624
|
icon: toolbarIcons2.mergeCells,
|
|
72622
72625
|
props: { "data-item": "btn-tableActions-option" }
|
|
72623
72626
|
},
|
|
72624
72627
|
{
|
|
72625
|
-
label:
|
|
72628
|
+
label: toolbarTexts2.splitCell,
|
|
72626
72629
|
command: "splitCell",
|
|
72627
72630
|
icon: toolbarIcons2.splitCell,
|
|
72628
72631
|
props: { "data-item": "btn-tableActions-option" }
|
|
72629
72632
|
},
|
|
72630
72633
|
{
|
|
72631
|
-
label:
|
|
72634
|
+
label: toolbarTexts2.fixTables,
|
|
72632
72635
|
command: "fixTables",
|
|
72633
72636
|
icon: toolbarIcons2.fixTables,
|
|
72634
72637
|
props: { "data-item": "btn-tableActions-option" }
|
|
@@ -72647,7 +72650,7 @@ ${style2}
|
|
|
72647
72650
|
const alignment2 = useToolbarItem({
|
|
72648
72651
|
type: "dropdown",
|
|
72649
72652
|
name: "textAlign",
|
|
72650
|
-
tooltip:
|
|
72653
|
+
tooltip: toolbarTexts2.textAlign,
|
|
72651
72654
|
icon: toolbarIcons2.alignLeft,
|
|
72652
72655
|
command: "setTextAlign",
|
|
72653
72656
|
hasCaret: true,
|
|
@@ -72697,21 +72700,21 @@ ${style2}
|
|
|
72697
72700
|
name: "list",
|
|
72698
72701
|
command: "toggleBulletList",
|
|
72699
72702
|
icon: toolbarIcons2.bulletList,
|
|
72700
|
-
tooltip:
|
|
72703
|
+
tooltip: toolbarTexts2.bulletList
|
|
72701
72704
|
});
|
|
72702
72705
|
const numberedList = useToolbarItem({
|
|
72703
72706
|
type: "button",
|
|
72704
72707
|
name: "numberedlist",
|
|
72705
72708
|
command: "toggleOrderedList",
|
|
72706
72709
|
icon: toolbarIcons2.numberedList,
|
|
72707
|
-
tooltip:
|
|
72710
|
+
tooltip: toolbarTexts2.numberedList
|
|
72708
72711
|
});
|
|
72709
72712
|
const indentLeft = useToolbarItem({
|
|
72710
72713
|
type: "button",
|
|
72711
72714
|
name: "indentleft",
|
|
72712
72715
|
command: "decreaseTextIndent",
|
|
72713
72716
|
icon: toolbarIcons2.indentLeft,
|
|
72714
|
-
tooltip:
|
|
72717
|
+
tooltip: toolbarTexts2.indentLeft,
|
|
72715
72718
|
disabled: false
|
|
72716
72719
|
});
|
|
72717
72720
|
const indentRight = useToolbarItem({
|
|
@@ -72719,7 +72722,7 @@ ${style2}
|
|
|
72719
72722
|
name: "indentright",
|
|
72720
72723
|
command: "increaseTextIndent",
|
|
72721
72724
|
icon: toolbarIcons2.indentRight,
|
|
72722
|
-
tooltip:
|
|
72725
|
+
tooltip: toolbarTexts2.indentRight,
|
|
72723
72726
|
disabled: false
|
|
72724
72727
|
});
|
|
72725
72728
|
const overflow = useToolbarItem({
|
|
@@ -72733,7 +72736,7 @@ ${style2}
|
|
|
72733
72736
|
type: "dropdown",
|
|
72734
72737
|
name: "zoom",
|
|
72735
72738
|
allowWithoutEditor: true,
|
|
72736
|
-
tooltip:
|
|
72739
|
+
tooltip: toolbarTexts2.zoom,
|
|
72737
72740
|
defaultLabel: "100%",
|
|
72738
72741
|
label: "100%",
|
|
72739
72742
|
hasCaret: true,
|
|
@@ -72759,7 +72762,7 @@ ${style2}
|
|
|
72759
72762
|
type: "button",
|
|
72760
72763
|
name: "undo",
|
|
72761
72764
|
disabled: true,
|
|
72762
|
-
tooltip:
|
|
72765
|
+
tooltip: toolbarTexts2.undo,
|
|
72763
72766
|
command: "undo",
|
|
72764
72767
|
icon: toolbarIcons2.undo,
|
|
72765
72768
|
group: "left",
|
|
@@ -72771,7 +72774,7 @@ ${style2}
|
|
|
72771
72774
|
type: "button",
|
|
72772
72775
|
disabled: true,
|
|
72773
72776
|
name: "redo",
|
|
72774
|
-
tooltip:
|
|
72777
|
+
tooltip: toolbarTexts2.redo,
|
|
72775
72778
|
command: "redo",
|
|
72776
72779
|
icon: toolbarIcons2.redo,
|
|
72777
72780
|
group: "left",
|
|
@@ -72783,7 +72786,7 @@ ${style2}
|
|
|
72783
72786
|
type: "button",
|
|
72784
72787
|
disabled: false,
|
|
72785
72788
|
name: "toggleTrackChanges",
|
|
72786
|
-
tooltip:
|
|
72789
|
+
tooltip: toolbarTexts2.trackChanges,
|
|
72787
72790
|
command: "toggleTrackChanges",
|
|
72788
72791
|
icon: toolbarIcons2.trackChanges,
|
|
72789
72792
|
group: "left"
|
|
@@ -72792,7 +72795,7 @@ ${style2}
|
|
|
72792
72795
|
type: "button",
|
|
72793
72796
|
disabled: false,
|
|
72794
72797
|
name: "acceptTrackedChangeBySelection",
|
|
72795
|
-
tooltip:
|
|
72798
|
+
tooltip: toolbarTexts2.trackChangesAccept,
|
|
72796
72799
|
command: "acceptTrackedChangeBySelection",
|
|
72797
72800
|
icon: toolbarIcons2.trackChangesAccept,
|
|
72798
72801
|
group: "left"
|
|
@@ -72801,7 +72804,7 @@ ${style2}
|
|
|
72801
72804
|
type: "button",
|
|
72802
72805
|
disabled: false,
|
|
72803
72806
|
name: "rejectTrackedChangeOnSelection",
|
|
72804
|
-
tooltip:
|
|
72807
|
+
tooltip: toolbarTexts2.trackChangesReject,
|
|
72805
72808
|
command: "rejectTrackedChangeOnSelection",
|
|
72806
72809
|
icon: toolbarIcons2.trackChangesReject,
|
|
72807
72810
|
group: "left"
|
|
@@ -72810,7 +72813,7 @@ ${style2}
|
|
|
72810
72813
|
type: "button",
|
|
72811
72814
|
disabled: false,
|
|
72812
72815
|
name: "toggleTrackChangesShowOriginal",
|
|
72813
|
-
tooltip:
|
|
72816
|
+
tooltip: toolbarTexts2.trackChangesOriginal,
|
|
72814
72817
|
command: "toggleTrackChangesShowOriginal",
|
|
72815
72818
|
icon: toolbarIcons2.trackChangesOriginal,
|
|
72816
72819
|
group: "left"
|
|
@@ -72819,7 +72822,7 @@ ${style2}
|
|
|
72819
72822
|
type: "button",
|
|
72820
72823
|
disabled: false,
|
|
72821
72824
|
name: "toggleTrackChangesShowFinal",
|
|
72822
|
-
tooltip:
|
|
72825
|
+
tooltip: toolbarTexts2.trackChangesFinal,
|
|
72823
72826
|
command: "toggleTrackChangesShowFinal",
|
|
72824
72827
|
icon: toolbarIcons2.trackChangesFinal,
|
|
72825
72828
|
group: "left"
|
|
@@ -72828,7 +72831,7 @@ ${style2}
|
|
|
72828
72831
|
type: "button",
|
|
72829
72832
|
name: "clearFormatting",
|
|
72830
72833
|
command: "clearFormat",
|
|
72831
|
-
tooltip:
|
|
72834
|
+
tooltip: toolbarTexts2.clearFormatting,
|
|
72832
72835
|
icon: toolbarIcons2.clearFormatting
|
|
72833
72836
|
});
|
|
72834
72837
|
[
|
|
@@ -72843,7 +72846,7 @@ ${style2}
|
|
|
72843
72846
|
const copyFormat = useToolbarItem({
|
|
72844
72847
|
type: "button",
|
|
72845
72848
|
name: "copyFormat",
|
|
72846
|
-
tooltip:
|
|
72849
|
+
tooltip: toolbarTexts2.copyFormat,
|
|
72847
72850
|
icon: toolbarIcons2.copyFormat,
|
|
72848
72851
|
command: "copyFormat"
|
|
72849
72852
|
});
|
|
@@ -72885,22 +72888,22 @@ ${style2}
|
|
|
72885
72888
|
});
|
|
72886
72889
|
const documentOptions = [
|
|
72887
72890
|
{
|
|
72888
|
-
label:
|
|
72891
|
+
label: toolbarTexts2.documentEditingMode,
|
|
72889
72892
|
value: "editing",
|
|
72890
72893
|
icon: toolbarIcons2.documentEditingMode,
|
|
72891
|
-
description:
|
|
72894
|
+
description: toolbarTexts2.documentEditingModeDescription
|
|
72892
72895
|
},
|
|
72893
72896
|
{
|
|
72894
|
-
label:
|
|
72897
|
+
label: toolbarTexts2.documentSuggestingMode,
|
|
72895
72898
|
value: "suggesting",
|
|
72896
72899
|
icon: toolbarIcons2.documentSuggestingMode,
|
|
72897
|
-
description:
|
|
72900
|
+
description: toolbarTexts2.documentSuggestingModeDescription
|
|
72898
72901
|
},
|
|
72899
72902
|
{
|
|
72900
|
-
label:
|
|
72903
|
+
label: toolbarTexts2.documentViewingMode,
|
|
72901
72904
|
value: "viewing",
|
|
72902
72905
|
icon: toolbarIcons2.documentViewingMode,
|
|
72903
|
-
description:
|
|
72906
|
+
description: toolbarTexts2.documentViewingModeDescription
|
|
72904
72907
|
}
|
|
72905
72908
|
];
|
|
72906
72909
|
function renderDocumentMode(renderDocumentButton) {
|
|
@@ -72921,7 +72924,7 @@ ${style2}
|
|
|
72921
72924
|
name: "pageBreakTool",
|
|
72922
72925
|
command: "insertPageBreak",
|
|
72923
72926
|
icon: toolbarIcons2.pageBreak,
|
|
72924
|
-
tooltip:
|
|
72927
|
+
tooltip: toolbarTexts2.pageBreak
|
|
72925
72928
|
});
|
|
72926
72929
|
const controlSizes = /* @__PURE__ */ new Map([
|
|
72927
72930
|
["separator", 20],
|
|
@@ -72939,7 +72942,7 @@ ${style2}
|
|
|
72939
72942
|
name: "ruler",
|
|
72940
72943
|
command: "toggleRuler",
|
|
72941
72944
|
icon: toolbarIcons2.ruler,
|
|
72942
|
-
tooltip:
|
|
72945
|
+
tooltip: toolbarTexts2.ruler
|
|
72943
72946
|
});
|
|
72944
72947
|
const selectedLinkedStyle = ref$1(null);
|
|
72945
72948
|
const linkedStyles = useToolbarItem({
|
|
@@ -72947,8 +72950,8 @@ ${style2}
|
|
|
72947
72950
|
name: "linkedStyles",
|
|
72948
72951
|
command: "setLinkedStyle",
|
|
72949
72952
|
icon: toolbarIcons2.paintbrush,
|
|
72950
|
-
defaultLabel:
|
|
72951
|
-
label:
|
|
72953
|
+
defaultLabel: toolbarTexts2.formatText,
|
|
72954
|
+
label: toolbarTexts2.formatText,
|
|
72952
72955
|
hasCaret: true,
|
|
72953
72956
|
isWide: true,
|
|
72954
72957
|
style: { width: "140px" },
|
|
@@ -72992,7 +72995,7 @@ ${style2}
|
|
|
72992
72995
|
const lineHeight2 = useToolbarItem({
|
|
72993
72996
|
type: "dropdown",
|
|
72994
72997
|
name: "lineHeight",
|
|
72995
|
-
tooltip:
|
|
72998
|
+
tooltip: toolbarTexts2.lineHeight,
|
|
72996
72999
|
icon: toolbarIcons2.lineHeight,
|
|
72997
73000
|
hasCaret: false,
|
|
72998
73001
|
hasInlineTextInput: false,
|
|
@@ -73254,6 +73257,56 @@ ${style2}
|
|
|
73254
73257
|
}
|
|
73255
73258
|
);
|
|
73256
73259
|
};
|
|
73260
|
+
const toolbarTexts = {
|
|
73261
|
+
bold: "Bold",
|
|
73262
|
+
fontFamily: "Font",
|
|
73263
|
+
ai: "AI text generation",
|
|
73264
|
+
fontSize: "Font size",
|
|
73265
|
+
italic: "Italic",
|
|
73266
|
+
underline: "Underline",
|
|
73267
|
+
highlight: "Highlight color",
|
|
73268
|
+
color: "Text color",
|
|
73269
|
+
search: "Search",
|
|
73270
|
+
link: "Link",
|
|
73271
|
+
image: "Image",
|
|
73272
|
+
table: "Insert table",
|
|
73273
|
+
addRowBefore: "Insert row above",
|
|
73274
|
+
addRowAfter: "Insert row below",
|
|
73275
|
+
addColumnBefore: "Insert column left",
|
|
73276
|
+
addColumnAfter: "Insert column right",
|
|
73277
|
+
deleteRow: "Delete row",
|
|
73278
|
+
deleteColumn: "Delete column",
|
|
73279
|
+
deleteTable: "Delete table",
|
|
73280
|
+
transparentBorders: "Transparent borders",
|
|
73281
|
+
mergeCells: "Merge cells",
|
|
73282
|
+
splitCell: "Split cell",
|
|
73283
|
+
fixTables: "Fix tables",
|
|
73284
|
+
textAlign: "Alignment",
|
|
73285
|
+
bulletList: "Bullet list",
|
|
73286
|
+
numberedList: "Numbered list",
|
|
73287
|
+
indentLeft: "Left indent",
|
|
73288
|
+
indentRight: "Right indent",
|
|
73289
|
+
zoom: "Zoom",
|
|
73290
|
+
undo: "Undo",
|
|
73291
|
+
redo: "Redo",
|
|
73292
|
+
trackChanges: "Track Changes",
|
|
73293
|
+
trackChangesAccept: "Accept changes under selection",
|
|
73294
|
+
trackChangesReject: "Reject changes under selection",
|
|
73295
|
+
trackChangesOriginal: "Toggle Show Original",
|
|
73296
|
+
trackChangesFinal: "Toggle Show Final",
|
|
73297
|
+
clearFormatting: "Clear formatting",
|
|
73298
|
+
copyFormat: "Format painter",
|
|
73299
|
+
lineHeight: "Line height",
|
|
73300
|
+
formatText: "Format text",
|
|
73301
|
+
ruler: "Show or hide ruler",
|
|
73302
|
+
pageBreak: "Insert page break",
|
|
73303
|
+
documentEditingMode: "Editing",
|
|
73304
|
+
documentSuggestingMode: "Suggesting",
|
|
73305
|
+
documentViewingMode: "Viewing",
|
|
73306
|
+
documentEditingModeDescription: "Edit document directly",
|
|
73307
|
+
documentSuggestingModeDescription: "Edits become suggestions",
|
|
73308
|
+
documentViewingModeDescription: "View clean version of document only"
|
|
73309
|
+
};
|
|
73257
73310
|
class SuperToolbar extends EventEmitter$1 {
|
|
73258
73311
|
/**
|
|
73259
73312
|
* Creates a new SuperToolbar instance
|
|
@@ -73269,6 +73322,7 @@ ${style2}
|
|
|
73269
73322
|
role: "editor",
|
|
73270
73323
|
pagination: false,
|
|
73271
73324
|
icons: { ...toolbarIcons },
|
|
73325
|
+
texts: { ...toolbarTexts },
|
|
73272
73326
|
fonts: null,
|
|
73273
73327
|
hideButtons: true,
|
|
73274
73328
|
responsiveToContainer: false,
|
|
@@ -73532,6 +73586,7 @@ ${style2}
|
|
|
73532
73586
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
73533
73587
|
superToolbar: this,
|
|
73534
73588
|
icons: this.config.icons,
|
|
73589
|
+
texts: this.config.texts,
|
|
73535
73590
|
fonts: this.config.fonts,
|
|
73536
73591
|
hideButtons: this.config.hideButtons,
|
|
73537
73592
|
isDev: this.isDev
|
|
@@ -73555,6 +73610,10 @@ ${style2}
|
|
|
73555
73610
|
...toolbarIcons,
|
|
73556
73611
|
...config.icons
|
|
73557
73612
|
};
|
|
73613
|
+
this.config.texts = {
|
|
73614
|
+
...toolbarTexts,
|
|
73615
|
+
...config.texts
|
|
73616
|
+
};
|
|
73558
73617
|
this.config.hideButtons = config.hideButtons ?? true;
|
|
73559
73618
|
this.config.responsiveToContainer = config.responsiveToContainer ?? false;
|
|
73560
73619
|
if (!this.config.selector && this.config.element) {
|
|
@@ -73568,6 +73627,7 @@ ${style2}
|
|
|
73568
73627
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
73569
73628
|
superToolbar: this,
|
|
73570
73629
|
icons: this.config.icons,
|
|
73630
|
+
texts: this.config.texts,
|
|
73571
73631
|
fonts: this.config.fonts,
|
|
73572
73632
|
hideButtons: this.config.hideButtons,
|
|
73573
73633
|
isDev: config.isDev
|
|
@@ -73744,6 +73804,7 @@ ${style2}
|
|
|
73744
73804
|
makeToolbarItems_fn = function({
|
|
73745
73805
|
superToolbar,
|
|
73746
73806
|
icons: icons2,
|
|
73807
|
+
texts,
|
|
73747
73808
|
fonts,
|
|
73748
73809
|
hideButtons,
|
|
73749
73810
|
isDev = false
|
|
@@ -73754,6 +73815,7 @@ ${style2}
|
|
|
73754
73815
|
const { defaultItems, overflowItems } = makeDefaultItems({
|
|
73755
73816
|
superToolbar,
|
|
73756
73817
|
toolbarIcons: icons2,
|
|
73818
|
+
toolbarTexts: texts,
|
|
73757
73819
|
toolbarFonts: fonts,
|
|
73758
73820
|
hideButtons,
|
|
73759
73821
|
availableWidth,
|
|
@@ -88967,7 +89029,8 @@ ${style2}
|
|
|
88967
89029
|
handleImageUpload: proxy.$superdoc.config.handleImageUpload,
|
|
88968
89030
|
telemetry: proxy.$superdoc.telemetry,
|
|
88969
89031
|
externalExtensions: proxy.$superdoc.config.editorExtensions || [],
|
|
88970
|
-
|
|
89032
|
+
suppressDefaultDocxStyles: proxy.$superdoc.config.suppressDefaultDocxStyles,
|
|
89033
|
+
jsonOverride: proxy.$superdoc.config.jsonOverride
|
|
88971
89034
|
};
|
|
88972
89035
|
return options2;
|
|
88973
89036
|
};
|
|
@@ -89296,7 +89359,7 @@ ${style2}
|
|
|
89296
89359
|
};
|
|
89297
89360
|
}
|
|
89298
89361
|
};
|
|
89299
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
89362
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e620aa2b"]]);
|
|
89300
89363
|
const createSuperdocVueApp = () => {
|
|
89301
89364
|
const app = createApp(App);
|
|
89302
89365
|
const pinia = createPinia();
|
|
@@ -89355,6 +89418,7 @@ ${style2}
|
|
|
89355
89418
|
// Optional DOM element to render the toolbar in
|
|
89356
89419
|
toolbarGroups: ["left", "center", "right"],
|
|
89357
89420
|
toolbarIcons: {},
|
|
89421
|
+
toolbarTexts: {},
|
|
89358
89422
|
isDev: false,
|
|
89359
89423
|
// telemetry config
|
|
89360
89424
|
telemetry: null,
|
|
@@ -89393,7 +89457,7 @@ ${style2}
|
|
|
89393
89457
|
this.config.colors = shuffleArray(this.config.colors);
|
|
89394
89458
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
89395
89459
|
this.colorIndex = 0;
|
|
89396
|
-
this.version = "0.12.
|
|
89460
|
+
this.version = "0.12.19";
|
|
89397
89461
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
89398
89462
|
this.superdocId = config.superdocId || v4();
|
|
89399
89463
|
this.colors = this.config.colors;
|
|
@@ -89624,6 +89688,7 @@ ${style2}
|
|
|
89624
89688
|
role: this.config.role,
|
|
89625
89689
|
pagination: this.config.pagination,
|
|
89626
89690
|
icons: this.config.modules?.toolbar?.icons || this.config.toolbarIcons,
|
|
89691
|
+
texts: this.config.modules?.toolbar?.texts || this.config.toolbarTexts,
|
|
89627
89692
|
fonts: this.config.modules?.toolbar?.fonts || null,
|
|
89628
89693
|
hideButtons: this.config.modules?.toolbar?.hideButtons ?? true,
|
|
89629
89694
|
responsiveToContainer: this.config.modules?.toolbar?.responsiveToContainer ?? false,
|