diff --git a/example/src/example-style.js b/example/src/example-style.js new file mode 100644 index 0000000..85439ce --- /dev/null +++ b/example/src/example-style.js @@ -0,0 +1,642 @@ +var XLSX = require('xlsx'); +var OUTFILE = 'C:\Users\gucorrea\Downloads\example-style.xlsx'; + +function JSDateToExcelDate(inDate) { + return 25569.0 + ((inDate.getTime() - (inDate.getTimezoneOffset() * 60 * 1000)) / (1000 * 60 * 60 * 24)); +} + +var defaultCellStyle = { font: { name: "Verdana", sz: 11, color: "FF00FF88"}, fill: {fgColor: {rgb: "FFFFAA00"}}}; + +// test to see if everything on the left equals its counterpart on the right +// but the right hand object may have other attributes which we might not care about +function basicallyEquals(left, right) { + if (Array.isArray(left) && Array.isArray(right)) { + for (var i = 0; i < left.length; i++) { + if (!basicallyEquals(left[i], right[i])) { + return false; + } + } + return true; + } + else if (typeof left == 'object' && typeof right == 'object') { + for (var key in left) { + if (key != 'bgColor') { + if (!basicallyEquals(left[key], right[key])) { + if (JSON.stringify(left[key]) == "{}" && right[key] == undefined) return true; + if (JSON.stringify(right[key]) == "{}" && left[key] == undefined) return true; + return false; + } + } + } + return true; + } + else { + if (left != right) { + return false; + } + return true; + } +} + + +var workbook, wbout, wbin; + +workbook = { + "SheetNames": [ + "Main" + ], + "Sheets": { + "Main": { + "!merges": [ + { + "s": { + "c": 0, + "r": 0 + }, + "e": { + "c": 2, + "r": 0 + } + } + ], + "A1": { + "v": "This is a submerged cell", + "s": { + "border": { + "left": { + "style": "thick", + "color": { + "auto": 1 + } + }, + "top": { + "style": "thick", + "color": { + "auto": 1 + } + }, + "bottom": { + "style": "thick", + "color": { + "auto": 1 + } + } + } + }, + "t": "s" + }, + "B1": { + "v": "Pirate ship", + "s": { + "border": { + "top": { + "style": "thick", + "color": { + "auto": 1 + } + }, + "bottom": { + "style": "thick", + "color": { + "auto": 1 + } + } + } + }, + "t": "s" + }, + "C1": { + "v": "Sunken treasure", + "s": { + "border": { + "right": { + "style": "thick", + "color": { + "auto": 1 + } + }, + "top": { + "style": "thick", + "color": { + "auto": 1 + } + }, + "bottom": { + "style": "thick", + "color": { + "auto": 1 + } + } + } + }, + "t": "s" + }, + "A2": { + "v": "Blank", + "t": "s" + }, + "B2": { + "v": "Red", + "s": { + "fill": { + "fgColor": { + "rgb": "FFFF0000" + } + } + }, + "t": "s" + }, + "C2": { + "v": "Green", + "s": { + "fill": { + "fgColor": { + "rgb": "FF00FF00" + } + } + }, + "t": "s" + }, + "D2": { + "v": "Blue", + "s": { + "fill": { + "fgColor": { + "rgb": "FF0000FF" + } + } + }, + "t": "s" + }, + "E2": { + "v": "Theme 5", + "s": { + "fill": { + "fgColor": { + "theme": 5 + } + } + }, + "t": "s" + }, + "F2": { + "v": "Theme 5 Tint -0.5", + "s": { + "fill": { + "fgColor": { + "theme": 5, + "tint": -0.5 + } + } + }, + "t": "s" + }, + "A3": { + "v": "Default", + "t": "s" + }, + "B3": { + "v": "Arial", + "s": { + "font": { + "name": "Arial", + "sz": 24, + "color": { + "theme": "5" + } + } + }, + "t": "s" + }, + "C3": { + "v": "Times New Roman", + "s": { + "font": { + "name": "Times New Roman", + bold: true, + underline: true, + italic: true, + strike: true, + outline: true, + shadow: true, + vertAlign: "superscript", + "sz": 16, + "color": { + "rgb": "FF2222FF" + } + } + }, + "t": "s" + }, + "D3": { + "v": "Courier New", + "s": { + "font": { + "name": "Courier New", + "sz": 14 + } + }, + "t": "s" + }, + "A4": { + "v": 0.618033989, + "t": "n" + }, + "B4": { + "v": 0.618033989, + "t": "n" + }, + "C4": { + "v": 0.618033989, + "t": "n" + }, + "D4": { + "v": 0.618033989, + "t": "n", + "s": { + "numFmt": "0.00%" + } + }, + "E4": { + "v": 0.618033989, + "t": "n", + "s": { + "numFmt": "0.00%", + "fill": { + "fgColor": { + "rgb": "FFFFCC00" + } + } + } + }, + "A5": { + "v": 0.618033989, + "t": "n", + "s": { + "numFmt": "0%" + } + }, + "B5": { + "v": 0.618033989, + "t": "n", + "s": { + "numFmt": "0.0%" + } + }, + "C5": { + "v": 0.618033989, + "t": "n", + "s": { + "numFmt": "0.00%" + } + }, + "D5": { + "v": 0.618033989, + "t": "n", + "s": { + "numFmt": "0.000%" + } + }, + "E5": { + "v": 0.618033989, + "t": "n", + "s": { + "numFmt": "0.0000%" + } + }, + "F5": { + "v": 0, + "t": "n", + "s": { + "numFmt": "0.00%;\\(0.00%\\);\\-;@", + "fill": { + "fgColor": { + "rgb": "FFFFCC00" + } + } + } + }, + "A6": { + "v": "Sat Mar 21 2015 23:47:34 GMT-0400 (EDT)", + "t": "s" + }, + "B6": { + "v": 42084.99137416667, + "t": "n" + }, + "C6": { + "v": 42084.99137416667, + "s": { + "numFmt": "d-mmm-yy" + }, + "t": "n" + }, + "A7": { + "v": "left", + "s": { + "alignment": { + "horizontal": "left" + } + }, + "t": "s" + }, + "B7": { + "v": "center", + "s": { + "alignment": { + "horizontal": "center" + } + }, + "t": "s" + }, + "C7": { + "v": "right", + "s": { + "alignment": { + "horizontal": "right" + } + }, + "t": "s" + }, + "A8": { + "v": "vertical", + "s": { + "alignment": { + "vertical": "top" + } + }, + "t": "s" + }, + "B8": { + "v": "vertical", + "s": { + "alignment": { + "vertical": "center" + } + }, + "t": "s" + }, + "C8": { + "v": "vertical", + "s": { + "alignment": { + "vertical": "bottom" + } + }, + "t": "s" + }, + "A9": { + "v": "indent", + "s": { + "alignment": { + "indent": "1" + } + }, + "t": "s" + }, + "B9": { + "v": "indent", + "s": { + "alignment": { + "indent": "2" + } + }, + "t": "s" + }, + "C9": { + "v": "indent", + "s": { + "alignment": { + "indent": "3" + } + }, + "t": "s" + }, + "A10": { + "v": "In publishing and graphic design, lorem ipsum is a filler text commonly used to demonstrate the graphic elements of a document or visual presentation. ", + "s": { + "alignment": { + "wrapText": 1, + "horizontal": "right", + "vertical": "center", + "indent": 1 + } + }, + "t": "s" + }, + "A11": { + "v": 41684.35264774306, + "s": { + "numFmt": "m/d/yy" + }, + "t": "n" + }, + "B11": { + "v": 41684.35264774306, + "s": { + "numFmt": "d-mmm-yy" + }, + "t": "n" + }, + "C11": { + "v": 41684.35264774306, + "s": { + "numFmt": "h:mm:ss AM/PM" + }, + "t": "n" + }, + "D11": { + "v": 42084.99137416667, + "s": { + "numFmt": "m/d/yy" + }, + "t": "n" + }, + "E11": { + "v": 42065.02247239584, + "s": { + "numFmt": "m/d/yy" + }, + "t": "n" + }, + "F11": { + "v": 42084.99137416667, + "s": { + "numFmt": "m/d/yy h:mm:ss AM/PM" + }, + "t": "n" + }, + "A12": { + "v": "Apple", + "s": { + "border": { + "top": { + "style": "thin" + }, + "left": { + "style": "thin" + }, + "right": { + "style": "thin" + }, + "bottom": { + "style": "thin" + } + } + }, + "t": "s" + }, + "C12": { + "v": "Apple", + "s": { + "border": { + "diagonalUp": 1, + "diagonalDown": 1, + "top": { + "style": "dashed", + "color": { + "auto": 1 + } + }, + "right": { + "style": "medium", + "color": { + "theme": "5" + } + }, + "bottom": { + "style": "hair", + "color": { + "theme": 5, + "tint": "-0.3" + } + }, + "left": { + "style": "thin", + "color": { + "rgb": "FFFFAA00" + } + }, + "diagonal": { + "style": "dotted", + "color": { + "auto": 1 + } + } + } + }, + "t": "s" + }, + "E12": { + "v": "Pear", + "s": { + "border": { + "diagonalUp": 1, + "diagonalDown": 1, + "top": { + "style": "dashed", + "color": { + "auto": 1 + } + }, + "right": { + "style": "dotted", + "color": { + "theme": "5" + } + }, + "bottom": { + "style": "mediumDashed", + "color": { + "theme": 5, + "tint": "-0.3" + } + }, + "left": { + "style": "double", + "color": { + "rgb": "FFFFAA00" + } + }, + "diagonal": { + "style": "hair", + "color": { + "auto": 1 + } + } + } + }, + "t": "s" + }, + "A13": { + "v": "Up 90", + "s": { + "alignment": { + "textRotation": 90 + } + }, + "t": "s" + }, + "B13": { + "v": "Up 45", + "s": { + "alignment": { + "textRotation": 45 + } + }, + "t": "s" + }, + "C13": { + "v": "Horizontal", + "s": { + "alignment": { + "textRotation": 0 + } + }, + "t": "s" + }, + "D13": { + "v": "Down 45", + "s": { + "alignment": { + "textRotation": 135 + } + }, + "t": "s" + }, + "E13": { + "v": "Down 90", + "s": { + "alignment": { + "textRotation": 180 + } + }, + "t": "s" + }, + "F13": { + "v": "Vertical", + "s": { + "alignment": { + "textRotation": 255 + } + }, + "t": "s" + }, + "A14": { + "v": "Font color test", + "s": { + "font": { + "color": { + "rgb": "FFC6EFCE" + } + } + }, + "t": "s" + }, + "!ref": "A1:F14" + } + } +} +XLSX.writeFile(workbook, OUTFILE, { defaultCellStyle: defaultCellStyle }); +console.log("open " + OUTFILE) + diff --git a/example/src/index.js b/example/src/index.js index 9e2f64d..f2b93d2 100644 --- a/example/src/index.js +++ b/example/src/index.js @@ -37,9 +37,9 @@ const example = (
Try me!}> - data1} name="Sheet A"> - - + data1} name="Sheet A" headColorBackground="7d7d7d" headColorFont="FFFFFF" > + + row.aaa * 2}/> diff --git a/example/webpack.config.js b/example/webpack.config.js index eb834d4..dc50648 100644 --- a/example/webpack.config.js +++ b/example/webpack.config.js @@ -10,7 +10,7 @@ module.exports = function () { vendor: [ 'react', 'react-dom', - 'xlsx', + 'xlsx-style', 'file-saver' ] }, diff --git a/lib/index.js b/lib/index.js index 32359bc..7ac775a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17,9 +17,9 @@ var _propTypes2 = _interopRequireDefault(_propTypes); var _fileSaver = require('file-saver'); -var _xlsx = require('xlsx'); +var _xlsxStyle = require('xlsx-style'); -var _xlsx2 = _interopRequireDefault(_xlsx); +var _xlsxStyle2 = _interopRequireDefault(_xlsxStyle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -43,7 +43,7 @@ function datenum(v, date1904) { return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000); } -function sheet_from_array_of_arrays(data) { +function sheet_from_array_of_arrays(data, headColorBackground, headColorFont, columnsWidths) { var ws = {}; var range = { s: { c: 10000000, r: 10000000 }, e: { c: 0, r: 0 } }; for (var R = 0; R != data.length; ++R) { @@ -54,17 +54,28 @@ function sheet_from_array_of_arrays(data) { if (range.e.c < C) range.e.c = C; var cell = { v: data[R][C] }; if (cell.v == null) continue; - var cell_ref = _xlsx2.default.utils.encode_cell({ c: C, r: R }); + var cell_ref = _xlsxStyle2.default.utils.encode_cell({ c: C, r: R }); if (typeof cell.v === 'number') cell.t = 'n';else if (typeof cell.v === 'boolean') cell.t = 'b';else if (cell.v instanceof Date) { - cell.t = 'n';cell.z = _xlsx2.default.SSF._table[14]; + cell.t = 'n';cell.z = _xlsxStyle2.default.SSF._table[14]; cell.v = datenum(cell.v); } else cell.t = 's'; + if (R == 0) { + cell.s = { + fill: { + fgColor: { rgb: headColorBackground } + }, + font: { + color: { rgb: headColorFont } + } + }; + } + ws['!cols'] = columnsWidths; ws[cell_ref] = cell; } } - if (range.s.c < 10000000) ws['!ref'] = _xlsx2.default.utils.encode_range(range); + if (range.s.c < 10000000) ws['!ref'] = _xlsxStyle2.default.utils.encode_range(range); return ws; } @@ -90,7 +101,8 @@ var Column = exports.Column = function (_Component) { Column.propTypes = { label: _propTypes2.default.string.isRequired, - value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]).isRequired + value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]).isRequired, + width: _propTypes2.default.string }; var Sheet = exports.Sheet = function (_Component2) { @@ -121,7 +133,9 @@ Sheet.propTypes = { if (type !== Column) { throw new Error(' can only have \'s as children. '); } - }).isRequired + }).isRequired, + headColorBackground: _propTypes2.default.string, + headColorFont: _propTypes2.default.string }; var Workbook = exports.Workbook = function (_Component3) { @@ -172,10 +186,14 @@ var Workbook = exports.Workbook = function (_Component3) { }; _react2.default.Children.forEach(this.props.children, function (sheet) { - wb.Sheets[sheet.props.name] = sheet_from_array_of_arrays(_this4.createSheetData(sheet)); + var columns = sheet.props.children; + var columnsWidths = _react2.default.Children.map(columns, function (column) { + return { 'wch': column.props.width }; + }); + wb.Sheets[sheet.props.name] = sheet_from_array_of_arrays(_this4.createSheetData(sheet), sheet.props.headColorBackground, sheet.props.headColorFont, columnsWidths); }); - var wbout = _xlsx2.default.write(wb, { bookType: 'xlsx', bookSST: true, type: 'binary' }); + var wbout = _xlsxStyle2.default.write(wb, { bookType: 'xlsx', bookSST: true, type: 'binary' }); (0, _fileSaver.saveAs)(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), this.props.filename || 'data.xlsx'); } }, { diff --git a/package.json b/package.json index e49e4ca..ee72ae9 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ ], "dependencies": { "file-saver": "^1.3.3", - "xlsx": "^0.10.3" + "xlsx": "^0.11.10", + "xlsx-style": "^0.8.13" }, "devDependencies": { "babel-cli": "^6.18.0", @@ -41,9 +42,9 @@ "webpack-dev-server": "github:webpack/webpack-dev-server#v2.1.0-beta.12" }, "peerDependencies": { + "prop-types": "^15.0.0", "react": "^15.0.0", - "react-dom": "^15.0.0", - "prop-types": "^15.0.0" + "react-dom": "^15.0.0" }, "homepage": "https://github.com/ClearC2/react-excel-workbook" } diff --git a/src/index.js b/src/index.js index 24d7d6d..75f9850 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import {saveAs} from 'file-saver' -import XLSX from 'xlsx' +import XLSX from 'xlsx-style' function s2ab (s) { var buf = new ArrayBuffer(s.length) @@ -16,7 +16,8 @@ function datenum (v, date1904) { return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000) } -function sheet_from_array_of_arrays (data) { +function sheet_from_array_of_arrays (data,headColorBackground,headColorFont,columnsWidths) { + console.log(headColorBackground); var ws = {} var range = {s: {c:10000000, r:10000000}, e: {c:0, r:0}} for (var R = 0; R != data.length; ++R) { @@ -36,6 +37,17 @@ function sheet_from_array_of_arrays (data) { cell.v = datenum(cell.v) } else cell.t = 's' + if(R == 0 && (headColorBackground!==undefined || headColorFont!==undefined)){ + cell.s={ + fill:{ + fgColor:{ rgb: headColorBackground } + }, + font:{ + color:{ rgb: headColorFont } + } + } + } + ws['!cols'] = columnsWidths ws[cell_ref] = cell } } @@ -49,7 +61,8 @@ export class Column extends Component { // eslint-disable-line react/require-ren value: PropTypes.oneOfType([ PropTypes.string, PropTypes.func - ]).isRequired + ]).isRequired, + width: PropTypes.string, } render () { @@ -69,7 +82,9 @@ export class Sheet extends Component { // eslint-disable-line react/require-rend if (type !== Column) { throw new Error(' can only have \'s as children. ') } - }).isRequired + }).isRequired, + headColorBackground: PropTypes.string, + headColorFont: PropTypes.string, } render () { @@ -120,7 +135,8 @@ export class Workbook extends Component { } React.Children.forEach(this.props.children, sheet => { - wb.Sheets[sheet.props.name] = sheet_from_array_of_arrays(this.createSheetData(sheet)) + const columnsWidths = React.Children.map(sheet.props.children, column =>{ return {'wch':column.props.width?column.props.width:'20'} } ) + wb.Sheets[sheet.props.name] = sheet_from_array_of_arrays(this.createSheetData(sheet),sheet.props.headColorBackground,sheet.props.headColorFont,columnsWidths ) }) const wbout = XLSX.write(wb, {bookType:'xlsx', bookSST:true, type: 'binary'}) diff --git a/yarn.lock b/yarn.lock index 610f9d2..1b5b1b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,13 +31,12 @@ acorn@^5.0.1: version "5.0.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" -adler-32@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/adler-32/-/adler-32-1.0.0.tgz#28728a71756f629666dd1653cd80793a9df18651" +adler-32@, adler-32@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/adler-32/-/adler-32-1.1.0.tgz#03551a5c7f0edfbd4fc8fa12a6814978eab651c3" dependencies: - concat-stream "" - exit-on-epipe "" - printj "" + exit-on-epipe "~1.0.1" + printj "~1.1.0" ajv-keywords@^1.0.0, ajv-keywords@^1.1.1: version "1.5.1" @@ -899,11 +898,12 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -cfb@~0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/cfb/-/cfb-0.11.1.tgz#a96db8f272a6c3fb99dbbb23ef41223f48be1ea7" +cfb@>=0.10.0, cfb@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cfb/-/cfb-1.0.0.tgz#ab8be69563ce2cc1cb70819026d0c7c9b76d5c73" dependencies: - commander "" + commander "~2.11.0" + printj "~1.1.0" chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" @@ -980,13 +980,20 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -codepage@~1.8.0: - version "1.8.1" - resolved "https://registry.yarnpkg.com/codepage/-/codepage-1.8.1.tgz#f1a009d5261dc2754628bacb6fbbf0e6e2abffaa" +codepage@~1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/codepage/-/codepage-1.11.0.tgz#1076095b9f03b5ca04f43873fa1a627742285de2" + dependencies: + commander "~2.11.0" + exit-on-epipe "~1.0.1" + voc "~1.0.0" + +codepage@~1.3.6: + version "1.3.8" + resolved "https://registry.yarnpkg.com/codepage/-/codepage-1.3.8.tgz#4f2e5d7c0975de28f88498058dcb5afcab6a5f71" dependencies: commander "" concat-stream "" - exit-on-epipe "" voc "" colors@0.6.2: @@ -999,7 +1006,11 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@, commander@2.9.x, commander@^2.8.1, commander@~2.9.0: +commander@, commander@~2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + +commander@2.9.x, commander@^2.8.1, commander@~2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: @@ -1088,12 +1099,12 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -crc-32@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.0.2.tgz#09507984ee9bcce3bd1b8861f0de8ab10ae8187d" +crc-32@, crc-32@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.1.1.tgz#5d739d5e4c6e352ad8304d73223d483fe55adb8d" dependencies: - exit-on-epipe "" - printj "" + exit-on-epipe "~1.0.1" + printj "~1.1.0" create-ecdh@^4.0.0: version "4.0.0" @@ -1596,9 +1607,9 @@ exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" -exit-on-epipe@, exit-on-epipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.0.tgz#f6e0579c8214d33a08109fd6e2e5c1dbc70463fc" +exit-on-epipe@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" expand-brackets@^0.1.4: version "0.1.5" @@ -1785,11 +1796,15 @@ forwarded@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" -frac@~1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/frac/-/frac-1.0.6.tgz#9a0dfc23956852a8b320623bebcf1be9ea048229" +frac@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/frac/-/frac-0.3.1.tgz#577677b7fdcbe6faf7c461f1801d34137cda4354" + +frac@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/frac/-/frac-1.1.0.tgz#dc437e9c6a646b60b127d82ac4902464445cc1e3" dependencies: - voc "" + voc "~1.0.0" fresh@0.5.0: version "0.5.0" @@ -2402,6 +2417,12 @@ jsx-ast-utils@^1.3.4: version "1.4.1" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" +jszip@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-2.4.0.tgz#487a93b76c3bffa6cb085cd61eb934eabe2d294f" + dependencies: + pako "~0.2.5" + kind-of@^3.0.2: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -2803,7 +2824,7 @@ output-file-sync@^1.1.0: mkdirp "^0.5.1" object-assign "^4.1.0" -pako@~0.2.0: +pako@~0.2.0, pako@~0.2.5: version "0.2.9" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" @@ -2937,9 +2958,9 @@ pretty-error@^2.0.2: renderkid "^2.0.1" utila "~0.4" -printj@: - version "1.0.0" - resolved "https://registry.yarnpkg.com/printj/-/printj-1.0.0.tgz#5c37de6c5772a3fed8468399c2063b5b22528867" +printj@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.0.tgz#85487b5e8f96763b0b4a253613bef9dd9b387e3c" private@^0.1.6: version "0.1.7" @@ -3464,12 +3485,18 @@ sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" -ssf@~0.9.4: - version "0.9.4" - resolved "https://registry.yarnpkg.com/ssf/-/ssf-0.9.4.tgz#8e57a98c19dbbf1edd53f0f8c9e7fd524b0f6c9c" +ssf@~0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/ssf/-/ssf-0.10.1.tgz#f23d82b63792ef56089089c1cd0c848e911cdba6" + dependencies: + frac "~1.1.0" + +ssf@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/ssf/-/ssf-0.8.2.tgz#b9d4dc6a1c1bcf76f8abfa96d7d7656fb2abecd6" dependencies: colors "0.6.2" - frac "~1.0.6" + frac "0.3.1" voc "" sshpk@^1.7.0: @@ -3799,9 +3826,9 @@ vm-browserify@0.0.4: dependencies: indexof "0.0.1" -voc@: - version "0.5.0" - resolved "https://registry.yarnpkg.com/voc/-/voc-0.5.0.tgz#be6ca7c76e4a57d930cc80f6b31fbd80ca86045c" +voc@, voc@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/voc/-/voc-1.0.0.tgz#5465c0ce11d0881f7d8e36d8ca587043f33a25ae" watchpack@^1.0.0: version "1.3.1" @@ -3930,17 +3957,29 @@ write@^0.2.1: dependencies: mkdirp "^0.5.1" -xlsx@^0.10.3: - version "0.10.5" - resolved "https://registry.yarnpkg.com/xlsx/-/xlsx-0.10.5.tgz#7a93adc112179872e35531f56e7720593ef510b0" +xlsx-style@^0.8.13: + version "0.8.13" + resolved "https://registry.yarnpkg.com/xlsx-style/-/xlsx-style-0.8.13.tgz#ed238d6b8c0562f9447c2906abbded2d339e0486" dependencies: - adler-32 "~1.0.0" - cfb "~0.11.1" - codepage "~1.8.0" - commander "~2.9.0" - crc-32 "~1.0.2" - exit-on-epipe "~1.0.0" - ssf "~0.9.4" + adler-32 "" + cfb ">=0.10.0" + codepage "~1.3.6" + commander "" + crc-32 "" + jszip "2.4.0" + ssf "~0.8.1" + +xlsx@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/xlsx/-/xlsx-0.11.10.tgz#fc1fe4729c0fc011ab10427c8967b91863344643" + dependencies: + adler-32 "~1.1.0" + cfb "~1.0.0" + codepage "~1.11.0" + commander "~2.11.0" + crc-32 "~1.1.1" + exit-on-epipe "~1.0.1" + ssf "~0.10.1" xml-char-classes@^1.0.0: version "1.0.0"