@harbour-enterprises/superdoc 0.12.18 → 0.12.20
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-DIiFOcde.es.js → super-editor.es-Bwk4Mypj.es.js} +119 -52
- package/dist/chunks/{super-editor.es-DK2NC1Gl.cjs → super-editor.es-Y854o0UB.cjs} +119 -52
- package/dist/core/SuperDoc.d.ts +5 -0
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-BbPgOxa0.js → converter-B8bdBUgY.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-Ce0B_FTd.js → docx-zipper-CQsKTRQj.js} +1 -1
- package/dist/super-editor/chunks/{editor-CU4NcQRP.js → editor-NAeVYoNG.js} +10 -3
- package/dist/super-editor/chunks/{toolbar-BhjcMYDy.js → toolbar-CMBy65X5.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/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/paragraph/helpers/getDefaultSpacing.d.ts +7 -0
- package/dist/super-editor/extensions/paragraph/helpers/getDefaultSpacing.d.ts.map +1 -0
- package/dist/super-editor/extensions/paragraph/paragraph.d.ts.map +1 -1
- 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 +4 -2
- package/dist/superdoc.es.js +5 -3
- package/dist/superdoc.umd.js +122 -53
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -23304,7 +23304,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23304
23304
|
return;
|
|
23305
23305
|
}
|
|
23306
23306
|
}
|
|
23307
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.
|
|
23307
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.20") {
|
|
23308
23308
|
const customLocation = "docProps/custom.xml";
|
|
23309
23309
|
if (!docx[customLocation]) {
|
|
23310
23310
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23770,7 +23770,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23770
23770
|
function generateCustomXml() {
|
|
23771
23771
|
return DEFAULT_CUSTOM_XML;
|
|
23772
23772
|
}
|
|
23773
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.
|
|
23773
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.20") {
|
|
23774
23774
|
return {
|
|
23775
23775
|
type: "element",
|
|
23776
23776
|
name: "property",
|
|
@@ -40925,7 +40925,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40925
40925
|
* @returns {Object | void} Migration results
|
|
40926
40926
|
*/
|
|
40927
40927
|
processCollaborationMigrations() {
|
|
40928
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
40928
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.20");
|
|
40929
40929
|
if (!this.options.ydoc) return;
|
|
40930
40930
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
40931
40931
|
let docVersion = metaMap.get("version");
|
|
@@ -43582,6 +43582,12 @@ const getQuickFormatList = (editor) => {
|
|
|
43582
43582
|
return a.definition.attrs?.name.localeCompare(b.definition.attrs?.name);
|
|
43583
43583
|
});
|
|
43584
43584
|
};
|
|
43585
|
+
const getDefaultSpacing = () => ({
|
|
43586
|
+
lineSpaceAfter: 0,
|
|
43587
|
+
lineSpaceBefore: 0,
|
|
43588
|
+
line: 0,
|
|
43589
|
+
lineRule: null
|
|
43590
|
+
});
|
|
43585
43591
|
const Paragraph = Node$1.create({
|
|
43586
43592
|
name: "paragraph",
|
|
43587
43593
|
priority: 1e3,
|
|
@@ -43596,6 +43602,7 @@ const Paragraph = Node$1.create({
|
|
|
43596
43602
|
addAttributes() {
|
|
43597
43603
|
return {
|
|
43598
43604
|
spacing: {
|
|
43605
|
+
default: getDefaultSpacing(),
|
|
43599
43606
|
renderDOM: (attrs) => {
|
|
43600
43607
|
const { spacing } = attrs;
|
|
43601
43608
|
if (!spacing) return {};
|
|
@@ -64894,6 +64901,7 @@ const closeDropdown = (dropdown) => {
|
|
|
64894
64901
|
const makeDefaultItems = ({
|
|
64895
64902
|
superToolbar,
|
|
64896
64903
|
toolbarIcons: toolbarIcons2,
|
|
64904
|
+
toolbarTexts: toolbarTexts2,
|
|
64897
64905
|
toolbarFonts,
|
|
64898
64906
|
hideButtons,
|
|
64899
64907
|
availableWidth,
|
|
@@ -64905,12 +64913,12 @@ const makeDefaultItems = ({
|
|
|
64905
64913
|
name: "bold",
|
|
64906
64914
|
command: "toggleBold",
|
|
64907
64915
|
icon: toolbarIcons2.bold,
|
|
64908
|
-
tooltip:
|
|
64916
|
+
tooltip: toolbarTexts2.bold
|
|
64909
64917
|
});
|
|
64910
64918
|
const fontButton = useToolbarItem({
|
|
64911
64919
|
type: "dropdown",
|
|
64912
64920
|
name: "fontFamily",
|
|
64913
|
-
tooltip:
|
|
64921
|
+
tooltip: toolbarTexts2.fontFamily,
|
|
64914
64922
|
command: "setFontFamily",
|
|
64915
64923
|
defaultLabel: "Arial",
|
|
64916
64924
|
label: "Arial",
|
|
@@ -64934,7 +64942,7 @@ const makeDefaultItems = ({
|
|
|
64934
64942
|
outline: "none"
|
|
64935
64943
|
},
|
|
64936
64944
|
name: "ai",
|
|
64937
|
-
tooltip:
|
|
64945
|
+
tooltip: toolbarTexts2.ai,
|
|
64938
64946
|
icon: toolbarIcons2.ai,
|
|
64939
64947
|
hideLabel: true,
|
|
64940
64948
|
hasCaret: false,
|
|
@@ -64980,7 +64988,7 @@ const makeDefaultItems = ({
|
|
|
64980
64988
|
minWidth: "50px",
|
|
64981
64989
|
markName: "textStyle",
|
|
64982
64990
|
labelAttr: "fontSize",
|
|
64983
|
-
tooltip:
|
|
64991
|
+
tooltip: toolbarTexts2.fontSize,
|
|
64984
64992
|
hasCaret: true,
|
|
64985
64993
|
hasInlineTextInput: false,
|
|
64986
64994
|
inlineTextInputVisible: true,
|
|
@@ -65022,14 +65030,14 @@ const makeDefaultItems = ({
|
|
|
65022
65030
|
name: "italic",
|
|
65023
65031
|
command: "toggleItalic",
|
|
65024
65032
|
icon: toolbarIcons2.italic,
|
|
65025
|
-
tooltip:
|
|
65033
|
+
tooltip: toolbarTexts2.italic
|
|
65026
65034
|
});
|
|
65027
65035
|
const underline = useToolbarItem({
|
|
65028
65036
|
type: "button",
|
|
65029
65037
|
name: "underline",
|
|
65030
65038
|
command: "toggleUnderline",
|
|
65031
65039
|
icon: toolbarIcons2.underline,
|
|
65032
|
-
tooltip:
|
|
65040
|
+
tooltip: toolbarTexts2.underline
|
|
65033
65041
|
});
|
|
65034
65042
|
const highlight = useToolbarItem({
|
|
65035
65043
|
type: "dropdown",
|
|
@@ -65038,7 +65046,7 @@ const makeDefaultItems = ({
|
|
|
65038
65046
|
hideLabel: true,
|
|
65039
65047
|
markName: "highlight",
|
|
65040
65048
|
labelAttr: "color",
|
|
65041
|
-
tooltip:
|
|
65049
|
+
tooltip: toolbarTexts2.highlight,
|
|
65042
65050
|
command: "setHighlight",
|
|
65043
65051
|
noArgumentCommand: "unsetHighlight",
|
|
65044
65052
|
suppressActiveHighlight: true,
|
|
@@ -65061,7 +65069,7 @@ const makeDefaultItems = ({
|
|
|
65061
65069
|
hideLabel: true,
|
|
65062
65070
|
markName: "textStyle",
|
|
65063
65071
|
labelAttr: "color",
|
|
65064
|
-
tooltip:
|
|
65072
|
+
tooltip: toolbarTexts2.color,
|
|
65065
65073
|
command: "setColor",
|
|
65066
65074
|
suppressActiveHighlight: true,
|
|
65067
65075
|
options: [
|
|
@@ -65081,7 +65089,7 @@ const makeDefaultItems = ({
|
|
|
65081
65089
|
type: "dropdown",
|
|
65082
65090
|
name: "search",
|
|
65083
65091
|
icon: toolbarIcons2.search,
|
|
65084
|
-
tooltip:
|
|
65092
|
+
tooltip: toolbarTexts2.search,
|
|
65085
65093
|
group: "right",
|
|
65086
65094
|
inputRef: searchRef,
|
|
65087
65095
|
options: [
|
|
@@ -65108,7 +65116,7 @@ const makeDefaultItems = ({
|
|
|
65108
65116
|
name: "link",
|
|
65109
65117
|
markName: "link",
|
|
65110
65118
|
icon: toolbarIcons2.link,
|
|
65111
|
-
tooltip:
|
|
65119
|
+
tooltip: toolbarTexts2.link,
|
|
65112
65120
|
options: [
|
|
65113
65121
|
{
|
|
65114
65122
|
type: "render",
|
|
@@ -65161,7 +65169,7 @@ const makeDefaultItems = ({
|
|
|
65161
65169
|
name: "image",
|
|
65162
65170
|
command: "startImageUpload",
|
|
65163
65171
|
icon: toolbarIcons2.image,
|
|
65164
|
-
tooltip:
|
|
65172
|
+
tooltip: toolbarTexts2.image,
|
|
65165
65173
|
disabled: false
|
|
65166
65174
|
});
|
|
65167
65175
|
const tableItem = useToolbarItem({
|
|
@@ -65170,7 +65178,7 @@ const makeDefaultItems = ({
|
|
|
65170
65178
|
icon: toolbarIcons2.table,
|
|
65171
65179
|
hideLabel: true,
|
|
65172
65180
|
labelAttr: "table",
|
|
65173
|
-
tooltip:
|
|
65181
|
+
tooltip: toolbarTexts2.table,
|
|
65174
65182
|
command: "insertTable",
|
|
65175
65183
|
suppressActiveHighlight: true,
|
|
65176
65184
|
options: [
|
|
@@ -65208,69 +65216,69 @@ const makeDefaultItems = ({
|
|
|
65208
65216
|
});
|
|
65209
65217
|
const tableActionsOptions = [
|
|
65210
65218
|
{
|
|
65211
|
-
label:
|
|
65219
|
+
label: toolbarTexts2.addRowBefore,
|
|
65212
65220
|
command: "addRowBefore",
|
|
65213
65221
|
icon: toolbarIcons2.addRowBefore,
|
|
65214
65222
|
props: { "data-item": "btn-tableActions-option" }
|
|
65215
65223
|
},
|
|
65216
65224
|
{
|
|
65217
|
-
label:
|
|
65225
|
+
label: toolbarTexts2.addRowAfter,
|
|
65218
65226
|
command: "addRowAfter",
|
|
65219
65227
|
icon: toolbarIcons2.addRowAfter,
|
|
65220
65228
|
props: { "data-item": "btn-tableActions-option" }
|
|
65221
65229
|
},
|
|
65222
65230
|
{
|
|
65223
|
-
label:
|
|
65231
|
+
label: toolbarTexts2.addColumnBefore,
|
|
65224
65232
|
command: "addColumnBefore",
|
|
65225
65233
|
icon: toolbarIcons2.addColumnBefore,
|
|
65226
65234
|
props: { "data-item": "btn-tableActions-option" }
|
|
65227
65235
|
},
|
|
65228
65236
|
{
|
|
65229
|
-
label:
|
|
65237
|
+
label: toolbarTexts2.addColumnAfter,
|
|
65230
65238
|
command: "addColumnAfter",
|
|
65231
65239
|
icon: toolbarIcons2.addColumnAfter,
|
|
65232
65240
|
bottomBorder: true,
|
|
65233
65241
|
props: { "data-item": "btn-tableActions-option" }
|
|
65234
65242
|
},
|
|
65235
65243
|
{
|
|
65236
|
-
label:
|
|
65244
|
+
label: toolbarTexts2.deleteRow,
|
|
65237
65245
|
command: "deleteRow",
|
|
65238
65246
|
icon: toolbarIcons2.deleteRow,
|
|
65239
65247
|
props: { "data-item": "btn-tableActions-option" }
|
|
65240
65248
|
},
|
|
65241
65249
|
{
|
|
65242
|
-
label:
|
|
65250
|
+
label: toolbarTexts2.deleteColumn,
|
|
65243
65251
|
command: "deleteColumn",
|
|
65244
65252
|
icon: toolbarIcons2.deleteColumn,
|
|
65245
65253
|
props: { "data-item": "btn-tableActions-option" }
|
|
65246
65254
|
},
|
|
65247
65255
|
{
|
|
65248
|
-
label:
|
|
65256
|
+
label: toolbarTexts2.deleteTable,
|
|
65249
65257
|
command: "deleteTable",
|
|
65250
65258
|
icon: toolbarIcons2.deleteTable,
|
|
65251
65259
|
props: { "data-item": "btn-tableActions-option" }
|
|
65252
65260
|
},
|
|
65253
65261
|
{
|
|
65254
|
-
label:
|
|
65262
|
+
label: toolbarTexts2.transparentBorders,
|
|
65255
65263
|
command: "deleteCellAndTableBorders",
|
|
65256
65264
|
icon: toolbarIcons2.deleteBorders,
|
|
65257
65265
|
bottomBorder: true,
|
|
65258
65266
|
props: { "data-item": "btn-tableActions-option" }
|
|
65259
65267
|
},
|
|
65260
65268
|
{
|
|
65261
|
-
label:
|
|
65269
|
+
label: toolbarTexts2.mergeCells,
|
|
65262
65270
|
command: "mergeCells",
|
|
65263
65271
|
icon: toolbarIcons2.mergeCells,
|
|
65264
65272
|
props: { "data-item": "btn-tableActions-option" }
|
|
65265
65273
|
},
|
|
65266
65274
|
{
|
|
65267
|
-
label:
|
|
65275
|
+
label: toolbarTexts2.splitCell,
|
|
65268
65276
|
command: "splitCell",
|
|
65269
65277
|
icon: toolbarIcons2.splitCell,
|
|
65270
65278
|
props: { "data-item": "btn-tableActions-option" }
|
|
65271
65279
|
},
|
|
65272
65280
|
{
|
|
65273
|
-
label:
|
|
65281
|
+
label: toolbarTexts2.fixTables,
|
|
65274
65282
|
command: "fixTables",
|
|
65275
65283
|
icon: toolbarIcons2.fixTables,
|
|
65276
65284
|
props: { "data-item": "btn-tableActions-option" }
|
|
@@ -65289,7 +65297,7 @@ const makeDefaultItems = ({
|
|
|
65289
65297
|
const alignment2 = useToolbarItem({
|
|
65290
65298
|
type: "dropdown",
|
|
65291
65299
|
name: "textAlign",
|
|
65292
|
-
tooltip:
|
|
65300
|
+
tooltip: toolbarTexts2.textAlign,
|
|
65293
65301
|
icon: toolbarIcons2.alignLeft,
|
|
65294
65302
|
command: "setTextAlign",
|
|
65295
65303
|
hasCaret: true,
|
|
@@ -65339,21 +65347,21 @@ const makeDefaultItems = ({
|
|
|
65339
65347
|
name: "list",
|
|
65340
65348
|
command: "toggleBulletList",
|
|
65341
65349
|
icon: toolbarIcons2.bulletList,
|
|
65342
|
-
tooltip:
|
|
65350
|
+
tooltip: toolbarTexts2.bulletList
|
|
65343
65351
|
});
|
|
65344
65352
|
const numberedList = useToolbarItem({
|
|
65345
65353
|
type: "button",
|
|
65346
65354
|
name: "numberedlist",
|
|
65347
65355
|
command: "toggleOrderedList",
|
|
65348
65356
|
icon: toolbarIcons2.numberedList,
|
|
65349
|
-
tooltip:
|
|
65357
|
+
tooltip: toolbarTexts2.numberedList
|
|
65350
65358
|
});
|
|
65351
65359
|
const indentLeft = useToolbarItem({
|
|
65352
65360
|
type: "button",
|
|
65353
65361
|
name: "indentleft",
|
|
65354
65362
|
command: "decreaseTextIndent",
|
|
65355
65363
|
icon: toolbarIcons2.indentLeft,
|
|
65356
|
-
tooltip:
|
|
65364
|
+
tooltip: toolbarTexts2.indentLeft,
|
|
65357
65365
|
disabled: false
|
|
65358
65366
|
});
|
|
65359
65367
|
const indentRight = useToolbarItem({
|
|
@@ -65361,7 +65369,7 @@ const makeDefaultItems = ({
|
|
|
65361
65369
|
name: "indentright",
|
|
65362
65370
|
command: "increaseTextIndent",
|
|
65363
65371
|
icon: toolbarIcons2.indentRight,
|
|
65364
|
-
tooltip:
|
|
65372
|
+
tooltip: toolbarTexts2.indentRight,
|
|
65365
65373
|
disabled: false
|
|
65366
65374
|
});
|
|
65367
65375
|
const overflow = useToolbarItem({
|
|
@@ -65375,7 +65383,7 @@ const makeDefaultItems = ({
|
|
|
65375
65383
|
type: "dropdown",
|
|
65376
65384
|
name: "zoom",
|
|
65377
65385
|
allowWithoutEditor: true,
|
|
65378
|
-
tooltip:
|
|
65386
|
+
tooltip: toolbarTexts2.zoom,
|
|
65379
65387
|
defaultLabel: "100%",
|
|
65380
65388
|
label: "100%",
|
|
65381
65389
|
hasCaret: true,
|
|
@@ -65401,7 +65409,7 @@ const makeDefaultItems = ({
|
|
|
65401
65409
|
type: "button",
|
|
65402
65410
|
name: "undo",
|
|
65403
65411
|
disabled: true,
|
|
65404
|
-
tooltip:
|
|
65412
|
+
tooltip: toolbarTexts2.undo,
|
|
65405
65413
|
command: "undo",
|
|
65406
65414
|
icon: toolbarIcons2.undo,
|
|
65407
65415
|
group: "left",
|
|
@@ -65413,7 +65421,7 @@ const makeDefaultItems = ({
|
|
|
65413
65421
|
type: "button",
|
|
65414
65422
|
disabled: true,
|
|
65415
65423
|
name: "redo",
|
|
65416
|
-
tooltip:
|
|
65424
|
+
tooltip: toolbarTexts2.redo,
|
|
65417
65425
|
command: "redo",
|
|
65418
65426
|
icon: toolbarIcons2.redo,
|
|
65419
65427
|
group: "left",
|
|
@@ -65425,7 +65433,7 @@ const makeDefaultItems = ({
|
|
|
65425
65433
|
type: "button",
|
|
65426
65434
|
disabled: false,
|
|
65427
65435
|
name: "toggleTrackChanges",
|
|
65428
|
-
tooltip:
|
|
65436
|
+
tooltip: toolbarTexts2.trackChanges,
|
|
65429
65437
|
command: "toggleTrackChanges",
|
|
65430
65438
|
icon: toolbarIcons2.trackChanges,
|
|
65431
65439
|
group: "left"
|
|
@@ -65434,7 +65442,7 @@ const makeDefaultItems = ({
|
|
|
65434
65442
|
type: "button",
|
|
65435
65443
|
disabled: false,
|
|
65436
65444
|
name: "acceptTrackedChangeBySelection",
|
|
65437
|
-
tooltip:
|
|
65445
|
+
tooltip: toolbarTexts2.trackChangesAccept,
|
|
65438
65446
|
command: "acceptTrackedChangeBySelection",
|
|
65439
65447
|
icon: toolbarIcons2.trackChangesAccept,
|
|
65440
65448
|
group: "left"
|
|
@@ -65443,7 +65451,7 @@ const makeDefaultItems = ({
|
|
|
65443
65451
|
type: "button",
|
|
65444
65452
|
disabled: false,
|
|
65445
65453
|
name: "rejectTrackedChangeOnSelection",
|
|
65446
|
-
tooltip:
|
|
65454
|
+
tooltip: toolbarTexts2.trackChangesReject,
|
|
65447
65455
|
command: "rejectTrackedChangeOnSelection",
|
|
65448
65456
|
icon: toolbarIcons2.trackChangesReject,
|
|
65449
65457
|
group: "left"
|
|
@@ -65452,7 +65460,7 @@ const makeDefaultItems = ({
|
|
|
65452
65460
|
type: "button",
|
|
65453
65461
|
disabled: false,
|
|
65454
65462
|
name: "toggleTrackChangesShowOriginal",
|
|
65455
|
-
tooltip:
|
|
65463
|
+
tooltip: toolbarTexts2.trackChangesOriginal,
|
|
65456
65464
|
command: "toggleTrackChangesShowOriginal",
|
|
65457
65465
|
icon: toolbarIcons2.trackChangesOriginal,
|
|
65458
65466
|
group: "left"
|
|
@@ -65461,7 +65469,7 @@ const makeDefaultItems = ({
|
|
|
65461
65469
|
type: "button",
|
|
65462
65470
|
disabled: false,
|
|
65463
65471
|
name: "toggleTrackChangesShowFinal",
|
|
65464
|
-
tooltip:
|
|
65472
|
+
tooltip: toolbarTexts2.trackChangesFinal,
|
|
65465
65473
|
command: "toggleTrackChangesShowFinal",
|
|
65466
65474
|
icon: toolbarIcons2.trackChangesFinal,
|
|
65467
65475
|
group: "left"
|
|
@@ -65470,7 +65478,7 @@ const makeDefaultItems = ({
|
|
|
65470
65478
|
type: "button",
|
|
65471
65479
|
name: "clearFormatting",
|
|
65472
65480
|
command: "clearFormat",
|
|
65473
|
-
tooltip:
|
|
65481
|
+
tooltip: toolbarTexts2.clearFormatting,
|
|
65474
65482
|
icon: toolbarIcons2.clearFormatting
|
|
65475
65483
|
});
|
|
65476
65484
|
[
|
|
@@ -65485,7 +65493,7 @@ const makeDefaultItems = ({
|
|
|
65485
65493
|
const copyFormat = useToolbarItem({
|
|
65486
65494
|
type: "button",
|
|
65487
65495
|
name: "copyFormat",
|
|
65488
|
-
tooltip:
|
|
65496
|
+
tooltip: toolbarTexts2.copyFormat,
|
|
65489
65497
|
icon: toolbarIcons2.copyFormat,
|
|
65490
65498
|
command: "copyFormat"
|
|
65491
65499
|
});
|
|
@@ -65527,22 +65535,22 @@ const makeDefaultItems = ({
|
|
|
65527
65535
|
});
|
|
65528
65536
|
const documentOptions = [
|
|
65529
65537
|
{
|
|
65530
|
-
label:
|
|
65538
|
+
label: toolbarTexts2.documentEditingMode,
|
|
65531
65539
|
value: "editing",
|
|
65532
65540
|
icon: toolbarIcons2.documentEditingMode,
|
|
65533
|
-
description:
|
|
65541
|
+
description: toolbarTexts2.documentEditingModeDescription
|
|
65534
65542
|
},
|
|
65535
65543
|
{
|
|
65536
|
-
label:
|
|
65544
|
+
label: toolbarTexts2.documentSuggestingMode,
|
|
65537
65545
|
value: "suggesting",
|
|
65538
65546
|
icon: toolbarIcons2.documentSuggestingMode,
|
|
65539
|
-
description:
|
|
65547
|
+
description: toolbarTexts2.documentSuggestingModeDescription
|
|
65540
65548
|
},
|
|
65541
65549
|
{
|
|
65542
|
-
label:
|
|
65550
|
+
label: toolbarTexts2.documentViewingMode,
|
|
65543
65551
|
value: "viewing",
|
|
65544
65552
|
icon: toolbarIcons2.documentViewingMode,
|
|
65545
|
-
description:
|
|
65553
|
+
description: toolbarTexts2.documentViewingModeDescription
|
|
65546
65554
|
}
|
|
65547
65555
|
];
|
|
65548
65556
|
function renderDocumentMode(renderDocumentButton) {
|
|
@@ -65563,7 +65571,7 @@ const makeDefaultItems = ({
|
|
|
65563
65571
|
name: "pageBreakTool",
|
|
65564
65572
|
command: "insertPageBreak",
|
|
65565
65573
|
icon: toolbarIcons2.pageBreak,
|
|
65566
|
-
tooltip:
|
|
65574
|
+
tooltip: toolbarTexts2.pageBreak
|
|
65567
65575
|
});
|
|
65568
65576
|
const controlSizes = /* @__PURE__ */ new Map([
|
|
65569
65577
|
["separator", 20],
|
|
@@ -65581,7 +65589,7 @@ const makeDefaultItems = ({
|
|
|
65581
65589
|
name: "ruler",
|
|
65582
65590
|
command: "toggleRuler",
|
|
65583
65591
|
icon: toolbarIcons2.ruler,
|
|
65584
|
-
tooltip:
|
|
65592
|
+
tooltip: toolbarTexts2.ruler
|
|
65585
65593
|
});
|
|
65586
65594
|
const selectedLinkedStyle = vue.ref(null);
|
|
65587
65595
|
const linkedStyles = useToolbarItem({
|
|
@@ -65589,8 +65597,8 @@ const makeDefaultItems = ({
|
|
|
65589
65597
|
name: "linkedStyles",
|
|
65590
65598
|
command: "setLinkedStyle",
|
|
65591
65599
|
icon: toolbarIcons2.paintbrush,
|
|
65592
|
-
defaultLabel:
|
|
65593
|
-
label:
|
|
65600
|
+
defaultLabel: toolbarTexts2.formatText,
|
|
65601
|
+
label: toolbarTexts2.formatText,
|
|
65594
65602
|
hasCaret: true,
|
|
65595
65603
|
isWide: true,
|
|
65596
65604
|
style: { width: "140px" },
|
|
@@ -65634,7 +65642,7 @@ const makeDefaultItems = ({
|
|
|
65634
65642
|
const lineHeight2 = useToolbarItem({
|
|
65635
65643
|
type: "dropdown",
|
|
65636
65644
|
name: "lineHeight",
|
|
65637
|
-
tooltip:
|
|
65645
|
+
tooltip: toolbarTexts2.lineHeight,
|
|
65638
65646
|
icon: toolbarIcons2.lineHeight,
|
|
65639
65647
|
hasCaret: false,
|
|
65640
65648
|
hasInlineTextInput: false,
|
|
@@ -65896,6 +65904,56 @@ const startImageUpload = async ({ editor, view, file }) => {
|
|
|
65896
65904
|
}
|
|
65897
65905
|
);
|
|
65898
65906
|
};
|
|
65907
|
+
const toolbarTexts = {
|
|
65908
|
+
bold: "Bold",
|
|
65909
|
+
fontFamily: "Font",
|
|
65910
|
+
ai: "AI text generation",
|
|
65911
|
+
fontSize: "Font size",
|
|
65912
|
+
italic: "Italic",
|
|
65913
|
+
underline: "Underline",
|
|
65914
|
+
highlight: "Highlight color",
|
|
65915
|
+
color: "Text color",
|
|
65916
|
+
search: "Search",
|
|
65917
|
+
link: "Link",
|
|
65918
|
+
image: "Image",
|
|
65919
|
+
table: "Insert table",
|
|
65920
|
+
addRowBefore: "Insert row above",
|
|
65921
|
+
addRowAfter: "Insert row below",
|
|
65922
|
+
addColumnBefore: "Insert column left",
|
|
65923
|
+
addColumnAfter: "Insert column right",
|
|
65924
|
+
deleteRow: "Delete row",
|
|
65925
|
+
deleteColumn: "Delete column",
|
|
65926
|
+
deleteTable: "Delete table",
|
|
65927
|
+
transparentBorders: "Transparent borders",
|
|
65928
|
+
mergeCells: "Merge cells",
|
|
65929
|
+
splitCell: "Split cell",
|
|
65930
|
+
fixTables: "Fix tables",
|
|
65931
|
+
textAlign: "Alignment",
|
|
65932
|
+
bulletList: "Bullet list",
|
|
65933
|
+
numberedList: "Numbered list",
|
|
65934
|
+
indentLeft: "Left indent",
|
|
65935
|
+
indentRight: "Right indent",
|
|
65936
|
+
zoom: "Zoom",
|
|
65937
|
+
undo: "Undo",
|
|
65938
|
+
redo: "Redo",
|
|
65939
|
+
trackChanges: "Track Changes",
|
|
65940
|
+
trackChangesAccept: "Accept changes under selection",
|
|
65941
|
+
trackChangesReject: "Reject changes under selection",
|
|
65942
|
+
trackChangesOriginal: "Toggle Show Original",
|
|
65943
|
+
trackChangesFinal: "Toggle Show Final",
|
|
65944
|
+
clearFormatting: "Clear formatting",
|
|
65945
|
+
copyFormat: "Format painter",
|
|
65946
|
+
lineHeight: "Line height",
|
|
65947
|
+
formatText: "Format text",
|
|
65948
|
+
ruler: "Show or hide ruler",
|
|
65949
|
+
pageBreak: "Insert page break",
|
|
65950
|
+
documentEditingMode: "Editing",
|
|
65951
|
+
documentSuggestingMode: "Suggesting",
|
|
65952
|
+
documentViewingMode: "Viewing",
|
|
65953
|
+
documentEditingModeDescription: "Edit document directly",
|
|
65954
|
+
documentSuggestingModeDescription: "Edits become suggestions",
|
|
65955
|
+
documentViewingModeDescription: "View clean version of document only"
|
|
65956
|
+
};
|
|
65899
65957
|
class SuperToolbar extends EventEmitter2 {
|
|
65900
65958
|
/**
|
|
65901
65959
|
* Creates a new SuperToolbar instance
|
|
@@ -65911,6 +65969,7 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
65911
65969
|
role: "editor",
|
|
65912
65970
|
pagination: false,
|
|
65913
65971
|
icons: { ...toolbarIcons },
|
|
65972
|
+
texts: { ...toolbarTexts },
|
|
65914
65973
|
fonts: null,
|
|
65915
65974
|
hideButtons: true,
|
|
65916
65975
|
responsiveToContainer: false,
|
|
@@ -66174,6 +66233,7 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
66174
66233
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
66175
66234
|
superToolbar: this,
|
|
66176
66235
|
icons: this.config.icons,
|
|
66236
|
+
texts: this.config.texts,
|
|
66177
66237
|
fonts: this.config.fonts,
|
|
66178
66238
|
hideButtons: this.config.hideButtons,
|
|
66179
66239
|
isDev: this.isDev
|
|
@@ -66197,6 +66257,10 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
66197
66257
|
...toolbarIcons,
|
|
66198
66258
|
...config.icons
|
|
66199
66259
|
};
|
|
66260
|
+
this.config.texts = {
|
|
66261
|
+
...toolbarTexts,
|
|
66262
|
+
...config.texts
|
|
66263
|
+
};
|
|
66200
66264
|
this.config.hideButtons = config.hideButtons ?? true;
|
|
66201
66265
|
this.config.responsiveToContainer = config.responsiveToContainer ?? false;
|
|
66202
66266
|
if (!this.config.selector && this.config.element) {
|
|
@@ -66210,6 +66274,7 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
66210
66274
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
66211
66275
|
superToolbar: this,
|
|
66212
66276
|
icons: this.config.icons,
|
|
66277
|
+
texts: this.config.texts,
|
|
66213
66278
|
fonts: this.config.fonts,
|
|
66214
66279
|
hideButtons: this.config.hideButtons,
|
|
66215
66280
|
isDev: config.isDev
|
|
@@ -66386,6 +66451,7 @@ _interceptedCommands = /* @__PURE__ */ new WeakMap();
|
|
|
66386
66451
|
makeToolbarItems_fn = function({
|
|
66387
66452
|
superToolbar,
|
|
66388
66453
|
icons: icons2,
|
|
66454
|
+
texts,
|
|
66389
66455
|
fonts,
|
|
66390
66456
|
hideButtons,
|
|
66391
66457
|
isDev = false
|
|
@@ -66396,6 +66462,7 @@ makeToolbarItems_fn = function({
|
|
|
66396
66462
|
const { defaultItems, overflowItems } = makeDefaultItems({
|
|
66397
66463
|
superToolbar,
|
|
66398
66464
|
toolbarIcons: icons2,
|
|
66465
|
+
toolbarTexts: texts,
|
|
66399
66466
|
toolbarFonts: fonts,
|
|
66400
66467
|
hideButtons,
|
|
66401
66468
|
availableWidth,
|
package/dist/core/SuperDoc.d.ts
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
* @property {string} [toolbar] Optional DOM element to render the toolbar in
|
|
55
55
|
* @property {Array<string>} [toolbarGroups] Toolbar groups to show
|
|
56
56
|
* @property {Object} [toolbarIcons] Icons to show in the toolbar
|
|
57
|
+
* @property {Object} [toolbarTexts] Texts to override in the toolbar
|
|
57
58
|
* @property {boolean} [isDev] Whether the SuperDoc is in development mode
|
|
58
59
|
* @property {TelemetryConfig} [telemetry] Telemetry configuration
|
|
59
60
|
* @property {(editor: Editor) => void} [onEditorBeforeCreate] Callback before an editor is created
|
|
@@ -461,6 +462,10 @@ export type Config = {
|
|
|
461
462
|
* Icons to show in the toolbar
|
|
462
463
|
*/
|
|
463
464
|
toolbarIcons?: any;
|
|
465
|
+
/**
|
|
466
|
+
* Texts to override in the toolbar
|
|
467
|
+
*/
|
|
468
|
+
toolbarTexts?: any;
|
|
464
469
|
/**
|
|
465
470
|
* Whether the SuperDoc is in development mode
|
|
466
471
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../src/core/SuperDoc.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;GAQG;AAEH,2EAA2E;AAE3E;;;;;GAKG;AAEH
|
|
1
|
+
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../src/core/SuperDoc.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;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AAO,EAAE,QAAQ,CAAC;QAAC,MAAM,QAAO;KAAE,KAAK,IAAI;;;;eACtD,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE,KAAK,IAAI;;;;yBACvD,MAAM,IAAI;;;;sBACV,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI;;;;2BAC3B,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;;;qBACpC,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;;;kBACpC,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,KAAK,IAAI;;;;2BAClC,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI;;;;aACzC,MAAM;;;;uBACN,KAAQ;;;;iBACR,OAAO;;;;YACP,MAAM;;;;oBACN,KAAQ;;;;eACR,OAAO;;;;;;;;wBAEP,CAAS,IAAI,EAAJ,IAAI,KAAG,OAAO,CAAC,MAAM,CAAC;;;;eAC/B,IAAI;;;;aACJ,2BAA2B;;;;aAC3B,OAAO;;;;gCACP,OAAO;;;;mBACP,OAAO;;6BAxGQ,eAAe;0BASlB,0CAA0C;6BAJ5B,mCAAmC;8BAC7C,iEAAiE;4CAJnD,sBAAsB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
|
-
import { T as TextSelection } from "./chunks/converter-
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
2
|
+
import { T as TextSelection } from "./chunks/converter-B8bdBUgY.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-NAeVYoNG.js";
|
|
4
4
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
5
5
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
6
6
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -23306,7 +23306,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
23306
23306
|
return;
|
|
23307
23307
|
}
|
|
23308
23308
|
}
|
|
23309
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.12.
|
|
23309
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.12.20") {
|
|
23310
23310
|
const customLocation = "docProps/custom.xml";
|
|
23311
23311
|
if (!docx[customLocation]) {
|
|
23312
23312
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23775,7 +23775,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23775
23775
|
function generateCustomXml() {
|
|
23776
23776
|
return DEFAULT_CUSTOM_XML;
|
|
23777
23777
|
}
|
|
23778
|
-
function generateSuperdocVersion(pid = 2, version = "0.12.
|
|
23778
|
+
function generateSuperdocVersion(pid = 2, version = "0.12.20") {
|
|
23779
23779
|
return {
|
|
23780
23780
|
type: "element",
|
|
23781
23781
|
name: "property",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-
|
|
1
|
+
import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-B8bdBUgY.js";
|
|
2
2
|
function commonjsRequire(path) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|
|
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _commandService, _css, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createDocFromHTML_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-B8bdBUgY.js";
|
|
16
16
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
|
|
17
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
17
|
+
import { D as DocxZipper } from "./docx-zipper-CQsKTRQj.js";
|
|
18
18
|
function getMarksFromSelection(state) {
|
|
19
19
|
const { from: from2, to, empty: empty2 } = state.selection;
|
|
20
20
|
const marks = [];
|
|
@@ -14677,7 +14677,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14677
14677
|
* @returns {Object | void} Migration results
|
|
14678
14678
|
*/
|
|
14679
14679
|
processCollaborationMigrations() {
|
|
14680
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
14680
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.20");
|
|
14681
14681
|
if (!this.options.ydoc) return;
|
|
14682
14682
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
14683
14683
|
let docVersion = metaMap.get("version");
|
|
@@ -17468,6 +17468,12 @@ const getQuickFormatList = (editor) => {
|
|
|
17468
17468
|
return a.definition.attrs?.name.localeCompare(b.definition.attrs?.name);
|
|
17469
17469
|
});
|
|
17470
17470
|
};
|
|
17471
|
+
const getDefaultSpacing = () => ({
|
|
17472
|
+
lineSpaceAfter: 0,
|
|
17473
|
+
lineSpaceBefore: 0,
|
|
17474
|
+
line: 0,
|
|
17475
|
+
lineRule: null
|
|
17476
|
+
});
|
|
17471
17477
|
const Paragraph = Node$1.create({
|
|
17472
17478
|
name: "paragraph",
|
|
17473
17479
|
priority: 1e3,
|
|
@@ -17482,6 +17488,7 @@ const Paragraph = Node$1.create({
|
|
|
17482
17488
|
addAttributes() {
|
|
17483
17489
|
return {
|
|
17484
17490
|
spacing: {
|
|
17491
|
+
default: getDefaultSpacing(),
|
|
17485
17492
|
renderDOM: (attrs) => {
|
|
17486
17493
|
const { spacing } = attrs;
|
|
17487
17494
|
if (!spacing) return {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, unref, createBlock, toDisplayString, withDirectives, withKeys, withModifiers, vModelText, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, nextTick, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
|
-
import { x as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, g as global$1 } from "./editor-
|
|
2
|
+
import { x as process$1 } from "./converter-B8bdBUgY.js";
|
|
3
|
+
import { _ as _export_sfc, g as global$1 } from "./editor-NAeVYoNG.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|