@rpldy/shared
Advanced tools
Comparing version 0.8.0 to 0.9.0
@@ -30,6 +30,7 @@ "use strict"; | ||
var _default = function _default(f, batchId) { | ||
var isPending = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
iCounter += 1; //keep existing id for recycled items | ||
var id = f.id && f.batchId ? f.id : "".concat(batchId, ".item-").concat(iCounter), | ||
state = _consts.FILE_STATES.ADDED; | ||
state = isPending ? _consts.FILE_STATES.PENDING : _consts.FILE_STATES.ADDED; | ||
var batchItem = { | ||
@@ -36,0 +37,0 @@ id: id, |
@@ -10,2 +10,3 @@ "use strict"; | ||
var BATCH_STATES = { | ||
PENDING: "pending", | ||
ADDED: "added", | ||
@@ -20,2 +21,3 @@ PROCESSING: "processing", | ||
var FILE_STATES = { | ||
PENDING: "pending", | ||
ADDED: "added", | ||
@@ -22,0 +24,0 @@ UPLOADING: "uploading", |
@@ -22,6 +22,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
export default (function (f, batchId) { | ||
var isPending = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
iCounter += 1; //keep existing id for recycled items | ||
var id = f.id && f.batchId ? f.id : "".concat(batchId, ".item-").concat(iCounter), | ||
state = FILE_STATES.ADDED; | ||
state = isPending ? FILE_STATES.PENDING : FILE_STATES.ADDED; | ||
var batchItem = { | ||
@@ -28,0 +29,0 @@ id: id, |
export var DEBUG_LOG_KEY = "__rupy-logger-debug__"; | ||
export var BATCH_STATES = { | ||
PENDING: "pending", | ||
ADDED: "added", | ||
@@ -11,2 +12,3 @@ PROCESSING: "processing", | ||
export var FILE_STATES = { | ||
PENDING: "pending", | ||
ADDED: "added", | ||
@@ -13,0 +15,0 @@ UPLOADING: "uploading", |
{ | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"name": "@rpldy/shared", | ||
@@ -30,3 +30,3 @@ "description": "internal set of utils+types for react-uploady", | ||
}, | ||
"gitHead": "c464b4d4d30dde285832c06ee9dfb161e9422218" | ||
"gitHead": "e6949c50f2880269d5ee181f9349061b01ce51e3" | ||
} |
@@ -30,2 +30,3 @@ export type Destination = { | ||
export enum BATCH_STATES { | ||
PENDING = "pending", | ||
ADDED = "added", | ||
@@ -49,2 +50,3 @@ PROCESSING = "processing", | ||
export enum FILE_STATES { | ||
PENDING = "pending", | ||
ADDED = "added", | ||
@@ -103,3 +105,3 @@ UPLOADING = "uploading", | ||
export const createBatchItem: (f: UploadInfo, batchId: string) => BatchItem; | ||
export const createBatchItem: (f: UploadInfo, batchId: string, isPending?: boolean) => BatchItem; | ||
@@ -106,0 +108,0 @@ export const isPlainObject: (obj: unknown) => boolean; |
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
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
47640
1112