datastake-daf 0.6.775 → 0.6.776
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/components/index.js +244 -297
- package/dist/hooks/index.js +0 -72
- package/dist/pages/index.js +223 -271
- package/dist/utils/index.js +0 -13
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Map/ChainIcon/Markers/StakeholderMarker.js +76 -8
- package/src/@daf/core/components/Dashboard/Map/ChainIcon/index.js +8 -116
- package/src/@daf/core/components/Dashboard/Map/ChainIcon/utils.js +17 -73
- package/src/@daf/core/components/Dashboard/Map/helper.js +0 -1
- package/src/@daf/core/components/Dashboard/Map/hook.js +29 -53
- package/src/@daf/core/components/Dashboard/Map/style.js +5 -20
- package/src/@daf/utils/object.js +1 -3
- package/src/hooks.js +1 -2
- package/src/utils.js +1 -1
package/dist/hooks/index.js
CHANGED
|
@@ -2403,77 +2403,6 @@ const useGetQueryParams = ({
|
|
|
2403
2403
|
return params;
|
|
2404
2404
|
};
|
|
2405
2405
|
|
|
2406
|
-
const useViewFormUrlParams = ({
|
|
2407
|
-
params,
|
|
2408
|
-
pathname,
|
|
2409
|
-
search,
|
|
2410
|
-
searchParams,
|
|
2411
|
-
setSearchParams,
|
|
2412
|
-
push
|
|
2413
|
-
}) => {
|
|
2414
|
-
const [namespace, setNamespace] = React.useState(params.namespace);
|
|
2415
|
-
const [id, setId] = React.useState(params.id);
|
|
2416
|
-
const [group, setGroup] = React.useState(params.group);
|
|
2417
|
-
const [subsection, setSubsection] = React.useState(params.subsection);
|
|
2418
|
-
const [source, setSource] = React.useState(searchParams.get("source") || null);
|
|
2419
|
-
const [version, setVersion] = React.useState(searchParams.get("version") || null);
|
|
2420
|
-
React.useEffect(() => {
|
|
2421
|
-
if (id && params.id !== id || namespace && namespace !== params.namespace) {
|
|
2422
|
-
setGroup(undefined);
|
|
2423
|
-
setSubsection(undefined);
|
|
2424
|
-
} else {
|
|
2425
|
-
setGroup(params.group);
|
|
2426
|
-
setSubsection(params.subsection);
|
|
2427
|
-
}
|
|
2428
|
-
setNamespace(params.namespace);
|
|
2429
|
-
setId(params.id);
|
|
2430
|
-
}, [params, id, namespace]);
|
|
2431
|
-
React.useEffect(() => {
|
|
2432
|
-
if (source && version) {
|
|
2433
|
-
const newParams = new URLSearchParams(searchParams);
|
|
2434
|
-
newParams.set("source", source);
|
|
2435
|
-
newParams.set("version", version);
|
|
2436
|
-
setSearchParams(newParams);
|
|
2437
|
-
}
|
|
2438
|
-
}, [source, version]);
|
|
2439
|
-
const updateSourceAndVersion = (newSource, newVersion) => {
|
|
2440
|
-
const newParams = new URLSearchParams(searchParams);
|
|
2441
|
-
if (newSource && newVersion) {
|
|
2442
|
-
newParams.set("source", newSource);
|
|
2443
|
-
newParams.set("version", newVersion);
|
|
2444
|
-
} else {
|
|
2445
|
-
newParams.delete("source");
|
|
2446
|
-
newParams.delete("version");
|
|
2447
|
-
}
|
|
2448
|
-
setSearchParams(newParams);
|
|
2449
|
-
setSource(newSource);
|
|
2450
|
-
setVersion(newVersion);
|
|
2451
|
-
};
|
|
2452
|
-
const clearSourceAndVersion = () => {
|
|
2453
|
-
updateSourceAndVersion(null, null);
|
|
2454
|
-
};
|
|
2455
|
-
const match = React.useMemo(() => ({
|
|
2456
|
-
params,
|
|
2457
|
-
path: pathname
|
|
2458
|
-
}), [params, pathname]);
|
|
2459
|
-
return {
|
|
2460
|
-
namespace,
|
|
2461
|
-
id,
|
|
2462
|
-
group,
|
|
2463
|
-
subsection,
|
|
2464
|
-
source,
|
|
2465
|
-
version,
|
|
2466
|
-
params,
|
|
2467
|
-
searchParams,
|
|
2468
|
-
setSource,
|
|
2469
|
-
setVersion,
|
|
2470
|
-
updateSourceAndVersion,
|
|
2471
|
-
clearSourceAndVersion,
|
|
2472
|
-
match,
|
|
2473
|
-
search
|
|
2474
|
-
};
|
|
2475
|
-
};
|
|
2476
|
-
|
|
2477
2406
|
exports.checkPermission = checkPermission;
|
|
2478
2407
|
exports.checkPermissionList = checkPermissionList;
|
|
2479
2408
|
exports.useAdminDashboard = useAdminDashboard;
|
|
@@ -2492,5 +2421,4 @@ exports.useRadialBarChart = useRadialBarChart;
|
|
|
2492
2421
|
exports.useSource = useSource;
|
|
2493
2422
|
exports.useSources = useSources;
|
|
2494
2423
|
exports.useThemeLayout = useThemeLayout;
|
|
2495
|
-
exports.useViewFormUrlParams = useViewFormUrlParams;
|
|
2496
2424
|
exports.useWidgetFetch = useWidgetFetch;
|