@rpldy/shared-ui
Advanced tools
Comparing version 0.16.0 to 0.16.1
@@ -10,2 +10,4 @@ "use strict"; | ||
var _shared = require("@rpldy/shared"); | ||
var _useUploadyContext = _interopRequireDefault(require("./useUploadyContext")); | ||
@@ -31,2 +33,8 @@ | ||
const [eventState, setEventState] = (0, _react.useState)(null); | ||
if (fn && !(0, _shared.isFunction)(fn)) { | ||
id = fn; | ||
fn = undefined; | ||
} | ||
const eventCallback = (0, _react.useCallback)(function (eventObj) { | ||
@@ -40,3 +48,3 @@ if (!id || eventObj.id === id) { | ||
if (fn) { | ||
if ((0, _shared.isFunction)(fn)) { | ||
fn(eventObj, ...args); | ||
@@ -43,0 +51,0 @@ } |
@@ -13,3 +13,3 @@ "use strict"; | ||
const getVersion = () => "0.16.0" || ""; | ||
const getVersion = () => "0.16.1" || ""; | ||
@@ -16,0 +16,0 @@ exports.getVersion = getVersion; |
import { useState, useCallback, useEffect } from "react"; | ||
import { isFunction } from "@rpldy/shared"; | ||
import useUploadyContext from "./useUploadyContext"; | ||
@@ -20,2 +21,8 @@ | ||
const [eventState, setEventState] = useState(null); | ||
if (fn && !isFunction(fn)) { | ||
id = fn; | ||
fn = undefined; | ||
} | ||
const eventCallback = useCallback(function (eventObj) { | ||
@@ -29,3 +36,3 @@ if (!id || eventObj.id === id) { | ||
if (fn) { | ||
if (isFunction(fn)) { | ||
fn(eventObj, ...args); | ||
@@ -32,0 +39,0 @@ } |
import { hasWindow } from "@rpldy/shared"; | ||
export const GLOBAL_VERSION_SYM = Symbol.for("_rpldy-version_"); | ||
const getVersion = () => "0.16.0" || ""; | ||
const getVersion = () => "0.16.1" || ""; | ||
@@ -6,0 +6,0 @@ const getRegisteredVersion = () => { |
{ | ||
"version": "0.16.0", | ||
"version": "0.16.1", | ||
"name": "@rpldy/shared-ui", | ||
@@ -21,4 +21,4 @@ "description": "internal set of utils+types for react-uploady UI", | ||
"dependencies": { | ||
"@rpldy/shared": "^0.16.0", | ||
"@rpldy/uploader": "^0.16.0" | ||
"@rpldy/shared": "^0.16.1", | ||
"@rpldy/uploader": "^0.16.1" | ||
}, | ||
@@ -35,3 +35,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "d48d97673222581b5da36fafa1bd859945775c4c" | ||
"gitHead": "3c274f14d037aa448dea963fc935df7f7dabed0f" | ||
} |
@@ -54,3 +54,3 @@ import * as React from "react"; | ||
type CancellableHook<T> = (cb: (obj: T) => boolean | void, id?: string) => void; | ||
type EventHookWithState<T> = (cb?: (obj: T) => void, id?: string) => T; | ||
type EventHookWithState<T> = ((cb?: (obj: T) => void, id?: string) => T) & ((id?: string) => T); | ||
@@ -57,0 +57,0 @@ type ItemEventHook = EventHook<BatchItem>; |
Sorry, the diff of this file is not supported yet
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
64267
1448
Updated@rpldy/shared@^0.16.1
Updated@rpldy/uploader@^0.16.1