@scoir/filestack
Advanced tools
Comparing version 2.3.0 to 3.0.0-beta.b0e6db42
@@ -1,9 +0,12 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports.default = { | ||
maxSize: 10 * 1024 * 1024, // 10MB of bytes for filesize limits | ||
customText: 'https://s3.amazonaws.com/scoir_static/assets/js/scoir_fp_en.json' | ||
}; | ||
exports.default = void 0; | ||
var _default = { | ||
maxSize: 10 * 1024 * 1024, | ||
// 10MB of bytes for filesize limits | ||
customText: 'https://s3.amazonaws.com/scoir_static/assets/js/scoir_fp_en.json' | ||
}; | ||
exports.default = _default; |
@@ -1,10 +0,12 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports.default = { | ||
CSV: ['.csv'], | ||
ZIP: ['.zip'], | ||
PDF: ['.pdf'] | ||
}; | ||
exports.default = void 0; | ||
var _default = { | ||
CSV: ['.csv'], | ||
ZIP: ['.zip'], | ||
PDF: ['.pdf'] | ||
}; | ||
exports.default = _default; |
@@ -1,57 +0,54 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports.defaultPickerOptions = exports.fileExtensions = undefined; | ||
exports.fileExtensions = exports.defaultPickerOptions = exports.default = void 0; | ||
var _promise = require('babel-runtime/core-js/promise'); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _promise2 = _interopRequireDefault(_promise); | ||
var _fileExtensions = _interopRequireDefault(require("./file-extensions")); | ||
var _assign = require('babel-runtime/core-js/object/assign'); | ||
var _defaultPickerOptions = _interopRequireDefault(require("./default-picker-options")); | ||
var _assign2 = _interopRequireDefault(_assign); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
var _fileExtensions = require('./file-extensions'); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
var _fileExtensions2 = _interopRequireDefault(_fileExtensions); | ||
var _defaultPickerOptions = require('./default-picker-options'); | ||
var _defaultPickerOptions2 = _interopRequireDefault(_defaultPickerOptions); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var createWrapper = function createWrapper(filestack) { | ||
return (0, _assign2.default)({}, filestack, { | ||
upload: function upload(file, storeOptions) { | ||
return new _promise2.default(function (resolve, reject) { | ||
filestack.store(file, storeOptions, resolve, reject); | ||
}); | ||
}, | ||
export: function _export(handle) { | ||
return new _promise2.default(function (resolve) { | ||
filestack.exportFile(handle, resolve, resolve); | ||
}); | ||
}, | ||
exportUrl: function exportUrl(url, opts) { | ||
return new _promise2.default(function (resolve) { | ||
filestack.exportFile(url, opts, resolve, resolve); | ||
}); | ||
}, | ||
pickAndStore: function pickAndStore(pickerOptions, storeOptions) { | ||
return new _promise2.default(function (resolve, reject) { | ||
filestack.pickAndStore((0, _assign2.default)({}, _defaultPickerOptions2.default, pickerOptions), storeOptions, resolve, reject); | ||
}); | ||
} | ||
}); | ||
return _objectSpread(_objectSpread({}, filestack), {}, { | ||
upload: function upload(file, storeOptions) { | ||
return new Promise(function (resolve, reject) { | ||
filestack.store(file, storeOptions, resolve, reject); | ||
}); | ||
}, | ||
export: function _export(handle) { | ||
return new Promise(function (resolve) { | ||
filestack.exportFile(handle, resolve, resolve); | ||
}); | ||
}, | ||
exportUrl: function exportUrl(url, opts) { | ||
return new Promise(function (resolve) { | ||
filestack.exportFile(url, opts, resolve, resolve); | ||
}); | ||
}, | ||
pickAndStore: function pickAndStore(pickerOptions, storeOptions) { | ||
return new Promise(function (resolve, reject) { | ||
filestack.pickAndStore(_objectSpread(_objectSpread({}, _defaultPickerOptions.default), pickerOptions), storeOptions, resolve, reject); | ||
}); | ||
} | ||
}); | ||
}; | ||
exports.default = function (key, filestack) { | ||
filestack.setKey(key); | ||
return createWrapper(filestack); | ||
var _default = function _default(key, filestack) { | ||
filestack.setKey(key); | ||
return createWrapper(filestack); | ||
}; | ||
var fileExtensions = exports.fileExtensions = _fileExtensions2.default; | ||
var defaultPickerOptions = exports.defaultPickerOptions = _defaultPickerOptions2.default; | ||
exports.default = _default; | ||
var fileExtensions = _fileExtensions.default; | ||
exports.fileExtensions = fileExtensions; | ||
var defaultPickerOptions = _defaultPickerOptions.default; | ||
exports.defaultPickerOptions = defaultPickerOptions; |
{ | ||
"name": "@scoir/filestack", | ||
"version": "2.3.0", | ||
"version": "3.0.0-beta.b0e6db42", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "@scoir", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22472
11
519
2