next-recomponents 2.0.65 → 2.0.66
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/dist/index.js +11 -11
- package/dist/index.mjs +11 -11
- package/package.json +1 -1
- package/src/use-resources/index.ts +12 -12
package/dist/index.js
CHANGED
|
@@ -36685,22 +36685,22 @@ function useResources({
|
|
|
36685
36685
|
);
|
|
36686
36686
|
async function doSome() {
|
|
36687
36687
|
var _a, _b, _c, _d, _e;
|
|
36688
|
-
const
|
|
36689
|
-
|
|
36690
|
-
|
|
36691
|
-
|
|
36692
|
-
|
|
36693
|
-
|
|
36694
|
-
|
|
36695
|
-
|
|
36696
|
-
|
|
36697
|
-
|
|
36688
|
+
const keys2 = Object.keys(info);
|
|
36689
|
+
for (let key of keys2) {
|
|
36690
|
+
if (key) {
|
|
36691
|
+
if ((_a = info[key]) == null ? void 0 : _a.id) {
|
|
36692
|
+
await results[key].find((_b = info[key]) == null ? void 0 : _b.id, (_c = info[key]) == null ? void 0 : _c.defaultParams);
|
|
36693
|
+
} else if ((_d = info[key]) == null ? void 0 : _d.defaultParams) {
|
|
36694
|
+
await results[key].show((_e = info[key]) == null ? void 0 : _e.defaultParams);
|
|
36695
|
+
} else {
|
|
36696
|
+
results[key].setLoaded();
|
|
36697
|
+
}
|
|
36698
36698
|
}
|
|
36699
36699
|
}
|
|
36700
36700
|
}
|
|
36701
36701
|
(0, import_react8.useEffect)(() => {
|
|
36702
36702
|
doSome();
|
|
36703
|
-
}, [
|
|
36703
|
+
}, []);
|
|
36704
36704
|
return results;
|
|
36705
36705
|
}
|
|
36706
36706
|
|
package/dist/index.mjs
CHANGED
|
@@ -36664,22 +36664,22 @@ function useResources({
|
|
|
36664
36664
|
);
|
|
36665
36665
|
async function doSome() {
|
|
36666
36666
|
var _a, _b, _c, _d, _e;
|
|
36667
|
-
const
|
|
36668
|
-
|
|
36669
|
-
|
|
36670
|
-
|
|
36671
|
-
|
|
36672
|
-
|
|
36673
|
-
|
|
36674
|
-
|
|
36675
|
-
|
|
36676
|
-
|
|
36667
|
+
const keys2 = Object.keys(info);
|
|
36668
|
+
for (let key of keys2) {
|
|
36669
|
+
if (key) {
|
|
36670
|
+
if ((_a = info[key]) == null ? void 0 : _a.id) {
|
|
36671
|
+
await results[key].find((_b = info[key]) == null ? void 0 : _b.id, (_c = info[key]) == null ? void 0 : _c.defaultParams);
|
|
36672
|
+
} else if ((_d = info[key]) == null ? void 0 : _d.defaultParams) {
|
|
36673
|
+
await results[key].show((_e = info[key]) == null ? void 0 : _e.defaultParams);
|
|
36674
|
+
} else {
|
|
36675
|
+
results[key].setLoaded();
|
|
36676
|
+
}
|
|
36677
36677
|
}
|
|
36678
36678
|
}
|
|
36679
36679
|
}
|
|
36680
36680
|
useEffect4(() => {
|
|
36681
36681
|
doSome();
|
|
36682
|
-
}, [
|
|
36682
|
+
}, []);
|
|
36683
36683
|
return results;
|
|
36684
36684
|
}
|
|
36685
36685
|
|
package/package.json
CHANGED
|
@@ -448,23 +448,23 @@ export default function useResources<T extends Record<string, ItemsRecord>>({
|
|
|
448
448
|
);
|
|
449
449
|
|
|
450
450
|
async function doSome() {
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
451
|
+
const keys = Object.keys(info);
|
|
452
|
+
|
|
453
|
+
for (let key of keys) {
|
|
454
|
+
if (key) {
|
|
455
|
+
if (info[key]?.id) {
|
|
456
|
+
await results[key].find(info[key]?.id, info[key]?.defaultParams);
|
|
457
|
+
} else if (info[key]?.defaultParams) {
|
|
458
|
+
await results[key].show(info[key]?.defaultParams);
|
|
459
|
+
} else {
|
|
460
|
+
results[key].setLoaded();
|
|
461
|
+
}
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
useEffect(() => {
|
|
466
466
|
doSome();
|
|
467
|
-
}, [
|
|
467
|
+
}, []);
|
|
468
468
|
|
|
469
469
|
return results;
|
|
470
470
|
}
|