@meshmakers/octo-ui 3.4.910 → 3.4.930

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.
@@ -5148,6 +5148,8 @@ const GetRuntimeEntityByIdDocumentDto = gql `
5148
5148
  runtimeEntities(ckId: $ckTypeId, rtId: $rtId) {
5149
5149
  items {
5150
5150
  rtId
5151
+ rtDisplayName
5152
+ rtDisplayDescription
5151
5153
  ckTypeId
5152
5154
  rtWellKnownName
5153
5155
  rtCreationDateTime
@@ -5911,6 +5913,8 @@ const GetRuntimeEntityAssociationsByIdDocumentDto = gql `
5911
5913
  runtimeEntities(ckId: $ckTypeId, rtId: $rtId) {
5912
5914
  items {
5913
5915
  rtId
5916
+ rtDisplayName
5917
+ rtDisplayDescription
5914
5918
  ckTypeId
5915
5919
  associations {
5916
5920
  definitions(
@@ -5966,17 +5970,9 @@ const GetTreeAssociationTargetsDocumentDto = gql `
5966
5970
  totalCount
5967
5971
  items {
5968
5972
  rtId
5973
+ rtDisplayName
5974
+ rtDisplayDescription
5969
5975
  ckTypeId
5970
- rtWellKnownName
5971
- attributes(
5972
- attributeNames: ["name", "displayName", "description"]
5973
- resolveEnumValuesToNames: true
5974
- ) {
5975
- items {
5976
- attributeName
5977
- value
5978
- }
5979
- }
5980
5976
  }
5981
5977
  }
5982
5978
  }
@@ -6006,13 +6002,9 @@ const GetTreesDocumentDto = gql `
6006
6002
  runtimeEntities(ckId: $ckTypeId) {
6007
6003
  items {
6008
6004
  rtId
6005
+ rtDisplayName
6006
+ rtDisplayDescription
6009
6007
  ckTypeId
6010
- attributes(attributeNames: ["name", "description"]) {
6011
- items {
6012
- attributeName
6013
- value
6014
- }
6015
- }
6016
6008
  associations {
6017
6009
  targets(
6018
6010
  roleId: "System/ParentChild"
@@ -6916,13 +6908,8 @@ const GET_ROOT_ENTITIES_BY_CK_TYPE = gql `
6916
6908
  items {
6917
6909
  rtId
6918
6910
  ckTypeId
6919
- rtWellKnownName
6920
- attributes(attributeNames: ["name", "displayName", "description"]) {
6921
- items {
6922
- attributeName
6923
- value
6924
- }
6925
- }
6911
+ rtDisplayName
6912
+ rtDisplayDescription
6926
6913
  }
6927
6914
  }
6928
6915
  }
@@ -7448,25 +7435,17 @@ class RuntimeBrowserDataSource extends OctoGraphQlHierarchyDataSource {
7448
7435
  buildGroupNodeId(parentRtId, parentCkTypeId, role) {
7449
7436
  return `assoc:${parentCkTypeId}@${parentRtId}:${role.roleId}:${role.targetCkTypeId}`;
7450
7437
  }
7451
- /** Resolves the display label of an entity from its name/displayName attributes. */
7438
+ /**
7439
+ * Resolves the display label of an entity: the engine-computed rtDisplayName (AB#4813).
7440
+ * The backend guarantees a value ("<ckTypeId>@<rtId>" fallback when the CK type declares
7441
+ * no displayNameRule).
7442
+ */
7452
7443
  extractDisplayName(entity) {
7453
- const nameValue = entity.attributes?.items?.find((x) => x?.attributeName === 'name')?.value;
7454
- const displayNameValue = entity.attributes?.items?.find((x) => x?.attributeName === 'displayName')?.value;
7455
- return ((typeof nameValue === 'string'
7456
- ? nameValue
7457
- : typeof nameValue === 'object' && nameValue !== null
7458
- ? JSON.stringify(nameValue)
7459
- : null) ||
7460
- (typeof displayNameValue === 'string' ? displayNameValue : null) ||
7461
- entity.rtWellKnownName ||
7462
- entity.ckTypeId ||
7463
- 'Unknown');
7464
- }
7465
- /** Resolves the tooltip of an entity from its description attribute. */
7444
+ return entity.rtDisplayName || 'Unknown';
7445
+ }
7446
+ /** Resolves the tooltip of an entity: the engine-computed rtDisplayDescription. */
7466
7447
  extractTooltip(entity) {
7467
- const descValue = entity.attributes?.items?.find((x) => x?.attributeName === 'description')?.value;
7468
- return ((typeof descValue === 'string' ? descValue : null) ||
7469
- `${entity.ckTypeId} - ${entity.rtId}`);
7448
+ return entity.rtDisplayDescription || `${entity.ckTypeId} - ${entity.rtId}`;
7470
7449
  }
7471
7450
  /** Resolves the icon for a CK type, falling back to a generic entity icon. */
7472
7451
  resolveIcon(ckTypeId) {
@@ -7503,23 +7482,9 @@ class RuntimeBrowserDataSource extends OctoGraphQlHierarchyDataSource {
7503
7482
  if (!metaData) {
7504
7483
  metaData = new CkTypeMetaData(item?.ckTypeId || 'Unknown', item?.ckTypeId || 'Unknown', item?.ckTypeId || 'Unknown', code);
7505
7484
  }
7506
- // Extract display information
7507
- const nameValue = item.attributes?.items?.find((x) => x?.attributeName === 'name')?.value;
7508
- const displayNameValue = item.attributes?.items?.find((x) => x?.attributeName === 'displayName')?.value;
7509
- // Debug logging
7510
- if (typeof nameValue === 'object') {
7511
- console.warn('Name value is an object:', nameValue);
7512
- }
7513
- const text = (typeof nameValue === 'string'
7514
- ? nameValue
7515
- : typeof nameValue === 'object' && nameValue !== null
7516
- ? JSON.stringify(nameValue)
7517
- : null) ||
7518
- (typeof displayNameValue === 'string' ? displayNameValue : null) ||
7519
- item.ckTypeId ||
7520
- 'Unknown';
7521
- const descValue = item.attributes?.items?.find((x) => x?.attributeName === 'description')?.value;
7522
- const tooltip = (typeof descValue === 'string' ? descValue : null) ||
7485
+ // Engine-computed display fields (AB#4813); backend guarantees a display name
7486
+ const text = item.rtDisplayName || item.ckTypeId || 'Unknown';
7487
+ const tooltip = item.rtDisplayDescription ||
7523
7488
  `${item.ckTypeId} - ${item.rtId}`;
7524
7489
  result.push(new TreeItemDataTyped(`${item.ckTypeId}@${item.rtId}`, text, tooltip, item, metaData.svgIcon, (item?.associations?.targets?.totalCount ?? 0) > 0));
7525
7490
  }
@@ -7951,11 +7916,11 @@ class EntitySelectorDialogComponent {
7951
7916
  const item = node.item;
7952
7917
  if (item && typeof item === 'object' && 'rtId' in item && 'ckTypeId' in item) {
7953
7918
  const entity = item;
7954
- const nameAttr = entity.attributes?.items?.filter(Boolean).find((a) => a?.attributeName === 'name' || a?.attributeName === 'displayName');
7955
7919
  this.selectedEntity = {
7956
7920
  rtId: entity.rtId,
7957
7921
  ckTypeId: entity.ckTypeId,
7958
- name: nameAttr?.value ?? entity.rtWellKnownName ?? undefined,
7922
+ // Engine-computed display name (AB#4813); the backend guarantees a value
7923
+ name: entity.rtDisplayName,
7959
7924
  };
7960
7925
  }
7961
7926
  else {
@@ -11036,11 +11001,8 @@ class EntityDetailComponent {
11036
11001
  getEntityDisplayName() {
11037
11002
  if (!this.entity)
11038
11003
  return 'Unknown Entity';
11039
- const nameAttr = this.entity.attributes?.items?.find((attr) => attr?.attributeName === 'name' || attr?.attributeName === 'displayName');
11040
- if (nameAttr?.value && typeof nameAttr.value === 'string') {
11041
- return nameAttr.value;
11042
- }
11043
- return (this.entity.rtWellKnownName || this.entity.ckTypeId || 'Unknown Entity');
11004
+ // Engine-computed display name (AB#4813); the backend guarantees a value
11005
+ return this.entity.rtDisplayName || 'Unknown Entity';
11044
11006
  }
11045
11007
  onPropertyChange(event) {
11046
11008
  console.debug('Property changed:', event);
@@ -11495,6 +11457,8 @@ const GetRuntimeEntitiesByTypeDocumentDto = gql `
11495
11457
  }
11496
11458
  items {
11497
11459
  rtId
11460
+ rtDisplayName
11461
+ rtDisplayDescription
11498
11462
  ckTypeId
11499
11463
  rtWellKnownName
11500
11464
  rtCreationDateTime
@@ -17416,6 +17380,8 @@ const GetOrphanCandidatesDocumentDto = gql `
17416
17380
  }
17417
17381
  items {
17418
17382
  rtId
17383
+ rtDisplayName
17384
+ rtDisplayDescription
17419
17385
  ckTypeId
17420
17386
  rtWellKnownName
17421
17387
  attributes(attributeNames: ["name", "description"]) {
@@ -17441,6 +17407,8 @@ const GetOrphanCandidatesDocumentDto = gql `
17441
17407
  ) {
17442
17408
  items {
17443
17409
  rtId
17410
+ rtDisplayName
17411
+ rtDisplayDescription
17444
17412
  ckTypeId
17445
17413
  rtWellKnownName
17446
17414
  attributes(attributeNames: ["name"]) {
@@ -17458,6 +17426,8 @@ const GetOrphanCandidatesDocumentDto = gql `
17458
17426
  ) {
17459
17427
  items {
17460
17428
  rtId
17429
+ rtDisplayName
17430
+ rtDisplayDescription
17461
17431
  ckTypeId
17462
17432
  rtWellKnownName
17463
17433
  attributes(attributeNames: ["name"]) {
@@ -17475,6 +17445,8 @@ const GetOrphanCandidatesDocumentDto = gql `
17475
17445
  ) {
17476
17446
  items {
17477
17447
  rtId
17448
+ rtDisplayName
17449
+ rtDisplayDescription
17478
17450
  ckTypeId
17479
17451
  rtWellKnownName
17480
17452
  attributes(attributeNames: ["name"]) {
@@ -18007,6 +17979,8 @@ const GetMappingCoverageNodeDocumentDto = gql `
18007
17979
  runtimeEntities(rtId: $rtId, ckId: $ckTypeId) {
18008
17980
  items {
18009
17981
  rtId
17982
+ rtDisplayName
17983
+ rtDisplayDescription
18010
17984
  ckTypeId
18011
17985
  rtWellKnownName
18012
17986
  attributes(attributeNames: ["name", "description"]) {
@@ -18031,6 +18005,8 @@ const GetMappingCoverageNodeDocumentDto = gql `
18031
18005
  totalCount
18032
18006
  items {
18033
18007
  rtId
18008
+ rtDisplayName
18009
+ rtDisplayDescription
18034
18010
  ckTypeId
18035
18011
  attributes(attributeNames: ["name", "description"]) {
18036
18012
  items {
@@ -18542,8 +18518,8 @@ class MappingCoverageTreeDataSource extends HierarchyDataSourceBase {
18542
18518
  const entity = {
18543
18519
  rtId: data.rtId,
18544
18520
  ckTypeId: data.ckTypeId,
18545
- name: readAttr$1(data.attributes?.items, 'name') ?? data.rtWellKnownName ?? data.rtId,
18546
- description: readAttr$1(data.attributes?.items, 'description') ?? undefined,
18521
+ name: data.rtDisplayName ?? data.rtId,
18522
+ description: data.rtDisplayDescription ?? undefined,
18547
18523
  };
18548
18524
  const ownMappingCount = data.associations?.ownMappings?.totalCount ?? 0;
18549
18525
  const childItems = data.associations?.children?.items ?? [];
@@ -18552,8 +18528,8 @@ class MappingCoverageTreeDataSource extends HierarchyDataSourceBase {
18552
18528
  .map(c => ({
18553
18529
  rtId: c.rtId,
18554
18530
  ckTypeId: c.ckTypeId,
18555
- name: readAttr$1(c.attributes?.items, 'name') ?? c.rtId,
18556
- description: readAttr$1(c.attributes?.items, 'description') ?? undefined,
18531
+ name: c.rtDisplayName ?? c.rtId,
18532
+ description: c.rtDisplayDescription ?? undefined,
18557
18533
  mappingCount: c.associations?.mappings?.totalCount ?? 0,
18558
18534
  hasGrandChildren: (c.associations?.grandChildren?.totalCount ?? 0) > 0,
18559
18535
  }));
@@ -18570,17 +18546,6 @@ class MappingCoverageTreeDataSource extends HierarchyDataSourceBase {
18570
18546
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MappingCoverageTreeDataSource, decorators: [{
18571
18547
  type: Injectable
18572
18548
  }] });
18573
- function readAttr$1(items, name) {
18574
- if (!items)
18575
- return null;
18576
- const target = name.toLowerCase();
18577
- for (const item of items) {
18578
- if (item?.attributeName != null && item.attributeName.toLowerCase() === target && item.value != null) {
18579
- return String(item.value);
18580
- }
18581
- }
18582
- return null;
18583
- }
18584
18549
  /** Readable fallback label for a role id without a schema navigation name. */
18585
18550
  function deriveRoleLabel(roleId) {
18586
18551
  const slash = roleId.lastIndexOf('/');
@@ -19938,8 +19903,8 @@ class MappingCoverageTreeComponent {
19938
19903
  .map(e => ({
19939
19904
  rtId: e.rtId,
19940
19905
  ckTypeId: e.ckTypeId,
19941
- name: readAttr(e.attributes?.items, 'name') ?? e.rtWellKnownName ?? e.rtId,
19942
- description: readAttr(e.attributes?.items, 'description') ?? undefined,
19906
+ name: e.rtDisplayName ?? e.rtId,
19907
+ description: e.rtDisplayDescription ?? undefined,
19943
19908
  mappingCount: e.associations?.mappings?.totalCount ?? 0,
19944
19909
  parentPath: extractParentPath(e.associations?.parent?.items?.[0]),
19945
19910
  }));
@@ -20403,7 +20368,7 @@ class MappingCoverageTreeComponent {
20403
20368
  .map(e => ({
20404
20369
  rtId: e.rtId,
20405
20370
  ckTypeId: e.ckTypeId,
20406
- name: readAttr(e.attributes?.items, 'name') ?? e.rtWellKnownName ?? e.rtId,
20371
+ name: e.rtDisplayName ?? e.rtId,
20407
20372
  definition: readAttr(e.attributes?.items, 'pipelineDefinition'),
20408
20373
  }));
20409
20374
  candidates.sort((a, b) => a.name.localeCompare(b.name));
@@ -20668,8 +20633,8 @@ class MappingCoverageTreeComponent {
20668
20633
  const candidates = (result ?? [])
20669
20634
  .filter((e) => !!e && !!e.rtId && !!e.ckTypeId)
20670
20635
  .map(e => {
20671
- const name = readAttr(e.attributes?.items, 'name') ?? e.rtWellKnownName ?? e.rtId;
20672
- const description = readAttr(e.attributes?.items, 'description') ?? '';
20636
+ const name = e.rtDisplayName ?? e.rtId;
20637
+ const description = e.rtDisplayDescription ?? '';
20673
20638
  return {
20674
20639
  rtId: e.rtId,
20675
20640
  ckTypeId: e.ckTypeId,
@@ -20769,7 +20734,7 @@ class MappingCoverageTreeComponent {
20769
20734
  fetchPolicy: 'cache-first',
20770
20735
  })
20771
20736
  .pipe(map(r => r.data?.runtime?.runtimeEntities?.items?.[0])));
20772
- const name = readAttr(data?.attributes?.items, 'name') ?? data?.rtWellKnownName ?? null;
20737
+ const name = data?.rtDisplayName ?? null;
20773
20738
  return { key: `${ref.ckTypeId}@${ref.rtId}`, name };
20774
20739
  }
20775
20740
  catch {
@@ -21022,9 +20987,7 @@ function extractParentPath(first) {
21022
20987
  path.push({
21023
20988
  rtId: String(cursor.rtId),
21024
20989
  ckTypeId: String(cursor.ckTypeId),
21025
- name: readAttr(cursor.attributes?.items, 'name')
21026
- ?? cursor.rtWellKnownName
21027
- ?? String(cursor.rtId),
20990
+ name: cursor.rtDisplayName ?? String(cursor.rtId),
21028
20991
  });
21029
20992
  const next = cursor.associations?.parent?.items?.[0];
21030
20993
  cursor = next ?? null;