@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
|
@@ -23287,7 +23287,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23287
23287
|
return;
|
|
23288
23288
|
}
|
|
23289
23289
|
}
|
|
23290
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.
|
|
23290
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.19") {
|
|
23291
23291
|
const customLocation = "docProps/custom.xml";
|
|
23292
23292
|
if (!docx[customLocation]) {
|
|
23293
23293
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23753,7 +23753,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23753
23753
|
function generateCustomXml() {
|
|
23754
23754
|
return DEFAULT_CUSTOM_XML;
|
|
23755
23755
|
}
|
|
23756
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.
|
|
23756
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.19") {
|
|
23757
23757
|
return {
|
|
23758
23758
|
type: "element",
|
|
23759
23759
|
name: "property",
|
|
@@ -40321,7 +40321,8 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40321
40321
|
numbering: {},
|
|
40322
40322
|
isHeaderOrFooter: false,
|
|
40323
40323
|
lastSelection: null,
|
|
40324
|
-
|
|
40324
|
+
suppressDefaultDocxStyles: false,
|
|
40325
|
+
jsonOverride: false,
|
|
40325
40326
|
onBeforeCreate: () => null,
|
|
40326
40327
|
onCreate: () => null,
|
|
40327
40328
|
onUpdate: () => null,
|
|
@@ -40650,7 +40651,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40650
40651
|
* @returns {void}
|
|
40651
40652
|
*/
|
|
40652
40653
|
initDefaultStyles(element = this.element) {
|
|
40653
|
-
if (this.options.isHeadless || this.options.
|
|
40654
|
+
if (this.options.isHeadless || this.options.suppressDefaultDocxStyles) return;
|
|
40654
40655
|
const proseMirror = element?.querySelector(".ProseMirror");
|
|
40655
40656
|
const { pageSize, pageMargins } = this.converter.pageStyles ?? {};
|
|
40656
40657
|
if (!proseMirror || !pageSize || !pageMargins) {
|
|
@@ -40907,7 +40908,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40907
40908
|
* @returns {Object | void} Migration results
|
|
40908
40909
|
*/
|
|
40909
40910
|
processCollaborationMigrations() {
|
|
40910
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
40911
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.19");
|
|
40911
40912
|
if (!this.options.ydoc) return;
|
|
40912
40913
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
40913
40914
|
let docVersion = metaMap.get("version");
|
|
@@ -41224,6 +41225,7 @@ generatePmData_fn = function() {
|
|
|
41224
41225
|
doc2 = createDocument(this.converter, this.schema, this);
|
|
41225
41226
|
doc2 = __privateMethod$1(this, _Editor_instances, prepareDocumentForImport_fn).call(this, doc2);
|
|
41226
41227
|
if (this.options.html) doc2 = __privateMethod$1(this, _Editor_instances, createDocFromHTML_fn).call(this, this.options.html);
|
|
41228
|
+
else if (this.options.jsonOverride) doc2 = this.schema.nodeFromJSON(this.options.jsonOverride);
|
|
41227
41229
|
if (fragment) doc2 = yXmlFragmentToProseMirrorRootNode(fragment, this.schema);
|
|
41228
41230
|
}
|
|
41229
41231
|
} else if (mode === "text" || mode === "html") {
|
|
@@ -64875,6 +64877,7 @@ const closeDropdown = (dropdown) => {
|
|
|
64875
64877
|
const makeDefaultItems = ({
|
|
64876
64878
|
superToolbar,
|
|
64877
64879
|
toolbarIcons: toolbarIcons2,
|
|
64880
|
+
toolbarTexts: toolbarTexts2,
|
|
64878
64881
|
toolbarFonts,
|
|
64879
64882
|
hideButtons,
|
|
64880
64883
|
availableWidth,
|
|
@@ -64886,12 +64889,12 @@ const makeDefaultItems = ({
|
|
|
64886
64889
|
name: "bold",
|
|
64887
64890
|
command: "toggleBold",
|
|
64888
64891
|
icon: toolbarIcons2.bold,
|
|
64889
|
-
tooltip:
|
|
64892
|
+
tooltip: toolbarTexts2.bold
|
|
64890
64893
|
});
|
|
64891
64894
|
const fontButton = useToolbarItem({
|
|
64892
64895
|
type: "dropdown",
|
|
64893
64896
|
name: "fontFamily",
|
|
64894
|
-
tooltip:
|
|
64897
|
+
tooltip: toolbarTexts2.fontFamily,
|
|
64895
64898
|
command: "setFontFamily",
|
|
64896
64899
|
defaultLabel: "Arial",
|
|
64897
64900
|
label: "Arial",
|
|
@@ -64915,7 +64918,7 @@ const makeDefaultItems = ({
|
|
|
64915
64918
|
outline: "none"
|
|
64916
64919
|
},
|
|
64917
64920
|
name: "ai",
|
|
64918
|
-
tooltip:
|
|
64921
|
+
tooltip: toolbarTexts2.ai,
|
|
64919
64922
|
icon: toolbarIcons2.ai,
|
|
64920
64923
|
hideLabel: true,
|
|
64921
64924
|
hasCaret: false,
|
|
@@ -64961,7 +64964,7 @@ const makeDefaultItems = ({
|
|
|
64961
64964
|
minWidth: "50px",
|
|
64962
64965
|
markName: "textStyle",
|
|
64963
64966
|
labelAttr: "fontSize",
|
|
64964
|
-
tooltip:
|
|
64967
|
+
tooltip: toolbarTexts2.fontSize,
|
|
64965
64968
|
hasCaret: true,
|
|
64966
64969
|
hasInlineTextInput: false,
|
|
64967
64970
|
inlineTextInputVisible: true,
|
|
@@ -65003,14 +65006,14 @@ const makeDefaultItems = ({
|
|
|
65003
65006
|
name: "italic",
|
|
65004
65007
|
command: "toggleItalic",
|
|
65005
65008
|
icon: toolbarIcons2.italic,
|
|
65006
|
-
tooltip:
|
|
65009
|
+
tooltip: toolbarTexts2.italic
|
|
65007
65010
|
});
|
|
65008
65011
|
const underline = useToolbarItem({
|
|
65009
65012
|
type: "button",
|
|
65010
65013
|
name: "underline",
|
|
65011
65014
|
command: "toggleUnderline",
|
|
65012
65015
|
icon: toolbarIcons2.underline,
|
|
65013
|
-
tooltip:
|
|
65016
|
+
tooltip: toolbarTexts2.underline
|
|
65014
65017
|
});
|
|
65015
65018
|
const highlight = useToolbarItem({
|
|
65016
65019
|
type: "dropdown",
|
|
@@ -65019,7 +65022,7 @@ const makeDefaultItems = ({
|
|
|
65019
65022
|
hideLabel: true,
|
|
65020
65023
|
markName: "highlight",
|
|
65021
65024
|
labelAttr: "color",
|
|
65022
|
-
tooltip:
|
|
65025
|
+
tooltip: toolbarTexts2.highlight,
|
|
65023
65026
|
command: "setHighlight",
|
|
65024
65027
|
noArgumentCommand: "unsetHighlight",
|
|
65025
65028
|
suppressActiveHighlight: true,
|
|
@@ -65042,7 +65045,7 @@ const makeDefaultItems = ({
|
|
|
65042
65045
|
hideLabel: true,
|
|
65043
65046
|
markName: "textStyle",
|
|
65044
65047
|
labelAttr: "color",
|
|
65045
|
-
tooltip:
|
|
65048
|
+
tooltip: toolbarTexts2.color,
|
|
65046
65049
|
command: "setColor",
|
|
65047
65050
|
suppressActiveHighlight: true,
|
|
65048
65051
|
options: [
|
|
@@ -65062,7 +65065,7 @@ const makeDefaultItems = ({
|
|
|
65062
65065
|
type: "dropdown",
|
|
65063
65066
|
name: "search",
|
|
65064
65067
|
icon: toolbarIcons2.search,
|
|
65065
|
-
tooltip:
|
|
65068
|
+
tooltip: toolbarTexts2.search,
|
|
65066
65069
|
group: "right",
|
|
65067
65070
|
inputRef: searchRef,
|
|
65068
65071
|
options: [
|
|
@@ -65089,7 +65092,7 @@ const makeDefaultItems = ({
|
|
|
65089
65092
|
name: "link",
|
|
65090
65093
|
markName: "link",
|
|
65091
65094
|
icon: toolbarIcons2.link,
|
|
65092
|
-
tooltip:
|
|
65095
|
+
tooltip: toolbarTexts2.link,
|
|
65093
65096
|
options: [
|
|
65094
65097
|
{
|
|
65095
65098
|
type: "render",
|
|
@@ -65142,7 +65145,7 @@ const makeDefaultItems = ({
|
|
|
65142
65145
|
name: "image",
|
|
65143
65146
|
command: "startImageUpload",
|
|
65144
65147
|
icon: toolbarIcons2.image,
|
|
65145
|
-
tooltip:
|
|
65148
|
+
tooltip: toolbarTexts2.image,
|
|
65146
65149
|
disabled: false
|
|
65147
65150
|
});
|
|
65148
65151
|
const tableItem = useToolbarItem({
|
|
@@ -65151,7 +65154,7 @@ const makeDefaultItems = ({
|
|
|
65151
65154
|
icon: toolbarIcons2.table,
|
|
65152
65155
|
hideLabel: true,
|
|
65153
65156
|
labelAttr: "table",
|
|
65154
|
-
tooltip:
|
|
65157
|
+
tooltip: toolbarTexts2.table,
|
|
65155
65158
|
command: "insertTable",
|
|
65156
65159
|
suppressActiveHighlight: true,
|
|
65157
65160
|
options: [
|
|
@@ -65189,69 +65192,69 @@ const makeDefaultItems = ({
|
|
|
65189
65192
|
});
|
|
65190
65193
|
const tableActionsOptions = [
|
|
65191
65194
|
{
|
|
65192
|
-
label:
|
|
65195
|
+
label: toolbarTexts2.addRowBefore,
|
|
65193
65196
|
command: "addRowBefore",
|
|
65194
65197
|
icon: toolbarIcons2.addRowBefore,
|
|
65195
65198
|
props: { "data-item": "btn-tableActions-option" }
|
|
65196
65199
|
},
|
|
65197
65200
|
{
|
|
65198
|
-
label:
|
|
65201
|
+
label: toolbarTexts2.addRowAfter,
|
|
65199
65202
|
command: "addRowAfter",
|
|
65200
65203
|
icon: toolbarIcons2.addRowAfter,
|
|
65201
65204
|
props: { "data-item": "btn-tableActions-option" }
|
|
65202
65205
|
},
|
|
65203
65206
|
{
|
|
65204
|
-
label:
|
|
65207
|
+
label: toolbarTexts2.addColumnBefore,
|
|
65205
65208
|
command: "addColumnBefore",
|
|
65206
65209
|
icon: toolbarIcons2.addColumnBefore,
|
|
65207
65210
|
props: { "data-item": "btn-tableActions-option" }
|
|
65208
65211
|
},
|
|
65209
65212
|
{
|
|
65210
|
-
label:
|
|
65213
|
+
label: toolbarTexts2.addColumnAfter,
|
|
65211
65214
|
command: "addColumnAfter",
|
|
65212
65215
|
icon: toolbarIcons2.addColumnAfter,
|
|
65213
65216
|
bottomBorder: true,
|
|
65214
65217
|
props: { "data-item": "btn-tableActions-option" }
|
|
65215
65218
|
},
|
|
65216
65219
|
{
|
|
65217
|
-
label:
|
|
65220
|
+
label: toolbarTexts2.deleteRow,
|
|
65218
65221
|
command: "deleteRow",
|
|
65219
65222
|
icon: toolbarIcons2.deleteRow,
|
|
65220
65223
|
props: { "data-item": "btn-tableActions-option" }
|
|
65221
65224
|
},
|
|
65222
65225
|
{
|
|
65223
|
-
label:
|
|
65226
|
+
label: toolbarTexts2.deleteColumn,
|
|
65224
65227
|
command: "deleteColumn",
|
|
65225
65228
|
icon: toolbarIcons2.deleteColumn,
|
|
65226
65229
|
props: { "data-item": "btn-tableActions-option" }
|
|
65227
65230
|
},
|
|
65228
65231
|
{
|
|
65229
|
-
label:
|
|
65232
|
+
label: toolbarTexts2.deleteTable,
|
|
65230
65233
|
command: "deleteTable",
|
|
65231
65234
|
icon: toolbarIcons2.deleteTable,
|
|
65232
65235
|
props: { "data-item": "btn-tableActions-option" }
|
|
65233
65236
|
},
|
|
65234
65237
|
{
|
|
65235
|
-
label:
|
|
65238
|
+
label: toolbarTexts2.transparentBorders,
|
|
65236
65239
|
command: "deleteCellAndTableBorders",
|
|
65237
65240
|
icon: toolbarIcons2.deleteBorders,
|
|
65238
65241
|
bottomBorder: true,
|
|
65239
65242
|
props: { "data-item": "btn-tableActions-option" }
|
|
65240
65243
|
},
|
|
65241
65244
|
{
|
|
65242
|
-
label:
|
|
65245
|
+
label: toolbarTexts2.mergeCells,
|
|
65243
65246
|
command: "mergeCells",
|
|
65244
65247
|
icon: toolbarIcons2.mergeCells,
|
|
65245
65248
|
props: { "data-item": "btn-tableActions-option" }
|
|
65246
65249
|
},
|
|
65247
65250
|
{
|
|
65248
|
-
label:
|
|
65251
|
+
label: toolbarTexts2.splitCell,
|
|
65249
65252
|
command: "splitCell",
|
|
65250
65253
|
icon: toolbarIcons2.splitCell,
|
|
65251
65254
|
props: { "data-item": "btn-tableActions-option" }
|
|
65252
65255
|
},
|
|
65253
65256
|
{
|
|
65254
|
-
label:
|
|
65257
|
+
label: toolbarTexts2.fixTables,
|
|
65255
65258
|
command: "fixTables",
|
|
65256
65259
|
icon: toolbarIcons2.fixTables,
|
|
65257
65260
|
props: { "data-item": "btn-tableActions-option" }
|
|
@@ -65270,7 +65273,7 @@ const makeDefaultItems = ({
|
|
|
65270
65273
|
const alignment2 = useToolbarItem({
|
|
65271
65274
|
type: "dropdown",
|
|
65272
65275
|
name: "textAlign",
|
|
65273
|
-
tooltip:
|
|
65276
|
+
tooltip: toolbarTexts2.textAlign,
|
|
65274
65277
|
icon: toolbarIcons2.alignLeft,
|
|
65275
65278
|
command: "setTextAlign",
|
|
65276
65279
|
hasCaret: true,
|
|
@@ -65320,21 +65323,21 @@ const makeDefaultItems = ({
|
|
|
65320
65323
|
name: "list",
|
|
65321
65324
|
command: "toggleBulletList",
|
|
65322
65325
|
icon: toolbarIcons2.bulletList,
|
|
65323
|
-
tooltip:
|
|
65326
|
+
tooltip: toolbarTexts2.bulletList
|
|
65324
65327
|
});
|
|
65325
65328
|
const numberedList = useToolbarItem({
|
|
65326
65329
|
type: "button",
|
|
65327
65330
|
name: "numberedlist",
|
|
65328
65331
|
command: "toggleOrderedList",
|
|
65329
65332
|
icon: toolbarIcons2.numberedList,
|
|
65330
|
-
tooltip:
|
|
65333
|
+
tooltip: toolbarTexts2.numberedList
|
|
65331
65334
|
});
|
|
65332
65335
|
const indentLeft = useToolbarItem({
|
|
65333
65336
|
type: "button",
|
|
65334
65337
|
name: "indentleft",
|
|
65335
65338
|
command: "decreaseTextIndent",
|
|
65336
65339
|
icon: toolbarIcons2.indentLeft,
|
|
65337
|
-
tooltip:
|
|
65340
|
+
tooltip: toolbarTexts2.indentLeft,
|
|
65338
65341
|
disabled: false
|
|
65339
65342
|
});
|
|
65340
65343
|
const indentRight = useToolbarItem({
|
|
@@ -65342,7 +65345,7 @@ const makeDefaultItems = ({
|
|
|
65342
65345
|
name: "indentright",
|
|
65343
65346
|
command: "increaseTextIndent",
|
|
65344
65347
|
icon: toolbarIcons2.indentRight,
|
|
65345
|
-
tooltip:
|
|
65348
|
+
tooltip: toolbarTexts2.indentRight,
|
|
65346
65349
|
disabled: false
|
|
65347
65350
|
});
|
|
65348
65351
|
const overflow = useToolbarItem({
|
|
@@ -65356,7 +65359,7 @@ const makeDefaultItems = ({
|
|
|
65356
65359
|
type: "dropdown",
|
|
65357
65360
|
name: "zoom",
|
|
65358
65361
|
allowWithoutEditor: true,
|
|
65359
|
-
tooltip:
|
|
65362
|
+
tooltip: toolbarTexts2.zoom,
|
|
65360
65363
|
defaultLabel: "100%",
|
|
65361
65364
|
label: "100%",
|
|
65362
65365
|
hasCaret: true,
|
|
@@ -65382,7 +65385,7 @@ const makeDefaultItems = ({
|
|
|
65382
65385
|
type: "button",
|
|
65383
65386
|
name: "undo",
|
|
65384
65387
|
disabled: true,
|
|
65385
|
-
tooltip:
|
|
65388
|
+
tooltip: toolbarTexts2.undo,
|
|
65386
65389
|
command: "undo",
|
|
65387
65390
|
icon: toolbarIcons2.undo,
|
|
65388
65391
|
group: "left",
|
|
@@ -65394,7 +65397,7 @@ const makeDefaultItems = ({
|
|
|
65394
65397
|
type: "button",
|
|
65395
65398
|
disabled: true,
|
|
65396
65399
|
name: "redo",
|
|
65397
|
-
tooltip:
|
|
65400
|
+
tooltip: toolbarTexts2.redo,
|
|
65398
65401
|
command: "redo",
|
|
65399
65402
|
icon: toolbarIcons2.redo,
|
|
65400
65403
|
group: "left",
|
|
@@ -65406,7 +65409,7 @@ const makeDefaultItems = ({
|
|
|
65406
65409
|
type: "button",
|
|
65407
65410
|
disabled: false,
|
|
65408
65411
|
name: "toggleTrackChanges",
|
|
65409
|
-
tooltip:
|
|
65412
|
+
tooltip: toolbarTexts2.trackChanges,
|
|
65410
65413
|
command: "toggleTrackChanges",
|
|
65411
65414
|
icon: toolbarIcons2.trackChanges,
|
|
65412
65415
|
group: "left"
|
|
@@ -65415,7 +65418,7 @@ const makeDefaultItems = ({
|
|
|
65415
65418
|
type: "button",
|
|
65416
65419
|
disabled: false,
|
|
65417
65420
|
name: "acceptTrackedChangeBySelection",
|
|
65418
|
-
tooltip:
|
|
65421
|
+
tooltip: toolbarTexts2.trackChangesAccept,
|
|
65419
65422
|
command: "acceptTrackedChangeBySelection",
|
|
65420
65423
|
icon: toolbarIcons2.trackChangesAccept,
|
|
65421
65424
|
group: "left"
|
|
@@ -65424,7 +65427,7 @@ const makeDefaultItems = ({
|
|
|
65424
65427
|
type: "button",
|
|
65425
65428
|
disabled: false,
|
|
65426
65429
|
name: "rejectTrackedChangeOnSelection",
|
|
65427
|
-
tooltip:
|
|
65430
|
+
tooltip: toolbarTexts2.trackChangesReject,
|
|
65428
65431
|
command: "rejectTrackedChangeOnSelection",
|
|
65429
65432
|
icon: toolbarIcons2.trackChangesReject,
|
|
65430
65433
|
group: "left"
|
|
@@ -65433,7 +65436,7 @@ const makeDefaultItems = ({
|
|
|
65433
65436
|
type: "button",
|
|
65434
65437
|
disabled: false,
|
|
65435
65438
|
name: "toggleTrackChangesShowOriginal",
|
|
65436
|
-
tooltip:
|
|
65439
|
+
tooltip: toolbarTexts2.trackChangesOriginal,
|
|
65437
65440
|
command: "toggleTrackChangesShowOriginal",
|
|
65438
65441
|
icon: toolbarIcons2.trackChangesOriginal,
|
|
65439
65442
|
group: "left"
|
|
@@ -65442,7 +65445,7 @@ const makeDefaultItems = ({
|
|
|
65442
65445
|
type: "button",
|
|
65443
65446
|
disabled: false,
|
|
65444
65447
|
name: "toggleTrackChangesShowFinal",
|
|
65445
|
-
tooltip:
|
|
65448
|
+
tooltip: toolbarTexts2.trackChangesFinal,
|
|
65446
65449
|
command: "toggleTrackChangesShowFinal",
|
|
65447
65450
|
icon: toolbarIcons2.trackChangesFinal,
|
|
65448
65451
|
group: "left"
|
|
@@ -65451,7 +65454,7 @@ const makeDefaultItems = ({
|
|
|
65451
65454
|
type: "button",
|
|
65452
65455
|
name: "clearFormatting",
|
|
65453
65456
|
command: "clearFormat",
|
|
65454
|
-
tooltip:
|
|
65457
|
+
tooltip: toolbarTexts2.clearFormatting,
|
|
65455
65458
|
icon: toolbarIcons2.clearFormatting
|
|
65456
65459
|
});
|
|
65457
65460
|
[
|
|
@@ -65466,7 +65469,7 @@ const makeDefaultItems = ({
|
|
|
65466
65469
|
const copyFormat = useToolbarItem({
|
|
65467
65470
|
type: "button",
|
|
65468
65471
|
name: "copyFormat",
|
|
65469
|
-
tooltip:
|
|
65472
|
+
tooltip: toolbarTexts2.copyFormat,
|
|
65470
65473
|
icon: toolbarIcons2.copyFormat,
|
|
65471
65474
|
command: "copyFormat"
|
|
65472
65475
|
});
|
|
@@ -65508,22 +65511,22 @@ const makeDefaultItems = ({
|
|
|
65508
65511
|
});
|
|
65509
65512
|
const documentOptions = [
|
|
65510
65513
|
{
|
|
65511
|
-
label:
|
|
65514
|
+
label: toolbarTexts2.documentEditingMode,
|
|
65512
65515
|
value: "editing",
|
|
65513
65516
|
icon: toolbarIcons2.documentEditingMode,
|
|
65514
|
-
description:
|
|
65517
|
+
description: toolbarTexts2.documentEditingModeDescription
|
|
65515
65518
|
},
|
|
65516
65519
|
{
|
|
65517
|
-
label:
|
|
65520
|
+
label: toolbarTexts2.documentSuggestingMode,
|
|
65518
65521
|
value: "suggesting",
|
|
65519
65522
|
icon: toolbarIcons2.documentSuggestingMode,
|
|
65520
|
-
description:
|
|
65523
|
+
description: toolbarTexts2.documentSuggestingModeDescription
|
|
65521
65524
|
},
|
|
65522
65525
|
{
|
|
65523
|
-
label:
|
|
65526
|
+
label: toolbarTexts2.documentViewingMode,
|
|
65524
65527
|
value: "viewing",
|
|
65525
65528
|
icon: toolbarIcons2.documentViewingMode,
|
|
65526
|
-
description:
|
|
65529
|
+
description: toolbarTexts2.documentViewingModeDescription
|
|
65527
65530
|
}
|
|
65528
65531
|
];
|
|
65529
65532
|
function renderDocumentMode(renderDocumentButton) {
|
|
@@ -65544,7 +65547,7 @@ const makeDefaultItems = ({
|
|
|
65544
65547
|
name: "pageBreakTool",
|
|
65545
65548
|
command: "insertPageBreak",
|
|
65546
65549
|
icon: toolbarIcons2.pageBreak,
|
|
65547
|
-
tooltip:
|
|
65550
|
+
tooltip: toolbarTexts2.pageBreak
|
|
65548
65551
|
});
|
|
65549
65552
|
const controlSizes = /* @__PURE__ */ new Map([
|
|
65550
65553
|
["separator", 20],
|
|
@@ -65562,7 +65565,7 @@ const makeDefaultItems = ({
|
|
|
65562
65565
|
name: "ruler",
|
|
65563
65566
|
command: "toggleRuler",
|
|
65564
65567
|
icon: toolbarIcons2.ruler,
|
|
65565
|
-
tooltip:
|
|
65568
|
+
tooltip: toolbarTexts2.ruler
|
|
65566
65569
|
});
|
|
65567
65570
|
const selectedLinkedStyle = ref$1(null);
|
|
65568
65571
|
const linkedStyles = useToolbarItem({
|
|
@@ -65570,8 +65573,8 @@ const makeDefaultItems = ({
|
|
|
65570
65573
|
name: "linkedStyles",
|
|
65571
65574
|
command: "setLinkedStyle",
|
|
65572
65575
|
icon: toolbarIcons2.paintbrush,
|
|
65573
|
-
defaultLabel:
|
|
65574
|
-
label:
|
|
65576
|
+
defaultLabel: toolbarTexts2.formatText,
|
|
65577
|
+
label: toolbarTexts2.formatText,
|
|
65575
65578
|
hasCaret: true,
|
|
65576
65579
|
isWide: true,
|
|
65577
65580
|
style: { width: "140px" },
|
|
@@ -65615,7 +65618,7 @@ const makeDefaultItems = ({
|
|
|
65615
65618
|
const lineHeight2 = useToolbarItem({
|
|
65616
65619
|
type: "dropdown",
|
|
65617
65620
|
name: "lineHeight",
|
|
65618
|
-
tooltip:
|
|
65621
|
+
tooltip: toolbarTexts2.lineHeight,
|
|
65619
65622
|
icon: toolbarIcons2.lineHeight,
|
|
65620
65623
|
hasCaret: false,
|
|
65621
65624
|
hasInlineTextInput: false,
|
|
@@ -65877,6 +65880,56 @@ const startImageUpload = async ({ editor, view, file }) => {
|
|
|
65877
65880
|
}
|
|
65878
65881
|
);
|
|
65879
65882
|
};
|
|
65883
|
+
const toolbarTexts = {
|
|
65884
|
+
bold: "Bold",
|
|
65885
|
+
fontFamily: "Font",
|
|
65886
|
+
ai: "AI text generation",
|
|
65887
|
+
fontSize: "Font size",
|
|
65888
|
+
italic: "Italic",
|
|
65889
|
+
underline: "Underline",
|
|
65890
|
+
highlight: "Highlight color",
|
|
65891
|
+
color: "Text color",
|
|
65892
|
+
search: "Search",
|
|
65893
|
+
link: "Link",
|
|
65894
|
+
image: "Image",
|
|
65895
|
+
table: "Insert table",
|
|
65896
|
+
addRowBefore: "Insert row above",
|
|
65897
|
+
addRowAfter: "Insert row below",
|
|
65898
|
+
addColumnBefore: "Insert column left",
|
|
65899
|
+
addColumnAfter: "Insert column right",
|
|
65900
|
+
deleteRow: "Delete row",
|
|
65901
|
+
deleteColumn: "Delete column",
|
|
65902
|
+
deleteTable: "Delete table",
|
|
65903
|
+
transparentBorders: "Transparent borders",
|
|
65904
|
+
mergeCells: "Merge cells",
|
|
65905
|
+
splitCell: "Split cell",
|
|
65906
|
+
fixTables: "Fix tables",
|
|
65907
|
+
textAlign: "Alignment",
|
|
65908
|
+
bulletList: "Bullet list",
|
|
65909
|
+
numberedList: "Numbered list",
|
|
65910
|
+
indentLeft: "Left indent",
|
|
65911
|
+
indentRight: "Right indent",
|
|
65912
|
+
zoom: "Zoom",
|
|
65913
|
+
undo: "Undo",
|
|
65914
|
+
redo: "Redo",
|
|
65915
|
+
trackChanges: "Track Changes",
|
|
65916
|
+
trackChangesAccept: "Accept changes under selection",
|
|
65917
|
+
trackChangesReject: "Reject changes under selection",
|
|
65918
|
+
trackChangesOriginal: "Toggle Show Original",
|
|
65919
|
+
trackChangesFinal: "Toggle Show Final",
|
|
65920
|
+
clearFormatting: "Clear formatting",
|
|
65921
|
+
copyFormat: "Format painter",
|
|
65922
|
+
lineHeight: "Line height",
|
|
65923
|
+
formatText: "Format text",
|
|
65924
|
+
ruler: "Show or hide ruler",
|
|
65925
|
+
pageBreak: "Insert page break",
|
|
65926
|
+
documentEditingMode: "Editing",
|
|
65927
|
+
documentSuggestingMode: "Suggesting",
|
|
65928
|
+
documentViewingMode: "Viewing",
|
|
65929
|
+
documentEditingModeDescription: "Edit document directly",
|
|
65930
|
+
documentSuggestingModeDescription: "Edits become suggestions",
|
|
65931
|
+
documentViewingModeDescription: "View clean version of document only"
|
|
65932
|
+
};
|
|
65880
65933
|
class SuperToolbar extends EventEmitter2 {
|
|
65881
65934
|
/**
|
|
65882
65935
|
* Creates a new SuperToolbar instance
|
|
@@ -65892,6 +65945,7 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
65892
65945
|
role: "editor",
|
|
65893
65946
|
pagination: false,
|
|
65894
65947
|
icons: { ...toolbarIcons },
|
|
65948
|
+
texts: { ...toolbarTexts },
|
|
65895
65949
|
fonts: null,
|
|
65896
65950
|
hideButtons: true,
|
|
65897
65951
|
responsiveToContainer: false,
|
|
@@ -66155,6 +66209,7 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
66155
66209
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
66156
66210
|
superToolbar: this,
|
|
66157
66211
|
icons: this.config.icons,
|
|
66212
|
+
texts: this.config.texts,
|
|
66158
66213
|
fonts: this.config.fonts,
|
|
66159
66214
|
hideButtons: this.config.hideButtons,
|
|
66160
66215
|
isDev: this.isDev
|
|
@@ -66178,6 +66233,10 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
66178
66233
|
...toolbarIcons,
|
|
66179
66234
|
...config.icons
|
|
66180
66235
|
};
|
|
66236
|
+
this.config.texts = {
|
|
66237
|
+
...toolbarTexts,
|
|
66238
|
+
...config.texts
|
|
66239
|
+
};
|
|
66181
66240
|
this.config.hideButtons = config.hideButtons ?? true;
|
|
66182
66241
|
this.config.responsiveToContainer = config.responsiveToContainer ?? false;
|
|
66183
66242
|
if (!this.config.selector && this.config.element) {
|
|
@@ -66191,6 +66250,7 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
66191
66250
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
66192
66251
|
superToolbar: this,
|
|
66193
66252
|
icons: this.config.icons,
|
|
66253
|
+
texts: this.config.texts,
|
|
66194
66254
|
fonts: this.config.fonts,
|
|
66195
66255
|
hideButtons: this.config.hideButtons,
|
|
66196
66256
|
isDev: config.isDev
|
|
@@ -66367,6 +66427,7 @@ _interceptedCommands = /* @__PURE__ */ new WeakMap();
|
|
|
66367
66427
|
makeToolbarItems_fn = function({
|
|
66368
66428
|
superToolbar,
|
|
66369
66429
|
icons: icons2,
|
|
66430
|
+
texts,
|
|
66370
66431
|
fonts,
|
|
66371
66432
|
hideButtons,
|
|
66372
66433
|
isDev = false
|
|
@@ -66377,6 +66438,7 @@ makeToolbarItems_fn = function({
|
|
|
66377
66438
|
const { defaultItems, overflowItems } = makeDefaultItems({
|
|
66378
66439
|
superToolbar,
|
|
66379
66440
|
toolbarIcons: icons2,
|
|
66441
|
+
toolbarTexts: texts,
|
|
66380
66442
|
toolbarFonts: fonts,
|
|
66381
66443
|
hideButtons,
|
|
66382
66444
|
availableWidth,
|