New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@js-preview/docx

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@js-preview/docx - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

23

lib/index.js

@@ -101,2 +101,4 @@ import { renderAsync } from 'docx-preview';

_defineProperty(this, "container", null);
_defineProperty(this, "wrapper", null);
_defineProperty(this, "wrapperMain", null);
_defineProperty(this, "options", {});

@@ -107,4 +109,19 @@ _defineProperty(this, "requestOptions", {});

this.requestOptions = requestOptions;
this.createWrapper();
}
_createClass(JsDocxPreview, [{
key: "createWrapper",
value: function createWrapper() {
this.wrapper = document.createElement('div');
this.wrapper.className = 'vue-office-docx';
this.wrapperMain = document.createElement('div');
this.wrapperMain.className = 'vue-office-docx-main';
this.wrapper.appendChild(this.wrapperMain);
this.container.appendChild(this.wrapper);
}
// <div className="vue-office-docx">
// <div className="vue-office-docx-main" ref="rootRef"></div>
// </div>
}, {
key: "setOptions",

@@ -125,10 +142,10 @@ value: function setOptions(options) {

docx.getData(src, _this.requestOptions).then(function (res) {
docx.render(res, _this.container, _this.options).then(function () {
docx.render(res, _this.wrapperMain, _this.options).then(function () {
resolve();
})["catch"](function (e) {
docx.render('', _this.container, _this.options);
docx.render('', _this.wrapperMain, _this.options);
reject(e);
});
})["catch"](function (err) {
docx.render('', _this.container, _this.options);
docx.render('', _this.wrapperMain, _this.options);
reject(err);

@@ -135,0 +152,0 @@ });

@@ -105,2 +105,4 @@ (function (global, factory) {

_defineProperty(this, "container", null);
_defineProperty(this, "wrapper", null);
_defineProperty(this, "wrapperMain", null);
_defineProperty(this, "options", {});

@@ -111,4 +113,19 @@ _defineProperty(this, "requestOptions", {});

this.requestOptions = requestOptions;
this.createWrapper();
}
_createClass(JsDocxPreview, [{
key: "createWrapper",
value: function createWrapper() {
this.wrapper = document.createElement('div');
this.wrapper.className = 'vue-office-docx';
this.wrapperMain = document.createElement('div');
this.wrapperMain.className = 'vue-office-docx-main';
this.wrapper.appendChild(this.wrapperMain);
this.container.appendChild(this.wrapper);
}
// <div className="vue-office-docx">
// <div className="vue-office-docx-main" ref="rootRef"></div>
// </div>
}, {
key: "setOptions",

@@ -129,10 +146,10 @@ value: function setOptions(options) {

docx.getData(src, _this.requestOptions).then(function (res) {
docx.render(res, _this.container, _this.options).then(function () {
docx.render(res, _this.wrapperMain, _this.options).then(function () {
resolve();
})["catch"](function (e) {
docx.render('', _this.container, _this.options);
docx.render('', _this.wrapperMain, _this.options);
reject(e);
});
})["catch"](function (err) {
docx.render('', _this.container, _this.options);
docx.render('', _this.wrapperMain, _this.options);
reject(err);

@@ -139,0 +156,0 @@ });

2

package.json
{
"name": "@js-preview/docx",
"type" :"module",
"version": "0.0.3",
"version": "0.0.4",
"description": "",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc