Skip to content

Commit

Permalink
feat(docuworks): Add support for docuworks file types (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conrad Chan authored Mar 24, 2022
1 parent f956a41 commit 61a1713
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 20 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
moduleNameMapper: {
'\\.(css|scss|less)$': '<rootDir>/build/jest/styleMock.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2)$': '<rootDir>/build/jest/fileMock.js',
'@box/react-virtualized/dist/es': '@box/react-virtualized/dist/commonjs',
'box-elements-messages': '<rootDir>/build/jest/i18nMock.js',
'react-intl': '<rootDir>/build/jest/react-intl-mock.js',
'react-intl-locale-data': '<rootDir>/node_modules/react-intl/locale-data/en.js',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@babel/preset-typescript": "^7.7.7",
"@box/frontend": "^6.4.0",
"@box/languages": "^1.0.0",
"@box/react-virtualized": "9.22.3-rc-box.2",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@commitlint/travis-cli": "^8.2.0",
Expand All @@ -35,7 +36,7 @@
"babel-loader": "^8.0.6",
"babel-plugin-transform-require-ignore": "^0.1.1",
"box-annotations": "^2.3.0",
"box-ui-elements": "^13.1.0-beta.62",
"box-ui-elements": "^15.0.0-beta.49",
"chai": "^4.2.0",
"classnames": "^2.2.6",
"conventional-changelog-cli": "^2.0.28",
Expand Down Expand Up @@ -84,7 +85,6 @@
"react-dom": "^17.0.1",
"react-intl": "^2.9.0",
"react-tether": "^1.0.5",
"react-virtualized": "^9.22.3",
"sass-loader": "^7.1.0",
"sinon": "^9.0.3",
"style-loader": "^0.23.1",
Expand Down
2 changes: 2 additions & 0 deletions src/lib/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const CODE_EXTENSIONS = [
'yaml',
];

export const DOCUWORKS_EXTENSIONS = ['xdw', 'xbd'];
// Should not include 'xlsb', since xlsb conversion to pdf is not supported
// However, office viewer supports xlsb, xlsm, and xlsx (new formats), but not xls (old)
export const EXCEL_EXTENSIONS = ['xls', 'xlsm', 'xlsx'];
Expand All @@ -62,6 +63,7 @@ export const DOCUMENT_EXTENSIONS = CODE_EXTENSIONS.concat(NON_CODE_EXTENSIONS)
.concat(HTML_EXTENSIONS)
.concat(EXCEL_EXTENSIONS)
.concat(INDESIGN_EXTENSIONS)
.concat(DOCUWORKS_EXTENSIONS)
.concat([
'doc',
'docx',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/viewers/archive/ArchiveExplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import itemNameCellRenderer from 'box-ui-elements/es/features/virtualized-table-
import readableTimeCellRenderer from 'box-ui-elements/es/features/virtualized-table-renderers/readableTimeCellRenderer';
import sizeCellRenderer from 'box-ui-elements/es/features/virtualized-table-renderers/sizeCellRenderer';
import sortableColumnHeaderRenderer from 'box-ui-elements/es/features/virtualized-table-renderers/sortableColumnHeaderRenderer';
import { AutoSizer, Column, SortDirection } from 'react-virtualized';
import { AutoSizer, Column, SortDirection } from '@box/react-virtualized';
import { addLocaleData } from 'react-intl';
import Breadcrumbs from './Breadcrumbs';
import SearchBar from './SearchBar';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/viewers/text/BoxCSV.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import Grid from 'react-virtualized/dist/es/Grid/Grid';
import { Grid } from '@box/react-virtualized/dist/es/Grid';

const HEIGHT_ROW = 30;
const WIDTH_SCROLLER = 5;
Expand Down
32 changes: 16 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,18 @@
resolved "https://registry.yarnpkg.com/@box/languages/-/languages-1.0.0.tgz#e59b259b34b1b4c399778682732c3d0038864284"
integrity sha512-VdrUJK8tICkE4KrgN9FcRmqI+I72vPiDeRnlzX0Ua06etEzNPUa5E3tBnuZleWfZiBshhSScXfEbZdNCWkDHtQ==

"@box/react-virtualized@9.22.3-rc-box.2":
version "9.22.3-rc-box.2"
resolved "https://registry.yarnpkg.com/@box/react-virtualized/-/react-virtualized-9.22.3-rc-box.2.tgz#51eaa43865ea07636418e72f2333d57d964d7d1b"
integrity sha512-PNgjVpdfODpEEnMAAkfB1CiLmMGfb1vsYPiqiSMASFUjLBMvZ46X9TwAlwgNAyCS1ez8V+20cYwHH1cbE/Mfgw==
dependencies:
"@babel/runtime" "^7.7.2"
clsx "^1.0.4"
dom-helpers "^5.1.3"
loose-envify "^1.4.0"
prop-types "^15.7.2"
react-lifecycles-compat "^3.0.4"

"@cnakazawa/watch@^1.0.3":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"
Expand Down Expand Up @@ -2957,10 +2969,10 @@ box-annotations@^2.3.0:
resolved "https://registry.yarnpkg.com/box-annotations/-/box-annotations-2.3.0.tgz#5cac38171f7f8d9283659e2b243310f19d5ab7d3"
integrity sha512-Ea7tPgyJjX7vcnmZIfCorbzHd6oYx/OHVMPnZVQL/dUHR5vRKhLM0610xqwmVlUpk627sqHw5x/APaa+kt4SXg==

box-ui-elements@^13.1.0-beta.62:
version "13.1.0-beta.62"
resolved "https://registry.yarnpkg.com/box-ui-elements/-/box-ui-elements-13.1.0-beta.62.tgz#d10d76f8b904547d043376e238860b7021af4552"
integrity sha512-NzhnfznDNvDdWJMmktIgGluD9SuU9+E70Fp6iadF2eXXm9MI8Z+nLS1ncBuoywRsluzfs+LD/fW8Mmu38p+5gQ==
box-ui-elements@^15.0.0-beta.49:
version "15.0.0-beta.49"
resolved "https://registry.yarnpkg.com/box-ui-elements/-/box-ui-elements-15.0.0-beta.49.tgz#79d1c7808b16e873a4a9a13cec410f1a35021394"
integrity sha512-xjmWuydoEKZxXagSHzKhp6To8DZDiIUIU+3TgtaGNQ3aRr0ewutoP8wQkwH/VfG9ehB3h+2kIu0cjdCzbYUXvg==

brace-expansion@^1.1.7:
version "1.1.11"
Expand Down Expand Up @@ -12079,18 +12091,6 @@ react-tether@^1.0.5:
prop-types "^15.6.2"
tether "^1.4.5"

react-virtualized@^9.22.3:
version "9.22.3"
resolved "https://registry.yarnpkg.com/react-virtualized/-/react-virtualized-9.22.3.tgz#f430f16beb0a42db420dbd4d340403c0de334421"
integrity sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==
dependencies:
"@babel/runtime" "^7.7.2"
clsx "^1.0.4"
dom-helpers "^5.1.3"
loose-envify "^1.4.0"
prop-types "^15.7.2"
react-lifecycles-compat "^3.0.4"

react@^17.0.1:
version "17.0.1"
resolved "https://registry.yarnpkg.com/react/-/react-17.0.1.tgz#6e0600416bd57574e3f86d92edba3d9008726127"
Expand Down

0 comments on commit 61a1713

Please sign in to comment.