@teselagen/ui 0.7.7-beta.1 → 0.7.7-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js
CHANGED
|
@@ -67289,21 +67289,6 @@ function getNewName(list2, targetName) {
|
|
|
67289
67289
|
return newName;
|
|
67290
67290
|
}
|
|
67291
67291
|
__name(getNewName, "getNewName");
|
|
67292
|
-
const useTraceUpdate = /* @__PURE__ */ __name((props) => {
|
|
67293
|
-
const prev = React$1.useRef(props);
|
|
67294
|
-
React$1.useEffect(() => {
|
|
67295
|
-
const changedProps = Object.entries(props).reduce((ps, [k2, v2]) => {
|
|
67296
|
-
if (prev.current[k2] !== v2) {
|
|
67297
|
-
ps[k2] = [prev.current[k2], v2];
|
|
67298
|
-
}
|
|
67299
|
-
return ps;
|
|
67300
|
-
}, {});
|
|
67301
|
-
if (Object.keys(changedProps).length > 0) {
|
|
67302
|
-
console.log("Changed props:", changedProps);
|
|
67303
|
-
}
|
|
67304
|
-
prev.current = props;
|
|
67305
|
-
});
|
|
67306
|
-
}, "useTraceUpdate");
|
|
67307
67292
|
const manualEnterMessage = "Build CSV File";
|
|
67308
67293
|
const manualEnterSubMessage = "Paste or type data to build a CSV file";
|
|
67309
67294
|
const helperText = [
|
|
@@ -67563,11 +67548,7 @@ const Uploader = /* @__PURE__ */ __name(({
|
|
|
67563
67548
|
}
|
|
67564
67549
|
return __accept;
|
|
67565
67550
|
}, [__accept, isAcceptPromise, resolvedAccept]);
|
|
67566
|
-
|
|
67567
|
-
__accept,
|
|
67568
|
-
isAcceptPromise
|
|
67569
|
-
});
|
|
67570
|
-
useDeepCompareEffect(() => {
|
|
67551
|
+
React$1.useEffect(() => {
|
|
67571
67552
|
if (isAcceptPromise) {
|
|
67572
67553
|
setAcceptLoading(true);
|
|
67573
67554
|
Promise.allSettled(Array.isArray(__accept) ? __accept : [__accept]).then(
|
|
@@ -73713,6 +73694,21 @@ const CmdButton = withCommand({
|
|
|
73713
73694
|
icon: "icon",
|
|
73714
73695
|
disabled: "isDisabled"
|
|
73715
73696
|
})(core.Button);
|
|
73697
|
+
const useTraceUpdate = /* @__PURE__ */ __name((props) => {
|
|
73698
|
+
const prev = React$1.useRef(props);
|
|
73699
|
+
React$1.useEffect(() => {
|
|
73700
|
+
const changedProps = Object.entries(props).reduce((ps, [k2, v2]) => {
|
|
73701
|
+
if (prev.current[k2] !== v2) {
|
|
73702
|
+
ps[k2] = [prev.current[k2], v2];
|
|
73703
|
+
}
|
|
73704
|
+
return ps;
|
|
73705
|
+
}, {});
|
|
73706
|
+
if (Object.keys(changedProps).length > 0) {
|
|
73707
|
+
console.log("Changed props:", changedProps);
|
|
73708
|
+
}
|
|
73709
|
+
prev.current = props;
|
|
73710
|
+
});
|
|
73711
|
+
}, "useTraceUpdate");
|
|
73716
73712
|
const showProgressToast = /* @__PURE__ */ __name((message, value, key, opts) => {
|
|
73717
73713
|
return window.toastr.default(
|
|
73718
73714
|
/* @__PURE__ */ React$1.createElement("div", null, /* @__PURE__ */ React$1.createElement("div", { style: { marginBottom: 10 } }, message), /* @__PURE__ */ React$1.createElement(
|
package/index.es.js
CHANGED
|
@@ -67271,21 +67271,6 @@ function getNewName(list2, targetName) {
|
|
|
67271
67271
|
return newName;
|
|
67272
67272
|
}
|
|
67273
67273
|
__name(getNewName, "getNewName");
|
|
67274
|
-
const useTraceUpdate = /* @__PURE__ */ __name((props) => {
|
|
67275
|
-
const prev = useRef(props);
|
|
67276
|
-
useEffect(() => {
|
|
67277
|
-
const changedProps = Object.entries(props).reduce((ps, [k2, v2]) => {
|
|
67278
|
-
if (prev.current[k2] !== v2) {
|
|
67279
|
-
ps[k2] = [prev.current[k2], v2];
|
|
67280
|
-
}
|
|
67281
|
-
return ps;
|
|
67282
|
-
}, {});
|
|
67283
|
-
if (Object.keys(changedProps).length > 0) {
|
|
67284
|
-
console.log("Changed props:", changedProps);
|
|
67285
|
-
}
|
|
67286
|
-
prev.current = props;
|
|
67287
|
-
});
|
|
67288
|
-
}, "useTraceUpdate");
|
|
67289
67274
|
const manualEnterMessage = "Build CSV File";
|
|
67290
67275
|
const manualEnterSubMessage = "Paste or type data to build a CSV file";
|
|
67291
67276
|
const helperText = [
|
|
@@ -67545,11 +67530,7 @@ const Uploader = /* @__PURE__ */ __name(({
|
|
|
67545
67530
|
}
|
|
67546
67531
|
return __accept;
|
|
67547
67532
|
}, [__accept, isAcceptPromise, resolvedAccept]);
|
|
67548
|
-
|
|
67549
|
-
__accept,
|
|
67550
|
-
isAcceptPromise
|
|
67551
|
-
});
|
|
67552
|
-
useDeepCompareEffect(() => {
|
|
67533
|
+
useEffect(() => {
|
|
67553
67534
|
if (isAcceptPromise) {
|
|
67554
67535
|
setAcceptLoading(true);
|
|
67555
67536
|
Promise.allSettled(Array.isArray(__accept) ? __accept : [__accept]).then(
|
|
@@ -73695,6 +73676,21 @@ const CmdButton = withCommand({
|
|
|
73695
73676
|
icon: "icon",
|
|
73696
73677
|
disabled: "isDisabled"
|
|
73697
73678
|
})(Button);
|
|
73679
|
+
const useTraceUpdate = /* @__PURE__ */ __name((props) => {
|
|
73680
|
+
const prev = useRef(props);
|
|
73681
|
+
useEffect(() => {
|
|
73682
|
+
const changedProps = Object.entries(props).reduce((ps, [k2, v2]) => {
|
|
73683
|
+
if (prev.current[k2] !== v2) {
|
|
73684
|
+
ps[k2] = [prev.current[k2], v2];
|
|
73685
|
+
}
|
|
73686
|
+
return ps;
|
|
73687
|
+
}, {});
|
|
73688
|
+
if (Object.keys(changedProps).length > 0) {
|
|
73689
|
+
console.log("Changed props:", changedProps);
|
|
73690
|
+
}
|
|
73691
|
+
prev.current = props;
|
|
73692
|
+
});
|
|
73693
|
+
}, "useTraceUpdate");
|
|
73698
73694
|
const showProgressToast = /* @__PURE__ */ __name((message, value, key, opts) => {
|
|
73699
73695
|
return window.toastr.default(
|
|
73700
73696
|
/* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("div", { style: { marginBottom: 10 } }, message), /* @__PURE__ */ React__default.createElement(
|
package/package.json
CHANGED
|
@@ -49,8 +49,6 @@ import { LoadingDots } from "./LoadingDots";
|
|
|
49
49
|
import { useDispatch } from "react-redux";
|
|
50
50
|
import { flushSync } from "react-dom";
|
|
51
51
|
import { useStableReference } from "../utils/hooks/useStableReference";
|
|
52
|
-
import useDeepCompareEffect from "use-deep-compare-effect";
|
|
53
|
-
import { useTraceUpdate } from "../utils/useTraceUpdate";
|
|
54
52
|
|
|
55
53
|
const manualEnterMessage = "Build CSV File";
|
|
56
54
|
const manualEnterSubMessage = "Paste or type data to build a CSV file";
|
|
@@ -364,11 +362,7 @@ const Uploader = ({
|
|
|
364
362
|
}
|
|
365
363
|
return __accept;
|
|
366
364
|
}, [__accept, isAcceptPromise, resolvedAccept]);
|
|
367
|
-
|
|
368
|
-
__accept,
|
|
369
|
-
isAcceptPromise
|
|
370
|
-
});
|
|
371
|
-
useDeepCompareEffect(() => {
|
|
365
|
+
useEffect(() => {
|
|
372
366
|
if (isAcceptPromise) {
|
|
373
367
|
setAcceptLoading(true);
|
|
374
368
|
Promise.allSettled(Array.isArray(__accept) ? __accept : [__accept]).then(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isEqual } from "lodash-es";
|
|
2
|
-
import { useRef } from "react";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
3
|
|
|
4
4
|
export const useDeepEqualMemo = value => {
|
|
5
5
|
const ref = useRef();
|
|
@@ -8,3 +8,8 @@ export const useDeepEqualMemo = value => {
|
|
|
8
8
|
}
|
|
9
9
|
return ref.current;
|
|
10
10
|
};
|
|
11
|
+
|
|
12
|
+
export const useDeepEqualEffect = (effect, deps) => {
|
|
13
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14
|
+
return useEffect(effect, useDeepEqualMemo(deps));
|
|
15
|
+
};
|