Skip to content

Commit

Permalink
Merge pull request 'Change type for diagram viewer' (#223) from fix/e…
Browse files Browse the repository at this point in the history
…ditor-type into release/v8.3.0
  • Loading branch information
Julia Radzhabova committed Jan 14, 2025
2 parents f79aab1 + b62a333 commit 3d28f76
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/api/documents/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
type: 'desktop or mobile or embedded',
width: '100% by default',
height: '100% by default',
documentType: 'word' | 'cell' | 'slide' | 'pdf' | 'visio' ,// deprecate 'text' | 'spreadsheet' | 'presentation',
documentType: 'word' | 'cell' | 'slide' | 'pdf' | 'diagram' ,// deprecate 'text' | 'spreadsheet' | 'presentation',
token: <string> encrypted signature
document: {
title: 'document title',
Expand Down Expand Up @@ -463,11 +463,11 @@
'cell': 'xlsx',
'slide': 'pptx',
'pdf': 'pdf',
'visio': 'vsdx'
'diagram': 'vsdx'
}, app;

if (_config.documentType=='text' || _config.documentType=='spreadsheet' ||_config.documentType=='presentation')
console.warn("The \"documentType\" parameter for the config object must take one of the values word/cell/slide/pdf/visio.");
console.warn("The \"documentType\" parameter for the config object must take one of the values word/cell/slide/pdf/diagram.");

if (typeof _config.documentType === 'string' && _config.documentType != '') {
app = appMap[_config.documentType.toLowerCase()];
Expand All @@ -491,7 +491,7 @@
if (typeof type[2] === 'string') _config.documentType = 'slide'; else
if (typeof type[3] === 'string') _config.documentType = 'pdf'; else
if (typeof type[4] === 'string') _config.documentType = 'word'; else
if (typeof type[5] === 'string') _config.documentType = 'visio';
if (typeof type[5] === 'string') _config.documentType = 'diagram';
}
}

Expand Down Expand Up @@ -1025,7 +1025,7 @@
'cell': 'spreadsheeteditor',
'slide': 'presentationeditor',
'pdf': 'pdfeditor',
'visio': 'visioeditor',
'diagram': 'visioeditor',
'common': 'common'
},
appType = 'word',
Expand Down Expand Up @@ -1057,7 +1057,7 @@
else {
if (type && typeof type[3] === 'string') appType = 'cell'; else
if (type && typeof type[4] === 'string') appType = 'slide'; else
if (type && typeof type[6] === 'string') appType = 'visio';
if (type && typeof type[6] === 'string') appType = 'diagram';
}
}
if (!(config.editorConfig && config.editorConfig.shardkey && config.document && config.editorConfig.shardkey!==config.document.key))
Expand Down

0 comments on commit 3d28f76

Please sign in to comment.