@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.
Files changed (122) hide show
  1. package/dist/assets/poi-markers/poi-create-cursor.js +4 -0
  2. package/dist/data-providers/FdmSDK.d.ts +8 -0
  3. package/dist/data-providers/FdmSDK.js +34 -21
  4. package/dist/data-providers/assets/createClassicAssetsCache.d.ts +7 -0
  5. package/dist/data-providers/assets/createClassicAssetsCache.js +18 -0
  6. package/dist/data-providers/assets/createDmsDescribableNodesCache.d.ts +23 -0
  7. package/dist/data-providers/assets/createDmsDescribableNodesCache.js +19 -0
  8. package/dist/data-providers/cache/PointCloudAnnotationCache.js +10 -10
  9. package/dist/data-providers/cache/annotationModelUtils.js +8 -6
  10. package/dist/data-providers/cache/cad/CadInstanceMappingsCacheImpl.js +6 -6
  11. package/dist/data-providers/core-dm-provider/CoreDm3dDataProvider.js +11 -11
  12. package/dist/data-providers/core-dm-provider/filterNodesByMappedTo3d.js +13 -13
  13. package/dist/data-providers/core-dm-provider/getCadConnectionsForInstances.js +18 -18
  14. package/dist/data-providers/core-dm-provider/getCadConnectionsForRevisions.js +11 -11
  15. package/dist/data-providers/core-dm-provider/getCadModelsForInstance.js +3 -3
  16. package/dist/data-providers/core-dm-provider/getDMSModels.js +6 -6
  17. package/dist/data-providers/core-dm-provider/getEdgeConnected3dInstances.js +8 -8
  18. package/dist/data-providers/core-dm-provider/getFdmConnectionsForNodes.js +19 -19
  19. package/dist/data-providers/core-dm-provider/listMappedFdmNodes.js +14 -14
  20. package/dist/data-providers/legacy-fdm-provider/fdmEdgesToCadConnections.js +3 -3
  21. package/dist/data-providers/network/cad/searchClassicAssetsForCadModels.js +5 -5
  22. package/dist/data-providers/network/cad/searchHybridDmAssetsForCadModels.js +3 -3
  23. package/dist/data-providers/network/common/getDMAssetsForAnnotationReference.js +3 -3
  24. package/dist/data-providers/utils/getDMSModelRevisionRefs.js +3 -3
  25. package/dist/domains/annotation360/image360SceneCollectionTransform.d.ts +18 -0
  26. package/dist/domains/annotation360/image360SceneCollectionTransform.js +37 -0
  27. package/dist/domains/index.d.ts +2 -1
  28. package/dist/domains/index.js +3 -2
  29. package/dist/domains/pointsOfInterest/PointsOfInterestTool.d.ts +5 -0
  30. package/dist/domains/pointsOfInterest/PointsOfInterestTool.js +36 -17
  31. package/dist/domains/reveal/RevealDomainObjectUtils.d.ts +1 -0
  32. package/dist/domains/reveal/RevealDomainObjectUtils.js +1 -1
  33. package/dist/domains/reveal/cad/CadDomainObject.d.ts +18 -1
  34. package/dist/domains/reveal/cad/CadDomainObject.js +31 -15
  35. package/dist/foundation/renderTarget/CdfCaches.d.ts +9 -1
  36. package/dist/foundation/renderTarget/CdfCaches.js +24 -14
  37. package/dist/foundation/treeNodes/cad-tree-node/cad-lazy-loader.d.ts +3 -1
  38. package/dist/foundation/treeNodes/cad-tree-node/cad-lazy-loader.js +33 -22
  39. package/dist/foundation/treeNodes/cad-tree-node/cad-node-update-styling.js +6 -6
  40. package/dist/foundation/treeNodes/cad-tree-node/nodes-and-instance-mappings-sdk/classic-instance-mappings-sdk.js +1 -1
  41. package/dist/ui/components/InstanceLabel/InstanceLabel.js +18 -30
  42. package/dist/ui/components/Reveal3DResources/Reveal3DResources.js +20 -20
  43. package/dist/ui/components/RevealCanvas/SDKProvider.js +6 -6
  44. package/dist/ui/components/RevealCanvas/UsageMetricsTrackerContext.d.ts +3 -0
  45. package/dist/ui/components/RevealCanvas/UsageMetricsTrackerContext.js +6 -0
  46. package/dist/ui/components/RevealCanvas/ViewerContext.d.ts +2 -0
  47. package/dist/ui/components/RevealCanvas/ViewerContext.js +5 -5
  48. package/dist/ui/components/RevealContext/RevealContext.js +6 -6
  49. package/dist/ui/components/RevealToolbar/AssetContextualizedButton.js +1 -1
  50. package/dist/ui/components/RuleBasedOutputs/hooks/useGetDMConnectionWithNodeFromHybridMappingsQuery.js +11 -11
  51. package/dist/ui/components/Widget/RevealWidget.context.d.ts +2 -1
  52. package/dist/ui/components/Widget/RevealWidget.context.js +1 -1
  53. package/dist/ui/components/Widget/RevealWidget.d.ts +11 -2
  54. package/dist/ui/components/Widget/RevealWidget.js +35 -20
  55. package/dist/ui/components/Widget/RevealWidgetCameraController.d.ts +3 -1
  56. package/dist/ui/components/Widget/RevealWidgetCameraController.js +12 -10
  57. package/dist/ui/components/Widget/RevealWidgetController.d.ts +3 -1
  58. package/dist/ui/components/Widget/RevealWidgetController.js +40 -33
  59. package/dist/ui/components/Widget/index.d.ts +1 -1
  60. package/dist/ui/components/Widget/styling/applyPointCloudInstanceStyling.js +5 -5
  61. package/dist/ui/components/Widget/useRevealWidgetMetricsTracking.d.ts +21 -0
  62. package/dist/ui/components/Widget/useRevealWidgetMetricsTracking.js +33 -0
  63. package/dist/ui/components/commandBased/Factories/DefaultIcons.js +31 -31
  64. package/dist/ui/components/commandBased/buttons/DropdownButton.d.ts +2 -0
  65. package/dist/ui/components/commandBased/buttons/DropdownButton.js +67 -48
  66. package/dist/ui/components/commandBased/treeView/DomainObjectTreeView/DomainObjectTreeView.function.d.ts +13 -2
  67. package/dist/ui/components/commandBased/treeView/DomainObjectTreeView/DomainObjectTreeView.function.js +17 -9
  68. package/dist/ui/components/commandBased/treeView/DomainObjectTreeView/DomainObjectTreeView.js +21 -20
  69. package/dist/ui/components/commandBased/treeView/TreeView/components/tree-view-info.js +2 -2
  70. package/dist/ui/components/commandBased/treeView/TreeView/extraComponents/CadTreeAssetMappingDropdown.js +34 -33
  71. package/dist/ui/components/commandBased/treeView/TreeView/tree-view-node.js +1 -0
  72. package/dist/ui/components/commandBased/treeView/TreeView/tree-view-props.d.ts +1 -0
  73. package/dist/ui/components/commandBased/treeView/TreeView/tree-view.js +27 -25
  74. package/dist/ui/components/i18n/I18n.js +3 -3
  75. package/dist/ui/components/index.d.ts +1 -1
  76. package/dist/ui/hooks/network/fetchLinkFromRelationshipsByTimeseries.js +4 -4
  77. package/dist/ui/hooks/network/getImage360CollectionsForDmInstance.js +7 -7
  78. package/dist/ui/hooks/network/getTimeseriesLatestDatapoints.js +3 -3
  79. package/dist/ui/hooks/pointClouds/fetchAnnotationsForModel.js +4 -4
  80. package/dist/ui/hooks/pointClouds/usePointCloudAnnotationMappingForIntersection.js +11 -11
  81. package/dist/ui/hooks/pointClouds/usePointCloudAnnotationMappingsForAssetInstances.js +4 -4
  82. package/dist/ui/hooks/scenes/use3dScenes.js +4 -4
  83. package/dist/ui/query/core-dm/usePointCloudDMVolumeMappingForIntersection.js +9 -9
  84. package/dist/ui/query/core-dm/usePointCloudDMVolumes.js +10 -10
  85. package/dist/ui/query/index.d.ts +1 -0
  86. package/dist/ui/query/index.js +17 -16
  87. package/dist/ui/query/useAll3dDirectConnectionsWithProperties.js +6 -6
  88. package/dist/ui/query/useAssetsAndTimeseriesLinkageDataQuery.js +24 -24
  89. package/dist/ui/query/useAssetsAndTimeseriesLinkages.context.d.ts +3 -2
  90. package/dist/ui/query/useAssetsAndTimeseriesLinkages.context.js +4 -4
  91. package/dist/ui/query/useAssetsAndTimeseriesLinkages.js +13 -13
  92. package/dist/ui/query/useAssetsByIdsQuery.js +10 -11
  93. package/dist/ui/query/useFetchClassicAssetsByIds.js +5 -5
  94. package/dist/ui/query/useFilterOnClassicAssetsInScene.js +6 -6
  95. package/dist/ui/query/useHybridMappingsForAssetInstances.js +9 -9
  96. package/dist/ui/query/useInstanceNames.d.ts +11 -0
  97. package/dist/ui/query/useInstanceNames.js +17 -0
  98. package/dist/ui/query/useInstancesByIdsQuery.context.d.ts +3 -5
  99. package/dist/ui/query/useInstancesByIdsQuery.context.js +4 -8
  100. package/dist/ui/query/useInstancesByIdsQuery.d.ts +9 -6
  101. package/dist/ui/query/useInstancesByIdsQuery.js +14 -23
  102. package/dist/ui/query/useNamedDmInstancesByIds.d.ts +12 -0
  103. package/dist/utilities/cache/ReadonlyEntityCache.d.ts +4 -0
  104. package/dist/utilities/cache/ReadonlyEntityCache.js +27 -0
  105. package/dist/utilities/createMixpanelUsageMetricsTracker.d.ts +23 -0
  106. package/dist/utilities/createMixpanelUsageMetricsTracker.js +23 -0
  107. package/dist/utilities/externalIndex.d.ts +2 -0
  108. package/dist/utilities/externalIndex.js +3 -1
  109. package/dist/utilities/getInstancesFromClick.js +9 -9
  110. package/dist/utilities/index.d.ts +2 -1
  111. package/dist/utilities/index.js +12 -9
  112. package/dist/utilities/signal/useCombinedUpdateSignal.d.ts +9 -0
  113. package/dist/utilities/signal/useCombinedUpdateSignal.js +14 -0
  114. package/dist/utilities/signal/useMemoWithUpdateSignal.d.ts +3 -0
  115. package/dist/utilities/signal/useMemoWithUpdateSignal.js +13 -0
  116. package/dist/utilities/usageMetricsTracker.d.ts +4 -0
  117. package/dist/utilities/usageMetricsTracker.js +4 -0
  118. package/package.json +6 -3
  119. package/dist/ui/hooks/network/getAssetsByIds.d.ts +0 -2
  120. package/dist/ui/hooks/network/getAssetsByIds.js +0 -4
  121. package/dist/ui/query/useDmsInstanceByIdsQuery.d.ts +0 -3
  122. package/dist/ui/query/useDmsInstanceByIdsQuery.js +0 -18
