@yuuvis/client-framework 3.14.0 → 3.15.0

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.
@@ -6,7 +6,7 @@ import * as i1$2 from '@angular/material/icon';
6
6
  import { MatIconModule } from '@angular/material/icon';
7
7
  import * as i2 from '@angular/material/tooltip';
8
8
  import { MatTooltipModule } from '@angular/material/tooltip';
9
- import { SearchService, BaseObjectTypeField, Operator, TranslatePipe, SystemService, DmsService, EventService, TranslateService, RelationshipTypeField, YuvEventType, SystemType, DmsObject, LocalizationService } from '@yuuvis/client-core';
9
+ import { SearchService, BaseObjectTypeField, Operator, TranslatePipe, SystemService, DmsService, EventService, TranslateService, RelationshipTypeField, YuvEventType, LocalizationService, SystemType, DmsObject } from '@yuuvis/client-core';
10
10
  import { DialogComponent, BusyOverlayDirective, ConfirmService, ThemeService } from '@yuuvis/client-framework/common';
11
11
  import { YmtIconButtonDirective, YmtButtonDirective } from '@yuuvis/material';
12
12
  import * as i3 from '@yuuvis/material/panes';
@@ -343,6 +343,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
343
343
  class NodeSummaryComponent {
344
344
  constructor() {
345
345
  this.#system = inject(SystemService);
346
+ this.#localization = inject(LocalizationService);
346
347
  this.#router = inject(Router);
347
348
  this.object = input(...(ngDevMode ? [undefined, { debugName: "object" }] : /* istanbul ignore next */ []));
348
349
  this.nodeConfig = input(...(ngDevMode ? [undefined, { debugName: "nodeConfig" }] : /* istanbul ignore next */ []));
@@ -356,30 +357,31 @@ class NodeSummaryComponent {
356
357
  description: config.descriptionField ? obj.data[config.descriptionField] : undefined,
357
358
  properties: (config.summaryFields || [])
358
359
  .map((field) => this.#propertyToRendererInput(field, obj))
359
- .filter((p) => !!p),
360
+ .filter((prop) => !!prop),
360
361
  link: config.objectLink ? config.objectLink.replace('{{id}}', obj.id) : undefined
361
362
  }
362
363
  : null;
363
364
  }, ...(ngDevMode ? [{ debugName: "nodeSummary" }] : /* istanbul ignore next */ []));
364
365
  }
365
366
  #system;
367
+ #localization;
366
368
  #router;
367
- openObject(link) {
368
- this.#router.navigateByUrl(link);
369
+ async openObject(link) {
370
+ await this.#router.navigateByUrl(link);
369
371
  }
370
372
  #propertyToRendererInput(propertyName, object) {
371
373
  const metaKeys = Object.keys(object.data).filter((key) => {
372
374
  return key.startsWith(`${propertyName}_`);
373
375
  });
374
- const sr = this.#system.system?.allFields[propertyName];
375
- if (!sr)
376
+ const schemaResponse = this.#system.system?.allFields[propertyName];
377
+ if (!schemaResponse)
376
378
  return undefined;
377
379
  return {
378
- label: this.#system.getLocalizedLabel(propertyName.replace('_title', '')) || propertyName,
380
+ label: this.#localization.getLocalizedLabel(propertyName.replace('_title', '')) || propertyName,
379
381
  rendererInput: {
380
382
  propertyName,
381
383
  value: object.data[propertyName],
382
- rendererType: this.#system.getInternalFormElementType(propertyName, sr.classifications || [], sr.catalog),
384
+ rendererType: this.#system.getInternalFormElementType(schemaResponse.propertyType, schemaResponse.classifications || [], schemaResponse.catalog),
383
385
  meta: metaKeys.reduce((metaObj, key) => {
384
386
  metaObj[key] = object.data[key];
385
387
  return metaObj;
@@ -521,7 +523,6 @@ const ADD_RELATIONSHIP_DIALOG_OPTIONS = {
521
523
  class ObjectRelationshipGraphComponent {
522
524
  constructor() {
523
525
  this.#dialog = inject(MatDialog);
524
- this.#system = inject(SystemService);
525
526
  this.#localization = inject(LocalizationService);
526
527
  this.#theme = inject(ThemeService);
527
528
  this.#objectRelationshipService = inject(ObjectRelationshipService);
@@ -585,7 +586,6 @@ class ObjectRelationshipGraphComponent {
585
586
  }, ...(ngDevMode ? [{ debugName: "detailsNode" }] : /* istanbul ignore next */ []));
586
587
  }
587
588
  #dialog;
588
- #system;
589
589
  #localization;
590
590
  #theme;
591
591
  #objectRelationshipService;