@cognite/reveal-components 1.0.1 → 1.0.2
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/assets/poi-markers/poi-create-cursor.js +4 -0
- package/dist/data-providers/FdmSDK.d.ts +8 -0
- package/dist/data-providers/FdmSDK.js +34 -21
- package/dist/data-providers/assets/createClassicAssetsCache.d.ts +7 -0
- package/dist/data-providers/assets/createClassicAssetsCache.js +18 -0
- package/dist/data-providers/assets/createDmsDescribableNodesCache.d.ts +23 -0
- package/dist/data-providers/assets/createDmsDescribableNodesCache.js +19 -0
- package/dist/data-providers/cache/PointCloudAnnotationCache.js +10 -10
- package/dist/data-providers/cache/annotationModelUtils.js +8 -6
- package/dist/data-providers/cache/cad/CadInstanceMappingsCacheImpl.js +6 -6
- package/dist/data-providers/core-dm-provider/CoreDm3dDataProvider.js +11 -11
- package/dist/data-providers/core-dm-provider/filterNodesByMappedTo3d.js +13 -13
- package/dist/data-providers/core-dm-provider/getCadConnectionsForInstances.js +18 -18
- package/dist/data-providers/core-dm-provider/getCadConnectionsForRevisions.js +11 -11
- package/dist/data-providers/core-dm-provider/getCadModelsForInstance.js +3 -3
- package/dist/data-providers/core-dm-provider/getDMSModels.js +6 -6
- package/dist/data-providers/core-dm-provider/getEdgeConnected3dInstances.js +8 -8
- package/dist/data-providers/core-dm-provider/getFdmConnectionsForNodes.js +19 -19
- package/dist/data-providers/core-dm-provider/listMappedFdmNodes.js +14 -14
- package/dist/data-providers/legacy-fdm-provider/fdmEdgesToCadConnections.js +3 -3
- package/dist/data-providers/network/cad/searchClassicAssetsForCadModels.js +5 -5
- package/dist/data-providers/network/cad/searchHybridDmAssetsForCadModels.js +3 -3
- package/dist/data-providers/network/common/getDMAssetsForAnnotationReference.js +3 -3
- package/dist/data-providers/utils/getDMSModelRevisionRefs.js +3 -3
- package/dist/domains/annotation360/image360SceneCollectionTransform.d.ts +18 -0
- package/dist/domains/annotation360/image360SceneCollectionTransform.js +37 -0
- package/dist/domains/index.d.ts +2 -1
- package/dist/domains/index.js +3 -2
- package/dist/domains/pointsOfInterest/PointsOfInterestTool.d.ts +5 -0
- package/dist/domains/pointsOfInterest/PointsOfInterestTool.js +36 -17
- package/dist/domains/reveal/RevealDomainObjectUtils.d.ts +1 -0
- package/dist/domains/reveal/RevealDomainObjectUtils.js +1 -1
- package/dist/domains/reveal/cad/CadDomainObject.d.ts +18 -1
- package/dist/domains/reveal/cad/CadDomainObject.js +31 -15
- package/dist/foundation/renderTarget/CdfCaches.d.ts +9 -1
- package/dist/foundation/renderTarget/CdfCaches.js +24 -14
- package/dist/foundation/treeNodes/cad-tree-node/cad-lazy-loader.d.ts +3 -1
- package/dist/foundation/treeNodes/cad-tree-node/cad-lazy-loader.js +33 -22
- package/dist/foundation/treeNodes/cad-tree-node/cad-node-update-styling.js +6 -6
- package/dist/foundation/treeNodes/cad-tree-node/nodes-and-instance-mappings-sdk/classic-instance-mappings-sdk.js +1 -1
- package/dist/ui/components/InstanceLabel/InstanceLabel.js +18 -30
- package/dist/ui/components/Reveal3DResources/Reveal3DResources.js +20 -20
- package/dist/ui/components/RevealCanvas/SDKProvider.js +6 -6
- package/dist/ui/components/RevealCanvas/UsageMetricsTrackerContext.d.ts +3 -0
- package/dist/ui/components/RevealCanvas/UsageMetricsTrackerContext.js +6 -0
- package/dist/ui/components/RevealCanvas/ViewerContext.d.ts +2 -0
- package/dist/ui/components/RevealCanvas/ViewerContext.js +5 -5
- package/dist/ui/components/RevealContext/RevealContext.js +6 -6
- package/dist/ui/components/RevealToolbar/AssetContextualizedButton.js +1 -1
- package/dist/ui/components/RuleBasedOutputs/hooks/useGetDMConnectionWithNodeFromHybridMappingsQuery.js +11 -11
- package/dist/ui/components/Widget/RevealWidget.context.d.ts +2 -1
- package/dist/ui/components/Widget/RevealWidget.context.js +1 -1
- package/dist/ui/components/Widget/RevealWidget.d.ts +11 -2
- package/dist/ui/components/Widget/RevealWidget.js +35 -20
- package/dist/ui/components/Widget/RevealWidgetCameraController.d.ts +3 -1
- package/dist/ui/components/Widget/RevealWidgetCameraController.js +12 -10
- package/dist/ui/components/Widget/RevealWidgetController.d.ts +3 -1
- package/dist/ui/components/Widget/RevealWidgetController.js +40 -33
- package/dist/ui/components/Widget/index.d.ts +1 -1
- package/dist/ui/components/Widget/styling/applyPointCloudInstanceStyling.js +5 -5
- package/dist/ui/components/Widget/useRevealWidgetMetricsTracking.d.ts +21 -0
- package/dist/ui/components/Widget/useRevealWidgetMetricsTracking.js +33 -0
- package/dist/ui/components/commandBased/Factories/DefaultIcons.js +31 -31
- package/dist/ui/components/commandBased/buttons/DropdownButton.d.ts +2 -0
- package/dist/ui/components/commandBased/buttons/DropdownButton.js +67 -48
- package/dist/ui/components/commandBased/treeView/DomainObjectTreeView/DomainObjectTreeView.function.d.ts +13 -2
- package/dist/ui/components/commandBased/treeView/DomainObjectTreeView/DomainObjectTreeView.function.js +17 -9
- package/dist/ui/components/commandBased/treeView/DomainObjectTreeView/DomainObjectTreeView.js +21 -20
- package/dist/ui/components/commandBased/treeView/TreeView/components/tree-view-info.js +2 -2
- package/dist/ui/components/commandBased/treeView/TreeView/extraComponents/CadTreeAssetMappingDropdown.js +34 -33
- package/dist/ui/components/commandBased/treeView/TreeView/tree-view-node.js +1 -0
- package/dist/ui/components/commandBased/treeView/TreeView/tree-view-props.d.ts +1 -0
- package/dist/ui/components/commandBased/treeView/TreeView/tree-view.js +27 -25
- package/dist/ui/components/i18n/I18n.js +3 -3
- package/dist/ui/components/index.d.ts +1 -1
- package/dist/ui/hooks/network/fetchLinkFromRelationshipsByTimeseries.js +4 -4
- package/dist/ui/hooks/network/getImage360CollectionsForDmInstance.js +7 -7
- package/dist/ui/hooks/network/getTimeseriesLatestDatapoints.js +3 -3
- package/dist/ui/hooks/pointClouds/fetchAnnotationsForModel.js +4 -4
- package/dist/ui/hooks/pointClouds/usePointCloudAnnotationMappingForIntersection.js +11 -11
- package/dist/ui/hooks/pointClouds/usePointCloudAnnotationMappingsForAssetInstances.js +4 -4
- package/dist/ui/hooks/scenes/use3dScenes.js +4 -4
- package/dist/ui/query/core-dm/usePointCloudDMVolumeMappingForIntersection.js +9 -9
- package/dist/ui/query/core-dm/usePointCloudDMVolumes.js +10 -10
- package/dist/ui/query/index.d.ts +1 -0
- package/dist/ui/query/index.js +17 -16
- package/dist/ui/query/useAll3dDirectConnectionsWithProperties.js +6 -6
- package/dist/ui/query/useAssetsAndTimeseriesLinkageDataQuery.js +24 -24
- package/dist/ui/query/useAssetsAndTimeseriesLinkages.context.d.ts +3 -2
- package/dist/ui/query/useAssetsAndTimeseriesLinkages.context.js +4 -4
- package/dist/ui/query/useAssetsAndTimeseriesLinkages.js +13 -13
- package/dist/ui/query/useAssetsByIdsQuery.js +10 -11
- package/dist/ui/query/useFetchClassicAssetsByIds.js +5 -5
- package/dist/ui/query/useFilterOnClassicAssetsInScene.js +6 -6
- package/dist/ui/query/useHybridMappingsForAssetInstances.js +9 -9
- package/dist/ui/query/useInstanceNames.d.ts +11 -0
- package/dist/ui/query/useInstanceNames.js +17 -0
- package/dist/ui/query/useInstancesByIdsQuery.context.d.ts +3 -5
- package/dist/ui/query/useInstancesByIdsQuery.context.js +4 -8
- package/dist/ui/query/useInstancesByIdsQuery.d.ts +9 -6
- package/dist/ui/query/useInstancesByIdsQuery.js +14 -23
- package/dist/ui/query/useNamedDmInstancesByIds.d.ts +12 -0
- package/dist/utilities/cache/ReadonlyEntityCache.d.ts +4 -0
- package/dist/utilities/cache/ReadonlyEntityCache.js +27 -0
- package/dist/utilities/createMixpanelUsageMetricsTracker.d.ts +23 -0
- package/dist/utilities/createMixpanelUsageMetricsTracker.js +23 -0
- package/dist/utilities/externalIndex.d.ts +2 -0
- package/dist/utilities/externalIndex.js +3 -1
- package/dist/utilities/getInstancesFromClick.js +9 -9
- package/dist/utilities/index.d.ts +2 -1
- package/dist/utilities/index.js +12 -9
- package/dist/utilities/signal/useCombinedUpdateSignal.d.ts +9 -0
- package/dist/utilities/signal/useCombinedUpdateSignal.js +14 -0
- package/dist/utilities/signal/useMemoWithUpdateSignal.d.ts +3 -0
- package/dist/utilities/signal/useMemoWithUpdateSignal.js +13 -0
- package/dist/utilities/usageMetricsTracker.d.ts +4 -0
- package/dist/utilities/usageMetricsTracker.js +4 -0
- package/package.json +6 -3
- package/dist/ui/hooks/network/getAssetsByIds.d.ts +0 -2
- package/dist/ui/hooks/network/getAssetsByIds.js +0 -4
- package/dist/ui/query/useDmsInstanceByIdsQuery.d.ts +0 -3
- package/dist/ui/query/useDmsInstanceByIdsQuery.js +0 -18
|
@@ -1,75 +1,94 @@
|
|
|
1
1
|
import { useCommand as e } from "../hooks/useCommand.js";
|
|
2
2
|
import { useCommandProps as t, useCommandVisible as n } from "../hooks/useCommandProps.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { LabelWithShortcut as r } from "../utils/LabelWithShortcut.js";
|
|
4
|
+
import { mapButtonType as i } from "../utils/utilities.js";
|
|
5
|
+
import { BaseOptionCommand as a, OptionType as o } from "../../../../foundation/commands/BaseOptionCommand.js";
|
|
6
|
+
import { useState as s } from "react";
|
|
7
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import { Tooltip as d, TooltipContent as f, TooltipProvider as p, TooltipTrigger as m } from "@cognite/aura/components/tooltip";
|
|
9
|
+
import { Button as h } from "@cognite/aura/components/button";
|
|
10
|
+
import { IconChevronDown as g, IconChevronUp as _ } from "@tabler/icons-react";
|
|
11
|
+
import { DropdownMenu as v, DropdownMenuCheckboxItem as y, DropdownMenuContent as b, DropdownMenuTrigger as x } from "@cognite/aura/components/dropdown-menu";
|
|
10
12
|
//#region libs/shared/reveal-components/src/ui/components/commandBased/buttons/DropdownButton.tsx
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
+
function S(e, { reason: t, event: n }) {
|
|
14
|
+
return !e && t === "trigger-press" && n instanceof MouseEvent && n.type === "click" && n.detail > 0;
|
|
15
|
+
}
|
|
16
|
+
function C(e, t) {
|
|
17
|
+
if (e instanceof a && e.optionType === o.Dropdown) return /* @__PURE__ */ l(w, {
|
|
13
18
|
inputCommand: e,
|
|
14
19
|
placement: t
|
|
15
20
|
}, e.uniqueId);
|
|
16
21
|
}
|
|
17
|
-
var
|
|
22
|
+
var w = ({ inputCommand: t, placement: r, usedInSettings: i = !1 }) => {
|
|
18
23
|
let a = e(t);
|
|
19
|
-
return n(a) ? i ? /* @__PURE__ */
|
|
24
|
+
return n(a) ? i ? /* @__PURE__ */ l(E, { command: a }) : /* @__PURE__ */ l(T, {
|
|
20
25
|
command: a,
|
|
21
26
|
placement: r
|
|
22
|
-
}) : /* @__PURE__ */ c
|
|
23
|
-
},
|
|
24
|
-
let { uniqueId:
|
|
25
|
-
if (!e.children?.length) return /* @__PURE__ */ c
|
|
26
|
-
let
|
|
27
|
+
}) : /* @__PURE__ */ l(c, {});
|
|
28
|
+
}, T = ({ command: e, placement: n }) => {
|
|
29
|
+
let { uniqueId: a, isEnabled: o } = t(e), [y, C] = s(!1);
|
|
30
|
+
if (!e.children?.length) return /* @__PURE__ */ l(c, {});
|
|
31
|
+
let w = e.selectedChild?.label, T = i(e.buttonType), E = e.label;
|
|
27
32
|
return /* @__PURE__ */ l(p, {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
delayDuration: 500,
|
|
34
|
+
children: /* @__PURE__ */ u(d, {
|
|
35
|
+
disabled: E === void 0 || y,
|
|
36
|
+
children: [/* @__PURE__ */ u(v, {
|
|
37
|
+
open: y,
|
|
38
|
+
onOpenChange: (e, t) => {
|
|
39
|
+
S(e, t) || C(e);
|
|
40
|
+
},
|
|
41
|
+
children: [/* @__PURE__ */ l(m, { render: /* @__PURE__ */ l(x, { render: /* @__PURE__ */ u(h, {
|
|
42
|
+
variant: T,
|
|
43
|
+
size: "sm",
|
|
44
|
+
disabled: !o,
|
|
45
|
+
"aria-label": E,
|
|
46
|
+
className: `pl-1 pr-2 py-1 ${y ? "bg-accent-background" : ""}`,
|
|
47
|
+
children: [l(y ? _ : g, {}), w]
|
|
48
|
+
}, a) }) }), /* @__PURE__ */ l(b, {
|
|
49
|
+
side: n,
|
|
50
|
+
align: "start",
|
|
51
|
+
children: e.children.map((e) => /* @__PURE__ */ l(D, {
|
|
52
|
+
command: e,
|
|
53
|
+
setOpen: C
|
|
54
|
+
}, e.uniqueId))
|
|
55
|
+
})]
|
|
56
|
+
}), /* @__PURE__ */ l(f, {
|
|
57
|
+
side: n,
|
|
58
|
+
children: /* @__PURE__ */ l(r, {
|
|
59
|
+
label: E,
|
|
60
|
+
command: e
|
|
61
|
+
})
|
|
62
|
+
})]
|
|
63
|
+
})
|
|
45
64
|
});
|
|
46
|
-
},
|
|
47
|
-
let [t, n] =
|
|
48
|
-
if (!e.children?.length) return /* @__PURE__ */ c
|
|
65
|
+
}, E = ({ command: e }) => {
|
|
66
|
+
let [t, n] = s(!1);
|
|
67
|
+
if (!e.children?.length) return /* @__PURE__ */ l(c, {});
|
|
49
68
|
let r = e.label, i = e.selectedChild?.label;
|
|
50
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ u("div", {
|
|
51
70
|
className: "flex flex-row self-stretch items-center gap-3",
|
|
52
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ l("p", {
|
|
53
72
|
title: r,
|
|
54
73
|
className: "w-[80px] truncate text-sm",
|
|
55
74
|
children: r
|
|
56
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ l("div", {
|
|
57
76
|
className: "flex-1",
|
|
58
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ u(v, {
|
|
59
78
|
open: t,
|
|
60
79
|
onOpenChange: n,
|
|
61
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ l(x, { render: /* @__PURE__ */ u(h, {
|
|
62
81
|
variant: "ghost",
|
|
63
82
|
"aria-label": r,
|
|
64
83
|
className: `w-full justify-between border border-transparent rounded-lg bg-background py-2 pl-2 pr-1 text-sm hover:bg-accent-background hover:border-border-emphasized${t ? " bg-accent-background" : ""}`,
|
|
65
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ l("span", {
|
|
66
85
|
className: "font-normal",
|
|
67
86
|
children: i
|
|
68
|
-
}),
|
|
69
|
-
}) }), /* @__PURE__ */
|
|
87
|
+
}), l(t ? _ : g, {})]
|
|
88
|
+
}) }), /* @__PURE__ */ l(b, {
|
|
70
89
|
side: "bottom",
|
|
71
90
|
align: "start",
|
|
72
|
-
children: e.children.map((e) => /* @__PURE__ */
|
|
91
|
+
children: e.children.map((e) => /* @__PURE__ */ l(D, {
|
|
73
92
|
command: e,
|
|
74
93
|
setOpen: n
|
|
75
94
|
}, e.uniqueId))
|
|
@@ -77,9 +96,9 @@ var v = ({ inputCommand: t, placement: r, usedInSettings: i = !1 }) => {
|
|
|
77
96
|
})
|
|
78
97
|
})]
|
|
79
98
|
});
|
|
80
|
-
},
|
|
99
|
+
}, D = ({ command: e, setOpen: n }) => {
|
|
81
100
|
let { isEnabled: r, isChecked: i } = t(e);
|
|
82
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ l(y, {
|
|
83
102
|
disabled: !r,
|
|
84
103
|
checked: i,
|
|
85
104
|
onCheckedChange: () => {
|
|
@@ -89,4 +108,4 @@ var v = ({ inputCommand: t, placement: r, usedInSettings: i = !1 }) => {
|
|
|
89
108
|
});
|
|
90
109
|
};
|
|
91
110
|
//#endregion
|
|
92
|
-
export {
|
|
111
|
+
export { w as DropdownButton, C as createDropdownButton, S as isSpuriousTriggerClickClose };
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import { BaseCommand } from '../../../../../domains';
|
|
1
|
+
import { BaseCommand, DomainObject } from '../../../../../domains';
|
|
2
2
|
import { TreeNodeType } from '../../../../../foundation/treeNodes/tree-node-type/tree-node-type';
|
|
3
3
|
/**
|
|
4
4
|
* Handles the selection of a domain object node.
|
|
5
5
|
* @param node - The tree node to be selected or deselected.
|
|
6
|
+
* @param root - The root of the domain object tree, used to clear other selections.
|
|
6
7
|
*/
|
|
7
|
-
export declare function onSelectDomainObject(node: TreeNodeType): void;
|
|
8
|
+
export declare function onSelectDomainObject(node: TreeNodeType, root: DomainObject): void;
|
|
9
|
+
/**
|
|
10
|
+
* Clears the highlight/selection of the node currently selected in any CAD node hierarchy
|
|
11
|
+
* @param root - The root of the domain object tree to search for CAD models.
|
|
12
|
+
*/
|
|
13
|
+
export declare function clearAllCadNodeSelections(root: DomainObject): void;
|
|
8
14
|
export declare function onToggleDomainObject(node: TreeNodeType): void;
|
|
15
|
+
/**
|
|
16
|
+
* Clears all selection/highlight state in the tree
|
|
17
|
+
* @param root - The root of the domain object tree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function onClickTreeViewBackground(root: DomainObject): void;
|
|
9
20
|
export declare function getContextMenu(node: TreeNodeType): BaseCommand[] | undefined;
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import { DomainObject as e } from "../../../../../foundation/domainObjects/DomainObject.js";
|
|
2
|
+
import { CadDomainObject as t } from "../../../../../domains/reveal/cad/CadDomainObject.js";
|
|
2
3
|
import "../../../../../domains/index.js";
|
|
3
4
|
//#region libs/shared/reveal-components/src/ui/components/commandBased/treeView/DomainObjectTreeView/DomainObjectTreeView.function.tsx
|
|
4
|
-
function
|
|
5
|
-
if (t.onSelect !== void 0) {
|
|
5
|
+
function n(t, n) {
|
|
6
|
+
if (r(n), t.onSelect !== void 0) {
|
|
6
7
|
t.onSelect();
|
|
7
8
|
return;
|
|
8
9
|
}
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (t instanceof e) {
|
|
11
|
+
for (let e of n.getThisAndDescendants()) e !== t && e.setSelected(!1);
|
|
12
|
+
t.setSelected(!t.isSelected);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function r(e) {
|
|
16
|
+
for (let n of e.getDescendantsByType(t)) n.clearNodeSelection();
|
|
13
17
|
}
|
|
14
|
-
function
|
|
18
|
+
function i(e) {
|
|
15
19
|
e.toggleVisible?.();
|
|
16
20
|
}
|
|
17
|
-
function
|
|
21
|
+
function a(e) {
|
|
22
|
+
r(e);
|
|
23
|
+
for (let t of e.getThisAndDescendants()) t.setSelected(!1);
|
|
24
|
+
}
|
|
25
|
+
function o(t) {
|
|
18
26
|
if (t instanceof e) return t.getContextMenu();
|
|
19
27
|
}
|
|
20
28
|
//#endregion
|
|
21
|
-
export { r as getContextMenu,
|
|
29
|
+
export { r as clearAllCadNodeSelections, o as getContextMenu, a as onClickTreeViewBackground, n as onSelectDomainObject, i as onToggleDomainObject };
|
package/dist/ui/components/commandBased/treeView/DomainObjectTreeView/DomainObjectTreeView.js
CHANGED
|
@@ -4,29 +4,30 @@ import { CadTreeNodeViewAdapter as n } from "../../../../../foundation/treeNodes
|
|
|
4
4
|
import { useCadNode3DInfo as r } from "../../../../query/useCadNode3DInfo.js";
|
|
5
5
|
import { TreeView as i } from "../TreeView/tree-view.js";
|
|
6
6
|
import { CadNodeInfoDialog as a } from "./CadNodeInfoDialog.js";
|
|
7
|
-
import { getContextMenu as o,
|
|
8
|
-
import { useState as
|
|
9
|
-
import { Fragment as
|
|
7
|
+
import { getContextMenu as o, onClickTreeViewBackground as s, onSelectDomainObject as c, onToggleDomainObject as l } from "./DomainObjectTreeView.function.js";
|
|
8
|
+
import { useState as u } from "react";
|
|
9
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
10
|
//#region libs/shared/reveal-components/src/ui/components/commandBased/treeView/DomainObjectTreeView/DomainObjectTreeView.tsx
|
|
11
|
-
var
|
|
12
|
-
let
|
|
13
|
-
e instanceof n && (
|
|
14
|
-
}, { data:
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
maxLabelLength:
|
|
17
|
-
root:
|
|
18
|
-
onSelectNode:
|
|
19
|
-
onToggleNode:
|
|
20
|
-
onClickInfo:
|
|
11
|
+
var m = 20, h = () => {
|
|
12
|
+
let h = e(), [g, _] = u(void 0), [v, y] = u(!1), b = (e) => {
|
|
13
|
+
e instanceof n && (_(e), y(!0));
|
|
14
|
+
}, { data: x, isLoading: S, isError: C } = r(h.root.sdk, g?.revisionId, g?.node.nodeId);
|
|
15
|
+
return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(i, {
|
|
16
|
+
maxLabelLength: m,
|
|
17
|
+
root: h.root,
|
|
18
|
+
onSelectNode: (e) => c(e, h.root),
|
|
19
|
+
onToggleNode: l,
|
|
20
|
+
onClickInfo: b,
|
|
21
|
+
onClickBackground: () => s(h.root),
|
|
21
22
|
getContextMenu: o,
|
|
22
23
|
getIconFromIconName: t.getIcon
|
|
23
|
-
}), /* @__PURE__ */
|
|
24
|
-
open:
|
|
25
|
-
onOpenChange:
|
|
26
|
-
node:
|
|
27
|
-
isLoading:
|
|
28
|
-
isError:
|
|
24
|
+
}), /* @__PURE__ */ f(a, {
|
|
25
|
+
open: v,
|
|
26
|
+
onOpenChange: y,
|
|
27
|
+
node: x,
|
|
28
|
+
isLoading: S,
|
|
29
|
+
isError: C
|
|
29
30
|
})] });
|
|
30
31
|
};
|
|
31
32
|
//#endregion
|
|
32
|
-
export {
|
|
33
|
+
export { h as DomainObjectTreeView };
|
|
@@ -14,8 +14,8 @@ var c = ({ node: c, onClick: l }) => {
|
|
|
14
14
|
size: "icon-sm",
|
|
15
15
|
"aria-label": "Info",
|
|
16
16
|
className: "tree-view-info text-medium-foreground",
|
|
17
|
-
onClick: () => {
|
|
18
|
-
d(c);
|
|
17
|
+
onClick: (e) => {
|
|
18
|
+
e.stopPropagation(), d(c);
|
|
19
19
|
},
|
|
20
20
|
children: /* @__PURE__ */ e(o, {})
|
|
21
21
|
}) }), /* @__PURE__ */ e(r, {
|
|
@@ -1,69 +1,70 @@
|
|
|
1
1
|
import { createInstanceKey as e, instanceIdToInstanceReference as t } from "../../../../../../data-providers/cache/idAndKeyTranslation.js";
|
|
2
2
|
import { createInstanceReferenceKey as n } from "../../../../../../utilities/instanceIds/toKey.js";
|
|
3
|
+
import { useMemoWithUpdateSignal as r } from "../../../../../../utilities/signal/useMemoWithUpdateSignal.js";
|
|
3
4
|
import "../../../../../../utilities/index.js";
|
|
4
|
-
import { CadTreeAssetMappingDropdownContext as
|
|
5
|
-
import { useContext as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import { IconLink as
|
|
9
|
-
import { Label as
|
|
10
|
-
import { Popover as
|
|
11
|
-
import { cn as
|
|
5
|
+
import { CadTreeAssetMappingDropdownContext as i } from "./CadTreeAssetMappingDropdown.context.js";
|
|
6
|
+
import { useContext as a, useMemo as o } from "react";
|
|
7
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import { Tooltip as u, TooltipContent as d, TooltipProvider as f, TooltipTrigger as p } from "@cognite/aura/components/tooltip";
|
|
9
|
+
import { IconLink as m, IconTrash as h } from "@tabler/icons-react";
|
|
10
|
+
import { Label as g } from "@cognite/aura/components/label";
|
|
11
|
+
import { Popover as _, PopoverContent as v, PopoverTrigger as y } from "@cognite/aura/components/popover";
|
|
12
|
+
import { cn as b } from "@cognite/aura/utils";
|
|
12
13
|
//#region libs/shared/reveal-components/src/ui/components/commandBased/treeView/TreeView/extraComponents/CadTreeAssetMappingDropdown.tsx
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
let { useInstancesByIdsQuery:
|
|
16
|
-
if (
|
|
17
|
-
let
|
|
14
|
+
var x = 28;
|
|
15
|
+
function S({ cadTreeNode: h }) {
|
|
16
|
+
let { useInstancesByIdsQuery: g } = a(i), x = r(() => h.getInstanceMappings(), h.updateSignal, [h]), { data: S } = g(o(() => x.map((e) => t(e.instance)), [x]));
|
|
17
|
+
if (S === void 0 || S.size === 0) return /* @__PURE__ */ c(s, {});
|
|
18
|
+
let w = async (e) => {
|
|
18
19
|
try {
|
|
19
|
-
await
|
|
20
|
+
await h.deleteInstanceMapping(e);
|
|
20
21
|
} catch (e) {
|
|
21
22
|
console.error("CAD Instance mapping deletion failed: ", e);
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ c(s, { children: /* @__PURE__ */ c(f, {
|
|
25
26
|
delayDuration: 500,
|
|
26
|
-
children: /* @__PURE__ */
|
|
27
|
+
children: /* @__PURE__ */ l(u, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ l(_, { children: [/* @__PURE__ */ c(y, { render: /* @__PURE__ */ c("div", {
|
|
27
28
|
role: "button",
|
|
28
29
|
tabIndex: 0,
|
|
29
|
-
className:
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
}) }), /* @__PURE__ */
|
|
30
|
+
className: b("flex shrink-0 items-center justify-center rounded-lg", "hover:bg-accent-background", "cursor-pointer transition-all"),
|
|
31
|
+
children: /* @__PURE__ */ c(m, { className: "size-4" })
|
|
32
|
+
}) }), /* @__PURE__ */ c(v, {
|
|
32
33
|
side: "right",
|
|
33
34
|
align: "start",
|
|
34
35
|
sideOffset: 2,
|
|
35
36
|
className: "p-0 flex justify-between",
|
|
36
|
-
children: /* @__PURE__ */
|
|
37
|
+
children: /* @__PURE__ */ c("div", {
|
|
37
38
|
className: "max-h-[600px] w-full overflow-x-hidden overflow-y-auto flex p-1.5 flex-col gap-1.5 rounded-lg bg-white shadow-[0px_1px_16px_4px_rgba(79,82,104,0.1),0px_1px_8px_0px_rgba(79,82,104,0.08),0px_1px_2px_0px_rgba(79,82,104,0.24)]",
|
|
38
|
-
children:
|
|
39
|
-
let i = n(t(r.instance)), a =
|
|
40
|
-
return /* @__PURE__ */
|
|
39
|
+
children: x.map((r) => {
|
|
40
|
+
let i = n(t(r.instance)), a = S.get(i);
|
|
41
|
+
return /* @__PURE__ */ c(C, {
|
|
41
42
|
name: a?.name ?? `${i}`,
|
|
42
|
-
deleteDelegate:
|
|
43
|
+
deleteDelegate: h.canDelete ? () => w(r) : void 0
|
|
43
44
|
}, e(r.instance));
|
|
44
45
|
})
|
|
45
46
|
})
|
|
46
|
-
})] }) }), /* @__PURE__ */
|
|
47
|
+
})] }) }), /* @__PURE__ */ c(d, {
|
|
47
48
|
side: "right",
|
|
48
49
|
children: "Show asset mappings"
|
|
49
50
|
})] })
|
|
50
51
|
}) });
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
let n = e.length !== void 0 && e.length >
|
|
54
|
-
return /* @__PURE__ */
|
|
53
|
+
function C({ name: e, deleteDelegate: t }) {
|
|
54
|
+
let n = e.length !== void 0 && e.length > x ? `${e.slice(0, x)}...` : e;
|
|
55
|
+
return /* @__PURE__ */ l("div", {
|
|
55
56
|
className: "flex flex-row justify-between",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
+
children: [/* @__PURE__ */ c(f, { children: /* @__PURE__ */ l(u, { children: [/* @__PURE__ */ c(p, { render: /* @__PURE__ */ c(g, {
|
|
57
58
|
className: "p-0",
|
|
58
59
|
children: n
|
|
59
|
-
}) }), /* @__PURE__ */
|
|
60
|
+
}) }), /* @__PURE__ */ c(d, { children: e })] }) }), t !== void 0 && /* @__PURE__ */ c("div", {
|
|
60
61
|
role: "button",
|
|
61
62
|
tabIndex: 0,
|
|
62
|
-
className:
|
|
63
|
+
className: b("inline-flex size-5 shrink-0 items-center justify-center rounded-sm", "text-destructive-foreground-on-critical", "hover:bg-destructive-background-hover", "cursor-pointer transition-all"),
|
|
63
64
|
onClick: t,
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ c(h, {})
|
|
65
66
|
})]
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
//#endregion
|
|
69
|
-
export {
|
|
70
|
+
export { S as CadTreeAssetMappingDropdown };
|
|
@@ -32,6 +32,7 @@ var u = ({ node: r, level: u, props: d, openContextMenu: p }) => {
|
|
|
32
32
|
/* @__PURE__ */ c("div", {
|
|
33
33
|
className: "flex flex-row items-center tree-view-node-row gap-1.5",
|
|
34
34
|
role: "row",
|
|
35
|
+
onClick: (e) => e.stopPropagation(),
|
|
35
36
|
children: [
|
|
36
37
|
/* @__PURE__ */ s(_, { node: r }),
|
|
37
38
|
E && /* @__PURE__ */ s(v, {
|
|
@@ -13,6 +13,7 @@ export type TreeViewProps = {
|
|
|
13
13
|
maxLabelLength?: number;
|
|
14
14
|
onSelectNode?: TreeNodeSelectAction;
|
|
15
15
|
onToggleNode?: TreeNodeAction;
|
|
16
|
+
onClickBackground?: () => void;
|
|
16
17
|
onClickInfo?: TreeNodeAction;
|
|
17
18
|
getContextMenu?: GetTreeNodeContextMenu;
|
|
18
19
|
onKeyDown?: (root: TreeNodeType, event: KeyboardEvent) => boolean;
|
|
@@ -4,50 +4,52 @@ import { forwardRef as n, useCallback as r, useContext as i, useState as a } fro
|
|
|
4
4
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
5
|
//#region libs/shared/reveal-components/src/ui/components/commandBased/treeView/TreeView/tree-view.tsx
|
|
6
6
|
var l = n((n, l) => {
|
|
7
|
-
let { loader: u, onKeyDown: d,
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
let { loader: u, onKeyDown: d, onClickBackground: f, getContextMenu: p, showRoot: m, className: h } = n, g = u?.root ?? n.root, { Loader: _, TreeViewNode: v, TreeViewContextMenu: y } = i(t), [b, x] = a(0), [S, C] = a(void 0);
|
|
8
|
+
g === void 0 && u?.loadInitialRoot !== void 0 && u.loadInitialRoot().then(() => {
|
|
9
|
+
x((e) => e + 1);
|
|
10
10
|
});
|
|
11
|
-
let
|
|
12
|
-
if (
|
|
13
|
-
let n =
|
|
14
|
-
n !== void 0 && n.length > 0 &&
|
|
11
|
+
let w = r((e, t) => {
|
|
12
|
+
if (p !== void 0) {
|
|
13
|
+
let n = p(e);
|
|
14
|
+
n !== void 0 && n.length > 0 && C({
|
|
15
15
|
commands: n,
|
|
16
16
|
position: t
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
}, [
|
|
20
|
-
|
|
21
|
-
}, [d,
|
|
22
|
-
if (
|
|
23
|
-
let
|
|
19
|
+
}, [p]), T = r((e) => {
|
|
20
|
+
g !== void 0 && d !== void 0 && d(g, e.nativeEvent) && e.preventDefault();
|
|
21
|
+
}, [d, g]);
|
|
22
|
+
if (g === void 0) return /* @__PURE__ */ s(_, {});
|
|
23
|
+
let E = m === !1 ? /* @__PURE__ */ s("div", {
|
|
24
24
|
ref: l,
|
|
25
|
-
className: `overflow-auto m-2 outline-none w-auto h-auto whitespace-nowrap pb-1${
|
|
26
|
-
onKeyDown:
|
|
25
|
+
className: `overflow-auto m-2 outline-none w-auto h-auto whitespace-nowrap pb-1${h === void 0 ? "" : ` ${h}`}`,
|
|
26
|
+
onKeyDown: T,
|
|
27
|
+
onClick: f,
|
|
27
28
|
tabIndex: 0,
|
|
28
29
|
role: "tree",
|
|
29
|
-
children: e(
|
|
30
|
+
children: e(g, u, !1)?.map((e) => /* @__PURE__ */ s(v, {
|
|
30
31
|
node: e,
|
|
31
32
|
level: 0,
|
|
32
33
|
props: n,
|
|
33
|
-
openContextMenu:
|
|
34
|
+
openContextMenu: w
|
|
34
35
|
}, e.id))
|
|
35
36
|
}) : /* @__PURE__ */ s("div", {
|
|
36
37
|
ref: l,
|
|
37
|
-
className: `overflow-auto m-2 outline-none w-auto h-auto whitespace-nowrap pb-1${
|
|
38
|
-
onKeyDown:
|
|
38
|
+
className: `overflow-auto m-2 outline-none w-auto h-auto whitespace-nowrap pb-1${h === void 0 ? "" : ` ${h}`}`,
|
|
39
|
+
onKeyDown: T,
|
|
40
|
+
onClick: f,
|
|
39
41
|
tabIndex: 0,
|
|
40
42
|
role: "tree",
|
|
41
|
-
children: /* @__PURE__ */ s(
|
|
42
|
-
node:
|
|
43
|
+
children: /* @__PURE__ */ s(v, {
|
|
44
|
+
node: g,
|
|
43
45
|
level: 0,
|
|
44
46
|
props: n,
|
|
45
|
-
openContextMenu:
|
|
46
|
-
},
|
|
47
|
+
openContextMenu: w
|
|
48
|
+
}, g.id)
|
|
47
49
|
});
|
|
48
|
-
return /* @__PURE__ */ c(o, { children: [
|
|
49
|
-
state:
|
|
50
|
-
onClose: () =>
|
|
50
|
+
return /* @__PURE__ */ c(o, { children: [E, S !== void 0 && /* @__PURE__ */ s(y, {
|
|
51
|
+
state: S,
|
|
52
|
+
onClose: () => C(void 0)
|
|
51
53
|
})] });
|
|
52
54
|
});
|
|
53
55
|
//#endregion
|
|
@@ -7,7 +7,7 @@ import { createContext as a, useContext as o, useEffect as s, useState as c } fr
|
|
|
7
7
|
import { jsx as l } from "react/jsx-runtime";
|
|
8
8
|
//#region libs/shared/reveal-components/src/ui/components/i18n/I18n.tsx
|
|
9
9
|
var u = a(null), d = (i, a = !0) => {
|
|
10
|
-
let o = i ?? r() ?? "en", [l, u] = c(o), [d, f] = c({});
|
|
10
|
+
let o = i ?? r() ?? "en", [l, u] = c(o), [d, f] = c({}), p = l === "en" ? t : d;
|
|
11
11
|
return s(() => {
|
|
12
12
|
if (!a) return;
|
|
13
13
|
let e = () => {
|
|
@@ -18,7 +18,7 @@ var u = a(null), d = (i, a = !0) => {
|
|
|
18
18
|
window.removeEventListener("languagechange", e);
|
|
19
19
|
};
|
|
20
20
|
}, [a, l]), s(() => {
|
|
21
|
-
a
|
|
21
|
+
!a || l === "en" || (async () => {
|
|
22
22
|
try {
|
|
23
23
|
let t = await e(/* #__PURE__ */ Object.assign({
|
|
24
24
|
"../../../common/i18n/de/reveal-components.json": () => import("../../../common/i18n/de/reveal-components.js"),
|
|
@@ -44,7 +44,7 @@ var u = a(null), d = (i, a = !0) => {
|
|
|
44
44
|
});
|
|
45
45
|
}, [l, a]), {
|
|
46
46
|
currentLanguage: l,
|
|
47
|
-
t: (e) => n(e) ?
|
|
47
|
+
t: (e) => n(e) ? p[e.key] === void 0 ? t[e.key] : p[e.key] : e.untranslated
|
|
48
48
|
};
|
|
49
49
|
}, f = (e) => {
|
|
50
50
|
let t = o(u), n = r() ?? "en", i = d(e ?? n, t === null);
|
|
@@ -15,4 +15,4 @@ export { RevealContext, type RevealContextProps } from './RevealContext';
|
|
|
15
15
|
export { RevealToolbar } from './RevealToolbar';
|
|
16
16
|
export { SceneContainer, type SceneContainerProps, type SceneIdentifiers, useLoadedScene, } from './SceneContainer';
|
|
17
17
|
export { type BooleanCondition, type BooleanConditionTypes, type BooleanExpression, type ColorRuleOutput, type ConcreteExpression, type CriteriaTypes, type DatetimeBetweenConditionType, type DatetimeCondition, type DatetimeConditionTypes, type DatetimeExpression, type DatetimeUniqueConditionTypes, type Expression, type ExpressionOperator, type ExpressionOperatorsTypes, type FdmInstanceNodeDataKey, type FdmKeyRuleTriggerTyping, type FdmRuleTrigger, type FdmRuleTriggerTyping, getRuleTriggerTypes, type MetadataRuleTrigger, type NumericCondition, type NumericConditionTypes, type NumericExpression, type NumericOutsideConditionType, type NumericUniqueConditionTypes, type NumericWithinConditionType, type Rule, type RuleAndEnabled, RuleBasedOutputsPanel, type RuleOutput, type RuleOutputSet, type RuleWithOutputs, type StringCondition, type StringConditionTypes, type StringExpression, type TimeseriesRuleTrigger, type TriggerType, useCreateRuleInstance, useDeleteRuleInstance, useEditRuleInstance, useFetchRuleInstances, useSearchRuleInstance, } from './RuleBasedOutputs';
|
|
18
|
-
export { RevealWidget, RevealWidgetCameraController, RevealWidgetController, type RevealWidgetProps, Default3DStyles, } from './Widget';
|
|
18
|
+
export { RevealWidget, RevealWidgetCameraController, RevealWidgetController, type RevealWidgetProps, type RevealWidgetTrackingProps, Default3DStyles, } from './Widget';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { isDefined as e } from "../../../utilities/isDefined.js";
|
|
2
|
+
import { executeParallel as t } from "../../../utilities/executeParallel.js";
|
|
3
3
|
import { getRelationships as n } from "./getRelationships.js";
|
|
4
4
|
import { chunk as r } from "lodash-es";
|
|
5
5
|
//#region libs/shared/reveal-components/src/ui/hooks/network/fetchLinkFromRelationshipsByTimeseries.ts
|
|
6
6
|
var i = 1e3, a = async (a, o, s) => {
|
|
7
7
|
let c = r(o, i);
|
|
8
|
-
return (await
|
|
8
|
+
return (await t(c.map((e) => async () => await n(a, {
|
|
9
9
|
resourceExternalIds: e,
|
|
10
10
|
relationshipResourceTypes: s
|
|
11
|
-
})), 2)).filter(
|
|
11
|
+
})), 2)).filter(e).flat()?.map((e) => {
|
|
12
12
|
let t = {
|
|
13
13
|
assetIds: { externalId: "" },
|
|
14
14
|
timeseriesIds: { externalId: "" }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { restrictToDmsId as e } from "../../../utilities/restrictToDmsId.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { COGNITE_IMAGE_360_SOURCE as t, COGNITE_VISUALIZABLE_SOURCE as n } from "../../../data-providers/core-dm-provider/dataModels.js";
|
|
3
|
+
import { createDmsQueryDataAccumulator as r } from "../../../utilities/dms-cursoring/dmsAccumulator.js";
|
|
4
4
|
import { hasDataImage360AnnotationContainerFilter as i, hasDataImage360ContainerFilter as a, hasDataObject3DContainerFilter as o, hasDataVisualizableContainerFilter as s, isCoreDmImage360CollectionFilter as c } from "../../../data-providers/core-dm-provider/utils/filters.js";
|
|
5
5
|
//#region libs/shared/reveal-components/src/ui/hooks/network/getImage360CollectionsForDmInstance.ts
|
|
6
|
-
async function l(
|
|
7
|
-
let i = u(
|
|
8
|
-
return (await
|
|
6
|
+
async function l(t, n) {
|
|
7
|
+
let i = u(t);
|
|
8
|
+
return (await r(n, i, { serial: [
|
|
9
9
|
"image_360_annotations",
|
|
10
10
|
"image_360s",
|
|
11
11
|
"image_360_collections"
|
|
@@ -22,7 +22,7 @@ function u(e) {
|
|
|
22
22
|
object_3ds: { nodes: {
|
|
23
23
|
from: "asset",
|
|
24
24
|
through: {
|
|
25
|
-
view:
|
|
25
|
+
view: n,
|
|
26
26
|
identifier: "object3D"
|
|
27
27
|
},
|
|
28
28
|
direction: "outwards",
|
|
@@ -41,7 +41,7 @@ function u(e) {
|
|
|
41
41
|
image_360_collections: { nodes: {
|
|
42
42
|
from: "image_360s",
|
|
43
43
|
through: {
|
|
44
|
-
view:
|
|
44
|
+
view: t,
|
|
45
45
|
identifier: "collection360"
|
|
46
46
|
},
|
|
47
47
|
direction: "outwards",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { isDefined as e } from "../../../utilities/isDefined.js";
|
|
2
|
+
import { executeParallel as t } from "../../../utilities/executeParallel.js";
|
|
3
3
|
import { chunk as n } from "lodash-es";
|
|
4
4
|
//#region libs/shared/reveal-components/src/ui/hooks/network/getTimeseriesLatestDatapoints.ts
|
|
5
5
|
var r = 100, i = async (i, a) => {
|
|
6
6
|
let o = n(a, r);
|
|
7
|
-
return (await
|
|
7
|
+
return (await t(o.map((e) => async () => await i.datapoints.retrieveLatest(e)), 2)).filter(e).flat();
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
10
10
|
export { i as getTimeseriesLatestDatapoints };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isDmAsset as t } from "../../../utilities/instances/typeGuards.js";
|
|
1
|
+
import { isDmAsset as e } from "../../../utilities/instances/typeGuards.js";
|
|
3
2
|
import "../../../utilities/instances/index.js";
|
|
3
|
+
import { isDefined as t } from "../../../utilities/isDefined.js";
|
|
4
4
|
//#region libs/shared/reveal-components/src/ui/hooks/pointClouds/fetchAnnotationsForModel.ts
|
|
5
5
|
var n = async (n, r, i, a) => {
|
|
6
|
-
if (n !== void 0 && r !== void 0 && i !== void 0) return (await Promise.all(i.map(async (e) => await a.matchPointCloudAnnotationsForModel(n, r, e)))).filter(
|
|
7
|
-
annotationId:
|
|
6
|
+
if (n !== void 0 && r !== void 0 && i !== void 0) return (await Promise.all(i.map(async (e) => await a.matchPointCloudAnnotationsForModel(n, r, e)))).filter(t).flatMap((t) => Array.from(t.entries()).flatMap(([t, n]) => n.map((n) => (e(n), {
|
|
7
|
+
annotationId: t,
|
|
8
8
|
asset: n
|
|
9
9
|
}))));
|
|
10
10
|
};
|