@@ -0,0 +1,4 @@
1
+ //#region libs/shared/reveal-components/src/assets/poi-markers/poi-create-cursor.svg
2
+ var e = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%3e%3ccircle%20cx='16'%20cy='16'%20r='7'%20fill='%2312B76A'%20stroke='%23FFFFFF'%20stroke-width='1.5'/%3e%3cpath%20d='M16%2012.8v6.4M12.8%2016h6.4'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e";
3
+ //#endregion
4
+ export { e as default };
@@ -170,11 +170,19 @@ export declare class FdmSDK {
170
170
  filterAllInstances<PropertiesType = Record<string, unknown>>(filter: InstanceFilter | undefined, instanceType: 'node', source: Source): Promise<{
171
171
  instances: Array<FdmNode<PropertiesType>>;
172
172
  }>;
173
+ /**
174
+ * Fetches the given instances, splitting the request into chunks that respect the
175
+ * `byids` endpoint's item limit ({@link BY_IDS_MAX_ITEMS_PER_REQUEST}) and running
176
+ * at most {@link BY_IDS_MAX_PARALLEL_REQUESTS} requests in parallel. The `typing`
177
+ * field is merged across chunks, since it only depends on the requested `sources`
178
+ * and is therefore expected to be identical for every chunk.
179
+ */
173
180
  getByExternalIds<PropertyType>(queries: Array<{
174
181
  instanceType: InstanceType;
175
182
  externalId: string;
176
183
  space: string;
177
184
  }>, sources?: Source[]): Promise<ExternalIdsResultList<PropertyType>>;
185
+ private fetchByExternalIds;
178
186
  createInstance<PropertyType>(queries: Array<CreateInstanceItem<PropertyType>>): Promise<ExternalIdsResultList<PropertyType>>;
179
187
  editInstance<PropertyType>(queries: Array<{
180
188
  instanceType: InstanceType;
@@ -1,7 +1,8 @@
1
1
  import { mergeQueryResults as e } from "./utils/mergeQueryResult.js";
2
2
  import { queryNodesAndEdges as t } from "./utils/queryNodesAndEdges.js";
3
+ import { chunk as n, merge as r } from "lodash-es";
3
4
  //#region libs/shared/reveal-components/src/data-providers/FdmSDK.ts
4
- var n = class {
5
+ var i = 1e3, a = 2, o = class {
5
6
  _sdk;
6
7
  _featureDataLoadPerformanceMetrics;
7
8
  _byIdsEndpoint;
@@ -26,33 +27,33 @@ var n = class {
26
27
  throw Error(`Failed to list views. Status: ${n.status}`);
27
28
  }
28
29
  async searchInstances(e, t, n) {
29
- let i = a(n.filter), o = {
30
+ let r = l(n.filter), i = {
30
31
  view: e,
31
32
  query: n.query ?? "",
32
33
  instanceType: t,
33
- ...n.filter === void 0 ? {} : { filter: i },
34
+ ...n.filter === void 0 ? {} : { filter: r },
34
35
  ...n.operator === void 0 ? {} : { operator: n.operator },
35
36
  limit: n.limit ?? 1e3
36
- }, s = await this._sdk.post(this._searchEndpoint, { data: o });
37
- if (s.status === 200) return r(e, s.data.items), { instances: s.data.items };
38
- throw Error(`Failed to search for instances. Status: ${s.status}`);
37
+ }, a = await this._sdk.post(this._searchEndpoint, { data: i });
38
+ if (a.status === 200) return s(e, a.data.items), { instances: a.data.items };
39
+ throw Error(`Failed to search for instances. Status: ${a.status}`);
39
40
  }
40
- async filterInstances(e, t, n, i) {
41
- let a = {
41
+ async filterInstances(e, t, n, r) {
42
+ let i = {
42
43
  filter: e,
43
44
  instanceType: t
44
45
  };
45
- n !== null && (a.sources = [{ source: n }]), i !== void 0 && (a.cursor = i);
46
- let o = await this._sdk.post(this._listEndpoint, { data: a });
47
- if (o.status !== 200) throw Error(`Failed to fetch instances. Status: ${o.status}`);
48
- let s = o.data.items;
49
- return r(n, s), {
50
- instances: o.data.items,
51
- nextCursor: o.data.nextCursor
46
+ n !== null && (i.sources = [{ source: n }]), r !== void 0 && (i.cursor = r);
47
+ let a = await this._sdk.post(this._listEndpoint, { data: i });
48
+ if (a.status !== 200) throw Error(`Failed to fetch instances. Status: ${a.status}`);
49
+ let o = a.data.items;
50
+ return s(n, o), {
51
+ instances: a.data.items,
52
+ nextCursor: a.data.nextCursor
52
53
  };
53
54
  }
54
55
  async filterAllInstances(e, t, n) {
55
- e = a(e);
56
+ e = l(e);
56
57
  let r = await this.filterInstances(e, t, n);
57
58
  for (; r.nextCursor !== void 0;) {
58
59
  let i = await this.filterInstances(e, t, n, r.nextCursor);
@@ -65,6 +66,18 @@ var n = class {
65
66
  }
66
67
  async getByExternalIds(e, t) {
67
68
  if (e.length === 0) return { items: [] };
69
+ let o = n(e, i), s = [];
70
+ for (let e of n(o, a)) {
71
+ let n = await Promise.all(e.map(async (e) => await this.fetchByExternalIds(e, t)));
72
+ s.push(...n);
73
+ }
74
+ let c = s.map((e) => e.typing).filter((e) => e !== void 0);
75
+ return {
76
+ items: s.flatMap((e) => e.items),
77
+ ...c.length > 0 ? { typing: r({}, ...c) } : {}
78
+ };
79
+ }
80
+ async fetchByExternalIds(e, t) {
68
81
  let n = {
69
82
  items: e,
70
83
  includeTyping: !0
@@ -135,7 +148,7 @@ var n = class {
135
148
  return { items: a };
136
149
  }
137
150
  async queryNodesAndEdges(e, n) {
138
- return await t(e, this._sdk, i(this._featureDataLoadPerformanceMetrics, n?.metricsFeatureName));
151
+ return await t(e, this._sdk, c(this._featureDataLoadPerformanceMetrics, n?.metricsFeatureName));
139
152
  }
140
153
  async listDataModels() {
141
154
  let e = await this._sdk.get(this._listDataModelsEndpoint, { params: {
@@ -146,7 +159,7 @@ var n = class {
146
159
  throw Error(`Failed to fetch data models. Status: ${e.status}`);
147
160
  }
148
161
  };
149
- function r(e, t) {
162
+ function s(e, t) {
150
163
  if (e === void 0) return;
151
164
  let n = `${e.externalId}/${e.version}`;
152
165
  t.forEach((t) => {
@@ -154,14 +167,14 @@ function r(e, t) {
154
167
  r !== void 0 && Object.entries(r).reduce((e, [t, n]) => (e[t] = n, e), t.properties);
155
168
  });
156
169
  }
157
- function i(e, t) {
170
+ function c(e, t) {
158
171
  if (e !== void 0 && t !== void 0) return { metrics: {
159
172
  tracker: e,
160
173
  featureName: t
161
174
  } };
162
175
  }
163
- function a(e) {
176
+ function l(e) {
164
177
  return e !== void 0 && Object.keys(e).length === 0 ? void 0 : e;
165
178
  }
166
179
  //#endregion
167
- export { n as FdmSDK, a as makeSureNonEmptyFilterForRequest };
180
+ export { o as FdmSDK, l as makeSureNonEmptyFilterForRequest };
@@ -0,0 +1,7 @@
1
+ import { PickDeep } from 'type-fest';
2
+ import { Asset, CogniteClient, IdEither } from '@cognite/sdk';
3
+ import { InstanceReferenceKey } from '../../utilities';
4
+ import { ReadonlyEntityCache, createReadonlyEntityCache } from '../../utilities/cache/ReadonlyEntityCache';
5
+ export declare function createClassicAssetsCache(sdk: PickDeep<CogniteClient, 'assets.retrieve'>, dependencies?: {
6
+ createReadonlyEntityCache: typeof createReadonlyEntityCache<IdEither, Asset, InstanceReferenceKey>;
7
+ }): ReadonlyEntityCache<IdEither, Asset, InstanceReferenceKey>;
@@ -0,0 +1,18 @@
1
+ import { createInstanceReferenceKey as e } from "../../utilities/instanceIds/toKey.js";
2
+ import "../../utilities/index.js";
3
+ import { isDefined as t } from "../../utilities/isDefined.js";
4
+ import { createReadonlyEntityCache as n } from "../../utilities/cache/ReadonlyEntityCache.js";
5
+ //#region libs/shared/reveal-components/src/data-providers/assets/createClassicAssetsCache.ts
6
+ function r(r, i = { createReadonlyEntityCache: n }) {
7
+ let a = e;
8
+ return i.createReadonlyEntityCache(async (e) => {
9
+ if (e.length === 0) return Promise.resolve(/* @__PURE__ */ new Map());
10
+ let n = await r.assets.retrieve(e, { ignoreUnknownIds: !0 }), i = new Map(n.flatMap((e) => [[a({ id: e.id }), e], ...e.externalId === void 0 ? [] : [[a({ externalId: e.externalId }), e]]])), o = e.map(a);
11
+ return new Map(o.map((e) => {
12
+ let t = i.get(e);
13
+ return t === void 0 ? void 0 : [e, t];
14
+ }).filter(t));
15
+ }, a);
16
+ }
17
+ //#endregion
18
+ export { r as createClassicAssetsCache };
@@ -0,0 +1,23 @@
1
+ import { CogniteInstanceId, InstanceType } from '@cognite/sdk';
2
+ import { ReadonlyEntityCache, createReadonlyEntityCache } from '../../utilities/cache/ReadonlyEntityCache';
3
+ import { FdmKey } from '../cache';
4
+ import { CORE_DM_SPACE } from '../core-dm-provider/dataModels';
5
+ import { DmsUniqueIdentifier, ExternalIdsResultList, FdmNode, Source } from '../FdmSDK';
6
+ export type DmsDescribableNode = FdmNode<{
7
+ [CORE_DM_SPACE]: {
8
+ [`CogniteDescribable/v1`]: {
9
+ name: string;
10
+ };
11
+ };
12
+ }>;
13
+ export declare function createDmsDescribableNodesCache(sdk: {
14
+ getByExternalIds: (queries: Array<{
15
+ instanceType: InstanceType;
16
+ externalId: string;
17
+ space: string;
18
+ }>, sources?: Source[]) => Promise<ExternalIdsResultList<{
19
+ name: string;
20
+ }>>;
21
+ }, dependencies?: {
22
+ createReadonlyEntityCache: typeof createReadonlyEntityCache<DmsUniqueIdentifier, DmsDescribableNode, FdmKey>;
23
+ }): ReadonlyEntityCache<CogniteInstanceId, DmsDescribableNode, FdmKey>;
@@ -0,0 +1,19 @@
1
+ import { createFdmKey as e } from "../cache/idAndKeyTranslation.js";
2
+ import { restrictToDmsId as t } from "../../utilities/restrictToDmsId.js";
3
+ import { createReadonlyEntityCache as n } from "../../utilities/cache/ReadonlyEntityCache.js";
4
+ import "../cache/index.js";
5
+ import { COGNITE_DESCRIBABLE_SOURCE as r, CORE_DM_SPACE as i } from "../core-dm-provider/dataModels.js";
6
+ //#region libs/shared/reveal-components/src/data-providers/assets/createDmsDescribableNodesCache.ts
7
+ var a = `${r.externalId}/${r.version}`;
8
+ function o(o, s = { createReadonlyEntityCache: n }) {
9
+ let c = e;
10
+ return s.createReadonlyEntityCache(async (e) => {
11
+ let n = await o.getByExternalIds(e.map((e) => ({
12
+ ...t(e),
13
+ instanceType: "node"
14
+ })), [r]);
15
+ return new Map(n.items.filter((e) => e.properties[i]?.[a]?.name !== void 0).map((e) => [c(e), e]));
16
+ }, c);
17
+ }
18
+ //#endregion
19
+ export { o as createDmsDescribableNodesCache };
@@ -2,10 +2,10 @@ import { isSameAssetReference as e } from "../../utilities/instanceIds/equality.
2
2
  import { createModelRevisionKey as t } from "./idAndKeyTranslation.js";
3
3
  import { createInstanceReferenceKey as n } from "../../utilities/instanceIds/toKey.js";
4
4
  import "../../utilities/instanceIds/index.js";
5
- import { getInstanceReferencesFromPointCloudAnnotation as r } from "./utils.js";
6
- import { fetchPointCloudAnnotationAssets as i } from "./annotationModelUtils.js";
7
- import { isClassicAsset as a } from "../../utilities/instances/typeGuards.js";
5
+ import { isClassicAsset as r } from "../../utilities/instances/typeGuards.js";
8
6
  import "../../utilities/instances/index.js";
7
+ import { getInstanceReferencesFromPointCloudAnnotation as i } from "./utils.js";
8
+ import { fetchPointCloudAnnotationAssets as a } from "./annotationModelUtils.js";
9
9
  import { assert as o } from "@cognite/underscore";
10
10
  //#region libs/shared/reveal-components/src/data-providers/cache/PointCloudAnnotationCache.ts
11
11
  var s = class {
@@ -16,7 +16,7 @@ var s = class {
16
16
  fetchAnnotationAssets;
17
17
  constructor(e, t) {
18
18
  this._sdk = e;
19
- let { fetchAnnotationAssets: n } = t ?? { fetchAnnotationAssets: i };
19
+ let { fetchAnnotationAssets: n } = t ?? { fetchAnnotationAssets: a };
20
20
  this.fetchAnnotationAssets = n;
21
21
  }
22
22
  async getPointCloudAnnotationAssetsForModel(e, n) {
@@ -38,7 +38,7 @@ var s = class {
38
38
  filter: t,
39
39
  limit: 1e3
40
40
  }).autoPagingToArray({ limit: Infinity });
41
- return o(n.every((e) => e.annotationType === "pointcloud.BoundingVolume")), n.filter((e) => r(e).length !== 0);
41
+ return o(n.every((e) => e.annotationType === "pointcloud.BoundingVolume")), n.filter((e) => i(e).length !== 0);
42
42
  }
43
43
  async getOrBuildAssetKeyToAnnotationIdsCache(e, n) {
44
44
  let r = t(e, n), i = this._assetKeyToAnnotationIdsCache.get(r);
@@ -67,12 +67,12 @@ var s = class {
67
67
  };
68
68
  function c(e) {
69
69
  let t = /* @__PURE__ */ new Map();
70
- for (let [r, i] of e.entries()) for (let e of i) {
71
- let i = [];
72
- a(e) ? (i.push(n({ id: e.id })), e.externalId !== void 0 && i.push(n({ externalId: e.externalId }))) : i.push(n(e));
73
- for (let e of i) {
70
+ for (let [i, a] of e.entries()) for (let e of a) {
71
+ let a = [];
72
+ r(e) ? (a.push(n({ id: e.id })), e.externalId !== void 0 && a.push(n({ externalId: e.externalId }))) : a.push(n(e));
73
+ for (let e of a) {
74
74
  let n = t.get(e);
75
- n === void 0 && (n = /* @__PURE__ */ new Set(), t.set(e, n)), n.add(r);
75
+ n === void 0 && (n = /* @__PURE__ */ new Set(), t.set(e, n)), n.add(i);
76
76
  }
77
77
  }
78
78
  return t;
@@ -4,17 +4,17 @@ import { createInstanceReferenceKey as r } from "../../utilities/instanceIds/toK
4
4
  import "../../utilities/instanceIds/index.js";
5
5
  import { FdmSDK as i } from "../FdmSDK.js";
6
6
  import { isDefined as a } from "../../utilities/isDefined.js";
7
- import { concatenateMapValues as o } from "../../utilities/map/concatenateMapValues.js";
7
+ import { getInstanceReferencesFromPointCloudAnnotation as o } from "./utils.js";
8
8
  import { COGNITE_ASSET_SOURCE as s, COGNITE_ASSET_VIEW_VERSION_KEY as c, CORE_DM_SPACE as l } from "../core-dm-provider/dataModels.js";
9
- import { getInstanceReferencesFromPointCloudAnnotation as u } from "./utils.js";
9
+ import { concatenateMapValues as u } from "../../utilities/map/concatenateMapValues.js";
10
10
  import { chunk as d, uniqBy as f, uniqWith as p } from "lodash-es";
11
11
  //#region libs/shared/reveal-components/src/data-providers/cache/annotationModelUtils.ts
12
12
  async function m(e, t) {
13
- let n = e.flatMap((e) => u(e).map((t) => ({
13
+ let n = e.flatMap((e) => o(e).map((t) => ({
14
14
  annotationId: e.id,
15
15
  assetId: t
16
16
  }))).filter(a), i = await h(f(n.map((e) => e.assetId), r), t), s = new Map(i.map((e) => [r(e), e]));
17
- return o(n.map((e) => {
17
+ return u(n.map((e) => {
18
18
  let t = r(e.assetId), n = s.get(t);
19
19
  if (n !== void 0) return [e.annotationId, n];
20
20
  }).filter(a));
@@ -24,10 +24,12 @@ async function h(n, r) {
24
24
  return [].concat(await _(i, r), await g(a, r));
25
25
  }
26
26
  async function g(e, t) {
27
- return e.length === 0 ? [] : (await new i(t).getByExternalIds(e.map((e) => ({
27
+ if (e.length === 0) return [];
28
+ let { items: n } = await new i(t).getByExternalIds(e.map((e) => ({
28
29
  ...e,
29
30
  instanceType: "node"
30
- })), [s])).items.map((e) => ({
31
+ })), [s]);
32
+ return n.map((e) => ({
31
33
  ...e,
32
34
  properties: e.properties[l][c]
33
35
  }));
@@ -1,8 +1,8 @@
1
1
  import { isDmsInstance as e } from "../../../utilities/instanceIds/typeGuards.js";
2
2
  import { createFdmKey as t, createModelRevisionKey as n } from "../idAndKeyTranslation.js";
3
3
  import "../../../utilities/instanceIds/index.js";
4
- import { executeParallel as r } from "../../../utilities/executeParallel.js";
5
- import { isDefined as i } from "../../../utilities/isDefined.js";
4
+ import { isDefined as r } from "../../../utilities/isDefined.js";
5
+ import { executeParallel as i } from "../../../utilities/executeParallel.js";
6
6
  import { concatenateMapValues as a } from "../../../utilities/map/concatenateMapValues.js";
7
7
  import { mergeMapMapValues as o } from "../../../utilities/map/mergeMapMapValues.js";
8
8
  import "../../utils/getDMSModelRevisionRefs.js";
@@ -25,9 +25,9 @@ var l = class {
25
25
  u(s);
26
26
  let r = await this._classicCache?.getNodesForInstanceIds(e.modelId, e.revisionId, t);
27
27
  if (u(s), r !== void 0) return [n(e.modelId, e.revisionId), r];
28
- }).filter(i), m = await r(p, 2);
28
+ }).filter(r), m = await i(p, 2);
29
29
  u(s);
30
- let h = new Map(m.filter(i));
30
+ let h = new Map(m.filter(r));
31
31
  return o([...h.entries(), ...f?.entries() ?? []]);
32
32
  }
33
33
  async getAllModelMappings(e, t) {
@@ -41,12 +41,12 @@ var l = class {
41
41
  }
42
42
  async getAllModelMappingsInternal(e, c, l) {
43
43
  u(l);
44
- let d = r(e.map((e) => async () => {
44
+ let d = i(e.map((e) => async () => {
45
45
  if (this._classicCache !== void 0) return {
46
46
  model: e,
47
47
  mappings: await this._classicCache.getAssetMappingsForModel(e.modelId, e.revisionId)
48
48
  };
49
- }), 2), f = this._dmCache?.getAllMappingExternalIds(e, c), p = (await d).filter(i).flat();
49
+ }), 2), f = this._dmCache?.getAllMappingExternalIds(e, c), p = (await d).filter(r).flat();
50
50
  u(l);
51
51
  let m = await f;
52
52
  u(l);
@@ -1,7 +1,7 @@
1
1
  import { restrictToDmsId as e } from "../../utilities/restrictToDmsId.js";
2
- import { executeParallel as t } from "../../utilities/executeParallel.js";
3
- import { isDefined as n } from "../../utilities/isDefined.js";
4
- import { COGNITE_3D_OBJECT_SOURCE as r } from "./dataModels.js";
2
+ import { isDefined as t } from "../../utilities/isDefined.js";
3
+ import { COGNITE_3D_OBJECT_SOURCE as n } from "./dataModels.js";
4
+ import { executeParallel as r } from "../../utilities/executeParallel.js";
5
5
  import { getDMSModels as i } from "./getDMSModels.js";
6
6
  import { getDMSRevision as a } from "./getDMSRevision.js";
7
7
  import { EMPTY_ARRAY as o } from "../../utilities/constants.js";
@@ -27,7 +27,7 @@ var v = 2, y = {
27
27
  this._fdmSdk = e, this._deps = t;
28
28
  }
29
29
  is3dView(e) {
30
- return e.implements?.some((e) => e.externalId === r.externalId && e.space === r.space && e.version === r.version) ?? !1;
30
+ return e.implements?.some((e) => e.externalId === n.externalId && e.space === n.space && e.version === n.version) ?? !1;
31
31
  }
32
32
  async getDMSModels(e) {
33
33
  let t = this._modelIdToDMSIdentifier.get(e);
@@ -45,10 +45,10 @@ var v = 2, y = {
45
45
  return e(r);
46
46
  }
47
47
  async getDMSModelsForIds(e) {
48
- return (await t(e.map((e) => async () => await this.getDMSModels(e)), v)).flat();
48
+ return (await r(e.map((e) => async () => await this.getDMSModels(e)), v)).flat();
49
49
  }
50
- async getDMSRevisionsForRevisionIdsAndModelRefs(e, r) {
51
- return (await t(r.map((t, n) => async () => e[n] === void 0 ? void 0 : await this.getDMSRevision(e[n], t)), v)).filter(n);
50
+ async getDMSRevisionsForRevisionIdsAndModelRefs(e, n) {
51
+ return (await r(n.map((t, n) => async () => e[n] === void 0 ? void 0 : await this.getDMSRevision(e[n], t)), v)).filter(t);
52
52
  }
53
53
  async getRevisionRefsByType(e) {
54
54
  let [t, n] = g(e, (e) => e.type === "cad"), [r, i] = g(n, (e) => e.type === "pointcloud"), [a, o, s] = await Promise.all([
@@ -87,12 +87,12 @@ var v = 2, y = {
87
87
  }
88
88
  async getCadConnectionsForRevisions(e) {
89
89
  if (e.length === 0) return o;
90
- let t = await this.getDMSModelsForIds(e.map((e) => e.modelId)), r = await this.getDMSRevisionsForRevisionIdsAndModelRefs(t, e.map((e) => e.revisionId)), i = _(t, r).filter((e) => n(e[0]) && n(e[1]));
90
+ let n = await this.getDMSModelsForIds(e.map((e) => e.modelId)), r = await this.getDMSRevisionsForRevisionIdsAndModelRefs(n, e.map((e) => e.revisionId)), i = _(n, r).filter((e) => t(e[0]) && t(e[1]));
91
91
  return await u(i, this._fdmSdk);
92
92
  }
93
- async getCadConnectionsForInstances(e, t) {
94
- if (t.length === 0) return o;
95
- let r = await this.getDMSModelsForIds(t.map((e) => e.modelId)), i = await this.getDMSRevisionsForRevisionIdsAndModelRefs(r, t.map((e) => e.revisionId)), a = _(r, i).filter((e) => n(e[0]) && n(e[1]));
93
+ async getCadConnectionsForInstances(e, n) {
94
+ if (n.length === 0) return o;
95
+ let r = await this.getDMSModelsForIds(n.map((e) => e.modelId)), i = await this.getDMSRevisionsForRevisionIdsAndModelRefs(r, n.map((e) => e.revisionId)), a = _(r, i).filter((e) => t(e[0]) && t(e[1]));
96
96
  return await l(e, a, this._fdmSdk);
97
97
  }
98
98
  async getRevisionRefs(e) {
@@ -3,8 +3,8 @@ import { createFdmKey as t } from "../cache/idAndKeyTranslation.js";
3
3
  import "../../utilities/instanceIds/index.js";
4
4
  import { restrictToDmsId as n } from "../../utilities/restrictToDmsId.js";
5
5
  import { isDefined as r } from "../../utilities/isDefined.js";
6
- import { createDmsQueryDataAccumulator as i } from "../../utilities/dms-cursoring/dmsAccumulator.js";
7
- import { COGNITE_CAD_NODE_VIEW_VERSION_KEY as a, COGNITE_POINT_CLOUD_VOLUME_VIEW_VERSION_KEY as o, CORE_DM_SPACE as s } from "./dataModels.js";
6
+ import { COGNITE_CAD_NODE_VIEW_VERSION_KEY as i, COGNITE_POINT_CLOUD_VOLUME_VIEW_VERSION_KEY as a, CORE_DM_SPACE as o } from "./dataModels.js";
7
+ import { createDmsQueryDataAccumulator as s } from "../../utilities/dms-cursoring/dmsAccumulator.js";
8
8
  import { getCogniteAssetDirectRelationProperties as c } from "../utils/getCogniteAssetDirectRelationProperties.js";
9
9
  import { createCheck3dConnectedEquipmentQuery as l } from "./check3dConnectedEquipmentQuery.js";
10
10
  import { transformViewDefinitionToSource as u } from "./utils/transformViewItemToSource.js";
@@ -27,13 +27,13 @@ async function m(n, i, a, o, s) {
27
27
  instances: e.instances
28
28
  })).filter(r);
29
29
  }
30
- async function h(e, a, o, s, u) {
31
- let m = e.flatMap((e) => e.instances.map(n)), h = e.flatMap((e) => e.instances.flatMap((t) => c(t, e.view))).filter((e) => r(e) && e.externalId !== void 0 && e.space !== void 0), _ = f(m, h), v = p(_, t), y = d(v, 2e3), b = { revisionRefs: a }, x = [];
30
+ async function h(e, i, a, o, u) {
31
+ let m = e.flatMap((e) => e.instances.map(n)), h = e.flatMap((e) => e.instances.flatMap((t) => c(t, e.view))).filter((e) => r(e) && e.externalId !== void 0 && e.space !== void 0), _ = f(m, h), v = p(_, t), y = d(v, 2e3), b = { revisionRefs: i }, x = [];
32
32
  for (let e of y) {
33
33
  let t = {
34
- ...l(e, a, u),
34
+ ...l(e, i, u),
35
35
  parameters: b
36
- }, n = await i(o, t, { serial: ["initial_nodes", { parallel: [
36
+ }, n = await s(a, t, { serial: ["initial_nodes", { parallel: [
37
37
  "initial_nodes_cad_nodes",
38
38
  "initial_nodes_point_cloud_volumes",
39
39
  { serial: ["initial_edges_360_image_annotations", "initial_nodes_360_images"] },
@@ -43,18 +43,18 @@ async function h(e, a, o, s, u) {
43
43
  { serial: ["indirect_edges_360_image_annotations", "indirect_nodes_360_images"] }
44
44
  ] }] }
45
45
  ] }] }).accumulateAllData();
46
- x.push(...g(n, s));
46
+ x.push(...g(n, o));
47
47
  }
48
48
  return new Set(x);
49
49
  }
50
- function g(n, i) {
51
- let c = [...n.items.initial_nodes_cad_nodes].concat(i ? n.items.indirect_nodes_cad_nodes : []).map((n) => {
52
- let r = n.properties[s][a].object3D;
50
+ function g(n, s) {
51
+ let c = [...n.items.initial_nodes_cad_nodes].concat(s ? n.items.indirect_nodes_cad_nodes : []).map((n) => {
52
+ let r = n.properties[o][i].object3D;
53
53
  return e(r) ? t(r) : void 0;
54
- }).filter(r), l = [...n.items.initial_nodes_point_cloud_volumes].concat(i ? n.items.indirect_nodes_point_cloud_volumes : []).map((n) => {
55
- let r = n.properties[s][o].object3D;
54
+ }).filter(r), l = [...n.items.initial_nodes_point_cloud_volumes].concat(s ? n.items.indirect_nodes_point_cloud_volumes : []).map((n) => {
55
+ let r = n.properties[o][a].object3D;
56
56
  return e(r) ? t(r) : void 0;
57
- }).filter(r), u = new Set([...n.items.initial_nodes_360_images, ...i ? n.items.indirect_nodes_360_images : []].map(t)), d = [...n.items.initial_edges_360_image_annotations, ...i ? n.items.indirect_edges_360_image_annotations : []].filter((e) => u.has(t(e.endNode))).map((e) => t(e.startNode));
57
+ }).filter(r), u = new Set([...n.items.initial_nodes_360_images, ...s ? n.items.indirect_nodes_360_images : []].map(t)), d = [...n.items.initial_edges_360_image_annotations, ...s ? n.items.indirect_edges_360_image_annotations : []].filter((e) => u.has(t(e.endNode))).map((e) => t(e.startNode));
58
58
  return [
59
59
  ...c,
60
60
  ...l,
@@ -1,36 +1,36 @@
1
1
  import { createFdmKey as e } from "../cache/idAndKeyTranslation.js";
2
2
  import { restrictToDmsId as t } from "../../utilities/restrictToDmsId.js";
3
3
  import { isDefined as n } from "../../utilities/isDefined.js";
4
- import { createDmsQueryDataAccumulator as r } from "../../utilities/dms-cursoring/dmsAccumulator.js";
5
- import { COGNITE_CAD_NODE_SOURCE as i, COGNITE_CAD_NODE_VIEW_VERSION_KEY as a, COGNITE_VISUALIZABLE_SOURCE as o, CORE_DM_3D_CONTAINER_SPACE as s, CORE_DM_SPACE as c } from "./dataModels.js";
4
+ import { COGNITE_CAD_NODE_SOURCE as r, COGNITE_CAD_NODE_VIEW_VERSION_KEY as i, COGNITE_VISUALIZABLE_SOURCE as a, CORE_DM_3D_CONTAINER_SPACE as o, CORE_DM_SPACE as s } from "./dataModels.js";
5
+ import { createDmsQueryDataAccumulator as c } from "../../utilities/dms-cursoring/dmsAccumulator.js";
6
6
  import { hasIdFilter as l } from "./utils/filters.js";
7
7
  import { createObject3dToAssetMap as u, filterCadNodesWithObject3D as d, getModelRevisionAndTreeIndex as f } from "../utils/cadConnectionMapping.js";
8
8
  import { cogniteCadNodeSourceWithProperties as p } from "./cogniteCadNodeSourceWithProperties.js";
9
9
  import { cogniteVisualizableSourceWithProperties as m } from "./cogniteVisualizable.js";
10
10
  //#region libs/shared/reveal-components/src/data-providers/core-dm-provider/getCadConnectionsForInstances.ts
11
11
  var h = "cad_connections_for_instances_query", g = 5e3;
12
- async function _(r, i, o) {
13
- if (r.length === 0 || i.length === 0) return [];
14
- let s = await v(r, i, o), l = d(s.items.cad_nodes), p = u(s.items.assets);
12
+ async function _(r, a, o) {
13
+ if (r.length === 0 || a.length === 0) return [];
14
+ let c = await v(r, a, o), l = d(c.items.cad_nodes), p = u(c.items.assets);
15
15
  return l.map((n) => {
16
- let r = n.properties[c][a], o = p.get(e(r.object3D));
16
+ let r = n.properties[s][i], o = p.get(e(r.object3D));
17
17
  if (o === void 0) return;
18
- let s = f(i, r);
19
- if (s !== void 0) return {
20
- ...s,
18
+ let c = f(a, r);
19
+ if (c !== void 0) return {
20
+ ...c,
21
21
  instance: t(o)
22
22
  };
23
23
  }).filter(n);
24
24
  }
25
- async function v(e, n, i) {
26
- let a = {
25
+ async function v(e, n, r) {
26
+ let i = {
27
27
  ...y(e),
28
28
  parameters: {
29
29
  modelRefs: n.map(([e]) => t(e)),
30
30
  revisionRefs: n.map(([, e]) => t(e))
31
31
  }
32
32
  };
33
- return r(i, a, { serial: ["assets", "cad_nodes"] }, { metricsFeatureName: h }).accumulateAllData();
33
+ return c(r, i, { serial: ["assets", "cad_nodes"] }, { metricsFeatureName: h }).accumulateAllData();
34
34
  }
35
35
  function y(e) {
36
36
  return {
@@ -43,7 +43,7 @@ function y(e) {
43
43
  nodes: {
44
44
  from: "assets",
45
45
  through: {
46
- view: o,
46
+ view: a,
47
47
  identifier: "object3D"
48
48
  },
49
49
  direction: "outwards"
@@ -54,20 +54,20 @@ function y(e) {
54
54
  nodes: {
55
55
  from: "object_3ds",
56
56
  through: {
57
- view: i,
57
+ view: r,
58
58
  identifier: "object3D"
59
59
  },
60
60
  filter: { and: [{ in: {
61
61
  property: [
62
- s,
63
- i.externalId,
62
+ o,
63
+ r.externalId,
64
64
  "model3D"
65
65
  ],
66
66
  values: { parameter: "modelRefs" }
67
67
  } }, { containsAny: {
68
68
  property: [
69
- s,
70
- i.externalId,
69
+ o,
70
+ r.externalId,
71
71
  "revisions"
72
72
  ],
73
73
  values: { parameter: "revisionRefs" }
@@ -1,19 +1,19 @@
1
1
  import { createFdmKey as e } from "../cache/idAndKeyTranslation.js";
2
2
  import { restrictToDmsId as t } from "../../utilities/restrictToDmsId.js";
3
3
  import { isDefined as n } from "../../utilities/isDefined.js";
4
- import { createDmsQueryDataAccumulator as r } from "../../utilities/dms-cursoring/dmsAccumulator.js";
5
- import { COGNITE_CAD_NODE_VIEW_VERSION_KEY as i, CORE_DM_SPACE as a } from "./dataModels.js";
4
+ import { COGNITE_CAD_NODE_VIEW_VERSION_KEY as r, CORE_DM_SPACE as i } from "./dataModels.js";
5
+ import { createDmsQueryDataAccumulator as a } from "../../utilities/dms-cursoring/dmsAccumulator.js";
6
6
  import { createObject3dToAssetMap as o, filterCadNodesWithObject3D as s, getModelRevisionAndTreeIndex as c } from "../utils/cadConnectionMapping.js";
7
7
  import { cadConnectionsQuery as l } from "./cadConnectionsQuery.js";
8
8
  //#region libs/shared/reveal-components/src/data-providers/core-dm-provider/getCadConnectionsForRevisions.ts
9
9
  var u = "cad_connections_for_revisions_query";
10
- async function d(r, l) {
11
- if (r.length === 0) return [];
12
- let u = await f(r, l), d = s(u.items.cad_nodes), p = o(u.items.assets);
10
+ async function d(a, l) {
11
+ if (a.length === 0) return [];
12
+ let u = await f(a, l), d = s(u.items.cad_nodes), p = o(u.items.assets);
13
13
  return d.map((n) => {
14
- let o = n.properties[a][i], s = p.get(e(o.object3D));
14
+ let o = n.properties[i][r], s = p.get(e(o.object3D));
15
15
  if (s === void 0) return;
16
- let l = c(r, o);
16
+ let l = c(a, o);
17
17
  if (l !== void 0) return {
18
18
  ...l,
19
19
  instance: t(s)
@@ -21,14 +21,14 @@ async function d(r, l) {
21
21
  }).filter(n);
22
22
  }
23
23
  async function f(e, n) {
24
- let i = {
24
+ let r = {
25
25
  modelRefs: e.map(([e, n]) => t(e)),
26
26
  revisionRefs: e.map(([e, n]) => t(n))
27
- }, a = {
27
+ }, i = {
28
28
  ...l,
29
- parameters: i
29
+ parameters: r
30
30
  };
31
- return r(n, a, { serial: ["cad_nodes", "assets"] }, { metricsFeatureName: u }).accumulateAllData();
31
+ return a(n, i, { serial: ["cad_nodes", "assets"] }, { metricsFeatureName: u }).accumulateAllData();
32
32
  }
33
33
  //#endregion
34
34
  export { d as getCadConnectionsForRevisions };
@@ -1,5 +1,5 @@
1
- import { createDmsQueryDataAccumulator as e } from "../../utilities/dms-cursoring/dmsAccumulator.js";
2
- import { COGNITE_CAD_NODE_VIEW_VERSION_KEY as t } from "./dataModels.js";
1
+ import { COGNITE_CAD_NODE_VIEW_VERSION_KEY as e } from "./dataModels.js";
2
+ import { createDmsQueryDataAccumulator as t } from "../../utilities/dms-cursoring/dmsAccumulator.js";
3
3
  import { cadModelsForInstanceQuery as n } from "./cadModelsForInstanceQuery.js";
4
4
  //#region libs/shared/reveal-components/src/data-providers/core-dm-provider/getCadModelsForInstance.ts
5
5
  async function r(r, i) {
@@ -10,7 +10,7 @@ async function r(r, i) {
10
10
  ...n,
11
11
  parameters: a
12
12
  };
13
- return (await e(i, o, "cad_nodes").accumulateAllData()).items.cad_nodes.flatMap((e) => e.properties.cdf_cdm[t].revisions?.map(({ externalId: e, space: t }) => ({
13
+ return (await t(i, o, "cad_nodes").accumulateAllData()).items.cad_nodes.flatMap((t) => t.properties.cdf_cdm[e].revisions?.map(({ externalId: e, space: t }) => ({
14
14
  type: "cad",
15
15
  sourceType: "cdm",
16
16
  externalId: e,
@@ -1,15 +1,15 @@
1
1
  import { restrictToDmsId as e } from "../../utilities/restrictToDmsId.js";
2
- import { createDmsQueryDataAccumulator as t } from "../../utilities/dms-cursoring/dmsAccumulator.js";
3
- import { COGNITE_3D_MODEL_SOURCE as n } from "./dataModels.js";
2
+ import { COGNITE_3D_MODEL_SOURCE as t } from "./dataModels.js";
3
+ import { createDmsQueryDataAccumulator as n } from "../../utilities/dms-cursoring/dmsAccumulator.js";
4
4
  import { hasData3DModelContainerFilter as r } from "./utils/filters.js";
5
5
  import { chunk as i } from "lodash-es";
6
6
  //#region libs/shared/reveal-components/src/data-providers/core-dm-provider/getDMSModels.ts
7
- async function a(a, o, s = t) {
7
+ async function a(a, o, s = n) {
8
8
  let c = a.map((e) => `cog_3d_model_${e}`), l = i(c, 50), u = [];
9
- for (let t of l) {
9
+ for (let n of l) {
10
10
  let i = await s(o, {
11
11
  select: { models: { sources: [{
12
- source: n,
12
+ source: t,
13
13
  properties: [
14
14
  "name",
15
15
  "description",
@@ -21,7 +21,7 @@ async function a(a, o, s = t) {
21
21
  }] } },
22
22
  with: { models: { nodes: { filter: { and: [{ in: {
23
23
  property: ["node", "externalId"],
24
- values: t
24
+ values: n
25
25
  } }, r] } } } }
26
26
  }, "models").accumulateAllData();
27
27
  u.push(...i.items.models.map(e));